profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/benlangmuir/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Ben Langmuir benlangmuir Waterloo, ON, Canada

llvm/llvm-project 8577

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.

benlangmuir/sourcekit-lsp 2

Language Server Protocol implementation for Swift

benlangmuir/lldb 1

Mirror of official lldb git repository located at http://llvm.org/git/lldb. Updated hourly.

benlangmuir/clang 0

Mirror of official clang git repository located at http://llvm.org/git/clang. Updated hourly.

benlangmuir/gitignore 0

A collection of useful .gitignore templates

benlangmuir/home 0

Dotfiles, scripts, etc.

benlangmuir/indexstore-db 0

Index database library for use with sourcekit-lsp

benlangmuir/language-server-protocol 0

Defines a common protocol for language servers.

benlangmuir/llvm 0

Mirror of official llvm git repository located at http://llvm.org/git/llvm. Updated hourly.

created tagapple/sourcekit-lsp

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-04-19-a

Language Server Protocol implementation for Swift and C-based languages

created time in a day

created tagapple/indexstore-db

tagswift-5.5-DEVELOPMENT-SNAPSHOT-2021-04-19-a

Index database library for use with sourcekit-lsp

created time in a day

created tagapple/sourcekit-lsp

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-18-a

Language Server Protocol implementation for Swift and C-based languages

created time in 3 days

created tagapple/indexstore-db

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-18-a

Index database library for use with sourcekit-lsp

created time in 3 days

created tagapple/sourcekit-lsp

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-16-a

Language Server Protocol implementation for Swift and C-based languages

created time in 5 days

created tagapple/indexstore-db

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-16-a

Index database library for use with sourcekit-lsp

created time in 5 days

create barnchapple/sourcekit-lsp

branch : release/5.5

created branch time in 5 days

create barnchapple/indexstore-db

branch : release/5.5

created branch time in 5 days

created tagapple/sourcekit-lsp

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-15-a

Language Server Protocol implementation for Swift and C-based languages

created time in 6 days

created tagapple/indexstore-db

tagswift-DEVELOPMENT-SNAPSHOT-2021-04-15-a

Index database library for use with sourcekit-lsp

created time in 6 days

push eventapple/swift-collections-benchmark

Karoy Lorentey

commit sha db30b38fc0b5c6bea515b304100d82ac8600cfc5

Stop using CG* types outside renderers Using CGFloat/CGPoint/CGRect, and especially AffineTransform/CGAffineTransform in a cross-platform context seems inadvisable.

view details

Karoy Lorentey

commit sha faa1b2c93b9bee125cbede7201b2e50f0e802c2e

Upgrade Measurement into a top-level type, with a compatibility alias

view details

Karoy Lorentey

commit sha 665cbb154a55f45bcedd2ab4faf17b1b7ac06de3

Merge pull request #8 from lorentey/decore-graphics Stop using CG types outside renderers

view details

push time in 6 days

PR merged apple/swift-collections-benchmark

Stop using CG types outside renderers

Using CGFloat/CGPoint/CGRect, and especially AffineTransform/CGAffineTransform in a cross-platform context seems inadvisable.

Resolves #5.

Checklist

  • [X] I've read the Contribution Guidelines
  • [X] My contributions are licensed under the Swift license.
  • [X] I've followed the coding style of the rest of the project.
  • [X] I've added tests covering my changes (if appropriate).
  • [X] I've verified that my change compiles and works correctly, and does not break any existing tests.
  • [ ] I've updated the documentation (if appropriate).
+1290 -303

2 comments

32 changed files

lorentey

pr closed time in 6 days

issue closedapple/swift-collections-benchmark

Build fails off macOS due to missing AffineTransform in Foundation module

When running the build for all platforms I found it fails due to AffineTransform only being available on macOS. See the docs below.

The error shows in CGTypes.swift in block which includes iOS, tvOS and watchOS which do not have AffineTransform in Foundation. The build target is set to build for all platform and this package is a dependency of Swift Collections which will also need to build across Apple's platforms and ideally Linux and Windows.

Information

  • version 0.0.1
  • latest stable platform version
  • Swift 5.4

Checklist

  • [x] If possible, I've reproduced the issue using the main branch of this package.
  • [x] I've searched for existing GitHub issues.

Steps to Reproduce

  • Build for iOS
  • See error in CGTypes.swift

Expected behavior

There should be an equivalent type which can be used off macOS on the other platforms. I tried CoreGraphics.CGAffineTransform but it does not work quite the same.

Actual behavior

