The task was to develop a raytracer using a ray marching algorithm
to visualize procedural surfaces. Two independent versions were
suggested and implemented:
GPU version utilizing a custom GLSL fragment shader. A
glus/glew-based launcher was suggested, thus the task was to
straightforwardly implement actual ray tracing and to choose
a nice-looking procedural scene.
CPU version utilizing OpenMP for parallelism and SSE2 for
single-core performance. Unlike GPU, reflections and
refractions are easy on CPU due to GPU's limited support
The task was to implement an interpreted programming language,
for later use as a scripting language in the following task. My
language design was heavy influenced by Lua, ML, Erlang — the
languages I was trying out at that moment.
Token types are distinguished lexically, as in Erlang:
keywords and function names are always lowercase, while
variable names are always capitalized.
Control structures resemble Lua:
if A then B else C end.
Variables are dynamically typed.
Tuples are used as language for destructuring assignment and
parameter passing, while not being a valid data type.
Functions use applicative syntax as in functional
programming: foo x instead of
All functions only accept a single argument, but a tuple
can be used to encode a multiple-argument function.
Arrays have fixed size and can be allocated via
array Size syntax. Uncommon syntax with
$ sigil is used to access array items:
Example program (qsort algorithm and testing code):
fun not X
return if X then false else true
fun qsort [A, L, R]
I = L
J = R
X = $A ((L+R)/2)
while not (I>J) do
while ($A I < X) do I = I+1 end
while ($A J > X) do J = J-1 end
if not (I>J) then
[$A I, $A J] = [$A J, $A I]
I = I+1
J = J-1
if J>L then qsort [A, L, J] end
if I<R then qsort [A, I, R] end
fun main 
N = 30
Test = array N
println ["Sizeof Test is", size Test]
T = 7
for I from 1 to N do
$Test I = T
T = (T*383) % 1543 + 1
qsort [Test, 1, N]
The task was to implement a client-server network multiplayer
economic game. Players would connect to the server via text
protocol, join a game, and perform moves allocating resources to
The first part was to implement an asynchronous game server in C.
Implementation used custom event loop and FSMs for tracking states
of game and players.
The second part was to implement an automated game client in C++
which would play according to algorithm implemented in scripting
language from the previous assignment.
The task was to implement a solver for a two-player checkers
game on a 8x8 field. The main implementation detail is that an
optimized bit-mask representation is used to encode a field: it is
stored as a set of 64-bit masks. This design allows to efficiently
use 64-bit word size of modern processors and to implement
operations like computing all possible moves with just a few
bitwise instructions. This optimization allowed to continue
alpha-beta pruning process 1-2 levels deeper (within given time
limit), than solutions using naïve (array-based) representations.
A great way to learn a new programming language and to have some
fun at the same time is to try to implement a fairly simple (but
not trivial) program in it. This time I decided to implement a
raytracer (something I have never really done before) while reading
"Standard ML for the Working Programmer". It was also interesting
to try MLton compiler's performance.
While playing with libghoto2, I noticed that a DSLR is capable
of providing low-resolution preview images at a rate of 20-30
frames per second. This observation gave birth to an idea to send
these images into a v4l2 (video for Linux) loopback device. Even
though it worked (I was able to make a skype call with DSLR-class
video once), the whole idea was insane from the beginning :)
This project grew out of my dissatisfaction with existing
notification daemons. Either their visual design was simply poor,
or they would avoid animations (which I would prefer to have to be
able to notice new notifications), or they would be inconvenient,
like notify-osd which would only show one notification at a time,
with no option to dismiss it.
The daemon was implemented in C++/Qt4, using QStylesheet engine
for visual styling. The notification would appear at the side of
the screen and fall down in a stack before disappearing. The idea
of this animation was borrowed from some Miranda IM plugin.
Motorola modding 2008-2009
Motorola used to make Linux-based smartphones back in 2005-2006.
These devices would run custom "EZX" platform based on MontaVista
Linux and Qt/Embedded 2.3.
Those years, Linux smartphones were really uncommon and
attracted a community of geeks that would seek ways to modify,
improve and replace these phones' software in a guerilla way
(official SDK was hidden behind restricted paid access model which
attracted no developers).
I used to own a Motorola A1200 and was seeking ways to provide
it with better software.
A simple mobile client for
MPD network-controlled music
player. Was developed in two flavors: EZX (Qt 2.3) and Qtopia (Qt
The goal was to be able to see "now playing" and control
playback on desktop PC from mobile, and that goal was successfully
EzxEmu Multi-Console Emulator Port 2008
Multi-Console emulator bundle, assembled and ported to
Motorola e680 by the
team, was ported by me to Motorola a1200. It was required to remap
keys and change display function to convert colors to 18-bit format.
EZX DRM Hacker 2008
A reverse-engineered tool to heal installed J2ME midlets broken
by DRM encryption.
Siemens modding 2006-2007
At that time there used to be an active community of hackers built
around modification of Siemens phones' firmware. They would create
and install patches, altering their firmware in place.
Finally, an executable file loader emerged, (referred to as
ELF loader), which skyrocketed development activity.
Compared to desktop, development still was not easy: there were
neither address space isolation, not exception isolation between
processes: any bug would likely crash the whole OS.
HTTP file downloader GUI. Made first version of UI, sketched
architecture and made an early networking prototype, before
development was continued by other community participants.
Jabber client, written in C by
kibab. I was mostly doing
some UI work, e.g. improving appearance, adding support for
different screen resolutions, fixing bugs.
Bootscreen Creator 2007
A Delphi program, allowing to convert arbitrary images into
firmware patches to install as a phone's bootscreen.
Participated in continued efforts to find useful functions and
extract their signatures.