Skip to content

Instantly share code, notes, and snippets.

@phase
phase / zig-compiler.zig
Created March 4, 2024 15:09
a bunch of files from https://github.com/ziglang/zig/tree/master/src concatenated together
This file has been truncated, but you can view the full file.
//! Analyzed Intermediate Representation.
//! This data is produced by Sema and consumed by codegen.
//! Unlike ZIR where there is one instance for an entire source file, each function
//! gets its own `Air` instance.
const std = @import("std");
const builtin = @import("builtin");
const assert = std.debug.assert;
const Air = @This();
@phase
phase / melior_usage.rs
Created February 21, 2024 16:50
melior_usage.rs
fn _main() {
println!("Hello, world!");
let registry = DialectRegistry::new();
register_all_dialects(&registry);
let context = Context::new();
context.append_dialect_registry(&registry);
context.load_all_available_dialects();
pip3 install PyQt5
Defaulting to user installation because normal site-packages is not writeable
Collecting PyQt5
Downloading PyQt5-5.15.9.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 3.0 MB/s
WARNING: Value for prefixed-purelib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/2_/ccbsgkgs3jbdy203zz5yxy5c0000gn/T/pip-build-env-g6vbgij4/normal/lib/python3.9/site-packages
sysconfig: /Library/Python/3.9/site-packages
WARNING: Value for prefixed-platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /private/var/folders/2_/ccbsgkgs3jbdy203zz5yxy5c0000gn/T/pip-build-env-g6vbgij4/normal/lib/python3.9/site-packages
> install.packages("batchtools")
Installing package into ‘/home/jaf582/R/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lifecycle’, ‘vctrs’, ‘hms’, ‘base64url’, ‘checkmate’, ‘progress’
trying URL 'http://cloud.r-project.org/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
==================================================
downloaded 104 KB
@phase
phase / o.zig
Created February 5, 2023 04:01
pub const __builtin_bswap16 = @import("std").zig.c_builtins.__builtin_bswap16;
pub const __builtin_bswap32 = @import("std").zig.c_builtins.__builtin_bswap32;
pub const __builtin_bswap64 = @import("std").zig.c_builtins.__builtin_bswap64;
pub const __builtin_signbit = @import("std").zig.c_builtins.__builtin_signbit;
pub const __builtin_signbitf = @import("std").zig.c_builtins.__builtin_signbitf;
pub const __builtin_popcount = @import("std").zig.c_builtins.__builtin_popcount;
pub const __builtin_ctz = @import("std").zig.c_builtins.__builtin_ctz;
pub const __builtin_clz = @import("std").zig.c_builtins.__builtin_clz;
pub const __builtin_sqrt = @import("std").zig.c_builtins.__builtin_sqrt;
pub const __builtin_sqrtf = @import("std").zig.c_builtins.__builtin_sqrtf;
@phase
phase / read-dt.org
Created December 18, 2022 04:17 — forked from queertypes/read-dt.org
Implement a Dependently Typed Language and Then Some
@phase
phase / animint.js
Created November 9, 2022 23:48
AUM and intersections
// Define functions to render linked interactive plots using d3.
// Another script should define e.g.
// <script>
// var plot = new animint("#plot","path/to/plot.json");
// </script>
// Constructor for animint Object.
var animint = function (to_select, json_file) {
function wait_until_then(timeout, condFun, readyFun) {
var args=arguments
Running line intersection with 347 lines.
starting with intersection point: high line=13 low line=14 x=3.50007 y=-20.633
starting with intersection point: high line=19 low line=20 x=2.37283 y=-14.2739
starting with intersection point: high line=36 low line=37 x=2.99357 y=-20.8263
starting with intersection point: high line=49 low line=50 x=4.27096 y=-7.29872
starting with intersection point: high line=57 low line=56 x=0.167473 y=-17.9679
starting with intersection point: high line=61 low line=62 x=1.48269 y=-15.4617
starting with intersection point: high line=70 low line=71 x=1.39512 y=-17.1902
starting with intersection point: high line=82 low line=83 x=3.6291 y=-19.7445
starting with intersection point: high line=92 low line=93 x=4.77405 y=-20.9776
@phase
phase / animint.js
Created October 3, 2022 03:55
AUM and intersections
// Define functions to render linked interactive plots using d3.
// Another script should define e.g.
// <script>
// var plot = new animint("#plot","path/to/plot.json");
// </script>
// Constructor for animint Object.
var animint = function (to_select, json_file) {
function wait_until_then(timeout, condFun, readyFun) {
var args=arguments
@phase
phase / animint.js
Created September 29, 2022 18:23
AUM and intersections
// Define functions to render linked interactive plots using d3.
// Another script should define e.g.
// <script>
// var plot = new animint("#plot","path/to/plot.json");
// </script>
// Constructor for animint Object.
var animint = function (to_select, json_file) {
function wait_until_then(timeout, condFun, readyFun) {
var args=arguments