Readit News logoReadit News

Dead Comment

sfvisser commented on When Is WebAssembly Going to Get DOM Support?   queue.acm.org/detail.cfm?... · Posted by u/jazzypants
Muromec · a month ago
>The whole WASM story is confusing to me.

Think of it as a backend and not as library and it clicks.

sfvisser · a month ago
Yes, but that’s exactly what I’m trying to avoid.
sfvisser commented on When Is WebAssembly Going to Get DOM Support?   queue.acm.org/detail.cfm?... · Posted by u/jazzypants
sfvisser · a month ago
We use WASM quite a bit for embedding a ton of Rust code with very company specific domain code into our web frontend. Pretty cool, because now your backend and frontend can share all kinds of logic without endless network calls.

But it’s safe to say that the interaction layer between the two is extremely painful. We have nicely modeled type-safe code in both the Rust and TypeScript world and an extremely janky layer in between. You need a lot of inherently slow and unsafe glue code to make anything work. Part is WASM related, part of it wasm-bindgen. What were they thinking?

I’ve read that WASM isn’t designed with this purpose in mind to go back and forth over the boundary often. That it fits the purpose more of heaving longer running compute in the background and bring over some chunk of data in the end. Why create a generic bytecode execution platform and limit the use case so much? Not everyone is building an in-browser crypto miner.

The whole WASM story is confusing to me.

sfvisser commented on Gaslight-driven development   tonsky.me/blog/gaslight-d... · Posted by u/theodorejb
sfvisser · 2 months ago
> Like it or not, we are already serving the machines.

The machines don’t give a shit, it’s the lawyers and bureaucrats you’re serving :)

Better or worse?

sfvisser commented on Unexpected security footguns in Go's parsers   blog.trailofbits.com/2025... · Posted by u/ingve
ajross · 3 months ago
A "parser" is the piece of software that translates unstructured input (usually text) into structured output that better reflects the runtime of a programming language. A "security bug" in a parser is normally construed to be the existence of an input that causes the software to do something incorrect/undocumented/unexpected.

Nothing in the article discusses a parser or anything like a parser bug.

The article doesn't like that the semantics of the user-facing API wrapped around the parser is, I guess, "easy to make mistakes with". That's an article about API design, at most. But that's boring and specious and doesn't grab clicks, so they want you to think that Go's parsers are insecure instead.

sfvisser · 3 months ago
Exactly right. Better have a domain layer with data types representing the domain object 1:1 and add one or more API layers on top for interacting with those for some modality. Creation, deletion, verification, auth etc.

The security failure is not the parsing library, but failing to model your application architecture properly.

sfvisser commented on Rust compiler performance   kobzol.github.io/rust/rus... · Posted by u/mellosouls
jadbox · 3 months ago
Not related to the article, but after years of using Rust, it still is a pain in the ass. While it may be a good choice for OS development, high frequency trading, medical devices, vehicle firmware, finance software, or working on device drivers, it feels way overkill for most other general domains. On the other hand, I learned Zig and Go both over a weekend and find they run almost as fast and don't suffer from memory issues (as much as say Java or C++).
sfvisser · 3 months ago
This comment would have been more useful with some qualification of why that’s the case. The language, tooling, library ecosystem? Something else?
sfvisser commented on Don't Be Afraid of Types   lmika.org/2025/03/18/dont... · Posted by u/speckx
beders · 5 months ago
The issue is names.

Every darn little thing in Java needs a name.

If there is no good name, that's a hint that maybe you don't need a new type.

Obligatory Clojure example:

    (defn full-name [{:keys [first-name last-name]}] 
          (str first-name " " last-name))
This defines a function named `full-name`. The stuff between [] is the argument list. There's a single argument. The argument has no name. Instead it is using destructuring to access keys `:first-name` and `:last-name` of a map passed in (so the type of the unnamed argument is just Map)

This function works for anything that has a key `:first-name` and `:last-name`.

There's no need to declare a type ObjectWithFirstNameAndLastName. It would be quite silly.

sfvisser · 5 months ago
Really depends on your intent. Ideally code has meaning that reflects your problem domain and not just what happens to work at the moment.

Code that just works right now never scales.

sfvisser commented on The Profitable Startup   linear.app/blog/the-profi... · Posted by u/tommoor
pclowes · 7 months ago
I forget exactly who said it but somebody said something along the lines of “venture capital is rocket fuel, unless you have a rocket it will only blow up your engine. Have a Bugatti Veyron? It will blow up your engine.”

This is also something DHH has been saying for years. However, I think it is more true now than ever. With how easy it is to start and scale a software company I really struggle to understand the justification for venture funding at the earliest stage, unless you want to larp as a founder, have low conviction, or just want “the experience”.

sfvisser · 7 months ago
You probably know answer and just hyperboling here, but there are plenty of reasons to raise as a startup. Even in pure software.

Most obvious one is you’re building something actually technically challenging and need to grow your team to get there. People, especially great people, are bloody expensive. No way to afford any reasonable headcount as a 22yo first time founder without venture money.

Of course, simple ideas are easy and need less resources and might be bootstrapped, hard ideas less so.

sfvisser commented on Carbon capture more costly than switching to renewables, researchers find   techxplore.com/news/2025-... · Posted by u/Brajeshwar
schainks · 7 months ago
Engineering/inventing ways to emit less CO2 is fixing the root cause of the problem.

Spending energy that likely came from fossil fuel burning to "capture" CO2 is like saying you've found a perpetual motion machine. The engineering is simpler for this in some ways, but it's still not really a "good" solution.

I agree organic capture is a good idea, and CHEAPEST thing we could do to have an impact dump iron into the open ocean to spawn a phytoplankton bloom, but there is no money to be made doing that.

sfvisser · 7 months ago
Isn’t the point of most carbon capture schemes to use renewables (likely solar) as the energy source. Like Terraform Industries?

Don’t know if it will work or is economically viable, but sounds pretty win-win to me.

sfvisser commented on Haskell: A Great Procedural Language   entropicthoughts.com/hask... · Posted by u/kqr
rrgok · 8 months ago
Can you kindly make a real word example that is not usual Maybe or Either example, that uses user defined data type?

I understand how Applicative works, but I don’t know how to apply (pun intended) to my data types.

sfvisser · 8 months ago
Note that deriving Traversable for you own datatypes mean changing the structure to map effect over, the `t` variable. Not the effect `f`, which is generic and the Monad/Applicative in this case.

Besides Maybe/Either `t` could represent anything, like container types Lists/Trees/Hashmaps etc, but also more complicated structures like syntax trees for programming languages or custom DSLs. Or (my favorite use case!) recursive command types for robot control. I'm doing this mostly in Rust, but borrow all the ideas from Haskell.

u/sfvisser

KarmaCake day1345November 10, 2009
About
hn@fvisser.nl http://monumental.co
View Original