github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

igrigorik / ruby2lolz

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 25
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

Ruby to Lolcode translator, kthnxbai. — Read more

  Cancel

http://www.igvita.com/2008/12/11/ruby-ast-for-fun-and-profit/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

convert readme to rdoc format 
igrigorik (author)
Sat Dec 12 13:28:33 -0800 2009
commit  76c2984433caed711f83
tree    8d130909eb3447235244
parent  5b1503634b857cf68cda
ruby2lolz /
name age
history
message
file README.rdoc Sat Dec 12 13:28:33 -0800 2009 convert readme to rdoc format [igrigorik]
file Rakefile Sat Dec 12 13:19:40 -0800 2009 Hash.to_lolz, Array.to_lolz, kthnx. [igrigorik]
file VERSION Sat Dec 12 13:12:30 -0800 2009 Version bump to 0.0.1 [igrigorik]
directory lib/ Sat Dec 12 13:19:40 -0800 2009 Hash.to_lolz, Array.to_lolz, kthnx. [igrigorik]
directory spec/ Sat Dec 12 13:19:40 -0800 2009 Hash.to_lolz, Array.to_lolz, kthnx. [igrigorik]
README.rdoc

Ruby2Lolz translates Ruby code into LOLCODE (www.lolcode.com)

  • www.igvita.com/2008/12/11/ruby-ast-for-fun-and-profit/

Translating Ruby Hash & Array:

  require 'ruby2lolz'
  # adds Hash.to_lolz, and Array.to_lolz

  puts {:nickname => [:ig, :igrigorik]}.to_lolz

  OH HAI
    I CAN HAS Nickname
       I CAN MANY HAZ
          AWSUM VAR
             ig
          KTHNX.
          AWSUM VAR
             igrigorik
          KTHNX.
      KTHNXBYE.
    KTHNX.
  KTHNXBYE.

Put some Lolz into your API

  • pastie.org/327494

Translating a class:

  class Simple
    def add(n1, n2)
      return n1 + n2
    end
  end

  Ruby2Lolz.translate(Simple, :add)

  HOW DUZ I HAZ add [YR n1, YR n2]
    (n1 + n2)
  IF U SAY SO
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Српски
  • Svenska
  • 中文