This profile might be incomplete.
Open on social.coop Joshua Barretto
Wall 91 posts
Joshua Barretto
The Covid Inquiry ongoing in the UK is just insane. It's not just the very obvious malice and disregard for vulnerable people that was present in No10 during 2020: it's also the sheer idiocy displayed by those present, even in pursuing their own maligned goals. It's not The Thick Of It: it's worse. At least Malcolm Tucker acted with an air of wherewithal. It's appalling that such anti-social, cripplingly incompetent, and demonstrably ignorant people could find their way to such high office.
Joshua Barretto
(If you're one of these "well acktually neoliberal politics is about promoting awful people to begin with, all power is corrupting" people thinking of replying to this, as if under the belief that this is new and interesting news to me, please don't. This is something entirely different to the norm, so far outside even the neoliberal status quo)
Jan :rust: :ferris:
@jsbarretto You are just doing so much type trickery that even Rust can't keep up! π
Joshua Barretto
Honestly, I'm shocked that mastodon.social *only* receives about 20% of new users. It's easy to forget that an even distribution of users is a very unstable equilibrium, and that there will always be factors that push users toward a small number of servers. Given this, the fact that almost 80% chose *not* to go with the 'default' choice is remarkable and demonstrates, I think, a lot of genuine curiosity on the part of new users about decentralisation. Not at all something to be concerned about.
Joshua Barretto
Sometimes open-source work is stressful and time-consuming, and other times folks go far out of their way to help you improve things. Very thankful to this person for literally creating and publishing a brand new tool primarily for consumption by my library, and then opening a PR that integrates it.
Joshua Barretto
Fielding opinions on this because I've not yet heard a clear consensus, despite much back and forth: Do you consider #[doc(hidden)] on a trait method to be sufficient to pull aspects of the trait's implementation out of a crate's public API and hence not subject to semver concerns? I've heard several perspectives on this, and it's a decision that has practical consequences for one of my crates. #rustlang Anonymous poll
Poll
Yes, doc(hidden) is sufficient
31
40.3%
No, techniques like trait sealing are required
22
28.6%
Don't know / see results
77 people voted. 24
31.2%
Voting ended 31 Oct 2023 at 12:12.
Show previous comments
Alonely0 π¦
@jsbarretto if your private methods leak into public traits, you're doing it wrong; you should be using sealed supertraits. However, I do like the idea of having `doc(hidden)` stuff be implementation details that you shouldn't have to use but are kinda allowed to; thus being semi-private interfaces that aren't subject to semver.
Kornel
@jsbarretto Iβd say if you combine it with a scary name like β_private_unstable_dont_useβ then doc(hidden) is fine. Method privacy is mainly for humans, so you just need to prevent usage by mistake.
Soso
@jsbarretto `doc(hidden)` is most often used as a way to "hide" internal unstable APIs, mostly for macros. There are only few uses of doc(hidden) in real-world crates that are still meant to be used. I reviewed a lot of the most downloaded crates for uses of doc(hidden) and only found 1 actual use of doc(hidden) on a stable API. I later found another one. I suggested a clippy lint for that, which I believe should be warn by default: https://github.com/rust-lang/rust-clippy/issues/11536
Joshua Barretto
Something I've been somewhat surprised at playing with building a CPU in VCB is just how fundamentally... simple a CPU is. I've grokked a lot of single components (ALU, memory cells, etc.) for a while, but always assumed there was some 'magic glue' that turned those elements into a system that could perform useful work over time, but there's really not. Once you have a clock loop and the ability to select inputs and outputs on buses, you're golden. Everything else is just tinkering on the side.
Joshua Barretto
Obviously this doesn't apply so much to modern CPUs with deep caches, atomics, superscalar stuff, speculative execution, etc. I'm more talking about low-power embedded chips or older things like the Z80 or early ARM/Acorn chips.
TheZoq2
@jsbarretto no other field has made me go so back and forth between "this is black magic" and "this is super simple" Learning assembly: how the hell do you build a circuit to do this
Joshua Barretto
If you think about it, if statements are just a kind of multiverse geolocation device
Joshua Barretto
Honestly, the most fun thing about Virtual Circuit Board is figuring out how to make the most of the space you have by compressing everything as much as possible. Quite happy with how small this register bank is, although I realise in hindsight that I missed a few savings.
Joshua Barretto
Virtual Circuit Board is unreasonably fun. I've already built my first CPU and now I'm planning another.
curved-ruler
@jsbarretto
Joshua Barretto
Me, a compiler developer, watching `gen` become a reserved keyword in the next Rust edition: oh no
Joshua Barretto
I'm in two minds, to be honest. New features are good and generator syntax is good, writing iterators by hand today is annoyingly finickey. Yet, I am really sad that Rust seems to be diving head-first into the function-colouring mistakes of old though. First `?`, then `.await`, and now `yield`. These are all the same thing, but now we have a million different incompatible concepts to account for as API designers.
Joshua Barretto
An idea arrived in my head and I needed to turn it into a thing
Joshua Barretto
Dog was asleep on me while watching TV. Dog farts, wakes himself up. Proceeds to scrunch up nose and grimace. Walks off to lie next to Sally instead, leaving me in a cloud of his ass gas.
Joshua Barretto
I'm frequently disturbed at how many supposedly well-meaning and broadly competent people genuinely believe that IQ is measuring some sort of intrinsic biological property of a person.
Joshua Barretto
I do not like that the set of skills I have is almost exactly a subset of those required to make killing machines. I especially don't like defence contractor recruiters calling me on a regular basis to remind me of this fact.
Joshua Barretto
"Oh, you've worked on UUVs and battery storage systems before? I guess that means that building air-to-surface missiles is your sort of thing, eh?" fuck off
Joshua Barretto
Something I find myself often wanting to reach for in #rustlang is a `FnPtr` trait: akin to `Fn`/`FnMut`/etc. except where the function is guaranteed to be representable as a function pointer. There are many times when I want to carry something over, say, an FFI boundary without needing the caller of some API to explicitly pass a function pointer.
Show previous comments
Joshua Barretto
To be clear to all those responding with 'just use a function pointer': a function pointer specifically *does not* do what I'm looking for. Instead, I'm looking for an API like this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=c5f9977fba5c86b396014023be1b434a
Joshua Barretto
If anybody is interested enough to read more, I created a suggestion thread on internals.rust-lang: https://internals.rust-lang.org/t/an-fnptr-trait-for-guaranteed-static-dispatch-of-function-pointers/19580
kc :blobcatheart:
@jsbarretto huh, a trait with that name already exists: https://doc.rust-lang.org/std/marker/trait.FnPtr.html it doesn't do what you want though
Joshua Barretto
Pi Hole is really good, it turns out. Might have to throw some money their way.
Sebastian Imlay π¦
@jsbarretto when I set this up, I had a few roommates who worked in as tech. It basically prevented them from doing any work from home. Which I suppose is an added benefit.
Maxicarlos08 π¦
@jsbarretto Great reminder to re-enable mine. It broke some time ago when I got a new router with DHCP enabled (as it should be) and haven't yet gotten to disable it. btw you can whitelist domains for services that turn out to not work (dependence on some google ad services π), or just disable it for a specified amount of time
Joshua Barretto
The Unity situation really demonstrates why coupling your financial wellbeing to a company that doesn't give a damn about you is a bad idea. It's not just that they're rent-seeking on the hard work of indie developers: they're also changing the rules of the game at will long after developers have invested in the Unity ecosystem. It's not just passive parasitism, but actively malicious exploitation. Proprietary tools just aren't worth it.
walter4096
@jsbarretto o build from the engine up. ... I feel zero sympathy, and outright glee watching them squirm now (even though its still probably worth the extra fee for them) |