Perl

What is your opinion on Perl?
Is there any reason to learn it over Python nowadays?

Other urls found in this thread:

tiobe.com/tiobe-index/perl/
tiobe.com/tiobe-index/ruby/
tiobe.com/tiobe-index/python/
indeed.com/q-Python-jobs.html
indeed.com/q-Perl-jobs.html
indeed.com/q-Ruby-jobs.html
indeed.com/jobtrends/q-Python-q-Rails-q-Perl-q-Ruby-q-Django.html
ryan-williams.net/hacker-news-hiring-trends/2017/june.html?compare1=Ruby&compare2=Python&compare3=Perl&compare4=Rails
itjobswatch.co.uk/IT-Job-Market/UK/Programming-Languages
docs.perl6.org/language/grammar_tutorial
pdl.perl.org/
bioperl.org/
docs.python.org/3.6/extending/embedding.html
github.com/ruby/ruby
crystal-lang.org/2016/07/15/fibonacci-benchmark.html
rubyraptor.org/
dev.housetrip.com/2013/10/29/scala-from-ruby/
medium.com/@fapoli/is-scala-the-new-ruby-8d53975e7297
benchmarksgame.alioth.debian.org/u64q/ruby.html
en.wikipedia.org/wiki/Ruby_(programming_language)
twitter.com/SFWRedditImages

>Is there any reason to learn it over Python nowadays?
You want to embed an interpreter in your program but want more than one instance and these instances should be properly separated, not some shitty hack.

>Is there any reason to learn it over Python nowadays?
Some shitty, exotic typesetting softwares uses lots of it.

So there's pretty much no reason?
I thought Perl was faster to write and better for Unix scripting.

Perl isn't slow as fuck and it's more readable for shell scripting or other simple scripts.

2hard4me

A while ago I did a comparison between Python Ruby and Perl for fun. Basically I just wrote some simple "Sup Forums coding challenges" projects in all languages.

While I'm totally sold on Ruby (as it's really beautiful) and I also think it's great to know some Python (since it's simple and has so many applications nowadays, it's literally everywhere).
But I was really surprised that Perl felt so great to code with. It's syntax is super funky and you have so many ways to let Perl take care of something, if you want to. It also has this air of being an oldschool hacker language. All in all Perl was a very pleasant surprise. A lot of cool gimmicks you have in Ruby are somehow inspired by Perl.

I wouldn't change from Ruby to Perl as my main language, but maybe I'll take a few weeks and get into in in the future. And if someone would ask me to do a Perl project, I'd totally do it just because of the coolness or Perl (even it CAN be less readable than Ruby or Python).

print (($_%3 ? "" : Fizz) . ($_%5 ? "" : Buzz) or $_) for 1..100

Perl is just fun to program with. It was designed by a linguist and it shows. If you're looking for a job it's probably a better idea to focus on Python or Ruby though.

say "Fizz"x!($_%3)."Buzz"x!($_%5)||$_ for 1..100
get on my level

>What is your opinion on Perl?
It's one of the few programming languages that requires a degree of actual study to be able to read due to its large count of special variables and the way it uniquely handles a lot of things.

>Is there any reason to learn it over Python nowadays?
Faster
More efficient
Way better for text parsing and manipulation
Easier to write for in my opinion
and

>Perl isn't slow as fuck

It is though.

It's a good deal faster than both Ruby and Python, except for heavy number-crunching applications because nobody ever wrote the equivalent of cython for it (which honestly shouldnt even count as "python" at that point)

>looking for a job
Don't most sysadmins and netadmins use Perl?
It's also pretty popular in the security field.

>What is your opinion on Perl?

