Skip to content

Instantly share code, notes, and snippets.

View samisuteria's full-sized avatar

Sami Suteria samisuteria

View GitHub Profile
import Foundation
struct Point: Equatable, CustomStringConvertible {
let x: Int
let y: Int
init(_ x: Int, _ y: Int) {
self.x = x
self.y = y
}
@samisuteria
samisuteria / ad-manifesto.md
Created October 23, 2018 23:44 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto

First-Class Automatic Differentiation in Swift: A Manifesto

This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.

Table of Contents

Inspired from https://drboolean.gitbooks.io/mostly-adequate-guide/content/ch5.html
// Curries by partially applying 1 out of 2 arguments
func curry<A, B, C>(fn: (A, B) -> C, _ val: A) -> (B -> C) {
return { b in
fn(val, b)
}
}
// "compose" operator
<html>
<body>
<script type='text/javascript'>
(function(){
try{
var msg = '\n _\n (_)\n _ _ __ ___ __ _ _ _ _ __\n | | \'_ ` _ \\ / _` | | | | \'__|\n | | | | | | | (_| | |_| | |\n |_|_| |_| |_|\\__, |\\__,_|_|\n __/ |\n |___/\n';
msg += '========================================\nYou opened the console! Know some code,\ndo you? Want to work for one of the best\nstartups around? http://imgur.com/jobs\n========================================\n';
console.log(msg);
}catch(e){}
})()

Keybase proof

I hereby claim:

  • I am samisuteria on github.
  • I am samisuteria (https://keybase.io/samisuteria) on keybase.
  • I have a public key ASAyQkvBiGNR--jwss_pszVAuSosmaohdhSnkAdR3vqypAo

To claim this, I am signing this object:

@samisuteria
samisuteria / Main.storyboard
Created July 16, 2015 00:05
Auto constraints vs Frame Setting with 2 Buttons Example
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>