HNHacker News
TopNewBestAskShowJobs

jfkebwjsbx

1,123 karma · joined February 12, 2020

submissionscomments
jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
We were talking about the borrow checker and memory safety, not about memory limits, access patterns, etc.
jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
Please read the context. We were discussing the borrow checker and memory management, not other features.

Regardless, there are other languages with better type systems and functional features.

jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
Dynamic linking has been a thing for 50 years. No need for WASM for that.
jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
You were talking about the borrow checker, which is mainly about memory safety, not memory limit issues.

In Python, C#, Java, JS... you are memory safe without dealing with memory management nor a borrow checker.

There are many languages running on top of those VMs for all kinds of tastes (OOP, functional, strict type systems, loose ones...). Claiming Rust leads to more robust software than any of those is an exceptional claim, but even if that were true, the key is the development cost.

jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
The borrow checker only checks, it does not solve the problem. In other languages the problem does not even exist to begin with.

It is not a trivial problem to solve (as you claim), otherwise we would have never needed the borrow checker to avoid memory bugs, nor higher level languages to speed up development by avoiding the problem altogether.

If you are going to end up sprinkling clones, heap allocating and reference counting, then you could have used C#, Java or JS to begin with which are plenty fast with their JIT/VMs and not think about memory at all.

Finally, comparing against Python is a very, very low bar for performance.

jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
People is downvoting you, but you are correct. Rust is ideal for CPU-bound problems were performance is critical. For typical web services, not so much. It is hard to justify the extra development cost, even if hiring were easy (which it isn't in the majority of the world).
jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
All that applies to several other very mature languages that can target WASM, like C.

Nevertheless, WASM is not ideal for server work. It is intended for the frontend.

jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
Having to care for memory management is by definition very low level.
jfkebwjsbx··on Rust Is Surprisingly Good as a Server Language
Cargo check does not help with what the parent is talking about, which is a edit-compile-run loop.
jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
> No process nor code is trusted in my company.

Then you cannot use any modern computer in your company. Much less hypercomplex systems like Node, v8 and JITs in general.

> compared to the multi-million risks

What "risks"? What standards are you following? Insurance?

> WASM execution can be optimized a lot as it goes past MVP.

Citation needed. There is no magic.

> I don't know how to import a ES6 module using C ABI.

So that is why you want WASM?

jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
No, it is not a good idea for backend where your processes and code are trusted because it does not come for free (it comes with a big performance penalty).

Mixing languages does not require WASM in native code either. It has always been done through the C ABI.

jfkebwjsbx··on Tour of Rust
It is not. A very useful function does not mean you have to use it in the hot path or for huge inputs.
jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
Good points, but when I have done that, I always preferred to start fresh, rather than take a "shortcut" map from A to B.

The reason is that otherwise you always try to map things back to your previous knowledge and expertise, which can make you biased or give you tunnel vision.

"If you have a hammer..."

jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
If they wanted something better for the backend (for robustness of performance reasons) there are other alternatives much better suited for the vast majority of backends. For instance, C#.

WASM is not needed for the backend, so that is not the reason either. For frontend, I can see it for some pages (I used it myself), yes, but there are also other languages that can target WASM.

You also mention maturity of Rust, but other languages in its domain are more mature, so that cannot be it either.

jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
The question is whether enough people need such a map.
jfkebwjsbx··on Tour of Rust
Not really. Many other mainstream languages give you memory safety, strict type systems and overall robustness without having to deal with memory management or low-level details.

Even for parallelism this holds true. I would say it is even more pronounced there, in fact. Some high-level languages even come with simple, effective ways of doing parallelism without multithreading, which simplifies problems a lot.

Of course, they may not reach the top performance that C++ or Rust might, but that is the trade off. Performance vs. development cost.

jfkebwjsbx··on Rust for JavaScript Developers – Pattern Matching and Enums
JavaScript and Rust are so opposite in their goals and design that I wonder why something like this is written...
jfkebwjsbx··on Tour of Rust
Rust (and others like D, Ada, Zig...) won't be ubiquitous because it is a systems programming language intended to replace C and C++. This kind of languages are specialized and more costly to develop in them.

Everything else (the world of Java, C#, Go, Python, JavaScript, Swift, etc.), which is the majority of the programming done nowadays, will stay the same.

jfkebwjsbx··on Linus Torvalds on AVX512
CPUs does not win in smaller datasets but in small computations.
jfkebwjsbx··on App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m
> Some of the very brightest software engineers in the world work at Facebook

Like they work in many other companies.

In any case, this is not about being bright but about being diligent.

jfkebwjsbx··on App suddenly crashing on startup due to FBSDKRestrictiveDataFilterManager.m
> A) the programmers that made this mistake probably have the knowledge to pass any certification exam you can throw at them

Very unlikely. You probably don't realize how tough some professional exams are in some fields. We are talking dedicated months of study here.

> B) most of the time we are not just building something that has exploded 1000 times before, we are creating new stuff

Most software out there is just CRUD stuff, not really new stuff...

jfkebwjsbx··on A UI editor for single-element CSS illustrations
Safari lacks quite some web specs, so it may just work fine in the rest of browsers.
jfkebwjsbx··on I got 400 signups with a video of a product that didn’t exist
The very definition of MVP means a viable product. It has nothing to do with an "hypothesis". Sorry, but you are misusing the term.
jfkebwjsbx··on Git commit accepts several message flags (-m) to allow multiline commits
The commit is the reason behind a change, not the reason why some code is written like that.
jfkebwjsbx··on Moving from TypeScript to Rust / WebAssembly
No, that is if you want runtime support, etc.

If you just want to run some computational code (which is the case for most of the Wasm use today), it will Just Work, as you say.

In fact, that is how I sped up a webpage: I just wrote myself the minimal support needed to run the code that computed X, and that's it. I don't want the entire world or standard library for computational bits to work.

jfkebwjsbx··on Unit Testing Is Overrated
And yet they had bugs and could lose data.

Which shows 100% unit test coverage is not better than spending that time in other kinds of tests.

jfkebwjsbx··on Moving from TypeScript to Rust / WebAssembly
> - In your average Rust project, all dependencies are already built from source

That is only the case for open source code like crates.io, there is nothing that guarantees you will get the source code of a third-party, though.

I mention this because in the native world it is common to give customers precompiled libraries.

> - Already using LLVM as the compiler backend

Some people don't seem to know this, but all languages that target LLVM (including C, C++, Fortran, Ada, Julia, Swift and others) can be used in WebAssembly.

jfkebwjsbx··on Moving from TypeScript to Rust / WebAssembly
Reference-counted graphs are usually quite fine.
jfkebwjsbx··on Moving from TypeScript to Rust / WebAssembly
Well, you can compile the .NET runtime into Wasm, send it to the client and run C# on top of it, but then you are adding yet another layer.
jfkebwjsbx··on Moving from TypeScript to Rust / WebAssembly
On that front, I agree. Wasm is being sold as the greatest innovation ever, when it is just another virtual ISA with lacking features and performance.
← PreviousPage 4 of 29Next →