Short version: I'm selling my Star Labs Starbook. I'm just not using it enough.
- Model: Star Labs Starbook 14-inch
- OS: Ubuntu (I'll wipe and reinstall Ubuntu)
- CPU: 2.10GHz 12-core Intel i7-1260P, Turbo Boost up to 4.70GHz
- RAM: 32GB 3200MHz DDR4
use anyhow::Result; | |
use std::convert::Infallible; | |
use warp::Filter; | |
struct Deferred<T: FnOnce()> { | |
task: Option<T>, | |
} | |
impl<T: FnOnce()> Deferred<T> { | |
fn abort(&mut self) { |
{ | |
"name": "Snazzy", | |
"appearance": "dark", | |
"style": { | |
"background.appearance": "opaque", | |
"border": "#1d2433", | |
"border.variant": "#1d2433", | |
"border.focused": "#8695b777", | |
"border.selected": "#1d2433", | |
"border.transparent": "#1d2433", |
package main | |
import ( | |
"fmt" | |
"log" | |
"os/exec" | |
"time" | |
) | |
func main() { |
// Compile with: | |
// gcc $(pkg-config --cflags gtk4) -o main ./main.c $(pkg-config --libs gtk4) && ./main | |
// | |
// Run with: | |
// ./main | |
// | |
// Reproduce issue: | |
// | |
// 1. Click on Page 2 | |
// 2. Select "view3" and type something. |
import SwiftUI | |
struct ContentView: View { | |
@EnvironmentObject private var appDelegate: AppDelegate | |
var body: some View { | |
let confirmQuitting = Binding<Bool>(get: { | |
self.appDelegate.confirmQuit | |
}, set: { |
use std::{ | |
alloc::{self, Layout}, | |
mem::size_of, | |
}; | |
use crate::{ | |
heap::{AllocError, AllocResult}, | |
object::ObjectHeader, | |
raw::RawPtr, | |
}; |
[gchb]: https://gchandbook.org/ | |
[clawing]: https://blog.mozilla.org/javascript/2013/07/18/clawing-our-way-back-to-precision/ | |
[gsgc]: https://piumarta.com/software/gsgc/index.shtml | |
[migc]: https://github.com/playXE/migc | |
[yarpenruntime]: https://github.com/mdlugajczyk/yarpen/blob/master/runtime/yarpen_runtime.c | |
[bdwgc]: https://www.hboehm.info/gc/ | |
[bdwgcslides]: https://www.hboehm.info/gc/04tutorial.pdf | |
[bdwdescr]: https://hboehm.info/gc/gcdescr.html | |
[writinginterpretersinrust]: https://rust-hosted-langs.github.io/book/introduction.html | |
[gcandrustpart0]: http://blog.pnkfx.org/blog/2015/10/27/gc-and-rust-part-0-how-does-gc-work/ |
Compile and run both files with (on Linux x86):
rustc --crate-type=staticlib gc_experiment4.rs && \
gcc -O0 -g -o gc_experiment4 gc_experiment4.c -lgc_experiment4 -L. && \
./gc_experiment4
This will output the following:
UPDATE: See "Update" below
What can cause unaligned pointers to end up on my stack? Or: what, on my stack, can look like unaligned pointers?
Context is that I'm trying to write a conservative GC. I want to scan the stack for things that look like pointers (and then mark them, but I'm not at that point yet). I copied & hacked together some code from other GCs I found, which essentially does the following:
%rbp
away as the "stack bottom" (highest address)%rbp
away as "stack top" (lowest address)