@simonbs@mastodon.social
@simonbs@mastodon.social avatar

simonbs

@simonbs@mastodon.social

Developer and speaker with a passion for #iOS and building developer tools.

Building https://runestone.app, https://scriptable.app, https://retoot.app, https://jayson.app, and https://datajar.app.

Working on a big update to Runestone in order to bring it to macOS.

Aspiring home brewer, brewing beers and espresso.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

film_girl, to random
@film_girl@mastodon.social avatar

Happy to all who celebrate! About to brave the inevitable lines for a

simonbs,
@simonbs@mastodon.social avatar

@film_girl WOAH! I did not know this record existed. Thanks for pointing that out! My local record stores have closed for the day but it seems like they are allowed to sell it online starting tomorrow. Crossing my fingers I can snag one at midnight🤞

simonbs, to random
@simonbs@mastodon.social avatar

Last night the squad was rocking @Iconfactory merch at the arcade 🐦👾😄

simonbs, to random
@simonbs@mastodon.social avatar

Just finished my first cold brew. Pretty happy with the result. I’m sure I’ll make many more of these once it gets warmer outside.

simonbs,
@simonbs@mastodon.social avatar

@rasmusnielsen Nothing fancy. Just whatever I could get at my local supermarket.

simonbs, to random
@simonbs@mastodon.social avatar

Just received my Runestone pins and I’m so happy about how they turned out! 😃

Four pins of Runestone’s app icon laying on a table.

simonbs,
@simonbs@mastodon.social avatar

@soperman Glad to hear you like them! I’ll be handing them out at a conference later this month but if I still have some left, which I expect that I do, I may look into the logistics of shipping them for some price that’ll at least cover the shipping.

simonbs, to random
@simonbs@mastodon.social avatar

Me porting Runestone from UIKit to AppKit.

Man gesturing with arms in front of board filled with papers.

simonbs,
@simonbs@mastodon.social avatar

Ooohh... The trick is probably to use addFloatingSubview(_:for:) on NSScrollView 👀 https://developer.apple.com/documentation/appkit/nsscrollview/1403546-addfloatingsubview

simonbs,
@simonbs@mastodon.social avatar

Adding the line numbers as a floating view to the NSScrollView works fine until the find/replace panel is presented. Why does it have to be so hard to work with scroll views in AppKit? 😭

In UIKit I just add the line numbers to my scroll view and manually offset them when the user scrolls to make them appear sticky. That almost works in AppKit but the UI will sometimes flicker and get clipped in a way I don't like 😔

Screen recording showing the issue with the line numbers when presenting the find/replace panel.

simonbs,
@simonbs@mastodon.social avatar

Here's an example where I'm not using the scroll view's floating view. Instead the line numbers are embedded into the scrollable content and manually offset on the X-axis to make them appear sticky. Scrolling works fine and the find/replace bar works as expected but now I have to deal with UI glitches that I can't figure out why are occurring 😑

video/mp4

simonbs,
@simonbs@mastodon.social avatar

Several people have suggested that I use a NSRulerView for the line numbers. I wanted to avoid that as I'd like the horizontal scroller to be on top of the line numbers, similar to how Xcode and Nova behaves. That's not the default behavior of NSScrollView when adding a NSRulerview.

simonbs,
@simonbs@mastodon.social avatar

This thread is going to be a bit quite the next few days as I rework some of the internals of Runestone to make it easier to support both the AppKit and the UIKit implementation. These changes should make the implementation of line numbers and find/replace a bit prettier, hopefully.

Baby steps, y'all.

simonbs,
@simonbs@mastodon.social avatar

As I move code out of large types in Runestone, I struggle to find proper names for those types. Here are a few examples.

  • What's the name of the type coordinating a text change? TextEditService? TextEditController? TextEditor?
  • The type laying out line fragments? LineFragmentLayouter? LineFragmentLayoutManager? LineFragmentLayoutController?
  • The type managing the content size of the scroll view? ContentSizeManager? ContentSizeService?

