Re: [swift-corelibs-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (swift 4.1) #477

2017-12-21 Thread Tony Parker via swift-corelibs-dev
Hi Michael, It’s possible that this test is not deterministic. Some contributors to the project have been working on improving this over time. - Tony > On Dec 19, 2017, at 5:49 PM, Michael Ilseman wrote: > > That’s the thing, there doesn’t look to be a relevant change. Subsequent > builds pa

Re: [swift-corelibs-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (swift 4.1) #477

2017-12-19 Thread Tony Parker via swift-corelibs-dev
Last change in this area was 5 days ago: 820e3a88 : (5 days ago) Naoki Ishikawa : use optional binding Foundation/URLSession/http/HTTPURLProtocol.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) but that does not look promising as a source of a regression. When did this start fail

Re: [swift-corelibs-dev] That's Confirmed The JSON foundation Bug SR-6631, is a Bug in Darwin's Objc Foundations.

2017-12-19 Thread Tony Parker via swift-corelibs-dev
Hi Benoit, Thanks for the bug report. We’ll track it in Radar for Darwin platforms. If the swift-corelibs-foundation implementation has the same bug (perhaps — I haven’t checked) then we can continue to track it with SR-6631 separately. - Tony > On Dec 19, 2017, at 12:23 AM, Benoit Pereira da

Re: [swift-corelibs-dev] [Proposal] RangeReplaceableCollection should inherits from MutableCollection

2017-12-02 Thread Tony Parker via swift-corelibs-dev
Hi Jiannan, I think you’ll get a better answer to your question on the ‘swift-dev’ list, actually. Hope this helps, - Tony > On Dec 2, 2017, at 9:08 AM, Cao, Jiannan via swift-corelibs-dev > wrote: > > Hi everyone, > > I'd like to discuss the relation between RangeReplaceableCollection and

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated" in Linux foundation

2017-12-01 Thread Tony Parker via swift-corelibs-dev
This isn’t it, because we always call through to swift_release in CFRelease on Linux, because the CFString is a swift type under the hood. We may be able to change this to check for a CF specific hack of some kind, but in the meantime adding the retain works. PR here: https://github.com/apple/

Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-30 Thread Tony Parker via swift-corelibs-dev
Why did we give up so easily? I did not say that scripting support is somehow a non-goal. In fact, it is exactly the opposite. I do not believe that somehow API that is useful for scripts is mutually exclusive with API that is useful for apps. - Tony > On Nov 30, 2017, at 9:26 AM, Jacob Willia

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated" in Linux foundation

2017-11-29 Thread Tony Parker via swift-corelibs-dev
I see a couple of places that are suspicious there: Description: https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/URL.subproj/CFURLComponents.c#L66 And

Re: [swift-corelibs-dev] Encountering "Constant strings cannot be deallocated" in Linux foundation

2017-11-29 Thread Tony Parker via swift-corelibs-dev
Hi Brandon, This is probably a bug in the CoreFoundation C sources part of swift-corelibs-foundation. Unlike Darwin platforms, we can’t make the CFSTR(“”) macro produce a CFStringRef that cannot be overreleased. Probably there is a constant string returned from CF function, then the Swift runti

Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-28 Thread Tony Parker via swift-corelibs-dev
Of course, Foundation API has no way of distinguishing if the caller is considered a script or not. If the API is a bad idea for other kinds of apps then we simply wouldn’t add it. So, I think this proposed convenience API needs to consider all of the varied clients of Foundation. - Tony > On

Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-28 Thread Tony Parker via swift-corelibs-dev
Why does it imply a run loop rather than one of many multithreading possibilities (dispatch queue, starting one more thread, etc)? And even if it did use run loops, why is that a problem? In general we have been discouraging the use of synchronous and blocking API for many years now. It’s conve

Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-27 Thread Tony Parker via swift-corelibs-dev
h') > p.stdin.close() > out = p.stdout.read() > > Go: > cmd := exec.Command("wc") > stdin, err := cmd.StdinPipe() > io.WriteString(stdin, "blah") > out = cmd.CombinedOutput() > > Possible Swift: > let stdin = I

Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-17 Thread Tony Parker via swift-corelibs-dev
Hi Abhi, It does seem like there is a possibility of some better convenience API here. Any ideas on what form it would take? A class method on Process that returns the output, maybe? - Tony > On Nov 16, 2017, at 3:34 PM, Abhi Beckert via swift-corelibs-dev > wrote: > > Swift is a great shel

[swift-corelibs-dev] Swift 4.1 process

2017-10-19 Thread Tony Parker via swift-corelibs-dev
Hi everyone, As you’ve probably already seen, the Swift team has announced the Swift 4.1 release process: https://swift.org/blog/swift-4-1-release-process/ We’ve arranged to have swift-corelibs-foundation “auto-merge” from master for a longer period of time than the other projects. This is bec

Re: [swift-corelibs-dev] Adding type conversion capabilities to JSON encode/decode

2017-08-30 Thread Tony Parker via swift-corelibs-dev
> On Aug 30, 2017, at 3:12 PM, Sneed, Brandon wrote: > > Thanks Tony, > > Ah. That should work, and covers benefit #2 I mentioned very nicely. Only > downside is that as a developer on an app I may not expect that type to > change on the server side so I wouldn’t do it by default, and whe

Re: [swift-corelibs-dev] Adding type conversion capabilities to JSON encode/decode

2017-08-30 Thread Tony Parker via swift-corelibs-dev
I haven’t tried this myself yet, but you could imagine creating a type which represents an ABV and decodes using a single value container. Then, your custom behavior goes into the Codable implementation of this ABV type. Struct Beer then looks like: struct Beer: Codable { let name: String

Re: [swift-corelibs-dev] Adding type conversion capabilities to JSON encode/decode

2017-08-30 Thread Tony Parker via swift-corelibs-dev
I’m still not convinced that we should actually provide such a strategy. Conversions like those below seem like the domain of each type that is being decoded. If, in a particular type, the “number” can be either a true number or a string, then that type can try decoding it as one or the other an

[swift-corelibs-dev] Swift 4 branch plans

2017-08-10 Thread Tony Parker via swift-corelibs-dev
Hi all, We’re wrapping up Swift 4, and it’s past time for us to branch swift-corelibs-foundation for Swift 4 to match the rest of the projects. Here is my proposal: Monday: stop auto-merging from master to Swift 4. master becomes Swift 4 update work. After Monday: We are working on merging cha

Re: [swift-corelibs-dev] NSString.range(of:options:range:locale) incompatibility

2017-08-09 Thread Tony Parker via swift-corelibs-dev
Hi Ian, I don’t think Max has put up that PR against the swift-corelibs-foundation implementation, but we should. - Tony > On Aug 9, 2017, at 9:04 AM, Ian Partridge via swift-corelibs-dev > wrote: > > I've noticed this current difference in behaviour. > > Darwin: > > $ swift > Welcome to A

Re: [swift-corelibs-dev] Unavailability macros for APIs that aren't going to be implemented on Linux?

2017-07-28 Thread Tony Parker via swift-corelibs-dev
This sounds like a good plan to me. We’ll have to discuss the specifics of what is marked unavailable this way, probably best via code review. I think we had more hope for some of the more-dynamic methods (e.g. NSSortDescriptor, NSExpression), but it does seem clear at this point that the curre

Re: [swift-corelibs-dev] PR for better namespace support in XMLNode et al

2017-07-11 Thread Tony Parker via swift-corelibs-dev
Hi Robert, I will take a quick look. - Tony > On Jul 11, 2017, at 10:01 AM, Robert Thompson via swift-corelibs-dev > wrote: > > Hey, I have a PR up that improves the XML namespace support in XMLNode and > friends: https://github.com/apple/swift-corelibs-foundation/pull/1052 >

Re: [swift-corelibs-dev] TimeZone database

2017-07-10 Thread Tony Parker via swift-corelibs-dev
" >> >> Any thoughts? I feel like I'm missing something obvious and have gone >> too far down the rabbit hole. >> >> -- >> Ian Partridge >> ___ >> swift-corelibs-dev mailing list >> sw

Re: [swift-corelibs-dev] TimeZone database

2017-07-06 Thread Tony Parker via swift-corelibs-dev
ift-corelibs-foundation/blob/2611dcd0d9b91fecace537838294bd85f0220503/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L36-L39 > > <https://github.com/apple/swift-corelibs-foundation/blob/2611dcd0d9b91fecace537838294bd85f0220503/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L36-L39> &

Re: [swift-corelibs-dev] TimeZone database

2017-07-06 Thread Tony Parker via swift-corelibs-dev
; <https://github.com/apple/swift-corelibs-foundation/blob/2611dcd0d9b91fecace537838294bd85f0220503/CoreFoundation/NumberDate.subproj/CFTimeZone.c#L36-L39> > > Is it possible that the MacOS header is being included and defining TZDIR > before the CFTimeZone.c file is compiled? > > Alex >

Re: [swift-corelibs-dev] TimeZone database

2017-07-06 Thread Tony Parker via swift-corelibs-dev
04 VM. > > The issue was specific to the Ubuntu 16.04 docker image; when I tested in > Ubuntu 16.04 OS as a guest VM, the issue went away. > > Thanks, > > Youming Lin > IBM Cloud, Swift@IBM, Kitura developer > Austin, TX > GitHub: @youming-lin > > Tony Parker

Re: [swift-corelibs-dev] TimeZone database

2017-07-06 Thread Tony Parker via swift-corelibs-dev
Yes, we’re discussing this one internally too and trying to figure out what the right answer is. Maybe the best solution for now is to find a good mechanism to check the underlying version of the OS and split it out into a function as you suggest. - Tony > On Jul 6, 2017, at 7:37 AM, Ian Partr

Re: [swift-corelibs-dev] Foundation: NSString init detect encoding

2017-06-21 Thread Tony Parker via swift-corelibs-dev
Someone on the team here just reminded me that we do have a very basic form of encoding detection here as well: just looking for the BOM at the beginning of the data. - Tony > On Jun 21, 2017, at 9:55 AM, Tony Parker via swift-corelibs-dev > wrote: > > Our preferred approach

Re: [swift-corelibs-dev] Foundation: NSString init detect encoding

2017-06-21 Thread Tony Parker via swift-corelibs-dev
Our preferred approach so far is to mirror Foundation as closely as possible. I don’t know if we want to implement stringEncodingForData as part of swift-corelibs-foundation. In any case, we are trying to avoid bringing in as few dependencies outside of the Swift project itself as possible, to k

Re: [swift-corelibs-dev] Foundation: NSString init detect encoding

2017-06-21 Thread Tony Parker via swift-corelibs-dev
Hi Andy, > On Jun 21, 2017, at 7:39 AM, Andy Best via swift-corelibs-dev > wrote: > > Hey, > > I've been looking at the init(contentsOfFile, usedEncoding) initializer for > NSString in corelibs-foundation. > > Am I right in thinking that this method should use some method to attempt to > d

Re: [swift-corelibs-dev] Build failure and differences between test and build

2017-06-21 Thread Tony Parker via swift-corelibs-dev
> On Jun 21, 2017, at 6:30 AM, Alex Blewitt via swift-corelibs-dev > wrote: > > We had a test failure on swift-corelibs-foundation recently on master, which > was related to this pull request being merged by me: > > https://github.com/apple/swift-corelibs-foundation/pull/1043 >

Re: [swift-corelibs-dev] Query on the Foundation API notes.

2017-06-20 Thread Tony Parker via swift-corelibs-dev
Hi Mamatha, As part of the development of iOS 11 / macOS 10.13, we actually moved these API note files into the SDK instead of being part of the compiler, to allow framework authors to update them as they changed their headers, rather than requiring compiler changes. - Tony > On Jun 19, 2017,

Re: [swift-corelibs-dev] Unable to build swift-corelibs-foundation in XCode 8.3.2

2017-06-02 Thread Tony Parker via swift-corelibs-dev
Hi everyone, I’m hoping to merge these early next week. - Tony > On Jun 2, 2017, at 4:51 AM, Simon Evans via swift-corelibs-dev > wrote: > > Yes I was also seeing this issue, the Xcode project needs the swift-version 3 > set and some files were moved around during a URLSession change > > Se

Re: [swift-corelibs-dev] [swift-dev] Swift Encoders on Linux

2017-05-23 Thread Tony Parker via swift-corelibs-dev
Hi David, I think the struct Measurement should probably be very similar, but the class NSMeasurement is probably pretty different. Regardless, if there is something you think needs to be ported over (I would believe that there are a few changes made there that we haven’t copied yet), please d

Re: [swift-corelibs-dev] Debugging failures seen only in CI

2017-05-23 Thread Tony Parker via swift-corelibs-dev
I'm ok with that if it helps us get to the bottom of this once and for all. I wonder if it would be possible to enable the logging conditionally, so it only appears in CI? Maybe via a runtime call ("turn logging on now"). - Tony > On May 23, 2017, at 2:25 AM, Pushkar N Kulkarni wrote: > > H

Re: [swift-corelibs-dev] Swift Encoders on Linux

2017-05-23 Thread Tony Parker via swift-corelibs-dev
Hi Ankit, Our intention is to share as much of the implementation as possible. There are some details that need to be worked out around bridging of types like NSNumber (since bridging doesn't exist on Linux we may need to avoid using 'as' in a few places), but in general it could be as easy as

Re: [swift-corelibs-dev] Bring NSString functions to String

2017-05-12 Thread Tony Parker via swift-corelibs-dev
> On May 11, 2017, at 5:17 PM, Andrey Fidrya wrote: > >> >> On 12 May 2017, at 00:05, Tony Parker > > wrote: >> >>> On May 10, 2017, at 4:19 AM, Andrey Fidrya via swift-corelibs-dev >>> mailto:swift-corelibs-dev@swift.org>> wrote: >>> >>> Hi All, >>> >>> Bt

Re: [swift-corelibs-dev] Bring NSString functions to String

2017-05-11 Thread Tony Parker via swift-corelibs-dev
> On May 10, 2017, at 4:19 AM, Andrey Fidrya via swift-corelibs-dev > wrote: > > Hi All, > > Btw, when migrating from NSString's methods to URL I've noticed > that they work a bit differently: URL's methods convert strings > from NFC to NFD (decomposed) unicode form which is demonstrated > by

Re: [swift-corelibs-dev] Mark NSUnimplemented functions as unavailable.

2017-05-10 Thread Tony Parker via swift-corelibs-dev
Hi Sergej, This is a good idea, but there are some additional things to consider. In some cases, methods are partially unimplemented (with edge cases, or at least less common cases remaining unfinished). The availability macro can’t reflect that status. In other cases, we want to partially imp

Re: [swift-corelibs-dev] CharacterSet Issues

2017-03-29 Thread Tony Parker via swift-corelibs-dev
Hi David, Philippe recently put up a PR for these changes again to the overlay and its tests, but I think we’re stuck on some issue where the iPhone sim test is failing and we’re not sure why (https://github.com/apple/swift/pull/8283 ). On the darwin s

Re: [swift-corelibs-dev] NSOrderedMutableSet subscript setter

2017-03-14 Thread Tony Parker via swift-corelibs-dev
Hi Richard, I suspect the importer must be adding this due to the presence of API like objectAtIndex: on the NSOrderedSet API. If we’re missing it in swift-corelibs-foundation but it exists on Darwin, we should add it. - Tony > On Mar 14, 2017, at 7:02 AM, Richard Wei via swift-corelibs-dev

Re: [swift-corelibs-dev] URLSession test fest!

2017-03-10 Thread Tony Parker via swift-corelibs-dev
(for example, having to add > "features" to the loopback server just so that features of URLSession could > be tested), I found it very hard to know if either end was correct. > > So, just two cents from a lurker here, but this sounds like a great idea to > me. Cheers, >

Re: [swift-corelibs-dev] URLSession test fest!

2017-03-09 Thread Tony Parker via swift-corelibs-dev
-swift-corelibs-dev-boun...@swift.org > <mailto:-swift-corelibs-dev-boun...@swift.org> wrote: ----- > To: swift-corelibs-dev <mailto:swift-corelibs-dev@swift.org>> > From: Tony Parker via swift-corelibs-dev > Sent by: swift-corelibs-dev-boun...@swift.org > <

Re: [swift-corelibs-dev] Memory leak with String.range(options: .regularExpression) [SR-3536]

2017-02-08 Thread Tony Parker via swift-corelibs-dev
Hi Nethra, > On Feb 7, 2017, at 11:44 PM, Nethra Ravindran via swift-corelibs-dev > wrote: > > > > > Hi everyone, > > I am working on https://bugs.swift.org/browse/SR-3536 > > There is a memory leak when searching for the substring of a string using

Re: [swift-corelibs-dev] Building Foundation with SwiftPM

2017-01-30 Thread Tony Parker via swift-corelibs-dev
When we were first bringing up the project we had a hack that forced the compiler to do incremental builds of the Swift files. However, it turned out that it wasn’t really safe or supported. If there is some way to actually turn that on now in a way that allows quick turnaround (probably sacrif

Re: [swift-corelibs-dev] URLSession test fest!

2017-01-30 Thread Tony Parker via swift-corelibs-dev
I see what this problem is. I’ll have a PR up shortly to fix it. - Tony > On Jan 30, 2017, at 2:33 PM, Tony Parker via swift-corelibs-dev > wrote: > > Hi Peter, > >> On Jan 29, 2017, at 11:05 AM, Peter Tomaselli via swift-corelibs-dev >> mailto:swift-cor

Re: [swift-corelibs-dev] URLSession test fest!

2017-01-30 Thread Tony Parker via swift-corelibs-dev
running on macOS to be totally supported (so it’s easy to help contribute). I’ll take a look and see if I can figure out what the problem is too… - Tony > Cheers, > > Peter > >> On Jan 27, 2017, at 6:31 PM, Tony Parker via swift-corelibs-dev >> mailto:swift-corelibs-d

Re: [swift-corelibs-dev] URLSession test fest!

2017-01-27 Thread Tony Parker via swift-corelibs-dev
Hi Paul, > On Jan 27, 2017, at 12:51 AM, Paul Stringer via swift-corelibs-dev > wrote: > > Hi Tony, > > First post and excited to join the party. Great, welcome! > > I'm sure this may have been solved many times over by the community already. > Maybe we can collect some ideas on this. In t

[swift-corelibs-dev] URLSession test fest!

2017-01-24 Thread Tony Parker via swift-corelibs-dev
Hi everyone, As we’re wrapping up Swift 3.1, I think it’d be a great opportunity to have a quality focus area on one of our most important APIs: URLSession. If you’ve been wondering how to make a meaningful contribution, this is the perfect time. It’d be great to greatly expand both unit test a

Re: [swift-corelibs-dev] Asynchronous Operations

2017-01-23 Thread Tony Parker via swift-corelibs-dev
Hm, that’s probably the least bad option we have at the moment. I don’t want to introduce “new” API, as it is unlikely we will be able to remove it when whatever permanent solution comes up. - Tony > On Jan 21, 2017, at 6:09 AM, Brent Royal-Gordon via swift-corelibs-dev > wrote: > >> On Jan

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2017-01-23 Thread Tony Parker via swift-corelibs-dev
>> >> Thanks! >> Pushkar N Kulkarni, >> IBM Runtimes >> >> Simplicity is prerequisite for reliability - Edsger W. Dijkstra >> >> >> >> -swift-corelibs-dev-boun...@swift.org >> <mailto:-swift-corelibs-dev-boun...@swift.org

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2017-01-20 Thread Tony Parker via swift-corelibs-dev
libs-dev-boun...@swift.org > <mailto:-swift-corelibs-dev-boun...@swift.org> wrote: - > To: Will Stanton mailto:willstant...@yahoo.com>> > From: Tony Parker via swift-corelibs-dev > Sent by: swift-corelibs-dev-boun...@swift.org > <mailto:swift-corelibs-dev-boun...

Re: [swift-corelibs-dev] Documentation and coding style

2017-01-20 Thread Tony Parker via swift-corelibs-dev
Hi Sergej, > On Jan 20, 2017, at 6:24 AM, Sergej Jaskiewicz via swift-corelibs-dev > wrote: > > Hello everyone. > > I have a couple of questions about the core libraries that I think would be > interesting to discuss. > > The first question is about documentation comments. From what I can se

Re: [swift-corelibs-dev] NSString.isAbsolutePath inconsistency

2017-01-19 Thread Tony Parker via swift-corelibs-dev
Hi Nethra, If this was in master sometime before this past Tuesday, it should be included in the swift-3.1 branch by default (that branch received merges from master). Did you check out the latest version of the swift-3.1 branch to verify that this change was missing? - Tony > On Jan 19, 2017

Re: [swift-corelibs-dev] Need of inputs for NSExpression

2017-01-18 Thread Tony Parker via swift-corelibs-dev
ve any reasonable replacement. - Tony > > Thank you! > > Pushkar N Kulkarni, > IBM Runtimes > > Simplicity is prerequisite for reliability - Edsger W. Dijkstra > > > > -swift-corelibs-dev-boun...@swift.org > <mailto:-----swift-corelibs-dev-boun...@sw

Re: [swift-corelibs-dev] [swift-build-dev] Final merge from master to swift-3.1-branch

2017-01-18 Thread Tony Parker via swift-corelibs-dev
Thanks Mishal! For all of the contributors to swift-corelibs: if you have a change which you think is appropriate for inclusion into Swift 3.1, let’s follow this process: 1. Get a PR up for master to merge your change 2. Once accepted, get a PR up to cherry pick the change to the swift-3.1 bran

Re: [swift-corelibs-dev] Need of inputs for NSExpression

2017-01-12 Thread Tony Parker via swift-corelibs-dev
repo: > https://github.com/AtharvaVaidya/Expression > <https://github.com/AtharvaVaidya/Expression>. > > I would love to contribute to this effort. > > Atharva Vaidya, > Drexel University, Class of 2020. > > > >> On Jan 12, 2017, at 11:13 AM, Tony

Re: [swift-corelibs-dev] Need of inputs for NSExpression

2017-01-12 Thread Tony Parker via swift-corelibs-dev
Hi Nethra, Thanks for your interest! Probably the best place to get started would be to take a look at our documentation about NSExpression. Some of it is pretty tricky to implement without the dynamic behavior of ObjC though. - Tony > On Jan 12, 2017, at 4:24 AM, Nethra Ravindran via swift-c

Re: [swift-corelibs-dev] Question about NSDecimalCopy

2017-01-12 Thread Tony Parker via swift-corelibs-dev
Hi Morten, > On Jan 9, 2017, at 2:16 AM, Morten Bek Ditlevsen via swift-corelibs-dev > wrote: > > Hi list, > I was looking at the NSDecimal.swift to learn a bit about the implementation > of the Decimal type. > I get that a lot of the API in this type exists for compatibility reasons > with t

Re: [swift-corelibs-dev] index indexes and ranges of String

2017-01-04 Thread Tony Parker via swift-corelibs-dev
Hi Carlos, Thanks for proposing this. Would you mind sending it out to swift-dev or swift-evolution as well? The authors of the Swift standard library are more likely to see your message there. - Tony > On Dec 31, 2016, at 11:53 AM, Carlos García via swift-corelibs-dev > wrote: > > Hi, > >

Re: [swift-corelibs-dev] Why URL doesn't have fileReferenceURL and isFileReferenceURL, but NSURL has?

2016-12-06 Thread Tony Parker via swift-corelibs-dev
You can actually see how we changed our minds on this if you look at the history of the URL.swift file in the Foundation overlay in the Swift project. Basically: if struct URL could be a reference, then almost all of its methods/functions needed to be marked as ‘throws’, including all of the pat

Re: [swift-corelibs-dev] Interested in contributing to the foundation library, but needed some some pointers to start

2016-12-05 Thread Tony Parker via swift-corelibs-dev
Hi Jacky, Welcome! We are glad to help with getting you started. One place that I think many people have found useful to begin is by checking on an API that they use themselves in their projects on Darwin platforms, and seeing if it’s implemented or not. If not, that’s a good place to start. W

Re: [swift-corelibs-dev] Why is Array.init(contentsOfURL:) not available?

2016-12-05 Thread Tony Parker via swift-corelibs-dev
Hi Ole, > On Dec 5, 2016, at 5:11 AM, Ole Begemann via swift-corelibs-dev > wrote: > > (Apologies if this is not the right list to ask this question. I couldn't > decide between swift-corelibs-dev and swift-dev.) > > I noticed that the NSArray and NSDictionary initializers to create a > coll

Re: [swift-corelibs-dev] Fatal error Foundation/NSCalendar.swift, Ubuntu 16.04, Swift 3.0.1

2016-11-30 Thread Tony Parker via swift-corelibs-dev
Hi Malcolm, Looks like it. If you go ahead and file a JIRA at bugs.swift.org , hopefully someone can take a look. Thanks, - Tony > On Nov 30, 2016, at 6:22 AM, Malcolm Barclay via swift-corelibs-dev > wrote: > > Hi, > > Is this a bug in the NSCalendar.swift? On Ubunt

Re: [swift-corelibs-dev] Autoupdating type properties

2016-11-30 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, > On Nov 30, 2016, at 6:39 AM, Pushkar N Kulkarni wrote: > > Thanks Tony, for the detailed explanation! > > I think I need a bit more clarification though :) > > >>> Now, nothing in the value type contract says that you cannot have > >>> computed properties on a value type. Also

Re: [swift-corelibs-dev] Autoupdating type properties

2016-11-29 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, > On Nov 29, 2016, at 4:12 AM, Pushkar N Kulkarni via swift-corelibs-dev > wrote: > > Hi there, > > I am curious about how an autoupdating type property like `NSTimeZone.local` > could be implemented, given that it is a value (the type is TimeZone). The > requirement essentially

Re: [swift-corelibs-dev] Implementing Bundle.init(for aClass: AnyClass)

2016-11-18 Thread Tony Parker via swift-corelibs-dev
Hi Mamatha, > On Nov 18, 2016, at 3:03 AM, Mamatha Busi via swift-corelibs-dev > wrote: > > Hi > > > > init(for aClass: AnyClass) is an unimplemented API on Linux. I am exploring > around this to implement the same and have a couple of queries: > > > > -> In the context of Linux platform

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2016-11-16 Thread Tony Parker via swift-corelibs-dev
tory is defined by > the environment variable $XDG_CACHE_HOME. Overall the spec looks reasonable and seems to be close to what we we would need. A great next step would be to file a JIRA and look for volunteers who want to help implement this in SCL-Foundation. - Tony > > Regards, > Will

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2016-11-14 Thread Tony Parker via swift-corelibs-dev
> On Nov 14, 2016, at 10:47 AM, Will Stanton wrote: > > Hello Tony and Philippe, > > I don’t think it would be odd for cookie/setting files to be in a folder > named after Foundation (namely ~/.foundation): > - The files are owned by Swift/Linux Foundation in the sense Foundation > writes the

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2016-11-14 Thread Tony Parker via swift-corelibs-dev
ice if there is a per-user cookies file. > > So having a /Library may be nicer, but potentially unnecessary? > NSHomeDirectory() + "/.foundation/Library/Cookies/Cookies.something" > > Regards, > Will Stanton > > > On Nov 7, 2016, at 5:45 PM, Tony Parker via swif

Re: [swift-corelibs-dev] Implementing HTTPCookieStorage

2016-11-07 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, Good question. If this were Darwin I guess I would say ~/Library/Application Support — but I don’t know what the best practices are on other platforms. Does anyone out there have some suggestions? - Tony > On Nov 7, 2016, at 11:09 AM, Pushkar N Kulkarni via swift-corelibs-dev > w

Re: [swift-corelibs-dev] Query on NSKeyedArchiver

2016-10-28 Thread Tony Parker via swift-corelibs-dev
s-foundation/pull/574> > > That allows value types to be archived too if they support _ObjectBridgeable > (they’ll come back as reference types though). > >> On 27 Oct 2016, at 4:22 AM, Tony Parker via swift-corelibs-dev >> mailto:swift-corelibs-dev@swift.org>>

Re: [swift-corelibs-dev] Query on mapping kCFNumberCharType to kCFNumberSInt8Type

2016-10-28 Thread Tony Parker via swift-corelibs-dev
Hi Gayathri, The first entry in that table is the “canonical fixed width type”. We want char to be 8 bits, so we use the SInt8 there. If you look at the places where we use the canonical type it expects it to be one of a more limited set of values. - Tony > On Oct 27, 2016, at 3:26 AM, Gayathr

Re: [swift-corelibs-dev] Query on NSKeyedArchiver

2016-10-26 Thread Tony Parker via swift-corelibs-dev
lly appreciate help on if anyone is interested in contributing. - Tony > >> On 26 Oct 2016, at 18:11, Tony Parker via swift-corelibs-dev >> mailto:swift-corelibs-dev@swift.org>> wrote: >> >> Hi Sai, >> >> We do have basic support for keyed archiving

Re: [swift-corelibs-dev] Query on NSKeyedArchiver

2016-10-26 Thread Tony Parker via swift-corelibs-dev
Hi Sai, We do have basic support for keyed archiving and unarchiving in swift-corelibs-foundation on Linux. The limitation is that the NSCoding protocol cannot be applied to Swift struct types, only class types. On Darwin, the class also must be a subclass of NSObject. This last limitation may

Re: [swift-corelibs-dev] Cherry-picking changes for the next Swift release?

2016-10-12 Thread Tony Parker via swift-corelibs-dev
Hi Alex, > On Oct 12, 2016, at 9:52 AM, Alex Blewitt via swift-corelibs-dev > wrote: > > I have a couple of Calendar related fixes into swift-corelibs-foundation > master: > > https://github.com/apple/swift-corelibs-foundation/pull/675 >

Re: [swift-corelibs-dev] Cannot call CFStreamCreatePairWithSocket on Linux

2016-10-10 Thread Tony Parker via swift-corelibs-dev
Hi Bouke, There is currently no plan to open source the more modern versions of CFNetwork. We’ll have to replace its functionality in swift-corelibs-foundation. - Tony > On Oct 8, 2016, at 1:12 AM, Bouke Haarsma via swift-corelibs-dev > wrote: > > I'm running into the same issue as outlined

Re: [swift-corelibs-dev] Adding retain to CFCalendar.c - SR2879

2016-10-07 Thread Tony Parker via swift-corelibs-dev
Yes, that was the “skirting of the issue”. =) It’s likely not a huge deal in the end; since CF is an implementation detail of swift-corelibs-foundation, we just need to remember to retain/release constant strings as we would others and we would be ok. However, I suspect there are other places i

Re: [swift-corelibs-dev] Adding retain to CFCalendar.c - SR2879

2016-10-07 Thread Tony Parker via swift-corelibs-dev
Hi Alex, Thanks for digging into this. This seems like a correct solution for now. I think there is a larger question though, which is why it’s possible to overrelease kCFEmptyString. I think we skirted the issue early in bringup of SCL-Foundation, but constant strings are supposed to be “pinne

Re: [swift-corelibs-dev] NSRegularExpression - NS prefix not dropped on Darwin

2016-09-16 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, We decided to keep the NS on NSRegularExpression because we know that a strong goal for the Swift language is to have built-in support for regex. We wanted to be cautious about taking the name without knowing more about how that feature would shake out. We should get a JIRA filed o

Re: [swift-corelibs-dev] [swift-dev] Linux: Build process not finding my ICU

2016-09-14 Thread Tony Parker via swift-corelibs-dev
Hi Eric, > On Sep 13, 2016, at 10:30 PM, Eric Wing via swift-corelibs-dev > wrote: > > On 9/13/16, Will Stanton wrote: >> Hello Eric, >> >> Not sure if this will help, but perhaps you can feed something in build.py? >> https://github.com/apple/swift-corelibs-foundation/blob/master/build.py >>

Re: [swift-corelibs-dev] A URLSession crash and potential solutions

2016-09-13 Thread Tony Parker via swift-corelibs-dev
Hi Pushkar, > On Sep 13, 2016, at 12:20 PM, Pushkar N Kulkarni > wrote: > > Hi Tony, Philippe, other onlookers, > > Long note. Kindly bear with me. > > I've created SR-2631 to report a > crash in a very basic usage of URLSession. I'm providing a gene

Re: [swift-corelibs-dev] Inconsistent URLSession POST behaviour

2016-09-12 Thread Tony Parker via swift-corelibs-dev
> On Sep 12, 2016, at 12:52 AM, Michael Ferenduros via swift-corelibs-dev > wrote: > > >> On 12 Sep 2016, at 09:25, Pushkar N Kulkarni wrote: >> >> Hi Michael, >> >> I took a quick look at the URLSession code and it looks like the httpBody >> isn't being picked up anywhere. >> >> Could y

Re: [swift-corelibs-dev] Measurement Formatters & ICU

2016-08-22 Thread Tony Parker via swift-corelibs-dev
Hi Henry, > On Aug 22, 2016, at 7:00 AM, Henry Betts via swift-corelibs-dev > wrote: > > Hi, > > I am new to the mailing list, and am interested in contributing to the swift > project. Welcome! > > I’ve been having a play with the ICU library’s unit formatting functions, and > have creat

Re: [swift-corelibs-dev] Duplicate definition of va_list on Arm

2016-08-19 Thread Tony Parker via swift-corelibs-dev
One of the challenges we have in removing imports in public headers is that other projects are importing those headers transitively. Someone else may be assuming they get stdio.h by importing CoreFoundation.h or dispatch.h, and using something from that header. - Tony > On Aug 19, 2016, at 11:

Re: [swift-corelibs-dev] Building with Xcode

2016-08-18 Thread Tony Parker via swift-corelibs-dev
Hi Luke, In Xcode it should be possible to set the build order like this: Foundation XCTest TestFoundation which should resolve the ordering issue, right? I do this with a build scheme. - Tony > On Aug 17, 2016, at 6:13 PM, Luke Howard via swift-corelibs-dev > wrote: > > This is probably a

Re: [swift-corelibs-dev] Swiftier? implementation of Measurement and Unit in Foundation

2016-08-14 Thread Tony Parker via swift-corelibs-dev
Hi Joanna, An important requirement of the design of measurements and units was that it had to work in Objective-C as well, where protocols do not have as many capabilities as they do in Swift. The bridging into Swift can only do so much, and frankly it didn’t seem to be the case that tradition

Re: [swift-corelibs-dev] [SR-1608]

2016-08-08 Thread Tony Parker via swift-corelibs-dev
Hi David, The compiler has been changing pretty rapidly underneath us, but hopefully has settled down a bit now that we’re getting towards the end. I’d suggest rebasing against master again and trying with the latest compiler snapshots. - Tony > On Aug 3, 2016, at 3:29 AM, David Liu wrote: >

Re: [swift-corelibs-dev] Query on init methods in Data.swift

2016-08-08 Thread Tony Parker via swift-corelibs-dev
Hi Simon, The correct one is the non-optional version. We changed it after some discussion about if it made sense for Data to attempt to return nil here, when there are so many ways for memory allocation to fail without returning an optional. We’re working on updating the swift-corelibs-founda

Re: [swift-corelibs-dev] Query on Bundle.unload()

2016-08-08 Thread Tony Parker via swift-corelibs-dev
Hi Sai, What I understand from the Swift runtime team is that unloading of Swift executables is basically unsupported. There are a lot of challenges to getting unloading right in general, because it can remove things like “constant” strings and cause mysterious crashes. - Tony > On Aug 3, 201

Re: [swift-corelibs-dev] Is NSXMLParser completely implemented (swift-3.0-PREVIEW-2)

2016-08-08 Thread Tony Parker via swift-corelibs-dev
Hi Tim, Can you file a JIRA for us? Swift doesn’t support optional methods in protocols, so for ObjC protocols that are optional on OS X I tried to provide default implementations that do nothing on Linux. It’s possible I missed some for NSXMLParser. - Tony > On Aug 2, 2016, at 8:08 PM, Tim K

Re: [swift-corelibs-dev] IndexPath performance

2016-08-02 Thread Tony Parker via swift-corelibs-dev
Hi Stephan, > On Aug 2, 2016, at 6:04 PM, Stephan Tolksdorf wrote: > > Hi Parker, > > I noticed the IndexPath overhead when I investigated why a Swift 3 > implementation of UICollectionViewLayout.layoutAttributesForElementsInRect > spent more time in malloc, free and related methods, but I do

Re: [swift-corelibs-dev] [SR-1608]

2016-08-02 Thread Tony Parker via swift-corelibs-dev
Hi David, Thanks for helping! Can you check out some of our current open PRs to make sure your work isn’t overlapping? We’ve had some contributions in this area recently that we still need to finish merging. - Tony > On Jul 29, 2016, at 11:28 PM, David Liu via swift-corelibs-dev > wrote: >

Re: [swift-corelibs-dev] IndexPath performance

2016-08-02 Thread Tony Parker via swift-corelibs-dev
Hi Stephan, Do you have some benchmarks that you could share? That would help us focus performance work in the right area. I know that 2-item IndexPaths are super common with UIKit collection view and friends, so we may just want to special case those. Unfortunately, NSIndexPath is not abstrac

Re: [swift-corelibs-dev] Wrapping up Swift 3 for swift-corelibs

2016-07-29 Thread Tony Parker via swift-corelibs-dev
stead of _ObjectiveCBridgeable would help?), but wanted to understand >> first if this is a priority for the foundation team, and there is something >> that can be done to push for this feature. >> >> Thanks! >> >> >> -- >> Slds, >> >>

Re: [swift-corelibs-dev] Wrapping up Swift 3 for swift-corelibs

2016-07-29 Thread Tony Parker via swift-corelibs-dev
t.org>> wrote: > The overlay changes were merged to corelibs libdispatch this morning. > > Sent from my iPhone. > > On Jul 28, 2016, at 2:03 PM, Tony Parker via swift-corelibs-dev > mailto:swift-corelibs-dev@swift.org>> wrote: > >> Hi Dave, >> >&g

Re: [swift-corelibs-dev] Wrapping up Swift 3 for swift-corelibs

2016-07-28 Thread Tony Parker via swift-corelibs-dev
Hi Dan, I believe Matt is working on getting the remaining overlay changes into Linux as we speak. - Tony > On Jul 28, 2016, at 10:48 AM, Dan Stenmark > wrote: > >> 1. Integrate swift-corelibs-dispatch into Foundation. > > Are there any lingering items in swift-corelibs-dispatch that are st

Re: [swift-corelibs-dev] Wrapping up Swift 3 for swift-corelibs

2016-07-28 Thread Tony Parker via swift-corelibs-dev
Hi Dave, I don’t believe anyone is looking into this. If you want to do that, I think now would be the time! - Tony > On Jul 28, 2016, at 10:50 AM, David P Grove via swift-corelibs-dev > wrote: > > Tony Parker wrote on 07/28/2016 01:41:55 PM: > > > > 1. Integrate swift-corelibs-dispatch int

[swift-corelibs-dev] Wrapping up Swift 3 for swift-corelibs

2016-07-28 Thread Tony Parker via swift-corelibs-dev
Hi everyone, We’re getting close to the finish line for Swift 3, but we still have some work to do in swift-corelibs, especially swift-corelibs-foundation. I want to lay out what our goals and plans are for the next few weeks. As Swift 3 has been wrapping up, an immense number of important synt

Re: [swift-corelibs-dev] small nit in NSKeyedArchiver.swift

2016-07-20 Thread Tony Parker via swift-corelibs-dev
This looks correct to me. Can you file JIRA or put up a PR? Thanks! - Tony > On Jul 19, 2016, at 11:16 PM, Luke Howard via swift-corelibs-dev > wrote: > > Posting to mailing list as I’m not able to test this right now, but I suspect > this patch should be applied – > > diff --git a/Foundatio

Re: [swift-corelibs-dev] NSOrderedSet implementation

2016-07-12 Thread Tony Parker via swift-corelibs-dev
Hi Sowmya, I haven’t heard of anyone working on this yet, so if you would like to contribute an implementation that would be great! - Tony > On Jul 12, 2016, at 3:07 AM, Sowmya Vikram via swift-corelibs-dev > wrote: > > Hi pushkar > > I would like to implement NSOrderedSet and its related c

Re: [swift-corelibs-dev] NSOperationQueue

2016-07-10 Thread Tony Parker via swift-corelibs-dev
Hi JNS, We do want OperationQueue and friends to be part of swift-corelibs-foundation. What’s held us back so far is the lack of libdispatch support on Linux. That’s still making progress, so I hope we can tackle this one pretty soon. - Tony > On Jul 10, 2016, at 10:01 AM, JNS via swift-coreli

  1   2   >