So typically when you want to make your own compiled language you need a compiler to.. well.. compile it into something useful. Then making it work across a wide range of operating systems and CPU architectures is a huge effort, let alone having it be performant. This is where LLVM1 comes in.
You can scan through your source code, parse it into an Abstract Syntax Tree (AST) then generate some abstract language (let’s call this Intermediate Representation) which LLVM can understand, LLVM says “Thanks! We’ll take it from here”.
Its been a while since I’ve posted about debugging rust, we’ve come a long way since 2017 and I wanted to do an update on getting set up for Rust Debugging.
The minimal functionality made it easier to get through specification and into the real world, but this can leave developers with limitations.
Before we start looking at Rust code, lets go through our dev environment. I use Visual Studio Code with the Rust (RLS) plugin. This plugin is fantastic, and covers pretty much everything you need Rust wise, the Rust Language Server sets itself up mostly, but its worth checking out the Github page and following the steps.
If Sublime is more your thing, check out the Rust Enhanced plugin for Sublime Text 3. It has virtually the same functionality, and with a bit of extra setup you can get the Rust Language Server running too.
I also use Rustup, Rustup is great for managing your Rust version, switching to nightly/stable or adding some additional toolchains.
Finally, to follow along just clone https://github.com/jasonwilliams/boa
So I’ve decided to have a go at building a JS interpreter in Rust. I’ve wanted to do this for a while for a couple of reasons:
I don’t know about you, but I’ve been in situations where modules or random scripts get loaded into the page and i’m not sure what brought them in.
My first step is to open up Dev Tools and check the networks panel, then look at the initiator column. If you haven’t seen this column before it’s a great way to see what the dependencies are for scripts, or what originally initiated the download of an asset such as a CSS or JS file. You can find more out about the initiator column here.
Paddles on carousels and when to display them have always been an ongoing topic within the BBC.
There are various approaches which may work for some users but not others, and I’d like to propose a solution which often works well for us.
But first.. An example.
Below is the 6 Music homepage, we keep the paddles on below the scroll bar and visible at every breakpoint.
In case you didn’t know there is an official Rust Package for Sublime Text 3. Its called Rust Enhanced, and we’ve had a great year in 2017. During September – October Rust Enhanced made it into the top 15 trending Sublime Packages on package control, and received over 50k downloads, so this calls for some celebration!.