News for hackers. Stuff that matters.
Re:Rust Is a Scalable Language by eminence32 on Tuesday March 28, 2023 @07:38PM (#35349702)
> And you would only need Rust — while it excels in the lowest half of the stack, it’s pretty ok everywhere else too.

A younger me, in search of a new language to learn, would have been turned off by something that is only "pretty ok"

But 20 years later, something that is "pretty ok" is exactly what I'm looking for. My experience has been that finding the perfect language (or perfect anything) is futile, and all I want is something that let's me solve my problems, don't get in my way, and don't really surprise me.

For a long while, python was my go-to "pretty ok" language, but eventually it stopped being "pretty ok" for me. Rust has now taken that spot.

Re:Rust Is a Scalable Language by cameronh90 on Tuesday March 28, 2023 @08:36PM (#35350333)
It's not popular among the crowd here, but my favourite "pretty ok" language is C#. It's not really the best at anything, but it's pretty good for most use cases.

That being said, because there's no one perfect language, it's handy to have a few in your arsenal. As much as I like C#, I'd still reach for Python for any data or ML type use cases.

Re:Rust Is a Scalable Language by graboid on Wednesday March 29, 2023 @01:37AM (#35353066)
It is a nice language. I just wish they stopped adding features. Except for the one everyone wants, discriminated unions.
Re:Rust Is a Scalable Language by zigzag312 on Wednesday March 29, 2023 @02:57AM (#35353602)
I find many new features useful as they usually either reduce boilerplate, increase expressiveness or enable high performance code. Some are also related to AOT compilation.

Which new features do you dislike?

Re:Rust Is a Scalable Language by mastax on Tuesday March 28, 2023 @09:24PM (#35350804)
I do love C# as a language, and I've been wanting to reach for it more for tooling and backend things at work, now that its cross platform is good. (I've mostly used it for Windows GUI apps previously). I'm more confident that any random developer can work on a C# program than a Rust one.

But it has felt like the FOSS library ecosystem for .NET is not quite as good as it is for Rust. C# is far older than Rust, and NuGet apparently has 3.5x as many packages as crates.io has crates. Despite that, my experience has been that I'm more likely to find a good Rust library for any random thing I want to do. Rustdoc documentation isn't amazing but it's consistent, and venturing into other ecosystems usually reminds me that things can be worse.

Re:Rust Is a Scalable Language by ostenning on Tuesday March 28, 2023 @08:57PM (#35350544)
C# is, in my opinion, a fantastic language. I haven’t used it in a long time, but the “ergonomics” were really nice.

The downside of C# was microsoft, but maybe thats changed now? I know they made a lot of effort to make the .NET framework more cross platform.

Re:Rust Is a Scalable Language by KRAKRISMOTT on Tuesday March 28, 2023 @09:16PM (#35350714)
The problem is the .NET ecosystem. Most of the truly useful frameworks and libraries are either commercial or freemium, and Microsoft is happy to play along and support this cottage industry instead of releasing free in-house versions and crushing the overpriced third party ecosystem.

Another issue is that Microsoft 's first party libraries are now increasingly designed to funnel you into Azure services. The language is great, but the ecosystem is rotten.

Re:Rust Is a Scalable Language by easton on Tuesday March 28, 2023 @10:16PM (#35351330)
I think this very much depends on what you're doing. If it's the typical web app, pretty much everything you'll want is open-source, and most of the time there's some first-party MS thing for what you need (auth? caching? ORM?). We use it at work and don't use any commercial libraries and don't have problems, although it's your typical microservice/distributed pattern. I'm guessing for developing desktop software there's a lot more gremlins.

It actually helps a lot that everything's so open source, because often companies will spit out a SDK for .NET to check a box and not have good docs around it because most of their customers aren't using .NET except for a few enterprise whales.

> Microsoft 's first party libraries are now increasingly designed to funnel you into Azure services.

Outside of the solution for scaling Blazor being "Azure SignalIR service" I'm having trouble with this one too. Their docs often call out Azure, but there's not a ton of bias in support (again, totally might just be that I don't get in the weeds enough).

Re:Rust Is a Scalable Language by KRAKRISMOTT on Tuesday March 28, 2023 @10:33PM (#35351519)
Their official ASP.NET OAuth documentation requires you to either pay for the third party Duende IdentityServer or use Azure cloud services.

https://learn.microsoft.com/en-us/aspnet/core/security/authe...

Re:Rust Is a Scalable Language by easton on Wednesday March 29, 2023 @01:19AM (#35352971)
It says you can use AAD or IdentityServer as OIDC providers, but the doc goes on to explain how to do it yourself with Entity Framework storing user data in a DB and the open source Microsoft.AspNetCore.Identity hooking it into the app.

It would be odd if they only gave like Cognito as an example (especially considering AAD is free). And I didn’t know people really used IdentityServer as much in new apps, there’s other ways to do that.

Re:Rust Is a Scalable Language by KRAKRISMOTT on Wednesday March 29, 2023 @12:25PM (#35359511)
In most use cases with a separate client (e.g. in React), it's easier to use a separate OAuth server. Otherwise you will end up having to change the default cookie settings.
Re:Rust Is a Scalable Language by throwawaymaths on Tuesday March 28, 2023 @09:07PM (#35350628)
The downside of c# is it's easy until you run into the 80 flavors of async it has.
Re:Rust Is a Scalable Language by api on Tuesday March 28, 2023 @09:13PM (#35350693)
Async is a wart, period. It’s an ugly hack around poorly scaling threading abstractions. It basically implements light weight threading but in a way that forces the developer to constantly think about it and clutters up the language with ugly complex async crap.

Go is the only language that gets concurrency right.

Rust async is ugly but it’s ugly because async is ugly and as a systems language there are limits to how much of that ugliness it can hide.

If we could fix threads to scale better at the OS or core library level we’d save insane amounts of developer time.

Re:Rust Is a Scalable Language by throwawaymaths on Tuesday March 28, 2023 @09:49PM (#35351034)
> Go is the only language that gets concurrency right.

Lol. I guess you haven't seen Elixir.

Re:Rust Is a Scalable Language by pg_1234 on Wednesday March 29, 2023 @02:59AM (#35353620)
Go's approach to concurrency exposes Go's lack of memory safety.

When you couple this with a (mostly) bunch of noob devs who have been told Go is super safe because of it's type safety, you have a recipe for disaster.

The combination of language features and surrounding social effects means, once you pursue concurrency, Go abruptly becomes one of the most dangerous languages to use for any industry where subtle errors of value are a problem ... like anything to do with money.

p.s. No slight intended to Elixir, it avoids all these risks.

Re:Rust Is a Scalable Language by Patrickmi on Wednesday March 29, 2023 @03:18AM (#35353742)
Don’t know if use tools like static check but Go’s type system kinda suck without development tools
Re:Rust Is a Scalable Language by vips7L on Tuesday March 28, 2023 @11:49PM (#35352188)
> Go is the only language that gets concurrency right

Java and Elixir both have taken the non-async approach. C# is actively looking into it as well now too: https://twitter.com/davidfowl/status/1532880744732758018

Re:Rust Is a Scalable Language by ithrow on Tuesday March 28, 2023 @09:40PM (#35350947)
Async in the nodejs ecosystem seems to be doing perfectly fine?
Re:Rust Is a Scalable Language by eyelidlessness on Tuesday March 28, 2023 @09:52PM (#35351065)
async (the keyword) is doing fantastic because it’s better than all of the available alternatives. Those alternatives:

- ad hoc callbacks, which had a great Result-ish type signature but really do warrant the “hell” in “callback hell”

- Promise APIs, which are semantically equivalent to async the keyword, unless you care about call stacks, and have a lot of the same hellish problems as the ad hoc callbacks they were meant to address (less nesting! same everything else!)

- Um fibers? Good luck making sense out of whatever that’s doing. It’s a good idea, but it’s also all opaque magic when you try using it.

- Actual threads and child processes… there are valid use cases, and they’re worth pursuing if you have a valid use case, but the facilities for development with them are basically “here’s a bunch of low level concepts that closely mirror their system level counterparts, hope you know/figure out what you’re doing!”

Re:Rust Is a Scalable Language by ithrow on Tuesday March 28, 2023 @11:25PM (#35351960)
By async I was referring to node's asynchronous event-driven runtime abstraction which the GP refers to as an ugly hack. I'm not sure if this abstraction is better than all of the available alternatives if you compare it to high-level features multi-threaded runtimes offer like thread-safe collections, atomic updates, concurrent hash maps, immutability, structured concurrency, etc... as in Java/Clojure. Most Java programmers don't work with the low-level thread primitives.

The author of esbuild gave up trying to code esbuild with nodejs/worker threads and switched to Go for a less limited/restricted concurrency environment.

Re:Rust Is a Scalable Language by eyelidlessness on Wednesday March 29, 2023 @12:42AM (#35352695)
> By async I was referring to node's asynchronous event-driven runtime abstraction which the GP refers to as an ugly hack.

Okay with that clarification I can agree it’s a good model, given its constraints. The event loop with async IO in the abstract is a good way to model a single process/thread workload for many use cases that fit it.

> I'm not sure if this abstraction is better than all of the available alternatives if you compare it to high-level features multi-threaded runtimes offer like thread-safe collections, atomic updates, concurrent hash maps, immutability, structured concurrency, etc... as in Java/Clojure.

Clojure’s solution to concurrency is a breath of fresh air, regardless of your execution environment, because its state transactional semantics are great whether your concurrency is in one process/thread or spread across many. I can’t speak to typical Java solutions, but my general sense is they’re higher level and more powerful than Node’s for actually crossing process/thread boundaries, but subject to most of the shared state problems Java has even in a single process/thread.

> The author of esbuild gave up trying to code esbuild with nodejs/worker threads and switched to Go for a less limited/restricted concurrency environment.

After a lot of exploration of Node worker threads, I’d probably similarly look elsewhere if I had a workload suited to it. You can do a lot with Node worker threads with a lot of special tuning for a use case, and I even have some proof of concept code demonstrating that it can be much better than common usage. But I put it on hold because the complexity of making it perform well is very high compared to optimizing the single thread default.

Re:Rust Is a Scalable Language by schemescape on Tuesday March 28, 2023 @09:10PM (#35350660)
What is there besides Task<T>?
Re:Rust Is a Scalable Language by legulere on Tuesday March 28, 2023 @11:56PM (#35352262)
First there was APM https://learn.microsoft.com/en-us/dotnet/standard/asynchrono... then there came TPL (using Task but without async await but ContinueWith) and finally async await with some later refinements like ValueTask. Generally you just use async await nowadays with maybe the complication of when to use Task or ValueTask
Re:Rust Is a Scalable Language by vips7L on Wednesday March 29, 2023 @01:12PM (#35360173)
C# tends to have this problem with multiple ways to do the same thing. Look at construction:

    var a = new A();
    A a = new();
    A a = new A();
Re:Rust Is a Scalable Language by schemescape on Wednesday March 29, 2023 @06:09PM (#35364534)
When did that second one get added?

I haven't written C# in a while, but I don't remember seeing that one. I skimmed the C# grammar and didn't see it there either, but I only glanced and might have missed an entire section.

Re:Rust Is a Scalable Language by vips7L on Wednesday March 29, 2023 @07:01PM (#35365108)
C# 9.0: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...

I'm honestly surprised they haven't add the ability to drop the `new` keyword like Kotlin:

   val a = A();
Re:Rust Is a Scalable Language by schemescape on Wednesday March 29, 2023 @09:17PM (#35366434)
For anyone else who’s curious, these seem to be called “Target-typed new expressions”.
Re:Rust Is a Scalable Language by keithnz on Tuesday March 28, 2023 @09:42PM (#35350965)
C# does seem like its popular with quite a few of the crowd here. Not very popular in startups though.
Re:Rust Is a Scalable Language by _hypx on Tuesday March 28, 2023 @11:05PM (#35351781)
Agreed. No one should think that there will be one language for everything and everyone.
Re:Rust Is a Scalable Language by imwithstoopid on Tuesday March 28, 2023 @08:41PM (#35350388)
Or Go, whose guiding principle seems to be "Pretty OK"
Re:Rust Is a Scalable Language by shakow on Tuesday March 28, 2023 @08:54PM (#35350517)
Go guiding principle is rather “the lowest common denominator”.
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
Re:Rust Is a Scalable Language by Existenceblinks on Tuesday March 28, 2023 @08:15PM (#35350104)
assembly/c/c++/perl/ruby/elixir/elm/js are "pretty ok" to me no matter how long I had written with. python is absolutely not ok to me .. always think "really?" I want to write it in another way, but it can't be.
Re:Rust Is a Scalable Language by cglong on Tuesday March 28, 2023 @07:43PM (#35349757)
What soured Python for you?
Re:Rust Is a Scalable Language by epage on Tuesday March 28, 2023 @08:31PM (#35350273)
Not OP but to me the ecosystem is too disjoint. To ship "production python", you need to figure out which of the "current" tools are to cobble together to build, test, and share your code.

`cargo` combines poetry, ruff, pipx, sphinx, pytest, etc. You might expect this to be worse. In some cases, it is (e.g. pytest). The super power is in being able to get a project up and going immediately without wasting time on figuring out which tools to use, scaffolding them together, setting up a host for your documentation, etc.

Then there comes the problem of distributing it where the target system has to have just the right version of Python.

Re:Rust Is a Scalable Language by kitkat_new on Tuesday March 28, 2023 @08:05PM (#35350001)
My experience with Python recently:

I have been working on a mediumish project (without tests or type hints) where I needed to add functionality including a bit rewiring.

My main problems were:

- I didn't know what data (types) were passed around when looking at parts of the code, so I had to look were the data structures were created, adapted and passed along to actually know more (or just debug it)

- After changing parts of the code, I was 100% certain that I had to run it a dozen times to fix new bugs or things I had forgotten

How it works with Rust:

- I see the types in the function signature

- I know the properties of 'classes' without scanning the whole code of the class

- when it compiles, it works 90+% of the time, because the compiler tells me where I forgot something before, if the IDE hasn't already told me

Re:Rust Is a Scalable Language by magicalhippo on Tuesday March 28, 2023 @09:31PM (#35350875)
> I didn't know what data (types) were passed around when looking at parts of the code

For me this is the big one. Types isn't just about writing error-free code, it also aids in making the code self-documenting.

When I read a function signature in an unknown codebase in C, C++, C#, Delphi or similar, I can almost always tell what it does and what I can do (or not). Even types I haven't seen before helps, because the name of the types can be informative.

Thanks to this I've helped countless people fix their code using libraries I've never seen before in mere minutes, simply by glossing over some of the code.

When I work in untyped code, like older Python or similar, it's much harder. Invariably I end up sprinkling dir() or similar just to figure out what the heck is going on. Ok, this so function created... something... what can do with it? Who knows?

Re:Rust Is a Scalable Language by amluto on Tuesday March 28, 2023 @11:45PM (#35352159)
Python also has the regrettable property that many type errors aren’t even caught at runtime. Instead you often get incorrect results with no exception.

str vs bytes confusion is a major example. If you use one where you needed the other, the results can be anywhere from inscrutable failures to hilarious. My personal favorite is if you stick bytes into a templating engine. For some reason, iterating bytes in Python yields integers (not bytes-of-length-1 or a separate byte type), and those integers can get stringized and flattened, and your webpage turns into a bunch of digits and you end up with the Matrix.

Re:Rust Is a Scalable Language by mcronce on Tuesday March 28, 2023 @10:22PM (#35351392)
> I didn't know what data (types) were passed around when looking at parts of the code, so I had to look were the data structures were created, adapted and passed along to actually know more (or just debug it)

It's even better when all those data structures are just dicts, because it's too cumbersome to make serializable classes, so good luck figuring out what fields are in which.

Re:Rust Is a Scalable Language by kazinator on Tuesday March 28, 2023 @08:21PM (#35350179)
> How it works with Rust ...

You will be amazed to find that that's how it works with C, Pascal, Java ...

Types being declared in function headers and checked is 1960's technology.

Re:Rust Is a Scalable Language by iudqnolq on Tuesday March 28, 2023 @08:36PM (#35350336)
But Rust puts a unique amount of information into the types. This can get annoying sometimes, but it means typechecking better predicts correctness.

For example, a c header type might have an out parameter and an error code returned. The interaction between those two isn't specified in the type system.

I personally require discriminated unions (i.e. enums where each variant can hold its own type of data) before I consider a type system adequate.

Re:Rust Is a Scalable Language by kazinator on Tuesday March 28, 2023 @09:23PM (#35350782)
But that's way beyond someone coming from JS or Python, just being excited that there are types on the parameters and the compiler tells you when basic things are wrong.
Re:Rust Is a Scalable Language by iudqnolq on Tuesday March 28, 2023 @10:17PM (#35351337)
I personally came from JS to Java and got annoyed I had to do all this work specifying types but they gave me essentially no benefit.

Then I tried Rust and realized why types were good. (and then Kotlin)

Re:Rust Is a Scalable Language by xdavidliu on Tuesday March 28, 2023 @09:03PM (#35350587)
it’s not just the type checker; its the borrow checker, which prevents way more bugs than in C++ and is certainly not 1960s tech
Re:Rust Is a Scalable Language by kitkat_new on Tuesday March 28, 2023 @08:42PM (#35350404)
certainly not with C:

Manually managing memory has turned out to be error prone (for me) and can result in quite nasty to debug bugs (because the type system is lacking), only to mention the most important thing.

I think there is enough out there on C vs Rust, esp. because of the Linux kernel

That said, it was asked about Python (within the context of Rust), and I have limited experience with Pascal and Java, so I will leave it at that.

Re:Rust Is a Scalable Language by johnny22 on Tuesday March 28, 2023 @08:36PM (#35350331)
except the type system in C isn't that good.
Re:Rust Is a Scalable Language by amluto on Tuesday March 28, 2023 @11:48PM (#35352182)
That’s an understatement. If you see a function in a header like:

    char *func(char *in, size_t len);
It’s anybody’s guess what the actual input type is, not to mention the ownership or lifetime of the output.
Re:Rust Is a Scalable Language by kazinator on Tuesday March 28, 2023 @11:49PM (#35352192)
HN now supports backslash escapes for asterisks (which, unescaped, are markup notation for italics).
Re:Rust Is a Scalable Language by leetrout on Tuesday March 28, 2023 @07:49PM (#35349827)
Not Op but once I experienced Go I started writing less Python by choice. Then TypeScript and hopefully soon more Rust.

Typed Python 3 is just awkward enough to not make me enjoy it on small scripts and not accurate enough (yet) to be confident in it on large projects.

I don't use numpy & friends so Python doesn't offer me much any more compared to newer typed languages once I go beyond a simple script.

Re:Rust Is a Scalable Language by culi on Tuesday March 28, 2023 @09:48PM (#35351023)
You should try out deno. TypeScript with zero set up. You can write a .ts file anywhere on your computer and run it with, e.g., `deno run hello-world.ts`. It's my new goto for quick scripts
Re:Rust Is a Scalable Language by leetrout on Tuesday March 28, 2023 @11:12PM (#35351828)
Yea! I actually wanted to teach using Deno back in 2019! It was a stretch topic for the last couple weeks of class in my syllabus but we were too far behind.

Excited to see where it continues to go and we are writing more scripts in TS at work (without Deno, tho).

Re:Rust Is a Scalable Language by prottog on Tuesday March 28, 2023 @07:52PM (#35349849)
> Then TypeScript

Have you done any backend TS? I'm curious what the best practice there is, these days.

Re:Rust Is a Scalable Language by leetrout on Tuesday March 28, 2023 @11:17PM (#35351875)
I am definitely not the person to ask there.

I have been on a couple teams that used Node. Everyone was/is still using express and various ORMs / query builders. Knex and Prisma are what I saw.

Lots of neat stuff with Zod and relatedly EdgeDB.

Re:Rust Is a Scalable Language by eminence32 on Tuesday March 28, 2023 @07:49PM (#35349822)
One too many TypeError at runtime. I became increasingly annoyed that nothing was catching my silly typos or other mistakes. These days there are some really good python static checkers available, but I'm not sure I really knew about them half a decade ago when I started to move away from Python
Re:Rust Is a Scalable Language by kitkat_new on Tuesday March 28, 2023 @08:06PM (#35350009)
can you recommend a checker?
Re:Rust Is a Scalable Language by lmm on Tuesday March 28, 2023 @08:23PM (#35350203)
I left Python when I found Scala, and while a good type system was a big factor, the groundhog day of "Python dependency management is awful with 4 different tools none of which quite work right, but this new tool has fixed it, for real this time" every few years was the part that really made me despair.
Re:Rust Is a Scalable Language by raincole on Tuesday March 28, 2023 @07:57PM (#35349906)
I don't know if I just use Python "wrong" or something. When I worked as a TA, I've written a lot of untyped Python as Blender/Houdini plugins, and I think it worked pretty well for this purpose.

But later I did some backend stuff, I tried to use typed Python and wrote safer code. Then the whole toolchain becomes so cluncky. MyPy, Pylinter, Flake8, etc. They're so slow, and their VSCode extensions are so weird to configure. And I never got the best practice to work with other untyped libraries. It's not that I don't know how to use typed language. Actually I do backend stuff faster in Rust than Python.

It's probably just me or my VSCode acting up.

Re:Rust Is a Scalable Language by artursapek on Tuesday March 28, 2023 @08:38PM (#35350350)
it’s slow and there’s no helpful compiler
Re:Rust Is a Scalable Language by HervalFreire on Tuesday March 28, 2023 @08:03PM (#35349971)
In my opinion it's not pretty ok. It's actually superior to many other languages.

I think for web stuff though the borrowing and move semantics is a bit of an overkill. Usually you don't need to thread or handle state in these areas (frameworks and databases handle it for you) so a GC works better here. But everything outside of that is superior to something like ruby, python or go when it comes to safety.

Re:Rust Is a Scalable Language by platinumrad on Tuesday March 28, 2023 @08:10PM (#35350051)
Matklad has hinted at this before, but it's funny how Rust is displacing ML dialects in domains where manual memory management is not at all necessary, simply because no ML has its tooling and deployment story straight.
Re:Rust Is a Scalable Language by evntdrvn on Tuesday March 28, 2023 @10:48PM (#35351647)
I’m going to sound like a broken record, but F# is in the ML family and has wonderful tooling and the deployment story is getting dramatically better recently (it’s a little behind C# in its true native AoT compilation support, but it’s coming)
Re:Rust Is a Scalable Language by platinumrad on Wednesday March 29, 2023 @01:15AM (#35352946)
How do you build F#? I had a pretty bad time with FAKE/Paket the last time I tried it.
Re:Rust Is a Scalable Language by evntdrvn on Thursday March 30, 2023 @12:42PM (#35375492)
Honestly, the built in tooling has been good enough for me, in the .NET Core era (especially within the last few years). The MSFT CLI/IDE team has finally had the chance to fix some previous really annoying issues and limitations in the last few years, so the experience has gotten quite a bit smoother.

I know people that looove Paket, especially in the F# community, but I’ve been happy enough with things now to not feel like I need to invest the effort in adopting it.

Re:Rust Is a Scalable Language by vlovich123 on Tuesday March 28, 2023 @08:07PM (#35350014)
I think if Rust could integrate a GC pointer elegantly into the ecosystem and put some of the knobs for running the GC the responsibility of user-space libs (ala pluggable GC), add in more optional type inference in places, and make it easy to refactor code to remove the GC, then it could become quite interesting for higher level glue code. As is, it’s not quite as good as TypeScript I think
Re:Rust Is a Scalable Language by HervalFreire on Wednesday March 29, 2023 @01:24PM (#35360353)
There is a reference counting GC in rust. It's just not default and you have to be explicit about invoking it. It's similar to shared pointers in C++. See Arc.

For something like python the heap allocation or stack allocation is handled behind the scenes so the entire concept is abstracted away from you.

Re:Rust Is a Scalable Language by vlovich123 on Wednesday March 29, 2023 @10:19PM (#35366983)
I meant a tracing GC like https://docs.rs/gc/latest/gc/.

Arc still requires you to reason about ownership as does this GC.

I think single threaded async w/ easy no copy message passing is more akin to what most people want when thinking about concurrency (eg Go channels) and actually happens to perform exceedingly well when it’s done up and down the stack (eg io_uring). In such a model you don’t even need to worry about ownership so much because you can’t Send anything except for things that need to be so there’s not a lot of value in many of the protections Rust tries to put in place.