Started working on a really crappy text editor! ✊
SIHPTI
Let's build a graphical text editor in in a thousand lines of C89.
Mouse selection + insert mode.
I can finally edit the program source with the program itself, it's hard as heck to read but it works 👍
Becoming less crappy by the hour.
Kindda wanna do some syntax highlight or something to help with readability.
I kindda like this very naive 1 line syntax highlight solution haha.

Implemented proper mouse picking, that was like.. PULLING TEETH.

@neauoire can I get an ID on that track?
@wizard Sorry I don't have it, i'm just listening to a livestream.
@neauoire to be honest, when you posted the first screenshot of this, i thought it would be a C remake of left, but it now seems to be its own thing lol
@ulhar that's where I'm going, but to get there I have to do a whole bunch of other stuff first.
@neauoire next you know it will be intellesense! :) But, syntax highlighting is pretty great.
@neauoire interesting that you start line numbering at zero; I think it's more common for stack traces to count from one.
@technomancy Oh that's a good point, I haven't really given much thought to the line count thing, I'll start it at one, thanks :)
@neauoire you know when vim and emacs both agree to do something the same way there's probably a reason for it =)
@technomancy to be honest, I always have the linecount hidden in Micro. I usually just navigate to the errors by goto line, I'm glad you pointed this out.

@neauoire yeah, I usually lean on the command too. I love the look of the font you're using btw.

I've written one and a half text editors now; the one that's actually usable is 1.7kloc of Fennel. (with coloring, auto-completion, window splits, repls, etc so pretty different from what you're doing)

@technomancy well, if you ever have any other lessons-learnt to give me while I make this usable for myself, I want it :D
@neauoire unfortunately I think most of my lessons learned are not very applicable in a language that doesn't have data structures and closures, because it's mostly "structure your command interaction in terms of data structures that contain closures" =)
@technomancy ah yeah, that's right, I went down that road building the Ronin editor a few years ago.
@neauoire right I mean at some point you're not so much building a text editor as an interactive command framework that lets you attach lambdas to keystrokes
@neauoire I don't know if syntax highlighting is the resolution here! 🤔

@neauoire What is your preferred way to receive patches :) Here's a screenshot using GNU Unifont (http://unifoundry.com/unifont/index.html)

In addition to looking better to my eyes, Unifont supports the first 64K codepoints of Unicode, so gives us some accessibility benefits at low cost/complexity.

Thank you for getting me into SDL programming! This experience has me wondering if I should give up on Mu :)

GNU Unifont Glyphs

GNU Unifont free software utilities

@akkartik don't give up on Mu..

Just send me the font chr file :)

@neauoire @akkartik Seconded, don't give up on Mu.

Even if Mu never manages to become something usable & accessable for everyone, it'll certainly help educate & aid bootstrappable builds efforts. Never underestimate the value of that!

@neauoire It's not quite that simple, unfortunately. The font is 8px wide but 16px tall.
@akkartik Oh.. huh, yeah. I'm not going to merge that at this moment. Hold on to this for now :)

@neauoire Yeah, I wasn't expect it to be merged, only wanted to share it. Hold on, let me just put it up somewhere: https://git.sr.ht/~akkartik/left/log

Though there _are_ a couple of minor commits that you might be interested in copying over (or correcting any misconceptions on my part):

https://git.sr.ht/~akkartik/left/commit/6c5234d9093b3

https://git.sr.ht/~akkartik/left/commit/b7ded9f86c534

~akkartik/left: master - sourcehut git

@akkartik thanks :) That might be something to implement at some point.
@neauoire is that video of you editing the source for the editor? If so that's metal! Editor looks great. Love the aesthetic.
@xinniw yeah haha, the editor is these 400 lines of C89.
@neauoire You have all the pieces to do a PICO-8 like fantasy dark console
@mario_afk missing the sound engine stuff, I'll get there.
@neauoire Nice! Got any cool visual editing ideas stewing, given that you're already in SDL?