»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:06 yqt left
Geth doc: e6a5ab4e6a | (Tom Browder)++ (committed using GitHub Web editor) | doc/Type/Encoding/Registry.pod6
fix grammar
00:10
synopsebot_ Link: doc.perl6.org/type/Encoding::Registry
00:12 pecastro left 00:18 w_richard_w joined 00:19 p6bannerbot sets mode: +v w_richard_w 00:21 rindolf left 00:25 Kaiepi left 00:26 daxim left 00:28 ufobat left 00:36 daxim joined 00:37 p6bannerbot sets mode: +v daxim 00:38 clarkema left, clarkema_ is now known as clarkema, clarkema left
timotimo lichtkind: prompt has to flush stdout because it doesn't print a newline after printing out the "question" you supply 00:49
and terminals or whatever might buffer or wait for a newline before displaying anything 00:50
lichtkind timotimo, so script has not enough rights? 00:56
timotimo no 00:57
it might not be connected to a tty/pty
lichtkind but it is 00:59
timotimo you can check what strace says
01:01 kurahaupo_ joined
lichtkind im on mac 01:01
timotimo there's an strace equivalent, i don't remember what it's called
01:01 p6bannerbot sets mode: +v kurahaupo_ 01:04 kurahaupo left
lichtkind timotimo, thank you , i think has to do how i call it from a bash script because otherwise it works 01:04
01:08 atweiden-air joined 01:09 p6bannerbot sets mode: +v atweiden-air
atweiden-air looking 4 collab on github.com/Homebrew/homebrew-core/pull/34785 01:10
needed: a test case for the `moar` and `nqp` binaries
01:16 Kaiepi joined 01:17 p6bannerbot sets mode: +v Kaiepi
Kaiepi m: my Promise $p .= start({ Promise.start({ 0 }) }); say await $p 01:17
camelia Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Kept)
Kaiepi huh that's different from how node handles promises 01:18
m: my Promise $p .= start({ Promise.start({ 0 }) }); say await await $p
camelia 0
timotimo await will keep resolving until nothing resolvable is left?
Kaiepi yeah
atweiden-air is there such thing as an nqp one-liner? 01:33
timotimo yeah, you can nqp-m -e '...' 01:36
or what do you mean?
atweiden-air yes, that is what i meant 01:38
01:41 Sgeo joined, p6bannerbot sets mode: +v Sgeo 01:43 Sgeo__ left 01:47 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke
atweiden-air timotimo: is there such thing as a `moar -e` one liner? 01:49
just wanting to see if i can test the functionality of moar on the commandline for macos homebre
timotimo no, moarvm has no text-based input format
if you have zsh, you can "just"™ put a looooooooong string in the commandline and have zsh replace it with a filename that contains the string 01:50
and then have a crapton of escape sequences for unprintable bytes
atweiden-air seems good imo
01:51 mcmillhj joined
atweiden-air presumably it can do `moar *.moarvm` ? 01:51
01:51 p6bannerbot sets mode: +v mcmillhj
timotimo it only takes a single moarvm file on the commandline 01:52
01:52 MasterDuke left
atweiden-air is there a bashism for generating a makeshift helloworld.moarvm ? 01:52
timotimo you'll have a "fun" time building a working payload
mcmillhj What would be the correct way to group a string by letter? I have made a few attempts using `classify` but haven't made much headway 01:53
timotimo especially if you don't want it to require any other .moarvm files
atweiden-air well, if it's too much fun, then i can let the homebrew maintainers know i suppose...
mcmillhj specifically if I had 'aabb' or (a a b b) I think would want back ((a a) (b b)) 01:54
atweiden-air mcmillhj: maybe comb
timotimo you'll probably get far by only constructing QAST from either a perl6 or nqp script and spitting that out
mcmillhj: are the letters "in order" when they come in? 01:55
mcmillhj timotimo: I was planning to sort them to support the effort of grouping
timotimo m: say "hello how are you today".comb.Bag.kxxv
camelia (u h h e e l l t o o o o y y d a a w r)
timotimo daawr
mcmillhj oh wow, comb.Bag does exactly what I want if the string is pre-sorted 01:56
timotimo shouldn't make a differenwe whether the string is pre-sorted or not
mcmillhj timotimo: my mistake, I didnt test the other case. Thanks for the help! 01:57
timotimo no problem!
mcmillhj 01:58
sacomo hi all 02:00
timotimo greetings sacomo
holyghost hello 02:01
sacomo are there any tips to speed up precomp? 02:02
hi timotimo, holyghost
timotimo put more stuff in precompiled modules :)
sacomo yeah 02:03
timotimo if you're extra fancy, have a script that uses modules "in the right order" in parallel
sacomo hmm
timotimo since a module can change what the next line "means", we can't go off compiling a bunch of modules we see "in the future" in the code 02:04
holyghost true 02:05
sacomo is there anyway to flag a module to exclude it from recompiling?
timotimo yeah, "no precompilation" ought to do it
with a ; at the end, too
sacomo ah, in the module? is there a way to set an envvar?
02:05 rouking joined 02:06 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke, p6bannerbot sets mode: +v rouking
rouking It seems like the behavior of WhateverCode in array subscripts is inconsistent, for example `[1, 2, 3, 4][*-1]` yields `4`, implying `*` is the length of the array 02:06
but `[1, 2, 3, 4][1..^*]` yields only `(2 3)`, implying `*` is the last valid subscript (i.e. one less than the length) 02:07
timotimo the .. operator actually noms the * and it won't turn into a whatevercode 02:08
rouking hmmm
timotimo so you'll have to use a block in this case 02:09
holyghost rouking: also, ^ excludes, *
timotimo holyghost: except ..* is to infinity, which excluding it doesn't make much of a difference 02:10
holyghost no,
rouking Yet it seems to come back from the end of the array, since it only yields 2 and 3
timotimo oh? let me re-verify what i've been claiming
rouking I don't know, maybe there is magic afoot 02:11
timotimo huh
holyghost you just yield an array of index 1..^.elems
rouking Which should get the last element
timotimo i totally wronged!
holyghost indeed
timotimo sorry about that, .. doesn't actually nom the whatever star
holyghost it's a perl range
online
timotimo sorry, hold on again 02:12
huh.
rouking This is actually a little oddity I noticed really early on, but I figured I was just overlooking some really smart decision by the language designers :^) 02:13
for some reason, I'm still on 2018.04
let me grab 2018.10 and see if it's the same
holyghost s/perl range/perl6 range 02:14
02:14 w_richard_w left 02:15 tmtvl left
rouking p6: [1, 2, 3, 4][1..^*] 02:16
camelia ( no output )
rouking p6: say [1, 2, 3, 4][1..^*]
camelia (2 3)
rouking p6: [1, 2, 3, 4][{ say *; 1 }] 02:17
camelia *
02:17 Cabanoss- left
rouking p6: [1, 2, 3, 4][{ say $_; 1 }] 02:17
camelia 4
timotimo if you have a block, * won't get an argument; also, * won't curry subroutine calls
rouking Yeah, had a brainfart there
timotimo p6: say [1, 2, 3, 4][{ 1 }] 02:18
camelia 2
timotimo p6: say [1, 2, 3, 4][{ say $_; 1 }]
camelia 4
2
02:18 Cabanossi joined
timotimo ah, there was no "say" outside 02:18
i was wondering wht it'd get a 4 out of the 2nd slot
rouking So, sure enough, it seems it's the length, which would imply 1..^* is 1..^4, aka 1..3, and therefore it should get the whole tail of the list 02:19
02:19 p6bannerbot sets mode: +v Cabanossi
rouking Yet it doesn't 02:19
timotimo so, here's what confuses me
m: say 1..*; say 1..^*; say 1..Inf; say 1..^Inf; 02:20
camelia 1..Inf
1..^Inf
1..Inf
1..^Inf
timotimo those are the same
holyghost now a list should return it's inifinite * value 02:21
rouking Yep, I suppose since the range operator assumes a WhateverCode on the rhs means go to infinity
timotimo * itself isn't actually a whatevercode by itself
rouking Oh, really? 02:22
What is it
sacomo timotimo, thanks, 'no precompilation;' is helping.
timotimo m: say [1, 2, 3, 4][1..^(*+0)]
camelia (2 3 4)
timotimo m: say [1, 2, 3, 4][1..^*]
camelia (2 3)
timotimo m: say [1, 2, 3, 4][1..^(*)]
camelia (2 3)
timotimo m: say [1, 2, 3, 4][1..(^*)]
camelia Range objects are not valid endpoints for Ranges
in block <unit> at <tmp> line 1
rouking Oh boy, now that's an oddity 02:23
mcmillhj m: my @counts = "aabb\nbbdd".words.map({.comb.Bag})>>.values; say @counts>>.grep({ $_ == 2 }).elems; say @counts>>.grep({ $_ == 3 }).elems;
camelia 2
The iterator of this Seq is already in use/consumed by another Seq
(you might solve this by adding .cache on usages of the Seq, or
by assigning the Seq into an array)
in block <unit> at <tmp> line 1
timotimo well, this does show me that ..^ actually does not WhateverCurry, even in postcircumfix:<[ ]>
mcmillhj ^ which Seq is being referred to above? @counts is an Array if I understand correctly
timotimo @counts is an array of seqs, i'd expect 02:24
rouking So forcing it to be a WhateverCode with that identity addition makes the whole thing work as expected
timotimo m: my @counts = "aabb\nbbdd".words.map({.comb.Bag})>>.values; say @counts.perl
camelia [(2, 2).Seq, (2, 2).Seq]
timotimo rouking: yeah, but why would 1..^Inf and 1..^* be different
mcmillhj ooh, so to use each of those seqs again they need to be individually cached? 02:25
rouking So what in the world is `*` on its own in an expression like `1..^*`
timotimo mcmillhj: indeed
rouking: it's just Whatever
m: say Whatever; say *
camelia (Whatever)
*
timotimo Whatever is the type, * is an instance of that type
rouking Ah
timotimo whatever currying, on the other hand, is a compile-time syntaxt hing
rouking Yes, that is very odd 02:26
timotimo m: say [1, 2, 3, 4][1..^*]; say [1, 2, 3, 4][1..^Inf]
camelia (2 3)
(2 3 4)
timotimo ^- i have no explanation for how this happens, but i haven't looked at code at all yet
rouking Since putting 1..^* in the REPL spits out 1..^Inf 02:27
The .gist must be oversimplifying
timotimo a whole bunch of different methods on it return the same stuff, though 02:29
and the attributes all seem to have the same stuff in them, too 02:31
rouking Then is its location in a subscript doing something funky?
But you'd think it would have different behaviour were that the case… 02:32
I think you already determined this, but a Range *will* eat a Whatever, but not a WhateverCode 02:35
timotimo yeah, if there's already a whatevercode, it will curry the .. along with it 02:36
holyghost WhateverCode is probably like a smalltalk block 02:39
you overload procedures with it 02:40
literally and non-literally
02:41 mcmillhj left
SmokeMachine m: class A is Hash { has $.a = 0 }; say A.new.a # is this a bug? 03:06
camelia (Any)
SmokeMachine m: class A is Hash { has $.a = 0 }; say A.new(:1a).a 03:08
camelia (Any)
SmokeMachine m: class A { has $.a = 0 }; say A.new(:1a).a
camelia 1
SmokeMachine why hash is doing that?
m: class A does Associative { has $.a = 0 }; say A.new(:1a).a
camelia 1
timotimo might be providing a custom method new 03:10
s: Hash, "new", \()
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/194c...ap.pm6#L48
timotimo yup, no concern for named arguments at all
SmokeMachine :) 03:11
timotimo: but the default value shouldn't work?
timotimo not if it doesn't call bless or BUILDALL 03:14
SmokeMachine timotimo: it makes sense 03:16
timotimo goes to bed 03:22
seeya!
03:23 graphene left 03:24 graphene joined
SmokeMachine bye! 03:24
03:25 p6bannerbot sets mode: +v graphene 03:30 atweiden-air left 03:36 lucasb left 04:36 releasable6 left, squashable6 left, undersightable6 left, reportable6 left, benchable6 left, statisfiable6 left, evalable6 left, committable6 left, bisectable6 left, shareable6 left 04:37 shareable6 joined 04:38 evalable6 joined, p6bannerbot sets mode: +v shareable6, bisectable6 joined, ChanServ sets mode: +v bisectable6, benchable6 joined, unicodable6 joined, ChanServ sets mode: +v unicodable6, committable6 joined, ChanServ sets mode: +v committable6, quotable6 joined, p6bannerbot sets mode: +v evalable6 04:39 bloatable6 joined, p6bannerbot sets mode: +v bisectable6, p6bannerbot sets mode: +v benchable6, p6bannerbot sets mode: +v unicodable6, p6bannerbot sets mode: +v committable6, p6bannerbot sets mode: +v quotable6, p6bannerbot sets mode: +v bloatable6 04:40 statisfiable6 joined, ChanServ sets mode: +v statisfiable6, coverable6 joined, p6bannerbot sets mode: +v statisfiable6 04:41 greppable6 joined, p6bannerbot sets mode: +v coverable6
holyghost lol 04:41
04:41 reportable6 joined, ChanServ sets mode: +v reportable6, releasable6 joined, squashable6 joined, ChanServ sets mode: +v squashable6, p6bannerbot sets mode: +v greppable6, undersightable6 joined, nativecallable6 joined, ChanServ sets mode: +v nativecallable6 04:42 p6bannerbot sets mode: +v reportable6, p6bannerbot sets mode: +v releasable6, p6bannerbot sets mode: +v squashable6, p6bannerbot sets mode: +v undersightable6, p6bannerbot sets mode: +v nativecallable6
holyghost holyghost-able :-) 04:43
04:47 Cabanoss- joined 04:48 sauvin joined, p6bannerbot sets mode: +v sauvin, p6bannerbot sets mode: +v Cabanoss-, Cabanossi left 04:57 abraxxa joined, p6bannerbot sets mode: +v abraxxa 05:01 abraxxa left 05:07 jeek left 05:15 abraxxa joined 05:16 p6bannerbot sets mode: +v abraxxa
Geth doc: finanalyst++ created pull request #2493:
Change absolute urls to relative urls
05:27
05:32 Sgeo_ joined 05:33 p6bannerbot sets mode: +v Sgeo_
buggable New CPAN upload: DateTime-Monotonic-0.0.2.tar.gz by JMASLAK modules.perl6.org/dist/DateTime::Mo...an:JMASLAK 05:33
05:35 Sgeo left 05:45 curan joined, p6bannerbot sets mode: +v curan 06:01 molaf joined, p6bannerbot sets mode: +v molaf 06:12 abraxxa left 06:16 jmerelo joined, curan left, curan joined, p6bannerbot sets mode: +v curan, p6bannerbot sets mode: +v jmerelo
Geth doc/master: 4 commits pushed by (Richard Hainsworth)++, finanalyst++, (Juan Julián Merelo Guervós)++ 06:22
jmerelo There's a free slot on the advent calendar next 9th: github.com/perl6/advent/blob/maste...8/schedule Anyone wants to grab it? 06:25
06:35 larkenx joined, p6bannerbot sets mode: +v larkenx
larkenx hello 06:35
06:37 larkenx left
buggable New CPAN upload: DateTime-Monotonic-0.0.3.tar.gz by JMASLAK modules.perl6.org/dist/DateTime::Mo...an:JMASLAK 06:43
holyghost hi 07:01
buggable New CPAN upload: DateTime-Monotonic-0.0.4.tar.gz by JMASLAK modules.perl6.org/dist/DateTime::Mo...an:JMASLAK 07:03
07:12 ufobat joined 07:13 p6bannerbot sets mode: +v ufobat 07:24 ufobat left 07:36 robertle_ joined 07:37 p6bannerbot sets mode: +v robertle_ 07:39 jmerelo left 07:41 abraxxa joined, domidumont joined 07:42 p6bannerbot sets mode: +v abraxxa, p6bannerbot sets mode: +v domidumont 07:43 Macro left 07:46 Manifest0 left 07:48 Manifest0 joined 07:49 p6bannerbot sets mode: +v Manifest0 07:53 oftl left 07:56 Manifest0 left 07:57 Manifest0 joined 07:58 p6bannerbot sets mode: +v Manifest0 08:38 Ven`` joined, p6bannerbot sets mode: +v Ven`` 08:46 dakkar joined, p6bannerbot sets mode: +v dakkar 08:50 MasterDuke left 08:55 rindolf joined 08:56 p6bannerbot sets mode: +v rindolf 09:05 scimon joined 09:06 p6bannerbot sets mode: +v scimon 09:20 imcsk8 left
masak moritz: no, there are two separate actions needed: (a) scheduling the post at a certain datetime, and (b) hitting "Schedule" (not "Publish") 09:27
moritz: if one does (a) but not (b) (IME) nothing happens and the deadline makes a whooshing sound 09:28
09:28 imcsk8 joined 09:29 p6bannerbot sets mode: +v imcsk8
masak I'm such an old geezer in this community, I can re-read most advent posts I wrote in pasts years and be surprised and delighted someone who shares my name could write so eloquently 09:30
I wish I could, too :P
moritz masak: there are two actions necessary, correct
though the "Publish" button automatically changes to "Schedule" when I select a data, that's the only point I was trying to make :)
masak aggreed on your point 09:31
fat lot of good that does me if I miss the button, though :P
09:31 tadzik joined
masak I mean, I probably did in about 117 of the 119 universes parallel to ours 09:31
moritz > Some older languages (such as Forth) actually have different syntaxes for these two usages, and I love them for it. 09:32
09:32 p6bannerbot sets mode: +v tadzik
moritz I still write the odd shell script or Makefile occasionally, where the distinction has survived until today 09:32
masak aye
and bash, too, when you think about it
oh, you write "shell script" 09:33
tadzik oh no, I updated my irc client and now your nicknames have different colours than they used to
I don't think I'll ever recover this week
masak sorry -- reading comprehension also seems to disappear with age
tadzik: wait -- what color did I use to have? was it nice?
tadzik masak: it was yellow, now you're blue (da bu di da bu da)
09:35 mscha joined, p6bannerbot sets mode: +v mscha
masak I think I'd rather be blue, to be honest 09:35
09:35 zakharyas joined
masak sorry, I meant to show you some sympathy. but then you told me I used ta be yellow :P 09:35
mscha m: 'hello' ~~ /.$0/; # Trying to match "ll"
camelia ( no output )
mscha Dumb question: how do I do this? 09:36
09:36 p6bannerbot sets mode: +v zakharyas
masak m: 'hello' ~~ /(.)$0/ 09:36
camelia ( no output )
masak m: 'hello' ~~ /(.)$0/; say ~$/
mscha Yeah, that'
camelia ll
mscha 's what I meant, but doesn't work.
masak mscha: $0 and pals get capture groups, so you need to capture
tadzik masak: I managed to change the colour pallete to adjust your blue to my liking \o/
masak mscha: it does work, when you do it like I did
mscha: ovserve it work, above! :D
mscha Ah, thanks. 09:37
masak observe*
09:39 tmetro left 09:52 mscha left 09:57 tobs` joined, p6bannerbot sets mode: +v tobs`
lizmat PSA: slowly getting back but still very tired: won't have much time online the coming days most likely, so next week's P6W will be a double one 10:24
10:28 rindolf left 10:34 Ven`` left 10:36 coet joined, p6bannerbot sets mode: +v coet
Geth advent: duffee++ created pull request #9:
claiming Dec 9
10:36
advent: e434e4e108 | (Boyd Duffee)++ (committed using GitHub Web editor) | perl6advent-2018/schedule
claiming Dec 9

