Niriel

Groningen, Netherlands

niriel.wordpress.com

Age: 37

I can't find any game I like to play. Except Minecraft, I like that one. So I have to build my own game I guess. One day I'll finish it. Maybe.

Mar
3
awarded Popular Question
Dec
23
awarded Yearling
Dec
23
awarded Yearling
Dec
10
awarded Popular Question
Oct
19
awarded Notable Question
Oct
14
awarded Autobiographer
Oct
14
awarded Supporter
Sep
23
comment Python type() or __class__, == or is
"The result of type() is equivalent to obj.__class__ in new style classes" is a reasonable assumption about sane code but it is not guaranteed by Python. If the class body definition includes __class__ = 123 then the builtin type returns the correct result (that is, it returns the object that effectively controls the behavior). One could also probably do nasty things with getattribute.
Sep
22
awarded Autobiographer
Sep
22
awarded Supporter
Aug
23
awarded Autobiographer
Aug
18
answered Can Python optimize this simple variable call?
Aug
10
comment Does Python have a string contains substring method?
That's because there is a bajillion ways of creating a Product from atomic variables. You can stuff them in a tuple, a list (which are forms of Cartesian Products and come with an implied order), or they can be named properties of a class (no a priori order) or dictionary values, or they can be files in a directory, or whatever. Whenever you can uniquely identify (iter or getitem) something in a 'container' or 'context', you can see that 'container' as a sort of vector and define binary ops on it. en.wikipedia.org/wiki/…
Jul
13
awarded Enthusiast
May
29
comment Real world applications of category theory
I know I am resuscitating a very old discussion. Still I am curious about how things went for this project of yours. I write a lot of Python code for work and fun, but my code is more and more 'functional' because I have learned of lot of mathematics lately. I am not trying to write a Python implementation of Haskell, but I am slowly building a library of arrows that feels nice to use. It's not very pythonic anymore, though. How did your transition do?
May
22
comment How to give floats/figures titles?
I found these two web pages very useful to produce the plots of my thesis with Matplotlib: wiki.scipy.org/Cookbook/Matplotlib/LaTeX_Examples and wiki.scipy.org/Cookbook/Matplotlib/UsingTex . However I would not do it again; instead I would let LaTeX produce the plots itself (see ticz package for instance). Advantages: (1) actually looks like LaTeX; (2) fix typos, resize and restyle without having to rerun your 4-years-old python code and (3) no need to deal with Matplotlib's maddening API and documentation.
May
20
awarded Supporter
May
18
awarded Autobiographer
May
8
awarded Critic
May
4
awarded Supporter
1 2 3 4 5