mastodontech.de ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Offen für alle (über 16) und bereitgestellt von Markus'Blog

Serverstatistik:

1,5 Tsd.
aktive Profile

#techposting

0 Beiträge0 Beteiligte0 Beiträge heute

Any recommendations for decent used external SAS units? I have literally filled my tower with drives and need moar space. Something used I can get on the cheap is great, something new that isn't awful is also fine. I need to ideally reclaim some space in the unit, for that matter... I can get creative, but in doing so I'll be in "these aren't spots where hard drives were meant to go" territory.

4 to 8 is ideal, I'll never complain about larger.

#SASDrives #RAID #ZFS #NAS #techPosting #techRecommendations

heeeeeey #python cats!

anyone know of a decent multi-language text tokenizer?

To be clear: I am explicitly looking to use it for non-generative-AI and other [slop/scab/labor theft] purposes.

Not sure of the specific terms I need to be looking up, frankly, since I'm mostly just finding Python's built in tokenize library which seems to be focused just on Python code.

Thank you!

#techPosting

hey hey #Linux #FileSystem #ZFS #RAID #XFS entities! I'm looking for extremely opinionated discourses on alternatives to ZFS on Linux for slapping together a #JBOD ("Just a Bunch Of Disks", "Just a Buncha Old Disks", "Jesus! Buncha Old Disks!", etc) array.

