commit 8f83d259893bb134570471da758f76e271398583 Author: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Wed Nov 12 16:25:13 2025 -0500 Initial source commit 🎉 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd466ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +### SwiftPM ## +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ee6c639 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute +this software, either in source code form or as a compiled binary, for any +purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and +to the detriment of our heirs and + +successors. We intend this dedication to be an overt act of relinquishment +in perpetuity of all present and future rights to this software under copyright +law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, +please refer to diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..d5881af --- /dev/null +++ b/Package.swift @@ -0,0 +1,15 @@ +// swift-tools-version: 6.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "swiftyfox", + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .executableTarget( + name: "swiftyfox" + ), + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..956045a --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# SwiftlyFox + +SwiftlyFox is a simple sandbox project for continuously learning Swift. While this also includes Swift Playgrounds from which this was originally derived from, I hope to move that all to the [Playgrounds macro](https://youtu.be/3wzUNua-JKg&t=288) coming to other platforms. + +## License + +I hereby waive this project under the public domain - see [LICENSE](LICENSE) for details. diff --git a/Sources/swiftyfox/swiftyfox.swift b/Sources/swiftyfox/swiftyfox.swift new file mode 100644 index 0000000..c19e1e0 --- /dev/null +++ b/Sources/swiftyfox/swiftyfox.swift @@ -0,0 +1,11 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book + +@main +struct swiftyfox { + static func main() { + print("Hello, world!") + } +} + + diff --git a/SwiftyFox.playground/Contents.swift b/SwiftyFox.playground/Contents.swift new file mode 100644 index 0000000..55ccc80 --- /dev/null +++ b/SwiftyFox.playground/Contents.swift @@ -0,0 +1,22 @@ +import Cocoa + +let interestingNumbers = [ + "Prime": [2, 3, 5, 7, 11, 13], + "Fibonacci": [1, 1, 2, 3, 5, 8], + "Square": [1, 4, 9, 16, 25], +]; + +var largest = 0 + +for (_, numbers) in interestingNumbers { + for number in numbers { + if number > largest { + largest = number // 25 + } + } +} + +var total = 0 +for i in 0..<4 { + total += i // 6 +} diff --git a/SwiftyFox.playground/contents.xcplayground b/SwiftyFox.playground/contents.xcplayground new file mode 100644 index 0000000..10de914 --- /dev/null +++ b/SwiftyFox.playground/contents.xcplayground @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/SwiftyFox.playground/playground.xcworkspace/contents.xcworkspacedata b/SwiftyFox.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ca3329e --- /dev/null +++ b/SwiftyFox.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + +