Live data from Hacker News

Existential crisis at Railsconf

railsbird.tumblr.com

161–168 of 168 posts

Re: Existential crisis at Railsconf

#161
post #141
post #132

Earlier quoted context omitted.

There's nothing about dynamic typing that prevents declaring types right? Because in Ruby you while you can extend an instance, you can not taketh away Types from it. IOW, Ruby could use the Scala syntax I wrote, and still be just as Dynamic. You're already constrained by how you use that type within your method. You're just not expressing it concisely since you have to read the method to understand the implicit Type…

Well, Ruby is duck-typed with dynamic/late dispatch, so method receivers are not known ahead of time. When I call `foo.bar`, it does a dynamic lookup in the class hierarchy at runtime to see which class implements the `bar` method, and the result can be changed at runtime. So although you could theoretically declare types in Ruby, it would just be documentation. You'll still get the type errors at runtime because the…

> You'll still get the type errors at runtime because there's no ahead-of-time typechecking happening.

That doesn't mean it's just documentation though. It could tell you that something is happening you didn't expect. Like passing a Role where you expected a User. (And if you wanted to operate on both interchangeably you shoulda put an interface on it.)

> The main type error you always have to worry about in both languages, though, is accidentally calling functions/methods on nil at runtime.

Agreed. Option/Maybe types FTW. The ?-operators sometimes presented as a solution feel very half-baked in comparison (they don't return a new type so just because you remembered to use it on line 10 doesn't mean anything to lines 20, 37 and 82).

Re: Existential crisis at Railsconf

#162
post #19

Forget rails. Move to Django ;)

Django has basically the same architecture as Rails, so it's really in the same boat from that point of view.

Not really the same architecture. It has it own differences and has much less magic involved. The project direction and the community is determined more by the community and not by a BDFL.

Re: Existential crisis at Railsconf

#163
post #28

Earlier quoted context omitted.

Minus the security issues.

And equally bad at concurrency.

It is not very difficult to plug in gevent/tornado/twisted with Django and deal with it in a pretty effective way. Also, most the resource memory intensive tasks are delegated to celery anyways.

Re: Existential crisis at Railsconf

#164

Earlier quoted context omitted.

I don't buy this, having written and dealt with a lot of concurrent Django apps - I think people read something about the GIL often, and don't understand what the articles are really meaning. Basically Django is usually fronted with mod_wsgi and you use celery for backend tasks. The multiple requests part are dealt with because the web server pre-forks, and it's just fine with it. I think Django's problem is it moves…

It's speeding up development lately, 1.8 came out rather fast but it seems like the Django team likes to have ~1 year development cycle.

Exactly, the development pace has been amazing and it is going in the right direction.

Re: Existential crisis at Railsconf

#165
post #160

Earlier quoted context omitted.

>> ...it's hard for me to even consider the idea of Javascript being in the same category as Ruby. Indeed. I think anyone would agree...they were not built for the same purpose; however, let's set some expectations here. As it relates to backend JSON APIs, what is better about Ruby/Bundler? >> Ruby was designed from scratch to be a perfect...dream OK, that's fine. Though, I've never heard of a proven perfect language…

> Please, no book, but I would be happy to read one concrete example of why Ruby/Bundler is substantially better hands down. One illustrative example might be the existance of Celluloid. The idea that you as a developer of Ruby apps can swap out the I/O system to something that's arguable better than what what the default style is. The reason Javascript can't do that is because it doesn't have synchronous I/O, nor mu…

> Haha, I'm actually also a Haskell programmer...building a C compiler in Haskell as my secret plot to take over the world.

Haha; I got a kick out of reading that. Nice!

> I have a sideproject that's a REST API in Haskell as well, but I'm not 100% convinced yet that Haskell is right for that.

I'd be interested in what you are finding there. I have been wondering if I should start moving toward Haskell or Erlang/Elixir. So far, I've spend much more time with Erlang and Elixir and I'm liking it.

What has given you grief on the Haskell side?

> Easy proofs for Haskell superiority...

Wow! I had no idea Haskell was so flexible. Perhaps I really should spend a bit more time there. I've never read anywhere else about this level of flexibility in Haskell.

