addmedia | |
addphoto | |
addvideo | |
appinfo | |
boot | |
bootstatus | |
clone | |
create | |
darwinup | |
delete |
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://bsky.app/profile/tholanda.com | |
* | |
* (the twitter account is now deleted, please, do not try to reach me there) | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ |
# ... don't do this | |
import sys | |
from types import ModuleType | |
def callme(): | |
print("lol I'm a module") | |
class CallableModule(ModuleType): | |
def __call__(self, *args, **kwargs): |
#!/usr/bin/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |
#!/usr/bin/swift sh | |
import DeckOfPlayingCards // @NSHipster ~> 4.0.0 | |
import PlayingCard | |
import Cycle // @NSHipster == bb11e28 | |
class Player { | |
var name: String | |
var hand: [PlayingCard] = [] |
-- Sets your audio input source to "Internal Microphone" | |
-- Frequently needed if you use bluetooth headpohones and | |
-- run the Xcode iOS simulator, which will often set your | |
-- headphones to be the input device, resulting in a drastic | |
-- decrease in sound quality, and making it mono | |
tell application "System Preferences" to activate | |
tell application "System Preferences" | |
reveal anchor "input" of pane id "com.apple.preference.sound" | |
end tell |
let xs = [1, 2, 3, 4, 5] | |
for (element, index) in zip(xs, xs.indices) { | |
if index == xs.startIndex { | |
print("START") | |
} | |
print(element) | |
if index == xs.index(before: xs.endIndex) { |
GYB_PATH="${SRCROOT}/Vendor/gyb/gyb" | |
function gyb { | |
file=$1 | |
if [ ${file: -4} == ".gyb" ]; then | |
"${GYB_PATH}" --line-directive '' -o "${file%.gyb}" "$file"; | |
fi | |
} | |
if [ $SCRIPT_INPUT_FILE_COUNT -ne 0 ]; then |
Hello, I’ve been working on implementing, optimizing, and improving String in preparation for ABI stability, and I thought I’d share the current status of String in Swift 5 and some potential directions to go. This is the product of conversations with open source contributors and my colleagues on the Swift standard library team at Apple.
The primary area of focus is stabilizing String’s ABI, but we’d be remiss if we couldn’t also fit in performance and ergonomic improvements. String’s ergonomics in particular is one area where we think the status quo is woefully inadequate, and over half of this email is devoted to that topic. At the end, there’s a section about a community initiative that we hope can help users of String as well as guide future development.
(Note: I’m sending this to swift-dev because much of the contents revolve around implementation concerns. I’ll also cross-reference on swift-evolution and swift-users. See also the [StringManife