Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-16 Thread Alex Blewitt via swift-users
Please record this in a bug at bugs.swift.org so that it doesn’t get lost, if you haven’t already. Thanks! Alex Sent from my iPhone 📱 > On 16 Oct 2017, at 19:56, Edward Connell wrote: > > Specifying the clang import location is what is triggering the LLDBFrontend > crash. > I think you ar

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-16 Thread Alex Blewitt via swift-users
> On 16 Oct 2017, at 18:52, Edward Connell wrote: > > While creating a bug report for this problem I placed my simple repro case in > a separate project with default build settings and I found that it no longer > crashes LLDB. > > My main project links to several system C libraries, because I

Re: [swift-users] SwiftProtobuf unable to link on Ubuntu

2017-10-16 Thread Alex Blewitt via swift-users
> On 14 Oct 2017, at 21:41, Geordie J via swift-users > wrote: > >> swift build -Xswiftc -I/home/ed/swift-protobuf/.build/release -Xlinker >> -L/home/ed/swift-protobuf/.build/release > > Have you considered using Swift Package Manager to add protobuf as a project > dependency? Then you wouldn

Re: [swift-users] Swift 4.0 LLDBFrontend Crash

2017-10-16 Thread Alex Blewitt via swift-users
Thanks for the analysis. Can you create a bug at https://bugs.swift.org and attach the reproducing test case? That way it can be routed to the appropriate people, in case they're not on this mailing list. Alex > On 13 Oct 2017, at 22:09, Edward Connell via swift-users

Re: [swift-users] file input

2017-10-12 Thread Alex Blewitt via swift-users
> On 12 Oct 2017, at 17:08, Madhava Paliyam via swift-users > wrote: > > Hi, > > I created a new file on swift playgrounds with data in it, the file type was > an empty file. How should I access the file through my playground? Questions regarding Playgrounds should really be directed to the

Re: [swift-users] Question about typo fixes on the Swift website.

2017-10-09 Thread Alex Blewitt via swift-users
Probably the best place would be to file an issue at https://bugs.swift.org and it can be routed from there. Thanks! Alex > On 8 Oct 2017, at 16:31, Mayur Dhaka via swift-users > wrote: > > Hello, > > I recently came across a couple of typos in the ‘Contributing’ document on > Swift.org

Re: [swift-users] Using libdispatch with Trunk Development snapshot

2017-10-07 Thread Alex Blewitt via swift-users
This sounds like a bug. There were some changes recently to migrate the build towards CMake and it may be that they have broken the build accordingly. Since I can't find one, can you create a bug at https://bugs.swift.org with the snapshot build that you saw the issue is? Alex > On 7 Oct 2017,

Re: [swift-users] Is URLSession actually working on Linux

2017-10-06 Thread Alex Blewitt via swift-users
> On 5 Oct 2017, at 19:18, Georgios Moschovitis > wrote: > > I am wondering, is there an ETA for 4.0.1 ? I'm not aware of there being an ETA, but according to https://swift.org/download/ last year Swift 3.0 was released on September 13, 2016 and then a subsequent Swift 3.0.1 was released on O

Re: [swift-users] Swift for Nuttx RTOS

2017-10-06 Thread Alex Blewitt via swift-users
> On 5 Oct 2017, at 22:47, Igor Mironenko via swift-users > wrote: > > This may be a strange question, but I would like to understand, since both > Mac OS and Nuttx RTOS are POSIX certified would it be possible in any way to > create a program using Swift language but compile to run it on Nutt

Re: [swift-users] Is URLSession actually working on Linux

2017-10-04 Thread Alex Blewitt via swift-users
> On 3 Oct 2017, at 19:15, Geordie Jay via swift-users > wrote: > > 2017-10-03 20:10 GMT+02:00 Georgios Moschovitis via swift-users > mailto:swift-users@swift.org>>: > I implemented a simple RSS feed aggregator. I used code like... > > let data = try! Data(contentsOf: feedURL) > > or > > le

Re: [swift-users] Where to report this bug?

2017-09-22 Thread Alex Blewitt via swift-users
let r2 = Int.min.dividedReportingOverflow(by: zero) > // error: division by zero > print(r2) >} > > Martin > > >> On 22. Sep 2017, at 10:19, Alex Blewitt via swift-users >> mailto:swift-users@swift.org>> wrote: >> >> I

Re: [swift-users] Where to report this bug?

