View mymap.pl
#!/usr/bin/env perl
use strict;
use warnings;
sub myMap (&@) {
my ($fn, @lst) = @_;
return () unless @lst;
return (sub { local $_=$_[0];$_[1]->() }->($lst[0],$fn),
&myMap( $fn, @lst[1..$#lst] ));
View sat.hs
-- This is going to be on Hackage soon! https://github.com/gatlin/surely
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : AI.Surely
-- Copyright : 2012 Gatlin Johnson
-- License : LGPL 3.0
-- Maintainer : rokenrol@gmail.com
-- Stability : experimental
View lexical.pl
#!/usr/bin/env perl
use v5.16;
use strict;
use warnings;
sub c {
my $lexicalValue = 0;
return sub {
say $lexicalValue;
View hello.ll
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin10.0.0"
declare ccc i8* @memcpy(i8*, i8*, i64)
declare ccc i8* @memmove(i8*, i8*, i64)
declare ccc i8* @memset(i8*, i64, i64)
declare ccc i64 @newSpark(i8*, i8*)
%__stginit_Main_struct = type <{}>
@__stginit_Main = global %__stginit_Main_struct<{}>
%sfT_srt_struct = type <{i64}>
View hello.hs
module Main where
main = do
putStrLn $ "Hello, World!"
View hello.js
// Note: Some Emscripten settings will significantly limit the speed of the generated code.
// Note: Some Emscripten settings may limit the speed of the generated code.
// TODO: " u s e s t r i c t ";
try {
this['Module'] = Module;
} catch(e) {
this['Module'] = Module = {};
}
View degree.pl
#!/usr/bin/env perl
use v5.16;
use strict;
use warnings;
while (my $str = <STDIN>) {
say "DMS" if $str =~
m/([0-9]+(\W*)deg((ree)?s?)?)?(\W*)([0-9]+(\W*)min((ute)?s?)?)?(\W*)([0-9]+(\.[0-9]*)?(\W*)sec((ond)?s?)?)?/;
}
View orc-sample.lsp
; examples from http://orc.csres.utexas.edu/tryorc.shtml#tryorc/tutorial/
; site definition, similar to a function but handles network transparency and will publish multiple values if you call them
; multiple times
; they will necessarily hide much magic
(defsite name (arg)
(body ...))
; I may consider using plain-old functions for this but at the moment I might need to hide some magic
View main.go
package main
import (
"fmt"
"github.com/gatlin/go-orc"
"net/http"
"time"
)
/*
View uninstall-haskell-osx.sh
#!/bin/bash
# source: http://www.haskell.org/pipermail/haskell-cafe/2011-March/090170.html
sudo rm -rf /Library/Frameworks/GHC.framework
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
sudo rm -rf /Library/Haskell
rm -rf .cabal
rm -rf .ghc
rm -rf ~/Library/Haskell