Byte-sized Swift: Building Tiny Games for the Playdate
https://www.swift.org/blog/byte-sized-swift-tiny-games-playdate/ [www.swift.org]
2024-04-30 01:40
tags:
c
development
gaming
programming
swift
I’m excited to share swift-playdate-examples, a technical demonstration of using Swift to build games for Playdate, a handheld game system by Panic.
How Swift Achieved Dynamic Linking Where Rust Couldn't
https://gankra.github.io/blah/swift-abi/ [gankra.github.io]
2019-11-09 06:08
tags:
compiler
library
programming
swift
For those who don’t follow Swift’s development, ABI stability has been one of its most ambitious projects and possibly it’s defining feature, and it finally shipped in Swift 5. The result is something I find endlessly fascinating, because I think Swift has pushed the notion of ABI stability farther than any language without much compromise.
source: HN
UTF-8 String
https://swift.org/blog/utf8-string/ [swift.org]
2019-03-22 22:51
tags:
perf
programming
swift
text
update
Swift 5 switches the preferred encoding of strings from UTF-16 to UTF-8 while preserving efficient Objective-C-interoperability. Because the String type abstracts away these low-level concerns, no source-code changes from developers should be necessary*, but it’s worth highlighting some of the benefits this move gives us now and in the future.
source: L
Real time numbers recognition (MNIST) on an iPhone with CoreML from A to Z
https://www.liip.ch/en/blog/numbers-recognition-mnist-on-an-iphone-with-coreml-from-a-to-z [www.liip.ch]
2018-11-08 20:29
tags:
ai
graphics
iphone
programming
python
swift
Learn how to build and train a deep learning network to recognize numbers (MNIST),how to convert it in the CoreML format to then deploy it on your iPhoneX and make it recognize numbers in realtime!
source: HN
String Representations and String APIs
http://justinblank.com/notebooks/stringrepresentationsandstringapis.html [justinblank.com]
2018-11-05 21:12
tags:
c
development
links
programming
rust
swift
text
C, swift, rust, unicode, etc. link collection.
source: L
Locks, Thread Safety, and Swift: 2017 Edition
http://www.mikeash.com/pyblog/friday-qa-2017-10-27-locks-thread-safety-and-swift-2017-edition.html [www.mikeash.com]
2017-10-30 17:27
tags:
concurrency
intro-programming
swift
Swift has no language facilities for thread synchronization, but the APIs make up for it. GCD remains one of Apple’s crown jewels, and the Swift API for it is great.
Swift 4 Weak References
http://www.mikeash.com/pyblog/friday-qa-2017-09-22-swift-4-weak-references.html [www.mikeash.com]
2017-09-26 18:53
tags:
garbage-collection
programming
swift
Swift’s new implementation of weak references brings with it the concept of side tables. A side table is a separate chunk of memory which stores extra information about an object. It’s optional, meaning that an object may have a side table, or it may not. Objects which need the functionality of a side table can incur the extra cost, and objects which don’t need it don’t pay for it.
Swift.Unmanaged
http://www.mikeash.com/pyblog/friday-qa-2017-08-11-swiftunmanaged.html [www.mikeash.com]
2017-08-12 18:45
tags:
c
library
programming
swift
One of Swift’s great strengths is the smoothness with which it interoperates with C code. The Unmanaged API is a key component of that. Unfortunately, it requires the programmer to make memory management decisions as pointers move in and out of Swift, but that’s an inherent part of the job it does. Once you have the memory management figured out, it’s mostly straightforward to use.
Swift.Codable
http://www.mikeash.com/pyblog/friday-qa-2017-07-14-swiftcodable.html [www.mikeash.com]
2017-07-15 17:48
tags:
programming
swift
One of the interesting additions to Swift 4 is the Codable protocol and the machinery around it. This is a subject near and dear to my heart, and I want to discuss what it is and how it works today.
Undefined Behavior != Unsafe Programming
http://blog.regehr.org/archives/1467 [blog.regehr.org]
2017-02-17 17:46
tags:
c
compiler
perf
programming
swift
Undefined behavior (UB) in C and C++ is a clear and present danger to developers, especially when they are writing code that will execute near a trust boundary. A less well-known kind of undefined behavior exists in the intermediate representation (IR) for most optimizing, ahead-of-time compilers.
Swift: Challenges and Opportunity for Language and Compiler Research
http://researcher.watson.ibm.com/researcher/files/us-lmandel/lattner.pdf [researcher.watson.ibm.com]
2016-12-18 16:35
tags:
compiler
concurrency
garbage-collection
jit
pdf
perf
slides
swift
type-system
Intro to swift and its approach to a number of open issues.
Method Dispatch in Swift
https://www.raizlabs.com/dev/2016/12/swift-method-dispatch/ [www.raizlabs.com]
2016-12-06 20:55
tags:
article
compiler
perf
programming
swift
type-system
Knowing how method dispatch works is vital when writing performant code, and can illuminate some of the confusing behavior found in Swift.
There’s quite a lot too it. Long article.
Swift and the Legacy of Functional Programming
https://realm.io/news/tryswift-rob-napier-swift-legacy-functional-programming/ [realm.io]
2016-11-21 21:57
tags:
functional
intro-programming
swift
type-system
video
Functional techniques in the still not actually functional swift.