fork while fork

:(){:|:&};:

moar confuse()

Posted by kAworu Fri, 15 Jan 2010 19:33:00 GMT
>>> class Foo:
...     def __init__(self, start):
...             self.__bar = start
...     def bar(self):
...             return self.__bar
...     def setBar(self, neo):
...             self.__bar = neo
... 
>>> f = Foo(42)
>>> f.bar()
42
>>> f.__bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: Foo instance has no attribute '__bar'
>>> f.__bar = "ougaouga"
>>> f.__bar
'ougaouga'
>>> f.bar()
42
>>> f.setBar(1337)
>>> f.__bar
'ougaouga'
>>> f.bar()
1337
>>> f.__bar = "wtf"
>>> f.bar()
1337

Posted in | aucun comments |

confuse me harder plz

Posted by kAworu Wed, 13 Jan 2010 14:27:00 GMT
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> f = function()
>>        x = 42
>>        return nil
>> end
>
> x = nil
> print(x)
nil
> 
> x, y = f(), x
> print(x)
nil
> print(y)
42

C’est faisable (en un peu moins sexy à écrire) python ou ruby également. sayfun !

Posted in | aucun comments |

augmente ta zic

Posted by kAworu Wed, 06 Jan 2010 08:19:00 GMT

http://www.youtube.com/watch?v=DGx-5A3onb0

Le clip d’un ami qui démarre, faites tourner :D

Posted in | aucun comments |

Older posts: 1 2 3 ... 9