Random bits and pieces by Igor Dejanović

Random bits and pieces about programming, languages, tools, OS software.... by Igor Dejanović
On the web: 

Igor Dejanović • May 6, 2016 • 1 min read

Implementing Martin Fowler's State Machine DSL in textX

Well, you know what they say: “You aren’t making a DSL tool if you haven’t implemented Martin Fowler’s State Machine language using your tool yet” ;) This is a well known DSL example from his book Domain-Specific Languages. If you are doing stuff in the field of DSLs you should definitely read this book. There is an excerpt from the book available on-line so I advise you to read it before watching the video below. Another book which I also highly recommend is DSL Engineering: Designing, Implementing and Using Domain-Specific Languages by Markus Völter. Also an excelent read, although oriented more towards modeling languages with graphical syntaxes (a.k.a. Domain-Specific Modeling), is the book Domain-Specific Modeling: Enabling Full Code Generation by Steven Kelly and Juha-Pekka Tolvanen. In the video bellow I am explaining the implementation of the Martin Fowler’s State Machine language in textX by:

This tutorial is a good overview of textX workflow and capabilities but if you want to see basic introduction together with installation and the first steps I suggest you to watch video introduction to textX first. Full source code presented in the video is available at the project GitHub repository. I hope you will enjoy watching this video as much I enjoyed playing with this little language.  Read →

Igor Dejanović • May 4, 2016 • Less than a minute read

Video introduction to textX

Finally got some time to record first video for textX. In this video I will show you how to install textX and do some first steps. This is my first video tutorial so please bear with me ;)  Read →

Igor Dejanović • Jan 24, 2016 • 1 min read

PsychoPy, Pyo and PulseAudio

Today, while hacking on pyFlies I run into trouble with the code generated for the PsychoPy backend. PsychoPy is using Pyo to generate sound. The problem is that Pyo do not support PulseAudio, only JACK. This might be a good choice since JACK is better suited for low latency sound processing, but today most linux distro use PulseAudio which is better suited for general desktops. In order to use PsychoPy, first thing to do is to start JACK. Luckily, there are nice GUI apps to do that easily, e.g. QjackCtl or cadence. Starting JACK will suspend PulseAudio while JACK is runnning. Now, we must instruct pyo called from PsychoPy to use JACK. Although, there is audio parameter in Server call of pyo lib which could be used to specify JACK as the backend, this would require changing source code of PsychoPy. There is luckily a non-obtrusive way to achieve the same effect. Just specify environment variable:

export PYO_SERVER_AUDIO=jack
Now pyo lib will use JACK by default and the PsychoPy sound will work.  Read →