Showing posts with label fun. Show all posts
Showing posts with label fun. Show all posts

Saturday, July 9, 2011

solitaire

The wonderfully idiotic game of Klondike solitaire is ubiquitous; there are countless embarassing pictures of people playing it instead of doing their job. It seems however that some people's job is actually that of playing Solitaire. Take this article for instance, which I found while terribly bored and wondering about whether they came up with a mathematical description for Solitaire and what are the odds of winning. It seems that no, there isn't a complete analysis yet - one of the embarassements of modern mathematics :)
Before discussing the article any further it must be stated that, while to some it might look funny, a waste of time, or downright idiotic to do a study on Solitaire, it's actually quite serious. While the game itself might be considered silly by some, if studying it can bring advancement in "artificial intelligence" then so be it. Because I'm anti-mainstream I like to actually call it "automated problem-solving", because there's nothing intelligent about it or many other game "AIs", but I digress. Studying Solitaire is as valid a scientific endeavour as studying chess or how to slice a pizza so it spilts into equal parts, though this last problem is considerably easier and has been recently solved (searching for the article is left as an exercise to the reader).
Getting back to the Solitaire article, they supposedly worked with a famous mathematician who "carefully played and recorded 2000 games, achieving a win rate of 36.6%". Their software supposedly obtained win rates of up to 70.2%.
So there. There is actually someone whose job is (among many other more productive things I'm sure) to play Solitaire. 2000 games at an average of 20 minutes per game as stated in the article equals exactly 666,6... hours oddly enough. Considering an 8-hour work day, that would equal rougly 80 days of playing Solitaire, or about 4 months. Cool thing indeed.

Friday, April 30, 2010

fail

Recently the ubuntu guys decided to move the buttons to the left of the window and eliminate the icon, like so:Worst idea ever. When I browse in a maximized browser or when I keep my Pidgin on the right edge of the screen it seems like the window is falling off into the void, because the space on the top-right corner is so empty.
Fortunately, this being an open system, you can change this, but not from some user-friendly application like the theme selector (where by the way, the sample window decorations are still drawn the classic way -- double fail), no, you have to use the gconf-editor, a kind of registry editor for Linux (ugh) and modify the button_layout under apps/metacity/general:

Monday, February 22, 2010

http

One morning I was webbrowsing:
ret@ret-laptop:~$ telnet some-server.com 80
Trying some.ip.address...
Connected to some-server.com
Escape character is '^]'.
GET /32452tr534tfgr4 HTTP/1.1
Host: some-host.com

HTTP/1.1 404 Not Found
Date: Mon, 22 Feb 2010 12:07:12 GMT
Server: NOYB
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
...404 and so on.
WTF? No shame:
# Server masking is optional
#fake server banner - NOYB used - no one needs to know what we are using
SecServerSignature "NOYB"
Hey, NOYB yourself, fucker! You know I'm OK with you bragging about how secure you are and everything, but what makes you think you can abuse protocol like that? It doesn't hurt to be polite, you know! Is it so hard to come up with something decent like "hidden"? So much for user interface. Kids these days...
Anyway, here's the rest of the reply:
(some-html-tags-that-blogger-chokes-on)
Apache/1.3.34 Server at www.some-host.com Port 80
(some-other-html-tags)

LOL.

Later edit: oddly enough there actually is a www.some-server.com which obviously has nothing to do with this post, please substitute www.example.com in the text above :P

Tuesday, May 26, 2009

math

(fourth grade) Math Problem:

A mother is 25 years older than her son.
In 7 years, the mother will be 5 times older than her son.


Where is the son's father?










































Answer:

Let the child's age be c years and the mother's age be m years.
Now, m = c + 25.
In 7 years, m + 7 = 5 * (c + 7).
Substituting the first equation into the second one, we get
c + 32 = 5c + 35, from which 4c = -3, or c = -0.75.

So the child is minus nine months old, therefore the father is most probably in the mother.

Saturday, May 23, 2009

sex

After vast experimentation, we found the optimal parameters for sex:
* frequency: low, around 0.8 Hz
* amplitude: as large as possible (e.g. 15 cm)
* waveshape: approximately square wave
* duty cycle: cca. 80%
Something like this:

Monday, May 18, 2009

brideparade

I came home this morning looking forward to a good sleep, only to see the news: there's been a "Brides' Parade" in Bucharest! Now I can't really understand how I missed that, given that I crossed about half the city... maybe it was because we were busy spending meaningful time together instead of dressing up and parading... maybe it was because I was too drunk... I don't know. The Brides' Parade featured "past, present and future brides" (basically any woman would qualify) in wedding dresses parading on some street, possibly in a 1900s car. I hate it when "historical cars" run on the road, they're ugly, obsolete and environmentally unfriendly (mwahahaha). But I digress. The fun part was watching a relatively young girl in a wedding dress being interviewed by some reporter: "So, are you married?" "No, no :)" "Are you getting married today?" "No, no! :) No guy will take me! :) Heeeey! Guuuys! Take me! Take me!!!! I'm [fucking] yours!!!!! Take me!!" Yeah. Yeah. Ok. Great for you.
Parade. Feel fine. Waste time. Feel good. Exhibit yourselves. Feel nice. Display your young, succulent flesh on the counter. Feel great. Spend. Feel wonderful. Burn, age, wither away,... death of the soul, indoctrinated in false grace. Be happy.

