Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-04-20 Thread Daniel Dunbar via swift-corelibs-dev

> On Apr 20, 2016, at 9:43 AM, Daniel Eggert via swift-corelibs-dev 
>  wrote:
> 
> I think that would make a giant mess. I'm curious how far off we are for 
> having lob libdispatch on Linux. I think it would be worth waiting a bit 
> longer I n stead of making the code illegible. Just my 2¢.

+1, having another incentive to drive libdispatch to be part of the snapshots 
doesn't seem like a bad thing.

 - Daniel

> 
> /Daniel
> 
> 
> On Apr 20, 2016, at 04:23, Pushkar N Kulkarni  > wrote:
> 
>> Hi Tony, Daniel, 
>> 
>> Thanks for your responses. 
>> 
>> Would it be acceptable if, for now, we check for the availability of 
>> Dispatch and conditionally compile calls to it into the current 
>> implementation of NSURLSession* (something like the  _HAS_DISPATCH__ macro 
>> used in CoreFoundation)? This would make NSURLSession and related classes 
>> functional with a custom toolchain that has Dispatch, on Linux. It'd also 
>> make them functional on OS X.
>> 
>> I realise this may need some code restructuring.
>> 
>> Pushkar N Kulkarni,
>> IBM Runtimes
>> 
>> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
>> 
>> 
>> 
>> -Daniel Eggert > wrote: 
>> -
>> To: Tony Parker >
>> From: Daniel Eggert >
>> Date: 04/19/2016 08:21PM
>> Cc: Pushkar N Kulkarni/India/IBM@IBMIN, Swift corelibs dev 
>> >
>> Subject: Re: [swift-corelibs-dev] NSURLSession & libcurl
>> 
>> I don't think it compiles, but I haven't tried, yet. I've been trying to 
>> keep it up-to-date with master. 
>> 
>> /Daniel
>> 
>> On Apr 18, 2016, at 13:15, Tony Parker > > wrote:
>> 
>>> I think that’s a fair approach - but does this even compile on Linux 
>>> without dispatch in place? I get “no such module ‘Dispatch’” errors when 
>>> compiling.
>>> 
>>> - Tony
>>> 
 On Apr 18, 2016, at 11:24 AM, Pushkar N Kulkarni > wrote:
 
 Thanks for your great work on NSURLSession and friends, Daniel!
 
 I was wondering if we are only waiting for dispatch to be available on 
 Linux here. In that case, could we have the failing tests (if any) 
 excluded (only on Linux perhaps) and have this merged please? Some of us 
 at IBM would like to work with the current implementation and contribute 
 on top of it.
 
 Thanks!
 
 Pushkar N Kulkarni,
 IBM Runtimes
 
 Simplicity is prerequisite for reliability - Edsger W. Dijkstra
 
 
 
 -swift-corelibs-dev-boun...@swift.org 
  wrote: -
 To: Swift corelibs dev >
 From: Daniel Eggert via swift-corelibs-dev 
 Sent by: swift-corelibs-dev-boun...@swift.org 
 
 Date: 04/05/2016 12:14AM
 Subject: Re: [swift-corelibs-dev] NSURLSession & libcurl
 
 I won't be able to put too many more hours into this after next week.
 
 https://github.com/apple/swift-corelibs-foundation/pull/299 
 
 
 Feedback is very welcome.
 
 The tests show what's working, and there are "TODO:" markers throughout 
 the code where applicable.
 
 /Daniel
 
 ___
 swift-corelibs-dev mailing list
 swift-corelibs-dev@swift.org 
 https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 
 
 
>>> 
>> 
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-04-20 Thread Daniel Eggert via swift-corelibs-dev
I think that would make a giant mess. I'm curious how far off we are for having 
lob libdispatch on Linux. I think it would be worth waiting a bit longer I n 
stead of making the code illegible. Just my 2¢.

/Daniel


