Damus
Frederik Handberg profile picture
Frederik Handberg
@frederikhandberg

23 🇩🇰 Studying for a degree in Software Engineering while building fun projects and working freelance as a News Photographer 📷

I share my software projects, photos and videos from my work as a news photographer, and progress updates as I learn to sew garments.

Basically, I just write about my hobbies.

frederikhandberg.com

Relays (4)
  • wss://relay.damus.io – read & write
  • wss://relay.nostr.band – read & write
  • wss://relay.snort.social – read & write
  • wss://nostr.oxtr.dev – read & write

Recent Notes

Frederik Handberg profile picture
I’ve made lots of progress to the visual canvas functionality of my notes app.

Text and image objects work well. They are not finished yet, but the basic functionality works, like moving objects around, changing font size, formatting styles like bold and italic, and so on.

Tomorrow, I should make it possible to select objects by making drag selections. Then I should be able to move all selected objects around together. Clicking backspace should delete all selected objects. I think these features should be fairly easy to implement.

I’m more concerned about how to move the viewport to follow cursor when I move objects around. Like, if I am moving objects and the cursor is near the edge of the window, I want the canvas viewport to move in the cursor’s direction, so that I don’t hit a hard boundary.


I spent quite a bit of time figuring out how to make the zoom in and out gesture working. Luckily there is a modifier called `.gesture(magnification)`, but this will not zoom in at the cursor position which is what I wanted. From my testing, it by default zooms in at the upper left corner.

I also struggled to make two-finger swiping work to pan around the canvas. Interestingly, there is no ready to use API provided by Apple, so I had to figure out my own way.
1
Frederik Handberg · 9h
Oh and also, I need to debug why the corner radius of the image objects aren’t working…
Frederik Handberg · 20h
But on the Claude pro plan you hit the rate limits quite fast if you are working on a complex task. So I have Gemini Pro as well which I use for planning the architecture. Then I get Claude Sonnet 4.5 to implement based on the specifications I made with Gemini 3 Pro. This approach works great for m...
Dr. Hax · 3d
I'm getting bored with nostr. Maybe I'm just following the wrong people, but it seems to be an echo chamber about how great the protocol is and platitudes about bitcoin. Interesting content outside o...
Frederik Handberg profile picture
Yeah. I feel the same way about Nostr. There is a serious lack of diverse content…

I’ll keep using Nostr tho, but that’s because I use it as a mini blog for my personal website. I share the progress I make on my apps (currently building a notes app) and Nostr works quite well for this as people can easily generate a Nostr key pair and write replies on my blog posts.
❤️2❤️1🧡1
note1xrgcm...
Frederik Handberg profile picture
Text and image objects can now be inserted in the infinite visual canvas.

The text objects can't be edited yet, they just have dummy text for now.

I'm just keeping it simple here in the beginning, because I need to test some different approaches to figure out the best ways to accomplish a good experience when dragging objects around and resizing them. I wonder if Apple has a ready to use API to handle two-finger swiping on the trackpad to move around the canvas 🤞 Currently, I use `DragGesture` from SwiftUI, but that requires a mouse-click and drag, which is not how I want it...
Troy · 3d
Also no different than a teacher giving you wrong answers. 😜
Frederik Handberg profile picture
It's been so long since I've experienced LLMs hallucinating when asking it a math related question.

I remember in 2022-2023 when I was doing my A-levels in math, I used ChatGPT to help learn integrals and differential equations and it would just give completely wrong answers in the examples. Like, the calculations where just wrong and it would constantly make up stuff that wasn't true... So ended up having to watch tutorials on YT and I HATE watching math videos. I fall asleep 😂 Gemini is so much faster at explaining.
1
The Beave · 3d
Good morning. I really don't understand nearly anything people "do" with AI. Coding? Sure. Generating slop pics and vids? Check. But... WTF else is it even good for? I'm seriously confused, si...
Frederik Handberg profile picture
Besides coding, I've been using LLMs to teach me concepts of linear algebra, and last year I used it to learn discrete mathematics. It's good at helping me in the right direction when stuck and I find it so much more efficient than watching a 20-30min youtube video.

Of course you shouldn't just ask it to give you the answer, otherwise you'll learn nothing. It's no different than if your teacher just gave you the answers.
2👍1
Troy · 3d
Also no different than a teacher giving you wrong answers. 😜
The Beave · 3d
Ok. Cool. How does that work? What model? How do you access it?
note13devp...
Frederik Handberg profile picture
Sure, but when the user looks in Finder and sees both canvas files and note documents with only JSON extension, I think it would be difficult to distinguish between them. If they don’t remember from the file names, they’d have to open the JSON to see tag in metadata to know if it’s a canvas or note.

But the file extension thing isn’t perfect either, it doesn’t look great having double extensions, but works nonetheless :)

I may reconsider…