4 ms·
Janet is really powerful. Here's a small TUI text editor I'm writing in it, if you want to see a non-trivial example: https://www.github.com/CFiggers/joule-edit
by cfiggers 4y ago
Janet is really powerful. Here's a small TUI text editor I'm writing in it, if you want to see a non-trivial example: https://www.github.com/CFiggers/joule-editor https://www.github.com/CFiggers/joule-editor
- BWStearns 4y agoThought the link was broke but GH looks broken now? Edit: Back up now
- DennisP 4y agoOoh, nice. I've been messing around with a weird text editor that started with that same tutorial, but in Nim. Janet is intriguing, I'll be digging into your code. How was the debugging experience?
- cfiggers 4y ago> I'll be digging into your code. My apologies in advance, then! (Ha.) The "main" function is at the very bottom of src/joule.janet. So I'd recommend starting there. As for debugging, Janet embraces REPL-driven development, so the debugging experience is all about setting up, interactively querying, and step-wise updating your program's state, live in memory, using the REPL. It's quite a bit different from a lot of languages—not better, intrinsically, just different. But I like it a lot. Is your Nim editor public anywhere? I've heard a lot of good things about Nim and wouldn't mind exploring a real-world example.
- DennisP 4y agoThanks :) Mine's not public yet, so far it barely does anything. I'm using a piece table and some other stuff that ended up being tricky to get right (hence my debugging question!), then I ended up taking a break. I haven't done much REPL-based work, maybe that would have sped things up. Maybe I should start looking at that again.