Hacker News new | past | comments | ask | show | jobs | submit | nextaccountic's comments login

Did you consider using cap_std?

https://github.com/bytecodealliance/cap-std

Or if it's deficient in some way, contribute to it perhaps

The idea behind cap-std is being a stdlib for wasm runtimes in the backend. Wasm is supposed to give us sandboxing for free. It would suck to squander that by not having granular capabilities.


This work eschews practicality. The API will be super annoying and no one will want to use it but me. For example, the IO god object is passed to main as a reference rather than by value. I don't think there's any risk of splitting the ecosystem and I don't expect the cap_std project to really be interested in my BS.

That said, I did not know about cap_std until you mentioned it. I might steal the thing where all fs functionality is provided as methods on a `Dir`.


By the way, for those wanting to do this but in Rust, there is https://crates.io/crates/yrs and https://crates.io/crates/automerge

And Loro [1], relatively new player which recently hit 1.0, with solid performance and some features the others don’t have

[1]: https://loro.dev/


Amazing, thanks for the link

What features does Loro have that others lack?


> This is a beautifully designed and illustrated page.

The artwork on those is stunning. It's hard to imagine someone would spend so much time and effort illustrating an article with so little content. (the other articles on that page are similarly well illustrated)

If this article were created 5 years ago, I would be downright impressed. Sadly, I've defaulted to assume the artwork was generated by AI those days. (even though I have no evidence of that)

It doesn't help that the author claims they "empower devs with AI" in their home page, and their older webpage from 2019 [0], while still very beautiful, isn't illustrated to the same standard.

I just wish authors were upfront that they generated the artwork with AI (with a little caption, footnote, something; the same kind of thing newspapers use to credit their photojournalists). I really have nothing against using AI for this kind of thing and regardless of whether AI was used, the author of the article for sure has a lot of artistic merit for the composition as a whole.

[0] https://2019.wattenberger.com/


> We need better capabilities. E.g. when I run `fd`, `rg` or similar such tool, why should it have Internet access?

Yeah!! We really need to auto sandbox everything by default, like mobile OSes. Or the web.

People browse the web (well, except Richard Stallman) all the time, and run tons of wildly untrusted code, many of them malicious. And apart from zero days here and there, people don't pay much attention to it, and will happily enter any random website in the same machine they also store sensitive data.

At the same time, when I open a random project from Github on VSCode, it asks whether the project is "trusted". If not, it doesn't run the majority of features like LSP server. And why not? Because the OS doesn't sandbox stuff by default. It's maddening.


Only the infinitesimally small singularity that is in the future of all objects inside the event horizon is supposed to be very dense. The space inside the event horizon is supposed to be normal-ish

If such a singularity exists at all. The thing we "observe" about black holes is the event horizon. It could be that space inside a black hole is just regular space.

Yep! Generally speaking singularities only appear because the math is deficient in some way. Other areas of physics successfully got rid of unphysical singularities by employing better math, it's just that we don't know how to fix this aspect of general relativity (maybe quantum gravity will?)

> If mass and time truly switches places when crossing into a black hole

What do you mean by that?


That's my takeaway from Ruby - syntax matters, and good syntax makes programmers happier

Note, mainstream programming already has widespread use of a bunch of recursion schemes, like map, filter, and fold (also called reduce). It's generally accepted that using map and filter leads to code much easier to understand and modify. Fold is a tiny bit more complicated but generally speaking it is worth it, but there is still some room for specialized folds like a "sum" operation to make code simpler. (map and filter are also special cases of folds, but that's not an interesting observation)

What's missing from this picture is that recursion schemes are not only useful for lists and other sequential things like arrays, vecs, iterators etc, but also for trees and other data types with richer structure. There's some types implementing map here and there (like Rust's Option, which implements map and filter as if it were a list containing 0 or 1 element), but the generic abstraction of "types that have a map operation" for example (the thing Haskell calls Functor) would be really useful to enter mainstream programming some day.

Now, about the more complex recursion schemes: many have too much cognitive weight to be useful. So often a direct recursion will be simpler and easier to understand. But sure, it would be cool if people were more familiar with things like hylomorphisms and such (even if by other name - folds may also be called catamorphisms but nobody calls them that)

I think that the "overton window" of programming constructs is slowly but surely moving towards the more theoretical aspects of functional programming though. So maybe in some decades this stuff will be so familiar that using them won't make code hard to follow.


Firefox had Servo, a project that among other things focused on delivering faster technologies for a web browser. They had impressive results (integrated into Firefox as Firefox Quantum) but were suddenly fired

At that point I think Firefox lost a vision of a better future


Battery swapping isn't some top-down authoritarian decision made by the CCP and forced into the Chinese society.

Nio is just a company that's providing a much needed solution to this problem.


They also have 2% ev marketshare in China, because its still an expensive and complex feature that has downsides that the previous comment mentioned. Like these high energy batteries are dangerous as the can burn quite spectacularly, so I personally would not want to take and remove one from my car every charge hen I can wait a few minutes at a regular charging station that is much more common than a replacing station.


I don't think a battery swap is more dangerous than the current fuel stations where you can just use your lighter and set everything on fire


I think swappable batteries may be a more practical solution for heavy trucks rather than cars. They have the advantage that they are already built to carry heavy things loaded by forklift, unlike cars.

There's an Australian company https://www.januselectric.com.au/ doing them. They do electric conversions on existing trucks.


I agree, but there are aggressive subsidies around electric vehicles and general graft. Similar things happen in most countries but in dictatorships things can go to absurd levels when it aligns with the current policy.


Those subsidies can be more easily justified by climate change. Also I don't think they approach the historic, multi-decade subsidies to fossil fuels


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: