Skip to content

Tags: leostera/lam

Tags

v0.0.9

Toggle v0.0.9's commit message
Better support for Lambdas, Tuples, Lists

v0.0.8

Toggle v0.0.8's commit message
Embeddable Scheduler, Emulator fixes, DOM FFIs, and more!

First of all thanks to @kvakvs for helping me debug emulator fixes. In
particular my misunderstanding of the behavior of `call*` instructions
in the BEAM bytecode made for some very wonky bugs. I owe you a beer! 🍻

Changelog

Examples:

More examples: fib, a fib dumper that times a pure JS, a JS in web
worker, and an Erlang implementation, fixes to the empty and grep
examples as well.

Yes, this is Erlang code manipulating the DOM.

Compiler:

* Fixed bug in CodeTable where we were ignoring 4 bytes before the
  beginning of the instruction section

* Fixed bug in Compact Term Encoding where 10000 would be picked up as a
  small value and thus the rest of the instructions would be nonsense

Emulator:

* Introduce Opaque References

* Registers are now ensured to have a fixed size (although this may
  change)

* Coordinator run loop has been split into a setup and a run function
  that can be used to _step_ the coordination process

* Scheduler now implements a Stepper that can be used to execute a
  number of iterations over the computation -- this makes the emulator
  embeddable into larger event loops, such as the DOMs request animation
  frame loop

* Schedulers and the Coordinator now can communicate more cleanly

* Pids can now know whether they are the main Pid or not

* Runtime trait now requires a function for yielding control so the
  loops aren't starving the CPU

Runtime: Native

* Secondary Schedulers are spawned on a separate thread to let the Main
  Scheduler begin work ASAP

* Schedulers can communicate with the Coordinator via an unbound channel
  between the threads -- this right now allows for halting the system,
  but is the basis to build process stealing and inter-scheduler message
  routing

Runtime: Web

* Implement opaque Refs for DOM Element

* Add (NIFs) native interfaces for :
  * `document.getElementById(name)`
  * `document.createElement(tag)`
  * `element.appendChild(element)`
  * `element.innerText = text`

* Expose a `step` function to run a configurable number of iterations
  over the LAM program that can be used to hook into the Request
  Animation Frame loop.

  This way we get 60fps rendering _and_ WebAssembly speeds.

---

Changes across the board! But it's letting me explore a few interesting
things:

* yes, we can build web apps with Erlang / Elixir ✔️
* we need to find a nice way of defining custom NIFs
*

Enjoy it and let me know what works, what breaks, and cool things you
want to build with LAM! 🚀

/ Leandro

v0.0.7

Toggle v0.0.7's commit message
First release implementing message passing with selective receives

v0.0.6

Toggle v0.0.6's commit message
First pipelined release

v0.0.5

Toggle v0.0.5's commit message
Better Lambdas and Spawn support

v0.0.4

Toggle v0.0.4's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
leostera Leandro Ostera
meta: version bump

v0.0.3

Toggle v0.0.3's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
leostera Leandro Ostera
meta: version bump

v0.0.2

Toggle v0.0.2's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
leostera Leandro Ostera
meta: version bump

v0.0.1

Toggle v0.0.1's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
leostera Leandro Ostera
meta: add github templates and sponsoring