<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-2797923531103204252</id><updated>2008-07-17T00:30:25.794+02:00</updated><title type="text">Majek's technical blog</title><link rel="alternate" type="text/html" href="http://popcnt.org/" /><link rel="next" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default?start-index=26&amp;max-results=25" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/MajeksTechnicalBlog" type="application/atom+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3711657506851382205</id><published>2008-07-11T21:30:00.006+02:00</published><updated>2008-07-11T22:15:51.494+02:00</updated><title type="text">Don't you need an employee?</title><summary type="text">(image stolen from that guy, he's also looking for a job)

I’m currently looking for a job.

What job I’m looking for? I have no idea. I did some things in my life, but that doesn’t mean I want to do them again. Most people think: “well, you’re a python hacker, so here is a python job for you!”. That’s just wrong. I want new challenges, I want to learn.

There are probably a lot of things that I </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/07/dont-you-need-employee.html" title="Don't you need an employee?" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3711657506851382205" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3711657506851382205/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3711657506851382205" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3711657506851382205" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-5282328316386238128</id><published>2008-07-03T12:43:00.007+02:00</published><updated>2008-07-03T12:58:20.655+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Idea Web" /><title type="text">Ideas are free</title><summary type="text">Ideas are free, so here’s the list of mine (previous ideas here).


I still think that the next big thing is an open social network, so that anyone can write an extension to it. Something like Facebook api, but hosted on a provider side. That’s why I believe in GAE. Open and easily extendable social network is the web3.0 for me.


The new idea is to create a Reddit tracker. When you submit </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/07/ideas-are-free.html" title="Ideas are free" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=5282328316386238128" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/5282328316386238128/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/5282328316386238128" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/5282328316386238128" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3797883594144984010</id><published>2008-06-15T16:53:00.008+02:00</published><updated>2008-06-15T17:24:11.920+02:00</updated><title type="text">Motoman robot controlled by two Wiimotes</title><summary type="text">

Some time ago I controlled a robot with a Haptic.

Inspired by Johnny Chung Lee I started to work on controlling the Motoman industrial robot using two Wiimote infrared cameras. It's a bit less accurate method than using Haptic, but it's much cheaper.


What you need:
a robot (or whatever you'd like to control)two Wiimote devicesa software (okay, here's the source, but beware, it's beta, work </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/06/motoman-robot-controlled-by-two.html" title="Motoman robot controlled by two Wiimotes" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3797883594144984010" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3797883594144984010/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3797883594144984010" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3797883594144984010" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3781984109978452798</id><published>2008-06-06T11:25:00.004+02:00</published><updated>2008-06-06T11:55:23.404+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Social networks" /><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms" /><title type="text">LinkedIn graph - I don’t get it</title><summary type="text">

At Grono.net, the network graph had more than 80M edges and about 1.2M nodes. You know how much RAM it used on the machines? 320MB. It’s a bit more than 4 bytes for an edge, because of alignment, plus few megabytes of index.

LinkedIn says they need 12GB RAM for keeping their graph with 120M edges. Wow. It’s 107 bytes for an edge! I think that the graph shouldn't consume more than 0.5GB RAM.

</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/06/linkedin-graph-i-dont-get-it.html" title="LinkedIn graph - I don’t get it" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3781984109978452798" title="15 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3781984109978452798/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3781984109978452798" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3781984109978452798" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3672715729102055808</id><published>2008-05-29T11:54:00.003+02:00</published><updated>2008-06-14T11:13:59.040+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms" /><title type="text">Concurrent programming: It’s not about the language, it’s the framework</title><summary type="text">
There’s a huge discussion on the web about concurrent programming. Now we have 4-core processors and that number will double every few years. The problem is that programmers don’t know how to use multiple cpus.

There are several approaches that address this issue:
Intel is developing a compiler that’s going to automatically parallelize softwarepeople from Python are developing extension that’s </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/concurrent-programming-its-not-about.html" title="Concurrent programming: It’s not about the language, it’s the framework" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3672715729102055808" title="3 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3672715729102055808/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3672715729102055808" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3672715729102055808" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-8389480072604150000</id><published>2008-05-22T20:30:00.009+02:00</published><updated>2008-05-22T20:58:35.686+02:00</updated><title type="text">Finding Iris on the image</title><summary type="text">

During one of the classes we're supposed to find Iris on given images. I created hackish script that does it. The script isn't finished and to be frank it barely works. But I think the result images look cool.

</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/finding-iris-on-image.html" title="Finding Iris on the image" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=8389480072604150000" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/8389480072604150000/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/8389480072604150000" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/8389480072604150000" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-8075856021683018571</id><published>2008-05-12T22:11:00.004+02:00</published><updated>2008-06-14T11:14:20.322+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoogleAppEngine" /><title type="text">Google App Engine tips&amp;tricks</title><summary type="text">source
A while ago I was writing some sample applications (source) for Google App Engine. I noted the things that can be useful for other GAE programmers.

I used Google's webapp framework, my code here is using it.

Please take a look at the shell application, it can help you test simple code.

How to dynamically get application name and version?This question was asked before. You can use </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/google-app-engine-tips.html" title="Google App Engine tips&amp;tricks" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=8075856021683018571" title="3 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/8075856021683018571/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/8075856021683018571" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/8075856021683018571" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-9165556405559095044</id><published>2008-05-11T00:08:00.003+02:00</published><updated>2008-05-11T12:55:04.376+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoogleAppEngine" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Shared Fridge Magnets - simple collaboration for GAE</title><summary type="text">Recently I read The ELC Community Blog with their example of sharing objects using red5.

The obvious task is to do the same without red5 and any flash. 

So I created yet-another-example of the comet daemon service.

Just open the fridge example site in two browsers. You can move, resize (with shift) and upload images.</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/shared-fridge-magnets.html" title="Shared Fridge Magnets - simple collaboration for GAE" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=9165556405559095044" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/9165556405559095044/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/9165556405559095044" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/9165556405559095044" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-159493957786802787</id><published>2008-05-07T22:58:00.003+02:00</published><updated>2008-05-11T12:55:04.377+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoogleAppEngine" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Google App Engine: Ytalk like multiuser chat</title><summary type="text">This is a follow up on my last post describing missing services for AppEngine.

The idea is to help developers writing apps for AppEngine by providing them some common functionality missing and impossible to have on AppEngine and offer them as external services.

These services are accessible through a simple API over HTTP, and it is  easy to call them from AppEngine applications using urlfetch </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/google-app-engine-ytalk-like-multiuser.html" title="Google App Engine: Ytalk like multiuser chat" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=159493957786802787" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/159493957786802787/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/159493957786802787" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/159493957786802787" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3971929007387248251</id><published>2008-05-01T01:01:00.007+02:00</published><updated>2008-05-11T12:55:04.378+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoogleAppEngine" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Missing services for Google App Engine (comet as a service!)</title><summary type="text">


Google App Engine is a great product, but it lacks several features. I created few simple services to help GAE developers. Of course services aren't GAE specific, you can use them from any site.

The services are:Image resizingCron serviceComet service 
Image resizing
One can't easily resize image on Google architecture - they blocked PIL. This service just resizes images and uploads them back</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/05/missing-services-for-google-app-engine.html" title="Missing services for Google App Engine (comet as a service!)" /><link rel="related" href="http://www.blogger.com/img/gl.link.gif" title="Missing services for Google App Engine (comet as a service!)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3971929007387248251" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3971929007387248251/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3971929007387248251" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3971929007387248251" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-7062591197882273029</id><published>2008-04-08T11:33:00.004+02:00</published><updated>2008-05-11T12:55:04.379+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GoogleAppEngine" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title type="text">Python is the winner.</title><summary type="text">

Usually I don't comment the news on the web, but this one is in my opinion really important.

Google made App Engine. Now you can write web applications in Python and run them on Google infrastructore. The main advantages?ultra scalability for renderer serversultra scalability for databaseeasy deployrather cheapauto load-balancingWhat they miss?memcached / advanced cachecomet supportview layer </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/04/python-is-winner.html" title="Python is the winner." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=7062591197882273029" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/7062591197882273029/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/7062591197882273029" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/7062591197882273029" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-7696927142178246493</id><published>2008-04-06T19:21:00.004+02:00</published><updated>2008-04-07T00:32:05.461+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><title type="text">[pl] Bootstrap 8.4 - Tomasz Lis</title><summary type="text">Oto prezentacja Tomka Lisa z sobotniego Bootstrapa "Od startupu do fakapu, czyli co z tym gronem…". Sorry za jakość, ale to wszystko co ten sprzęt potrafi. Chrząknięcia i szepty należą do Sebastiana.

 

Update 1
Jesli google video nie działa, to tu jest źródłowy wmv.


Update 2
Ostatnie pięć minut okazało się być czarną planszą. Teraz mam nadzieję już wszystko widać.</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/04/pl-bootstrap-84-tomasz-lis.html" title="[pl] Bootstrap 8.4 - Tomasz Lis" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=7696927142178246493" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/7696927142178246493/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/7696927142178246493" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/7696927142178246493" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-173027857631855129</id><published>2008-04-06T18:20:00.003+02:00</published><updated>2008-04-06T20:35:17.162+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Motoman" /><title type="text">Motoman controlled by Haptic</title><summary type="text">It's a lot of fun to control a robot with the Haptic. I like the way the robot moves.







</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/04/motoman-controlled-by-haptic.html" title="Motoman controlled by Haptic" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=173027857631855129" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/173027857631855129/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/173027857631855129" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/173027857631855129" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-972215916367782597</id><published>2008-03-28T22:00:00.008+01:00</published><updated>2008-04-06T20:35:40.938+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><title type="text">How many web browsers do you have on your computer?</title><summary type="text">(no, it's not my desktop)
Simple question: how many browsers do I have?

I use Opera for reading reddit and browsing, Webkit for gmail and google docs (it's really fast), Firefox for web developing (FireBug rules).
I use virtual machines, so it's not so easy to count :)
main operating system: opera, firefox, safari, webkitsecondary os: opera, firefox, safari(comes with itunes), webkit, internet </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/how-many-web-browsers-do-you-have-on.html" title="How many web browsers do you have on your computer?" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=972215916367782597" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/972215916367782597/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/972215916367782597" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/972215916367782597" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-3071301133405894979</id><published>2008-03-27T22:41:00.003+01:00</published><updated>2008-03-27T22:44:29.420+01:00</updated><title type="text">Why I don't buy on ebay.</title><summary type="text">&gt;&gt; Hi, I want to ask if you provide deliver to Poland (Europe)?

Only after I am certain that good funds have 
   completely cleared my account, 
   cannot be reversed, 
   you agree to accept all shipping charges, 
   you understand you accept the item "as is" and 
   have no right to return it. 

Reason for this harsh approach to international shipping? 
Too many scams coming from your location</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/why-i-dont-buy-on-ebay.html" title="Why I don't buy on ebay." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=3071301133405894979" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/3071301133405894979/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/3071301133405894979" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/3071301133405894979" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-9062790428030467148</id><published>2008-03-26T22:09:00.007+01:00</published><updated>2008-03-27T09:46:40.020+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="Performance" /><title type="text">Useful C extensions (gcc specific)</title><summary type="text">You think that knowing ANSI C is enough? Well, okay, it's enough. But I found that some gcc extensions are very useful.

All gcc C extensions are listed in the manual.

Here are the extensions I use:

Labels as values
I remember the old assembler days, when you could jmp to to an address from an array. Nowadays in C, you can create an array of pointers to functions and call pointer from array. </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/useful-c-extensions-gcc-specific.html" title="Useful C extensions (gcc specific)" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=9062790428030467148" title="6 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/9062790428030467148/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/9062790428030467148" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/9062790428030467148" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-1867423349687971134</id><published>2008-03-25T23:56:00.003+01:00</published><updated>2008-03-26T22:07:37.827+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Motoman" /><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><title type="text">Emulating exit(3) and moving stack on the fly.</title><summary type="text">Recently, during coding embedded stuff for industrial robots I had very interesting problem.

I needed to implement exit(3) function. But the system on the robot is very simple. There aren't any kinds of syscalls.

So, the functions exit(3) must emulate the only proper way of exiting the program. It should emulate returning/exiting from main() function.

My friend, Michal Luczaj, found clever way</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/emulating-exit3-and-moving-stack-on-fly.html" title="Emulating exit(3) and moving stack on the fly." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=1867423349687971134" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/1867423349687971134/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/1867423349687971134" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/1867423349687971134" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-8046401854700089976</id><published>2008-03-21T11:01:00.003+01:00</published><updated>2008-03-26T22:06:49.058+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Web" /><title type="text">Web applications? Think again.</title><summary type="text">Some time ago I proved that writing comet applications can be very easy.

Now I think, I can put almost anything online. I created chat, I have working proof of concept of ytalk-like web application. I'm thinking about putting Python interpreter online. These are rather standard web applications, someone did it before. What's the next step of "evolution" after comet?

Ideas are free, so I can </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/web-applications-think-again.html" title="Web applications? Think again." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=8046401854700089976" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/8046401854700089976/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/8046401854700089976" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/8046401854700089976" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-11891391733871479</id><published>2008-03-11T11:59:00.003+01:00</published><updated>2008-03-26T22:06:36.875+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Algorithms" /><title type="text">Bidirectional search example</title><summary type="text">

Dorian asked for implementation of bidirectional search algorithm. So I created very simple implementation of bidirectional search, not optimized at all. But I hope this is enough to understand the algorithm.&gt;&gt;&gt; from bidirectionalsearch import *
&gt;&gt;&gt; bidirectional_search(graph,1,3)
[1, 2, 3]
&gt;&gt;&gt; bidirectional_search(graph,1,8)
[1, 2, 3, 4, 7, 8]
&gt;&gt;&gt; bidirectional_search(graph,1,9)
[]
&gt;&gt;&gt; </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/bidirectional-search-example.html" title="Bidirectional search example" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=11891391733871479" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/11891391733871479/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/11891391733871479" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/11891391733871479" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-5415909154990517078</id><published>2008-03-08T11:42:00.003+01:00</published><updated>2008-03-08T11:44:14.281+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asychrony" /><title type="text">Why you should care about synchronous blocking I/O syscalls?</title><summary type="text">In previous post I noticed that open(2) and stat(2) aren't asynchronous. But why you should care?

Try to view a html file from CD using your favorite browser. I don't know how about you, but I switch to other browser tab while a site is loaded. But wait, when the drive starts to spin the CD the browser is blocked?

That's because the browser did an open(2) on a file from CD and system have to </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/why-you-should-care-about-synchronous.html" title="Why you should care about synchronous blocking I/O syscalls?" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=5415909154990517078" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/5415909154990517078/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/5415909154990517078" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/5415909154990517078" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-214632780257177271</id><published>2008-03-08T11:19:00.002+01:00</published><updated>2008-03-26T22:07:47.325+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Django" /><title type="text">Caching at grono</title><summary type="text">I posted article (in polish) about caching at Grono, with description of the caching decorator called memoize.

It's a very simple decorator, but it's working perfectly. Without it the site wouldn't be working :)</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/caching-at-grono.html" title="Caching at grono" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=214632780257177271" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/214632780257177271/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/214632780257177271" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/214632780257177271" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-379690290236505339</id><published>2008-03-08T10:57:00.002+01:00</published><updated>2008-03-08T11:18:55.539+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="Asychrony" /><title type="text">How to deliver an event to multiple processes? - scaling django-evserver</title><summary type="text">The hardest problem  I had to solve during my work on django-evserver, was how to efficiently propagate an event to multiple listener processes.

Python, because of GIL,  doesn't scale across multiple processors. One process can only use one processor.

In django-evserver we have multiple python processes and some of them could wait for some specific event. The question is how to deliver an event</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/03/how-to-deliver-event-to-multiple.html" title="How to deliver an event to multiple processes? - scaling django-evserver" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=379690290236505339" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/379690290236505339/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/379690290236505339" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/379690290236505339" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-2493328228914056619</id><published>2008-02-29T12:22:00.003+01:00</published><updated>2008-02-29T13:19:35.553+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network" /><category scheme="http://www.blogger.com/atom/ns#" term="Nmap" /><title type="text">Nmap - os detection for every open tcp port</title><summary type="text">While ago I created tool, that shows p0f-like signatures for every open port. This signature is based on information taken from single SYN-ACK packet from target port. Sample output:$ sudo ./nmap -n -sT -PS80 -p21,22,53,80,443 --script=p0f.nse www.cisco.com

Starting Nmap 4.22SOC1 ( http://insecure.org ) at 2007-07-12 00:04 CEST
Interesting ports on 198.133.219.25:
PORT    STATE    SERVICE
21/tcp</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/02/nmap-os-detection-for-every-open-tcp.html" title="Nmap - os detection for every open tcp port" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=2493328228914056619" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/2493328228914056619/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/2493328228914056619" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/2493328228914056619" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-9001743619080272599</id><published>2008-02-27T00:23:00.006+01:00</published><updated>2008-02-27T02:04:43.186+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asychrony" /><category scheme="http://www.blogger.com/atom/ns#" term="Nmap" /><title type="text">NSE loop bug</title><summary type="text">Nmap Scripting Engine is an engine for running Lua scripts inside Nmap. It's based on Nmap asynchronous library NSock. 

During work on NSE script I found that sometimes Lua threads were frozen for too long. For example socket_object:receive() should take few milliseconds, but it took more than a hundred. In normal usage I wouldn't even notice that events are delayed, but this time I needed exact</summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/02/nse-loop-bug.html" title="NSE loop bug" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=9001743619080272599" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/9001743619080272599/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/9001743619080272599" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/9001743619080272599" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-2797923531103204252.post-8878657392630551808</id><published>2008-01-18T22:45:00.000+01:00</published><updated>2008-01-18T23:32:36.497+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Django" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="Asychrony" /><title type="text">django-evserver - Asynchronous server for Django</title><summary type="text">I mentioned the idea in previous post about asychronous wsgi. 

Now we have working example of simple chat application. The chat is nothing special, but it's made in Django! To make this possible I created special server, django-evserver. It's quite light wrapper to libevent http layer (several hundred of lines in python/ctypes).

Using this technology it's now possible to create asynchronous </summary><link rel="alternate" type="text/html" href="http://popcnt.org/2008/01/django-evserver-asynchronous-server-for.html" title="django-evserver - Asynchronous server for Django" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2797923531103204252&amp;postID=8878657392630551808" title="16 Comments" /><link rel="replies" type="application/atom+xml" href="http://popcnt.org/feeds/8878657392630551808/comments/default" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://popcnt.org/feeds/posts/default/8878657392630551808" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2797923531103204252/posts/default/8878657392630551808" /><author><name>majek</name><uri>http://www.blogger.com/profile/01251411797162710066</uri><email>noreply@blogger.com</email></author></entry></feed>
