This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Swift | |
public typealias Λ = Arrow // Capital lambda Λ, a computationally aware λ. | |
/// Λrrow ∎ A general interface to represent a computation. | |
/// | |
/// Arrows are a new abstract view of computation, defined by John Hughes [Hug00]. | |
/// They serve much the same purpose as monads -- providing a common structure | |
/// for libraries -- but are more general. In particular they allow notions of | |
/// computation that may be partially static (independent of the input) or may |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:collection'; | |
import 'package:meta/meta.dart'; | |
import 'package:sqlite3/sqlite3.dart'; | |
import 'extension/object.dart'; | |
import 'extension/collection.dart'; | |
import 'extension/string.dart'; | |
import 'extension/database.dart'; | |
import 'identifiable.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here be dragons // | |
extension _EndomorphicComposition<T> on T Function(T) { | |
/// Mathematical composition of endomorphisms. | |
/// | |
/// In mathematics, function composition is an operation ∘ that takes two | |
/// functions ƒ and g, and produces a function h = g ∘ ƒ such that | |
/// h(x) = g(ƒ(x)). | |
/// | |
/// An endomorphism is any morphism ƒ whose domain is equal to its codomain | |
/// such that ƒ: a -> a or T ƒ(T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extensions to the Daon's API peripheral to the biometric verification | |
// process. | |
import class ObjectiveC.NSObject | |
import Swift | |
import Dispatch | |
import DaonFIDOSDK | |
import DaonAuthenticatorSDK | |
// MARK: - Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Env.net.request(.signup, result: | |
tap(AppId.init • ^\.[.registrationRequest] >>> assign(to: &Env.vars.id.app)) >>> | |
select(\.[.registrationId], \.[.registrationRequest], or: .badRequest) >>> | |
when(success: async(partial(presentBiometrics, __, __, succeed, fail)), | |
failure: when(.noSession, createAccount, otherwise: fail))) | |
or: | |
Env.net.request(.signup, result: | |
select(\.[.registrationId], \.[.registrationRequest], or: .badRequest) >>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; 'sup, quantum physics. | |
;;; Interview challenge: | |
;;; Teleport the state of a single qubit existing in a 2-dimensional | |
;;; complex Hilbert space by way of classical communication without | |
;;; spawning any more than 4 parallel universes. | |
;;; "...hold my beer." | |
((HADAMARD 1) ; Open a Hadamard gate to map the probability basis with an orthogonal, symmetric, involutive, linear Hadamard-Rademacher-Walsh-class quantum Fourier transform over a single qubit, or something. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import func Darwin.sin | |
import func Darwin.cos | |
import Swift | |
public typealias ℤ = Int | |
public typealias ℝ = Double | |
public typealias ℂ = Complex | |
public func ρmap(_ ρ: ℤ) -> String { | |
switch ρ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dyalog APL/S-64 Version 17.0.35664 | |
Unicode Edition | |
Tue Feb 26 00:37:36 2019 | |
⍝ _Little did he know that the simple, seemingly innocuous act of starting | |
⍝ Dyalog's APL REPL would result in his imminent institutionalization._ | |
⍝ | |
⍝ Some array-driven, some fp, some quadratic, some primes. | |
gfx.∆.Init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Swift compilation issue | |
// Shadowing across modules | |
// Module 1 | |
public struct S { | |
public static var a = S(a: 0) | |
public var a: Int | |
public init(a: Int) { self.a = a } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4.4:matux@Weiland:new-hints:∴μ ∆15:~/code/v1/joybird-ios$ swift -Xfrontend -debug-constraints | |
Welcome to Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1). Type :help for assistance. | |
1> 1 + 1 | |
---Constraint solving for the expression at [/var/folders/k_/1374v5ms6wz1lhtvrkrky2800000gq/T/repl1-b583bf..swift:1:1 - line:1:5]--- | |
---Initial constraints for the given expression--- | |
(binary_expr type='$T3' location=/var/folders/k_/1374v5ms6wz1lhtvrkrky2800000gq/T/repl1-b583bf..swift:1:3 range=[/var/folders/k_/1374v5ms6wz1lhtvrkrky2800000gq/T/repl1-b583bf..swift:1:1 - line:1:5] | |
(overloaded_decl_ref_expr type='$T0' location=/var/folders/k_/1374v5ms6wz1lhtvrkrky2800000gq/T/repl1-b583bf..swift:1:3 range=[/var/folders/k_/1374v5ms6wz1lhtvrkrky2800000gq/T/repl1-b583bf..swift:1:3 - line:1:3] name=+ number_of_decls=27 function_ref=unapplied decls=[ | |
Swift.(file).Float.+, | |
Swift.(file).Double.+, | |
Swift.(file).Float80.+, |
NewerOlder