Re:Building GitHub with Ruby on Rails
by Scarbutt on Friday April 07, 2023 @03:32AM
(#35479114)
Is that two millions LOC for a single Rails application or across various Rails applications?
[ Parent
| on HN ]
They call it a monolith and the way they describe it I think they are using that term for the application rather than the repo.
Re:Building GitHub with Ruby on Rails
by New_California on Friday April 07, 2023 @03:36AM
(#35479140)
They keep saying "monolith".
Re:Building GitHub with Ruby on Rails
by nitinreddy88 on Friday April 07, 2023 @04:08AM
(#35479374)
It's one single application. Most of the secondary services are powered by go/ruby, running independently in non-monolithic way.
Ex-Hubber
One thing I just cannot wrap my head around is Ruby/Rails metaprogramming and attribution of things (as in "where this method/class/macro comes from?"), especially with so many authors trying to do something to the pre-existing stuff, including the standard library bits.
Like, a lot of times I see some baz.foobarify() I have really hard time understanding where the heck that comes from. RubyMine makes wonders and control-clicking gets me there about half of time, but the rest of it it's either "search in all files, hoping that `def foobarify` is unique enough" or "this is crazy, but I'm gonna set a breakpoint, run it and see where this rabbit hole goes".
It feels kinda like Scala (or, to lesser degree, Haskell) magic operators problem, but worse.
I consider myself proficient with a decent number of languages and frameworks, but Ruby/Rails is one arcane mystery that just never clicked. So I really wonder what's the trick to make metaprogramming shenanigans manageable at this scale?
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debugger... is ruby gold for this kind of stuff. As a Ruby developer, probably one of the most impactful "quick tips" I've ever picked up is this:
foo.method(:bar).source_location
That is wildly useful when debugging/figuring out where the actual code for some method is at runtime.
Re:Building GitHub with Ruby on Rails
by throwaway445232 on Saturday April 08, 2023 @03:27AM
(#35491328)
you can't click on it and jump to source? is this the power of ruby metaprogramming?