5 comments

  • Quothling1 hour ago
    &gt; Cargo vs pip&#x2F;Poetry<p>I know this section is really just a comparrison of pyproject.toml and cargo.toml, but who on earth would use pip instead of UV as a drop-in replacement in 2026? Though calling it a comparrison is a bit of a stretch considering there is no text.<p>On top of that, I imagine that a lot of Python programmers who actually do use pip would also use requirements.txt and not pyproject.toml
    • nickpsecurity20 minutes ago
      People learning Python or searching for it will run into endless answers using PIP. Then, lots of advice on how to work around PIP&#x27;s problems. Then, multiple alternatives they have to consider. I only recently started using UV after going through all that.<p>Packaging, concurrency, and type errors had me strongly considering switching to Go or Rust recently. These are such long-solved problems in other languages that I question why we should put up with it in Python. Then, I remember it was the ecosytem, including job market and AI performance, that made me use Python.<p>So, maybe a Python&#x2F;Rust combo... There&#x27;s the extensions the OP article mentioned and a Python interpreter written in Rust.
  • Tiberium2 hours ago
    The whole &quot;book&quot; seems to be AI-generated, or at least very heavily AI-edited. Would at this point it not be easier to just tell developers to use their LLM of choice to achieve the same (or, likely, better) result?<p>Random chapter so you can judge the quality for yourself: <a href="https:&#x2F;&#x2F;microsoft.github.io&#x2F;RustTraining&#x2F;python-book&#x2F;ch09-error-handling.html" rel="nofollow">https:&#x2F;&#x2F;microsoft.github.io&#x2F;RustTraining&#x2F;python-book&#x2F;ch09-er...</a><p>And the non-stop bullet list slop just looks horrible: <a href="https:&#x2F;&#x2F;microsoft.github.io&#x2F;RustTraining&#x2F;python-book&#x2F;ch01-introduction-and-motivation.html#when-to-choose-rust-over-python" rel="nofollow">https:&#x2F;&#x2F;microsoft.github.io&#x2F;RustTraining&#x2F;python-book&#x2F;ch01-in...</a><p>Seems like this isn&#x27;t limited to the Python book though, and others have the same issues: <a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;RustTraining&#x2F;issues&#x2F;14" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;RustTraining&#x2F;issues&#x2F;14</a>
  • iloveoof2 hours ago
    This tutorial is very bad, and the time estimates are pretty absurd.<p>The explanations are extremely short and I imagine a new Rust dev would not understand what is going on.<p>The Brown tutorial is far better, compare its section on mutables and ownership to this.<p>And yes, this entirely thing is AI generated. Why was this created?
    • onlyrealcuzzo1 hour ago
      Link to the Brown tutorial: <a href="https:&#x2F;&#x2F;rust-book.cs.brown.edu&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rust-book.cs.brown.edu&#x2F;</a>
    • embedding-shape1 hour ago
      &gt; and the time estimates are pretty absurd.<p>I wonder when LLMs will catch up with the new timelines, they frequently cite days&#x2F;weeks of worth, then you say &quot;Ok, implement that&quot; and 30 minutes later everything been implemented. But seems they themselves is stuck not realizing they&#x27;re not estimating for human timeframes anymore.
    • pie_flavor56 minutes ago
      In my experience working with newbies, the alterations Brown makes to the chapters on borrowing are strictly worse. It is entirely focused on ramming the difference between the stack and the heap down your throat, which has nothing to do with ownership and borrowing, and newbies will frequently say that they are extremely confused by the chapter, then sigh in relief upon reading the original version. Just use the official guide, nobody has improved upon it yet. <a href="https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book" rel="nofollow">https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book</a>
  • muadddib23 minutes ago
    What pathetic garbage AI slop. I apologize to everyone who clicked and wasted their time.
  • onlyrealcuzzo2 hours ago
    I can&#x27;t recommend Rust enough. It has such a bad reputation, but it isn&#x27;t <i>that</i> hard. I truly think it&#x27;s easier than many languages with much less-intimidating reputations.<p>That said, one of the places Rust loses people pretty early on is an example they have early in this intro:<p>```rust<p>let parts: Vec&lt;&amp;str&gt; = &quot;a,b,c&quot;.split(&#x27;,&#x27;).collect(); &#x2F;&#x2F; Vec&lt;&amp;str&gt;<p>```<p>I never understood why Rust didn&#x27;t &#x2F; couldn&#x27;t make functions able to return different outputs depending on context. If you chain `.split()` to something else that <i>can</i> take an iterator, you want to pass an iterator. If you don&#x27;t, ~99% of people would probably rather have a collected array. And if you want an `it`, you could just do `.it()` or this is when type inference could be overloaded and you could do:<p>```rust<p>let it: Split&lt;&#x27;_, char&gt; = &quot;a,b,c&quot;.split(&#x27;,&#x27;);<p>```<p>I think Rust should&#x27;ve put more effort into making the thing newbs want to do the default, and easy ways to get the most efficient thing for experts.<p>```rust<p>let parts = &quot;a,b,c&quot;.split(); &#x2F;&#x2F; Gives an Array&#x2F;Vec<p>let count = &quot;a,b,c&quot;.split().count(); &#x2F;&#x2F; Optimized stream, no array allocation<p>```<p>It <i>could</i> work like that, and I think <i>almost</i> everyone would be happy. But it doesn&#x27;t.<p>Instead, they&#x27;ve created a language that I think <i>could</i> have been nearly as easy as a scripting language, but isn&#x27;t.<p>It obviously isn&#x27;t only collection iterators this applies to. There&#x27;s dozens of very small places that add up and make what - I believe - is an otherwise relatively easy and sensible language feel too far out of reach for too many people.<p>`Option&lt;T&gt;`, `Result&lt;T, E&gt;`, `Future&lt;T&gt;` all impact linguistically how you can interact with a Type. I think the impacts of this don&#x27;t make sense to people who&#x27;ve never encountered this before. `Arc&lt;T&gt;`, `Rc&lt;T&gt;`, `Mutex&lt;T&gt;`, and `RwLock&lt;T&gt;`, etc also have similar consequences.<p>Not only do people just not get it. But also, the type system quickly becomes &quot;scary&quot;. To do pretty basic concurrency, you need to build a pretty &quot;scary&quot; looking type if you come from Python.<p>Which is why I&#x27;m a psychopath and attempting to create a language where it <i>defaults</i> to the things most people want, and it&#x27;s very easy for experts to override.
    • mightyham2 hours ago
      Having the result type of a function change based on context sounds like a horrible idea because it would introduce tons of unnecessary ambiguity. If it&#x27;s an issue that you have to chain one extra collect call, just write a helper function for splitting that returns a vec.
      • onlyrealcuzzo1 hour ago
        &gt; Having the result type of a function change based on context sounds like a horrible idea because it would introduce tons of unnecessary ambiguity.<p>I think you&#x27;re assuming the language won&#x27;t warn you if you&#x27;re doing something cost ineffective, and that there aren&#x27;t <i>modes</i> to compilation which will make you make things explicit whenever its ambiguous.<p>For a person to get started, they should be able to compile in `easy` mode and do things that make sense to them, and the compiler should only bitch at you to be pedantic when you ask for that.<p>Especially because an LLM can <i>probably</i> do that pedantic part for you.<p>You: write code almost as high level as a scripting language, it works, turn on strict mode, most of the time you get auto-fix solutions&#x2F;options from the compiler.<p>That&#x27;s my opinion anyhow. I assume <i>most</i> Rust people won&#x27;t like it. That&#x27;s fine. You already have your language!<p>I&#x27;m not trying to make a slightly different Rust for Rust people...<p>I&#x27;m trying to make Rust more accessible to <i>everyone else</i>.
    • pie_flavor49 minutes ago
      You may notice no language on the planet does this. That is because it is bad. Type guesstimation is a great way of ensuring random problems crop up in random places where they aren&#x27;t expected <i>and</i> of making the typechecker much slower and more prone to unresolvability (see Swift&#x27;s multi-minute compiles). All to save you from having to learn what an iterator is, in case you come from a language where lists are more common than iterators; the experience of being scared by a type, and then discovering that the type is not scary in chapter 13.2, is not actually worth making the simple type system instead staggeringly complicated.
      • onlyrealcuzzo20 minutes ago
        &gt; You may notice no language on the planet does this. That is because it is bad.<p>Perhaps I&#x27;ve explained this poorly, but C#, Java, Perl, &amp; Haskell (and I&#x27;m sure others) do versions of this already...<p>You seem to imply that Swift does as well, though I have almost no experience directly with Swift.<p>The vast majority of times it is <i>NOT</i> ambiguous. The compiler <i>can</i> flag it, <i>IFF</i> you want it to.<p>If you&#x27;re coming from Python and you want to ease your learning experience, you probably don&#x27;t want to hit several brick walls before you can do anything...<p>If you have an enterprise codebase, you <i>probably</i> don&#x27;t want to allow anything to be compiled that <i>could</i> be ambiguous, so you can force that mode of compilation...<p>I don&#x27;t know of any major language which have progressive modes of compilation like this. I <i>think</i> people will find it useful.<p>Maybe it&#x27;ll be a disaster. Time will tell.
    • sgeisenh1 hour ago
      This closely resembles implicit conversion from C++ and in many serious codebases it is considered poor practice because it leads to a <i>lot</i> of hidden control flow.<p>I think Rust strikes a nice balance but there’s enough magic that some people still get frustrated. Following traits can get tedious at times.
      • onlyrealcuzzo6 minutes ago
        &gt; This closely resembles implicit conversion from C++ and in many serious codebases it is considered poor practice because it leads to a lot of hidden control flow.<p>Yes, which is why there&#x27;s progressive modes of compilation to not allow anything ambiguous if that&#x27;s what you want (i.e. an enterprise codebase).<p>But, a junior can still try things out in weaker modes of compilation, and then once they&#x27;ve got something working, it is typically very easy to do the pedantry to remove ambiguous behavior.
    • embedding-shape1 hour ago
      &gt; I never understood why Rust didn&#x27;t &#x2F; couldn&#x27;t make functions able to return different outputs depending on context<p>Referential transparency probably being the first reason I could see. Having the behaviour of a callee sounds horrible and something we usually try to actively work against, you want to be able to look at the function in isolation and be able to understand how it works and what values it gives back, without jumping around and seeing where it&#x27;s being called.<p>And yes, I&#x27;d agree with your last part, you do sound a bit like a psychopath ;) With that said, the world needs those too, so I hope your experiment is fun and brings you lots of learnings, enjoy! :)