230 points · by type0 · 3y ago · 60 comments
Add support for bundle gem --ext=rust command.
Cool to see support for writing extension gems in Rust shipping with Ruby.This makes me so happy. Pattern matching is amazing, and I use find patterns quite extensively. And I’ll be even happier to run tests without RUBYOPT='-W0' moving forward.
Also great to see Regexp.timeout as well as the ability to initialize a Struct using kwargs without keyword_init: true.
Django feels like a loose set of tools. That could be bad or good. You have to take more architectural decisions, every project can end up with a very different structure. You can split it into sub applications each one with its own urls file, models, controllers and migrations. Tests lay in the same directory of code. The templating language is quite constrained and inflexible. The source of truth of the database are the models and I discorage using inheritance in models or you end up with a database that no other application will ever be able to understand, humans included. The ORM feels verbose. The admin tool is good. No tools for deployment, maybe docker? In general there is a feeling of overengineering everywhere as if it was designed to keep up with every possible use case.
Rails is more constrained, it's really on rails. Again, this can be both bad and good. Two projects will look the same except for those companies that adopt the services / commands / etc sub structure of the code and the ones that stick to the plain models directory, possibly lib. The source of truth of the db is the db and if you want to turn it into a tangle you have to do it yourself explicitly. The ORM is OK for the usual use cases. There is only one file for routing. Tests are in their own directory. The templating language is Ruby itself so you have one less thing to learn but in theory you can shoot in your foot and write your application there, but you can always find a way to shoot yourself even in Django. There is no standard admin tool, you have to pick one yourself so you usually end up without an admin tool unless the customer pays you for that. The traditional tools for deployment were Capistrano and Mina. Maybe docker now.
I made about the same amount of money from them in the past many years. I enjoyed more the weeks spent on Rails.
Imo
gg
I kind of moved away from Ruby right around the time Ractors were about to land and they looked really promising.
I was just curious if they ended up delivering much in the way of change and if not what the main problems were?
Ruby uses a lot of pure lazy memorization. That's an aspect I'd like to see more accepted. A system that enforces rather than recommends, is a less usable system.
I actually tried making the libs I maintain ractor compatible. I recorded the constraints and suggested removing some of fhe annoying ones. Some got accepted, but it's not enough.
True, but other languages/platforms have better built-in support for immutable data structures and don't force you to fight the standard library to implement a share-nothing approach.
There are occasional comments in GH issues discussing the possibility of implementing Ractors, but nothing material.
These names were really elegant, I wonder why they were removed. Searching the web, the only explanation I can find is they were removed because they were deprecated. So why were they deprecated?
Anyway, no big deal. Happy to see Ruby getting nicer and nicer every update.
YJIT compiles from Ruby VM bytecode straight to native code using a JIT technique called basic block versioning (which is slightly different from how JITs like V8 work because the unit of reuse is a basic block instead of a function).
There’s more information in these links:
https://youtube.com/watch?v=zO9_uTaELCw&feature=shares
https://shopify.engineering/yjit-just-in-time-compiler-cruby
It's a battle to ship linters amongst people who don't have CS degrees and express hostile disdain for any suggestions of software craftsmanship, much less curiosity.
They want to use their dumb patterns and bad habits, and aren't interested in changing.
Clojure 1.11.1
user=> (first [])
nil
user=> (first {})
nil
user=> (last [])
nil
user=> (last {})
nil
user=>