Skip to content

Instantly share code, notes, and snippets.

View xxx's full-sized avatar

Michael Dungan xxx

View GitHub Profile
#!/usr/bin/env ruby
1.upto(256) do |n|
puts "#{n}: \e[38;5;#{n}mcool\e[0m"
end
SHELL=/bin/sh
CC=clang
SOURCES=hashcode.c
OBJECTS=hashcode.o
LIBFILE=libhashcode.so
LIBVERSION=0
SHARED=$(LIBFILE).0.0.1
LINKS=$(LIBFILE) $(LIBFILE).$(LIBVERSION)
CC_OBJECTS_OPTS=-c -fPIC -O3 -Wall -Werror -pedantic-errors -std=c99
parser = File.open(outfile.path) { |f| LPC::Parser.new(f) }
return_val = parser.translation_unit
tokens = parser.input
tree = return_val.tree
# Everything is OK up to here.
user system total real
Search #0 (rand): no_match #compares=20
Search #1 (rand): no_match #compares=20
Search #2 (know): match #compares=17
Search #3 (rand): no_match #compares=20
Search #4 (rand): no_match #compares=20
Search #5 (rand): no_match #compares=20
Search #6 (know): match #compares=17
Search #7 (know): match #compares=20
Search #8 (rand): no_match #compares=20
Processing: /Users/mpd/corpus/pd
Found 002_text_document.gif
Found 004_spreadsheet_document.gif
Found 008_presentation_document.gif
Found 009_presentation_document.gif
Found 012_html_document.gif
Found 016_template.gif
Found 02_waxingcrescent_openc_01.gif
Found 05_fullmoon_openclipart_01.gif
Found 06_waninggibbous_opencl_01.gif
$ ruby treedumper.rb
/usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:122:in `define_nodes': undefined method `node_number' for #<ANTLR3::DOT::TreeGenerator:0x2d1ab058> (NoMethodError)
from /usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:110:in `to_dot'
from /usr/home/pope/.rvm/gems/ruby-1.8.7-p248/gems/antlr3-1.8.5/lib/antlr3/dot.rb:93:in `generate'
from treedumper.rb:9
$ ruby LPCParser.rb --rule=translation_unit < foobar.c
waiting for incoming connection on port 49100
Accepted connection from 127.0.0.1:28694
/usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/debug/socket.rb:51:in `handshake': uninitialized constant Socket::SOL_TCP (NameError)
from /usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/debug.rb:160:in `initialize'
from /usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/modes/ast-builder.rb:21:in `initialize'
from LPCParser.rb:183:in `initialize'
from /usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/main.rb:458:in `new'
from /usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/main.rb:458:in `recognize'
from /usr/home/pope/.rvm/gems/ruby-1.9.2-p136/gems/antlr3-1.8.5/lib/antlr3/main.rb:162:in `execute'
$ bin/rbx -v
ERROR: unable to find runtime directory
Rubinius was configured to find the runtime directory at:
/usr/home/pope/rbx/runtime
but that directory does not exist.
Set the environment variable RBX_RUNTIME to the location
/def -w'edge' -p3 -P1BCgray3;2BCrgb510;3BCgray6 -F -mregexp \
-t'^(?:> )?(@(?:|VP@|Directors@)) (\w+:?) (.*)$' wizline = \
/substitute -aCrgb012 $(/time) %{*}
@xxx
xxx / gist:760476
Created December 30, 2010 23:23
rbx build log
LLVM inclusion enabled.
(in /usr/home/pope/git-sources/rubinius)
** Invoke vm/.depends.mf (first_time)
** Invoke vm/agent.hpp (first_time, not_needed)
** Invoke vm/agent_components.hpp (first_time, not_needed)
** Invoke vm/arguments.hpp (first_time, not_needed)
** Invoke vm/async_message.hpp (first_time, not_needed)
** Invoke vm/bytecode_verification.hpp (first_time, not_needed)
** Invoke vm/call_frame.hpp (first_time, not_needed)