2017-09-22 Thread Alex Blewitt via swift-users
Int.min is the smallest negative value, and Int.max is the largest positive value (that fits in an Int). However, the absolute value of Int.min is larger than the absolute value of Int.max. So you can't convert Int.min into -Int.min because it's larger than Int.max. In other words, this is expe

Re: [swift-users] RSS feed for the Swift.org blog not working

2017-09-20 Thread Alex Blewitt via swift-users
As you will have noted in my prior response, the atom.xml includes the blog post from yesterday that announced Swift 4.0 release. So clearly the posts are included and there is something failing in your client. Please investigate further. The posts appear to be listed in ascending date order (i

Re: [swift-users] RSS feed for the Swift.org blog not working

2017-09-20 Thread Alex Blewitt via swift-users
The feed seems to have data in it, and includes the swift 4.0 release note: Swift 4.0 Released! Ted Kremenek https://swift.org/blog/swift-4-0-released/"/> 2017-09-19T05:00:00-07:00 https://swift.org/blog/swift-4-0-released/

Swift 4 is now of


Re: [swift-users] noob question about modules

2017-09-13 Thread Alex Blewitt via swift-users
No, submodules in Swift bear little relation to sub packages in Java. It's really just a way of partitioning the namespace within a single module. Nor is there any relation between the path and the name of the module either. Alex > On 12 Sep 2017, at 22:41, blaster_in_black via swift-users >

Re: [swift-users] #selector() in Swift

2017-08-10 Thread Alex Blewitt via swift-users
> On 10 Aug 2017, at 07:04, Mohit Athwani via swift-users > wrote: > > With closures being first class citizens in Swift and the ability of closures > to be able to capture scope, it seems a little archaic to me that the > #selector() feature exists in Swift. > > For example, why does > func

Re: [swift-users] Swift linux repl can't import

2017-07-27 Thread Alex Blewitt via swift-users
For the mail (so it's easier to find than in a bug tracking system) the fix is to specify the clang include headers either with an -I on the swift invocation command line, or via the variables C_INCLUDE_PATH and CPLUS_INCLUDE_PATH setting the C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment var

Re: [swift-users] Printing Enums?

2017-07-17 Thread Alex Blewitt via swift-users
> On 17 Jul 2017, at 15:15, Michael Rogers via swift-users > wrote: > > Hi, All: > > Can someone please enlighten me as to why the first enum works as expected, > giving me Melbourne, but the second gives UIModalPresentationStyle rather > than fullScreen? Sure - it's because it's an alias th

Re: [swift-users] Disable "indexing while building" in Xcode9 (unknown argument: `-index-store-path`)

2017-07-05 Thread Alex Blewitt via swift-users
ot able to locate the definition, no visible cursor when in the > jumped-to editor). > > I was surprised 1 hadn't been fixed in the second beta. Is everyone assuming > that it must have been reported thousands of times already, or am I the only > one experiencing it? >

Re: [swift-users] Disable "indexing while building" in Xcode9 (unknown argument: `-index-store-path`)

2017-07-05 Thread Alex Blewitt via swift-users
A workaround is to add SWIFT_INDEX_STORE_ENABLE=NO as a build time setting in Xcode, which prevents this argument being added to the call to swiftc. > On 5 Jul 2017, at 02:02, Anders Hasselqvist via swift-users > wrote: > > Hi, > > I've been trying to use the swift4 snapshot toolchains with

Re: [swift-users] Maintaining the contact information in CONTRIBUTORS.txt file

2017-07-03 Thread Alex Blewitt via swift-users
>From https://swift.org/CONTRIBUTORS.txt >on the website (which is I presume the one you're referring to): Names below this line are automatically generated from the repository logs. It contains the information about the committer that was publicly present wh

Re: [swift-users] Class vs Structures

2017-06-29 Thread Alex Blewitt via swift-users
> On 29 Jun 2017, at 18:16, Vitor Navarro via swift-users > wrote: > > Hi, > > I know this question is probably done a thousand times, but I wanted to hear > from Swift dev community. What is the question? > I think both of them have right places for usage depending on the occasion > but do

Re: [swift-users] Swift on Centos7

2017-06-28 Thread Alex Blewitt via swift-users
It's something that isn't currently supported at the moment - follow https://bugs.swift.org/browse/SR-100 for more updates as others have tried to get it building there as well. Alex > On 28 Jun 2017, at 10:28, Alexander via swift-users > wrote: > > Go

Re: [swift-users] Unsupported Float80 math functions and min/max behavior with Nan

2017-05-26 Thread Alex Blewitt via swift-users
> On 26 May 2017, at 11:01, Antonino Ficarra via swift-users > wrote: > > - Why Swift continues to not support Float80 math functions? > Example: > > print("\( log( Float( 1.0 ) ) )") > print("\( log( Double( 1.0 ) ) )") > // print("\( log( Float80( 1.0 ) ) )")// don’t compile and logl

Re: [swift-users] stack trace of Swift executable

2017-05-03 Thread Alex Blewitt via swift-users
Greg, This occurs when compiled with swiftc -g as well. In fact, I think 'swift build', when run by default, will compile with swiftc -g. It's only when you run 'swift build --configuration release' that it will compile without it. $ swiftc --version Apple Swift version 3.1 (swift-3.1.1-RELEASE

Re: [swift-users] stack trace of Swift executable

2017-05-02 Thread Alex Blewitt via swift-users
If you can reproduce it, and run it under lldb, it will print the source line for you: $ lldb .build/debug/main (lldb) target create ".build/debug/main" ruCurrent executable set to '.build/debug/main' (x86_64). (lldb) run Process 19013 launched: '/private/tmp/main/.build/debug/main' (x86_64) Hell

Re: [swift-users] Why does withUnsafePointer(to:) require a var argument?

2017-04-27 Thread Alex Blewitt via swift-users
> On 27 Apr 2017, at 09:41, Rien via swift-users wrote: > >> >> On 27 Apr 2017, at 09:54, Rick Mann wrote: >> >>> >>> On Apr 26, 2017, at 23:37 , Rien via swift-users >>> wrote: >>> >>> 1) When you obtain a pointer, it can no longer be ensured by the compiler >>> that you won’t write to

Re: [swift-users] Build swift on FreeBSD

2017-04-18 Thread Alex Blewitt via swift-users
The error may be because of the missing symbol you saw earlier. The build has a setting SWIFT_LINK_OBJC_RUNTIME which should default to NO on non-Darwin systems, but I don't know how the detection works on FreeBSD. The symbol is being emitted by the clang compiler and it seems to think there's

Re: [swift-users] Swift Concurrency and Actor model

2017-04-12 Thread Alex Blewitt via swift-users
> On 11 Apr 2017, at 23:37, Greg Parker via swift-users > wrote: > >> >> On Apr 11, 2017, at 9:10 AM, Gerard Iglesias via swift-users >> mailto:swift-users@swift.org>> wrote: >> >> Thanx for the link on this… >> >> I am experimenting the use of dispatch queue to mimic somme Actor Model >> t

Re: [swift-users] Why does this leak?

2017-03-28 Thread Alex Blewitt via swift-users
> On 28 Mar 2017, at 05:41, Rick Aurbach wrote: > > That wouldn’t work directly. The “leak” occurs when processing a segue called > in response to a user button push. (I suppose I could attempt to wire up a UI > Test, but would rather not go down that route.) > > What I can try is to see if I

Re: [swift-users] Why does this leak?

2017-03-27 Thread Alex Blewitt via swift-users
> On 26 Mar 2017, at 18:43, Rick Aurbach via swift-users > wrote: > > I have a situation where I have a leak that I do not understand. I would be > very grateful if someone could explain it to me and offer an idea of how I > can make the pattern work without leaking: How are you determining

Re: [swift-users] Building Swift from source

2017-02-21 Thread Alex Blewitt via swift-users
> On 21 Feb 2017, at 04:38, Mohit Athwani via swift-users > wrote: > > To compile, I've been using: > ./swift/utils/build-script --preset=buildbot_linux_1604 > install_destdir=/tmp/install installable_package=/tmp/swift.tar.gz > > This process takes a very long time. I was wondering if there

Re: [swift-users] Master branch not compiling

2017-02-21 Thread Alex Blewitt via swift-users
The LLDB master still fails to build and has been failing for the last 11 days on Linux: https://ci.swift.org/job/oss-lldb-incremental-linux-ubuntu-16_04/ https://ci.swift.org/job/oss-lldb-incremental-linux-ubuntu-16_10/

Re: [swift-users] Array elements assign to variables

