Skip to content

Instantly share code, notes, and snippets.

View jaredramirez's full-sized avatar

Jared Ramirez jaredramirez

View GitHub Profile

Builtin Bitcode Generations

Currently, Roc generates builtin functions for things thare are not provided as an LLVM intrensic. The way this is done is by writing the functions in Rust, the compiling with rustc and emiting LLVM bitcode. Then, the compiler uses that file as a base and adds to it as part of the code gen process. So far this is working great, but there seems to be a limitation to this approach. To compile Rust to LLVM bitcode, you can't use external crates. This effects the builtins we write in two major ways:

  1. You can't use any code from crates.io
  2. Relatedly, you can only use rust primitives (no core or std)

When adding the Num.atan function, which doesn't have an LLVM intrensic, we tried to use the libm crate. After running into the problem mentioned above, we ended up copying just the atan function from the crate into the Roc module. While this works in a one-off case, it's not an ideal solution long term. This came up again sho

module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 15,
// font family with optional fallbacks
// Inconsolata-g for Powerline
// Roboto Mono for Powerline
// Ubunto Mono derivative Powerline
// Menlo of Powerline
@jaredramirez
jaredramirez / keybase.md
Created March 28, 2018 00:05
Verify my account to keybase

Keybase proof

I hereby claim:

  • I am jaredramirez on github.
  • I am jaredramirez (https://keybase.io/jaredramirez) on keybase.
  • I have a public key ASAb6GX4rP3VVI0UyYVKB6GnXarWbSVP-Hk8rW5OvW-qIwo

To claim this, I am signing this object: