daurnimator

Results 792 comments of daurnimator

> If a parameter is inline, then multiple instantiations of the function may be generated - one for each unique comptime value that is passed to it, and one extra...

> Er, I hope you are not suggesting that that for all ordinary functions `f`, calls with comptime arguments, e.g. `f(0)`, should lead to separate instantiations? smile yes actually. To...

You need to have much of it in memory to find the data section seperator. See https://github.com/daurnimator/mmdblua/blob/master/mmdb.lua#L20 Searching backwards is 'hard'. After that, `ipv6_find_ipv4_start` will need to traverse a reasonable...

> With the other geoip bindings there was an option to map the file in memory Yeah; they'll probably be using `mmap()`. You could do this in luajit via the...

Looking through again there isn't that many string methods in use: - that first `:find` to get the data section seperator - `:byte` to read a few bytes at a...

To quote myself from https://github.com/daurnimator/mmdblua/pull/5#issuecomment-262545798 > Sorry, but after reflecting on this a while, I realised that seeking a file here is not the correct answer: it will result in...

I agree. Happy to add functions that return nil, err, errno and keep old constructor for compatibility

Let me know what you think of #10. Pick me some better function names if you can :)

> I could have sworn there was an issue about function multiversioning/selection based on runtime-detected CPU in Zig itself but I can't find it now https://github.com/ziglang/zig/issues/1018 ?

@hryx told me I should mention that `@field` currently works as an lvalue which may obliviate the need for tags. Especially when combined with #2937. This lets you do things...