Uploaded November 2019 | Updated November 2026, 3 hours ago
=[ ℹ About ℹ ]=
In this installment of Low Level JavaScript we build a Promise implementation from scratch in order to understand exactly how asynchronous abstractions can be built on top of lower level primitives like callbacks.
=[ 🔗 Links 🔗 ]=
- ⭐️ Patreon: patreon.com/lowleveljavascript
- 💌 Updates to your inbox: tinyletter.com/lowleveljavascript
- Github Repo: github.com/LowLevelJavaScript/Promises-From-Scratch
- Specification: promisesaplus.com
- Promises (MDN): developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
=[ ℹ About ℹ ]=
In this installment of Low Level JavaScript we build a Promise implementation from scratch in order to understand exactly how asynchronous abstractions can be built on top of lower level primitives like callbacks.
=[ 🔗 Links 🔗 ]=
- ⭐️ Patreon: patreon.com/lowleveljavascript
- 💌 Updates to your inbox: tinyletter.com/lowleveljavascript
- Github Repo: github.com/LowLevelJavaScript/Promises-From-Scratch
- Specification: promisesaplus.com
- Promises (MDN): developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
![Generating Machine Code (16-Bit VM in JavaScript 011)
In this episode we take the AST representation of the assembly code we get from the parser and turn it into real machine code - the bytes in memory that the virtual CPU executes as instructions. Along the way well add support for labels, allowing us to write location independent and logically grouped assembly code.
Big shout out to patron Max Starr, whose LLJS IDE Project (https://github.com/manmon42/lljsvm-ide) is featured in this episode.
=[ ℹ About ℹ ]=
This series is all about building a powerful virtual machine in JavaScript with the following features:
- A flexible, extensible, register-based virtual machine
- Support for signed, unsigned and floating point operations
- A call stack
- Interrupt capabilities
- Ability to do memory mapping for IO
- An assembly language with macro and module support
- A higher level, C like language. Well use and expand the library from the parser combinators from scratch series
- And finally, to be able to take the whole thing into the browser and extend it to create a sort of fantasy console - an emulator for a machine that never existed
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- Series Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
- Github Repo: https://github.com/LowLevelJavaScript/16-Bit-Virtual-Machine
- LLJS IDE: https://github.com/manmon42/lljsvm-ide
- arcsecond: https://github.com/francisrstokes/arcsecond
- Parser Combinators From Scratch: https://www.youtube.com/watch?v=6oQLRhw5Ah0&list=PLP29wDx6QmW5yfO1LAgO8kU3aQEj8SIrU
=[ 🔗 Links 🔗 ]=
- Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
- Github Repo: https://github.com/LowLevelJavaScript/16-Bit-Virtual-Machine Generating Machine Code (16-Bit VM in JavaScript 011)](https://i.ytimg.com/vi/5PXMwvUkOKI/mqdefault.jpg)
![Building an DECODER for QOI Images (Quite OK Image Format)
The Quite OK Image Format (qoi) is a lossless compression image format that has similar performance to PNG, but with substantially faster encoding and decoding, making it a great choice for embedded systems.
In this video were going wrap our encoder implementation into a library, and build the corresponding decoder, which allows us to take a compressed QOI image and turn into a buffer of RGBA pixels.
=[ 🔗 Links 🔗 ]=
- Encoder Video: https://www.youtube.com/watch?v=GgsRQuGSrc0
- The QOI format: https://qoiformat.org/
- Dominic Szablewski (the creator): https://twitter.com/phoboslab
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/LowLevelJavaScript/QOI Building an DECODER for QOI Images (Quite OK Image Format)](https://i.ytimg.com/vi/5bWopQj-oQs/mqdefault.jpg)
![Turning Pixels Into Waves
In this video, were building an awesome graphical effect, where an image is processed into a series of animated waves. The math behind the technique is fascinating, and will lead us into to how sine waves work, the magic of linear interpolation, and signal processing techniques like amplitude modulation!
=[ 🔗 Links 🔗 ]=
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/lowbyteproductions/Turning-Pixels-Into-Waves Turning Pixels Into Waves](https://i.ytimg.com/vi/5vzMgNAzEuA/mqdefault.jpg)
![How Parser Combinators Work [Parser Combinators From Scratch] Episode 1
In this episode we dive into what a parser combinator library is, and how it is used in practice.
During this series we will develop an understanding of the concept of parsing, and build our own parser combinator system from scratch. The system we build will be capable of parsing both binary and text data. Well make use of both object-oriented and function programming principles to develop an effective and intuitive library.
=[ 🔗 Links 🔗 ]=
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- arcsecond : https://github.com/francisrstokes/arcsecond
- Daniel Holdens Article: http://daniel-holden.com/page/you-could-have-invented-parser-combinators
- Wikipedia Article On Parser : https://en.wikipedia.org/wiki/Parsing
- LLJS Subreddit: https://reddit.com/r/lowleveljavascript How Parser Combinators Work [Parser Combinators From Scratch] Episode 1](https://i.ytimg.com/vi/6oQLRhw5Ah0/mqdefault.jpg)
![Packing Bits For Compression
In this video, were writing a Bit Packer - a tool that takes data that does not make use of every single bit in its representation, and packs it into a buffer that takes up the minimal amount of space. Technically this requires quite a bit of bit manipulation, and is trickier than you might think at first glance!
This will be needed for some projects in the future, where well be exploring methods for compressing data.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist:
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/LowLevelJavaScript/Bit-Packer Packing Bits For Compression](https://i.ytimg.com/vi/74co_YG39Bw/mqdefault.jpg)
![[stream] More USB Reverse Engineering + Drivers
=[ 🔗 Links 🔗 ]=
Edgeguard Keyboard Adapter: https://keyboard.gg/
ebpf-usb: https://github.com/francisrstokes/ebpf-usb
eBPF: https://ebpf.io/
Book: USB Complete by Jan Axelson
Marcan reverse engineering a MIDI controller: https://www.youtube.com/watch?v=cUVuTBH51GY
USB 2.0 Spec: https://www.usb.org/document-library/usb-20-specification
Blog with useful resources: https://hackernoon.com/usb-reverse-engineering-down-the-rabbit-hole-c4809a5b55c4
GreatFET: https://greatscottgadgets.com/greatfet/
🎥 Stream Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/francisrstokes/GMMK-Driver [stream] More USB Reverse Engineering + Drivers](https://i.ytimg.com/vi/7Zo3bdaqfbo/mqdefault.jpg)
![Interrupts (16-Bit VM in JavaScript 013)
In this episode were introducing a maskable interrupt mechanism to the VM. This allows the outside world, as well as software, to Interrupt the regular flow of execution and redirect it to somewhere else, immediately.
=[ ℹ About ℹ ]=
This series is all about building a powerful virtual machine in JavaScript with the following features:
- A flexible, extensible, register-based virtual machine
- Support for signed, unsigned and floating point operations
- A call stack
- Interrupt capabilities
- Ability to do memory mapping for IO
- An assembly language with macro and module support
- A higher level, C like language. Well use and expand the library from the parser combinators from scratch series
- And finally, to be able to take the whole thing into the browser and extend it to create a sort of fantasy console - an emulator for a machine that never existed
=[ 🔗 Links 🔗 ]=
- 💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
- ⭐️ Patreon: https://www.patreon.com/lowleveljavascript
- Series Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW5DdwpdwHCRJsEubS5NrQ9b&playnext=1&index=1
- Github Repo: https://github.com/LowLevelJavaScript/16-Bit-Virtual-Machine
- Interrupts: https://en.wikipedia.org/wiki/Interrupt
- 16BitVM Episode 4: https://youtube.com/watch?v=zAsn8q-X9HM Interrupts (16-Bit VM in JavaScript 013)](https://i.ytimg.com/vi/9KQ7a-0cSdk/mqdefault.jpg)
![Mage ASCII Game Engine
In this video were creating an ASCII game engine that runs in the browser! It should be flexible enough that we can build many different kinds of games in it, but its intended purpose is mainly for rougelike and adventure games.
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: https://github.com/LowLevelJavaScript/mage-ascii-game-engine/ Mage ASCII Game Engine](https://i.ytimg.com/vi/B3uH517XbPs/mqdefault.jpg)

![Zero Extension [The Bits And Bytes Of Binary ep.5]
This mini series is all about binary. Over the course of the series, well be building a library that gives us precise control of every bit and operation.
Youll learn how the logical and arithmetic operations work, how different kinds of numbers are encoded, how to set, clear and toggle bits, and how we can create representations of structured binary data.
1. Bits
2. Operations
3. Unsigned Numbers
4. Addition
5. Zero Extension
6. Twos complement
7. Overflow Addition and Sign Extension
8. Shifting
9. Setting, Clearing, and Toggling Bits
10. Endianness
11. Structures
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
🎥 Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW47oPsNBFNEi_SYTOLDJXqQ
💻 Github Repo: https://github.com/LowLevelJavaScript/The-Bits-And-Bytes-Of-Binary
=[ 🎶 Music 🎶 ]=
Bad Snacks - The Morning After Zero Extension [The Bits And Bytes Of Binary ep.5]](https://i.ytimg.com/vi/BSktALAB6RQ/mqdefault.jpg)
![[stream] Exploring the FT232H and Node Native Addons
=[ 🔗 Links 🔗 ]=
🎥 Stream Playlist: https://www.youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: https://tinyletter.com/lowleveljavascript
🗣 Discord: https://discord.gg/FPWaVgk
⭐️ Patreon: https://www.patreon.com/lowleveljavascript
💻 Github Repo: [stream] Exploring the FT232H and Node Native Addons](https://i.ytimg.com/vi/DJ-SO0d3sYY/mqdefault.jpg)