Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

hds, to random
@hds@hachyderm.io avatar

@ekuber I just missed the fn keyword and found that the error message in that case wasn't so helpful.

error: expected one of ! or ::, found (

I couldn't find a issue for this, but I thought I'd check with you before creating one.

hds,
@hds@hachyderm.io avatar

@ekuber Took longer than I expected to get around to it, but I've create the issue: https://github.com/rust-lang/rust/issues/125446

Thanks!

hds, to rust
@hds@hachyderm.io avatar

I came across this article the other day, titled “Why Rust cannot replace C++”.

I feel that the author completely fails to understand the opposing argument. The article claims that with “new” C++ features like smart pointers, you can write safe code in C++, therefore Rust is unnecessary.

But I don’t want a language where I can write safe code, I want a language where I must write safe code.

https://medium.com/@pepitoscrespo/why-rust-cannot-replace-c-but-quite-the-contrary-5577e1f5af0a

hds,
@hds@hachyderm.io avatar

Sure, it’s much easier to pass pointers (*, &, or shared_ptr) around, but now I have the “cognitive overhead” of ensuring that it’s only accessed from one thread at a time. Or not used after it’s been freed in the former cases.

When I’m working with the borrow checker that is something that I don’t have to think about. It’s less “cognitive overhead”.

2/3

hds,
@hds@hachyderm.io avatar

There’s this common statement that “the cognitive overhead of working with the borrow checker just isn’t worth the security benefits when you can write safe code in other languages”.

But the comparison is always to the “cognitive overhead” of writing something in some other language. When the comparison should be to writing something correctly in some other language.

#rust #rustlang #programming

1/3

hds,
@hds@hachyderm.io avatar

@mgeisler that’s a bit my point. A style guide is useful if you have the time and ability to train people on it, but if checking compliance is something a human has to do then you’ve still got cognitive overhead and humans, of course, get things wrong sometimes.

rust, to random

Rust 1.78.0 is now available! 🦀🌈

This release brings you #[diagnostic::on_unimplemented], more safety assertions in the standard library (in debug mode), LLVM version 18, and more!

Check out the announcement and release notes: https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html

hds,
@hds@hachyderm.io avatar

@ekuber @rust @weiznich this new class of attributes looks so promising!

(I mean, on_uninplemented looks great already, but the possibilities…)

fasterthanlime, to random
@fasterthanlime@hachyderm.io avatar

Today I learned about Margin collapsing and excuse me but what the fuck? https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_box_model/Mastering_margin_collapsing

hds,
@hds@hachyderm.io avatar

@fasterthanlime I thought this was the main difference between margins and padding (because aside from this you can add/remove ancesters and change where you put the margin/padding to use one or the other).

hds, to rust
@hds@hachyderm.io avatar

If I want to be completely honest about #rust, what disadvantages should I be listing. So far I have:

  • Compile times
  • Language complexity (compared to…)
  • Churn
  • Best practices
  • Recommended dependencies

What else?

#rustlang

hds,
@hds@hachyderm.io avatar

@ekuber yeah, that’s very true.

hds, to rust
@hds@hachyderm.io avatar

It’s Friday, I’m not fighting the borrow checker, we’re discussing our difference of opinion over a beer.

#rust #rustang

hds,
@hds@hachyderm.io avatar

@ekuber I did not just transmute that 'a into a 'static, I promise. 🤞

hds, to rust
@hds@hachyderm.io avatar

Have you had experience, successful or otherwise, promoting #rust within your company? Especially to other teams and departments once you’ve started using it in your own team?

I would love to hear what you think went well and what you would have done differently in hindsight.

Comments in replies and boost for visibility please! 🦀

#rustlang

hds,
@hds@hachyderm.io avatar

@hyde @mre Yes! I do listen to that one (and have probably already "borrowed' some ideas)!

Thanks for the suggestion!

b0rk, (edited ) to random
@b0rk@jvns.ca avatar

poll: when you have a merge conflict, how do you prefer to handle it?

hds,
@hds@hachyderm.io avatar

@b0rk @hazelweakly (edit weird text file) except for the Xcode project file, that beast is unmergeable.

Or at least it used to be when I was doing macOS / iOS dev 7-8 years ago.

molly0xfff, to RSS
@molly0xfff@hachyderm.io avatar
hds,
@hds@hachyderm.io avatar

@molly0xfff @vampiress looks like I need a new RSS reader. There are some suggestions in this thread that I’ll try, but if anyone else has recommendations, I’d be happy to hear them.

timClicks, to random
@timClicks@mastodon.nz avatar

One of my large corp clients ($10b+ market cap) is insisting on 45 day payment terms and I can safely say this doesn't spark joy.

hds,
@hds@hachyderm.io avatar

@timClicks the medium sized retailer and publisher I worked for in London had 30 day payment terms when I moved from employee to freelance, so the extra 15 days doesn’t seem too bad for such a monster… 🤷‍♀️

Vyothric, to random
@Vyothric@mastodon.social avatar

As it should.

hds,
@hds@hachyderm.io avatar

@Vyothric @foone I loved this game when I was younger, I think it was pretty new when I played it (but you could never be sure with shareware games in Australia when you didn’t use the internet).

KatyKnits, to knitting
@KatyKnits@mastodon.social avatar

@knitting As teased, my Triple Advent Blanket in all of its woolly glory.

hds,
@hds@hachyderm.io avatar

@KatyKnits @knitting it looks incredible! 🎉🧶🎊

hds, to rust
@hds@hachyderm.io avatar

I like writing because I feel like I don’t need to be a wizard to write correct, readable code with good performance. I never felt this way about (and I’ve done fewer hours of rust than C++).

hds,
@hds@hachyderm.io avatar

I heard Steve Klabnik say pretty much the same thing on a podcast* as “I like because I can program it when I’m drunk (or tired, stressed, etc.).”

*old episode of Chats with James (jamesmunns.com)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines