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?

  • SegFaultHell@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    Everybody learns differently, and there’s a lot of people who learn languages through advent of code. AoC can have some problems that could take literal years to solve with a naive solution, so just keep in mind you can cancel a slow function with C-g and you don’t need to reboot emacs entirely.

    The other thing to keep in mind is that this would help you learn elisp (and general lisp syntax), but won’t teach you as much about the functionality you can do with emacs. It’s still a good place to start though, since you’ll need to know elisp to customize emacs.

    Lastly I would recommend looking into Structural Editing a bit, here’s a decent article that covers the basics in vanilla emacs. This is by no means a requirement for writing elisp, but using the sexp commands makes working with all the parentheses infinitely easier.

    Good luck!

  • jfincher42@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    FWIW, I learned Rust and Python using AoC - I don’t see why you couldn’t pick up ELisp the same way. As long as you have an idea how to solve the problem, you should be able to express that algorithm in ELisp.

    The one challenge you may face is the availability of data structures in ELisp (stacks, queues, deques, etc), but I’m not an expert there, so someone else may have some pointers.

  • arthurno1@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    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?

    You could have just tried any of previous years of AOC. Just go to their webpage and start doing them.

    You can do them in both elisp or cl or any other programming language, including bf. I think elisp works rather well for AOC, but it will really depend on your skills.

    You can look on their reddit and see if you can find elisp solutions from previous years to see if anyone has done some AOC challanges in elisp.

    How you will learn elisp depends on you. If you are discussing about learning it, you ain’t learning it, you are discussing. Programming is very similar to learning a new language, playing music or learning any other new skill. Just go and do anything, and you will learn something.