<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
  <head>
    <title>cmdln.net_2008-04-03</title>
    <expansionState>1,2,3,6,8,11,15,17,18,32,38,40,52,62,63,66,70,77,87,91,98,103,110,115,116,124</expansionState>
  </head>
  <body>
    <outline text="Intro" Offset="00:17"/>
    <outline text="Listener Feedback" Offset="01:57">
      <outline text="[Si]dragon with book recommendation">
        <outline text="Link to audio from NPR interview">
          <outline text="http://podcastdownload.npr.org/anon.npr-podcasts/podcast/305/510071/88106931/WAMU_88106931.mp3"/>
          <outline text="Richard Sennett, The Craftsman"/>
        </outline>
      </outline>
      <outline text="Tor, the NRK doctrine">
        <outline text="http://feeds.feedburner.com/~r/nrkbeta/~3/258183916/"/>
      </outline>
      <outline text="Jon on parallel computing">
        <outline text="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf"/>
        <outline text="http://en.wikipedia.org/wiki/Dining_philosophers_problem"/>
      </outline>
      <outline text="Multimode, Chromed Pork Podcast?">
        <outline text="http://www.chromedpork.net/"/>
        <outline text="Would rather I not censor myself, deliver podcasts timely"/>
        <outline text="Quantico Circuit at Verizon"/>
      </outline>
    </outline>
    <outline text="Word of the Week: cycle" Offset="12:06">
      <outline text="http://catb.org/jargon/html/C/cycle.html"/>
    </outline>
    <outline text="Hacking 101: Scripting Languages" Offset="13:37">
      <outline text="Scripting languages defined">
        <outline text="http://en.wikipedia.org/wiki/Scripting_language"/>
        <outline text="Embedded within program"/>
        <outline text="Used to control, or script, another program"/>
        <outline text="So called for stage scripts, pre-set dialogue, actions for actors"/>
        <outline text="Often fully interpreted or partially compiled"/>
        <outline text="Means the program reads the same text as the hacker and executes existing functions"/>
        <outline text="Byte code is marginally more efficient, saves text parsing"/>
        <outline text="Still interpreted one operation at a time, rather than compiled to native instructions"/>
        <outline text="Early script languages called batch or job control languages"/>
        <outline text="Batch refers to batches of commands"/>
        <outline text="Job control refers to being about to put a program in the background"/>
        <outline text="On older systems where execution was slow, costly, saved operator time on repetitive tasks"/>
        <outline text="Still a useful tool for reducing error, saving human time"/>
      </outline>
      <outline text="Shell scripts">
        <outline text="Not embedded in a user program"/>
        <outline text="Used for scripting an operating system"/>
        <outline text="Shell refers to an interactive shell, or command line"/>
        <outline text="In Unix, Linux user can choose from a variety of shells with different features"/>
        <outline text="This shell choice also often affects the format, available commands for scripting"/>
      </outline>
      <outline text="Creator of Tcl, an older script language, defines dichotomy between system, scripting languages">
        <outline text="http://en.wikipedia.org/wiki/Ousterhout%27s_dichotomy"/>
        <outline text="Three criteria">
          <outline text="Static vs. dynamic type"/>
          <outline text="Complex vs. simple data structures"/>
          <outline text="Compiled to machine code vs. interpreted or compiled to byte code or parse tree"/>
        </outline>
        <outline text="Distinction is increasingly blurry"/>
        <outline text="Java was originally interpreted, still often runs in mixed mode"/>
        <outline text="Perl was originally interpreted"/>
        <outline text="Perl 6 will run in a VM, Parrot, as byte code"/>
        <outline text="Both now take advantage of JIT compilers"/>
        <outline text="Byte code, VMs, open up interesting possibilities"/>
        <outline text="Can write different parsers to generate same byte code"/>
        <outline text="Jython in JVM, long list of prospective languages in Parrot"/>
      </outline>
      <outline text="Script languages independent of programs">
        <outline text="Further breaks down Oustershout's dichotomy"/>
        <outline text="Many languages have evolved with their own interpreters"/>
        <outline text="Can be embedded in any number of programs"/>
        <outline text="Saves a program author from creating own language, interpreter"/>
        <outline text="Can be used across multiple programs"/>
        <outline text="As independent languages, quickly acquired full language features, like variables, flow of control"/>
        <outline text="Achieve Turning completeness, ability to express any algorithm that could be written in any other complete language"/>
        <outline text="Retained interpreted nature, some have sophisticated interpreters like Parrot"/>
        <outline text="Usually dynamic, consequence of roots, variables, type relied on what parent program exposes, provides"/>
      </outline>
      <outline text="Why are scripting languages important?">
        <outline text="Quick and dirty tasks">
          <outline text="Putting an existing program to new uses"/>
          <outline text="Saves re-inventing functionality you need that may already exist"/>
        </outline>
        <outline text="Automate tasks to reduce error">
          <outline text="Alternative is to run programs manually"/>
          <outline text="To easy to make a mistake when running repeatedly"/>
          <outline text="Many macro languages originally developed to automate compilation"/>
        </outline>
        <outline text="Often first introduction to programming">
          <outline text="Non-programmers may be comfortable scripting a program with which they are fluent"/>
          <outline text="Learning curve for proto-hackers is shallow"/>
          <outline text="Limited features, simpler syntax"/>
          <outline text="Often very forgiving, quicker to make changes and re-run without a full compile"/>
          <outline text="Some can be run in an interactive mode, like Ruby, Perl, shell"/>
          <outline text="You can make a change, write a quick expression, get immediate feedback"/>
        </outline>
        <outline text="Standalone scripting languages">
          <outline text="Low cost to entry for general programming"/>
          <outline text="Widely, freely available"/>
          <outline text="A lot of operating systems bundle the more popular ones, especially Perl"/>
          <outline text="Easy enough to install on Windows"/>
          <outline text="Microsoft has their own versions, not all are free, like VB, Visual Studio"/>
          <outline text="Once you master a standalone script language, the gap to a system language is not wide"/>
          <outline text="Learning the compiler may take some time, but most language concepts will translate"/>
          <outline text="Some script languages have comparably complex tooling"/>
          <outline text="Think Ruby on Rails which involved server, deployment"/>
        </outline>
        <outline text="Many environments rely heavily on scripting">
          <outline text="Web browsers, web applications"/>
          <outline text="Increasingly popular since they scrub out OS differences"/>
          <outline text="This is the reason Microsoft competed so aggressively against Netscape in the 90's"/>
          <outline text="Web browser involves multiple embedded languages">
            <outline text="HTML for information, document structure"/>
            <outline text="CSS for presentation, appearance"/>
            <outline text="HTML, CSS are declarative, not scripting"/>
            <outline text="JavaScript for behavior, drives an object model of the browser, DOM"/>
            <outline text="Wholly interpreted"/>
            <outline text="Is Turing complete, though"/>
          </outline>
          <outline text="Web applications">
            <outline text="Typically embed server execution instructions in document to be delivered to browser"/>
            <outline text="Run in a web server program"/>
            <outline text="Have access to the web server's environment"/>
            <outline text="CGI is the original, simple embedded web server scripting"/>
          </outline>
        </outline>
        <outline text="Language designers">
          <outline text="Compiler design is one of the toughest programming challenges"/>
          <outline text="Designing, implementing scripting languages is a smaller, perhaps more manageable subset"/>
          <outline text="Good way for proto-language designers to cut their teeth"/>
          <outline text="For more sophisticated scripting languages, the gap is probably a lot less"/>
          <outline text="Not saying that Guido von Rossum, others, are not as capable as Stroustrup, peers"/>
          <outline text="Just saying that there is a potential shallow end for someone just getting started"/>
        </outline>
      </outline>
      <outline text="Overall, hackers working with scripting languages can get further and further with them">
        <outline text="Used to be that the limitations of scripting languages meant you had to move quickly on to system languages"/>
        <outline text="With standalone scripting languages, less need to do so"/>
        <outline text="With popularity of web applications, whole class of programs that are fine implemented as scripting languages"/>
        <outline text="Still need to be aware of limitations"/>
      </outline>
    </outline>
    <outline text="Outro" Offset="39:22">
      <outline text="Contact me">
        <outline text="Email to feedback@thecommandline.net"/>
        <outline text="Web site at http://thecommandline.net/"/>
        <outline text="IM to command.line@skype"/>
        <outline text="Listener comment line is 240-949-2638"/>
        <outline text="del.icio.us tag is &quot;for:cmdln&quot;"/>
        <outline text="http://twitter.com/cmdln"/>
      </outline>
      <outline text="I'd like to thank libsyn.com for AAC hosting and Wouter de Bie for MP3 hosting"/>
      <outline text="These notes and the show audio and music are covered by a Creative Commons license">
        <outline text="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"/>
        <outline text="Attribution, non-commercial, share alike"/>
      </outline>
    </outline>
  </body>
</opml>
