Recent Posts

How to Read from stdin in JavaScript

less than 1 minute read

In javascript (nodejs anyway) stdin can be read as a stream of bytes. Therefore you need to tell node which encoding it is (utf-8 in our instance). We do the...

How to Read from stdin in PHP

less than 1 minute read

Reading from stdin in PHP is just like reading a file. The only difference is that the file to read is called php://stdin

How to Read a file in Elixir

less than 1 minute read

Reading files in elixir is pretty straight forward - especially if you just want the content of a file you know exists. And that case it is a oneliner just l...

How to Write Xml in Ruby

less than 1 minute read

In Ruby there is no built-in support for parsing and writing xml. There are however a couple of gems (packages) that allow you to do exactly this. If you are...

How to Read Program Arguments in Perl

less than 1 minute read

IISResetMe has made another Program Arguments script. This time in perl. Reading perl has always been weird for me. I have never used perl for much myself - ...