Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
onsclom
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
onsclom
3mo ago
Ooh interesting. What is your machine and browser? On chrome with my m1 macbook it takes less than 1ms to compute and render each frame, but I am noticing some things I can optimize from the performance flame graph! I will say, I find chrom
2.
▲
by
onsclom
3mo ago
I made my own WASM demo @ https://microui-wasm.vercel.app/ and it's only 14.6 kB compressed! Will share source code if someone is interested, but key bits: - had a small JS glue layer using CanvasRenderingContext2D to
3.
▲
by
onsclom
6mo ago
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. Especia
4.
▲
by
onsclom
8mo ago
made a non-ascii of this where nice og images of the board are generated! https://correspondence-chess-production.up.railway.app/
5.
▲
by
onsclom
8mo ago
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.
6.
▲
by
onsclom
2y ago
`const foo = function() {}`
7.
▲
by
onsclom
3y ago
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?
8.
▲
by
onsclom
3y ago
These are great points! Thanks for the super thoughtful reply. I'm actually sold. 1. It's really nice that it's so easy to make a `createSignal` 2. I didn't realize that in Solid you had to update all the usage sites too
9.
▲
by
onsclom
3y ago
Whoops, I missed that. Good catch! I'm not sure how tln's problem is happening then.
10.
▲
by
onsclom
3y ago
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 ex
11.
▲
by
onsclom
3y ago
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
12.
▲
by
onsclom
3y ago
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 Solid
13.
▲
by
onsclom
3y ago
Fair points, though React has hugely complex runtime magic. SolidJS's compiler magic is just as simple while also having much a simpler runtime.
14.
▲
by
onsclom
3y ago
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 thi
15.
▲
by
onsclom
3y ago
> 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
16.
▲
by
onsclom
3y ago
If you created `anotherThing` as nested state, then just the children! See this for a real example: https://svelte-5-preview.vercel.app/docs/fine-grained-reacti... Here is the same thing in SolidJS with more explanatio
17.
▲
by
onsclom
3y ago
Most of this I really love. One thing seems a bit strange though... Let's compare Svelte's and Solid's approach to nested reactivity. Both of them implement the same nested reactivity todo example: Svelte: https://
18.
▲
by
onsclom
3y ago
This example is a bit strange to me. I wonder if `$effect` will actually replace all usage of `onMount` and `onDestroy` for Svelte. In Solid you could totally do these things with `useEffect` too, but they chose to keep `onMount` and `onDes
19.
▲
by
onsclom
3y ago
I snooped around Rich's GitHub history and found he's working on esrap[1], a package to convert an AST into code. It uses Bun for development and testing! Crazy theory: esrap will be part of a transpiler that converts Svelte 4 cod
20.
▲
Immediate Feedback in Programming
(reillywood.com)
2 points
by
onsclom
3y ago
|
0 comments
21.
▲
by
onsclom
3y ago
> I wonder if it's possible to put this code in the backend in C++, what do you think? Yeahh, looks like you'd have to connect to all these signals and be able to access sizing/position from C++. Not sure how possible this
22.
▲
by
onsclom
3y ago
Whoops, I should have been more clear. When I said "It's all very unoptimized and dynamic QMLScript" I meant just the file `Flex.qml`. I'm sure the Qt C++ bindings are fast and great, but check out the `updatePositions`
23.
▲
by
onsclom
3y ago
> Note that is also possible to create a new properties and signals for the Text which can be referenced by the children This behavior exists without inheritance as well! Let's imagine we want to use our existing `HelloText` compone
24.
▲
by
onsclom
3y ago
It's really awesome someone did this. If you just want the expressiveness of flexbox and don't care about performance, this is perfect! However, wouldn't the performance for this be very optimal? Check out the `Flex.qml` code
25.
▲
Great Documentation
(onsclom.net)
1 points
by
onsclom
3y ago
|
0 comments
26.
▲
by
onsclom
3y ago
> two panes 10px apart `gap: 10px` > put elements on top of it in the bottom left corner, bottom right corner and align margins of the content within the pane anchoring elements manually is so much easier These instructions seem a bit
27.
▲
by
onsclom
3y ago
> Well, all the core Qt Quick components are written in C++[1]. Other components either reuses them in C++ or QML. So they're mostly C++ underneath. Gotcha, this makes sense. To be fair, browsers write HTML elements like <input&g
28.
▲
by
onsclom
3y ago
Thanks for the nice response! > The flexbox does not seem to match the power of QML. For instance, I can have a two-pane view as simple as: I'm a bit confused by this example. When you make the other pane wouldn't you need to d
29.
▲
by
onsclom
3y ago
> But in my view, the QML paradigm is extremely consistent, even migrating from Qt5 to Qt6 was quite straightforward. I just updated my website to a new NextJS version and so many things broke in React there were serious paradigm changes
30.
▲
by
onsclom
3y ago
I still don't get what advantage QML has over something like Svelte. Writing the QML backend with Rust would be nicer, but why wouldn't I just write my front end using Svelte/TypeScript with something like Tauri at that point
More ›