Live data from Hacker News

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

lite-xl.com

141–150 of 151 posts

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

#141
post #18
post #6

The aim of Lite XL compared to lite is to be more user friendly, improve the quality of font rendering, and reduce CPU usage. Plug-ins are not necessarily compatible

The plugin system is a disaster in this project. Basically, each "plugin" is just a Lua script that can (and often does) modify absolutely anything in the editor, including core data structures and other plugins. The original Lite was an exercise in creating a minimal editor, which I think succeeded. This project tries to take that base and expand it to add a ton of features, but doesn't re-architect it to support th…

That mutability is what Firefox XUL offered to extensions for many years, and when it was taken away there were — and still are — cries of outrage from devoted extensions users who expected to be able to modify anything.

So the model has lots of downsides, but certainly it’s not a dealbreaker.

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

#142
My first attempts at using Lua did not work very well. Until I tried to use it as an embedded scripting language, and suddenly it clicked. Shocker, I know. ;-) But I had never tried anything like that before, and it was eye opening. And in that function, Lua is beautiful, both as seen from the C-side and as seen from the user's side when scripting the application.

So this makes sense intuitively. It's what these languages were made for. C for parts that are performance critical or need to interface with the OS, Lua to orchestrate it all.

I would love an editor that was basically GNU Emacs, but with Lua instead of elisp. The zile project[0] aims to do something in a similar spirit, but I don't think they have many contributors. And realistically speaking, Emacs is something like 250,000 lines of lisp code, recreating all that in Lua would take a long time.

[0] https://www.gnu.org/software/zile/

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

#143

Are there any text editors that have MDI? I know TDI is really popular, but I prefer the classic windows 3.0 way of embedded document interfaces.

Me too. However it seems that all editors moved to TDI around the turn of the century. Sam is a graphical text editor that still maintains the MDI interface, but it is too bare bones for my taste.

I suppose the only featured application which still uses MDI are smalltalk derivatives like Squeak. I'll have to play with that to make sure it can access the file system external to the vm.

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

#144
post #129

Earlier quoted context omitted.

Meta programming. Code is data is code. First class macros. Lisp is an abstraction level or two above what can be done in Lua. Of course Lua is a Turing-complete language, but so is Brainfuck. The main thing is Lisp doesn't have a structure, so it can be and represent anything, a little like written text. I do not want to sound condescending, I just hope to convince you to try something new: have you used a Lisp lang…

Thanks for your reply! Wise to check assumptions. Yes, written a compiler in common lisp and various toys in scheme. Spent some of yesterday porting functions from SRFI-1 to Shutt's Kernel which is pretty close to a lisp. Interesting that you claimed first class macros, they're usually second class in lisps. I like scheme because I'm far enough down the compilers rabbit hole that language syntax looks like obfuscatio…

Fair enough, you seem to be well informed so we can just agree to disagree.

And thanks for mentioning metalua, I had never heard of it! I know some lua but I'm far from being an expert, nor have I used it in anything larger than a few hundred lines.

I'm not the biggest fan of Common Lisp either, I too prefer the Scheme side of things though I don't think we haven't reached the golden standard yet (in my mind it would be a Clojure-like functional Lisp with first class support for actors, that compiles to native code)

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

#145
post #106

For an Exhaustive list of editors point your browsers to: https://www.texteditors.org/

That "exhaustive" list doesn't include Helix[1], an editor with more than 400 contributors and 17k GitHub stars, which has been in development for close to three years, and which is probably more widely used already than 95% of the editors on that list ever were. [1] https://github.com/helix-editor/helix

It is a wiki, so now it does.

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

#146
post #110

Earlier quoted context omitted.

Sublime has, I think, a relatively loyal user base that have gotten comfortable there and don’t really have much of a reason to leave unless for a big IDE for specific projects. The plug-in ecosystem, while clearly aged, still has activity and new developments including adapting the new LSP stuff pretty well, and has some damn committed authors/maintainers. I’ve been a comfortable user for a while now and enjoy knowi…

The main pain point of Sublime has always been it's extensibility, or lack thereof. The program is very rigid, and the plugins can't do much. Mainly when creating user interfaces, you can't have buttons (for example a "run" button), the only official UI components are the command palette where you search commands, and a "panel", which is basically a single separate text view. Plugins such as the terminal plugin [1] u…

So I think the ColorHelper plug-in[1] is a better example of the modern gui hack in sublime. Basically goes all in on the HTML engine (for popup windows) that ships with sublime. I haven’t used it myself (HTML), but as far as I understand, buttons can effectively have callback functionality through “links” to commands. Or something like that.

Which doesn’t seem too bad to be honest. The author of that plug-in has also written a markdown to HTML extension for the purposes of making it easier to use the HTML engine, and is what is used by the LSP ecosystem for popup windows.

But yea, honestly it’s a little strange to me that they don’t ship a basic GUI api that’s moderately flexible for things like buttons text and windows but uses their own GUI engine.

[1] https://packagecontrol.io/packages/ColorHelper

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

#148
post #103

Lite XL is a small miracle. I can only echo other comments calling it an "open source Sublime Text". It is at least as responsive as Sublime in my tests, and feels even more lightweight. The executable is only 385 kilobytes on Linux, with just a handful of extremely basic system dependencies (SDL, Lua, FreeType, PCRE). Sublime Text is now getting squeezed from "above" (by VSCode) and from "below" (by Lite XL), while…

People grow very attached to their editors. I had a professor in university who paid 100$ every year for his subscription to https://crisp.com/ which he used for email and notes. He has a windows workstation set up with KVM (because the department is Linux based) solely so that he can use Crisp. Sublime could easily survive another 30 years in some reduced capacity.

Slight tangent: it looks like Crisp is also available on Linux, according to their website.

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

#149
post #114

Any editor no matter how "light" you call it will be too fat cause this exists: "vim" depends on lib (3) gettext libiconv ncurses build (1) clang-14

I would imagine ed has even fewer dependencies, ergo it is not lightweight. (Not that it is anyway, really)

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

#150
post #91

It's actually a lovely editor. I've used it a few times in the past, and it's lightning quick, responsive and featherlike in terms of resource use, as if Sublime was open sourced. Lite XL doesn't have fancy features, no crazy plugins, it's just a great basic GUI editor.

If you want "Open Source Sublime" check out CudaText. Loads fast too. Plugins are Python (like Sublime Text) but whole thing is coded in FreePascal using Lazarus. It's really capable. https://cudatext.github.io/

After reading your comment, I tried to setup a CudaText + LSP Plugin + Intelephense as I mainly develop in PHP. Unfortunately, my experience of LSP on CudaText is not as good as Lite XL.

Also, looking at its repository, CudaText currently only has 1 active contributor, which is a little worrying if I want to use it as my main text editor. I hope the community around CudaText become bigger because I think the concept is good, and I really hope CudaText can be on par with Sublime Text.

Post reply on HN