Frederik Handberg's avatar
Frederik Handberg
npub1nj0c...2gqz
23 🇩🇰 Studying for a degree in Software Engineering 💻 I enjoy building mobile/desktop apps and embedded projects and working on massive heavy-lift drones. Also learning to sew garments as a hobby to tailor clothes for myself 🪡 I mostly share progress updates as I'm working on my software and drone projects, and as I learn to sew. Basically, I just write about my hobbies...
Fire reported in apartment building on Fredensgade in 8700 Horsens. #press
Now the corner radius slider in 'Canvas' settings is working! It correctly adjusts the corner radius of objects in canvas files. I also added support for mouse-wheels, so that it can now zoom in and out of the canvas. #dev #Swift #SwiftUI #AppKit View quoted note →
I have been working on the settings window for my #macOS notes app. image I have an option to adjust the corner radius of objects in canvas files. This option currently does nothing, because I haven't added the functionality to the canvas ViewModel yet.
My #macOS notes app is improving! It is now possible to search for where a specific word or sentence is occurring in Markdown files. I also have these preview overlays that appear when hovering a file. For example, when hovering an image file, it will show a small preview of that image. If I hover an empty Markdown or canvas file, it will just show an empty preview. In this case, I should probably just add a label saying something like the file is empty... #dev
It’s kinda crazy to consider how much LLMs have improved since late 2022. I think it was around November or December that the first GPT model became publicly accessible. Now 3,5 years later and we got models that completely wipe the floor with what we had just 3 years ago. The pace of innovation is wild!
The future of desktop application frameworks is looking really interesting! Would like to try GPUI and maybe Vercel Native SDK. It is very important to me that Linux support is top-notch. Vercel Native uses native WebView which is a problem for Linux as its native WebView sucks (`WebKitGTK`). Vercel Native just seems like a Tauri alternative, so I don’t find it to be that interesting… GPUI seems much cooler. I have heard about it before but many years ago and was not very mature at that point. It does not use web technologies, which is part of what I find cool about it. Instead it uses Vulkan or alternative rendering engines.
It might not seem to make much sense why you would even want 20 or so separate textviews rather than just having one massive textview: nevent1qgsfe8upa4u47r67lf2cjv5zg6rasn78u6jvlfkmt4knk58ukll6assqyz8rz64sjcjhkhqg4jvh59agc5ac6rd0px0s7p4gzdq9m3mtzd4759yxm5p You could just use a single `NSTextView` and then inject #SwiftUI views into that textview. This can be achieved with `NSTextAttachmentViewProvider`: I wouldn't say that it's easy to get working - at least I found it quite complicated. In fact, I found it so complicated that I initially scratched using `NSTextAttachmentViewProvider`, and just used separate textviews for my block-based editor. This meant, each block was its own textview. For example, if you have 50 blocks in your note document, that might be 40 textviews and 10 SwiftUI `Image` views. This was a serious performance killer for my macOS app, but it also made it a horrible UX, as you cannot by default navigate the caret across different textviews. I did actually find a solution to this problem: But it was complicated and took a ton of trial and error before it finally worked 😂
I've been doing native macOS dev for about a year now, and I have found it so much easier to get good performance from a webapp compared to native. I think part of it is just SwiftUI being quite bad performance-wise. If you want to have horrible performance in your app, show 20 different `NSTextView`'s in a `ScrollView` and try have a sidebar that can open/close so that it changes the width of textviews - because when it closes, there is more available space, so make the textviews stretch to fill all the available space. This kills performance 😂
Finished ‘The Chaos Machine’ by Max Fisher. Next #book to read: ‘Enshittification’ by Cory Doctorow. image
Been fighting with #AppKit and #SwiftUI to solve a height calculation problem. Seems like sometimes AppKit does not realize that the height of the SwiftUI code block view has changed. This leads to a problem when the code block grows in height (e.g. when adding more lines) and then it eventually starts overlapping other elements in the Markdown editor. image I am using `NSTextAttachment` to embed an interactive SwiftUI view as a `NSHostingView` inside `NSTextView`. It's really powerful but I also find it so difficult to work with. Especially when needing to share states/updates between the `HostingView` and the `NSTextView` (which is the outer Markdown editor that the code block is embedded into). Codex seems to have finally found a semi-working solution to the height calculation problem. At least it works when I open the MD file, close it and reopen, then I can add more lines in code block and the editor will correctly update its height to accommodate the growing code block. However, if I just open the MD file immediately after having started the app, then begin adding more lines, it will not tell AppKit's `NSTextView` about the height changes leading to overlapping issues. #dev #macOS View quoted note →
The Codex CLI is so much more readable than the Antigravity CLI. Been using Gemini for a few months now as the only LLM, because I got it for free (student discount). It's not bad but GPT-5.5 does feel like an improvement and the CLI is much nicer to look at.