Python, Ruby, or Perl?
What's the better scripting language?
php
Ocaml
JavaScript (ES6), Lua, or a Lisp variant.
>>53147595
PowerShell, works on the largest OS install in the world.
awk
>>53147595
BASH
Lua
>>53147595
When it comes to comparing Python and Ruby I compare their philosophy behind the langague than itself. It really helps to narrow down an answer.
Hasn't python supplanted ruby now?
For some tasks, Perl is ideal but for most general scripting, python would be better.
I love perl too so it kills me to say so.
gLua
Angelscript
Scala.
>>53147595
Stop being a bitch and learn C
>>53147740
Please explain what you see as the differences in their philosophy.
>>53148050
But I'm already learning C++.
what are you fucking trying to accomplish OP? languages are just tools, you aren't going to use a screw driver when you are given a nail
javascript: dom manipulation, slowish graphics and audio manipulation in browser
C/C++: fast graphics and computation in general, beginners prone to memory management bugs so learn to allocate/deallocate. Generally low assurance
Java: Big company/enterprise horseshit, good for impressing mediocre mid level management types
haskell: functional, requires less lines to do the same thing as imperative but requires a change in thinking (there are no loops in haskell). You can extract to Isabelle for formal proofs to give some assurances.
AGDA: a theorem prover and haskell mixed together: this is where you absolutely need to prove your program works before running it. This is slightly experimental but where programming will go in the next decades.
etc.
>>53147595
Lua, Guile
>Lisp
Scripting languages are all garbage and are no longer necessary now that GC'd statically-typed languages with generics and type inference and no header files are basically mainstream.
>>53148370
this
muh D
fuck type inference tho
>>53148370
embedded environments need them, not everything is a server.
javascript
all considered harmful.
us this >>53147692
>>53148562
what does harmfull mean in this context?
>>53148619
"neurotypical"
LISP is the best scripting language
>>53148395
>fuck type inference
>>53148650
>neurotypical
thanks i learnt a word.
from wikipedia ...
"refers to anyone who does not have any developmental disabilities such as autism, dyslexia, developmental coordination disorder, or ADHD."
so you're saying those languages are harmfull because they're *not* autistic???? i confess to being somewhat baffled.
>>53147595
Python.
Perl is garbage and ruby is nothing outside of rails.
Python is clean enough and its popularity ensures that someone has probably already solved your problem.
>2016
>Using any language except JavaScript
I SERIOUSLY hope you guys don't do this.
>>53148562
>Worse is better
The worst meme.
>>53148562
>recommends go
>D considered harmful
ROB PIKE PLS GO
I am new to learning languages, only about a year in. I currently work at a tier IV data center. the back end we usually use is perl around here. I have not learned perl yet but everyone tells me its worth the learn. currently I only know PHP and Python for scripting
>>53148776
Sssssssllllllooooooooowwwwwwaaaaahhhh
>>53148839
Isn't there some sort of privacy problem with Javascript or whatever? Why is it disabled in Tails?
>>53148050
>make scripts in C
>>53148562
>How to not have a job, the post
>>53147595
Python
It's all the same shit desu. If you want something different, try Tcl or Lua. Those two are designed specifically for embedding into C.
I'm still using Perl 5 because it's what I learned in the 90's and it just works.
Perl over python
>>53148776
Perl.
Python is garbage and ruby is nothing outside of rails.
Perl is clean enough and its CPAN ensures that someone has already solved your problem.
>op gives you three choices
>no one picks any of them
/g/ everyone.
Python.
>Perl
Obsolete shitty write-only shell knock-off.
>Ruby
Python made worse and slower by some Japanese idiot.
>>53147595
Python
>>53148562
>iSCSI, FCoE
>Instead use AoE
You're kidding, right?
>>53148210
>beginners prone to memory management bugs
Everyone is prone to bugs. Pros just make more subtle ones.
tcl
>>53147595
es6 bruh
Perl makes me wet but it's such an ugly language.
>>53147595
>perl
>posting a fucking coal-burner
2/10 - low-tier b8
Of the three I'd go for Python. I use R with functions in C++ via Rcpp where it makes sense to do so, but that's for my specific use case.
>>53147646
And Kimoji is the app generating the largest app download traffic in the world.
>>53147646
>PowerShell, works on the largest OS install in the world.
That statement wouldn't even be true if Windows had the biggest installation base, since PowerShell isn't preinstalled on most Windows systems. Until this is the case the only scripting language broadly supported by Windows remains to be Batch script.
Microsoft BASIC, because it runs on everything.
>>53148210
Did you even read the question you fucking autist?
>>53147740
>Python
>Ruby
>philosophy
>>53155531
>read the question
what, is this not /g/ anymore?
>>53148210
I cant wrap my head around the no loop idea in haskell , how do you iterate through something
>>53155759
the function processes the head, and passes the tail to itself
>>53147595
>Python
Widely supported, easy to get into. Horrible syntax that makes it very easy to slip in errors. Barely any sanity checking or error testing. Lots of available resources and libraries that will make your life easier.
>Ruby
Not as widely supported, lots of homebrew or mish-mash syntax. Slightly more rigorous than python, but only barely. Very malleable.
>Perl
Extremely scripting-oriented, contains shittons of tools, operators and keywords for every string-related situation you could possibly encounter. High amounts of syntactical noise and special cases / keywords. Hard to read for the uninitiated. Runs everywhere and widely supported.
I'd say perl is the classic sysadmin's scripting tool, but python is quickly growing to replace it among younger audiences who are finding perl inpenetrable and not worth getting into.
Ruby doesn't really seem to have a widespread market share among scripting languages, though some people swear by it. It might be a decent middle ground.
>>53148700
>thatsthejoke.jpg
Nodejs (JavaScript)
>>53155759
Say you want to print each element of a list separately to the terminal (in different lines).
You would write something likemapM print myList, which is just a shorthand form of sayingsequence (map print myList).
‘map’ takes a function and maps it over a list, and ‘sequence’ takes a list of IO actions and combines them to one bigger IO action. (The IO action thing is an abstraction haskell uses to avoid side effects)
Also, when people say
>haskell has no loops
They're just dirty liars. Haskell has no _control flow_, but it does have loops: recursion.
That's how stuff like ‘maps’, which seemingly requires a loop to work, actually works. It recurses its way through the list.
And as anybody with even the barest of functional programming experience could tell you, you can implement any loop as a tail-recursive function call instead.
>>53155007
define "largest"
GNU/Linux is the most widely deployed OS in the world.
M$ is the largest if you mean bloated with crapware and low rent trash.
>plus spyware
>>53147595
GUILE then BASH with the POSIX tools (awk,sed,grep,xargs, cut,cp,cat,wc,etc. etc.)
>>53156034
Plus stop being a bitch and learn C
>use C and "glue" it with Guile and BASH
>BASH = POSIX
>>53147595
perl master race reporting in
>>53153185
>Perl is clean enough
>perl
>clean
>>53148081
>considering c and cpp the same
anon don't trigger me again with this shit, we talked about this already
Perl 6 is the Haskell of scripting languages, it only needs more modules...
>>53157022
>Perl 6 is the Haskell of scripting languages
It's pure, functional and nonstrict and has a strong static, turing complete type system?
>>53156121
If they weren't cia niggers they would just write a fucking compiler that lets you write C code in the shell and run it.
I bet they can't even write a fucking compiler.
>>53156955
perl -le 'print qw(Cleaner than yo mama!)'
>>53157173
No, but it has more funky dank operators than you can shake a stick at.
>>53148050
>>53151481
not saying one should script in C, but one defnetly could...
http://stackoverflow.com/questions/584714/is-there-an-interpreter-for-c
>>53157173
it's multiparadigm and have gradual typing
>>53157337
You can run C in shell using GDB if you attach to something running or just use: CINT
also
igcc, ccons, or c-repl
>>53148562
>don't use HTTP
>uses HTTP himself
White people are always the biggest hypocrites.
>>53157559
I hate racism.
And niggers.
Now GTFO
>>53157505
better off scripting with SBCL (Common Lisp)
you can call Python Native Code Compiler if that makes you feel better.
>CMUCL also named the native compiler Python
Tcl. None of the bigger languages interest me and I seem to be just as productive in Tcl as in the others. Also, Tk is a godsend for GUI design, which always struck me as a horrid chore, yet feels so simple in this framework.
post more riley
>>53157588
#!/usr/local/bin/sbcl --script
(write-line "Hello, World!")
$ ./hello.lisp
Hello, World!
>just tell people it is python
>>53157588
Both CL and Python regex sucks. I do use CHICKEN for some NLP stuff though.
>>53147595import json
import urllib2 as ulib
from matplotlib import pyplot as plt
def get_thread(borad, tnum):
api_lol = 'https://a.4cdn.org/{}/thread/{}.json'.format(borad, tnum)
raw = ulib.urlopen(api_lol).read()
return json.loads(raw)
counts = {'python': 0,
'ruby': 0,
'perl': 0,}
thread = get_thread('g', 53147595)
posts_on_topic = 0
for post in thread[u'posts']:
for k in counts.keys():
lang_ref = k in post[u'com']
counts[k] += int(lang_ref)
if lang_ref == True:
posts_on_topic += 1
print 'A total of {} posts, with {} posts on topic'.format(
len(thread[u'posts']), posts_on_topic)
X = counts.keys()
Y = [counts[x] for x in X]
plt.bar(xrange(3), Y, 0.5)
plt.xlabel('Language')
plt.ylabel('References in thread')
plt.title('well done, /g/')
plt.xticks([i + 0.25 for i in xrange(3)], X)
plt.show()
>>53147595
Perl desu
>>53148867
DON'T YOU MEAN BEST MAYMAY?
Nodejs
>>53147595
The answer is objectively python.
Even php exists largely due to entropy.