Skip to content

Instantly share code, notes, and snippets.

@lukateras
lukateras / fizzbuzz.c
Last active November 29, 2021 01:24
Overengineered fizzbuzz in C
#include <stdio.h>
#include <string.h>
#define BUFLEN 9
int main() {
char buf[BUFLEN];
FILE *stream = fmemopen(&buf, BUFLEN, "w");
if (stream == NULL) {
-module(choir).
-export([start/0, start_world/0, say/1, say/3]).
start() -> register(?MODULE, spawn(fun loop/0)).
loop() ->
receive {Message, Voice} ->
os:cmd(io_lib:format("say -v '~s' '~s'", [Voice, Message])),
loop()
end.