Re: [swift-users] SwiftPM manual dependency management

2017-07-22 Thread Geordie Jay via swift-users
Geordie J schrieb am Fr. 21. Juli 2017 um 14:39: > Hi Ankit, thanks for your reply. > > Am 21.07.2017 um 07:33 schrieb Ankit Aggarwal via swift-users < > swift-users@swift.org>: > > > > On Thu, Jul 20, 2017 at 10:34 PM, Geordie J via swift-users < > swift-users@swift.org>

Re: [swift-users] SwiftPM manual dependency management

2017-07-22 Thread Geordie Jay via swift-users
Hi Ankit, thanks for your explanations. Ankit Aggarwal schrieb am Sa. 22. Juli 2017 um 13:44: > On 22-Jul-2017, at 3:37 PM, Geordie Jay wrote: > > > Geordie J schrieb am Fr. 21. Juli 2017 um 14:39: > >> Hi Ankit, thanks for your

Re: [swift-users] [swift-evolution] How does "Sequence.joined" work?

2017-08-08 Thread Geordie Jay via swift-users
Daryle Walker via swift-evolution schrieb am Di. 8. Aug. 2017 um 21:25: > On Aug 8, 2017, at 12:35 AM, Félix Cloutier > wrote: > > All this means is that `joined()` does not create an array that contains > the new result. It's only as magic

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-14 Thread Geordie Jay via swift-users
Cheers, Geordie Daniel Dunbar schrieb am Fr. 12. Mai 2017 um 20:33: > We don't have explicit support for api notes in SwiftPM. > Does that mean there is "unexplicit" support (maybe via swift build command line arguments)? I don't mind if I have to make a build

Re: [swift-users] Should I be using more catchless do blocks?

