Search Results

Search found 4 results on 1 pages for 'cartoonfox'.

Page 1/1 | 1 

  • programmatically controlling power sockets in the UK

    - by cartoonfox
    It's very simple. I want to plug a lamp into the UK mains supply. I want to be able to power it on and off from software - say from serial port commands, or by running a command-line or something I can get to from ruby or Java. I see lots written about how to do this with X10 with American power systems - but has anybody actually tried doing this in the UK? If you got this working: 1) Exactly what hardware did you use? 2) How do you control it from software? Thanks!

    Read the article

  • Why doesn't this code using the ruby-mbox gem parse mbox files?

    - by cartoonfox
    I installed ruby-mbox by doing gem install ruby-mbox Running this: #!/usr/bin/ruby require 'rubygems' require 'mbox' m = IO.read('test.eml') puts m.size m = Mbox.new(m) puts m produces this: 71309505 /Library/Ruby/Gems/1.8/gems/ruby-mbox-0.0.2/lib/mbox/mbox.rb:45:in `initialize': uninitialized constant Mbox::StringIO (NameError) from r.rb:7:in `new' from r.rb:7 I have proved that "m" is assigned a string containing the contents of the file, just before Mbox.new(m) is called. It looks as though the Mbox::StringIO should have been defined by hasn't been. What's going wrong here? Ruby version: ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] (That's the default ruby installed on OS X 10.6.6)

    Read the article

  • What quality, parser-generator options exist for ruby?

    - by cartoonfox
    What open source (preferably gem-based) parser-generator options do I have in Ruby? I've used (flex&bison)|(lex&yacc) from C in the past, and I'm comfortable with BNF-style specifications. I've heard of treetop, but it looks a bit alien and verbose compared to yacc... Purpose: I want to convert my text markup language to a BNF and generate the parsing code. I think it's a better strategy than my first-order solution: http://github.com/dafydd/semantictext/blob/master/lib/semantictext/rich_text_parser.rb

    Read the article

  • What grammar based parser-generator tools exist for ruby?

    - by cartoonfox
    What open source (preferably gem-based) parser-generator options do I have in Ruby? I've used (flex&bison)|(lex&yacc) from C in the past, and I'm comfortable with BNF-style specifications. I've heard of treetop, but it looks a bit alien and verbose compared to yacc... Purpose: I want to convert my text markup language to a BNF and generate the parsing code. I think it's a better strategy than my first-order solution: http://github.com/dafydd/semantictext/blob/master/lib/semantictext/rich_text_parser.rb

    Read the article

1