One six six! The number of the bitch!
One four four! The number of the whore!

Wednesday, April 1, 2009

foolcoffee doubleclock

I had a Digital Computers course where we had these logic design and implementation lab classes. We had to implement various modules in Verilog and run them in a low-end FPGA. But during the first lab we weren't yet familiar with Verilog, so we were supposed to enter a digital schematic graphically. The schematic was designed the hardcore, old-school way, by building a state machine on paper, assigning bits to states, writing equations, translating them to flip-flops and gates et cetera. The state machine was for a (famous with past and current students at our faculty) "coke vending machine". It never worked as supposed and I suspect (being too lazy to prove though) that the equations suggested in the lab documentation were wrong. Years have gone by and, while having a break in the faculty hallway, I found that maybe one of our graduates, now employed at a vending machine company, has finally got it working:

Sunday, March 29, 2009

copyright

Came up with this while drinking with other computer engineers. Steps to become a rich lardass:
1. Write computer malware (virus, internet worm, whatever, can be mostly harmless)
2. Let it spread
3. Go public
4. Spend zero to 6 months in jail or do community service or pay a small fine or something
5. Sue antivirus companies for copyright infringement because of your virus signature that they include in their product which they distribute without your written permission
6. Collect $5 per antivirus copy/update distributed

Then, foreach virus_writer joe in earth.people {the above}
And suddenly you can't have antiviruses anymore. Dude, sick, what the fuck.

Wednesday, February 4, 2009

lemons

Embedded Systems exam at the Bucharest Polytechnic.
"A lemon battery can supply an average of 0.1mA at 1V for about an hour.
1. How many lemon batteries are needed to run a 100W light bulb?
2. How many instructions can an ATmega128L execute while running from a lemon battery? Assume that an ATmega128L uses an average of 4nJ to execute an instruction."
At the students' request, further (obvious) assumptions were specified:
a) To simplify, assume that the lemon has an ideal U-I characteristic (it can deliver anything up to 0.1mA at 1V).
b) It also has an ideal U-t characteristic (at 0.1mA, it holds 1V for one hour then suddenly drops to zero).
c) Assume there is an ideal DC-DC converter between the lemon and the ATmega128L, providing it with the required voltage.
After thinking about it, and after remembering the jokes about ideal spherical lemons in vacuum, I decided that additionally, the ATmega128L's clock frequency should be set such that it draws exactly 0.1mA from the 1V lemon supply, or that it should enter very low power sleep modes as needed.
Answers:
1. 100W/(1V*0.1mA) == one fucking million (whoa)
2. 1V*0.1mA*3600s/4nJ == 90 fucking million (yeah).
Required frequency for ATmega128L to complete 90Minstr in 3600s:
f = 90M/3600s = 25kHz.
Current drawn by ATmega128L at 2.7V (minimum operating voltage) in order to assure 0.1mA from lemon, given ideal converter: 0.1mA*1V/2.7V = 37uA.
Typical current drawn by real ATmega128L at 2.7V at 25kHz, extrapolated from datasheet graph: 50uA (pretty close actually).
So there you go: light a bulb long enough to take a shit, or execute 10 trillion 8-bit computer instructions. Meanwhile, a high-end "PC" processor would do maybe 4 trillion 64-bit instructions, making it better than the microcontrollers, but not that much better. Moral of story: do something useful -- turn off lights, run computers (*).

