
Rooby: a Ruby-like object oriented language written in Go - type0
https://github.com/rooby-lang/rooby
======
Lazare
> Rooby is a Ruby-like object oriented language written in Go. You can think
> it as a simplified, compilable Ruby for now.

I have to ask, if your goal is "compilable Ruby", then...why not Crystal?
([https://crystal-lang.org/](https://crystal-lang.org/) ) Seems like it
accomplishes your goals, already exists, and is (as far as I know) stable and
well regarded.

Nothing wrong with reinventing the wheel, and you may have very compelling
reasons to write your own project. But it looks weird when there's already a
well-known project in this space and you don't compare yourself to it. How are
you better?

~~~
badpenny
I'd argue there's a lot wrong with reinventing the wheel. People don't seem to
care about the inevitable waste of programmer time and effort that comes with
introducing a new programming language or library, assuming it gains any
traction.

~~~
Lazare
> assuming it gains any traction.

There's little risk of that I think; even very strong and innovative languages
struggle to gain traction. It doesn't tend to happen by accident.

And let's not forget that writing your own ORM, compiler, programming
language, hardware driver, etc., (even blog engine!) is an _amazing_ way to
learn. But it is good to know whether a project is a hobby project to help
learn, or a serious project aimed at getting traction, or what.

~~~
alttab
>> But it is good to know whether a project is a hobby project to help learn,
or a serious project aimed at getting traction, or what.

Most programming projects start with the intention of the latter but usually
end up becoming the former.

~~~
kodo
I’m doing a (free) operating system (just a hobby, won’t be big and
professional like gnu)

Linus Torvalds 1991

~~~
alttab
Minecraft is another good example.

------
st0012
Hello, I'm the author of this project. Let me explain a few things:

1\. The goal of this project is to let people "Use Ruby-like syntax build Go-
like performant api servers".

2\. The "Ruby-like" means Ruby-like syntax because I am a Rubyist and I think
using Ruby to develop project is fast.

3\. Using golang is because I want to build a http server library upon go's
http package, which I think is a very good choice for writing api servers. And
of course I might use goroutine directly in the future.

4\. Making rooby compilable is just a feature I personally like.

5\. You can see this project as a experimental language for a relatively small
goal (see the first point above) + I like writing Go, then you won't be so
surprise why I created it and not using crystal instead.

6\. I really didn't expect rooby would gain so many traction, thanks for all
your opinions :)

~~~
fernly
I think you shoulda named it "Goby" \-- which is a real word for a cute l'il
fish.

[https://en.wikipedia.org/wiki/Goby](https://en.wikipedia.org/wiki/Goby)

------
blablabla123
Nice... reminds me of Mirah (formerly known as Duby). It's basically a
compiled Ruby, but abandoned since some time. 5 years ago it used to be the
fast alternative to JRuby on Google's App Engine. Together with the web
framework Dubious :D

------
skrebbel
I like the name and I hope the obligatory web framework will be called
"Rales".

~~~
h1d
Name is terrible, you can't tell your friend "I've started using Rooby",
response would be "good for you".

I suggest renaming before too late.

~~~
devmunchies
Should rename to Rubby.

~~~
joshmn
When I get bored I'll give into recruiter spam sometimes and take them up on a
phone call. I'd purposely pronounce Ruby as Rubby, and similar words. My
favorite was Mysqueel.

~~~
Jeremysr
Sounds like you may enjoy My Rails Blob:
[http://railsblob.blogspot.ca/2006/08/my-new-
blob.html](http://railsblob.blogspot.ca/2006/08/my-new-blob.html)

------
rubyfan
I see a lot of references to Crystal here and I would agree it is more mature
but has different goals to be sure. If you want a rubyish DSL for
microservices which can expose golang features and libraries then Crystal
isn't a suitable match. We have to assume the later is important.

It's like saying JRuby is a suitable replacement because it's fast and has
microservice libraries - it's not exactly what you want.

If the author is not planning to support rubyspec, monkey patching, runtime
magic, etc. then it looks like they are closer to delivering on their
objective.

~~~
st0012
Hello, I am the author of this project and I think you said what I think. I
won't support most of ruby's meta-programming magic for keeping rooby as
simple and performant as possible. Thanks for your explanation

~~~
rubyfan
Awesome, it looks really interesting.

------
chank
For all the people asking "Why not Crystal?". It seems to me like the creator
obtained a copy of the Go Interpreter
book([https://interpreterbook.com/](https://interpreterbook.com/)). Seems like
a fair bit of the code is reused here. Nothing wrong with that at all (if
true). After all its all under MIT License. Seems like a pet project more than
something the author expected to gain any attention (kind of like Linux
started out). Seems to me more like a ruby-like-coffeescript equivalent for
Go.

~~~
st0012
Haha, I did read that book before start this project, it's a very useful
material. But for now the project are far more complicated than the sample
project in that book, only lexer and parser remain similar.

BTW I also took "nand2tetris II" on coursera and read "Ruby under a
microscope" for this project.

~~~
mayoms
I think that you should be a bit more transparent about how much of Thorston's
ideas and code you are using in this project. You should probably give him
some attribution.

I also read that book, and have a toy language I've been building, basically
extending his ideas. I've looked through your code and much of is it nearly
verbatim from the book (including code in your 'vm', or the monkey 'eval'
package - it's not just the lexer/parser), though you (as I have), chose
different names, or organized things differently, and added new features.

Yes, you've extended his ideas much farther, but the core of 'rooby' is pretty
much the same as Thorston's language, 'monkey'.

Monkey is available with the MIT license, so it's fine what you've done. But,
having been through the book and pretty familiar with the Monkey code
(available for download here:
[https://interpreterbook.com/waiig_code_1.3.zip](https://interpreterbook.com/waiig_code_1.3.zip)),
I think it's disingenuous to say 'I read that book before this project..',
which seems to imply that it was inspiration, rather than original source
material.

On a positive note, it's a pretty cool version of Monkey.

~~~
st0012
The 'code' you read is similar, but the way they work are totally different.

Monkey is fundamentally a functional language, but rooby is totally an object
oriented language. And the compiler, vm's internal implementation and bytecode
spec, which are the 'core' of rooby, is not like monkey at all.

I would say I extended monkey's lexer and parser as rooby's. I feel sorry if I
didn't give enough credit to Thorston, I would add reference to his book in
readme. But the core is more a Ruby than monkey, so I don't think it's just an
"extension" of monkey.

Please read the commits and you'll know how much work I did to make rooby,
it's far more complicated than just "extend" monkey.

------
dagi3d
It would be interesting if it would include native Go features such goroutines
and channels

~~~
ryancouto
+++++ yes it would

------
marcoperaza
It might not matter much to the Ruby folks if it remains a hobby project, but
this probably violates the "Ruby" trademark.

~~~
calebclark
How about changing the name to Gooby?

~~~
type0
How about changing the name to Roobish?

~~~
weberc2
Rubish?

------
dplgk
Why not Guby or Gooby?

------
gareth_at_work
Seems like interop with Go could be its selling point. I wouldn't call it
gruby though, since it isn't Ruby-on-Go.

------
nik736
Crystal is years ahead and way better with an active community. What purpose
does Rooby serve?

~~~
cies
> What purpose does Rooby serve?

I don't know. I do know that many of these language projects are people's
hobby projects. They like to pick a language they either know'n'love or want
to get more proficient in.

------
nurettin
This would be huge if it passed at least some portion of the RubySpec

------
hamidr
So basically another elixir? I'm curious why Ruby? and why with Go?

~~~
skrebbel
I'm baffled as to why people keep insisting Elixir is "Ruby-like".

Is it just because they both have "def" and "puts"? Cause that's just about
where the similarities end :-)

~~~
latch
Agree. The language is different. The standard library is different. The
runtime is different. The last two quite substantially at that. JavaScript is
more like Ruby than Elixir is. I'm tempted to say Go and Jave are more Ruby
than Elixir is.

FWIW, I've been using elixir for about a year now, and I think it's fantastic.
I still use node & ruby for scripts (which can get complicated, but almost
always for one-offs and asynchronous processing), Go for anything I actively
want to share memory (though, started using Crystal, can't wait for threads),
and OpenResty for any web proxy/middleware stuff. But Elixir is now the lions
share for me and I find it fun and productive.

