Chris Allen ☦︎ 希腊天主教 ☦️🇻🇦's Avatar

Chris Allen ☦︎ 希腊天主教 ☦️🇻🇦

@chris.bitemy.app

程序员 | 一千个敌人的王子 | 拜占庭 米塞斯 党团 | Πρίγκιπας με μυριάδες εχθρούς

15 Followers  |  69 Following  |  23 Posts  |  Joined: 07.08.2024  |  2.167

Latest posts by chris.bitemy.app on Bluesky

Preview
Oxide's $100M Series B | Oxide and Friends | Episode 24 Oxide raised its $100M Series B round of venture capital. Oxide's founders, Bryan and Steve, answer questions selected by Adam from social media about the round, the company, and the future.In additio...

New on the pod: Oxide raises $100M and the Internet tells us how they feel about it. share.transistor.fm/s/76086f29

09.08.2025 14:29 — 👍 32    🔁 5    💬 0    📌 0

Austin programming competition where the prizes are rodeo-style belt buckles. Make it happen.

26.07.2025 23:47 — 👍 4    🔁 1    💬 0    📌 0

Can any Windows GPU sync experts confirm how resource sync is supposed to work?

The IDXGIKeyedMutex::ReleaseSync docs are very vague, but what dxvk does is:

- The keyed mutex behaves like a software mutex mostly, plus
- ReleaseSync does a full blocking GPU-CPU wait on the resource

27.07.2025 16:30 — 👍 34    🔁 2    💬 2    📌 0
Preview
a cat is laying on a bed under a blanket and the word gn is above it ALT: a cat is laying on a bed under a blanket and the word gn is above it
21.06.2025 06:49 — 👍 3    🔁 0    💬 0    📌 0
Post image

After hearing this a lot: "no debugger = no Zed"—we’re excited to share that Zed's Debugger has finally launched! 🎉

zed.dev/debugger

18.06.2025 17:56 — 👍 211    🔁 38    💬 11    📌 12

Is Clarkhat Best Hat?

Y/N: Y

19.06.2025 06:45 — 👍 0    🔁 0    💬 0    📌 0

nnCompatTrampoline is a beautiful name for a shared library

05.06.2025 09:30 — 👍 591    🔁 10    💬 3    📌 0

Please send your book proposals to editors@nostarch.com. We review them weekly.

Some key topics of interest: Go, Rust, coffee table books like Engineering in Plain Sight, Open Circuits, Game Console. Books for nerds, geeks, hackers. Cyber, cyber, cyber, etc.

30.12.2024 21:44 — 👍 19    🔁 8    💬 1    📌 0

Well I guess you may want to know what the heck it was... The problem was running the redis-server in one terminal, and executing the test in the other. Apparently if they spawned from the same process, their affinity is greater. LOLWUT.

28.12.2024 09:45 — 👍 51    🔁 1    💬 6    📌 0

yeah that doesn't make any sense to me. I'm probably missing something here.

28.12.2024 14:48 — 👍 0    🔁 0    💬 0    📌 0

For enums (sum types) what you want is called a prism, for structs (product types) it's a lens. There's a lot of options here, just depends on how much type-safety/convenience you want.

25.12.2024 19:30 — 👍 1    🔁 0    💬 1    📌 0
Value in serde_json::value - Rust Represents any valid JSON value.

Here are some options I found:

- docs.rs/serde_json/l...
- use the existing API and ? away the fallible parts between .as_object etc. calls
- docs.rs/json-patch/l...
- docs.rs/smart_access... is the freshest lens alternative I can find. May need to add serde_json integration.

25.12.2024 19:30 — 👍 1    🔁 0    💬 1    📌 0

The thing lens would make easier is it's designed to enable setters in addition to getters. I can't see anything about "setters" in serde_json_path so that might be the gotcha.

25.12.2024 19:21 — 👍 0    🔁 0    💬 1    📌 0

You could try using something like lens for this but it isn't likely to be easier than serde_json_path.

25.12.2024 19:20 — 👍 1    🔁 0    💬 1    📌 0

You can still ask for the borrow checker's assistance in unsafe code in some instances as well. I agree with you, It's a lot better than writing C.

12.12.2024 17:25 — 👍 1    🔁 0    💬 0    📌 0

I also didn't feel like I had a very chunky test input for the benchmark and I feel like I could've done more on the file input & parsing side. I wanted to avoid the redundant iteration of the .lines() for width & height.

12.12.2024 16:53 — 👍 0    🔁 0    💬 0    📌 0

After I applied the optimizations they were both at 155 microseconds, but the recursive one is maybe at risk of blowing the stack on a larger problem input. I could've taken it further but ran out of gas/time. Would've entailed getting rid of all the hashmaps, etc.

12.12.2024 16:51 — 👍 0    🔁 0    💬 1    📌 0
Chris Allen - The cost of hosting is too damn high

bitemyapp.com/blog/cost-to...

12.12.2024 16:47 — 👍 0    🔁 0    💬 0    📌 0
Chris Allen - Rebuilding Rust (Leptos) apps quickly

bitemyapp.com/blog/rebuild...

12.12.2024 16:47 — 👍 0    🔁 0    💬 0    📌 0
Chris Allen - Two memory issues from the last two weeks

bitemyapp.com/blog/two-mem...

12.12.2024 16:47 — 👍 0    🔁 0    💬 0    📌 0

iterative version was spilling registers more between loop iterations in the assembly as well

12.12.2024 16:46 — 👍 0    🔁 0    💬 1    📌 0

memory access in the recursive version might've been more linear and localized, iterative was more scattershot initially. row major vs. column major impacts this.

12.12.2024 16:45 — 👍 0    🔁 0    💬 1    📌 0

The iterative version was eating it harder on the Vec reallocation initially I think. It seemed like it had more calls out to the hashing stuff as well but I'm not confident in that.

Pre-allocating the data structures made the biggest diff but I got iterative from 280 -> 155 micros on 12900K.

12.12.2024 16:43 — 👍 0    🔁 0    💬 1    📌 0

changing point's field type to i32 instead of isize improved both down to around 150-160 microseconds

11.12.2024 05:43 — 👍 0    🔁 0    💬 0    📌 0

row-major indexing in iterative's get_unchecked improved it 3.7%, neck-in-neck now.

11.12.2024 05:39 — 👍 0    🔁 0    💬 2    📌 0

Same change for HashSet in the recursive version dropped it to 217 microseconds to iterative's ~225-230, slightly ahead again.

11.12.2024 05:37 — 👍 0    🔁 0    💬 1    📌 0

I also got rid of the println for benchmarking purposes.

11.12.2024 05:35 — 👍 0    🔁 0    💬 1    📌 0
Post image

I put together a criterion harness, this change improves iterative from being slightly slower than the recursive version to being ~226 microseconds vs. recursive's 270-285 microseconds.

11.12.2024 05:35 — 👍 0    🔁 0    💬 1    📌 0
Post image Post image

I tried it with hyperfine but I'm not sure the input file I used really exercised them enough. Do you have an input file that makes them crank for a bit?

11.12.2024 05:23 — 👍 0    🔁 0    💬 1    📌 0

TÁR Mercenary Cut: Pause TÁR at 01:34:23 when Cate Blanchett falls asleep, then watch BORDERLANDS as if it’s Lydia Tár’s dream, then continue TÁR.

08.08.2024 14:13 — 👍 50    🔁 13    💬 2    📌 2

@chris.bitemy.app is following 18 prominent accounts