5 ms·
I used it a while back in a previous incarnation of the editor. It is a "Outline Editor" for use in what is called "Literate Programming". My view of it was tha
by grok2 8y ago
I used it a while back in a previous incarnation of the editor. It is a "Outline Editor" for use in what is called "Literate Programming". My view of it was that you write documentation and embed code in the documentation and then you can use a mechanism the editor provides to output just the code (when you want to compile it or execute it). The editor made it easy to hierarchically organize and rearrange code the way you wanted it and had a way to output just the code for use in compilation etc.
The current iteration seems to have added more features while basically being a outline editor -- imagine keeping code in Emacs's Org mode and being able to compile it.
I liked it, but it felt like it didn't have all the bells-and-whistles of modern IDEs and required a different way of dealing with code.
- zokier 8y ago> imagine keeping code in Emacs's Org mode and being able to compile it. Something like this https://github.com/nakkaya/ferret https://github.com/nakkaya/ferret The whole source code is in literate form in one org file.
- keithnz 8y agowell that is very cool. Unfortunately the original HN posts title failed to mention that was meant for embedded control systems which is probablly why I missed reading it! The HN post can be found here :- https://news.ycombinator.com/item?id=14951116 https://news.ycombinator.com/item?id=14951116 and the literate source code is here ... https://github.com/nakkaya/ferret/blob/master/ferret.org https://github.com/nakkaya/ferret/blob/master/ferret.org
- grok2 8y agoNice. Someone actually used Literate programming to write something useful :-). The ferret org-mode info is very readable.
- sparkie 8y agoPerhaps the most insane example of literate programming is Axiom [https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system) https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system...], which is several books worth. It wasn't originally written in literate style, but it was a very large codebase which almost nobody understood. Tim Daly put an enormous amount of effort into making it literate, so that anybody can be introduced to it.
- eddieh 8y agoOrg supports that with Babel, right?
- grok2 8y agoDidn't know about Babel, but yes, that's about what LEO offers too.
- hsitz 8y agoAFAIK LEO is limited to Python. Orgmode supports, I believe, 50+ different languages: https://orgmode.org/worg/org-contrib/babel/languages.html https://orgmode.org/worg/org-contrib/babel/languages.html
- BeetleB 8y agoI haven't tried it, but I believe it's easy/moderate to modify Leo to support other languages. It just supports Python out of the box. Someone just has to come along and have a need for it. Apparently one can use Leo like the Jupyter notebook, and indeed Leo can interface with Jupyter notebooks. I never tried that aspect of it, though.
- PurpleRamen 8y agoWhen you speak about executing code, then yes, out of the box it's limited to python. But literate programming is not executing code, but templating text and generating output-files. Leo can do this with any language, and has syntax-support for the most important ones out of the box. Additionally it's realtive simple to extend the executing-support for any language you want. Leo is quite extendable in python.
- hsitz 8y agoOrgmode has support for both executing code and for literate programming -- incl. of course tangling and weaving -- in many, many languages.
- kaushalmodi 8y ago> imagine keeping code in Emacs's Org mode and being able to compile it. Org mode already does that using Org Babel. I use it to take "code notes" (code blocks with their evaluated/compiled outputs with notes) for Python [0], Nim[0,1], Awk [2], PlantUML[3], etc. [0]: https://scripter.co/notes/string-fns-nim-vs-python/ https://scripter.co/notes/string-fns-nim-vs-python/ [1]: https://scripter.co/notes/nim/ https://scripter.co/notes/nim/ [2]: https://scripter.co/notes/awk/ https://scripter.co/notes/awk/ [3]: https://scripter.co/notes/plantuml/ https://scripter.co/notes/plantuml/