Open Hugrade

A humble graph designer for lazy people like me. Lately I finished fixing the source and “open sourced” it : ported to java15, jfx15 and modularized.

For more details see here. Of course available on GitHub.

CLIM on Android

This post shows a way to use the CLIM library inside an Android app.

The problem

We’d like to use a simple activity with an EditText (maybe multiline) as output and another EditText as input. Since the CLIM’s engine use Standard input/output streams as default, we need to implement our custom ones.

The Layout

The layout of our activity will consists on:

  • Multiline EditText etout as output
  • EditText etin as input
  • Button btnok to commit the input (equivalent to ENTER key)

The activity_main.xml :

CLIM dependency

First things first: let’s add dependancy to CLIM in the gradle project-level build.gradle :

then the app-level build.gradle:

The Activity

Inside our activity we will prepare our CLIM engine:

For an implementation with sense, please have a look at the class.
We will see the body of prepareStreams(Engine engine) in the next section.

The Streams

Now, we need to implement our custom input and output streams to be linked to our EditTexts etin and etout respectively.

Let’s see the content of prepareStreams():

As you can see, the implementation of the OutputStream is quite simple, since we will redirect the input string to the output EditText (in the UI thread, of course).

The TextInputStream needs some extra considerations:

You can notice that the TextInputStream take the engine as the main subscriber and saves to lastContent the inputted text. The access to lastContent is managed by two synchronized methods (getLastContent() and setLastContent(…)). Finally, notice that the forceRead() method is called inside a dedicated Thread from the parent class InputStream, so it is safe to use that while loop inside.


Let’s watch and enjoy our app (using the engine as in :


Command line interface menu (CLIM) engine for JVM offers a very simple system to manage UI menus via the cli. It may be useful when prototyping core libraries in their early stage, in absence of advanced GUI yet.

CLIM is an open source project.
Check it out on Github

Prosa’s March

The Probability Solver of Absorbing States in Markov Chain is my solution for an online programming game. The simple code in this repository provides a method to compute probabilities for the absorbing states in a given Markov chain. The code is available on GitHub.

Hyper Gyro

Well, often it’s so difficult to read the instruction booklet of something before using it. This is the reason I made the new app Hyper Gyro!

Since some gamers can’t lose their precious time to understand the purpose of an app like HyperIMU nor the effort made by its developer, I made what they wished for: a simple rotating wheel spinning in the background.
No settings, no protocols, no problemos

I guess this is an example of a manufacturer that meets the “needs” of the market…

I will ask for Hyper Gyro to be included in the next Android release as system app, together with their favourite multiplayer game maybe.