Hacker Newsnew | past | comments | ask | show | jobs | submit | _zhqs's commentslogin

> caught a multi-threading bug

The compiler complained: “error[E0308]: mismatched types”


That’s why it’s amazing, type safe efficient multi-threading without dynamic memory allocation with a nice syntax...it’s the holy grail of server programming.


It would be nice if it was explicitly a borrowing-related message. That's the kind of thing I can see happening in a future rustc actually.


Yeah, the good thing is that the devs are always happy to take feedback on improving the error messages (like explaining differences between Fn/FnMut/fn here)


Why would I want to write a server in a language that requires such awkward approaches to basics like coroutines and dynamic dispatch when I could use kotlin on the JVM and get pauseless GC, ultra fast edit/compile/run cycles, efficient and powerful coroutines, and eventually Loom which will eliminate the whole problem of coloured functions completely and let me just forget about coroutines? Multi threading bugs are not so common in real Java/Kotlin programs to justify this epic set of costs, in my view.


Have you ever tried writing the same application on both a JVM language and in Rust, and then measuring the latency & throughput differentials? Blew my mind the first time.

Of course, if speed isn’t a concern for you, then please carry on.


GC always forces you into a tradeoff between pause time, throughput, and memory overhead.


Good luck getting Google's ad backend with 20ms latency budget and billions of dollars of revenue approved with the JVM.

Therr are many tasks where what you suggests is just too slow and unpredictable.

Don't get me wrong, I think JVM is great, it's just not systems level programming.


Modern JVM GCs have pause times below 1msec. That's a new capability though so most people aren't yet aware of it.

And Google's ads backend are hardly the definition of server. Their ads front-end for example always used to be in Java. Not sure what it is these days


Or even better: Go


Yeah I don’t get it either. We’re supposed to be upset that it did it’s job? Lol?


I believe haskellers would love (and maybe did) to encode commutativity and thread-safety in the type system :)


Everything is "mismatched types" in Rust, literally it doesn't do any automatic type conversion (casting), so it's not the right language for most people.


> anything where you want to pass functions around.

You should read the article! The author goes into this in fascinating detail.


I did read the article; it's overly focused on async (especially the headline). The body quite correctly analyses the problem with functions, but misses that this is much more general than async; just adopting a different async model isn't a solution.


Well, the article’s focus is on asynchrony. Naturally then, it talks about closures within the context of asynchrony and to the extent that it is relevant.

The author could have made the topic about closures, but that’s not what they wanted to talk about.


The author's focus on async leads them to the wrong conclusion. Not adopting async would not have solved the fundamental underlying problem; the perennial issues with error handling in Rust are another manifestation of the same problem, and as soon as people start trying to do things like database transaction management they'll hit the same problem again. Ripping async out of Rust isn't a solution; this problem will come up again and again unless and until Rust implements proper first-class functions.


> wrote them down on a post-it

You write it on local media and kept it on-premises?

Cloud is the new thing, I hear.


The Post-it was but a cache.


I would consider the Post-it as persistent storage or the backup. Your memory would be the cache :D


Same here. You may also like “The Big Flower Fight” on Netflix.


I know what you’re saying, but at some point you could argue we “ARE eating the wrong thing”, considering our population size.

Said differently, I hypothesize that it would be more practicable to create policies that influence what we eat and how that food is produced, compared to creating policies that try to reduce population size. If anything, it appears that more advanced countries are competing to gain population so that the machinery of their societies can keep chugging along in the name of growth.

EDIT: elsewhere in the thread I see people comment on multi-use of animals vs plants, and the consequent implication of increased use of undesirable synthetics/plastics if we raise fewer animals. Systems get complex, and their behavior can change drastically in surprising ways if you start fiddling. But fiddling we must.


Exactly. Representation, diversity is good for business.


> But i assume that if i ever wear a skirt, nobody would give a damn.

Really? Give it a try for a month.

I would be highly surprised if you don’t get called names, ridiculed, or worse, physically attacked.

And that is if your employer even allows you to wear a dress in the office.


> Really? Give it a try for a month.

Sounds like an interesting experiment. Perhaps i will try that after covid season.


Cool! If you do, I’d be curious to hear about your experience.


Tidal sound quality is unparalleled IMO.

I’ve got a good set of speakers, and coupled with Tidal’s Master[1] quality recordings, there’s just no way I can go back to something of lower sound fidelity.

[1] https://support.tidal.com/hc/en-us/articles/115000397069-TID...


I am the opposite. On my Focal Clear there is no advantage for Tidal over Apple Music.

Would be curious to see if you can pass this test: http://abx.digitalfeed.net

Because what people fail to understand is that from source -> listener there are multiple points at which information is lost. People obsess over the file format but not over which DAC they use or whether Apple, Spotify, Tidal has better encoding capabilities.


There is some subjectivity to it, but yes, I agree from experience. Have both Apple Music, for the kids, and TIDAL for myself, BTW.


Can I ask what your system is, to feed the speakers?


Couldn't agree more :)


> You can go also go full Rosetta: create an alias to your terminal, right-click enable "Run in Rosetta", open it, then everything you run from this terminal will also be Rosetta (amd64), and you run Rosetta homebrew, node, etc. You can confirm what is running under Rosetta in Activity Monitor.

Great tip! Didn’t know. Thanks.


Love the audacity of building back better multiple dimensions of our internet experience.

However:

> end the debate about search engine bias by turning search result output over to a community-run filtering system called Goggles

Not sure why something "community-run" would automatically/necessarily solve bias... So looking forward to deeper thinking by the Brave team.


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

Search: