News for hackers. Stuff that matters.
Re:Pragtical: Practical and pragmatic code editor by hans_castorp on Tuesday August 20, 2024 @03:31AM (#41297692)
The user interface font is way too small and nearly impossible to read on a 4K monitor (on Windows)
Re:Pragtical: Practical and pragmatic code editor by Fluorescence on Tuesday August 20, 2024 @03:45AM (#41297787)
Looks good on my Ubuntu 32" 4k.

You can change the UI font size in Settings / User Interface / Font (double click to edit).

My main objection was "smooth scrolling" which I could turn off as "scroll transition". Bit annoying you can't search settings though. Don't know why I am looking at it though because I value the higher level things new editors will always be missing e.g. refactoring, debugging, test integration, advanced panel management and a million extensions I forget I rely on everyday.

Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @05:11AM (#41298243)
You can change the scale setting through Settings > Plugins > Scale and see the best setting for your monitor
Re:Pragtical: Practical and pragmatic code editor by swah on Tuesday August 20, 2024 @05:47AM (#41298448)
Didn't make a difference here (restarted too, ofc)
Re:Pragtical: Practical and pragmatic code editor by vouaobrasil on Tuesday August 20, 2024 @03:25AM (#41297665)
Looks a lot like LiteXL. Is it based off it? What makes it different?
Re:Pragtical: Practical and pragmatic code editor by cation234 on Tuesday August 20, 2024 @03:33AM (#41297705)
According to its Github page, yes it is a fork of LiteXL.
Re:Pragtical: Practical and pragmatic code editor by throwaway744678 on Tuesday August 20, 2024 @04:39AM (#41298071)
A bit of context: Motivation about Pragtical Text Editor [0]

[0] https://github.com/pragtical/pragtical/issues/6#issuecomment...

Re:Pragtical: Practical and pragmatic code editor by geenat on Tuesday August 20, 2024 @04:22AM (#41297978)
As an extension writer...

Writing extensions in Lua is huge. (Same as OBS) Looks very simple and productive.

It's one of the main reasons I've stuck to Sublime... extending with Python is very easy and works everywhere.

Even if both Zed and VSCode are strong in other areas.. Rust extensions makes me cringe (a build toolchain? ugh..) VSCode's inconsistent undocumented Javascript API is a pain in the butt (paste & pray driven development).

Will be keeping an eye on this.

Re:Pragtical: Practical and pragmatic code editor by throwup238 on Tuesday August 20, 2024 @04:49AM (#41298131)
> VSCode's inconsistent undocumented Javascript API is a pain in the butt (paste & pray driven development).

It's so bad they have a whole Github Copilot mode specifically dedicated to it. Pay and pray driven development.

Re:Pragtical: Practical and pragmatic code editor by lukan on Tuesday August 20, 2024 @05:46AM (#41298439)
Oh and I kind of finally decided to give those shiny modern tools a serious try. Paste (pay) and pray does not sound too good on the other hand.
Re:Pragtical: Practical and pragmatic code editor by ta8645 on Tuesday August 20, 2024 @04:43AM (#41298090)
For what it's worth, NeoVim's extension language is Lua as well.
Re:Pragtical: Practical and pragmatic code editor by srik on Tuesday August 20, 2024 @07:42AM (#41299077)
Yup. I've paradoxically found it more convenient to write my neovim plugins+configuration in lua than in python with vanilla vim's python api.
Re:Pragtical: Practical and pragmatic code editor by coliveira on Tuesday August 20, 2024 @03:25PM (#41303135)
Vim also has support for Lua scripts.
Re:Pragtical: Practical and pragmatic code editor by maleldil on Wednesday August 21, 2024 @07:41AM (#41309277)
Not to the same extent. Neovim has extensive Lua support, to the point where you can do _almost_ anything in Lua, whereas in Vim, it's, AFAIK, a second-class citizen. For example, my nvim config is written entirely in Lua with no vimscript files, except for a few vim.cmd's that run one-line vimscript commands. (exactly three, and they're all highlighting/colorscheme–related).
Re:Pragtical: Practical and pragmatic code editor by coliveira on Wednesday August 21, 2024 @01:01PM (#41312132)
I believe you can do the same in vim, however I agree that there is more friction in vim because Lua is not the main scripting language. Moreover, vim is not guaranteed to be compiled with Lua, so you only want to do this if you can control the installation of the vim binaries.
Re:Pragtical: Practical and pragmatic code editor by p4bl0 on Tuesday August 20, 2024 @04:56AM (#41298175)
That's what I really love with Kate (and actually the KTextEditor component of KDE Frameworks): you can build heavy plugins in C++ but there is also a very good JavaScript API that you can write new editing commands with for example.
Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @05:09AM (#41298234)
Lite XL (which is a project Pragtical forked on) is my first experience writing a plugin for code editor and coding in Lua, and I am surprised on how easy is it. I don't know about other editors, but in Lite XL and Pragtical I can extend or overwrite almost anything the core plugin is doing. I can even start writing the plugin in my user module file (init.lua), and see the change on the fly.
Re:Pragtical: Practical and pragmatic code editor by kqr on Tuesday August 20, 2024 @07:08AM (#41298854)
This is inspired by Emacs which works the same way. It, in turn, takes inspiration from how Lisp systems have worked since time immemorial. You're meant to open a REPL directly into the running system as a way to evolve it.
Re:Pragtical: Practical and pragmatic code editor by hprotagonist on Tuesday August 20, 2024 @07:38AM (#41299045)
and the circle is complete: https://fennel-lang.org
Re:Pragtical: Practical and pragmatic code editor by pjmlp on Tuesday August 20, 2024 @08:40AM (#41299527)
Yeah, I always complain about Python lack of JIT, but being extension language is actually a good use for it.

Or Tcl, which I used 20 years ago as for our in-house proxy module for Apache/IIS, extensible in C and Tcl.

Unfortunely out of fashion for anyone besides EDA tooling.

Re:Pragtical: Practical and pragmatic code editor by theshrike79 on Tuesday August 20, 2024 @09:00AM (#41299676)
Wezterm is configured with Lua, Hammerspoon configs are also Lua.

Both are super easy to sync to multiple computers with chezmoi and the configs themselves can be smart enough to behave differently on different machines.

I wish more software used Lua for config.

Re:Pragtical: Practical and pragmatic code editor by daelon on Tuesday August 20, 2024 @10:58AM (#41300681)
I'm a VSCode extension author and I don't really know what you mean by "inconsistent undocumented API". Do you have any examples?
Re:Pragtical: Practical and pragmatic code editor by golergka on Tuesday August 20, 2024 @11:06AM (#41300761)
I haven't written much vscode extensions, but I've worked professionally on editors that use Monaco (the text editor library used and developed by vscode team). There's almost no documentation whatsoever.
Re:Pragtical: Practical and pragmatic code editor by truckerbill on Tuesday August 20, 2024 @04:44AM (#41298096)
Is it possible to do custom drawing modes for diagrams and viewers?
Re:Pragtical: Practical and pragmatic code editor by torginus on Tuesday August 20, 2024 @04:48AM (#41298124)
The UI gives me a Godot-y vibe. Is there some relation?
Re:Pragtical: Practical and pragmatic code editor by k__ on Tuesday August 20, 2024 @05:15AM (#41298263)
"runs locally on your machine as a CLI application"

Hrm, I was hoping it would run all in the browser.

Cool idea nevertheless!

Re:Pragtical: Practical and pragmatic code editor by meiraleal on Tuesday August 20, 2024 @07:04AM (#41298826)
> Hrm, I was hoping it would run all in the browser.

like Monaco? Or a proper fully featured text editor?

Re:Pragtical: Practical and pragmatic code editor by wordpad25 on Tuesday August 20, 2024 @09:49AM (#41300053)
Project was founded specifically to counter the modern trend of using web stack for editors
Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @10:46PM (#41306299)
Lite XL which is a project Pragtical forked on has been tested to run on browser. You can try it here :

https://lite-xl.com/playground/

Re:Pragtical: Practical and pragmatic code editor by BigParm on Tuesday August 20, 2024 @05:28AM (#41298338)
How does it occupy 30MB ram but 5MB disk space does it grow
Re:Pragtical: Practical and pragmatic code editor by genezeta on Tuesday August 20, 2024 @06:35AM (#41298681)
In case your question is sincere, this is normal.

Generally, a program on disk contains code. Part of that is the description of certain structures. Say you have an editor which can load a file, you have to have structures to hold that file, to keep track of the undo history, to represent the file with colours (syntax highlighting) and whatever. Your editor may have a Lua VM inside running plugins that you load. That VM will reserve additional memory to run those plugins. And so on.

All that only exists while the program is running, but not on disk.

Re:Pragtical: Practical and pragmatic code editor by a-french-anon on Tuesday August 20, 2024 @05:49AM (#41298459)

  void *p = malloc(30 * 1024 * 1024);
Re:Pragtical: Practical and pragmatic code editor by BigParm on Sunday September 01, 2024 @04:46PM (#41420245)
Makes sense. It's intuitive when you specify a number of bytes. I have myself been allocating memory using "new" so idk how my broken brain asked such a dumbass question.
Re:Pragtical: Practical and pragmatic code editor by _benj on Tuesday August 20, 2024 @05:30AM (#41298349)
Just the fact that they did such an amazing job with their documentation is as huge win for me!

I really liked Lite XL but back when I looked at it it was a challenge to understand it’s API and functionality.

Looking forward to give this a spin!

Re:Pragtical: Practical and pragmatic code editor by swah on Tuesday August 20, 2024 @05:30AM (#41298354)
No LLM plugins yet?
Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @05:41AM (#41298403)
AFAIK, not yet
Re:Pragtical: Practical and pragmatic code editor by swah on Tuesday August 20, 2024 @05:45AM (#41298433)
Downloaded both Lite XL and Pragtical and have to say that Lite XL looked ok on open, while Pragtical looked super tiny and all the UI was out of alignment.
Re:Pragtical: Practical and pragmatic code editor by Weethet on Tuesday August 20, 2024 @07:27AM (#41298960)
Yeah, for me too. It looks incredibly broken as of right now and I don't even understand how. I'd say that it's okay if it was an alpha of a completely new editor, but it's a fork of a one that already works well, so idk, I don't expect it to go anywhere
Re:Pragtical: Practical and pragmatic code editor by atlintots on Tuesday August 20, 2024 @06:30AM (#41298653)
Why fork Lite XL instead of contributing? Just out of curiosity, since I'm not familiar with either project and don't know what their respective philosophies are.
Re:Pragtical: Practical and pragmatic code editor by genezeta on Tuesday August 20, 2024 @06:36AM (#41298692)
Re:Pragtical: Practical and pragmatic code editor by prmoustache on Tuesday August 20, 2024 @06:43AM (#41298731)
Does it have a multiple modes support and vim-like keybindings either vanilla or through plugins?
Re:Pragtical: Practical and pragmatic code editor by artemonster on Tuesday August 20, 2024 @06:51AM (#41298767)
Do I understand correctly that its a software renderer? They manually blit a buffer from glyphs and use SDL to show it, akin to immediate mode?
Re:Pragtical: Practical and pragmatic code editor by ben-schaaf on Tuesday August 20, 2024 @07:39AM (#41299050)
Immediate mode is the way a rendering API works. Most glyph rendering works by blitting from a buffer, regardless of how they design the API.
Re:Pragtical: Practical and pragmatic code editor by mosburger on Tuesday August 20, 2024 @08:29AM (#41299442)
Is anyone else getting a "“Pragtical.app” is damaged and can’t be opened. You should move it to the Trash" error when attempting to run the arm64 build on macOS? Really wanted to try it out!

I suppose it could just be some security crap Corp IT installed on my laptop preventing it from installing.

It looks like it's only taking up 7.9MB in my Applications folder so it must be corrupt or something.

Re:Pragtical: Practical and pragmatic code editor by yas_hmaheshwari on Tuesday August 20, 2024 @08:38AM (#41299509)
I have seen a similar error in the past, and that one was because of MacOS extended permissions

``` cd /Applications/DBeaver.app/; ls -@l ```

And then if you see some extended attributes like quarantine and provenance, you can remove them

``` xattr -d com.apple.provenance DBWeaver.app/; xattr -d com.apple.quarantine DBWeaver.app/ ```

Re:Pragtical: Practical and pragmatic code editor by tunaoftheland on Tuesday August 20, 2024 @09:00AM (#41299668)
Haven't tried with Pragtical (hard to say it out loud BTW, lol) but have had success with right-click-opening other apps that give this error. Sometimes I need to do it multiple times to open it as normal. No issues with the apps themselves, has to do with app signing (or lack thereof for many macOS apps that one just downloads from a site).
Re:Pragtical: Practical and pragmatic code editor by tom_ on Tuesday August 20, 2024 @09:20AM (#41299808)
An error about the app being damaged specifically can stem from the contents of the .app folder being modified after it was signed with the codesign tool. You can use codesign --verify (consult the man page) to get some info about why it's being considered damaged.

I've got this wrong in the past by adding the README too late in the process. Once I'd fixed that, the reason macOS gives for not opening my app became that Apple can't check it for malicious software. Much better... I think? The right click/open workaround does work.

Re:Pragtical: Practical and pragmatic code editor by hoistbypetard on Tuesday August 20, 2024 @10:32AM (#41300440)
I am also getting that error. I have no security crap from Corp IT on my personal macbook.
Re:Pragtical: Practical and pragmatic code editor by rpastuszak on Tuesday August 20, 2024 @09:04AM (#41299704)
FWIW the universal build works with the right mouse button click trick
Re:Pragtical: Practical and pragmatic code editor by tbeseda on Tuesday August 20, 2024 @12:19PM (#41301408)
FYI, in macOS v15 Sequoia +, Gatekeeper/quarantine/signing has changed. Right click to open won't allow the bypass. The quickest way, without disabling runtime protection:

`xattr -r -d com.apple.quarantine /Applications/Pragtical.app`

-d is delete -r is recursive

Hopefully, Apple won't lock it down further.

Re:Pragtical: Practical and pragmatic code editor by bityard on Tuesday August 20, 2024 @02:51PM (#41302821)
Hmm. That worked for me, but when I run the app, everything in it is reeeealy tiny. Like they're trying to work around Retina display scaling but got it wrong somehow.
Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @10:33PM (#41306242)
Have you tried changing the scale through Settings > Plugin > Scale ?
Re:Pragtical: Practical and pragmatic code editor by kccqzy on Tuesday August 20, 2024 @08:31AM (#41299462)
That sounds like a code signing error. 7.9MB is a good size.
Re:Pragtical: Practical and pragmatic code editor by brisket_bronson on Tuesday August 20, 2024 @08:52AM (#41299609)
I just tried it and culdn't get past the first screen. The "installation" failed on mac and had to find a workaround just to use the editor. All the fonts look wrong, too small and misconfigured. Maybe the project needs more time to mature, in the meanwhile, I'll stick to vim.
Re:Pragtical: Practical and pragmatic code editor by fusslo on Tuesday August 20, 2024 @09:46AM (#41300016)
Tangential: is there an IDE out there that supports different color schemes for each window it has open? does Pragtical? I didn't see it in the docs

I used to like having different projects open in different windows and easily differentiate between them with their color schemes. Kinda like setting a terminal to open with a random color profile

It seems like vscode and sublime want to change the scheme across all the windows.

Re:Pragtical: Practical and pragmatic code editor by rudnevr on Tuesday August 20, 2024 @09:53AM (#41300088)
IntelliJ does, of course. Per project, per window, with background images etc
Re:Pragtical: Practical and pragmatic code editor by r-spaghetti on Tuesday August 20, 2024 @10:13AM (#41300267)
in vscodium I have a different left bar color for each project - not exactly what you want but I can easily differentiate between them. There is a workspace settings json file per project: "settings": { "workbench.colorCustomizations": { "activityBar.background": "#faf7c7", "activityBar.foreground": "#000000" } } (disclaimer: this works on Debian Gnome)
Re:Pragtical: Practical and pragmatic code editor by avhb on Tuesday August 20, 2024 @09:50AM (#41300057)
the peacock vscode extension can help you with this: https://marketplace.visualstudio.com/items?itemName=johnpapa...
Re:Pragtical: Practical and pragmatic code editor by fusslo on Tuesday August 20, 2024 @11:03AM (#41300716)
holy crap thank you
Re:Pragtical: Practical and pragmatic code editor by TiredOfLife on Tuesday August 20, 2024 @12:42PM (#41301604)
VS Code you can have different Theme per Workspace.
Re:Pragtical: Practical and pragmatic code editor by mnmalst on Tuesday August 20, 2024 @10:07AM (#41300221)
Doesn't pick up my (non ttf) Terminus font and there is no obvious way to set the font manually.
Re:Pragtical: Practical and pragmatic code editor by cynicalpeace on Tuesday August 20, 2024 @10:09AM (#41300241)
Any IDE that isn't "AI first" is going to have a hard time from here on out. Cursor is beginning to eat the world much like VSCode did.

I'm sure there are some here on HN that will say "nah, I prefer the old fashioned way" but you will be decidedly in the minority very fast.

Re:Pragtical: Practical and pragmatic code editor by Cthulhu_ on Tuesday August 20, 2024 @10:37AM (#41300490)
Nah; an IDE / editor needs to be a solid, pluggable and performant core first and foremost, so that any addons like AI shenanigans are opt-in and swappable. While AI isn't new, AI-powered code assist is and with that in mind we're only at the beginning.

Consider LSP, where language developers can now publish a single tool for language specific utilities, where before every editor needed to add support for languages separately. Again, pluggability.

Re:Pragtical: Practical and pragmatic code editor by cynicalpeace on Tuesday August 20, 2024 @10:56AM (#41300658)
We actually are in agreement, especially re pluggability.

Whether it's an extension or "AI first", the impact of AI on IDE's will be massive and an IDE that doesn't do it well will be barely used.

Re:Pragtical: Practical and pragmatic code editor by edvinbesic on Tuesday August 20, 2024 @08:03PM (#41305374)
You’re actually not in agreement, because “AI first” would imply it being a core feature of the IDE/Editor, something like Zed, whereas a plugin would imply that I can ignore it and it not being a core part of said IDE/Editor.
Re:Pragtical: Practical and pragmatic code editor by cynicalpeace on Tuesday August 20, 2024 @09:43PM (#41305972)
lol I agree with every part of what they said except "Nah".

Interesting to be told what I do and do not agree with.

Re:Pragtical: Practical and pragmatic code editor by from-nibly on Tuesday August 20, 2024 @10:22AM (#41300332)
I guess I'm an old grump then. I don't want air first development. It should be an extension. Why would an editor need to have air baked in when things like language support is an extension?
Re:Pragtical: Practical and pragmatic code editor by cynicalpeace on Tuesday August 20, 2024 @10:31AM (#41300429)
It could be an extension, but its going to be so important that the IDE with the best AI support will be the most popular. Presumably that IDE won't relegate it to extension class citizenship. It will be most of the product.

Even now, I've built a ramen profitable side project mostly by sipping my coffee and approving Cursor's suggestions. 10x faster at least.

Way more productivity gains than even language support.

Re:Pragtical: Practical and pragmatic code editor by meiraleal on Tuesday August 20, 2024 @07:36PM (#41305186)
as an extension it already exists, nothing new in that front.
Re:Pragtical: Practical and pragmatic code editor by elashri on Tuesday August 20, 2024 @10:18AM (#41300297)
I doubt that if Stackoverflow or Jetbrains surveys included a question about if people just heard about cursor that you will get more than 50%. Let alone people actually using it and ditching VSCode.
Re:Pragtical: Practical and pragmatic code editor by cynicalpeace on Tuesday August 20, 2024 @10:21AM (#41300328)
I said "beginning"
Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @10:10AM (#41300249)
Not criticism, just thinking out loud:

This editor claims to be lightweight, citing that it uses 30MB of RAM. But I assume that's without any extensions loaded.

Back in the day, though, one joke about Emacs was that it's an acronym for Eight Megabytes All Continuously Swapping. This was meant to highlight Emacs's reputation for bloat. Right now when I run Emacs it's using a lot more than 30, let alone eight. I'm pretty sure most of that is all the modes I have installed for every language I might ever use, regardless of whether I'm actually using it right now.

About 15 years back Visual Studio had a reputation for bloat, but my experience was that it was actually quite lightweight and snappy, especially compared to Eclipse and IntelliJ. Until you install ReSharper, which transformed it into 50 tons of molasses.

At work, Visual Studio Code currently consumes about 1GB of RAM and takes 5+ minutes to start up. On my personal computer, a 2013 MacBook, it uses more like 50MB and starts darn near instantaneously. But they're very different beasts; on my MacBook I've got it configured to only load the plugins I need for each project. At work we've got a whole dang Devcontainer that includes configuration to load I-don't-know-how-many extensions, basically anything anyone on the team has ever wanted. The devcontainer extension makes you put the list of extensions to load into a file that needs to be checked into source control. So the only way for someone to get this tool they want is to make everyone else get it, too. All to sling a relatively modest volume of Python code.

And of course if I try to opt out of all of that I make my life even harder. Trying to get by without that pile of crap is just spitting in the wind. Run-time requirements aren't documented; they're shoved into an undocumented and ever-growing list of Bash commands in the Dockerfile. Coding standards aren't documented or managed with something straightforward like Git hooks; they're enforced through a plugin and its configuration.

I do remember when vscode was lightweight. It happened to be a time when not many plugins were available. That put a hard limit on just how much bloat you could accomplish. But, of course, as soon as it got popular people started creating plugins for darn near everything.

Perhaps the problem isn't the editors. Perhaps it's us.

Re:Pragtical: Practical and pragmatic code editor by sweeter on Tuesday August 20, 2024 @12:10PM (#41301309)
This is exactly why I switched from containers to nix flakes and from Vs code to neovim or Helix. The difference is night and day. It's so nice to have my editor open instantly and to be able to have multiple instances open at once. The LSP is by far the most memory hungry. It's definitely worth the effort.
Re:Pragtical: Practical and pragmatic code editor by lucianbr on Tuesday August 20, 2024 @10:27AM (#41300393)
It's a cycle, and we've been around the bend multiple times already.

https://www.xkcd.com/2044/

Installing multiple programs on my computer or a server is complicated, and slows things down, and it's insecure and hard to replicate. So we created VMs. And for a while VMs were great. But then we started putting everything we needed in the VMs, and they also became complicated, and slow, and insecure and whatnot. So we have containers. And containers are now slowly getting bloated too. Kubernetes simplified some things, but now we need Helm to deal with K8s, and Helm itself is now quite complicated.

Editors start lightweight and fast, then get bloated with features. So does productivity software. Programming languages start simple and easy to use and understand, and progressively get more features, each of which seems nice in isolation, but soon the codebases use everything, and it interacts, and you need decades of experience to use it all proficiently.

Same for libraries. For network protocols. For standards of all kinds.

It's most definitely us.

Re:Pragtical: Practical and pragmatic code editor by from-nibly on Tuesday August 20, 2024 @10:20AM (#41300316)
Direnv + nix packages is way better than Dev container development in my experience.
Re:Pragtical: Practical and pragmatic code editor by BD103 on Tuesday August 20, 2024 @10:30AM (#41300417)
> On my personal computer, a 2013 MacBook, it uses more like 50 and starts darn near instantaneously.

Just for clarification, do you mean 50 GiB or 50 MiB? I'm assuming MiB in this scenario, since allocating 50 GiB doesn't mix with an instantaneous startup.

Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @10:33AM (#41300457)
Yeah, mib
Re:Pragtical: Practical and pragmatic code editor by kerkeslager on Tuesday August 20, 2024 @11:40AM (#41301052)
> Perhaps the problem isn't the editors. Perhaps it's us.

For coming up on a decade I've used Vim with a minimal .vimrc and no plugins. The only time I deviate from this is when I am writing in an s-expression based language. I would probably deviate from this to write Java or C#, but I haven't written either in a while.

There are upsides and downsides. The biggest upside is simply that I haven't spent ANY time learning new editors or new editor features; I'll occasionally learn about a feature of Vim that I didn't know existed, but that's very oriented toward solving immediate problems, because it tends to happen when I run into something that feels like there's probably an easier way to do it, and I'll do a quick internet search. I think a lot of devs spend a lot of time learning tools with the sense that the time spent will be paid back by time savings from using the tools, but the reality is way more hit-and-miss, and I think a lot of people could benefit from being more selective in what they spend their learning time on.

The thing that Vim completely misses is being able to jump to the appropriate file where a class/function is defined. This is more of a tradeoff than IDE folks recognize: when I was using PyCharm/IntelliJ/ReSharper, I found that being able to jump around easily would hide the fact that my projects were growing in size and complexity. The tooling makes this less painful up front, but eventually, you still feel the pain, because eventually there's some bug that cascades through a bunch of files, and you still have to reason about all of them. Finding definitions isn't the core issue with having a lot of definitions, reasoning about how they interact is the core issue, and the IDE tooling doesn't solve that. Being in Vim and having to deal with my project's file structure directly and explicitly means I feel the pain of complexity earlier, when it's easier to fix.

If I'm being honest, I'm not sure that the tradeoffs comes out in Vim's favor here. I don't think we get to have a conclusive answer because there's simply nobody who uses both vanilla Vim and the best IDEs at a high enough level to have an informed opinion about which is better. I'd say I am close because I have used both extensively, but my IDE knowledge is outdated by about a decade.

But, I've said before and I'll say again that entering text into files isn't usually the limiting factor of software development speed. If I'm mentoring a new programmer I'd rather see them learn TDD and/or how to leverage type systems and write code in Notepad, than see them write untested, unchecked code in The Best IDE/Editor Ever. Of course, there's no reason to go to those extremes.

Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @11:59AM (#41301222)
Your 3rd and last paragraphs reminded me of a feature I really like about F#: all source files in an assembly have an explicit, sequential compilation order. And you can only have references to thinks that had been defined earlier, either in the current file or in a file that comes earlier in the compilation order.

It makes learning and navigating a new codebase much easier. So much so that it doesn't really require IDE tooling the way it does with most mainstream languages. It's harder to get lost when you always know which way is up. Consciously thinking about whether you're doing top-down or bottom-up design also flows naturally from this, for the same reason, and that seems to encourage more thoughtful, readable code design.

Is it more work? Up-front, yes, absolutely. In the long run, though? By the time I finished my first year of CS education I had already been exposed to many many examples of cases where greedy algorithms consistently produce sub-optimal results. Perhaps they aren't teaching people about that in school anymore.

Re:Pragtical: Practical and pragmatic code editor by msteffen on Tuesday August 20, 2024 @12:16PM (#41301369)
Wait, does F# not support mutual recursion? Can one not write eg a recursive descent parser?
Re:Pragtical: Practical and pragmatic code editor by Iwan-Zotow on Tuesday August 20, 2024 @12:36PM (#41301547)
No, this is about single pass compiler, which makes it fast but all references to use in current file to be defined earlier
Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @01:00PM (#41301750)
That was why it was done that way in languages developed in the 1970s. But, as kerkeslager points out, that logic doesn't work for an enterprise programming language from the 2000s.

We don't actually need to speculate on this. Don Syme has explicitly said that this was a deliberate language design decision meant to discourage the big ball of mud antipattern. And the language maintainers continue to cite this as the reason why they don't change this behavior even though they easily could.

Re:Pragtical: Practical and pragmatic code editor by kerkeslager on Tuesday August 20, 2024 @12:48PM (#41301650)
Single pass compilation can support backreferences, i.e. referencing a symbol and then defining it later, efficiently with a technique called "backpatching". All single-pass compilers I know of use backpatching for computing jumps--I'm not even aware of any other way to compute jumps. For symbols, the implementation of backpatching is a bit more complex, but it's a pretty well-known solution and I don't think it would be a significant barrier for any competent compiler developer. That is to say, if they've chosen to not support backreferences, it's not because it's hard to do in a single-pass compiler.

EDIT: The wonderful book Crafting Interpreters has an implementation of backpatching jumps to implement loops. Before anyone says "this is an interpreter, not a compiler", be aware that most modern interpreters contain a compiler. https://craftinginterpreters.com/jumping-back-and-forth.html

Re:Pragtical: Practical and pragmatic code editor by Iwan-Zotow on Friday August 23, 2024 @10:38AM (#41329410)
Sure, we could do some craft to work around single pass limitations, but that was Don Syme decision from long time ago, and F# folks are faithful to it.

Actually liked language a lot, thought it could replace Python as top level AI/ML tool

Re:Pragtical: Practical and pragmatic code editor by kerkeslager on Tuesday August 20, 2024 @12:39PM (#41301582)
They do support mutual recursion, but you have to make it explicit.

https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...

Re:Pragtical: Practical and pragmatic code editor by mananaysiempre on Tuesday August 20, 2024 @12:47PM (#41301640)
Same as the rest of the ML family then.
Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @01:03PM (#41301781)
Same as the rest of the functional languages, even.
Re:Pragtical: Practical and pragmatic code editor by mananaysiempre on Tuesday August 20, 2024 @01:12PM (#41301872)
My first functional language was Haskell, which essentially only has a letrec, so afterwards I’ve always viewed everybody else’s approach as a bit peculiar :) Fair point that it’s the Lisp way too.
Re:Pragtical: Practical and pragmatic code editor by mjaniczek on Tuesday August 20, 2024 @04:47PM (#41303889)
Nah, Elm doesn't need the rec keyword and could be argued to be a ML descendant
Re:Pragtical: Practical and pragmatic code editor by CrimsonCape on Tuesday August 20, 2024 @02:59PM (#41302887)
That sounds like a nightmare when an IDE presents files alphabetically but has a strict logical order that the UI doesn't understand. Talk about jumping around.
Re:Pragtical: Practical and pragmatic code editor by bunderbunder on Tuesday August 20, 2024 @03:57PM (#41303465)
Editors and IDEs with F# editing modes know how to read the project file and display the files in the correct order.
Re:Pragtical: Practical and pragmatic code editor by msravi on Tuesday August 20, 2024 @03:08PM (#41302972)
> The thing that Vim completely misses is being able to jump to the appropriate file where a class/function is defined.

ctags+cscope in vim is great at this!

  :cs f e <expression>
Re:Pragtical: Practical and pragmatic code editor by olejorgenb on Sunday August 25, 2024 @09:40AM (#41347242)
> I found that being able to jump around easily would hide the fact that my projects were growing in size and complexity.

That is a good point. Having IDE features like auto-import, jump to definition, etc., definitively allow for a more messy project structure.

Still, I always wonder how big projects people advocating "no IDE features" actually have worked on (or alternatively - if they are some sort of memory savants). One thing is a small-medium sized personal project. Another is a 10-20 man cooperation where you have only written a portion of the code, and a big chunk of that is a long time since you written. IMO that require lots of code reading, which is very painful without jump to definition... I don't really see how a perfect project organization could sufficiently remove that reading friction.

Re:Pragtical: Practical and pragmatic code editor by fredsmith219 on Tuesday August 20, 2024 @01:55PM (#41302289)
Yup, it is your works crazy policy of making sure everyone gets a one size fit all VS code Configuration. I’ve loaded VS code on a 10 year-old Lenovo and it runs just fine with only basic Python plug-ins. Five minute startup time is crazy.
Re:Pragtical: Practical and pragmatic code editor by kerkeslager on Tuesday August 20, 2024 @11:09AM (#41300774)
Anyone have any experience building GUIs in SDL?

I have been using Flet (basically multilingual binding for Flutter) to build GUIs the last year or so, and in general the experience has been very good.

However, I've recently started work on a project that has need for a large number of controls--on the order of 2000 controls visible at one time--and I'm running into Flet's limitations. All the Flet controls have animations, which creates a good default experience when there's a few of them, but when you're using 2000 of them, simply passing your mouse over an area with a bunch of controls causes a cascade of small animations and the renderer explodes. Impressively, it usually doesn't seem to cause any performance lag, but it seems like the way they avoid lag is just by dropping the animations half-rendered which causes the window to flash all sorts of broken half-rendered gobbledygook to the screen. My approach has been to turn off animations as much as possible, but there are enough controls visible at any one time that even just rendering the without animations is running into issues.

I'll probably just deal with it for my first version--the core functionality is about number crunching and the user base is used to using much worse UIs--but I'm looking at lower-level tooling that can still remain cross-platform. In this post I'm seeing that Pragtical is advertising that they're written with SDL and I'm seeing some similarities between a code editor and what I'm doing, so it seems like that might be the solution to my problem.

Re:Pragtical: Practical and pragmatic code editor by stephc_int13 on Tuesday August 20, 2024 @11:17AM (#41300835)
Not sure if this is mentioned somewhere, but it looks like a fork of the lite editor, also built on top of SDL and Lua.
Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @10:43PM (#41306280)
It is a fork of Lite XL, which itself is a fork of Lite. So, it is a fork of a fork of Lite.
Re:Pragtical: Practical and pragmatic code editor by mdaniel on Tuesday August 20, 2024 @01:14PM (#41301894)
https://github.com/pragtical/plugins/commit/54096a6461f5c034... makes me long for The One Grammar To Rule Them &trade;

I thought for a while that TextMate bundles[1] were that, especially since JetBrains[2], Linguist[3] and VSCode[4] honor them. However, in the spirit of "the good thing about standards ..." highlight.js does[5] almost the same thing that Pragtical does which makes me feel even worse

I had high hopes for Tree-Sitter since it seems to have really won mindshare, but the idea of having an executable grammar spec[6] is ... well, no wonder it hasn't caught on outside of that specific ecosystem

1: https://github.com/rspec/rspec.tmbundle/blob/1.1.12/Syntaxes...

2: https://github.com/JetBrains/intellij-community/blob/idea/24...

3: https://github.com/github-linguist/linguist/blob/v7.30.0/lib...

4: https://github.com/microsoft/vscode-textmate

5: https://github.com/highlightjs/highlight.js/blob/11.10.0/src...

6: https://github.com/tree-sitter/tree-sitter/blob/v0.22.6/test...

Re:Pragtical: Practical and pragmatic code editor by emrah on Tuesday August 20, 2024 @01:58PM (#41302320)
> light weight

Honestly that's not an issue, I would personally not base my judgment on memory usage, unless it is a memory hog.

I know others do but for reasons that go beyond practical. For those that have things to get done, I suspect they think like I do.

Re:Pragtical: Practical and pragmatic code editor by unregistereddev on Tuesday August 20, 2024 @04:08PM (#41303537)
> I know others do but for reasons that go beyond practical. For those that have things to get done, I suspect they think like I do.

Please don't pass judgement on my preferences or whether they are practical. IntelliJ uses multiple GB of ram. Teams uses most of a gig. My browser uses a couple gigs. Docker containers eat a lot of it. When I am multitasking and everything is a memory hog, I'm forced to choose between using lighter-weight tooling and continually opening and closing apps. Using lighter-weight tooling is the practical choice.

Re:Pragtical: Practical and pragmatic code editor by emrah on Friday August 23, 2024 @04:50PM (#41332981)
You skipped over "unless it is a memory hog". When an app uses multiple gigs, it's a memory hog :-)
Re:Pragtical: Practical and pragmatic code editor by max_ on Tuesday August 20, 2024 @03:08PM (#41302969)
3.5 MB is great news, I am happy it's not another electron editor.

I will be trying this!

Re:Pragtical: Practical and pragmatic code editor by hollerith on Tuesday August 20, 2024 @03:32PM (#41303194)
Like other apps that use SDL, this (Pragtical) is blurry on Gnome with the scale-monitor-framebuffer experimental feature enabled and scaling set to some value other than 1.00.
Re:Pragtical: Practical and pragmatic code editor by teo_zero on Tuesday August 20, 2024 @07:40PM (#41305216)
Micro-review after having used it for half a day on Windows.

It seems really lightweight: the UI is spartan but snappy, loading a file is instantaneous, etc. Downloading and installing a plugin is as easy as dropping a Lua file into a directory. And even after installing several plugins, the speed doesn't seem affected.

On the other hand, it comes with hardly any feature out of the box, and everything must be covered by plugins. The plugins are really "atomic". For example, one is to auto-indent, another one to auto-format a block; one is to highlight the matching bracket a second one to jump to the matching bracket, and a third one to automatically insert the closing bracket, while yet another one draws rulers to visualize the block between matching brackets. Do you want to set markers and jump between then? another plugin. Build from within the editor? another plugin. And so on...

The plugin "store" looks good, but accessing it from inside the editor is a poor experience: sometimes it just hungs and you have to restart the editor. Additionally the fact that plugins, themes and fonts are all mixed up doesn't make it easy to find what you're looking for.

Final judgement: if I need to select and install 10 to 15 plugins just to make it on par with a stock Vim, I'll stay with the latter.

Re:Pragtical: Practical and pragmatic code editor by rd07 on Tuesday August 20, 2024 @10:30PM (#41306234)
IMO, Pragtical (and Lite XL) is closer to Atom ideologically where almost everything is a plugin. But compared to Atom, they ship the bare minimum of plugin in their release and let user install the rest as they need. Pragtical is better in this regards than Lite XL where they ship better UI improvement and default plugin, for example the setting page must be installed as a plugin in Lite XL but already shipped as part of Pragtical release. I agree with you that they should add some plugin as part of their core app to increase user's experience out of the box though.
Re:Pragtical: Practical and pragmatic code editor by system7rocks on Wednesday August 21, 2024 @12:59AM (#41306918)
Just FYI, the thing crashed on me in inventive ways.

First, the ARM version, when I tried to launch it, had MacOS say it was damaged. Only option was to move it to the trash.

The Universal option did work, but when I tried to open a standard .c file, it crashes. It is fast though and fairly slick looking. But needs work.