Skip to content
Miscellaneous stuff, mostly single-file tiny programs (GPLv3+)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
HelloWorld
.emacs
.gitignore
COPYING3
LICENSE
README.md
basilemap.ml
bwc.c
execicar.c
foldexample.cc
forniklas.c
half.c
lisp-write-bench.lisp
makeprimes.c
manydl.c
microbenchlist.c
onionwebsocket.c
redis-scan.c

README.md

misc-basile

Miscellaneous stuff, mostly single-file tiny programs

Several single source file programs usually for GNU/Linux/Debian/x86-64. Their compilation command is generally given as a comment inside the source code.

  • manydl.c is a program to show that Linux is capable of dlopen-ing many plugins (typically, several hundred thousands or many millions). It works by generating some pseudo-random C file, compiling it into a plugin, which is later dlopen-ed, and repeat.

  • forniklas.c is a trivial C program generating then using one single plugin in C. Read its comments for more details.

  • redis-scan.c is a program which scans all the keys in a REDIS database (see http://redis.io/ for more) and prints them on stdout.

  • execicar.c is a shell-like program interpreting commands on pipes, etc.

  • basilemap.ml is a simple exercise to understand the balanced binary trees of the Ocaml stdlib/map.ml file, which I might simplify a bit.

  • bwc.c is a crude wc -l like program using getline; for performance benchmarking.

  • half.c is a program to stop/cont-inue a command, running it at half load

  • microbenchlist.c is a useless microbenchmark on linked lists use gcc -Wall -O2 -march=native microbenchlist.c -o microbenchlist to compile it.

  • makeprimes.c uses the very clever BSD /usr/games/primes program and extract some primes from the stream of primes producing it.

  • HelloWorld/ contains a small set of files and its README, for a tutorial about GNU make (done on the phone). Perhaps the GPLv3+ license does not fit for such a trivial work.

  • onionwebsocket.c is a slighty improved example of websockets from libonion. Most of the code is not mine.

  • foldexample.cc is interesting, since it shows how recent C++ compilers are capable of very deep optimizations

You can’t perform that action at this time.