Live data from Hacker News

Is Lisp a Blub Language?

coding.derkeiler.com

21–30 of 81 posts

Re: Is Lisp a Blub Language?

#22
I find in certain cases that I'm looking across the power spectrum from the Lisp point of view. I recently ported some code from Haskell to Clojure and occasionally found myself missing Haskell's amazingly expressive type system. Trying to give Lisp such a type system would make a lot of things that are currently easy in Lisp hard or impossible.

There are certain kinds of mutually exclusive features that make certain kinds of problems easier or harder. Examples that come to mind are mutability vs immutability and static typing vs dynamic. Most of the things I sometimes find lacking in the Lisps I'm familiar with are of this sort.

Re: Is Lisp a Blub Language?

#23
So how many here can take any problem and use any language to solve it language-optimally with all known best practices with the least amount of code?

How do you figure out that one language is better than another for a given context where hundreds of people with 10 years of experience with language X would solve a problem faster and more elegant with language Y and zero experience?

Are the people finding certain languages unreadable and ugly really the people that should decide what language to use for a problem at hand? Or the experienced craftsmen with expertise in their old, ugly and "unredable" language?

Personally I find it rather funny and ironic that noobs are the ones driving the language of choice because they have learned how good their new and powerful language is - and because they are having trouble reading anything else.

In this way the noobs get an edge over Old-timers with years of experience that actually know how to write beautiful code in their old ugly language.

The noobs doesn't realize this until their favourite language is considered old and obsolete by even newer noobs, and they start to call themselves Old-timers..

I think most people will have a native language where they express themselves better and more elegant than any other language. They will probably solve any problem faster with their native language compared to the optimally correct besserwisser language. I bet their solution would be more readble and elegant too, compared to be using a language they don't have any experience with.

Re: Is Lisp a Blub Language?

#24
post #7

Earlier quoted context omitted.

It looks like you have never programmed in Lisp. A function like Take is easy to write in Lisp. Lisp has many similar functions like that - but with a better interface. > There is a reason you don't see meaning represented by structure in pretty much any other language besides Mathematica. Could it really be that you missed the AI software that has been written in Lisp in the last five decades?

What is ' other than a special mode? The fact is that symbols are treated more systematically in Mathematica, and that makes it easier to assemble and dissemble symbolic structures of all sorts. Sounds like a case of blub. You look at Mathematica and see some weird stuff that is probably equivalent in power to multimethods or whatever, I look at Lisp and think how can I possibly live without civilized pattern matchin…

Symbols are not treated more systematically in Mathematica.

QUOTE is a special operator in Lisp that causes the evaluator to return its argument unevaluated.

     (quote a) -> a
     (quote (+ 1 2)) -> (+ 1 2)
     (quote "abc") -> "abc"
Mathematica has a different strategy for computation, one that is based on rewrite rules. Expressions are rewritten until they can't no longer be rewritten.

In Lisp evaluation

    (+ a a)
gives an error if the variable A has no value.

In Mathematica it would be reduced to

   (* 2 a)  ; in Lisp syntax
if A has no value.

But that has little to do with the processing capabilities of Lisp. A function like Take can be written very natural in Lisp - there is NO special mode needed. The function takes data and computes results.

You may want to get out of your Mathematica blub and learn some Lisp. Writing the 'Take' function is a good exercise. Stuff like that are basic exercises in Lisp courses.

Re: Is Lisp a Blub Language?

#25
post #20

Pattern matching is the missing feature. I keep thinking about switching to Clojure from Mathematica, but then I think "How can anyone get anything done in Clojure? It doesn't even have pattern matching." Its not something that can get patched in a library, because the way symbols and evaluation need to work is different (and simpler) than in a Lisp. There is no distinction between macro-s and nonmacros - everything…

A little bit of googling gave me the sense that pattern matching in Mathematica is different from the pattern matching present in several functional languages. Please let me know how these Clojure features differ from that: Clojure has pattern matching for the arguments in a function definition similar to ML or Haskell. It's often used as a more verbose alternative to optional args, but it's more powerful fundamental…

There is 1 mechanism instead of 4, and it also happens to be the fundamental basis of evaluation.

There is no way to measure "absolute power" of elegance, which is the issue being gotten at here.

Not to say Mathematica has it gotten it perfect either, because it hasn't. But I have yet to see a superior implementation, and have seen a lot of clunky ones in my search.

Re: Is Lisp a Blub Language?

#26

Pattern matching is the missing feature. I keep thinking about switching to Clojure from Mathematica, but then I think "How can anyone get anything done in Clojure? It doesn't even have pattern matching." Its not something that can get patched in a library, because the way symbols and evaluation need to work is different (and simpler) than in a Lisp. There is no distinction between macro-s and nonmacros - everything…

If you don't know how to write a pattern matching library in Lisp, you don't really know Lisp and should probably refrain from spreading misinformation about it.

Re: Is Lisp a Blub Language?

#27
post #14

Blubness of a language comes from its practitioners not knowing about useful features from a higher-level language (or not grasping the utility of such a feature). If your favorite Lisp lacks a certain feature you want, it's easy to add, making Lisp the anti-Blub. (And if your favorite Lisp makes it hard to add it, you've picked the wrong favorite!)

Some things are difficult to add even to Lisp. Static typing being an example.

Re: Is Lisp a Blub Language?

#28
post #11

Earlier quoted context omitted.

Clojure and Scheme have take and drop, though the semantics are slightly different from those of Mathematica. They can be written in almost any language.

My point is that putting "structure assumptions in argument lists", though not a good idea 100% of the time, is often extremely useful, as illustrated by the example. The greater point is that if this is so, one might as well deal in a model of computation that is a natural fit for that way of thinking. I've been doing a lot of work in Scala and Actionscript. How I wish they had that family of functions in full gener…

Your example above did not show any special pattern matching capabilities whatsoever.

Re: Is Lisp a Blub Language?

#29
post #14

Blubness of a language comes from its practitioners not knowing about useful features from a higher-level language (or not grasping the utility of such a feature). If your favorite Lisp lacks a certain feature you want, it's easy to add, making Lisp the anti-Blub. (And if your favorite Lisp makes it hard to add it, you've picked the wrong favorite!)

Some things are difficult to add even to Lisp. Static typing being an example.

right, that's a good example

Re: Is Lisp a Blub Language?

#30
post #14

Blubness of a language comes from its practitioners not knowing about useful features from a higher-level language (or not grasping the utility of such a feature). If your favorite Lisp lacks a certain feature you want, it's easy to add, making Lisp the anti-Blub. (And if your favorite Lisp makes it hard to add it, you've picked the wrong favorite!)

Some things are difficult to add even to Lisp. Static typing being an example.

Difficult, but not impossible. Qi and Typed Scheme are two examples.
Post reply on HN