Paul Bone is a software engineer and computer scientist. His interests include programming languages, declarative programming, programming language implementation, parallelism and concurrency. Paul works for Mozilla on Firefox's JavaScript engine's garbage collector by day, and the Plasma programming language by night.
This light is a 3D printed diffuser over a COB LED strip, and this post is how to make your own. It also works for non-COB LED strips. openGrid and Underware Instead of uploading some models for you to print I m going to refer to existing systems that we re going to customise. The first is openGrid , a flexible-yet-simple wall storage system. It provides the square grid that everything else is…
Oh, you don t want any poison in your porridge. But how about in your computer s memory? Papa Bear - too much poison Papa Bear likes his chair hard, his porridge hot and his browser written in a memory safe language that helps engineers avoid memory bugs like buffer overruns and use after frees . But even Papa Bear has to compromise, part of Firefox is written in a memory safe language and the…
It s not unusual for a Firefox test to have to wait for various things such as a tab loading. But recently I needed to write a test that loaded a content tab with a web worker and wait for that before observing the result in a different tab. I am writing this for my own reference in the future, and if it helps someone else, that s extra good. But I don t think it will be of much interest if you…
The are we slim yet (AWSY) benchmark measures memory usage. Recently when I made a simple change to firefox and expected it might save a bit of memory, it actually increased memory usage on the AWSY benchmark. We have lots of tools to hunt down memory usage problems. But to see an almost "log" of when garbage collection and cycle collection occurs, the Firefox profiler is amazing. I wanted to…
I asked, and have been given a new project at work. Together with another engineer I will be working on reducing Firefox s memory footprint. Mozilla has run a MemShrink project in the past , which even though it has wound-down, Firefox is still regarded as being more memory efficient than Chrome and the other chromium-based browsers. However keeping this accolade is going to be difficult. Lately…
A recent change to Plasma caused me to think choices that various languages make with regard to case in their grammar. I originally assumed there are just two choices in certain grammars, Case sensitivity or sigils. But there are some other options and I ll share them here. Parsing Computer languages are compiled or interpreted in a number of stages. The first four stages are: Tokenisation (aka…
You may have heard recent news of the changes happening at Mozilla where I work. As part of those changes we ve also re-organised ( reorg d ) many teams and individuals. My team assignment has changed and I no-longer work on SpiderMonkey s garbage collector. This is a bit of a bummer because I was hoping to make memory management and garbage collection my career focus and become an expert, like I…
Whenever discussing CPU-bound performance (at least in the last 10-15 years) CPU cache is almost always a dominant factor. However often people say "oh probably cache" when explaining away some observation. They re probably right, but let s dive a little deeper into how exactly a modern CPU cache (or caches) works. We re going to learn how to unpack jargon such as: Level 1 32KB i-cache and 32KB…
While implementing closures in Plasma I hit this problem and think it might be an interesting example to demonstrate where theory and practice meet in programming language implementation. Lambda expressions are anonymous (lambda expression means anonymous function). and because things need to be named so we can refer to them (in most languages) a lambda expression cannot refer to itself and be…
Last year, for over half a year I was in the practice of writing company-wide e-mails, bothering everyone at Mozilla, about why I wouldn t be at work the next day due to a public holiday. It started with the most hilarious holiday the "Friday before the AFL grand final public holiday" (remind me this September, and I ll explain) and finished after we got into some much less fun holidays such as…