Skip to content

Instantly share code, notes, and snippets.

View astrolemonade's full-sized avatar
🔍
Happiness should be a pure function without any parameters.

astrolemonade astrolemonade

🔍
Happiness should be a pure function without any parameters.
View GitHub Profile
@divs1210
divs1210 / stackless-eval.md
Last active February 8, 2026 00:11
Writing a Stackless Evaluator

Writing a Stackless Evaluator

Divyansh Prakash, September 2023

tiny-stackless-eval

Preface

NOTE: Please read the previous post to understand the context of this post.

@Alex-Schaefer
Alex-Schaefer / bambu-ssdp-discovery.py
Last active May 3, 2026 12:49
Python implementation to send a fake SSDP discovery message to Bambu Studio or Orca Slicer
# Derived from this: https://github.com/gashton/bambustudio_tools/blob/master/bambudiscovery.sh
# Python implementation without need for linux
# Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on.
# Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message.
# But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp).
# Temporary solution to BambuStudio not allowing you to manually specify the Printer IP.
# Usage:
@AndrasKovacs
AndrasKovacs / ZeroCostGC.md
Last active July 18, 2026 08:14
Garbage collection with zero-cost at non-GC time

Garbage collection with zero cost at non-GC time

Every once in a while I investigate low-level backend options for PL-s, although so far I haven't actually written any such backend for my projects. Recently I've been looking at precise garbage collection in popular backends, and I've been (like on previous occasions) annoyed by limitations and compromises.

I was compelled to think about a system which accommodates precise relocating GC as much as possible. In one extreme configuration, described in this note, there

use core::ptr::NonNull;
use core::alloc::Layout;
pub trait Alloc {
/// allocates a block of memory.
///
/// - if the call succeeds:
/// - the returned pointer refers to a live allocation.
/// - `layout` is the active layout of the returned memory block.
import re
tpp = """
┌────┐
╭───┤ ├───╮
│ │ │ │
[MO] [23] │ ⌾ └────┘ ⌾ │ [BAT]
[MI] [19] │ ⌾ ▣ │ ⏚
[SCK] [18] │ ⌾ ⌾ │ [5V]
[SS] [ 5] │ ⌾ ⌾ │ [3V3]
[SCL] [22] │ ⌾ ⌾ │ [ 4] [TCH0] [ADC2-0] [RTC10]

Install Go using asdf for Visual Studio Code on macOS

I had a lot of issues trying to install Golang on macOS using asdf package manager to develop on Visual Studio Code.

So here's the steps needed to setup it properly:

Open Terminal and install asdf with this command:

You have to install Homebrew before running the installation command.

@hirrolot
hirrolot / CoC.ml
Last active July 6, 2026 19:30
How to implement dependent types in 80 lines of code
type term =
| Lam of (term -> term)
| Pi of term * (term -> term)
| Appl of term * term
| Ann of term * term
| FreeVar of int
| Star
| Box
let unfurl lvl f = f (FreeVar lvl)
const SPEEEEEED: bool = 1==1;
pub mod reg {
#[derive(Clone, Copy, Debug)]
#[repr(align(4))]
pub enum Instruction {
LoadInt { dst: u8, value: i16 },
import {Layout, LayoutProps} from "@motion-canvas/2d/lib/components"
import {Rect, Vector2} from "@motion-canvas/core/lib/types";
import {initial, property} from "@motion-canvas/2d/lib/decorators"
import {all, delay, sequence, waitFor} from "@motion-canvas/core/lib/flow";
import {Signal} from "@motion-canvas/core/lib/utils";
import {drawRoundRect} from "@motion-canvas/2d/lib/utils";
import {linear} from "@motion-canvas/core/lib/tweening";
import {decorate, threadable} from "@motion-canvas/core/lib/decorators"
import {ThreadGenerator} from "@motion-canvas/core/lib/threading";