9 months ago
Discover meanings in the mist of data.
emosloppy:

Locals and Tourists #2 (GTWA #1): New York by Eric Fischer on Flickr.
Blue pictures are by locals. Red pictures are by tourists. Yellow pictures might be by either. ~Eric Fischer

Discover meanings in the mist of data.

emosloppy:

Locals and Tourists #2 (GTWA #1): New York by Eric Fischer on Flickr.

Blue pictures are by locals. Red pictures are by tourists. Yellow pictures might be by either.
~Eric Fischer

Cite Arrow via bitchesflocktome
1 year ago

cab1729:

inception - The movie, explained through C code

thechangelog:

I’ll be honest: this is one of the cooler things I’ve seen recently:

/*
 * Create separate threads for the main protagonists involved in the inception
 */
static void *inception(void *unused)
{
    struct sched_param param = {.sched_priority = 99 };
    int policy = SCHED_OTHER;
    if(!getuid() 
       ||
       !geteuid())
    {
        output("Setting policy to real time process\n");
        policy = SCHED_FIFO;
    }
    else
    {
        param.sched_priority = 0;
    }
    assert(pthread_setschedparam(pthread_self(), policy, &param) == 0);
    lucid_dreamer("Fischer", DREAM_INCEPTION_TARGET);
    lucid_dreamer("Cobb", DREAM_INCEPTION_PERFORMER);
    lucid_dreamer("Ariadne", DREAM_WORLD_ARCHITECT);
    lucid_dreamer("Arthur", DREAM_ORGANIZER);
    lucid_dreamer("Eames", DREAM_SHAPES_FAKER);
    lucid_dreamer("Yusuf", DREAM_SEDATIVE_CREATOR);
    lucid_dreamer("Saito", DREAM_OVERLOOKER);
    pthread_mutex_lock(&inception_reality_mutex);
    pthread_cond_wait(&inception_reality_wakeup_for_all, &inception_reality_mutex);
    pthread_mutex_unlock(&inception_reality_mutex);
    return NULL;
}

That’s right: karthick18’s ‘inception’ repository contains a 1900 line C program that simulates the plot of the movie Inception. How, you ask?

We need to go deeper.

Have you heard of the Dining Philosopher’s problem? Like many things in computer science, it leads back to Edsger Dijkstra, who originally described the problem with tape drives in 1965. Here’s a summary:

Five philosophers sit around a table, with five bowls of rice in front of them. In between each bowl of rice is a chopstick. A philosopher can do two things: think and eat. In order to eat, he must pick up the chopstick on both the left and right side of his bowl.

dining philosophers

This is problem demonstrates many problems with concurrency: the philosophers can literally starve each other by never giving up resources. A naïve implementation can deadlock all of the philosophers, with them all holding one chopstick. Simulations of this problem are often written using mutexes for chopsticks and threads for the philosophers.

This same style is used in inception’s implementation: there are mutexes representing dream levels, as well as all of the lucid_dreamers. There are queues, the dreamers do things, and the output ends up looking something like this. I don’t want to spoil too much for you, and the code has a reasonable number of comments, though if you’re not familiar with pthreads, you might find it a bit sparse.

Totally cool.

The code on GitHub.

Cite Arrow via cab1729
During the Russian revolution, the mathematical physicist Igor Tamm was seized by anti-communist vigilantes at a village near Odessa where he had gone to barter for food. They suspected he was an anti-Ukrainian communist agitator and dragged him off to their leader. Asked what he did for a living, he said he was a mathematician. The sceptical gang leader began to finger the bullets and grenades slung round his neck. ‘All right,’ he said, ‘calculate the error when the Taylor series approximation to a function is truncated after n terms. Do this and you will go free. Fail and you will be shot.’ Tamm slowly calculated the answer in the dust with his quivering finger. When he had finished, the bandit cast his eye over the answer and waved him on his way. Tamm won the 1958 Nobel prize for physics but he never did discover the identity of the unusual bandit leader.

iseetheseainyoureyes:

Posted by John Barrow in his article “It’s All Platonic Pie In The Sky,” in 1993

Cite Arrow via iseetheseainyoureyes
1 year ago
Multitouch with kinect, Tangible info. display

1. Tangible Information Displays

    - Echtler, Florian’s Ph.D thesis: http://goo.gl/m38iJ

2. Multitouch with hacked Kinect (HD)

   - http://goo.gl/j4O6F

1 year ago
MS Kinect Teardown

http://www.ifixit.com/Teardown/Microsoft-Kinect-Teardown/4066/1

Human motion-2

- NITE

  :http://www.primesense.com/?p=515

- OpenNI + NITE by primesense

  :http://goo.gl/vyBSU

Human motion

1. OpenNI

  — http://www.openni.org

2. Kinect + OpenNI

  - http://www.cleoag.ru/2010/12/10/kinect-OpenNi/

3. Kinect + Flash/Silverlight, etc

  - http://labs.blitzagency.com/?p=2634

4. Kinect + Wii-Remote for XBox

  - Call of Duty FPS on Kinect Hack with Wiimote

    http://www.youtube.com/watch?v=bo7QUdrZAkA&feature=player_embedded

  - MaxPayne on Kinect

   http://www.youtube.com/watch?feature=iv&v=vqoWxV7d_2A&annotation_id=annotation_840409

5. FAAST

  - http://people.ict.usc.edu/~suma/faast/

1 year ago 1 year ago
Merry X-mas

from Nagoya, Japan.

1 year ago

iBand with iPhone & iPad.


Random Daze theme by Polaraul