
Show HN: Lite – A small, fast text editor - rxi
https://github.com/rxi/lite
======
joan_kode
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...](https://user-
images.githubusercontent.com/3920290/81471642-6c165880-91ea-11ea-8cd1-fae7ae8f0bc4.png)

~~~
c-smile
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.

~~~
ubercow13
Apple removed all subpixel antialiasing on Mojave [1] and on Windows it isn't
used for any 'modern' app using UWP onwards afaik

[1]
[https://arstechnica.com/features/2018/09/macos-10-14-mojave-...](https://arstechnica.com/features/2018/09/macos-10-14-mojave-
the-ars-technica-review/12/)

~~~
allenbrunson
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-...](https://www.howtogeek.com/358596/how-to-fix-blurry-fonts-on-macos-
mojave-with-subpixel-antialiasing/)

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.

~~~
macintux
I just purchased an HP Z27 (4K 27”) because I couldn’t deal with the low-res
monitors I had at home. The high quality monitors in my office had really
spoiled me.

I’m so glad I did. Night and day difference.

~~~
z3t4
It has become a challange to have a sane default for text rendering. Many
users are still on really bad LCD monitors with low contrast. Macbooks also
does 2x scaling. On a 4k monitor on PC i recommend fractional scaling eg 1.5
but as an app dev you cant control that. So do you increase text size to make
up for the small pixels, or do you leave that up to the user.

