Skip to content

Instantly share code, notes, and snippets.

View kaqu's full-sized avatar

Kacper kaqu

View GitHub Profile
@kaqu
kaqu / AtomicFlag.swift
Created September 28, 2019 19:43
Futures
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import libkern // check on Linux
public enum AtomicFlag {
public typealias Pointer = UnsafeMutablePointer<atomic_flag>
@inline(__always)
public static func make() -> Pointer {
let pointer = Pointer.allocate(capacity: 1)
@kaqu
kaqu / Parameters.swift
Created February 26, 2020 21:04
Swift dynamic parameters
internal protocol AnyParameter {
var name: String { get }
var optional: Bool { get }
var type: Any.Type { get }
}
public struct Parameter<Value>: AnyParameter {
public var name: String
public var optional: Bool
public var `default`: Value?
@kaqu
kaqu / Specification-to-Code.md
Created June 5, 2025 13:22
Specification-to-Code Framework (S2C)

Specification-to-Code Framework (S2C)

Purpose and Objectives

The Specification-to-Code Framework (S2C) creates software specifications in Markdown format containing complete implementation guidance. All specifications must be written in Markdown using English language exclusively to ensure consistent formatting, version control compatibility, universal readability across development tools and platforms, and clear communication across international development teams.

The objective is eliminating the gap between requirements and code by ensuring specifications include sufficient technical detail for developers to implement software without additional requirements gathering or clarification requests. S2C establishes standards for implementation-complete specifications that enable developers to immediately understand what code to write, which technologies to use, implement all interfaces without guesswork, handle all error conditions, and write validating tests.

Implementation-Ready Criteria