Follow

Started working on a really crappy text editor! ✊

· · Web · 7 · 8 · 46

Let's build a graphical text editor in in a thousand lines of C89.

I can finally edit the program source with the program itself, it's hard as heck to read but it works 👍

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 this makes me want to port the mr. saturn font to the 9front font format

@neauoire it's not crappy unless it becomes emacs. (I'm going to log out now and wait for the hate to flow)

@neauoire amazing. I’m thinking this font should be read in super low pitch.

@neauoire At first I thought the bottom right video feed was you using the text editor

"turn it uup! to select text" :blobcatlul:

@neauoire Very cool, but genuine question: is it just me, or is the font difficult to read? My eyes need a few seconds to parse the mass of pixels into text. Is it just something you get used to?

@nothien yeah it's a bit too dense, I might make the uppercase one pixel less tall. I'll see what I can do :)

@neauoire Nice! Got any cool visual editing ideas stewing, given that you're already in SDL?

@neauoire is that video of you editing the source for the editor? If so that's metal! Editor looks great. Love the aesthetic.

@neauoire You have all the pieces to do a PICO-8 like fantasy dark console

@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 this looks gorgeous!

tbh, after using acme as my main editor for 2 months now i'm pretty surprised at how little i miss syntax highlighting! but it could v well be more useful for different minds and use cases

@dogstar I know the feeling, but if your font sucks AND you don't have syntax highlight.. you're in trouble. So I'll try to improve the font a bit and so some sort of syntax blocking to give myself a chance..

@neauoire oh that's a good call, i hadn't thought about that! if the font is difficult/ambiguous it could be a lot more useful

@dogstar @neauoire I feel like I NEED to have syntax highlighting, idk why but I just prefer syntax highlighting.
I was weirded out when trying 9front on my spare laptop lmao

@matthilde @neauoire that's fair! i've always felt similarly, but decided to see how my brain handled not having it, and it's been pretty ok :)

@dogstar @matthilde I got used to not having it with acme, after a while I thought why do we even need it at all?

But it's a mixture of many things, in acme you don't look for things as much as you click commands that jumps you to where you wanna go.

@dogstar @matthilde also, tab size of less than 4 without synthax highlight is unreadable.

@dogstar @neauoire @matthilde Agreed, a rainbow-colored source code is hard to read but I would prefer comments and strings/numbers to be distinguishable from the rest of the text.

@wiecek I mean, yeah.
Yea just numbers, strings and comments should be far enough.

@neauoire I don't know if syntax highlighting is the resolution here! 🤔

@devurandom It probably could be but I don't know if I have it in me to make the tilesize flexible, we'll see.

@neauoire also, i wonder: what do these icons on the bottom mean?

@devurandom nothing, they're the camera options for Moogle, they're just a placeholder at the moment until I start working on the nav tools.

@neauoire cool... some of these look like sitelen pona characters.

@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.

Sign in to participate in the conversation
Merveilles

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.