8 ms·
Pragtical: Practical and pragmatic code editor
- truckerbill 2y agoIs it possible to do custom drawing modes for diagrams and viewers?
- vouaobrasil 2y agoLooks a lot like LiteXL. Is it based off it? What makes it different?
- cation234 2y agoAccording to its Github page, yes it is a fork of LiteXL.
- throwaway744678 2y agoA bit of context: Motivation about Pragtical Text Editor [0] [0] https://github.com/pragtical/pragtical/issues/6#issuecomment-1581650875 https://github.com/pragtical/pragtical/issues/6#issuecomment...
- hans_castorp 2y agoThe user interface font is way too small and nearly impossible to read on a 4K monitor (on Windows)
- Fluorescence 2y agoLooks 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.
- rd07 2y agoYou can change the scale setting through Settings > Plugins > Scale and see the best setting for your monitor
- swah 2y agoDidn't make a difference here (restarted too, ofc)
- geenat 2y agoAs 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.
- ta8645 2y agoFor what it's worth, NeoVim's extension language is Lua as well.
- srik 2y agoYup. I've paradoxically found it more convenient to write my neovim plugins+configuration in lua than in python with vanilla vim's python api.
- coliveira 2y agoVim also has support for Lua scripts.
- maleldil 2y agoNot 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).
- coliveira 2y agoI 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.
- torginus 2y agoThe UI gives me a Godot-y vibe. Is there some relation?
- k__ 2y ago"runs locally on your machine as a CLI application" Hrm, I was hoping it would run all in the browser. Cool idea nevertheless!
- meiraleal 2y ago> Hrm, I was hoping it would run all in the browser. like Monaco? Or a proper fully featured text editor?
- wordpad25 2y agoProject was founded specifically to counter the modern trend of using web stack for editors
- rd07 2y agoLite 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/ https://lite-xl.com/playground/
- BigParm 2y agoHow does it occupy 30MB ram but 5MB disk space does it grow
- a-french-anon 2y agovoid *p = malloc(30 * 1024 * 1024);
- BigParm 2y agoMakes 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.
- genezeta 2y agoIn 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.
- _benj 2y agoJust 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!
- swah 2y agoNo LLM plugins yet?
- rd07 2y agoAFAIK, not yet
- swah 2y agoDownloaded 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.
- Weethet 2y agoYeah, 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
- atlintots 2y agoWhy 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.
- genezeta 2y agoA few comments below yours: https://news.ycombinator.com/item?id=41298071 https://news.ycombinator.com/item?id=41298071
- TechMaverick 2y ago[flagged]
- prmoustache 2y agoDoes it have a multiple modes support and vim-like keybindings either vanilla or through plugins?
- artemonster 2y agoDo 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?
- ben-schaaf 2y agoImmediate mode is the way a rendering API works. Most glyph rendering works by blitting from a buffer, regardless of how they design the API.
- mosburger 2y agoIs 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.
- kccqzy 2y agoThat sounds like a code signing error. 7.9MB is a good size.
- yas_hmaheshwari 2y agoI 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/ ```
- deleted 2y ago[deleted]
- tunaoftheland 2y agoHaven'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).
- tom_ 2y agoAn 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.
- brisket_bronson 2y agoI 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.
- fusslo 2y agoTangential: 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.
- avhb 2y agothe peacock vscode extension can help you with this: https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock https://marketplace.visualstudio.com/items?itemName=johnpapa...
- fusslo 2y agoholy crap thank you
- rudnevr 2y agoIntelliJ does, of course. Per project, per window, with background images etc
- r-spaghetti 2y agoin 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)
- TiredOfLife 2y agoVS Code you can have different Theme per Workspace.
- mnmalst 2y agoDoesn't pick up my (non ttf) Terminus font and there is no obvious way to set the font manually.
- cynicalpeace 2y agoAny 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.
- elashri 2y agoI 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.
- cynicalpeace 2y agoI said "beginning"
- from-nibly 2y agoI 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?
- cynicalpeace 2y agoIt 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.
- meiraleal 2y agoas an extension it already exists, nothing new in that front.
- Cthulhu_ 2y agoNah; 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.
- bunderbunder 2y agoNot 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.
- from-nibly 2y agoDirenv + nix packages is way better than Dev container development in my experience.
- lucianbr 2y ago
- kerkeslager 2y agoAnyone 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.
- stephc_int13 2y agoNot sure if this is mentioned somewhere, but it looks like a fork of the lite editor, also built on top of SDL and Lua.
- rd07 2y agoIt is a fork of Lite XL, which itself is a fork of Lite. So, it is a fork of a fork of Lite.
- mdaniel 2y agohttps://github.com/pragtical/plugins/commit/54096a6461f5c034cdfcc5b528eb706d4936217f?diff=unified&w=0 https://github.com/pragtical/plugins/commit/54096a6461f5c034... makes me long for The One Grammar To Rule Them ™ 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/RSpec.tmLanguage https://github.com/rspec/rspec.tmbundle/blob/1.1.12/Syntaxes... 2: https://github.com/JetBrains/intellij-community/blob/idea/242.21829.40/plugins/textmate/loadVSCBundles.sh https://github.com/JetBrains/intellij-community/blob/idea/24... 3: https://github.com/github-linguist/linguist/blob/v7.30.0/lib/linguist/languages.yml https://github.com/github-linguist/linguist/blob/v7.30.0/lib... 4: https://github.com/microsoft/vscode-textmate https://github.com/microsoft/vscode-textmate 5: https://github.com/highlightjs/highlight.js/blob/11.10.0/src/languages/asciidoc.js https://github.com/highlightjs/highlight.js/blob/11.10.0/src... 6: https://github.com/tree-sitter/tree-sitter/blob/v0.22.6/test/fixtures/test_grammars/readme_grammar/grammar.js https://github.com/tree-sitter/tree-sitter/blob/v0.22.6/test...
- emrah 2y ago> 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.
- unregistereddev 2y ago> 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.
- emrah 2y agoYou skipped over "unless it is a memory hog". When an app uses multiple gigs, it's a memory hog :-)
- max_ 2y ago3.5 MB is great news, I am happy it's not another electron editor. I will be trying this!
- hollerith 2y agoLike 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.
- teo_zero 2y agoMicro-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.
- rd07 2y agoIMO, 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.
- system7rocks 2y agoJust 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.