Month: August 2010
Becoming a Project Euler addict
Jeez, now I’ve solved Project Euler problems #297 and #299. I think I’m becoming an addict 😀 #299 required quite a lot of help from my friend (thank you 🙂 ) while #297 was particularly easy. I managed to code it correctly in about 15 minutes 🙂 Can you? ;D […]
Project Euler #298 – Solution
Omg, I finally solved this problem and gained access to Project Euler’s thread dedicated to its solutions. Apparently everybody came up with basically the same idea. The number of game states can be reduced to 438 (439 including the empty state). This way all 50 rounds can be simulated using […]
Project Euler #298
I’ve recently discovered Project Euler site – www.projecteuler.net and found one of its most recent puzzles quite a fun to solve 🙂 I mean project #298 – Selective Amnesia. It’s a cache hit/miss problem although formulated using different terms. Larry and Robin play a memory game involving a sequence of […]
C++ Logo
I figured that I would add an appropriate logo to every post but when it came to C/C++ I couldn’t find any official one so I made these myself using Inkscape: Of course they’re heavily inspired by the Visual Studio C++ 6.0 logo, nevertheless they’re different and I’m sure M$ […]
New macros system for C/C++
Now probably is a good time to start mentioning my own macros system for C/C++. I’ve already written a bit about it in my first post of the cycle. The codename for the project is RMPP, which stands for Real Macro Preprocessor (for C/C++). Why did I call it that? […]
Macros in Nemerle
Except obvious general differences, Nemerle is quite similar to MetaLua in its approach to macros. It allows equivalents of -{ … } and +{ … } blocks just like MetaLua does. Said equivalents are and $(…), although they don’t work exactly the same. is the quotation block, i.e. it generates […]
QBoundMethod Part 2
Today, I’d like to discuss the implementation of QBoundMethod in every detail. The core of all functionality is placed in QBoundMethod::construct() method. It is responsible for creating a copy of generic arguments provided as its parameters. For every QGenericArgument, a QVariant holding copy of the original data is created and […]
QBoundMethod
Bound method is usually defined as class method associated with an object (instance of the class). But what if we could extend this term a bit and bind methods not only to objects but to an arbitrary number of arguments as well? Let’s assume that if we have a method […]
Recent Comments