Divyansh Prakash, September 2023
NOTE: Please read the previous post to understand the context of this post.
Divyansh Prakash, September 2023
NOTE: Please read the previous post to understand the context of this post.
| # 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: |
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] |
| 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"; |