2017-06-20 Thread Geordie Jay via swift-users
Sorry in advance if Google Inbox messes with my code formatting below (can't there be just one good email client? I miss Mailbox) Michael Savich via swift-users schrieb am Mo. 19. Juni 2017 um 20:54: > Yeah, it's all about balance to be sure. Though one benefit of do

Re: [swift-users] Calling default implementation of protocol methods as selectors

2017-06-03 Thread Geordie Jay via swift-users
I am dealing with a variant of this on Android right now. I have just subclassed e.g. UITapGestureRecognizer to perform the 2nd variant above and externally accept a closure as its argument. I'm writing this on my phone so forgive any syntax errors or accidental omissions: class

Re: [swift-users] Calling default implementation of protocol methods as selectors

2017-06-03 Thread Geordie Jay via swift-users
Thanks for the amendment, and sorry for the (lack of) formatting. I painstakingly typed that on my phone with manually-spaced indenting, which the Inbox app unhelpfully removed entirely when I pressed send. Pasting into Xcode should do the trick though.. Geordie On Sun 4. Jun 2017 at 14:49, Zhao

Re: [swift-users] Calling default implementation of protocol methods as selectors

2017-06-03 Thread Geordie Jay via swift-users
That's why I thanked for for the amendment. As I said, typing code blindly on the phone, mistakes are inevitable. Thanks for clearing it up. On Sun 4. Jun 2017 at 15:04, Zhao Xin wrote: > I was not talking about the formatting. I am talking about the > implementation. > > You

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-07 Thread Geordie Jay via swift-users
I'm having the same issue. The renames seem to work, as in they disappear from the global scope with a fixit to rename to the new (namespaced) version if I type in the name manually, but they don't appear as static members of the enum type, regardless of how I call them. Would appreciate some help

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Geordie Jay via swift-users
Fantastic! Thanks for the info, this is great news. While I have you, I'm interested in annotating function pointers. Specifically, the JNI environment instance is a pointer to a pointer, so as is you have to type env.pointee.pointee.FunctionName(env, param1, param2) Ideally this would just look

Re: [swift-users] Annotating C APIs without changing the original header files

2017-05-04 Thread Geordie Jay via swift-users
Great, thanks for reminding me of this feature. I couldn't see how it could be used outside of the stdlib though, is it possible to use apinotes when simply linking a C module via its modulemap ? Douglas Gregor schrieb am Fr. 5. Mai 2017 um 01:55: > > On May 3, 2017, at 4:10

Re: [swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Geordie Jay via swift-users
I doubt it'll be "fixed" in the next release (which came out less than 24 hours ago), but I gather type checker speed optimisations and fixing crashes are ongoing goals of the compiler team. With no guarantees or expectations, you may find your code compiles in an acceptable time with Swift 4

Re: [swift-users] Swift 4 "Cannot use mutating member on immutable value: 'self' is immutable"

2017-09-18 Thread Geordie Jay via swift-users
It seems to me that some of these concerns could be fixed by returning ArraySlice instead of Array on popFirst(). Then you’d have similar performance expectations and explicit copying like with String / Substring. Geordie Elia Cereda via swift-users schrieb am Mo. 18.

Re: [swift-users] Problem with Access Control and Extensions

2017-09-21 Thread Geordie Jay via swift-users
Adrian Zubarev via swift-users schrieb am Mi. 20. Sep. 2017 um 22:13: > I don’t get your problem here. If you don’t want to debate the correctness > of your code, why are you asking for help or even showing error messages > for a code snippet that cannot work? > > 1. Drop

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-06 Thread Geordie Jay via swift-users
I think SwiftPM is (incorrectly) compiling A.XYZ into each of the modules that depend on it, as well as into your intended libA.so file. Try to ensure the plugin provider module (libA) is (only) being compiled into its standalone shared library file. Try cleaning the swiftpm build for one (swift

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

2017-10-03 Thread Geordie Jay via swift-users
2017-10-03 20:10 GMT+02:00 Georgios Moschovitis via swift-users < swift-users@swift.org>: > I implemented a simple RSS feed aggregator. I used code like... > > let data = try! Data(contentsOf: feedURL) > > or > > let session = URLSession(configuration: URLSessionConfiguration.default) > let task

Re: [swift-users] Why does the withUnsafeMutableBufferPointer closure take an inout parameter?

2017-10-14 Thread Geordie Jay via swift-users
Chris Lattner <clatt...@nondot.org> schrieb am Sa. 14. Okt. 2017 um 05:18: > > On Oct 13, 2017, at 7:40 PM, Andrew Trick via swift-users < > swift-users@swift.org> wrote: > > > > On Oct 12, 2017, at 3:52 AM, Geordie Jay via swift-users < > swift-users@swift.

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-07 Thread Geordie Jay via swift-users
Ján Kosa schrieb am Sa. 7. Okt. 2017 um 13:34: > I tried swift package clean, but it didn't help > > "Try to ensure the plugin provider module (libA) is (only) being compiled > into its standalone shared library file." > How do I go about this? It is 3rd party module, it

Re: [swift-users] [Feature Request] Extend the `defer` statement

2017-10-09 Thread Geordie Jay via swift-users
This feature request is probably one for swift evolution. I like the idea in theory, but I’d prefer to see the return value identifier being spelled out, i.e. “returnValue” instead of the symbols. Jun Zhang via swift-users schrieb am Mo. 9. Okt. 2017 um 05:37: > Yes

Re: [swift-users] dealing with heterogenous lists/dictionary with Codable

2017-10-19 Thread Geordie Jay via swift-users
David Baraff via swift-users schrieb am Do. 19. Okt. 2017 um 03:47: > So I have simple structs like this: > > struct Library: Codable { > let domain: String > let unit: String > } > > and it’s super-simple to serialize. Yay.

Re: [swift-users] dealing with heterogenous lists/dictionary with Codable

2017-10-19 Thread Geordie Jay via swift-users
David Baraff schrieb am Do. 19. Okt. 2017 um 21:14: > My apologies. I misstated the problem: I don’t want to just limit to Int, > String, [Int], etc. but also allow structures where > > struct NewThingy : Codable { > let data1: T1 > let data2: T2 > } > > where T1 and T2

Re: [swift-users] dealing with heterogenous lists/dictionary with Codable

2017-10-19 Thread Geordie Jay via swift-users
David Baraff schrieb am Do. 19. Okt. 2017 um 21:35: > > > Begin forwarded message: > > From: Geordie Jay > > Subject: Re: [swift-users] dealing with heterogenous lists/dictionary with > Codable > > Date: October 19, 2017 at 12:24:44 PM PDT > > To: David

Re: [swift-users] A problem about interact with C macros

2017-12-17 Thread Geordie Jay via swift-users
I think this is because the C preprocessor will interpret SITUATIONALL not as a value but as an expression. That means your C code at that spot will be turned into “(SITUATION1 | SITUATION2 | etc)” and not into the result of that expression directly. The clang importer could probably figure this

Re: [swift-users] A problem about interact with C macros

2017-12-17 Thread Geordie Jay via swift-users
a debugging nightmare. Since there is no “right” answer, I’d say macro expressions like this will never be imported by Swift. - Geordie Geordie Jay via swift-users <swift-users@swift.org> schrieb am So. 17. Dez. 2017 um 14:40: > I think this is because the C preprocessor will interpret SIT

Re: [swift-users] Was the String contains(_:) method changed in Swift 4?

2017-11-08 Thread Geordie Jay via swift-users
Jens Alfke <j...@mooseyard.com> schrieb am Mi. 8. Nov. 2017 um 16:54: > > > On Nov 8, 2017, at 2:24 AM, Geordie Jay via swift-users < > swift-users@swift.org> wrote: > > Would you be able to clarify where the line is between “tricky” and “not > tricky” and if pos

Re: [swift-users] dealing with heterogenous lists/dictionary with Codable

2017-10-19 Thread Geordie Jay via swift-users
I mean can you do something along the lines of let codableDict = stringAnyDict as? [String : Codable] ? I’m not at a computer to test it myself David Baraff schrieb am Do. 19. Okt. 2017 um 15:45: > That’s exactly what I want. The ironic part is that I got my

Re: [swift-users] Cannot pass immutable value as inout argument

2018-01-17 Thread Geordie Jay via swift-users
Jordan Rose via swift-users schrieb am Mi. 17. Jan. 2018 um 01:38: > Oh no, you're right, I'm sorry. You can only do that with arrays at the > moment. We do have a bug for this already. > > Jordan > But couldn’t you call it like this: lgs_notify_params_t(notify: