Eleanor McHugh wrote:
Among the ones that *are* still being developed and that are missing
from the list are:
* tinyrb (Marc-André Cournoyer's tiny Ruby-subset VM)
Hopefully this list will soon be joined by RubyGoLightly, my project
to port TinyRb from C to Go and then see where that leads. Anyone
interested in helping (or chucking stones) can find work in
progress at:
GitHub - feyeleanor/RubyGoLightly: An experimental port of TinyRb to Google go, both as a means of learning go and exploring alternate approaches to implementing Ruby. Work is currently focused on the GoLightly VM.
This looks very cool!
Now, if only tinyrb worked on Windows, Go worked on Windows and I
could overcome my deep-seated hatred against so-called "systems
programming languages"[1] and actually bring myself to learning the
damn thing.
Well I'm not holding my breath on Go making it to Windows anytime soon, but I hope I'm wrong.
I also share many of your feelings about "systems programming languages", compounded by the fact I spend a lot of time working on C codebases. Part of what I find appealing about Go is that it reads like a high-level language, that and the fact that it provides a decent native concurrency model.
Anyway, regarding your "see where that leads", I have a couple of
questions:
* Are you planning to use Go's garbage collector or provide your own?
Currently, tinyrb uses the Boehm-Demers-Weiser conservative
garbage collector (AFAIK anyway), which incidentally is also the
collector used by one of the two Go implementations. Marc-André
was considering switching to reference counting, which
incidentally is also what the *other* Go implementation is
planning on doing.
I'd like to phrase everything to leverage Go's garbage collection, the same way that JRuby uses the JVM's collector.
* Are you simply using Go as an implementation language, like, say,
tinyrb, MRI, YARV or Rubinius do or are you planning some sort of
interoperability between Go and Ruby as JRuby and IronRuby do or
even a very deep unification of the two languages like MacRuby and
MagLev?
As Go's still a bit of a moving target I'm initially looking at it as an implementation language, although supporting NaCl and other elements of Google's emerging software platform would be interesting.
* Are you planning on implementing Threads with Goroutines? What about
Fibers, Continuations?
It'll use Goroutines for both Threads and Fibers, and I'm interested in using the Go Iterator pattern to implement Ruby Enumerators.
Continuations should also be feasible, although a lot depends on how the VM's instruction set evolves and the
* Are you planning on surfacing the CSP/Pi-calculus style concurrency
of the Go runtime somehow in Ruby?
Whilst it'd be nice to have it's a very low priority - at least until there's a stable interpreter capable of passing all of TinyRb's tests.
* Are you planning anything at all, or just having fun? (-:
Well fun is a big part of it
However there's also a plan. Initially I want to get a codebase that compiles, makes reasonable use of Go's idioms, and passes TinyRb's tests. Once that milestone is hit I plan to experiment with the VM's instruction set and to start fleshing out the runtime, possibly with the intention of becoming a full-blown Ruby implementation (if there's a demand).
A high priority at that stage will be getting Ruby-FFI support so I can continue my low-level coding adventures
Ellie
Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
···
On 3 Dec 2009, at 11:30, Jörg W Mittag wrote:
On 2 Dec 2009, at 15:40, Jörg W Mittag wrote:
----
raise ArgumentError unless @reality.responds_to? :reason