5 ms·
The perfect editor is when your editing happens within the runtime environment, giving you ultimate feedback speed. Common lisp's REPL come closest to mind. Er
by a_c 5y ago
The perfect editor is when your editing happens within the runtime environment, giving you ultimate feedback speed.
Common lisp's REPL come closest to mind. Erlang's hot swapping is the dopplerganger in deployment world. Bret Victor's inventing by principle is a good analogue to UI programming imo. Imagine editing CSS in browser's inspector, and have the change reflected back to source code. No more switching between editor(IDE) and runtime(browser). I heard smalltalk provide similar development experience, but I had no experience on it yet
- gefhfff 5y agoIs this even possible with languages like Rust and C?
- ximeng 5y agoZig is working on hot reloading, needs compiler and linker level support. https://github.com/ziglang/zig/issues/68 https://github.com/ziglang/zig/issues/68 That issue has some links to people doing it in C/C++.
- yissp 5y agoQuirky as it is, I believe Terry Davis's TempleOS actually allowes REPL-style development in its C dialect (HolyC). I'm not sure how exactly it works, but it's able to compile and execute statements as you type them in.
- thurn 5y agoMun is a subset of Rust syntax which supports hot-reloading, I think that could be a good direction to enable this sort of thing for the most frequently-changing business logic.
- maccard 5y agoI've used Live Plus Plus [0] succesfully for a few years in C++. It's great. [0] https://liveplusplus.tech/ https://liveplusplus.tech/
- nextaccountic 5y agoYes. On Rust specifically https://fasterthanli.me/articles/so-you-want-to-live-reload-rust https://fasterthanli.me/articles/so-you-want-to-live-reload-... (discussed here https://www.reddit.com/r/rust/comments/j0ajdy/so_you_want_to_livereload_rust/ https://www.reddit.com/r/rust/comments/j0ajdy/so_you_want_to...) And then there's this crate https://docs.rs/live-reload/0.2.0/live_reload/ https://docs.rs/live-reload/0.2.0/live_reload/ which works on the same principles as the article above, and is based on C code (i.e. the same approach works for C). On the documentation there's links to "Interactive Programming in C" http://nullprogram.com/blog/2014/12/23/ http://nullprogram.com/blog/2014/12/23/ and "Loading Game Code Dynamically" https://www.youtube.com/watch?v=WMSBRk5WG58 https://www.youtube.com/watch?v=WMSBRk5WG58 (this video by Casey Muratori is btw where I first heard about this technique) There's a bunch of other libraries that work the same way, and some example code that can do this. I can find https://github.com/irh/rust-hot-reloading https://github.com/irh/rust-hot-reloading and https://github.com/porglezomp-misc/live-reloading-rs https://github.com/porglezomp-misc/live-reloading-rs and https://github.com/xixixao/hot-reload-rs https://github.com/xixixao/hot-reload-rs and https://github.com/emoon/dynamic_reload https://github.com/emoon/dynamic_reload And there's https://github.com/draivin/rust-hotswap https://github.com/draivin/rust-hotswap which has a nice API but uses a deprecated rustc internal API and doesn't build anymore. Anyway there was a library that did this in a more elegant way and I just can't find it (perhaps it was rust-hotswap?).
- wrnr 5y agoThat works great for UI but what about backend networking stuff or even for macro like environments like scss, where you write code that writes code, how will you change the input based on the output?
- TacticalCoder 5y ago> ... but what about backend networking stuff or even for macro like environments like scss ... For generated CSS I had Emacs configured to generate the CSS on change and automatically update the "cache buster" token (just to be safe). Clojure(Script) with figwheel takes care of updating the webapp (in dev) on every change in the CSS dir. Really no issue there: everything is instant.
- a_c 5y agoI don't know enough on specific topic to comment. I think it is a spectrum of "speed/ease of feedback". e.g. - Smalltalk, https://squeak.org/ - Haskell, https://ihp.digitallyinduced.com/ for database schema - In python, I use a vim plugin, where you can run highlighter code by pressing Ctrl+R. I forgot the plugin name - If you use erlang, there is no need for the kubernetes - Tiddlywiki, where the result of your editing changes the source code directly In general I think a good development environment is close to either quine or isomorphism (code is data, data is code)
- sysadm1n 5y ago> Imagine editing CSS in browser's inspector, and have the change reflected back to source code There are browser addons that auto-reload a page making your changes visible every few seconds. You can tweak them to reload every 5 seconds or even every minute, depending on how fast you're building the site.
- saurik 5y agoThis is the opposite direction (though I am not sure I would even want to do what was requested).
- sysadm1n 5y agoTypically I have two panes side-by-side. Typically Notepad++ and then a browser window with the webpage I'm editing with LiveReload installed which checks for changes to CSS/JS/HTML. I love getting instant feedback for my code. Having to live in the 'black box' of an editor without instant feedback sounds like hell to me.
- Closi 5y agoBetter still, look at LiveReload which will monitor your css and image files during development and will automatically update the page without a refresh.
- hhaha88 5y agoYou can already do that with a browser. They all still have “save web page”. Perhaps you’re functionally fixed on the idea an editor has to be interacted with like a word processor? It’s all electron state. The boundaries are just UI design. There are drag and drop web app building tools that let you fine tune the code in an inspector window, and transpile to whatever. Perhaps what you need is to simply change how you work. Most contemporary business app building could be visual; I mean look at what experiences Unreal enables with their blueprints. If that coding model can result in AAA games, I don’t see why it can’t replace a whole lot of website building effort. This stuff is possible. It’s just you have to work for the aristocrats or else.
- jareklupinski 5y agochrome dev tools... is a WYSIWYG editor?!?! i cant believe i never thought to just save the source after editing the page the way i wanted in the window