Skip to content

Instantly share code, notes, and snippets.

Chris Lattner lattner

Block or report user

Report or block lattner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lattner
lattner / DarwinMath.swift
Created Apr 28, 2019
This is math.h from the MacOSX10.14.sdk, as produced by the Swift importer
View DarwinMath.swift
import Darwin
/*
* Copyright (c) 2002-2017 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with the
@lattner
lattner / DarwinMath.h
Created Apr 28, 2019
This is math.h copied from the MacOSX10.14.sdk, to use as an example of the Swift importer
View DarwinMath.h
/*
* Copyright (c) 2002-2017 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with the
* License. Please obtain a copy of the License at
* http://www.apple.com/publicsource and read it before using this file.
@lattner
lattner / OpaqueTypeAliases.md
Last active Apr 4, 2019
Super sketchy description of an opaque type alias feature
View OpaqueTypeAliases.md

Opaque Type Aliases

...

NOTE: This has been abandonded. Only kept around for theoretical historical interest.

NOTE: This is a super sketchy attempt to describe an alternative approach to solve the problems outlined in SE-0244 - Opaque Result Types. This document is intended to be read side-by-side with that proposal.

Introduction

@lattner
lattner / TeamJobPost.md
Last active Jul 3, 2019
TensorFlow Modeling in Swift and Compilers for Machine Learning
View TeamJobPost.md

TensorFlow Modeling in Swift and Compilers for Machine Learning

Google is an “AI first” company and Google Brain is making major investments to build out infrastructure for existing accelerators such as Cloud TPUs and GPUs as well as the coming wave of “edge” accelerators for mobile, automotive, AIY, and other low-power applications. Our infrastructure is pervasively open-source, and covers all levels of the stack - from compilers and programming languages, to high-performance runtimes, to production ML model development, support for multiple ML frameworks, and includes research on large batch training and other novel applications of these accelerators.

We are looking to hire for a number of positions in the areas listed below. We love working with people who combine a passion for learning and growth with product

View unicodeintegerliterals.md
  • Proposal: SE-XXXX
  • Author: Kelvin Ma (@taylorswift)
  • Review manager:
  • Status: Awaiting review
  • Implementation:
  • Threads: 1

Introduction

Character processing is everywhere - particularly when working with ASCII. However, Swift's support for working with it is awkward and suboptimal. This proposal seeks to improve character processing support by allowing Swift integers to be written using single quoted character literals, which is much more consistent with other languages and will reduce a point of friction in string processing code.

@lattner
lattner / async_swift_proposal.md
Last active Aug 20, 2019 — forked from oleganza/async_swift_proposal.md
Concrete proposal for async semantics in Swift
View async_swift_proposal.md

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.

You can’t perform that action at this time.