<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Disqus - Latest Comments for Oliver Steele</title><link>http://disqus.com/people/c19954cfe98af88fc75050b06568a64e/</link><description></description><language>en</language><lastBuildDate>Wed, 13 Feb 2008 01:41:54 -0000</lastBuildDate><item><title>Re: Test versus Type</title><link>http://osteele.disqus.com/test_versus_type/#comment-4880794</link><description>Dave writes: "The fact is that without static typing you HAVE to write tests to make sure you aren't mis-using variables IN ADDITION to the normal tests you would write to test functionality."  But if your functional tests don't test for correct usage of these variables, you've either got some unused variables in your source or you aren't testing much of your program's functionality.  And most ways of mis-using a variable don't have to do with treating it as the wrong type.&lt;br&gt;&lt;br&gt;Dave also suggests writing two programs in Python, one with and one without type definitions.  I haven't run this exact experiment, but I did write both a Java and a Python interface to Wordnet, and tools that used each of these.  The difference was striking.  You can chalk some of this up to other differences between Java and Python, but I've done enough programming in languages that vary from each other in different ways (C++, Haskell, Common Lisp, and Smalltalk, to pick three that are very different from each other) to have something of a feel for what slows me down in each of them.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Thu, 21 Aug 2003 17:38:27 -0000</pubDate></item><item><title>Re: Test versus Type</title><link>http://osteele.disqus.com/test_versus_type/#comment-4880795</link><description>Peter writes: "Implicitly typed language people don't have experience with a tool like IntelliJ IDEA whre the 'coding/refactoring' process is actualy driven by types which makes it even faster then without writing types at all. Tools like IDEA are not possible without explicit typing."  Actually, the first refactoring browser was for Smalltalk, an ITL.  (See here, here, and here).  This obviously doesn't depend on types.&lt;br&gt;&lt;br&gt;But the general point, that IDEs can use type information to provide additional services, such as parameter lists and method name completion, is an excellent one.&lt;br&gt;&lt;br&gt;The other two uses of types that I didn't touch on is their use as program documentation, and to improve runtime performance.&lt;br&gt;&lt;br&gt;The general point is that the fact that a runtime for a dynamically typed language can do "poor man's type inference" doesn't help the other readers of the program source: development tools, and humans.&lt;br&gt;&lt;br&gt;I wrote about one problem with using manifest types for these purposes is their maintenance costs.  That's just a cost/benefit tradeoff, and when you change the tools, the performance requirements, or how much of the design of the program is expressed through the types of its variables, the tradeoff can change.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Thu, 21 Aug 2003 17:53:19 -0000</pubDate></item><item><title>Re: Becoming Lisp</title><link>http://osteele.disqus.com/becoming_lisp/#comment-4880837</link><description>Hi, Brice, and thanks!&lt;br&gt;&lt;br&gt;Your comment was very interesting, and raised a lot of issues --- especially the difference between &lt;em&gt;readability&lt;/em&gt; and &lt;em&gt;writability&lt;/em&gt;, and the difference (which you hint at) between &lt;em&gt;features&lt;/em&gt; and &lt;em&gt;paradigms&lt;/em&gt;.  Those are worthy of a longer answer; I'm not going to try at all in this comment.&lt;br&gt;&lt;br&gt;Two points:&lt;br&gt;&lt;br&gt;1. Features increase the &lt;em&gt;range&lt;/em&gt; of readability.  Each feature makes it possible to write both more-readable and less-readable programs than one could write without it.  Consider Python &lt;code&gt;_&amp;2d;new__&lt;/code&gt;.  A program with &lt;code&gt;__new__&lt;/code&gt; strewn throughout is &lt;em&gt;less&lt;/em&gt; readable than it otherwise would be.  A program that uses a named tuple class (which can be &lt;a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303439" rel="nofollow"&gt;implemented with a single &lt;code&gt;__new__&lt;/code&gt;&lt;/a&gt;) can be &lt;em&gt;more&lt;/em&gt; readable than one that doesn't --- especially if the one that doesn't uses what is basically a source-level expansion of the named tuple implementation, each place a named tuple would be appropriate.&lt;br&gt;&lt;br&gt;Consider virtual functions (or method overriding, in an OO language).  Virtual functions make it easier to write readable programs, because they move the switch statements or function pointers that would otherwise be necessary out of the problem domain code.  (In fact, virtual functions are a way of moving this dispatch code out of the program source entirely, to the language implementation).  But virtual functions also make it easier to write unreadable programs --- it can be very hard to find which implementation of a method is called under which circumstances.&lt;br&gt;&lt;br&gt;I'd rather have the &lt;em&gt;possibility&lt;/em&gt; of working with readable programs than the &lt;em&gt;certainty&lt;/em&gt; of avoiding unreadable programs, but it depends on who you're working with and where the code you read is coming from.&lt;br&gt;&lt;br&gt;2. "source code from different projects doesn't seem like it's written in the same language": Maybe this is a &lt;em&gt;good&lt;/em&gt; thing!  Consider the case where the best language for one project is Prolog and the best language for another project is Haskell.  Then there's two choices: Use &lt;em&gt;completely&lt;/em&gt; different languages for different projects, or using the wrong language for some projects because it's the right language for others.  Language features give you a third choice: use different &lt;em&gt;libraries and extensions&lt;/em&gt; for different projects.  It's not clear that &lt;em&gt;seeming&lt;/em&gt; like different projects are in different languages is as bad as the alternatives: &lt;em&gt;being&lt;/em&gt; in different languages, or being in the &lt;em&gt;wrong&lt;/em&gt; language!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sun, 12 Sep 2004 18:32:31 -0000</pubDate></item><item><title>Re: Becoming Lisp</title><link>http://osteele.disqus.com/becoming_lisp/#comment-4880840</link><description>Brice: I think you've hit the nail on the head with your comment that different tools are appropriate for different teams (and for different projects, and different contexts --- I wouldn't have written a rendering engine in Python, or PyWordnet in assembly).&lt;br&gt;&lt;br&gt;Still, it would be nice if the different tools for different teams could be hosted in one language.&lt;br&gt;&lt;br&gt;If you start with a superset of the features you need, subsetting it requires policies, conventions, and, ideally, tool support --- something like &lt;a href="http://checkstyle.sourceforge.net/" rel="nofollow"&gt;Checkstyle&lt;/a&gt; or &lt;a href="http://innig.net/macker/" rel="nofollow"&gt;Macker&lt;/a&gt; that can be run as a supplement to the compiler to create a composite compiler that compiles a subset of the full language, or like the language devels in &lt;a href="http://www.drscheme.org/" rel="nofollow"&gt;DrScheme&lt;/a&gt;.&lt;br&gt;&lt;br&gt;If you start with a subset of the features you need, you end up writing what would have been the compiler expansion of these features into your source code, using a precompiler, or implementing these features with metaobject programming.  But you can only do the last if the language has metaobject programming features to begin with, which reduces this problem to the previous case, where you want the language to have these features, but you want to restrict their use, or the use of the features they create, to certain libraries.  Something like Macker for language features seems like it would be appropriate here.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sun, 19 Sep 2004 00:32:14 -0000</pubDate></item><item><title>Re: Becoming Lisp</title><link>http://osteele.disqus.com/becoming_lisp/#comment-4880841</link><description>Chris Dean and JJC: What sorts of things do you use macros for in Lisp?&lt;br&gt;&lt;br&gt;I used to use macros for a several different things in Lisp.  Many of them I switched to closures or multimethods for even when I still did most of my work in Lisp.  Other uses of macros (for example, reader macros) rarely turned out to be worth the trouble of maintaining or integrating with other libraries.&lt;br&gt;&lt;br&gt;The use of macros that I found the most powerful was to define new top-level defining forms, but metaprogramming works pretty well for this, and so does having a literal syntax for finite maps (or "dicts" or "hashes".  I found Lisp's MAKE-HASHTABLE a poor substitute for this.&lt;br&gt;&lt;br&gt;The other use of macros in my work was to define new binding forms such as with-open-file or with-graphics-context.  Python doesn't have a good replacement for this.&lt;br&gt;&lt;br&gt;JJC: "Just because Python has a lambda operator, it does /not/ mean it supports functional programming."  What did you have in mind?  (BTW, Python has had lambda for years.  What it's added lately are Haskell-style list comprehensions, generators, and libraries such as itertools.)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sun, 19 Sep 2004 00:42:32 -0000</pubDate></item><item><title>Re: Second grade squares</title><link>http://osteele.disqus.com/second_grade_squares/#comment-4880951</link><description>Thanks, Bret.  You're right about the labels on the arrows --- I've fixed them.&lt;br&gt;&lt;br&gt;I've actually got a picture of the visualization you're suggesting &lt;a href="http://osteele.com/archives/2004/12/visualizing-basic-algebra" rel="nofollow"&gt;here&lt;/a&gt;.  When I started explaining squares to the seven-year-old this year, I &lt;em&gt;almost&lt;/em&gt; printed that posting out, so that I could use it again.  But we ended up going down a completely different path.  That's one of the things I love about explaining things to people: even if I think I understand the material before-hand, I never end up taking the route I thought I would, when I'm traveling with someone else.&lt;br&gt;&lt;br&gt;Nice web site, by the way!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Mon, 19 Dec 2005 00:58:53 -0000</pubDate></item><item><title>Re: Visualizing Regular Expressions</title><link>http://osteele.disqus.com/visualizing_regular_expressions/#comment-4881004</link><description>Thanks, alpheccar!  You're exactly right about the disk animation.  (Wordpress keeps cutting the end of my comment off.  I'll answer this in a separate post.)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Mon, 20 Feb 2006 14:44:18 -0000</pubDate></item><item><title>Re: JSON for OpenLaszlo</title><link>http://osteele.disqus.com/json_for_openlaszlo/#comment-4881039</link><description>Oops!  The correct link is &lt;a href="http://osteele.com/sources/openlaszlo/json/openlaszlo-json-1.0.zip" rel="nofollow"&gt;http://osteele.com/sources/openlaszlo/json/open...&lt;/a&gt;.  I think I've updated it everywhere...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Mon, 20 Feb 2006 18:20:47 -0000</pubDate></item><item><title>Re: Readable JavaScript Values</title><link>http://osteele.disqus.com/readable_javascript_values/#comment-4881054</link><description>Good question.  In brief, JSON output is intended for consumption by computers and by libraries written in other languages, and Readable output is intended for humans.  This has all sorts of repercussions such as whether RegExps, null, undefined, and NaN are represented; whether representations can be limited in length or depth, and so on.  For a longer answer, see the bottom of the docs &lt;a href="http://osteele.com/sources/javascript/docs/readable" rel="nofollow"&gt;http://osteele.com/sources/javascript/docs/read...&lt;/a&gt;, where I've just added a list of differences.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Wed, 08 Mar 2006 21:09:06 -0000</pubDate></item><item><title>Re: Javascript Beziers</title><link>http://osteele.disqus.com/javascript_beziers/#comment-4881049</link><description>I just sped bezier.atT() up by 20%.  It's now around 35ms on my MacBook (in power saving mode), in Firefox 1.5 and Safari 2.0.1.  It was 45ms in Safari and 55ms in Firefox.&lt;br&gt;&lt;br&gt;(Yahoo has an implementation to0, but it's around 150/300ms, or 110ms/460ms if you leave in the calls to parseInt.)&lt;br&gt;&lt;br&gt;If you're calling bezier.atT() directly, the next optimization would be to inline that so that you can evaluated multiple points at once.  That will save one function call per point.&lt;br&gt;&lt;br&gt;If you're using the path interface, you could stub out the call to bezier.atT() to see if searching for the relevant segment is appreciable.  That could use a binary search.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Tue, 21 Mar 2006 20:44:09 -0000</pubDate></item><item><title>Re: Inline JavaScript Console</title><link>http://osteele.disqus.com/inline_javascript_console/#comment-4881063</link><description>Johan: Yes, Firebug is *much* better, when you're using FireFox.  (Except that I like my HTML element printing better :-).  As of the latest Firebug, I just use this for Safari and IE.&lt;br&gt;&lt;br&gt;Bernard: Do you have a pointer to either of these?  I spent some time with Google but I didn't see anything I could stick in a web page.&lt;br&gt;&lt;br&gt;Stephen: That's a great idea!  (It turned out to be a little more complicated, because Firefox evaluates the SCRIPT targets asynchronously.)  Try the following bookmarklet: (...I can't get the bookmarklet to show up in a WordPress comment, but you can view it in the header of &lt;a href="http://osteele.com/sources/javascript/insert-console.js" rel="nofollow"&gt;http://osteele.com/sources/javascript/insert-co...&lt;/a&gt;.  I'll add it to an HTML page later.)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sun, 02 Apr 2006 10:05:50 -0000</pubDate></item><item><title>Re: Inline JavaScript Console</title><link>http://osteele.disqus.com/inline_javascript_console/#comment-4881066</link><description>Tim: you're very welcome for the script, but I can't take any credit for the FF extension.  It's by Joe Hewitt, and isn't related to this code.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sat, 13 May 2006 18:31:12 -0000</pubDate></item><item><title>Re: Functional JavaScript</title><link>http://osteele.disqus.com/functional_javascript/#comment-4881122</link><description>Thomas, you're right; thanks for the find and the fix.  I've fixed it above now.&lt;br&gt;&lt;br&gt;I wrote the code that splices the output values into the "examples page":http://osteele.com/sources/javascript/functional exactly because I knew I wouldn't successfully keep them up to date with the expressions, but I couldn't (or didn't take the time to) do the same thing on this blog page :-(</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Sat, 04 Aug 2007 14:58:21 -0000</pubDate></item><item><title>Re: One-Line JavaScript Memoization</title><link>http://osteele.disqus.com/one_line_javascript_memoization/#comment-4881100</link><description>Atany: thanks for the catch; 'tis done.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Wed, 15 Aug 2007 12:42:19 -0000</pubDate></item><item><title>Re: Functional Javascript 1.0.2</title><link>http://osteele.disqus.com/functional_javascript_102/#comment-4881128</link><description>Thanks, Anonymous.  It was actually supposed to go to &lt;a href="http://osteele.com/sources/javascript/functional/functional-1.0.2.tgz" rel="nofollow"&gt;http://osteele.com/sources/javascript/functiona...&lt;/a&gt;, which packages up the two sources files and the example file.  I've fixed it now.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Mon, 12 Nov 2007 01:06:04 -0000</pubDate></item><item><title>Re: Monads on the Cheap I: The Maybe Monad</title><link>http://osteele.disqus.com/monads_on_the_cheap_i_the_maybe_monad/#comment-4881147</link><description>Hi, David!  Good to hear from you again.&lt;br&gt;&lt;br&gt;the_dormant: Okay, that does it.  I'll finally at scala.&lt;br&gt;&lt;br&gt;Alan, Thomas, thanks for the comments.  Something that makes me uncomfortable about catching exceptions is that it has dynamic scope.  If the accessors don't run any code, it's the same thing, but if product.offering is a getter that includes the expression record.connection, then the rescue will hide the case where record is null, as well as the case where product is null.&lt;br&gt;&lt;br&gt;Alan: After I wrote this I found this post &lt;a href="http://weblog.raganwald.com/2007/04/writing-programs-for-people-to-read.html" rel="nofollow"&gt;http://weblog.raganwald.com/2007/04/writing-pro...&lt;/a&gt; on Raganwald, which covered the "narrative mismatch" earlier and better.  Braithwaite summarizes a post by Norbert Winklareth as being about "minimizing the semantic distance between the program as written and the solution to the problem as conceived by the programmer".</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Wed, 19 Dec 2007 00:49:56 -0000</pubDate></item><item><title>Re: What Every Programmer Needs to Know About Category Theory</title><link>http://osteele.disqus.com/what_every_programmer_needs_to_know_about_category_theory/#comment-4881189</link><description>@nec, @Arjang: yes, nothing; sorry, it was intended as a joke, not a trick.&lt;br&gt;&lt;br&gt;@Pseudonym: Congratulations on catching the subtleties in the title ("every programmer" versus "some programmers"; "needs" versus "should").  Nonetheless, I'm curious as to whether knowing category theory helps anyone program.  The parts of category theory that relate to programming (functors, isomorphisms, monads and co-), I realized I was able to understand by using specific programming constructs as examples, and that knowing their categorial expressions didn't lead me to think about them any more deeply or to find analogies or solutions (the way that, say, realizing that you've implemented a state machine, or that your problem can be expressed in linear algebra, do).&lt;br&gt;&lt;br&gt;And I haven't been able to apply the other parts of category theory to programming at all, although I've found them incredibly useful in doing, and teaching, math, and in thinking about other activities such as project management and other aspects of life.  The Yoneda Lemma, for example, says that you aren't lost if you can find a landmark that you can get home from.  (Think about it :-)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Fri, 18 Jan 2008 20:47:18 -0000</pubDate></item><item><title>Re: Supply/Demand Springs</title><link>http://osteele.disqus.com/supplydemand_springs/#comment-4881202</link><description>@Peter: Thanks!  I wouldn't try to actually apply Hooke's law to this, though.  I've updated the post to say that I don't think this is a "productive metaphor".  If there is one I bet it has to do more with pressure than springs, but I haven't thought this through.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Fri, 08 Feb 2008 12:36:13 -0000</pubDate></item><item><title>Re: What I didn’t get to</title><link>http://osteele.disqus.com/what_i_didnt_get_to/#comment-4881158</link><description>@Raj, thanks for the kudos, and @Vijay, thanks for the link.  I'll check out Lilly.  (I also want to check out &lt;a href="http://nodebox.net" rel="nofollow"&gt;http://nodebox.net&lt;/a&gt;.)&lt;br&gt;&lt;br&gt;@Danny: I tried the lztestkit URL (the link in the text, and copy/paste from your comment), and it worked for me.  Maybe my web site was down for a moment?  It seems to go out a lot these days.&lt;br&gt;&lt;br&gt;I moved this to git and put it on &lt;a href="http://gitorious.org/projects/lztestkit" rel="nofollow"&gt;http://gitorious.org/projects/lztestkit&lt;/a&gt;.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Oliver Steele</dc:creator><pubDate>Wed, 13 Feb 2008 01:41:54 -0000</pubDate></item></channel></rss>