Live data from Hacker News

Lite XL: A lightweight text editor written in C and Lua

lite-xl.com

81–90 of 151 posts

Re: Lite XL: A lightweight text editor written in C and Lua

#81
post #25

Uses SDL for rendering the UI. While it makes it work cross-platform it unfortunately means it won't look like a native application. Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++.

Native UIs are becoming an anachronism pretty fast. Free-form web and electron based apps are becoming the norm and it won't be to long before people see native UI apps as some sort of weird throwback.

IE. IMO that ship has sailed and using lower level/cross platform graphics stacks make a lot more sense these days.

Re: Lite XL: A lightweight text editor written in C and Lua

#82

An ambitious FOSS project like a plugin-rich text editor is always commendable, but - I could not understand from the FAQ what the motivation for this editor was. I mean, which itch does it scratch? Which deficiency in existing editors does it resolve?

I think the original lite scratched the itch of just being very, very simple.

This is a bit less simple, but still decidedly more so than many other editors.

It has very few dependencies, statically builds, and is just generally pretty extensible, whilst also being not an embedded web browser.

What drew me to it was just the ease of creating new functionality. When I found it, it didn't have any perl syntax highlighting, so I looked into how to add that.

It took me literally five minutes to get basic highlighting working. I'm not joking, with no previous exposure to the editor, and having not touched lua in years. After I had finished, I just kinda sat there, and went: "Huh.".

I looked over the editor, and pretty much got the gist of it in a single day. I can't say that's ever happened before to me for something so feature-filled. I've tried to add plugins to other non-browser editors (like Code::Blocks, or Padre), and it was always a complete shitshow, and incredibly time-consuming and confusing (I still have trouble compiling Code::Blocks on my system, due to a huge esoteric error dump that popped at one point, and is proving frustratingly difficult to resolve). Lite just kinda worked out of the box with no real resistance. I really liked that about it.

Re: Lite XL: A lightweight text editor written in C and Lua

#83

What GUI Library does the editor use?

Last time I looked it was simple software rendering on an SDL windows. As simple as it goes. I was impressed by how fast it was given that software rendering should be quite slow, but these days CPU are so powerful that this might not be a problem A simple OpenGL renderer could be added with minimal efforts I think.

Software rendering for a text editor hasn't been a major bottleneck for a few decades, and while resolution has increased CPU speed has outpaced it.

Re: Lite XL: A lightweight text editor written in C and Lua

#84
post #29
post #25

Uses SDL for rendering the UI. While it makes it work cross-platform it unfortunately means it won't look like a native application. Then again, I don't think there's a C library which provides cross-platform native UI, only the Lazarus toolkit for Free Pascal and WxWidgets for C++.

I wonder if people actually remember how native apps are supposed to look like on any of the major platforms… Mac users, maybe. For all other platforms, churn and barely contained web apps are really wreaking havoc on the benefit of a uniform look and – most importantly – feel.

The massive changes in native UIs look and feel over the last couple decades really has made me double down on the CLI as the best interface. The CLI and the terminal are well established UIs with no big changes in a long time. The last big development I can think of is the use of sub-commands in addition to the normal command line call parameters.

I now focus on making my shell/terminal environment as good as possible and ignore GUI land whenever possible. Which today pretty much means 99% of the time I'm running a bunch of terminals and a couple web browsers.

Re: Lite XL: A lightweight text editor written in C and Lua

#85

Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine. Editing would be nice too. I imagine editing as a sequence of actions…

You want BBEdit

Ken is correct. IIRC, the very first version of BBEdit back in 1991(?) could handle files significantly larger than memory (on a system without memory mapping, no less).

Re: Lite XL: A lightweight text editor written in C and Lua

#87

Can someone suggest an editor for macOS with smart text algorithms to allow work on unlimited file size or line length? I need to view unlimited text, switch between encodings (including hex) and I want editor with proper algorithms, so it'll work instantly and without loading entire file in the memory. Should support search with fast regex engine. Editing would be nice too. I imagine editing as a sequence of actions…

You want BBEdit

I just opened 1.5GB binary file and it ate 2.5GB RAM according to Activity Monitor.

I tried to open 20GB single line text file and it started to eat RAM. I killed it at 60GB as I only have 64GB RAM.

So at least modern version does not seem to work well with big files.

vim does not seem to work either.

Re: Lite XL: A lightweight text editor written in C and Lua

#88

How does this compare to Sublime? I ask because that's my simple/fast editor of choice currently.

I love sublime. I daily Vscode for the remote ssh integration but I always have subl open for scratch padding, notes, opening huge files etc. It’s so fast.

Re: Lite XL: A lightweight text editor written in C and Lua

#89
post #19

Is there a lightweight/fast editor that has native support for LSP? Is it even feasible to have a "native LSP editor" that doesn't rely on a plugin system, or is LSP so open-ended that you're always going to need some scripted support in the editor to make a particular language server work well? I'm thinking something akin to nvi or nano with LSP features added on.

https://github.com/lapce/lapce is not stable but already looks impressive.
Post reply on HN