@ctietze@mastodon.social
@ctietze@mastodon.social avatar

ctietze

@ctietze@mastodon.social

Developer of indie macOS apps. The Archive, WordCounter, TableFlip, Move!

Using #Xcode to write #Swift and sometimes #SwiftUI apps for #iOS and #Mac.

OG #Zettelkasten zealot.
Local #urbansketchers group founder.

#Bielefeld (Germany)

─────────────
#fedi22

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

ctietze, to random
@ctietze@mastodon.social avatar

Hey TextKit aficionados @mattiem @krzyzanowskim :)

I'm at a point where I want to make writing structural transformations to Markdown documents easier.

I believe I can get the API of this screenshot to compile and then execute the steps on NSTextStorage, replacing a hideous procedural approach I wrote earlier this week.

Would an API like this be useful for your text editors?

Would an API similar to this with some changes be?

Not sure if open sourcing is worth it.

ctietze,
@ctietze@mastodon.social avatar

@mattiem @krzyzanowskim Ah right, multiple cursors 🤔 That would suck.

At the moment, SelectLineRange with the token list as parameters would boil down to get the NSRange for all tokens in the list, then use NSString.lineRange to make sure I'm only operating on whole lines.

Deletions are applied from back to front and shrink the selection by the deleted character delta.

Insertion likewise increases the affectedLineRange.

Finally, the Select call places the cursor in 1 location.

jamesrandall, to swift
@jamesrandall@mastodon.social avatar

Voxel editor coming along nicely now. Video is taken on the Mac but it also works on the iPad.

I've spent surprisingly little time on this. 20 hours total tops. Its amazing what you can get done with good quality tools, consistency (I normally do an hour pre and post dog walk), and a good set of fundamentals (its really making use of things I've learned in the last year or so).

https://youtu.be/R6htZe4Lmjc

ctietze,
@ctietze@mastodon.social avatar

@jamesrandall Oh yes please, a "Mac-assed" Voxel editor sounds great. Video demo looks buttery smooth already :)

I don't know how people adapt to the MagicaVoxel shortcuts and UX

simonbs, to random
@simonbs@mastodon.social avatar

The new iPad Pro is both thinner and lighter than the new iPad Air.

ctietze,
@ctietze@mastodon.social avatar

@simonbs in what world does that make sense :D

ctietze, to random
@ctietze@mastodon.social avatar

The Moment That Ruins Our Focus https://zenhabits.net/moment-to-focus/

I feel like I need to practice this to stay on top of emails and taxes and other paperwork:

Endure the moment and urge to leave a bit longer and longer.

There's always a more low hanging fuit. Not even distractions like video bingeing, but just any easier (or more pleasurable) task.

bzf, to SwiftUI
@bzf@stormlight.space avatar

Does anyone know how to make a separate sign in window in like how @Sketch presents a separate window until you sign in? Do you conditionally render WindowGroups, or do you render them all and prevent the user from opening them somehow? 🤔

ctietze,
@ctietze@mastodon.social avatar

@bzf Is not using SwiftUI an option? 😬

ctietze,
@ctietze@mastodon.social avatar

@bzf with plain AppKit you can control which windows to spawn when (and close them).

I have tried multi-window approaches (ab)using SwiftUI window IDs and the experience was very limited.

My takeaway for 2024 is to approach a paywall/login like this:

  1. Launch the app
  2. If not logged in, show the login window
  3. Once logged in, show the main app window (or NSDocuments)

You can easily use SwiftUI for content. But trying to escape NSWindowController is tough.

ctietze,
@ctietze@mastodon.social avatar

@bzf yeah, showing different 'scenes' in the main window works with a shoebox-style app, too, of course :)

ctietze, to random
@ctietze@mastodon.social avatar
fd9a, to emacs
@fd9a@fosstodon.org avatar

You can now submit tickets to SourceHut using emacs and transient.

https://git.sr.ht/~akagi/srht.el/tree/pre-0.5/lisp/srht-todo.el

ctietze,
@ctietze@mastodon.social avatar

@fd9a I didn't know the ticket system shipped, thanks! That's cool.

ctietze, to random
@ctietze@mastodon.social avatar

The 'Black Box' Unifies Software Modeling
https://christiantietze.de/posts/2022/09/black-box-unifies-software-modelling-in-modules/

With modular software development, you can't escape this metaphor.

I revisit it all the time. It's so stupidly simple, I probably only think of it because I took a note about it one day, so now it stays in my conscious mind.

