BWAAAAAAAAHAHAHAHAHA.
Thinking about spinning up iocaine 4.x in always-garbage mode at hungry.tarpit.monster.
Hand—ram it down their throats. Men don’t want to put two and one purpose only, to capture.
Some nonsense is hilarious nonsense.
Hrm, the templating is a bit on the slow side.
bombardiering /: ~150k req/sec
bombardiering /abrakadabra/ (poisoned url): ~103k req/sec
That's still a whole lot better than NSoE3, which - if I remember correctly - was either around 40k or 70k req/sec. But I want more.
With prometheus and mlua added to the dependencies, we're at 322 [[package]] entries in Cargo.lock - including dev-dependencies, and cargo deps-list counts 301, cargo vendor vendors 316.
That should be pretty much all of the dependencies, and we're still around the ~320 target. Good, good.
(I will have another go at trying to further reduce deps, once everything else's further progressed. The current size of the tree is fine, already significantly smaller than iocaine 3.)
Oooh, Roto 0.14 fixed the bug that prevented me from moving the Request, Response and Method types into a http module.
Upgraded iocaine4 quickly, moved the types, and now I'm happy.
One of the things that was annoying me in iocaine 3, is that all types were just... there, in the global namespace. iocaine 4 is much better organized!
Only the core iocaine types (Decision, Report, Bytes) are in the main namespace, and I'm considering moving the first two to iocaine. too.
I'm gonna leave that three in the main namespace.
I might have accidentally a bare bones C library that wraps iocaine-powder similar to how iocaine-vial wraps it for rusty http schenanigans.
It kinda somewhat looks like it might function, but at two in the morning, who can tell?
Oooh. I think I found a way to make map (as in hashmap) construction nicer from the Roto side!
map.insert_tuples([
[upon.value.string("key"), upon.value.string("value")],
[upon.value.string("another key"), upon.value.integer(42)]
]);
Pair it with a .map_from_tuples() function, and voila.
The advantage of this, over the current way (which will also remain) of creating an empty map and inserting key-value pairs is less locking.
I'll check how this affects performance tomorrow.
I can also make it slightly nicer:
map.insert_tuples([
upon.value.tuple("key", upon.value.string("value")),
]);
Hm. Not sure that's nicer. It's easier to make correct, though, because I can enforce that the tuples only have two elements, while doing the same for a List is a bit more involved (I either ignore additional elements, or return an Err at runtime, but I can't enforce it at compile time).
Glorious Garbage!