Wednesday, December 17, 2008

whistle

I've found this slightly evolved interface. It lets you whistle in commands. Plus, it uses %.2f and $_ and _#_, which makes it even cooler. And it's not 2.0.
Which reminds me: Can you whistle 2400 baud? 9600? 14400?

Monday, September 29, 2008

imaging

I was watching some mediocre movie where the actors were playing detective on an open hard drive. Weird, negative chars filled the hexdump, with an occasional readable string.
"It's an image!" the guy exclaimed upon reaching a "²¡¤³§«©±°something.jpg⊧⊤⊧⊩⌬".
"Let's see it!" said the chick.
The image is slowly loading.
"It looks digital", the guy wisely concluded.
No shit Sherlock! Wow, they actually did not use a VHS recorder on those platters, those are actual BITS, wow.
Fortunately there's at least one professional photo* guy on the webs who maintains that digital sensors are not intrinsically different than film when it comes to capturing images.
-----
* about 3/4 down the page: "there's nothing at all digital about that look".

Monday, June 30, 2008

Monday, June 16, 2008

analog

A few days ago I was out with my girlfriend to have a beer and watch the soccer game between Romania and Italy, which ended with a 1-1 draw. There were two places side by side where you could drink beer and watch the game. One had a huge wide-screen TV and was full when we got there, and the other had a small black&white TV that's probably older than me, with a small antenna. Of course we settled for the small TV and watched the game with the few people that were around. Every time something interesting happened, we would lay down the beer glasses and turn our heads towards the TV, occasionally cheering and applauding. About 2 to 3 seconds later, the crowd in the other bar would do the same. Of course, being a digital TV it probably had some amount of processing lag. I don't know how much, so I'll cautiously add the delay from the cable provider who also does some processing and might suffer from additional satellite delay, as opposed to the analog TV which was about... 4 miles from the TV station. So there goes the live. Having sorted out the intriguing relative delay between the small crowd and the large one, I am only left to wonder what the absolute delay was between Zürich and that old real-time analog black&white TV.

Friday, June 13, 2008

misc.

Sorry, but I just couldn't refrain:

1. Couple has sex in church confession box

"Oh my God! They killed Kenny!"
"He had sins that he didn't confess!"
"And he didn't take communion!"
"He's doooooomed."
"Better go and confess before WE die!"
"Come on, hurry up!"
"Oh no, it's locked!"
"Oh no! It can't be locked! Nooo!!!11 We have to confess before we die!"
"There's that window in the back that's usually open."
"Come on, hurry up!"
"Look, the confession box is over there!"
"I'm first, I'm first!"
"Oohhh!"
"What the?!"
"Oh, son of a bitch!"
"You're a sinner! You're doing unnatural things in the House of God!"
"Oh, forgive me Father, for I have sinned!" etcetera etcetera.

2. Manholes

"Like WTF, there were only ten people killed! Sheesh, quit making such a fuss!"
Hypocrites.

Wednesday, May 28, 2008

voting

This weekend is, er, was voting day. We're supposedly electing mayors, local councils and the other things that come with them. Therefore, last night I dreamt I was voting :D It was an interesting experience, akin to a trip into a future world and its voting ways.
So without further ado, I give you

Voting: 2084.

