8 ms·
Goby: A new Ruby-inspired language written in Go
- jwilliams 9y agoInteresting. The goal is "small and handy environment that mainly focusing on creating API servers or microservices". Having moved from Ruby to Go in the last year or two I'd be really interested in what language features they're pushing with that goal. I really enjoyed my work with Ruby, but I have found Golang pretty quick at these "backend" type work. On the back of this, I dug around a bit around for other transpilers to/from Golang. So far: - http://havelang.org/ http://havelang.org/ - https://github.com/jcla1/gisp https://github.com/jcla1/gisp - https://github.com/google/grumpy https://github.com/google/grumpy (Python to Go) - https://tardisgo.github.io/ https://tardisgo.github.io/ (Go to Hexe) - https://github.com/gopherjs/gopherjs https://github.com/gopherjs/gopherjs (Go to JavaScript) If there are any others, be keen to find out.
- singularity2001 9y agoEDIT: my bad, I saw 'bytecode' and wrongfully assumed goby is a compiled language https://github.com/goby-lang/goby/tree/master/compiler/bytecode https://github.com/goby-lang/goby/tree/master/compiler/bytec...
- lloeki 9y ago> this is not a transpiler though, it as a compiler. which makes it attractive, especially because Crystal is so very slow This is an interpreter, not a compiler. Crystal is a compiler and what makes it "slow" to compile is type inference but then it runs at native speed.
- smegel 9y ago> Tough thread What the heck's that??
- bshimmin 9y agoI think the word "tough" is an adjective here, modifying "thread/channel mechanism" - meaning something like "resilient" or "robust".
- anilgulecha 9y agoCrystal-lang has also been around with similar ruby syntax and features like green threads, and a larger standard library. Performance is at par with golang. http://crystal-lang.org http://crystal-lang.org PS: Notably, websocket support is still lacking in Goby.
- honewatson 9y agoCrystal is closer to C performance wise. The compiler is much slower than Go due to the aggresive type inference.
- theodorton 9y agoI believe this is partially due to the lack of incremental compilation, which is on the roadmap [0] for 1.0. The compiler itself builds in ~10 seconds. [1] [0]: https://github.com/crystal-lang/crystal/wiki/Roadmap https://github.com/crystal-lang/crystal/wiki/Roadmap [1]: https://crystal-lang.org/2015/12/24/the-future-of-crystal.html https://crystal-lang.org/2015/12/24/the-future-of-crystal.ht...
- abiox 9y agoat first glance it appears that goby runs on windows, which is pretty handy.
- varunramesh 9y agoAre threads both concurrent and parallel (like goroutines)? In other words can they be used to parallelize CPU-heavy computation?
- jerf 9y agoIf you care about CPU-heavy computation, you care about not using an interpreted language to do it, because if you pay a 10x performance penalty, that turns your 16-core machine back into an effective 1-core machine. (Apparent number mismatch to account for slowdowns and general amdahl's law.) And, with no offense intended to Goby, a brand new scripting language built on top of a language like Go (already ~2x-3x slower than C in general) could easily see performance penalties of 100x or 500x vs C. (Think logarithmic here.) Even Go, at 2x-3x slower than C, is already not a terribly great choice for true CPU-intensive loads. It's fast enough it can fit in some scenarios, but if you really start to ramp up you're going to want to switch to something else. Edit: Would someone like to explain what is wrong with the idea that people who care about CPU-heavy computation also need to care about the performance of the language they are using rather than just downmodding it? I find the idea that in one second, someone cares deeply enough about CPU performance to call their load "CPU-heavy" and want to learn how to use many cores to process it, but in the next second is oblivious to the issues of using languages that are very slow on the CPU to do the work, to be a very bizarre shape of concerns about performance. It's like someone asking how they can move ten tons of something from New York to LA as quickly as possible, but insisting that they will only use bicycles to do it. The fact that you may be able to work out a way to do it with only bicycles, even perhaps surprisingly quickly compared to what one's initial reaction may have been, isn't going to change the fact that it sure is weird how one moment you're concerned about doing it as quickly as possible and in the next moment completely oblivious to the performance consequences of the chosen tools.
- epidemian 9y ago> Would someone like to explain what is wrong with the idea that people who care about CPU-heavy computation also need to care about the performance of the language they are using rather than just downmodding it? I didn't downvote you, so i'm not sure, but maybe it was because of the condescending tone (assuming what they care about from a simple question and telling them what they should care for instead), aaand not answering their question about parallelism in the first place.
- nawfalhasan 9y agoUnless you explain the motivation behind yet another language, it's hard for people like me to like a new thing. How is it different from Ruby? Just concurrency support? How is it different from Go? Just ruby syntax? Is the language statically typed or dynamically? Additionally I would like to see some syntax examples at the start as well.
- lloeki 9y agoWhat? This is literally the first paragraph of README.md: Goby is an object-oriented interpreter language deeply inspired by Ruby as well as its core implementation by 100% pure Go. Moreover, it has standard libraries to several features such as the Plugin system. Note that we do not intend to reproduce whole of the honorable works of Ruby syntax/implementation/libraries. One of our goal is to provide web developers a sort of small and handy environment that mainly focusing on creating API servers or microservices. For this, Goby includes the following native features: - Tough thread/channel mechanism powered by Go's goroutine - Builtin high-performance HTTP server - Builtin database library (currently only support PostgreSQL adapter) - JSON support - Plugin system that can load existing Go packages dynamically (Only for Linux by now) - Accessing Go objects from Goby directly This makes it quite a match to do containerized things as a single binary || self-deploying Go apps[0] [0]: https://www.dotconferences.com/2016/10/kelsey-hightower-self-deploying-go-applications https://www.dotconferences.com/2016/10/kelsey-hightower-self...
- camus2 9y ago> This makes it quite a match to do containerized things as a single binary || self-deploying Go apps[0] How? it is still an interpreted language so one has to write scripts. It no less complicated than installing and running Python or Ruby itself.
- nawfalhasan 9y ago>One of our goal is to provide web developers a sort of small and handy environment that mainly focusing on creating API servers or microservices How does it explain the motivation behind creating another language? What were the reasons the developer/team behind goby thought existing languages/tools didnt help? My questions are also about how different goby vs ruby is, or goby vs go. I also question if the language is dynamically or statically typed, etc which are bare minimum I expect in introduction.
- learningcn 9y agoGo + Ruby -> Goby... 我总觉得哪里不对呢???
- kingwill101 9y agoWould be interesting if we could use it as a library from go
- st0012 9y agoSadly we can't. But you can use go library in Goby
- timercl 9y agosorry but the ruby community now has something called Elixir.
- devmunchies 9y agoErlang is not made for anything that is cpu intensive. It doesn't solve every problem. Thats the void I think Crystal is going to fill for Rubyists.
- czbond 9y agoI agree with you. Elixir can help in the web side of things but tasks/non-web in Elixir don't help. I really like Go's offering, but it gives me 4x the pain in developing a solution that ruby does (eg: parsing anything, etc). I would love to simply use a compiled, optimized ruby (like Crystal)
- oelmekki 9y agoThat's one of the reasons I migrated to Go instead of Elixir (plus, I love the idea of suddenly having system programming within reach). But doing so, I haven't explored deeply enough Elixir and Crystal. Would you say they each provide something, not related to taste, that Go doesn't have (or that Go is doing worse)?
- devmunchies 9y agoI'd compare Go to Crystal. Go is more mature and stable but crystal a little faster thanks to LLVM. Plus I like Crystal's syntax better. I've been contributing to the crystal ecosystem with some libs and use it for personal stuff but I use Go at work. Once Crystal hits 1.0 and has good parallelism then I think it could be used as a drop-in replacement for Go for most use cases.
- oelmekki 9y agoI see. Thanks for your insight!
- st0012 9y agoHi, I'm Stan, this project's creator. I will explain your questions later. But before that please check out our sample site (written in Goby): http://sample.goby-lang.org/ http://sample.goby-lang.org/ And our plugin system, which is Goby's coolest feature: https://goby-lang.gitbooks.io/goby/content/plugin-system.html https://goby-lang.gitbooks.io/goby/content/plugin-system.htm...
- cies 9y agoCongrats on the release! I have one question: why Go? I would have expected Rust I guess, or OCaml or something.
- st0012 9y agoThanks! I think Go does good work at concurrency support, so using it can save me a lot time dealing with concurrency. And in my opinion Go is simple to learn, which can make others contributing it more easily. For example, this is only my second Go project, and most of Goby contributors haven't written any Go code before (of course I spent some time guiding them). The last reason is that I think Go has a relatively big community and ecosystem. It'll be more easy for me to finding resources.
- oelmekki 9y agoCongratulation, and best wishes :) When things settle down, I would love to read an article from you about what it's like to launch a new programming language by the end of the 2010s. I'm under the impression that adoption is going way faster than in previous decade, when php, java and C/C++ were kings hard to revoke. But there's still a gap of few years between initial announcement of a language and it being used in the wild - which is quite understandable, because people want to be sure the language will stick around before writing production code with it. I would love to know what you do during those years, how you grow your language, how you simply manage to use it at work, or for your own projects. If you could write such article, that would be awesome :)
- st0012 9y ago
- knodi 9y agoCan this be used in a Go app as a plugin/scripting lang?
- st0012 9y agoGoby does reverse, using Go package as plugin. See: https://goby-lang.gitbooks.io/goby/content/plugin-system.html https://goby-lang.gitbooks.io/goby/content/plugin-system.htm...
- kazinator 9y agoJust call it "Gouldby". That's an English surname, and can be short or "Go would be Ruby". (Which doesn't entirely make sense, but names don't entirely have to!)