this post was submitted on 16 Apr 2024
4 points (83.3% liked)

Programming Languages

1177 readers
1 users here now

Hello!

This is the current Lemmy equivalent of https://www.reddit.com/r/ProgrammingLanguages/.

The content and rules are the same here as they are over there. Taken directly from the /r/ProgrammingLanguages overview:

This community is dedicated to the theory, design and implementation of programming languages.

Be nice to each other. Flame wars and rants are not welcomed. Please also put some effort into your post.

This isn't the right place to ask questions such as "What language should I use for X", "what language should I learn", and "what's your favorite language". Such questions should be posted in /c/learn_programming or /c/programming.

This is the right place for posts like the following:

See /r/ProgrammingLanguages for specific examples

Related online communities

founded 1 year ago
MODERATORS
 

This is just a very naive execution model for concurrency.

What do you think about it?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Corbin 3 points 6 months ago (1 children)

Good work! This is a good start. These sorts of explanations build everybody's understanding, including your own.

I'd like to mention E-order execution as a weaker alternative to seq. The idea is that sequential operations can be carried out in parallel if they don't interact with each other's memory locations. One way to do this is transactional memory, which has been implemented in hardware but is more common in software, hence software transactional memory or STM. That's how Haskell does it. Another way is with message passing, as in Erlang or Elixir; each tiny process has its own private memory.

The name "E-order" comes from E, which had the ability to start multiple event loops. Erlang and Haskell only have one event loop, but E could give each loop its own private memory and CPU time; think thread-per-loop, but thousands of userspace loops scheduled onto a few threads with thread-per-core scheduling. In E and its descendants, each loop is called a "vat" and holds roughly one of your Frame Trees per vat. A vat takes "turns" and each turn is roughly like executing one of your Tree Branches. The trick is that a vat turn can use a native call stack since it is only one branch of the tree, and is amenable to standard JIT techniques.

[โ€“] cli345 2 points 6 months ago

Thank you very much for your feedback. ๐Ÿ™‚