<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: The Joy of REPL</title>
	<atom:link href="http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/</link>
	<description>random thoughts on programming and programming languages</description>
	<pubDate>Sat, 19 Jul 2008 03:04:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: Stephen Bradley</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-2739</link>
		<dc:creator>Stephen Bradley</dc:creator>
		<pubDate>Thu, 19 Oct 2006 19:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-2739</guid>
		<description>Richard P. Gabriel's essay:

http://www.dreamsongs.com/ArtOfLisp.html</description>
		<content:encoded><![CDATA[<p>Richard P. Gabriel&#8217;s essay:</p>
<p><a href="http://www.dreamsongs.com/ArtOfLisp.html" rel="nofollow">http://www.dreamsongs.com/ArtOfLisp.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: programming musings &#187; Blog Archive &#187; The Art of Lisp &#38; Writing</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-64</link>
		<dc:creator>programming musings &#187; Blog Archive &#187; The Art of Lisp &#38; Writing</dc:creator>
		<pubDate>Sun, 05 Feb 2006 15:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-64</guid>
		<description>[...] I wasn&#8217;t aware of The Art of Lisp &#38; Writing, by Richard P. Gabriel, being online. I like this essay so much that it justifies its own entry. As i mentioned in The Joy of REPL, this was written as the foreword to Successful Lisp, a pretty nice book on Common Lisp, but Richard&#8217;s thoughts apply to any Lisp and many other programming languages. [...]</description>
		<content:encoded><![CDATA[<p>[...] I wasn&#8217;t aware of The Art of Lisp &amp; Writing, by Richard P. Gabriel, being online. I like this essay so much that it justifies its own entry. As i mentioned in The Joy of REPL, this was written as the foreword to Successful Lisp, a pretty nice book on Common Lisp, but Richard&#8217;s thoughts apply to any Lisp and many other programming languages. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: - d -</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-19</link>
		<dc:creator>- d -</dc:creator>
		<pubDate>Mon, 16 Jan 2006 18:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-19</guid>
		<description>&lt;strong&gt;Top 3 reasons&lt;/strong&gt;

	Here's a list of features of Scheme that won't impress you, if you've been using Ruby/Python:
	
	"Scheme has a REPL." (nevertheless, go read all about it). 
	"Scheme is dynamically-typed."
	"Scheme has a garbage collector."
	
	What compels pe...</description>
		<content:encoded><![CDATA[<p><strong>Top 3 reasons</strong></p>
<p>	Here&#8217;s a list of features of Scheme that won&#8217;t impress you, if you&#8217;ve been using Ruby/Python:</p>
<p>	&#8220;Scheme has a REPL.&#8221; (nevertheless, go read all about it).<br />
	&#8220;Scheme is dynamically-typed.&#8221;<br />
	&#8220;Scheme has a garbage collector.&#8221;</p>
<p>	What compels pe&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KBK</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-15</link>
		<dc:creator>KBK</dc:creator>
		<pubDate>Sun, 15 Jan 2006 16:21:40 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-15</guid>
		<description>Steele proved decades ago that if a recursive algorithm was 'tail recursive' (i.e. the last thing done in the code was to recurse) then the cost of that algorithm in both time and space was equivalent to a looping version.  The compiler can transform the recursive algorithm into a looping version where the loop variables are patched in each pass. Modern lisps and schemes have 'proper tail recursion', that is, byte or native code compilers which handle this transformation.</description>
		<content:encoded><![CDATA[<p>Steele proved decades ago that if a recursive algorithm was &#8216;tail recursive&#8217; (i.e. the last thing done in the code was to recurse) then the cost of that algorithm in both time and space was equivalent to a looping version.  The compiler can transform the recursive algorithm into a looping version where the loop variables are patched in each pass. Modern lisps and schemes have &#8216;proper tail recursion&#8217;, that is, byte or native code compilers which handle this transformation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chewie</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-14</link>
		<dc:creator>chewie</dc:creator>
		<pubDate>Sun, 15 Jan 2006 01:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-14</guid>
		<description>PWBDecker wrote, "I would only use recursion, no iteration, functional abstraction for everything. But this leads to incredibly inefficient code."

This is where Dynamic Programming comes in to the picture.  Inefficient code is not solved by strong typing, but by better algorithms.  A Dynamic Programming algorithm uses recursion to find solutions, but saves those solutions for later recall.  See http://en.wikipedia.org/wiki/Dynamic_programming for more details.</description>
		<content:encoded><![CDATA[<p>PWBDecker wrote, &#8220;I would only use recursion, no iteration, functional abstraction for everything. But this leads to incredibly inefficient code.&#8221;</p>
<p>This is where Dynamic Programming comes in to the picture.  Inefficient code is not solved by strong typing, but by better algorithms.  A Dynamic Programming algorithm uses recursion to find solutions, but saves those solutions for later recall.  See <a href="http://en.wikipedia.org/wiki/Dynamic_programming" rel="nofollow">http://en.wikipedia.org/wiki/Dynamic_programming</a> for more details.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: programming musings &#187; Blog Archive &#187; Persistent Joy</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-13</link>
		<dc:creator>programming musings &#187; Blog Archive &#187; Persistent Joy</dc:creator>
		<pubDate>Sun, 15 Jan 2006 00:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-13</guid>
		<description>[...] In the comments section of The Joy of REPL, a reader is posing an interesting question: how do i make my joy persistent? Or, in her words,  Dumb question - you are happily programming in the environment, and the lights go out. Have you lost your state? How do you save &#8220;source&#8221; code? I&#8217;m interested from the angle of irb, as I like ruby. I still think in the mode of writing the source in an editor, checking it in, etc. I can&#8217;t seem to imagine this environment in terms of day to day work, esp with a development group. [...]</description>
		<content:encoded><![CDATA[<p>[...] In the comments section of The Joy of REPL, a reader is posing an interesting question: how do i make my joy persistent? Or, in her words,  Dumb question - you are happily programming in the environment, and the lights go out. Have you lost your state? How do you save &#8220;source&#8221; code? I&#8217;m interested from the angle of irb, as I like ruby. I still think in the mode of writing the source in an editor, checking it in, etc. I can&#8217;t seem to imagine this environment in terms of day to day work, esp with a development group. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faried Nawaz</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-12</link>
		<dc:creator>Faried Nawaz</dc:creator>
		<pubDate>Sat, 14 Jan 2006 23:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-12</guid>
		<description>whatevernot -- it depends on the environment.  If you use emacs as your editor, for example, you'll probably have a buffer or two open with your code, and an "inferior process" buffer that communicates with a python or lisp or ruby process.  You type in a function or whatever in your code buffer, and hit a keystroke to evaluate it in the external python process.  You let emacs handle the file autosaving/etc, or you remember to save periodically.

Most lisp and some scheme environments also let you save the entire system's state.  So, when you come back to work on Monday morning, all the code you typed in to the system on Friday's already in there -- you don't have to reload any files or anything.</description>
		<content:encoded><![CDATA[<p>whatevernot &#8212; it depends on the environment.  If you use emacs as your editor, for example, you&#8217;ll probably have a buffer or two open with your code, and an &#8220;inferior process&#8221; buffer that communicates with a python or lisp or ruby process.  You type in a function or whatever in your code buffer, and hit a keystroke to evaluate it in the external python process.  You let emacs handle the file autosaving/etc, or you remember to save periodically.</p>
<p>Most lisp and some scheme environments also let you save the entire system&#8217;s state.  So, when you come back to work on Monday morning, all the code you typed in to the system on Friday&#8217;s already in there &#8212; you don&#8217;t have to reload any files or anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PWBDecker</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-11</link>
		<dc:creator>PWBDecker</dc:creator>
		<pubDate>Sat, 14 Jan 2006 22:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-11</guid>
		<description>I've heard this story so many places, discovering joy of programming dynamically, incrementally, through an interpreter, using strong dynamic implicit typing, first class functions, mapping, etc.  Unfortunately it doesn't work both ways.  When I was in high school and only knew toy languages like turing and basic, and I wanted to learn something with a little more capability, I skipped straight over the static languages and taught myself Common Lisp, because I was into AI and heard it was applicable.  Well I did discover the joy of using lisp, after I rewrote a program to invert matrices from turing (where you couldn't pass arrays of variable size as parameters) in lisp, it went from 4 pages to 20 lines of code and could invert matrices of any size without modifying the code (becuase it was recursive of course).  Well yes I discovered the joy of lisp programming, and of course none of my static programming friends would believe me, and at the time I was a total paul graham convert, writing everything in lisp style.  I would only use recursion, no iteration, functional abstraction for everything.  But this leads to incredibly inefficient code.

The hard part came later when I had to make the long journey BACK to statically typed languages as I tried and tried to learn C/C++, it took me years to get over the memory management.  Pointers aren't so complicated, but learning all about the stack, heap, deallocation, why I couldn't pass one array around but another I could.  I still can't stand to program that way.  A C++ programmer friend of mine calls dynamic typing 'lazy programming' as thought it were something to be ashamed of.  I prefer to think of it as powerful programming, since I no longer have to worry about accidentally causing memory leaks or buffer overruns etc.  The fact is computer hardware is ridiculously fast now, but code is still incredibly inefficient beucase you have someone trying to write a little pdf to html convertor but accidentally overwriting some buffers or something and bringing the whole system down when it should've only been a few functions in a dynamic language.  I'm hoping for a shift back to all managed code like microsofts singularity or more like the smalltalk/lisp machine days of yore.

Anyways another point I wanted to make was that I started on Common Lisp, learned the joys of auto memory management, typing, checking, etc, then finally taught myself C/C++, manual coding, etc, and I now live somewhere in the middle, with Python.  Yes I love programming in Lisp, but there's plenty of things you just can't easily do in it.   Python offers many of the same dynamic features of Lisp, and although it misses alot of the cooler things like lexical scoping (I've always missed Let, lisps greatest feature), macros, blocks (yes lisp has blocks, common lisp has pretty much every programming technique includeded in it like coroutines), but it's made up for by the ease of use of its runtime and libraries, and you can find a python shell almost anywhere.  Not to mention the plethora of awesome libraries like pygame and pyopengl.  In fact my biggest gripe with python is the lack of efficient compilation, which has begun to come to light with psyco and pyrex, but what I really wish for is a compiler engine similar to common lisp where you can set flags for how much debug info, type safety, bounds checking, memory foot print, etc you want your code to produce, and if you shut off all the things you don't need (say once you have checked your algorithms thoroughly) then you can get incredibly efficient machine code that begins to rival C++ without having to write 10x as much code just beucase you wanted to map a function over a list.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve heard this story so many places, discovering joy of programming dynamically, incrementally, through an interpreter, using strong dynamic implicit typing, first class functions, mapping, etc.  Unfortunately it doesn&#8217;t work both ways.  When I was in high school and only knew toy languages like turing and basic, and I wanted to learn something with a little more capability, I skipped straight over the static languages and taught myself Common Lisp, because I was into AI and heard it was applicable.  Well I did discover the joy of using lisp, after I rewrote a program to invert matrices from turing (where you couldn&#8217;t pass arrays of variable size as parameters) in lisp, it went from 4 pages to 20 lines of code and could invert matrices of any size without modifying the code (becuase it was recursive of course).  Well yes I discovered the joy of lisp programming, and of course none of my static programming friends would believe me, and at the time I was a total paul graham convert, writing everything in lisp style.  I would only use recursion, no iteration, functional abstraction for everything.  But this leads to incredibly inefficient code.</p>
<p>The hard part came later when I had to make the long journey BACK to statically typed languages as I tried and tried to learn C/C++, it took me years to get over the memory management.  Pointers aren&#8217;t so complicated, but learning all about the stack, heap, deallocation, why I couldn&#8217;t pass one array around but another I could.  I still can&#8217;t stand to program that way.  A C++ programmer friend of mine calls dynamic typing &#8216;lazy programming&#8217; as thought it were something to be ashamed of.  I prefer to think of it as powerful programming, since I no longer have to worry about accidentally causing memory leaks or buffer overruns etc.  The fact is computer hardware is ridiculously fast now, but code is still incredibly inefficient beucase you have someone trying to write a little pdf to html convertor but accidentally overwriting some buffers or something and bringing the whole system down when it should&#8217;ve only been a few functions in a dynamic language.  I&#8217;m hoping for a shift back to all managed code like microsofts singularity or more like the smalltalk/lisp machine days of yore.</p>
<p>Anyways another point I wanted to make was that I started on Common Lisp, learned the joys of auto memory management, typing, checking, etc, then finally taught myself C/C++, manual coding, etc, and I now live somewhere in the middle, with Python.  Yes I love programming in Lisp, but there&#8217;s plenty of things you just can&#8217;t easily do in it.   Python offers many of the same dynamic features of Lisp, and although it misses alot of the cooler things like lexical scoping (I&#8217;ve always missed Let, lisps greatest feature), macros, blocks (yes lisp has blocks, common lisp has pretty much every programming technique includeded in it like coroutines), but it&#8217;s made up for by the ease of use of its runtime and libraries, and you can find a python shell almost anywhere.  Not to mention the plethora of awesome libraries like pygame and pyopengl.  In fact my biggest gripe with python is the lack of efficient compilation, which has begun to come to light with psyco and pyrex, but what I really wish for is a compiler engine similar to common lisp where you can set flags for how much debug info, type safety, bounds checking, memory foot print, etc you want your code to produce, and if you shut off all the things you don&#8217;t need (say once you have checked your algorithms thoroughly) then you can get incredibly efficient machine code that begins to rival C++ without having to write 10x as much code just beucase you wanted to map a function over a list.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ergin</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-10</link>
		<dc:creator>Ergin</dc:creator>
		<pubDate>Sat, 14 Jan 2006 21:57:40 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-10</guid>
		<description>The online version of David Lamkins book "Successful Lisp" can be found at: http://www.psg.com/~dlamkins/sl/cover.html</description>
		<content:encoded><![CDATA[<p>The online version of David Lamkins book &#8220;Successful Lisp&#8221; can be found at: <a href="http://www.psg.com/~dlamkins/sl/cover.html" rel="nofollow">http://www.psg.com/~dlamkins/sl/cover.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: whatevernot</title>
		<link>http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-9</link>
		<dc:creator>whatevernot</dc:creator>
		<pubDate>Sat, 14 Jan 2006 21:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://jaortega.wordpress.com/2006/01/14/the-joy-of-repl/#comment-9</guid>
		<description>Dumb question - you are happily programming in the environment, and the lights go out. Have you lost your state?

How do you save "source" code?

I'm interested from the angle of irb, as I like ruby. I still think in the mode of writing the source in an editor, checking it in, etc.

I can't seem to imagine this environment in terms of day to day work, esp with a development group.

Can I get some insight from the pros?

Cheers,

parki...</description>
		<content:encoded><![CDATA[<p>Dumb question - you are happily programming in the environment, and the lights go out. Have you lost your state?</p>
<p>How do you save &#8220;source&#8221; code?</p>
<p>I&#8217;m interested from the angle of irb, as I like ruby. I still think in the mode of writing the source in an editor, checking it in, etc.</p>
<p>I can&#8217;t seem to imagine this environment in terms of day to day work, esp with a development group.</p>
<p>Can I get some insight from the pros?</p>
<p>Cheers,</p>
<p>parki&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
