»ö« 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:12 stmuk joined 00:13 p6bannerbot sets mode: +v stmuk
Juerd \o/ 00:14
00:15 stmuk_ left
lookatme_q o/ 00:18
00:30 sotona left 00:32 fake_space_whale joined 00:33 p6bannerbot sets mode: +v fake_space_whale 00:38 rindolf left 00:43 kurahaupo_ joined 00:44 p6bannerbot sets mode: +v kurahaupo_ 00:46 kurahaupo left 00:47 kurahaupo_ left 00:48 kurahaupo joined 00:49 p6bannerbot sets mode: +v kurahaupo 01:02 molaf joined 01:03 TreyHarris left, p6bannerbot sets mode: +v molaf 01:05 kurahaupo left 01:16 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 01:20 Rawriful left 01:28 Technaton left 01:37 w_richard_w joined 01:38 p6bannerbot sets mode: +v w_richard_w 01:43 lizmat left 01:45 sotona joined 01:46 p6bannerbot sets mode: +v sotona 01:50 molaf_ joined 01:51 p6bannerbot sets mode: +v molaf_ 01:53 Technaton joined, p6bannerbot sets mode: +v Technaton 01:54 molaf left 02:01 stmuk_ joined, p6bannerbot sets mode: +v stmuk_ 02:04 stmuk left
Geth doc: uzluisf++ created pull request #2282:
Add missing letter
02:15
02:19 sotona left 02:23 xinming left 02:24 xinming joined, p6bannerbot sets mode: +v xinming 02:28 Khisanth left 02:33 stmuk joined 02:34 p6bannerbot sets mode: +v stmuk 02:35 stmuk_ left 02:36 blackberry9900 joined 02:37 p6bannerbot sets mode: +v blackberry9900 02:41 Khisanth joined, p6bannerbot sets mode: +v Khisanth
buggable New CPAN upload: AttrX-Mooish-v0.4.0.tar.gz by VRURG modules.perl6.org/dist/AttrX::Mooish:cpan:VRURG 02:42
02:55 molaf_ left 03:15 fake_space_whale left 03:24 w_richard_w left 03:37 sotona joined 03:38 p6bannerbot sets mode: +v sotona 03:40 BlackBerry9999 joined, p6bannerbot sets mode: +v BlackBerry9999 03:42 itaipu left 03:44 blackberry9900 left 03:50 BlackBerry9999 left
Geth ecosystem: b8dad1f8d0 | (Nick Logan)++ (committed using GitHub Web editor) | META.list
Add CompUnit::Repository::Github

  💩