> On Apr 20, 2016, at 04:23, Pushkar N Kulkarni  wrote:
> 
> Hi Tony, Daniel, 
> 
> Thanks for your responses. 
> 
> Would it be acceptable if, for now, we check for the availability of Dispatch 
> and conditionally compile calls to it into the current implementation of 
> NSURLSession* (something like the  _HAS_DISPATCH__ macro used in 
> CoreFoundation)? This would make NSURLSession and related classes functional 
> with a custom toolchain that has Dispatch, on Linux. It'd also make them 
> functional on OS X.
> 
> I realise this may need some code restructuring.
> 
> Pushkar N Kulkarni,
> IBM Runtimes
> 
> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
> 
> 
> 
> -Daniel Eggert  wrote: -
> To: Tony Parker 
> From: Daniel Eggert 
> Date: 04/19/2016 08:21PM
> Cc: Pushkar N Kulkarni/India/IBM@IBMIN, Swift corelibs dev 
> 
> Subject: Re: [swift-corelibs-dev] NSURLSession & libcurl
> 
> I don't think it compiles, but I haven't tried, yet. I've been trying to keep 
> it up-to-date with master. 
> 
> /Daniel
> 
>> On Apr 18, 2016, at 13:15, Tony Parker  wrote:
>> 
>> I think that’s a fair approach - but does this even compile on Linux without 
>> dispatch in place? I get “no such module ‘Dispatch’” errors when compiling.
>> 
>> - Tony
>> 
>>> On Apr 18, 2016, at 11:24 AM, Pushkar N Kulkarni  
>>> wrote:
>>> 
>>> Thanks for your great work on NSURLSession and friends, Daniel!
>>> 
>>> I was wondering if we are only waiting for dispatch to be available on 
>>> Linux here. In that case, could we have the failing tests (if any) excluded 
>>> (only on Linux perhaps) and have this merged please? Some of us at IBM 
>>> would like to work with the current implementation and contribute on top of 
>>> it.
>>> 
>>> Thanks!
>>> 
>>> Pushkar N Kulkarni,
>>> IBM Runtimes
>>> 
>>> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
>>> 
>>> 
>>> 
>>> -swift-corelibs-dev-boun...@swift.org wrote: -
>>> To: Swift corelibs dev 
>>> From: Daniel Eggert via swift-corelibs-dev 
>>> Sent by: swift-corelibs-dev-boun...@swift.org
>>> Date: 04/05/2016 12:14AM
>>> Subject: Re: [swift-corelibs-dev] NSURLSession & libcurl
>>> 
>>> I won't be able to put too many more hours into this after next week.
>>> 
>>> https://github.com/apple/swift-corelibs-foundation/pull/299
>>> 
>>> Feedback is very welcome.
>>> 
>>> The tests show what's working, and there are "TODO:" markers throughout the 
>>> code where applicable.
>>> 
>>> /Daniel
>>> 
>>> ___
>>> swift-corelibs-dev mailing list
>>> swift-corelibs-dev@swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
> 
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] NSURLSession & libcurl

2016-04-20 Thread Pushkar N Kulkarni via swift-corelibs-dev
Hi Tony, Daniel, Thanks for your responses. Would it be acceptable if, for now, we check for the availability of Dispatch and conditionally compile calls to it into the current implementation of NSURLSession* (something like the  _HAS_DISPATCH__ macro used in CoreFoundation)? This would make NSURLSession and related classes functional with a custom toolchain that has Dispatch, on Linux. It'd also make them functional on OS X.I realise this may need some code restructuring.Pushkar N Kulkarni,
IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra
-Daniel Eggert  wrote: -To: Tony Parker From: Daniel Eggert Date: 04/19/2016 08:21PMCc: Pushkar N Kulkarni/India/IBM@IBMIN, Swift corelibs dev Subject: Re: [swift-corelibs-dev] NSURLSession & libcurlI don't think it compiles, but I haven't tried, yet. I've been trying to keep it up-to-date with master. /DanielOn Apr 18, 2016, at 13:15, Tony Parker  wrote:I think that’s a fair approach - but does this even compile on Linux without dispatch in place? I get “no such module ‘Dispatch’” errors when compiling.- TonyOn Apr 18, 2016, at 11:24 AM, Pushkar N Kulkarni  wrote:Thanks for your great work on NSURLSession and friends, Daniel!I was wondering if we are only waiting for dispatch to be available on Linux here. In that case, could we have the failing tests (if any) excluded (only on Linux perhaps) and have this merged please? Some of us at IBM would like to work with the current implementation and contribute on top of it.Thanks!Pushkar N Kulkarni,IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra-swift-corelibs-dev-boun...@swift.org wrote: -To: Swift corelibs dev From: Daniel Eggert via swift-corelibs-dev Sent by: swift-corelibs-dev-boun...@swift.orgDate: 04/05/2016 12:14AMSubject: Re: [swift-corelibs-dev] NSURLSession & libcurlI won't be able to put too many more hours into this after next week.https://github.com/apple/swift-corelibs-foundation/pull/299Feedback is very welcome.The tests show what's working, and there are "TODO:" markers throughout the code where applicable./Daniel___swift-corelibs-dev mailing listswift-corelibs-dev@swift.orghttps://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] NSTask and NSFileHandle implementation

