Hey @shingara, just out of interest - why Go-lang ?
cheers Daniel! as an old C++ hand myself I can appreciate what theyāre trying to do with D. Just one question: Why D and not Go-lang?
Donāt want to troll Go lang, but this hit my Twitter feed the other day āI just donāt understand the point of Goā https://vagabond.github.io/rants/2015/06/05/a-year-with-go/
[quote=āAstonJ, post:23, topic:238, full:trueā]
Donāt want to troll Go lang, but this hit my Twitter feed the other day āI just donāt understand the point of Goā https://vagabond.github.io/rants/2015/06/05/a-year-with-go/
[/quote] Darn, Iām learning Go right nowā¦
what are your impressions with it? do you agree with that blog post?
Far be it from me to bad-mouth another language, but I can see where heās coming from.
Iāll agree with Andrew here (the writer of the blog post).
Go is fast, yes, but itās not fun to write a Go application. Yeah, you can get concurrence, but you get that in Erlang (and Elixir) as well, done way easier and more fun. You want to be close to metal? Write your code in C.
There is a reason why we write Ruby code. Itās because itās fun and we love it. Doing errors as part of the return value of a functionā¦ Not fun. And yep, that is actually what you have to do.
Letās say that a function func
can fail. In Go youād have to write something like:
err := func(param1, param2)
if err != nil {
log.Printf("Error in func: %+v", err)
}
Does that look like fun? How about:
begin
func(param1, param2)
rescue => e
puts "Error in func: #{e}"
end
and the thing I love about Ruby. "Oh, you want to wrap your entire method in a try-catch block? Sure, we have a shorthand for that.
We have a Go app running at work. Itās job is to sit before every other app as kind of a sidekick (Which is why we named it Sidekick) What it does is poke to the app on an endpoint. If the app responds, itāll add the appās endpoint to a hash which our reverse proxy (vulcand, another Go app created by the guys at Mailgun) can understand. It then pokes the app every other second and makes sure that the app is still alive. If the app dies, the sidekick removes it from the list of upstreams. That it. Thatās all it does - and itās still roughly 600 lines of code long!
thanks @Ohm, that sure is illuminating. I looked up Go a few months back I and I couldnāt see anything that attracted me to it. Itās a concurrent language, not a parallel(functional) one, like Erlang, Clojure, etc. If I need to do concurrent systems coding Iāll fall back to C/C++, thatās less overhead to me than learning a new language to do things I already know how to do.
As you point out, if it had a reasonable syntax and semantics I might consider it but it just seems to be the unholy offspring of a drunk one-night stand between C and Java, with Modula sitting in a corner taping the whole thing.
I havenāt seen anything that would make me interested in Go. From the things Iāve heard RUST is a more interesting language. Iāve read peoples testimonies of running into a Rails scaling problem and then doing it in Go. I think their decision was premature. Rails can scale just as well as any other service IMHO. In 2009 Greg Pollock released a Scaling Rails Series (Announcement). But in those testimonies it didnāt come across to me that people used Go because they liked it; they jumped ship to Go because it was the solution that seamed to work for them rather than adjusting their Rails environment.
And besides, to me D is pure as a language. Itās not the new shiny. Itās a language developed out of decades of experience from similar languages. A natural progression one might say. Itās like refining metal, you get the impurities out to get something pure.
I want learn go mostly in performance purpose. It seems the best choice to me in regard to the maturity and syntax. Ruby keep the best language I use. But sometimes a boost in performance can be good. But I agree writing a go app is really less fun than writing a ruby one.
cheers Daniel, I pretty much feel the same. Itās much more cost-effective to tweak Rails deployments for scalability than implement a solution in a whole new language. At the end of the day I can always fall-back to writing multi-threaded C extensions for any high-performance areas if need be.
I appreciate your comments on D. May be itās something I need to look at when I get a chance.
thanks @shingara, are you specifically writing high-performance apps (e.g. real-time analytics, etc.)or do you just need a performance boost for your standard apps?
No i donāt have this kind of application actually. and I donāt real performance issue. So i use only Ruby. I just want take a look to go in case of I really performance issue.
Call me crazy, but Iām yet to learn Rails, so yeah, I want to learn that, as well as Sinatra. As for things that arenāt ruby related, as Java and C++.
I want to learn how to build chatbots (if anyone can point me in the right direction Iād be really grateful )
Chatbots from scratch - or do you want to start with say Hubot as a framework?
From scratch, I figured that doing a chat app with rails 5 and action cable would pave the road nicely and then figure out the āsmart partā
Hubot looks interesting thanks for that.