snaggen

joined 2 years ago
27
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 

TL;DR: On Linux, if you have Transparent Huge Pages enabled, you can try to run cargo with the environment variable MALLOC_CONF="thp:always,metadata_thp:always" for a potential ~5% speed boost.

 

Just want to do a shout out to @[email protected] about the breaking changes in the upcoming Lemmy 19, since I haven't seen any mention about it here.

5
This Week in Rust 517 (this-week-in-rust.org)
11
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 

I have seen posts that the rust project was setting up it's own Mastodon instance, and now it seems to be live. I assume we will se some official Rust news being posted on this account soon. And hopefully there will be other interesting accounts to follow on this instance in a not so far future.

[–] [email protected] 7 points 2 years ago

Always happy to see more projects being open source.

[–] [email protected] 5 points 2 years ago

Now, I don't have any experience with Axum, but my experience is that the frameworks are quite similar, so much of the porting tend to be in parameters and types, authentication and session (of course, this may vary from project to project). So if you are familiar with Axum this might be a good way to start contributing to Kellnr. Well, I guess if you just want to learn Axum, it might also be a good way to start, it will just be a little slower.... but I guess it is a good way to learn a new framework if you have the time to invest.

[–] [email protected] 5 points 2 years ago

Great to see that this moves forward in a steady pace. And being able to compile Rust for Linux seems like a nice milestone, especially since many objections initially against rust in the kernel was about GCC support.

[–] [email protected] 10 points 2 years ago

That depends on the job I want to do. But generally my selection is something like this.

  1. Is it a short simple script: Bash
  2. Longer script, then a more competent dynamic language like Perl/Python.
  3. Backend, a strong typed compiled language, with as few runtime errors as possible. If it depends on some particular API, the language with good enough bindings.

Preferred backend language, Rust, since that have the least runtime errors, thanks to its strong typing and the great error handling. But I also use Go if it have better libs for what I do, or Java for situations where that is more suitable.

[–] [email protected] 4 points 2 years ago* (last edited 2 years ago) (1 children)

In the annoying popup, there is a cog wheel, clicking that will show a menu. That menu have a checked checkbox, Always offer to translate, uncheck that.

[–] [email protected] 1 points 2 years ago

Yes, you have a point. However adding heat is often implicit when talking about melting stuff. However, if it requires 3400C, then the answer would probably include a comment about that.

[–] [email protected] 11 points 2 years ago* (last edited 2 years ago) (3 children)

Well, I agree. But what I mean is that when people ask physics questions, it is often implicitly understood to mean under current conditions. You rarely hear normal people or kids (who I find asks most of the physics question) include anything about frictionless vacuums in the question. (For reference: https://xkcd.com/669/ ). So, for the egg question, regular people would most likely consider the answer to be "No, except under very special circumstances". But, I agree with you that if a simple Yes/No answer is expected, it have to be Yes.

[–] [email protected] 24 points 2 years ago (5 children)

Well, for eggs, that are carbon based, you will in fact have problems since carbon doesn't have a liquid state at regular atmospheric pressure. I guess you can add pressure, but is that really what we mean when asking a question if something melt?

[–] [email protected] 8 points 2 years ago (2 children)

It might be interesting to watch the Jackie Chan episode of Every Frame is a Painting, for an analysis of the difference between Hollywood and Hong Kong. This will explain why Jackie Chan is so much better in his Hong Kong movies.

https://m.youtube.com/watch?v=Z1PCtIaM_GQ

[–] [email protected] 2 points 2 years ago (1 children)

That is all dependent on the program, but the simplest scenario is by an API with two requests at the same time. But it may also be like if you scan for new files, and use inotify, then you may also have a scanning loop as a fallback. Then the scan and inotify may trigger at almost the same time, so if that then results in a db create or insert you can get in to this problem. So, there are multiple ways to get in to trouble, and life always find new ways 😀

[–] [email protected] 5 points 2 years ago

You are free to see this as an ad, but as Rust is targeting safety critical programming in general, I find it interesting to follow certification efforts like this to make rust available for really safety critical use cases. Now, the Ferrocene project is contributing back, but that fact or the license does not really affect the relevance for this community.

[–] [email protected] 13 points 2 years ago (7 children)

Well, of course you should stick to rustc if you don't need the certification. I get the impression you mix up thing and the purpose of a certified compiler.

Ferrous Systems is working on certifying a specific version of rustc, and hence make it possible to use rust for projects where such certification is required. And certification is required for things like programming medical equipment. If you are hooked in to life support, it is good if the compiler did the thing it was supposed to do.... a crash in such programs can be fatal in a very literal way.

Also, notice that they try to do this without forking and by contributing upstream.

view more: ‹ prev next ›