Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. i wonder how Erlang on a microcontroller would feel like

i wonder how Erlang on a microcontroller would feel like

Scheduled Pinned Locked Moved Uncategorized
23 Posts 9 Posters 1 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.
  • lisyarus@mastodon.gamedev.placeL lisyarus@mastodon.gamedev.place

    @whitequark ...am I having a stroke or did you post exactly that some time ago?..

    whitequark@social.treehouse.systemsW This user is from outside of this forum
    whitequark@social.treehouse.systemsW This user is from outside of this forum
    whitequark@social.treehouse.systems
    wrote last edited by
    #4

    @lisyarus dissociative amnesia

    lisyarus@mastodon.gamedev.placeL 1 Reply Last reply
    0
    • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

      you get the same kind of real-time and correctness benefits as Rust (with a lot of hand-waving involved in the use of "same kind" here) but the language is way simpler

      castanea_jo@ni.hil.istC This user is from outside of this forum
      castanea_jo@ni.hil.istC This user is from outside of this forum
      castanea_jo@ni.hil.ist
      wrote last edited by
      #5

      @whitequark Guessing you've already run into it but https://nerves-project.org/ is a thing, and pretty nice to work with by all accounts

      whitequark@social.treehouse.systemsW 1 Reply Last reply
      0
      • castanea_jo@ni.hil.istC castanea_jo@ni.hil.ist

        @whitequark Guessing you've already run into it but https://nerves-project.org/ is a thing, and pretty nice to work with by all accounts

        whitequark@social.treehouse.systemsW This user is from outside of this forum
        whitequark@social.treehouse.systemsW This user is from outside of this forum
        whitequark@social.treehouse.systems
        wrote last edited by
        #6

        @castanea_jo first time i've seen it but also if it runs Linux it's in the same class as PCs in my book

        castanea_jo@ni.hil.istC 1 Reply Last reply
        0
        • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

          @lisyarus dissociative amnesia

          lisyarus@mastodon.gamedev.placeL This user is from outside of this forum
          lisyarus@mastodon.gamedev.placeL This user is from outside of this forum
          lisyarus@mastodon.gamedev.place
          wrote last edited by
          #7

          @whitequark Must be it

          1 Reply Last reply
          0
          • lisyarus@mastodon.gamedev.placeL lisyarus@mastodon.gamedev.place

            @whitequark ...am I having a stroke or did you post exactly that some time ago?..

            artemist@social.mildlyfunctional.gayA This user is from outside of this forum
            artemist@social.mildlyfunctional.gayA This user is from outside of this forum
            artemist@social.mildlyfunctional.gay
            wrote last edited by
            #8

            @lisyarus @whitequark don't worry, whitequark posts are idempotent.

            whitequark@social.treehouse.systemsW 1 Reply Last reply
            0
            • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

              i wonder how Erlang on a microcontroller would feel like

              ratsnakegames@mastodon.socialR This user is from outside of this forum
              ratsnakegames@mastodon.socialR This user is from outside of this forum
              ratsnakegames@mastodon.social
              wrote last edited by
              #9

              @whitequark probably uncomfortable because the microcontroller's pins would poke his butt

              1 Reply Last reply
              0
              • artemist@social.mildlyfunctional.gayA artemist@social.mildlyfunctional.gay

                @lisyarus @whitequark don't worry, whitequark posts are idempotent.

                whitequark@social.treehouse.systemsW This user is from outside of this forum
                whitequark@social.treehouse.systemsW This user is from outside of this forum
                whitequark@social.treehouse.systems
                wrote last edited by
                #10

                @artemist @lisyarus unironically

                lisyarus@mastodon.gamedev.placeL 1 Reply Last reply
                0
                • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                  @artemist @lisyarus unironically

                  lisyarus@mastodon.gamedev.placeL This user is from outside of this forum
                  lisyarus@mastodon.gamedev.placeL This user is from outside of this forum
                  lisyarus@mastodon.gamedev.place
                  wrote last edited by
                  #11

                  @whitequark @artemist Would be funny if they were involutions

                  1 Reply Last reply
                  0
                  • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                    @castanea_jo first time i've seen it but also if it runs Linux it's in the same class as PCs in my book

                    castanea_jo@ni.hil.istC This user is from outside of this forum
                    castanea_jo@ni.hil.istC This user is from outside of this forum
                    castanea_jo@ni.hil.ist
                    wrote last edited by
                    #12

                    @whitequark yeah I'm unsure how much the OTP binary it generates needs the linux bits, in theory it should be portable since its compiling the beam runtime into the binary but i dunno

                    castanea_jo@ni.hil.istC 1 Reply Last reply
                    0
                    • castanea_jo@ni.hil.istC castanea_jo@ni.hil.ist

                      @whitequark yeah I'm unsure how much the OTP binary it generates needs the linux bits, in theory it should be portable since its compiling the beam runtime into the binary but i dunno

                      castanea_jo@ni.hil.istC This user is from outside of this forum
                      castanea_jo@ni.hil.istC This user is from outside of this forum
                      castanea_jo@ni.hil.ist
                      wrote last edited by
                      #13

                      @whitequark portable in the sense of being able to compile for other platforms, not in the sense of having the binary be droppable into other systems

                      1 Reply Last reply
                      0
                      • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                        i wonder how Erlang on a microcontroller would feel like

                        cararemixed@mastodon.socialC This user is from outside of this forum
                        cararemixed@mastodon.socialC This user is from outside of this forum
                        cararemixed@mastodon.social
                        wrote last edited by
                        #14

                        @whitequark there is AtomVM. I haven't tried it but it fits in moderately sized mcus it seems. https://atomvm.org

                        whitequark@social.treehouse.systemsW 1 Reply Last reply
                        0
                        • cararemixed@mastodon.socialC cararemixed@mastodon.social

                          @whitequark there is AtomVM. I haven't tried it but it fits in moderately sized mcus it seems. https://atomvm.org

                          whitequark@social.treehouse.systemsW This user is from outside of this forum
                          whitequark@social.treehouse.systemsW This user is from outside of this forum
                          whitequark@social.treehouse.systems
                          wrote last edited by
                          #15

                          @cararemixed oh nice

                          1 Reply Last reply
                          0
                          • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                            i wonder how Erlang on a microcontroller would feel like

                            eqe@aleph.landE This user is from outside of this forum
                            eqe@aleph.landE This user is from outside of this forum
                            eqe@aleph.land
                            wrote last edited by
                            #16

                            @whitequark implementing BEAM on a stm32h7 class micro seems pretty feasible!

                            I wish more projects would take the approach of high level runtime for app code on microcontrollers, like sifteo https://scanlime.org/2012/12/how-we-built-a-super-nintendo-out-of-a-wireless-keyboard/

                            1 Reply Last reply
                            0
                            • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                              i wonder how Erlang on a microcontroller would feel like

                              david_chisnall@infosec.exchangeD This user is from outside of this forum
                              david_chisnall@infosec.exchangeD This user is from outside of this forum
                              david_chisnall@infosec.exchange
                              wrote last edited by
                              #17

                              @whitequark

                              I imagine: great, right up until it suddenly isn't. Erlang has asynchronous message passing, which means that it must have message buffering. And that means that memory can easily accidentally balloon at unexpected times.

                              whitequark@social.treehouse.systemsW 1 Reply Last reply
                              0
                              • david_chisnall@infosec.exchangeD david_chisnall@infosec.exchange

                                @whitequark

                                I imagine: great, right up until it suddenly isn't. Erlang has asynchronous message passing, which means that it must have message buffering. And that means that memory can easily accidentally balloon at unexpected times.

                                whitequark@social.treehouse.systemsW This user is from outside of this forum
                                whitequark@social.treehouse.systemsW This user is from outside of this forum
                                whitequark@social.treehouse.systems
                                wrote last edited by
                                #18

                                @david_chisnall only with unbounded queues

                                david_chisnall@infosec.exchangeD 1 Reply Last reply
                                0
                                • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                  @david_chisnall only with unbounded queues

                                  david_chisnall@infosec.exchangeD This user is from outside of this forum
                                  david_chisnall@infosec.exchangeD This user is from outside of this forum
                                  david_chisnall@infosec.exchange
                                  wrote last edited by
                                  #19

                                  @whitequark

                                  Erlang queues are unbounded.

                                  whitequark@social.treehouse.systemsW 1 Reply Last reply
                                  1
                                  0
                                  • R relay@relay.infosec.exchange shared this topic
                                  • david_chisnall@infosec.exchangeD david_chisnall@infosec.exchange

                                    @whitequark

                                    Erlang queues are unbounded.

                                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                                    whitequark@social.treehouse.systems
                                    wrote last edited by
                                    #20

                                    @david_chisnall right, but if you were working on an MCU dialect (and it would almost certainly have to be a dialect) you could change that

                                    david_chisnall@infosec.exchangeD 1 Reply Last reply
                                    0
                                    • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                      @david_chisnall right, but if you were working on an MCU dialect (and it would almost certainly have to be a dialect) you could change that

                                      david_chisnall@infosec.exchangeD This user is from outside of this forum
                                      david_chisnall@infosec.exchangeD This user is from outside of this forum
                                      david_chisnall@infosec.exchange
                                      wrote last edited by
                                      #21

                                      @whitequark

                                      Doing so would fundamentally change the Erlang abstract machine in ways that would impact the rest of the system. In particular, Erlang has a notion of selective receive as a core part of the language (which is necessary for things like two-phase locking, which can't be expressed natively in the actor model without it).

                                      Selective receive means that waking up an actor that has a full message queue will not automatically result in its message queue shrinking in size.

                                      esoterra@hachyderm.ioE david_chisnall@infosec.exchangeD 2 Replies Last reply
                                      0
                                      • david_chisnall@infosec.exchangeD david_chisnall@infosec.exchange

                                        @whitequark

                                        Doing so would fundamentally change the Erlang abstract machine in ways that would impact the rest of the system. In particular, Erlang has a notion of selective receive as a core part of the language (which is necessary for things like two-phase locking, which can't be expressed natively in the actor model without it).

                                        Selective receive means that waking up an actor that has a full message queue will not automatically result in its message queue shrinking in size.

                                        esoterra@hachyderm.ioE This user is from outside of this forum
                                        esoterra@hachyderm.ioE This user is from outside of this forum
                                        esoterra@hachyderm.io
                                        wrote last edited by
                                        #22

                                        @david_chisnall @whitequark that makes sense. At that point, when some core quality is lost, changing how the system works and can be used, a subtle line is crossed between Erlang variants and Erlang-inspired languages.

                                        I think in a way that encourages us to ask useful questions like what properties of Erlang are you interested in? what are your other inspirations? what requirements do you have? what are the implications of combining those things in this way?

                                        (though obviously you don't have to have answers or be interested in them. I just think it gives useful structure to the inquiry)

                                        1 Reply Last reply
                                        0
                                        • david_chisnall@infosec.exchangeD david_chisnall@infosec.exchange

                                          @whitequark

                                          Doing so would fundamentally change the Erlang abstract machine in ways that would impact the rest of the system. In particular, Erlang has a notion of selective receive as a core part of the language (which is necessary for things like two-phase locking, which can't be expressed natively in the actor model without it).

                                          Selective receive means that waking up an actor that has a full message queue will not automatically result in its message queue shrinking in size.

                                          david_chisnall@infosec.exchangeD This user is from outside of this forum
                                          david_chisnall@infosec.exchangeD This user is from outside of this forum
                                          david_chisnall@infosec.exchange
                                          wrote last edited by
                                          #23

                                          @whitequark

                                          Some background:

                                          In Verona, we have a generalisation of the actor model, which makes things like two-phase commit easy but makes this problem worse: the equivalent of a message is 'sent' to multiple concurrent owners (generalised actors), so working out who to wake to reduce the total number of messages in the system is hard.

                                          We looked at what a version for embedded devices would look like, but even the actor-model subset is basically impossible. Even simple actor model has things with fan-out, so waking up an actor because its queue is full may cause two more messages to be sent. And these may be in cycles.

                                          And actor model (and BoC) don't provide good tools for reasoning about the worst-case numbers.

                                          1 Reply Last reply
                                          1
                                          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