--001636164bdba9624f0476f2f723 Content-Type: text/plain; charset=ISO-8859-1 Charlie, Your Strange Loop talk compared examples in Ruby, Duby, and Surinx. It was interesting how the examples differed very little from each other. I wonder if automated translation between the three would be possible? Perhaps the only realistic direction would be from Duby/Surinx -> Ruby (e.g., removing type information). Also, have you documented the syntax differences somewhere, in case someone wanted to do a manual translation? dean On Tue, Oct 27, 2009 at 5:19 PM, Charles Oliver Nutter <headius / headius.com>wrote: > On Tue, Oct 27, 2009 at 5:13 PM, Bill Kelly <billk / cts.com> wrote: > > Wow! That Fibonacci example on > > http://kenai.com/projects/duby/pages/DubySamples > > is really neat, especially the return value inferencing. > > I would love it if ruby had something baked-in to the language that was > > so unobtrusive, so much like writing regular ruby, but which could > compile > > to fast static code. > > > > I've wondered to what degree such a thing might be possible, but I > > never realized it could really mirror regular ruby that closely. Very > cool. > > I'm very interested in adding optional static typing to JRuby, for > people that need it. Duby is, in a way, research into how this can be > done without damaging Ruby's syntax substantially. I think the > trade-offs so far in Duby are acceptable. > > Granted, some people will want to lynch me for even suggesting the > idea. But when you need static types, or the performance that can come > more easily from static types, it's nice to have without dropping to C > or Java. So it's worth exploring for Ruby, and JRuby is the Ruby I > know how to hack. > > > Is your system able to compile floating point operations down to > > primitives the way it does with fixnums? > > Yes, check the bench_fractal.duby benchmark in examples/. It's mostly > the same code as the Ruby version, but runs almost two OOM faster. > Heavy floating-point math. > > And I should make it clear....Duby is not a "statically typed Ruby". > It's a different language that co-opts Ruby's syntax and adds static > types and uses Java/JVM type system (though other backends are > possible). > > - Charlie > > -- Dean Wampler coauthor of "Programming Scala" (O'Reilly) - http://programmingscala.com twitter: @deanwampler, @chicagoscala Chicago-Area Scala Enthusiasts (CASE): - http://groups.google.com/group/chicagoscala - http://www.meetup.com/chicagoscala/ (Meetings) http://www.linkedin.com/in/deanwampler http://www.polyglotprogramming.com http://aquarium.rubyforge.org http://www.contract4j.org --001636164bdba9624f0476f2f723--