Re: [swift-users] Type inference issue with map and filter chained

2017-10-03 Thread Will Stanton via swift-users
Is this a REPL-only issue perhaps? The code below compiles `swift build` without error for me (pasted into Sources/main.swift, Ubuntu 17.04, Swift 4 release; haven’t tried in Xcode). A similar issue, but apparently not REPL-only: https://bugs.swift.org/browse/SR-1856 Regards, Will Stanton Co

Re: [swift-users] Swift linux repl can't import

2017-04-04 Thread Will Stanton via swift-users
From https://bugs.swift.org/browse/SR-3648, the work-around seems to be passing -I /path/to/extracted/usr/lib/swift/clang/include when invoking swift (credit Lukas and others, SR-3794 is more active) So, ex. `swift -I ~/a-swift/usr/lib/swift/clang/include/` Fortunately, the issue has only come u

Re: [swift-users] DateFormatter crash on second usage (new instance) on Linux (swift 3.0.1)

2017-01-25 Thread Will Stanton via swift-users
Based on the backtrace, I think the code is running into a memory issue with Swift Foundation: https://bugs.swift.org/browse/SR-2485 https://bugs.swift.org/browse/SR-2462 I haven’t seen this in a while - are you able to try running on Swift 3.1 or 3.0.2? Your code seems to work on the IBM Sandbo

Re: [swift-users] Collection underestimatedCount() does _?

2016-03-19 Thread Will Stanton via swift-users
Hello Brent, Thanks kindly for the flair! You gave cases for which `underestimatedCount()` is used: > For sequences with easily-calculated counts, this should give us a size > that's just right. For sequences where they can kind of estimate the right > count (for instance, if you're decoding a

Re: [swift-users] Collection underestimatedCount() does _?

2016-03-18 Thread Will Stanton via swift-users
Hello Dmitri, Thank you – wasn’t aware and jumped to CollectionType’s redeclaration! File https://bugs.swift.org/browse/SR-991 since I thought the documentation could say that right there. Regards, Will Stanton > On Mar 19, 2016, at 2:08 AM, Dmitri Gribenko via swift-users > wrote: > > Hi W

[swift-users] Collection underestimatedCount() does _?

2016-03-18 Thread Will Stanton via swift-users
Hello, I came across `underestimatedCount()` and wonder what it does. I’m trying to become more familiar with Swift collections so (perhaps) I can write better-performing code! /// Returns a value less than or equal to the number of elements in /// `self`, *nondestructively*. /// /// - Complex