I'm spending way to much time on this 😑

simonbs,
@simonbs@mastodon.social avatar

Refactoring my code to make it less it easier to maintain in the long wrong and I feel like I have forgotten how to write code. I'm like

"What's the best way to get notified when this object changes? 🫤💫”

simonbs,
@simonbs@mastodon.social avatar

Making some progress on bringing the Composition Root pattern to the Runestone framework 😃

On one hand it's stressing me out a bit that I'm spending so much time refactoring Runestone's code but on the other hand, I think I'll appreciate this effort for several years going forward.

simonbs,
@simonbs@mastodon.social avatar

Today I made a small breakthrough in the clean up of the Runestone codebase. It feels so good and it's such a relief 😃😌

The past week I have written very little code on Runestone because I have been trying to figure out how I want to structure the code, each component's dependencies, and the communication between them. Today I realized that the question was right in front of me the entire time: Combine.

simonbs,
@simonbs@mastodon.social avatar

Now I have quite a few CurrentValueSubjects in Runestone's codebase and that leads to a whole lot of foo.value calls. It looks so ugly that it makes me consider if I am doing something wrong. CurrentValueSubject is a pretty decent way of distributing shared state though, right? 😕

simonbs,
@simonbs@mastodon.social avatar

Refactoring large parts of Runestone to isolate logic and make it communicate using Combine. This morning I got cursor movement working again and it feels like a tiny milestone 😄

Baby steps, y'all.

video/mp4

simonbs,
@simonbs@mastodon.social avatar

Lately I've been struggling to work on Runestone. I haven't had the motivation. Maybe I was a little burned out from working on it very intensively for a period of time.

Now I'm on vacation and slowly finding the motivation again. I'm hoping to progress a little on the refactoring each day but not so much that I end up not having a vacation and being burned out again.

simonbs,
@simonbs@mastodon.social avatar
simonbs,
@simonbs@mastodon.social avatar

The past month or so I have been working on a big refactor of Runestone to split up some types in smaller types that are easier to unit test. Now I'm finally harvesting some of the fruits 😃

Baby steps, y'all.

simonbs,
@simonbs@mastodon.social avatar

Took a stab at supporting more caret shapes in Runestone for Mac and it now supports the vertical bar, underline, and my favorite caret shape: the block.

It was tricky to support the block caret as I need to draw the character the caret is on top of to ensure it is visible. As such, this is still very experimental but it’s a good start 😃

Baby steps, y'all.

Screen recording of Runestone running on the Mac showcasing the three caret shapes.

simonbs,
@simonbs@mastodon.social avatar

I struggle to make the text within the block caret align exactly with the underlying text. It's most notable when the caret is on top of an emoji.

I won't ship this unless I can get it pixel perfect but I'm running out of ideas to try 😬

Screen recording of the block caret in Runestone for Mac.

simonbs,
@simonbs@mastodon.social avatar

The character within the caret now aligns perfectly with the text below it. Now I just need to prevent emoji from being filled with color 😄

Baby steps, y'all.

video/mp4

simonbs,
@simonbs@mastodon.social avatar

This is pretty good. Now I need to make it support invisible characters (again), as that broke when I went a different route. Then there's a lot of cleanup to do so this code becomes maintainable 😄

video/mp4

simonbs,
@simonbs@mastodon.social avatar

Supporting the block caret turned out to be trickier than anticipated but it seems to work now 😃

Regular characters, invisible characters, and emoji now all show on top of the caret in the correct colors.

Baby steps, y'all.

Screen recording of Runestone for Mac showing the block caret being moved between various types of characters.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • DreamBathrooms
  • modclub
  • tacticalgear
  • GTA5RPClips
  • magazineikmin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • rosin
  • slotface
  • everett
  • kavyap
  • provamag3
  • cubers
  • ngwrru68w68
  • normalnudes
  • cisconetworking
  • Durango
  • khanakhh
  • Leos
  • ethstaker
  • tester
  • anitta
  • osvaldo12
  • megavids
  • lostlight
  • All magazines