Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Aardappel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
241.
▲
by
Aardappel
11y ago
> It would be like seeing the same house on three different real estate websites and then thinking you can buy three houses. No it's not, since with the houses it would be easy to verify that there's no 3 houses available. The
242.
▲
by
Aardappel
11y ago
FlatBuffers isn't available natively for JS (yet), though you could use it through asm.js if you really wanted to.
243.
▲
by
Aardappel
11y ago
Good point. Lookup in Java is a bit slower than in the language FlatBuffers was originally designed for (C++), but being able to bypass Java's object allocation may well make up for that.
244.
▲
by
Aardappel
11y ago
There's a lot more to it than just being binary. The big deal is that it can be accessed in-place while still being portable and forwards/backwards compatible. For example, Protocol Buffers is binary too, but requires unpacking, c
245.
▲
by
Aardappel
11y ago
Thanks! I guess it's because we're a game development group inside Google, who are more externally focused than most Google engineers. We wanted to ensure the library is attractive to outside developers, hence CMake and other choi
246.
▲
by
Aardappel
12y ago
This one in Lobster, roughly the same amount of code, no textures, but is interactive (you can actually mine & build): http://i.imgur.com/ZZWFkXn.jpg
247.
▲
by
Aardappel
12y ago
And FlatBuffers actually uses ByteBuffer as part of its Java implementation.
248.
▲
by
Aardappel
12y ago
Most readers of binary file formats can be made to read memory outside the buffer by corrupting the data, and FlatBuffers is no different. That said, an option to bounds-check every offset would be possible, at a certain cost. Might be a ni
249.
▲
by
Aardappel
12y ago
Yup. An array of Vec3 (3 floats) will just take N*12 bytes, as you expect.
250.
▲
by
Aardappel
12y ago
Hi. I designed most of FlatBuffers, so let me see if I can clarify: Clearly, FlatBuffers seeks a different design tradeoff than Cap'n Proto. We wanted to retain all the flexibility of Protobufs, while having the advantages of the "
251.
▲
by
Aardappel
13y ago
shoot me an email if you can, can't seem to find yours online.
252.
▲
by
Aardappel
13y ago
the second option is the intended one, yes. I'd only switch that out to first one if you ever found that allocating objects is the bottleneck in your code, which it shouldn't be.
253.
▲
by
Aardappel
13y ago
You are both right. My use of C# is deliberately basic to give users of other languages a good chance to follow it too.
254.
▲
by
Aardappel
13y ago
Thanks! - considering adding "full" closures at some point, so far haven't felt the need. We'll see how unbearable this gets eventually :) - it does have a GC, which needs to be manually invoked. In games, that means you
255.
▲
by
Aardappel
13y ago
I agree that is indeed very generous! I am not sure I need it though, as I am fine having the main lobster page be a subpage of my personal wiki for the moment. That said, if it gets popular, it might be useful. Wanna hang on to it for the
256.
▲
by
Aardappel
13y ago
It's not common. This is the inspiration: http://strlen.com/java-style-classes-in-c
257.
▲
by
Aardappel
14y ago
Software has a habit of becoming exponentially complex as the featureset increases, so I am not that impressed by small code if you cut features aggressively. To prove a point, I wrote a minecraft clone in about 60 lines of code (10x less t