Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Aardappel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
Aardappel
6y ago
If you use it for networked communications, by default use the verifier on the C++ side, would be my tip.
92.
▲
by
Aardappel
6y ago
Ah, thanks! I presume that is done for compactness, because I otherwise see no reason to pack an application type in with the built-in types. FlexBuffers could support a similar scheme if we wanted to, though putting custom data in the form
93.
▲
by
Aardappel
6y ago
I've worked with people internally, and it is indeed a challenge to speed up services with FlatBuffers. This is because 99.9% of internal communications flow over Protobuf, and many such services are simply: receive Protobuf, modify a
94.
▲
by
Aardappel
6y ago
Couldn't find your ldap internally.. would be happy to chat on what you tried to make flatbuffers go faster. Mine you can find on the go link page for flatbuffers. FlatBuffers can be accessed instantly without deserialization or alloca
95.
▲
by
Aardappel
6y ago
I originally designed FlatBuffers for games (though admittedly more for things like level data or save game data than network packets), so I'd think it is pretty suitable. I had actually used Protobuf on a game project just before, and
96.
▲
by
Aardappel
6y ago
I searched for "msgpack extension types" and "msgpack custom types" and nothing conclusive came up, so you'll have to explain what you mean. FlexBuffers is a schemaless format much like JSON, so is naturally extensi
97.
▲
by
Aardappel
6y ago
Even that kind of "marketing" takes time :) But thanks for helping out.
98.
▲
by
Aardappel
6y ago
Agreed, most use cases are not this extreme. But I saw them as an "upper bound" on how people would stretch a serialization system. I didn't want to be the guy saying "640k should be enough for everyone". No joke, I
99.
▲
by
Aardappel
6y ago
"market" it? This is an open source project, with zero budget. I'd rather spend my time writing more code than trying to market anything, which seems hard in todays climate :) Good systems will eventually reach people organic
100.
▲
by
Aardappel
6y ago
You are choosing to use a schema-less, dynamically typed representation (where a strongly typed alternative is directly available). I'd say, the convenience of being able to just say I am going to assume this is an int is fitting. If y
101.
▲
by
Aardappel
6y ago
FlexBuffers are actually not built on top of the FlatBuffers encoding, they have their own special purpose encoding, which tries to be as compact as possible while still allowing in-place access (details, search for FlexBuffers here: https
102.
▲
by
Aardappel
6y ago
gRPC FlatBuffers is supported in quite a few languages besides C++, Java, Go, Python, Swift, off the top of my head..
103.
▲
by
Aardappel
6y ago
I made this thing! AMA :)
104.
▲
by
Aardappel
6y ago
As you can see from the documentation, `AsInt64` is a convenience method that either says, I know this is an int, or make it so. There are also ways to check the type before you access, if you prefer. You can even check if its unsigned, if
105.
▲
by
Aardappel
6y ago
FlexBuffers currently is implemented in C++, Java, Rust, Dart, Swift, (and JS under review).
106.
▲
by
Aardappel
6y ago
It can pick names from the name section, linking section, or import/export name, in that order of preference (see https://github.com/WebAssembly/wabt/blob/master/docs/decompi... ). In the case o
107.
▲
by
Aardappel
6y ago
They are indeed not part of the spec since they are somewhat tool specific, for example the linking symbol names so far are only consumed by LLD. Docs here: https://github.com/WebAssembly/tool-conventions/blob/
108.
▲
by
Aardappel
6y ago
It doesn't actually try to undo anything, it just translates Wasm instructions 1:1 (they're in your link at lines 205-221). wasm-decompile does try to "undo" some thing, but it is generally impossible given LLVM's o
109.
▲
by
Aardappel
6y ago
The multi-value proposal breaks the ability to turn Wasm into expressions easily, and thus makes it even more of a stack machine than it already is. Dup and swap may still be added in the future. A defining feature of a register machine is
110.
▲
by
Aardappel
6y ago
I'm the author, if anyone has specific questions :)
111.
▲
by
Aardappel
6y ago
AssemblyScript would certainly do worse at #2, and possibly also at #1. To be translate to Wasm or from Wasm lead to different optimal designs, see for example how these two systems deal with loads and stores.
112.
▲
by
Aardappel
6y ago
wasm2c has a different objective though: to be recompile-able again while preserving semantics. wasm-decompile was designed for readability first.
113.
▲
by
Aardappel
7y ago
Walter, have you seen http://aardappel.github.io/lobster/memory_management.html ? If you looked at refcounting, this may be a way to make that compile time.
114.
▲
by
Aardappel
7y ago
If you want a binary JSON, https://google.github.io/flatbuffers/flexbuffers.html is worth looking at, since it carriers over the advantages of FlatBuffers (in-place access without unpacking), but without the need of sc
115.
▲
by
Aardappel
7y ago
Yup, that is exactly what I wrote in ~99 about Doom, that compared to modern games of the day (Q3, HL2) a lot had been lost. Besides the hordes of enemies, openness of the levels, and many other things: http://strlen.com/map
116.
▲
by
Aardappel
7y ago
Documentation on how Lobster's Wasm-backend works, which contains plenty of useful info for anyone making their own backend: http://aardappel.github.io/lobster/implementation_wasm.html
117.
▲
by
Aardappel
7y ago
Well, you have the facts to back it up, so indeed it can work for you. I'd say it requires quite some commitment to push it that far though, and I still would think it's not the right default for almost all teams. Impressive you m
118.
▲
by
Aardappel
7y ago
Overflow being UB is not something you run into easily with typical math, index and size uses (not as often as your run into unsigned issues, in my experience). Yes, bit-twiddling should be unsigned, but it is very easy to make this code is
119.
▲
by
Aardappel
7y ago
Generally a wonderful set of minimalistic rules, much could carry over beyond C. Except for: "OMG-API-3: Unsigned integers are preferred over signed".. I feel they're on the wrong side of history with this one. "Prefer u
120.
▲
by
Aardappel
7y ago
"How does it compare to sshd?"
More ›