@raggi@rag.pub avatar

raggi

@raggi@rag.pub

🧌 the original roflscaler

👷‍♂️ hills, houses, telcos, bootloaders, servers, stuff
🕵️‍♂️ I like to help

👨‍💻 @ Tailscale
🚶‍♂️ @ Fuchsia, Google, Wildfire

🧔‍♂️ He/Him

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

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

if you’ve written code to interact with a USB device (in userspace, not in the kernel), what tools/learning resources did you use?

right now I’m thinking gousb (and Wireshark to spy on USB traffic) but I’ve never done this before

the USB device in question is a USB-to-Ethernet adapter on a Mac

raggi,
@raggi@rag.pub avatar

@b0rk @mcr314 you’ll find a lot of usb nics don’t actually implement usb-cdc, instead they present old rndis style interface. Some try to do a composite mode thing to offer both, but that tends to break compatibility with one OS or another. You’ll also find many don’t implement hardware flow control, so if you’re too slow or too fast packets will be dropped. Even different runs from a vendor might implement different interfaces, as they just glue and ship.

danderson, to random
@danderson@hachyderm.io avatar

How it started: I'm annoyed at people rolling out the usual tropey systemd bullshit about run0

How it's going: wow I really need to learn selinux, I've been missing out

It's not entirely clear to me how this happened, but as it happens a lot of my post-nixos target distros run selinux, so I should spend time to understand how it works...

raggi,
@raggi@rag.pub avatar

@danderson transmitting vibes of patience and tenacity, ya gunna need em

danderson, to random
@danderson@hachyderm.io avatar

