Skip to content

Instantly share code, notes, and snippets.

View noriyotcp's full-sized avatar

Noriyo Akita noriyotcp

View GitHub Profile
@noriyotcp
noriyotcp / 000.md
Created September 13, 2019 13:44 — forked from Papierkorb/000.md
Memory Management code taken from my Crystal OS project (AMD64!).

Hello there

This code comes from my operating system project, written in Crystal. The target platform was AMD64, so that's why it uses 64-Bit integers all over the place. The whole thing isn't open (yet?), but I stopped working on it so..

Take what you want from it, however a short source description, e.g. using a in-source comment, to this gist or to me would be really neat :)

@noriyotcp
noriyotcp / 000_HOWTO.md
Last active September 13, 2019 06:48 — forked from Papierkorb/000_HOWTO.md
Dynamic library in Crystal #crystal

Writing a dynamic library in Crystal, and calling it from C

  • Download all files.
  • Build the Crystal part:
crystal build --release --cross-compile --prelude ./no_main library.cr
              ^ You can leave this out
                        ^ We want to link ourselves!
 ^ Use our custom prelude!
@noriyotcp
noriyotcp / 0_reuse_code.js
Created December 10, 2016 07:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console