<![CDATA[LittleHelicase's Blog]]>http://localhost:2368/Ghost 0.6Mon, 01 Jun 2015 18:47:44 GMT60<![CDATA[Ghost on Github]]>You probably noticed that I'm using Ghost on GitHub, even though Ghost does not run on GitHub. If you don't know Ghost you should check it out now!

Setting up a local Ghost

I strongly recommend using Docker if you can! With docker installed you simply run

docker run -d
]]>
http://localhost:2368/ghost-on-github/69f15cf0-e201-45c0-abe5-d9b98150958bMon, 01 Jun 2015 18:47:32 GMTYou probably noticed that I'm using Ghost on GitHub, even though Ghost does not run on GitHub. If you don't know Ghost you should check it out now!

Setting up a local Ghost

I strongly recommend using Docker if you can! With docker installed you simply run

docker run -d --name github-blog -v <local-path>:/var/lib/ghost -p 2368:2368 ghost  

This starts a new Docker container serving on 2368 named github-blog of ghost. All your data will be stored at <local-path>. With this Docker container you should use the standard 2368 port as some of Ghosts links will point nowhere otherwise (it strangly uses the server port and not the one the users uses).

After this setup you can simply go to localhost:2368/ghost and start editing your blog.

Mirroring with wget

At last you want to copy your files to GitHub. I use wget for this, which is essentially wget localhost:2368. But sadly it is not quite that simple, you want it to follow links and change some of them according to the file-type to avoid MIME conflicts etc. You can find my mirror script here. But: Be careful running this script. It removes everything in the current folder before starting wget. It will remove your files without asking and without putting it into the trash!

]]>
<![CDATA[Stream drawing with Pivi]]>Motivation

While working in the university I supervised many student works. Most of them involved some form of programming and visualizing the results. I noticed that nearly all of the students put a lot of effort into creating an environment in which they can visualize their results. Some of them

]]>
http://localhost:2368/stream-drawing-with-pivi/692c6f9e-3ef7-4fee-af69-6afa3f145683Mon, 01 Jun 2015 17:26:25 GMTMotivation

While working in the university I supervised many student works. Most of them involved some form of programming and visualizing the results. I noticed that nearly all of the students put a lot of effort into creating an environment in which they can visualize their results. Some of them use some fancy tools others start with the bare minimum with varying results from crappy unusable tools to surprisingly beautiful solutions.

And in every work I had at least some of the following issues:

  • missing export mechanism
  • unusable controls
  • cumbersome dependencies
  • not portable
  • overly complex design hiding the important work
  • etc.

But the worst issue is, that students forget the actual task an put much more time into the visualization rather than into the actual problem solving. As I see it, students start creating the visualization environment and get excited with extending it etc. that they neglect the actual task.

The Pivi Approach

A colleague of me and I create a small and simple language that should solve most of the problems. It is a stream based drawing language that allows for an easy dependency free 1 development.

Drawing in Pivi is fairly simple. You create a stream of commands and pipe it into Pivi which does all the drawing, conversion to animations etc. Pivi itself will need some dependencies, but it is possible to implement different Pivi clients making it easier to be portable.

A Pivi stream could look like this:

line (10 10) (200 200) :stroke red  
line (10 200) (200 10) :stroke blue  
circle (40 40) 10 :fill yellow  

You can pass this stream into Pivi and get an image out of it. This works in every language, e.g. in Python it could look like this:

print("line (10 10) (200 200) :stroke red")  
print("line (10 200) (200 10) :stroke blue")  
print("circle (40 40) 10 :fill yellow")  

And then you call python prog-above.py | pivi and get an image as a SVG. For animations you simply add a line newframe and start the next frame. The basic language is small and thus it is simple to write a different Pivi client on your system.

Check out the Pivi Clojure client at Github

Further Development

Pivi itself is rather small and has only a handful of features, but due to its stream based nature it is easy to write middlewares that add extra features like keyframe support or simple chart tools. A middleware takes a stream of commands in an extended format and transforms it into Pivi syntax (or a simpler middleware format). A possible middleware could transform CSV datasets into graphs drawn with Pivi like this:

cat graph.csv | csv2pivi --data "volume" --over "time" | pivi  

Where --data could select the column volume and --over defines the abscissa.

  1. You will need a Pivi translation unit with it's dependencies for drawing.

]]>