Re: [swift-users] What makes a good lazy procedure? And how to do it?

2018-01-09 Thread Daryle Walker via swift-users
> On Jan 2, 2018, at 11:57 PM, Ben Cohen wrote: > > I think this is a perfect case for an addition to the existing Lazy suite > (and IMO would make a good evolution proposal too, as this kind of “chunked” > splitting is a useful feature). You’re right though, there isn’t

Re: [swift-users] What makes a good lazy procedure? And how to do it?

2018-01-08 Thread Daryle Walker via swift-users
> On Jan 8, 2018, at 3:57 PM, Ben Cohen wrote: > >> Is this active, at least in Xcode 9.2? > > Xcode 9.2 shipped with a variant of Swift 4.0. IndexDistance should be > removed in 4.1 and later. You can try it in Xcode today though by downloading > the latest master or

Re: [swift-users] What makes a good lazy procedure? And how to do it?

2018-01-08 Thread Daryle Walker via swift-users
> On Jan 2, 2018, at 11:57 PM, Ben Cohen wrote: > > Hi Daryle, > > I think this is a perfect case for an addition to the existing Lazy suite > (and IMO would make a good evolution proposal too, as this kind of “chunked” > splitting is a useful feature). You’re right

[swift-users] Crossing Sequence/Collection line for lazy operations

2018-01-04 Thread Daryle Walker via swift-users
The docs for LazySequenceProtocol says to create lazy sequence operations, extend the protocol with methods that return lazy wrappers that conform to LazySequenceProtocol. The analogue for LazyCollectionProtocol just replaces all the “sequences” with “collections.” But I have written a Sequence

Re: [swift-users] Time taken on Collection.underestimatedCount?

2018-01-03 Thread Daryle Walker via swift-users
hanks! > >> On Dec 29, 2017, at 17:54, Daryle Walker via swift-users >> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote: >> >> Sequence.underestimatedCount is supposed to work at O(1) time, according to >> the doc

[swift-users] What makes a good lazy procedure? And how to do it?

2017-12-29 Thread Daryle Walker via swift-users
I’ve been playing around with iterators/sequences/collections that partition to a set stride. For instance, given a collection with 16 elements and a stride argument of 3; I can generate a collection with 6 elements, the first 5 are sub-collections of count 3 and the last a sub-collection of

[swift-users] Why can't Swift properly calculate this conformance?

2017-12-29 Thread Daryle Walker via swift-users
I ran into a problem while playing around with sequences that generate equally-partitioned sub-collections. (For example, have a collection of 15 elements; make it a collection of 5 elements instead, each a sub-collection of 3 original elements.) I recall the issue on StackOverflow at

[swift-users] CRLF-line parsing library

2017-12-24 Thread Daryle Walker via swift-users
Since parsing lines along CR and/or LF breaks seems very common in the text processing code I read, I’ve decided to make my own speciality code for that purpose before the next phase of my plans. Right now, it’s at a branch , and I need

[swift-users] Documentation for optional closure arguments

2017-09-20 Thread Daryle Walker via swift-users
Trying out Xcode 9. Documenting a function that takes a trailing closure. The list of arguments includes the closure’s arguments! But if the closure is Optional, the inner arguments are not pierced and therefore not included in the outer function’s summary. Can that be fixed? Sent from my

Re: [swift-users] Am I missing something on how the Package Manager works?

2017-08-25 Thread Daryle Walker via swift-users
> On Aug 21, 2017, at 4:46 AM, Tatsuyuki Kobayashi > wrote: > > I think your process terminates immediately after calling ‘task.resume()’. > > You can find the same issue at >

[swift-users] [Swift Package Manager] Use of Info-plist; use for apps

2017-08-21 Thread Daryle Walker via swift-users
1. I recall there’s a way to make a command-line tool in macOS have an “Info.plist” file, which is compiled/linked in the executable’s data segment. I used Xcode back then. Is there a way to do this through “swift build”? (I think the Xcode directions are in Apple’s Code Signing Guide.) (I

[swift-users] Am I missing something on how the Package Manager works?

2017-08-20 Thread Daryle Walker via swift-users
I’ve tried to make a command-line program with the Swift Package Manager, and use Foundation for networking (on macOS): import Foundation import Commander import HeliumLogger import LoggerAPI enum ReturnCode: Int32 { case badUrlString = 10, retrievalError } HeliumLogger.use() let main =

Re: [swift-users] [swift-evolution] How does "Sequence.joined" work?

2017-08-09 Thread Daryle Walker via swift-users
> On Aug 9, 2017, at 12:19 PM, Taylor Swift wrote: > > On Wed, Aug 9, 2017 at 10:43 AM, Daryle Walker via swift-evolution > > wrote: > >> On Aug 8, 2017, at 6:45 PM, Geordie Jay >

Re: [swift-users] [swift-evolution] How does "Sequence.joined" work?

2017-08-09 Thread Daryle Walker via swift-users
> On Aug 8, 2017, at 6:45 PM, Geordie Jay wrote: > > > Daryle Walker via swift-evolution > schrieb am Di. 8. Aug. 2017 um 21:25: >> On Aug 8, 2017, at 12:35 AM, Félix Cloutier >

Re: [swift-users] [swift-evolution] How does "Sequence.joined" work?

2017-08-08 Thread Daryle Walker via swift-users
> On Aug 8, 2017, at 12:35 AM, Félix Cloutier wrote: > > All this means is that `joined()` does not create an array that contains the > new result. It's only as magic as the COW semantics on arrays. So you’re saying the COW semantics for Array and other standard