Re: [swift-users] SwiftPM manual dependency management

2017-07-20 Thread Ankit Aggarwal via swift-users
On Thu, Jul 20, 2017 at 10:34 PM, Geordie J via swift-users < swift-users@swift.org> wrote: > Hi all, > > My team and I are trying to use SwiftPM to develop a relatively complex > app with multiple dependencies, all of which are being developed locally > and in parallel. The reason for this is com

Re: [swift-users] Can I use a tuple to force a certain memory layout?

2017-07-20 Thread Taylor Swift via swift-users
Okay, apparently layout is only guaranteed if the reference is to the tuple itself, not a member of the tuple. Don’t know if this is a bug or intended behavior. The above code works when written as var buffers:(VBO:GL.UInt, EBO:GL.UInt) = (0, 0) withUnsafeMutablePointer(to: &buffer

Re: [swift-users] Can I use a tuple to force a certain memory layout?

2017-07-20 Thread Taylor Swift via swift-users
This does not seem to be the case… var buffers:(VBO:GL.UInt, EBO:GL.UInt) = (0, 0) glGenBuffers(n: 2, buffers: &buffers.VBO) print(buffers) // > (VBO: 4, EBO: 0) var buffers:(VBO:GL.UInt, EBO:GL.UInt) = (0, 0) glGenBuffers(n: 1, buffers: &buffers.VBO) glGenBuffers(n: 1

Re: [swift-users] Can I use a tuple to force a certain memory layout?

2017-07-20 Thread Johannes Weiß via swift-users
Hi, > On 20 Jul 2017, at 5:41 pm, Taylor Swift wrote: > > Does addressof count as legally observing it? > > var buffers:(GL.UInt, GL.UInt) = (0, 0) > glGenBuffers(n: 2, buffers: &buffers.0) > > Also, I assume Swift performs a swizzle if the tuple is defined in a separate > mod

[swift-users] SwiftPM manual dependency management

2017-07-20 Thread Geordie J via swift-users
Hi all, My team and I are trying to use SwiftPM to develop a relatively complex app with multiple dependencies, all of which are being developed locally and in parallel. The reason for this is compatibility with an existing module/import structure used by our iOS app. Maybe I’m doing something

Re: [swift-users] Can I use a tuple to force a certain memory layout?

2017-07-20 Thread Taylor Swift via swift-users
Does addressof count as legally observing it? var buffers:(GL.UInt, GL.UInt) = (0, 0) glGenBuffers(n: 2, buffers: &buffers.0) Also, I assume Swift performs a swizzle if the tuple is defined in a separate module from where the pointer to it is constructed? On Thu, Jul 20, 2017 at

Re: [swift-users] Can I use a tuple to force a certain memory layout?

2017-07-20 Thread Johannes Weiß via swift-users
When you can (legally) observe it, tuples in Swift have guaranteed standard C-style layout. John McCall confirms this here: https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20170424/004481.html > On 20 Jul 2017, at 4:33 am, Taylor Swift via swift-users > wrote: > > Many APIs like Open