- 9 Posts
- 130 Comments
BB_C@programming.devto Rust@programming.dev•Cutting Down Rust Compile Times From 30 to 2 Minutes With One Thousand Crates1·3 months agoCool and all. But missing some experiments:
- cranelift
- multi-threaded rustc
- undoing type erasure after the split
lto = "off"
strip = false
(for good measure)- [PRIORITY] a website that works with Tridactyl✋
Along the same vein, too many open source projects don’t factor in non-“gnu/linux” environments from the start.
No one is entitled to anything from open-source projects.
I spent time making sure one of my public tools was cross platform once. This was pre-Rust (a C project), and before CI runners were commonly available.
I did manage it with relative ease, but Mac/mac (what is it now?) without hardware or VMware wasn’t fun (or even supported/allowed). Windows was a space hog and it’s a shit non-POSIX OS created by shits anyway, and Cygwin/MSYS wouldn’t have cut it for multiple reasons including performance. The three major BSDs, however, were very easy (I had prior experience with FreeBSD, but it would have been easy in any case).
People seem to have forgotten that doing open-source was supposed to be fun first and for most. Or rather, the new generation seems to never have gotten that memo.
POSIX is usually where a good balance between fun and public service is struck. Whether Mac/mac is included depends on the project, AND the developers involved. With CLI tools, supporting Mac/mac is often easy, especially nowadays with CI runners. With GUIs, it’s more complicated/situational.
Windows support should always be seen as charity, not an obligation, for all projects where it’s not the primary target platform.
BB_C@programming.devto Rust Programming@lemmy.ml•C++ is losing to Rust (C++ creator calls for help)2·4 months agoGenerally yes, unless it’s the original source of a story.
e-celeb content and news aggregators are never the original source of a story.
BB_C@programming.devto Rust Programming@lemmy.ml•C++ is losing to Rust (C++ creator calls for help)0·4 months agoThat some can and already do that on the video sites they already browse.
People like shorts too, but that doesn’t mean Lemmy should be infested with such content.
BB_C@programming.devto Rust Programming@lemmy.ml•C++ is losing to Rust (C++ creator calls for help)0·4 months agoWe went from spam “news sites” to spam videos. Maybe an “original source” policy should be applied by moderators!
This applies to both hare and on !rust@programming.dev
Doubly linked list is one of std’s collections. And safety in Rust is built on top of unsafely, because there is no way around that.
Did you try to actually look up literally anything before asking?! Because simply checking out
std::collections
docs would have given you some answers.
BB_C@programming.devto Programming@programming.dev•Announcing Rust 1.85.0 and Rust 2024 | Rust Blog8·5 months agoIn case the wording tripped anyone, generators (blocks and functions) have been available for a while as an unstable feature.
This works (playground):
#![feature(gen_blocks)] gen fn gfn() -> i32 { for i in 1..=10 { yield i; } } fn gblock() -> impl Iterator<Item = i32> { gen { for i in 1..=10 { yield i; } } } fn main() { for i in gfn() { println!("{i} from gfn()"); } for i in gblock() { println!("{i} from gblock()"); } }
Note that the block-in-fn version works better at this moment (from a developer’s PoV) because
rust-analyzer
currently treatsgfn()
as an i32 value. But the block-in-fn pattern works perfectly already.
While you missed the mark here since typst has all the important stuff open (I wouldn’t use the web interface even if it was free/open source), I appreciate that you’re keeping an eye open.
If you were in r*ddit’s rust community a few years ago, you probably would have been banned, just like me😄
A blog post from M$ mentioning Rust with zero code
=> straight to the top
A news article regurgitating the same thing a week later
=> straight to the top
Another news article two weeks later regurgitating the same thing, possibly with the addition of a random tweet from some M$ dev
=> straight to the top
Anyone not sucking nu-M$'s ****
=> banished to the bottom, or worse.
Things got so silly to the point where I made this jerk post (archive link) about one of these silly posts.
I wouldn’t correct you if this was a general community where the internet gantry hangs in numbers like the multiple !linux communities, but let’s keep things more factual here in !rust.
After Wedson quit months ago, no one from the Rust-For-Linux effort has quit/resigned/whatever. No one quit who is relevant to current mainline kernel development in general, either.
There is a difference between the actual Rust-For-Linux team, and Rust proponents who may write kernel code out-of-tree, or may happen to still be listed as maintainers in a dead poor GPU driver. Confusing the two is good for drama, but let’s not do that here.
And the bad boy maintainer is entitled to his opinion (which I disagree with of course). An opinion which will always be more informed and relevant than 99.999% of whatever the internet gantry has been contributing.
True. Moronix’s comment section is always good for a good laugh. Although the novelty wears off fast due to the lack of novelty/originality.
How dare you change the click-bait title❓
I mean, it’s a moronix post. No one was expecting some serious reporting anyway🙂
Otherwise, you could have just pointed to the mailing list thread directly (preferable).
BB_C@programming.devto Rust@programming.dev•Rewrite of `screen` in Rust. Feedback and advice pls.3·5 months agoBut don’t use ctrl-b
What migrant from screen didn’t start by adding this to tmux config? 😄
set-option -g prefix C-a unbind-key "C-b" bind-key "C-a" send-prefix
BB_C@programming.devto Rust@programming.dev•Rewrite of `screen` in Rust. Feedback and advice pls.91·5 months agoIf you’re serious about creating something good/better, you should use alacritty_terminal (not to be confused with the terminal app built on top of it) for low-level (from your PoV) terminal support.
This is something
zellij
didn’t do. And now they have “basic functionality” bugs like this one open for years.I also wonder what made you pick screen as a baseline to improve on instead of
tmux
.
Traditional server-based self-hosting will have lower average uptime, will be easier to attack, and will have a much higher chance of disappearing out of nowhere (bus factor event, or for any other reason).
A decentralized or distributed solution would make more sense as a suggestion here. Radicale (this one) is such an effort I’m aware of, although I never tried it myself or take a look at its architecture.
BB_C@programming.devto Rust@programming.dev•`home-watcher`: Find out which programs are creating those random files in your home directory0·6 months agoThere is nothing neat about anything xdg.
BB_C@programming.devto Rust@programming.dev•How would you recommend rate limiting your own program?2·6 months agoDepending on your code organization, buffered()/buffer_unordered() stream extensions could prove useful.
BB_C@programming.devto Rust@programming.dev•BenJeau/cargo-interactive-update: A cargo extension CLI tool to update your cargo direct dependencies interactively to the latest version2·6 months agocargo-upgrade
existed forever. and it has a--dry-run
option.
BB_C@programming.devOPto Programming@programming.dev•Koto: a simple and expressive programming language, usable as an extension language for Rust applications, or as a standalone scripting language0·6 months agoI can’t tell if we are miscommunicating here, or if my leg is being pulled.
You are not aware of staunchly anti-OOP (object oriented programming) people existing? Anti-OOP is a majority position now (always was in my circles). And the holdout proponents would usually only defend one (limited or revisionist) way of doing it, usually referring to some specific language implementation. Long gone is the quintessential list of OOP talking points presented in C++/Java classes in the 90’s.
For people new to this, a quick search should lead to an endless stream of results. I found this one immediately which looks decent and covers good ground.
BB_C@programming.devto Rust@programming.dev•Rust code to find palindrome string in rust8·7 months agoSuch posts are more suitable as microblogs IMHO.
Anyway, string lengths are byte lengths, and indexing strings is actually not panic-safe. This is why we have (still-nightly) char-boundary methods now.
If you want to work on characters. use
.chars().count()
and.chars().nth()
.And character boundaries are themselves not always grapheme boundaries, which is also something that you might need to keep in mind when you start writing serious code.
With all that in mind, you should realize, for example, that probably every string reversing beginner exercise answer in every language is actually wrong. And the wrongness may actually start at the underspecified requirements 😉
make
uses multiple processes for parallelism, or what the blog post (below) calls “interprocess parallelism”. cargo/rustc has that and intraprocess parallelism for code generation (the backend) already. the plan is to have parallelism all the way starting from the frontend. This blog post explains it all:https://blog.rust-lang.org/2023/11/09/parallel-rustc/