Secondly, avoiding mutable state is a general, good advice,
which you can apply in your Ruby code. Ditching global state
and isolating it when you can’t avoid is also a really good
general advice.
As an Erlang programmer I agree with the general sentiment here, but wouldn't doing this in Ruby really lean hard on one of the pathologically nasty Ruby runtime issues? Which is that it doesn't release memory back to the system?
When every new operation on a data-structure starts by producing a copy of the previous version it seems like you'd really want a runtime which is efficient and intelligent about how it manages memory? Unless that idiosyncrasy of Ruby has changed since I last used it several years ago. In which case. Nevermind. :-)
Ruby's MRI never returns RAM to the kernel, yes. But if you use immutable data structures and release them relatively quickly, the GC will have much easier time releasing their memory back to the pool that MRI is using for allocating new ones. So the inevitable RAM bloat that MRI accumulates over time is still there, but is slowed down.
As far as my not-so-big experience with them goes, the immutability programming techniques in Ruby actually help a lot with its sticky RAM problem. Complex object hierarchies of mutable objects and references to them are a nightmare for the GC. Having structures/objects that are used and [quickly] thrown away without (or rarely) being attached to complex object graphs is making the GC work more reliably, and faster.
I like rails. A lot. The syntax is amazing. Period. If you can get a gem or get what you need from rails. It is simply close to amazing.
But dare you. You just go down one simple level. (first level is what you get with rails and for example extending active record.) it becomes a horrible mess of dependencies and magic / structures. I never found a framework so hard to modify. ( for example writing your own multi category / multi tag gem) That's when i stopped web dev. It was just mind boggling. This is several years ago. I think around version 3 or even 2? And every version broke the active record stuff... I really thought rails would catch on in germany. But if you look on indeed there are literally like five jobs in Germany... Maybe I'm not alone with that problem...
Rails is great. And of course it isn't and will never be perfect. Obviously the author would love some alternative frameworks, mainly so he can use some more and some less exotic code patterns. Maybe after almost a decade of writing CRUD apps in Rails he is a bit bored? I can't blame him and seeing the Ruby community so focused on basically one framework is a tiny bit sad.
So I definitely see where he is coming from with all this, but truth be told it was never Rails' indent to be a precision instrument. It has been a reliable framework that makes a lot of Developers very happy. A great reliable car for the masses so to speak. But not a Ferrari.
Although I may not agree with your perspective entirely, but I respect it.
I think everyone has different needs, and you have your personal needs which Rails no longer satisfies, so you are moving on. Rails still solves a lot of problems for a lot of people I believe. I work as a consultant for a few companies and in some cases I see people losing time and money on what would be resolved immediately if they had just made the right call by using Rails. Good luck on your journey, and remember the rails community will always have its door open for you :). Your projects on github look exciting, I will take a look at them. Very cool stuff!
Comments (438) 69 threads
Earlier commentsWhen every new operation on a data-structure starts by producing a copy of the previous version it seems like you'd really want a runtime which is efficient and intelligent about how it manages memory?
Unless that idiosyncrasy of Ruby has changed since I last used it several years ago. In which case. Nevermind. :-)
As far as my not-so-big experience with them goes, the immutability programming techniques in Ruby actually help a lot with its sticky RAM problem. Complex object hierarchies of mutable objects and references to them are a nightmare for the GC. Having structures/objects that are used and [quickly] thrown away without (or rarely) being attached to complex object graphs is making the GC work more reliably, and faster.
But dare you. You just go down one simple level. (first level is what you get with rails and for example extending active record.) it becomes a horrible mess of dependencies and magic / structures.
I never found a framework so hard to modify. ( for example writing your own multi category / multi tag gem)
That's when i stopped web dev. It was just mind boggling. This is several years ago. I think around version 3 or even 2? And every version broke the active record stuff...
I really thought rails would catch on in germany. But if you look on indeed there are literally like five jobs in Germany... Maybe I'm not alone with that problem...
So I definitely see where he is coming from with all this, but truth be told it was never Rails' indent to be a precision instrument. It has been a reliable framework that makes a lot of Developers very happy. A great reliable car for the masses so to speak. But not a Ferrari.
I think everyone has different needs, and you have your personal needs which Rails no longer satisfies, so you are moving on.
Rails still solves a lot of problems for a lot of people I believe. I work as a consultant for a few companies and in some cases I see people losing time and money on what would be resolved immediately if they had just made the right call by using Rails.
Good luck on your journey, and remember the rails community will always have its door open for you :). Your projects on github look exciting, I will take a look at them. Very cool stuff!
All comments shown.
Couldn't load more comments. Check your connection and try again.