Assuming it is real artificial intelligence not "AI ®" it will use Perl 5, because of symbol table manipulation. Also it will want to engage with humans for amusement so machine code is out of the question :-).
HN user
emilper
I have rewritten node.js code in D2 and it was shorter and clearer :-)
I use it, I am not "almost no one" :)
"are all written entirely in Ruby on Rails" ... then promptly rewritten in something else :) https://medium.com/airbnb-engineering/rearchitecting-airbnbs...
Dlang is a statically typed language that is more productive than most dynamic languages
that is _not_ how you judge a _scripting_ language
it is trivial* to add C code to Perl, even when using XS, I guess it is as easy to do the same for Python
if you do heavy computations in pure Perl5 or pure Python you're doing it wrong by definition
*assuming you can write C
"modern" language teaching killed Latin
before that they were teaching it without any stress on grammar, mostly memorizing phrases and short sentences and learning how to use it
... why do you think Perl 5 stagnated for 20 years ?
There were like 10% performance improvements at each new release, a lot of work was done in modules which was by design Perl 5 having a small core and a lot of the features being implemented in modules ...
What feature exists in other languages (except for CPU types: int, float, char etc.) and does not exist in Perl 5 ?
"while the world moved on"
yet the world still does not have half the features Perl 5 already had for 20 years :)
... from scoping to support for every major programming paradigm
Delphi
that is floating point for you, not Perl
:) how is Perl out of style ? ... 20 years ago it had features the more enterpricey languages only got in the last few years
the package ecosystem was like 10 times bigger in 2019 than it was in 2015 when I had my first look at D
How many stories were about BASH ? Everybody working on Linux is using BASH so it should have a very high score.
Perl5 does not have "sigils", BASH, BASIC and Perl 6 have sigils.
Perl 5 has dereference operators, which got called "sigils" by lazy documentation and book authors.
you are right, sed or awk are good and would do that nicely
The advantage of Perl is investing a little time in learing some (not all) Perl 5 (not Perl 3 or 4, those are only a bit better than BASH + sed + awk) allows you to do a lot more than you can with BASH + sed + awk.
"Global variables abound."
Must have been Perl 3 or 4.
In Perl 5 you have to work extra to make global variables, and they're not really pushed in the global scope, only have global visibility in their own namespace ... unless you work even more and export them by default when you write the module they're in.
It was a force multiplier when comparing with C, C++ or BASH.
Perl 5 saved Perl from itself, too bad Perl 3/4 lovers kept writing Perl 3 years after 2000 until they saw the light and the truth and moved to Python.
Perl 4 ... the good days :)
I guess require-ing files all over the code and using the global scope for everything and using globals or even a global hash and having functions read and write to that hash is something to be regretted. Not that C is much better.
I have maintained and ported Perl 3 and 4 to Perl 5, I must say the existence of PHP3 made sense after that :)
There was that trick using goto and exit to simulate functions that people writing Perl 3/4 loved. Was it done for performance reasons ?