Skip to content

Instantly share code, notes, and snippets.

View inamiy's full-sized avatar

Yasuhiro Inami inamiy

View GitHub Profile
@rxwei
rxwei / ad-manifesto.md
Last active December 6, 2024 16:54
First-Class Automatic Differentiation in Swift: A Manifesto
@Icelandjack
Icelandjack / Notation.markdown
Last active July 6, 2019 18:37
Notes on Notation

Non-standard operators I use :) linked to from my twitter profile

I use kind synonyms

type T   = Type
type TT  = T -> T
type TTT = T -> TT
type C   = Constraint
type TC  = T -> C
// swift/stdlib/public/runtime/Metadata.cpp をプリプロセッサのみ実行した結果から抜粋
struct ValueWitnessTable;
namespace value_witness_types {
typedef OpaqueValue * (*initializeBufferWithCopyOfBuffer) (ValueBuffer *, ValueBuffer *, const Metadata *);
typedef void (*destroy) (OpaqueValue *, const Metadata *);
typedef OpaqueValue * (*initializeWithCopy) (OpaqueValue *, OpaqueValue *, const Metadata *);
typedef OpaqueValue * (*assignWithCopy) (OpaqueValue *, OpaqueValue *, const Metadata *);
typedef OpaqueValue * (*initializeWithTake) (OpaqueValue *, OpaqueValue *, const Metadata *);
//
// main.swift
// RoutingApproaches
//
// Created by Chris Eidhof on 01.08.18.
// Copyright © 2018 objc.io. All rights reserved.
//
import Foundation
const Day = ({ get, left, right }) => {
const map = f => Day ({
get: f (extract()),
left, right
})
const extend = f =>
Day ({
get: (left, right) => f (Day ({ get, left, right })),
@niwatako
niwatako / CodePiece.txt
Created June 21, 2018 12:33
Swiftで高カインド多相 #CodePiece #potatotips
potatotips #52 (iOS/Android開発Tips共有会) - connpass
https://potatotips.connpass.com/event/88164/
## inamiy いなみ Swiftで高カインド多相 iOS
モナドが作れる話
型コンストラクタを考える。型を引数にとり、型を返す。
@niwatako
niwatako / CodePiece.txt
Created June 20, 2018 10:59
『WWDC18 報告会 + ラボで聞いてきました』 #CodePiece #ca_swift
CA.swift #6 WWDC18 報告会 - connpass
https://cyberagent.connpass.com/event/88328/
## 『WWDC18 報告会 + ラボで聞いてきました』
稲見 泰宏 @inamiy
AbemaTVのiOSエンジニアをしています。Autolayoutと空港で写真撮るのが趣味です。
CAからは今回8人参加しました。CA.swiftでは現地の雰囲気や治験を共有できれば。
simulatorsIdentifiers=$(instruments -s devices |
grep -o "iPhone .* (.*) \[.*\]" | #only iPhone
grep -o "\[.*\]" | #only UUID
sed "s/^\[\(.*\)\]$/\1/" | #remove square brackets
sed 's/^/"/;$!s/$/"/;$s/$/"/' | #add quotes
sed '$!s/$/,/' #add comma to separate each element
)
arrayOfSimulatorsIdentifiers=($(echo "$simulatorsIdentifiers" | tr ',' '\n'))
@gvolpe
gvolpe / di-in-fp.md
Last active September 16, 2024 07:18
Dependency Injection in Functional Programming

Dependency Injection in Functional Programming

There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.

A few of the most claimed benefits are the following:

  • Dependency Injection.
  • Life cycle management.
  • Dependency graph rewriting.
@marcrasi
marcrasi / XXXX-constexpr.md
Last active February 7, 2025 10:33
Compile Time Constant Expressions for Swift