Skip to content

Instantly share code, notes, and snippets.

Avatar

Guillaume Lessard glessard

View GitHub Profile
@glessard
glessard / se-unaligned-accesses.md
Last active Feb 2, 2022
Unaligned Loads & Stores
View se-unaligned-accesses.md
@glessard
glessard / se-better-buffer-slices.md
Last active Nov 30, 2021
Partial Buffer Initialization / Better Buffer Slices
View se-better-buffer-slices.md

Partial Buffer Initialization / Better Buffer Slices

  • Proposal: [SE-NNNN Better Buffer Slices (and Partial Initialization of Buffers)][proposal]
  • Author: Guillaume Lessard
  • Review Manager: TBD
  • Status: pending
  • Implementation: [Draft Pull Request][draft-pr]
  • Bugs: rdar://51817146
  • Previous Revision: none
@glessard
glessard / se-buffer-pointer-initialization.md
Last active Dec 6, 2021
Improvements to BufferPointer and Pointer initialization methods
View se-buffer-pointer-initialization.md

Initialization improvements for UnsafePointer and UnsafeBufferPointer family

  • Proposal: [SE-NNNN Initialization improvements for UnsafePointer and UnsafeBufferPointer family][proposal]
  • Author: Guillaume Lessard
  • Review Manager: TBD
  • Status: [Draft Pull Request][draft-pr]
  • Implementation: pending
  • Bugs: rdar://51817146, https://bugs.swift.org/browse/SR-14982 (rdar://81168547), rdar://74655413
  • Previous Revision: none
@glessard
glessard / NNNN-UP-and-URP-improvements.md
Last active Oct 23, 2021
NNNN Pointer API usability improvements
View NNNN-UP-and-URP-improvements.md

Pointer API Usability Improvements

  • Proposal: [SE-NNNN full proposal draft][proposal]
  • Authors: Guillaume Lessard, Andrew Trick
  • Review Manager: TBD
  • Status: [Draft pull request][draft-pr]
  • Implementation: pending
  • Bugs: rdar://64342031, SR-11156 (rdar://53272880), rdar://22541346
  • Previous Revision: none
View NNNN-withMemoryRebound.md

Expand usability of withMemoryRebound

View keybase.md

Keybase proof

I hereby claim:

  • I am glessard on github.
  • I am glessard (https://keybase.io/glessard) on keybase.
  • I have a public key ASBg9FfGSW_7QAPJ-Sd1KFxbrIzz4KVj4PgcwmlUTGkR5wo

To claim this, I am signing this object:

@glessard
glessard / url-extensions.swift
Created Mar 8, 2018
Extensions that help reduce pain when building up Foundation.URL instances
View url-extensions.swift
//
// url-extensions.swift
//
// Created by Guillaume Lessard
// Copyright (c) 2018 Guillaume Lessard. All rights reserved.
//
// https://gist.github.com/glessard/a2b2916aa74f082a58d50a674174f1a4
//
import Foundation
View result-struct.swift
public struct Result<Value>
{
private let state: State<Value>
init(_ value: Value) {
state = .value(value)
}
init(_ error: Error) {
state = .error(error)
@glessard
glessard / syncprint.swift
Last active Aug 31, 2016
print, synchronized for multiple threads
View syncprint.swift
//
// syncprint.swift
//
// Created by Guillaume Lessard on 2014-08-22.
// Copyright (c) 2016 Guillaume Lessard. All rights reserved.
//
// https://github.com/glessard/syncprint
// https://gist.github.com/glessard/826241431dcea3655d1e
//
@glessard
glessard / future.swift
Last active Aug 29, 2015
Asynchronous future result in Swift. No new type.
View future.swift
//
// future.swift
//
// Created by Guillaume Lessard on 2014-11-14.
// Copyright (c) 2014 Guillaume Lessard. All rights reserved.
//
// https://gist.github.com/glessard/2abbfd76d401b1b833cc
//
import Dispatch