Live data from Hacker News

Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

github.com

31–40 of 64 posts

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#33
post #25

Apart from the learning experience, there is still value in a small-sized, fast TUI text editor for Linux. However, my two suggestions would be: - add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c); - don't allocate the lines individually (as you…

As an alternative to ICU, there is suckless's libgrapheme (https://libs.suckless.org/libgrapheme/) which is more than a 100x smaller and provides full Unicode compatibility.

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#34

QB64 is an EDIT.COM-style IDE and a compiler for QuickBasic .BAS programs: https://github.com/QB64Official/qb64#usage There's a QBjs, for QuickBasic on the web. There's a QB64 vscode extension: https://github.com/QB64Official/vscode Textual has a MarkdownViewer TUI control with syntax highlighting and a file tree in a side panel like NERDtree, but not yet a markdown editor.

QuickBasic was my first programming language and EDIT.COM was my first IDE. I love going back down memory lane, thanks!

Same. `edit` to edit. These days perhaps not coincidentally I have a script called `e` for edit that opens vim: https://github.com/westurner/dotfiles/blob/develop/scripts/e

GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

gorilla.bas with dosbox in html: https://archive.org/details/GorillasQbasic

rewritten with jquery: https://github.com/theraccoonbear/BrowserGORILLAS.BAS/blob/m...

Basically the same thing but for learning, except you can't change the constants in the simulator by editing the source of the game with Ctrl-C and running it with F5:

- PHET > Projectile Data Lab https://phet.colorado.edu/en/simulations/projectile-data-lab

- sensorcraft is like minecraft but in python with pyglet for OpenGL 3D; self.add_block(), gravity, ai, circuits: https://sensorcraft.readthedocs.io/en/stable/

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#35
post #33
post #25

Apart from the learning experience, there is still value in a small-sized, fast TUI text editor for Linux. However, my two suggestions would be: - add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c); - don't allocate the lines individually (as you…

As an alternative to ICU, there is suckless's libgrapheme ( https://libs.suckless.org/libgrapheme/ ) which is more than a 100x smaller and provides full Unicode compatibility.

Heh, I maintain the MacPorts port for this lib! Like all suckless projects, it’s written in very simple and portable C which makes it a breeze to package.

https://ports.macports.org/port/libgrapheme/

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#36
post #33
post #25

Apart from the learning experience, there is still value in a small-sized, fast TUI text editor for Linux. However, my two suggestions would be: - add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c); - don't allocate the lines individually (as you…

As an alternative to ICU, there is suckless's libgrapheme ( https://libs.suckless.org/libgrapheme/ ) which is more than a 100x smaller and provides full Unicode compatibility.

Are there any similar options that handle collation and normalisation? No small Unicode library seems to implement them, unfortunately.

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#37
post #25

Apart from the learning experience, there is still value in a small-sized, fast TUI text editor for Linux. However, my two suggestions would be: - add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c); - don't allocate the lines individually (as you…

> This will speed things up and reduce fragmentation Does this really make much of a practical difference these last decades? I wrote a text editor back in the late 90s in DOS using DJGPP with per-line allocation and it worked fine on the Pentium MMX i had at the time (and my approach to optimization at that time was be ignorant of the concept :-P), i'm not sure it'd really make much of a difference on any desktop or…

No, it won't. You might want an arena for other reasons (better reasoning about lifetimes, preventing nest of pointers, etc.), but an array of line array approach to text editors is totally valid (except in the case of millions of extremely small lines).

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#38
post #25

Apart from the learning experience, there is still value in a small-sized, fast TUI text editor for Linux. However, my two suggestions would be: - add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c); - don't allocate the lines individually (as you…

Well yeah, Seph is right as usual I’ve been updating my MLIR generation code to use Twine lately: https://llvm.org/doxygen/classllvm_1_1Twine.html#details

LLVM has been using rope data structures for some time. There is more discussion about it here:

https://lists.llvm.org/pipermail/llvm-dev/2011-July/041639.h...

In my situation when parsing lines of code Twine stores the file path and concats the line number and column when getting the location within a file. It does this a lot so using Twine there really helps. The rope data structure can be used in a number of ways.

Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)

#40

Love the look, definitely throwing me back to the halcyon QBasic days. Slightly related but another way to simulate a retro text editor (old school raster style green screen aesthetic in this instance) is to combine the "cool-retro-term" terminal with the minimal editor "micro". https://github.com/Swordfish90/cool-retro-term https://github.com/zyedidia/micro

I love cool-retro-term, I keep it running with a Matrix style terminal toy as a "screensaver" on the small PC sitting on my homelab. It's an ostentatious waste of power and CPU cycles but I appreciate the aesthetics of it.

I'd kill for a way to apply CRT's filters to my vscode editor...
Post reply on HN