Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Recommended Scripting Language?
New Posts  All Forums:Forum Nav:

Recommended Scripting Language?

post #1 of 32
Thread Starter 
I already know Java, Perl, bsh/ksh scripting, and Windows scripting... I am looking for a new job and have gotten a 3rd interview. The job is a mix of SA, network engineer, deployment, and developer.

In addition to my skillsets, they are looking for someone who experience in: Groovy, Ruby, Python, or Tcl. Anyone have anything to say about these 4 languages?
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #2 of 32
I'm not quite sure what you're asking here. You looking for a recommendation of which one is most widely used? When I think of Python/Tcl, I think of system administrator scripts for Linux/Unix. When I think Ruby, I think back end web development. Nobody I know uses Groovy in the enterprise, too many other "similar" scripting languages with traction IMHO.

Greg
post #3 of 32
Thread Starter 
Quote:
Originally Posted by hammong View Post

I'm not quite sure what you're asking here. You looking for a recommendation of which one is most widely used? When I think of Python/Tcl, I think of system administrator scripts for Linux/Unix. When I think Ruby, I think back end web development. Nobody I know uses Groovy in the enterprise, too many other "similar" scripting languages with traction IMHO.

Greg

Thanks, hat's basically what I wanted to know....

SA and network infrastructure.... so Perl, Bash, Python, and Tcl?
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #4 of 32
Those 4 will do everything you need in Linux. You got it. =)

Greg
post #5 of 32
That's an interesting question. I'd avoid groovy as the startup time is a dealbreaker (the JVM takes too long to warm up for small scripts -- especially when compared to perl, bash, ruby, python, etc). If you need the JVM, just use java (or jpython, jruby, or similar).

I'd also avoid tcl. You already know bash and powershell if you need one-liners. What you need is something in-between these and java/c. Tcl doesn't really scale to medium-sized projects (a few KLoCs and a few files). As a personal thing, I don't like the syntax and consider it to be very dated.

Python and ruby are the more serious contenders. Ruby is the more elegant language IMHO (inspired by lisp, smalltalk, and parts of perl), but python is more widely used (the libraries available to both are fairly close overall). Python has ripped much of it's new syntax from ruby which makes much of the core syntax rather similar. Given your experience, I don't think you'll need much time to learn either (or both for that matter), but ruby will take a little longer than python. The best free resource I'd recommend for you (past the standard docs) is here (pick ruby or python). Below are some general notes about ruby and python in no particular order.

