News for hackers. Stuff that matters.
Re:Not Your Grandfather’s Perl by jandrese on Thursday September 08, 2022 @09:28PM (#32774233)
Perl does a kind of half JIT when you start a script. It doesn't compile fully down to native machine code, but it does parse and lex the script to build an internal representation. The code is then interpreted, but since it doesn't have to parse each line again it runs very fast and also you can interpret code on the fly in a variable so you get the best of both worlds.
Re:Not Your Grandfather’s Perl by int_19h on Thursday September 08, 2022 @10:35PM (#32774645)
This has been the usual way to implement interpreted languages for decades; Perl isn't special in that regard. JIT generally refers to generation and execution of native code specifically.
Re:Not Your Grandfather’s Perl by jandrese on Friday September 09, 2022 @12:57AM (#32775471)
I'm pretty sure bash still interprets line by line because you can mess up a script by editing it while it is executing.
Re:Not Your Grandfather’s Perl by int_19h on Saturday September 10, 2022 @02:18AM (#32788313)
bash (and other shells) are special in that regard, because they use textual substitution so heavily - to pass arguments etc.

But Python, Ruby etc all compile to bytecode, and have always done so as far as I can remember.