I like ZFS
but the fact that it's not in tree in-kernel is an issue for me. What I need most is reliability and stability (specifically regarding parity) here; integrity is the need. Read/write don't have to be blazingly fast (not that I'm mad about it).

I also have one
#proxmox ZFS array where a raw disk image is stored for a #Qemu #VirtualMachine; in the VM, it's formatted to XFS. That "seems" fine in limited testing thus far (and quite fast, so it does seem like the defaults got the striping correct) but I kind of hate how I have multiple levels of abstraction here.

I don't think there's been any change on the
#BTRFS front re: raid-like array stability (I like and use BTRFS for single disk filesystems but) although I would love for that to be different.

I'm open to
#LVM, etc, or whatever might help me stay in tree and up to date. Thank you! Boosts appreciated and welcome.

#techPosting

#proxmox cats w/ #networking experience and/or #network individuals in general (you can also respond if you don't consider yourself a cat in one form or another):

let's say I have two servers; the one running internet facing services is connected to the "DMZ" port (uggghhhh I hate that term) and the other is part of the general network. The router/firewall is configured to send all HTTP/HTTPS traffic to the internet-facing server and is blocked from accessing the rest of the network. The rest of the network, however, can access the internet server.

If I used proxmox on both servers, would I be able to configure/manage them from one interface? Or would they both need to be in the same 'zone'?

#techPosting

getting back into Python is weird because like every time I do there's a new fresh hotness to theoretically end all hotnessess re: package installation

and then the next time I get back in people are like, "that was such horseshit,
this is the thing"

"wheel is bad, but poetry: so good!"
"poetry is
shit, something something else is good (I dunno I kinda don't remember the name for this one)"
"we don't need that old one, we have WHEEL!"

motherfuckers

(yes, these are real things)

#techPosting #pythonLang #pythonPackaging

Fortgeführter Thread

The term array is pretty overloaded in programming, which is probably why I didn't realize immediately that it wasn't a situation of some sort of 'sized' vs 'unsized' thing... but also, their syntax is really, really similar. And it doesn't help that you can absolutely initialize arrays but specify the type of the variable as what is apparently a slice?

let str_slice: &[&str] = &["one", "two", "three"];

is perfectly legit, it would seem. Hence why I assumed... (I mean, in this example, the variable is named str_slice, but it's on the slice documentation page, so obviously I did not see it before).

#techPosting #rustLang

alright, I feel like an idiot for for not fucking realizing that

[T] is a slice in Rust and not just a shorthand for arrays (which are [T; N] where T is the type and N is the size)

Yesterday was fucking driving me crazy because I thought this goddamn dynamic dispatch function was asking for an array, so I was doing all this horseshit to send in a fucking array and then getting type errors about expecting
[T] but receiving [T; 3] and you'd think I would have clued in to the fact that they're actual different types and not just some sort of memory/borrowing shenanigans, but I was already like 7 hours into my day so no, brain wasn't working.

Makes so much more sense now. Because I was like, how the hell is a dynamic dispatch requesting an array, which is fixed size and known at compile time and placed on the stack (usually).

blehhhhh.

#techPosting #rustLang

Probably would help if Google wasn't so shit nowadays and trying to google errors returns a bunch of unrelated crap. Hey, fuzzy search assholes: if I include some variant of "NOT" or "NO" or "DO NOT", please do return results for doing the thing.

sooooo I did successfully switch from Fedora 41 to Gentoo. It was a lot harder than it needed to be because:

1. Instead of doing it like a regular person via a linux live USB, I did it from a chroot from my fedora install. This made the steps a little different and made the bootloader stuff a little harder (in that without realizing it, I was booting into gentoo with the fedora kernel. hello, no drivers! ooops) but otherwise not too bad.
2. I have full disk (partition) encryption via LUKS. It was trivial to solve, but I foolishly set up GRUB for LUKS1 instead of LUKS2 and basically it just wouldn't even load GRUB until I figured out that I shouldn't have specified encryption support in GRUB. Most guides you read nowadays assume LUKS2, but the Gentoo wiki for grub has an assumption about LUKS1, I think. Or otherwise assumes that your /boot directory lives on your encrypted disk instead of a separate partition (which is common with UEFI installs, like mine)
3. My RTC is fucked up; despite replacing the battery and even switching the polarity just to be sure, it keeps reporting the battery as dead and resetting the clock. This is usually only an issue when the machine suspends: the clock will then jump forward a few months. I work around this by running NTP and sometimes manually resetting the service, but apparently when I first installed gentoo I had the wrong clock, and portage basically throws a fit if you have files that are newer than what you're trying to install, so everything was in this weird partial half updated state. This also meant some builds failed for weird reasons (Ninja, in particular, really does not like it if some timestamps are wrong in some files and will fail on everything. This failure can take a LONG time in some instances and usually has to happen 100 times before the build is considered a failure). It took me about two days to successfully compile qtwebengine due to this and disk space issues.

I think if you don't have the above issues, your install process will go a lot more smoothly than mine did. Oh, also, portage profiles? Do not necessarily actually mark the set of packages as necessary as you would think? Like, I assumed using the KDE Plasma Desktop profile would mark Plasma as being... necessary to install, but it does not. You still have to manually bring it in. Which I like! It basically configures all of your flags and variables (USE flags in gentoo parlance) as being setup for desktop usage. I think it does mark
some packages as needing to be installed, but... it did not bring in Plasma or any apps.

OpenRC is trivial to switch to, coming from systemd, I think. The syntax is straight forward. It does feel a little more 'old school', which has pros and cons, but it's pretty easy to add services and doesn't control half the fucking OS which I like. Converting systemd files is easy too.

#techPosting #linux #fedora #gentoo #linuxDistributions #systemd

Heeeeeeey linux cats!

I would like to learn how to do kernel work
and closer to the grain hardware work. Anyone know of any reasonably-priced device (wifi card? PCI-E card? even if it's a laptop, so long as it's relatively inexpensive for the whole shebang) that oh my god no one gives a shit about enough to write a driver but it would be super cool if it did work?

If you know of any listing of anything of this type or anything, that would be really helpful. I dunno what my price point is but given that it's education to increase my skillset for employability (and to possibly help stave off more compute lockdown in the future) I do have
some budget for it. I'm not really a hardware kitten so I'm not quite sure where to begin to look for this kind of info.

Boosts very much appreciated!

#linux #hardwareHacking #linuxDriver #linuxDevelopment #linuxHardware #tech #techPosting

soooooo I had this like, weird structure in Rust that was a struct that held an Option<Vec<MyStruct>> and I used a match statement on the From implementation to determine whether it was a 'real' instance of the struct that contained all the real values, or whether it was an actually an array of the structs and would generate things appropriately

and that felt silly, and was just sort of an artifact of playing around with how to do things, and I realized I could just go ahead and change my struct to an
enum that held the original struct or a Vec of them and it just... worked? Like I just changed the From function a little to handle it being an enum but everything compiled and... works.

like I expected a lot of failure. but nope.

#rust #techPosting

me: "I'm too exhausted to do the job hunting CV restructuring I wanted to do today"
also me after reading a bunch of silly manga and an ADHD med: "alright, fire up my LaTeX docker container"

sidenote: I don't know how I feel about jetbrain's Fleet yet, except it is pretty easy to convert existing VSCode docker containers to it, it turns out (and so long as you don't use docker compose, it works fine with podman (tl;dr: it seems to have
docker-compose instead of docker compose hard coded in and at least on F41, podman only provides the latter)) and it's nice to not have to install VS Code.

#techPosting #jetBrainsFleet #docker #latexSoftware <- does LaTeX have its own hashtag? As amusing as it would be to get this caught in a fetish post, I feel like people following costume/drag/fetish accounts don't deserve to be riddled with tech stuff.

(I mean, no one does).

Does anyone have any tips or experience about how to discuss non-professional coding projects? I've been doing a lot of project side work in #rust over the last few months that has absolutely improved my capacity to program with it to where I'd feel comfortable working on it in a professional context. However, I don't have a published project or crate in it or anything so I don't necessarily want to link the project without having some idea of whether that's a good idea or not.

Otherwise I just have "Rust" on my CV but no specific Rust projects (there's examples of the other languages I can program in there).

Thank you! Boosts totally okay and appreciated.

#resumeQuestions #resume #cvQuestions #CV #jobHunting #techPosting

so after a week off writing some stuff, I went back and realized I was going to have difficulty with my _extends idea of squashing normal inheritance from an object oriented schema into Rust (ActivityStreams and ActivityPub)

I realized, though, that since I actually know all the possible children and their variants, it's actually trivial to basically reverse inheritance and just do it that way. So, rather than children storing their parent object, i.e:

so this, in a generic OO schema, was done as:

class Parent()

class Child: Parent()
as
struct Parent {
  parent_field_1: Option<String>
}

struct Child {
  child_field_1: Option<String>, // etc
  _extends: Parent
}
followed by use of recursive getter/setter functions... I realized that this was going to be a problem because technically anything that accepted a type of Object from ActivityStreams really accepts anything that inherits or extends from Object in some fashion. So I switched it around:
class Object {
  id: Option<String>,
  ...
  _child: ObjectInheritance
}

enum ObjectInheritance {
  Actor {
    actor_specific_field: Option<String>
  },
  Activity {
    activity_specific_field: Option<String>
  }
}

This simplifies a hell of a lot of things: deserialization, and by extension serialization, become very trivial by simply making use of
flatten and untagged_enum. Then I just write a From implementation that can handle all the different ActivityStreams types that inherit from Object.

Since all the children are set in an an enum, I can now just do basic matching against the enum variants to handle incoming payloads.

There's a lot to clean up still but I just basically just... I won't say the work I did before was worthless, because it wasn't to understand ActivityStreams, ActivityPub, and Rust a little better but.

#techPosting #activityStreams #activityPub #rustLang

kinda weird constructing the serialization/deserialization for #activityPub types in #rust because it does mean I'm doing a lot of curl requests against my own server (and those of other people) to see what the raw data looks like in the wild

aaaaaand I'm very glad I took the "everything can be there, nothing has to be there" seriously because yeah.

I spent most of the last week looking for a job so today is the first day I've programmed all week. While I don't yet have all the basic data types finished (lots of todo stubs) I'm slowly getting things there and the way I've setup the
From/To methods+workflow and hacked in inheritance is going to work just fine.

I really need to work on the
OrderedCollections next because that's quite critical for the inbox and outbox and such.

#techPosting

how many lines of code could it be to parse arbitrary JSON payloads w/ serde in Rust, Michael? 10 lines?

https://codeberg.org/Astatide/satyr/src/commit/0fb988877efef72a66a71e578b450ce73e30d8ab/src/primitives/activity_pub/core.rs#L369

(this is literally just a first pass to get 'known good values' from the context, so to speak. I'll then use the resulting
serde::Value with a 'known structure' and blessed values to construct AP objects fuuuuck)

Basically if it's not in the context or an actual known AP value I don't want it, I'm pretty sure, so it'll get dumped during this process.

#techPosting #rust #activityPub #activityStreams

Codeberg.orgsatyr/src/primitives/activity_pub/core.rs an 0fb988877efef72a66a71e578b450ce73e30d8absatyr
Fortgeführter Thread

it ain't much, but it's... uh... well, I dunno how honest it is, I guess, that's not really a factor here...

I'm basically cheat macro-ing in object inheritance for the deserialized types. See here for the
Actor definition, which has an Object type (as that's what it extends) on the _extends field: https://codeberg.org/Astatide/satyr/src/commit/954083cdd5135161106d46b8811fc8e01cfd4ee8/src/primitives/activity_pub/core.rs#L229

Adding some
serde field tags makes sure things flatten and/or are ignored as necessary; my use of enums for fields that are optional also serializes nicely without leaking implementation details.

Then I just implement
Into<ACTOR> for SatyrActor: https://codeberg.org/Astatide/satyr/src/commit/954083cdd5135161106d46b8811fc8e01cfd4ee8/src/primitives/satyr/actor.rs#L195 and call the appropriate conversions/serialization functions.

I think the only thing that's a little difficult is parsing through the AP specification to see what I need to make sure I'm passing around (since Actor is used in... three or four different places, for instance, and I'm mostly just skimming due to ADHD). Also you'll notice I'm missing the important
type and @context fields in the JSON output (that'll come later).

#techPosting #rust #activityPub

well... this is starting to work. Hilariously.

I'm using the activitypub crate from the lemmy people. Had to finagle a little to get it work, but here's a successful curl request that prompts the server to do a SQL query against a postgres database, convert the result into a
SatyrActor, then casts them into an APSatyrActor which is then de-serialized and returned.

I did do part of an ActivityPub implementation on my own, which was enough to learn some macros and AP stuff and make me realize I didn't really want to do that on my own.

#rust #activityPub #techPosting