Stephan Michels

@michels
77 Followers
339 Following
340 Posts
Chemist, Mac / iOS Developer
Websitehttps://stephanmichels.de
GitHubhttp://github.com/smic
Back to Speranza #ArcRaiders
The area model allows complex constructs of #typography, similar to the layout algorithm of #SwiftUI

This time, my weekend experiment involved implementing the Knuth–Plass line-breaking algorithm [1] using an area model [2] inspired by the areas defined in the FO specification and the low-level TEX primitives.

[1] https://en.wikipedia.org/wiki/Knuth–Plass_line-breaking_algorithm
[2] Luca Padovani. MathML Formatting. PhD thesis, University of Bologna, February 2003. Technical Report UBLCS 2003-03.

Another interesting article analyzing Vector Networks

https://alexharri.com/blog/vector-networks

#computergraphics

Today I found a very interesting application on Reddit, Square Sketch. It reminds me of Vector Networks in Figma.

https://www.reddit.com/r/macapps/comments/1p82pco/square_sketch_update_v1220_released_with_first

#mathart

Okay, Carton is officially deprecated. I had a hard time trying to get Carton to run with the latest Swift version 6.2.1. Then I realised that 'swift package js' is the new way. The deprecation makes things clearer.

https://forums.swift.org/t/deprecating-swiftwasm-carton-in-favor-of-javascriptkits-swiftpm-plugin/83460

I also discovered a useful trick because the Carton command-line tool appears to be outdated and does not support Swift 6.2.1, as far as I can tell.
ElementaryDOM uses two small tools to rebuild the project and reload the browser during development:
'watchexec' and 'browser-sync'

#swiftlang #swiftwasm #webassembly

ElementaryDOM is a very good library for writing small, useful web applications using #SwiftWasm with syntax similar to SwiftUI. Setting up a project was very easy.

You can even use it with Swift Embedded, which in my case results in a binary size of 2.5 MB.

#swiftlang #webassembly

If you spend hours trying to figure out why all of Foundation is in the binary 😩

The 70MB for the #Wasm binary from my test project is already a lot. Way too much for the internet. So I decided to try out different options to see if I could reduce the size. The results should be taken with a grain of salt, as I'm not very knowledgeable in this area. I tried using #Swift Embedded, compared debug and release builds, and looked at what using Foundation would bring. The results are in bytes.

#swiftlang #webassembly