Hacker News
Show HN: Write Go code in JavaScript files
tkzed49
|next
[-]
liampulles
|next
|previous
[-]
I've seen teams do this in the wild more than once.
zikani_03
|next
|previous
[-]
Used a similar technique using tinygo wasm builds (without Vite ofcourse) on toy project where WASM based functionality acted as a fallback if the API wasn't available or user was offline - found it an interesting pattern.
foreigner
|next
|previous
[-]
b_e_n_t_o_n
|next
|previous
[-]
pjmlp
|next
|previous
[-]
Cthulhu_
|root
|parent
|next
[-]
kitd
|root
|parent
|previous
[-]
onion2k
|root
|parent
[-]
As for cryptography, trusting that the WASM build of your preferred library hasn't introduced any problems demonstrates a level of risk tolerance that far exceeds what most people working in cryptography would accept. Besides, browsers have quite good cryptographic APIs built in. :)
tgv
|root
|parent
|next
[-]
The browser often runs on an immensely powerful computer. It's a waste to use that power only for a dumb terminal. As a matter of fact, my laptop is 6 years old by now, and considerably faster than the VPS on which our backend runs.
I let the browser do things such as data summarizing/charting, and image convolution (in Javascript!). I'm also considering harnassing it for video pre-processing.
preommr
|root
|parent
|previous
[-]
... I mean... elaborate?
Everytime I've heard somebody say this, it's always a form of someone stuck in the 90s/00s where they have this notion that browsers showing gifs is the ceiling and that real work can only happen on the server.
Idk how common this is now, but a a few years ago (~2017) people would show projects like figma tha drew a few hundred things on screen and people would be amazed. Which is crazy, because things like webgl, wasm, webrtc, webaudio are insanely powerful apis that give pretty low level access. A somewhat related idea are people that keep clamoring for dom access in wasm because, again, people have this idea that web = webpage/dom, but that's a segway into a whole other thing.