2016-04-20 Thread Chris Bailey via swift-corelibs-dev
Hi Daniel:

Support for DISPATCH_SOURCE_TYPE_READ should be there. If I remember 
correctly its just support for processes and VM memory pressure that isn't 
available.

Chris




From:   Daniel Eggert 
To: Chris Bailey/UK/IBM@IBMGB
Cc: Dan Stenmark , Swift core libraries 

Date:   20/04/2016 02:46
Subject:Re: [swift-corelibs-dev] NSTask and NSFileHandle 
implementation



Wouldn't it still be a huge win to use dispatch for reading from / writing 
to a file descriptor?

/Daniel


On Apr 18, 2016, at 01:52, Chris Bailey via swift-corelibs-dev <
swift-corelibs-dev@swift.org> wrote:

Hi Dan: 

The Dispatch sources are mostly complete - unfortunately 
DISPATCH_SOURCE_TYPE_PROC isn't there and it unlikely to be there in a 
hurry. It would ideally need the underlying kqueue library to have 
EVFILT_PROC support, which it doesn't today. 

Chris




From:Dan Stenmark via swift-corelibs-dev <
swift-corelibs-dev@swift.org> 
To:Alexander Alemayhu  
Cc:Swift core libraries  
Date:16/04/2016 22:00 
Subject:Re: [swift-corelibs-dev] NSTask and NSFileHandle 
implementation 
Sent by:swift-corelibs-dev-boun...@swift.org 



While we’re on the subject, I’ve been out of the loop for a little while: 
how’s the Linux-side implementation of dispatch sources looking these 
days?  In particular, I’m interested in the status of 
DISPATCH_SOURCE_TYPE_READ and DISPATCH_SOURCE_TYPE_PROC. 

Right now, NSTask is using Good Ol’ CFRunLoops for it’s event handling, 
and I’d really like to move that over to GCD as soon as I can. 

Dan 


On Apr 16, 2016, at 1:55 PM, Dan Stenmark  
wrote: 

Hey Alexander, 

I supplied most of the initial implementation of NSTask, but was holding 
off on IO redirection until someone tackled NSFileHandle.  I can’t say if 
anyone else on this list is working on this right now, but if not and if 
you’re really interested in finishing NSFileHandle, I would (very 
happily!) take care of the relevant implementation in NSTask. 

Dan 

On Apr 16, 2016, at 1:50 AM, Alexander Alemayhu via swift-corelibs-dev <
swift-corelibs-dev@swift.org> wrote: 

Hei Everyone, 

Is anyone working on the NSTask and/or NSFileHandle implementation? 

I would like to fix the hangs issue in order to revert 
[3aa8434][0](disable 
NSTask tests for now since it can cause hangs., 2016-01-21), but want to 
avoid 
duplicating work. Fixing this should also resolve [SR-625][1]. 

Thanks. 

[0]: 
https://github.com/apple/swift-corelibs-foundation/commit/3aa8434df50d9513a0ac1646fb52516a092fa728
 

[1]: https://bugs.swift.org/browse/SR-625 

-- 
Mit freundlichen Grüßen

Alexander Alemayhu 
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev 

___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev