I’m a “Neovim Refugee” trying to get a deeper/better understanding of how emacs lisp works and how i can use it to expand on my emacs setup. I have never done anything in lisp before and still struggle to understand how single quotes signify a function or what ever.

With that said, i was also planning on doing AoC this year. Originally i wanted to look into zig or go, but now think that this might be the opportunity to dive into lisp for a bit.

But with knowing basically nothing: Is this even “viable”, or advisable? Should i be looking at common lisp instead? Or would you say that’s a pretty dumb idea and i should rather learn it in a different way?

  • nv-elisp@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I have never done anything in lisp before

    Emacs has a built-in emacs lisp tutorial. That would be a good starting place.

    struggle to understand how single quotes signify a function or what ever

    Not exactly sure what you mean by that. Again, I recommend the manual, but you can think of quoting as a way to tell the interpreter “don’t evaluate this”.

    e.g.

    (prin1 (+ 1 1)) ; (+ 1 1) is evaluated, prints 2
    (prin1 '(+ 1 1)) ; prints the literal list (+ 1 1)
    

    There is also backquoting, which I recommend reading up on, too. The syntax and rules are simple, but powerful.

    Is this even “viable”, or advisable?

    Try it out. At worst you’ll learn something. Fretting about whether or not to give it a shot is a waste of time. I’m sure you can find previous problems and solutions in a lisp.

    Should i be looking at common lisp instead?

    Do a few problems in elisp, a few in Common Lisp.

    Or would you say that’s a pretty dumb idea and i should rather learn it in a different way?

    The only foolish idea is to spend time debating about whether or not to try learning something. No one can make that call for you. Try it and see if you like it.