WRT @NSHipster's regex post:
import Foundation
let cluedo = "🕵️♀️🔍"
// NOTE: 2 characters, or 6+2 = 8 UTF-16 code units
let r = cluedo.range(of: "......", options: .regularExpression)!
// NOTE: 6 (not 2 or 8) dots
print(cluedo[r])
// MYSTERY: prints "🕵️♀️🔍"
1
This compiler flag saves time:
-Xfrontend -warn-long-expression-type-checking=50
(Especially if you're using SIMD types in Swift.)
1
Making a simple physics system for a possible WordFoto update. 2000 disks, verlet integration, spatial hashing.
1
We've just released Ehlol, a game of puzzling images and words. Download it via ehlol.com for more puzzles like this. Feedback appreciated!
Is there a bug in SceneKit's physically based materials? Normals towards -z makes material darker when metalness is low, no matter orientation of obj or the lighting env. Details here: bitcycle.com/scenekit-issue/ cc @mnuages @warrenm
1
Face order of +/-Z is wrong.
Is this a documentation or implementation bug?
Camera is at +2 Z, looking towards -Z (as it does by default), lightingEnvironment and background is a texture from the documentation of SCNMaterial contents.
Question in forums: forums.developer.apple.com/t…
1
Replying to @danielinoa_
@danielinoa_ Hi! I say your dev.to/danielinoa_/rendering…
Did you find (or did Xcode add) a less hackish way to enable "full rendering" of markdown files since?
Are these AppleColorEmoji bounding rect sizes by design or mistake?
(This is compiled with a recent snapshot so the values are accurate decimal representations of the floating point values. Also, the sizes are the same for all emojis, not just the one in this example program.)
1
1
A closure is …
1. … a function that closes over (captures) one or more variables.
2. … any function.
60%1
40%2
5 votes • Final resultsCool bug: bugs.swift.org/browse/SR-722…
Until it's fixed, you can mutate a constant:
let c: Int?
c = -1
print(c == -1) // true
c? = 2
print(c == 2) // true
c? = 3
print(c == 3) // true
1
Will #swiftlang get a new checked/safe Array subscript
let optionalElement = myArray[checked: i]
to imply that the existing one
let element = Array[i]
should be unchecked/unsafe even though it is safe by checking for & trapping on index out of bounds?
forums.swift.org/t/draft-add…
1
func f(_ n: Int) -> Int {
??? <- Shortest wins!
}
f(0) == 0
f(1) == 2
f(2) == 10
f(3) == 42
f(4) == 170
f(5) == 682
f(6) == 2730
…
2
Just look at that little warning. Imagine if it could travel back in time and warn about using the same syntax (parens) for at least three semantically totally different things instead.
Can't believe I haven't noticed this before, is it a regression?
(I have only Xcode 9.2 and later to test here.)
bugs.swift.org/browse/SR-701…
1