grabbing the last slot - Dec 9
10:38
advent: 4b11de489e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | perl6advent-2018/schedule
Merge pull request #9 from duffee/master

claiming Dec 9 It was released just today... I don't know if you know the ropes, but first and foremost, create an account in Wordpress.com and/or send it to me via email.
10:41 Ven`` joined 10:42 p6bannerbot sets mode: +v Ven`` 10:46 kensanata joined, p6bannerbot sets mode: +v kensanata 10:48 Ven`` left
masak lizmat: rest well! 10:50
lizmat well, no rest for the wicker, I still need to write an advent post :-) 10:51
*wicked
10:55 graphene left 10:57 Ven`` joined, graphene joined, p6bannerbot sets mode: +v Ven``, p6bannerbot sets mode: +v graphene 11:00 gregf_ joined, p6bannerbot sets mode: +v gregf_ 11:09 domidumont left 11:12 rindolf joined 11:13 p6bannerbot sets mode: +v rindolf 11:17 lucasb joined, p6bannerbot sets mode: +v lucasb
lucasb yeah, I beat clarkema today! but he's still on the lead :) 11:24
11:26 lizmat left 11:29 lizmat joined, p6bannerbot sets mode: +v lizmat 11:32 lichtkind left 11:42 tmtvl joined 11:43 p6bannerbot sets mode: +v tmtvl 11:44 lichtkind joined 11:45 p6bannerbot sets mode: +v lichtkind 11:51 Voldenet joined, Voldenet left, Voldenet joined, p6bannerbot sets mode: +v Voldenet 11:52 p6bannerbot sets mode: +v Voldenet 11:53 chienjo joined 11:54 p6bannerbot sets mode: +v chienjo 11:58 abraxxa1 joined 11:59 p6bannerbot sets mode: +v abraxxa1, abraxxa left 12:11 abraxxa1 left, abraxxa joined 12:12 p6bannerbot sets mode: +v abraxxa 12:16 abraxxa left, dotdotdot left 12:20 matze_ joined, p6bannerbot sets mode: +v matze_
matze_ hi there, I would like to do DNS checks on list of domain names .. is there a way I could do that parallel? 12:21
i read about promises but I dont dig it 12:22
p6: say "hello" 12:23
camelia hello
jnthn Have you got it working serially already?
matze_ i used Net::DNS and created a simple loop 12:24
jnthn If it's a `for` loop, you could parallelize the loop, just make sure that the loop doesn't mutate anything inside of it 12:25
matze_ i have a for loop for reading the list of domainnames
i already did it in perl5 by using parallel::ForkManager.. and i would like to port it to p6 12:26
jnthn Depending how your loop looks it could be as simple as `my @results = race for $fh.lines -> $domain { }`
12:27 clarkema joined
jnthn (Without seeing the code structure you have, it's hard to be more precise) 12:27
12:27 p6bannerbot sets mode: +v clarkema
matze_ looks like: for 'start.csv'.IO.lines -> $line { my ($dom) = $line.split(/ \; /); ..doTheLookUp..} 12:28
jnthn That's fine, but what do you do with the result of the lookup? 12:32
Provided that step is safe, you can use `race` as I suggested, and optionally configure the degree of parallelism and batch size 12:33
docs.perl6.org/routine/race for more info
matze_ i just could return the domainname ~ ip4 address 12:34
i just need to know whether the domain has an ip or not
12:35 Ven`` left
jnthn Yeah, if the loop evaluates to that then `my @results = race for 'start.csv'.IO.lines -> $line { my ($dom) = $line.split(';'); $dom ~ ' ' ~ doTheLookup($dom) }` or similar 12:35
And you can after .lines write `.race(:10degree, :1batch)` to parallelize every lookup and do 10 at a time, for example 12:36
matze_ i am trying :)
jnthn The default is a batch size of 64 and degree based on CPU cores, but you're not CPU bound so it probably makes sense to configure sensible values
clarkema Trying to get through today's AoC part two with an inefficient algorithm + brute force horsepower. Rakudo is currently using 78G of RAM and rising steadily :(
jnthn Gotta get on a ferry...back in an hour 12:37
matze_ yeah, works 12:38
thanks alot :) 12:39
12:43 Frishkorn joined, p6bannerbot sets mode: +v Frishkorn
matze_ mhm..when i use race in this way how can i add a batch size? 12:44
i need i use the object syntax in this case? 12:45
12:47 Frishkorn left 12:49 Ven`` joined 12:50 p6bannerbot sets mode: +v Ven`` 12:57 yqt joined 12:58 p6bannerbot sets mode: +v yqt 13:03 abraxxa joined 13:04 p6bannerbot sets mode: +v abraxxa
chienjo m: my $a = "test-1.txt"; say $a++ for ^3; 13:09
camelia test-1.txt
test-2.txt
test-3.txt
chienjo m: my $a = "test-1-foo.txt"; say $a++ for ^3; 13:10
camelia test-1-foo.txt
test-1-fop.txt
test-1-foq.txt
13:12 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 13:13 chienjo left 13:16 gregf_ left
timotimo clarkema: may i see the code? maybe i can see an opportunity for improvement :) 13:17
though my machine doesn't have enough ram for that
13:21 zebralan joined, p6bannerbot sets mode: +v zebralan 13:24 zebralan left
clarkema timotimo: I've brought it down to reasonable levels now, thanks ;) I suspect there's a leak somewhere to do with regex handling though, because there's no way it should have been chewing through that much RAM. It got to 110G before finishing 13:28
13:28 Ven`` left
clarkema I might try and isolate it into a test case later on 13:28
timotimo that would be cool 13:29
MasterDuke clarkema: i believe there are some old, open tickets about some regex stuff leaking, but new confirmation/test cases would be good 13:33
AlexDaniel interesting, I see people liking my advent post from 2016 13:34
tobs` about memory leaks, this script currently uses 355G and has written a 4G file. github.com/taboege/p6-costas/blob/.../costas.p6 13:35
Maybe there is some caching going on somewhere, but I thought I wrote it in a "pipeline" fashion, not storing more than I needed to print the next line of output 13:36
13:38 jmerelo joined
AlexDaniel also, how do I like a post on wordpress? 13:38
tobs` (the memory usage has been steadily crawling up, at the rate of roughly 100× output file size) 13:39
timotimo it could be that it caches the result of permutation-axioms and costas-axioms, but i don't think it should
AlexDaniel: just be logged in, then there's a like button at the end of each post on the post page
13:39 p6bannerbot sets mode: +v jmerelo
timotimo probably not on the list-of-posts page 13:39
AlexDaniel oooooooooooooh I have to turn off µBlock to see it…
jmerelo AlexDaniel: I hope you _really_ like it.
timotimo haha
AlexDaniel yeah I love it :) 13:40
tobs`: sorry, 355G of RAM? Where did you get that machine? 13:41
tobs` AlexDaniel: it's a computation server of the university 13:43
AlexDaniel oh, okay
lucasb that Costas code looks interesting, unfortunately there's lots of unicode char boxes in my screen :) 13:46
circumfix:<⸨ ⸩> 13:47
timotimo tobs`: if the values of $.i and $.j don't exceed 2 ** 32, you can use "has int32 $.i; has int32 $.j" to make the Literal instances just a little smaller
jnthn matze_: Actually you need both, but yes, you'd specify degree and batch with the object syntax. If you only want the word "race" in the code once, replace `for` with a `map` 13:48
timotimo the lookup of dynamic variables is often slower than that of lexicals, maybe you can gain a little bit of speed by caching $*N in every sub that gets called
13:54 Ven`` joined
tobs` timotimo: I'll try those 13:54
13:55 p6bannerbot sets mode: +v Ven``
tobs` and a different question: I'm calling an external program P and want to wrap input to it and output from it at the same time in a composable way, think of bare "P" turns into "serialize => P => deserialize" and possibly multiple steps. 13:56
timotimo oh, how much time is actually spent for permutation-axioms and costas-axioms themselves? 13:57
tobs` Transforming the output is easy enough with map, but is there a dual on the input end?
timotimo are they worth improving at all?
they could be very fast
yes, supplies are probably what you want!
probably barely anything in permutation-axioms and most time in costas-axioms? 13:58
tobs` timotimo: yes, that whole program could have been written in C without adding much more lines. (Maybe that makes it an interesting target for benchmarking abstractions, or maybe not?)
timotimo: I have never profiled it to be honest, let's see 13:59
13:59 Manifest0 left
timotimo profiling something that runs for so many hours and goes up to multiple hundred gigs ... :D 14:00
14:01 matze_ left
tobs` I would use a smaller $*N of course, but yeah permutation-axioms is negligible I dare say 14:02
(permutations need $*N**2 and costas on the order of $*N**6 iterations) 14:03
or something like that
timotimo i removed |costas-axioms from the loop at the bottom and it finished in 18.5 seconds 14:04
tobs` I'm still hung up on the supply/map question though. When transforming stuff that goes into the program P, I have a consumer, P, but I don't have a producer yet to which I could apply map. 14:06
timotimo oh, by input you mean stuff your program writes into that program?
14:06 Manifest0 joined
tobs` exactly, I think I could maintain a pair (Supplier, Supply) and 14:06
14:07 p6bannerbot sets mode: +v Manifest0
timotimo right, you'd probably offer a little function that a user can call with their own supplier and your code would tap it with your "pipeline" and the output of the pipeline would go into the program 14:07
tobs` when I want to wrap another serialize/deserialize layer around that, I create a new supplier which emits into the old supplier and applies the serializable in the middle. That would be the same as a `map: deserialize` on the output, I think 14:08
and by "the same", I mean "the dual"
timotimo alternative could always be to offer a Channel that can be written into, that makes the API different and maybe more natural
but you can still tap the .Supply of a channel and use the transformation methods of that 14:09
jmerelo Just created the nqp tag in StackOverflow stackoverflow.com/questions/tagged/nqp 14:12
Anyone wants to fill it in (and have the privs to do so), please do it. 14:13
tobs` Alright, that should help me progress, thanks
14:18 clarkema left, clarkema joined 14:19 p6bannerbot sets mode: +v clarkema
tobs` It seems like in my test run, 33% of time is spent in the ⸨ ⸩ operators. It's tragic that they look so nice but can/should be replaced by simple arithmetic on native ints. 14:20
timotimo that sub only spends 5% inside of itself, though, all the other stuff it does is in stuff below it 14:21
tobs` what it does is create a Literal object and that entire object is just wrapping the conversion of a point ($x,$y) to a unique index $*N*$x+$y 14:23
timotimo oh, huh.
about 60% of the time is spent in the slow path binder for some reason 14:24
tobs` (maybe with a minus in front). You know I was tempted to make the code look like it does on paper :-)
MasterDuke it uses a where clause in the signature
timotimo oh, yes 14:25
that's it
14:25 jmerelo left
tobs` which can be dropped without affecting the calling code actually, since it never passes any .elems ≠ 2 14:26
[Coke] (moarvm test payload) wonder if it would be worth generating a bytecode file that just printed "hello world" to stdout as part of the build for very minimal testing.
lizmat finished her advent post for the 7th and is now tired and afk& 14:27
timotimo lizmat: would it be okay in case i don't make it til midnight to post yours instead of mine and give me another day?
lizmat sure.... just need to change the title a bit :-) 14:28
timotimo tobs`: without the where clause, it takes 27 seconds on my machine for $*N = 9, and with it it takes 36 seconds
TYVM, i-ll still try to work hard
tobs`: making negated an int8 and $.i and $.j int32 doesn't make it much faster, but it does reduce memory consumption somewhat 14:30
m: say 428968 / 358412 14:31
camelia 1.196857
timotimo just below 20%
m: say 428968 R/ 358412
camelia 0.8355215
tobs` but what I was trying to do with the where clause should be deducible statically somehow. Maybe not if I make the ⸨ ⸩ a circumfix though...
timotimo hm, not completely
you can make it an infix, then it'll work
it'll look funny, though 14:32
Geth doc: 13cbf906ee | Coke++ | xt/braces.t
allow mention of unicode's lenticular brackets
14:34
tobs` I can use an umbrella ⥾ :-)
u: ⥾
unicodable6 tobs`, U+297E UP FISH TAIL [Sm] (⥾)
timotimo oh, yeah, that's faster 14:35
and smaller
m: say 253736 / 358412
camelia 0.707945
moritz
timotimo m: say 15 / 27.5
camelia 0.545455
timotimo gist.github.com/timo/65e97581e1e5b...2e029f37c4 14:36
moritz unicodable6: umbrella
unicodable6 moritz, U+2602 UMBRELLA [So] (☂)
moritz, U+2614 UMBRELLA WITH RAIN DROPS [So] (☔)
timotimo i transformed it into an infix, but kept the look. needed parenthesis in a few places
unicodable6 moritz, 5 characters in total (☂☔⛱🌂🏖): gist.github.com/064a31b64f4fcbe8ab...90ac64a985
timotimo oh
the one with rain drops could be the negated one
Geth doc: finanalyst++ created pull request #2496:
formating codes in pod
14:37
timotimo another small win from .map(*.Str) instead of >>.Str 14:42
tobs` I get 9 seconds for N=8 on my laptop using the umbrella operators 14:44
timotimo i can get it to 140% cpu usage by hypering the stringification and joining
but i didn't use atomic ops for the ++, oops :)
OK, so 14:47
m: say 8.75 / 35.8
camelia 0.244413
timotimo m: 333448 / 477100
camelia WARNINGS for <tmp>:
Useless use of "/" in expression "333448 / 477100" in sink context (line 1)
timotimo m: say 333448 / 477100
camelia 0.6989059
Geth doc/master: 4 commits pushed by Coke++
timotimo wallclock run time reduced to 25%, memory usage reduced to 68%
sha256sum of the output files matches still 14:48
Geth advent: tbrowder++ created pull request #10:
add schedule for 2019; take first slot
14:49
tobs` and can native integers be used throughout? It doesn't seem to like sub MAIN (int32 $*N, Str $outfile) 14:51
14:52 MasterDuke left
tobs` in fact $*N will be the largest number occuring, so even int8 would be fine for all relevant inputs 14:52
although memory usage is probably fine anyway as soon as it doesn't leak 14:53
timotimo oh yikes 14:55
Lexical with name '$i' has a different type in this frame
lucasb hehe tbrowder++ is in a hurry :) 14:56
14:57 jaush left
tbrowder hee hee, at my age you better write a note before you forget! 14:57
had a brainstorm from a topic at my linux group meeting monday 14:58
timotimo ah, neat. 15:02
tobs`: you can use native ints in costas-axioms, but you have to "for flat ..." and then "-> int8 $x, int8 $y" for the loops
it is in fact faster, it also takes less memory still
it seems to be rather variable now, but i get it to 6.4 with 312372 now 15:03
and adding a multi candidate for the infix operator that takes native ints is now also possible 15:05
i'm still not sure why it'd grow in memory usage with increasingly big $*N 15:06
Xliff *sigh* 15:08
Figures. I'd start doing this and then dependencies would crop up. 15:09
Xliff starts working on Pango bindings.
tobs` oh shoot, I have to run now. Thanks timotimo for all the help and moritz for the operators :-) 15:11
(maybe it's also good if you can work on your article in peace) 15:12
15:12 curan left, tobs` left
tbrowder AlexDaniel: any objections to an advent merge? 15:26
15:26 abraxxa1 joined, abraxxa left 15:27 p6bannerbot sets mode: +v abraxxa1
AlexDaniel tbrowder: honestly I see no point :D 15:28
15:28 Actualeyes joined
AlexDaniel tbrowder: do we really need to plan ahead that much? 15:28
I don't mind it though, merge if you want
tbrowder well, does it hurt? it would make JJ happy!
15:28 p6bannerbot sets mode: +v Actualeyes
tbrowder ok 15:29
Geth advent: 4ffabc4a56 | (Tom Browder)++ | archives/perl6advent-2019/schedule
add schedule for 2019; take first slot
advent: 2338b76560 | (Tom Browder)++ (committed using GitHub Web editor) | archives/perl6advent-2019/schedule
Merge pull request #10 from tbrowder/master

add schedule for 2019; take first slot
15:56 Ven`` left 16:00 robertle_ left 16:13 graphene left 16:15 graphene joined 16:16 p6bannerbot sets mode: +v graphene 16:24 jmerelo joined
Kaiepi just applied for a grant! 16:25
16:25 p6bannerbot sets mode: +v jmerelo
jmerelo Kaiepi: good luck! Can you post the link? 16:27
Kaiepi idk where to find the link, i just sent the email a minute ago 16:28
16:30 kensanata left
jmerelo Kaiepi: it will be published in the Perl Foundation, and people will be able to comment on it. 16:31
16:38 ryn1x left 16:40 domidumont joined 16:41 p6bannerbot sets mode: +v domidumont 16:44 sena_kun joined 16:45 p6bannerbot sets mode: +v sena_kun 16:52 nemo joined, p6bannerbot sets mode: +v nemo
nemo huh.. I was wondering why my package management was failing 16:52
Perl v5.20.1 required--this is only v5.18.2, stopped at /usr/share/perl6/rakudo-helper.pl line 14.
apparently someone updated rakudo to 2018.10 but did not update perl 16:53
in ubuntu 14.04
just mentioning in case anyone else encounters it
ppa.launchpad.net/jonathonf/perl6/ubuntu
16:54 pmurias joined, p6bannerbot sets mode: +v pmurias 16:55 pmurias left 16:57 pmurias joined, p6bannerbot sets mode: +v pmurias
pmurias masak: re tennent's correspondence principle isn't that something else (according to the definitions found on google) 16:59
yoleaux 4 Dec 2018 23:20Z <SmokeMachine> pmurias: I splitted the modules into different files and started to write some tests...
jmerelo .tell El_Che look at th elines above for a bug report on the version of Perl needed in Ubuntu 14.04 packages.
yoleaux jmerelo: I'll pass your message to El_Che.
17:00 clsn joined
pmurias masak: also the example is super misleading, you can replace variable by parameter binding but you need self recoursion not calling an anonymous closures 17:00
17:00 p6bannerbot sets mode: +v clsn
pmurias masak: gafter.blogspot.com/2006/08/tennent...e-and.html - this doesn't apply to Perl 6 anyway 17:01
clsn Is it a known bug (in Rakudo) that 5³⁺⁴ returns 244140625 (i.e. 5**12) instead of 78125 (5**7)? I didn't see it searching the bugs tracker, but may have missed it. 17:02
pmurias masak: the transformation you have in the block post (using an IIFE) emulates let style one time assignment
masak: but how can you write to a variable a second time? 17:03
17:10 clarkema left 17:12 kou25 joined, p6bannerbot sets mode: +v kou25
buggable New CPAN upload: Math-FFT-Libfftw3-0.1.2.tar.gz by FRITH modules.perl6.org/dist/Math::FFT::L...cpan:FRITH 17:13
17:17 kou25 left 17:20 scimon left 17:31 clarkema joined 17:32 p6bannerbot sets mode: +v clarkema 17:36 lucasb left 17:37 gregf_ joined, p6bannerbot sets mode: +v gregf_, dakkar left 17:40 ryn1x joined 17:41 p6bannerbot sets mode: +v ryn1x, ufobat joined 17:42 p6bannerbot sets mode: +v ufobat 17:50 ferreira1 joined 17:51 p6bannerbot sets mode: +v ferreira1, Peter_R left 17:52 Peter_R joined, p6bannerbot sets mode: +v Peter_R, ferreira left, joy_ left 17:53 iviv joined, p6bannerbot sets mode: +v iviv, joy_ joined, p6bannerbot sets mode: +v joy_ 17:58 coet left, ryn1x left 18:02 jmerelo left 18:04 lucasb joined, p6bannerbot sets mode: +v lucasb 18:10 ryn1x joined, p6bannerbot sets mode: +v ryn1x
Geth ecosystem: 3cf7c7f5f0 | (Martin Barth)++ (committed using GitHub Web editor) | META.list
Added StrictClass

Added StrictClass behaves a bit MooseX::StrictConstructor
18:12
18:13 ryn1x left, ryn1x_ joined 18:14 p6bannerbot sets mode: +v ryn1x_
clsn p6: say 5³⁺⁴; 18:18
camelia 244140625
clsn p6: say 5**7
camelia 78125
18:23 ryn1x_ left 18:24 ferreira joined, sauvin left 18:25 ferreira1 left, p6bannerbot sets mode: +v ferreira 18:26 ufobat left 18:29 yqt left
lucasb how can we call this... "exponent arithmetics"? Well, I'm not sure the syntax is supposed to work 18:30
should be just plain digits... no operations 18:31
m: say 5³\⁴; 18:33
camelia 244140625
lucasb is it multipliying 3*4? strange :) 18:34
18:36 pmurias left, MasterDuke joined 18:37 Cabanossi joined, p6bannerbot sets mode: +v MasterDuke
MasterDuke committable6: releases say 5³\4 18:37
18:37 p6bannerbot sets mode: +v Cabanossi
committable6 MasterDuke, ¦releases (35 commits): «04===SORRY!04=== Error while compiling /tmp/iVk8QtV8Si␤Confused␤at /tmp/iVk8QtV8Si:1␤------> 03say 5³\08⏏044␤ expecting any of:␤ postfix␤ «exit code = 1»» 18:38
MasterDuke committable6: releases say 5³⁺⁴
committable6 MasterDuke, ¦releases (35 commits): «244140625␤»
18:38 Cabanoss- left
lucasb token postfix:sym<ⁿ> { <sign=[⁻⁺¯]>? <dig=[⁰¹²³⁴⁵⁶⁷⁸⁹]>+ } 18:39
ah, I think it's ok 18:41
5³⁺⁴ really means (5³)⁺⁴
18:42 pmurias joined, p6bannerbot sets mode: +v pmurias
lucasb or, in ASCII (5 ** 3) ** 4 :) 18:43
clsn That makes sense... except that the web site seemed to be different. sec. 18:45
docs.perl6.org/language/unicode_ascii implies that ⁺ "can be used" in exponentiation, in which case I would expect it to work in the more obvious way. 18:46
But it really means only as a unary. maybe that's what "must use explicit number" refers to?
18:47 zakharyas left
lucasb indeed, it's confusing :) 18:47
clsn And I don't see how the ASCII version "|" is even relevant. This is more a documentation issue.
lucasb should have just said that ⁻ ⁺ can be used as unary operators in exponents, yeah, like you said
clsn I guess the web page needs to be updated. That's why I wanted to ask here before submitting a bug report on the compiler. 18:48
lucasb that "|" looks stray 18:49
clsn Agreed.
lucasb clsn: feels like editing that doc page? :)
clsn Like it was from some earlier format that was drawing the table with | characters or something. 18:50
Eh, for something so simple, sure I'll do it. How do I get/have access to it? Is the website on a github repo or something that I'd do a pull-request? It's been forever since I worked on perl6.
18:51 MasterDuke left
lucasb github.com/perl6/doc/blob/master/d...ascii.pod6 18:51
the html tables... they don't preserve the source order, they get JS-sorted on the browser
the lines: github.com/perl6/doc/blob/master/d...d6#L79-L81 18:52
turned-off js temporarily :) 18:53
clsn yep, I see 'em. I'll check it out tonight, meeting coming up.
lucasb the "+" gets turned into "|" in the html conversion... Pod 6 syntax glitch?
clsn I wondered about that.
18:57 pecastro joined 18:58 p6bannerbot sets mode: +v pecastro
lucasb doc writers: that automatic js-sorting isn't always good, wouldn't you agree? sorting static text should be made as a commit to the sources to rearrange lines :) 18:58
see this hack here? github.com/perl6/doc/blob/master/a....js#L9-L18 18:59
clsn off to meeting, will work on remembering to do the fix tonight,
lucasb clsn: o/
IIRC it may have been me who asked zoffix to not sort operators table precedence, because I was staring for it for too long wondering how come P6 precedence was so mixed up! 19:01
19:05 ryn1x_ joined
lucasb in that JS, the text=='A' and text=='Level' is supposed to match the HTML table headers in docs.perl6.org/language/operators#...precedence 19:06
19:06 p6bannerbot sets mode: +v ryn1x_
SmokeMachine pmurias: Ive added some tests and a new poorly tested feature, attributes binded that means that it auto render when it is setted... I hope it would not caouse any problem... 19:25
*cause 19:28
19:29 rindolf left
masak pmurias: re "how can you write to a variable a second time?" -- good question. 19:35
pmurias: I had a different thing that I was thinking about: how can you make sure control flow works exactly the same one layer down? at least (the unimplemented) `leave` will work differently inside that pointy block. 19:36
pmurias: re the Gafter blog post -- my point wasn't that it applied to Perl 6, it's at that point the principle had already taken on its own life, quite distinct from what it meant when it was founded 19:37
it seems that the principle mostly says "variable declarations and parameter declarations should be equally powerful"
19:39 ryn1x_ left 19:47 ryn1x_ joined 19:48 p6bannerbot sets mode: +v ryn1x_ 19:50 leont left
pmurias masak: it's a super common pattern in Erlang where you implement variables assignment all the time by doing a self-recursive tail call 19:56
19:57 ryn1x_ left 19:58 patrickb joined 19:59 p6bannerbot sets mode: +v patrickb 20:00 domidumont left
SmokeMachine pmurias: is there a example to that? (Im just curious... I dont speak Erlang...) 20:00
mornfall if a sub passed to Supply.throttle dies... nothing happens? 20:01
20:01 Guest29795 joined
clarkema SmokeMachine: there kinda isn't any persistent storage 'slots' like package variables or objects etc 20:01
You just have a function that keeps calling itself, passing the state in as another argument
20:02 p6bannerbot sets mode: +v Guest29795
pmurias SmokeMachine: gist.github.com/pmurias/b80128944e...170ed93961 # look at how loop is called 20:03
SmokeMachine hum...
pmurias SmokeMachine: I haven't written any erlang since uni it's a super uncool tedious language
SmokeMachine clarkema, pmurias: thanks! 20:04
clarkema pmurias: try Elixir! All of the amazing goodness of the Erlang VM, but with a nicer language on top
SmokeMachine pmurias: what do you think about elixir?
pmurias SmokeMachine: haven't used it
SmokeMachine clarkema: That's what I heard about it...
clarkema I'm a big fan 20:05
and Phoenix is _amazing_
pmurias but it looks like it replaced the Prolog heritage with a Ruby one ;)
clarkema pmurias: it pretty much did
SmokeMachine pmurias: did my changes do any problem to your work?
20:05 Guest29795 left
SmokeMachine there are a lot of brazilians very proud about elixir and lua... 20:07
[Coke] imagines it wouldn't be hard to create a role for variables that enforced the set-once contract. 20:08
masak SmokeMachine: Lua seems totally magical. not so much the language, but the VM, oh wow. 20:09
pmurias SmokeMachine: doesn't the VM seem so magical due to how none magical the language is 20:10
meant masak:
masak almost certainly not :) 20:11
SmokeMachine masak: lua is something that Id like to study a little...
masak I mean, the language certainly enables the VM being nice and being able to optimize (and JIT) things well
SmokeMachine but it sounds strange to me a language called "moon" (lua in portuguese)
clarkema I'm actually working through a Lua book atm -- mainly for AwesomeWM 20:12
lucasb Programming in Lua 4th ed? :)
SmokeMachine but I think I got a lot more interest on lua when I heard about fanlang 20:13
clarkema lucasb: yup
lucasb SmokeMachine: fanlang? could not find 20:14
have you seen MoonScript?
CoffeeScript syntax compiled to lua :)
SmokeMachine lucasb: github.com/agentzh/perl-parsing-li...-benchmark
lucasb: twitter.com/agentzh/status/8269228...28?lang=en 20:15
lucasb ah, thanks!
SmokeMachine does anyone know any news about fanlang?
lucasb they are the first results in search... I unconsciously skipped
pmurias SmokeMachine: from talking on #perl6 with a guy who used to work on it, fanlang got to the point where it's good enough for what they want from it 20:17
SmokeMachine twitter.com/agentzh/status/845882525587202050
[Coke] wonder if we have an update to twitter.com/agentzh/status/8269228...8?lang=en, it's been almost 2 years.
(from our end)
SmokeMachine Ill ask him on twitter 20:18
twitter.com/smokemachine/status/10...0372480007 20:20
:( my english is terrible... :(
pmurias SmokeMachine: s/how is/what is/ 20:21
SmokeMachine thanks!
lucasb: no, I havent... 20:25
lucasb is "--target=mbc" supposed to work? fails here 20:29
Cannot dump this object; no dump method 20:30
Kaiepi m: my IO::Socket::INET $c .= new: :!listen, :localhost<localhost>, :0localport; $c.close 20:31
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
Kaiepi evalable6, help 20:32
evalable6 Kaiepi, Like this: evalable6: say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Evalable
Kaiepi evalable6: my IO::Socket::INET $c .= new: :!listen, :localhost<localhost>, :0localport; $c.close
evalable6 (exit code 1) Earlier failure:
Nothing given for new socket to connect or bind to. Invali…
Kaiepi, Full output: gist.github.com/9bbf830b1ad9fd750e...fa3cfa9981
Kaiepi i could've sworn this used to work
AlexDaniel 6c: my IO::Socket::INET $c .= new: :!listen, :localhost<localhost>, :0localport; $c.close 20:33
committable6 AlexDaniel, gist.github.com/c9a6ea8f0a5f71d85d...1212793739
Kaiepi oh wait 20:34
evalable6: my IO::Socket::INET $c .= new: :!listen, :host<localhost>, :0port; $c.close
evalable6 (exit code 1) Could not connect socket: Connection refused
in block <unit> at /tmp/GkaJ1daxnA line 1
Kaiepi forgot you need to use host/port instead of localhost/localport for clients
pmurias SmokeMachine: I have to make release a working updated rakudo.js on npm (and I should likely make the process less annoying/error prone) and you see yourself 20:38
Kaiepi so this is my grant proposal hastebin.com/bajalihamu.sql 20:57
what do you guys think?
20:57 ufobat joined 20:58 p6bannerbot sets mode: +v ufobat
moritz reads 20:59
the Deliverables section sounds pretty vague
I like the proposal, but it might benefit from some overall narrative 21:01
why are you planning to implement those features?
is there a certain goal behind it? (feature parity with $something, or being able to do $something)? 21:02
mornfall what are my options for an http client other than HTTP::UserAgent and WWW (which is based on the former)?
robertle when reading this I wonder how easy it is to achieve this without breaking portability
mornfall i would rather like to be able to POST text/plain, but that doesn't seem to be possible with those two
hmm or is it
Kaiepi which parts would easily break portability? 21:03
moritz mornfall: take a look at cro.services/docs/intro/http-client
Kaiepi some of my goals for this are to be able to use SO_OOBINLINE for my telnet library, to allow SO_REUSEADDR to be used with async sockets, and to make it possible to write an icmp library purely in perl 6 21:04
SmokeMachine Kaiepi: are you implementing IO::Socket::UNIX? that would be great
robertle well, not sure but "native-descriptos" and "getsockopt/setsockopt" sound like very platform-specific stuff. I may well be wrong, just saying that other readers might wonder the same and that this might be worth addressing
Kaiepi i haven't thought about it
SmokeMachine Kaiepi: that does not exists on perl6 (I think) 21:05
Kaiepi getsockopt/setsockopt gets the SO_* constants similar to how the signals' constants are fetched
moritz Kaiepi: maybe include that as a motivation in the grant request
mornfall never mind i missed add-content in HTTP::Request
SmokeMachine but I mean some way to use unix sockets...
mornfall though i'll have a look at Cro
21:05 patrickz joined
clsn Is there a current reference on what the performance speed of rakudo is like these days, compared to previous and to say perl5? 21:05
21:06 p6bannerbot sets mode: +v patrickz
SmokeMachine Kaiepi: metacpan.org/pod/distribution/perl...et/UNIX.pm 21:07
Kaiepi: (this is perl5)
Kaiepi i think i'll add IO::Socket::UNIX to the list of things to implement 21:08
moritz clsn: not really. Performance depends very much on what you're doing, and can be all over the place 21:09
21:09 patrickb left
timotimo clsn!! 21:09
we've been getting more and more microbenchmarks and minibenchmarks where we outperform perl5 21:10
and our parallel computing stuff is rather good, as well as asynchronous stuff
SmokeMachine Kaiepi: \o/ 21:11
timotimo Kaiepi: news.perlfoundation.org/2017/09/gra...l-6-p.html - my grant proposal from >1 year ago, it went well, so maybe it's a good one to steal from
clsn: 6guts.wordpress.com/2018/10/06/spe...-creation/ - latest "we sped up something a bunch" post on jn's blog 21:13
lucasb those Text::CSV performance numbers... does Tux keeps them somewhere? 21:16
21:17 mcmillhj joined, AlexDaniel left, AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel, Skarsnik joined 21:18 p6bannerbot sets mode: +v mcmillhj, p6bannerbot sets mode: +v Skarsnik
timotimo of course 21:18
tux.nl/Talks/CSV6/speed4.html
lucasb ah, nice timotimo! 21:19
Skarsnik Hello
yoleaux 4 Dec 2018 20:32Z <hankache> Skarsnik: regarding colabti.org/irclogger/irclogger_lo...12-03#l928 feel free to take my spot on the 9th. Kindly submit a PR to perl6/advent.
timotimo buggable: speed 60 :4
buggable timotimo, Try larger period. Could not calculate using period 60: Cannot convert NaN to Int:
clsn timotimo: Heh. hey there. 21:20
timotimo buggable: speed 30 :4
wait. larger?
buggable timotimo, Try larger period. Could not calculate using period 30: Cannot convert NaN to Int:
timotimo buggable: speed 90 :4 21:21
buggable timotimo, Try larger period. Could not calculate using period 90: Cannot convert NaN to Int:
lucasb it's NoNpossible!
timotimo buggable: speed 120 :4 21:22
buggable timotimo, Try larger period. Could not calculate using period 120: Cannot convert NaN to Int:
timotimo i don't know what's wrong with that
Skarsnik buggable: speed 30 4 21:23
buggable Skarsnik, Try larger period. Could not calculate using period 30: Index out of range. Is: -1, should be in 0..^Inf
timotimo shruuuuuuug 21:24
SmokeMachine what's the average of $/hour on grant proposals? 21:26
timotimo proposed or actually? 21:27
pmurias SmokeMachine: the actuall one depends on how according to plan your grant proposal goes
[Coke] SmokeMachine: that data isn't tracked, but you can look at approved grants on the site. 21:31
GC takes into account many factors when approving/funding, including community impact, estimated time, skill of person applying, difficulty of task, etc. 21:33
Skarsnik buggable, help 21:34
buggable Skarsnik, tags | tag SOMETAG | eco | eco Some search term | author github username | speed | testers CPANTesters report ID
Skarsnik buggable: speed 30:4
buggable Skarsnik, Try larger period. Could not calculate using period 30: Cannot convert NaN to Int:
SmokeMachine my real question is: does the people on a grant do that full time? or do they continue on the day job and do the grant on the free time?
usualy 21:35
im just curious...
mornfall *sigh* well i know why i missed add-content now... it's missing from p6doc HTTP::Request :( 21:36
SmokeMachine I was thinking to propose a grant to write Red... but if it was accepted I would lose almost avery time I use to play with my kids... so I thoght I could quit my job to do that... but Ill have to find another job when Red become done... 21:39
so I was thinking how other people do that...
mcmillhj is it possible to use the >>. hyper operator on multiple functions? Like if I wanted to say `[("ayitmcjvlhedbsyoqfzukjpxwt", "agirmcjvlheybsyogfzuknpxxt")]>>.comb.Bag` 21:40
sena_kun SmokeMachine, some people are single or don't have kids.
timotimo mcmillhj: not sure how you mean, but you can totally >>.comb>>.Bag 21:41
SmokeMachine sena_kun: that makes sense... :)
timotimo some people live in their parent's basement, figuratively or literally 21:42
21:42 graphene left
SmokeMachine timotimo: :) 21:43
timotimo in your case, you have people living in your basement, figuratively
so maybe they should work on Red for a TPF grant :) 21:44
Skarsnik lol
21:44 graphene joined
SmokeMachine timotimo: the biggest one is almost there!!! :) she is 6 and is learning how to code... :) 21:44
21:45 p6bannerbot sets mode: +v graphene
timotimo neat 21:45
Skarsnik lul
SmokeMachine would it be interesting to TPF a grant to write Red? 21:47
Skarsnik What is Red? 21:49
mcmillhj timotimo: thanks, that was exactly what I needed
SmokeMachine Skarsnik: github.com/FCO/Red 21:51
Skarsnik I started something like that, it use the .WHY of attributes thou 21:53
21:54 vrurg left, patrickz left
Skarsnik gist.github.com/Skarsnik/ea16c3d9b305bed0f536 21:55
21:57 tmtvl left 21:59 ryn1x_ joined, p6bannerbot sets mode: +v ryn1x_ 22:01 kensanata joined, p6bannerbot sets mode: +v kensanata 22:04 graphene left 22:05 graphene joined 22:06 clsn left, p6bannerbot sets mode: +v graphene 22:10 vrurg joined
mornfall *sigh* something is eating all errors in my .throttle :( 22:10
it's pretty hard to code that way
22:10 p6bannerbot sets mode: +v vrurg
timotimo coming in or going out? 22:11
mornfall i mean, even calling a nonexistent method will just quietly go on to the next item
timotimo m: Supply.from-list(^6).throttle: 3, { die "oh no" }; $t.wait; 22:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3-list(^6).throttle: 3, { die "oh no" }; 7⏏5$t.wait;
timotimo m: my $t = Supply.from-list(^6).throttle: 3, { die "oh no" }; $t.wait;
camelia (timeout)
mornfall m: Supply.from-list(1, 2).throttle( 1, { die "hello" } ).tap( { .say } );
camelia Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Broken)
Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncau…
mornfall ^^ i think this is my problem
SmokeMachine Skarsnik: that looks good... 22:13
timotimo ah, so it spits out a promise for each execution 22:14
and those promises are broken
which counts as having handled the error
mornfall yes :(
timotimo well, you can just tap it to see the explosions
mornfall but it's tapped all right (in a react block) 22:15
hm, i guess i need to .await in there
timotimo then you'll have to react to the promises you're getting
mornfall well i have whenever $test_supp {} ← i imagine that'd fail, but it doesn't 22:16
m: Supply.from-list(1, 2).throttle( 1, { die "hello" } ).tap( { .await } );
camelia ( no output )
mornfall nope, i'm doing something wrong
timotimo you're not reacting to the supply sending a Quit, i'd say? 22:17
SmokeMachine Skarsnik: has you seen this? github.com/FCO/Red/wiki/Case-When
timotimo m: react whenever Supply.from-list(1, 2).throttle(1, { die "hello" }) { .await }
camelia A react block:
in block <unit> at <tmp> line 1

Died because of the exception:
No such method 'await' for invocant of type 'Promise'
in block at <tmp> line 1
timotimo m: react whenever Supply.from-list(1, 2).throttle(1, { die "hello" }) { await $_ } 22:18
camelia A react block:
in block <unit> at <tmp> line 1

Died because of the exception:
An operation first awaited:
in block at <tmp> line 1

Died with the exception:
hello
in block at <tmp> line 1
22:18 mcmillhj left
timotimo if an exception happens in a tapped block, it'll just quit the supply that comes "out of that" 22:18
m: my $tap = Supply.from-list(1, 2).throttle(1, { die "hello" }).tap({ await $_ }); say $t.perl
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$t' is not declared
at <tmp>:1
------> 3{ die "hello" }).tap({ await $_ }); say 7⏏5$t.perl
timotimo m: my $tap = Supply.from-list(1, 2).throttle(1, { die "hello" }).tap({ await $_ }); say $tap.perl 22:19
camelia Tap.new
timotimo huh. for some reason there is no link from /type/Supply to /type/Tap
m: my $tap = Supply.from-list(1, 2).throttle(1, { die "hello" }).tap({ await $_ }, quit => -> $ex { say "the tap died with $ex.perl() }); say $tap.perl 22:20
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> 3p died with $ex.perl() }); say $tap.perl7⏏5<EOL>
expecting …
timotimo m: my $tap = Supply.from-list(1, 2).throttle(1, { die "hello" }).tap({ await $_ }, quit => -> $ex { say "the tap died with $ex.perl()" }); say $tap.perl
camelia Tap.new
mornfall well, .&await in the whenever $test_supp works, but i still have no idea why :\
timotimo m: my $tap = Supply.from-list(1, 2).throttle(1, { die "hello" }).tap({ await $_ }, quit => -> $ex { say "the tap died with $ex.perl()" }); say $tap.perl; sleep 5;
camelia Tap.new
timotimo that's more interesting now
oh, is that for when the supply that's tapped sends a Quit, rather than the tap itself
anyway, react/whenever is a lot less fiddly than tapping manually, for many reasons 22:21
and if you want to handle errors there, may i suggest map instead of tap? 22:22
mornfall i have a react block
i didn't realize that the react does something on top of tapping all the whenevers
timotimo i guess i'll have to see some code, then :) :)
react does all the subscription handling and lets you stay sane while handling errors and similar conditions 22:23
22:23 coet joined, p6bannerbot sets mode: +v coet
mornfall gimme 5 minutes 22:23
timotimo luckily, gimme is no longer a thing in perl6! :D 22:24
tobs was that a keyword once?
for eager? :)
timotimo it was a method involved in lazy lists 22:25
but then there was the Great List Refactor
which took away so much pain ...
mornfall sprunge.us/vTKS9t this version works (well, fails correctly, due to the .&await ... what i don't understand is why it doesn't fail without that) 22:26
timotimo m: say "hi".&await
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Can only specify Awaitable objects to await (got a Str)
in block <unit> at <tmp> line 1
timotimo heh 22:27
22:28 Manifest0 left
timotimo it doesn't look like you're stopping the react block when "stop" is called? 22:28
mornfall i'm not super fond of the $fail_supply... normally it's tapped to report_and_die which does an exit()
22:28 Manifest0 joined
mornfall well, stop sends a signal to $proc, and then $proc.start should trigger 22:28
which has done in it
timotimo to me, fail_supply comes completely out of nowhere :) 22:29
oh, it does have done!
22:29 p6bannerbot sets mode: +v Manifest0
mornfall sprunge.us/VwfTk1 is the $fail_supply plumbing 22:29
timotimo so you would expect the tests to use your error and report_and_die subs when something goes wrong? 22:31
mornfall just 'error', as long as autofail is True it should just die through the tap
but the die in error is not so good :| 22:32
timotimo i'm not sure why you have a fail_supply at all if you could just go with exceptions?
also, i'm not sure what throttle is good for when you have it set to 1 :D
mornfall timotimo: without the throttle, all tests try to run at once 22:33
which doesn't go so well :p
timotimo can you show me an example of that?
oh, maybe i understand what you mean
mornfall it just goes async( @cmd, ( &check1, &check2, &check3 ) )
timotimo it might be better to use a supply block that emits the checks in turn
rather than Supply.from-list 22:34
then, it'd only run when it's finally tapped by the react/whenever block
mornfall but they'll still all run at once, no?
timotimo react/whenever will only ever run one thing at a time
let me try it with a one-liner
m: my $ts = Supply.from-list([{ say "one"; sleep 0.5; say "one done" }, { say "two"; sleep 0.5; say "two done" }]).throttle(1, { .() }); 22:35
camelia ( no output )
timotimo m: my $ts = Supply.from-list([{ say "one"; sleep 0.5; say "one done" }, { say "two"; sleep 0.5; say "two done" }]).throttle(1, { .() }); react whenever $ts { .perl.say };
camelia one
one done
Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Kept)
two
two done
Promise.new(scheduler => ThreadPoolScheduler.new(initial_thread…
timotimo this is with throttle
m: my $ts = Supply.from-list([{ say "one"; sleep 0.5; say "one done" }, { say "two"; sleep 0.5; say "two done" }]).map({ .() }); react whenever $ts { .perl.say };
camelia one
one done
Bool::True
two
two done
Bool::True
timotimo this is without
that seems to work fine, though? 22:36
mornfall lemme comment out that throttle
for a change it doesn't do anything without the throttle... i'm confused 22:38
it just hits that Promise.in(10) 22:39
oh, you did a .map instead of .throttle
timotimo yes 22:40
mornfall what i did was whenever $test_supp { .() } 22:41
which runs everything at once
timotimo interesting! let me see
mornfall i think, anyway
timotimo m: my $ts = Supply.from-list([{ say "one"; sleep 0.5; say "one done" }, { say "two"; sleep 0.5; say "two done" }]); react whenever $ts { .() };
camelia one
one done
two
two done
mornfall :\ 22:42
timotimo :/
mornfall how many threads are available to camelia? 22:43
buggable New CPAN upload: HTML-Canvas-0.0.5.tar.gz by WARRINGD modules.perl6.org/dist/HTML::Canvas...n:WARRINGD
mornfall not that, it works okay when i paste your line into perl6
timotimo m: await for ^10 { start { sleep 1 } }; say now - INIT now
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> 3await for ^107⏏5 { start { sleep 1 } }; say now - INIT n
expecting any of:…
timotimo m: await do for ^10 { start { sleep 1 } }; say now - INIT now
camelia 1.1897424
timotimo m: await do for ^16 { start { sleep 1 } }; say now - INIT now
camelia 1.3259977 22:44
timotimo m: await do for ^32 { start { sleep 1 } }; say now - INIT now
camelia 1.516654
timotimo m: await do for ^46 { start { sleep 1 } }; say now - INIT now
camelia MoarVM panic: Could not spawn thread: errorcode -11
timotimo m: await do for ^40 { start { sleep 1 } }; say now - INIT now
camelia MoarVM panic: Could not spawn thread: errorcode -11
timotimo m: await do for ^38 { start { sleep 1 } }; say now - INIT now
camelia MoarVM panic: Could not spawn thread: errorcode -11
timotimo m: await do for ^35 { start { sleep 1 } }; say now - INIT now
camelia MoarVM panic: Could not spawn thread: errorcode -11
timotimo m: await do for ^33 { start { sleep 1 } }; say now - INIT now
camelia MoarVM panic: Could not spawn thread: errorcode -11
timotimo m: await do for ^32 { start { sleep 1 } }; say now - INIT now
camelia 1.5179599
timotimo 32 threads
mornfall when i do it with whenever, i get failures left and right... with map, it goes smoothly 22:46
how do i get a timestamp? 22:47
i guess time works (p6doc -f time says no such thing exists :\) 22:48
but time.say confirms the timing is okay, so map is another of those things that eats exceptions, presumably 22:51
indeed, .map has the same effect as .throttle -- i need to .&await to get exceptions 22:52
timotimo: oh, i also remember why i didn't use exceptions -- i don't know how to make a 'universal' handler
i want to print the log before the program dies
timotimo oh 22:53
mornfall various attempts with QUIT did not bear fruit
timotimo CATCH { default { .note } }
mornfall yeah, but where? i don't want to write that 20 times :p
timotimo QUIT runs when the react block dies with an exception, and i don't think you can "resurrect" it
mornfall or was that END
timotimo nah, END is for when the actual program ends 22:54
mornfall oh i remember, what i had before was that error would directly call exit and i tried using END to kill the slave process 22:55
which didn't work because END is a magical beast that is eval'd even if the program didn't reach the END block yet 22:56
and then it tries to use variables that don't exist
well END is not for me :p
timotimo aye, END gets registered at compile time when the compiler parses it
github.com/colomon/Phaser-ATEXIT - you may want this
mornfall so the question becomes, can a module install a CATCH phaser for its importer? 23:04
timotimo i think there's a way, but if i remember it correctly, it's totally a hack
23:07 ryn1x_ left
AlexDaniel m: await do for ^100 { start { sleep 1 } }; say now - INIT now 23:10
camelia MoarVM panic: Could not spawn thread: errorcode -11
AlexDaniel e: await do for ^100 { start { sleep 1 } }; say now - INIT now
evalable6 2.45722987
timotimo it's probably a ulimit
AlexDaniel yea but evalable has it too I think
timotimo also: the thread pool scheduler should perhaps catch exceptions when trying to spawn a thread and just shrug it off?
AlexDaniel but yes the thread poll scheduler is limited to 64 I think
pool*
e: await do for ^100 { start { sleep 1; say now } }; say now - INIT now 23:11
evalable6 Instant:1544051540.369039
Instant:1544051540.380755
Instant:1544051540.391041
Instant:1544…
timotimo aye, it is by default
evalable6 AlexDaniel, Full output: gist.github.com/787de69413b6acffba...df9d6a014a
timotimo overridable with an env var
mornfall it is not possible to have a CATCH for the entire react? 23:12
hm, outside of react works, but not inside; okay i guess that works
AlexDaniel timotimo: why is that shit so slow? :)
timotimo hm, i would have thought it might be possible
AlexDaniel timotimo: I mean, you could still see the 64 limit here gist.github.com/Whateverable/787de...lt-L64-L65 23:13
timotimo if you put it outside, it'll run when the react itself dies with the exception
AlexDaniel timotimo: but it's still like 10ms between prints… what is it spending it's time on?
mornfall yes, it also works inside a whenever block, but that's too specific 23:14
timotimo it's probably waiting for the supervisor thread to notice it needs more threads
e: PERL6_SCHEDULER_DEBUG=1 await do for ^100 { start { sleep 1; say now } }; say now - INIT now
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/Xp_DQMHcsT
Two ter…
timotimo, Full output: gist.github.com/1d746a9253187dbd80...d425ee2704
timotimo e: %*ENV<PERL6_SCHEDULER_DEBUG> = 1 await do for ^100 { start { sleep 1; say now } }; say now - INIT now
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/GcTEdNMzU1
Two ter…
timotimo, Full output: gist.github.com/795179871300b95c58...15fcfeeaef
timotimo e: %*ENV<PERL6_SCHEDULER_DEBUG> = 1; await do for ^100 { start { sleep 1; say now } }; say now - INIT now
evalable6 Instant:1544051728.195933
Instant:1544051728.207031
Instant:1544051728.217304
Instant:1544…
timotimo, Full output: gist.github.com/db737c0f2c2b32f0a4...8ae6ff6b89
timotimo e: %*ENV<RAKUDO_SCHEDULER_DEBUG> = 1; await do for ^100 { start { sleep 1; say now } }; say now - INIT now
evalable6 Instant:1544051735.037453
Instant:1544051735.04918
Instant:1544051735.059401
Instant:15440…
timotimo, Full output: gist.github.com/2718a97d8e06ba48ce...7a58c99a99 23:15
timotimo that's not how you turn that on
AlexDaniel e: %*ENV<RAKUDO_SCHEDULER_DEBUG> = 1; run <perl6 -e>, 「await do for ^100 { start { sleep 1; say now } }; say now - INIT now」
evalable6 (exit code 1) [SCHEDULER 26165] Created initial general worker thread
MoarVM panic: Could …
AlexDaniel, Full output: gist.github.com/60348863e810d27735...5ce00caaf1
timotimo huh 23:16
AlexDaniel e: %*ENV<RAKUDO_SCHEDULER_DEBUG> = 1; run <perl6 -e>, 「await do for ^10 { start { sleep 1; say now } }; say now - INIT now」
evalable6 [SCHEDULER 26416] Created initial general worker thread
Instant:1544051817.452081
Instant:…
AlexDaniel, Full output: gist.github.com/08bfcf793f4bde0fe8...484f8e9232
AlexDaniel it makes sense, I guess it's limited to 80 23:17
in total
so 64 + something for the main program I guess?
ah there's also the bot process itself
timotimo main thread, spesh thread, event loop thread
Geth whateverable: 43a4e48262 | (Aleks-Daniel Jakimenko-Aleksejev)++ | services/whateverable@.service
Bump TasksMax to 200

It seems to be relatively easy to go over the limit.
23:19
AlexDaniel this will come into effect later
timotimo: but anyway, my understanding is that starting a thread, overhead for sleep and printing takes ≈10ms or so 23:20
timotimo i disagree
AlexDaniel cool but why? 23:21
mornfall starting an OS thread is somewhat expensive
also 200 threads will map 2G of memory for stacks (it'll not be paged in, but it's still a burden) :p
timotimo the supervisor is responsible for adding threads 23:22
it keeps a sliding window of cpu usage to figure out when adding a new thread is beneficial
set RAKUDO_SCHEDULER_DEBUG_STATUS as well to see it spit out text 23:23
mornfall what could cause a whenever Promise.in(10) to never fire?
timotimo the react block could be shut down first, or another whenver block is blocking execution of the whole react 23:24
23:24 kensanata left
AlexDaniel e: say now; await do for ^10 { start { sleep 1; say now } }; say now - INIT now 23:25
evalable6 Instant:1544052344.260376
Instant:1544052345.26539
Instant:1544052345.276414
Instant:15440…
AlexDaniel, Full output: gist.github.com/2e89c5c5671adfb08e...cda9534735
mornfall timotimo: hmm, so my assumption that react is concurrent was wrong :\ i don't know how i came to that conclusion
something about the Supply.from-list firing all at once at me ... must have been some stupid mistake on my part
timotimo it's one-at-a-time, so that accessing lexical variables defined inside the react block is safe
maybe you had a higher number than 1 in the throttle? because that would execute multiple at the same time 23:26
mornfall i added the throttle to get rid of the stuff coming in all at once (but of course i can no longer make it do that)
timotimo i know that feeling :) 23:27
mornfall but i can just start the thing instead before the react and sleep 10; in there 23:28
timotimo oh
mornfall which... didn't help?
timotimo of course, the test code
that's probably what's blocking the execution
so here's an idea
mornfall yes, the test is blocked because it's waiting for a response... the idea of the Promise.in(10) was to cut that off 23:29
timotimo instead of whenever $code-comes-from-here { .() } you can do whenever $code-comes-from-here -> $task { whenever start { $task() } { .&await } }
that will let it run in a thread and come back when it's done
oh, but then you'll actually want to have a "wait until the one test is done" mechanism
23:29 benjikun joined
timotimo because *then* it will do them all at once otherwise 23:29
mornfall yes :) 23:30
23:30 pmurias left, clarkema left, p6bannerbot sets mode: +v benjikun
mornfall but react won't block out a start block, will it? 23:31
because it looks like it does just that :\
timotimo "whenever start" is a way to "opt out" of the "one at a time" semantics
because the code that's running is inside the start block, but dynamically not "inside the react/whenever"
mornfall ok react is a lot more serial than i anticipated 23:39
start { say "watching"; sleep 2; say "timeout"; stop; }
says "watching" but never gets to "timeout" because the react block apparently mutexes it out
i'm sad :\ 23:40
timotimo i'll need a code example for that
it could very well be that it dies because you can't "done" inside the start, it has to be inside a whenever "directly" 23:41
so you can whenever start { ... } { done }
mornfall simple examples work 23:42
timotimo m: react { whenever start { say "watching"; sleep 2; say "timeout" } { done }; whenever Promise.in(1) { say "hooray" } }
mornfall is it possible that something that HTTP::UserAgent does interferes?
camelia watching
hooray
timeout
timotimo yeah don't they always ;(
23:43 graphene left 23:45 graphene joined, p6bannerbot sets mode: +v graphene 23:46 pecastro left
mornfall okay i get it now 23:50
so start does the thing it should do, just the stdio gets buffered 23:51
it kills the slave process, but the react block is in a test which has a TCP connection opened to said process
so it won't react to the process dying
:|
23:53 dct joined, p6bannerbot sets mode: +v dct
timotimo d'oh 23:53
mornfall /o\
this is crummy 23:54
trying to whenever start $proc.start { given .&await ... } straight out deadlocks
so react is basically a monitor for the whenever blocks 23:55
timotimo that's weeeird :D
mornfall (in the synchronisation sense of the word monitor)
timotimo yeah, that ain't gonna work what you go tthere
hm, but isn't awaiting inside a whenever supposed to allow code to run ... 23:56
mornfall if those were coroutines, then that'd be how it works
but start just makes a promise 23:57
timotimo yeah, but $proc.start already returns a promise