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 20, 2017, at 7:55 AM, Ian Partridge via swift-corelibs-dev 
>>  wrote:
>> 
>> Is there any way that we could support asynchronous operations in 
>> swift-corelibs-foundation, in the absence of KVO?
> 
> Could we add `willChangeValue(forKey:)` and `didChangeValue(forKey:)` methods 
> just to `Operation` which only handle an `isFinished` key? Presumably they'd 
> just look like:
> 
>   public func willChangeValue(forKey key: String) {
>   // do nothing
>   }
>   public func didChangeValue(forKey key: String) {
>   if key == "isFinished" && isFinished {
>   finish()
>   }
>   }
> 
> I believe that would make existing code just work without needing to do 
> anything special.
> 
> -- 
> Brent Royal-Gordon
> Architechies
> 
> ___
> 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] Implementing HTTPCookieStorage

2017-01-23 Thread Pushkar N Kulkarni via swift-corelibs-dev
Hi Tony, Thanks! A starting point will really help. I've filed a feature request on JIRA: https://bugs.swift.org/browse/SR-3697Pushkar N Kulkarni,
IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra
-anthony.par...@apple.com wrote: -To: Pushkar N Kulkarni From: Tony Parker Sent by: anthony.par...@apple.comDate: 01/20/2017 11:28PMCc: Will Stanton , swift-corelibs-dev Subject: Re: [swift-corelibs-dev] Implementing HTTPCookieStorageYup, I think that makes sense.I started an implementation a bit ago but didn’t get very far before I got derailed onto some other topics. I’ll see if I can clean it up and put it somewhere as a starting point.- TonyOn Jan 20, 2017, at 2:31 AM, Pushkar N Kulkarni  wrote:Hi Tony, Will, others: Apologies for bringing this up after a long time!I hope we still agree on the use of the "XDG Base Directory Specification". I did a quick read of the spec document. I am happy to file a JIRA report for this.The scope, as I understand it is: CoreFoundation will implement the "XDG Base Directory Specification" and present an API to allow Foundation to retrieve the different absolute paths(related to the different env variables defined), which will be used to persist the different kinds of user data.Please do let me know if my understanding is correct. Please augment it if necessary. Thanks!Pushkar N Kulkarni,IBM RuntimesSimplicity is prerequisite for reliability - Edsger W. Dijkstra-swift-corelibs-dev-boun...@swift.org wrote: -To: Will Stanton From: Tony Parker via swift-corelibs-dev Sent by: swift-corelibs-dev-boun...@swift.orgDate: 11/17/2016 03:45AMCc: swift-corelibs-dev Subject: Re: [swift-corelibs-dev] Implementing HTTPCookieStorageHi Will,> On Nov 14, 2016, at 12:56 PM, Will Stanton  wrote:> > Hello Tony,> > Thanks for the reply. About XDG_DATA_HOME, the variable is undefined on my desktop-less server, and I think many processes still have their own save locations.> Still, I can believe its used in a lot of places (https://github.com/search?q=XDG_DATA_HOME=Code=✓) and am not opposed to it!> > Perhaps SEARCH/$EXECUTABLE_NAME/Preferences.plist would be good place and format for NSUserDefaults with SEARCH = getenv(XDG_DATA_HOME) then ~/.config?> > > What about the path for cookies+caches?I’m just reading this spec for the first time, but it looks like it accounts for that:> • There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory 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 Stanton> >> On Nov 14, 2016, at 2:37 PM, Tony Parker via swift-corelibs-dev  wrote:>> >> Off-list, someone pointed me here:>> >> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>> >> and here:>> >> http://stackoverflow.com/questions/1024114/location-of-ini-config-files-in-linux-unix>> >> Noting that there seems to be a growing consensus for $HOME/.config.>> >> Is this spec beginning to be used in the real world?> ___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