Lurker News

Comments (256) 54 threads

joan_kode5 replies#
Looking at the screenshot in full size [1], it looks really cool but the text is visibly blurry (look at the = signs for example). Text rendering is hard, and especially for a text editor it's a good idea to just use the current platform's text rendering instead of rolling your own. Of course SDL "rolls its own" because it focuses on being exactly the same on every platform.

SDL seems to offer font hinting which would somewhat solve the immediate problem, but I'm not sure it's being used properly here. With that said, text rendering is optimized for the current device's DPI, so maybe I'm just reading too much into a screenshot taken at a different DPI.
[1] https://user-images.githubusercontent.com/3920290/81471642-6...

metalliqaz1 reply#
That could possibly be a result of the image compression as well, no?
rubber_duck1 reply#
Shouldn't PNG be lossless by default ? (you could do some lossy pass to optimise but in that case you're probably better off using JPEG ?)
SahAssar3 replies#
Sites like github often "optimize" images to lower bandwidth costs. Basically any platform you share images on that is at scale will probably re-compress images. For PNG they often reencode the image in a lossy way.

Continue this thread — 3 replies

phrz#
If you compare the SDL-rendered text to the window chrome (OS-rendered), they appear to be similar. It just looks like this is a screenshot of a low DPI display. Nonetheless, peeking at the repo's issues shows that high DPI displays haven't quite been figured out either:

https://github.com/rxi/lite/issues/46

c-smile4 replies#
Yes, the rendering implementation uses gray-scale antialiasing.

But system uses ClearType - compare rendering in window caption (rendered by Windows) and the text inside client area.
Gray-scale may work on high-DPI monitors, but on typical monitors it will be blurry.
But Apple and Microsoft still use ClearType even on high-dpi monitors.
For that matter, Sublime Text, that uses similar architecture (but Python instead of Lua), uses ClearType.

c-smile#
Yet, there is no support (yet?) for RTL languages.
pvg#
I don't think Apple uses ClearType and OS X defaults to no AA on retina displays.
c-smile#
Mea culpa, thanks.
allenbrunson2 replies#
well, apple certainly de-emphasized subpixel antialiasing.

i am still using a non-retina monitor for all of my day-to-day work. when i first installed mojave, it made my display look so bad that it gave me headaches. so i wiped my mac entirely and re-installed the previous version of macos. later, i learned that subpixel anti-aliasing is still there, it just takes some fiddling to get it back.
https://www.howtogeek.com/358596/how-to-fix-blurry-fonts-on-...
eventually, i will have to get with the program and buy a retina display. but i am thankful for this loophole that allowed me to put it off for awhile.

Continue this thread — 2 replies

chrisseaton#
> But Apple and Microsoft still use ClearType even on high-dpi monitors.

This isn't true.

seddin#
I have just downloaded it too and witnessed this issue, the text looks weird, like a little bit blurry, it would be perfect if it looked like on Sublime Text 3 or on this image https://i.ibb.co/qYCpx3x/1588859182372.gif
compressedgas#
SDL has hinting because it uses freetype. But this program doesn't use that. It uses stb_truetype which does not support hinting.
akavel6 replies#
If you are interested in small Lua-based text editors, I advise you to take a look at Textadept: https://foicica.com/textadept/ . Specifically as to minimalism: "Relentlessly optimized for speed and minimalism over the years, the editor consists of less than 2000 lines of C code and less than 4000 lines of Lua code." I believe this is a limit that the editor's author self-imposed and keeps to it with an impressive strictness.

edit: though it uses Scintilla for the "engine" and I would assume its LOC count is not counted towards this limit.

bachmeier#
Textadept is also very extensible with little effort.
stevekemp1 reply#
I forked that to add support for Lua-based scripting, multiple buffers, etc. Fun exercise:

https://github.com/skx/kilua

akritrime1 reply#
Hunter x hunter reference?

Continue this thread — 1 reply

kingosticks1 reply#
texadept is great, it can handle really large files where most other editors crash/die.
canada_dry1 reply#
Just tested that premise with a 300MB text file... Kate loaded it no problem in about 3secs... textadept didn't load the file, gave an error.

From textadepts FAQ:
Q: Why can’t Textadept handle HUGE files very well?
A: Textadept is an editor for programmers. It is unlikely a programmer would be editing a gigantic log file. There are other tools for that case.

kingosticks#
I can't speak to the FAQ, I guess by 'gigantic' they mean tens of GBs. I use it for what i consider large files all the time, I just opened a 2GB file to check I am not going mad and it worked just fine. It took around 10 seconds to open so I agree it's not the quickest to start but at least it does. I'm running Textadept 10.7 on a decent Linux machine.
clnhlzmn#
Textadept is great. It's my daily driver. That's mostly because I was looking for something lightweight that I could configure to operate similarly on windows and mac.
malkia#
Also "zile"
rk06#
Text adept lacks a "folder view". if it were not for it. and "open folder".

For now, lite also lacks "open folder", but it shows tree view of current directory atleast

Semaphor2 replies#
It seems a lot faster than most.

But what it still doesn’t replace is my favorite editor EmEditor [0] (Windows only). Like every alternative I’ve checked out, Lite blocks for a long time when opening a multi-gb file. They aren’t FOSS and probably more expensive than any other text editor, but I’d love to know what they do to have such superior large file performance (the free version is fast, the paid version even supports streaming-loading of parts of the file).
[0]: https://www.emeditor.com/

einpoklum#
That's only because it doesn't do what editors have to do. Try writing some right-to-left text in lite and see what happens.
ryenus#
Wow, thank you for mentioning EmEditor, I used to keep it as a must-have app when used Windows, preferred it over UltraEdit, EditPlus etc, good memories. Nowadays it's all vscode though.
rfeague3 replies#
Since there are a lot of text editors, I'd like to see more detail on the motivations for yet another one. How does this compare to the current top-five open source editors?
bachmeier#
And Textadept, which is also written in Lua.
david_draco2 replies#
What would you say are top open source editors one would consider, and by what criteria should one benchmark the comparison?

While subjective criteria are perhaps most important (usability, integration with favorite programming language, extensibility), for technical quality perhaps there can be some meaningful numerical benchmarks. For example, the lag and memory use when opening a many-GB text file and editing the middle of it with syntax highlighting.
Supposedly editors using ropes are good at this.

jackhalford2 replies#
how are "usability, integration with favorite programming language, extensibility" subjective? these all seem like very objective features.
janderland6 replies#
They are subjective in the degree to which they are measurable. How would you measure how well a text editor “integrates with a programming language”? There are many ways to measure this, making any single measurement choice subjective to a degree.

Continue this thread — 6 replies

akho#
Usability is only objective if you use the word in a dictionary sense: "it is possible to use this editor". It is very much subjective in its usual use: how easily it can be used by a certain user to do certain things. Say, to me a text editor without Vim key bindings is not usable. To someone else, Ctrl-C / Ctrl-V bindings may be preferable. 'Usable code editor' and 'usable screenplay editor' are completely different categories, even though both are text editors.

Different approaches to extensibility can exist, all of them good in certain areas. Both Emacs and VS Code are extensible; which approach is better? You'll find different opinions.
You'll need, as a minimum, to specify a language to move "integration with favorite programming language" towards objectivity.

stOneskull2 replies#
Personally, I'm thinking of its comparison to Geany. A wonderful editor but I have a feeling the first difference is it's going to seem real bloated. Time to see.
alcover#
Geany is lean and fast but has some warts.

I.e. side-panel is too large, find+replace menu is modal and confusing.

zoom6628#
Second that about Geany. Wonderful editor that i have been using for years - anytime find a new system or need to have 1 editor that will handle any type of file in a civilised manner, then my first install is Geany.

That said looking at the author's main.c this looks really nice as a shell for anyone looking to create a tool with lua scripting. Im going to download and study this one!

vijaybritto10 replies#
The resident memory was 10MB in my windows machine when I ran this. A strong reason for me to use this would be in a low powered device. I want to write markdown in a tiny editor like this. I want to run multiple projects side by side and this is good for that. If I'm a beginner trying do dev on a machine lower than 4G of RAM. So many more examples come to my mind. I'm pretty sure there are more

Also the immediate UI library from the same author is very good and the examples are amazing.
1. https://github.com/rxi/microui
2. https://floooh.github.io/sokol-html5/index.html

Continue this thread — 10 replies

Load more comments