Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Technology
  3. Rust is Eating JavaScript

Rust is Eating JavaScript

Scheduled Pinned Locked Moved Technology
technology
101 Posts 54 Posters 894 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A [email protected]

    I don't know but I don't think rust has that problem. In fact I've always thought its data ownership paradigm is literally the most optimal approach to concurrency and parallelism. I really love using rayon in rust for instance.

    S This user is from outside of this forum
    S This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #27

    True, but of course it's always a trade-off. At a certain point I have to defer to your judgment, at least until I've written some Rust code. But I've written a fair amount of C++ and a little bit of Ada and don't find them all that convenient compared to Python or Haskell or whatever. We'll see. 😉

    A 1 Reply Last reply
    0
    • P [email protected]

      I think there's room for a rust-lite language that is GCed. Something with a functional-style type system and that compiles to machine code.

      Roc is a candidate for this language. Basically Elm that compiles to machine code, but with a number of tweaks to make it work for more than just a web front end. Like Elm, the type system is haskell like, but simplified.

      S This user is from outside of this forum
      S This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #28

      Thanks, Roc sounds interesting. Ocaml also maps more closely to machine operations than Haskell does, so it has always seemed like another alternative. AMD has something called ROCm which is their version of CUDA, but I assume that is unrelated.

      1 Reply Last reply
      0
      • S [email protected]

        True, but of course it's always a trade-off. At a certain point I have to defer to your judgment, at least until I've written some Rust code. But I've written a fair amount of C++ and a little bit of Ada and don't find them all that convenient compared to Python or Haskell or whatever. We'll see. 😉

        A This user is from outside of this forum
        A This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #29

        IME a language is as good as its package manager and libraries, and cargo is great.

        1 Reply Last reply
        0
        • S [email protected]

          The JS tooling universe has always seemed like a Lovecraftian hellscape to me. I've managed to stay away from it so far, but if I were caught in it, of course I'd be trying to escape any way I could. It sounds like Rust's attraction here has been as a viable escape corridor rather than anything about Rust per se.

          In particular, I get that everyone wants their code to be faster, and I get that certain bloaty apps (browsers) need to get their memory footprint under control, and a few niche areas (OS kernels, realtime control) can't stand GC pauses. Other than that though, what is the attraction of Rust for stuff like tooling? As opposed to a (maybe hypothetical) compiled, GC'd language with a good type system and not too much abstraction inversion (Haskell's weakness, more or less).

          Has Golang fizzled? It has struck me as too primitive, but basically on the right track.

          Rust seems neat from a language geek perspective, but from what I can tell, it requires considerable effort from the programmer handle a problem (manual storage reclamation) that most programs don't really have. I do want to try it sometime. So this post is intended as more inquisitive/head scratching rather than argumentative.

          R This user is from outside of this forum
          R This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #30

          The JS tooling universe has always seemed like a Lovecraftian hellscape to me.

          That's most of any programming of today for me.

          If it can't be grasped in a couple of days - then na-ah.

          I can patch something I need working which doesn't, written in C.

          autotools ftw

          1 Reply Last reply
          0
          • S [email protected]

            Thanks, I was looking for a more straightforward academic-style textbook for non-beginning programmers, but I'll make do with what is out there.

            maxwellfire@lemmy.worldM This user is from outside of this forum
            maxwellfire@lemmy.worldM This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #31

            This is what I've been going through, sold as teaching rust to people who already know other languages. I'm not very far in at all, but it seems decent? https://google.github.io/comprehensive-rust/

            1 Reply Last reply
            0
            • C [email protected]

              Nom nom nom

              S This user is from outside of this forum
              S This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #32

              Everything eventually becomes a crab.

              kolanaki@pawb.socialK 1 Reply Last reply
              0
              • adespoton@lemmy.caA [email protected]

                JavaScript has its place as a lightweight runtime interpreter.

                Rust has its place as a secure and modern way to engineer and produce dependable software.

                S This user is from outside of this forum
                S This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #33

                Eh, it's not that lightweight, Lua is much better for that.

                1 Reply Last reply
                0
                • S [email protected]

                  Everything eventually becomes a crab.

                  kolanaki@pawb.socialK This user is from outside of this forum
                  kolanaki@pawb.socialK This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #34

                  That means eventually everything tastes great when smothered in butter. 🤤

                  M S 2 Replies Last reply
                  0
                  • S [email protected]

                    Yes it's on my infinite todo list. I'm just being too much of a curmudgeon about the available textbooks, and had a sinking feeling when the main one didn't get "hello world" out of the way on page 1, and shift to the specifics of the language.

                    glitchvid@lemmy.worldG This user is from outside of this forum
                    glitchvid@lemmy.worldG This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #35

                    Rust By Example is very good for showing the ropes in a very practical way, that's how I got up and running with it.

                    Secondly is the O’Reilly book Programming Rust, which is probably closer to what you want, it explains the actual technical details of much of the language, and to me seems written for an audience that already knows programming. Lastly would be Rust for Rustaceans by No Starch Press, if you actually do want to pursue Rust further, as it discusses very, very in detail the systems of the language, and how they can be used to make something so powerful like Serde.

                    S 1 Reply Last reply
                    0
                    • glitchvid@lemmy.worldG [email protected]

                      Rust By Example is very good for showing the ropes in a very practical way, that's how I got up and running with it.

                      Secondly is the O’Reilly book Programming Rust, which is probably closer to what you want, it explains the actual technical details of much of the language, and to me seems written for an audience that already knows programming. Lastly would be Rust for Rustaceans by No Starch Press, if you actually do want to pursue Rust further, as it discusses very, very in detail the systems of the language, and how they can be used to make something so powerful like Serde.

                      S This user is from outside of this forum
                      S This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #36

                      Thanks, Rust by Example looks ok, and I'm acquainted with one of Programming Rust's authors, which is cool. I'm currently looking at "Comprehensive Rust". All these though seem to be about the Rust software ecosystem (compilers, package tools, libraries) as much as they are about the language. I had hoped to start by just reading about the language, if something like that exists. I don't particularly want to write any Rust programs until I've finished reading some kind of language overview, which means that all the stuff about build tools are just a distraction during that stage. As another commenter in this thread said though, ecosystems and languages have become pretty much inseparable, so maybe that's why the books are that way.

                      This also looks interesting:

                      https://dr-knz.net/rust-for-functional-programmers.html

                      This says nothing about Rust, but it's a humorous classic. I'd be interested to know how to describe Rust in these terms.

                      https://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html

                      1 Reply Last reply
                      0
                      • P [email protected]

                        I think there's room for a rust-lite language that is GCed. Something with a functional-style type system and that compiles to machine code.

                        Roc is a candidate for this language. Basically Elm that compiles to machine code, but with a number of tweaks to make it work for more than just a web front end. Like Elm, the type system is haskell like, but simplified.

                        B This user is from outside of this forum
                        B This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #37

                        There’s already Swift, which isn’t garbage collected, but the ref. counting does the same in practice.

                        The only problem with Rust and Swift, Kotlin etc. in my opinion is that they keep growing and getting more complex with no signs of stopping.

                        1 Reply Last reply
                        0
                        • V [email protected]
                          This post did not contain any content.
                          callmepk@lemmy.worldC This user is from outside of this forum
                          callmepk@lemmy.worldC This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #38

                          JS become rusty

                          1 Reply Last reply
                          0
                          • S [email protected]

                            The JS tooling universe has always seemed like a Lovecraftian hellscape to me. I've managed to stay away from it so far, but if I were caught in it, of course I'd be trying to escape any way I could. It sounds like Rust's attraction here has been as a viable escape corridor rather than anything about Rust per se.

                            In particular, I get that everyone wants their code to be faster, and I get that certain bloaty apps (browsers) need to get their memory footprint under control, and a few niche areas (OS kernels, realtime control) can't stand GC pauses. Other than that though, what is the attraction of Rust for stuff like tooling? As opposed to a (maybe hypothetical) compiled, GC'd language with a good type system and not too much abstraction inversion (Haskell's weakness, more or less).

                            Has Golang fizzled? It has struck me as too primitive, but basically on the right track.

                            Rust seems neat from a language geek perspective, but from what I can tell, it requires considerable effort from the programmer handle a problem (manual storage reclamation) that most programs don't really have. I do want to try it sometime. So this post is intended as more inquisitive/head scratching rather than argumentative.

                            Q This user is from outside of this forum
                            Q This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #39

                            I usually pick Rust for CLI tools because:

                            1. It's statically compiled and isn't dependent on system binaries and won't break if there if the system has the wrong version like C/C++, allowing you to distribute it as a single binary without any other installation steps
                            2. Still produces fairly small binaries unlike languages like Java or C# (because of the VM)
                            3. Is a modern language with a good build system (It's like night and day compared to CMake)
                            4. And I just like how the language works (errors as values etc.)
                            dark_arc@social.packetloss.ggD 1 Reply Last reply
                            0
                            • V [email protected]
                              This post did not contain any content.
                              V This user is from outside of this forum
                              V This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #40

                              Can I just say how beautiful that page is? Such a delight to read the text on it. The legibility. The simplicity. 😙👌

                              1 Reply Last reply
                              0
                              • T [email protected]

                                I’ve used it the last few years to do Advent of Code (https://adventofcode.com/) and that’s been fun and challenging. Definitely recommend it. Better than trolling through a book of “now do this” examples if you’ve done other languages in the past.

                                S This user is from outside of this forum
                                S This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #41

                                I know that the "project" approach to learning a language works for some people, but I've found l greatly prefer to read a book from beginning to end before undertaking any projects. It helps me start out with a clear picture. I'm finding "Comprehensive Rust" to be fairly good so far. Thanks for all the help, everyone.

                                1 Reply Last reply
                                0
                                • adespoton@lemmy.caA [email protected]

                                  JavaScript has its place as a lightweight runtime interpreter.

                                  Rust has its place as a secure and modern way to engineer and produce dependable software.

                                  J This user is from outside of this forum
                                  J This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #42

                                  with wasm and friendly new web frameworks, the only thing keeping js alive is inertia

                                  adespoton@lemmy.caA 1 Reply Last reply
                                  0
                                  • V [email protected]
                                    This post did not contain any content.
                                    B This user is from outside of this forum
                                    B This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #43

                                    Fun fact! Lemmy is made in Rust!

                                    S 1 Reply Last reply
                                    0
                                    • V [email protected]
                                      This post did not contain any content.
                                      M This user is from outside of this forum
                                      M This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #44

                                      I thought python has kinda exploded lately...

                                      S 1 Reply Last reply
                                      0
                                      • V [email protected]
                                        This post did not contain any content.
                                        V This user is from outside of this forum
                                        V This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #45

                                        Because corporations doesn't want web to be open, everyone can javascript, not everyone can read webassembly.

                                        dark_arc@social.packetloss.ggD 1 Reply Last reply
                                        0
                                        • V [email protected]
                                          This post did not contain any content.
                                          W This user is from outside of this forum
                                          W This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #46

                                          Is this a 2yo write up, considering the last update was in 2023?

                                          M Z 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups