RustyYato

35 posts

RustyYato

RustyYato

@RustyYato

A open source Rust programmer (long live Ferris)

انضم Temmuz 2020
76 يتبع38 المتابعون
Lucretiel 🦀
Lucretiel 🦀@Lucretiel·
I believe I found a bug or shortcoming in the trait resolver. Currently, the compiler believes that these are conflicting implementations: impl<T: Trait> Extend<T::Item> for MyStruct<T> { ... } impl<T: Trait> Extend<(T::Item, T::Item)> for MyStruct<T> { ... }
English
4
1
22
2.9K
RustyYato
RustyYato@RustyYato·
@LizardOrman @ejpbruel @jameskjx @timClicks For example you could have a mutex<i32> which is set to 1 on thread A and set to 2 on thread B. The final value depends on which thread runs last, but there's no way of knowing which one. This is a race condition. But there isn't a data race, because of the mutex.
English
2
0
1
28
Tim McNamara
Tim McNamara@timClicks·
One of the nice things about Rust is that you never have to ask "Is this code threadsafe?". Consider this innocent-looking Java code, which is definitely not. public class Counter { private int count = 0; public void increment() { count++; } }
English
10
2
60
14.6K
Orman
Orman@LizardOrman·
@ejpbruel @jameskjx @timClicks It should not be possible to create race conditions within safe Rust that doesn't interact with external systems AFAIK
English
1
0
0
32
RustyYato
RustyYato@RustyYato·
@timClicks Idris, Agda, Coq, etc. Basically a dependently typed language. Haskell also seems to be moving to this direction but isn't there yet
English
0
0
1
90
RustyYato أُعيد تغريده
Matti Palli 🧙‍♂️
Hardware people: "in a high-level language like C" Functional Programmers: "in a low-level language like C" Functional Programmers: "in a high-level language like Haskell" PL theorists:
Matti Palli 🧙‍♂️ tweet media
Graham Hutton@haskellhutt

Interested in learning about programming language semantics? Check out this new paper, which has just been accepted for the Journal of Functional Programming: cs.nott.ac.uk/~pszgmh/123.pdf

English
11
154
1K
120.4K
RustyYato
RustyYato@RustyYato·
@Lucretiel This isn't possible in by example macros because you can't split tokens or semantically analyze them in any way. You could go the other way and stringify a type name though
English
1
0
0
12
Lucretiel 🦀
Lucretiel 🦀@Lucretiel·
My question is: I have a macro taking a literal, and I want the macro to produce a trait implementation that includes that literal’s type as a generic parameter: tag(“str”) -> impl MyTrait<&str> { … }
English
2
0
1
227
Lucretiel 🦀
Lucretiel 🦀@Lucretiel·
ChatGPT is now 3 for 3 with answering my programming questions with a wrong answer. At least this time I was able to provoke it into telling me that what I’m trying to do isn’t possible, something I was only 70% sure was the case
English
1
0
15
3.2K
RustyYato أُعيد تغريده
Lean
Lean@leanprover·
Rust's Creator Graydon Hoare Recommends Lean 4 for Those Seeking Advanced Types—Honored by the Mention. 🙏 #LeanProver #RustLang @graydon/111033807456349023" target="_blank" rel="nofollow noopener">types.pl/@graydon/11103…
English
1
16
101
8.5K
RustyYato أُعيد تغريده
llogiq
llogiq@llogiq·
Don't let #WEB3 hold you back - with #RustLang, you can build applications people love, from traditional web backends to databases, command line tools, machine learning, games and more! Join the Rust 🦀 community and build a better world with us!
Solana@solana

Don't let Rust hold you back - with #Solana, you can build with languages you know, like #JavaScript, #Python, #Go, and more! Join the #HyperdriveHackathon and make the easy switch to Web3 today. 🚀

English
1
5
36
2.3K
RustyYato أُعيد تغريده
Jeff Geerling
Jeff Geerling@geerlingguy·
Chrome is hot garbage. A long time ago it was a snappy rebel browser that took the Internet by storm. Today it's worse than IE ever was, tracking your browsing habits and sharing them with advertisers even if you take efforts to protect your privacy. It's all out-out too.
English
230
402
4K
381.9K
RustyYato
RustyYato@RustyYato·
@Lucretiel Not if you don't drop any generic values :). Rust is smart enough to figure this out in trivial cases but falls over pretty quickly.
English
1
0
1
53
Lucretiel 🦀
Lucretiel 🦀@Lucretiel·
@RustyYato That would preclude all generic const fn, but you can definitely have generic const fn
English
1
0
0
36
Lucretiel 🦀
Lucretiel 🦀@Lucretiel·
TFW `unwrap` is const but `unwrap_or` isn't
English
3
0
21
1.9K
RustyYato أُعيد تغريده
Björkus 'No time_t to Die' Dorkus
The other fucked up part? Imagine putting blood sweat and tears into your event and it's just casually dismissed as a "tier 2". You know, the place where things that aren't ready like my "not supposed to be a keynote" goes. Holy moly donut shoppe!
English
2
4
45
4.4K
RustyYato أُعيد تغريده
Armin Ronacher ⇌
Armin Ronacher ⇌@mitsuhiko·
"Here's a read-only mirror of a write-up [...]. Comments are locked because the previous discussion was largely unconstructive" in itself really sounds very unconstructive. Please for the love of god can we as a Rust community have an adult conversation over what happened?
English
4
1
11
7.7K
nrc
nrc@nick_r_cameron·
I have a field `f: &mut [T]` and `&mut self`, I want to do `self.f = &mut self.f[1..]`; but I can't because lifetimes. Is there something else I can do which will work?
English
3
0
1
0