Re: [swift-users] Future(of: self.references)?

2017-05-22 Thread Charles Srstka via swift-users
While this makes sense in principle, it is far too easy to accidentally access the wrong member because something was shadowed. The very fact that the core team had to add a special-case warning for NSView.print() to the compiler itself demonstrates how problematic this can be. Oh well. When th

Re: [swift-users] Future(of: self.references)?

2017-05-22 Thread Kelvin Ma via swift-users
As someone who is very in favor of using `self` everywhere, I’ve come to the conclusion that the easiest way to use `self` everywhere is to write `self` everywhere. I write Swift as if `self` were mandatory, and as that email argues, that’s good enough for me. Personally I find self-less code harde

Re: [swift-users] Future(of: self.references)?

2017-05-22 Thread Greg Power via swift-users
Hi Travis, I’m certainly not a core contributor, but I could point you to the rejection email for this proposal, which you might not have seen: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160104/005478.html

Re: [swift-users] Build from command line using swift 4 toolchain

2017-05-22 Thread Mishal Shah via swift-users
Hi Halen, You can set the toolchain with --toolchain flag for xcrun and -toolchain for xcodebuild, here is more detail https://swift.org/download/#using-downloads Thanks, Mishal Shah > On May 22, 2017, at 2:03 PM, Halen Wooten via swift-users > wrote: > > Hi, > > I downloaded the Swift 4 t

[swift-users] Future(of: self.references)?

2017-05-22 Thread Travis Griggs via swift-users
I’m trying to figure out how to ask this question without generating flame and heat. Like tabs and spaces, under_scores and camelCase, whether or not one thinks that a message dispatch receiver should be explicit or implicit seems to be highly personal, (I think*) based on where/how you learned

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Jens Persson via swift-users
Check out the generators (especially xoroshiro) on this site: On Mon, May 22, 2017 at 6:54 PM, Saagar Jha via swift-users < swift-users@swift.org> wrote: > > Saagar Jha > > On May 22, 2017, at 08:44, Edward Connell via swift-users < > swift-users@swift.org> wrote: > > Any ideas when Foundation on

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Jens Persson via swift-users
Sorry for the premature send ... Here is the site: http://xoroshiro.di.unimi.it There is also a section there about "generating uniform doubles in unit interval" which is worth reading. And here's how to get uniform floating point values in the range [0, 1) from various (supposedly) random bit patt

[swift-users] Build from command line using swift 4 toolchain

2017-05-22 Thread Halen Wooten via swift-users
Hi, I downloaded the Swift 4 toolchain from swift.org and change my setting in Xcode. However, when I build xcode projects from the command line it's still using Swift 3.1. How can I instruct the command line tools to build with Swift 4? Thanks for the help, Halen ___

Re: [swift-users] Reporting crashes that only happen in large project

2017-05-22 Thread Jon Shier via swift-users
bugreport.apple.com, bugs filed there are confidential. Only Apple employees will be able to see, so I’ve uploaded entire client projects before. Jon > On May 22, 2017, at 1:59 PM, Halen Wooten via swift-users > wrote: > > Hi, > > I'm working with a weird crash at the moment, and my hunch

[swift-users] Reporting crashes that only happen in large project

2017-05-22 Thread Halen Wooten via swift-users
Hi, I'm working with a weird crash at the moment, and my hunch is that it's a swift bug. It's only happening on a tvOS device (simulator is fine). I can't share the whole project because it's confidential, and minimizing it would make the bug go away. Is there a recommended way to report these? I'

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Saagar Jha via swift-users
Saagar Jha > On May 22, 2017, at 08:44, Edward Connell via swift-users > wrote: > > Any ideas when Foundation on Linux will support arc4random_uniform? This is > kind of an important function. > There doesn't seem to be any decent substitute without requiring the > installation of libbsd-dev

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Philippe Hausler via swift-users
arc4random_uniform is from Darwin not Foundation - it just happens to be in a header we import when you import Foundation. > On May 22, 2017, at 8:44 AM, Edward Connell via swift-users > wrote: > > Any ideas when Foundation on Linux will support arc4random_uniform? This is > kind of an import

Re: [swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Daniel Dunbar via swift-users
This function isn't something which comes with Foundation, it is supplied by the BSD libraries on Darwin, but those aren't present on Linux. I recommend looking for a Swift implementation of a high-quality RNG which will meet your needs, rather than trying to rely on a non-portable implementatio

[swift-users] arc4random_uniform on Linux is missing from Foundation??

2017-05-22 Thread Edward Connell via swift-users
Any ideas when Foundation on Linux will support arc4random_uniform? This is kind of an important function. There doesn't seem to be any decent substitute without requiring the installation of libbsd-dev, which turns out to be messy. Currently I am doing this, but glibc random with mod does not prod

Re: [swift-users] X11/Xlib linker error

2017-05-22 Thread Kelvin Ma via swift-users
Tried that, doesn’t help On Mon, May 22, 2017 at 4:23 AM, Alex Blewitt wrote: > > On 21 May 2017, at 20:48, Kelvin Ma via swift-users > wrote: > > I’m trying to get Swift working with X11, and I keep getting this linker > error when I try to compile: > > ~/dev/cloudgen$ swift build -v > /usr/bi