Khan Winter
@khanwinter.com
660 followers 290 following 870 posts
Computer Engineer, UMN24. WWDC2020 Scholar. Building @codeedit.app on GitHub. Blog at https://khanwinter.com
Posts Media Videos Starter Packs
Pinned
I finally got my blog up and running! I wrote a little post testing it out, and talking about my experience using Swift and building my own site generator, check it out

khanwinter.com/2024-11-02-N...
Khan's Blog · New Blog, New Me
I redesigned my blog, in Swift.
khanwinter.com
Ooo that’s good. I used Good Boys Don’t Fly Away when I played trombone
Big self hosted PDS dub today
Reposted by Khan Winter
That’ll still work in embedded mode too. Hell yeah
Oh wait I could define the protocol and then just do the type check. No need for the encoding config.

That’d make it way easier to conform a CID type to the required encoding protocol
If anyone has an idea please lmk. Especially if it would work in a more idiomatically Swift way of things 5/5
My issues with this idea are threefold:
- Potential performance degradation due to dynamic type lookup on every non-stdlib type being encoded
- it’s just an odd API
- I’m not sure I can continue to support WASM/Embedded mode with this API (due to the runtime type lookup) 4/5
My current idea is to expose a property like `cidType: CIDProvider` on the encoder options. It’ll then check types as they come and encode the cid with the correct tag if it is of that type. It’ll also require the type to be able to provide the actual byte string to encode. 3/5
I’ve got all of the extra encoding semantics down, as well as some extra flexibility when decoding (due to not supporting tagged items such as dates). My final issue is figuring out a way to detect when a Data type is a CID object. Not entirely sure yet how to expose this to an API consumer 2/5
I’m now working on adding DAG-CBOR support. I’d like to be able to use this to encode and decode CAR files (although since Swift can’t do a streaming encoder with the built-in APIs it’ll be limited). 🧵1/5
Small update to this library. I’ve added a method for decoding blobs made of concatenated CBOR data, where you may want to decode an array of items.

github.com/thecoolwinte...
Love making little automations in Factorio. This one uses just a clock and SR latch to alternate colors on my rockets!
Meaningless loopback packets. Warm up that WiFi chip.

Also start scanning for BLE devices
I really should learn neovim
Reposted by Khan Winter
Today I needed a bit of code, but instead of asking an LLM I tried writing it myself and wow, this could be a new paradigm
Are the USBs all the same or are they like a laptop USB? It looks like maybe a timing bug but maybe the pico is being underpowered by the USB source, making the clock slow down?
Reposted by Khan Winter
In my opinion it’s time to retire the Nobel prizes for fields where most of the important discoveries have already been made, like physics, and add prizes for newer fields where substantial innovations occur every year, like speedrunning
Dang, I once had a guy kindly offer me like 30/70 to make him a poker hand training app (no money up front it was gonna be the next Facebook of app ideas)
Saw only two people the entire two day trip (and both were in the final mile). I suppose it was a weekday…
Finished my first solo backpacking trip! The north shore is gorgeous, still my favorite region in the entire world.

Did about 12 miles total on the Superior Hiking Trail, with an extra half mile in there where I got lost on another trail. Rained a little overnight but still a great trip
Ironically I just saw a post from 3 months ago on For You and was very confused
that would be perfect imo for like little things that could eventually scale up to a whole appview implementation. Great idea
The worst part about being away from home is I can’t view my graphs ;(