- 4 Posts
- 50 Comments
Ogeonto
Sweden@lemmy.world•Uppgifter: Tolkavgifter ska utredas – undantag för sjukvård och rättsväsende
1·1 年前Jag har förstått att det kan vara svårt att ha en familjemedlem som tolk om samtalsämnet är något man inte vill att de ska ta del av. En neutral tolk (kanske med tystnadsplikt) kan vara mer privat och minska risken för att man undviker att prata om något som kan vara viktigt att ta upp.
Med det sagt tycker jag att förbud låter drastiskt.
Ogeonto
Sweden@lemmy.world•Stockholms kollektivtrafik har blivit riksdagsfråga – Moderaterna kräver svar
1·1 年前Mycket enkelt om rätt personer blir drabbade.
Same, but I’m feeling better today
A relatively cheap PC with Factorio and you are set. You won’t spend much on food either, so win-win.
Reject C, return to assembly. Structured programming is the true oppression our generation never talks about.
That’s silly. Luckily, I don’t think this was the same situation. This was at a university and they had classes with other languages. The beginner classes were split into two variants, where some students (mostly CS students) learned C, and other students (economy, etc.) learned Python. I suppose they figured it was more useful to them or something.
I was a teacher’s assistant in beginner’s programming at university for a bit. I expected them to learn C, which I knew enough of, but I got assigned to a group that learned Python instead. I had never used Python at the time. I ended up having to speed learn it while trying to teach it, to not be completely useless.
Ogeonto
Learning Rust and Lemmy@lemmy.ml•How to think about function trait bounds (specifically that for `thread::spawn()`)?English
3·2 年前A closure may/will try to capture by reference, so it may hold references to the calling function’s scope. For example, this would want to hold a reference to
x:let x = 0; std::thread::spawn(|| x += 1);It’s as if you had a struct like this:
struct MyClosure<'a> { x: &'a mut i32, }That makes the closure non-
'static, since it holds non-'staticreferences. The usual solution is to use themovekeyword, to hint that you want it to move by default, or to use scoped threads. But yeahSendand'staticdepend on the captures.Am I correct in guessing that you handle is of Gontian origin?
Yes! 😁 I picked it when I used to play Tibia (15-20 years ago!), and it stuck with me since then. The correct spelling was already taken, so I modified it a bit. This name is usually available.
Ogeonto
Learning Rust and Lemmy@lemmy.ml•How to think about function trait bounds (specifically that for `thread::spawn()`)?English
3·2 年前Your guess is correct, it should be understood as
F: ( FnOnce() -> T ) + Send + 'static T: Send + 'staticThe
FnOnce() -> Tis syntax sugar forFnOnce<(), Output = T>and the bounds after apply toF. That’s also whyThas separate bounds. They aren’t propagated or inherited. It’s just an ambiguous looking syntax, butT + Trait + 'lifetimeisn’t a valid syntax for applying bounds toT(unless I missed something).The type
Fmay be a closure over values from the calling thread. It has to be possible to send these values to the spawned thread, henceFneedsSend + 'static. When the thread is done with its work, it returns a value of typeTthat gets passed back viaJoinHandle<T>, soTneedsSend + 'statictoo.I hope this cleared things up a bit.
Ogeonto
Programming•Open source Git repo owners with open licenses, how do you know your code is being used by a big corpo?
11·2 年前That’s definitely part of “the deal” with MIT and Apache. The other end of it is that they shouldn’t really expect to get anything more than what the authors are willing to give.
Right, there may be too many unknowns involved. 🤔
Option<T>has aFrom<T>implementation that lets you writeOption::from($file_path).map(|path| path.to_string())to accept both cases in the same expression.https://doc.rust-lang.org/std/option/enum.Option.html#impl-From<T>-for-Option<T>
Ogeonto
AnarchyChess@sopuli.xyz•if this post gets 256 upvotes, i will post again with twice as wide en passant
12·2 年前Zooming in? In this economy?!
Ogeonto
For sharing fascinating artifacts and replicas@kbin.social•Bread (semi)-preserved by the eruption of Mount Vesuvius, Italy, 79 AD
2·2 年前Yeah, they look a bit stale.






Maybe they are trying to manifest its death by arranging its funeral over and over. Programming as an art form isn’t more dead than painting as an art form, as long as people want to do it. However, as the blog post hints at, what you produce for work wasn’t perhaps ever meant to be a work of art. You aren’t necessarily going to be able to write code in your favorite style for work anyway, unless you can influence it and decide the conventions. That has been true since forever in larger organisations.
Props to the blog author for seeking out new experiences in their free time but what they are mourning is either still there (just write your art code) or they have just had to adjust to their new trade-off. Don’t be surprised when it doesn’t feel artistic if you don’t spend any effort on the process.