Both ruby and python have good C FFI. This means writing *real* programs isn't that hard if you need extra performance somewhere (a lot of their modules are actually written in C already).
Ruby used to be slower, but recent changes have caught it up with python in most aspects.
Python syntax is broken between 2.x and 3.x. This leaves people needing to use python 2.x and import __future__ syntax elements to attempt to bridge the gap (library support is getting better, but it's been several years and I suspect this rift will be problematic for several more years).
Ruby uses modules for avoiding namespace problems. Python uses a more direct file-based import (and 'import x as y' to avoid collisions). I really wish both would borrow from each other in this area.

Ruby is much more object oriented. For example, the normal way of looping for each item in Python would be "for item in array:" with the code on the next line. Rubyists *could* use a for loop, but would use "array.each |item| ##code here##" instead. In addition, ruby functions are objects while python functions are 'sometimes' objects (this traces back to when they tacked on the object system as an afterthought 15+ years ago -- though the system is well-integrated now).
Ruby also has real public, private, and protected class attributes (python uses an underscore convention instead).
Python has multiple inheritance (ruby prefers mixins).
Another major difference is rubyists love of not using () for functions. While Python requires function(p1, p2), ruby can use either that syntax or "function p1, p2" (something like haskell or smalltalk). This leads to things like "array.pop" instead of "array.pop()" (note that it's not an assignment).

Python has tuples while ruby does not (though it can via Rinda)
Ruby (like perl, but unlike python) uses "" for strings with substitution while ' ' are used for raw strings (python use " r"string" ")
Ruby's blocks (a form of closures) are much better than python's and it allows real lambda expressions (Python creator Guido is infamous for his dislike for functional programming).
Ruby is more flexible while python tries to have one canonical method of doing something (which I think is a little more maintainable when you have lots of developers and haven't set a coding standard).

Ruby does not force you to use whitespace for delimiting (Ruby allows do..end or {..} for delineating blocks) while python is always whitespace and indentation sensitive.
Ruby one-liners are easier to read (complements of the above blocks).
Python has no *real* constants (you instead avoid changing uppercase variables and check before creating them).
Ruby ripped off perl's regex wholesale which I think is a feature. Ruby regex are first class.
Ruby has both mutable strings and immutable strings (called symbols) instead of strictly immutable strings like python.

Ruby has first class continuations.
Ruby's map() method beats python's list comprehensions (more specifically, python's syntax of "res1 = [x*x for x in range(1, 10)]" is easier for simple operations, but is inferior to ruby's "res1 = (0..9).map { |x| x * x }" when the procedure is complicated and needs multiple lines). I should note that "{ |x| x * x}" is a lambda that takes the variable |x| and performs "x * x". A great intro to ruby blocks/lambdas is here.
In ruby, only false and nil are falsey values (not zero).
Python has decorators built-in while ruby does not (they're easy enough to make in ruby though).

a couple ruby resources for sys admin (primarily to illustrate that the language is suitable for the task). Personally, I think of ruby as the real perl6 (that is, how perl *should* have been designed).

http://www.ibm.com/developerworks/aix/library/au-rubysysadmin/
http://www.amazon.com/dp/1590598210/?tag=stackoverfl08-20
Edited by hajile - 3/14/14 at 10:53pm
post #6 of 32
Thread Starter 
One other language I was wondering about..... Google's Go.

Any traction on that for networking? I can imagine it's concurrent focus would make it good for high volume processing?
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #7 of 32
Ruby would be the easiest to learn out of the original options as it's actually object Perl. It's also used for more than just just web dev, but Rails is really what brought popularity to Ruby.

Python is the most widely used, but you might find the language a little jarring compared to what you're used to (I certainly don't like it) since your experience is with syntactically mire flexible languages.

Go is awesome. It's pretty basic at the moment, but that actually works in its favour because it means its very quick to learn. Go also has the same speed ofdevelopment as a scripting language but with the performance of a compiled language. Plus goroutines make parallelism trivial, which is ideal if you need to rapidly roll out scalable software.

These days I write a lot of my sysadmin tools in Go, mainly leaving Perl and shell scripting for jobs that are either so simple that performance doesn't make theslightest difference, or when others might want / need to tweak the code.
post #8 of 32
Quote:
Originally Posted by DuckieHo View Post

One other language I was wondering about..... Google's Go.

Any traction on that for networking? I can imagine it's concurrent focus would make it good for high volume processing?

I would avoid go for concurrency. I have a couple friends who used it for a rather large project and found out part way through that go isn't that good at preventing race conditions (this is a known problem). The long story short is that they rewrote in erlang. Due to it's maturity, widespread use and functional nature, I'd recommend it for your consideration.

If you are looking to the future, I would suggest rust. It is a C variant by Mozilla that is based on the actor model (inspired by Erlang) and unlike go or Erlang, still allows development without a GC (though one is available). I don't have much experience with this language aside from a lot of reading about it, but I can see it replacing C++ in the future. I don't know that it's stable enough to be writing large projects (though Mozilla is writing a new browser using it).
post #9 of 32
Sorry but that's complete and utter elitist hogwash.

Comparing Erlang and Go is like comparing apples to oranges. They're entirely different paradigms. And Go does prevent race conditions better than any other imperative language via channels. But obviously it's still possible to write c rap code in Go just as it is possible to write crap code in Erlang.

I hear people bleet on about on about concurrency in Erlang and that's great if you want a functional language, but if you prefer the imperative paradigm (as most people do) then the Erlang is completely the wrong tool.
post #10 of 32
One argument for using Python is its wide range of applications. You can use Python for pretty much anything from writing simple "do something with all files in the directory" scripts to GUI front-ends, webdev, gamedev, GPGPU, HPC, scientific apps and more.

You can compile Python to C or C++ for near-native performance and many available modules already use C/C++ so they are pretty fast. Also most popular libraries come with a Python API and a lot of applications provide Python scripting interface. In that regard Python definitely comes out on top, compared to the other options you've mentioned. I can't exactly comment on how useful it's going to be in your particular field, but overall it's a great tool to have in your arsenal.
buka
(17 items)
 
  
Reply
buka
(17 items)
 
  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Recommended Scripting Language?