dirty lang supports currying:
$ arr = import("arr")
$ lst = [1 5 3 6 4]
lst : arr.insert(1, 8)
lst
: arr.map(~ (i) i + 10)
| // $ cc fserv.c -o fserv | |
| // | |
| // start a static file server at current directory | |
| // $ ./fserv | |
| // | |
| // specify a port | |
| // $ ./fserv -p 1234 | |
| #include <stdio.h> | |
| #include <stdlib.h> |
| " useful if you want to use alt + * key combs and your terminal sends out esc for alt keys | |
| for k in split("qwertyuiopasdfghjklzxcvbnm1234567890`-=\\;',./", '\zs') | |
| exec 'map <esc>' . k . ' <m-' . k . '>' | |
| exec 'map! <esc>' . k . ' <m-' . k . '>' | |
| endfor | |
| for k in split('cr bs tab left right up down') | |
| exec 'map <esc><' . k . '> <m-' . k . '>' | |
| exec 'map! <esc><' . k . '> <m-' . k . '>' |
dirty lang supports currying:
$ arr = import("arr")
$ lst = [1 5 3 6 4]
lst : arr.insert(1, 8)
lst
: arr.map(~ (i) i + 10)
| // macOS | |
| // CFLAGS += -ObjC | |
| // LDFLAGS += -framework Cocoa -framework OpenGL -framework AudioToolbox | |
| #define GL_SILENCE_DEPRECATION 1 | |
| #import <Cocoa/Cocoa.h> | |
| #include <OpenGL/gl.h> | |
| #include <AudioToolbox/AudioToolbox.h> |
| // macOS | |
| // CFLAGS += -ObjC | |
| // LDFLAGS += -framework Cocoa -framework OpenGL | |
| #define GL_SILENCE_DEPRECATION 1 | |
| #import <Cocoa/Cocoa.h> | |
| #include <OpenGL/gl.h> | |
| int main() { |
| // macOS | |
| // CFLAGS += -ObjC | |
| // LDFLAGS += -framework Cocoa | |
| #import <Cocoa/Cocoa.h> | |
| int main() { | |
| [NSApplication sharedApplication]; |
| #!/bin/sh | |
| help() { | |
| echo "Recursively convert resource files into embeddable C headers" | |
| echo "" | |
| echo "USAGE" | |
| echo " $ cres <src> <dest>" | |
| } | |
| if [ -z "$1" ] || [ -z "$2" ] |