Skip to main content

Posts

Libido Driven Development

It was few years ago, 2022? 2023? I've just stumbled upon a new technology, an AI powered waifu summoner, called automatic1111 (will from now be called a1111). I tried running it in my potato laptop, it took a while like a minute just to make a picture, but the power is real, just that it probably chipping on my GPU lifespan. So, I was wondering, if there's a better way, to play around with this new power, and that's why, I make a simple AMI in AWS to be run on EC2 spot instance, bake stable diffusion inside, add some script to watch new file in the output directory, and dumps them into S3, and as a safety measure, I added command to stop the instance, if 60min has passed since the last time it syncing file to S3.  That enables me to run a spawn.sh -> wait -> generate -> enjoy -> generate -> enjoy, loop, finish by running terminate script. After a few fiddling around, I found out, that turns out the prompt that's used to generate an image, is stored in th...
Recent posts

How I Imagine Daily Life of Yugioh's Developer

1. Gemini Monster. Game Designer: Hi dev, you still remember those normal monster? Dev: yeah, sure Game Designer: I'd like to add a few of them. Dev: Ok, doesn't need lot of code. Game Designer: Here's the tweak.. It is first treated as normal summon, and then when it is on the field you can normal summon it again to make it an effect monster. Off course, when it dies, it's a normal monster again. Dev: Wat... Conclusion: Yeah, let's make an effect monster with an effect that treated as normal monster and can be summoned twice. 2. XYZ Summon Game Designer: We need new summon mechanic Dev: OK. Game Designer: let's call it XYZ summon so the XYZ monster, should first be in the extra deck. Dev: Ok. Game Designer: well, you can summon it similar to synchro and fusion, except when it is summoned, you put the materials below it. Dev: That's a pain. Game Designer: Oh and monster that become material doesn't treated as le...

Facebook Hacker Cup Qualification Round - 2017

This is probably the first time I've ever solved all problems in Programming Competition. So, as to commemorate the event, I'm writing my solution about the problems. Problem 1: you can view it  here . question: given N percentage of a circle with radius 50 and center at (50, 50), determine whether point at (X, Y) is within that circle or not. Answer: This problem is quite obvious, in this problem we just need to figure out the degree and distance of (X, Y) from (50, 50). The distance can be measured using basic trigonometry r = sqrt(dx^2 + dy^2) The degree can be measured with arccos(dx / r) Though we'll need a little tweak based on which quarter it's placed on. tag: Mathematic, Trigonometry, Implementation Problem 2: can be viewed  here . problem is too long to be explained, checkout that link. Answer: This is a problem where, if you feel confused, just try to implement it. The solution here is just to order the items in the descending order ...

Ruby, Metaprogramming, and LinearEquation Solver

Metaprogramming Metaprogramming  is a  programming  technique in which computer programs have the ability to treat programs as their data. It means that a  program  could be designed to read, generate, analyse or transform other programs, and even modify itself while running. ~  Wikipedia . In Ruby, there's an enormous amount of function, that would help you writing a program, that could dynamically modify itself. Most common example is: define_method(methodname, &block) define_method is a method that take two argument, a symbol or string as the methodname, and the block process of what it should do. for example, if I have a class, that refer to a user table in mysql with field name, email, and password, i can define 3 new method dynamically, namely find_by_name, find_by_email, and find_by_password with the following code: (not accurate, but you get the point) method_missing?(methodname) method missing is a method that just accept a...

Introduction to Functional Programming

Eh, wao I could write a function nested inside another function. Oh, look, I could pass a function as an argument to another function. Oh, wao, look at this, my function returned another function, keeewl. What, what is this lambda? awesome, with this I could one-lineize most of my code. Closure ?, eh, ao, I can use this to create a function that "magically" return a different value each time it's called? ParallelMap!!, a powerful function that eats away my CPU resource to boost computation time! Damn, I'm such a functional-programmer by abusing all these cool stuff. Screw "def", eat this lambda, and while I'm on it, let's add more magic called "map" and "reduce" to the code to confuse anyone who cared enough to read it. Well, that little sinful flashback is probably what I have in mind during my Recognition System project, and my definition of Functional Programming. But, it all changed upon following this course in t...

The real reason the world doesn't end in 21-12

What the title said.

Texified Madoka

                                                                          l7lql          l7lll                                                                           77Qlql     ...