• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: October 21st, 2023

help-circle
  • the quote is arguably the most important part of lisp as it allows symbolic processing (without that macros and eval wouldn’t be a thing I reckon).

    I’ll try to provide a weird explanation. Consider this:

    five = 4

    So is this a four or a five? The value is four but it’s assigned to a symbol “five”. When dealing with values, “five + five” will be 8. However, what if I don’t care about the values (at least yet)? then I’ll be manipulating the expression in terms of the elements (symbols) themselves and not what they signify (values). At that level, we don’t even know what + means. You assume it’s a math operation because of the semantics you’ve been taught. for all we know it may be something else entirely, like a variable (did you know that some languages allow you to use chinese glyphs or norse runes for variables?).

    So quote operator tells lisp that you don’t want the “thing” to be evaluated into the value behind it. (quote five) isn’t “4”, it’s literally the symbol “five”. (quote (+ 1 2 3)) isn’t 6, it’s a list of +, 1, 2, and 3. You can eval that list so lisp executes it: (eval (quote (+ 1 2 3)). Also consider: (quote (1 + 2)) is perfectly fine, it’s just a list, but you can’t evaluate it as lisp doesn’t have a function or operator named 1 (although you may be able to define it yourself)

    It was a bit of a weird explanation but i hope it helps

    This



  • Honestly, Im in the exact same position as you. I use Clojure professionally and I think it’s a great language but for personal stuff it feels too opinionated. That’s why I kinda prefer Ruby.

    Common Lisp in my opinion is a complete dumpster of a language (and i hate the lisp-2 nature of it) but it’s sooo freeing and flexible.

    What helps me is treating CL as a “build a world” language. Whatever I need, I just make. Nothings off the table. I don’t like standard functions? I write my own versions. It’s fun

    I kinda wish Smalltalk was more text-oriented, it feels like a great “build a world” system too


  • In my experience, you don’t really need to know much elisp (if any) to be able to configure your editor unless you’re building your own plugin. Once you have a specific problem, you just Google and use Emacs internal docs.

    That said, elisp has an interesting trait: variables are dynamic by default. It’s quite different from other languages so it may be amusing to learn more about (if you do find that interesting, check out PicoLisp)





  • Nondv@alien.topBtoEmacs@communick.newsWhy emacs
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    i think the real competition here is vim.

    vscode is a user-friendly editor that you just start using as a no brainer. You unlikely to learn more as you go (maybe a couple of shortcuts). So you get what you see pretty much

    vscode is like a lego set. Emacs is more like a piece of marble. Harder to work with but has so much more potential.

    and btw, vscode is the minimalist here