Martin Guy |
The good news: I've written a small, simple-to-use, powerful text
editor in Lua than runs fine in eLua. The bad news: it's ED, the standard Unix command-line text editor from the 1970s. :) https://github.com/martinwguy/lua-ed Quickstart for MMCFS-enabled boards: - copy the *.lua files to the root of an SD-card - start eLua > require "ed" > ed "/mmc/foo.lua" /mmc/foo.lua: No such file or directory *a print "Foo!" . *w *q > dofile "/mmc/foo.lua" Foo! > Suggestions for more idiomatic Lua style would be welcome, for better module-building primities. Oh, and bugs and fixes of course Enjoy! M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Very cool :-)
I think I had joked either on the list here or with Bogdan or Dado about doing an ed implementation at some point, since it should be quite tiny. I see from your docs it passes the GNU ed test suite and it has search and replace! For those unfamiliar with ed: http://www.gnu.org/fun/jokes/ed.msg.html And now I'll actually have to learn the commands for it since I'll have to admit my interactions with ed have pretty much gone along the lines of the above link's "typical novice's session with the mighty ed" -jsnyder On Tue, Apr 12, 2011 at 1:37 PM, Martin Guy <[hidden email]> wrote: > The good news: I've written a small, simple-to-use, powerful text > editor in Lua than runs fine in eLua. > The bad news: it's ED, the standard Unix command-line text editor from > the 1970s. :) > https://github.com/martinwguy/lua-ed > > Quickstart for MMCFS-enabled boards: > - copy the *.lua files to the root of an SD-card > - start eLua >> require "ed" >> ed "/mmc/foo.lua" > /mmc/foo.lua: No such file or directory > *a > print "Foo!" > . > *w > *q >> dofile "/mmc/foo.lua" > Foo! >> > > Suggestions for more idiomatic Lua style would be welcome, for better > module-building primities. > Oh, and bugs and fixes of course > > Enjoy! > > M > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by Martin Guy
On Tue, Apr 12, 2011 at 9:37 PM, Martin Guy <[hidden email]> wrote:
The good news: I've written a small, simple-to-use, powerful text You, sir, are my new hero. This is the stuff "cool" is made of. Many thanks! We have to link this from our wiki.
Best, Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Sergio Sorrenti |
Martin is too modest to say he did it in 4 nights only!
Of course Nights to hack are more longer than daytime :D Sergio
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Martin Guy |
In reply to this post by jbsnyder
On 12 April 2011 21:26, James Snyder <[hidden email]> wrote:
> it has search and replace! ...using Lua patterns, exactly those used by string.gsub(), as powerful as standard regex but with a slightly different syntax. So it also encourages you to learn Lua patterns in detail... M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Jonathan Hill |
In reply to this post by Martin Guy
Thank you Martin. Thank you for not throwing together "yet another text
editor," with an entirely new set of quirky commands. Also, thank you so much for not picking teco . BTW, somehow I inherited Unix manuals from 1982 and 1989 and haven't managed to throw them out yet. :-) Jonathan On 4/12/2011 2:37 PM, Martin Guy wrote: > The good news: I've written a small, simple-to-use, powerful text > editor in Lua than runs fine in eLua. > The bad news: it's ED, the standard Unix command-line text editor from > the 1970s. :) > https://github.com/martinwguy/lua-ed > > Quickstart for MMCFS-enabled boards: > - copy the *.lua files to the root of an SD-card > - start eLua >> require "ed" >> ed "/mmc/foo.lua" > /mmc/foo.lua: No such file or directory > *a > print "Foo!" > . > *w > *q >> dofile "/mmc/foo.lua" > Foo! > Suggestions for more idiomatic Lua style would be welcome, for better > module-building primities. > Oh, and bugs and fixes of course > > Enjoy! > > M > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |