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
%% name = Lupin::Parser | |
chunk = (stat ";"?)* (laststat ";"?)? | |
block = chunk | |
stat = varlist "=" explist | | |
functioncall | | |
"do" block "end" | | |
"while" exp "do" block "end" | |
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
one:citrus xavierlange$ rake test | |
(in /Users/xavierlange/code/citrus) | |
An exception occurred running /Users/xavierlange/.rvm/gems/rbx-head/gems/rake-0.8.7/lib/rake/rake_test_loader.rb | |
/Users/xavierlange/code/citrus/lib/citrus/grammars/calc.citrus: Malformed Citrus syntax on line 10 at offset 13 | |
additive | factor | |
^ (Citrus::SyntaxError) | |
Backtrace: | |
Citrus::File.parse at lib/citrus/file.rb:344 |
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
Starting Merb::Rack::Application | |
I, [2011-05-10T21:42:32.666475 #37025] INFO -- : worker=0 ready | |
E, [2011-05-10T21:43:51.915933 #37025] ERROR -- : Read error: #<Errno::EAGAIN: Resource temporarily unavailable - read(2) failed> | |
E, [2011-05-10T21:43:51.916346 #37025] ERROR -- : kernel/common/io.rb:1588:in `sysread' | |
kernel/common/io.rb:1428:in `readpartial' | |
/Users/xavierlange/code/tureus/gems/rbx/1.8/gems/unicorn-1.1.2/lib/unicorn/http_request.rb:58:in `read' | |
/Users/xavierlange/code/tureus/gems/rbx/1.8/gems/unicorn-1.1.2/lib/unicorn.rb:642:in `process_client' | |
/Users/xavierlange/code/tureus/gems/rbx/1.8/gems/unicorn-1.1.2/lib/unicorn.rb:715:in `worker_loop' | |
kernel/bootstrap/array.rb:76:in `each' | |
/Users/xavierlange/code/tureus/gems/rbx/1.8/gems/unicorn-1.1.2/lib/unicorn.rb:713:in `worker_loop' |
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
I, [2011-05-09T09:50:00.244161 #4129] INFO -- : listening on addr=0.0.0.0:4000 fd=14 | |
I, [2011-05-09T09:50:00.246981 #4129] INFO -- : worker=0 spawning... | |
I, [2011-05-09T09:50:00.256592 #4129] INFO -- : master process ready | |
I, [2011-05-09T09:50:00.261433 #4170] INFO -- : worker=0 spawned pid=4170 | |
I, [2011-05-09T09:50:00.269369 #4170] INFO -- : Refreshing Gem list | |
Loading init file from ./config/init.rb | |
Loading ./config/environments/development.rb | |
Logging to file at ./log/development.log | |
Starting Merb::Rack::Application | |
I, [2011-05-09T09:50:06.564459 #4170] INFO -- : worker=0 ready |
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
import System.Environment | |
import Network.Socket | |
main :: IO() | |
main = do | |
args <- getArgs | |
startNetworkStuff args | |
startNetworkStuff ["publish", target, port, msg] = do | |
publish target port msg |
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
source :gemcutter | |
gem "extlib" | |
gem "erubis" | |
git "git://github.com/xrl/merb.git" do | |
gem "merb-core", :require => nil | |
end |
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
IDLGEN=rtiddsgen | |
IDLGEN_FLAGS=-d generated/ -language C -replace -I idl/ | |
IDL=$(wildcard idl/*.idl) | |
CFLAGS=-std=c99 -Wall -Werror -DRTI_LINUX -DRTI_UNIX -I/usr/local/include/ndds | |
LDFLAGS=-L/usr/local/lib -lnddscored -lnddscd -lrt -ldl | |
SRCS=$(wildcard *.c) | |
IDL_SRCS=$(patsubst idl/%.idl,generated/%.c,${IDL}) |
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
.SUFFIXES: .hs .o | |
SRCS=$(wildcard *.hs) | |
OBJS=$(patsubst %.hs,%.o,${SRCS}) | |
GHC_FLAGS=-O2 --make | |
%.o: %.hs | |
ghc ${GHC_FLAGS} $< | |
.PHONY: all |
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
removeNewLines = filter (/= '\n') | |
applyToFile filename = do | |
contents <- readFile filename | |
return (removeNewLines contents) | |
main :: IO () | |
main = do | |
putStrLn (applyToFile "prob7.txt") |
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
module Flatten where | |
data NestedList a = Elem a | List [NestedList a] | |
flatten :: NestedList a -> [a] | |
flatten (Elem x) = [x] | |
flatten (List x) = concatMap flatten x |