Rasmus​.krats​.se

This page in English

Inlägg taggade ”project”

Skriverier då och då, på webben sedan 1994.

A compiling template system in Rust

Posted 2016-10-07 18:32. Tagged , , , .

When developing web applications, it is often useful to have a template system. Something that lets you write generic versions of web pages, that the application can fill with the specific content for each page it should show.

There exists lots of “languages” to write such templates, such as mustache, jinja2, and play 2 scala templates (twirl). Most fits very well with a dynamic language, where you can get properties from an object, or even call a method, by its name in a plain string. In a statically compiled language, the actual names of fields and methods are not relevant, and generally not present, after compilation. This makes a “dynamic” template language a hard match for a compiling language such as rust. So why not try to create a better match?

Read whole A compiling template system in Rust with 3 comments.

Chordlab: chopro till pdf

Publicerad 2008-02-12 00:15. Senast uppdaterad 2010-10-20 05:55. Taggat , , , , .

Chordlab är ett kommandoradsprogram jag skrev för att göra pdf-sångböcker från choprofiler.

Normal användning är att ge chordlab en lista med choprofiler, var och en med en sång (eller flera). Chordlab skapar en pdf med en sida för varje sång.

Uppdaterat 2010-10-20: För att göra chordlab mer inbjudande, och för att jag inte har lyckats något vidare med att driva ett publikt monotone­repository, har jag nu flyttat chordlab till github. Projektet heter kaj/chordlab.

Läs hela Chordlab: chopro till pdf med 3 kommentarer.

imaputil

Posted 2002-07-02 18:56. Last updated 2007-12-18 07:50. Tagged , , , .

Some simple command-line utilities for mail management over imap.

Since imap is a nice protocol to handle email messages independent of MUA, some functionality is wanted MUA-independently. imaputil is a few simple perl programs to run in a command line context.

These utilities depend on an external program to connect to the server and take care of the Kerberos and/or SSL stuff. I use imtest from the cyrus-imap package, but it should be easily replaceable.

Update 2007-12-18 07:50: A new release: imaputil 0.6 is on the ftp server.

Read whole imaputil.

StyleScript

Posted 1998-12-14 12:00. Last updated 2003-12-28 12:00. Tagged , , , .

An open-source HTML / SGML printer that uses CSS2.

StyleScript reads a HTML / SGML file, local or from an URL, and writes a Postscript file. I use the sp library, so only files that names a dtd and conforms to it is supported.

If your document passes the W3C validator without errors, it should be printable.

Update 2003-12-28: StyleScript is dead, viva Passepartout

Read whole StyleScript.

webredirect

Posted 2001-01-17 22:34. Last updated 2003-07-17 12:00. Tagged , , , .

A small web server serving “301 Moved Permanently” or “302 Moved Temporarily” to all requests.

Update 2003-07-17: Relase 0.3 of webredirect is out on the ftp server. The main news in this release are:

Updated the C++ language usage, so this version works with gcc 3.x (and should work with other standard-compliant C++ compilers).

Read whole webredirect.

XkBiff

Posted 1996-05-03 12:00. Last updated 2002-07-09 12:00. Tagged , .

XkBiff is my attempt at a biff program that understands kpop. When there is mail, it pops up another window featuring the From and Subject fields of the mails.

Update 2002-07-09: The XkBiff project is discontinued and no longer maintained, mainly because I don’t even use POP anymore. If you want to use it, you probably have to fix it as well.

Read whole XkBiff.

incu or ++Unix

Posted 2000-12-19 12:00. Tagged , .

Unix facilities for C++ programmers

The aim of ++Unix is to allow C++ programs to use Unix facilities, such as sockets, whose interface includes a lot of pointers and other low-level stuff, and might vary on different kinds of Unix, in a nice, simple and consistent way.

One of the goals: There should be no need for preprocessor conditionals (#if) other than as include guards in a C++ programs that uses ++Unix.

Read whole incu or ++Unix.

Black Box

Posted 2000-07-03 22:58. Tagged , , .

Welcome to this simple mind game.

Read whole Black Box.

Femtonspel i java

Publicerad 1998-07-25 22:43. Taggat , , .

Jag har skrivit ihop det klassiska “femtonspelet” i java. Om du har sett ett “riktigt” femtonspel bör det inte vara så svårt att lista ut hur du ska göra.

Läs hela Femtonspel i java.

WebMail

Publicerad 1996-02-27 12:00. Taggat .

WebMail är ett litet program för att skicka brev från websidor. Det tar data från en form och skickar per epost.

Läs hela WebMail.