TCLP 2008-04-03 Hacking 101: Scripting Languages (Comment Line 240-949-2638)

This is a feature cast.

The hacker word of the week this week is cycle.

A large amount of listener feedback, almost all with links. Here is the audio of the NPR show that [Si] dragon mentioned. And here’s the NRK news story Tor sent in. And here is the paper that Jon mentioned on the problem with multi-threading. Here’s also a link to a clearer explanation of the dining philosophers problem.

The feature is a Hacking 101 segment on scripting languages.

Download the show directly. Grab the detailed show notes with time offsets and additional links either as PDF or OPML.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

7 Replies to “TCLP 2008-04-03 Hacking 101: Scripting Languages (Comment Line 240-949-2638)”

  1. Thanks to Jon for finding and sending that interesting paper. It is absolutely fascinating, at least to me, and should be generally thought provoking. I found it mostly accessible, with a few exceptions, and rich with pointers for further reading and research. Good stuff.

  2. Hey, you say that Perl is currently “interpreted” but that this will change for Perl6. True, Perl6 has an explictly separate VM, but Perl has had a “compile” phase for every script for nearly two decades. Your source text is parsed and “compiled” into code structures only once per execution, not repeatedly as a shell script interpretation typically does.

  3. My apologies, I should have researched that further or taken more care to admit my ignorance of the nature of Perl’s execution model. Thanks for the correction, I will include it in the next show in case anyone took my mistake to heart.

  4. On reflection, that sounds similar to just in time (JIT) compiling for those languages/VMs/interpreters that support it. Java, which I do know, does something similar from bytecode to native code. You compile source text, your .java files, completely to Java byte code. This is what the resulting .class files contain. However, once you invoke a Java program, the bytecode is not continually re-interpreted every time. Since the introduction of JIT compilation as part of the JVMs capabilities, bytecode gets compiled as it is loaded then each time those same classes and methods are invoked, the JVM is using native code. With HotSpot, that is admittedly an oversimplification, but I think the parallel holds.

    What you described sounds like a JIT parse, that Perl generates parse trees or something byte-code like–the code structures you mentioned–once per execution. Would it be fair to say that the difference in Perl 6 will be more a matter of degreed, then? That either the explicit compile or the in-line JIT compile will be all the way to native code, rather than something closer to a parse or compile to just byte code?

    I rather suspect the strategy of caching parse and compile results in interpreted or partially interpreted languages is pretty common and with modern CPU speeds and memory capacities I am sure it is relatively cost effective.

  5. The main difference for Perl6 is that the VM is an explicitly separate entity with a published bytecode, rather than the result of the compilation merely being interesting data structures within the compiler, as it is in Perl5 and earlier. There were some experiments in the Perl5 world to be able to translate these structures into a “bytecode” so that it could be separately saved and loaded, but those have been effectively decommissioned as of late.

    But yes, you could call the current Perl a “just in time” parser in that sense. Perl6 has a more traditional model… you can still compile-load-go in “scripting” mode, but you’ll also be able to completely separate the compilation phase from the execution phase readily.

  6. I know I’m coming in way late with this due to being behind with listening to the show, and I realize that you may have heard this already, but Microsoft does offer Visual Basic 2008 in an Express version which they give away for free, so it’s not accurate to say that you must purchase Visual Studio in order to use Visual Basic in Windows. The Express version does have some limitations, which are spelled out in this Wikipedia page:, but it is still very useful for the novice programmer.

    As always, I really enjoy the show!

Leave a Reply

Your email address will not be published. Required fields are marked *