Freaky

@Freaky@hachyderm.io

Lazy Rustacean, lapsed Rubyist, lupid nerd, loony leftist, laconic ignostic. ∞ he/they.

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

TheSpaceshipper, to random
@TheSpaceshipper@socel.net avatar

Welcome to the Ranger One 🌠

So what did you think of the tense first episode of For All Mankind season 4?

image/png
image/png
image/png

Freaky,

@TheSpaceshipper Why do VFX artists hate radiators :(

eniko, to random
@eniko@peoplemaking.games avatar

me: i should use the off-the-shelf library because i'm sure it's much more robust and well tested

me: 10 minutes into using the library finds a bug 😒

Freaky,

@eniko I looked at a library the other day that did CPU feature detection. You'd think that would be a lot of CPUID stuff - just a bit of assembly, or some C intrinsics, yeah?

I looked at the FreeBSD support and found it worked by parsing out the Features= line out of /var/run/dmesg.boot.

A fucking Google library:

https://github.com/google/cpu_features/blob/8cfb520efb8a73c86aac71e5c86099a6e40f377a/src/impl_x86_freebsd.c#L33

Why would you even want to fix that? It's like walking into an ancient nuclear waste storage site, all spikes and foreboding.

rain, to random
@rain@hachyderm.io avatar

CPython interns integers in the range [-5, 256] (both inclusive). Does anyone know why it's -5, and why the upper limit is 256 and not 255? Is it just arbitrary?

Freaky,

@cliffle @matsuzine @rain https://groverlab.org/hnbfpr/2017-06-22-fun-with-sys-getrefcount.html

"The integer 256 (or 2^8) is used about 100 times more often than would be expected by its position on the number line"

catsalad, to random

Ooohh.. So that's how they worked!

Freaky,

@catsalad @natik How about a 5.25" disk that presents A and B sides depending on which way around it's plugged in.

Freaky, to random

Security fixes for Exim are out. Here's one for an out-of-bounds write in its external authenticator code:

  • auth_vars[expand_nmax] = s;
  • auth_vars[expand_nmax = 1] = s;

Which certainly doesn't look like an error-prone way of resetting how many numbered strings you've expanded.

Incidentally, two of these three variables are globals. That's not particularly surprising since Exim has well over 700 of them.

Anyway, I'm sure nothing like this will happen again now these are fixed.

mcc, to random
@mcc@mastodon.social avatar

I wish I had a single unix command-line tool that presented a single command-line interface but can work with all the various compression formats I use (tgz, 7zip, zip, etc).

Currently zip, 7z, tar, zstd etc all use different tools with totally different interfaces. I find myself needing to consult one or another --help far more than I should. zstd just startled me greatly when I discovered that zstd -d by default writes the output file in the same directory as the input file rather than pwd

Freaky,

@mcc libarchive's bsdtar supports the same formats libarchive does - zip, 7z, rar, iso, shar, mtree, uu, etc.

grumpygamer, to random
@grumpygamer@mastodon.gamedev.place avatar

I wrote a key/value store in PHP using SQLite. It's becoming the workhorse of my build process.

https://github.com/grumpygamer/kvstore

Freaky,

@grumpygamer Cute!

Looks like your addValue is non-atomic, selecting a value and then inserting(?) a new one based on it - it'll race with other calls.

Freaky,

@grumpygamer I'm not too familiar with SQLite. Let's see.

INSERT INTO kv_store (project, key, value, time) VALUES (?, ?, ?, datetime()) ON CONFLICT (project,key) DO UPDATE SET value=value+?,time=datetime() RETURNING VALUE

With a unique index on (project, key)

Freaky,

@grumpygamer Ah, I see, rows are immutable and it's all append-only. Yeah, an index on (key,id) might be good for performance.

How about something like this:

INSERT INTO kv_store(project,key,value,time) VALUES (?,?,? + COALESCE((SELECT value FROM kv_store WHERE project=? AND key=? ORDER BY id DESC LIMIT 1), 0),datetime()) RETURNING value

Freaky,

@grumpygamer Or alternatively, just wrap the lot in BEGIN EXCLUSIVE .. COMMIT.

Freaky,

@grumpygamer It should be released at the end of the request - PHP's refcounted so it shouldn't hang around until the next GC or anything like that.

Even if it's a hard crash, SQLite uses advisory locks that get released automatically when files are closed.

Freaky,

@grumpygamer Meanwhile you helped me catch an embarrassing bug in FreeBSD's lang/php83-extensions port, so, thanks!

Turns out it actually builds PHP 8.2 extensions...

Freaky,

@grumpygamer Turns out this triggers a bug in PHP's SQLite3 extension - it increments/decrements twice!

https://bugs.php.net/bug.php?id=64531

fasterthanlime, (edited ) to random
@fasterthanlime@hachyderm.io avatar

What’s the best WiFi standard your best device supports?

See table here for details https://en.m.wikipedia.org/wiki/IEEE_802.11be

Freaky,

@fasterthanlime My AP had its 11th birthday last month. It might not have the raw speed of flashy younger devices, but it has experience.

Freaky, to random

Blast from the past - that time @codinghorror speculated over how one of my websites (qurl -- and others like it) worked: https://blog.codinghorror.com/url-shortening-hashes-in-practice/

After all this time, I can reveal the truth: 1YU was a base62-encoded MySQL auto_increment key (7620).

Freaky,

@codinghorror Look, we've all done things we're not proud of.

Let whoever has not hosted links to a thousand scams and malware sites, nor used case-sensitive paths in a URL, throw the first stone.

Freaky,

@jwz @codinghorror Not being very popular was certainly an advantage in that regard!

I used zbase32 for a slightly more recent service which needed to encode large numbers - not as short but arguably friendlier.

https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt

Freaky, to php

Turns out 's had ifunc support on disabled for about half a decade, so we don't get any of those fancy SIMD-optimized base64, addslashes, or mb_ string functions.

The port maintainer plans on enabling them on lang/php83, but it will need people to test it before it gets backported.

I gave it a go with php81 on a 5700X:

addslashes, 10m iterations: 2.5s -> 0.45s
base64_encode, 10m iterations: 2s -> 0.6s

matt, to random

Outside of debuggers, is it common on any Unix system for a parent process to handle a child process's fatal errors, e.g. segmentation faults or stack overflows? Seems like it would be a lot cleaner than having the process handle its own errors via signals, after it has already gotten into a potentially very messed up state.

Freaky,

@matt How it's displayed is up to the shell - it gets the exit signal number extracted from the return value of waitpid()

Freaky, to random

Just upgraded to 2.7.2 on FreshBSD.org. It didn't last very long:

Successfully started Caddy (pid=15076) - Caddy is running in the background
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x907c10]