04:08
04:10 sotona left 04:22 broquaint left 04:29 kerframil left 04:35 eliasr left 04:41 DarthGandalf left, sotona joined 04:42 p6bannerbot sets mode: +v sotona 04:43 DarthGandalf joined, p6bannerbot sets mode: +v DarthGandalf 04:47 sotona left 04:52 curan joined, p6bannerbot sets mode: +v curan 05:10 vrurg left 05:11 molaf_ joined 05:12 p6bannerbot sets mode: +v molaf_ 05:17 saki joined, saki left 05:19 vrurg joined 05:20 p6bannerbot sets mode: +v vrurg 05:24 molaf_ left 05:30 zxcvz joined 05:31 p6bannerbot sets mode: +v zxcvz 05:36 saki joined, saki left 05:41 broquaint joined, p6bannerbot sets mode: +v broquaint 05:48 saki joined 05:49 sauvin joined, p6bannerbot sets mode: +v sauvin, p6bannerbot sets mode: +v saki 05:50 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 05:51 stmuk_ joined 05:52 p6bannerbot sets mode: +v stmuk_ 05:54 stmuk left, rfold joined 05:55 p6bannerbot sets mode: +v rfold, vrurg left
buggable New CPAN upload: AttrX-Mooish-v0.4.1.tar.gz by VRURG modules.perl6.org/dist/AttrX::Mooish:cpan:VRURG 06:02
06:10 robertle joined, p6bannerbot sets mode: +v robertle 06:13 ZzZombo left 06:17 stmuk joined 06:18 p6bannerbot sets mode: +v stmuk 06:20 stmuk_ left 06:22 Ven` joined 06:23 p6bannerbot sets mode: +v Ven` 06:26 rfold left 06:27 Ven` left 06:40 hami joined, p6bannerbot sets mode: +v hami 06:44 ZzZombo joined, p6bannerbot sets mode: +v ZzZombo 06:45 jc_ joined 06:46 p6bannerbot sets mode: +v jc_
perlawhirl bisectable6: my &f = *.elems; &f ∘= *.words; say f 'a b c'; 06:50
bisectable6 perlawhirl, On both starting points (old=2015.12 new=8275584) the exit code is 0 and the output is identical as well
perlawhirl, Output on both points: «1␤»
07:06 hami left 07:29 rindolf joined 07:30 p6bannerbot sets mode: +v rindolf 07:37 dakkar joined 07:38 p6bannerbot sets mode: +v dakkar 07:50 saki left 07:51 saki joined 07:52 p6bannerbot sets mode: +v saki 07:53 jkramer left 07:54 scimon joined 07:55 p6bannerbot sets mode: +v scimon 07:57 scimon left 07:59 scimon joined 08:00 p6bannerbot sets mode: +v scimon, jkramer joined 08:01 p6bannerbot sets mode: +v jkramer
Geth doc: 7d214f6b98 | (Luis F. Uceta)++ | doc/Language/classtut.pod6
Add missing letter
08:02
doc: 46e71bf669 | Altai-man++ (committed using GitHub Web editor) | doc/Language/classtut.pod6
Merge pull request #2282 from uzluisf/master

Add missing letter
synopsebot Link: doc.perl6.org/language/classtut
08:04 HaraldJoerg joined, p6bannerbot sets mode: +v HaraldJoerg 08:07 TreyHarris left 08:11 Grauwolf_ is now known as Grauwolf 08:20 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris 08:28 lookatme_q left 08:33 Ven` joined 08:34 p6bannerbot sets mode: +v Ven` 08:56 saki left 08:57 saki joined 08:58 saki left 09:02 pmurias joined 09:03 p6bannerbot sets mode: +v pmurias 09:09 sena_kun joined 09:10 zxcvz left, p6bannerbot sets mode: +v sena_kun, zxcvz joined 09:11 p6bannerbot sets mode: +v zxcvz, zxcvz left 09:13 SyrupThinker left 09:14 SyrupThinker joined, p6bannerbot sets mode: +v SyrupThinker 09:27 harrison joined
pmurias hmm, what's a good way to check for a primality of a bigint? 09:27
09:27 p6bannerbot sets mode: +v harrison
timotimo you want to implement .is-prime on a new backend? rather than do it in perl6 where you could actually use .is-prime? 09:29
en.wikipedia.org/wiki/Miller%E2%80...ality_test - i think this is the one libtommath uses, so that's what rakudo has 09:30
pmurias I want to implement nqp::prime_I on the js backend
timotimo is there nothing on npm? ;) 09:31
pmurias I can't find anything
timotimo what? that's weird!
OK, then just™ use that primality test regex! :D :D :D 09:32
09:32 Ven` left
timotimo btw, it'd be really cool if someone took the stuff found in the "Deterministic variants" section of that article and made our primality testing faster 09:32
pmurias I use builtin BigInts which are a new thing
timotimo i mean the list of lines like if n < 341,550,071,728,321, it is enough to test a = 2, 3, 5, 7, 11, 13, and 17.
oh 09:33
ok, a paragraph above that says it's much slower in practice than using the probabilistic approach
09:33 Ven` joined
timotimo never mind me, then! :) 09:33
pmurias timotimo: it would be like 100/7 times faster 09:34
09:34 p6bannerbot sets mode: +v Ven`
pmurias for the n < 341,550,071,728,321 09:34
timotimo: is-prime has high number of Miller Rabin tests 09:35
timotimo on rakudo? yeah, way too high. 09:36
i'm reading a paper right now about a very fast test for 32bit integers 09:37
using that we wouldn't have to upgrade smallbigints to actual-bigints and do the miller-rabin on them
m: say 4 ** (-100) 09:38
camelia 6.223015277861142e-61
timotimo with 100 rounds, this is the probability of getting a false positive prime number
m: say 4 ** (-50)
camelia 7.888609052210118e-31
timotimo this is perhaps not good enough?
but something lower than 100 should suffice
09:39 zakharyas joined, p6bannerbot sets mode: +v zakharyas
pmurias timotimo: for all n < 3,317,044,064,679,887,385,961,981 just 13 steps is enought to be certain 09:45
(according to wikipedia)
timotimo i'm not entirely sure if that's how that is meant
09:45 harrison left
timotimo m: say +"3,317,044,064,679,887,385,961,981".subst(",","").base(16) 09:46
camelia No such method 'base' for invocant of type 'Str'. Did you mean any of these?
Hash
asec
hash
take

