[swift-corelibs-dev] NSURL.fileSystemRepresentation implementation

2016-01-04 Thread Eugene Gubin via swift-corelibs-dev
As far as I understand NSURL is responsible for deallocating memory to which UnsafePointer returned from NSURL.fileSystemRepresentation points to. Could one use private buffer to store result for NSURL.fileSystemRepresentation or layout of this class should be the same as CFURL? Also NSFileManager

[swift-corelibs-dev] LazySequenceType: make prefix return a lazy collection

2016-01-04 Thread Mark Aron Szulyovszky via swift-corelibs-dev
Hi, I came across hit issue while chaining filter() and prefix() on lazy sequences: https://bugs.swift.org/browse/SR-461 And started wondering if it would be more consistent if lazy.filter().prefix() returned a custom LazySequenceType instead of Slice>>. That way lazy.filter().prefix() could be

Re: [swift-corelibs-dev] corelibs-xctest + swiftpm

2016-01-04 Thread Daniel Dunbar via swift-corelibs-dev
I think this makes sense (and commented in your PR). For now we will still need the manual build process because we need XCTest to build first in CI, so that we can use it in building/testing the package manager itself, but it certainly makes sense to shoot for it to just be yet another package.

Re: [swift-corelibs-dev] NSArray.descriptionWithLocale implementation

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Eugene, Interesting question. I think we may have to introduce a default implementation of -descriptionWithLocale:indent: which calls -descriptionWithLocale:, which has a default implementation of calling -description. It may be the case that we then have to limit the behavior to subclasses

Re: [swift-corelibs-dev] Inconsistencies between Foundation APIs

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Ian, Any place where the API differs should be marked with a comment like this: /// - Experiment: This is a draft API currently under consideration for official import into Foundation If not, then we found some place that we either need to change or propose a change for. We can track those

Re: [swift-corelibs-dev] Inconsistencies between Foundation APIs

2016-01-04 Thread Ian Ynda-Hummel via swift-corelibs-dev
Got it. I've seen the experimental thing elsewhere in the code. I'll work under the assumption that inconsistencies are experimental and I'll open bugs for things that are inconsistent but not marked as such. On Mon, Jan 4, 2016 at 2:51 PM Tony Parker wrote: > Hi Ian, > > Any place where the API

Re: [swift-corelibs-dev] NSXMLNode and Friends

2016-01-04 Thread Robert Stephen Thompson via swift-corelibs-dev
Ok, after trying to get this building on Linux, I have discovered what you mean. I have gotten it building successfully on Linux, unfortunately this required changes to build settings in other modules, because /usr/include/libxml2 wasn’t being added to the search locations. And this then result

Re: [swift-corelibs-dev] [xctest] Terminology: What to call "swift-corelibs-xctest" and "Apple XCTest"

2016-01-04 Thread Tony Parker via swift-corelibs-dev
We’ve also used “Darwin Foundation” vs “Swift Core Libraries Foundation.” I’m open to suggestions on this from everyone. I haven’t found a set of terms that I’m really happy with yet. - Tony > On Dec 24, 2015, at 9:26 AM, Daniel Dunbar via swift-corelibs-dev > wrote: > > I believe we have be

Re: [swift-corelibs-dev] Equality, etc in Foundation

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Luke, Your proposed fix seems reasonable to me. Did you submit it as a PR too? Thanks, - Tony > On Dec 29, 2015, at 11:28 PM, Luke Howard via swift-corelibs-dev > wrote: > > Proposed fix: > > https://github.com/lhoward/swift-corelibs-foundation/commit/fe5dcce6ccf06d2f5b8e85c792012dbaee8f5

Re: [swift-corelibs-dev] Equality, etc in Foundation

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Cool, thanks Philippe and Luke! - Tony > On Jan 4, 2016, at 12:59 PM, Philippe Hausler wrote: > > Actually I think we already got this one integrated. > >> On Jan 4, 2016, at 12:58 PM, Tony Parker via swift-corelibs-dev >> mailto:swift-corelibs-dev@swift.org>> wrote: >> >> Hi Luke, >> >> Yo

Re: [swift-corelibs-dev] Equality, etc in Foundation

2016-01-04 Thread Philippe Hausler via swift-corelibs-dev
Actually I think we already got this one integrated. > On Jan 4, 2016, at 12:58 PM, Tony Parker via swift-corelibs-dev > wrote: > > Hi Luke, > > Your proposed fix seems reasonable to me. Did you submit it as a PR too? > > Thanks, > - Tony > >> On Dec 29, 2015, at 11:28 PM, Luke Howard via sw

Re: [swift-corelibs-dev] #if __CORELIBS_FOUNDATION__

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Drew, This difference is a consequence of the lack of bridging between types like String and NSString. If this API returned [String : AnyObject], then the dictionary could not contain String (because String is not an object). This is something we will have to fix up in some comprehensive wa

Re: [swift-corelibs-dev] CChar vs Int8

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Luke, > On Jan 2, 2016, at 8:28 PM, Luke Howard via swift-corelibs-dev > wrote: > > Many Foundation APIs use Int8 instead of CChar when representing C strings, > e.g.: > var UTF8String: UnsafePointer >

Re: [swift-corelibs-dev] CChar vs Int8

2016-01-04 Thread Philippe Hausler via swift-corelibs-dev
No C strings import as UnsafePointer for some reason; they all import as Int8 e.g. public func pthread_setname_np(_: UnsafePointer) -> Int32 > On Jan 4, 2016, at 1:20 PM, Tony Parker via swift-corelibs-dev > wrote: > > Hi Luke, > >> On Jan 2, 2016, at 8:28 PM, Luke Howard via swift-corelibs

Re: [swift-corelibs-dev] CChar vs Int8

2016-01-04 Thread Luke Howard via swift-corelibs-dev
OK, I filed [SR-466] as a compiler issue. If the behaviour changes and that flows through to Darwin Foundation, we can update the open source one... — Luke > On 5 Jan 2016, at 8:21 AM, Philippe Hausler wrote: > > No C strings import as UnsafePointer for some reason; they all import > as Int8

Re: [swift-corelibs-dev] Inconsistencies between Foundation APIs

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Great, sounds good. If you ever notice a divergence, feel free to either file a bug or submit a PR that adds the comment. I don’t want to lose track of these things. - Tony > On Jan 4, 2016, at 11:55 AM, Ian Ynda-Hummel wrote: > > Got it. I've seen the experimental thing elsewhere in the code

Re: [swift-corelibs-dev] LazySequenceType: make prefix return a lazy collection

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Mark, I’m going to loop in the swift-dev list for this question. - Tony > On Jan 4, 2016, at 5:15 AM, Mark Aron Szulyovszky via swift-corelibs-dev > wrote: > > Hi, > > I came across hit issue while chaining filter() and prefix() on lazy > sequences: > https://bugs.swift.org/browse/SR-461

Re: [swift-corelibs-dev] corelibs-xctest + swiftpm

2016-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Keith, Also - the Xcode project is provided for development ease-of-use only. This version of XCTest is only for non-Darwin platforms, and that builds with the simple shell script that is in the root directory (build_script.py). - Tony > On Jan 4, 2016, at 9:19 AM, Daniel Dunbar via swift-c

[swift-corelibs-dev] NSRegularExpression implementation

2016-01-04 Thread Lukas Stabe via swift-corelibs-dev
I have been thinking about trying to work on NSRegularExpression in corelibs-foundation, although I am not yet sure I’ll have time for it. If I were to attempt it, am I correct in assuming that it should be based on icus (u)regex.h? I have not found any Regex support in CoreFoundation. — Lukas