Live data from Hacker News

Build Your Own Text Editor

viewsourcecode.org

51–60 of 164 posts

Re: Build Your Own Text Editor

#51
post #33

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.

I made significant changes to antirez's kilo editor myself, adding in support for Lua-based scripting. I use that for composing emails, again in a lua-based mail client that I wrote myself.

For coding though? I usually use emacs. It's just so damn customizable..

Re: Build Your Own Text Editor

#52
post #33

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.

I've spent enough time tweaking, extending, and rewriting emacs lisp that I sometimes feel like I wrote my own emacs.

Re: Build Your Own Text Editor

#53

Earlier quoted context omitted.

Fair enough. But where do you see multistatement lines in the link?

For example: https://github.com/martanne/vis/blob/master/buffer.c bool buffer_prepend0(Buffer buf, const char data) { return buffer_prepend(buf, data, strlen(data) + (buf->len == 0)); } Two function calls plus arithmetics plus step-return. Depending on the debugger interface(eclipse with gdb, vs, etc), one will have to press some form of Step 1 to 4 times to advance the line. Depending on the complier that was suppos…

Ok, I understand now. Thanks.

This is a pretty common way to write C, though, it's not something specific to this particular codebase. You just had a non-standard use case where you were constantly running into low-level bugs. (In an embedded platform?) If you aren't in that domain anymore, it's worth revisiting the trade-off. In most domains, gdb's continue command is super useful.

Re: Build Your Own Text Editor

#56

Reference 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?

Re: Build Your Own Text Editor

#57
post #33

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.

Regularly? No, but I got https://github.com/oconnor0/build-your-own-editor to the point that I use it for small editing tasks or occasional remote work. I have a few commits that were done entirely in it. I don't think I'd use it over vi except that I wrote it and want to use it. It also has keybindings far closer to what I'm used to in Sublime Text 3.

Re: Build Your Own Text Editor

#58

Reference 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…

https://github.com/jameysharp/corrode/blob/master/src/Langua...

Corrode is absolutely incredible. This file is literate Haskell, which means there's more documentation than code (I guess), and it transforms C into Rust.

Re: Build Your Own Text Editor

#60
post #33

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.

I made significant changes to antirez's kilo editor myself, adding in support for Lua-based scripting. I use that for composing emails, again in a lua-based mail client that I wrote myself. For coding though? I usually use emacs. It's just so damn customizable..

Why are you posting the same thing more than once?
Post reply on HN