Skip to content

Instantly share code, notes, and snippets.

@zadr
zadr / tttt.swift
Last active February 9, 2020 01:16
terminal's tiny todo tool
// 1. copy file to $PATH somewhere
// 2. chmod a+x it
// 3. run with `tttt` or `tttt [task to track]`
// 4. check out ~/Desktop/todo.txt
#!/usr/bin/env swift
import Foundation
let dateFormatter = DateFormatter()
@zadr
zadr / list-swift-features.swift
Last active June 14, 2026 02:03
Lists the enableUpcomingFeature/enableExperimentalFeature flags your Swift toolchain accepts (parsed from its own Features.def), marks which are redundant in your language mode, and diffs against past releases to show what's new.
#!/usr/bin/env swift
//
// list-swift-features.swift
//
// Lists the feature names accepted by `Package.swift`'s
// .enableUpcomingFeature("…") and .enableExperimentalFeature("…")
// for the *active* Swift toolchain, annotated against your effective
// language mode (upcoming flags that are already default-on are redundant).
//
// How it works — no C-grammar parsing: