Why write a whole JSON parser vs. just using the native parser in a worker thread? JS doesn't *have* to be single-threaded anymore, right?
@thedoctor5478
10 ай бұрын
I was wondering this as well. I'm sure Mark has a good reason though. He's obsessed.
@Aquiva
7 ай бұрын
@@thedoctor5478 & @JoeyTren because to pass the results of that parse back to the app or main thread needing it... requires... you guessed it, to serialize it again! Lolol how could they mess this up, that we have to do things like what I did? Some types of objects can be memory pointer swapped (TransferrableArrays, but not JSON/objects!) and worker/threaded parse + Structured Clone isn't as fast. There's also the complexity of it, and less cross-environment/platform friendliness. Book's parseless approach tho will make swapping between threads (and machines) for stuff like this trivial tho, but it replaces JSON entirely. Last commit was pretty close to MVP for people to alpha test, started writing an example/sample for docs, hopefully coming soon (no timeline, oops haha). Thumbs up that you got this message.
@thepr0m3th3an Жыл бұрын
Urbit is the decentralized web.
@austinshearmen9210
Жыл бұрын
I checked it out and while it seems cool I think its dead in the water. You need to pay money to join the network, and even though that'd probably be a good direction for humanity to take, theres no way normies would ever get on board with that
Пікірлер: 5
Why write a whole JSON parser vs. just using the native parser in a worker thread? JS doesn't *have* to be single-threaded anymore, right?
@thedoctor5478
10 ай бұрын
I was wondering this as well. I'm sure Mark has a good reason though. He's obsessed.
@Aquiva
7 ай бұрын
@@thedoctor5478 & @JoeyTren because to pass the results of that parse back to the app or main thread needing it... requires... you guessed it, to serialize it again! Lolol how could they mess this up, that we have to do things like what I did? Some types of objects can be memory pointer swapped (TransferrableArrays, but not JSON/objects!) and worker/threaded parse + Structured Clone isn't as fast. There's also the complexity of it, and less cross-environment/platform friendliness. Book's parseless approach tho will make swapping between threads (and machines) for stuff like this trivial tho, but it replaces JSON entirely. Last commit was pretty close to MVP for people to alpha test, started writing an example/sample for docs, hopefully coming soon (no timeline, oops haha). Thumbs up that you got this message.
Urbit is the decentralized web.
@austinshearmen9210
Жыл бұрын
I checked it out and while it seems cool I think its dead in the water. You need to pay money to join the network, and even though that'd probably be a good direction for humanity to take, theres no way normies would ever get on board with that