art (9 posts)

018-texas blue.mp3

2025 Feb 09 #art

made ages ago and never published :3

someone else was playing around with treating data as audio and made a file
(credit to: flora key)

i went and added reverb and slowed it down

have fun

Sensor noise art

2023 Jul 12 #art

I was playing around with Open Camera with a very long exposure (10 seconds), with a somewhat high ISO (3000ish), with my camera placed against a flat object so it doesn’t see any outside light. This is a great way of capturing sensor noise, though it does seem to be brighter around the outside, and less in the middle. Light leakage? Or just how the sensor works?

Anyways, I did that, and then played around with every nearly filter the stock photos app on my phone had, which results in some neat wallpapers.

some pictures i took today

2023 Apr 18 #art

I was going into town today, and took the chance to take some pictures.

You can click them to open them as a JPEG XL for the original size and higher quality. If your browser doesn’t support JPEG XL, try opening it in something that does.

This was my first time using darktable. I don’t know what I’m doing in it, but at least I managed to nicely censor out the license plates.

(also, these were taken on the 17th, but i’ve not slept since for it is nearly 1AM, so i still consider that today)

Trans rights blend

2021 Feb 07 #art

I made a trans flag wallpaper in blender!

I actually made this like a year ago but I’m publishing it now.

Distortion

2020 Dec 31 #art

When writing a box blur implementation, initially I had a fun bug where the rolling sum for values on the left were incorrect, since I did not include early values in the blur. It looks really cool so I kept the code for it.

If you just want to try it out on your own images, I wrote a JS version.

Below is the code, with the required fix commented out. This does a box blur on a single row of the image, with a specified width.

µ [sic]

2020 Nov 12 #art

here you go have a full on album ig,,,

as always source embedded in the files

music made with (a non-trivial amount of) C

2020 Nov 10 #art

There’s a better post to be made about making music with bitshifting but that post is still due to be released on the year of the linux desktop.

Volume Warning: Is reasonable on my machine. Check yours.

Source Code: Run strings on the file.

C (1 posts)
hack (6 posts)

printf format validation in rust

2023 Oct 07 #hack

I was watching a talk about Idris 2 and it was mentioned that you can implement a type safe printf using dependent types (around 10 minutes in).

And I was wondering if you could do something like that in rust. And you can, ish!

error[E0308]: mismatched types
   --> src/main.rs:145:13
    |
145 |     let x = printf::<"that's a %s %s, aged %u!">("cute", "dog");
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `"%s%s"`, found `"%s%s%u"`
    |
    = note: expected constant `"%s%s"`
               found constant `"%s%s%u"`

That’s done with no macros, just a lot of const code of dubious quality.

fun with comments

2023 Aug 14 #hack

Programming languages typically include one or two ways to comment out code so that the compiler doesn’t read it. One being line comments, such as

foo(); // comment here

which will comment out any code up until the end of the line, and the other being block comments, such as

foo(42 /* a 
    good 
    number */ )

which will comment out code in a block.

Block comments aren’t restricted to a single line, and can sometimes be nested (so that /* /* */ */ behaves correctly).

But what happens when you mix the two?

(Misusing) Python Unicode Normalisation

2020 Oct 24 #hack

After PEP 3131, python normalises identifiers in order to support non-ASCII identifiers.

That means that if you write 𝚠 = 50, where that character is U+1D6A0 MATHEMATICAL MONOSPACE SMALL W, you can later refer to that variable as w (or, indeed, anything that normalises into w).

So I wrote a program to randomly replace every character in some code with any character that normalises into it while trying not to break the program.

Custom literals in rust

2020 Sep 25 #hack

Ever wanted custom literals in rust? No? Too bad!

let x = "#123456": [[Color]];
// x is a Color

This runs at compile time. If the parser panics, you get a compile failure. Neat, huh?

This also doesn’t only work for strings. Any value known at compile time can be used. As long as you can do your processing in a const fn, it’s fair game.

is it ub (1 posts)
quiz (3 posts)

C# puzzles

2024 Jan 31 #quiz

Two puzzles about funny C# behavior I discovered in the past.

The first one is fully defined, the second one is Quite Clever.

Spot the bug: Bad Escape

2023 Jul 19 #security #quiz

Hi! I wrote some Excellent Javascript that lets you change an image based on the funny little characters you type in the box at the bottom. I’ve vaguely heard of XSS, so I know that I should escape the characters, so I copied the escaping rules from Tera.

