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...
I’m starting my business again selling industrial sewing machines. I received the first two machines just now. #business image
Progress is being made 👨‍💻 It's now possible to make drag selections. It's also now possible to move and resize objects. Holding `Shift` will resize the object proportionally. #dev #AppKit #macOS
I'm working on a new canvas app for #macOS. I already have experience with building infinite canvas apps from working on my notes app (it also has an infinite canvas feature). However, this time I'm building everything in pure #AppKit rather than mixing #SwiftUI and AppKit together. I am doing this as an experiment to test performance differences. SwiftUI is known for it's poor performance and I have certainly experienced that myself from now having used SwiftUI quite extensively. SwiftUI feels very half-baked... Always thought it would be fun to build an app in pure AppKit, so now I am doing it. This will be a pattern drafting app that I will use to create my sewing patterns. So far, the basic functionality of the canvas is working: - Zoom - Pan **Next up:** Be able to move and resize objects in the canvas.
Two cars involved in crash on Strandkærvej-Vejlevej intersection. #press
A few images from the apartment fire that occurred yesterday on Fredensgade in 8700 Horsens. #press
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 →
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
Enjoying the beautiful summer weather with Maya 🐕‍🦺☀️ image
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 😂