News for hackers. Stuff that matters.
Re:Ask HN: Which Lisp should I learn? by timonoko on Sunday November 01, 2020 @03:49AM (#24958120)
Emacs and elisp is the only sensible choice, because gained knowledge will not be wasted.

Lisp is not fun general purpose programming language and tiny examples teach you nothing. Only when you are confronted with huge datasets and enormous problems you might appreciate freedom of expression in Clojure vs Javascript.

Re:Ask HN: Which Lisp should I learn? by Jtsummers on Sunday November 01, 2020 @04:24AM (#24958275)
While I agree that elisp is a very practical choice, the three main other lisps out there today are general purpose languages. Common Lisp, Clojure, and Scheme are all general purpose languages.
Re:Ask HN: Which Lisp should I learn? by timonoko on Sunday November 01, 2020 @04:42AM (#24958350)
Yes yes but they are not "fun". Like Python is.

Clojure is especially messy piece of spaghetti code, if you are not already familiar with the underlying engine.

Commonlisp is just ugly with very annoying error processing (how do I get out of here (I made recursive error (while trying to exit from error (what (is (this (shit))))))))).

Scheme is for academics, full of weird stuff, like (local ..), which I am not gonna learn ever.

Re:Ask HN: Which Lisp should I learn? by Jtsummers on Sunday November 01, 2020 @01:33PM (#24961418)
"Fun" is way too subjective to use as a differentiator here. There are some languages most people would consider "not fun", at least outside the puzzle sense like "Can I make a Ruby on Rails clone in Cobol?" And there are some languages that most people would consider more "fun" for some specific thing, like Processing is "fun" for the ease of getting graphical and interactive results. I'd say that Racket is at least as fun as Python given the readily available graphical and network libraries. Common Lisp, for me, is as fun as Python but requires a bit more work. And I can't comment on Clojure's "funness" because I haven't used it extensively, but with its Java interop it has access to a lot of things that should put it on par with Python. Here I'm equating "fun" with relative ease of entry + ease of accomplishing more complex tasks (like GUI building, or making a basic interactive web app) + relative simplicity/consistency of the language. What's your definition of "fun"?

I find it puzzling that you describe Clojure as spaghetti code because I have literally no idea what you mean with that statement. Spaghetti code, in programming, has a rather specific meaning that I cannot conceive of applying to Clojure. Namely: spaghetti code = unstructured code that abuses goto/jumps or their equivalents. So that sentence makes zero sense as presently written.

Re:Ask HN: Which Lisp should I learn? by timonoko on Sunday November 01, 2020 @02:54PM (#24961995)
Programming system is "fun" when you do not have to read stupid manuals ever and error reporting system tells you what you should do. I do not remember ever reading anything about python.

Clojure is the most unfun lisp indeed, unless you know java.

    Clojure 1.9.0                                                               
    user=> (+ 'a 1)                                                             
    ClassCastException class clojure.lang.Symbol cannot be cast to              
    class java.lang.Number (clojure.lang.Symbol is in unnamed module            
    of loader 'app'; java.lang.Number is in module java.base of                 
    loader 'bootstrap')  clojure.lang.Numbers.add (Numbers.java:128)
Re:Ask HN: Which Lisp should I learn? by Jtsummers on Sunday November 01, 2020 @02:58PM (#24962029)
I am impressed that you were born with the knowledge of Python embedded in your brain.
Re:Ask HN: Which Lisp should I learn? by mod on Sunday November 01, 2020 @03:54PM (#24962432)
Since you've taken the worst possible interpretation of his comment: He's saying that clojure errors are not user-friendly and give you little idea how to implement a fix.

I agree with him, and I have spent a lot of time scratching my head debugging clojure.

Python gives a better idea of what's wrong, where it's wrong, and what a fix might be.

Here's roughly his example, but in python:

    >>> "a" + 2

    Traceback (most recent call last):

       File "<stdin>", line 1, in <module>

    TypeError: cannot concatenate 'str' and 'int' objects
Re:Ask HN: Which Lisp should I learn? by lispm on Monday November 02, 2020 @05:31AM (#24966515)
in the Lisp I'm using I get this:

    CL-USER 24 > (+ "a" 1)

    Error: In + of ("a" 1) arguments should be of type NUMBER.
      1 (continue) Return a value to use.
      2 Supply a new first argument.
      3 (abort) Return to top loop level 0.

    Type :b for backtrace or :c <option number> to proceed.
    Type :bug-form "<subject>" for a bug report template or :? for other options.

    CL-USER 25 : 1 > 
There is a clear error message and direct ways to fix/report the problem. Including another REPL to investigate the error.
Re:Ask HN: Which Lisp should I learn? by timonoko on Monday November 02, 2020 @06:51AM (#24967058)
CL Loop-macro error reporting is legendary:

    [1]> (loop until sun dies and moon explodes)
    *** - LOOP: illegal syntax near DIES in
        (LOOP UNTIL SUN DIES AND MOON EXPLODES)
    The following restarts are available:
    ABORT          :R1      Abort main loop
Re:Ask HN: Which Lisp should I learn? by lispm on Monday November 02, 2020 @11:56AM (#24970207)
Python is most advanced:

    >>> [if dark then moon else sun]
      File "<stdin>", line 1
        [if dark then moon else sun]
          ^
     SyntaxError: invalid syntax