its syntax is inherently better than bash and a lot of the utilities you use with bash are built into the language (awk sed grep etc), it's great to know bash, sed, awk, grep, and the coreutils, etc, but sometimes you just want to do something in a hacky tiny script without having to piss about with a shitty syntax (bash or python for instance), if it weren't a dirty quick hack it wouldn't be in bash, perl, or arguably even python to begin with, so when it has to be a dirty hack why not do it in arguably the best language for it? if I had to sum up the biggest benefit of perl it's that if you're writing something new or original and it's only ever going to be a small hack (say, I thought Perl was faster to write and better for Unix scripting.

it is

>While I'm totally sold on Ruby

ruby is a decent contender as well, and both ruby and python do external package managers far better than perl

Hah, I'm not on that level, but nice code though..

>Don't most sysadmins and netadmins use Perl?

older shops will probably have a lot of perl, yes, but nobody is hiring perl developers, they're hiring sysadmins with experience in perl and something else(usually ruby/python, but python more so these days) so they can get you to rewrite all their legacy perl shit in something far more maintainable for new hires that don't know the language

most new development isn't going to be in perl and most medium-large projects aren't going to be in perl either, it's nice to know perl incidentally but don't learn it to be employable

>It's also pretty popular in the security field.

yeah but if you're any good in that field you should know at least the basics of most major popular languages in use

>don't learn it to be employable
I met a sysadmin once who didn't seem to be older than 35 at most yet only knew Perl and bash for scripting (not Python, nor Ruby). So are popular scripting languages really a must?
>the basics of most major popular languages in use
Java, C++, Python?
I meant Perl was popular in infosec as in, it's used for a lot of network security tools for example.

Well, Solo hacked the US defense forces and NASA with some Perl scripts. So it's definately good enough.

For Ruby there is Metasploit.

For Python there are other frameworks.


At the end of the day each scripting language can do everything. Similar to Java, C# and C++: 90% of all the software written with it could be done with one of the others without problems.

If Perl is faster why dont we have frameworks like Jango made on it?
What is a example of a popular software made on Perl?

>why dont we have frameworks like Jango made on it?

Catalyst
Mojolicious
Mason
Dancer
Squatting
Jifty
CGI::App
(...)

Perl isn't noticeably faster and if you're looking for a web framework in Perl there's Catalyst.

There's really no good reason to use Perl over Python these days. Perl and Ruby are dying and Javascript and Python will be the last dynamically typed languages to ever become popular.

>Perl and Ruby are dying and Javascript and Python will be the last dynamically typed languages to ever become popular.
Is this a bad or a good thing?

It will only truly be great when Javascript and Python die.

What will replace them?
Also, so many shit is written in Perl I have a hard time believing it'll ever truly die. It's called the duct tape of the Internet for a reason.

>Perl and Ruby are dying

Nah, not true.

Perl kinda "was" dying, because a decade ago a lot of Perl hackers changed to either to Python or Ruby. So the community is not that big anymore. But it won't shrink any further and will ways have it's (niche) place. The last few years they are even recovering:

>tiobe.com/tiobe-index/perl/


As for Ruby, I don't know why people are repeating this meme. Ruby is pretty alive and almost as big as on it's prime. And in a few years Ruby3 is coming, which will be great. For python there is nothing announced, AFAIK?

The only downside is Ruby is pretty much cneterd about Rails. You'll find about 100 Python Jobs, which are 20 Security Jobs, 20 SysAdmin Jobs, 20 Data Science Jobs and 40 WebDev Jobs. For Ruby you'll find 50 Jobs, with 40 Rails jobs and maybe 10 others.

See:
>tiobe.com/tiobe-index/ruby/


Also let's not forget that Python isn't really "growing" anymore:
>tiobe.com/tiobe-index/python/

The only things that's growing is Go and maybe Swift.


Here are some numbers:

Python: 43,916 Jobs
Django: 1,866 Jobs

Perl: 15,421 Jobs

Ruby: 13,120 Jobs
Rails: 15,824 Jobs

See:
>indeed.com/q-Python-jobs.html
>indeed.com/q-Perl-jobs.html
>indeed.com/q-Ruby-jobs.html

You can also find this trend here:

>indeed.com/jobtrends/q-Python-q-Rails-q-Perl-q-Ruby-q-Django.html

Or here:
>ryan-williams.net/hacker-news-hiring-trends/2017/june.html?compare1=Ruby&compare2=Python&compare3=Perl&compare4=Rails

Or:
>itjobswatch.co.uk/IT-Job-Market/UK/Programming-Languages

You'll notice that Python has at alest twice as much jobs as Ruby, but Ruby Jobs are almost always Rails Jobs.
Perl is not that big, but it has maybe half of the jobs of Ruby (depending on the area) and it's not vanishing over night.

> I don't know why people are repeating this meme

Usage, mailing list activity and contributions have been quickly dropping for the last 5+ years. Even on Tiobe it has dropped to a sad 13th place. They also haven't been able to find companies willing to sponsor Ruby, Bundler or Rails development so the ecosystem has largely stagnated. The primary Ruby implementation, which desperately needs work, only has four people actively working on it and those four are a very far cry from the people working on other VMs.

Rails is the only thing people really use Ruby for and it hasn't been unique for a very long time and is now widely considered a slow bloated mess. Most of the top contributors have also moved on to other languages like Javascript, Elixir, Python and Rust. Meanwhile, no new interesting work is being done in Ruby and it lacks complete up to date bindings for basically everything interesting (Tensorflow, Torch, Spark etc.). It doesn't even have complete up to date bindings for any GUI library besides TK.

>And in a few years Ruby3 is coming, which will be great

Ruby 3 will change nothing. They don't actually have any idea how to implement any of the proposed changes and they have no money to hire people that do.

> Here are some numbers

The Indeed stats you posted for Rails are somewhat misleading because Rails is mentioned in a lot of non Ruby job postings. A lot of PHP jobs for instance mention "experience in Rails like MVC frameworks."

> Python isn't growing

Python is in the top 5 and no language will be surpassing Java, C or C++ anytime soon. It's hard to have continuous growth when you're already that popular.

Places that still use perl:

Search engines (DuckDuckGo, Jewggle)
Biomedical industry
University physics labs
Plenty of banks

It has it's uses but all I've ever used is AWK for system scripting and tiny scheme interpreters if I need to embed an interpreter in a binary.

This guy gets it. If you want to be a system administrator, you should learn perl. It will make you more effective in less time than coreutils shit from the late 60s or memeshells, usually with less resource footprint than either, and it's present on the base install of every Unix-like OS from the last 15 years. Even routers and switches have perl.

Not for large projects. Not a means of entry level employment.

>Faster
>More efficient
see and not who is wrong

>Biomedical industry
>banks
Why? I thought Python and COBOL respectively were more popular.

>Unix scripting
This in itself is a bad idea.

These dubs don't lie.

No idea why, just it's always been that way.
COBOL is still used all over banking too.

All those Bio informatician or w/e type jobs are all in Perl (sometimes Python, but stripped down Python with code specifically written for optimization like moving out any function calls from loops and performing those outside the body to only operate on primitive data)

From what I've been told it's because most of the algorithms and programs in the medical industry were written by doctors and lab techs, without a compsci background so you ended up with a scripting language doing everything.

There's also no money to optimize these genetic sequencing programs, as typically a doctoral student will get some grant money to do something, create a good enough program to do it and then present a paper with a medical finding.

However universities are always looking for programmers to help them rewrite and optimize these programs, it's a good project for any Jr developer to pad their github with and optimizing these programs is dead simple for any CS student.

Except you're factually wrong.
Perl is a great deal faster than both Python and Ruby for most applications.

Except you're factually wrong.
Perl is a great deal slower than both Python and Ruby for most applications.
Except for regular expressions, but if you use them to that extend where it matters you should kill yourself anyway.

Perl (5.20) is much faster than Python 3. Also it's more expressive, more functional style friendly, and doesn't fuck up with scope rules. If you are doing text processing Perl is the best tool you can use.
You should also try Perl 6, which is a completely new language based on Perl. Perl 6 is the most advanced scripting language ever created.

you don't need the space between say and the string literal

>Perl (5.20) is much faster than Python 3.
[citation required]
And it better be not plebians benchmark games or related to text manipulation where actual parsers are at order.

>and doesn't fuck up with scope rules.
Also, it has forced declaration, which should be a standard. Unfortunately only in strict mode, which by now should be default, given they don't give much of a fuck about backward compatibility anyway.

>Perl 6 is the most advanced scripting language ever created.
Explain.
How is it so different from Perl?

>How is it so different from Perl?
They removed a lot of retarded grammar from Perl5 and added a fuckton of features of which some are awesome like grammars and custom operators but make it semi-impossible to implement.

For instance:
docs.perl6.org/language/grammar_tutorial

>Perl

I don't know what it is or what it does, but Python is just beginning to kick off in my field of research, so it's not gonna go anywhere soon. If Perl has not equivalent for numpy, scipy, matplotlib and h5py, it's probably worthless for scientific applications..

>I thought Perl was faster to write
Too bad it's impossible to read.

Read the thread. It's for sysadmins, not lab rats.

Those poor sods.

That's one level below even labrats.

>ruby is a decent contender as well, and both ruby and python do external package managers far better than perl
Pinto is going to change that.

Great, now call again as soon as Perl has a good repository as well.

>If Perl has not equivalent for numpy, scipy, matplotlib and h5py
Perl Data Language pdl.perl.org/
And for biosci there is BioPerl bioperl.org/

>f Perl has not equivalent for numpy, scipy, matplotlib and h5py, it's probably worthless for scientific applications..
Good. Because in case of I'm not sure which to disregard more.
Damn.

I think you have ignorant people spreading FUD against Perl here user. Better take what you've learn and leave it here.

Tell me what shitty repository use the shitty language you like for you to say shit on CPAN.

Actually I used Perl and by extension CPAN couple of years ago and I think as maintenance and coverage go it can't get any worse than CPAN.

There were and probably still are a couple of good packages that work out of the box, but the rest is useless garbage like Perl style checkers, ASCII art libraries, C bindings that won't compile, web shit that only works half of the time, an inconsistent number of semi-working TCL bindings - compare that to TKInter which just werks - and outdated, incomplete documentation.
The only other time I was that disappointed by a language repository was npm, but they have a better track record of successfully compiling bindings.

>couple of years ago
Maybe try Pinto

Interesting, I have been using Perl for 16 years and I never had such problems with CPAN. Out of curiosity, what modules did you have problems with?

To learn it over Python? Not really.

To learn it as well as/after Python? Definitely.

Is indeed actually a good site for tech jobs though? From my experience, most of those numbers are likely recruiter spam or even scams - or they would be in my area. So many jobs on indeed that are actually advertisements for paid training programs or recruiters using as many keywords as they can to reach anybody who knows a scripting language no matter what it is.

>embedding python
wtf

I don't think that can be solved with a package manager. It's the packages that are shit.

Too many to really remember and too long ago. However, one that stood out was some SDL1 binding extension/wrapper, I don't remember the name.
The binding worked but the extension didn't.

docs.python.org/3.6/extending/embedding.html

Like in Blender, LibreOffice (I believe, but I might be wrong and UNO might be able to use some IPC mechanism), Scribus and a couple of more desktop applications.

CPython (and any other Python implementation in actual existence) got that wrong, though, because they use opaque global state, which is some special kind of C cancer and so you can only create one interpreter state which surprisingly often doesn't suffice. Also, you can't restrict function access to native functions.

>inb4 extension over embedding
That's where you are wrong, kid. If it can't properly manage native threads it shouldn't be in control of the application.

>what is XS
>what is PDL

If I ever read a shilling post..
It this you, Guido?

>Even on Tiobe it has dropped to a sad 13th place.

But what are the differences we are talking about?

Python: 3,54%
Ruby: 2.25%

Whoa, 1,3%, that's really a game changer!
Sorry, I don't buy that.


>Ruby, Bundler or Rails development so the ecosystem has largely stagnated

That's pretty much bullshit. Ruby 2.4 came out on christmas and bundle got it's last update about two weeks ago, Rails 5.2 is maybe a few month old.

>The primary Ruby implementation, which desperately needs work, only has four people actively working on it

Ruby is open source:
>github.com/ruby/ruby

And there you can read "46 contributors", and that' definitely not because they couldn't find more people willing to work on it..

>Rails is the only thing people really use Ruby for

Metasploit, Chef, Puppet, Sinatra, Rack, Homebrew, Discourse..


>and is now widely considered a slow bloated mess

It's not the fastest framework in terms of response time, but it's still by far the fastest thing to develop in. And honestly it's still "fast enough" for every application people like you and me will ever code.

>Most of the top contributors have also moved on to other languages like Javascript, Elixir, Python and Rust.

Yes, because if you develop something for almost a decade you want to do something new. Even if Rails would vanish over night (and it won't) it would still have eternal fame for how much the internet community has learn about how to make a good MVC framework. Rails5 is better than ever with a lot of cool stuff (i.e. API mode makes it super easy to run it as API).


>It doesn't even have complete up to date bindings for any GUI library besides TK.

There are things like RubyQt and Korundum. The point is people usually don't use Ruby to do graphical stuff. But since including or using C and C++ is super easy in Ruby, you could do what you want.

Things like SciRuby are great, but Rubyist are mostly web people.

>Ruby 3 will change nothing.

You can screecap this post and read it aloud in 3 years: Ruby3 will change a lot.

Meanwhile Python lives from it's huge market penetration, because it was (too) early adopted by Universities. But even with that much backing, it still manages to be maybe twice as big as Ruby.


>The Indeed stats you posted for Rails are somewhat misleading..

If you say so, random internet dude on Sup Forums. I will definitely believe you more than the biggest language trends website..


BTW
Why is it that Perl people are always cool people to look up to, while Pythonistas are always obnoxious brats that keep on shit-talking about Ruby?

Honestly I'd use Ruby even if I was the only person in the world, because it's fun to code in. I don't enjoy coding in Python that much, but that's just me and I would never talk shit about python, even if there are many points that are sub par IMHO..

>Why is it that Perl people are always cool people to look up to
Perl people are a bunch of middle-aged sysadmins and hackers, so overall they're pretty cool.

Yes, it's probably an "age thing"..
But I believe it's also some kind of philosophical thing.

Ruby has adopted the TIMTOWTDI philosophy from Perl, and I believe that this naturally makes people more eager to try out new things and try to find the most elegant way to get something done. Meanwhile Python has this "no fun allowed" attitude where only the "pythonic way" is correct.

Perl was written by one of the biggest programming punks in history, so naturally it produces cool guys. Python was written for non-programmers like scientists, that don't want to get into details, so naturally it produces programmers that aren't real programmers. And Ruby was written to make programmers happy, so naturally it produces happy programmers..

^^

>it's probably an "age thing"
It's too bad not many younger programmers want to get into Perl. It's really fun.

Metasploit was writen in Perl
Serious RegEx work is done in Perl
Serious bionformatics work is writen on Perl

>Metasploit was writen in Perl
Isn't it Ruby?

>If I ever read a shilling post..
>It this you, Guido?

I don't like Python either. They're both poorly designed dynamically typed messes, but unfortunately Python has a future. Ruby does not.

> muh percentage

The percentage on Tiobe doesn't correlate directly with how much it is used in reality. In the real world, Python is easily 10 times more popular than Ruby and there is probably way more Perl than Ruby as well.

> And there you can read "46 contributors"

Like I said, only 4 of them are actively working on it. It makes no difference how many of them have contributed over the entire life of the project. Matz, 2 other Japs, and tenderlove from Github are the only people ACTIVELY working on it. That's a skeleton team for a language implementation and none of those people have the knowledge necessary to make it competitive with other VM implementations.

> but it's still by far the fastest thing to develop in

Nope. Rails is nothing special today.

> And honestly it's still "fast enough" for every application people like you and me will ever code

Again no. If I hit above 100ms response times I'd be fired for gross incompetence. Rails can barely hit that serving static data.

> RubyQT

RubyQT is dead and won't even compile on Windows or OS X.

>If I hit above 100ms response times I'd be fired for gross incompetence.
In what line of work do you need performance to be so perfect?

100ms response time isn't that great. A lot of companies like Google and Amazon aim for lower than that. 200ms is widely considered unacceptably slow and most page speed tools raise a red flag anywhere after that.

>They're both poorly designed dynamically typed messes

You can say what you want, but Ruby is a greatly designed language. It has so many cool things that don't even come to mind in everyday usage (i.e. dead code elimination). The basic structure (i.e. iterators, classes, blocks) are already so powerful that you can basically rebuild half of the ruby syntax with it.

Take a look at a simple thing like the "Fixnum" class (in C) and you'll see that it's beautifully engineered code.

See this example discussion here:
>crystal-lang.org/2016/07/15/fibonacci-benchmark.html

You can also fake LISP macros or Haskell Types or Python syntax in Ruby without much effort. It even has insane stuff like continuations (CallCC) - the only two languages that even have this are Scheme and Ruby.


So say that you don't like Ruby, but don't you ever say it's poorly designed.


>In the real world, Python is easily 10 times more popular than Ruby

Whatever, dude. There are arguably more jobs for Python, because of the whole big data meme train. But guess what? I'm not into big data, so I don't care. You'll always find more Rails jobs than Django jobs.


>Like I said, only 4 of them are actively working on it.

Maybe because Rails is just closer to perfection? In the last few rails version there were only minor changes, simply because Ruby doesn't need anymore stuff.

Ruby is similar to LISP in that is is basically "programming language building material". You can make your own syntax and create your own domain specific language, and that's exactly what Rails, RSpec, Chef and all those other did.


>Nope. Rails is nothing special today.

Not special, but it's hands down the fastest technology to develop a simple CRUD app in.


>If I hit above 100ms response times I'd be fired for gross incompetence. Rails can barely hit that serving static data.

You don't get what Rails is good for. For serving static data you could simply use Rack. Rails is for complicated stuff.

>So say that you don't like Ruby, but don't you ever say it's poorly designed.

I know Ruby and it's primary implementation very well. It's very poorly designed. If you want a well designed dynamically typed language see Smalltalk or Racket.

> Maybe because Rails is just closer to perfection?

I wasn't talking about Rails there. I was talking about the mainline Ruby implementation which is very, very poor. Out of all the relatively popular languages it is easily the worst VM.

> Rails is for complicated stuff.

You sound like a junior programmer. Rails is for simple CRUD web applications and nothing more. Obviously you would serve static data with a CDN or nginx. However, if you're web framework can't serve small amounts of static data in under 100ms with modern hardware it is doing something horribly wrong.

>I don't like Python either. They're both poorly designed dynamically typed messes, but unfortunately Python has a future. Ruby does not.
a poorly designed language has a future over a well designed language....this thread in a nutshell

>Ruby has adopted the TIMTOWTDI philosophy from Perl
You have no idea what timtowtdi means in Perl, all container types in Perl are flat, there is no nested arrays or hashes, everything is flat and has to be accessed with 'pointers'. So you do a lot of silly 'pointer' tricks in Perl which leads to a lot of timtowtdi craziness. This is nothing like how Ruby treats containers as immutable objects that get mapped over with methods that almost always create a new container structure. There is almost never mutable changes on variables in Ruby, this is a reason Ruby doesnt even have a ++ iterator.

this thread is full of larping teenagers fighting language wars over their favorite fizzbuzz langauge

>You want to embed an interpreter in your program but want more than one instance and these instances should be properly separated
T C L
C
L

>Javascript and Python will be the last dynamically typed languages to ever become popular
Elixir (if you count it as a separate language from Erlang).

>CGI::App

>I know Ruby and it's primary implementation very well. It's very poorly designed.

Did you even get one of my arguments?
Whenever people talk about Ruby you hear that it's one of the greatest designed languages ever. That's probably one of the reasons why so many languages were inspired by Ruby: Scala, Swift, Rust, Elixir to only name a few.

Smalltalk is a great language, that's why Matz took a lot of inspiration from there. But Ruby works better out of the box and is way more readable.

Also Ruby has mixins, permits adding methods to individual objects, you can add methods dynamically and you have powerfull macros. Smalltalk not.

But that's not even remotely interesting because smalltalk was dropped by the industry a long time ago.


Racket?
Can't comment, but it's a LISP, so either you have a boner for it's syntax anyway (then you will use it on matter what) or you are more comfortable with C-family-like syntax. SO I see no competition here.


>I was talking about the mainline Ruby implementation which is very, very poor.

You aren't a Rubinus fanboy, by any chance..?


>Rails is for simple CRUD web applications and nothing more.

Unfortunately my post waas too lengthy so I couldn't elborate on that one in the last post..

Yes, if you have static stuff you could simply let your Server serve it and set a Phusion Passenger on top of it.

A lot of Rails benchmarks use the oldest server (Unicorn) instead of a better one like TorqueBox or Raptor.
>rubyraptor.org/


Rails does really a lot for you and of course this comes at a (small) price. But that's a matter of what tools you use. Again, for a simple basic CRUD I'd use something like Sinatra or Cuba, which are basically wrappers around Rack with standards like routing and so on.

Rails is a completely different beast, because it has ActioView, ActiveRecord and what not. Every line of code in Rails does a lot of things and takes care of everything it can reasonably take care for.

>Whenever people talk about Ruby you hear that it's one of the greatest designed languages ever.

I almost never hear anyone say that. Scala, Swift and Rust are not inspired by Ruby in any meaningful way. Ruby basically took some ideas from Smalltalk and made them worse.

I think we're done here. It's very obvious you're a junior developer at best.

>What is your opinion on Perl?
It's comfy

>Is there any reason to learn it over Python nowadays?
It's not Python

Interesting. Could you give a small example?
This is a Perl thread after all.

In Ruby a nested structure (like you called it) would look like this:
test = {true => {42 => 'some text'}}
test_2 = [[['''implying''']]]

p 'yes' if /text/ =~ test[true][42]
p test_2[0][0][0]

Maybe you're just an idiot

because a young programmer starts his first job and sees this fuckmess perl script written by his predecessor and thinks

never again

Perl is great but its following is and will remain a small to medium sized cult. I have a feeling an almost constant amount of people will continue to use Perl until computers as we no it are no more

>tfw in 10 years new sysadmins will be rewriting those scripts in JavaScript

Still a few big companies using Perl. There are jobs near them. But unless you're in one of those areas I guess you're out of luck

Unix isn't forever, and the Internet will almost certain outlast Unix. They'll probably die as Unix dies or (more likely) is relegated to a rarely-touched VM-hosting platform.

Perl and Python are neck in neck and I wish I could back it up with a link but you'll have to trust I'm sure of it. Ruby is a lot slower though. Than both

Sorry, you have really no idea about Ruby.

Scala took a lot of inspiration from Ruby..

>dev.housetrip.com/2013/10/29/scala-from-ruby/
>medium.com/@fapoli/is-scala-the-new-ruby-8d53975e7297


>It's very obvious you're a junior developer at best.

Nice ad hominem, bro.
Running out of arguments already..? ;)

None of that is even remotely true

>>medium.com/@fapoli/is-scala-the-new-ruby-8d53975e7297
>Note that Scala is a typed language but has Type Inference so you don’t need to specify the value type of foo, but you must specify a and b’s type. This way looks cleaner to me. I thing the key is the arrow thing that we find in both examples.
wow this guy have no fucking idea what he's talking about

>Ruby is a lot slower though. Than both

Nah, Ruby is faster than Python in many benchmarks. They are at least pretty close.

>benchmarksgame.alioth.debian.org/u64q/ruby.html

>it's still "fast enough" for every application people like you and me will ever code.
Speak for yourself. Some of us here work on things that aren't CRUD and need soft real-time performance.

Not the original guy, but in perl, the hash assignment works: (note: perl doesn't have 'true' or 'false' defined as values
%test = {"true" => {42 => "Some text"}};
print "yes\n" if /text/ =~ $test{'true'}{42};


Now, the original user is correct in that $test{'true'} contains a pointer to an anonymous hash with the key value pair '42' => 'some text', but for everyday usage you don't need to worry about it all that much.

For the array assignment it gets a little bit weirder in that what you're creating an array that contains at [0] a pointer to an anonymous array that contains as [0] another pointer to another anonymous array that contains as [0] 'implying'

@test_2 = ([["implying"]]);


Accessing it, however, is just as easy as in Ruby:
print $test_2[0][0][0];


tl;dr - whilst nesting data structures in perl is a little convoluted at first, once you grasp the basics you can solve 99% of problems you'd ever encounter.

Not him, but yes it is and it's a large part of why sigils in perl are retarded. Hashes and arrays can only store scalar types, including references, but to get arrays/hashes from other arrays/hashes you have to cast them back, so you get pointless cruft like the example off the Perl 6 wikipedia page:

my @trans_verbs = @{ $dictionary{ 'verb' }{ 'transitive' } };

>Smalltalk
Which Smalltalk implementation are you talking about? I thought all the open source ones were mediocre and slow.

Haha, I guess that's what you get for not checking your sources..

Nevertheless, I tried to learn a little bit of Scala and during the process a lot of things reminded me of Ruby. Starting with keywords like "def" and "yield", but also the way that numbers are always objects (like in Ruby) and not Java-like. OK, Scala had a lot of influences, i.e. Erlang or Python, so let's drop that.


But Wikipedia says:
Ruby influenced Clojure, CoffeeScript, Crystal, D, Elixir, Falcon, Groovy, Ioke, Julia, Mirah, Nu, potion, Reia, Rust, Swift
>en.wikipedia.org/wiki/Ruby_(programming_language)

So that's already a bunch of languages, right?