Hacker Newsnew | past | comments | ask | show | jobs | submit | onsclom's commentslogin

I don't necessarily hate Lua, but I prefer C and Raylib for game dev. Lua is garbage collected, dynamically typed, strays far from standard syntax patterns, and has less existing tooling than C.

I see why people might hate Lua. Especially for game dev!


Luajit is often faster than C. The qualities you described above actually make it great for game dev.

A JIT is a double edged sword, it _can_ make your code faster, i remember in the early days of smartphone gaming, developers often had to manually "warm up" the JIT to prevent stutters during gameplay

It still is an issue nowadays https://discussions.unity.com/t/app-needs-warmup-first-slow-...

Similar story with the GC, it's nice to have, until it causes you problems (wich it will), so you end up having to avoid using it and instead rely on manual techniques

JIT and GC aren't the panacea people make them out to be


True using a JIT without understanding it is not a panacea. Same as a GC. Same as malloc and free (you're often much better off with arena allocators).

Most JITs let you tune when and how they inline. It's also worth knowing how they works and what they can/can't inline.

You linked to monojit. Luajit is a whole other beast. I'd argue it's superior to anything in JS/JAVA/C# land (and I say that as someone with a reasonable understanding of the JVMs C2 JIT).

As an aside with low latency GCs like the JVM's ZGC trading manual memory management for no memory related security vulnerabilities is pretty appealing.

Like everything in programming it's a trade off.


Lua is extremely popular for game dev though?

this is the way to go!

making a move should automatically copy the new url to your clipboard. you can still keep the ascii charm by server side rendering the ascii chess board as an og description.


made a non-ascii of this where nice og images of the board are generated!

https://correspondence-chess-production.up.railway.app/


`const foo = function() {}`


I'm guessing you don't consider VSCode an IDE? I'm curious, what features do you use in IDEs that are missing in VSCode?


I am not considering VSCode as a IDE. Because Microsoft, the creator of VSCode, does not consider VSCode as IDE.

They have a IDE called Visual Studio and it is different from VSCode


Implicit reactive `let` statements make the code harder to understand for humans AND the compiler. This new explicit state pattern even simplifies designing. Now reactive state can work outside of components and across files as you would expect. It was tricky in all three ways.


Make sure you opt in to use runes!

You can do it project wide or per component: https://svelte-5-preview.vercel.app/docs/runes


> The easiest way to opt in to runes mode is to just start using them in your code.

Opt-in is optional, no?


Whoops, I missed that. Good catch! I'm not sure how tln's problem is happening then.


Instead of finding reactive dependencies at compile time, `$effect` and `$derived` automatically track dependencies at runtime. This might feel like it would result in a performance decrease, but it is what SolidJS has been doing. And SolidJS is #1 in most performance benchmarks!


Fair points, though React has hugely complex runtime magic. SolidJS's compiler magic is just as simple while also having much a simpler runtime.


To be fair, assignments to variables still update the state of your component. `count += 1` will still update the state of your component. I think what you meant is that you now need to explicitly declare `count` as state. Personally, I think the magic of Svelte is that assignment part. And now the magic of Svelte works across files and even inside regular `.ts` and `.js` files!


> The $effect runes makes people think we are going down the React useEffect route... but I didn't see a dependency array attached there waiting to obliterate performance?

This is exactly what SolidJS already does, and SolidJS is #1 in almost all performance benchmarks.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: