D support in Thrift needs your reviews!

David Nadlinger see at klickverbot.at
Mon Mar 12 15:02:05 PDT 2012


On Monday, 12 March 2012 at 05:44:10 UTC, Martin Nowak wrote:
> I did recently tried it out because I wanted to test some async 
> Fiber kqueue stuff.
> It did fail to compile though because of conflicting selective 
> imports.
> You probably want to avoid those until the remaining issues are 
> sorted out.

Ouch, no idea how that happened – before the 2.058 release, I 
tested it regularly against the old import implementation, my own 
fix for bug 314, the then-trunk including Christian's 314 fixes, 
and I even tested most revisions during the »let's back this out 
shortly before the release« fiasko, but I must have somehow 
missed the actual release when doing so.

In any case, I pushed a fix to the Thrift JIRA and the GitHub 
repo [1], but was only able to test on OS X, so let me know if it 
still breaks for you.


>>  - Compile-time Thrift IDL parsing:
> I probably forgot to lex floating point literals.
> https://gist.github.com/2019921#gistcomment-90654

Nice! I hope I'll miraculously find myself with a free afternoon 
during the next week or so, can't wait to play around with it. 
Also, I'm thinking about rewriting the codegen completely in CTFE 
(i.e. producing a big string to be mixed in instead of using 
templates with string mixins only where required), because this 
would allow running the generator separately (and caching the 
output in a regular .d file) for faster build times…


>>  - A HashSet implementation in Phobos it could generate code 
>> against; currently, a void[0]-AA-based hack is used. I've been 
>> meaning to look into adding something to std.container for 
>> ages now, but with me being swamped in work and the container 
>> design being »in flux« (e.g. allocators)…
> Yup, at some point we should stick a not yet ready allocator 
> design
> into std.experimental before it inhibits even more development.

Andrei? ;)


> The void[0][Key] is a good trick, I always used empty structs.
I expose a (minimalistic) thrift.util.HashSet wrapper, though, to 
avoid too much confusion on the user side (and besides, an empty 
struct is probably cleaner anyway).


David


[1] https://github.com/klickverbot/thrift


More information about the Digitalmars-d mailing list