Recent Posts

How to Write to a file in JavaScript

less than 1 minute read

Writing a file in Javascript is as easy as using the built-in method fs.writeFile, and as such matches the read file method quite well

Printing C++ Objects to stderr/stdout

1 minute read

When your C++ projects grow a little, you may find yourself needing to log the state of objects. There are two ways of doing this (assuming that you’ll want ...

How to Solve Euler 1 in JavaScript

less than 1 minute read

The Euler 1 problem is fairly simple to solve. Most people intuitively know how to do it. Here is how I would do it in JavaScript.

How to Write to a file in PHP

less than 1 minute read

The simplest way of writing to a file in php is using the file_put_contents function. This implicitly calls fopen, fwrite and fclose, as we know from e.g. c.

How to Read from stdin in Haskell

less than 1 minute read

In haskell there are two ways to read the stdin stream. Which one to use depends on what you’re trying to accomplish I guess.