»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:26 djbkd left 00:27 Zoffix left 00:35 Zoffix joined, MasterDuke joined
MasterDuke .seen AlexDaniel 00:35
yoleaux I saw AlexDaniel 8 Jul 2016 21:38Z in #perl6: <AlexDaniel> gfldex: maybe we can try smaller camelia? What do you think?
AlexDaniel MasterDuke: ? 00:36
Zoffix gfldex, the Issues seems to be locked on HTTP::Server::Simple. I don't see where to report issues. The tests fail on installation: gist.github.com/zoffixznet/45024ed...5bcd5983d7
MasterDuke for bisectbot, you've built a version of rakudo at every commit, correct?
AlexDaniel yes 00:37
Zoffix And HTTP::Server::Tiny is failing too :/ man, why are things like this when I actually try to build something with Perl 6....
MasterDuke would it be possible to use those to create a version of camelia where you could specify the commit you'd like to use? 00:38
AlexDaniel MasterDuke: sure 00:39
Zoffix HTTP::Easy seems to be working.
MasterDuke and also, how about a benchmarkbot? give it a list of commits and a block of code and it returns the timing numbers for running that block on those version of rakudo
00:39 Zoffix left
AlexDaniel MasterDuke: the thing is, the functionality of camelia and bisectbot overlap a lot… When I wrote bisectbot, some people said that it's better to keep them separated 00:40
MasterDuke: but it looks like it will be much better to merge them
bisectable: source
bisectable AlexDaniel: github.com/perl6/bisectbot
AlexDaniel MasterDuke: the source is there ↑, so feel free to hack on it
MasterDuke the default could certainly stay the same (latest release), but it seems like it could be useful functionality 00:41
AlexDaniel MasterDuke: I agree
MasterDuke: also, I still haven't moved it to hack, so I still host it myself… :)
MasterDuke ha. how warm do you want your house to get? 00:42
AlexDaniel MasterDuke: it's on a dedicated server, but CPU usage is really low
it takes about 7 minutes to create a build and currently it does 7 in parallel 00:43
so there are only short 7 minute spikes… :)
MasterDuke if a benchmarkbot does end up getting created, it might be good to put it in its own cgroup or something like that 00:44
so it doesn't kill the rest of the system, and hopefully the numbers are less effected by anything else also
i.e., only give it 1-2 cores 00:45
AlexDaniel MasterDuke: I thought about a variation of bisect: but to run it on every commit instead. This may solve some of the current issues with bisection :) 00:46
MasterDuke: then it can give a link to the output or something 00:47
MasterDuke or the ranges of commits and their unique output
AlexDaniel yea
MasterDuke: as for the benchmarking, you can always send me a thing you want to test 00:48
and I'll run it “manually” )
:)*
MasterDuke cool, thanks 00:49
AlexDaniel or once I move it to hack you'll probably be able to play with it yourself :)
MasterDuke what's the directory structure that the different builds live under? 00:53
hmm, looks like i can figure it out from process-sha 00:55
AlexDaniel MasterDuke: it's just builds/123abc123abc123abc…/bin/perl6 00:59
MasterDuke ahh, thanks 01:00
01:04 sortiz joined 01:05 cdg left 01:06 kalkin- joined 01:10 wamba left 01:11 Actualeyes left 01:12 TEttinger left, girafe left
AlexDaniel MasterDuke: I'm crashing to bed soon, feel free to leave me a message 01:15
sortiz m: say 'x'.Numeric ~~ Failure; say 'x'.Int ~~ Failure; # Inconsistency bug? 01:18
camelia rakudo-moar f583f2: OUTPUT«True␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5x' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
gfldex .tell Zoffix HTTP::Server::Simple is fixed 01:20
yoleaux gfldex: I'll pass your message to Zoffix.
01:21 AndyBotwin joined 01:24 Actualeyes joined 01:33 AlexDaniel left 01:35 cdg joined 01:39 espadrine joined 01:42 cdg left 01:43 molaf left 01:45 addison left, Zoffix joined
Zoffix Hacked together a helper for myself to go through the RT queue. Maybe it's useful for someone too: github.com/zoffixznet/perl6-Ticket-Trakr 01:56
01:56 molaf joined
yoleaux 01:20Z <gfldex> Zoffix: HTTP::Server::Simple is fixed 01:56
Zoffix gfldex++
sortiz m: dd min(Failure.new, Str).WHAT, (Failure.new min Str).WHAT 01:57
camelia rakudo-moar f583f2: OUTPUT«Num␤Failure␤»
Zoffix :|
sortiz found a mine field 01:58
gfldex m: my @a = [[1,2,3],[[4,5],6]]; dd @a.duckmap({ $_ ~~ Num ?? $_+1 !! Any }) 01:59
camelia rakudo-moar f583f2: OUTPUT«Memory allocation failed; could not allocate 6289984 bytes␤»
gfldex does duckmap actually work? 02:00
sortiz m: dd max(Str, Failure.new).WHAT; # Really!?
camelia rakudo-moar f583f2: OUTPUT«Num␤»
02:01 AndyBotwin left
sortiz m: dd (Str max Failure.new).WHAT; # Sane 02:01
camelia rakudo-moar f583f2: OUTPUT«Failure␤»
02:02 killbill left 02:03 AndyBotwin joined
ugexe m: class Foo is DateTime { has $.a; }; say Foo.new(:a(1)); # Is DateTime not supposed to be subclassed? 02:03
camelia rakudo-moar f583f2: OUTPUT«Cannot call Foo.new with these named parameters: a␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
ugexe m: class Foo is DateTime { }; say Foo.new
camelia rakudo-moar f583f2: OUTPUT«Cannot make a Foo object using .new␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
sortiz Zoffix++ # RT tracker, nice!!
dalek c: d3f2534 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6:
doc Any.deepmap
02:04
Zoffix ugexe, isn't it still using DateTime's method new? It's specially made to take only specific named args 02:06
02:06 skids joined
Zoffix m: class Foo is DateTime { has $.a; method new (:$a) { self.bless: '2016-05-06', :$a }; my $x = Foo.new(:a(1)); say $x.a; say $x.Str 02:07
camelia rakudo-moar f583f2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3x = Foo.new(:a(1)); say $x.a; say $x.Str7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ statement…»
Zoffix eh, well something or other :) 02:08
geekosaur need another } after the first
Zoffix It's still broken 'cause bless doesn't take positionals :)
sortiz m: DateTime.new;
camelia rakudo-moar f583f2: OUTPUT«Cannot make a DateTime object using .new␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
ugexe m: class Foo is DateTime { has $.a; method new($a) { self.bless(:$a) }; }; say Foo.new(1);
camelia rakudo-moar f583f2: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in block <unit> at <tmp> line 1␤␤»
Zoffix huh 02:09
ugexe m: class Foo is DateTime { has $.a; submethod BUILD(:$!a) {}; }; say Foo.new(a => 1) 02:10
camelia rakudo-moar f583f2: OUTPUT«Cannot call Foo.new with these named parameters: a␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
Zoffix ¯\_(ツ)_/¯
tbrowder lizmat: okay, but in my defense. 02:11
Zoffix "<lizmat> if you set TEST_JOBS=8 on an i7, it takes around 4 minutes nowadays" really? 02:12
Man, I need an upgrade :|
tbrowder lizmat: (once more) okay, but, in my defense, I think I said in each recent PR review request, that I had done the table tests (thereby implying no full spec test). I will fix the problem, do the full spec test, and resubmit. 02:14
02:19 AndyBotwin left
Zoffix m: say 335/60 02:19
camelia rakudo-moar f583f2: OUTPUT«5.583333␤»
Zoffix Takes 5.5 mins on my VirtualBox with i5 in host. But it hangs a lots of times and I dunno why :/ 02:20
02:20 Zoffix left 02:22 ChoHag joined 02:23 travis-ci joined
travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'doc Any.deepmap' 02:23
travis-ci.org/perl6/doc/builds/143489568 github.com/perl6/doc/compare/b42b0...f2534e6ed5
02:23 travis-ci left 02:28 aindilis joined 02:29 buharin left
sortiz m: 02:38
02:46 xtreak joined 02:50 buharin joined 02:52 noganex_ joined 02:53 BrassLantern joined, BrassLantern left, BrassLantern joined 02:55 noganex left 03:00 huggable joined 03:01 xtreak left 03:06 TEttinger joined
BenGoldberg m: say 1⁄4 03:07
camelia rakudo-moar f583f2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say 17⏏5⁄4␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ statement modifier␤ state…»
Xliff_zzz Does anyone know of a module that can take a hash and turn it into XML? 03:10
Or any data struct, really.
Hmmm.... let's try XML::Class 03:12
Urgh. No. XML::Class is too heavy 03:14
BenGoldberg What about the XML class? 03:16
github.com/supernovus/exemel
or XML::Writer ? 03:17
03:20 labster left 03:23 skids left 03:25 Senji joined 03:29 kid51 joined 03:32 sortiz left
Xliff_zzz XML is too low level. I don't want to have to think about the nodes. I just want to pass a hash or array and have it do the conversion. 03:38
No docs for XML::Writer. 03:39
03:41 z3ndrag0n joined 03:48 Herby_ left 03:49 kid51 left 03:56 canopus left 03:57 kaare_ joined 04:05 canopus joined 04:12 rgrinberg left 04:18 BrassLantern left 04:21 labster joined
gtodd how "general" is the implementation of "." and ".=" for method calls ... is it an just another perl6 operator (a "function") ? 04:28
04:32 khw left
gtodd the function and method versions of "lc" for example are same-ishly consistent and return but don't change the string they are pointed at. But with the method you can use ".=" e.g.: my $word="Horse" ; lc($word) ; say $word; $word.lc ; say $word; $word.=lc; say $word; and do the changes in place ... 04:34
geekosaur <op>= is a meta-operator; `x <op>= y` is `x = x <op> y` except x is only referenced once. this works for `.` as it does for e.g. `+` 04:44
gtodd ok thanks ... noticed that say ruby has differently named functions .downcase and .downcase! (which make it seem like the syntax is in the function name?) ... whereas perl6 seems to leverage operators (and sigils twigils etc.) to great effect. 04:46
geekosaur ruby is channeling smalltalk with the suffix ! meaning mutating
04:47 dupek joined
geekosaur but they are distinct methods and iirc ruby does not actually check that foo and foo! are the same except that the latter mutates in place 04:47
parabolize pretty sure its just a convention 04:48
geekosaur (I should say #foo and #foo!)
04:48 Cabanossi joined
geekosaur nor does it automagically create mutating methods for you, if you have #foo then you can't use #foo! and have it figure out to create that (absent some horrid metaprogramming, which would be rather scary for this usage) 04:51
04:54 djbkd joined 04:56 dupek left 05:05 dj_goku joined, andrzejku joined 05:16 andrzejku left, dupek joined 05:17 dupek left, andrzejku joined 05:44 domm joined 05:53 TEttinger left 05:55 loren joined 06:03 TEttinger joined 06:08 djbkd left 06:14 molaf left 06:20 CIAvash joined 06:22 samb1 joined 06:29 andrzejku left 06:36 yguo joined 06:40 yguo left 06:51 RabidGravy joined 06:55 espadrine left 06:59 yguo joined 07:00 huggable left, huggable joined 07:02 espadrine joined, yguo left 07:04 yguo joined, kurahaupo joined 07:06 Actualeyes left 07:12 wamba joined 07:14 yguo left 07:18 darutoko joined 07:19 Actualeyes joined 07:22 kurahaupo left 07:23 holyghost joined 07:25 setty1 joined 07:47 wamba left 07:53 holyghost left 08:09 loren left 08:19 firstdayonthejob joined 08:26 pdcawley joined 08:28 holyghost joined, holyghost left 08:33 labster left 08:36 RabidGravy left 08:58 maybekoo2 joined 09:03 loren joined 09:05 AlexDaniel joined 09:06 BenGoldberg left 09:14 FROGGS joined 09:24 iH2O joined 09:25 grondilu joined 09:38 dalek joined, ChanServ sets mode: +v dalek 10:03 iH2O left 10:04 pyrimidi_ joined, jjido joined 10:05 firstdayonthejob left 10:16 hankache joined
hankache morning #perl6 10:16
10:19 loren left 10:23 AlexDaniel left
lizmat morning hankache! 10:23
hankache hi lizmat
lizmat++ for all the speed improvements. Each time i see XYZ about X time faster. 10:27
lizmat hankache: sometimes the win is really in fewer allocations, causing fewer GC's 10:29
but that's very hard to put a finger on
hankache lizmat how do you measure the speed? I'd like to test different ways of doing the same things and see which one is faster. 10:31
lizmat time perl6 -e
and perl6 --profile
hankache normally i do "now - init now" but it is getting cumbersome 10:32
aha ok
would you run the same script multiple time and average the time or just once? 10:33
lizmat run it at least 3 times with 10 second intervals, take the lowest 10:34
also run an empty loop to find out the overhead
hankache thanks lizmat. or should i say lizmagic :) 10:35
lizmat don't make me blush :-)
hankache lizmagic lizmagic lizmagic lizmagic 10:36
:D
lizmat *blush* :-) 10:37
10:48 rindolf joined 10:49 ely-se joined, ely-se is now known as rightfold 10:52 TEttinger left
cognominal In some Perl6 package distros, I see xt/ in addition to t/ . It seems that tests that are not run during the install. This seems to defeat the purpose of tests. Example of such package : github.com/skaji/mi6 10:52
10:53 kurahaupo joined
arnsholt IIRC you have the same convention on CPAN; IIRC they're called author tests 10:58
cognominal thx arnsholt
arnsholt Basically tests only intended to be run by the author
hankache cognominal xt are tests that are run only by the author 10:59
cognominal hi hankache
hankache ex: make sure that META is ok etc.
salut cognominal
11:00 huggable left, huggable joined 11:02 wamba joined 11:07 wamba left, wamba joined 11:10 loren joined 11:30 kurahaupo left 11:32 loren left
MasterDuke .tell AlexDaniel github.com/perl6/bisectbot/pull/1 11:42
yoleaux MasterDuke: I'll pass your message to AlexDaniel.
11:45 Senji left, Senj joined 11:46 jjido left
wamba m: class SortedMap { has $.pok = 1; };   my $a = SortedMap.new();say $a.pok 11:47
camelia rakudo-moar 4e4039: OUTPUT«1␤»
wamba m: class SortedMap is Map { has $.pok = 1; };  my $a = SortedMap.new();say $a.pok 11:48
camelia rakudo-moar 4e4039: OUTPUT«(Any)␤»
11:49 kid51 joined
timotimo ah, Map won't delegate to BUILDALL in its "new" constructor 11:53
lizmat wamba: you realize that Map is immutable, so Map.new creates an empty Map that you cannot change
wamba m: class SortedMap is Hash { has $.pok = 1; };  my $a = SortedMap.new();say $a.pok 11:54
camelia rakudo-moar 959cd3: OUTPUT«(Any)␤»
lizmat ok, so you really want to create a SortedHash
11:57 iH2O joined, jjido joined, AlexDaniel joined
AlexDaniel . 11:57
yoleaux 11:42Z <MasterDuke> AlexDaniel: github.com/perl6/bisectbot/pull/1
lizmat wamba: please rakudobug this 11:59
AlexDaniel MasterDuke: nice! There's one weird thing though 12:00
MasterDuke: 「if ($exit == 0) {」 – it looks like we want to print the output anyway 12:01
MasterDuke: even if the exit code is non-zero
12:01 Senji joined
dalek sectbot: 874f092 | (Daniel Green)++ | / (2 files):
Add a new bot that will run code at the given commit
12:01
sectbot: 06ec04d | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files):
Merge pull request #1 from MasterDuke17/committable

