Re: [swift-users] XML parsing on Linux, with Swift 3.1

2017-09-04 Thread Georgios Moschovitis via swift-users
As an example, this SegFaults: import Foundation class ParserDelegate: NSObject, XMLParserDelegate { func parserDidStartDocument(_ parser: XMLParser) { print("Starting document") } func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, q

[swift-users] XML parsing on Linux, with Swift 3.1

2017-09-04 Thread Georgios Moschovitis via swift-users
Hi, I would like to parse an RSS feed using Swift 3.1 on Linux. I tried to use Foundations’s XML but I only managed to get segmentation faults. Is this supposed to work on Linux? I have only seen examples on iOS. Apart from that a quick search didn’t reveal any useful XML parsing library compat

Re: [swift-users] Is it possible to install Swift 4 on El Capitan with Xcode 8?

2017-09-04 Thread Mr Bee via swift-users
2017-09-05 3:47 GMT+07:00 Fritz Anderson via swift-users < swift-users@swift.org>: > > In your position, I’d go to the Downloads part of Swift.org and fetch the > latest build of the Swift 4 toolchain for Mac. (It’s still in flux, but > it’ll probably be promoted to latest/stable this month.) > >

Re: [swift-users] Is this a compiler bug?

2017-09-04 Thread Howard Lovatt via swift-users
Thanks for prompt reply - link is: https://bugs.swift.org/browse/SR-5838 -- Howard. On 5 September 2017 at 11:58, Slava Pestov wrote: > Yeah, looks like a bug. Do you mind filing a JIRA? > > Slava > > On Sep 4, 2017, at 8:55 PM, Howard Lovatt via swift-users < > swift-users@swift.org> wrote

Re: [swift-users] Is it possible to install Swift 4 on El Capitan with Xcode 8?

2017-09-04 Thread Jack Lawrence via swift-users
Note that you cannot submit a binary to the App Store that was built using a custom toolchain. Jack > On Sep 4, 2017, at 1:47 PM, Fritz Anderson via swift-users > wrote: > > On 2-Sep-2017, at 5:04 AM, Mr Bee via swift-users > wrote: > >> Since I'm still using my

Re: [swift-users] Is this a compiler bug?

2017-09-04 Thread Slava Pestov via swift-users
Yeah, looks like a bug. Do you mind filing a JIRA? Slava > On Sep 4, 2017, at 8:55 PM, Howard Lovatt via swift-users > wrote: > > Hi All, > > Is this a compiler bug? > > struct Box { > var value: T > init(_ value: T) { self.value = value } > /// Unboxing operator. > static fu

[swift-users] Is this a compiler bug?

2017-09-04 Thread Howard Lovatt via swift-users
Hi All, Is this a compiler bug? struct Box { var value: T init(_ value: T) { self.value = value } /// Unboxing operator. static func >> (left: Box, right: inout T?) { right = left.value } } var u: String? let b = Box("Test") b >> &u // ERROR: Cannot convert value of t

Re: [swift-users] Type alias with a "where" clause specifying required associated type

2017-09-04 Thread Slava Pestov via swift-users
Hi Rudolf, What you are describing is not possible right now. The protocol PointType cannot be used as a type at all, because it has an associated type requirement. Also it is not clear what a ‘where’ clause attached to a type alias would mean. There has been some discussion of ‘generalized exi

[swift-users] Type alias with a "where" clause specifying required associated type

2017-09-04 Thread Rudolf Adamkovič via swift-users
I have the following ProceduralDrawing type: public struct ProceduralDrawing where Point.Float == Float { // ... code that used Float and Point ... } public protocol PointType { associatedtype Float: FloatingPoint var x: Float { get } var y: Float { get } } I would like to avoid

Re: [swift-users] Is it possible to install Swift 4 on El Capitan with Xcode 8?

2017-09-04 Thread Fritz Anderson via swift-users
On 2-Sep-2017, at 5:04 AM, Mr Bee via swift-users wrote: > Since I'm still using my old mid-2009 Macbook Pro, which is still working > very well by the way, I'm stucked with macOS El Capitan (10.11.6) with Xcode > 8 and Swift 3. Hence, I also couldn't install Xcode 9 and Swift 4 because > they

Re: [swift-users] Foundation bug or indended?

2017-09-04 Thread Zhao Xin via swift-users
It is intended. The swift version you provided is the swift version of Objective-C header. So they are the same. Zhao Xin On Mon, Sep 4, 2017 at 8:01 PM, Adrian Zubarev via swift-users < swift-users@swift.org> wrote: > Hi there, > > before filing a new issue I would like to ask if this is inte

[swift-users] Foundation bug or indended?

2017-09-04 Thread Adrian Zubarev via swift-users
Hi there, before filing a new issue I would like to ask if this is intended behaviour or a bug: The Foundation class Operation which has it’s roots in Objective-C has a few readonly properties like the following one: @available(iOS 2.0, *) open class Operation : NSObject { ... open var

Re: [swift-users] Writing a pod catcher for iOS

2017-09-04 Thread Quinn "The Eskimo!" via swift-users
On 1 Sep 2017, at 20:02, Nicholas Acosta via swift-users wrote: > Now, I want to take it to the next level and create my own pod cast/RSS > reader for the iPhone. This is more about Apple frameworks than it is about Swift, so you might have better luck asking this over on DevForums, and spec