Cloud Gaming is a great way to enjoy graphically demanding games on Apple Vision Pro.
Since Safari on visionOS does not support PWA mode, here is how you can access cloud gaming services on Apple Vision Pro.
Cloud Gaming is a great way to enjoy graphically demanding games on Apple Vision Pro.
Since Safari on visionOS does not support PWA mode, here is how you can access cloud gaming services on Apple Vision Pro.
extension Task where Success == Never, Failure == Never { | |
/// Suspends the current task for at least the given duration in seconds. | |
/// Throws if the task is cancelled while suspended. | |
/// - Parameter seconds: The sleep duration in seconds. | |
static func sleep(seconds: TimeInterval) async throws { | |
try await Task.sleep(nanoseconds: UInt64(seconds * 1_000_000_000)) | |
} | |
} |
wvideo=tra6gsm6rl
hashedId=tra6gsm6rl
in the page sourcehttp://fast.wistia.net/embed/iframe/
+ video ID in your browser"type":"original"
in the page source and
copy the URL from the next line
e.g. "url":"http://embed.wistia.com/deliveries/129720d1762175bcd8e06dcab926ec76ad38ff00.bin"
"type":"hd_mp4_video"
import Darwin | |
@dynamicMemberLookup | |
struct Environment { | |
subscript(dynamicMember name: String) -> String? { | |
get { | |
guard let value = getenv(name) else { return nil } | |
return String(validatingUTF8: value) | |
} |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
import Foundation | |
struct MagicTestRequest: Codable { | |
let tokens: [String] | |
} | |
struct MagicTestResponse: Codable { | |
let count: Int | |
} |
Author: Chris Lattner
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
A syntax highlighter configuration for .xcconfig
(Xcode configuration) files for Sublime Text 3. Based on work by @dflems.
Fig 1: Screenshot of an xcconfig file being highligthed. Shown with the “Tomorrow - Night” theme.
Copy the files *.sublime-*
files into an xcconfig
directory in your Packages
directory.
# The trick is to link the DeviceSupport folder from the beta to the stable version. | |
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
# (A similar approach works for older versions too, just change the version number after DeviceSupport) |