[swift-users] TWISt-shout Newsletter 2017-05-08

2017-05-07 Thread Kenny Leung via swift-users
Hi All. Here is your TWISt-shout Newsletter for the week of 2017-05-01 to 2017-05-07 https://github.com/pepperdog/TWISt-shout/blob/master/2017/TWISt-shout-2017-05-08.md Enjoy! -Kenny __

Re: [swift-users] Swift build-script Smaller Memory Footprint?

2017-05-07 Thread Brandon B via swift-users
Prior to the script hanging, I see the following: > ninja: no work to do > llvm: using gold linker Presumably that means I am using gold, correct? > On May 6, 2017, at 9:21 PM, Brandon B wrote: > > Hello, > > I’m installing Swift 3 on FreeBSD 11. After installing the necessary > dependencies,

Re: [swift-users] Swift build-script Smaller Memory Footprint?

2017-05-07 Thread Slava Pestov via swift-users
On Darwin (which uses its own linker and not GNU ld), you can definitely build Swift with less than 16GB of RAM available. Maybe you could try gold? Slava > On May 6, 2017, at 7:21 PM, Brandon B via swift-users > wrote: > > Hello, > > I’m installing Swift 3 on FreeBSD 11. After installing t

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-07 Thread Rick Mann via swift-users
I'm trying to use apinotes for this third-party C library (call it "Lib.dylib"). It has an enum lgs_error_t: typedef enum { lgs_error_none = 0, lgs_error_invalid_handle = -1, lgs_error_null = -2, lgs_error_invalid_parameter = -3, lgs_error_invalid_operation = -4, lgs_error

Re: [swift-users] Passing value types or members of value types?

2017-05-07 Thread Kelvin Ma via swift-users
i’m also curious as to whether this would be faster as a member function on the struct itself, since member functions get `self` as a pointer, right? > On May 7, 2017, at 11:21 AM, Kelvin Ma wrote: > > So if I am passing the large struct to a large function, or a function that > lives in a dif

Re: [swift-users] Passing value types or members of value types?

2017-05-07 Thread Kelvin Ma via swift-users
copy on write is not intrinsic to structs, is it? I believe copy on write is implemented in Array because Array contains a class for its storage, which checks its own reference count when it is mutated, and String gets the same behavior because String uses an Array as its underlying storage. On Su

Re: [swift-users] Passing value types or members of value types?

2017-05-07 Thread Kelvin Ma via swift-users
So if I am passing the large struct to a large function, or a function that lives in a different module (as my project is currently split into 8 or 9 modules — is that too many?), am I better off passing the members individually instead of passing the entire struct? It seems kind of tedious to have