------
akavel
If you are interested in small Lua-based text editors, I advise you to take a
look at Textadept:
[https://foicica.com/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.

~~~
p4bl0
You might also be interested in kilo:
[https://github.com/antirez/kilo](https://github.com/antirez/kilo)

~~~
stevekemp
I forked that to add support for Lua-based scripting, multiple buffers, etc.
Fun exercise:

[https://github.com/skx/kilua](https://github.com/skx/kilua)

~~~
akritrime
Hunter x hunter reference?

~~~
stevekemp
No, it was just the obvious "kilo" to "ki-lua" transformation!

------
Semaphor
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/](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.

------
rfeague
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?

~~~
vijaybritto
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](https://github.com/rxi/microui)

2\. [https://floooh.github.io/sokol-
html5/index.html](https://floooh.github.io/sokol-html5/index.html)

~~~
stephen82
On my GNU / Debian testing 64-bit, with 10 tabs opened it consumed 31 MiB of
RAM and my CPU pushed itself to reach 0.75% at its busiest processing during
typing.

To me this is simply mind-blowing.

~~~
alcover
Not as mind-blowing as SublimeText leaking 3 solid GB of RAM after a few days
on my Debian..

~~~
vijaybritto
Its always the extensions. Not sublime itself. That has been my experience so
far

------
urlwolf
Typing latency as measured by typometer is quite high on kwin (no
compositing). Both kate and Howl do much better. And pycharm. Great start, but
it's not defeating vscode in the one aspect I care about: typing latency.

Kate is a surprisingly good/fast editor nowadays.

~~~
jonahbenton
Long time Kate user, though I dropped KDE years back in favor of Fedora XFCE.
If one isn't in KDE world, Kate's paint latency when alt-tabbing back to a
Kate window is incredibly, painfully slow.

------
mythz
Was a bit skeptical, but this is surprisingly fast & lite & supports multi-tab
+ tree view + syntax highlighting in a 1mb download. I've not seen any of the
reported issues with the font which looks clean & crisp (on Win 10).

I'm not expecting it to have any of the features I'm used to with VS Code or
JetBrains products, but it's definitely going to replace notepad.exe for a
fast look at any text file.

Supports `lite <path>` to open any file/folder, e.g. `lite .` opens up the
current folder in a tree view with beautiful dark mode by default, single
click on each file loads it instantly. Seeing beautiful, matte-style syntax
highlighting for all popular formats I've tried: .html, .css, .js, .md.

Perfect minimal distraction-free editor for writing docs.

------
GordonS
Firstly, let me say that I'm in no way hating on Lite, these are just some
fact-based observations.

Thought I'd give this a quick try on my Windows machines, where my liteweight
editor of choice is Notepad3.

A fresh start of Lite uses 10MB of memory, vs 3MB for Notepad3.

After opening a 27.5MB text file in each, Lite used 156MB of memory, vs 68 for
Notepad3.

The functionality available in Notepad3 is also vastly superior. Lite is
pretty spartan - it doesn't even appear to have a file/directory selection
dialog to open files/folders with. I really like the default colour
scheme/theme Lite ships with though.

~~~
userbinator
Lite has a slightly smaller binary, however; but as someone whose regular text
editor on Windows is notepad (the stock one, which is <100KB), I still find
the fact that a text editor's binary is >1MB rather disappointing.

I do realise that both Lite and Notepad3 are significantly more featureful,
but I'm not sure if the increase in resource consumption is proportional.

(For comparison, regular notepad uses <1MB of memory when holding nothing, and
I don't have a 27.5MB text file to test with, but a 6.5MB one takes 17MB when
loaded. In other words, the expansion factor is close to Notepad3.)

~~~
sp332
Notepad is basically a wrapper around a text box provided by the Windows
native UI libraries. The binary is so small because the heavy lifting (such as
there is any to be done in Notepad) is handled by the platform.

~~~
barrkel
Precisely. And for the same reason, Windows 95 could only edit 64kb of text in
Notepad because that was the most text that could be put in an EDIT control.

------
stephc_int13
Very impressive.

Font Rendering does not seem to be as crisp as needed for a text editor. (on
Windows at least)

I know Sublime is using DirectWrite to render fonts on Win32, this might be
something to explore. Also, TrueType with subpixel antialiasing should give
good results but might need some tweaking.

I'll follow this project and I might use it as my main editor once it is more
mature :)

~~~
daneel_w
When I run this editor on Windows 10 the text appears to me as crisp as in any
other editor I have available.

~~~
seventh-chord
Do you have a high dpi display? Lite does neither supixel-aa nor hinting,
which is very noticeable on a 24" 1080p display. The lack of hintig is most
noticeable at the top of letters where sharp edges look blury.

------
Skunkleton
Its looking pretty impressive, especially for such a new project. Since you
said it was fast, it got my huge log file test (1GiB of binary with lots of
utf-8 text). It performed better than most editors do. It did have a few
stalls though. Still, pretty impressive.

------
johnchristopher
Looks nice.

But upon starting it up I lost all windows decorations (KDE), had to restart
my session and lost the things I was working on in my terminals.

How can launching an app cripples the whole desktop ? (not that this have
anything to do with the app to me, it's a plasma thing)

First thing I look for was support for vim keybinding, could neovim be used as
the backend editor ?

~~~
SbEpUBz2
KDE disables compositing when SDL apps are opened to improve performance. It
should return once the app is closed. You can disable this behavior in System
Settings > Display and Monitor > Compositor and unchecking Allow applications
to block compositing.

~~~
johnchristopher
Wow, thank you !

It's not the first time something like that happened to me but I would never
have had the patience to investigate !

Can confirm unchecking that setting solved that problem.

~~~
the_pwner224
This will have very bad effects when playing video games and might(?)
potentially increase battery usage when watching full screen videos.

Compositing _should_ only provide the fancy effects like Wobbly Windows and
window previews in the alt-tab switcher etc. Not sure why this is causing KWin
to crash... You can use Alt-Shift-F12 by default to toggle compositing.

But if you're not doing anything more graphically intense than playing turn-
based or slow-paced video games then I guess you can use that option to
permanently leave on compositing.

------
donquichotte
Lite is written by rxi, who has made some excellent game jams with very
impressive youtube videos showing him doing programming, artwork and sound
effects, all at record time [1]. His other github repos are also excellent,
for example fe, a minimal Lisp, is definitely worth checking out.

[1]
[https://www.youtube.com/channel/UC1eJk1sWcUYvBwnn7v5RLaQ/vid...](https://www.youtube.com/channel/UC1eJk1sWcUYvBwnn7v5RLaQ/videos)

------
WalterBright
Another one is Microemacs (I use it nearly exclusively):

C version:

[https://github.com/DigitalMars/me](https://github.com/DigitalMars/me)

D version:

[https://github.com/DigitalMars/med](https://github.com/DigitalMars/med)

The source is so simple, the "extension language" is just editing the code.

------
devy
Checking the Github repo, it says 92.3% C[1], 2.6% Lua[2], why does the author
claim it's a "text editor written in Lua" instead?

[1]:
[https://github.com/rxi/lite/search?l=c](https://github.com/rxi/lite/search?l=c)

[2]:
[https://github.com/rxi/lite/search?l=lua](https://github.com/rxi/lite/search?l=lua)

~~~
ccmcarey
It seems to include the entirety of Lua -
[https://github.com/rxi/lite/tree/master/src/lib/lua52](https://github.com/rxi/lite/tree/master/src/lib/lua52)

Which is written in C.

~~~
moonchild
Odd that they chose lua 5.2. The most popular luas nowadays are 5.1 (the
version that luajit implements), and 5.3 (which was for a long time the
'latest and greatest', though it's been superseded by 5.4).

~~~
aeosynth
5.4 hasn't officially released (it's in the RC stage) so 5.3 is still the
latest stable/supported version.

------
extro
Works on Haiku: [http://0x0.st/i_3I.png](http://0x0.st/i_3I.png)

~~~
extro
In src/main.c at line 33 i had to add an ;.

------
Koshkin
Very nice; some basic user's documentation would be helpful.

------
iamcreasy
It feels snappier then sublime! Is there any limitation in the plugin system?

~~~
rxi
As the editor is written mostly in Lua, with C taking care of the lower level
parts, plugins can typically customise anything limited to what is exposed by
Lua and the C API. Beyond adding custom commands, plugins can also do things
like patch straight in the DocView's line-drawing function to draw additional
content:

[https://user-
images.githubusercontent.com/3920290/80743752-7...](https://user-
images.githubusercontent.com/3920290/80743752-731bd780-8b15-11ea-97d3-847db927c5dc.png)

Or create their own custom "views":

[https://user-
images.githubusercontent.com/3920290/81343656-4...](https://user-
images.githubusercontent.com/3920290/81343656-49325a00-90ad-11ea-8647-ff39d8f1d730.gif)

The treeview at the left of the screen is implemented as a normal plugin, and
like any other plugin can be removed from lite by simply deleteing the
`treeview.lua` file.

~~~
iamcreasy
Thank you for the response. I wanted to have a simple IDE for R because R
studio is very slow. I think this is a nice base to built on top of.

~~~
phillc73
I support this! Have been trying to use VS Codium[1], but R Studio keeps
pulling me back in. An alternative with some nice R plugins would be
fantastic.

[1] [https://vscodium.com/](https://vscodium.com/)

------
pknerd
Looks interesting. Hope plugins make it more wonderful to make it useful for
many languages like Python, Go etc. Right now I am stuck with VSCode and
PyCharm.

------
tambourine_man
So there's no GUI toolkit? Everything is drawn with Simple DirectMedia Layer?

~~~
rxi
Not even that: SDL just provides a pixel buffer, the application draws
everything itself per-pixel. Lite uses a technique I refer to as "cached
software rendering" which allows the application code to be written as if it's
doing a fullscreen-redrawn when it wants to update, the renderer cache
(rencache.c) then works out which regions actually need to be redrawn at the
end of the frame and redraws only those. You can call
`renderer.show_debug(true)` to show these redraw regions:
[https://youtu.be/KtL9f6bksDQ?t=50](https://youtu.be/KtL9f6bksDQ?t=50)

I wrote a short article detailing the technique here:
[https://rxi.github.io/200402.html](https://rxi.github.io/200402.html)

~~~
badsectoracula
FWIW this is basically "dirty rectangles" which was a very common technique
for avoiding full screen updates in games back when the hardware wasn't fast
enough to do that.

~~~
rxi
You're equating the final stage of this approach to the entire approach. The
point of this technique is that you get the benefits you typically would from
dirty rectangles without the burden of the bookkeeping you would traditionally
have. Using this technique your application "redraws" everything as if it's
drawing it fresh each frame and the renderer cache takes care of determining
what's actually changed.

Typically with dirty rectangles you would have to manage this state in the
application code, for example, determining that line X was edited then
updating the region for that line, or determining that view Y moved and
updating a dirty rectangle based upon it's previous and current positions.

~~~
badsectoracula
From the description at least it does sound there is book-keeping for the
tiles so i'm not sure why you think there isn't such a burden.

------
satvikpendem
Something similar is Revery, written in ReasonML (OCaml) [0].

I saw some comments here about a WASM renderer-based editor, I think there is
something in Flutter that is similar, where Flutter uses Skia to render its
components.

[0] [https://github.com/revery-ui/revery](https://github.com/revery-ui/revery)

------
alexeiz
For those who are already proficient with Vim/Emacs, is there any reason to
consider this editor?

~~~
chrisMyzel
Also does it come with.vim keybindings :D

------
jiggawatts
One thing that has mystified me is all these people talking about text editor
responsiveness, whether it feels "snappy" or not.

What are they _talking_ about!?

I mean that as someone who has grown up with 3D shooters and is obsessive
about tuning networks to the lowest possible ping times to improve latency for
competitive gaming. I always turn triple buffering off because I can
definitely feel the difference over double buffering.

Practically every editor I use updates with the maximum 60Hz refresh of my
monitor, and that literally can't be improved upon any further through
software alone. The exception is Microsoft Word, which does about 30Hz and I
hate this, but it's a shitty WYSIWYG editor, not a simple fixed-width text
editor.

I mean, seriously: I'm playing Doom Eternal at 4K with a constant 60fps, no
dips. That game is processing a decent chunk of a terabyte per second of data
at that rate.

What is this mysterious _difficulty_ people have with editing ~100KB text
files!?

Either this forum is full of people editing _insane_ multi-gigabyte files (By
hand? Why!?) or they're doing it on their 486SX PCs for nostalgia reasons.

I seriously don't get it.

~~~
crazygringo
I dunno why you haven't encountered it, but it's a real thing.

I remember using one editor perhaps 8 years ago, and if I tried multi-cursor
mode with more than ~40 insertion points (totally reasonable to edit 40
similar lines at a time), it took a couple of seconds to register each
keypress.

Similarly, other editors wind up choking on syntax highlighting, or large
files, or find & replace, or documentation lookup, or whatever.

The "mysterious difficulty" you mention is often literally several seconds of
latency with, say, a 30,000-line file, whether it's with opening, scrolling,
editing, or the other more advanced features already mentioned.

I'm honestly pretty baffled this isn't something you've encountered before.
This isn't about hertz, it's literally about entire seconds or large fractions
thereof.

~~~
jiggawatts
I regularly use Notepad, Notepad++, TextPad, VS Code, Visual Studio, and the
PowerShell ISE. I haven't had any issues with any of them, even when block-
selecting or multi-cursor editing.

Notably, they're all Windows native apps written in C++, with the exception of
VS Code, which is partially JavaScript.

I've noticed that some of them struggle with huge (1 GB) files, but _editing_
such as large file is a somewhat strange thing to do.

~~~
crazygringo
I mean, that's great for you. You're just lucky I guess.

But I hope what I described makes sense to you. It's not about 1 GB files at
all, it's about regular files. My suspicion is that it's mostly "side
features" that start to grind when they get beyond a certain point.

To be more specific with one example, I've used another code editor that a
simple "find all" operation will populate a results box. If you mess up your
regex to be accidentally super-generic and it finds 100,000 results in your
20K-line file, it takes half a minute to load the results into the results box
and become responsive again, with no "cancel" button.

Similarly weird edge cases in a syntax highlighter interacting with a half-
finished line of code of yours causes something to choke up. That kind of
thing.

Do you understand now? Again, you seem to just be lucky that you haven't
encountered this kind of thing.

------
ivanfon
Is there language server support/is it planned?

------
nem_pet
I will definitely try it as vs code became so slow and has all not needed
features for me.

------
urlwolf
See also howl, written in lua/moonscript and damn fast. Both of these seem to
have a bit more of a community than textadept (and no dependency on scite).

I used textadept for a while, bought the book to support the author. It didn't
work out for me.

~~~
mega-tux
I also think Howl is pretty nice unknown gem.

------
taigi100
I have to mention, I do love how this looks! I'd be looking in using it as my
daily driver for quick / short text edits and maybe small projects!

Since I really like the looks of it, in case you do need help with keeping it
maintained, I would love to help! Feel free to contact me at
contact@taigi100.com

Good luck and I hope it all goes well with this text editor!

------
ZeroClickOk
I just think about use VSCode as text editor, but I cannot change from
Notepad++ yet... and VSCode as code editor only.

------
mosselman
Any instructions on how to run this on macos?

~~~
tingletech
on catalina os x; I just went

    
    
      git clone https://github.com/rxi/lite.git
      cd lite
      ./build.sh
      ./lite
    

and an app did start up, but the text gets cut off in the editor window, and I
can't quit the app from the menu

~~~
rawland
The compiler might complain that it needs SDL.

Fixed this with:

    
    
      sudo apt install libsdl2-dev
    

on Ubuntu.

Else it works as tingletech described also using Mint/Ubuntu.

~~~
rajasimon
How do I install this on Mac? apt is not available in mac.

Update: I can install this using brew install sdl2
[https://medium.com/@edkins.sarah/set-up-sdl2-on-your-mac-
wit...](https://medium.com/@edkins.sarah/set-up-sdl2-on-your-mac-without-
xcode-6b0c33b723f7)

~~~
tolqen

      brew install sdl2

------
BubRoss
Very cool. It looks like it is written in Lua using sdl and some stb single
file libraries.

------
russdpale
Looks like a nice start, kind of confusing interface though. Needs an open
folder command.

~~~
IceCreamJonsey
Seriously. I'm all for lightweight text editors, but the ability to open a
folder and a way to start a new text file is minimum viable product.

------
amasad
Very cool! I ran it on repl.it via x11 but not sure it does the perf justice
because of the network lag:
[https://repl.it/@amasad/lite](https://repl.it/@amasad/lite)

------
nonbirithm
Interesting that it uses SDL. It would be nice if Vim or Emacs had an SDL
backend, so it could be used on more esoteric platforms. I remember there
being a distinct desire for a good homebrew text editor for the Switch.

------
fareesh
I would really like something as simple as windows notepad which syncs to my
devices, where the app is equally simple. A no frills fulltext search feature
would be nice too.

I currently use Google Keep, which is incredibly slow

~~~
pradeepchhetri
Have you tried Notion([https://www.notion.so/](https://www.notion.so/))?

~~~
fareesh
\- No linux client

\- Too many frills

\- Too slow

------
snissn
Could you share what data structure you use to keep the text in? I'm curious
how text editors work, since you need fast inserts anywhere, is the text a
linked list?

~~~
thedirt0115
My Lua isn't strong, but I think this is what you're looking for:

Data structure initialization:
[https://github.com/rxi/lite/blob/master/data/core/doc/init.l...](https://github.com/rxi/lite/blob/master/data/core/doc/init.lua#L48)

How insertion works here, which illuminates how the table is used:
[https://github.com/rxi/lite/blob/143f8867a13a35f5688ad7c9771...](https://github.com/rxi/lite/blob/143f8867a13a35f5688ad7c97717dddf8bc58cd2/data/core/doc/init.lua#L230)

~~~
dtf
Looks like an array of lines, which is a completely reasonable structure to
use.

There's a good post on the Visual Studio Code blog about why and when they
moved on from an array of lines to a new structure based on a piece table.

[https://code.visualstudio.com/blogs/2018/03/23/text-
buffer-r...](https://code.visualstudio.com/blogs/2018/03/23/text-buffer-
reimplementation)

------
MacSystem
That's a very nice piece of work. I'm very interest to get to know more how
text editor/IDE works. How hard would be add something like a GUI designer?

------
grep_it
Really cool project! At what point in the development did you start to use
lite as your editor to develop it? I'm sure that was a fun milestone to hit.

~~~
rxi
I can't say exactly when, but I was writing it in itself before I made the
initial commit on the public repo, so at least 6 months ago. Every change I
made since then (in addition to the plugins I wrote) would have been written
in lite itself.

------
ludsan
Beautiful. Would love to see this front a headless nvim.

------
fouric
A previous comment (I can't seem to find it) said that it didn't respect
keyboard layout on Linux. Is this true?

------
greendude29
Very cool.

Any plans of getting this into the arch repo?

------
winrid
Man, I love Webstorm. I'd love something like this with Intellisense for
JS/Node.

------
unixhero
What is the most feature-full modern text editor for the console, with syntax
highlighting?

~~~
ZoomZoomZoom
GNU Emacs

(If by modern you mean actively developed)

------
skywayter
This software seems pretty cool.

------
bootcat
He says its coded in lua but it seems to be completely coded in C ?

~~~
h-cobordism
See this thread.

[https://news.ycombinator.com/item?id=23127741](https://news.ycombinator.com/item?id=23127741)

------
nerdponx
Does it support LSP?

------
pxi
ooh - didn't know it was possible to set an SDL window icon like that in a
linux build, my project... updated :)

------
Okkef
Fast and small is how they all start out. Feature complete and fast, now that
is impressive.

~~~
ukyrgf
There was a moment, years ago, when I used VS Code to edit text files because
it was faster than Sublime and Notepad++. These days I open it begrudgingly.

~~~
vijaybritto
Thats weird. I have never seen sublime slowdown unless there is a buggy
extension

------
m1sta_
Any chance on a windows arm64 build?

~~~
revnode
Yay! Someone else on a Windows ARM machine! I have a Samsung Galaxy Book S.

------
matthewhartmans
Nice one OP! looks great!

------
fergie
Whats the advantage of Lite over Vi or Emacs?

~~~
snazz
I like Vim (and I've tried Emacs), but there's certainly still room for a
small, hackable text editor that can be used with the same intuition that
applies to the rest of a modern computer. Vim and Emacs keybindings require a
time investment (that some people find worth it) to learn and get comfortable
with.

------
mmm_grayons
This is a very nice piece of work, and I think very important: it shows that
it's very much possible to make slick interfaces without using javascript/web
technologies. It's also just as hackable as something like vscode or vim. I
hope there's a shift back to native or semi-native applications as opposed to
web-based stuff. It's certainly not perfect yet (it has some scaling/rendering
issues and is slow to open large files), but is still a pretty great start. My
two cents.

~~~
cwyers
It's written in Lua and doesn't use the OS GUI APIs and widgets anywhere. I'm
not sure I understand what makes this more "native" than Javascript.

~~~
samtheprogram
There’s way less abstraction going on in Lua app that has a hand-rolled GUI
versus an app built on top of a web browser like Electron. Hand rolling you’re
own UI doesn’t make it less native — is Ableton Live not-native?

Or are you drawing the line because Lua is a scripting language?

~~~
nwienert
You seem to be the one drawing the line saying Electron isn’t vs something
like this is.

Is a WASM app that renders to WebGL native?

I guess the point is native should probably mean “using the toolkit the OS
provides” and we should just use “performant” in most cases.

~~~
rhlsthrm
Can you make WASM apps using js toolkits that compiles to native desktop yet?
Seems like that will be a huge step forward from electron apps.

~~~
SahAssar
Sure, as native as any language that runs in a VM. There is no reason a WASM
app can or can't be any more or less native than something running on lua
(like in this case), jvm or anything else.

People don't use Electron to get a js runtime, they use it to get a web-like
runtime. Any javascript (including WASM) app can run without electron in
either node or in the bundled runtimes that OSX/Windows/Gnome/Whatever has,
but the point of electron isn't to write JS, it's to write web-like code. For
that it requires a browser in a predictable version, which is what electron
gives you (albeit at a high cost.)

~~~
Wowfunhappy
So, obviously, "native" is a spectrum. On OS X, Cocoa > QT > Java > Wine >
Docker + X11 forwarding.

But one thing I think is being missed here is that Lua, Python, and other
scripting languages are just a lot more resource efficient than electron, in
terms of runtime size, memory usage, cpu usage, etc. A very highly optimized
Electron app like VS Code _might_ outperform a more run-of-the-mill Lua app,
but that's an outlier.

~~~
saagarjha
Actually, for a while Java was just below Cocoa for "nativeness" the LAF for
it was maintained by Apple itself.

~~~
Wowfunhappy
I'd heard that before! I kind of debated whether to put Java or QT first—it
came down to the fact that QT apps just feel closer to me on macOS. Although I
don’t know how ugly they are under the hood.

Edit: What does LAF stand for?

~~~
saagarjha
LAF stands for "look and feel", which is basically Java's name for "UI theme".
Another fun fact: Cocoa had official Java bindings at some point!

