News for hackers. Stuff that matters.
Re:We need visual programming. No, not like that by FireInsight on Monday July 15, 2024 @04:31AM (#40966153)
I don't know what TypeScript projects you have worked on, but every one I have worked on is instant reload all the way down. Rust, on the other hand, is pretty miserable.
Re:We need visual programming. No, not like that by anonzzzies on Monday July 15, 2024 @04:44AM (#40966201)
I don’t know; I am a programmer but more of a trouble shooter (it makes far more) and projects passing 100k LoC in ts which I see 100s a year, are not instant, in any way. I would love to see one, but I contribute to open source projects, and it’s all slow, very very slow.
Re:We need visual programming. No, not like that by fwsgonzo on Monday July 15, 2024 @05:28AM (#40966379)
I have a 1,5M LOC game codebase, where both the server and client builds and starts nearly instantly. Probably < 3sec total iteration time just because of typing stuff in the terminal. Build system is just a casual ccache + mold. But you have to do a lot of stuff in the background during startup.
Re:We need visual programming. No, not like that by anonzzzies on Monday July 15, 2024 @05:52AM (#40966463)
Let’s see it. To not be a total gobshite, go download these things and see what ‘instant’ really doesn’t mean. Instant means not wait 1 second; it means when I type code, it has results in milliseconds. None of these have that.

Or show me a non trivial open source ts project that’s instant; doesn’t exist and I have literally no clue why people keep defending this stuff; you didn’t make it right? I would be embarrassed but definitely not defending it.

https://www.kirandev.com/open-source-nextjs-projects-open-fo...

Re:We need visual programming. No, not like that by az09mugen on Monday July 15, 2024 @06:58AM (#40966734)
While I totally agree with you, I'm looking for a counter example. The only one which comes to my mind, is non trivial and quite fast for js/ts is this : https://github.com/tsoding/raycasting An implementation of raycast in a 2D canvas The dev tried to implement hot reloading, and you can see all the process there https://www.youtube.com/playlist?list=PLpM-Dvs8t0VZ08cYW6yqN...

Even though I didn't measured the loading time, an effort has been made to accelerate everything that could be accelerated.

Re:We need visual programming. No, not like that by jbverschoor on Monday July 15, 2024 @07:36AM (#40966912)
Even the simplest type inference can cause typescript to stall for minutes. The problem is in the inference. That problem goes away when you're actually specifying types. Tooling should add typing automatically (not implicitly)
Re:We need visual programming. No, not like that by zarathustreal on Monday July 15, 2024 @08:12AM (#40967128)
Minutes? There’s no way you’ve seen a minutes-long stall caused by TypeScript inference..I need to see some evidence on this one
Re:We need visual programming. No, not like that by jbverschoor on Monday July 15, 2024 @05:37PM (#40971683)
I'll look into it.. But yeah, had that multiple times (older versions though). Specifying the type solves is, and I was not the only one after some googling
Re:We need visual programming. No, not like that by nox101 on Monday July 15, 2024 @05:07AM (#40966304)
I'm working on 250k LoC TS project. It's instant during dev. We don't bundle during dev so the server just has to compile which ever files changed.
Re:We need visual programming. No, not like that by anonzzzies on Monday July 15, 2024 @05:21AM (#40966352)
Well, I would love to learn how it’s possible: you have a blog or YouTube or something?
Re:We need visual programming. No, not like that by e1g on Monday July 15, 2024 @05:56AM (#40966487)
Our front end is ~200k LOC of TypeScript and all changes are instant (<1s).

TypeScript compiler is too slow for hot module replacement so it’s used only for IDEs. During development, all transformation happens via esbuild/swc and is abstracted away with Vite https://vitejs.dev/

Re:We need visual programming. No, not like that by brabel on Monday July 15, 2024 @06:58AM (#40966733)
esbuild does not do type checking. You must invoke tsc explicitly to do that.
Re:We need visual programming. No, not like that by e1g on Monday July 15, 2024 @08:58AM (#40967467)
Type-checking is helpful in your IDE (for developer hints) and in your CI (for verification), but you don't want type-checking in your hot-reloading dev loop.
Re:We need visual programming. No, not like that by brabel on Monday July 15, 2024 @10:42AM (#40968301)
I pointed that out because your previous comment could be misinterpreted to mean you do full type checking on your dev cycle, which you probably don't.
Re:We need visual programming. No, not like that by anonzzzies on Monday July 15, 2024 @06:04AM (#40966521)
On what hardware? I have a m3 and yeah, it’s terrible with ts. Instant (milliseconds) with cl (of el even). Go is not terrible.
Re:We need visual programming. No, not like that by e1g on Monday July 15, 2024 @06:13AM (#40966551)
Same, M3. The DX within a modern frontend stack is indistinguishable from Bret Victor’s ideas (even if a decade late).
Re:We need visual programming. No, not like that by anonzzzies on Monday July 15, 2024 @06:22AM (#40966585)
Ok, when can we meet? I have never seen it work, and, as said, I review 100s of project a year; everything ts is super slow so far. Maybe you have something.
Re:We need visual programming. No, not like that by brabel on Monday July 15, 2024 @10:45AM (#40968330)
Their hot reload cycle is fast because esbuild doesn't type check the code, it just removes types from Typescript so it turns into JS (it may do minification and tree shaking but in dev, they probably remove that). I've written some esbuild plugins and can confirm that on incremental builds, esbuild will probably never take more than a few ms even on larger projects (because it doesn't matter how big your project is, esbuild will only rebuild what changed, which usually is a few files only).
Re:We need visual programming. No, not like that by anonzzzies on Tuesday July 16, 2024 @02:29AM (#40974053)
No one wants to show me though. Is that not weird? Fanbois say it is, but not one person even sends an open source project that demonstrates it. I don’t understand that? Please show me a non trivial project on GitHub that does this in ms like you say. All I try are slow af. Emacs is notoriously slow as a lisp; it is always faster, for me, than anything ts and definitely not trivial. Sbcl/cl blows it all away. Please an example in ts or it didn’t happen.

Download some horror show like Unkey and show a video of its millisecond hot reload…

Re:We need visual programming. No, not like that by e1g on Tuesday July 16, 2024 @08:25PM (#40981533)
You are asking for someone else to do a demo of something trivial that takes 15 minutes to setup yourself (with Vite). Nobody is biting because it’s a strange (and, frankly, lazy) request.

If you tried and still think such a setup is not possible, send me an email (in profile) and I can do a 10-15 minute show&tell.