e0qdk avatar

e0qdk

@e0qdk@kbin.social

I write code and play games and stuff. My old username from reddit and HN was already taken and I couldn't think of anything else I wanted to be called so I just picked some random characters like this:

>>> import random
>>> ''.join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789") for x in range(5)])
'e0qdk'

My avatar is a quick doodle made in KolourPaint. I might replace it later. Maybe.

日本語が少し分かるけど、下手です。

Alt: e0qdk@reddthat.com

e0qdk,
e0qdk avatar

Yep. It's Garden of Words. I just skimmed through my copy and this image is from about 18 minutes in.

e0qdk,
e0qdk avatar

It might be easier to just fire up Wireshark and look for relevant traffic when you trigger the action.

Easy workflows for intentionally upscaled art?

So the basic idea here is using a low-resolution texture that is designed specifically to be upscaled (anything but the first 3) to a simpler smooth aesthetic. Pixel blob/triangle/hexagon etc in with a 32x-or-lower texture (which is all that is downloaded), crisp shape(s) out. Also probably things like lineart for faces (or...

e0qdk,
e0qdk avatar

The Wikipedia article for hqx points out that an implementation exists as a filter in ffmepg.

You can run a command line conversion of e.g. a PNG -> PNG using hqx upscaling like: ffmpeg -i input.png -filter_complex hqx=4 output.png

The =4 is for 4x upscaling. The implementation in my version of ffmpeg supports 2x, 3x, and 4x upscaling.

As a quick and dirty way to get semi-live preview, you can do the conversion with make and use watch make to try to rebuild the conversion periodically. (You can use the -n flag to increase the retry rate if the default is too long to wait.) make will exit quickly if the file hasn't changed. Save the image in your editor and keep an image viewer that supports auto-reload on change open to see "live" preview of the output. (e.g. eog can do it, although it won't preserve size of the image -- at least not in the copy I have, anyway; mine's a bit old though.)

Sample Makefile:

output.png : input.png Makefile
	ffmpeg -y -i input.png -filter_complex hqx=4 output.png

Note the -y option to tell ffmpeg to overwrite the file; otherwise it will stop to ask you if you want to overwrite the file every time you save, and in case you're not familiar with Makefiles, you need a real tab (not spaces) on the line with the command to run.

ffmpeg also appears to support xbr (with =n option as well) and super2xsai if you want to experiment with those too.

I'm not sure if this will actually do what you want artistically, but the existing implementations in ffmpeg makes it easy to experiment with.

e0qdk,
e0qdk avatar

I was just thinking about the image resizing thing again when I saw your message notice pop up. Another option for preview is a web browser. A minimal HTML page with some JS to refresh the image would avoid the image resize on reload problem, and gives you some other interesting capabilities. Python ships with a kind of meh (slow and quirky), but probably sufficient HTTP server (python3 -m http.server) if you'd prefer to load the preview on a different computer on your LAN entirely (e.g. cellphone / tablet / ... ) for example.

A simple HTML file for this would be something like:

<!DOCTYPE html>
<html>
  <head>
    <style>
      html, body {
        background-color: #000000;
      }
    </style>
    <script>
      function reload()
      {
          let img = document.getElementById("preview");
          let url = new URL(img.src);
          url.searchParams.set("t", Date.now());    // cache breaker; force reload
          img.src = url.href;
      }
      
      function start()
      {
          setInterval(reload, 500);
      }
    </script>
  </head>
  <body onload="start()">
    <img id="preview" src="output.png">
  </body>
</html>

Regarding input from a gamepad -- I've had some similar ideas before but haven't really had much success using a gamepad artistically outside some limited things where I either wrote the entire program or was able to feed data into programs that accepted input over the network (e.g. via HTTP and which I wrote a custom adapter for). It's been a long time since I've tried anything in that space though, and it might be possible to do something interesting by trying to make the system see the combination of a gamepad stick as relative mouse motion and trigger as pen pressure. I'm not quite sure how to go about doing that, but I'll let you know if I find a way to do it.

e0qdk,
e0qdk avatar

What upside down thing with a banana??

There was a viral video/meme maybe a decade ago about how monkeys peel bananas (might have actually been an orangutan or gorilla in the one I saw; been too long since I've seen it) where they peel it from the end opposite of how people are usually shown doing it. I'm guessing they mean that? Basically, instead of bending the stem bit (from where the bananas bunch up), you can pinch the tip at the other end and the peel splits open very easily -- it's easier to do, especially if the banana is still a bit on the greener side of ripeness and the stem part is flexible. (I tried it after seeing it and switched to peeling them from the "bottom" myself.)

What back bit?

There is a little black fibrous part of most Cavendish bananas near the tip I was describing; many people do not like eating it and avoid it.

Also…veins?

I'm not sure what they mean either.

e0qdk,
e0qdk avatar

I don't know if there are any existing implementations that work well enough yet for it to actually be relaxing, but it might be possible to set up a hands-free IF experience by hooking up speech-to-text and text-to-speech tools to the game.

e0qdk,
e0qdk avatar

If I understand the problem correctly, this is the solution:

::: spoiler solution
a = 2299200278
b = 2929959606
c = 2585800174
d = 3584110397
:::

I solved it with Z3. Took less than a second of computer time, and about an hour of my time -- mostly spent trying to remember how the heck to use Z3 and then a little time debugging my initial program.

e0qdk, (edited )
e0qdk avatar

Can Z3 account for lost bits? Did it come up with just one solution?

It gave me just one solution the way I asked for it. With additional constraints added to exclude the original solution, it also gives me a second solution -- but the solution it produces is peculiar to my implementation and does not match your implementation. If you implemented exactly how the bits are supposed to end up in the result, you could probably find any other solutions that exist correctly, but I just did it in a quick and dirty way.

This is (with a little clean up) what my code looked like:

::: spoiler solver code

#!/usr/bin/env python3

import z3

rand1 = 0.38203435111790895
rand2 = 0.5012949781958014
rand3 = 0.5278898433316499
rand4 = 0.5114834443666041

def xoshiro128ss(a,b,c,d):
    t = 0xFFFFFFFF & (b << 9)
    r = 0xFFFFFFFF & (b * 5)
    r = 0xFFFFFFFF & ((r << 7 | r >> 25) * 9)
    c = 0xFFFFFFFF & (c ^ a)
    d = 0xFFFFFFFF & (d ^ b)
    b = 0xFFFFFFFF & (b ^ c)
    a = 0xFFFFFFFF & (a ^ d)
    c = 0xFFFFFFFF & (c ^ t)
    d = 0xFFFFFFFF & (d << 11 | d >> 21)
    return r, (a, b, c, d)

a,b,c,d = z3.BitVecs("a b c d", 64)
nodiv_rand1, state = xoshiro128ss(a,b,c,d)
nodiv_rand2, state = xoshiro128ss(*state)
nodiv_rand3, state = xoshiro128ss(*state)
nodiv_rand4, state = xoshiro128ss(*state)

z3.solve(a >= 0, b >= 0, c >= 0, d >= 0, 
  nodiv_rand1 == int(rand1*4294967296),
  nodiv_rand2 == int(rand2*4294967296),
  nodiv_rand3 == int(rand3*4294967296),
  nodiv_rand4 == int(rand4*4294967296)
  )

:::

I never heard about Z3

If you're not familiar with SMT solvers, they are a useful tool to have in your toolbox. Here are some links that may be of interest:

Edit: Trying to fix formatting differences between kbin and lemmy
Edit 2: Spoiler tags and code blocks don't seem to play well together. I've got it mostly working on Lemmy (where I'm guessing most people will see the comment), but I don't think I can fix it on kbin.

e0qdk,
e0qdk avatar

I feel that one. I've had the programming equivalent of writer's block on my main hobby project for over a month now. Good luck!

How many unfinished tracks do you have

How many unfinished tracks do you have knocking around on a hard drive somewhere? I was just looking through a big folder of 150 that I organized into one folder like 5 years ago. I don’t know what the true total is. Anyone else find this super overwhelming haha? I’m maybe just gonna dump it on the public like Mac Demarco...

e0qdk,
e0qdk avatar

Not sure, but I just checked and I have upwards of 3700 unfinished MIDI files I've authored over the past 20+ years -- more than 8MB of data. A lot of that is multiple drafts of the same songs (e.g. one song might have 3~5 variants from a single session where I was experimenting and kept all of the drafts as separate files, and sometimes I came back to an idea and experimented with it again and again like that over a period of years). I also tend to keep a lot of my musical doodles.

There's a couple dozen pieces in there that I think might be worth the effort of going back to and finishing someday, maybe; everything else is just my musical research notes, basically.

e0qdk, (edited )
e0qdk avatar

What I'd do is set up a simple website that uses a little JavaScript to rewrite the date and time into the page and periodically refresh an image under/next to it. Size the image to fit the remaining free space of however you set up the iPad, and then you can stick anything you want there (pictures/reminder text/whatever) with your favorite image editor. Upload a new image to the server when you want to change the note. The idea with an image is that it's just really easy to do and keeps the amount of effort to redo layout to a minimum -- just drag stuff around in your image editor and you'll know it'll all fit as expected as long as you don't change the resolution (instead of needing to muck around with CSS and maybe breaking something if you can't see the device to check that it displays correctly).

There's a couple issues to watch out for -- e.g. what happens if the internet connection/server goes down, screen burn-in, keeping the browser from being closed/switched to another page, keeping it powered, etc. that might or might not matter depending on your particular circumstances. If you need to fix all that for your circumstances, it might be more trouble than just buying something purpose built... but getting a first pass DIY version working is trivial if you're comfortable hosting a website.

Edit: If some sample code that you can use as a starting point would be helpful, let me know.

e0qdk,
e0qdk avatar

My guess is that if browsers as we know them weren't invented, HyperCard would've become the first browser eventually. No idea where things would progress from there or if it'd have been better or worse than the current clusterfuck. Maybe we'd all be talking about our "web stacks" instead of websites, and have various punny tools like "pile" and "chimney" and "staplr". Perhaps PowerPoint would've turned into a browser to compete with it.

If browsers were invented but JavaScript specifically was not, we'd probably all be programming sites in some VB variant like VBScript (although it might be called something different).

e0qdk,
e0qdk avatar

I had somewhat limited time this past week, but wanted to keep working through my backlog of unfinished shows, so I pulled up the short (6 episode) series Looking Up At The Half-Moon and watched that. I think I dropped this after episode 2 the first time I tried it, but finished it this time.

The show is a hospital drama + romance, which seems unusual for anime. I don't think I've watched any other anime set almost entirely in a hospital before -- scenes, yes, but not the whole show. I'm not generally into medical drama so I haven't really gone looking though; this is one I went into blind originally.

Guess which novel shows up again! Yup, it's Night on the Galactic Railroad. I feel like I'm seeing this book everywhere now, and this show quotes from it directly; one of the characters has pretty much memorized it. Something I noticed from the quotes is that one of the characters (in the novel) is named Campanella -- which should ring bells for anyone who's played the Trails series... No idea if there's actually a connection there, but I thought it was interesting.

The show strained my suspension of disbelief with how a number of characters acted, but did some things I found interesting as well. The doctor's characterization did not go in quite the direction I expected, and there were a number of other surprises throughout. Episode 5 in particularly really went somewhere I wasn't expecting. I kind of feel like I should write more about that... but it would all be spoilers.

e0qdk,
e0qdk avatar

GPT4-Vision can do it, sort of. It doesn't have a particularly great understanding of what's going on in a scene, but it can be used for some interesting stuff. I posted a link a few weeks back to an example from DALL-E Party, which hooks up an image generator and an image describer in a loop: https://kbin.social/m/imageai@sh.itjust.works/t/661021/Paperclip-Maximizer-Dall-E-3-GPT4-Vision-loop-see-comment

merde posted a link in the comments there to the goatpocalypse example -- https://dalle.party/?party=vCwYT8Em -- which is even more fun.

e0qdk,
e0qdk avatar

You can't really, as others have pointed out, but I like Philip K Dick's definition of reality: "Reality is that which, when you stop believing in it, doesn’t go away."

e0qdk,
e0qdk avatar

Between kbin's issues around the holidays and some of my own issues this month I haven't been very active lately, but I'm still here.

I finally managed to finish watching Penguindrum! That show was weird. I really don't have the words to properly express just how weird it was. Did you know that Penguindrum and Utena share a director? I didn't realize that going into it, but after finishing Penguindrum I felt like giving Utena another try -- and realized that fact after looking up some details about it. It was very much an "ohhhh..." kind of moment. I'm not deeply familiar with the details of the 1995 Tokyo sarin gas attack, Night on the Galactic Railroad, etc. that were sources of inspiration for the show; so, a lot of it probably went over my head. I still have a few screenshots left that I never got around to posting -- here's a suitably weird one.

Since the last time I commented on here, I've also gone back and cataloged all the anime I have. I looked up the starting air date for every show and movie, and then sorted them oldest to newest. That was a bit more involved than I expected it to be and I wasn't sure how I should handle some entries (e.g. Index/Railgun, Fate/<whatever>, FMA, ...) where there's multiple works that are related in a complex fashion. For movies there were often multiple dates associated with a work so I went with public release dates (in Japan) even if they were shown a few months earlier at a film festival or whatever.

The oldest anime movie I've watched is The Castle of Cagliostro from 1979 (which is older than I thought it was), and the oldest series I've watched through (if you count it) is The Mysterious Cities of Gold from 1982. (The oldest series I have is the first season of Lupin III from 1971, but I've only watched a few episodes and the pilot.) It turns out that the year with the most entries I've got in my collection is 2013 with 2012 as a close second; I did a lot of DVD collecting around 2015-ish when I had terrible internet at home, so I suppose that makes sense.

I also realized recently after seeing a post about a nihonga featuring a tiger and a dragon and wondering if it was referenced in ToraDora (didn't see it in the first episode) that Taiga's English voice actor (Cassandra Lee Morris) is the same person who voiced Fie in Trails of Cold Steel, Morgana in Persona 5, Ritsu in K-On, etc. That was a bit trippy.

Looking for: random raytracing program

Years ago (we’re talking decades) I ran into a small program that randomly generated raytraced images (think transparent orbs, lens flares, reflection etc), suitable for saving as wallpapers. It was a C/C++ program that ran on Linux. I’ve long since lost the name and the source code, and I wonder if there’s anything like...

e0qdk,
e0qdk avatar

POV-Ray, perhaps? You give it a scene description text file and it will render a raytraced image of the scene for you. You'd need to find or write an appropriate scene description though for what you want to randomize.

e0qdk,
e0qdk avatar

Still got any fun renders from back then?

e0qdk,
e0qdk avatar

I've never tried to make a stew out of duck before, but if someone asked me to wing it anyway, I'd probably try to use it in a gumbo: Dark roux, Cajun Trinity (celery + onion + bell pepper), jalapeno, garlic, stock, fresh thyme, bay leaf, lots of fresh ground black pepper, spoonful of hot sauce (e.g. Crystal or Tabasco if I can't get that), plus your meat -- served over white rice. For chicken (e.g. chicken thighs), I'd sear it first but I'm not sure on the best treatment for gamey fowl. Personally I might try to blanch it first to try to reduce the gameyness (based on recommendations I've seen about cooking certain kinds of stewed pork -- like pork belly in Chinese dishes), but you'd do better to get advice from someone who's actually cooked with gamey ingredients more than I have if you can.

Adapting a coq au vin recipe might be another idea to try if gumbo doesn't appeal, but again, I've never tried that with duck either.

e0qdk,
e0qdk avatar

Hopefully both dishes come out great!

e0qdk,
e0qdk avatar

Thanks for introducing me to this. I hadn't seen it before. FYI, there's a higher resolution version on the Japanese Wikipedia:

e0qdk,
e0qdk avatar

I mean, we all know what happened when old Godzilla was hoppin' around Tokyo city like a big playground... right?

e0qdk, (edited )
e0qdk avatar

Stein's Gate's OP with the song Hacking to the Gate is probably my favorite overall including both visuals and the song itself.

Prior to watching Stein's Gate my favorite was Shakugan no Shana's first OP with the song Scarlet Color Sky.

I also really liked the OP for Mahou Tsukai ni Taisetsu na Koto (Someday's Dreamer) with the song Kaze no Hana which was my favorite OP before that.

Honorable mention to Honey and Clover for having the most WTF OP out of all the anime I have ever seen.

If you're looking for something else to listen to, basically any OP by Yoko Kanno or performed by Kalafina is good. e.g.:

  • Hikari no Senritsu from Sora no Woto
  • Tank! from Cowboy Bebob
  • to the beginning from Fate/Zero (EDIT: I originally said "both OPs" but I got mixed up with one of the EDs -- the other OP is oath sign performed by LiSA)
  • the Ghost in the Shell SAC OPs -- particularly Rise fron 2nd Gig

A few others that I enjoyed are:

but there are way too many to list, so I'm going to stop there before I write a novel.

Edit: Added links. Thanks @Davel23 -- I've been trying to stay off of YouTube lately and didn't know about that site until you posted your comment!

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