Functions,
types,
objects,
packages and libraries,

you can pretend forget the details of a thing and still make meaningful decisions about its use.

KrauseFx, to random
@KrauseFx@mastodon.social avatar

And just like that, ContextSDK went from being just me, to a team of 5 full-time, multiple part-time, and as of last week: our very own office with a full stash of Club Mate.

Big product announcements in the making, can’t wait to share more soon 🚀

ctietze,
@ctietze@mastodon.social avatar

@KrauseFx Congrats! The website's explanation video didn't age well -- 500mio signals :)

ctietze, to php
@ctietze@mastodon.social avatar

A question for more experienced #PHP developers than me:

We have this setup where all requests go through a PHP script for authorization (think: cookie) checking before serving files.

That's fine with HTML, but less ideal for 5MB PDFs.

I'm trying to search for ways to use PHP to allow/deny access, but otherwise let the web server (Apache) do its job.

Is there such a facility to rewrite requests for auth, but then go on serve the static files?

ctietze,
@ctietze@mastodon.social avatar

@ghorwood @jamesholden That's really cool, thanks you two. We only read-protect 2 workshop slide decks at the moment, so a CDN isn't needed, but I can see where this would come in handy for our forums!

ctietze,
@ctietze@mastodon.social avatar

@ollieread that's cool

ctietze,
@ctietze@mastodon.social avatar

@Crell thank you, this analysis is great! I'm putting the gist of these findings into my Zettelkasten for reference. Haven't thought about memory mapping here at all!

ctietze,
@ctietze@mastodon.social avatar

@joby @deanatoire Thank you!

@Crell chimed in with this article: https://www.garfieldtech.com/blog/readfile-memory

That confirmed your responses and provided a couple of arguments, FYI

ctietze,
@ctietze@mastodon.social avatar

@Crell Found a typo in the table :)

readflie → readfile

ctietze,
@ctietze@mastodon.social avatar

@omich you're not that old, HTTP still exists :)

(yes)

ctietze,
@ctietze@mastodon.social avatar

@joby @deanatoire @Crell That's super reassuring!

I guess you lose the ability to pause and resume the download maybe for huge files? (Haven't investigated yet.)

ctietze, to random
@ctietze@mastodon.social avatar

Objective-C professionals around the world, I summen ye 🗺️

Is there not a way to annotate an Objective-C method that returns a Foundation type like NSString to avoid automatic bridging to Swift.String?

I really want to stay in NSString-land.

(Actually, I probably even want to keep fiddling with an NSMutableString as a mutable string)

ctietze,
@ctietze@mastodon.social avatar

@rjmccall @nicklockwood Oh I didn't know that this would actually avoid bridging.

I'll have to double check in the profiler to make sure

ctietze,
@ctietze@mastodon.social avatar

@nicklockwood that's an interesting idea!

I stumbled upon this task in the first place by writing an extension to NSString in ObjC that produced an NSString again, which Swift immediately bridged. Didn't think of a objc-annotated protocol

ctietze,
@ctietze@mastodon.social avatar
emily_etale, to random
@emily_etale@mathstodon.xyz avatar

Today I'm releasing two projects I've been incredibly excited about lately:

The second is essentially a Stacks Project for category theory.

image/png

ctietze,
@ctietze@mastodon.social avatar

@emily_etale The font looks very nice!

I tried to browse the Clowder Project. Is there a recommended way to read things? The PDF links here produce 404's for example

KrauseFx, to random
@KrauseFx@mastodon.social avatar

📤 Just open sourced a solution to automatically send notes written on the Light Phone to my email inbox, and store a copy locally as a backup https://github.com/KrauseFx/light-phone-note-to-self

ctietze, (edited )
@ctietze@mastodon.social avatar

@KrauseFx what's a "Light Phone" in this context? It looks intriguing -- is it this eink thingie?

https://www.thelightphone.com/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • tester
  • hgfsjryuu7
  • magazineikmin
  • Youngstown
  • thenastyranch
  • GTA5RPClips
  • rosin
  • slotface
  • InstantRegret
  • ngwrru68w68
  • PowerRangers
  • kavyap
  • tsrsr
  • DreamBathrooms
  • Leos
  • mdbf
  • tacticalgear
  • khanakhh
  • cisconetworking
  • everett
  • Durango
  • ethstaker
  • vwfavf
  • cubers
  • normalnudes
  • osvaldo12
  • modclub
  • anitta
  • All magazines