Skip to content

Instantly share code, notes, and snippets.

View tayloraswift's full-sized avatar

taylorswift tayloraswift

View GitHub Profile

Introducing the Swift Fundraising Cooperative

Hi Swifties!

Recently, there has been growing interest in a centralized Fundraising Organization to support projects that benefit the Swift Ecosystem, and I am thrilled to announce the launch of the Swift Fundraising Cooperative (SFC), an organization explicitly dedicated to securing commitments from Ecosystem Stakeholders, and allocating it towards work on areas of the Swift Ecosystem not adequately supported by existing sponsors today.

Why a Fundraising Cooperative?

In the nine years since the launch of the Swift Project, the language has grown significantly beyond Apple and its platforms, and there are many components and technologies people rely on today that cater to unique use cases and suffer from a lack of Serious Financial Investment. Such components might include:

NIO diagnose (f6986130c43c9babd4ecbf321a283721a6fc36ac ./nio-diagnose)

System information

System versions

Command: composite_command_system_versions_linux

Fri Aug 30 20:29:09 UTC 2024

NIO diagnose (f6986130c43c9babd4ecbf321a283721a6fc36ac ./nio-diagnose)

System information

System versions

Command: composite_command_system_versions_linux

Mon Aug  5 18:16:44 UTC 2024

NIO diagnose (f6986130c43c9babd4ecbf321a283721a6fc36ac ./nio-diagnose)

System information

System versions

Command: composite_command_system_versions_linux

Fri Aug  9 22:08:57 UTC 2024
@tayloraswift
tayloraswift / single-quoted-character-literals.md
Last active December 12, 2022 23:44
Single-quoted character literals
@tayloraswift
tayloraswift / vscode+docker tutorial.md
Last active August 21, 2022 21:29
vscode+docker tutorial

test project

  1. clone a swift project

installing code

  1. download from https://code.visualstudio.com/

setting up the vscode-swift extension

module: '_Differentiation@Swift', id: 's:s4SIMDPsSF6ScalarRpzrlE2meoiyyxz_xtFZ::SYNTHESIZED::s:s5SIMD2V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6ScalarRpzrlE1doiyxAE_xtFZ::SYNTHESIZED::s:s5SIMD8V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6ScalarRpzrlE4alleoiyyxz_xtFZ::SYNTHESIZED::s:s5SIMD3V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6ScalarRpzrlE2seoiyyxz_AEtFZ::SYNTHESIZED::s:s5SIMD8V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6ScalarRpzrlE1aoiyxx_xtFZ::SYNTHESIZED::s:s5SIMD2V'
module: '_Differentiation@Swift', id: 's:s4SIMDPsSF6ScalarRpzrlE1poiyxAD_xtFZ::SYNTHESIZED::s:s5SIMD4V'
module: '_Differentiation@Swift', id: 's:s4SIMDPsEyxqd__cSTRd__7ElementQyd__6ScalarRtzlufc::SYNTHESIZED::s:s5SIMD4V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6ScalarRpzrlE20trailingZeroBitCountxvp::SYNTHESIZED::s:s5SIMD4V'
module: '_Differentiation@Swift', id: 's:s4SIMDPss17FixedWidthInteger6Sc
module: 'NIOConcurrencyHelpers@Swift', id: 's:SzsE2lloiyxx_qd__tSzRd__lFZ::SYNTHESIZED::s:s5Int64V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:s18AdditiveArithmeticPsE1popyxxFZ::SYNTHESIZED::s:s4Int8V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:SzsE1goiySbx_xtFZ::SYNTHESIZED::s:s4Int8V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:SZss17FixedWidthIntegerRzrlEyxqd__cSzRd__lufc::SYNTHESIZED::s:s5Int16V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:s18AdditiveArithmeticPss27ExpressibleByIntegerLiteralRzrlE4zeroxvpZ::SYNTHESIZED::s:s5Int16V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:s17FixedWidthIntegerPsE2apoiyxx_xtFZ::SYNTHESIZED::s:Su'
module: 'NIOConcurrencyHelpers@Swift', id: 's:s17FixedWidthIntegerPsE3ggeoiyyxz_qd__tSzRd__lFZ::SYNTHESIZED::s:s6UInt16V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:SZsE8isSignedSbvpZ::SYNTHESIZED::s:s5Int32V'
module: 'NIOConcurrencyHelpers@Swift', id: 's:s17FixedWidthIntegerPsE3ggeoiyyxz_qd__tSzRd__lFZ::SYNTHESIZED::s:s5Int32V'
module: 'NIOConcurrencyHelpers@Swif

Swift integer literals

introduction

Swift allows you to initialize any type from an integer literal in source code by conforming it to the ExpressibleByIntegerLiteral protocol. Currently, Int8, Int16, Int32, Int64, Int, and their unsigned counterparts are supported as bootstrap types when the compiler emits code passing source code literals to an ExpressibleByIntegerLiteral.init(integerLiteral:) implementation. This effectively caps the maximum supported integer literal width to 64 bits.

This proposal aims to unlock arbitrary-precision integer literals in a way that:

  • will decouple the compile-time overflow checking from the actual passed integer value storage,
  • will eliminate the need for magic underscored protocols,
import func Glibc.fopen
import func Glibc.fseek
import func Glibc.ftell
import func Glibc.fclose
import func Glibc.fread
import func Glibc.fwrite
import func Glibc.strerror
import var Glibc.errno