in block <unit> at <tmp> line 1
timotimo m: say (+"3,317,044,064,679,887,385,961,981".subst(",","")).base(16)
camelia Cannot convert string to number: trailing characters after number in '033317⏏5,044,064,679,887,385,961,981' (indicated by ⏏)
in block <unit> at <tmp> line 1
timotimo m: say (+"3,317,044,064,679,887,385,961,981".subst(",","", :g)).base(16)
camelia 2BE6951ADC5B22410A5FD
pmurias timotimo: if n < 3,317,044,064,679,887,385,961,981, it is enough to test a = 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, and 4
moarvm tests those if you have 13 steps 09:47
timotimo oh?
ah, there's a miller-rabin-trials function that tells us how many we need 09:48
perhaps we should be calling that :) 09:49
09:50 ZzZombo left 09:52 AlexDaniel joined, p6bannerbot sets mode: +v AlexDaniel 10:01 zakharyas left 10:13 psychoslave joined 10:14 p6bannerbot sets mode: +v psychoslave, psychoslave left 10:29 lizmat joined 10:30 p6bannerbot sets mode: +v lizmat 10:32 zakharyas joined 10:33 p6bannerbot sets mode: +v zakharyas 10:45 ufobat joined 10:46 p6bannerbot sets mode: +v ufobat
lizmat clickbaits p6weekly.wordpress.com/2018/08/27/...kilfenora/ 10:47
10:47 robertle left
scimon :) 10:54
Thanks to ilmari I have more stuff to do in Trait::Env 10:55
10:55 psychoslave joined, p6bannerbot sets mode: +v psychoslave
ilmari scimon: you're welcome ;-P 10:56
11:01 ufobat left
Altreus I feel like this is an idiom, but I don't understand it. github.com/croservices/cro-http/bl...t.pm6#L353 11:09
Can someone link me to something so I can understand it 11:10
?
What confuses me is that the promise resolves to a Response object but I don't know where that comes from 11:14
11:18 stmuk_ joined 11:19 p6bannerbot sets mode: +v stmuk_ 11:20 stmuk left 11:21 stmuk joined, p6bannerbot sets mode: +v stmuk 11:24 stmuk_ left 11:28 stmuk_ joined 11:29 p6bannerbot sets mode: +v stmuk_ 11:30 stmuk left
sena_kun Altreus, `emit`. 11:30
we use supply to stick in some `whenever` blocks w ewant, first one build pipeline async-way, next internal one sends a request and waits async-way. When the response is here, we emit it, it becomes first thing emitted from supply block and, hence, Promise is kept with this value. 11:32
s/build/builds/ 11:33
Altreus ah so .emit right down there, that emits the response right back up to the supply {} 11:35
maybe that's what someone meant about 2 months ago about how to refactor some of my code :D
sena_kun m: my $p = Promise(supply { whenever Promise.in(1) { emit 'Rize' } }); $p.then(*.result.say);
camelia ( no output )
sena_kun m: my $p = Promise(supply { whenever Promise.in(1) { emit 'Rize' } }); $p.then(*.result.say); sleep 2; 11:36
camelia Rize
sena_kun something like this, simplified.
Altreus, note that we have emit multiple times in code, based on if it's a possible redirect or some kind of error, but in fact it is always kept only once as no code path is ran twice. 11:38
11:38 robertle joined 11:39 p6bannerbot sets mode: +v robertle
Altreus I see :o 11:39
this is neat
So with Promise(supply ...) you can do a bunch of async stuff and finally .emit to keep the outer Promise
or die to break it 11:40
11:41 spycrab0 joined, p6bannerbot sets mode: +v spycrab0
sena_kun m: my $p = Promise(supply { whenever Promise.in(1) { if 'Black' { die 'Bathory' } } }); $p.then(*.result.say); sleep 2; say $p.cause; 11:42
camelia Bathory
in block at <tmp> line 1
sena_kun Altreus, ^
so yes, that's about right. :)
Altreus most splendid
I can make use of this I think!
For example, dealing with Cro, I get a Promise from 'get' and that resolves to a Response... and then I get a Promise from .body on that and I really just want to return that Promise 11:43
So I think I can just repackage the body using Promise/supply
My brain is slowly being moulded to think async 11:46
11:46 psychoslave left
sena_kun I am not sure right now, but I think just something like `$req.then(Promise(await *.result.body)).result` could work. But it's ugly enough imho. 11:46
Altreus I was gonna do Promise( supply { my $resp = await self.get ...; my $b = await $resp.body; .emit($b) } ) 11:48
sena_kun this stuff is tricky to get right, yes. but it's very nice afterwards.
Altreus (I subclassed Client so self has get)
sena_kun so you want to return the body promise or result of this promise? 11:49
your code is like second way, but `want to return that Promise` sounds like first to me.
Altreus I figured it was easier to repackage the body promise into a new promise 11:50
your way is a bit shorter, though
returns the real body promise 11:51
hmm
sena_kun well, it's up to you, though I am not sure why repackage. maybe if you want to patch the body somehow, but keep it async-y way.
Altreus I don't really want to :) I'll try your way 12:02
oh hold on yours repackages the body too :) 12:03
no wait
it puts a promise in another promise
12:04 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh
Altreus wouldn't it just be $req.then(*.result.body) 12:04
sena_kun it will be.
12:04 p6bannerbot sets mode: +v aborazmeh 12:05 dakkar left, dakkar joined
sena_kun `$req.then(*.result.body).result` I think, to unwrap Promise created with `then`. 12:05
12:06 itaipu joined, p6bannerbot sets mode: +v dakkar
Altreus but that blocks no? 12:06
12:06 p6bannerbot sets mode: +v itaipu
sena_kun have you tried that? I don't know to be honest, doing another thing right now. :) 12:07
anyway, that's a way to experiment a bit, I hope the general approach on how Cro does it is now a bit more clear. 12:08
Ven` masak: well, nothing was happening, so I was wondering wtf was going on
i just typed to try and get it to move. I do like relative numbering otherwise :) 12:09
Altreus sena_kun: yes indeed, thanks :) 12:12
buggable New CPAN upload: Text-I18n-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz
jnthn start (await $resp).body # probably the shortest way to make an async thing that evaluates to the body Promise 12:14
12:23 saki joined, saki left 12:25 saki joined, saki left 12:27 stmuk joined 12:28 p6bannerbot sets mode: +v stmuk 12:30 stmuk_ left
Altreus jnthn: I feel like I'm missing a part. Surely (await $resp).body is a Promise, and then start is another Promise? 12:34
So my method returns a Promise that resolves to a Promise that resolves to the body
But I don't want to await directly inside the method because that'll block
12:35 lizmat left 12:36 Sgeo__ left
jnthn oops, yes, I meant `start await (await $resp).body`, sorry :) 12:37
I've also been pondering a .get-body for folks doing really simple things to avoid some boilerplate. 12:38
sena_kun m: say '$req.then(*.result.body).resul'.chars eq 'start await (await $resp).body'.chars
camelia True 12:39
timotimo hah
actually, you don't want the .result at the end there, i think
sena_kun though the variable name is different, so +1 char. :S
jnthn Yes, but .result is blocking, and await with use v6.d.PREVIEW is non-blocking
sena_kun runs away 12:40
Altreus aha I do understand! 12:41
That's grand
alright I have to drive a whole bunch now, but thanks for all your helps :)
buggable New CPAN upload: I18n-Simple-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz 12:42
12:43 saki joined 12:44 p6bannerbot sets mode: +v saki 12:52 Kaiepi left 12:55 Kaiepi joined 12:56 p6bannerbot sets mode: +v Kaiepi 13:18 harrison joined 13:19 p6bannerbot sets mode: +v harrison 13:20 vrurg joined, p6bannerbot sets mode: +v vrurg 13:38 aborazmeh left 13:39 psychoslave joined 13:40 p6bannerbot sets mode: +v psychoslave, MilkmanDan left 13:41 Ven` left, MilkmanDan joined, p6bannerbot sets mode: +v MilkmanDan 13:43 aborazmeh joined, aborazmeh left, aborazmeh joined, p6bannerbot sets mode: +v aborazmeh 13:47 titsuki joined, p6bannerbot sets mode: +v titsuki 14:03 harrison left 14:04 skids joined 14:05 p6bannerbot sets mode: +v skids 14:14 zakharyas left 14:16 aborazmeh left 14:21 saki left 14:29 j___ joined 14:30 p6bannerbot sets mode: +v j___ 14:32 j___ left 14:40 saki joined, saki left
buggable New CPAN upload: String-Fold-0.1.1.tar.gz by TYIL modules.perl6.org/dist/String::Fold:cpan:TYIL 14:42
14:46 saki joined, saki left 14:48 saki joined, saki left, Ven` joined 14:49 p6bannerbot sets mode: +v Ven` 14:52 jc_ left
buggable New CPAN upload: String-Fold-0.1.2.tar.gz by TYIL modules.perl6.org/dist/String::Fold:cpan:TYIL 14:52
14:53 Ven` left 14:54 MilkmanDan left 14:55 MilkmanDan joined, p6bannerbot sets mode: +v MilkmanDan 14:58 molaf_ joined 14:59 p6bannerbot sets mode: +v molaf_ 15:03 troys joined 15:04 p6bannerbot sets mode: +v troys 15:09 robertle left 15:10 Ven` joined, DrForr_ is now known as DrFor, DrFor is now known as DrForr, p6bannerbot sets mode: +v Ven` 15:14 curan left, yqt joined 15:15 p6bannerbot sets mode: +v yqt 15:18 psychoslave left 15:36 fake_space_whale joined 15:37 p6bannerbot sets mode: +v fake_space_whale 15:43 saki joined, saki left 15:46 avar left 15:47 avar joined, avar left, avar joined, p6bannerbot sets mode: +v avar 15:48 p6bannerbot sets mode: +v avar 16:02 robertle joined 16:03 p6bannerbot sets mode: +v robertle 16:10 stmuk_ joined 16:11 p6bannerbot sets mode: +v stmuk_ 16:12 stmuk left 16:19 kerframil joined, p6bannerbot sets mode: +v kerframil 16:20 zakharyas joined 16:21 p6bannerbot sets mode: +v zakharyas 16:34 fake_space_whale left 16:36 [particle] left 16:37 scimon left 16:42 zakharyas left, epony left 16:43 [particle] joined, Ven` left, dakkar left 16:44 p6bannerbot sets mode: +v [particle] 16:46 Ven` joined 16:47 p6bannerbot sets mode: +v Ven`, epony joined, p6bannerbot sets mode: +v epony 16:50 Ven` left
Geth doc: d635ba72e5 | (JJ Merelo)++ | doc/Language/glossary.pod6
Reflows and fixes links

Refs #561 #1838, but mainly it's been a very extensive reflow, there were very long lines here. Main intention was to work towards #2283
17:01
synopsebot Link: doc.perl6.org/language/glossary
Geth doc: 0346c606c6 | (JJ Merelo)++ | doc/Language/glossary.pod6
Fixes link to Roles

This closes #2283. This link is probably better, since it's the declarator. The problem is that it maybe is the symptom for a problem, namely, /syntax/role generated at one particular point in time and no longer there for some fluke of the page generation. So thanks a lot for the report, and I'll investigate if that's the case.
doc: 2a5d0b94b5 | (JJ Merelo)++ | doc/Language/glossary.pod6
More reflowing and minor changes
17:08
synopsebot Link: doc.perl6.org/language/glossary
17:11 rfold joined 17:12 sotona joined, p6bannerbot sets mode: +v rfold 17:13 p6bannerbot sets mode: +v sotona 17:17 sotona left, pukku joined, p6bannerbot sets mode: +v pukku
pukku Hi! Is there anything special about an autogenerated parameter using the "thorn" character? In particular, I am looking at the docs for `==>` on docs.perl6.org. 17:19
17:20 zxcvz joined 17:21 p6bannerbot sets mode: +v zxcvz
MasterDuke pukku: i don't think so. i believe $^þ was used just to show that using unicode chars in variable names is no big deal 17:22
pukku Cool; I just wanted to make sure that I wasn't missing something. 17:23
17:33 TreyHarris left 17:34 sena_kun left 17:35 sena_kun joined 17:36 p6bannerbot sets mode: +v sena_kun 17:46 TreyHarris joined, p6bannerbot sets mode: +v TreyHarris, sena_kun left 17:47 sena_kun joined 17:48 p6bannerbot sets mode: +v sena_kun 17:54 psychoslave joined 17:55 p6bannerbot sets mode: +v psychoslave 18:00 pecastro joined, p6bannerbot sets mode: +v pecastro 18:02 psychoslave left
pukku I found a weird oddity, and was wondering if there was a reason, or if I've just run into an edge case. I've tried searching via Google and DDG, but nothing seems to be coming up. If you try creating a list of hashes via `@foo.map( { { 't' => $_ }; })`, you get back just a list of pairs. You need to do `@foo.map( { %( 't' => $_ ); })` to get back a list of hashes. (Also, if you try `%{...}`, it crashes.) 18:03
tobs m: <1 2 3 4>.map({ { t => $_ }.WHAT }).perl.say 18:14
camelia (Block, Block, Block, Block).Seq
tobs pukku: it mistakes the inner braces for a block which it executes
18:17 ExtraCrispy joined
pukku Is there a better idiom for creating a list of hashes in Perl 6? 18:17
18:17 p6bannerbot sets mode: +v ExtraCrispy
tobs I think %(t => $_) is fine 18:22
That's also the one listed in docs.perl6.org/language/syntax#Hash_literals
18:27 sauvin left 18:29 domidumont joined 18:30 p6bannerbot sets mode: +v domidumont, zakharyas joined, p6bannerbot sets mode: +v zakharyas
tobs pukku: further reading :-) github.com/perl6/doc/issues/2117 and stackoverflow.com/a/44102980 18:31
m: ^4 .map({ hash t => $_ }).perl.say # also neat if you ask me 18:37
camelia ({:t(0)}, {:t(1)}, {:t(2)}, {:t(3)}).Seq
18:40 psychoslave joined
pukku m: ^4.map({foo => $_}).perl.say 18:41
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3^47⏏5.map({foo => $_}).perl.say
(:foo(4),).Seq
WARNINGS for <tmp>:
Useless use of "^" in expression "^4.map({foo …
18:41 p6bannerbot sets mode: +v psychoslave
pukku m: <1 2 3 4>.map({ {t=>$_} }).perl.say 18:41
camelia (:t(IntStr.new(1, "1")), :t(IntStr.new(2, "2")), :t(IntStr.new(3, "3")), :t(IntStr.new(4, "4"))).Seq
pukku Why in the world does quoting hash keys break everything? According to the stack overflow link, quoting a hash key changes a (potential) hash into a block, and you can't put quotes around named parameters in function calls. 18:44
tobs m: ^4 .map({ { t => $_ } }).perl.say; ^4 .map({ { t => 42 } }).perl.say 18:51
camelia (:t(0), :t(1), :t(2), :t(3)).Seq
({:t(42)}, {:t(42)}, {:t(42)}, {:t(42)}).Seq
18:52 molaf_ left
tobs I bet it's the usage of $_ which make the braces into a code block 18:52
pukku OK, that's even more confusing. But I guess I'll just use the `%(...)` form for now, and at least the program will work. Thanks!
18:54 molaf_ joined 18:55 p6bannerbot sets mode: +v molaf_ 18:59 uzl joined 19:00 p6bannerbot sets mode: +v uzl
uzl \o/ 19:01
yoleaux 27 Aug 2018 16:28Z <MasterDuke> uzl: "We’ll build from the most simple category, the assignment category to the most general one, the course category.", there should probably be some sort of punctuation after "assignment category"
27 Aug 2018 16:30Z <MasterDuke> uzl: "not zeroth" should be "no zeroth"
27 Aug 2018 16:31Z <MasterDuke> uzl: your `class Assignment {` code example has some weird indentation for the comments
27 Aug 2018 16:35Z <MasterDuke> uzl: the bullets have a different font size in the Assignment Class paragraph vs the Student Class paragraph
27 Aug 2018 16:36Z <MasterDuke> uzl: "a add-assignment method" should be "an add-assignment method"
27 Aug 2018 16:37Z <MasterDuke> uzl: "but can we can" has an extra 'can', should be "but we can"
27 Aug 2018 16:38Z <MasterDuke> uzl: "but can we can" has an extra 'can', should be "but we can"
27 Aug 2018 16:40Z <MasterDuke> uzl: actually, a bunch of the code samples have odd formatting for the comments
27 Aug 2018 16:43Z <MasterDuke> uzl: `if ($number ~~ s/^E//) {`, the "superstitious" parens in the `if` conditional are generally not used in perl 6
27 Aug 2018 16:44Z <MasterDuke> uzl: this could be a personal preference thing, but `$number = $number.Int;` could also be written as `$number .= Int;`
27 Aug 2018 16:48Z <MasterDuke> uzl: another personal preference thing, but `unless $!type eq 'Homework' or $!type eq 'Exam' {` could be `unless $!type eq 'Homework' | 'Exam' {`
27 Aug 2018 16:49Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 16:50Z <MasterDuke> uzl: "add a a formatted-score", doubled "a"
27 Aug 2018 16:53Z <MasterDuke> uzl: "add a a formatted-score", doubled "a"
27 Aug 2018 16:53Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 16:55Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 17:02Z <MasterDuke> uzl: "looks the Student object for that student and adds assignment to it.", maybe a missing "up" after "looks" and a missing "an" before "assignment"
27 Aug 2018 17:16Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 17:49Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 23:42Z <MasterDuke> uzl: `unless %!config{$!type}[$!number] {`, most of your hash accesses have spaces around the variable
27 Aug 2018 23:42Z <MasterDuke> uzl: "looks the Student object for that student and adds assignment to it.", maybe a missing "up" after "looks" and a missing "an" before "assignment"
11:46Z <MasterDuke> uzl: i don't think `grep: { $_ }` does what you want (if i understand what you're trying to do). e.g., it will exclude array elements where the value is 0. maybe `grep: *.defined` ?
11:52Z <MasterDuke> uzl: this would also depend on what exactly you want to do, but `%!assignments<Homework>[1..*]` could also be `%!assignments<Homework>.skip`. using skip give you a Seq instead of an array, so that might not work in all cases though
12:03Z <MasterDuke> uzl: you have a comment `# CLI arguments are stored in @*ARGV`, but then do correctly use `@*ARGS` in the code
12:04Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
12:07Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
12:07Z <MasterDuke> uzl: "this doesn’t make them justice.", should be "this doesn’t do them justice."
12:08Z <MasterDuke> uzl: "a compile-time error will be trown.", typo there, should be "a compile-time error will be thrown."
12:08Z <MasterDuke> uzl: "this doesn’t make them justice.", should be "this doesn’t do them justice."
12:08Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
12:10Z <MasterDuke> uzl: ".^attributes - returns all the methods that can be called on the object.", should be something like ".^attributes - returns all the attributes of the object."
12:15Z <MasterDuke> uzl: ".^attributes - returns all the methods that can be called on the object.", should be something like ".^attributes - returns all the attributes of the object."
12:54Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
15:02Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
17:20Z <MasterDuke> uzl: "courses a student has been enrolled on.", should be "enrolled in."
19:05 zakharyas left
geekosaur you only live thrice? 19:06
19:09 domidumont left 19:14 MilkmanDan left 19:15 lindylex joined 19:16 p6bannerbot sets mode: +v lindylex
lindylex Why does this split the numbers larger than 255 numbers into two and make them test positive? say "27.36.1.255 77 999.569.22.40".match(/ \d ** 1..3 <?{ $/ >= 0 && $/ < 256 }> /, :global); 19:17
19:17 MilkmanDan joined, p6bannerbot sets mode: +v MilkmanDan 19:24 psychoslave left
geekosaur lindylex, because patterns don't read your mind. if you base them on characters like that, it breaks on characters. so if reading 3 characters causes it to fail on a result based om <256, it will try again with 2, pass, and then read the remainder as a new number 19:30
uzl .tell MasterDuke `if ($number ~~ s/^E//) {`, I don't remember the error correctly but I was getting something related to globbing, which was fixed after adding the parenthesis. It was probably not related though. 19:31
yoleaux uzl: I'll pass your message to MasterDuke.
uzl .tell MasterDuke I usually put the spaces around the variables in the hash accesses to make them easier to read. Are there occasions when these spaces make a difference? 19:32
yoleaux uzl: I'll pass your message to MasterDuke.
geekosaur you need to prevent the (\d ** 1..3) from backtracking, so it commits to a digit string before testing its value instead of backtracking through it if the value test fails
lindylex geekosaur : this is <?{ $/ >= 0 && $/ < 256 }> should have tested the number found.
geekosaur you;re missing my point
it does
and then it fails, and then the regex backtracks through \d ** 1..3, trying 2 instead of 3, and the subsequent test succeeds 19:33
lindylex Oh I see.
I get it now,
uzl .tell MasterDuke `grep: { $_ }`. The thing is that the array shouln't be a number but an Assignment object. `%!assignments<Homework>[1..*]` is meant to skip the zeroth element (a whole number) which keeps tracked of the number of assignments. I didn't know about `.skip` so I'll look into it.
yoleaux uzl: I'll pass your message to MasterDuke.
uzl .tell MasterDuke I don't know why but I always get ARGS and ARGV (which I think isn't a thing in P6) confused. Anyway...Thanks for taking the time to proofread it. Really appreciate it. I've updated the post to reflect your corrections. 19:34
yoleaux uzl: I'll pass your message to MasterDuke.
geekosaur lindylex, the easiest fix for this is probably to make \d ** 1..3 a separate token definition, which prevents backtracking through it by default 19:35
(see :ratchet)
19:38 uzl left 19:49 vrurg left
lindylex geekosaur : thanks say "27.36.1.255 77 999.569.22.40".match(/ :r \d ** 1..3 <?{ $/ >= 0 && $/ < 256 }> /, :global); 19:51
TimToady lindylex: also see colabti.org/irclogger/irclogger_log...08-23#l713 which you missed by a hair
geekosaur I thought that sounded familiar... 19:52
lindylex brb thanks all. 19:55
19:56 gurmble joined, p6bannerbot sets mode: +v gurmble, grumble left, lizmat joined 19:57 p6bannerbot sets mode: +v lizmat 19:58 gurmble is now known as grumble
TimToady
.oO( so if the last brb lasted 5 days... :)
19:58
20:01 lindylex left, vrurg joined 20:02 p6bannerbot sets mode: +v vrurg
diakopter
.oO( belated return believed )
20:12
20:32 pukku left 20:52 yqt left 20:58 HaraldJoerg left 21:00 psychoslave joined 21:01 p6bannerbot sets mode: +v psychoslave 21:02 sena_kun left 21:08 skids left 21:33 lizmat left
buggable New CPAN upload: I18n-Simple-0.1.1.tar.gz by TYIL modules.perl6.org/dist/I18n::Simple:cpan:TYIL 21:42
21:44 robertle left 21:49 silug left 21:51 silug joined 21:52 p6bannerbot sets mode: +v silug 21:56 psychoslave left 22:03 Kaypie joined, Kaiepi left, rfold left, p6bannerbot sets mode: +v Kaypie 22:08 rindolf left 22:17 pmurias left 22:54 kerframil left
MasterDuke oops, looks like yoleaux did get all my messages, even though it didn't always reply to me 23:12
23:15 yqt joined 23:16 p6bannerbot sets mode: +v yqt, [particle]1 joined 23:17 p6bannerbot sets mode: +v [particle]1 23:18 [particle] left 23:20 yqt left 23:30 yqt joined, yqt left 23:38 pecastro left 23:43 Sgeo joined 23:44 p6bannerbot sets mode: +v Sgeo