News for hackers. Stuff that matters.
Re:How Lisp is Going to Save the World by chimeracoder on Wednesday January 09, 2013 @10:56AM (#5032109)
> I found the syntax very obtuse and it was not obvious why Lisp would be more powerful than Haskell.

The easiest answer to that is, there's no syntax, which makes reimplementing your own Lisp parser trivial (one single function call, in fact). This in turn makes reimplementing your own Lisp, inline in Lisp, similarly trivial.

That sounds like something out of an SICP exercise - and it is - but the same properties make it easier to reason about your code in a way that's far more abstract than other languages let you. Once you start treating your code as data that other parts of your code can manipulate, you can start refactoring in ways that simply aren't possible in other languages. This explanation by a well-known Perl programmer explains it very well: http://lists.warhead.org.uk/pipermail/iwe/2005-July/000130.h...

Another way I've heard it (this may have been pg, but I can't remember), is that, when writing idiomatic Lisp, you first think, "What language would make solving this problem really easy?" and then proceed to implement that language.

Re:How Lisp is Going to Save the World by egonk on Wednesday January 09, 2013 @02:34PM (#5033002)
Have you got a good example where Lisp macros would work but standard Haskell would "fail"?

I've done some compiler work in Haskell like writing programs (semantic actions) as algebraic data structures and then transforming or interpreting the tree. Would I gain something by using Lisp macros in this instance?

Re:How Lisp is Going to Save the World by tome on Wednesday January 09, 2013 @03:43PM (#5033384)
Many of Lisp's uses of macros can be replicated in Haskell by taking advantange of lazy evaluation. This is enough for most needs I've ever had, but some things still need the macro system that Template Haskell provides. Deriving lenses from type declarations is one of the up-to-the minute uses.
Re:How Lisp is Going to Save the World by kd0amg on Wednesday January 09, 2013 @05:59PM (#5034099)
Have you got a good example where Lisp macros would work but standard Haskell would "fail"?

http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m...

Re:How Lisp is Going to Save the World by draegtun on Thursday January 10, 2013 @06:33AM (#5036441)
If pg then perhaps it was (or stems from) this: Programming Bottom-Up - http://www.paulgraham.com/progbot.html
Re:How Lisp is Going to Save the World by chimeracoder on Thursday January 10, 2013 @11:24AM (#5037794)
> In Lisp, you don't just write your program down toward the language, you also build the language up toward your program. As you're writing a program you may think "I wish Lisp had such-and-such an operator." So you go and write it. Afterward you realize that using the new operator would simplify the design of another part of the program, and so on.

That's close, but not quite the wording I remember, so I must have seen it somewhere else as well. That's a pretty good description of what I was referring to, though.

Re:How Lisp is Going to Save the World by draegtun on Sunday January 20, 2013 @06:38AM (#5086620)
I was (re-)reading On Lisp yesterday and came across two further variations by pg:

In preface:

As well as writing their programs down toward the language, experienced Lisp programmers build the language up toward their programs.

Then later in 1.2 "Programming Bottom-up", pg rephrases that statement:

In Lisp, you don’t just write your program down toward the language, you also build the language up toward your program