Skip to content

Instantly share code, notes, and snippets.

@mernen
mernen / gist:39566
Created December 24, 2008 02:30
bashrc: colored and fairly compact PS1, and title
# colored prompt, with git support
PS1='\[\033[38m\]\u@\h \[\033[94m\]\W\[\033[95m\]$(__git_ps1)\[\033[37m\]$\[\033
[00m\] '
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%.local}: ${PWD/$HOME/~}\007"'
;;
*)
# Feeling Lispy?
number = 1234
(def method_missing m ,s ,*a ,&b
(s.send m ,*a ,&b) end)
# Ruby 1.8.6 w/ ActiveSupport
(puts (reverse (join (collect (in_groups_of (reverse (Array (chars (String number)))) ,3) ,&:join) ,",")))
# Ruby 1.8.7+, no ActiveSupport dependency
(in /home/daniel/Dev/rbx)
CC vm/primitives.cpp
In file included from vm/primitives.cpp:20:
vm/gen/primitives_glue.gen.cpp: In static member function ‘static bool rubinius::Primitives::accessvariable_allocate(rubinius::VM*, rubinius::Executable*, rubinius::Task*, rubinius::Message&)’:
vm/gen/primitives_glue.gen.cpp:17: error: jump to label ‘fail’
vm/gen/primitives_glue.gen.cpp:10: error: from here
vm/gen/primitives_glue.gen.cpp:12: error: crosses initialization of ‘rubinius::MethodContext* current’
vm/gen/primitives_glue.gen.cpp:17: error: jump to label ‘fail’
vm/gen/primitives_glue.gen.cpp:4: error: from here
vm/gen/primitives_glue.gen.cpp:12: error: crosses initialization of ‘rubinius::MethodContext* current’
diff --git a/vm/profiler.cpp b/vm/profiler.cpp
index 17353d2..05b13b6 100644
--- a/vm/profiler.cpp
+++ b/vm/profiler.cpp
@@ -19,8 +19,15 @@
#else
-#define current_time() ((uint64_t)clock())
-#define METHOD "clock"
@mernen
mernen / rake vm:test on Ubuntu 8.04 32-bit
Created August 7, 2008 14:25
Rubinius/cpp: rake vm:test on Ubuntu 8.04 32-bit
(in /home/daniel/Dev/rbx)
Running 472 tests......................................................
In TestChannel::test_receive_causes_event_block:
./vm/test/test_channel.hpp:106: Error: Assertion failed: chan->waiting->empty_p()
........................................................................................................................................................................
In TestInstructions::test_push_my_field:
vm/instructions.rb:659: Error: Expected (task->calculate_sp() == 0), found (1 != 0)
......................................................................................................
In TestNativeFunction::test_find_symbol_in_library:
./vm/test/test_nativefunction.hpp:66: Error: Assertion failed: ep
this program counts the letter
>,[>+++++
+++[-<------
--- ---
>]<
->+
<[>-<[-]]>[
<<+>>[-]]<,][
-]+ +++
++[- <++