e0qdk

joined 2 years ago
[–] [email protected] 6 points 1 year ago

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.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

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:

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.

[–] [email protected] 8 points 1 year ago (3 children)

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

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.

[–] [email protected] 2 points 1 year ago (1 children)

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!

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

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.

[–] [email protected] 3 points 1 year ago (4 children)

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.

[–] [email protected] 25 points 1 year ago

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."

[–] [email protected] 1 points 1 year ago

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/[email protected]/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.

[–] [email protected] 5 points 1 year ago (4 children)

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.

[–] [email protected] -1 points 1 year ago

Hopefully both dishes come out great!

[–] [email protected] -1 points 1 year ago (2 children)

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.

[–] [email protected] 2 points 1 year ago

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

37
Shinobu Horror Story (media.kbin.social)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
33
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

Mew is a character who shows up in the episode "Dream of an Oasis" from the 2003 anime Wolf's Rain. During her introduction, there's a panning shot showing her animal form in her reflection. I thought it'd be interesting to try to reassemble those frames and combine it with the cute pose she makes later in in the scene to form a composite. It ended up being a rather of a lot of work -- involving not just using an image editor but writing a custom program to solve one of the trickier alignments by manually selecting corresponding points and numerically estimating the transformation -- but I had fun with it. This image is the final result.

28
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 
83
Hmm... breakfast? (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
20
All fired up! (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
58
Happy Halloween! (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
25
Normal girl (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
9
What the fuuuuuuu... (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
25
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
18
I see you... (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
19
Meow (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
12
Om nom nom! (media.kbin.social)
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
view more: ‹ prev next ›