This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # I happened to be looking at some of Cranelift's code, and I noticed that their constant-time dominates() | |
| # check was using a somewhat more ad-hoc version of a hidden gem from the data structures literature called the | |
| # parenthesis representation for trees. As far as I know, this was invented by Jacobson in his 1989 paper | |
| # Space-Efficient Static Trees and Graphs. I first learned about it from the slightly later paper by Munro and Raman | |
| # called Succinct Representations of Balanced Parentheses and Static Trees. I figured I'd give it an extremely | |
| # quick intro and then show how it leads to a (slightly better) version of Cranelift's algorithm. | |
| # | |
| # This parenthesis representation of trees is surprisingly versatile, but its most striking feature is that | |
| # it lets us query the ancestor relationship between two nodes in a tree in constant time, with a few instructions. | |
| # And the idea is extremely simple and intuitive if you just draw the right kind of picture. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git i/Cargo.toml w/Cargo.toml | |
| index 8e89e5ef3..c8e920051 100644 | |
| --- i/Cargo.toml | |
| +++ w/Cargo.toml | |
| @@ -61,7 +61,7 @@ arrow = { version = "51.0.0", features = ["prettyprint"] } | |
| arrow-array = { version = "51.0.0", default-features = false, features = ["chrono-tz"] } | |
| arrow-buffer = { version = "51.0.0", default-features = false } | |
| arrow-flight = { version = "51.0.0", features = ["flight-sql-experimental"] } | |
| -arrow-ipc = { version = "51.0.0", default-features = false, features = ["lz4"] } | |
| +arrow-ipc = { version = "51.0.0", default-features = false, features = ["lz4", "zstd"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env EDITOR=nvim | |
| env GIT_EDITOR=nvim | |
| env VISUAL=nvim | |
| env LANG="en_US.UTF-8" | |
| env LANGUAGE="en_US.UTF-8" | |
| env LC_ALL="en_US.UTF-8" | |
| env CLICOLOR=1 | |
| env SSH_AUTH_SOCK=${HOME}/.ssh/.ssh-agent.sock | |
| env LESS="-rX" | |
| env PAGER=less |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VERSION = \"1.0.0\" | |
| PREFIX ?= out | |
| INCDIR = inc | |
| SRCDIR = src | |
| LANG = c | |
| OBJDIR = .obj | |
| MODULE = binary_name | |
| CC = gcc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #define DYN_ARR_OF(type) struct { \ | |
| type *data; \ | |
| type *endptr; \ | |
| uint32_t capacity; \ | |
| } | |
| #if !defined(__cplusplus) | |
| #define decltype(x) void* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- Autoconf -*- | |
| # Process this file with autoconf to produce a configure script. | |
| # | |
| # Description: configure.ac | |
| # Autonconf produce a ./configure from this file | |
| # that's used to discover various programs/dependencies | |
| # usage: autoconf | |
| # | |
| # Authors: paul_c alex_joni jepler | |
| # License: GPL Version 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Protobuf261 < Formula | |
| desc "Protocol buffers - Google data interchange format" | |
| homepage "https://github.com/google/protobuf/" | |
| stable do | |
| url "https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2" | |
| sha256 "0a2f8533b2e0587a2b4efce0c4c8aea21bbfae1c41c466634d958dedf580f6aa" | |
| # Fixes the unexpected identifier error when compiling software against protobuf: | |
| # https://github.com/google/protobuf/issues/549 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define emit printf) | |
| (define (compile exp) | |
| (cond | |
| [(fixnum? exp) (emit "push ~a~%" exp)] | |
| [(eq? '+ (car exp)) (begin | |
| (compile (cadr exp)) | |
| (compile (caddr exp)) | |
| (emit "pop eax~%") | |
| (emit "pop ebx~%") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // is_throttled should throttle a request per api to 10 requests per second | |
| function is_throttled(...) { | |
| } | |
| function api($endpoint) { | |
| if (is_throttled(...)) { | |
| return "429 too soon"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // is_throttled should throttle a request per api to 10 requests per second | |
| function is_throttled(...) { | |
| } | |
| function api($endpoint) { | |
| if (is_throttled(...)) { | |
| return "429 too soon"; | |
| } |
NewerOlder