🌉 bridged from @hypertown@lemmy.world by Tidepool
hypertown
@hypertown.lemmy.world.ap.tdpl.io
I made very simple and extremely fast Live Reload Server in just pure lua
lemmy.worldcross-posted from: https://lemmy.world/post/41297887
I really wanted a HTML live reload plugin that has statusline integration and does not depend on entire chromium to create a simple web server. I couldn't find anything I'd like so I've decided to make my own plugin. I was kinda afraid that implementing websockets in lua would be terrible task but it turns out I didn't need to, because SSE exists. HTTP is simple, watching for file changes as well so I got to work. Result: Very small (Less than 500 lines of code) plugin that launches in 0.1-0.2ms! (It's amazing what you can do when you don't need to load whole V8 from Chromium to serve a simple webpage. I also made support functions for statusline of two popular distors: NvChad and AstroNvim but you can also launch it from cmds if you prefer. Since I'm kinda new to nvim & lua scripting I'd appreciate any feedback on what could be improved or just done better. For now I plan to add more features inspired vscode's live-server extension although it most likely won't be exact copy of that extension. Link: GitHub Repository
lemmy.world
"Paper on back prank (failed successively)" by @MarybuNni
cross-posted from: https://lemmy.world/post/24928474
C++
Recursion
Uoh no!
Simple is good no matter the era
Remember to test your tests
Frustration sometimes wins
lemmy.worldlemmy.world
Of course I like programming on Windows (big lie)
Next time for sure!
lemmy.worldlemmy.world
As long as it works...
It took a lot of work to make it work, you know?
( ̄▽ ̄)ノ
Me at 27: Check out this cool bug I wrote!
Yuki Installs Gentoo
youtube.com
www.youtube.com