Ptext: A Nano-like text editor built with pure C
github.com
github.com
So yeah, that is indeed a working text editor that doesn't link against ncurses and the like. Smaller than I would have expected it to be.
Pure UNIX/POSIX C, more likely.
Thus pure C, by definition is what the said standard since 1989 says what the programming language and standard library is supposed to be.
Objectively we have a clickbait title.
They are third party libraries, outside the language reference.
Pure C surely just means you're only using C. As in, no C++ or Objective C or whatnot. Nothing wrong with calling out to POSIX functions, at least nothing not already obvious.
This "pure c" won't compile with any random C compiler, unless it happens to be a C compiler in a POSIX environment.
So that term isn't very meaningful in the way you claim it is, and there is no need for you to be policing it. If it was about "dependency free" could maybe agree more.
The term is often used to indicate that the source code of the project itself does't make significant use of other languages like C++, and to allude to a sense of simplicity (which is often subjective).
This is HN, we police articles after all.
Very nice project, well organized, with a terse style. Comments are missing but not necessary.
I thought something like that must exist, but I haven’t found it yet…
But xterm is,way rich, it supports esoteric advanced stuff like sixels, etc. For a basic text editor, without split windows, colors, and such, a subset of VT-52 capabilities may suffice.
It is of course depends with what you compare but still it was shockingly bigger then I was prepared/wanted to see
To be fair, it also has more features than I expected, e.g. syntax highlighting. And I’m sure it runs on an obscene number of platforms.
I am not arguing nano is pinnacle of minimalism, but it is not like it's 3MB of C code.
-Y none
or:
—-syntax=none
There’s something really cool about Nano. It’s almost everywhere, it’s super simple, but doesn’t have bonkers key combos like vi and emacs.
Apple is weird about nano. By default, it uses Pico when you try to use nano, which is the text editor that nano is based off of. It seems to be because of concerns over the GPLv3, but the switch isn't made clear to the user, which is pretty deceptive.
H: prints Hello, World!
Q: prints the program's source text
9: prints the lyrics to 99 Bottles of Beer on the Wall
E: behaves like a nano-like text editor
+: increments the accumulator
A transparent preprocessor can of course be used to add the necessary "E" to the empty source as part of the build step.