Looks like it's HTTP/3 related, which I've disabled for now: https://github.com/caddyserver/caddy/issues/5680

Imagine inventing a programming language in 2009 and it still does this sort of thing...

Freaky, to FreeBSD

Here's an rc script for #FreeBSD to apply (and remove) the #Zenbleed MSR "chicken bit" workaround.

Simply drop in /usr/local/etc/rc.d/zenbleed_workaround, run service zenbleed_workaround enable and then service zenbleed_workaround start.

https://gist.github.com/Freaky/2560975d3c94246b86f464b8be75c967

RussInCheshire, to random

This is my first attempt to do #TheWeekInTory on Threads, and it might all go horribly wrong (although that would be on-brand for this government).

https://www.threads.net/t/CuhDx2MICbR/?igshid=NTc4MTIwNjQ2YQ==

Freaky,

@RussInCheshire This seems like something you could automate - especially here. How much tailoring do you really need per network?

The Threads website - such as it is - doesn't even load in my fairly standard Firefox setup.

thomasfuchs, to random
@thomasfuchs@hachyderm.io avatar

What goes on in a mind like this? Also, why hasn't he been driven out of the country with pitchforks? https://www.theguardian.com/uk-news/2023/jul/07/robert-jenrick-has-cartoon-murals-painted-over-at-childrens-asylum-centre

Freaky,

@thomasfuchs We dump enough of our waste overseas as it is.

ZachWeinersmith, to random
@ZachWeinersmith@mastodon.social avatar

I guess on some deep level I don't understand why Mark Zuckerberg needs all of my personal data three separate times. It's starting to seem like an obsession.

Freaky,

@ZachWeinersmith It's the social media backup strategy: at least 3 copies of your personal data, across two different platforms, and at least one should be from an external acquisition.

mcc, to random
@mcc@mastodon.social avatar

Linking this rather than boosting because I need to add warnings (for: heavy flashing effects , very loud) but: This is INCREDIBLE https://social.ordinal.garden/@t36s/110663052314356132

Freaky,

@mcc This feels like a plot device in a David Langford story.

'“We are the Shudder Club,” Khalid intoned. “We are the ones who can take it. Twenty seconds.”'

https://www.lightspeedmagazine.com/fiction/different-kinds-of-darkness/

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