This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: test | |
test: | |
flx --pkgconfig-path+=. -c --static -o mpi mpi.flx | |
mpirun -np 5 mpi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: Linux X11 support | |
requires_dlibs: -lX11 | |
requires_slibs: -lX11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CT | |
{ | |
class Semigroup[T,U] { | |
virtual fun \circ : T * T -> T; | |
} | |
class Monoid[T,U] { | |
inherit Semigroup[T,U]; | |
virtual fun id : () -> T; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Title: An example of Object Algebras in Felix | |
// Author: Garrett Bluma | |
// Date: June 29, 2015 | |
// Special thanks to Bruno Oliveira and William Cook for explaining object | |
// algebras, and for providing examples. | |
// <http://i.cs.hku.hk/~bruno/oa/> | |
// ----------------------------------------- | |
// Object algebras use extension via type parameters and inheritance. Given a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use something easier to type as the prefix. | |
set -g prefix C-f | |
unbind C-b | |
bind C-f send-prefix | |
# Relax! | |
set -sg escape-time 0 | |
set -sg repeat-time 600 | |
# This is hilariously absurd. How many nerds use tmux on OS X every day and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: support more than just linux/osx | |
include "std/posix/filesystem"; | |
// TODO: add this to std/io/textio.flx, it's missing | |
gen fopen_append : string -> ofile = '::std::fopen($1.c_str(), "a")'; | |
object Repl () = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require 2htdp/batch-io) ; provides read-csv-file | |
(require srfi/1) ; provides reduce function | |
(require plot) ; provides plot function | |
;; helper functions | |
(define (sum xs) (reduce + 0 xs)) | |
(define (square x) (* x x)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float n() { | |
return random(50); | |
} | |
float[] soften(float[] curve) { | |
for (int i=0; i<19;i++){ | |
curve[i] = curve[i] + (curve[i]-curve[i+1])/5; | |
} | |
for (int i=19; i>0; i--){ | |
curve[i] = curve[i] + (curve[i-1]-curve[i])/5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
egrep '[^_.>a-zA-Z0-9](str(n?cpy|n?cat|xfrm|n?dup|str|pbrk|tok|_)|stpn?cpy|a?sn?printf|byte_)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DictionaryParser { | |
requires package "re2"; | |
open Regdef; | |
struct KeyValue { | |
key : string; | |
value : string; | |
} |