5 ms·
Ecaml – Writing Emacs Plugins in OCaml
- bluejekyll 10y agoDoes anyone have a favorite learning OCaml resource?
- zem 10y agoreal world ocaml is pretty good: https://realworldocaml.org/ https://realworldocaml.org/ there's also a mooc that i've heard good things about: https://www.fun-mooc.fr/courses/parisdiderot/56002S02/session02/about https://www.fun-mooc.fr/courses/parisdiderot/56002S02/sessio...
- mookid11 10y agoI like: http://caml.inria.fr/pub/docs/oreilly-book http://caml.inria.fr/pub/docs/oreilly-book Real world ocaml is not so complete, and light on subjects such as C interop.
- melling 10y agohttps://github.com/melling/ComputerLanguages/blob/master/ocaml.org https://github.com/melling/ComputerLanguages/blob/master/oca...
- e_d_g_a_r 10y agoI like my blog post to get you up to speed: http://hyegar.com/2015/10/20/so-youre-learning-ocaml/ http://hyegar.com/2015/10/20/so-youre-learning-ocaml/
- padator 10y agoWhat about an Emacs-like editor fully written in OCaml: https://github.com/aryx/fork-efuns https://github.com/aryx/fork-efuns Easy to write an Emacs plugin then ...
- junke 10y agoI like both Emacs and OCaml but I can't see a case where I would want to use Ecaml. In what situation is it useful?
- cm3 10y agoIn Emacs 25 you can write native plugins loaded dynamically at runtime. With this you can do it in OCaml instead of C. Of course you can write it in anything else that will expose the right C interface.
- emidln 10y agoI suppose that begets the question, why would I write a native plugin instead of using elisp? I'm guessing the answer is so I can do some sort of background work in another thread?
- mookid11 10y agoYou can use the ocaml toolchain (for instance: ocamllex and ocamlyacc) and stop writing ad hoc parsers.
- junke 10y agoThat makes sense. Thanks.
- throwanem 10y agoThat, or for speed, or in order to take advantage of already extant library functions rather than reimplementing them in Emacs Lisp, or some combination of the above.
- qwertyuiop924 10y agoCan it be true? Can we finally write our Emacs plugins in Scheme or Common Lisp, and have them work? Wait, then we'll have 2 GCs fighting over data. Dang it. We were almost free! Seriously, though, I do have some concerns. If the new Plugin API becomes widely used enough, elisp may become a second-class citizen in the ecosystem, which would mean that emacs would no longer be easily programmable. That would be bad.
- zitterbewegung 10y agoConsidering the amount of code written out there for emacs making the original scripting language a second class citizen would be an enormous undertaking. Most other languages have taken years to convince people to upgrade (Python, Perl.. ) . I really don't think having elisp as a second class citizen would happen anytime soon.
- sn9 10y agoCouldn't you try compiling OCaml or another language to Emacs lisp bytecode [0]? [0] https://en.wikipedia.org/wiki/Emacs_Lisp#Source_code https://en.wikipedia.org/wiki/Emacs_Lisp#Source_code
- wcummings 10y agoExactly, the elisp monoculture is a feature not a bug.
- qwertyuiop924 10y agoWell, so long as extensions have to pass elisp data, it's okay-ish.