Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xscott
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
211.
▲
by
xscott
2y ago
I thing we agree. JavaScript is awful, and TypeScript is simultaneously impressive and still awful. I think we have three options: A) Get your hands dirty and write what you want. Once. B) Chant along with the mob who doesn't even u
212.
▲
by
xscott
2y ago
It's a rule, and it behaves like people probably expect for small numbers. But following that rule: float(0.5) + bigint(9007199254740993) == float(9007199254740992) I wouldn't parade it around as a triumph ov
213.
▲
by
xscott
2y ago
> Besides his nick, was he smug? Saying, "That's nice." is a cliche condescension. You're free to disagree, but I think his intent was clear.
214.
▲
by
xscott
2y ago
> Thanks for your simple concrete examples and explanations! I'm glad someone liked it :-) > I love his description of Forth as "a weird backwards lisp with no parentheses" I've been interested in that duality betw
215.
▲
by
xscott
2y ago
> I need to write some arcane function signature language for every DOM manipulating function You really don't know that you can create WebAssembly in other languages?!? I used WAT to keep the example short, but that's clearly
216.
▲
by
xscott
2y ago
> you are not answering my question Lol, your question asked me what I meant. I told you what I meant. > are there any WASM based webapps that are as fast as pure js webapps? You can browse links from Google for examples and benchmar
217.
▲
by
xscott
2y ago
You gotta read between the lines with the commenter above. Their name is a reference to "Smug Lisp Weeny", and they're part of the religion (cult) that thinks everything in Lisp (usually Common Lisp) is perfect. He couldn&#
218.
▲
by
xscott
2y ago
> This is what StackOverflow tells me (2020) Web Workers can't directly access the DOM in JavaScript either. This is not a WebAssembly problem. If you want a Web Worker to manipulate your document, you're going to post events
219.
▲
by
xscott
2y ago
Because it's already solved from day one and people keep repeating that it's a problem anyways. Anything you can do in JavaScript, including access to the DOM, can be put into a JavaScript function. You can import that function i
220.
▲
by
xscott
2y ago
Nice or not, pretending that double precision floats and arbitrary precision integers can be stacked as a tower is foolish. There are floats that can't be represented as integers, and integers which can't be represented as floats
221.
▲
by
xscott
2y ago
Thank you for the links. To the extent I understood it from a quick reading, it all looks like stuff you could get with the existing import/export mechanisms. I would choose (modified) UTF-8, but I understand why UCS16 is always goin
222.
▲
by
xscott
2y ago
What would access to the DOM look like? WASM already has import and export (nearly) arbitrary functions. People keep saying it can't manipulate the DOM, but it clearly can. So, what's missing?
223.
▲
by
xscott
2y ago
Previously you said: > [...] go through the javascript host, which is slow And now you admit: > this is going beyond my level of experience [...] > how much slower, i don't know I guess people just repeat what they hear withou
224.
▲
by
xscott
2y ago
You're two library functions away from having it easy: Copy from JavaScript to WebAssembly: Use TextEncoder to convert a JS String to Uint8Array Copy the bytes from the Uint8Array to WemAssembly.Memory Copy f
225.
▲
by
xscott
2y ago
I used LPC a long time ago on an LP Mud, so Pike has always had a fond spot in the back of my mind, even if I don't use it now. However, that works for int and bigint, but Number (double precision) can represent numbers that BigInt can
226.
▲
by
xscott
2y ago
> I don't know what you are talking about. I can see that. Iterators don't do what you think they do. A random access iterator on std::vector is practically indistinguishable from a pointer. It doesn't check for out of b
227.
▲
by
xscott
2y ago
Can you give an example of anything anywhere that manipulates the DOM without using JavaScript? Because it seems to me that pretty much every web application is currently using the javascript host, and the well written ones are pretty snap
228.
▲
by
xscott
2y ago
That part caught my attention too. It reminds me of the discussion to remove complex numbers from Go. Funny enough, compiler writers can't even imagine why you would want BigInt or Complex, because those aren't useful for writin
229.
▲
by
xscott
2y ago
"trampoline business"? It supports nearly arbitrary imports of anything you want. How much more flexibility do you need? You could provide an `eval` function to run arbitrary code with a small amount of effort. Is the problem th
230.
▲
by
xscott
2y ago
What parts are not available? WebAssembly can call arbitrary JavaScript through imports. You could literally provide an `eval` function if you were motivated to.
231.
▲
by
xscott
2y ago
I think somebody could write a safe C++ library, but the STL hands out dangling references like candy at Halloween. It's very easy to get use-after-free problems with it.
232.
▲
by
xscott
2y ago
I wonder why approval voting seems to always get lost in the discussion. It seems so much simpler, and it doesn't have the frailty where a close race for third or fourth place can radically change the results for first place at the la
233.
▲
by
xscott
2y ago
We'll never know if prices would be exorbitant under a free market in the US because we've got a nasty mix of corrupt insurance companies, healthcare administrators, and political lobbying (bribery) keeping it from being a free ma
234.
▲
by
xscott
2y ago
That's a brilliant scene. However, I suspect most people aren't trying to convince/persuade/change the crowd either. Instead I think they're seeking approval from the subset of the crowd that already prefers vanil
235.
▲
by
xscott
2y ago
Whatever war is worth fighting, I sincerely doubt it will be won on an internet forum. In fact you'll just make your enemy more resolved to oppose you. > The fetish people have for polite discourse is itself bad-faith. Ok then, her
236.
▲
by
xscott
2y ago
Your honesty is refreshing, but the result is depressing. It sure would be nice to have a place where you could discuss ideas without it being an argument, or to offer helpful suggestions to people without them treating it like you insulted
237.
▲
by
xscott
2y ago
And your goal is to win the war instead of having a good faith discussion? Maybe you didn't read the article. They didn't suggest putting on kids gloves and siting your references. In fact, that was explicitly rejected as a good
238.
▲
by
xscott
2y ago
Another link with the same data in a table: https://taxfoundation.org/data/all/federal/latest-federal-in... It's funny. If you had 100 people in a room, there's one guy paying for about 45 people.
239.
▲
by
xscott
2y ago
> Presuming you mean infrastructure Why would you presume that? The guy I replied to made an argument about ICEs being more complex than electric motors. And fwiw, it looks like that post has been edited a ton. I was replying to a rela
240.
▲
by
xscott
2y ago
> The engineer in me sees the complexity argument as insurmountable. The programmer in me dislikes complexity too, but if we apply your argument to cell phones vs land lines, we can see that simplicity doesn't always win.
More ›