Announcement

Collapse
No announcement yet.

Google Working On Open-Sourcing Their Fibers User-Space Scheduling Framework

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by trapexit View Post

    DSL? If the domain you're talking about is just about anything... then yes? It's a general purpose language. It is arguably the most accurately OOP language ever written to have mainstream use. Actors are hardly domain specific in their use cases.
    OOP is not much loved anymore.

    Comment


    • #12
      Originally posted by Drago View Post

      OOP is not much loved anymore.
      In the way it was implemented. Yes. But the original intent and definition and what came to be called OOP are two distinct things.

      Joe Armstrong, a co-creator of Erlang, hated OOP as popularly understood. He penned "Why OO Sucks." A short read for those interested.

      But if you watch the video "Scala, Erlang, F# Creators Discuss Functional Languages" Joe discusses why Erlang is in fact perhaps "more OO than any other language."

      But all of that is irrelevant. Erlang's concurrency model (actors with nice builtin bells and whistles to manage them, patterns to connect them logically, and pass messages between them) which I've found much more thorough and useful. The op tech would likely help Erlang just as much, if not more, than basic coroutine based patterns.

      Comment


      • #13
        Originally posted by trapexit View Post

        DSL? If the domain you're talking about is just about anything... then yes? It's a general purpose language. It is arguably the most accurately OOP language ever written to have mainstream use. Actors are hardly domain specific in their use cases.
        It's like saying that PostScript is a general purpose programming language. In a theoretical sense it's true, but absolutely not in practice. It's the same for Erlang, outside of soft-RT telecom systems hardly anyone is even aware of its existence.

        Comment


        • #14
          Originally posted by Drago View Post

          OOP is not much loved anymore.
          That might actually be a very good thing. Leaving aside the problem that many people ended up equating OOP with C++ or Java, one of the main problems with OOP was that it became a religion. No matter what program you were developing, be it Hello World, you "had to" use classes and inheritance. Then Java decided to simply abolish standalone functions and actual user-defined types altogether. That is obvious BS and mercifully this cult is on its way out. Python is 100% behind the everything-must-be-an-object mantra but at least it doesn't force it into your face at all times, you can write simple procedural code for simple problems with it without ever being bothered by OOP.

          But there are still use cases where OOP makes perfect sense (GUI frameworks, for example). So if by "not much loved anymore" you mean that OOP will not be forced into everything because it's "loved", but used pragmatically, narrowly and only to the extent that it actually helps to solve the problem at hand in a simpler and more manageable approach, then all the better (including for OOP itself).

          Comment


          • #15
            Originally posted by jacob View Post

            It's like saying that PostScript is a general purpose programming language. In a theoretical sense it's true, but absolutely not in practice. It's the same for Erlang, outside of soft-RT telecom systems hardly anyone is even aware of its existence.
            Do you have any experience with the language? I don't imagine so. I've used it professionally for some time in the FinTech space for all kinds of different projects. RabbitMQ, CouchDB, and a number of other well known projects are written in Erlang. The whole Elixir space. It's used by a couple ad firms for their matching platform. It's used by Nintendo for the Switch. By some in fintech in trading platforms and distributed orchestration platforms. It's used by some companies for online multiplayer servers. A certain famous dating app uses it for messages. Used by a large gambling site for much of their infra. There is a number of commercial products written in Erlang used for things like video streaming. It famously is used by WhatsApp to massive success and at great scale.

            It has one of the best and easiest to use concurrency models there is and it would really do the industry a lot of good to understand what technologies like it can do before going off and trying to reinvent things as so often happens. Just as it does all developers good to learn functional programming so does it change one's ideas about what is possible when you have a platform where threads of execution are basically as cheap as one would have objects in Java... with transparency across the network.

            Also: PostScript is not considered a "general purpose" language nor advertised as such. Erlang is.

            Comment


            • #16
              Originally posted by trapexit View Post

              Do you have any experience with the language? I don't imagine so. I've used it professionally for some time in the FinTech space for all kinds of different projects. RabbitMQ, CouchDB, and a number of other well known projects are written in Erlang. The whole Elixir space. It's used by a couple ad firms for their matching platform. It's used by Nintendo for the Switch. By some in fintech in trading platforms and distributed orchestration platforms. It's used by some companies for online multiplayer servers. A certain famous dating app uses it for messages. Used by a large gambling site for much of their infra. There is a number of commercial products written in Erlang used for things like video streaming. It famously is used by WhatsApp to massive success and at great scale.

              It has one of the best and easiest to use concurrency models there is and it would really do the industry a lot of good to understand what technologies like it can do before going off and trying to reinvent things as so often happens. Just as it does all developers good to learn functional programming so does it change one's ideas about what is possible when you have a platform where threads of execution are basically as cheap as one would have objects in Java... with transparency across the network.

              Also: PostScript is not considered a "general purpose" language nor advertised as such. Erlang is.
              Firstly popularity does not imply quality. Facebook used PHP... Not too long ago many developers were coding in actionscript and they made good money. People make, buy, and use crappy quality products all the time.

              How many operating systems are written in Erlang? How many file systems? How many AAA games? How many cross-platform GUI libraries?

              You can use Factorio (probably Minecraft too since it's also turing complete) to develop new hardware or operating systems. Simply because you can doesn't mean you should. https://github.com/Redcrafter/verilog2factorio

              Erlang is used because it is used for a specific reason. It handles service uptime like a champ and partially due to memory isolation scaled performance is really good. Instant messaging or voice communication loves that. These things that makes the language good and special also limits the domain in which it is effective.

              Discord also uses elixir and loves it ... https://blog.discord.com/scaling-elixir-f9b8e1e7c29b but they did not write all of their software in one language. That's just not practical. Imagine they wrote the web and "native" clients in erlang/elixir it would have been an investor's nightmare and nobody would have used their product.

              The idea of software development, to me, is to write software that can mutate over time and that is maintainable. Starting from scatch should be avoided.

              I love to learn by messing around and doing experiments, but I'm not going to try and sell my generic meta-programming language as the beginning and the end.

              Personally I'm a fanboi of Rust, Golang, Python, and Typescript but nothing's perfect...

              Comment


              • #17
                Originally posted by Jabberwocky View Post

                Firstly popularity does not imply quality.
                And I didn't make an argument that it was. The claim was that it's not used outside telecom. That's incorrect.

                How many operating systems are written in Erlang? How many file systems? How many AAA games? How many cross-platform GUI libraries?
                I thought popularity didn't imply quality? It doesn't.

                And I'll flip the question around: How many OSes are written in Python? Ruby? Go? Javascript? Scala? How many filesystems? How many AAA games? How many cross-platform GUI libraries? Very very few.

                And btw... I did write a prototype filesystem in Erlang with FUSE but never released it. As with any dynamic language that's not a great use due a number of factors. Python FUSE is useful for little more than pet prototyping projects. Erlang however is not a bad choice as the orchestration layer for a distributed object store or filesystem of sorts which is exactly what I built professionally. On the topic of distributed data... Erlang's Mnesia was one of the first truly usable distributed databases. And as I recall it was production usable before the paper on the CAP theorem was even published and long before the NoSQL craze. It's one reason a number of popular NoSQL platforms are written in Erlang.

                These things that makes the language good and special also limits the domain in which it is effective.
                That's true of of literally all technologies. The point I was making was that it is that it is a general purpose language like many other's and used as such unlike was claimed.

                but they did not write all of their software in one language. That's just not practical.
                You are making points to something that wasn't claimed by me. I never claimed it was an "everything language". No language is.

                Imagine they wrote the web and "native" clients in erlang/elixir it would have been an investor's nightmare and nobody would have used their product.
                Erlang/Elixir has pretty great web technologies. Including in the frontend space. So I'm not sure what you are getting at. As for "native" I also have no idea what you mean. The BEAM and Erlang have really good means of interacting with external interfaces. Better than most languages. It wouldn't at all be unreasonable to build a QT (or any other GUI) bridge and use that for rendering. Same as you would if you wrote in Python, C++, Java, etc. The native wxwidget bindings aren't great mostly because no one cares to seriously maintain them. Hardly different from "standard" Python gui bindings. It's not that these languages would be bad for UIs. It's that UIs have just traditionally be written in the platform's native languages and toolkits. This isn't unique to Erlang. And Erlang is a pretty light weight VM compared to Python, Java, or something like Electron. Resource usage would almost certainly be lower. Also Erlang's actor model actually could allow modeling traditional UI widgets and behaviors in a nicer way than most languages can. A process per widget with real async functionality, message passing rather than callbacks, true concurrency and parallelism removing all the typical issues with blocking the UI. Something that BEOS attempted to do via their "pervasively" multithreaded APIs but to the point where *everything* displayed has its own thread of execution.

                I love to learn by messing around and doing experiments, but I'm not going to try and sell my generic meta-programming language as the beginning and the end.
                And I'm not doing that. I'm providing counter evidence to false claims of a language that more than any mainstream language could exploit the ability to increase the efficiency of userspace concurrency.
                Last edited by trapexit; 10 June 2021, 10:45 PM.

                Comment


                • #18
                  @trapexit

                  Yes, you are right. Erlang is probably the most OO language there is (maybe smalltalk, but i don't know anything about smalltalk).
                  Joe Armstrong did say in an interview that erlang is not OO but "concurrency oriented", but from the talk i'l link below it is clear that it follows the true intention of OO, in spite of what the wikipedia page about OO says (i found nobody really knows what OO even is, probably thanks to C++, java, and such).

                  https://www.youtube.com/watch?v=fhOHn9TClXY

                  I, myself, have never liked OO, and i don't like the term "actor". But that's another story.

                  Erlang is my favorite language. Even though it scales like crazy because of message passing (which i guess would be best described by CSP), erlang is not really performant in "sequential" processing. A few small warts and performance when processing data are it's only flaws in my eyes (it's very performant if all you do is cut up data and pass it along somewhere).

                  However if you want to use all the cores in a computer as efficiently as possible, a different approach is needed. High performance computing is the field where the most effort is put into this. HPC, and lately videogames. The talk below is the best one i found in how to do this (it is rather technical, mind you).

                  https://www.youtube.com/watch?v=X1T3IQ4N-3g

                  I think the future needs a programming language that takes CSP and practical HPC, but is easy on humans. I'v been thinking about it for a while now and i think it would need a new compiler. The most important things are a scheduler and how it deals with data (but not a "central" scheduler as found in virtual machines).

                  Anyway, i'm glad people are interested in these things.

                  As for the topic of googles fibers, i guess it's probably something overly complex so i won't even look at it. There are plenty of talks about "fibers" (N:1 threading; edit: actually M:N, N:1 is for a single core) and "green threads" (i think it's the same as fibers). The best talks about fibers are probably from the game engine or HPC fields, if anyone wants to look it up.
                  Last edited by gens; 10 June 2021, 11:40 PM.

                  Comment


                  • #19
                    Originally posted by gens View Post
                    erlang is not really performant.
                    I think it depends on what you mean by "performant" and in relation to what. In relation to dynamic languages running on non-JIT (though we now have JIT in BEAM) VMs? It's pretty competitive in single thread performance depending on the activity and in anything that can be concurrent it will kick ass as you mention. Particularly, and this is way too overlooked even by those in the Erlang community, latency. Latency consistency under heavy load in Erlang is better than pretty much any gc'ed language. Even compiled ones. And given the ease of scaling... for the right jobs it's worth the tradeoff. Even a half decently written threaded C/C++ app can be a nightmare to maintain and due to lock management difficulties be slower than Erlang on account of poor utilization. Of course a well written C/C++ app (my primary languages for 20+ years) will smoke Erlang. But few applications are so easy to scale even with good libraries that in many applications it's just not worth it. It's cheaper to buy better hardware and keep the development easier than the other way. I made that choice happily multiple times and every major project I know of which considered Erlang but passed regretted it. They generally spent far more time worrying about concurrency and network communication than the core features.

                    Comment


                    • #20
                      Why did this take 10 years to be merged?

                      Comment

                      Working...
                      X