Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Smalltalk On Rubinius

Smalltalk On Rubinius

Konstantin Haase

September 17, 2011
Tweet

More Decks by Konstantin Haase

Other Decks in Technology

Transcript

  1. "When you don't create things, you become defined by your

    tastes rather than ability. Your tastes only narrow and exclude people. So create." why the lucky stiff
  2. About programming languages: "I don’t like any of them, and

    I don’t think any of them are suitable for the real programming problems of today, whether for systems or for end-users" Alan Kay
  3. Textmate version = 2 ifTrue: [ 'no way' ] ifFalse:

    [ 'thought so' ] if Textmate.version == 2 "no way" else "thought so" end
  4. Smalltalk claims to look like: 'English'. Judge yourself. Does it.

    Ruby.claims.to.look. like "English" Judge.yourself; Does.it?
  5. " from Reak.AST.Self " grammar: g [ ^ g str:

    'self' ] # from Reak::AST::Return def bootstrap_grammar(g) g.seq "^", :sp, g.t(:expression) end
  6. $ rbx compile -B -e 'puts "Hello World"' 0000: push_self

    0001: push_literal "Hello World" 0003: allow_private 0004: send_stack :puts, 1
  7. $ rbx compile -B -e 'puts "Hello World"' 0000: push_self

    0001: push_literal "Hello World" 0003: allow_private 0004: send_stack :puts, 1
  8. $ rbx compile -B -e 'puts "Hello World"' 0000: push_self

    0001: push_literal "Hello World" 0003: allow_private 0004: send_stack :puts, 1
  9. $ rbx compile -B -e 'puts "Hello World"' 0000: push_self

    0001: push_literal "Hello World" 0003: allow_private 0004: send_stack :puts, 1
  10. $ rbx compile -B -e 'puts "Hello World"' 0000: push_self

    0001: push_literal "Hello World" 0003: allow_private 0004: send_stack :puts, 1
  11. class Object dynamic_method(:display) do |g| g.push_self g.push_local(0) # first argument

    g.send(:puts, 1, true) g.ret end end display "Hello World"
  12. Reak.AST.Base subclass: #Cascade [ Reak.AST.Expression push: self. bytecode: g [

    g pushSelf. cascadedSends do: [:send | g dup. send bytecode: g. g pop ]. lastSend bytecode: g. ] ]