Hi Kelvin,
> On 9 Nov 2017, at 12:30 am, Kelvin Ma wrote:
>
> For context, the problem I’m trying to solve is efficiently parsing JPEG
> chunks. This means reading each chunk of the JPEG from a file into a raw
> buffer pointer, and then parsing the chunk according to its expected layout.
> Fo
Hi Kelvin,
> On 8 Nov 2017, at 5:40 pm, Kelvin Ma wrote:
>
> yikes there’s no less verbose way to do that? and if the type isn’t an
> integer there’s no way to avoid the default initialization? Can this be done
> with opaques or something?
well, it's 5 lines for the generic case to rule all t
Hi Kelvin,
> On 8 Nov 2017, at 4:54 pm, Kelvin Ma via swift-users
> wrote:
>
> According to the docs, the load(fromByteOffset:as:) method requires the
> instance to be “properly aligned” Does that mean if I have raw data meant to
> be interpreted as
>
> 0 1 2 3 4 5
Hi Fadi,
Just two questions:
- did you compile & run this program on the same machine or not? (the
.swiftmodule files and others are needed for LLDB)
- did you use your Linux distro's lldb or the one that comes with the Swift
toolchain? (you'll need the very LLDB that comes with the Swift compil
go through the same steps,
> going two levels of closure deeper, before he has access to both struct
> members?
>
> This doesn’t seem to scale very well. What about a struct with 5 arrays?
> --
> Chris McIntyre
>
>
>
>
>> On Sep 21, 2017, at 6:05 AM, Joha
Hi Rick,
> On 21 Sep 2017, at 1:03 am, Rick Mann via swift-users
> wrote:
>
> I've got Swift code wrapping a C API. One of the C structs the API uses looks
> like this:
>
> typedef struct {
>size_t size;
>float transformation[16];
>float projection[16];
>uint32_t width;
>u
> On 21 Jul 2017, at 1:45 am, Taylor Swift wrote:
>
> 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.UIn
Hi,
> On 20 Jul 2017, at 7:54 pm, Taylor Swift wrote:
>
> This does not seem to be the case…
>
> var buffers:(VBO:GL.UInt, EBO:GL.UInt) = (0, 0)
> glGenBuffers(n: 2, buffers: &buffers.VBO)
this is definitely illegal as you're writing 2 GL.UInts and you're giving it a
pointer to only o
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
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
Hi,
> Put simply, are reading and writing to Bools both atomic operations in Swift
> (3)?
you don't get a guarantee for that as Swift at the moment lacks both, a memory
and a concurrency model.
> Obviously, something reading and then assigning assuming the value doesn't
> change between is n
11 matches
Mail list logo