mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#techposting

0 posts0 participants0 posts today

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

Came up at work but definitely a question of general interest:

I feel like when looking at a line-by-line diff of an XML file, it's just...
really not super clear, even with highlighting and such. Is there any sort of graph-aware diff tool that might generate a visual graph and show the difference that way? So that rather than reviewing line by line, you can say "ah, a node has moved from being a child of this node to another", or "these two nodes have been merged into one".

I feel like it would be possible to gin something up in like, networkX or something, but if there's prior art...

#techPosting #XML #computerScienceTrees #graphs #diffs

#techPosting

Okay, well, did a crash course on pydantic and fastAPI last night; it’s cool how fast I was able to get activitystreams objects/types up and running with it, damn. Python is such a totally different (and better) language than it was 10 years ago.

#techposting

just learned the hard way that
#groovy syntax highlighting is really really bad and my brain hates it. I just thought syntax highlighting wasn't working... but no, it's basically just a blob of text, with or without their "I have to pay for every single pixel of color or bold text so I will use it as sparingly as possible" as far as my eyes are concerned.

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

question for tech-y storage people: I just nabbed 4 extra (used) disks with a 6 TB capacity from a place that re-sells electronics (oregonrecycles.com); I think they did some testing but obviously I dunno what to extent, and also, if it was just limited to stuff like SMART data, well...

anyway, I wanna RAID it, which is fine, but I don't know how much lifetime these have left on them. For four disks with unknown usage, should I use RAID6 or RAID10? It's not
job critical data I'll be storing on these (mostly media and such). They'll eventually be migrated into a larger RAID array but that won't happen until I'm stable and can afford to rebuild my server so this is fine for now.

I wouldn't
mind the better read/write performance that comes with RAID10 even though it has less parity. I suspect these disks were all used together so they might have similar wear/tear patterns; in that case, I'm wondering if RAID6's double parity actually buys me any extra life? Like, given 4 disks with the same history and a probably known disk failure rate, I'm not really clear as to whether double parity is going to make much of a difference (and that if one goes down, the others probably aren't too far behind).

#techPosting #raid #raid6 #raid10 #storage #nas

One day I'm going to sit computer scientists down and teach them about the concept of reversibility and how that might apply to verbs/functions/etc

the opposite of install should be 'uninstall', not remove (remove should work too though)
if I must call a method named
fromarray to create an object from an array, should there not be a method named toarray

arrrghhhhh

#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

I can't believe I'm voluntarily writing regex on the anniversary of Dune

(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)?((\/[a-zA-Z0-9_?=&]*)*)?(\ ?HTTP\/(1\.1|0.9|1.0|2|3))?
I also can't believe I wrote it and that it works without having to remember
too many things

(it's a basic start to parsing the first line of HTTP headers)

I am probably going to have to write a lot of regex for an HTTP server module, aren't I.

#techPosting #regex

just gonna tag
@hipsterelectron@social.treehouse.systems 😂

I kinda wanna try out the #guix #guixos but I feel like since I use both #plasmaDesktop and #steam (plus a lot of non-free stuff) I feel like maybe I'm just setting myself up for trouble?

but the idea of one language for everything, including services, and all of it being treated like a first class citizen is really appealing. Plus I'm pretty sick of the
#nix community (fuck you, jon ringer, you warmongering garbage fucker).

#techPosting

Continued 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.

Replied in thread

@xgranade@wandering.shop blehhhhh I'm only doing this to save a few lines anyway. I'll take a break, come back later,

If you're curious about the situation I wrote myself into:

https://codeberg.org/Astatide/satyr/src/commit/5ab68ab1c479330f0706b82d948a6c597684eb8e/src/database/database.rs#L139

Basically the database is mysql/postgresql agnostic, so I have an enum that combines the different parameter types from each library. The postgresql one uses
dyn in the argument list for the parameters of the query function, so I just try to pass that on as transparently as possible. But it's borrowing hell, basically.

I'm only saving myself two lines per function anyway. It's just the principle of the matter at this point.

#techPosting

Codeberg.orgsatyr/src/database/database.rs at 5ab68ab1c479330f0706b82d948a6c597684eb8esatyr

sometimes writing helper functions in rust is a fucking pointless pain in the ass because scoping can cause problems with ownership and lifetimes and I hate it

IDE: "you're repeating a lot of code, here..."
me: "I don't want to fucking restructure my whole goddamn project just because rust refuses to let me manage my own fucking lifetimes."

#techPosting

Instead of calling it a “supply chain” when discussing software, let’s call it what it is: “dependency hell”.

And instead of calling it a “supply chain attack”, let’s call it “the divine punishment delivered in dependency hell for basing so many things off of unpaid labor.”

#techPosting