Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
Set by moderator on 20 November 2017.
Geth cro: 94f20c5a2f | (Jonathan Worthington)++ | 2 files
Mostly sketch out HTTP middleware docs

These mostly describe upcoming functionality.
00:38
jnthn Phew. Sleep time o/ 00:39
timotimo "only that the `process` message be implemented" → method 01:14
$responses.do: $rep { ← wants a -> in front of $rep 01:15
02:57 ilbot3 joined
moderator Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
Geth cro: 9cf5479563 | (Jonathan Worthington)++ | docs/reference/cro-http-middleware.md
Correct middleware doc thinkos; timotimo++
10:16
jnthn wonders if OO would have been better applied if the "send a message" terminology had won out over "call a method" 10:17
10:17 sena_kun joined 11:48 gfldex joined
gfldex Cro is failing tests right now see travis-ci.org/croservices/cro/jobs/305198438 11:49
jnthn Yeah, noticed that 11:50
Only on 2017.10, curiously, and it looks like a heisenbug
Guess we'll be keeping out --/test advice in place for a while yet
*our 11:51
(The patch being tested was a documentation patch, which couldn't be to blame for the failure) 11:52
gfldex I noticed by `zef install Cro` on a box with 2 cores. 11:57
jnthn didn't yet reproduce that particular failure mode locally, alas
I think sena_kun mentioned seeing it 11:58
sena_kun unfortunately, only with travis though, not locally. 11:59
jnthn Oh. 12:00
And even on Travis, it's rare
Geth cro: a93c13ac20 | (Jonathan Worthington)++ | docs/reference/cro-http-middleware.md
Very rough sketch of response cache middleware

Will fix the example up once the new middleware support module is implemented; this is just to provide an idea of the target API.
12:11
jnthn lunch & 12:12
gfldex jnthn: that bug is hiding behind CPU cores. I started a VM with just 1 core and the hit rate is 100%. Always in the same line 28 of Cro::Tools::CroFile. 12:39
timotimo there's tools to set the cpu affinity; maybe there's also a tool to limit a program to a single core? 12:45
gfldex might be as easy as to tell the scheduler to assume to have just 1 core 12:47
timotimo our own scheduler? we'll still run more than just one thread, though, and those will still be distributed among all cores 12:48
jnthn I've got a VM at home, so I could try configuring it with 1 or 2 cores 13:04
Thanks for the hint
gfldex timotimo: the tool is cpuset 13:11
timotimo don't have that. only a man page about the sysfs (or whatever) format 13:13
gfldex timotimo: cpuset can't handle child processes. So the perl6 executable would have to write its $PID to the 1-core-cpuset. 13:21
timotimo taskset has something about "all tasks", but that's only for threads, not child processes?
might have to work with cgroups then
gfldex just spinning up a container might be easier :)
timotimo right 13:22
gfldex container did not help 13:50
for the record, that's what I used: lxc-execute -n roast -s lxc.cgroup.cpuset.cpus=0 -s lxc.network.type=none -s lxc.environment=HOME=/root /bin/bash -- -l
14:08 stmuk joined
stmuk it may be time to remove the --/test from the zef install line on my.cro.services/ ? 14:14
jnthn I don't think so; there's still an issue on systems with fewer CPU cores on the cro distro itself, and I think the very occasional wedge in websocket tests on Travis too 14:15
Plus it adds a good bit to the install time
Though I could live with the latter; it'll improve with time as we find ways to make Rakudo compile faster 14:16
stmuk ah I just saw t/tools-runner.t fail too 14:33
cro is a very pleasant framework to use 17:08
stmuk caws in delight
jnthn :) 17:13
22:24 b2gills joined