News for hackers. Stuff that matters.
Re:Rust Is a Scalable Language by ldjkfkdsjnv on Tuesday March 28, 2023 @07:52PM (#35349848)
Python doesnt really scale to large code bases, and refactoring is very hard.
Re:Rust Is a Scalable Language by aeyes on Tuesday March 28, 2023 @08:06PM (#35350006)
Do you have any real world experience? I'm working on a Python codebase which is almost 2 million lines of code with almost 100 developers and I haven't seen development speed slow down over the years.

Of course you need to have a structure within this codebase or you'll bump into the typical problems of large codebases. Some languages force you to work this way, we do it by enforcing certain rules in the lower level framework code of the project.

Also you need to keep pace, we are on the latest Python version and code is heavily typed. This project was started in the 2.7 days.

Re:Rust Is a Scalable Language by Gigachad on Tuesday March 28, 2023 @08:17PM (#35350133)
I’ve got a long experience with Ruby which I believe is quite similar, but after about 5 years, an untyped language just falls apart. Updating anything is perilous because libraries will change stuff all the time that violates the types and it won’t be mentioned in the changelogs, your 20,000 unit tests will also constantly miss stuff because you didn’t reimplement a type checker inside rspec. It’s a disaster. Typescript has saved our front end but I don’t see any hope for Rails.
Re:Rust Is a Scalable Language by jes5199 on Tuesday March 28, 2023 @08:24PM (#35350210)
typed Python is becoming more common, and it helps. It’s not as mature as Typescript, but it’s getting better
Re:Rust Is a Scalable Language by cogman10 on Tuesday March 28, 2023 @09:26PM (#35350821)
It definitely goes a long way towards making things more workable/understandable.
Re:Rust Is a Scalable Language by culi on Tuesday March 28, 2023 @09:44PM (#35350985)
Have you tried Sorbet? The typing story in Python and Ruby are both pretty bad, but they do exist...
Re:Rust Is a Scalable Language by Gigachad on Tuesday March 28, 2023 @09:57PM (#35351121)
We investigated but the general vibe is that it just isn’t there yet, and it isn’t even moving in the direction to get there. It really needs support from the Rails project, and the rails leadership had indicated it isn’t going to happen.

If you have a pure ruby project and use it from day one, it probably works. But if you are starting a brand new project, just save yourself the pain and use TS.

Re:Rust Is a Scalable Language by sodapopcan on Tuesday March 28, 2023 @08:33PM (#35350289)
I love this comment so much.

> Of course you need to have a structure within this codebase or you'll bump into the typical problems of large codebases.

> Also you need to keep pace

I don't have the wherewithal to really dig into this now but to both those points I respond with a loving and resounding: "Duh!" (not directed at you)

What sort of project is it?

Re:Rust Is a Scalable Language by kazinator on Tuesday March 28, 2023 @08:17PM (#35350132)
> I haven't seen development speed slow down over the years.

Well, otherwise, how would it have gotten to 2 million lines of code?

Adding lines of code and refactoring are different activities and discussions.

Re:Rust Is a Scalable Language by aeyes on Wednesday March 29, 2023 @12:27PM (#35359548)
I wanted to say that the per-developer output has not slowed down significantly.

But I admit that there are challenges. For example startup time is ~30 seconds because that's the time it takes to import everything. This automatically means that running even a single test will take at least 30 seconds, to not bang your head against the wall we mostly write new code in a REPL so everything is already loaded.

Re:Rust Is a Scalable Language by benhoyt on Tuesday March 28, 2023 @10:07PM (#35351239)
Are you allowed to say what project/product it is? I'm curious. Do you use type annotations? I've found refactoring sooo much easier in statically typed languages like Go than in Python, even for medium sized projects.
Re:Rust Is a Scalable Language by aeyes on Wednesday March 29, 2023 @12:18PM (#35359393)
Most code has type annotations but we don't enforce it. A lot of code was written before typing became well supported and we never went back to add it to every old piece of code, we add them when people touch related code sections.

Typing definitely makes it a lot easier to navigate the codebase. But in the end maintaining any large codebase is a question of discipline which starts with simple things like code layout, class and function names, isolation of functionality.

Re:Rust Is a Scalable Language by winrid on Tuesday March 28, 2023 @08:32PM (#35350284)
Instagram and Dropbox would like a word :)

Also it's hard to beat Django in terms of productivity. You can use type defs too.

Re:Rust Is a Scalable Language by super_flanker on Wednesday March 29, 2023 @02:33AM (#35353421)
Worked on Instagram codebase for almost 2.5 years, never wrote a single line of Python, most of the services are hack or c++. Where does python come into picture? Apps are in java/kotlin/ObjectiveC/Swift.
Re:Rust Is a Scalable Language by winrid on Thursday March 30, 2023 @12:03PM (#35374865)
Re:Rust Is a Scalable Language by HervalFreire on Tuesday March 28, 2023 @08:03PM (#35349976)
Not if you use modern python. And by modern python I mean typed python. Heavily typed.
Re:Rust Is a Scalable Language by topaz0 on Tuesday March 28, 2023 @10:03PM (#35351198)
Huh? I've always used punch cards for my python...
Re:Rust Is a Scalable Language by cozzyd on Wednesday March 29, 2023 @01:47AM (#35353126)
matching the indentation level sure is easier with punchcards