social.coop is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Fediverse instance for people interested in cooperative and collective projects. If you are interested in joining our community, please apply at https://join.social.coop/registration-form.html.

Administered by:

Server stats:

485
active users

#socket

1 post1 participant0 posts today

The Rise of Slopsquatting: How AI Hallucinations Are Fueling a New Class of Supply Chain Attacks

socket.dev/blog/slopsquatting-

> Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.

This was an excellent article covering an area that definitely has not gotten enough attention, especially coupled with Vibe Coding.

SlopSquatting... What an excellent name!

Soviet phone socket. Seems to contain a lightbulb?! And two 1A fuses.

No tone, but it's not disconnected, something pulses a ~40V spike every now and then.

The fuses connect each input wire to the residential outlet. The lightbulb doesn't seem to be connected to anything, but has those two screws to connect it across the copper pair, presumably for testing purposes. Those 40V spikes would make it flash. It's normally under an opaque cover.

Interesting.

Just started work on the planned "single instance mode" for #Xmoji.

The first commit is done, adding a class implementing the core functionality using a local #Unix #socket. Part of the job is deriving a unique name for that socket, where #hashing comes natural.

I had a similar class in #qXmoji (based on #Qt), and there you have #sha256 at your fingertips with QCryptographicHash, so I just used that. You need a string from that, and sure thing, there's a .toBase64() method. Well, a / doesn't play well for filenames, but then, there's .replace().

Without all these helpers from Qt, first thing I did now was searching the web for a "good" hash function, but there's certainly no need for a cryptographic one. I found #FNV1a. It's super easy to implement in #C. And for the base64 part, well, doing it myself, I can directly use a modified set of digits, without the /.

Now, here's the whole thing:
https://github.com/Zirias/xmoji/commit/db764e3184537d42b528e718bd4886495eb45544

I'd say that's a nice example how not having lots of "powerful" library functions readily available can lead to a much better (smaller, more efficient) solution. 😏

#X11 #emoji #keyboard #development
GitHubSingleInstance: Enforce single running instance · Zirias/xmoji@db764e3Add class to optionally enforce a single running instance per host and user. Use this during xmoji startup().
Coding in #C ... sometimes I really enjoy just using what I created a long time ago 😁.

This is the whole change to #Xmoji allowing it to fork into background on startup:
https://github.com/Zirias/xmoji/commit/0ab2d8ed424ebc35aa99e5c2bd15b097a5e74b42

It's the first step to implementing an (optional) single-instance mode, that will only allow one running instance per user and machine. Implementing that will require a local #Unix domain #socket, which is also covered by the same library, #poser 😉.

I designed this library for (simple and small) #networking #daemons, but found it's quite useful for #X11 applications as well. If you want to know more, here are the docs:
https://zirias.github.io/poser/
GitHubX11App: Detach from terminal by default · Zirias/xmoji@0ab2d8eBy default, fork into background and exit from the main process after startup is complete. For this to work, calling X11Adapter_init() must be moved in the prestartup event handler which runs from ...

I have, literally, 7 different flavours of subminiature crimp-pin connectors in my parts collection.

And yet, somehow, whatever I'm working on has a nearly-identical-but-not-quite kind that isn't in my collection.

Murphy was an optimist.

#murphy#jst#xh