Add a new bot that will run code at the given commit
AlexDaniel MasterDuke: also it does not cut the output if it's way too long :) 12:02
12:02 jjido left
AlexDaniel MasterDuke: but it's a good starting point, yeah 12:02
12:03 Senj left 12:04 cognominal left
dalek c: 128e0c9 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
Replace the search placeholder with a single unicode sign.
12:04
12:05 Actualeyes left 12:06 kaare_ left
tbrowder mornin' #perl6 12:06
lizmat: sorry about the last PR 12:07
wamba m: class SortedMap is Hash { my $pok = 1; method pok ( $value? ) { with $value {  $pok = $_ } else { $pok } } }; 12:08
camelia ( no output )
wamba my $a = SortedMap.new("a" => 2, "b" => 3 );say $a.pok(2),$a.keys,$a.pok
m: class SortedMap is Hash { my $pok = 1; method pok ( $value? ) { with $value {  $pok = $_ } else { $pok } } }; my $a = SortedMap.new("a" => 2, "b" => 3 );say $a.pok(2),$a.keys,$a.pok 12:09
camelia rakudo-moar 959cd3: OUTPUT«2(a b)2␤»
wamba I try this make with has $.pok. How is it possible? 12:12
timotimo you can mix a trait into the instance
m: role Sorted { has $.pok = 1 }; my %foo = a => 1, b => 2; %foo does Sorted; say %foo.perl; say %foo.pok 12:13
camelia rakudo-moar 959cd3: OUTPUT«{:a(1), :b(2)}␤1␤»
timotimo m: role Sorted { has $.pok = 1 }; my %foo = a => 1, b => 2; %foo does Sorted; say %foo.perl; say %foo.pok; %foo.pok = 99; say %foo.pok
camelia rakudo-moar 959cd3: OUTPUT«{:a(1), :b(2)}␤1␤Cannot modify an immutable Int␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: role Sorted { has $.pok is rw = 1 }; my %foo = a => 1, b => 2; %foo does Sorted; say %foo.perl; say %foo.pok; %foo.pok = 99; say %foo.pok
camelia rakudo-moar 959cd3: OUTPUT«{:a(1), :b(2)}␤1␤99␤»
12:15 cognominal joined 12:18 hankache left
tbrowder lizmat: As I tossed and turned last night, I thought about what I had done that might have had coupling outside the modified file (Pod.nqp) and the only thing was a sub rename. I just checked and, sure enough, that is used in Grammar.npq, hence the exception on a test that happened to need it. Thus showing the need for a full spec test. Another way I could 12:19
have avoided the problem would have been to do a make realclean which should have caught the sub rename and missing sub. Anyhow, I will fix the reverted PR, do a full spec test, and resubmit. And I will try to stick with that process in the future.
wamba timitimo: thank you, with Map works too 12:23
m: role Sorted { has $.pok is rw = 1 }; my $a = Map.new("a" => 1, "b" => 2); $a does Sorted; say $a.perl; say $a.pok; $a.pok =
99; say $a.pok
camelia rakudo-moar 959cd3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3orted; say $a.perl; say $a.pok; $a.pok =7⏏5<EOL>␤ expecting any of:␤ prefix␤ term␤»
wamba m: role Sorted { has $.pok is rw = 1 }; my $a = Map.new("a" => 1, "b" => 2); $a does Sorted; say $a.perl; say $a.pok; $a.pok = 99; say $a.pok
camelia rakudo-moar 959cd3: OUTPUT«Map+{Sorted}.new((:a(1),:b(2)))␤1␤99␤»
12:24 AlexDaniel left 12:25 sena_kun joined
dalek c: 38b77c4 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
Move CSS from sourounging div to input element to allow for resize on
12:26
12:26 Actualeyes joined
gfldex ENEEDMORETEA 12:26
12:27 rightfold left 12:28 iH2O left 12:39 skids joined
dogbert17 o/ #perl6 12:40
m: my $capture = \(2, 3, apples => 2); say $capture.Str;
camelia rakudo-moar 959cd3: OUTPUT«2 3 apples 2␤»
dogbert17 so someone has already fixed the Capture.Str problem, impressive 12:41
do we still need and RT for this? 12:43
s/and/an/
gfldex no 12:44
timotimo just a test would probably be enough; but that might already exist, to
12:46 yqt joined
dogbert17 gfldex: ok 12:47
12:58 kurahaupo joined 13:08 hankache joined 13:12 maybekoo2 left, espadrine left, loren joined
dogbert17 strange, the recently documented deepmap method is not present in the search box 13:16
ah, I see what the problem is, should I fix it? 13:17
arnsholt Can't see why not =) 13:23
dogbert17 ok, will fix 13:24
13:25 kurahaupo left, kurahaupo joined, kurahaupo left
arnsholt And if there turns out to be a reason not to, it's straightforward to revert a change. That's what version control is for, after all =) 13:26
13:28 espadrine joined
dalek c: e268500 | (Jan-Olof Hendig)++ | doc/Type/Any.pod6:
Make Any.deepmap available in the search box
13:30
13:36 yqt left
arnsholt dogbert17++ 13:36
dogbert17 anyone know what this 'is nodal' trait is? 13:43
timotimo it's about hyper operators
whether it should descend into structures or not
like >>.elems on a nested list wouldn't make sense if it descended
because it'd turn [[1, 2, 3], [9, 9, 9, 9]] into [[1, 1, 1], [1, 1, 1, 1]]
dogbert17 timotimo: so if you want something to descend it should have the 'is nodal' ? 13:44
psch m: say &elems.^can('nodal') 13:46
camelia rakudo-moar 959cd3: OUTPUT«(nodal)␤»
dogbert17 hmm, maybe I should read up on this 13:47
atm, the docs is a bit lacking: docs.perl6.org/routine/is%20nodal 13:48
psch m: say &say.^can('nodal') 13:49
camelia rakudo-moar 959cd3: OUTPUT«()␤»
psch m: [[1,2],[3,4]]>>.say
camelia rakudo-moar 959cd3: OUTPUT«1␤2␤3␤4␤»
psch m: say [[1,2],[3,4]]>>.elems
camelia rakudo-moar 959cd3: OUTPUT«(2 2)␤»
13:50 mst joined, mst_ joined
dogbert17 psch: thx for the examples, I have to admit that I haven't looked into hyper operators yet. My loss it would seem.. 13:51
13:51 loren left
tbrowder [Coke]: ref yesterday's advive to see RT page <rt.perl.org/Prefs/Other.html>, I have seen that page before and used it, but I still don't see the issue I own on the top 10. I have filed a support request with perlbug-admin. 13:52
13:56 kaare_ joined, mst left, mst_ left 13:57 mst joined, brrt joined 13:59 khw joined
dalek c: 4f7ece0 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
doc is nodal
14:00
14:00 jjido joined
dogbert17 gfldex++ 14:05
dalek c: cf6f118 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
remove more blueness from sidelined ToC
14:07
14:07 TakinOver left 14:11 andrzejku joined 14:21 brrt left 14:26 jjido left, cdg joined 14:31 z3ndrag0n left, bpmedley joined 14:32 z3ndrag0n joined 14:34 cdg left
hankache i was trying to provide the method render of Pod::To::HTML with a string containing pod. Unfortunately it is not working. Any ideas what I should do? 14:35
the pod is a separate file
gfldex hankache: you have to eval it
hankache: $pod = (EVAL ($io.slurp ~ "\n\$=pod")); 14:36
replace the $io.slurpy with your pod string
14:47 brrt joined
dalek sectbot: 5cba60d | (Daniel Green)++ | committable.pl:
Include the error code with the reply if it's non-zero
14:53
sectbot: c04e228 | (Aleks-Daniel Jakimenko-Aleksejev)++ | committable.pl:
Merge pull request #2 from MasterDuke17/committable

