Skip to content

Instantly share code, notes, and snippets.

@NoraCodes
NoraCodes / work_queue.rs
Last active February 21, 2024 15:27
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@mrnugget
mrnugget / gc_resources.md
Created February 26, 2023 12:11
Resources I used so far (26 feb 2023) to build a GC for my toy compiler
[gchb]: https://gchandbook.org/
[clawing]: https://blog.mozilla.org/javascript/2013/07/18/clawing-our-way-back-to-precision/
[gsgc]: https://piumarta.com/software/gsgc/index.shtml
[migc]: https://github.com/playXE/migc
[yarpenruntime]: https://github.com/mdlugajczyk/yarpen/blob/master/runtime/yarpen_runtime.c
[bdwgc]: https://www.hboehm.info/gc/
[bdwgcslides]: https://www.hboehm.info/gc/04tutorial.pdf
[bdwdescr]: https://hboehm.info/gc/gcdescr.html
[writinginterpretersinrust]: https://rust-hosted-langs.github.io/book/introduction.html
[gcandrustpart0]: http://blog.pnkfx.org/blog/2015/10/27/gc-and-rust-part-0-how-does-gc-work/