Skip to main content
Heartwarming lightning talk in winter Sapporo


                              a.k.a june29
http://www.flickr.com/photos/recompile_net/3736015552/


                                                        Taken by kei-s
Dosanko
Tested green
Ruby
Ruby
Sapporo

          Kaigi
Sapporo   Winter
Sapporo      Winter

Tera sweets
Tera sweets


Cocoa  http://www.flickr.com/photos/barl0w/3192038647/
Tera sweets   Chat
Cocoa
Ruby
    Chat
Cocoa
RubyCocoa
LimeChat for Mac
http://limechat.net/mac/ja.html
LimeChat on github




git clone git://github.com/psychs/limechat.git
limechat/ruby/view/log.rb


class LogController < NSObject
  def print(line, unit, use_keyword=true)
    body, key = build_body(line, unit, use_keyword)

    unless @loaded
      @lines << [line, unit, use_keyword]
      return key
    end

    s = ''
    s << %|<span class="time">#{h(line.time)}</span>| if line.time
    s << %|<span class="place">#{h(line.place)}</span>| if line.place

    # ... (     )...
  end
end
limechat/ruby/view/log.rb


def write_line(html, attrs)
  # ...(     )...


  doc = @view.mainFrame.DOMDocument
  return unless doc
  body = doc.body
  div = doc.createElement('div')
  div.setInnerHTML(html)
  attrs.each {|k,v| div.setAttribute__(k, v) } if attrs
  div.setAttribute__('id', "line#{@line_number}")
  body.appendChild(div)

  # ...(     )...
end
limechat/ruby/view/log.rb

  def initial_document
    # ...(     )...


      doc = <<-EOM
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html class="#{body_class}" #{body_attrs}>
        <head>
          <title>LimeChat Log</title>
          <style>#{DEFAULT_CSS}</style>
          <style><!-- #{style} --></style>
          <style>#{override_style}</style>
        </head>
        <body class="#{body_class}" #{body_attrs}></body>
        </html>
      EOM
end
LimeChat
LimeChat
<html>
  <body>
    <div>message</div>
    <div>message</div>
    <div>message</div>
    <div>message</div>

   ...

  </body>
</html>
LimeChat

Ruby
DOM
HTML
http://localhost:4567/#{nick}



     User icon
http://localhost:4567/june29
http://www.flickr.com/photos/tmaedax/3844412763/
mrkn
            tmaeda noplans          darashi
snoozer05
Ruby
 Sapporo        Winter

Tera sweets   Chat
                Kaigi
Cocoa
Heartwarming lightning talk in winter Sapporo


                              a.k.a june29