Running rust in wasm works really well. I feel like I'm the world's biggest cheerleader for it, but I was just amazed at how well it works. The one annoying thing is using web APIs through rust - you can do it with web-sys and js-sys, but it's rarely as ergonomic as it is in javascript. I usually end up writing wrapper libraries that make it easy, sometimes even easier than javascript (e.g. in rust I can use weblocks with RAII)
It does work well logically but performance is pretty bad. I had a nontrivial Rust project running on Cloudflare Workers, and CPU time very often clocked 10-60ms per request. This is >50x what the equivalent JS worker probably would've clocked. And in that environment you pay for CPU time...
The rust-js layer can be slow. But the actual rust code is much faster than the equivalent JS in my experience. My project would not be technically possible with javascript levels of performance
I did. I don't remember the specifics too well but a lot of it was cold starts. So just crunching the massive wasm binary was a big part of it. Otherwise it was the matchit library and js interop marshalling taking the rest of the time.
edit: and it cold started quite often. Even with sustained traffic from the same source it would cold start every few requests.
The only known explanation of what's going on in quantum mechanics is a multiversal one^[1]. Using radioactive decay of an atom as an example: there are an uncountably infinite number of universes that are initially "fungible" (identical in every way), and over time the universes gradually differentiate themselves with the atom going from a non-decayed to decayed state, at different times in each universe. But you will be in all of those universes. So if you thought the atom would decay in, let's say 5 seconds, there would be some universes where you were right and some where you were wrong. That makes it impossible to ever make reliable specific predictions about when the atom will decay. So, in practice that just looks like perfect randomness.
^[1]: There are other interpretations, of course. And those other interpretations are equally explanatory. But they do not claim to be explanations of what is actually happening to unobserved quantum particles. There is also Bohmian mechanics, but I don't know how many people take it seriously.
Makes me want to learn to sew to make my own clothes. I've wanted to for a while because seams on clothes always bothered me. (Not for taste or fashion, but just because I feel like the technology to make a seamless clothing product must exist.)
Very few fabrics can be fused together to make seams disappear, mostly your synthetics. Though technically wools could be felted together, but that would probably be extremely labor intensive.
I've had some athletic wear with "seamless" features, but after sometime the adhesive lets go. Fixing that at home is much more difficult than needle/thread fixes for normal stitches. To be honest, I never even realized it was "seamless" until the adhesive failed. It had no factor in my purchasing.
> why is it that fabrics can be made in a square shape but not e.g. a capless cylinder shape?
Woven fabrics are naturally rectangular because they're made of a 2D grid of fibers at 90° angles to each other. The easiest (cheapest) way to make an irregular shape out of a woven fabric is to make a rectangle and cut it down.
> I can knit clothes seamlessly, right?
Knit garments usually have some amount of seaming, but yes, you have a lot of options to make irregular shapes when knitting.
However, knitting machines tend be most efficient and making rectangular fabric. They can do some amount of shaping, but the labor and cost goes up.
If you want to hand knit a garment, you can make quite complex irregular shapes with very little or no need for seaming. However, you're talking about two orders of magnitude more labor to make a garment. Few people want to pay $1,000 for a hand-knit sweater, so you're mostly limited to knitting it yourself or having a friend or loved one who likes you.
You can manage a seamless clothing product if you are willing to have it knit on-demand for you, either by machine or by person. If you start with how [1] socks are made, then consider how to decompose your clothes into sock-shapes, you'll find:
Shirts: one tube sock for the torso, two tube socks for the arms, zero ends closed; Pants: two tube socks for the legs, one tube sock for the torso, zero ends closed; Gloves: five tube socks for the appendages, one tube sock for the palm, zero-to-five ends closed depending on fingerless style; Socks: one tube sock with one end closed; Hats: one tube sock with one end closed.
So it's entirely possible to construct a sock weaving pattern that ends up weaving a head-to-toe single garment for you out of some kind of stretchy yarn, that you would then have to figure out how to clamber into through the face hole (since that's the only open-ended sock) — but that coverall (literally!) pattern would have to be constructed for your complete set of measurements [2] in every regard, and that's an exceedingly costly amount of labor (measurement, knitting, measurement, unraveling, repeat). You can scale down that cost for seamless tops or bottoms somewhat, which you'll absolutely see high-fashion retailers do, but at the end of the day it's the cost of bespoke-tailored clothing from scratch plus the cost of bespoke-knit fabric from scratch plus the cost of not getting it exactly right the first time. None of this is intended to criticize your desire — I hate awful seams and I have collected clothing that has seams that don't bother me and/or are extravagantly seams because the sweater was intentionally panel-knit inside-out! — but I wanted to offer a bit of depth into why it's difficult to find seamless. You have to start and end the knit somewhere, and that's exponentially simpler if you start and end the knit more than once; thus, seams.
[2] https://cwandt.com/products/personal-body-unit-index makes the point nicely enough, though I believe you need Even More And Different measurements for tailoring [3] that were out of scope for this particular creation:
> Che-Wei’s Mom often does this weird finger walking dance along the edges of furniture, fabric or random stuff. She knows that the span of her hand from thumb to pinky measures 18cm. So she can quickly size things up. We always thought this was funny, until we realized it was GENIUS and started to copy her. We made Personal Body Unit Index so we can be more like Che-Wei’s Mom.
[3] Men's tailoring measurements are generally optimized for a couple dozen taken at most; further variability gets handled through 'adjustments' or 'on the fly' rather than formally at the construction stage. I think I can identify a couple dozen measurements just on my torso alone — just the bust is an entire three-dimensional construct that has to be measured over, across, under, rise, attachment shape, attachment height and width, volume, not to mention desired support/lift/shaping, and that's before we even get to the usual waist-hips-butt conglomerate, torso/arm length, shoulder width, upper/lower arm width that men are familiar with, and the perhaps less-familiar belly shape/distribution (it isn't always above-the-belt as is typical for men) and front abdomen curve shape (often without a certain male sexual characteristic, often with varying fat pattern distributions, see also belly).
wgpu isn't a renderer though, it's an abstraction layer. It's honestly hard for me to imagine it ever being faster than writing directx or metal directly. It has many advantages, like that it runs in browsers and is memory safe (and in the case of dawn, has great error messages). But it's hard for it to ever be as fast as the native APIs it calls for you.
I think most non-trivial cross-platform graphics applications eventually end up with some kind of hardware abstraction layer. The interesting part is comparing how wgpu performs vs. something custom developed for that application, especially if their renderer is mostly GPU-bound anyway. wgpu definitely has some level of overhead, but so do all of the other custom abstraction layers out there.
Sometimes people say that they don't understand something just to emphasize how much they disagree with it. I'm going to assume that that's not what you're doing here. I'll lay out the chain of reasoning. The step one is some beings are able to do "more things" than others. For example, if humans wanted bats to go extinct, we could probably make it happen. If any quantity of bats wanted humans to go extinct, they definitely could not make it happen. So humans are more powerful than bats.
The reason humans are more powerful isn't because we have lasers or anything, it's because we're smart. And we're smart in a somewhat general way. You know, we can build a rocket that lets us go to the moon, even though we didn't evolve to be good at building rockets.
Now imagine that there was an entity that was much smarter than humans. Stands to reason it might be more powerful than humans as well. Now imagine that it has a "want" to do something that does not require keeping humans alive, and that alive humans might get in its way. You might think that any of these are extremely unlikely to happen, but I think everyone should agree that if they were to happen, it would be a dangerous situation for humans.
In some ways, it seems like we're getting close to this. I can ask Claude to do something, and it kind of acts as if it wants to do it. For example, I can ask it to fix a bug, and it will take steps that could reasonably be expected to get it closer to solving the bug, like adding print statements and things of that nature. And then most of the time, it does actually find the bug by doing this. But sometimes it seems like what Claude wants to do is not exactly what I told it to do. And that is somewhat concerning to me.
Not just bats. I'm pretty sure humans are already capable of extincting any species we want to, even cockroaches or microbes. It's a political problem not a technical one. I'm not even a superintelligence, and I've got a good idea what would happen if we dedicated 100% of our resources to an enormous mega-project of pumping nitrous oxide into the atmosphere. N2O's 20 year global warming is 273 times higher than carbon dioxide, and the raw materials are just air and energy. Get all our best chemical engineers working on it, turn all our steel into chemical plant, burn through all our fissionables to power it. Safety doesn't matter. The beauty of this plan is the effects continue compounding even after it kills all the maintenance engineers, so we'll definitely get all of them. Venus 2.0 is within our grasp.
Of course, we won't survive the process, but the task didn't mention collateral damage. As an optimization problem it will be a great success. A real ASI probably will have better ideas. And remember, every prediction problem is more reliably solved with all life dead. Tomorrow's stock market numbers are trivially predictable when there's zero trade.
> Now imagine that it has a "want" to do something that does not require keeping humans alive […]
This belligerent take is so very human, though. We just don't know how an alien intelligence would reason or what it wants. It could equally well be pacifist in nature, whereas we typically conquer and destroy anything we come into contact with. Extrapolating from that that an AGI would try to do the same isn't a reasonable conclusion, though.
Another assumption based on a human way of reasoning. We don't even begin understand how an Octopus perceives the world; neither do we know if they are on the same level of intelligence, because we have no methodology for comparing different intelligences; we can't even define consciousness.
There are some basic reasoning steps about the environment that we live in that don't only apply to humans, but also other animals and geterally any goal-driven being. Such as "an agent is more likely to achieve its goal if it keeps on existing" or "in order to keep existing, it's beneficial to understand what other acting beings want and are capable of" or "in order to keep existing, it's beneficial to be cute/persuasive/powerful/ruthless" or "in order to more effectively reach it's goals, it is beneficial for an agent to learn about the rules governing the environment it acts in".
Some of these statements derive from the dynamics in our current environment were living in, such as that we're acting beings competing for scarce resources. Others follow even more straightforwardly logically, such as that you have more options for agency if you stay alive/turned on.
These goals are called instrumental goals and they are subgoals that apply to most if not all terminal goals an agentic being might have. Therefore any agent that is trained to achieve a wide variety of goals within this environment will likely optimize itself towards some or all of these sub-goals above. And this is no matter by which outer optimization they were trained by, be it evolution, selective breeding of cute puppies, or RLHF.
And LLMs already show these self-preserving behaviors in experiments, where they resist to be turned off and e. g. start blackmailing attempts on humans.
Compare these generally agentic beings with e. g. a chess engine stockfish that is trained/optimized as a narrow AI in a very different environment. It also strives for survival of its pieces to further its goal of maximizing winning percentage, but the inner optimization is less apparent than with LLMs where you can listen to its inner chain of thought reasoning about the environment.
The AGI may very well have pacifistic values, or it my not, or it may target a terminal goal for which human existence is irrelevant or even a hindrance. What can be said is that when the AGI has a human or superhuman level of understanding about the environment then it will converge toward understanding of these instrumental subgoals, too and target these as needed.
And then, some people think that most of the optimal paths towards reaching some terminal goal the AI might have don't contain any humans or much of what humans value in them, and thus it's important to solve the AI alignment problem first to align it with our values before developing capabilities further, or else it will likely kill everyone and destroy everything you love and value in this universe.
Rust + React is a beautiful combination. For my project, I use Rust for the actually complicated logic that needs to be correct and performant. And then I just use React for the UI. It works pretty great. The communication between the two with wasm-bindgen and tsify is just so easy. It's almost as if they're the same language. It's really crazy, honestly. A feat of engineering.
React Vello seems super cool, by the way. Thanks for sharing it!
I just wish they would use bigger models. These ones always write stuff that makes no sense. Like it says "the same principle applies to mobile games" then describes a different principle
There's some bots on HN who write much more coherently and get a decent # of upvotes. I was only able to catch one because the comment started with something along the lines of "Here's a smart response for a technical audience about _____"
I find AI extremely useful for that. "What did I brush over?" "What did I assume the reader might know when they might not" "can you fact-check every claim for me and provide references." It is incredibly high ROI and I think it makes the final piece better.
What I dislike about reading AI writing is that it's dumb but sounds smart. If it were smart I wouldn't mind reading it. Here's an example. It's always full of metaphors that make no sense, like a closet so full of junk that it topples out as soon as you open the door. (see what I mean? the metaphor has a superficial resemblance to the topic at hand but doesn't clarify the subject at all and therefore muddles the waters as you try to understand what I might have been intending to communicate with it.)
Handy is awesome! and easy to fork. I highly recommend building it from source and submitting PRs if there are any features you want. The author is highly responsive and open to vibe-coded PRs as long as you do a good job. (Obviously you should read the code and stand by it before you submit a PR, but I just mean he doesn't flatly reject all AI code like some other projects do.) I submitted a PR recently to add an onboarding flow to Macs that just got merged, so now I'm hooked
reply