Archive for October, 2006

RubyConf: John Lamb: You’ve got your Ruby in my CLR

Sunday, October 22nd, 2006

I build a program for my child every year for his birthday.

For his second birthday I wrote a flash card app using Ruby and Avalon on .NET.

So I needed to connect Ruby to .NET.

So pragmatism and laziness lead me to build a bridge.

Marshaling of primitives like integers are easy. The devil is in the details.

I start at Microsoft in the CLR team in January. I’m going to work making dynamic languages run better on the CLR.

We want to take IronPythons work and try to apply it Ruby. Can IronPython’s method dispatch be generalized and applied to Ruby?

Will dynamic languages be used in five years to build business applications? We hope so. How?

Success is when the intersection between “What you WANT to do” and “What you ACTUALLY do” increases.

The goal is Happiness.

How does the Ruby.CLR bridge work.
dynamic methods in the CLR will allow other projects liek Ruby.NET to implement Polymorphic Inline Caching(PIC).
const_missing allows faulting in of new proxy classes.

method_missing allows creating of method shims when faulting.

http://www.rubyclr.org

http://www.iunknown.com

RubyConf: Koichi SASADA: YARV: on Rails?

Sunday, October 22nd, 2006

Caution (re-review)
I can’t speak English well.
If I say strange English, you can see the slide page.
If you have questions please ask in Japanese, Ruby, Python, Lisp, Smalltalk, or Haskell, not english.
I got a job! My office is at Akihabara. Otaku City.
Akiba-Kei – Please check this word on wikipedia.
An Assistant of The Univ. of Tokyo.

RubyKaigi 2006 – 200 tickets sold out in 300 hours (DHH and Matz were the keynote speakers)
RubyKaigi 2007 – Dave Thomas and Matz are expected to keynote.

Koichi showed a simple scaffold rails app on YARV.
Congrats Koichi.

YARV
Simple Stack Machine
Specific VM Instructions YARV Instructions
Compiler
Interpreter (VM)
Many Optimization techniques to improve performance.

http://www.atdot.net/yarb/

RubyPorgram -> Compiler -> YARV Instruction Seq-> VM(Execution)

Optimizations
Compile time optimization
Direct threaded code
Specialized instructions
Operands/Instructions Unifications
Inline (Method) cache
Static stack caching
Profiler
more …

YARV doesn’t improve text processing,

YARV can assemble and disassemble assembly instruction sequences.
Instruction Sequences can be serialized and deserialized.

YARV will have a Mutex Class, but Thread.critical will become UNSUPPORTED with YARV. This will require Thrad.critical users to change there code.
Default threading model will be non-parallel with a giant lock, this allow existing non thread safe or non reentrant c extensions to continue to work.

#yarv irc.freenode.net, but Koichi is always marked AWAY, use mailing list.

http://i.loveruby.net/autobuild/yarv

YARV lacks a Hook interface
Needs to catch up to current 1.9
JIT/AOT Compiler AOT has been started but it is incomplete.

Compare vs. x10, Fortless Fortress?, Chapel

http://www.atdot.net/yarv/rc2006_sasada_yarv_on_rails.pdf

RubConf: Streamlined: Justin Gehtland

Sunday, October 22nd, 2006

Streamlined: Quit Banging Rocks Together and Build Something
Admin and maintenance backends are repetative.

Streamline was built for our clients, based on our needs, to save our wrists. We know we’re a real project already because …. we are experiencing FUD. People say we’re a code generator, I’m here to clarify the FUD.

GOAL: Bring the declarative goodness of ActiveRecord to the view layer.

Scaffold suck, we need really good scaffolds, hence Streamlined.

Streamlined has a new look and feel called grail.

The fud exists because right now streamlined is kicked off as scripts/generate streamline. But really the generate script is just installing a plugin.

  • Sparklines is built in.
  • Pagination can be turned off.
  • Popup views are now included

The way that we manage relationships should be introspective and flexible.

Views are GENERIC. But you can define custom views for fields. The generic views are overridable.

The key factor in the architecture is that all the configuration of streamlined is done in ruby.

  • Columns of your CRUD can be included or excluded.
  • Streamlined is customizable on a per user basis.
  • Authorization, role based management is coming.
  • Model-specific behavior.
  • Layer-specific fields, fields can show up only in certain view such as edit but not show.
  • Visual configuration is coming christmas time.

streamlinedframework.org

gem install is coming this week

public svn is available.

Q: Will visual configuration write its data to the source code files
A: Yes

Q: Are you working on supporting Dr. Nicks magic models
A Not Yet, but we would really like to.

RubyConf: RejectConf Summary

Sunday, October 22nd, 2006

Reject Conf

No RSpec

