Skip to content

Instantly share code, notes, and snippets.

@wandernauta
wandernauta / gist:6261611
Last active December 21, 2015 06:08
Dent: the phaseless programming language

dent

Dent is a compiled, barely functional, phaseless, statically type-inferred, homoiconic and almost syntaxless programming language. It compiles down to LLVM assembly, which is then optimized and compiled into native binaries. Output binaries are statically linked and stripped.

The primary difference between Dent and other programming languages is that, in Dent, there is no syntactic difference between functions executed at compile time (usually known as macro's in other languages) and functions executed at runtime.

Inspired by: Lisp Smalltalk Haskell Python

Syntax

@wandernauta
wandernauta / cs.xml
Last active December 14, 2015 20:19
My Checkstyle prefs.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Sun Light
Description:
A lighter version of Sun's coding convention.
@wandernauta
wandernauta / llamize.sh
Created November 25, 2012 18:56
llamize
#!/bin/bash
#
# llamize
# Stub a llama-standard ooc library/binding.
#
# Check if a name is given.
if [[ -z $1 ]]; then
echo "Usage: llamize <name>"
Builder: interface <T> {
build: func -> T
}
HelloWorldBuilder: class implements Builder<String> {
init: func {
}
build: func -> String {
"Hello, world!"
#include <cstdio>
#include <cstdlib>
#include <string>
#include <map>
#include <vector>
//===----------------------------------------------------------------------===//
// Lexer
//===----------------------------------------------------------------------===//
@wandernauta
wandernauta / anews.sh
Created December 22, 2011 13:47
Read the Arch Linux news feed on the console.
#
# anews.sh
# Read the Arch Linux news feed on the console
#
# Put (or source) this in your .zsh_profile or whatever.
#
# Usage:
# $ anews
#
# Bugs:
@wandernauta
wandernauta / cheat.sh
Created December 10, 2011 19:47
Read cheat sheets from cheat.errtheblog.com without Ruby.
#
# cheat.sh
# Read cheat sheets from cheat.errtheblog.com without Ruby.
#
# Put (or source) this in your .zsh_profile or whatever.
#
# Usage:
# $ cheat sheets
# $ cheat recent
# $ cheat zsh
@wandernauta
wandernauta / gist:993502
Created May 26, 2011 16:53
Crash description
Process: httpd [19368]
Path: /usr/sbin/httpd
Identifier: httpd
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: httpd [1599]
Date/Time: 2011-05-26 18:13:08.560 +0200
OS Version: Mac OS X 10.6.6 (10J567)
Report Version: 6
@wandernauta
wandernauta / abbrev.py
Created May 22, 2011 19:37
A quick Python port of the Ruby Abbrev module
#!/usr/bin/python
"""
Copyright (c) 2011 Wander Nauta http://wandernauta.nl
This is a based on the Abbrev module that ships with Ruby, by Akinori Mushi.
Thanks, Akinori!
This snippet is distributed in the hope that it will be useful, but WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND. Have fun.
@wandernauta
wandernauta / bottles.ooc
Created January 24, 2011 15:53
99 Bottles of Beer in ooc!
bottles := 99
while (bottles >= 0) {
if (bottles >= 2) { "%d bottles of beer on the wall, %d bottles of beer." printfln(bottles, bottles) }
if (bottles == 1) { "1 bottle of beer on the wall, 1 bottle of beer." println() }
if (bottles == 0) {"No more bottles of beer on the wall, no more bottles of beer." println() }
if (bottles >= 2) { "Take one down and pass it around, %d bottles of beer on the wall.\n" printfln(bottles-1) }
if (bottles == 1) { "Take one down and pass it around, no more bottles of beer on the wall.\n" println() }
if (bottles == 0) { "Go to the store and buy some more, 99 bottles of beer on the wall.\n" println() }