Live data from Hacker News

Why Lisp?

blog.rongarret.info

191–200 of 248 posts

Re: Why Lisp?

#191

Earlier quoted context omitted.

What sort of tools are required for this? I'd like to start taking Lisp seriously, but workflow stories like this tend to hinge on using Emacs/SLIME. Is that always the case? EDIT: I suppose what I'm asking is whether you could elaborate more on what this looks like, in practice.

Actually no, I use vim/slimv almost exclusively. I think Sublime2 might also have features that let you "hook into" a remote REPL, but I'm not very familiar. There may be other editors with lisp integration as well, but I'm not sure what they are. If you do like vim, slimv is a really great option for lisping.

Does slimv work with Racket yet? I remember trying this a few months ago and giving up.

Re: Why Lisp?

#193

The article doesn't discuss macros, which is one of the answers to "Why Lisp?" I didn't "get" macros until I read a footnote in the (freely available) book Practical Common Lisp . In chapter 7, it introduces the `dolist` macro. DOLIST loops across the items of a list, executing the loop body with a variable holding the successive items of the list. This is the basic skeleton (leaving out some of the more esoteric opt…

>So an annoyance that Common Lisp programmers can resolve for themselves within five minutes plagues Java programmers for years

I get the sentiment, but this is seriously advocating for unmaintainable code that likely breaks in strange corner cases and requires 10 times as long for a new person to the code base to understand.

First contributor, "I know my code should be able to handle out of memory errors in this corner case, but I know I won't use it that way so it shouldn't be an issue."

Second contributor, "Hey this macro from First contributor looks nice, I'm going to use it."

A pile of shit emerges.

Re: Why Lisp?

#194
post #61

Earlier quoted context omitted.

Even better you can attach the repl to a remote instance. I had a problem a little while ago that could only be reproduced on the server. I could connect to the repl over ssh and evaluate and modify code directly. Compare that to a similar problem I had with a C# app we had. For that I had to stick in a load of logging code, check it in then wait half an hour for the CI server to deploy before running and checking th…

You can get this in other languages too. For example, Flask (a Python web framework) has a fantastic debug-mode error page that totally changed the way that I think about web development. Any time an exception is thrown in a view function (and this includes the exceptions that you idiomatically throw for HTTP 4xx and 5xx errors) the debug-mode error page would have a stack trace (obviously), but also an interactive R…

Not quite as automatic, but XDebug with the Codebug client gives you this exact functionality for PHP. Saved me many a headache over the past few years, and makes tracing data flow in a program I don't know as simple as it can be.

Re: Why Lisp?

#195

The article doesn't discuss macros, which is one of the answers to "Why Lisp?" I didn't "get" macros until I read a footnote in the (freely available) book Practical Common Lisp . In chapter 7, it introduces the `dolist` macro. DOLIST loops across the items of a list, executing the loop body with a variable holding the successive items of the list. This is the basic skeleton (leaving out some of the more esoteric opt…

>So an annoyance that Common Lisp programmers can resolve for themselves within five minutes plagues Java programmers for years I get the sentiment, but this is seriously advocating for unmaintainable code that likely breaks in strange corner cases and requires 10 times as long for a new person to the code base to understand. First contributor, "I know my code should be able to handle out of memory errors in this cor…

A pile of shit emerging whenever programmers are lazy and try to cut corners or when they try to do things they don't fully understand is not unique to macro writing.

Re: Why Lisp?

#196
post #154

Earlier quoted context omitted.

Is there any loss less binding of XML to s expressions? I've never seen one. Usually example where I see people rewrite XML to s expressions (like in this thread) are very lossy -- its easy to be pretty by throwing away most of the information!

> Is there any loss less binding of XML to s expressions? I've never seen one. You haven't looked hard enough. Mappging XML to sexprs is trivial: content --> ((tag value attr ...) content)

True, but to be honest, that isn't really any more useful compact (well, it saves closing tags I suppose).

Re: Why Lisp?

#197

Earlier quoted context omitted.

>So an annoyance that Common Lisp programmers can resolve for themselves within five minutes plagues Java programmers for years I get the sentiment, but this is seriously advocating for unmaintainable code that likely breaks in strange corner cases and requires 10 times as long for a new person to the code base to understand. First contributor, "I know my code should be able to handle out of memory errors in this cor…

A pile of shit emerging whenever programmers are lazy and try to cut corners or when they try to do things they don't fully understand is not unique to macro writing.

I think the point above is that this problem could be exacerbated by macro writing.

Re: Why Lisp?

#198
Why Lisp? Because the developers that know and love Lisp are normally highly above average and get things done. For sure, there is a much smaller pool to chose from, but once you are far from what is currently hip, you get developers that actually care.

Re: Why Lisp?

#199

Earlier quoted context omitted.

>So an annoyance that Common Lisp programmers can resolve for themselves within five minutes plagues Java programmers for years I get the sentiment, but this is seriously advocating for unmaintainable code that likely breaks in strange corner cases and requires 10 times as long for a new person to the code base to understand. First contributor, "I know my code should be able to handle out of memory errors in this cor…

A pile of shit emerging whenever programmers are lazy and try to cut corners or when they try to do things they don't fully understand is not unique to macro writing.

Right, the point i was making is that not everyone is a 'rockstar' and macros just give you quite a bit more rope to hang yourself with. Awful java/python/whatever is obvious because you can't redefine control flow so easily. With macros you can have something as fundamental as loops be broken.

Re: Why Lisp?

#200
post #126
post #118

Earlier quoted context omitted.

> An example is any instance of language extension where, say, the maintainers of the compiler for a functional language have to ship a new compiler to the users to get them to use the new feature. > Functional languages with lazy evaluation are not finished, right? They are developed actively. Agreed, they are actively developed. Correct me if I'm wrong, but you seem to be saying "many interesting features can be im…

One could write a macro that allows infix notation for arithmetics: (arithmetics 1 + 2 - 3) = (- (+ 1 2) 3) These kind of syntactic transformations are what macros enable.

These kinds of easy, context-independent reshufflings of expressions is what macros enable macro newbies to achieve.
Post reply on HN