Skip to content

Instantly share code, notes, and snippets.

<center><h2>Livetext: A smart processor for text
</h2></center>
<p>
Livetext is simply a tool for transforming text from one format into another. The source file
has commands embedded in it, and the output is dependent on those commands.
<p>
Why is this special? It's very flexible, very extensible, and it's extensible <i>in Ruby</i>.
<p>
@Hal9000
Hal9000 / gist:28cfca6641c748fc7b98
Created August 31, 2015 16:04
Returning from a Proc versus a lambda...
# Posting to clarify...
# There is some misleading code in _The Ruby Way_ 3rd edition, section 11.2.5
# return inside a lambda (return from the enclosing context)
def call_lambda
code = lambda { return }
code.call
puts "Here we are!"
end
@Hal9000
Hal9000 / gist:1563600
Created January 5, 2012 03:41
Adhearsion fail - Ruby 1.9.2-p290 on OSX Lion: bundle exec rake -T
/Users/Hal/taylor/cc-adhearsion/vendor/bundle/gems/yard-0.7.4/lib/yard.rb:38: [BUG] Bus Error
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
-- control frame ----------
c:0021 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :callcc
c:0020 p:0080 s:0059 b:0059 l:001850 d:001850 TOP /Users/Hal/taylor/cc-adhearsion/vendor/bundle/gems/yard-0.7.4/lib/yard.rb:38
c:0019 p:---- s:0056 b:0056 l:000055 d:000055 FINISH
c:0018 p:---- s:0054 b:0054 l:000053 d:000053 CFUNC :require
c:0017 p:0289 s:0050 b:0050 l:0017b8 d:0017b8 TOP /Users/Hal/taylor/cc-adhearsion/Rakefile:30
c:0016 p:---- s:0048 b:0048 l:000047 d:000047 FINISH