Better HN
topnewbestaskshowjobs
Log inSign up

mpolun

51 karma · joined Jan 21, 2012 (14y ago) · 43 submissions

Submissions

comment 4y ago · link · parent

It's for proper integration of garbage collected languages -- otherwise you need to embed your GC too, which bloats the wasm. JS host VMs have very good GCs these days, so hooking into them allows for better integration by e.g. go, Java, C#, etc.

Right now wasm is really designed for C/C++/rust

comment 5y ago · link · parent

I don't see how it's any different than using any hosting provider. It's probably worth encrypting your databases, but if you don't trust your hosting provider you're hosed -- managed service or not.

If your paranoia is justified (which it may be, depending on your needs), you need to host the machines in your own datacenter

comment 5y ago · link · parent

swc (https://github.com/swc-project/swc) is a rust equivalent to babel and has a bundler under development. Not sure how far along it is.

That would be an interesting comparison of performance and features.

comment 6y ago · link · parent

Same with postgres. I never use specific lengths for text on postgres.

comment 6y ago · link · parent

It's not part of rustup. At least for the VSCode plugin, it'll prompt you to download when it first runs. As long as you've got a working rust installation it'll work pretty seamlessly in my experience.

comment 6y ago · link · parent

I don't think this is accurate. Other people may know better, but from my understanding the maintainers of ifconfig realized that to update it to use the new behavior, they would have to end up changing the output. The output of ifconfig is used by a lot of scripts, so changing the output would break a million users, so they decided to write a new tool, rather than add a flag or something to opt into new behavior.

So it's userspace compatibility, not the linux kernel compatibility that lead to a new tool.

(and linux will drop old interfaces if it can be proven that no one uses them, or if they're insecure)

comment 7y ago · link · parent

Rust actually has that they just can't be substituted automatically because they're different types:

    fn<T: MyTrait> compile_time(thing: &T) {}
    fn run_time(thing: &dyn MyTrait) {}
The reason that you can't just substitute them is that you can do more with compile-time generics than runtime ones -- runtime generics have unknown size (different concrete types have different size, so what size is the runtime generic version?) so they always have to be used through a pointer (and usually heap allocated). There are a variety of other restrictions on trait objects (runtime generics) for type-system reasons.

It would be possible to find cases where compile time polymorphism is replaced with runtime polymorphism, but I'm not sure it would really gain much given the restrictions.

Now if you start changing the language semantics a lot more becomes possible, but I don't even know what changes you would have to make to the language to let that happen.

12