Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fabiospampinato
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
fabiospampinato
4y ago
The conditional check in the example code I provided is pretty much just the if/else that one writes, that's as closely located as you can possibly write it I guess. Like if some signals are read under a branch that's never t
62.
▲
by
fabiospampinato
4y ago
It's a matter of opinion at best, for example I hate dependency arrays, and rules of hooks I find very weird, I understand why they are there, but to my brain they just fundamentally feel like workarounds for the lack of signals.
63.
▲
by
fabiospampinato
4y ago
Is shipping less JS important for your use case? If so Preact can be 10x smaller than React. If only you could do that with all of your dependencies that'd be outstanding. According js-frameworks-benchmark it's also faster at runt
64.
▲
by
fabiospampinato
4y ago
Each case and each person is different, maybe dependencies arrays just work better for you. Potentially huge effects that read a couple of signals shouldn't exist, because you can always read the signal at the top and pass their values
65.
▲
by
fabiospampinato
4y ago
I think if you import it from solid/h then you can use TS' transform. But I guess you would look compatibility with the ecosystem as Solid would work slightly differently.
66.
▲
by
fabiospampinato
4y ago
> Is the main draw of this performance? I guess performance in some cases, but mainly better developer experience. > I actually like how useEffect has an explicit dependency array because you know when it will be triggered. Signal eff
67.
▲
by
fabiospampinato
4y ago
One-way or two-way binding is pretty much completely orthogonal. You can have both approaches in both systems. For instance Solid is pretty close to React in unidirectional flow and read/write segregation. I think the appeal of a react
68.
▲
by
fabiospampinato
4y ago
Deep reactivity can be implemented on top of the provided functions, I have a version of that for Preact that doesn't seem super broken here: https://codesandbox.io/s/sparkling-cherry-bn9bu5?file=/src/i..
69.
▲
by
fabiospampinato
4y ago
These are difficult to understand concepts imo. I have written an annotated implementation of a simple reactive system (you may want to run it through Prettier if that's your thing): https://github.com/fabiospampinato&#
70.
▲
by
fabiospampinato
4y ago
Solid uses a custom Babel transform. Interestingly performance and simple build process aren't mutually exclusive, you can get both, the transform provides (arguably) convenience features mainly.
71.
▲
by
fabiospampinato
4y ago
Pretty exiting stuff. It feels like there's a new cool model being trained every week, the probability that some of the upcoming ones won't have a huge impact on the world in the next few decades seems close to 0% to me.
72.
▲
by
fabiospampinato
4y ago
Nice! I had written a little algorithm that one could use to implement something like this (maybe interesting if you want to understand how it could work): https://github.com/fabiospampinato/crypto-puzzle I think there
73.
▲
by
fabiospampinato
4y ago
Yes proteins can be dynamic, and multiple proteins can come together to form bigger structures (like a cell's membrane for example), and they can very much interact with other proteins and molecules in complex ways. I think AlphaFold g
74.
▲
by
fabiospampinato
4y ago
You are basically made of proteins, which are basically folded sequences of amino acids, proteins are molecular machines that are the fundamental building block of animals, plants, bacteria, fungi, viruses etc. So yeah the applications are
75.
▲
by
fabiospampinato
4y ago
Noun.
76.
▲
by
fabiospampinato
4y ago
And "screw" in Italian.
77.
▲
by
fabiospampinato
4y ago
It would give you the inability to use the same bundler for server-side only code, I believe. I'd say if there's nothing that you really need your set-up is pretty much perfect already. You may want to stick a dedicated filesystem
78.
▲
by
fabiospampinato
4y ago
Not to be unnecessarily dismissive, but installing Parcel makes me a 201MB node_modules folder. That's more dependencies/code than I'm comfortable relying upon.
79.
▲
by
fabiospampinato
4y ago
Oh wow, for comparison you can fit about a third of the "typescript" NPM package in that much space.
80.
▲
by
fabiospampinato
4y ago
> I don't think it's needed here because it can be created with an `$effect`. It returns a `stop` function that can be called with `true` to dispose of all inner computations. I think I should provide a `$root` function that&#x
81.
▲
by
fabiospampinato
4y ago
Much smaller than ~800B? It looks like ~5kb min+gzip according to bundlephobia ( https://bundlephobia.com/package/xstream@11.14.0 ).
82.
▲
by
fabiospampinato
4y ago
> I don’t understand the purpose of effect. Seems like compute can be used in all cases since you can dispose compute as well. Not OP, but: - You could just use computeds instead of effects, but: - Effects don't have an internal
83.
▲
by
fabiospampinato
4y ago
I'm not sure that's really true for something like this, I've been working on something similar myself in these past few months, it got to about 5kb min+gzipped with all things included, and there's _a lot_ included, but
84.
▲
by
fabiospampinato
4y ago
It may be as a safety measure, it's much less likely to misuse the setter if it's divided into two different functions. If it's just one function you need to constantly ask yourself "wait, am I setting a function or not?
85.
▲
by
fabiospampinato
4y ago
Do you have an implementation of the cellx benchmark? [0] It'd be interesting to see how it will perform there. [0]: https://codesandbox.io/s/oby-bench-cellx-s6kusj?file=/lib.js
86.
▲
by
fabiospampinato
4y ago
Nice! I love these tiny libraries. Some random thoughts: - I like that the effect function returns a disposer. - I don't entirely understand what it means to dispose of observables, is that just an internal optimization for cleanups ba
87.
▲
by
fabiospampinato
4y ago
Hey everyone, I just finished polishing a bit this little framework I've been working on in the past few months. I thought some people here might find it interesting, it's basically a different take on Solid, with a focus on the c
88.
▲
Voby: New React-like framework with Solid-like performance (no Babel, no magic)
(github.com)
3 points
by
fabiospampinato
4y ago
|
1 comments
89.
▲
by
fabiospampinato
4y ago
No, the difference is that if you pass to Solid's <For> a signal to an array, and make a node for each of the values of that array, and then you change the signal to point to an empty array, then Solid just deletes those nodes an
90.
▲
by
fabiospampinato
4y ago
I'm not sure. But FWIW I don't think more complex nesting would change anything in this regard. Those transforms essentially just avoid you having to wrap some things in functions manually, and avoid some extra function calls. Avo
More ›