I'm curious if anyone here regularly codes in a text editor they wrote themselves? I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.
Build Your Own Text Editor
111–120 of 164 posts
Re: Build Your Own Text Editor
#112Earlier quoted context omitted.
Lua is great for extensions, isn't it? I forked antizez's editor to add Lua support, and posted it here in the past: https://github.com/skx/kilua/ That works well for me, even with the minor omissions, and is well-paired with my console-based mail-client - again scripted by lua: https://github.com/lumail/lumail2/
Yes its great --a super efficient and fast little VM and comfortable syntax and scoping. I realised how great Lua is for separating user-complexity from an applications core as my customisations got more substantial.
Re: Build Your Own Text Editor
#1131000 lines of code is considered small. But check this out http://kparc.com/edit.k Under 50 lines for a text editor written in K by the language's author. Way beyond my present understanding, but the promise of very small, powerful code is incredibly attractive.
It is, but the little I've seen of K implies that it's small size comes from a combination of two things: 1) A standard library / set of operators that are a very good fit for the typical domains it works on. 2) Minimizing symbol length. E.g. I translated one example I saw into Ruby, and ended up with something of similar length once I 1) implemented equivalent methods, 2) dispensed with all idioms for how to write R…
understatement of the year.
Re: Build Your Own Text Editor
#114Nice guide, especially the terminal raw mode stuff. I haven't seen much on that before, I really appreciate that this guide goes over that. I've been messing around with a little text editor component myself in golang: https://github.com/briansteffens/tui/blob/master/editbox.go For a SQL editor project: https://github.com/briansteffens/prequel
If you are looking for an interesting project that uses terminal input modes try writing a command line utility that reads in a password correctly. (eg. Masks the password input so it does not appear on screen whilst it is being typed, prevents someone from scrolling up in terminal and copy/pasting the typed password and zeros out the password after use to prevent it being visible in process address space). It is sur…
Re: Build Your Own Text Editor
#115Here's one from the 1980s, which I still use and keep up to date: https://github.com/DigitalMars/me and translated to D: https://github.com/DigitalMars/med
Linus Torvalds also has his own version of MicroEmacs: https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git
Re: Build Your Own Text Editor
#116Reference implementations of medium sized applications are incredibly useful for leveling up as a programmer. While there are many large successful open source applications, many are overwhelming to read and learn from. Having something that outlines the key features and components and which ignores the important but complicated edge cases assists in keeping the attention focused. Now if there are annotation within t…
Do you know a good example which implements a GUI, e.g. a drawing program or a graphical editor?
It is Windows specific but very informative.
Re: Build Your Own Text Editor
#117Earlier quoted context omitted.
Yes its great --a super efficient and fast little VM and comfortable syntax and scoping. I realised how great Lua is for separating user-complexity from an applications core as my customisations got more substantial.
Over at howl.io we've been working on another Lua/moonscript based editor. Incidentally it used scintilla as well until we switched to an in-house engine called aullar. The author wrote a blog post about it: https://howl.io/blog/2016/05/26/introducing-aullar.html
Re: Build Your Own Text Editor
#118I'm curious if anyone here regularly codes in a text editor they wrote themselves? I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.
I do, sort of. I bought a text editor a number of years ago that was very popular. I still maintain it and use it daily and have often thought about putting out a new version. I have it running on many OS's and devices now. I have also added a lot of features specific to what I wanted. I'm not really sure if they are useful to others or not. Example: I have an iPad version where I can use an Apple Pencil and handwrit…
Re: Build Your Own Text Editor
#119I'm curious if anyone here regularly codes in a text editor they wrote themselves? I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.
I wrote one back in 1984-85 that I called QEdit, and have been using and updating it ever since.
Re: Build Your Own Text Editor
#120I'm curious if anyone here regularly codes in a text editor they wrote themselves? I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.