It was a cold April morning and the dew on the grass was frozen like tiny beads of glass.
I turn off the artificial landscape and open the window to smell the warm, polluted air.
Aaah, nitric dioxide, so sweet. Sulphur trioxide, yummy. Etcetera. (We still didn't find a cheap, pervasive way to command our windows to open and our lights to turn on in 2084, although computers students are still studying "Evolved Interfaces", but based on Web 4.0) First there was the Web, then pr0n, then the Social Web 2.0, then the Semantic Web 3.0 which failed to deliver, then there was Web 4.0, the EmoWeb, where people would use galvanic skin response, blood pressure, rectal probes and other sensors to upload their feelings online. Then of course marketoids were talking about Web 5.0, where you could blog by thought alone, but that wouldn't happen until 2337.
Alas, I reluctantly get up, take a shower, put some clothes on (dumb clothes, mind you, no electronics or anything) and walk out the door. I reach the voting room, sign on a sheet of paper, the supervisor hands me two booklets (where I am to stamp the desired candidates) and some advertising leaflets. There was absolutely no other person in that room. It was big, empty and quiet. Therefore I take my time and slowly walk towards the voting booth, which is a small, improvised box with dark blue drapes obscuring my secret choice. As usual, I might say.
I start analyzing the advertising materials and going through the list of candidates. Oddly enough, most are well-known TV stars. I finally decide on a sexy female TV presenter. After all, no mayor has done anything of note for the city in the last half-century, at least we'll have a sexy, charismatic mayor. But I'm not yet ready to cast my vote. I take a peek outside the small voting booth, and there are still no people around. Even the supervising authority has gone out for a smoke, leaving only a low-resolution security camera to keep watch. I calmly walk out of the booth, go into the next room, take out my 2-kg laptop, connect to the nearest wireless access point, and start searching for data on the few candidates I like most. After half an hour of searching, I think: Oh shit, I left the voting booth occupied! Think of the queue! Heck, what queue. There was no queue.
The End.

Wednesday, May 14, 2008

outlawing

Some British chef wants to outlaw out-of-season vegetables. Besides this being extremmely funny, it's of course stupid. Let's compare this to some hypothetical situations, in order to better understand just why is this so stupid.
First, let's assume some "celebrity" fashion designer decides they want to outlaw out-of-season or out-of-fashion clothes. I guess nobody is going to pass such a law (in a serious country in this timeframe), but just the idea of lobbying for something like this is preposterous. Imagine stores being unable to sell ... t-shirts in winter. Imagine yourself not being allowed to... I don't know, wear a blue hat because it's unfashionable and thus illegal.
Let's imagine then, that some "celebrity" "deejay" decides to lobby for a law banning songs and records that are more than 3 years old. So then I go to the usual rock bars and I'm not able to listen to 80's rock because some idiot passed a law that some other idiot lobbied for.
Then, let's imagine that some "celebrity" porn star bans you from having sex in other ways than the missionary position (a real law in some USA state).
Finally, let's imagine that some celebrity electonic circuit designer bans electrolytic capacitors, which they should actually do, as electrolytic capacitors currently suck balls and are a main cause of appliance failure. That would be extremmely stupid, because electrolytic capacitors, though unreliable, are very small and cannot be replaced with some other type without ending up with for example a mobile phone the size of a bucket.

Wednesday, May 7, 2008

kloks

This is about the 5th time in the last two weeks when I look at the clock and it shows 13:37.

Saturday, April 26, 2008

testicles

A very funny piece of news caught my attention today. Don't you just like the part with the North and the South? :D Apparently some Florida senator thinks truck nuts are offensive and must be banned. WTF? Not only that, but the guy owns a gun shop! :)) So basically, the way I see it, is: killing people is not obscene, but displaying a pair of fake animal testicles is. Way to go dude, way to go. See my previous post about some people having zero respect for life. Of course, people are hypocrites, and morality is just a word. ("Stop the world... ... Peace is just a word...") I guess to some people it is moral and ethical to own and sell guns, but it is unethical to well, jack off to porn, kiss in public, or stick some plastic balls on your truck.
Here in Romania most people are Christian Orthodox, meaning we start celebrating Easter this night. One of the bigger TV establishments here is running an entertainment show intended as a fund raiser to help some sick kids who need a ton of cash to well... live. You dial a number and donate $$$ if you like the stars' performance. The $$$ go to some kids who need surgery. One of the kids needs a treatment based on stem cells if they are to well, live. Of course, one can't treat people with stem cells in the 'civilized' western world anymore, because it's illegal. They have to do it in China. Why? Because some people think they have the moral authority to decide who lives and who doesn't. Because they don't necessarily value life, but they have to appease the vocal fanatic hypocrites who don't know shit about anything but feel they have the answer to life, the universe and everything else in some book or text or judgment or something. Whatever. Go on preaching damnation, salvation, environment, cloning, genetic engineering, global warming and nuckular \/\/ar while I go eat a sandwich or something.

Wednesday, March 19, 2008

the drunken man problem

The Original Drunken Man Problem

A drunk man is standing next to a pole at moment t_0=0.
At each moment t_s,k = k * tau the man takes a step in a random direction.
Find the most probable distance between the man and his initial starting position at time t.
For simplicity assume a constant tau = 1 second and all steps equal to 1 metre.

Elaborating on the Problem

An inebriated individual stumbles out a bar at moment t_0=0.
At each t_s,k = k * tau the guy takes a step in a direction given by angle alpha.
Every p steps alpha changes to a random direction then remains constant.
p follows a Poisson distribution with lambda = 4.
The distance travelled during one step follows a normal distribution with mu = 0.5 m and sigma^2 = 0.5 m^2.
To complicate matters further, upon colliding with the bar wall a new alpha is selected.
Find the most probable distance travelled at time t.
Then assume a normal distribution for tau too.

Saturday, March 8, 2008

science fiction

"Captain, we've lost optical output in the converters in room 100!"
"My god! The molecular reactors cannot function without sustained input from room 100! The life support systems are in danger! Not to mention the crew being unable to perform their duty without proper environmental conditions in the waste dispoal facility!
"I agree, the situation is looking pretty grim. What should I do, Captain?"
"Quickly, energize the emission coils!"
"Coil temperature is reaching 3000 Kelvins, Sir."
"Good. Now decrease the converter frequency to get closer to resonance."
"Decreasing operating frequency 35%... The positive-coefficent thermistors are heating up. No-go, sir. The power controller has detected an overvoltage in the resonant circuit and is shutting down."
"Yellow alert! Everyone prepare for emergency biostasis in case of environmental failure. Officer, reset the controller, move the frequency back up and wait for the thermistors to cool down."
"Done. The emission coils are operational. Increasing field strength to 900 volts per meter."
"Are the atoms responding?"
"Yes, we've got arc ignition. The resonance point is dropping... Hold on, the plasma is getting unstable! It's oscillating chaotically on a subsonic frequency! I can't keep it going! It's out, we've got another overload!"
"Reconfigure the overload threshold to 120% and retry the ignition sequence with a 30% increase in the ionizing field."
"Yes sir. Heating up the emission coils... field is increasing... we've got ignition... no, the plasma column is not holding."
"Try again with 50% field increase for 5 seconds."
"Trying... the protection network cannot hold much longer with all that power coming from the resonant circuit! We've got to get that plasma to increase in density or we're dead!"
[Officer 2 enters command deck] "Captain, the life support systems have shut down! The bioreactor has run out of input material! We need the crew to start shitting NOW!"
[Officer 3] Yes, besides, I can't hold it in much longer! We need to get that damned toilet fixed!
"Red alert! Everyone to the stasis cells now! Prepare for immediate hibernation on my signal. Officer, increase average power to 175% and switch to discontinuous mode."
"The pulse capacitors won't tolerate 175% sir. That's way over their nominal rating! We risk losing the entire converter assembly!"
"I'm willing to take that risk, officer. Quickly, short-circuit the output divider! Decrease the feedback ratio in the boost converter! Adjust the inductive reactance! Lock on that phase! Enhance those FETs!"
"Disabling overload threshold... Increasing main voltage... Setting target frequencies... Yes, we've got constant output! Decreasing power to nominal... Plasma is holding Sir! We've got optical output!"
"Good job, officer! Cancel alert. Everyone report to room 100 in decreasing order of intestinal discomfort. Go get yourself a beer officer!"
"Thank you Captain!"
"Captain's log supplemental. With the optical converters in room 100 fixed, crew morale is better than ever and everything is back to normal. These happenings have delayed our mission to Sirius 5, so unfortunately we missed our chance to meet Ambassador Kuux. Ironically this might have come as a blessing to us, as we learned from a Karbazian subspace transmission that Atheist
terrorists suicide-bombed the Agnostic conference room where the meeting was taking place. They detonated 300 micrograms of superfluid qvadrilithium crystals using a modified antiselenium primer. Both are undetectable to Karbazian bosonic spectrometry scanners. We sent our deepest most sincere regrets to the people of Sirius 5, but we sure are glad our asses weren't fried in the blast. Thus life goes on aboard the Sputnik V, leaving one to wonder just how has humankind evolved over millenia from flesh-eating, spear-wielding top-of-the-foodchainers to space-travelling woosies who won't even take a goddamned shit if there's no light in the toilet."