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
song[ | |
[ This is the '99 bottles of beer on the wall' little puzzle from Rosetta Code. | |
The expected output is in (you'll never guess) expected.output for running | |
this program as a unit test. | |
comment] | |
exported[sing/0 list] | |
author[Andy Brown (click) <[email protected]> string] |
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
fs = require('fs') | |
sys = require('sys') | |
exec = require('child_process').exec | |
spawn = require('child_process').spawn | |
option '-l', '--lint', 'Run the coffee scripts through jslint after compilation to javascript' | |
tar_cmd = "tar -cvjf ggnome.tar.bz2 server/" | |
### |
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
fs = require('fs') | |
sys = require('sys') | |
exec = require('child_process').exec | |
spawn = require('child_process').spawn | |
option '-l', '--lint', 'Run the coffee scripts through jslint after compilation to javascript' | |
### | |
Script File Data |
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
#!/usr/bin/racc | |
# -*- encoding: utf-8 -*- Lapis Racc Parser Class | |
# Andy Brown <[email protected]> [April, 12, 2010] | |
/* This is a BNF style parser generator grammar for the | |
* Lapis Language to be used by racc. Racc is a tool | |
* much like Yacc or Bison implemented for Ruby. | |
* | |
* Racc will parse this file and create a lapis.tab.rb | |
* file that contains a Parser class with a do_parse |
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
### network.rb - Andy Brown <[email protected]> [21 March, 2010] | |
###============================================================================ | |
### Network class for communication with the game server. | |
require 'socket' | |
require 'fiber' | |
## Network Class | |
##----------------------------------------------------------------------- | |
## Rather than threads, the Network class uses fibers from Ruby 1.9. It |
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
%% connection/1 | |
%%============================================================================== | |
%% There are two common idioms I've found for this. (A) This function spawns a | |
%% handler loop and then recuses on itself. (B) This function spawns another of | |
%% itself and calls the handler loop. (A) makes more sense for the socket close | |
%% handling to be sure that it's getting done. | |
connection(Listen, ClientListPid) -> | |
% Accept a connection and set it up for incoming connections | |
{ok, Socket} = gen_tcp:accept(Listen), |
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
12> c(s3d). | |
{ok,s3d} | |
13> s3d:unpack("qeynos2.s3d"). | |
10dirt2b.bmp | |
10dirt3b.bmp | |
10dirtb.bmp | |
11gold.bmp | |
11prist3.bmp | |
11prist4.bmp | |
11side1.bmp |