Re:Learn Emacs Lisp in 15 Minutes (2013)
by elwell on Thursday November 12, 2015 @04:07PM
(#10556137)
FTFY: Learn Emacs Lisp Syntax in 15 Minutes
Lisp syntax is simple; the learning curve is in the difference of technique. I'm assuming the learner is coming from an imperative language background.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by chriswarbo on Thursday November 12, 2015 @06:57PM
(#10557094)
> I'm assuming the learner is coming from an imperative language background.
Well, Emacs Lisp is pretty imperative: it doesn't optimise tail calls, so loops are often needed; its distinct namespaces/special-forms for functions and "values" (which includes anonymous functions) makes functional style less attractive in some situations; many tasks are achieved through destructive update of (often temporary) buffers; Emacs itself is controlled by mutating dynamic or global variables; etc.
I would say Emacs Lisp is much closer to imperative languages like Python, than it is to syntactically-similar languages like Scheme, for example.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by lispm on Friday November 13, 2015 @03:34AM
(#10558644)
> so loops are often needed
I'm a Lisp user and have learned and used Scheme in projects.
I strongly prefer loops over tail recursive iteration. I also prefer higher-order functions like map/reduce/filter/... over tail recursive explicit variants.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by kleiba on Thursday November 12, 2015 @05:22PM
(#10556575)
Agreed. In Emacs hacking -- which presumably is what most people would want to use Elisp for -- the syntax is typically not the problem. Knowing how to interact with Emacs' libraries and its way of doing things is much more intricate. At least once you go beyond smaller aux functions and such.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by agumonkey on Friday November 13, 2015 @12:02AM
(#10558105)
True, and emacs is quite a large thing, with API from IPC to URL, XML, binary parsing, text rendering, non overlapping window management, etc etc. That's from vanilla distribution, then there's user made packages and since it's a lisp ... So RTFM hard, or read existing code hard or harass #emacs hard (non exclusive choices).
Re:Learn Emacs Lisp in 15 Minutes (2013)
by thinkling on Thursday November 12, 2015 @04:40PM
(#10556343)
I'd love to see this extended to cover the basics of customizing emacs, especially the structures and techniques involved in modes and mode customization.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by Amorymeltzer on Thursday November 12, 2015 @01:59PM
(#10555309)
The whole http://learnxinyminutes.com/ site is pretty excellent. There's some variability here and there - I think python spends too much time on numbers? - but if you're looking to get your feet wet before hacking about, it's a good resource.
Re:Learn Emacs Lisp in 15 Minutes (2013)
by sundarurfriend on Friday November 13, 2015 @02:16AM
(#10558413)
If the Neovim hadn't existed by now, this would quite probably have convinced me to switch to Emacs. A sane, and actually elegant, programming language to interact with my editor? Gasp!
Re:Learn Emacs Lisp in 15 Minutes (2013)
by ef4 on Friday November 13, 2015 @12:02AM
(#10558106)
I think the biggest gotcha for people used to other mainstream languages is the dynamically-scoped variables. Watch out for those. Especially when you think you're closing over them.
Lisp syntax is simple; the learning curve is in the difference of technique. I'm assuming the learner is coming from an imperative language background.
Well, Emacs Lisp is pretty imperative: it doesn't optimise tail calls, so loops are often needed; its distinct namespaces/special-forms for functions and "values" (which includes anonymous functions) makes functional style less attractive in some situations; many tasks are achieved through destructive update of (often temporary) buffers; Emacs itself is controlled by mutating dynamic or global variables; etc.
I would say Emacs Lisp is much closer to imperative languages like Python, than it is to syntactically-similar languages like Scheme, for example.
I'm a Lisp user and have learned and used Scheme in projects.
I strongly prefer loops over tail recursive iteration. I also prefer higher-order functions like map/reduce/filter/... over tail recursive explicit variants.
Here's a great website: https://www.masteringemacs.org
You're right though, a basic "bootstrap your .emacs" tutorial would be very helpful.