Recent Posts

How to Read from stdin in Cpp

less than 1 minute read

Reading from stdin in C++ is surprisingly concise. Only 12 lines of code (including includes and empty lines).

How to Write to a file in C

less than 1 minute read

Writing to a file in c is surprisingly simple. Most of the steps in c can be found in most other languages as well. In c you open a file, write to it and clo...

How to Read a file in JavaScript

less than 1 minute read

Reading a file in Javascript (again, nodejs) is as easy as using the built-in method fs.readFile (however it needs to be required first).

How to Read a file in Go

less than 1 minute read

In go you will sometimes write more code than you are used to in e.g. most higher level languages (think php, ruby, python) - but will have a lot more contro...

How to Read from stdin in Lisp

less than 1 minute read

Just as with reading program arguments - lisp looks a bit weird when reading from the stdin stream. That is until you get the hang of it.