Live data from Hacker News

Why Lisp is now an acceptable scripting language

fare.tunes.org

51–60 of 138 posts

Re: Why Lisp is now an acceptable scripting language

#51
post #47

Can anybody explain the advantages of switching to a functional language when it is not a pure one? For example, how is it better than Javascript? Is the uniformity of the syntax (and perhaps implicit currying) the main benefit?

When the inputs are similar to the outputs, (e.g. text with linux CLI commands) functions can be very flexible and do things they were not originally designed to do (e.g. linux CLI commands). An assumption that's implicit in what I've said is data flow programming. Data flow programming is when programming is thought of as connecting black boxes with inputs and outputs together. This way of programming is inherently modular. This is to be contrasted with (i) iteration, or recursionn which are inherently un-modular and (ii) The von Neumann model of computation, where there is a separation between code and data, and programming is thought of to be functions acting on the data (the problem with this model is that things need to be executed in a certain order, and sometimes the order isn't explicit in the code, which leads to bugs. Contrast this with data flow programming, where time is modelled explicitly)

In LISP, the common interface between functions in the list rather than text. To encourage data flow programming and discourage recusion, map, filter, and fold are provided.

Re: Why Lisp is now an acceptable scripting language

#52
post #47

Can anybody explain the advantages of switching to a functional language when it is not a pure one? For example, how is it better than Javascript? Is the uniformity of the syntax (and perhaps implicit currying) the main benefit?

I'm not so sure about implicit currying in CL. The uniform syntax that provides homogeny between code and data is exactly the main benefit because, for example, you can go ahead and add implicit currying (and much more). An example result of this benefit is CLOS from memory - a filly featured object system that is composed of extensions to the core language. In fact, I think it has many powerful features not present in archetypical OO languages. Multi-dispatch is one feature I recall from the top of my head.

Re: Why Lisp is now an acceptable scripting language

#53
post #4

If an HN post with 10 upvotes makes your site go down, do you really have the right to tell people how to write code?

If you don't know the most common causes of a site going down, do you really have the right to ask people if they really have the right to tell people how to write code?

Re: Why Lisp is now an acceptable scripting language

#54

Earlier quoted context omitted.

I have tried lisps looking for the famed syntactic purity but I didn't really find it. For example, following the little schemer books, they don't print scheme as the actual ascii you need to type, instead they use typography like bold, italic and greek symbols that you have to replace with the uglier reality to distinguish between things like s-expr from lists. It feels like they are embarrassed by the cludgy real s…

> ... they use typography like bold, italic and greek symbols that you have to replace with the uglier reality to distinguish between things like s-expr from lists. My main complaint with Scheme is that it's hard to distinguish a "call" from a plain list. For example, in `(let ((foo 1) (bar 2)))`, `let` is a call, but `foo` and `bar` are just being assigned, not called. Clojure uses `(let [foo 1 bar 2])`, so you can…

From what I can tell, Scheme (or it may be a Racket thing) allows the use of square brackets - this aids in readability greatly. There is no type difference as there is in Clojure.

Re: Why Lisp is now an acceptable scripting language

#55

When I opened the page, I honestly thought CSS failed to load. But then I looked at the first line of the page source: I think they really shouldn't tell us what is now an acceptable scripting language if they still consider that design and that doctype acceptable in 2016.

Looks like it was created with an older version of Scribble: http://docs.racket-lang.org/scribble/ I'm not sure why that would call the contents into question.

If it's true, then in this case that's literally shouting "I don't give a slightest finger about my users, I'll toss them an autogenerated pile of markup and will not even test if it's legible".

There's also a huge difference between "minimalistic" and "outdated". One should exit the cryo-chamber in order to see it though.

--------------------------------------------------------------------

To put it all together:

The authors of all those sites (as well as their supporters here) seem to live in a parallel universe where all users have nothing but 640x480 VGA cards and Dillo browser is the best one out there, lynx/elinks/w3m is a norm in that universe, and the most recent smartphone of 2016 is called Nokia 9110 Communicator.

They may produce the best content but it remains absolutely worthless and can't gain any level of trust until they actually care of delivering that content.

If they can't make nice looking (not even to mention the word "responsive") websites themselves, they may ask or hire someone to do it. There's nothing wrong with it. But if such a way was chosen deliberately then it's a good indicator of the attitude to the website users. And if the users bite this and say "yeah, it's ok, we can trust him anyway because he's successful at other fields", it kinda looks like a sect. Questions about why such a "successful person" haven't created a decent site (himself or with someone's help) remain unanswered. So be it. Because, you know, it's pointless to argue with sectants.

So, given the level of pseudo-elitist zombie ochlocracy here, I'm not going to discuss this topic any further. Believe whatever you want to believe. Live in a parallel world as long as you can. But rest assured: reality will catch you at the most inopportune moment.

Re: Why Lisp is now an acceptable scripting language

#56

Earlier quoted context omitted.

Looked. So what? There's a difference between "ugly" and "invalid". Both cases are bad but the first one has much more impact on end users. Edit to answer "how is it invalid": is this not enough? http://validator.w3.org/check?uri=http%3A%2F%2Fnews.ycombina...

This is HN webpage, I meant the article page doctype. taken from w3c: article doctype:

I meant that website is probably valid but ugly, and HN page is vice versa.

Re: Why Lisp is now an acceptable scripting language

#57
post #47

Can anybody explain the advantages of switching to a functional language when it is not a pure one? For example, how is it better than Javascript? Is the uniformity of the syntax (and perhaps implicit currying) the main benefit?

This really depends upon which functional language you're referring to. Each one has a different set of features.

JavaScript is in some sense an impure functional language, however hastily designed in various places.

In the context of CL, the canonical example would be "macros". But CL has a bag of other features that makes it appealing.

Re: Why Lisp is now an acceptable scripting language

#58
post #54

Earlier quoted context omitted.

> ... they use typography like bold, italic and greek symbols that you have to replace with the uglier reality to distinguish between things like s-expr from lists. My main complaint with Scheme is that it's hard to distinguish a "call" from a plain list. For example, in `(let ((foo 1) (bar 2)))`, `let` is a call, but `foo` and `bar` are just being assigned, not called. Clojure uses `(let [foo 1 bar 2])`, so you can…

From what I can tell, Scheme (or it may be a Racket thing) allows the use of square brackets - this aids in readability greatly. There is no type difference as there is in Clojure.

With the downside being inconsistent style across the community, making for more overhead when reading code (see also macro abuse). Scheme has bigger fragmentation problems anyhow.
Post reply on HN