News for hackers. Stuff that matters.
Re:What Made Lisp Different (2002) by montrose on Sunday February 18, 2018 @02:10PM (#16407617)
Click on this link and search for Clojure: https://news.ycombinator.com/item?id=16052538
Re:What Made Lisp Different (2002) by oblio on Sunday February 18, 2018 @02:14PM (#16407650)
I should expand then: 17 years later, where are the successful Lisp (ok, and Clojure) startups fighting the Microsofts (C++, .Net), Facebooks (PHP!!), Apples (Objective-C, Swift), Amazons (Java, C++, Perl), Googles (C++, Java, Python, Go), Twitters (Ruby, Java, Scala), Dropbox (Python, C++), etc.?
Re:What Made Lisp Different (2002) by montrose on Sunday February 18, 2018 @02:19PM (#16407681)
Clojure is a Lisp. One of the distinctive things about Lisp is that it has dialects. You wrote your comment using software written in another of them.

The youngest of the companies you list was founded in 2007. The first stable Clojure release was in 2009.

Re:What Made Lisp Different (2002) by kbp on Sunday February 18, 2018 @03:06PM (#16408100)
> Clojure is a Lisp. One of the distinctive things about Lisp is that it has dialects.

When one of those dialects is completely source-incompatible with every other dialect (the rest of them share non-trivial programs freely), and doesn't share the same core features as every other dialect (like list structure), then why is it still a dialect and not a different language? Calling all the other Lisps that share core features and run the same code different versions of one language makes sense to me; I don't see the point in applying it to any language that borrowed a couple ideas.

If I have a large codebase written in (any) Lisp, will porting it to Clojure be significantly easier than porting it to Javascript or Ruby or any other modernish language? Not really; it's a complete rewrite either way. That sounds to me like it might just be a different programming language.

Re:What Made Lisp Different (2002) by tazjin on Sunday February 18, 2018 @04:20PM (#16408753)
> the rest of them share non-trivial programs freely

Heh. Most Scheme dialects don't even have source compatibility despite implementing the same standards.

Common Lisp lets you write portable (between different CL implementations) applications, but it's easy to end up doing something that is implementation-dependent if you're not careful.

Re:What Made Lisp Different (2002) by ScottBurson on Sunday February 18, 2018 @06:54PM (#16409678)
> it's easy to end up doing something that is implementation-dependent if you're not careful.

I wouldn't say that. I've done a fair amount of porting code between CL implementations, and it's usually pretty straightforward. Implementation dependencies tend to be found only in code doing OS-y things like threads, external processes, network sockets, etc. This code is usually not difficult to find, and I would think that the authors would have expected it to be implementation-dependent. Computational code usually ports with zero effort, even when the machine word size changes.

Re:What Made Lisp Different (2002) by DonHopkins on Sunday February 18, 2018 @11:02PM (#16410676)
Says the guy who wrote an interactive C compiler for Lisp machines! ;)

"C combines the power and performance of assembly language with the flexibility and ease-of-use of assembly language."

https://github.com/navoj/clisp-c

Re:What Made Lisp Different (2002) by kamaal on Monday February 19, 2018 @09:28AM (#16413041)
>>Not really; it's a complete rewrite either way.

Most languages are a evolutionary dead end. They won't even get this far.

Re:What Made Lisp Different (2002) by oblio on Sunday February 18, 2018 @02:23PM (#16407714)
> Clojure is a Lisp. One of the distinctive things about Lisp is that it has dialects. You wrote your comment using software written in another of them.

I also wrote other comments on other sites using software written in PHP, what does that have anything to do with anything mentioned here? I guess it proves that you can use Lisp to write forum software. Still, not really related to my main question.

Slightly off-topic, I should mention that I've read most of pg's articles several times over the years. I know about Arc, Viaweb, etc. I'm asking about this topic after having read all those articles.

> The youngest of the companies you list was founded in 2007. The first stable Clojure release was in 2009.

Ok, then some other big company founded since 2009. It's been already about 9 years, there should be some around. I can wait for examples. Those companies can use any dialect of Lisp invented since the 50's :)

Re:What Made Lisp Different (2002) by paroneayea on Sunday February 18, 2018 @02:37PM (#16407811)
I know quite a few people employed working on Clojure. It's true that none of them are spectacularly large corporations, but there are quite a few companies out there using it day to day.
Re:What Made Lisp Different (2002) by ivanpierre on Monday February 19, 2018 @09:17PM (#16417344)
Ok, Clojure is a lisp-1 like Scheme, CL is a lisp-2.

Clojure is not based on CONSes but you have CAR and CDR they are first and rest. Processors are no more based on accumulator and decrement registers... :D

Cons exists but it works only on lists as CONSes doen't exists in Clojure, only lists.

Empty list != nil.

Clojure is based on immutability like Scheme, CL is often used in a mutable way (see the shameful f-set).

{}, [], #{} are syntactic sugars and have already been implemented in CL.

Clojure is an hosted language, so Clojure, ClojureScript, ClojureCLR can be somewhat different, but the core language is the same (same base Clojure library).

Re:What Made Lisp Different (2002) by kbp on Tuesday February 20, 2018 @11:52AM (#16421741)
> Clojure is not based on CONSes but you have CAR and CDR they are first and rest.

CAR and CDR are operations on conses, so you can't have them without conses; that's like having sqrt without numbers. Lisp has FIRST and REST for operating on lists, and so does Clojure. Lisp also has CAR and CDR for operating on conses, but as Clojure doesn't have conses, it doesn't have CAR and CDR, either.

> Processors are no more based on accumulator and decrement registers

CAR and CDR were named for 'contents of address part of register' and 'contents of decrement part of register', not anything about accumulator or decrement registers. I'm not sure where you heard that processors don't have accumulators anymore, but that's definitely not true. The reason Clojure doesn't have CAR and CDR doesn't have anything to do with obsolete processors, though.

> Clojure is based on immutability like Scheme

Scheme is not based on immutability.

> CL is often used in a mutable way (see the shameful f-set).

Do you mean SETF? FSet[0] is an immutable data structure library for Common Lisp. A lot of Schemes have SETF, too, by the way, there's even an SRFI[1]. But SETF is just so that you can have one generic assignment operator; standard Scheme has plenty of commonly-used, destructive assignment operators like set-car!, set-cdr!, vector-set!, etc.

0: https://common-lisp.net/project/fset/Site/FSet-Tutorial.html

1: https://srfi.schemers.org/srfi-17/srfi-17.html

Re:What Made Lisp Different (2002) by lispm on Tuesday February 20, 2018 @01:55AM (#16418328)
Lisp also has first and rest.

Scheme isn't based on immutability.

R7RS:

> Literal constants, the strings returned by symbol->string, and possibly the environment returned by scheme-report-environment are immutable ob jects. All objects created by the other procedures listed in this report are mutable.

> {}, [], ...

These characters are reserved for the user in CL and have been used for a bunch of different things.

Re:What Made Lisp Different (2002) by PyComfy on Monday February 19, 2018 @08:08AM (#16412605)
Is it really? If we go back to the roots, lisp is made of what John McCarthy calls the Primary S-Functions which are atom, cons, car, cdr, and eq (a.k.a =). Of these five, clojure only has two (atom and eq)
Re:What Made Lisp Different (2002) by kbp on Monday February 19, 2018 @12:49PM (#16414348)
> Of these five, clojure only has two (atom and eq)

You can't have atom without conses (well, it would just be (lambda (x) t)); which Clojure function are you thinking of?

Re:What Made Lisp Different (2002) by lispm on Monday February 19, 2018 @03:17PM (#16415385)
Clojure has an ATOM function, but it does something completely different from Lisp's ATOM function.
Re:What Made Lisp Different (2002) by flavio81 on Monday February 19, 2018 @07:41AM (#16412503)
>Clojure is a Lisp

Almost. It deviates a lot from all the other Lisps, in particular the two main branches: Common Lisp and Scheme.

However it is still a Lisp family language, and thus with its advantages.

Re:What Made Lisp Different (2002) by lispm on Monday February 19, 2018 @03:22PM (#16415416)
Clojure is sufficiently different from typical Lisp dialects and their implementations, that it forms its own language family.
Re:What Made Lisp Different (2002) by t1amat on Monday February 19, 2018 @01:29AM (#16411130)
If you don’t limit the conversation to startups, Walmart seems to use Clojure extensively: https://github.com/walmartlabs?tab=repositories
Re:What Made Lisp Different (2002) by jimbokun on Sunday February 18, 2018 @10:38PM (#16410590)
Ruby and Python, at least at the time of Twitter and Dropbox foundings, fell more on the side of the hackerish languages.

Objective-C is only a mainstream language now because Apple is the most successful company on Earth. No one besides Apple was seriously using it at the time, and they used it to develop the most popular product in the history of computing. And of course, then bet their development future on an entirely new language, Swift, which of course no one else was using, because Apple invented it.

True, it's crazy Facebook had so much success with PHP. But they are also one of the biggest corporate users of Haskell, I think.

True, on the surface Amazon and Google are on the stodgy side with their "supported" languages. But I believe Google internally is rife with custom, proprietary DSLs to drive a lot of their infrastructure? And they invented Go. Which is in many ways the opposite of Lisp in terms of design. But the larger point PG was making was that the dangerous technology companies evaluate technology decisions on the real potential productivity gains, and not on the number of job postings for that technology.

EDIT: Saw Erlang mentioned elsewhere in this thread, which reminded me of WhatsApp, which led to 50 engineers supporting 900 million users and a $19 billion payday from Facebook! That's the perfect example of the kind of company PG would have been worried about.

Re:What Made Lisp Different (2002) by guicho271828 on Sunday February 18, 2018 @02:52PM (#16407954)
Few comes in my mind: iRobot[1], Grammarly, D-wave. I feel there is something in common but it is hard to describe.

[1] If you call iRobot is a venture company. It is actually 30 yrs old.

Re:What Made Lisp Different (2002) by kamaal on Monday February 19, 2018 @09:14AM (#16412960)
"In 30 years Lisp will likely be ahead of C++/Java (but behind something else)"

- Peter Norvig

https://en.wikiquote.org/wiki/Lisp_(programming_language)

Re:What Made Lisp Different (2002) by AnimalMuppet on Monday February 19, 2018 @03:12PM (#16415349)
The quote is dated 1999. 11 years to go, and I'm rather skeptical that it will happen.
Re:What Made Lisp Different (2002) by fsloth on Sunday February 18, 2018 @03:23PM (#16408261)
Some people say Python is a good enough Lisp.
Re:What Made Lisp Different (2002) by flavio81 on Monday February 19, 2018 @07:43AM (#16412510)
>Some people say Python is a good enough Lisp.

After a full year writing Python professionally, and then Common Lisp, i can confidently say this is not true.

Re:What Made Lisp Different (2002) by montrose on Tuesday February 20, 2018 @05:23AM (#16419213)
What do you find is missing?
Re:What Made Lisp Different (2002) by flavio81 on Tuesday February 20, 2018 @08:16AM (#16420042)
I do like Python, a lot, but you asked for it... the list is long!

- true, effortless metaprogramming

- speed close to C by use of type declarations and fixed arrays; this means up to 100x faster than CPython. No, PyPy, Jython and Cython don't get quite there.

- no Global Interpreter Lock!

- the condition-restarts error handling system, which is deluxe error handling and recovery from errors.

- a very flexible type system, plus very strong typing.

- an extremely powerful object oriented system (CLOS) -- light years ahead of most OOP systems including Python. This means, having multimethods/multiple dispatch, method combinations, around/after/before methods, multiple inheritance, and a MOP.

- true lambdas, not Python's one-line joke lambdas.

- true interactive development, able to compile functions on the fly and thus change them while the code is running. Able to redefine classes while the code is running.

- able to call Java libs and C libs at the same time, with ABCL

- will run on many platforms and in the JVM without modifications to the code

- separate namespaces for functions, vars, keywords and everything

- tail call optimizations

- something like Quicklisp (pip isn't as good)

- built-in rational numbers, complex numbers, using the same operators for regular numbers

- the LOOP macro, which I find better than Python's list comprehensions.

Re:What Made Lisp Different (2002) by montrose on Wednesday February 21, 2018 @04:43AM (#16428188)
Thank you, this is very interesting.

In what way are Python's lambdas restricted? Do they literally have to fit on one line?

Do you have to use a separate version of + to add complex numbers in Python?

Do you prefer loop because it's more concise or because you can say things you can't say in Python? Can you give me a couple examples of things that work better with loop?

(As you can tell from my questions, I don't know much about Python, but as a Lisp hacker I'm curious about other Lisp hackers' view of it.)

Re:What Made Lisp Different (2002) by cmcaine on Saturday February 24, 2018 @03:31PM (#16455221)
Python lambdas cannot contain statements, only expressions. Typical python contains a lot of statements, so that's a bit annoying.

You can define inner functions and so on, and most of the times that I want to use lambdas it's just because I've been stuck in a language without *-comprehensions for too long.

+ works fine on complex numbers.

I'm not super familiar with the loop macro, but it lets you do both things similar to a python comprehension and to a python for loop. I don't think it does anything you can't do in python.

Re:What Made Lisp Different (2002) by jimhefferon on Sunday February 18, 2018 @05:02PM (#16409007)
But macros?
Re:What Made Lisp Different (2002) by thanatropism on Sunday February 18, 2018 @05:59PM (#16409372)
There are a few cool macros in Python, e.g. decorators. It's just that you can't define your own without making it past Guido.

(To be clear, decorators aren't macros, "decorator" is a macro)

Re:What Made Lisp Different (2002) by xapata on Monday February 19, 2018 @01:27AM (#16411122)
You kinda can, through the file encoding specifier. It'll let you write reader macros that programmatically modify the AST, essentially.
Re:What Made Lisp Different (2002) by darkhorn on Sunday February 18, 2018 @06:31PM (#16409550)
Erlang is not Lisp but it is very similar. Erlang is widely used in telecommunication industry.