If you followed me for weird Voyager computer system facts, there will be none today :( No time, and it's looking increasingly likely that, to get the goods proper, I'll need to talk to the JPL archives and see how they might feel about getting a bunch of schematics from the Viking and Voyager collections cleared for publication. Which is going to require more homework to figure out what I need. And, frankly, "clearing for publication" doesn't sound like something quick and painless either.

raggi,
@raggi@rag.pub avatar

@danderson does make me wonder what it’d be like to build (at least simulate) boards built with the constraint of similar manufacturing tech levels, but modern know how - like those modern 8bit pseudo consoles, but applied to space engineering

tenderlove, to random
@tenderlove@mastodon.social avatar

Great article about how "Ruby might be faster than you think" by @jhawthorn https://www.johnhawthorn.com/2024/ruby-might-be-faster-than-you-think/

raggi,
@raggi@rag.pub avatar

@tenderlove @jhawthorn can YJIT deal with the .times and return value in a single shot? does it know how to elide irrelevant logic?

mjg59, to random
@mjg59@nondeterministic.computer avatar

Debian has traditionally followed a model of it being possible to upgrade systems between releases in-place while they're running. This makes upgrade logic much more difficult - at various stages you're replacing the components that are currently running in order to perform the upgrade! And at the end of all of this you're going to reboot anyway because you've got a new kernel.

raggi,
@raggi@rag.pub avatar

@mjg59 but but you need it if your boot path is hot garbage slow.. meanwhile I bump the kernel on my router and reboot it while my wife watches Netflix/youtube and I’m listening to streaming music, and nothing even notices because it takes less time than common WiFi radio downtime.

whitequark, to random
@whitequark@mastodon.social avatar

IEEE 802.3 having a normal one

image/png

raggi,
@raggi@rag.pub avatar

@whitequark maximally tragic unit

raggi,
@raggi@rag.pub avatar

@froztbyte @huitema @whitequark @vaurora wrote several articles about adventures in pmtu research while we worked together

whitequark, to random
@whitequark@mastodon.social avatar

it's so funny to me that a normal, understandable, two page sized python program can implement a real hardware NIC driver that someone can use for realtime work like typing in an SSH session, under concurrent heavy load, and it gives you single ms digit latency

this is the entire transmit queue code. you can look at it in its entirety on one editor screen and understand it. it uses normal python idioms and doesn't even touch USB directly

60 Mbps on CPython, 80 on PyPy

raggi,
@raggi@rag.pub avatar

@whitequark i see you've been on those mad scientist vitamins again

whitequark, to random
@whitequark@mastodon.social avatar

is assembly language (for the sake of argument, x86 assembly as understood by an assembler released by intel) typed?

raggi,
@raggi@rag.pub avatar

@whitequark yes, trivial gnu example:

_start:
add r1,0x1234

<source>:2: Error: immediate expression requires a # prefix -- `add r1,0x1234'

raggi,
@raggi@rag.pub avatar

@whitequark it’s valid syntax in other contexts, so the syntax indicates some kind of property about the value, but it isn’t the value itself. Doesn’t that approximate the behavior of a type?

raggi,
@raggi@rag.pub avatar

@whitequark at a fundamental level a type defines a set of allowed values, and gives that set an identifier. at an increasing level of practicality typed operations accept values from a set of types. at a more practical level a type validator accepts or rejects types in program context based on some implementations ability to handle them in that context

raggi,
@raggi@rag.pub avatar

@whitequark yeah, that's definitely a fair abstraction as we tend to live there all the time and i would probably hold that position in some context too.

it's very tied to value use in a specific context though, and also breaks down at the other end - the very very high level space - where there are many types that never manifest and are never really subject to checks in the common ways, but humans talk about entirely independently of any program or implementation

danderson, to random
@danderson@hachyderm.io avatar

Hmm, right, the irreducible nub of why the borrow checker is mad at me: I make a Box into local var b, move the box into an enum value and mem::replace it into an array, then try to keep using b. Textbook crime, no contest.

... But how do I get out of this? I have a &mut on the array, so I can legally get at a &mut Box... but peeling it out of the various layers is going to be ugly repetitive code.

Is there some pattern for "give this thing away but give me a &mut back to it" ? Guessing no...

raggi,
@raggi@rag.pub avatar

@danderson @aburka I think, but I'm not sure without seeing more context, that as a general pattern i'd be doing read-condition-then-write, rather than prepare for write first, but it's very context dependent

raggi,
@raggi@rag.pub avatar

@danderson @aburka saw your playground, and yeah, probably not here. Small hint: you can drop those as_mut's, &mut Box will automatically convert to &mut

danderson, to random
@danderson@hachyderm.io avatar

lol, I wrote a bit of code and my editor was happy with it, and I was very confused because it looked like there was very obvious reuse of a moved value that shouldn't have worked, but wasn't getting any diagnostics...

Turns out the rust language server was just busted, and I now have about three pages of angry borrow checker to sift through. At least I was right about the code being wrong, I guess.

raggi,
@raggi@rag.pub avatar

@danderson something you'll slowly get used to is that the borrow checker is another stage in the build process, so it becomes normal to expect another stage after syntax and type correctness - early on it's unusual though, which can be jarring

raggi,
@raggi@rag.pub avatar

@danderson it does yeah, and it can get broken sometimes - sucks when it happens. I can be pretty trigger happy with restarting rls

raggi,
@raggi@rag.pub avatar

@danderson oh no, that sounds awful :( I've had it get stuck on stuff like git branch switches, much like the go one and so on, but i've not seen a crashloop for a few years now

danderson, to random
@danderson@hachyderm.io avatar

So... maybe like this?

entire emacs window lights up with red and yellow underlines

Okay okay, not like that, I get the point rustc, no need to be like that

raggi,
@raggi@rag.pub avatar

@danderson as_mut working means the receiver was already a mutable reference, it just lets you get to the inner type

Di4na, to random
@Di4na@hachyderm.io avatar

My thoughts on the google whole "secure by design" thing.

Really cute. But also 1M? That is... A small team of engineers for a year. That is the value of Rust for Google. And they cite the amount multiple times as if it was worth praise!

And after they wonder why our digital infrastructure is mostly built and maintained by weekend warriors that are burning out.

It gets lonely in there.

raggi,
@raggi@rag.pub avatar

@Di4na the company also employs people who work on the language full time

mcc, to random
@mcc@mastodon.social avatar

I am in a terrible mood and I will tell you why: C++

raggi,
@raggi@rag.pub avatar

@whitequark @mcc @swetland @gsuberland the whole policy of “perfection is hard so fuck the obviously helpful” is such warm and very fuzzy

by which I mean enraging and poorly defined

kurtseifried, to random

Ok, normalizing an email address, assuming basic sanity:

lowercase everything (username and domain)
remove anything after the + in the username
remove any dots in the username

I can't think of anything else, this is it right?

raggi,
@raggi@rag.pub avatar

@kurtseifried your rules only apply to gmail

fribbledom, to random
@fribbledom@mastodon.social avatar

For my next life, I'm hoping to be reincarnated as a giant squid at the bottom of the ocean.

Pleeeease.

raggi,
@raggi@rag.pub avatar

@fribbledom it’s only a large squid when it’s at the bottom of the ocean

filippo, to random
@filippo@abyssdomain.expert avatar

Linux distros just going and disabling critical security features like the Go Checksum Database seems like a regular occurrence. It’s unclear to me whether there’s any Linux community that I can identify with enough to run their packages.

https://mas.to/@zekjur/111331838497984181

raggi,
@raggi@rag.pub avatar

@filippo I bent over backwards to try to help Debian back on to a sane path for rubygems some decades ago after other maintainers noped out. I noped out after the guy I was working with just started screaming NOT IN DEBIAN at me repeatedly. There are good actors out there, the SuSe folks at the time were great, they were helpful beyond their own needs, mutually accommodating and had better security practices than most

danderson, to random
@danderson@hachyderm.io avatar

Interesting to note: youtube's adblock detection seems to be tripping and sticky for me in chrome, whereas firefox... Totally fine. I hate being conspiratorially minded when I say the whole "new adblock APIs" thing was a prelude for this showdown, but...

Anyway, one more reason to switch to Firefox, if you needed any. It's pretty lovely.

raggi,
@raggi@rag.pub avatar

@danderson my main desire for Firefox is for them to move away from using direct write for font rendering on windows, it gets so bad at smaller sizes. Other than that it’s been going great for a long time now for me

raggi,
@raggi@rag.pub avatar

@danderson i'm quite curious what the breakdown looks like in more detail, all i have atm is https://4e6.github.io/firefox-lang-stats/

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