Re: [swift-users] Canonical way to cast C structs

2016-09-21 Thread Quinn "The Eskimo!" via swift-users
On 21 Sep 2016, at 06:45, Bouke Haarsma via swift-users wrote: > This property is not available on Linux … Hey, it’s call /BSD/ Sockets for a reason (-: Honestly, I don’t think there’s a good way to maintain the simplicity of this abstraction without `ss_len`.

Re: [swift-users] Bls: reading keyboard input from xcode playgroud

2016-09-21 Thread Jeremy Pereira via swift-users
> On 20 Sep 2016, at 17:54, Mr Bee via swift-users > wrote: > > I knew it's a bug, hence this email. > > > Pada Selasa, 20 September 2016 21:13, Zhao Xin menulis: > > > I test you code in command line `swiftc main.swift` and in macOS Command Line

Re: [swift-users] Ubuntu 16.04 support?

2016-09-21 Thread Michael Gottesman via swift-users
+CC Todd. > On Sep 20, 2016, at 9:25 PM, Ron Olson via swift-users > wrote: > > Hmm, I don’t get that at all: > > Welcome to Swift version 3.0 (swift-3.0-RELEASE). Type :help for assistance. > 1> import Foundation > 2> NSURL(string:"http://swift.org;

Re: [swift-users] Ubuntu 16.04 support?

2016-09-21 Thread Mishal Shah via swift-users
I should have Ubuntu 16.04 system available on ci.swift.org by end of day. Thanks, Mishal Shah > On Sep 21, 2016, at 9:25 AM, Todd Fiala wrote: > > Hmm, likes get a JIRA tracking this if we don’t have one already. > > Mishal, what’s the current ETA on the Ubuntu 16.04

[swift-users] Cross-Compiling to Linux from macOS

2016-09-21 Thread Rafael Costa via swift-users
Hello fellow Swift users, I’m encountering some problems and I wish to know if anyone here has ever come across something similar. In essence, I want to cross-compile a Swift Project on macOS to run it on Linux. I’m using the following command to (try) to do so: swift build -c release

Re: [swift-users] How to bridge between CoreFoundation and SwiftFoundation on Linux?

2016-09-21 Thread Jens Alfke via swift-users
> On Sep 20, 2016, at 9:38 PM, Bouke Haarsma via swift-users > wrote: > > When working with CoreFoundation objects (e.g. CFReadStream, CFWriteStream) > it isn't immediately obvious to me how to bridge them to SwiftFoundation > counterparts (InputStream / OutputStream).

Re: [swift-users] How to bridge between CoreFoundation and SwiftFoundation on Linux?

2016-09-21 Thread Bouke Haarsma via swift-users
The code is for another project. I’m trying to build a (partial) Swift implementation of NetService. See also https://github.com/Bouke/NetService/tree/linux . Apparently that protocol is EOL; > // slated for removal, these are the

Re: [swift-users] How to bridge between CoreFoundation and SwiftFoundation on Linux?

2016-09-21 Thread Bouke Haarsma via swift-users
The one that comes with SwiftFoundation (https://github.com/apple/swift-corelibs-foundation/tree/master/CoreFoundation ). I think it should be a bug that CFReadStream cannot be bridged to (NS)InputStream, as

Re: [swift-users] How to bridge between CoreFoundation and SwiftFoundation on Linux?

2016-09-21 Thread Philippe Hausler via swift-users
I would suggest that the way to do it is to follow the NSString/NSNumber approach used in swift-corelibs-foundation where the structural size is equivalent. the layout would roughly look like: open class InputStream : Stream { typealias CFType = CFReadStream // This layout MUST be the

Re: [swift-users] Can anyone please explain this behavior?

2016-09-21 Thread Joe Groff via swift-users
> On Sep 21, 2016, at 2:22 PM, Jens Persson via swift-users > wrote: > > // This little Swift program compiles (and runs) fine: > > func foo() -> Int { return a } > let a = 1 > let b = 2 > print(foo()) > > But if `foo()` returns `b` instead of `a`, I get this compile

[swift-users] Ubuntu 16.04 Bots on ci.swift.org

2016-09-21 Thread mishal_shah via swift-users
Ubuntu 16.04 support added to ci.swift.org! Starting tomorrow swift.org will also contain Ubuntu 16.04 toolchains. Master: 0. OSS - Swift Incremental RA - Ubuntu 16.04 (master) 0. OSS - Swift Incremental RA - Ubuntu 16.04

[swift-users] Fwd: How to bridge between CoreFoundation and SwiftFoundation on Linux?

2016-09-21 Thread Joe Groff via swift-users
> On Sep 21, 2016, at 1:03 PM, Bouke Haarsma via swift-users > wrote: > > The one that comes with SwiftFoundation > (https://github.com/apple/swift-corelibs-foundation/tree/master/CoreFoundation). > > I think it should be a bug that CFReadStream cannot be bridged to >

Re: [swift-users] Can anyone please explain this behavior?

2016-09-21 Thread Jens Persson via swift-users
I asked the same question on twitter, and it resulted in some interesting finds: https://twitter.com/bitCycle/status/778697998893142016 On Thu, Sep 22, 2016 at 12:41 AM, Zhao Xin wrote: > I suggest you defining the variables before using them like Marco does. > Although from

Re: [swift-users] Cross-Compiling to Linux from macOS

2016-09-21 Thread Rafael Costa via swift-users
Thank you Karl Enviado do meu iPhone > Em 21 de set de 2016, às 18:45, Karl escreveu: > > >> On 21 Sep 2016, at 19:14, Rafael Costa via swift-users >> wrote: >> >> Hello fellow Swift users, >> >> I’m encountering some problems and I wish to know

Re: [swift-users] Can anyone please explain this behavior?

2016-09-21 Thread Zhao Xin via swift-users
I suggest you defining the variables before using them like Marco does. Although from the global variable point of view, both way should be fine. But the glitch does exist, especially in playground. Zhaoxin On Thu, Sep 22, 2016 at 5:59 AM, Marco S Hyman via swift-users < swift-users@swift.org>

[swift-users] Can anyone please explain this behavior?

2016-09-21 Thread Jens Persson via swift-users
// This little Swift program compiles (and runs) fine: func foo() -> Int { return a } let a = 1 let b = 2 print(foo()) But if `foo()` returns `b` instead of `a`, I get this compile time error: "Use of unresolved identifier `b`" ___ swift-users mailing

Re: [swift-users] Cross-Compiling to Linux from macOS

2016-09-21 Thread Karl via swift-users
> On 21 Sep 2016, at 19:14, Rafael Costa via swift-users > wrote: > > Hello fellow Swift users, > > I’m encountering some problems and I wish to know if anyone here has ever > come across something similar. > > In essence, I want to cross-compile a Swift Project on

Re: [swift-users] Can anyone please explain this behavior?

2016-09-21 Thread Marco S Hyman via swift-users
> On Sep 21, 2016, at 2:22 PM, Jens Persson via swift-users > wrote: > > // This little Swift program compiles (and runs) fine: > > func foo() -> Int { return a } > let a = 1 > let b = 2 > print(foo()) > > But if `foo()` returns `b` instead of `a`, I get this compile

Re: [swift-users] Cross-Compiling to Linux from macOS

2016-09-21 Thread Karl via swift-users
> On 21 Sep 2016, at 19:14, Rafael Costa via swift-users > wrote: > > Hello fellow Swift users, > > I’m encountering some problems and I wish to know if anyone here has ever > come across something similar. > > In essence, I want to cross-compile a Swift Project on