Skip to content

Instantly share code, notes, and snippets.

@ananthakumaran
Created March 12, 2010 13:46
Show Gist options
  • Save ananthakumaran/330304 to your computer and use it in GitHub Desktop.
Save ananthakumaran/330304 to your computer and use it in GitHub Desktop.
class Language
attr_accessor :name, :influence
def initialize(name,influence)
@name = name
@influence = influence
end
end
assembly_language = Language.new("Assembly Language" , [])
lisp = Language.new("LISP",[])
prolog = Language.new("Prolog",[])
algol = Language.new("ALGOL" , [ assembly_language ])
cobol = Language.new("COBOL", [ assembly_language ])
fortran = Language.new("FORTRAN",[assembly_language])
cpl = Language.new("CPL",[algol])
pl_i = Language.new("PL/I",[algol,cobol,fortran])
basic = Language.new("BASIC",[fortran,algol])
pascal = Language.new("Pascal",[algol])
bcpl = Language.new("BCPL",[cpl])
b = Language.new("B",[bcpl,fortran,pl_i])
simula = Language.new("Simula",[algol])
business_basic = Language.new("Business BASIC" , [basic])
microsoft_basic = Language.new("Microsoft BASIC",[basic])
visual_basic = Language.new("Visual Basic",[microsoft_basic])
c = Language.new("C",[b,pascal])
go = Language.new("Go",[c])
smalltalk = Language.new("Smalltalk",[simula , lisp])
c_plus_plus = Language.new("C++",[c,smalltalk])
eiffel = Language.new("Eiffel",[c,smalltalk])
objective_c = Language.new("Objective C",[c,smalltalk])
perl = Language.new("Perl",[pascal,lisp])
self_ = Language.new("Self",[smalltalk])
the_actor_model = Language.new("The Actor Model",[smalltalk,simula])
java = Language.new("Java",[c_plus_plus])
scheme = Language.new("Scheme",[lisp,the_actor_model])
haskell = Language.new("Haskell",[scheme])
python = Language.new("Python",[perl ,java , haskell])
ruby = Language.new("Ruby",[eiffel,perl,scheme,python])
joule = Language.new("Joule",[the_actor_model])
c_sharp = Language.new("C#",[java,eiffel])
f_sharp = Language.new("F#",[c_sharp,haskell])
javascript = Language.new("JavaScript",[java,scheme,self_])
e = Language.new("E",[java,joule])
erlang = Language.new("Erlang",[prolog])
scala = Language.new("Scala",[java,haskell,erlang,scheme])
clojure = Language.new("Clojure",[lisp,haskell,erlang])
groovy = Language.new("Groovy",[ruby,objective_c])
ObjectSpace.each_object(Language) { |language|
language.influence.map { |influence|
puts "[#{influence.name}]^[#{language.name}]"
}
}
# http://yuml.me/diagram/scruffy/class/draw2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment