Skip to content

Instantly share code, notes, and snippets.

@q3k
q3k / hashes.txt
Last active November 11, 2024 17:38
liblzma backdoor strings extracted from 5.6.1 (from a built-in trie)
0810 b' from '
0678 b' ssh2'
00d8 b'%.48s:%.48s():%d (pid=%ld)\x00'
0708 b'%s'
0108 b'/usr/sbin/sshd\x00'
0870 b'Accepted password for '
01a0 b'Accepted publickey for '
0c40 b'BN_bin2bn\x00'
06d0 b'BN_bn2bin\x00'
0958 b'BN_dup\x00'
@hirrolot
hirrolot / a-preface.md
Last active November 16, 2024 13:35
A complete implementation of the positive supercompiler from "A Roadmap to Metacomputation by Supercompilation" by Gluck & Sorensen

This is the predecessor of Mazeppa.

Supercompilation is a deep program transformation technique due to V. F. Turchin, a prominent computer scientist, cybernetician, physicist, and Soviet dissident. He described the concept as follows [^supercompiler-concept]:

A supercompiler is a program transformer of a certain type. The usual way of thinking about program transformation is in terms of some set of rules which preserve the functional meaning of the program, and a step-by-step application of these rules to the initial program. ... The concept of a supercompiler is a product of cybernetic thinking. A program is seen as a machine. To make sense of it, one must observe its operation. So a supercompiler does not transform the program by steps; it controls and observes (SUPERvises) the running of the machine that is represented by th

@o11c
o11c / every-vm-tutorial-you-ever-studied-is-wrong.md
Last active November 16, 2024 06:07
Every VM tutorial you ever studied is wrong (and other compiler/interpreter-related knowledge)

Note: this was originally several Reddit posts, chained and linked. But now that Reddit is dying I've finally moved them out. Sorry about the mess.


URL: https://www.reddit.com/r/ProgrammingLanguages/comments/up206c/stack_machines_for_compilers/i8ikupw/ Summary: stack-based vs register-based in general.

There are a wide variety of machines that can be described as "stack-based" or "register-based", but not all of them are practical. And there are a lot of other decisions that affect that practicality (do variables have names or only address/indexes? fixed-width or variable-width instructions? are you interpreting the bytecode (and if so, are you using machine stack frames?) or turning it into machine code? how many registers are there, and how many are special? how do you represent multiple types of variable? how many scopes are there(various kinds of global, local, member, ...)? how much effort/complexity can you afford to put into your machine? etc.)

  • a pure stack VM can only access the top elemen
@ShepherdSoasis
ShepherdSoasis / main.rs
Last active March 24, 2024 07:04
An example of serde's basic Serialize trait, implemented generically over any enumeration or structure.
use serde::Serialize;
struct Point {
x: i32,
y: i32,
}
fn main() {
let point = Point { x: 1, y: 2 };
;; curl -d 'id="1234"' -X POST 'http://localhost:65535/?name=otee'
(defn handler-that-needs-keyword-params
[{params :params}]
;; the following will return this response map:
;; {:body "Hello otee your ID is: 1234" ...}
(ring.util.response/response "Hello" (:name params) " your ID is: " (:id params)))
@dfr
dfr / buildah-install.md
Last active September 4, 2023 21:52
FreeBSD podman tech demo

This will pull in source code for podman, buildah and related modules, build everything and install to /usr/local. This all happens in a directory named 'build' which can be deleted to clean up or to force a clean build.

mkdir -p build
fetch https://gist.github.com/dfr/ac4dc043ee3780b690c5887a61f53494/raw/1e55da486792ffda61c9d6070d5d834888be9590/buildah-install.sh
chmod +x buildah-install.sh
(cd build && ../buildah-install.sh)

Make a container and run things inside it:

@leocosta037
leocosta037 / techday_upe_acesso_gcp.ipynb
Created September 30, 2021 17:25
TechDay_UPE_Acesso_GCP.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leocosta037
leocosta037 / techday_upe_acesso_azure.ipynb
Last active October 8, 2021 17:43
TechDay_UPE_Acesso_Azure.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@leocosta037
leocosta037 / techday_upe_acesso_aws.ipynb
Created September 30, 2021 17:01
TechDay_UPE_Acesso_AWS.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@giggio
giggio / palestra-rust-from-scratch.md
Last active July 29, 2024 02:47
Links da palestra "Montando um micro container FROM scratch com Rust"