Steven Baker
Why should you use RSpec.
Use RSpec if you want to, if you don’t, don’t.
10 Reasons why you shouldn’t use RSpec

  • 10 I was drunk when I wrote It
  • 9 Documentation is overratted, because
  • 8 Nobody ever flips the arguments to assert_equal
  • 7 Runing Testing::Unit provides for a perfect coffee break
  • 6 You like evaluating Mock frameworks.
  • 5 Tightly couplling your test to production code prevents anyone else from modifying it
  • RSpec helps teach BDD
  • 4 Testing state satifies the overriding need to micromanage every part of you life.
  • 3 The tests are already concide and precisely define some small piece of the software behavior
  • 2 Test that don’t read anything like English prevent customers from pointing out glaring errors in business logic.
  • 1 Explaing to new memebers of your team that you really can test something that doesn’t exit is a fun
  • 0 Nobody needs good stack traces anyways ( RSpecs

Testing implies verification. BDD Implies specification

That Microsoft Gal

  • The only reasons you should not buy Vista.
  • It has a sucky version of quicksilver.
  • Microsoft office Toolbars are gone they are now ribbons.
  • Review tab in word, you can translate into foriegn languages, and look up news on companies.
  • Microsoft Excel has graphs in individual cells. Excel has ODBC data sources.
  • Vista has Xgl and it has spotlight, and a dock.
  • Microsoft help can help your parents.

RSpec in unittest

  • I’m married to rails so I desided to embed RSpec into TestUnit and I support nested contexts.
  • RSpec SVN has nested contexts. Tear downs run from the inside out.
  • assert_kind_of gets blown-up into a full blown test or spec.
  • These can be put into a module and the module can be included in multiple contexts where the same behavior
  • Spec-unit.rubyforge.net it has
  • SimplyBDD
  • This is namespace safe and wont crash if the context is empty.

OS X Windows and RoR monkey patches

  • Resizes windows when you go from a big window at work to a smaller monitor at home.
  • Redirect emails during testing and stops leaking of emails during development.
  • chunky
  • array to hash, other things besides hash should have a to_hash
  • “maybe”.one_of “yes”, “no” returns “yes”

Eric Hodel

  • Refactor Your Tests
  • Add assertions
  • assert_empty
  • assert_tag
  • Fake URL Open, easier than mock and flack mock. Many mock frameworks are overkill.

Aaron Bedra

  • rock_solid_rails
  • rake rock_solid_rails deploy
  • I now have have a rails app
  • It will be a post deploy hook for capistano.

Charles Nutter

  • Sun and JRuby
  • Showed constructing a JFrame and a button in the frame from IRB.
  • Inplace ruby variable rename refactoring in netbeans.
  • Java readline library can be used in Ruby.

Tom Werner

  • Chronic
  • Uses Ranges of posibilities and then uses matches to associated parsed natural language tokens.
  • There is Perl
  • look at the Remind command programline
  • chronic.rubyforge.org

Ryan Davis

  • Heckle?
  • Jester Java bytecode manipulator for test verification.
  • Modifies the code under test changing branching logic return values etc.
  • Turns ifs into unlesses, a form of fuzzing for code.

Extremely halarious StarTrek parody based on Ruby, Python, and Smalltalk

GRATR

  • Graph algorithms on rubyforge.
  • Supports dotty (graphviz)
  • gratr.rubyforge.org port/fork of tgl

Rameau

  • Vaporware for this holiday season.
  • Literate Programing compendiums
  • Ruby needs a better mathematical number crunching support.
  • ATLAS and FFTW
  • FFTW has ruby bindings,
  • ATLAS does not bindings.

OpenID

  • Early cross site and single site sign-on
  • What is ID?
  • What is Digital ID?
  • Current use case, Submit User name, password, email address, verify reciept of email, wash, rinse, repeat.

RubyConf: Keynote The Return of the Bikeshed: Yukihiro “Matz” Matsumoto

Saturday, October 21st, 2006

Subtitle: Nuclear Plant in the Backyard

Tonight I’m goin to talk about the Bikeshed

Some people think that Ruby is a scripting language, and some think that Ruby is better than a scripting language.
Ruby is

  • a scripting language
  • a programming language
  • a lightweight language
  • a dynamic language.

Scripting is not a derogatory word in Japan, LL or Lightweight Language is very popular in Japan

Agile Manifesto 4 Values

  • Individuals and interactions
  • Working software
  • Customer collaboration
  • Responding to change.

Applied to languages.

  1. The Language design should focus on users
  2. The language should encourage readability
  3. The language should be expressive and helps communication
  4. The language should embrace changes and be dynamic

So I believe Ruby is Agile Language.

Ruby has the Good, Bad and Ugly

Good

  • Sweet Language
  • RoR
  • The Community
  • “Ruby People are Nice” says Martin Fowler

Ugly things

  1. eval.c
  2. parse.y

Bad things

  • Ruby2 vaporware
  • close to be the longest vaporware in the open source field Ruby2 is older than Parrot.

Do you know what bikeshed is?
Bikeshed is a easy problem.

People tend to argue about every little things that they know enough to do so

The Nuclear Plant is very important That can effect our lives, especially when some things go wrong
Its to comples

As a result w e spend mose of our times for unimporanat things

Leaving important things less discuessed.

Many want about the language to change.

  • string symbol
  • what #lines returns
  • remob

Some Consider Ruby as Fragile Language

Ruby 1.8 is good Enough.

  • We are not in hurry
  • Every idea has its own value.

So instead of arguing about bike sheads Accelerate them

Extreme Arguing

  • If arguing is good make things so easy that eveyone can argue about them.

Design Game

  • Gather wilde Weird Ideas.
  • Try to make Ruby the Best language ever
  • Shed light to undefinde dcorners of Ruby
  • Finally (if possible), document Ruby specification.

Rules of the Game

RCR – Ruby Change Record.

Ruby will stay to be Ruby

Not just vauge ideas

But with rationale analysis

Discussion on mailing lists
Ruby will stay to be Ruby

80-90% compatibility

Follows same philosophy that we love

Not just vague udea

hard to start concrete discussion

Hey, we need optional explicit typing in ruby.

But with rationale analysis

like Python Enhancement Proposal (PEP)

seems to be working well

Discussion on mailling list

mailing lists are more suitable for discussion

may utilize RCRarc as a starting point

mays set up new system to contraol TR

But Why(2)

I want to share fun of language

But Why(2)

  • Educate developers in the community.
  • I may be hit by a truck someday.

The deadline

Submission Deadline

  • Not fixed yet
  • May not be needed
  • thinging 2007-4-19
  • Like Perl6 RFC time.

What we Will do

  • Classify proposals
  • Good Bad and Ugly
  • 1.9 or 2.0
  • Implement them
  • Merge Them
  • Then we will implement some of them to investigate them.

    Some know proposals will be know as good and bad only after implementing them.

    We need the actual experience of implementing them to tell.

    If they are good we will merge them, or throw them

    If it doesn’t work out

    • No Problem
    • We will try something else

    See You Next Year

    • Hopefully with good news
    • Ruby 1.9.1 will be out Christmans 2007

    Slides will be at

    http://www.rubyist.net/~matz/slides/rc2006

    Q: Will this apply to core and the standard library
    A: Yes anything in the standard distribution, but primarily the core
    Q: How do we get up to speed on things that are already being implemented or discussed.
    A: Go look at the RCRarchive http://rcrchive.net/ We will create some wiki+mailing list solution.

    Q: Windows Vista Support? SymLinks will be added Will ruby support this.
    A: Yes the WIN32 maintainers may need a reminder, but yes.

    Q: As Ruby grows Large companies are having more interest, are you going to accomidate them?
    A: This design game is for the community we have now, I don’t have anything against companies and commercial.

    Q:If we are going to be agile we should have tests
    A:Was that a question?
    Q: Have you given any thought to giving 1.8 to someone else.
    A: I will stay involved in 1.8, but no new features will be added, so language design tasks will be minimal.

    Q: Chad Fowler How might the parse.y parser in 2.0 be not so ugly? I assume that YARV will replace the uglyness of eval.c
    A: I don’t know parsers are hard.
    Q: Ryan Davis Will you be open to changes to how the parser works which will make it easier to re-implment.
    A: Yes I’m open to suggestions, but parsers are hard to write. Harder than virtual machines.

    Q: With different impementations without a comprehensive test suite how worried are you about a fragmentation in the community.
    A: I don’t worry, I don’t have any trade mark on ruby. Its a competition. We might have several different VM’s, a fast one, a stable one, etc.
    Q: Do you have more room to go in terms of asthetics.
    A: I don’t know how much room we have to got to get to the best language. We will continue to polish or make drastic changes if we are further from the perfect language than we think we are.

    RubyConf: Speak My Language: Michael Granger

    Saturday, October 21st, 2006

    RubyConf: I18N, M17N, Unicode and All That: Tim Bray

    Saturday, October 21st, 2006

    Tim Bray’s RubyConf 2006 Unicode Talk

    Characters vs. Byte

    RubyConf: Web 2.0 Beyond the Browser: Richard Kilmer

    Saturday, October 21st, 2006

    There are draw back to centralizing things in a Web 2.0 App.

    Indi Architecture -

    • A Ruby-based desktop runtime
    • with a rails-based central service
    • uses amazon S3 storage service
    • flash for a user interface

    Ruby and all its extensions are compiled into one large static executable.

    • A executable for inid.app(Apple) indi.exe(win32)
    • inidiservice.db (.rb plug-ins, swfs, etc)
    • indi.db (user database)

    All this can fit on a flash drive.

    Freebase Plugins

    • context engines
    • Ontology Management
    • Context Management(an Object Database)
    • Access Control
    • Publish and Subscribe
    • Platform Management
    • Persistence
  • store
    • Catalog Sync’ing
    • Plug-in Purchase
    • fulfillment
  • lightning expedrience(UI)
    • Tag Manager
    • Desktop
    • AddressBook
    • Calendar
    • Calendar
    • Channel Manager
    • Form groups and share encrypted data
  • File Manager
  • Dialog Manager
  • Sound Manager
  • Stor Front
  • transmission manager ( to and from Amazon S3 )
    • Channel monitor
    • item transfer
    • binary transfer
    • The binary can be cleared off S3, and indi can later ask peers to repost binarys up to s3
  • getinidi.com + S3
  • patch manager
  • jabber service
  • web service
  • getindi.com
    • Rackspace
    • Apache
    • Mongrel
    • Postgres
      • Tom Copland wrote the postgres backend portion
      • uses S3 as a messaging server(placing a file on S3 indicates an event)
      • S3 does all the heavy deployment.
    • Flash User Interface
      • Native window wrapper
      • ActionStep Framework
      • OpenStep port to ActionScript 2.0
      • MTASC compiler(written in OCAML) to compile actionscript.
      • go see haxe.org
    • Alph bridged to Ruby
      • Synchronous from Ruby
      • Async from Flash
    • Delegates used for mocking.
    • Revolution is a plugin into Evolution
    • Alph.rubyforge.com

    RubyConf: Lightning Talks

    Saturday, October 21st, 2006
    1. Prototype Based Inheritance for ActiveRecord
    2. Ruby Queue – Ara T. Howard
    3. Shell-style History for IRB – http://blog.bleything.net/articles/2006/10/21/shell-style-history-for-irb
    4. Welcome to Community Wifi Cafe Listings – http://wifi.earthcode.com/
    5. Hoe – Ryan Davis (ZenSpider)
    6. win32/mmap for Ruby
    7. JRuby – Charles Nutter (SUN)
    8. I Saw the Sign
    9. Drive Capistrano(rails admin) from the web – www.highgroove.com
    10. FJSON – fast JSON for Ruby through C extension

    RubyConf: Rinda: Glenn Vanderburg

    Saturday, October 21st, 2006

    Rinda is much like Linda or JavaSpaces
    Rinda is more in the ruby spirit and uses DRb(Distributed Ruby).

    Whenever you take a new project and put into the world for the first time you find all kinds of bugs and areas for improvement. Rinda is no different.

    Rinda is a tuplespace.
    Rinda clients or peers can write tuples into the tuplespace and take tuples out through matching style queries.
    Tulpes can be requests to do some work or responses to the work.
    Rinda participants do not directly know about other peers who make requests and responses.
    Easy to scale, throw in more workers and the work gets done easier.

    Clients can also do read operations and subscribe to notifications.
    Take can block undefinitely or timeout.

    Rinda also provides a broadcast RingServer to lookup and find Rinda tuplespaces on the network.

    Rinda uses templates to match against candidate tuples present in the tuplespace.

    The first matching criteria is the tuple size.
    For each value in the template, the value is compared against the corresponding value in the candidate tuple.
    Wildcard machings are possible.
    If a tuple matches the template of a take operation that tuple is removed and returned.

    When using Rinda, you are designing a protocol.
    You need to think and document this “new protocol” you are designing

    • tuple formats
    • process roles
    • interaction patterns and rules
    • appropriate templates for each role and situations
    • evolution of the protocol

    Tuple most often require three generic parts

    1. Command or request name
    2. correlators (so you can tie requests/responses together)
    3. Associated data the arguments of the request or results of the response.

    Rinda tips:

    put variable-length items in their own arrays within the tuple, so that they are insulated from effecting the tuple size.
    Exploit === operator which is used by the compare operator in the take function.

    • Strings work well because you can us regexps
    • Numbers work well because you can match with ranges
    • Symbols and core classes don’t work as well because they don’t have rich triple equal operators

    Rinda is not well suited for synchronous communication, unless you use correlators very carefully and cleanup old tuples used to synchronize previous communications.

    Unlike RMI, DRb doesn’t have remote code loading. BEWARE. You as the programmer are responsible to make sure that the same version of custom classes are present on all participating nodes and that they have consistent versions.  This makes code upgrades more difficult.

    Rinda means you will have multiple processes.
    RingServers, TupleSpaces, and Various Rinda Clients

    Rinda makes possible construction of reliable systems out of unreliable parts.

    Pitfalls or Improvements

    • There needs to be a way to more explicitly specify what ring server and tuple spaces you are using especially in development and testing environments.
    • Drb needs unforgable object ids, encypted communication sessions.
    • There is no persistence support for the tuplespace
    • Rinda needs transactions