Replies

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

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

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.

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