Due to the missing type the build fails for iOS. It appears it would only build for macOS.

closed time in 6 days

brennanMKE

pull request commentapple/swift-collections-benchmark

Stop using CG types outside renderers

@swift-ci test

lorentey

comment created time in 6 days

pull request commentapple/swift-collections-benchmark

Stop using CG types outside renderers

@swift-ci test

lorentey

comment created time in 6 days

PR opened apple/swift-collections-benchmark

Stop using CG types outside renderers

Using CGFloat/CGPoint/CGRect, and especially AffineTransform/CGAffineTransform in a cross-platform context seems inadvisable.

Resolves #5.

Checklist

  • [X] I've read the Contribution Guidelines
  • [X] My contributions are licensed under the Swift license.
  • [X] I've followed the coding style of the rest of the project.
  • [X] I've added tests covering my changes (if appropriate).
  • [X] I've verified that my change compiles and works correctly, and does not break any existing tests.
  • [ ] I've updated the documentation (if appropriate).
+1254 -291

0 comment

30 changed files

pr created time in 6 days

push eventapple/swift-collections-benchmark

Joseph Heck

commit sha 7012b2df9e5b92c8316dcf4b9fcaf8cde6c4ab2a

Example for docs (#6) * Adding an example into the documentation directory * rephrasing to remove simply, just * Apply suggestions from code review applying suggestions Co-authored-by: Karoy Lorentey <klorentey@apple.com> * applying suggestions from review * dropping do-nothing tests in example * removing the redundant step details Co-authored-by: Karoy Lorentey <klorentey@apple.com>

view details

push time in 6 days

PR merged apple/swift-collections-benchmark

Example for docs

While following along with the documentation, I stumbled setting up a Package.swift for the example, and ran into some odd errors when I missed a dependency (filed bug https://bugs.swift.org/browse/SR-14459), so I thought the documentation would benefit from an example directory to make it easier for others to follow along and learn how to use this library. I made the example content such that the command-line examples in the docs should be easy to quickly follow and reproduce locally, and otherwise it's stock swift package init content.

While I'm far from a professional editor, I also went through and made some language changes — removing some instances of 'simply' and 'just' — and reframing a few places out of passive voice where it seemed beneficial to be more direct. I tried to not change everything in order to keep the original, personal, voice of the doc intact.

I've left the wording edits as separate commits in this PR, so they can be easily dropped from the PR if you don't find them appropriate. I used to use both 'simply' and 'just' quite frequently myself, thinking it made things more approachable and less scary, but have recently learned (and converted to the idea) that they can often have the reverse effect, especially for novice, confused, or frustrated readers.

Checklist

  • [x] I've read the Contribution Guidelines
  • [x] My contributions are licensed under the Swift license.
  • [x] I've followed the coding style of the rest of the project.
  • [ ] I've added tests covering my changes (if appropriate).
  • [x] I've verified that my change compiles and works correctly, and does not break any existing tests.
  • [x] I've updated the documentation (if appropriate).
+97 -14

1 comment

4 changed files

heckj

pr closed time in 6 days

pull request commentapple/swift-collections-benchmark

Example for docs

@swift-ci test

heckj

comment created time in 6 days

issue openedapple/swift-collections-benchmark

Guide on writing benchmarking tasks

We need a chapter 2 of the documentation that's all about writing benchmarks.

The addSimple method demonstrated in chapter 1 has no support for omitting parts of the code from the benchmarking scope, so only a fraction of benchmarks can use it.

The real add method has support for adding setup code that isn't measured (both code that needs to be only run once per each input, and code that needs to be repeated before each measurement), but it is way too subtle to use without adequate documentation.

created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

 This is where this package comes in -- it lets us easily create, run, and analyz  ### Defining Benchmarks -To add benchmarks, we can simply put our implementation in a new executable target, and type the following code into its `main.swift` file:+The `CollectionsBenchmark` library makes it easy to add an executable target for running, collecting, visualizing, and comparing benchmarks from the command line.+To create a benchmark CLI tool, create a main.swift file and within it:++1. Import `CollectionsBenchmark`.+2. Create a `Benchmark` instance with an appropriate title.

Stripped out the step-markers and collapsed that back down to just a couple of sentences.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

 This is where this package comes in -- it lets us easily create, run, and analyz  ### Defining Benchmarks -To add benchmarks, we can simply put our implementation in a new executable target, and type the following code into its `main.swift` file:+The `CollectionsBenchmark` library makes it easy to add an executable target for running, collecting, visualizing, and comparing benchmarks from the command line.+To create a benchmark CLI tool, create a main.swift file and within it:++1. Import `CollectionsBenchmark`.+2. Create a `Benchmark` instance with an appropriate title.

Heh - I hadn't quite come up to speed with your tooling to be able to draft anything on that quickly, but yeah - I can see where it'd be a super-interesting topic, and given the complexity of it, worthy of some notes.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

+extension Sequence {+  public func kalimbaOrdered() -> [Element] {+    var kalimba: [Element] = []+    kalimba.reserveCapacity(underestimatedCount)+    var insertAtStart = false+    for element in self {+      if insertAtStart {+        kalimba.insert(element, at: 0)+      } else {+        kalimba.append(element)+      }+      insertAtStart.toggle()+    }+    return kalimba+  }+}++// import Collections++// extension Sequence {+//   public func kalimbaOrdered() -> Deque<Element> {

Added back in an uncommented code - kalimbaOrdered2()

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

 This is where this package comes in -- it lets us easily create, run, and analyz  ### Defining Benchmarks -To add benchmarks, we can simply put our implementation in a new executable target, and type the following code into its `main.swift` file:+The `CollectionsBenchmark` library makes it easy to add an executable target for running, collecting, visualizing, and comparing benchmarks from the command line.+To create a benchmark CLI tool, create a main.swift file and within it:++1. Import `CollectionsBenchmark`.+2. Create a `Benchmark` instance with an appropriate title.

I think this is slicing it a little to fine -- "Import CollectionsBenchmark" looks far better as code to me. (If people are anything like me, then they'll just copy and paste the sample code and adapt it to their liking anyway. 😉)

(Aside: We badly need a chapter two of this about writing benchmark tasks -- addSimple only covers a small fraction of benchmarks, and the real add is quite a bit more subtle.)

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

 This is where this package comes in -- it lets us easily create, run, and analyz  ### Defining Benchmarks -To add benchmarks, we can simply put our implementation in a new executable target, and type the following code into its `main.swift` file:+The `CollectionsBenchmark` library makes it easy to add an executable target for running, collecting, visualizing, and comparing benchmarks from the command line.+To create a benchmark CLI tool, create a main.swift file and within it:++1. Import `CollectionsBenchmark`.+2. Create a `Benchmark` instance with an appropriate title.

I thought it made the process of adding a benchmark to a new CLI target a bit more clear. General theory was "explain what you're about to see" and then "see the work in practice". If you think it's needlessly redundant, I'll strip it out.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

+// swift-tools-version:5.3+// The swift-tools-version declares the minimum version of Swift required to build this package.++import PackageDescription++let package = Package(+    name: "Kalimba",+    products: [+        // Products define the executables and libraries a package produces, and make them visible to other packages.+        .library(+            name: "Kalimba",+            targets: ["Kalimba"]),

Nah, this is fine! I have no problem with the library name.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

+import XCTest++#if !canImport(ObjectiveC)+public func allTests() -> [XCTestCaseEntry] {+    return [+        testCase(KalimbaTests.allTests),+    ]+}+#endif

Cool - only here due to the swift package init structure

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

+import XCTest+@testable import Kalimba++final class KalimbaTests: XCTestCase {+    func testExample() {+        // This is an example of a functional test case.+        // Use XCTAssert and related functions to verify your tests produce the correct+        // results.+        XCTAssertEqual(Kalimba().text, "Hello, World!")+    }

It was basically the testing structure from a stock swift package init invocation - it's not really doing anything, so I'll strip it out.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

+// swift-tools-version:5.3+// The swift-tools-version declares the minimum version of Swift required to build this package.++import PackageDescription++let package = Package(+    name: "Kalimba",+    products: [+        // Products define the executables and libraries a package produces, and make them visible to other packages.+        .library(+            name: "Kalimba",+            targets: ["Kalimba"]),

Yep, I was inferring a package name from the example you preferred up front, the more important element in all this was that I was trying to match 'kalimba-benchmark' from your command-line examples. If you think it would make it more obvious as "KalimbaExample" or something, I'm totally good with changing it.

heckj

comment created time in 6 days

Pull request review commentapple/swift-collections-benchmark

Example for docs

 $ open chart.png  (If you are using Linux, you may need to replace `png` with `svg` -- you'll get the same charts, only in a different format!) -Here is how the resulting graph looks with the results I've just collected:+Here is how the resulting graph looks with the results collected:

"Just" means "very recently" here.

Here is how the resulting graph looks with the results we've just collected:
heckj

comment created time in 6 days