2017-01-27 Thread Alex Blewitt via swift-users
On 27 Jan 2017, at 11:27, TUNG CK via swift-users wrote: > > Python, we have this >for pixel in pixels: >r, g, b, brightness = pixel >. > > I wonder how to do it in swift? is there a more swifty way to do something > like this below? >for pixel in pixels { >v

Re: [swift-users] SPM: no such module - System Library Wrapper

2017-01-26 Thread Alex Blewitt via swift-users
Have a look at BlueSockets which does the same kind of thing: https://github.com/IBM-Swift/BlueSocket https://github.com/IBM-Swift/BlueSSLService There's a wrapper around OpenSSL as well: https://github.co

Re: [swift-users] Alamofire on Linux

2017-01-25 Thread Alex Blewitt via swift-users
It would be worth asking on swift-server-dev as well. > On 24 Jan 2017, at 20:20, Jon Shier via swift-users > wrote: > > Swifters: > I’m one of the two maintainers for the Alamofire networking library. > We’re in the process of porting Alamofire to Linux but have run into a major > issu

Re: [swift-users] Compiler should issue a warning when a subclass implementation with default values matches a parent implementation without them

2017-01-23 Thread Alex Blewitt via swift-users
The right first step is to raise a bug on JIRA https://bugs.swift.org with the example test case in the mail. It will then be assigned to the appropriate individuals and prioritised/fixed accordingly. Alex > On 23 Jan 2017, at 10:04, Wagner Truppel via swift-users >

Re: [swift-users] Using Task on Linux

2017-01-09 Thread Alex Blewitt via swift-users
When you run it with absolute paths for the 'swift' and 'python' executables, does it work then? Alex > On 9 Jan 2017, at 06:20, Mr Bee via swift-users wrote: > > Hi, > > I'm writing a simple editor on Linux for Swift language. I use Task (was > NSTask) to run the Swift REPL. Unfortunately,

Re: [swift-users] Possible bug in Swift REPL autocompletion?

2016-12-23 Thread Alex Blewitt via swift-users
I think this is a known issue but I don't know what the bug is. Please can you create a bug on https://bugs.swift.org and include a reproduction, including what output you see? Thanks, Alex > On 22 Dec 2016, at 21:19, Eugenio Baglieri via swift-users > wrote: > > G

Re: [swift-users] Swift 3 Whole Module Optimization Issue

2016-12-23 Thread Alex Blewitt via swift-users
Can you raise a bug at https://bugs.swift.org with the details, including the crash dump? Thanks, Alex > On 22 Dec 2016, at 02:48, Jun Zhang via swift-users > wrote: > > Hi, everyone. >I think I found a swift 3 whole module optimization issue. The code below, >

Re: [swift-users] Ubuntu/Centos docker with swift 3

2016-12-12 Thread Alex Blewitt via swift-users
Sent from my iPhone 📱 > On 12 Dec 2016, at 22:32, Gerard Iglesias wrote: > > Hello, > > Something important to note, i have created an image from scratch installing > emacs in place of vim. > > But to get swift working we have to run the image with privilege access like > this > > docke

Re: [swift-users] Ubuntu/Centos docker with swift 3

2016-12-12 Thread Alex Blewitt via swift-users
On 12 Dec 2016, at 11:06, Gerard Iglesias via swift-users wrote: > > Hi everybody, > > I would like to know if somebody use Docker with image of Ubuntu or Centos > with swift 3 on them to make a working dev environment ? > > I just start to learn Docker use, which is not hard obviously, but

Re: [swift-users] Trouble with initial checkout

2016-12-08 Thread Alex Blewitt via swift-users
If you want to use the branch swift-3.0.2-PREVIEW-1 tag then you should run update-checkout with that tag name, to ensure that you're on the right one. You can run: swift/utils/update-checkout --tag swift-3.0.2-PREVIEW-1 If you find that you have problems with repository state (that you didn't

Re: [swift-users] Decimal to Double?

2016-11-28 Thread Alex Blewitt via swift-users
idge to NSDecimalNumber directly like this: >> >> (Decimal(1.0) as NSDecimalNumber).doubleValue >> >> (but perhaps we should consider adding initializers that follow the same >> pattern as Double that don’t have to bridge to solve the problem) >> >>

Re: [swift-users] Decimal to Double?

2016-11-28 Thread Alex Blewitt via swift-users
You can wrap it with an NSDecimalNumber, and then cast it to a Double from there: Double(NSDecimalNumber(decimal:Decimal(1.0))) Alex > On 28 Nov 2016, at 10:13, Rick Mann via swift-users > wrote: > > How do I get a Double from a Decimal? > > TIA, > > -- > Rick Mann > rm...@latencyzero.com

Re: [swift-users] comparison Non-Optional and Optional without unwrap

2016-10-18 Thread Alex Blewitt via swift-users
> On 18 Oct 2016, at 09:58, Седых Александр via swift-users > wrote: > > This code work: > > let one: Int? = 5 > let two = 5 > let result = one == two > > print(result) > > //print true > > Why we can access to Optional value without unwrap within comparison > operations? The 'one' valu

Re: [swift-users] Linux - Calendar date(byAdding:to:wrappingComponents:) returns nil when it shouldn't?

2016-10-05 Thread Alex Blewitt via swift-users
> On 5 Oct 2016, at 16:48, Alex Blewitt via swift-users > wrote: > > >> On 4 Oct 2016, at 20:10, Jason Ji via swift-users > <mailto:swift-users@swift.org>> wrote: >> >> Hello, >> >> I'm having an issue with (NS)Calendar on Linux w

Re: [swift-users] Linux - Calendar date(byAdding:to:wrappingComponents:) returns nil when it shouldn't?

2016-10-05 Thread Alex Blewitt via swift-users
> On 4 Oct 2016, at 20:10, Jason Ji via swift-users > wrote: > > Hello, > > I'm having an issue with (NS)Calendar on Linux which I think is a bug, but I > just wanted to check first if it was just me or if this is indeed a bug. I've > filed a bug report here, just in case: https://bugs.swift

Re: [swift-users] Swift migration bug

2016-10-03 Thread Alex Blewitt via swift-users
> On 30 Sep 2016, at 19:30, Nate Birkholz via swift-users > wrote: > > I found a bug in Swift 2.3 migration in the XCUITests, not sure if the bug > goes to swift.org or to Apple. > > UI test generator uses the syntax (XCUIElement).children(matching: .other) > but the compi

Re: [swift-users] Provide native Decimal data type

2016-09-13 Thread Alex Blewitt via swift-users
Regarding Decimal - it's not yet implemented on Linux, but it's a work in progress. Alex > On 12 Sep 2016, at 18:49, Stephen Canon via swift-users > wrote: > > >> On Sep 12, 2016, at 1:26 PM, Jens Alfke via swift-users >> mailto:swift-users@swift.org>> wrote: >> >>> On Sep 12, 2016, at 10:

Re: [swift-users] Linux Swift: Strange bug found in a simple arithmetic

2016-09-07 Thread Alex Blewitt via swift-users
On 7 Sep 2016, at 15:11, louislepegue via swift-users wrote: > > let simpleTest = Float(abs(11 - -3) + abs(4.5 - -4)) //! > print ("simpleTest: \(Simpletest)") > Aside from the fact that the case-sensitivity of simpleTest is important, the delay is in the compilation of this script rather t

[swift-users] IBM and Swift on the Server

2016-04-13 Thread Alex Blewitt via swift-users
At QCon London earlier this year, IBM came to speak about their work with Swift on the server and their use on Linux. I interviewed them afterwards about it, and now both the presentation and interview write-up are available on InfoQ, in case you’re interested: http://www.infoq.com/presentation

Re: [swift-users] Random Function

2015-12-11 Thread Alex Blewitt via swift-users
If you’re on Linux: import Glibc print(“A random number is \(random())”) If you’re on OSX: import Darwin print(“A random number is \(random())”) > On 11 Dec 2015, at 14:21, Piero Sabino via swift-users > wrote: > > I want to print to video 6 random numbers from a range of values > > __

Re: [swift-users] hasSuffix(_:) and .hasPrefix(_:) String methods missing on Linux

2015-12-11 Thread Alex Blewitt via swift-users
FYI: https://github.com/apple/swift/blob/master/stdlib/public/core/StringLegacy.swift#L73 These two functions are (currently) only available with the Objective-C bridge, which the Linux port doesn’t have. A

Re: [swift-users] hasSuffix(_:) and .hasPrefix(_:) String methods missing on Linux

2015-12-11 Thread Alex Blewitt via swift-users
They may come as extensions from NSString, which Swift doesn’t have fully implemented on Linux yet. Alex > On 11 Dec 2015, at 11:18, Alessandro Morgantini via swift-users > wrote: > > Hello to everyone! > I'm a very newbie to Swift, I'm doing first experiments on Linux & Mac and I > have the