8 ms·
Ruby 3.3 on Rails 1.0
- kichik 3y agoThat was a fun read. You should do Rails 8.0 on Ruby 1.8 next.
- latortuga 3y agoIn theory this is a funny idea but I think it would be a huge waste of time. Ruby syntax has changed and added so much since since 1.8 that you'd be stuck fixing thousands of syntax errors.
- Alifatisk 3y agoThere is a polyfill gem that allows older Ruby versions access the newer stuff, wouldn’t that help?
- caseyohara 3y agoPolyfill libraries can provide methods that were added in newer versions of the language (e.g. to std lib classes), but they can't provide the new syntax that has been added. Ruby has had a lot of syntax changes over the years that are incompatible with an older interpreter. An easy example is the 1.9 shorthand hash syntax for symbol keys `{ name: "pants" }` instead of the hashrocket syntax `{ :name => "pants" }`. More recent examples would be keyword args or pattern matching.
- lambdaba 3y agoIf the author reads this, I think you shouldn't bind space to the side menu, I (hope) many people know you can scroll with space.
- anamexis 3y agoI don't know if they fixed it really quickly, but space does the normal scrolling for me, on Chrome and Safari.
- andrewmutz 3y agoI dont experience that. Perhaps you pressed tab once beforehand to focus the menu?
- lambdaba 3y agoah, yes, but since there's no focus indicator it's not obvious
- nightpool 3y agoLooks like it has a focus indicator to me, although I can see why it might be confusing: https://imgur.com/a/Mc6A7Dn https://imgur.com/a/Mc6A7Dn
- lambdaba 3y agoYeah, I guess I pressed tab right away and thought it was the design of the button. I think it's better to keep the focus style as the default outline, and uniform.
- deleted 3y ago[deleted]
- alberth 3y agoRegression testing. It'd be a nice regression test to have: - Rails pegged at a particular version number and test the runtimes. - Ruby runtime pegged at a particular version and test Rails versions
- semiquaver 3y agoThe rails team already does the latter, subject to their specified compatibility matrix. Current rails requires Ruby 3.1, so CI only runs on that version and later. https://buildkite.com/rails/rails/builds/103981 https://buildkite.com/rails/rails/builds/103981
- lloeki 3y agoHold my refreshing beverage https://github.com/lloeki/minimal-rack https://github.com/lloeki/minimal-rack {rack 1 2 3, rails 3.2-7.1, sinatra 1 2 3, grape} x {ruby 2.1-3.3} x {puma, thin, webrick, ...}
- wavemode 3y agoAs much as people complain about Python, Ruby really went through just as much (if not more) churn over the years from backwards-incompatible changes.
- deleted 3y ago[deleted]
- fny 3y agoBut it was done slowly enough not to piss anyone off.
- tonyedgecombe 3y agoThe transition to Python 3 took a very long time. I often wonder if they would have saved themselves a ton of grief if they had done it quicker.
- 0x457 3y agoThat's not what they meant. Ruby made breaking change by breaking change, and it was still easy to have gems work with both ABI versions. Python 3 had changes that made it necessary challenging to support both, all while being slower (IIRC).
- formerly_proven 3y agoRuby is used a lot less so the base population of people able to complain is much smaller.
- peteforde 3y agoIt's used less but those who use it mysteriously make a lot more money. I know which group I'm happy to be a part of.
- multiplegeorges 3y agoI had the opposite conclusion. This seems like a pretty minimal set of changes to get a 19 year old piece of software running.
- renewiltord 3y agoHaha, this is really cool. And if I'm honest, very often it'll be a blog post like this that will solve some other issue I'm encountering. Thank you!
- W3cUYxYwmXb5c 3y agoRoR was cool way back when, but these days I'm much happier using nodejs with a framework like Adonis
- zilti 3y agoI don't get people who voluntarily use JS outside a browser. I'd rather jump into a pit filled with rusty spikes.
- rfw300 3y agoThat’s fair, but TypeScript coupled with modern JS dev tooling makes it actually a pretty palatable experience these days. Speaking as someone who used to want to jump into pits for JavaScript-related reasons.
- peteforde 3y agoIsn't that the difference, though? People who legitimately love Rails because of how productive they are, versus "pretty palatable". It's wild how people insist on using less-good tooling because that's what they've heard they are supposed to do... and that that's as good as they are going to get. It's not!
- tomca32 3y agoOoof...I'm not honestly. I don't do Rails that much these days but when I do it's just crazy how productive I can be. I think it's still a great fit for a huge number of web applications. If performance is very important there are better options like Rust or Go, but otherwise RoR is my go to. Pretty much everything you need is baked into the framework and it's still being actively developed. Some of the new stuff is pretty great like Turbo frames and streams. I respect that you enjoy working in Nodejs but Nodejs frameworks are just so barebones in my experience. I haven't tried Adonis but I still remember when I was looking how to parse query params in Koa. The official docs said to use a third party lib or regex them yourself from the request string...like why would I even use a framework at that point?
- 3y ago
- cortesoft 3y agoI remember starting on Rails 0.8, where migrations were just sql files you ran
- cybrox 3y agoWhere we're going, we don't need any rollbacks!
- buffington 3y agoDidn't most people use ant to deploy back then? I think it was a Java build tool or something? I feel like I should know this better - the maintainer of ant was actually working for us at the time, deploying early Rails apps using ant. I just remember deciding right then and there that I very much preferred writing code over troubleshooting deploys (and what we now call "devops").
- cortesoft 3y agoI don't know about ant... we were using Capistrano back then.
- buffington 3y agoI do recall when capistrano became a thing (it was called switch tower but had to change for trademark reasons if I recall). Prior to that, most folks working with Rails in production were using ant. I wouldn't be surprised if there were other ways as well back then, given it was early days.
- sidkshatriya 3y agoThis whole blog post is essentially an advertisment for why statically typed languages can prevent such madness. I'm sorry -- it is not my intention to start another non-useful static/dynamic typing debate. It seems crazy that when a new version of Ruby comes out, developers need to hunt for runtime errors (that may or may not trigger depending on the path the application took) to see what incompatibility needs to be fixed. Take any decent statically typed language. When a new version of the language comes out, your code will not compile on constructs or functions that are no longer called or present or used the way they should.
- ahoka 3y agoJava is “statically typed” amd has the same issues during runtime with different JVM versions.
- harikb 3y agoPeople try to run JVM versions across 10 years and face "small" issues with builtins. GP's point was mainly about missing interfaces, missing methods, typos etc.
- sidkshatriya 3y ago> People try to run JVM versions across 10 years and face "small" issues with builtins. GP's point was mainly about missing interfaces, missing methods, typos etc. Indeed -- well put. > Java is “statically typed” amd has the same issues during runtime with different JVM versions. Nothing is ever perfect -- there can be some occational runtime incompatibilities when very old Java code is run on new VMs. But the effort in moving between one Java version and another Java version that came out many years later is likely order of magnitudes less than if you did the same thing in Ruby. There is simply no comparison.
- deleted 3y ago[deleted]
- Berone 3y ago
- dchuk 3y agoThis is awesome to see that it's possible. I've always wondered about the same sort of concept, but instead it would be trying to use Crystal to run the latest Rails version. I lack the time/energy/knowledge to try it, but it would be interesting to see how close you could get to either power or port Rails to Crystal, and if it would even be worth it (in terms of speed and type safety, etc).
- helen___keller 3y agoMy understanding is that this tends to be difficult because certain really-dynamic-stuff that Ruby offers (effectively metaprogramming) are not supported by Crystal, but are heavily used by Rails. On the other hand, Amber offers a look of what a Crystal rewrite of Rails would look like
- yxhuvud 3y agoWell, you'd have to move a whole lot of code generation from load time to compile time, including the stuff based on db layout. So quite a bit of work.
- jrochkind1 3y agoI mean, by making some changes to Rails source code, it was possible to get a simple "hello world" to display. Presumably you'd run into more bugs if you tried to do more than that. Rails does have a test suite (hopefully Rails 1.0 had a decent one?) , I guess the interesting experiment would be how much code do you have to change to get Rails 1.0 test suite to pass on ruby 3.3. Safe to say quite a bit more than for the hello world to run!
- e12e 3y ago> it was possible to get a simple "hello world" to display. That's not really the whole story. It was possible to generate a hello world web application server. Would've been interesting to see if other generators, generated migrations, models, controllers, views and tests worked (scaffolding blog posts and comments).
- 3y ago
- ryanbigg 3y agoThis is pretty incredible work! (Action web service was an attempt to make Rails generate SOAP APIs as that was the style du jour at the time. Fortunately, JSON came along!)
- Rodeoclash 3y agoOof, anybody else get a wave of nostalgia seeing that start page!
- ElCapitanMarkla 3y agoYeap straight back to late 2007 when I first created a rails project in prep for my first job out of Uni.