Include the error code with the reply if it's non-zero
14:55 AndyBotwin joined, kaare_ left 14:56 kaare_ joined
hankache gfldex not working :( 14:59
the file contains =begin pod and =end pod with multiple lines in it 15:00
15:00 huggable left, huggable joined
gfldex hankache: can you provide source code? 15:00
timotimo i think we should have a saner way to get at an evaluated code's pod data ... maybe something like CTXSAVE? PODSAVE :)
at the end of parsing, it'll just call $*PODSAVE($=pod) from inside the parser 15:01
hankache gfldex gist.github.com/hankache/f5319b907...a6dd26802c 15:03
gfldex basically what i am trying to do is provide my own header & footer. But i can't even render the pod. 15:04
i can do perl6 --doc=HTML test.pod6 > test.html but i was trying to figure out a way to give it my own c 15:05
my own css
after i looked at the code in Pod::To::HTML i saw that the method pod2html accepts $head and $footer and i can use them to inject my css and js 15:06
this is ultimately what i want to achieve 15:07
15:12 andrzejku left, hankache_ joined, hankache_ left 15:15 hankache left 15:19 AndyBotwin left 15:21 hankache joined, girafe joined 15:22 firstdayonthejob joined, Zoffix joined
Zoffix What's a simple way to blow up a failure? 15:22
timotimo CALL-ME will immediately throw it 15:23
15:24 Senji left 15:25 Khisanth joined, hankache left
Zoffix hm 15:26
What is happening here? Is it some sort of laziness? gist.github.com/zoffixznet/9e6fc8d...776c2600c6 ? 15:27
I'm trying to make it blow up without `say`. Using `~` with something works, but I can't use it in cases when it doesn't blow up because in those a type object is returned. 15:28
gfldex .tell hankache please update your Pod::To::HTML and follow github.com/perl6/Pod-To-HTML/blob/...e-files.p6 15:29
yoleaux gfldex: I'll pass your message to hankache.
timotimo i don't think i get it
Zoffix Oh, calling .gist does the trick
15:30 maybekoo2 joined, firstdayonthejob left 15:31 RabidGravy joined 15:34 holyghost joined 15:48 firstdayonthejob joined 15:49 domidumont joined, bpa joined 15:54 domidumont left 15:55 holyghost left, domidumont joined 15:57 canopus left
bpa p6: say ().WHAT; say ((1,2),(3,4)).flat; 15:57
camelia rakudo-moar 959cd3: OUTPUT«(List)␤(1 2 3 4)␤»
bpa p6: say [].WHAT; say [(1,2),(3,4)].flat; 15:58
camelia rakudo-moar 959cd3: OUTPUT«(Array)␤((1 2) (3 4))␤»
bpa Is this on purpose that List and Array have different behavior for flat?
timotimo an array is a list of scalar containers
15:58 rgrinberg joined
timotimo so anything inside a list is scalar'd, and thus protected from flattening 15:58
m: say ($(1,2),$(3,4)).flat 15:59
camelia rakudo-moar 959cd3: OUTPUT«((1 2) (3 4))␤»
timotimo ^- basically the same thing. more or less, anyway
16:00 domidumont left
bpa Is there an easy way to allow Array to use list's behavior, or do you need to create a new List? 16:01
timotimo tbh, i always forget how to do this :)
m: say [(1,2),(3,4)]>>.List.flat
camelia rakudo-moar 959cd3: OUTPUT«(1 2 3 4)␤»
bpa ok, that's perfect 16:03
p6: my @a = ((1,2),(3,4)); say @a.List.flat;
camelia rakudo-moar 959cd3: OUTPUT«(1 2 3 4)␤»
Zoffix .ask tbrowder can this be closed? rt.perl.org/Ticket/Display.html?id=128087
yoleaux Zoffix: I'll pass your message to tbrowder.
bpa The sad thing is that I tried lower case list and forgot the upper case version 16:04
p6: my @a = ((1,2),(3,4)); say @a.list.flat; 16:05
camelia rakudo-moar 959cd3: OUTPUT«((1 2) (3 4))␤»
bpa thanks
timotimo m: my @a = (1, 2), (3, 4); say @a.WHAT; say @a.list.WHAT; say @a.List.WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Array)␤(Array)␤(List)␤»
timotimo m: say Array ~~ List 16:06
camelia rakudo-moar 959cd3: OUTPUT«True␤»
timotimo that's why, i'd guess
16:07 canopus joined 16:10 rindolf left, domidumont joined 16:13 brrt left 16:15 rindolf joined
tbrowder Zoffix: I think #128087 should stay open unless we don't want a man page eventually (and in that case all mention of it needs to be eliminated). 16:19
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128087
yoleaux 16:03Z <Zoffix> tbrowder: can this be closed? rt.perl.org/Ticket/Display.html?id=128087
tbrowder yoleaux: I think #128087 should stay open unless we don't want a man page eventually (and in that case all mention of it needs to be eliminated). 16:20
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128087
tbrowder Zoffix: why the need for msg passing? 16:21
Zoffix tbrowder, but what docs did you mean? The other comment on the ticket is saying the docs included with rakudo are dev wiki and isn't suitable for man pages.
tbrowder okay, let me look closer... 16:22
dalek c: f3f3518 | (Wenzel P. P. Peppmeyer)++ | template/search_template.js:
change default value for #query in the template
c: 9bd1d93 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
add autogeneration warning to search_template.js
tbrowder Zoffix: okay, I see the confusion. Close #128087 and I'll submit another version. 16:27
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128087
tbrowder (grumble) RT is sure hard to read sometime... 16:28
16:30 sortiz joined, BenGoldberg joined
Zoffix Closed. Thanks. 16:33
16:39 noganex_ left
pmichaud good morning, #perl6 16:42
I have an RT question.
16:42 cdg joined
pmichaud actually, let me try something and see if I still have that question. 16:42
16:44 noganex joined 16:46 domidumont left
sortiz \o pmichaud 16:48
timotimo hey pm 16:49
glad to see you around
pmichaud m: say -1 ** -0.1 # RT 128584 16:51
camelia rakudo-moar 959cd3: OUTPUT«-1␤»
pmichaud m: say (-1) ** -0.1 # RT 128584
camelia rakudo-moar 959cd3: OUTPUT«NaN␤»
16:52 Senji joined
pmichaud and my RT question answered itself, so nevermind. :) 16:53
sortiz m: say "a".Numeric ~~ Failure 16:54
camelia rakudo-moar 959cd3: OUTPUT«True␤»
BenGoldberg m: "a".Numeric.WHAT.say 16:55
camelia rakudo-moar 959cd3: OUTPUT«(Failure)␤»
sortiz m: say "a".Int ~~ Failure
camelia rakudo-moar 959cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
sortiz That inconsistency bothers me.
pmichaud it bothers me also
BenGoldberg rakudobug it!
pmichaud testing for Failure should not cause it to be thrown. 16:56
BenGoldberg Of course, you'll have to change the specs and tests, too.
pmichaud I suspect that one isn't tested.
BenGoldberg m: "a".Int.WHAT.say
camelia rakudo-moar 959cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
pmichaud my understanding of the design is that "a".Int ~~ Failure should return true
it looks to me as though "a".Int is being overeager
BenGoldberg Or it's actually, you know, throwing an exeption instead of failing. 16:57
psch m: try "a".Int; say $!.perl
camelia rakudo-moar 959cd3: OUTPUT«X::Str::Numeric.new(source => "a", pos => 0, reason => "base-10 number must begin with valid digits or '.'")␤»
pmichaud according to src/perl6/Str.pm, I don't see anything there that will generate a Failure. 16:58
sortiz Yep, Numeric fails, but Int throws
pmichaud or it may be throwing simply because Failure.Int throws 17:00
17:00 Zoffix left
pmichaud Str.Int is implemented as Str.Numeric.Int 17:00
so Str.Numeric produces the Failure, and then .Int throws it.
psch m: try "a".Numeric.Int; say $!.perl
camelia rakudo-moar 959cd3: OUTPUT«X::Str::Numeric.new(source => "a", pos => 0, reason => "base-10 number must begin with valid digits or '.'")␤»
dalek c: 499b197 | (Wenzel P. P. Peppmeyer)++ | html/js/main.js:
hitting Esc will give the search input focus
17:01
17:04 domidumont joined
sortiz So, in the general case it is better propagate Failures that throw it? 17:04
pmichaud I'm not sure.
Because Failure.Str should almost certainly throw 17:05
sortiz Sure.
pmichaud so what makes .Str different from .Int?
It seems to me the correct answer is that Str.Int has to be a bit smarter about handling Failure, and not just delegating it to .Numeric 17:06
arnsholt I don't think I can think of any methods that should *not* throw when called on Failure, TBH 17:07
psch m: say "a".Numeric.defined
camelia rakudo-moar 959cd3: OUTPUT«False␤»
pmichaud feels like it should be .Int with Str.Numeric or something like that (if I understand "with" correctly)
sortiz See this case: 17:08
m: for ^3 { say ([min] Failure.new, |(Str xx $_)).WHAT; }
camelia rakudo-moar 959cd3: OUTPUT«(Num)␤(Failure)␤(Num)␤»
pmichaud m: say (.Int with "3".Numeric) 17:09
camelia rakudo-moar 959cd3: OUTPUT«3␤»
pmichaud m: say (.Int with "3".Numeric).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Int)␤»
pmichaud m: say (.Int with "a".Numeric).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
pmichaud okay, not "with" then. 17:10
sortiz m: (Failure.new min Str) ~~ Failure # Propagated
camelia ( no output )
sortiz m: say (Failure.new min Str) ~~ Failure # Propagated 17:11
camelia rakudo-moar 959cd3: OUTPUT«True␤»
pmichaud yes, but comparison operators are explicitly propagated per S03
sortiz m: say min(Failure.new.Str) ~~ Failure; # Throwed
camelia rakudo-moar 959cd3: OUTPUT«Failed␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: if "a".Numeric -> \success { say success.Int.WHAT } else -> \failure { say failure.WHAT };
camelia rakudo-moar 959cd3: OUTPUT«(Failure)␤»
pmichaud m: say ("a".Numeric.?Int).WHAT 17:12
camelia rakudo-moar 959cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg Something like that ^ inside of Str.Int, I think.
pmichaud Oh!
BenGoldberg Hmm?
17:13 sftp joined
pmichaud m: say "a".Numeric.defined 17:13
camelia rakudo-moar 959cd3: OUTPUT«False␤»
sortiz When not propagated, we need a 'try', otherwise we can handle in smart ways. 17:14
m: without "a".Numeric { dd $_ };
camelia rakudo-moar 959cd3: OUTPUT«Failure.new(exception => X::Str::Numeric.new(source => "a", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new)␤»
sortiz m: without "a".Numeric { say $_.handled }; 17:15
camelia rakudo-moar 959cd3: OUTPUT«True␤»
pmichaud I think the correct answer is that Str.Int has to be smarter about returning Failure somehow.
self.Numeric.Int is going to cause an unwanted throw
17:16 AlexDaniel joined 17:17 rgrinberg left
pmichaud IMBNI to have a method call syntax that propogates a Failure 17:17
i.e., $foo.?!method() returns $foo unchanged if $foo is a Failure 17:18
17:19 bpa left
BenGoldberg Ooh, could that be written as ‽ 17:19
pmichaud I'd be fine with using the interrobang for that, yes. 17:20
BenGoldberg notes that one can usefully google search for ‽, but searching for ?! does not produce anything useful. 17:21
pmichaud anyway, perhaps bring that suggestion up with TimToady, unless someone already knows of a convenient "propagate Failure" syntax. 17:22
and I think it perhaps has to be Failure/Exception specific, a simple definedness check might not be good enough (since testing a Failure for definedness marks it as handled, and we don't want that here.) 17:25
17:25 jack_rabbit left
pmichaud definitely "a".Int ~~ Failure is worth a rakudobug or specbug issue (or both) 17:25
gotta go -- bbl 17:26
sortiz Thanks pmichaud
llfourn m: my %h = %( foo => "bar"); my (:$foo) := %h; say $foo 17:48
camelia rakudo-moar 959cd3: OUTPUT«bar␤»
llfourn m: my %h = Hash.new( foo => "bar"); my (:$foo) := %h; say $foo
camelia rakudo-moar 959cd3: OUTPUT«(Mu)␤»
llfourn shouldn't those both work?
oh right Hash.new needs a list nvm =( 17:50
m: my %h = Hash.new( "foo","bar"); my (:$foo) := %h; say $foo
camelia rakudo-moar 959cd3: OUTPUT«bar␤»
pmichaud m: say ("3".Numeric andthen .Int) 17:55
camelia rakudo-moar 959cd3: OUTPUT«3␤»
pmichaud m: say ("3".Numeric andthen .Int).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Int)␤»
pmichaud m: say ("a".Numeric andthen .Int).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
pmichaud m: say ("a".Numeric).WHAT 17:56
camelia rakudo-moar 959cd3: OUTPUT«(Failure)␤»
pmichaud m: say (Int andthen 3).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
pmichaud that's a rakudobug.
psch m: say ((Nil andthen 2) orelse "foo") 17:57
camelia rakudo-moar 959cd3: OUTPUT«-> ;; $_ is raw { #`(Block|80393968) ... }␤»
psch ...i *might* just be doing something really weird, though
timotimo that's ... interesting?
17:58 AlexDaniel left
pmichaud files rakudobug. 17:58
psch i don't have an intuition for andthen and orelse, but it might kinda follow natrually from what pmichaud++ showed
as in, from the bug there
llfourn where is the bug?
pmichaud Anyway, for Str.Int one could write Str.Numeric andthen .Int except for the fact that "andthen" likely marks the Failure as being handled.
andthen returns the first undefined argument
17:59 rurban_ joined
llfourn oh ok 17:59
pmichaud files rakudobug.
m: say (Int andthen 3) 18:00
camelia rakudo-moar 959cd3: OUTPUT«()␤»
pmichaud m: say (Int andthen3).WHAT
camelia rakudo-moar 959cd3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say (Int7⏏5 andthen3).WHAT␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ stat…»
pmichaud m: say (Int andthen 3).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
pmichaud say Int 18:02
m: say Int
camelia rakudo-moar 959cd3: OUTPUT«(Int)␤»
llfourn according to design docs: If you wish to have the same semantics in the opposite order, use the with statement modifier.
but Slip is the right answer for with
pmichaud I want this ordering of semantics for this case.
llfourn so it seems that they designers were somewhat confused on this point 18:03
m: say ( "foo" with Int ).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
pmichaud No, I don't think they're confused.
I just think "andthen" has a rakudobug.
llfourn m: say (Int andthen 3).WHAT 18:04
camelia rakudo-moar 959cd3: OUTPUT«(Slip)␤»
timotimo remembers mucking around with andthen and orelse because of the feature matrix saying they had something missing
18:04 rurban_ left
llfourn but you think that is te wrong answer right? 18:04
pmichaud According to S03, that's the wrong answer, yes.
llfourn it's the right answer if andthen is a backwards with though
pmichaud Okay, so S03 is self-contradictory on that point. 18:05
llfourn yes :)
psch m: say (Int andthen 3).perl
camelia rakudo-moar 959cd3: OUTPUT«slip()␤»
psch that is all kinds of wrong
pmichaud The whole point of "andthen" was to have a way to return the first undefined value
psch m: say (1 andthen 3).perl
camelia rakudo-moar 959cd3: OUTPUT«3␤»
pmichaud so you can say foo() andthen .dothis andthen .dothat andthen .doother
llfourn no argument here that makes sense 18:06
pmichaud and have it do all of the method calls as long as the results are defined, but short-circuit if anything in the chain returned an undefined result
it's not exactly the same purpose/semantic as "with"
pmichaud files specbug 18:07
llfourn pmichaud++
m: say ("foo" andthen .uc) # does it set $_... 18:08
camelia rakudo-moar 959cd3: OUTPUT«FOO␤»
llfourn hmm that's handy
psch oh hm 18:12
pmichaud right
psch doesn't that mean that (Nil andthen ...) *should* return an empty Slip? 18:13
or should it return Nil, or Empty..?
pmichaud I'd think it should return Nil
m: say Nil.defined
camelia rakudo-moar 959cd3: OUTPUT«False␤»
pmichaud andthen returns its first undefined argument.
psch m: class A { method defined { False } }; say (A andthen "foo")
camelia rakudo-moar 959cd3: OUTPUT«()␤»
pmichaud m: class A { method defined { True } }; say (A andthen "foo") 18:14
camelia rakudo-moar 959cd3: OUTPUT«foo␤»
18:14 canopus left 18:16 sena_kun left
pmichaud also, I'd be really happy / fine if "andthen" changed its semantics to test for Failure/Exception rather than simple definedness 18:16
and have a different operator that does a definedness check-and-return-lhs-if-undef 18:17
moritz !//
pmichaud I thought about !//, yes :)
llfourn is there a Bool version of andthen (like && but sets $_)? 18:18
psch i really liked discovering [R//]= due to damians talk that complained about exactly that missing
moritz fwiw "andthen" is in light use in the ecosystem
pmichaud llfourn: if $val -> { ... }
psch like, assign iff the rhs is defined
pmichaud moritz: yes, but I'm finding places where it ought to be heavily used in core
and I suspect the ecosystem should be using it as well if we want robust failure handling. 18:19
moritz in Native::LibC and DBIish for environment variables, where checking for Failuer wouldn't make a difference
and in Net::HTTP several times
and once in ArrayHash
pmichaud I was also thinking we could have funny ternaries: $val ?//? "defined" !! "not defined" 18:20
psch having that easily available probably depends on un-special casing ?? !!
pmichaud oh, I wasn't thinking it'd be meta
just one or two more special cases 18:21
18:21 canopus joined
pmichaud it could just be ?// though. 18:21
This way lies madness.
psch right, i'm just saying that stuffing more special cases in the grammar - especially considering there will be users that want to implement variations themselves - would probably be a bad idea
pmichaud well, macros may be the answer.
psch and having ternary as another categorical can only be better than not having them 18:22
pmichaud I'm not sure the parser would cope well with that.
psch i have been told it's a mid- to long-term goal, but i haven't looked at it at all
pmichaud interestingly: 18:23
perhaps could meta infix ops with a -> to mean "topicalize" 18:24
$val &&-> .foo
returns $val if false, otherwise invokes .foo on $val
er, backwards 18:25
no, I had that right
$val ||-> .foo returns $val if true, otherwise invokes .foo on $val
psch $x +-> .++ # i think composability has to be limited somewhat there 18:26
or it just gets really weird eventually
probably iffy, if i categorize the examples correctly
pmichaud yeah, perhaps it only works on "iffy" things
18:28 jack_rabbit joined
pmichaud anyway, I'm afk again. Need lunch, then meetings. 18:30
18:30 eugen joined
llfourn 5 _+_ .sqrt, $var _&&_ .foo # put _ around an infix to set $_ for the RHS #justathought 18:30
psch i like the pointy more there, fwiw
maybe as prefix-meta rather than as postfix meta though
timotimo have it be -- -> meta-circumfix 18:31
pmichaud if the number of affected operators is limited, it doesn't need to be meta I guess. 18:32
afk for real
er, back again with one last thought 18:33
for Failures, could have a "passthen" infix (name can be bikeshed) 18:34
timotimo bikeshod?
pmichaud so Str.Int can be written with self.Numeric passthen .Int
which returns the Failure object unchanged if self.Numeric fails, but applies .Int to any non-Failure
or, to be really weird, use "then" as the generic topicalizer 18:35
$foo andthen .Int # call .Int on $foo if true 18:36
$foo orthen .Int # call .Int on $foo if False
$foo defthen .Int # call .Int on $foo if defined
timotimo so defthen is Rwith?
pmichaud *no* 18:37
psch m: "foo" Rwith .say
camelia rakudo-moar 959cd3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3"foo" Rwith 7⏏5.say␤»
pmichaud because with returns a Slip if false
psch also, that doesn't even
timotimo oh
pmichaud the whole point of these is that they short circuit, not that they return Sips
*Slips
timotimo OK
that makes sense
18:37 PerlJam joined
pmichaud $a && $b returns $a if false 18:37
whereas $b if $a returns Slip if false 18:38
the andthen/orthen/defthen forms would also topicalize (which is why they're huffmanized to be a little larger than their counterparts) 18:39
dalek osystem: 77d2991 | ugexe++ | META.list:
Add CompUnit::Repository::Tar

  github.com/ugexe/Perl6-CompUnit--R...itory--Tar
Load modules directly from a .tar.gz archive
18:40 domidumont left
pmichaud $a andthen $b returns $a if undef; $b with $a returns Slip with undef 18:40
sortiz m: my $h = (with 'a'.Numeric { .Int } else { Failure.new($_.exception) }); .say for $h.WHAT, $h.handled; # This seems to work :) 18:41
camelia rakudo-moar 959cd3: OUTPUT«(Failure)␤False␤»
pmichaud *Slip if undef
sortiz: yes, but if I have to write that for my failure handling code then I'm not going to bother.
and writing code to handle failures should be easy.
sortiz Sure, but I want to start fixing some cases... 18:42
pmichaud and it should be fast, if it's going to be done in CORE
shorter might be given self.Numeric { when Failure { $_ }; .Int }
18:42 CIAvash left
sortiz Yep. 18:43
pmichaud m: say (given 'a'.Numeric { when Failure { $_ }; .Int).WHAT
camelia rakudo-moar 959cd3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3 'a'.Numeric { when Failure { $_ }; .Int7⏏5).WHAT␤ expecting any of:␤ statement end␤ statement modifier␤ statement modifier loop␤»
llfourn wouldn't it make more sense if andthen checked for bool like with does?
pmichaud m: say (given 'a'.Numeric { when Failure { $_ }; .Int}).WHAT
camelia rakudo-moar 959cd3: OUTPUT«(Failure)␤»
pmichaud m: say (given 'a'.Numeric { when Failure { $_ }; .Int}).handled
camelia rakudo-moar 959cd3: OUTPUT«False␤»
pmichaud yeah, the given version is shorter.
llfourn: "with" doesn't check for bool.
llfourn: "if" checks for bool. 18:44
18:44 andrzejku joined
llfourn pmichaud: err right I meant like "and" does 18:44
llfourn wonders about his brain
pmichaud llfourn: yes, I think that "andthen" would make more sense as a topicalizing form of "and"
and that testing for definedness would be "defthen"
but that boat might've sailed on us already :( 18:45
so perhaps something other than "then"
llfourn I hope the captain forgot something and has to come back quickly
psch defthen gives me a pythonic vibe
that's not necessarily bad though i suppose vOv
llfourn I like andthen and defthen etc
pmichaud llfourn: me too. See if TimToady++ likes it. :) 18:46
psch i like the concept of a iffy-applicable postfix meta topicalizer
not sure if that has to be 'then'
pmichaud psch: I'm fine if it's a prefix or circumfix meta topicalizer... I'm just not sure "meta" is the way to go. 18:47
psch but i think the *then variants are intended as plain infixes
which is probably fine too
pmichaud yes, it feels infixy to me
the main thing I'm looking for are the failthen and passthen variants :)
psch well, if users can't mark ops as iffy my only argument against making them plain infixes is moot anyway 18:48
and i'm not sure users can, fwiw
pmichaud could just shorten to "th", except that probably puns badly with the ":nth" syntax.
psch i think we do that deep in the grammar, so if anything slangs could
pmichaud andth orth defth failth passth undefth 18:49
heh
or "eth"
$foo andeth .bar 18:50
self.Numeric passeth .Int
ye olde topicalizing syntax
psch that is strangely poetic
timotimo stranglingly poetic 18:51
pmichaud okay, I really really need lunch. later 18:53
18:56 mohae joined 19:00 huggable left 19:03 cdg left 19:06 khw left 19:09 canopus left 19:15 canopus joined
gfldex any ideas for an example to doc Any.duckmap? 19:17
19:21 AndyBotwin joined
sortiz timotimo, in the meantime a new nqp p6 op like nqp::failpass(foo,stmts) can be of help, no? 19:23
timotimo what do you imagine it to do? 19:24
like defor?
sortiz Simply optimized syntactic sugar of "given foo { Failure { $_ } stmts }" 19:26
timotimo er
19:27 andrzejku left, canopus left
psch m: say %(:1a, :2b).map: *.Str; say %(:1a, :2b).duckmap: *.Str 19:29
camelia rakudo-moar 959cd3: OUTPUT«(a 1 b 2)␤{a => 1, b => 2}␤»
19:32 yqt joined
gfldex m: say %(:1a, :2b).map: *.Str; say %(:1a, :2b).deepmap: *.Str 19:32
camelia rakudo-moar 959cd3: OUTPUT«(a 1 b 2)␤{a => 1, b => 2}␤»
gfldex an example that shows the difference between deepmap and duckmap would be more helpful 19:33
19:34 labster joined 19:35 canopus joined
psch m: say %(%(:1a, :2b), :3c).deepmap: *.Str; say %($(:1a, :2b), :3c).duckmap: *.Str 19:35
camelia rakudo-moar 959cd3: OUTPUT«{a => 1, b => 2, c => 3}␤{a 1 b 2 => c 3}␤»
19:35 darutoko left
psch not sure that's really helpful though 19:35
but what i take from that is that .map goes all the way down, deepmap makes assumptions all the way through, and duckmap makes one assumption and then goes all the way through
sjn \o 19:36
sortiz In gist.github.com/salortiz/e5434418f...ac20da630d a simple fix for the discussed Str.Int issue, spectested. I'll create a PR after dinner.
19:36 yqt left
psch where "making assumption{,s}" here means "decide whether to treat a Pair as one item or two" 19:36
19:38 andrzejku joined 19:42 canopus left
wamba m: dd [1,[2]].deepmap: {$_}; dd [1,[2]].duckmap: {$_} 19:43
camelia rakudo-moar 959cd3: OUTPUT«[1, [2]]␤(1, $[2])␤»
19:46 canopus joined
wamba m: say  [1,[2]].deepmap({.Slip}); say [1,[2]].duckmap({.Slip}) 19:51
camelia rakudo-moar 959cd3: OUTPUT«[1 [2]]␤((1) (2))␤»
19:51 kaare_ left, trnh joined, domidumont joined 20:00 jjido joined 20:01 BenGoldberg left
gfldex m: my @a = [1,[2,3],4]; @a.duckmap({ $_ ~~ Int ?? $_++ !! Any }); @a[1]++; 20:04
camelia rakudo-moar 959cd3: OUTPUT«Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: my @a = [1,[2,3],4]; dd @a.duckmap({ $_ ~~ Int ?? $_++ !! Any }); @a[1]++;
camelia rakudo-moar 959cd3: OUTPUT«(1, (2, 3), 4)␤Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: my @a = [1,[2,3],4]; dd @a.duckmap({ $_ ~~ Int ?? $_++ !! Failure.new() }); @a[1]++; 20:05
camelia rakudo-moar 959cd3: OUTPUT«(1, (2, 3), 4)␤Method 'succ' not found for invocant of class 'Array'␤ in block <unit> at <tmp> line 1␤␤»
20:08 espadrine left 20:27 raiph joined 20:31 domidumont left 20:33 FROGGS left 20:42 TEttinger joined 20:46 AlexDaniel joined 20:47 cdg joined 20:57 khw joined
raiph pmichaud: Maybe:new "then" / "else" infixes that test .DEFINITE (don't handle Failures) and topicalize; "&&->" does same as "andthen", etc. for boolean ops; Promise.then fires when promise kept, .else when broken, and .chain or .ps or somesuch to chain regardless of kept/broken status? 20:58
21:05 trnh left
dalek c: 590cf0d | (Wenzel P. P. Peppmeyer)++ | doc/Type/Num.pod6:
doc sub srand
21:05
c: 64cfe4f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Num.pod6:
doc Num.rand
21:06 jjido left
AlexDaniel meh, one more time my new account on github was automatically classified as spam or something 21:08
for those who don't know: in this case you have to use the contact form to tell them that you are actually a human 21:09
and they will reply to you… several days later
21:10 eugen left
AlexDaniel for those curious, the message looks like this: files.progarm.org/2016-07-10-00110..._scrot.png 21:11
dalek c: 62486f3 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6:
doc Any.duckmap
21:12
AlexDaniel oh wow
gfldex++
21:13 mr-fooba_ left
AlexDaniel gfldex: oops, there's a typo: “inplementing” 21:14
21:15 mr-foobar joined
gfldex strangly `make test` did not spot that 21:15
dalek c: 64f2330 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Any.pod6:
fix typo
21:15 zakharyas joined 21:16 rindolf left
AlexDaniel gfldex: we have no spell checking yet 21:17
21:20 zacts joined 21:22 mohae left
raiph .tell pmichaud Maybe ".todo" (instead of .chain or .ps from earlier message ^^) to replace current ".then"? 21:27
yoleaux raiph: I'll pass your message to pmichaud.
21:28 mohae joined
ilmari m: 「5̧」 ~~ /^\d+$/ 21:39
camelia ( no output )
ilmari m: say 「5̧」 ~~ /^\d+$/
camelia rakudo-moar a88508: OUTPUT«「5̧」␤»
ilmari m: say 「5̧」.Int
camelia rakudo-moar a88508: OUTPUT«0␤»
ilmari m: say 「5̧」.chars 21:40
camelia rakudo-moar a88508: OUTPUT«1␤»
21:41 mra90 joined
ilmari m: say "⁵" ~~ /^\d+$/; say "⁵".Int 21:41
camelia rakudo-moar a88508: OUTPUT«Nil␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5⁵' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
mra90 p6: say 3; 21:42
camelia rakudo-moar a88508: OUTPUT«3␤»
awwaiid 21:44
21:44 mra90 left
gfldex m: say so Int =:= Int.WHAT; 21:45
camelia rakudo-moar a88508: OUTPUT«True␤»
gfldex m: say so Int === Int.WHAT;
camelia rakudo-moar a88508: OUTPUT«True␤»
21:45 TimToady joined
gfldex m: my Int $i; say so $i === $i.WHAT; 21:47
camelia rakudo-moar a88508: OUTPUT«True␤»
gfldex m: my Int $i; say so $i =:= $i.WHAT;
camelia rakudo-moar a88508: OUTPUT«False␤»
21:48 trnh joined, trnh left, trnh joined 21:50 rgrinberg joined 21:55 zacts left 22:02 trnh left 22:05 djbkd joined 22:11 hankache joined
hankache Inbox? 22:12
yoleaux 15:29Z <gfldex> hankache: please update your Pod::To::HTML and follow github.com/perl6/Pod-To-HTML/blob/...e-files.p6
hankache .tell gfldex thanks mate! Removing the old render candidate caused perl6 --doc=HTML to fail. I sent a PR to correct it in addition to misc. changes 22:14
yoleaux hankache: I'll pass your message to gfldex.
22:17 wamba left, andrzejku left 22:23 cognominal left 22:36 cognominal joined 22:37 firstdayonthejob left
gfldex . 22:45
yoleaux 22:14Z <hankache> gfldex: thanks mate! Removing the old render candidate caused perl6 --doc=HTML to fail. I sent a PR to correct it in addition to misc. changes
dalek c: 1b96a0d | (Wenzel P. P. Peppmeyer)++ | template/header.html:
use tooltip to tell how to focus #query
22:47 zakharyas left
AlexDaniel Esc works :O 22:56
22:56 RabidGravy left
gfldex shift-alt-f works too, if you use firefox 22:56
AlexDaniel well, I know that, because I added it, but Esc! :O 22:58
23:00 huggable joined 23:03 raiph left 23:15 hankache left 23:16 mr-foobar left 23:18 mr-foobar joined 23:23 cdg left 23:29 mr-foobar left 23:31 mr-foobar joined 23:33 setty1 left 23:40 killbill joined
dalek sectbot: cf9049a | (Aleks-Daniel Jakimenko-Aleksejev)++ | committable.pl:
Relax input restriction

Very often it is useful to use tags like “2015.10”. Previous regex did not account for that, even though it is already supported.
23:44
sectbot: 46f3639 | (Aleks-Daniel Jakimenko-Aleksejev)++ | committable.pl:
Replace newlines with “␤”
sectbot: f4ed1c8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | b (2 files):
Rename bot.pl → bisectable.pl

Given that we now have several bots in one repository, “bot.pl” is no longer a meaningful name.
23:47
23:48 zacts joined 23:50 girafe left
killbill my \Ar = '1s²2s²2p⁶3s²3p⁶'; # I need SUM of superscript digits ( electrons ). Do we have <:superscript> unicode-property? 23:50
23:51 grondilu left 23:53 mr-foobar left
AlexDaniel <[¹²³⁴⁵⁶⁷⁸⁹⁰]> ? :) 23:54
m: ‘1s²2s²2p⁶3s²3p⁶’.comb(/<[¹²³⁴⁵⁶⁷⁸⁹⁰]>/)».unival.sum.say 23:55
camelia rakudo-moar 405519: OUTPUT«18␤»
23:58 mr-foobar joined
killbill AlexDaniel: yes, it is not uniproperty but it works :) 23:58