<FromGitter>
<drum445> The amount in the array could differ though
<jhass>
then you can't
<jhass>
how would the compiler know what call to generate if the size is only known after the fact :)
yxhuvud has quit [Remote host closed the connection]
<FromGitter>
<drum445> the problem I've got (and something I've managed to achieve in every other language), is I want to send a list of params through to db.exec(query, params)
<FromGitter>
<drum445> it doesn't seem to like an array and in Ruby I simply splat the params through
<FromGitter>
<drum445> how can I get around this?
<jhass>
why's it an array in the first place?
<FromGitter>
<drum445> because it's a generic update method in my DAL
<jhass>
why can't that generic method not take a tuple?
<FromGitter>
<drum445> because it accepts a hash then params is the hash.values
<FromGitter>
<drum445> let me try another way
<FromGitter>
<drum445> `@db.exec(qry, args: params)` looks to do the trick
<jhass>
We got NamedTuple#values returning a tuple
<straight-shoota>
Basically, it's a unique value in the program and you would usually use it to signal some kind of unique status.
<FromGitter>
<grkek> Does anyone have a binding for a performant HTTP request parser, preferably written in C?
<straight-shoota>
It's a rather controversial feature, inherited from Ruby. Many people don't use symbols at all. Unless you're really intrigued about them, you don't really need to bother.
<FromGitter>
<grkek> I use symbols and they are very comfy
<straight-shoota>
@grkek, IMHO, Crystal's native request parser is pretty performant
<FromGitter>
<grkek> I want it to be on par with the H2O.cr performance
<FromGitter>
<jrei:matrix.org> h2O too slow?
<FromGitter>
<grkek> H2O is way too fast
<FromGitter>
<jrei:matrix.org> the stdlib parser does not fit your use case, why?
<FromGitter>
<grkek> I want it to be extra fast
<FromGitter>
<jrei:matrix.org> ok... who knows...
<FromGitter>
<jrei:matrix.org> you may have similar or better speed, even with slower parsers, if you use them wisely
<FromGitter>
<jrei:matrix.org> for instance, parallelization
<straight-shoota>
what's the perf difference between h2o and HTTP::Request?
<FromGitter>
<jrei:matrix.org> and it is not even sure it will matters. The slow part may be somewhere else
<FromGitter>
<grkek> Literally bent every other framework
<FromGitter>
<grkek> I was trying to write bindings for picoev but I was facing issues
<FromGitter>
<fatherofinvention> When I run that example I get a positive value when the left operand is larger and a negative value when it is smaller.
<FromGitter>
<oprypin:matrix.org> > rewrite `a < b` as `(a <=> b) < 0`
<FromGitter>
<oprypin:matrix.org> basically `result [op] 0` will match `a [op] b` for `op` in `<` `==` `>` etc
Liothen_ has joined #crystal-lang
Liothen has joined #crystal-lang
<FromGitter>
<erdnaxeli:cervoi.se> j8r (https://matrix.to/#/@jrei:matrix.org): I used your gist to build an aarch64 docker image, thanks! ⏎ I didn't know about qemu-user-static, that's awesome