If nothing else, this conversation was well worth it just for that...thanks :)

Re: Existential crisis at Railsconf

#166
post #160

Earlier quoted context omitted.

> Please, no book, but I would be happy to read one concrete example of why Ruby/Bundler is substantially better hands down. One illustrative example might be the existance of Celluloid. The idea that you as a developer of Ruby apps can swap out the I/O system to something that's arguable better than what what the default style is. The reason Javascript can't do that is because it doesn't have synchronous I/O, nor mu…

> Haha, I'm actually also a Haskell programmer...building a C compiler in Haskell as my secret plot to take over the world. Haha; I got a kick out of reading that. Nice! > I have a sideproject that's a REST API in Haskell as well, but I'm not 100% convinced yet that Haskell is right for that. I'd be interested in what you are finding there. I have been wondering if I should start moving toward Haskell or Erlang/Elixi…

> I have been wondering if I should start moving toward Haskell or Erlang/Elixir. So far, I've spend much more time with Erlang and Elixir and I'm liking it.

I wouldn't know about that, I only took a glance at Erlang, didn't really like the syntax but Elixir seems really pretty (Rubyist speaking of course ;)). I'm also a bit put off by how Erlang has distributedness integrated in its language, I didn't really try it out so take this with a grain of salt, but I have the feeling that it makes it more of a domain specific language, and it perhaps would be in the way of generic programming. I also had to deal a lot with a misbehaving RabbitMQ at work, so I might have channeled my incompetence into a opinion of Erlang :P

> What has given you grief on the Haskell side?

Well, both web projects I did using the Scotty framework, which I adore. The first was a web adaptation of a school project, you can take a look here[0], I like that a lot. But the second project was a docker container provisioning tool, and it had to do a bunch of stream processing and such. It's not that the libraries are bad, but there's a lot of research being done and there's 5 different popular I/O stream libraries, with various amounts of super high level abstractions, it just slowed me down a lot having to research all of it and dealing with some really high level Haskell.

That's one down side of Haskell. There's an easy way to do things, with nice pure functions and a I/O monad here and there. And there's the hard way of Haskell with monad transformers and generic type classes and what have you. You can easily avoid the hard stuff, but if you get sucked in you'll feel like a total dumbass and it'll cost you time and motivation :P

> If nothing else, this conversation was well worth it just for that...thanks :)

No problem, thanks for making me back up my ludicrous opinions ;)

0] https://github.com/tinco/Ergo/blob/master/scotty.hs

Re: Existential crisis at Railsconf

#167
post #77

As someone who's done the bulk of the work for Action Cable, I wanted to clear the confusion re: cable and eventmachine. Cable is currently using EventMachine because it uses faye-websocket for dealing with websockets. And Faye is one of the very few well maintained ruby library dealing with websockets. And in fact, Action Cable uses Celluloid threadpool to run all the application code in threads. So the model is a c…

When I was building live relation system faye server has problem to accept more that 1k simultaneous connections. For nodejs it can accept about 30k simultaneous connections. Did you do some stress test with more that 1k connections?

Re: Existential crisis at Railsconf

#168
post #73

Earlier quoted context omitted.

PHP -> Rails -> Node

That's what everyone predicted half a decade ago, yet it hasn't happened, not even the PHP death part. The relationships between these technologies have not really changed dramatically for the past 10 years. For example: http://www.indeed.com/jobtrends?q=php%2C+javascript%2C+ruby%... http://www.indeed.com/jobtrends?q=php%2C+node.js%2C+ruby%2C+...

As a brand new Rails developer/web developer altogether, I'm an outsider looking. But it feels to me the chants of "Rails is doomed" mirror that of "PHP is doomed". Yet as you state (and show in your links) PHP is still very healthy and nowhere near death. Sure it might not be the hottest thing on the block, but really JS won't remain the hottest thing on the block in 20 years either, but JS won't die. Neither will Rails. Rails might not the new scorching hotness that it was in 2006, but it's still plenty hot. Rails has quite a bit of life left in it.
Post reply on HN