Namely, replacing &, <, >, ", \``, and /` with their associated HTML entities.

Your task is to call submitFlag with the string value <>. If you succeed, I will alert a fun message for you :)

rant (3 posts)

Your machine isn't turing complete, so why are you mentioning the halting problem?

2023 May 01 #rant

Sometimes I will be part of exchanges such as:

Me: It would be cool if you could prove the lack of stack overflows in code!

Someone: Proving that code will not stack overflow is the same as solving the halting problem though.

Which is very much true, if you demand no false positives. But rather pointless. It’s being overly pedantic as a way of (intentionally or otherwise) being dismissive about useful feature ideas.

C#'s broken type system

2020 Jul 02 #rant

C# has a broken type system. And by that I mean the vast majority of function signatures that you write in C# are lies, and your function won’t be able to do meaningful work with all values that compile, and that there’s nothing you can do to fix this.

security (4 posts)

Spot the bug: Bad Escape

2023 Jul 19 #security #quiz

Hi! I wrote some Excellent Javascript that lets you change an image based on the funny little characters you type in the box at the bottom. I’ve vaguely heard of XSS, so I know that I should escape the characters, so I copied the escaping rules from Tera.

Namely, replacing &, <, >, ", \``, and /` with their associated HTML entities.

Your task is to call submitFlag with the string value <>. If you succeed, I will alert a fun message for you :)

PoC Watermark Attack on Restic

2023 May 20 #security

First off, does this matter to you? No. No it doesn’t. Unless you’re backing up gigabytes of completely attacker controlled data, to an attacker controlled service, and need to ensure they don’t know you’re backing up said data, it Doesn’t Fucking Matter.

With that said, it’s a somewhat neat attack!

A watermarking attack is when an attacker who can get you to store an attacker-controlled piece of data can then detect the presence of that attacker controlled data. It’s not a huge deal, but is a concern if someone is able to inject a watermark into, say, copywritten or leaked content, and then automatically terminate the cloud storage/backup accounts of users that can be shown to have that data on their drive.

tool (4 posts)

nixos update shell script

2024 Jun 23 #tool

I use a nix flakes setup to manage my system as a whole, so I have a flake.lock in my dotfiles which makes up 50% of my commits to just update it. I wrote these scripts to help make updating my system a bit nicer.

Xonotic now-playing MPD script

2022 Nov 27 #tool

First off, the script:

xon_mpc_artist="$(mpc status -f "%artist%" | head -n1 | sed 's/;/;/g' | sed 's/\^/^^/g')"
xon_mpc_title="$(mpc status -f "%title%" | head -n1 | sed 's/;/;/g' | sed 's/\^/^^/g')"
xon_mpc_album="$(mpc status -f "%album%" | head -n1 | sed 's/;/;/g' | sed 's/\^/^^/g')"

if [ "$playing" = true ]; then
echo "say /me ^8np^7 ^x6b6$xon_mpc_artist ^xa44${xon_mpc_title:0:60} ^x345$xon_mpc_album" | head -n1 > "$HOME/.local/share/xonotic/.xonotic/data/np.cfg"
else
echo "" > "$HOME/.local/share/xonotic/.xonotic/data/np.cfg"
fi

And on the xonotic side, it’s just bind n "exec np.cfg".

Reverse Image Search

2021 Aug 01 #tool

Many times have I come across an image with no source given, and no signature visible, or someone else is asking where a particular image comes from. I’m writing this in the hopes that next time you post an image you found without a source, you spend the 5 minutes it takes to at least look to see where it came from.

yt-dlp scripts

#tool

I use yt-dlp in order to be able to view videos from channels I follow offline, and wrote this set of scripts in order to help manage it.

video (1 posts)

xonotic defrag gameplay: techniq_run_002/vanilla_01 finishes

2024 May 11 #video #xonotic

i just finished all (finishable) relaxed running maps on xdf.gg, all 1159/1161 of them. (the 2 remaining ones are just not possible in xonotic), and thought i’d share my finishes of the final 2 ones. this is also a test of video recording from xonotic, i might upload duel footage or something here too, who knows.

xonotic (1 posts)

xonotic defrag gameplay: techniq_run_002/vanilla_01 finishes

2024 May 11 #video #xonotic

i just finished all (finishable) relaxed running maps on xdf.gg, all 1159/1161 of them. (the 2 remaining ones are just not possible in xonotic), and thought i’d share my finishes of the final 2 ones. this is also a test of video recording from xonotic, i might upload duel footage or something here too, who knows.