»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by masak on 28 November 2015.
00:00 Psyche^ left
cognominal in the french tradition of $A++ obfuscation, I have 00:01
m: use nqp; my $A; $A += floor .1 + ([+] (1..10).map: { sprintf( "%b", EVAL ":16<{nqp::sha1(~rand)}>").comb.grep({ /1/ }).Int })/800; say $A 00:02
camelia rakudo-moar 04791b: OUTPUT«1␤»
cognominal which works, most of the time.
TimToady speaking of tiresome, nap & 00:03
RabidGravy boom! 00:04
bed time for me too,
masak 'night, #perl6 00:06
00:08 Coke2 joined 00:10 RabidGravy left 00:13 Skarsnik left 00:14 Coke2 left 00:17 khw joined
Zoffix m: say so '٣' ~~ /\d/ 00:22
camelia rakudo-moar 04791b: OUTPUT«True␤»
Zoffix Is there a modifier flag in P6 akin to /a in P5? I.e. where \d would match only 0..9 and not the weird Unicode stuff? 00:23
(same goes for \w)
lizmat Zoffix: <[0123456789]> ?
AlexDaniel Zoffix: what about <[0..9]> ?
Zoffix Sure, but that's not the flag :) (reason I ask, is the question came up in #perl 5)
I guess there's no real sense for it... It was my suspicion P5 didn't have it :) 00:24
s/P5/P6/;
AlexDaniel no More::Unicode; :) 00:29
Zoffix Well, that flag makes more sense in P5: <Zoffix> eval: my $input = '٣'; say $input + 42; <perlbot> Zoffix: 42
m: my $input = '٣'; say $input + 42;
camelia rakudo-moar 04791b: OUTPUT«45␤»
AlexDaniel “User-defined modifiers will be possible: m:fuzzy/pattern/;” (from S05) 00:30
yeah, fuzzy regexes. That would be great
m: say so '٣' ~~ m:codes/\d/ 00:33
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vEqyw4o_mN␤Adverb codes not allowed on m␤at /tmp/vEqyw4o_mN:1␤------> 3say so '٣' ~~ m:codes/\d/7⏏5<EOL>␤»
00:38 cdg left 00:39 Zoffix left
skids m: say +"Ⅰ" # Ah, good, that would have made things sticky. 00:39
camelia rakudo-moar 04791b: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5Ⅰ' (indicated by ⏏)␤ in block <unit> at /tmp/scIndClv2I:1␤␤Actually thrown at:␤ in block <unit> at /tmp/scIndClv2I:1␤␤»
00:46 kid51 joined 01:01 ChristopherBotto left
ShimmerFairy m: say Ⅰ; # you can use those kinds of numerals standalone, just not where positional base-10 digits are needed :) 01:13
yoleaux 10 Dec 2015 20:19Z <ZoffixW> ShimmerFairy: you've got a PR: github.com/ShimmerFairy/Lingua--EN...inal/pulls
camelia rakudo-moar 04791b: OUTPUT«1␤»
01:15 BenGoldberg joined 01:20 pierre-vigier joined 01:25 bjz left 01:37 _nadim left 01:41 rhr joined 01:43 bjz joined
lucs In P5, map() discards () values. Is there an equivalent in P6? 01:43
( s/discards/flattens/ ? ) 01:44
TimToady m: say (1,2,(),4,5).flat.perl 01:45
camelia rakudo-moar 04791b: OUTPUT«(1, 2, 4, 5).Seq␤»
TimToady m: say (1,2,(),4,5).grep(*.elems).perl
camelia rakudo-moar 04791b: OUTPUT«(1, 2, 4, 5).Seq␤»
TimToady m: say (1,2,(),4,"").grep(*.elems).perl 01:46
camelia rakudo-moar 04791b: OUTPUT«(1, 2, 4, "").Seq␤»
TimToady a good argument for not confusing strings with lists :)
lucs m: say map( {$_ > 2 ?? $_ * 2 !! () }, 1,2,3,4,3,2).flat # Feels rather heavy. How do I improve this? 01:50
camelia rakudo-moar 04791b: OUTPUT«(6 8 6)␤»
lucs (I could grep first on >2 I guess) 01:53
TimToady just return Empty instead of () 01:54
01:54 cpage_ left
TimToady then you shouldn't need a flat 01:54
m: say map( {$_ > 2 ?? $_ * 2 !! Empty }, 1,2,3,4,3,2)
camelia rakudo-moar 04791b: OUTPUT«(6 8 6)␤»
lucs Aha! That's what I was missing. 01:55
Thanks :)
TimToady m: say map( {$_ > 2 ?? $_ * 2 !! |() }, 1,2,3,4,3,2)
camelia rakudo-moar 04791b: OUTPUT«(6 8 6)␤»
TimToady same deal
lucs Oh, nice
TimToady Empty is just a degenerate Slip
01:55 pierre-vigier left
AlexDaniel m: say flatmap( {$_ > 2 ?? $_ * 2 !! () }, 1,2,3,4,3,2) 01:57
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xE_IdB_5gQ␤Undeclared routine:␤ flatmap used at line 1␤␤»
AlexDaniel hmm
m: say (1,2,3,4,3,2).flatmap: {$_ > 2 ?? $_ * 2 !! () }
camelia rakudo-moar 04791b: OUTPUT«(6 8 6)␤»
AlexDaniel it is a bit different though 01:58
01:59 pippo left 02:01 uruwi joined 02:05 pierre-vigier joined
retupmoca .tell nine it turns out any filename mangling at all on .dll files makes windows unhappy when a .dll depends on another .dll :( 02:08
yoleaux retupmoca: I'll pass your message to nine.
retupmoca .tell nine so I can't make .dll bundling for OpenSSL work :( 02:09
yoleaux retupmoca: I'll pass your message to nine.
02:10 loren joined 02:13 vendethiel left 02:20 uruwi_ joined 02:21 psy left 02:22 uruwi left 02:24 uruwi joined 02:25 uruwi_ left 02:27 yqt left
BenGoldberg m: say Splat; 02:28
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zN6yOVWrd_␤Undeclared name:␤ Splat used at line 1␤␤»
BenGoldberg m: say splat;
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nZDRFWIvNu␤Undeclared routine:␤ splat used at line 1. Did you mean 'split', 'flat', 'spurt'?␤␤»
BenGoldberg m: say !();
camelia rakudo-moar 04791b: OUTPUT«True␤»
BenGoldberg m: say |();
camelia rakudo-moar 04791b: OUTPUT«␤»
BenGoldberg m: (|()).WHAT.say; 02:29
camelia rakudo-moar 04791b: OUTPUT«(Slip)␤»
BenGoldberg m: say Slip;
camelia rakudo-moar 04791b: OUTPUT«(Slip)␤»
BenGoldberg m: say map( {$_ > 2 ?? $_ * 2 !! Slip }, 1,2,3,4,3,2)
camelia rakudo-moar 04791b: OUTPUT«Parameter '$slip' requires an instance of type Slip, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/_esd2GA2xd:1␤␤»
BenGoldberg m: say map( {$_ > 2 ?? $_ * 2 !! Slip.new }, 1,2,3,4,3,2)
camelia rakudo-moar 04791b: OUTPUT«(6 8 6)␤»
TimToady about one time in 100, we should add a "Nyaa, nyaa, nyaa!" to the end :) 02:30
ShimmerFairy TimToady: track a user's common errors and have those common errors occasionally get a "(have you really not learned yet?)" attached to it :P 02:37
TimToady "My, my, my...another missing 'my'" 02:38
03:05 jesse___ joined
AlexDaniel Parameter $slip? 03:17
zacts are there any official Perl6 t-shirts that go towards the project? 03:18
I want a camelia shirt
AlexDaniel m: say 1.map: { Slip }
camelia rakudo-moar 04791b: OUTPUT«Parameter '$slip' requires an instance of type Slip, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/yzlCGpskFO:1␤␤»
hahainternet ah timotimo thanks for linking that article 03:22
03:25 espadrine left 03:27 kid51 left 03:28 telex left 03:29 pierre-vigier left 03:30 telex joined 03:34 noganex_ joined 03:35 noganex left
AlexDaniel omg, this latest advent post is one of those things that makes me think that Perl 6 is awesome 03:36
llfourn I just read it too. Switch statements are just a specific case of composing blocks with both given and when. 03:37
I love that!
AlexDaniel and I've just figured that you can use “when” on the right hand side
m: $_ = 5; say ‘hello’ when 5 03:38
camelia rakudo-moar 04791b: OUTPUT«hello␤»
llfourn nice
03:40 Ben_Goldberg joined 03:41 vendethiel joined 03:42 BenGoldberg left
AlexDaniel m: $_ = 6; say ‘ok’ when 6; default { say ‘huh?’ } 03:43
camelia rakudo-moar 04791b: OUTPUT«ok␤huh?␤»
TimToady the modifier doens't do "succeed" 03:44
AlexDaniel m: $_ = 6; when 6 { say ‘ok’ }; default { say ‘huh?’ }
camelia rakudo-moar 04791b: OUTPUT«ok␤»
AlexDaniel hm, actually that's what I thought, but I messed something up 03:45
makes sense
03:45 cognominal left
AlexDaniel no “default” modifier though :D 03:47
TimToady there's no loop modifier either :)
AlexDaniel m: for ^5 for { say 42 } # ehh 03:49
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2AbqdP2bkF␤Missing block␤at /tmp/2AbqdP2bkF:1␤------> 3for ^5 for 7⏏5{ say 42 } # ehh␤»
AlexDaniel m: (say $_ for ^5) for ^3 03:53
camelia rakudo-moar 04791b: OUTPUT«0␤1␤2␤3␤4␤0␤1␤2␤3␤4␤0␤1␤2␤3␤4␤»
AlexDaniel nice :)
m: (for ^3 { (for ^1 { .say }) for ^2 }) for ^4 # yeeeaaah! 03:58
camelia rakudo-moar 04791b: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
AlexDaniel you can probably do the same thing with ifs. Good exercise for eyes 03:59
dwarring m: given 5 { say 'hello' when 5; say 'hi' when * % 2 }" 04:00
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pmCeMo9TzW␤Strange text after block (missing semicolon or comma?)␤at /tmp/pmCeMo9TzW:1␤------> 3ay 'hello' when 5; say 'hi' when * % 2 }7⏏5"␤»
dwarring m: given 5 { say 'hello' when 5; say 'hi' when !** % 2 }"
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s6Dm_m01Rl␤Strange text after block (missing semicolon or comma?)␤at /tmp/s6Dm_m01Rl:1␤------> 3 'hello' when 5; say 'hi' when !** % 2 }7⏏5"␤»
04:01 jesse___ left
dwarring m: given 5 { say 'hello' when 5; say 'hi' when !** %% 2 }" 04:01
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fds288pqWS␤Strange text after block (missing semicolon or comma?)␤at /tmp/fds288pqWS:1␤------> 3'hello' when 5; say 'hi' when !** %% 2 }7⏏5"␤»
dwarring m: given 5 { say 'hello' when 5; say 'hi' when * !%% 2 }"
camelia rakudo-moar 04791b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rLQGcOhbSk␤Strange text after block (missing semicolon or comma?)␤at /tmp/rLQGcOhbSk:1␤------> 3 'hello' when 5; say 'hi' when * !%% 2 }7⏏5"␤»
dwarring m: given 5 { say 'hello' when 5; say 'hi' when * !%% 2 }
camelia rakudo-moar 04791b: OUTPUT«hello␤hi␤»
04:02 vendethiel left
dwarring m: given 5 { when 5 {say "hello"}; when * !%% 2 {say "hi"}} 04:02
camelia rakudo-moar 04791b: OUTPUT«hello␤»
dwarring m: given 5 { say 'hello' when 5; say 'hi' when * !%% 2; say 'blah' when * %% 2 } 04:04
camelia rakudo-moar 04791b: OUTPUT«hello␤hi␤»
04:26 loren left 04:27 adhoc left 04:29 adhoc joined 04:30 loren joined
skids m: given 5 { { say "hello"; succeed } when 5; { say "hi" } when * !%% 2; { say "blah" } when * %% 2 } 04:42
camelia rakudo-moar 04791b: OUTPUT«hello␤succeed without when clause␤ in block <unit> at /tmp/KYHd4x836K:1␤␤»
skids m: given 5 { when 5 { say "hello"; succeed }; { say "hi" } when * !%% 2; { say "blah" } when * %% 2 } 04:44
camelia rakudo-moar 04791b: OUTPUT«hello␤»
skids m: given 5 { 42.say when 5; 43.say; } # golf 04:45
camelia rakudo-moar 04791b: OUTPUT«42␤43␤»
TimToady that is exactly how I'd expect it to behave 04:46
skids no implicit succeed on a statement modifer form?
diakopter m: given 5 { 42.say and succeed when 5; 43.say; } # golf 04:48
camelia rakudo-moar 04791b: OUTPUT«42␤succeed without when clause␤ in block <unit> at /tmp/GbLU7TMtr8:1␤␤»
TimToady that's exactly what I said earlier
it is by design, and directly contradicts what the P5 folk decided :)
diakopter that error is at least myopic 04:49
TimToady yeah, it's a bit LTA
maybe "without when block"
skids -EDIDNTBACKLOG 04:50
Yep already in design docs that way. 04:51
05:02 kaare_ joined 05:03 jack_rabbit joined
skids .seen dalek 05:09
yoleaux I saw dalek 11 Dec 2015 19:23Z in #perl6: <dalek> perl6-roast-data: review: github.com/coke/perl6-roast-data/c...085928fff0
05:16 mbrock joined 05:19 koo8 left 05:37 Ben_Goldberg left 05:44 raiph joined 05:53 mbrock left 05:54 nige1 joined 06:06 khw left 06:16 vividsnow joined 06:20 nige1 left 06:24 skids left 06:28 xpen joined 06:31 vividsnow left 06:34 vividsnow joined 06:37 xpen left 06:43 loren left, cpage_ joined 07:14 AlexDaniel left 07:24 vividsnow left 07:25 vividsnow joined 07:35 rafl joined 07:44 raiph left 07:45 jack_rabbit left, RabidGravy joined 07:46 jack_rabbit joined 07:49 loren joined 07:54 lizmat left 08:01 _nadim joined 08:02 CIAvash joined
_nadim Good Morning 08:10
08:16 darutoko joined
[Tux] test 50000 22.910 22.796 08:17
test-t 50000 18.641 18.527
csv-parser 50000 25.752 25.638 08:18
08:19 hankache joined 08:25 darutoko- joined, xfix joined 08:27 darutoko left 08:28 darutoko joined 08:29 darutoko- left 08:30 lizmat joined 08:31 darutoko- joined
lizmat good *, #perl6! 08:31
hankache hi lizmat 08:33
RabidGravy marnin 08:34
08:34 darutoko left 08:36 lizmat left 08:37 darutoko- left
hankache hi RabidGravy 08:37
08:39 spider-mario joined 08:42 lizmat joined, darutoko joined 08:43 Actualeyes joined 08:46 rindolf joined 08:48 lizmat left
_nadim A short question before everything gets buzy like a Morrocan Sook here, I have a method that I pass %options too. The options are overrides to what the class 'has'. It feels clumsy. Better to pass a class containing the options? 08:48
Woodi _nadim: replacing hash with some key with class ? 08:50
_nadim: you tried named params ?
08:50 hankache left
Woodi also "setters" for more important functionalities ? 08:51
_nadim I have not tried anything yet :) The ide was that the option_class would 'sa' all the parameters, and thus I get named parameters by default 08:52
that allows me to put the defaults in the option_class directly 08:53
what's a 'setter'? and where is it documented?
08:53 snarkyboojum left 08:54 lizmat joined
stmuk -> #lpw2015 08:54
Woodi _nadim: option class could be augmented to read some config too. depends how complicated use case is...
_nadim hmm, yes I like that ides. It's not too complicated but I'd like to get this pattern right. I am finished with the module, just don't want it too look to ugly 08:55
08:56 lizmat left
RabidGravy in fact if you wanted to simplify the code, a good choice would be to replace the attributes in the original class with a single attribute of the options class and have the handles ( ..... ) for all the previous attribute 08:58
so you don't need to change the parts of the original class that uses those original attributes
_nadim the passing of the option_class should not be too ugly either. compare dump($x, $t, {opt1 => 1, opt2 =>} ; to dump($x, $t, some::option::class.new(opt1 => 1, opt2 => 2))
RabidGravy: exactly what I want to do 08:59
RabidGravy perfect then
_nadim I just need to find out how ;)
RabidGravy on the face of it fairly simple 09:01
09:01 rurban joined
_nadim Iread that to add a module to the ecosystem one has to holler around here 09:01
09:01 firstdayonthejob left 09:02 vendethiel joined, mrf joined, mrf is now known as mrf_
RabidGravy create a PR against the ecosystem repo adding your module's META.info to the META.list and prod here and all's good 09:02
09:02 mrf_ is now known as mre 09:03 firstdayonthejob joined, hankache joined
_nadim OK, anyone up for a peer review before that? This is my firs P6 code after all. 09:04
vendethiel backlogs 09:05
_nadim: what's your module? 09:06
_nadim github.com/nkh/P6-Data-Dump-Tree 09:07
09:07 lizmat joined 09:10 loren left, lizmat left
_nadim RabidGravy: the only thing I find about the handles trait is www.jnthn.net/papers/2008-bpm-perl6oo.pdf doc.perl6.org returns noting about it. 09:10
Woodi _nadim: indentation is bit unusual :) but clear. I think pythonists would put you on MoustWanted list ;) 09:17
_nadim hmm, yes, it's the one that works with my brains, K&R is from hell ;) If pythonists opionion was important, I'd do Python and i have always found the language boring, although it is good and I have used it. 09:19
09:19 lizmat joined
Woodi _nadim: do this works for .parse output maybe ? 09:22
_nadim I sure hope it does even if I don't have the slightest idea what it is. 09:23
try it, it should. And I am interested in making it work with everything.
Woodi oki :) 09:24
_nadim one can add roles for specific classes to reduce/augment the output.
09:24 pierre-vigier joined
_nadim the whole idea is that this should make things much easier on the poor developers. With a secret agenda of making them use more complex structures. 09:25
Woodi: send me a piece of code, I want to try too
09:31 bjz left 09:33 lizmat left, leont joined 09:35 domidumont joined
vendethiel _nadim: wow, you have a very... surprising way to indent your code 09:35
09:36 bjz joined
_nadim and I use tabs too. 09:39
Woodi _nadim: I getting empty output...
09:39 domidumont left
_nadim Woodi: did you 'say' it? 09:40
Woodi _nadim: my $r = SomeGrammar.parse("....."); dump $r;
09:40 pierre-vigier left
Woodi err... 09:40
09:41 bjz_ joined, bjz left, domidumont joined
_nadim Woodi: I did not get to grammars yet. give me something I can run and I'll try dumping it. 09:41
09:41 pierre-vigier joined 09:44 psy_ joined, rindolf left
Woodi _nadim: paste.scsys.co.uk/502667 09:44
_nadim: and with 'say' things are visible :) but I get just one level what is in .perl output; do default 'depth' param is 1 ? 09:46
_nadim it's because Math has a handler, there's arole, let me try it on 09:47
09:48 firstdayonthejob left, iH2O joined
RabidGravy _nadim, if you haven't already worked it out, "handles" is an attribute trait that allows you to delegate certain methods to the value of the attribute 09:52
_nadim RabidGravy: I got that but I just haven't figured out how to use it 09:53
RabidGravy m: class B { method foo() { say "foo" } }; class C { has B $.b handles <foo> = B.new; }; C.new.foo 09:54
camelia rakudo-moar 502b88: OUTPUT«foo␤»
Woodi _nadim: also module didn't work on star-2015.09 becouse some problems with 'append'; and yesterday[--] Rakudo had problems with use lib and pre-compilation... 09:55
grondilu I went through the emacs info page lately. Can't help noticing how good is the texinfo system. I wonder how easy it will be to convert the Perl 6 doc into this format. 09:56
Woodi maybe use lib '.' isn't needed ?
grondilu: but you back on emacs thanx to vim movie ? :) 09:57
grondilu not quite yet, but I'm considering it
_nadim Woodi: this is how it will look like paste.scsys.co.uk/502668
RabidGravy I always thought texinfo was a good format but info was an awful program 09:58
Woodi a lot of keys to remember... /me never been forced enought to learn them :)
RabidGravy yeah, basically having to learn emacs in order to read documentation is a bit much 09:59
_nadim Woodi: Match is mangled, on purpose, by default. give me a some time I will give you an example. I just ran into something ;)
10:00 rindolf joined
_nadim Woodi: the good thing is that if there are things you don't want to see in the Match, you can chose not to. 10:00
Woodi _nadim: ok, have some time ;) but about Match output: can some parts like from/to/orig can be grepped out ?
o, nice, I jast asked about that :) 10:01
RabidGravy right off out for the day
10:02 Skarsnik joined
_nadim Woodi: yes, you can do whatever you want with the data you display. It's in the docs ;). a bit later we can discuss it outside this channel to reduce noise 10:03
Woodi but comparing vim and emacs keystrokes time: it's similiar, ESC : in vim takes a lot of time.
10:10 WizJin left, moei left 10:13 woodruffw left, ilogger2_ joined, telex joined, moei joined, rindolf joined
_nadim Woodi: they are in lib/Data/Dump/Tree.pod 10:13
10:13 rurban1 joined
_nadim Woodi: jusr msg'ed you, let's continue there 10:13
10:13 molaf joined 10:14 M-Illandan joined 10:15 kaare_ joined, xfix joined 10:16 telex left 10:17 bitmap_ joined, telex joined, chansen_ joined 10:18 bitmap_ is now known as bitmap, rindolf left, moei left, moei joined, silug joined, rindolf joined 10:21 stux|RC-only joined 10:23 WizJin joined 10:24 Ven joined 10:29 woodruffw joined, mephinet joined 10:38 Begi joined 10:39 yqt joined, mephinet left 10:40 mephinet joined 10:41 Ven left 10:55 leont joined 11:04 keix joined 11:10 yqt left 11:15 pierre-vigier joined, rurban joined 11:22 pierre-vigier left 11:24 sammers joined 11:33 loren joined
grondilu was thinking of day12 of advent of code and could not solve it with either deepmap or duckmap. Wonders if a deepgrep would make sense. 11:40
adventofcode.com/day/12 11:41
^oh actually this will make sense to you only if you can see the part 2 of this 11:42
(and you can't if you haven't solved part 1) 11:43
11:48 pmurias joined, Begi2 joined 11:51 Begi left 11:53 koo8 joined
grondilu m: sub deepgrep(&test, @array) { gather @array.map: { if $_ ~~ Positional { take deepgrep(&test, $$_) } elsif .&test { .take } } }; say deepgrep * %% 2, [[1], 2, [[3,4], 5], [[[]]], [[[6]]], 7, 8, []]; 11:55
camelia rakudo-moar 502b88: OUTPUT«(() 2 ((4)) () (6) 8 ())␤»
12:23 loren left 12:27 pierre-vigier joined 12:40 pierre-vigier left, kid51 joined 12:49 pierre-vigier joined
llfourn grondilu: I cleaned up your code a bit with what I learnt earlier about 'when', gist.github.com/LLFourn/99f4ccf32de604bc61b2 :) 12:50
nine Oh, dalek is down. 12:51
yoleaux 11 Dec 2015 18:23Z <ab5tract> nine: thanks for looking into it! "fix is just to abort precompilation if we encounter a dependency that we couldn't load from a precomp file". wouldn't that imply that 'no precompilation;' will bubble up from it's scope into anything which depends on it? i'm assuming not, but curious to know further. hope you enjoy(ed) the party!
02:08Z <retupmoca> nine: it turns out any filename mangling at all on .dll files makes windows unhappy when a .dll depends on another .dll :(
02:09Z <retupmoca> nine: so I can't make .dll bundling for OpenSSL work :( 12:52
nine Manual announce: I merged repository_registry in rakudo, roast, panda and Inline::Perl5. Please upgrade all in tandem.
jnthn nine++ 12:54
nine .tell retupmoca Do I understand you correctly that we may not rename libfoo.dll to 79952901E881C09690ED5B86509C32B8D6E18D6B.dll?
yoleaux nine: I'll pass your message to retupmoca.
nine jnthn: I think I'm gonna try to implement "no precompilation 'users';" so Inline::Perl5 itself can be precompiled while it's reverse dependencies may not. 12:55
12:55 hankache joined
Skarsnik why renaming lib? x) 12:56
jnthn nine: Wonder if there's a better word than "users" for that... 12:57
nine Bikeshed at will :) I'm not 100 % convinced it's the right word but lack a better idea.
jnthn Yes, dependers is clumbsy ;) 12:58
And dependencies is the wrong direction
nine Skarsnik: to avoid file system compatibility issues. But I guess they won't be that common with native libraries anyway 12:59
geekosaur nine, openssl has two dlls (libssl, libcrypto) and the former calls into the latter. that would fail if you renamed libcrypto
nine jnthn: and "users" could well refer to modules "use'ing" the current module ;)
geekosaur and afaik there's no install_name_tool to edit ssl.dll to point to the new name of crypto.dll 13:00
nine geekosaur, Skarsnik: the second reason for using those SHAs is to avoid collisions in case two distributions ship with similar named resource files. 13:01
jnthn nine: Oh, I figured that's where "users" came from
nine Ok, have to be off now. Will be back in a couple of hours.
jnthn nine: Maybe we can store the distribution resources in a directory named with the sha1 and keep the original names, for anything ending in .so, .dll, etc.
13:02 Begi2 left
Skarsnik sound like a better idea. 13:02
nine jnthn: oh I like that idea. I was also thinking about using Punycode instead of SHAs so the vast majority of resource files will keep their original name while we're still on the safe side
jnthn m: say $(1, 2) X <a b c>
camelia rakudo-moar 502b88: OUTPUT«((1 a) (1 b) (1 c) (2 a) (2 b) (2 c))␤»
jnthn m: my $x = True; while $x { FIRST { say "first" }; LAST { say "last" }; $x = False; } 13:03
camelia rakudo-moar 502b88: OUTPUT«first␤last␤»
geekosaur note that this is not windows specific; it comes up there mainly because you want to bundle C bits on Windows because they can be hard to get otherwise
llfourn nine++, your merge has fixed: RT #126878 if anyone can close it 13:04
13:10 Begi joined
jnthn I've been through the RT tickets that were filed since I made the xmas ticket list, and a number of them (13-14) made it into the list. rt.perl.org/Ticket/Display.html?id=123766 is probably pretty final. 13:17
There are a number of tickets relating to the feed operations, ==> and <==. Given they are so far from what's in the design docs, I'm pondering those becoming experimental, so we can decide later, get their threading behavior worked out, etc. We won't be able to nail all of that this side of xmas. If anyone has any objections on this one, please let me know within the next day or so. 13:18
lunch & 13:21
moritz seems that hack is hung again :( 13:28
13:30 pdcawley joined 13:32 dalek joined, ChanServ sets mode: +v dalek, sergot left
timotimo m: sub succeed(|c) { say "ha-ha!" }; given 10 { when * %% 2 { say "even" }; when * !%%2 { say "odd" }; say "booboo" } 13:33
camelia rakudo-moar bdc37f: OUTPUT«even␤ha-ha!␤booboo␤»
moritz jnthn: ==> and <== seem to be used a bit in the ecosystem, so there'd be a significatn (but not huge) cost associated with experimentalizing them 13:34
timotimo ^- we might want to either have it automatically call SUCCEED instead of succeed or we may want to look that up only in the core setting
the danger of someone "accidentally" defining a "sub succeed" and having "when" suddenly not succeed properly any more is real, IMO
also meshes well with the theme of "all-capital-letters subs and methods get called by perl6 on your behalf" 13:35
Skarsnik succeed and proceed are very confusing x)
13:35 sergot joined
moritz jnthn: MARTIMM/BSON, colomon/ABC cosimo/perl6-cache-memcached, labster/perl6-File-Find-Duplicates,masak/crypt, marcoonroad/Coro-Simple, tokuhirom/p6-Crust vendethiel/Sprockets.pl are the users of ==> 13:36
vendethiel- looks
ah, yes, I do use that, it's pretty nice :-) 13:37
ab5tract: your advent post was really great, I linked it around to a few friends who wanted to learn perl 6 :). helps demysticize 13:38
great advent posts in general. @bloggers>>++ 13:39
timotimo Skarsnik: confusing in what way? 13:40
colomon moritz: ABC doesn’t actually use ==>, those characters only appear in strings 13:41
Skarsnik It's not that obvious like break or continue
proceed for me is "exit and proceed the rest of the code" x) 13:42
moritz colomon: oh right, I misread
colomon moritz: no worries, I was just like, “Do I even know how to use ==>”?
timotimo Skarsnik: perhaps that's just "not being a native speaker"? 13:44
Skarsnik Yes, probably
dalek c: 9d7d682 | sylvarant++ | doc/Language/nativecall.pod:
Clarify that CStruct are by reference

This commit clarifies that in NativeCall CStructs are always pass by reference. This wasn't immediately clear to me when I worked on Compress::Brotli, leading to some odd behaviour.
13:46
c: 12b4542 | sylvarant++ | doc/Language/nativecall.pod:
Fix grammer
c: 703ee75 | moritz++ | doc/Language/nativecall.pod:
Merge pull request #238 from sylvarant/master

Clarify that CStructs are exchanged by reference
Skarsnik I was wondering how you pass a cstruct not by ref actually x) 13:47
timotimo the only way we have is to put it into another CStruct with "HAS"
the rest is up to ABI considerations 13:48
because a struct obviously doesn't fit into a register
13:49 pdcawley left 13:50 pdcawley joined 13:51 pdcawley left 13:57 rurban left
jnthn timotimo: The same argument could be made for any sub, including the other control operators. 13:57
Skarsnik succeed sound like a signal name x) 13:58
timotimo hm
jnthn I'm leaning towards the compiler only looking for various *types* in the setting.
(Block, Parameter, Signature...) 13:59
timotimo mhm 14:00
if someone has a use-case for overriding these, perhaps a use statement could change that behavior
llfourn m: say Int ~~ 1 #bug? 14:01
camelia rakudo-moar bdc37f: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/pyUxurVWY9:1␤␤»
timotimo llfourn: do you expect anything else?
m: say Int == 1 14:02
camelia rakudo-moar bdc37f: OUTPUT«Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?␤ in block <unit> at /tmp/RQLJLZKnON:1␤␤»
grondilu m: package A { our regex foo { foo } }; say "foo" ~~ /<A::foo>/;
camelia rakudo-moar bdc37f: OUTPUT«Method '!cursor_init' not found for invocant of class 'A'␤ in block <unit> at /tmp/oTiNJS6mpx:1␤␤»
llfourn I expect False because Int doesn't match 1
Skarsnik m: say 1 ~~ Int
camelia rakudo-moar bdc37f: OUTPUT«True␤»
llfourn m: say Str ~~ "foo";
camelia rakudo-moar bdc37f: OUTPUT«False␤»
llfourn like that ^^
timotimo oh, interesting that that doesn't warn
jnthn grondilu: A needs to be a grammar for that to work 14:03
grondilu: And no need for our
grondilu even like this?:
m: package A { our $foo = rx/foo/ }; say "foo" ~~ /<A::foo>/;
camelia rakudo-moar bdc37f: OUTPUT«Method '!cursor_init' not found for invocant of class 'A'␤ in block <unit> at /tmp/DhUFkQ3uEY:1␤␤»
jnthn That's even less likely to work.
grondilu m: package A { our $foo = rx/foo/ }; say "foo" ~~ /<$A::foo>/; 14:04
camelia rakudo-moar bdc37f: OUTPUT«「foo」␤»
jnthn Givne the fanishing $
*vanishing
That'll do it.
grondilu ok
jnthn <A::foo> is defined as "switch to grammar A and use its foo rule"
grondilu ok, makes sense
14:05 xpen joined 14:06 raiph joined
llfourn timotimo: to me Str ~~ "foo" is the only one that behaves correctly :P 14:12
timotimo i wonder if there's a separate multi candidate to make that "work"
hankache m: "foo" ~~ Str 14:13
camelia ( no output )
llfourn I think Mu should have multi method ACCEPTS(Mu:U: Any:D) { False }
hankache m: say "foo" ~~ Str
camelia rakudo-moar bdc37f: OUTPUT«True␤»
timotimo llfourn: i think that's the wrong way around 14:14
llfourn timotimo: you mean my picture in general or the args to ACCEPTS? 14:15
14:15 bjz joined
llfourn timotimo: yes you are right :) 14:15
method ACCEPTS(Mu:D: Mu:U) { False } # I guess 14:16
thanks!
14:17 psy_ joined 14:19 leont left 14:20 bjz left 14:21 pierre-vigier left 14:23 keix left 14:26 bjz joined
dalek p: 21e8038 | jnthn++ | src/QRegex/Cursor.nqp:
Make !cursor_init ignore unknown named args.

Easiest way to fix Grammar.parse failing to match Perl 6 interface consistency rules.
14:27
kudo/nom: b946a30 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for interface consistency fix.
14:28
ast: 8dc9fec | jnthn++ | S12-class/interface-consistency.t:
Test for RT #126708.
14:32 molaf left
_nadim Is it possible to alias roles and classes? I have a class Data::Dump::Tree::Role::XXXX, it's a mouth full, I want to make it _also_ available as DDTR::XXXX. 14:33
jnthn Using a constant is the usual trick
Skarsnik class DDTR::XXX is Dump::Tree::Role::XX ?
jnthn package DDTR { constant XXXX = ...; } 14:34
14:34 risou is now known as risou_awy
_nadim XXXX is a role 14:34
14:34 risou_awy is now known as risou
_nadim sure I can make XXXX point to it too 14:34
jnthn constant doesn't care what it points at :)
_nadim I realized that after I wrote it was a role :) 14:35
I'm trying both, just for fun!
llfourn you can also is export the constant if you want it available elsewhere :) 14:36
14:38 lizmat joined
lizmat jnthn: punning a class with a method yadayada, should maybe not fail, but instead install the yadayada's ? 14:39
m: role A { method $a { ... } }; A.new
camelia rakudo-moar b946a3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D_7tiHleEj␤Missing block␤at /tmp/D_7tiHleEj:1␤------> 3role A { method7⏏5 $a { ... } }; A.new␤»
lizmat m: role A { method a { ... } }; A.new 14:40
camelia rakudo-moar b946a3: OUTPUT«Method 'a' must be implemented by A because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp:2685␤ in any apply at gen/moar/m-Metamodel.nqp:2695␤ in any compose at gen/moar/m-Metamodel.nqp:2831␤ in any make_pun …»
jnthn lizmat: Punning it will continue to fail
lizmat: But I'm going to whitelist a few more methods
lizmat jnthn: the problem is really with something like this: 14:41
m: role A { method a { ... } }; say A
camelia rakudo-moar b946a3: OUTPUT«Method 'a' must be implemented by A because it is required by a role␤ in any compose_method_table at gen/moar/m-Metamodel.nqp:2685␤ in any apply at gen/moar/m-Metamodel.nqp:2695␤ in any compose at gen/moar/m-Metamodel.nqp:2831␤ in any make_pun …»
jnthn Right, so .gist goes on the whitelist :)
lizmat failing because it puns the role into a class
jnthn Same with WHICH, and perl 14:42
lizmat and .Str I assume ?
jnthn Guess so
_nadim I opted for Skarsnik's solution role XX does other_role {} it looks good and I don't need to handle user defined roles
lizmat ok, not sure where you are whitelisting that... but we'll see :-)
14:42 diana_olhovik joined, loren joined 14:43 broquaint joined
jnthn There's already a short list of things we do when we configure the role punning. 14:43
lizmat ok 14:45
llfourn _nadim: making a new role just to make a shrot name is a little odd to me but * feels good :)
14:47 Ven joined, leont joined, skids joined 14:49 Ven left 14:55 diana_olhovik left
_nadim :) I prefer long names but it's a request by user #1, can't refuse him. 14:58
lizmat cool, we passed the 51K spectest tests boundary 15:00
jnthn And that's without including the stress tests :) 15:01
llfourn \o/ nicely done
15:01 pierre-vigier joined 15:06 pierre-vigier left
jnthn tests a fix for RT #126507 15:12
15:12 molaf joined
_nadim I can't seem to find something like try catch for exceptions, wht's the best place to learn about exceptions? 15:13
llfourn _nadim: have you checked out docs.perl6.org/language/exceptions
15:13 cognominal joined
jnthn doc.perl6.org/language/exceptions 15:13
hah
llfourn eh but it doesn't look like there's an example of try { } there :P 15:14
llfourn adds to TODO
jnthn Well, you often don't need try
To use with CATCH
But yeah, should go in there
llfourn yep :)
_nadim yes I have, wanted more but I guess all is there, don't ask what more or I'll die X::UNKNOWN on you ;)
llfourn I haven't really used exceptions much. I should. 15:15
lizmat notices that a rebuild on JVM only succeeds after nuking install
jnthn will be away for a bit 15:16
llfourn m: { die "Fail"; CATCH { .perl.say } }
camelia rakudo-moar b946a3: OUTPUT«X::AdHoc.new(payload => "Fail")␤Fail␤ in block <unit> at /tmp/Hj5B6o4ueM:1␤␤»
_nadim llfourn: lucky you, I have no choice, it's eploding in my face all the time :) 15:17
llfourn hmm I think the docs shouldn't have "To handle all exceptions use a default statement."
you can handle all of them with CATCH { ...do something to $_ }
15:17 leont left
llfourn (or am I missing something) 15:17
m: { die "Fail"; CATCH { } }; say "i'm still running"; # let's see 15:20
camelia rakudo-moar b946a3: OUTPUT«Fail␤ in block <unit> at /tmp/UjBC5gMd81:1␤␤»
lizmat but make install fails on jvm:
./perl6-j tools/build/install-core-dist.pl
No writeable path found
in block <unit> at tools/build/install-core-dist.pl:15
llfourn hmm so if you don't test $_ it continues..
m: { die "Fail"; CATCH { note $_ } }; say "i'm still running"; 15:21
camelia rakudo-moar b946a3: OUTPUT«Fail␤ in block <unit> at /tmp/k3B1XNpN5i:1␤␤Fail␤ in block <unit> at /tmp/k3B1XNpN5i:1␤␤Actually thrown at:␤ in block <unit> at /tmp/k3B1XNpN5i:1␤␤»
15:21 lizmat left
lucs m: my $a = 42; say $a[0][0][0] # Why does this work? 15:23
camelia rakudo-moar b946a3: OUTPUT«42␤»
geekosaur iirc scalars get promoted to lists when needed? 15:24
lucs Hmm...
geekosaur so that happesn 3 times
timotimo not "get promoted to"
individual values act like a list of that individual values in cases where a listy operation is performed upon them
lucs I kind of expected it to fail. 15:25
lucs changes his expectations. 15:26
_nadim llfourn: there is this too moritz.faui2k3.org/files/talks/2013...xceptions/
llfourn _nadim: ah yes you're right It's a good one :)
_nadim I haven't read it yet. I was scratching my head with Exception is not resumable! 15:27
timotimo this years' advent calendar is now only 5k views and visitors behind last years'
hankache anyone tried Farabi6?
lucs timotimo: What was the total last year?
hankache panda install Farabi6
is it failing for everyone? 15:28
timotimo 50,115 views, 24,309 visitors
lucs Not bad for halfway through.
timotimo between april and september, each month also had between 2k and 2.5k views 15:29
lucs s/Not bad/Pretty good/
hankache what is @*INC?
timotimo december 2015 alone is at 16.5k views, 7k visitors
hankache: deprecated is what it is :)
hankache timotimo ah so yhis is where the error is coming from 15:30
geekosaur it needs to be updated for curli
hankache so we replace it with what?
lucs Did "curli" mean anything? 15:31
_nadim Can anyone explain "This exeption is not resumable" ?
timotimo depends on how it's used. if it's like "BEGIN { @*INC.push: "/foo/bar/baz" }" it should have been turned into 'use lib "/foo/bar/baz"' a long, long time ago
lucs: "CompUnitRepo::Local::Installation"
lucs Oho, thanks
Skarsnik $*REPO ?
timotimo please tell me where "@*INC" is used? 15:32
hankache timotimo: github.com/azawawi/farabi6/blob/ma.../01-load.t
Skarsnik There is maybe a pullrequest for it?
timotimo oh, it's just in the test file 15:33
15:33 molaf left, loren left
hankache yup 15:33
timotimo there is a pull request for it now.
hankache bah forget about it i can install it even with --no tests 15:34
timotimo sure 15:35
hankache i meant i can't install it
:(
timotimo oh!
well, that's bad
hankache i can't install it even with --notests 15:36
timotimo it probably needs to use %*RESOURCES to find all its files
hankache anyway thanks for the PR I hope the author will fix it 15:37
15:40 Util joined
El_Che azawi, the author of farabi, is often around 15:41
15:41 domidumont joined 15:48 skids left, hankache left 15:49 lizmat joined 15:51 leont joined, loren joined 15:54 rurban joined 15:56 skids joined
dalek c: 7187fee | skids++ | doc/Language/control.pod:
Decided example of when statement modifier disrupted the flow

   Explain it when explaining proceed/succeed instead
   Also, document nested when/default statements
15:57
16:02 maddingue joined 16:10 xfix left
_nadim Heap corruption detected: pointer 0x7f2976249fc8 to past fromspace, I think I am a disturbance in the force! 16:12
Do I tnarrow it down or do I keep it for after Christmas?
lizmat .tell nine gist.github.com/lizmat/be6246dfd8d7bdf7ba2f # JVM make install full stacktrace 16:13
yoleaux lizmat: I'll pass your message to nine.
16:13 xfix joined
lizmat _nadim: a rakudobug is always appreciated 16:14
16:16 xfix left 16:18 xfix joined
_nadim I live to serve. 16:20
would a branch of my module plus the code to generate the error work? 16:21
grondilu best would be to reproduce the error with a minimalistic code 16:26
lizmat what grondilu said :-) 16:27
timotimo lives to sever 16:28
lizmat keynote& 16:30
16:30 lizmat left, leont left
_nadim I did not ask what was best :) 16:33
16:36 regreg joined
domidumont timotimo: I found what was wrong yesterday: the command that failed loaded perl6.moarvm from old rakudo package (i.e. /usr/share/perl6/runtime/perl6.moarvm) 16:37
_nadim jnthn: you probably won't be surprised that I wrapped some exception ahndling around the attributes code as you suggested yesterday, I got tired of getting a different error everytime a different class is dumpes, I think 'Isa' is not implemented for class XXXX was the drop :)
16:38 JimmyZ joined
domidumont timotimo: once the old rakudo package is removed, I no longer get the error about QRegex.nqp , which is good 16:38
timotimo: but package build still fails: Unhandled exception: While looking for '/usr/share/perl6/runtime/perl6.moarvm' 16:40
timotimo ah. phew! 16:41
i don't have an immediate idea why that'd happen :| 16:44
Skarsnik blame nine! wait that does not work anymore? x) 16:45
domidumont timotimo: the perl6-m that was built is looking for perl6.moarvm in prefix dir (/usr). But this file is not yet installed. I need to way to tell perl6-m to look elsewhere to find perl6.moarvm 16:46
I guess that the root cause is --prefix option is used to specify where nqp and moar are (in this case in /usr/bin/ because they are packaged separately and already installed) 16:48
and --prefix is also used to specify where to install rakudo.
To install files in the build directory, I have to use DESTDIR variable before running make install. But this variable is not used to locate perl6.moarvm 16:49
16:55 RabidGravy joined
moritz domidumont: doesn't the new --sdkroot option solve the problem? 16:56
domidumont: you can point it to the directory with nqp and moar, and specify a different --prefix
domidumont moritz: Oops, Looks like I missed this option. I'm going to try 16:57
thanks 16:58
16:58 khw joined
jnthn _nadim: Exception is not resumable - did you actually call .resume? Or was something in Rakudo trying to do that? 16:58
moritz domidumont: it's only a month old or so
17:00 Ch0c0late joined 17:01 pierre-vigier joined
_nadim jnthn: I did call resume 17:04
jnthn Ah. Well, it means what it says. Some exceptions represent a condition that is unrecoverable, you can't just try going on. 17:05
17:05 pierre-vigier left 17:06 CIAvash joined
jnthn It's mostly there to support control exceptions, like warnings. 17:06
timotimo jnthn: should i also duplicate MVM_nativeref_read_positional_* into *_read_multidim_*? the same for writing? 17:07
jnthn timotimo: Yeah, I'd think so 17:08
timotimo OK
this'll get us a bunch of new ops, too ... and more entries into the HLL and more work for the hllconfig portion of rakudo
timotimo has never considered if hllconfig struct would be an ABI thing 17:09
it's not, though, right? because we fill it with an MVMHash
jnthn A bunch of new ops? 17:10
Skarsnik Is there a way to use 'perl6' from another language btw?
jnthn Skarsnik: Inline::Perl6 does it from Perl 5
timotimo: I'd only expect the 4 typed ones for taking the ref 17:11
Skarsnik I was thinking more from C/C++ x)
jnthn timotimo: WE don't need to do the 2d/3d special case ones
timotimo oh, duh
jnthn Skarsnik: I'd guess Inline::Perl6 was written at least partly in C... :)
timotimo writing to and reading from these references goes via assign_* and decont_* anyway 17:12
not via special ops
jnthn aye
timotimo that was my mistake of thought
jnthn That was the point; you can implement native-int-ref++ without having to know exactly what type of aggregate the native value being referenced lives in.
17:12 vividsnow joined
jnthn (While making sure that spesh can know, and strip out the indirection) 17:13
timotimo right
jnthn Darn, my RT #126507 patch regressed exactly one spectest..
jnthn will figure it out after dinner
b2gills m: $/=5;$_=6;#`(␤$/++;$_--;#)␤print "This program wasn't written in Perl $_, it was built for Perl $/!\n" 17:14
camelia rakudo-moar b946a3: OUTPUT«This program wasn't written in Perl 6, it was built for Perl 5!␤»
b2gills m: $/=5;$_=6;# `(␤$/++;$_--;#)␤print "This program wasn't written in Perl $_, it was built for Perl $/!\n"
camelia rakudo-moar b946a3: OUTPUT«This program wasn't written in Perl 5, it was built for Perl 6!␤»
TimToady gah, what are these non-QAST nodes doing in my QAST tree? old_topic_1 and sm_result_1 etc. 17:16
jnthn TimToady: Quickly grepping, seems they're to do with the locallifetime op 17:18
Which was a sorear++ creation for improving code size (notably, on the JVM)
_nadim live can't be so hard that exception handling has to look like this, what am I doing wrong/ugly nopaste.linux-dev.org/?879301
jnthn TimToady: If we don't handle that op specially at the moment, I suggest doing so, and just visiting its first child (similar to how the handle op needs special treatment) 17:19
timotimo m: my @result = (try <1, 2, 3>, die "oh no!") orelse "error occured, see $!"; say @result 17:20
camelia rakudo-moar b946a3: OUTPUT«[(Any)]␤»
jnthn _nadim: Well, the first lines could be my @a = try get_Any_attributes($a);
timotimo m: my @result = ((try <1, 2, 3>, die "oh no!") orelse "error occured, see $_"); say @result
camelia rakudo-moar b946a3: OUTPUT«Use of Nil in string context in block at /tmp/vYyotn3rUf:1␤[error occured, see ]␤»
timotimo m: my @result = ((try <1, 2, 3>, die "oh no!") orelse "error occured, see $!"); say @result
camelia rakudo-moar b946a3: OUTPUT«[error occured, see oh no!]␤»
timotimo ^- just one other way to do it
jnthn Then I'd probably just $! ?? ('Dumper exception! See documentation', "$!") !! @a or so 17:21
Instead of mutating @a
_nadim indeed 17:27
17:28 koo8 left 17:33 SmokeMachine___ joined, xfix_ joined 17:34 Ch0c0late_ joined, flussenc1 joined, avalenn_ joined 17:35 jony__ joined, mrsolo_ joined 17:36 integral_ joined, integral_ left, integral_ joined, ilmari_ joined 17:37 corbyhaas_ joined 17:38 [ptc]_ joined, riatre left 17:39 Humbedoo` joined, robins joined 17:40 riatre joined, yx_ joined, frew joined, Ch0c0late left, RabidGravy left 17:41 JimmyZ left, xfix left, loren left, raiph left, WizJin left, avalenn left, hacst left, Humbedooh left, integral left, xnrand left, robinsmidsrod left, [ptc]_ is now known as [ptc], jony__ is now known as 14WAAEER5, Ch0c0late_ is now known as Ch0c0late, hacst joined 17:42 yx_ is now known as xnrand, advwp joined
jdv79 this used to work a few ?weeks? ago: gist.github.com/anonymous/8498f62f04cead485be5 17:42
not sure what is goin on there
17:43 corbyhaas_ is now known as corbyhaas 17:45 mrsolo_ is now known as mrsolo, geekosaur joined 17:46 RabidGravy joined
TimToady how the heck are we getting an ast node of Perl6::Optimizer?!? 17:47
17:47 JimmyZ joined, BuildTheRobots joined, advwp left 17:55 koo8 joined, WizJin joined
timotimo huh? 17:56
RabidGravy boo
17:58 lucasb joined 18:00 zengargo1le joined 18:03 advwp joined
jdv79 seems it may be connected to precomp. adding no precompilation changed the error 18:04
TimToady sanity restored, visit_children wasn't return $node, so returned self instead
18:11 [Coke] joined
TimToady so when my make runs tools/build/install-core-dist.pl, I get all these lovely sets of WARNINGS, none of which say which file they're from (course, would probably be a hash anyway, grr) 18:15
jdv79 .tell nine confirmed i think. looks like URI2 is broke by precomp. adding no precompilation to the top of *.pm6 kills the errors. 18:18
yoleaux jdv79: I'll pass your message to nine.
TimToady so I presume it's just a bug that this message includes 'inst#' there: Please make sure that inst#/home/larry/.rakudobrew/moar-nom/install/share/perl6/site/bin is in your PATH
18:20 advwp left
jnthn Yeah, could do with being stripped 18:20
TimToady incidentally I still get the stupid "Couldn't determine correct make program. Aborting." when I 'rakudobrew triple'
I'm worried that we're not going to be able to support these things if the right people aren't in town... 18:21
18:22 rurban left 18:23 s_kilk joined
jdv79 the bus factor is worthy of worry around here 18:25
18:27 cdg joined, advwp joined
bhm camelia: help 18:30
camelia bhm: Usage: <(nqp-js|star-j|rakudo-MOAR|niecza|nqp-parrot|rakudo-moar|p5-to-p6|debug-cat|pugs|nqp-jvm|nqp-moarvm|star-m|prof-m|std|rakudo-jvm|rPn|nPr|r-jvm|rj|rn|nrP|r-j|nqp|perl6|rakudo|Prn|star|n|nqp-m|nr|sm|nom|rnP|nqp-mvm|P|M|p56|Pnr|m|r|rm|sj|p6|nqp-q|r-m|nqp-p|nqp-j|j)(?^::\s(?!OUTPUT))
..$perl6_program>
18:31 ChristopherBotto joined 18:32 advwp left 18:35 sufrostico joined
[Coke] jnthn: +1 to making things experimental pre christmas. 18:36
18:40 johnjohn101 joined
johnjohn101 release this month? 18:40
timotimo well, we certainly hope so!
johnjohn101 timotimo: very nice. it's been a long time coming :) 18:41
timotimo that's quite true
johnjohn101 so basically rakudo perl on which engine? 18:43
18:43 advwp joined
jnthn MoarVM 18:43
[Coke] moavm
jnthn [Coke]: Yes, so far with feeds it's been "I like them" (hey, me too...that's why I want to get 'em right :)) and "a handful of modules use them", but no "I'll step up and take care of them", so I suspect experimental. 18:45
18:48 iH2O joined
lucasb can someone look into yours panda's rootdir and see if there is a '(HANDLED) Failed to open file' directory in there? Am I the only one experiencing this? 18:49
18:50 s_kilk left 18:52 xpen left
lucasb It seems panda installs fine, even with this strange directory 18:52
18:56 pjscott joined
pjscott Basic question about laziness: 18:56
I used File::Find to get a lazy list: my $list = find( dir => '.', type => 'file' ); 18:57
Then did .say for $list[0..*];
But it did not output anything until it had gotten all the results. What am I missing?
TimToady * calls .elems, which is eager 18:58
jnthn 0..* will call .elems on the list to find the upper bound
just write .say for @$list
or my \list = find ...; .say for list
TimToady well, that will cache, I suspect
pjscott Huh, that was too easy. 18:59
jnthn Yes, I'm not entirely happy that we made @ be .cache, not .list
pjscott I thought @$list would flatten it, never thought to try.
TimToady well, I still think that's the best place to put it, mnemonically
pjscott Works.
Somewhat counterintuitive since @list = find would be eager 19:00
19:01 zengargo1le is now known as zengargoyle
TimToady because of the assignment, not the @ 19:02
19:02 AlexDaniel joined, pierre-vigier joined
TimToady @list := find would presumably be lazy 19:02
pjscott I am going to be looking for the ways to make this easy to understand.
19:03 iH2O left
pjscott Yes it is TT 19:03
ChristopherBotto This is the beginning of a very long file name that I found after installing panda: 19:04
'/home/username/.rakudobrew/moar-de52f9/panda/(HANDLED) Failed to open file /home/username/.rakudobrew/moar-de52f9/panda/inst#/home/username/.rakudobrew/moar-de52f9/install/share/perl6/site/panda: no such file or directory in any at /home/username/.rakudobrew/moar-de52f9/install/share/perl6/runtime
19:04 Ch0c0late left
timotimo ChristopherBotto: you're the second person to find something like that; for the other person it created one folder for each word and put them all into one deep chain :( 19:04
ChristopherBotto timotimo: Yes that is the case. 19:05
timotimo oh lord :(
19:06 pierre-vigier left 19:07 pjscott left
lucasb thing is... panda bootstrap tries to call bin/panda with an option --prefix=inst#/some/path ... I don't think this will end well :) 19:07
then, make-default-ecosystem in Panda::App does $prefix = "$*CWD/$prefix" 19:08
then, there is this line: mkpath $pandadir unless $pandadir ~~ :d
I think mkpath is somehow splitting this stringifed failure with '/' and creating lots of directories 19:09
ChristopherBotto Despite the funny directory, I was able to install Config::INI and it works! 19:10
lucasb indeed, I think panda just tries that, sees that it doesn't work, and move on to try another possible directory to install things 19:11
19:11 bjz left
zengargoyle i've been sorta curious why inst#/... was picked over something like inst://.. URI-ish like scheme. 19:11
19:12 advwp left 19:13 bjz joined
lucasb *stringified failure 19:13
dalek p: 65ea65a | timotimo++ | / (2 files):
bump Moar Revision and map mulditimref_* ops
19:22
p: 0f09e73 | timotimo++ | / (2 files):
Merge branch 'multidim_references'

Makes available the multidimref_* nqp:: ops
lucasb So, the problematic code in panda is easy to reproduce, just call mkpath with an IO object: perl6 -e 'use Shell::Command; mkpath "foo/bar".IO' 19:25
it will create a '(HANDLED) Failed to open file' directory tree
19:26 travis-ci joined
travis-ci NQP build failed. Timo Paulssen 'Merge branch 'multidim_references' 19:26
travis-ci.org/perl6/nqp/builds/96480811 github.com/perl6/nqp/compare/21e80...09e73bfa36
19:26 travis-ci left
timotimo oh? 19:26
huh. let's see.
is travis-ci somehow broken? 19:27
19:28 advwp joined 19:30 ChoHag_ joined
ChoHag_ I considered adding another adverb to postcircumfix:<[ ]>. Is doing that really as complicated as it looks? 19:30
19:31 ChoHag_ is now known as ChoHag 19:32 advwp left
ChoHag (ie. I have to add it to, and replicate much of the magic of, postcircumfix:(< >) rather than just to AT-POS) 19:33
19:33 ollej joined 19:34 psy_ left
timotimo the travis ci website doesn't seem to work at all for me 19:35
lucasb MoarVM op 'multidimref_i' is unknown as a core or extension op
timotimo: ^^ I see this error in travis site
timotimo um, huh? did it not respect the MOAR_REVISION?
oh, haha 19:36
i used >> instead of >
dalek p: ff112f3 | timotimo++ | tools/build/MOAR_REVISION:
fix moar version bump
timotimo that ought to fix the build 19:37
19:38 advwp joined 19:40 travis-ci joined
travis-ci NQP build passed. Timo Paulssen 'fix moar version bump' 19:40
travis-ci.org/perl6/nqp/builds/96482219 github.com/perl6/nqp/compare/0f09e...112f37ac95
19:40 travis-ci left
timotimo that's good 19:41
19:46 secwang joined
dalek p: 044d4dd | timotimo++ | tools/build/MOAR_REVISION:
bump for an important fix in multidim nativerefs
19:52
19:53 xpen joined
dalek kudo/nom: d6687b0 | timotimo++ | / (3 files):
bump NQP & make available multi-dimensional arrayrefs

only on MoarVM so far, but it's #?if moar'd everywhere.
19:53
retupmoca .botsnack 19:54
yoleaux :D
12:54Z <nine> retupmoca: Do I understand you correctly that we may not rename libfoo.dll to 79952901E881C09690ED5B86509C32B8D6E18D6B.dll?
johnjohn101 will perl6 do ssl?
AlexDaniel johnjohn101: what do you mean exactly?
johnjohn101 can i access a ssl socket in perl6? is that feature available? 19:55
Skarsnik It's the module I think
timotimo we have a module for that,
yeah
johnjohn101 ok
Skarsnik But I am not sure it work? http::ua does not seem to put the right header to make it work 19:56
retupmoca .tell nine renaming dlls works fine if libfoo.dll is standalone. But in the case of openssl: ssleay32.dll depends on libeay32.dll. I load libeay32.dll (works great!), then I try to load ssleay32.dll which tries to find or load a dll named 'libeay32.dll'. Since I didn't load it with that filename, ssleay32 won't load because it can't find libeay32.dll
yoleaux retupmoca: I'll pass your message to nine.
Skarsnik *work for https
nine jdv79: that's a really strange error. I golfed it down to: RAKUDO_MODULE_DEBUG=1 perl6 -Ilib -e 'use URI2::Authority::Host; use URI2::Authority::UserInfo; class URI2::Authority { has URI2::Authority::Host $.host; }' 19:57
yoleaux 16:13Z <lizmat> nine: gist.github.com/lizmat/be6246dfd8d7bdf7ba2f # JVM make install full stacktrace
18:18Z <jdv79> nine: confirmed i think. looks like URI2 is broke by precomp. adding no precompilation to the top of *.pm6 kills the errors.
19:56Z <retupmoca> nine: renaming dlls works fine if libfoo.dll is standalone. But in the case of openssl: ssleay32.dll depends on libeay32.dll. I load libeay32.dll (works great!), then I try to load ssleay32.dll which tries to find or load a dll named 'libeay32.dll'. Since I didn't load it with that filename, ssleay32 won't load because it can't find libeay32.dll
19:57 adhoc joined
Skarsnik hm, good remark for 32v64 bits dll x) 19:57
19:58 xpen left
dalek kudo/nom: 15a9ed9 | jnthn++ | src/core/ (3 files):
Make slicing with adverbs respect itemization.
19:58
timotimo .tell hoelzro i enjoyed your post and am looking forward to having the performance be better in the future (no matter who fixes it). good work golfing it!
yoleaux timotimo: I'll pass your message to hoelzro.
19:59 johnjohn101 left
dalek ast: d72ac0f | jnthn++ | S32- (2 files):
Tests for RT #126507.
19:59
zengargoyle looking deeper... '/tmp/foobar'.IO when .split by Shell::Command::mkpath looks like it tries to open the path: Failure $var = Failure.new(exception => X::IO::Directory.new(path => q|/tmp/foobar|.IO(:SPEC(IO::Spec::Unix)), trying => "open", use => Any, os-error => Any), backtrace => Backtrace.new)
nine jdv79: both role URI2::Authority::UserInfo and role URI2::Authority::Host have a method escaped (::?CLASS:D:) { $.canonical }. Won't they conflict?
20:00 aigan joined
aigan What is the shebang to put in top of file for perl6 built with rakudobrew? 20:01
Skarsnik hm,
20:01 advwp left
Skarsnik should be /usr/bin/perl6 ? 20:01
zengargoyle i use: #!/usr/bin/env perl6 :)
lucs regex question: gist.github.com/lucs/bae8c4e4101d9476b661 20:03
aigan Thank you, zengargoyle
Skarsnik I wonder if perl6 read the shebang. I remember testing a long time ago ruby/python/ruby and python was the only one not doing it x)
moritz iirc it doesn't
Skarsnik: well, if you tested ruby/python/ruby, your sample size was 2 :-) 20:04
Skarsnik perl5 ><
jnthn m: my $a = 42; say .WHAT for <<$a b c>>, qqww{$a b c}, qqw{$a b c} 20:05
zengargoyle wonders if panda problem is: a) passing .IO to mkpath; or b) mkpath not doing something like .IO.path on its input.
jnthn camelia? 20:06
Slacker!
camelia rakudo-moar b946a3: OUTPUT«(List)␤(List)␤(Array)␤»
20:08 Humbedoo` is now known as Humbedooh, Humbedooh left, Humbedooh joined
zengargoyle or c) .IO.split not doing the expected 'split on the path' but trying to .open the .IO object 20:10
lucasb zengargoyle++ # for taking a look into mkpath 'foo'.IO
20:10 xiaomiao joined 20:11 jack_rabbit joined 20:13 lsm-desktop joined
zengargoyle actually, guess IO.split doing .open is to be expected most of the time. my @data = 'path/to/file'.IO.split(/MARKER/); in the splitting the input stream sort of way. 20:16
ChristopherBotto zengargoyle: Wow. I like that idiom. 20:20
20:20 masak joined
masak ahoy, #perl6 20:20
I see we had a hack reboot :)
zengargoyle i'm sorta leaning towards mkpath needing to .IO.path or just .Str on its arguments before trying to split them. or being less quick hacky in general... for [\~] $name.split(/<[\/\\]>/).map({"$_/"}) { ... doesn't seem to be the best of ways to do it... 20:22
lucasb indeed, I think having '$name = $name.Str' in mkpath would work, but... it doesn't look pretty :) 20:23
but anyways, even after this, mkpath will still get an argument of '/current/path#inst/some/path'... which is not correct. panda needs to fix this 20:27
20:28 advwp joined 20:30 rindolf left 20:31 sufrostico left 20:32 lucasb left 20:42 rindolf joined 20:43 sufrostico joined
RabidGravy re panda giving the stringied repo to mkpath, doesn't it want to be prefix or prefix-path or something? 20:45
on the repo object
timotimo okay, now to write a few tests for native multidim refs 20:46
20:50 xfix_ left, xfix joined 20:51 xfix left, xfix joined
dalek kudo-star-daily: 30043bd | coke++ | log/ (2 files):
today (automated commit)
20:53
Begi Hello #perl6 ! 20:54
timotimo hello, Begi!
m: my int @arr[2;2]; @arr[0;0]++; say @arr # hooray 20:55
camelia rakudo-moar 15a9ed: OUTPUT«[[1 0] [0 0]]␤»
jnthn timotimo++ 20:56
Skarsnik yarr 20:57
timotimo S09-typed-arrays has native-int, but that thing is gigantic. i wonder if it's all right to add tests for this there
Begi m: say "That's fun !"; 20:58
camelia rakudo-moar 15a9ed: OUTPUT«That's fun !␤»
Begi Sorry, I try
lucs Begi: You can do /msg camelia m: ... 20:59
dalek kudo/nom: adf4e76 | jnthn++ | src/core/Str.pm:
Fix return type of qqw{...}.
21:03
kudo/nom: 091f0ce | jnthn++ | src/ (2 files):
Expand the non-punning methods list for roles.

These methods will now not try to pun the role, but work on the type object of the role itself. This will fix things like === doing .WHICH and so trying to pun the role, and similar for .gist, .perl and some others. This was mostly an issue because a role with stubbed methods cannot be punned (and it would be rather odd to make it do so).
21:03 pierre-vigier joined
dalek ast: ae54d6c | jnthn++ | S02-literals/quoting.t:
Test for RT #123808.
21:03
ast: 0a6fd2c | jnthn++ | S14-roles/stubs.t:
Tests for RT #126606.
21:03 yqt joined 21:04 CIAvash left
Begi Perl6 for Christams, is it real ? 21:04
Skarsnik Yes for 2020 21:05
Begi Oh, too bad... :o)
Skarsnik But yes, 6.c is for this christmas
timotimo there'll be perl6 releases around christmas on every year
Begi A nice gift ! 21:06
timotimo and many more in between
jnthn will be very happy to have 6.c out the door :)
timotimo yes, it'll be a good feeling i'm sure
jnthn Then I'm going to sleep for like 2-3 weeks :P 21:07
Skarsnik Oh after the bug repport list will grow 10 time faster
21:07 pierre-vigier left 21:08 koo8 left
jnthn That's what a growing userbase gets you. :) 21:08
The xmas RT list is now down to 24 tickets (from being up to 28 after I reviewed those filed since it was created)
AlexDaniel Skarsnik: then he will wake up and fix half of these…
21:09 cdg left
Skarsnik I am worried about users expecting a good quality for everything around, 'base' module, panda, etc... since it's quite not there I think x) 21:09
lucs And then they'll start complaining that it was released too soon :) 21:10
Skarsnik Yes
jnthn We just can't win this one.
timotimo wait, wasn't the xmas list at 14? 21:11
jnthn If we told the community "it'll happen in 2 years", it would have been a mixture of "yeah right" and then more folks diving in six months before. :)
RabidGravy there will also be lots of highly motivated skilled programmers flocking to fix the bugs
;-) 21:12
Skarsnik I think there should be a policy for ecosystem after x-mas of inciting people to fix module that doing YAExisctingModuleThingy
AlexDaniel I am worried about jnthn's health. He is fixing bugs faster than I report them, this is… uh… so inhumanely
Skarsnik xD
jnthn ;)
I'll be making sure to take a break after the release, to recharge :) 21:13
RabidGravy Skarsnik, I don't think ther should be a policy, but a culture of doing so
timotimo hm. i didn't even look see if there's an RT for the native refs on multidim arrays
jnthn timotimo: It was 14, but I made the list in late September, and there were new issues filed since then, some of which I felt deserved to be on the list. 21:14
timotimo: So I added them. 4 of the 14 I added are already picked off. :)
AlexDaniel actually, I don't see bugs jumping into my face anymore. Even when I try to do something crazy. And even the error messages are fine when I'm acting like a clown. So yeah, I'd say that Perl 6 is kinda ready. 21:16
jnthn If anyone fancies a list-y one that's probably LHF-ish, then rt.perl.org/Ticket/Display.html?id=126522 is about X and Z (and I suspect their meta-op forms too) not respecting itemization.
Skarsnik m: sprintf("%s");
camelia rakudo-moar 091f0c: OUTPUT«Directives specify 1 argument, but no argument was supplied␤␤»
Skarsnik m: sprintf("%s", 1, 2);
camelia rakudo-moar 091f0c: OUTPUT«Directives specify 1 argument, but 2 arguments were supplied␤␤»
AlexDaniel see? Great error message
Woodi problem with expectations of good quality is easy fixable: this xmas gift is *just* spec :) in such context any implementation is BONUS :) 21:17
Skarsnik damn I have another one that I don't remember with printf xD
m: sprintf("%%s", 1, 2);
camelia rakudo-moar 091f0c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/98bdhBZrpQ␤Variable '%s' is not declared␤at /tmp/98bdhBZrpQ:1␤------> 3sprintf("%7⏏5%s", 1, 2);␤»
AlexDaniel anyway, the only thing that makes me sad right now is slow startup time… Sooo I'm hoping that it will get better soon
I mean, the startup time itself is fine. But when you load a bunch of modules… oh boy! 21:18
21:18 koo8 joined
Skarsnik I don't have precomp on my rakudo, the pain is real yes x) 21:18
AlexDaniel other times, when I don't use a bunch of modules, Perl 6 makes me very happy. 21:19
timotimo jnthn: wow, it's a bit scary to see the number go up like that again
Woodi AlexDaniel: heh, yesterday I tried some fuzzer app and *it* was scared by startup time then bored and constantly displayed zzzzzz.... ;)
21:20 pmurias left 21:22 secwang left
Woodi but as I said implementation can be marketed as bonus and after few examples everybody is amazed anyway :) 21:22
masak Begi: Perl 6 is real right now! but yes, we've marked Christmas as special and "release" and all that :) 21:24
nine Woodi: this is how we see it. But the rest of the world will just read "release" and think of "implementation". See the KDE 4 debacle on how such a difference in view point can play out 21:28
timotimo nine: i don't know anything about a kde4 debacle
Skarsnik I think for kde4 I remember there were clearly stating that not supporting kde3 anymore or something similar 21:29
and kde4 was a disaster for a long time x)
Begi I really would like to help the Perl6 projet. Is there anything easy that I can do ?
nine timotimo: developers released a KDE 4.0 with the meaning of "stable API" targeted at application developers. Distributors and users jumped and shipped and installed it immediately to complain about bugs and missing features
Begi Tests ? ... ?
Skarsnik There are many way 21:30
AlexDaniel Woodi: marking it as a bonus will make some people disappointed
timotimo ooooh ugh
21:30 cdg joined
Skarsnik Write modules, fix modules, improve module is a nice way to not touching too much of perl6 core 21:30
Begi Yeah, there is too much to do 21:31
21:31 cdg left
Begi *so much 21:31
Skarsnik You can juste give you a goal and see if you reach it
Juerd Begi: Documentation, tests, modules, promotion, articles for blogs/news sites, bug fixing
Skarsnik I wanted to do stats about a website, I ended patching/writing bunch of module x) 21:32
Juerd Begi: There's a list of missing documentation somewhere. A lot of the documentation could be written as a stub by just summarizing the relevant parts from the design documents (synopses)
21:32 sufrostico left
Juerd Begi: But also just using Perl 6 and telling everyone how much you love it, is a great way to help the project :) 21:33
Begi I alreday do it :) 21:34
*already
Juerd Begi++
jnthn I'm off for the evening... Have fun :-) & 21:35
timotimo see ya jnthn :) 21:37
21:38 adhoc left, adhoc joined
skids
.oO(is there a holiday between now and "e"aster that starts with "d"...)
21:39
RabidGravy I'm sure one can be made up otherwise 21:42
skids Feb 12th "Darwin Day" 21:46
[Coke] . 21:50
21:50 vendethiel joined 21:54 xpen joined 21:55 Begi left
RabidGravy dudley dooright 21:55
21:55 Begi joined 21:58 domidumont left 21:59 xpen left
masak Begi: it's easy to aim too high. we get the most help from people who contribute small things, but do it repeatedly, day by day, week by week :) 22:02
Begi I'll try to help some modules
Question : is there a way to find out which version of Perl6 is used by my script ?
Skarsnik $*PERL.version 22:04
Begi Thanks Skarsnik 22:05
22:06 TEttinger joined 22:07 molaf joined 22:10 leont joined
Woodi AlexDaniel: "some people" always will be disappointed, 100% coverage in any discipline is rather impossible. but Perl6 for years had spec-implementations distinction. and, additionally&&as_promised, quite good implementation is available 22:16
no other way than state this every time :)
22:17 rindolf left
Woodi Java was usable around 1.4 :) 22:17
vendethiel 1.5, with generics :¨P 22:18
Woodi hmm, Swing was 1.2 and it was usable for me :) 22:20
nine: we should be happy that Nokia didn't managed to kill Qt like they did with Symbian... 22:24
22:26 robins is now known as robinsmidsrod 22:30 firstdayonthejob joined, molaf left 22:32 xfix left
nine Woodi: oh I am 22:34
gfldex m: { say 1; succeed; say 2 }; say 3; 22:36
camelia rakudo-moar 091f0c: OUTPUT«1␤succeed without when clause␤ in block <unit> at /tmp/FV1zpRk18Y:1␤␤»
gfldex is there a statement that leaves the current block?
nine .tell jnthn if use lib ought to install a $?REPO and this is a lexical and we prohibit use lib in modules, those modules may not be able to load their dependencies, since they will only look in $*REPO
yoleaux nine: I'll pass your message to jnthn.
gfldex m: { say 1; leave; say 2 }; say 3; 22:37
camelia rakudo-moar 091f0c: OUTPUT«1␤leave not yet implemented. Sorry. ␤ in block <unit> at /tmp/6liNrTCSo4:1␤␤»
RabidGravy last ? 22:38
gfldex m: { say 1; last; say 2 }; say 3; 22:39
camelia rakudo-moar 091f0c: OUTPUT«1␤last without loop construct␤ in block <unit> at /tmp/nz6zqlUeVP:1␤␤»
RabidGravy boo
gfldex looks like it's leave, what is left out for now
22:42 vendethiel left
AlexDaniel gfldex: until then you can use given { succeed } ? 22:43
22:43 vendethiel joined
AlexDaniel m: given { say 1; succeed; say 2 }; say 3 22:43
camelia rakudo-moar 091f0c: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at /tmp/ICLMcC6eQH:1␤------> 3given { say 1; succeed; say 2 }7⏏5; say 3␤Missing block (apparently claimed by expression)␤at /tmp/ICLMcC6eQH:1␤------> 3given { say 1; succ…»
AlexDaniel m: given 1 { say 1; succeed; say 2 }; say 3 22:44
gfldex m: { say 1; when * {succeed}; say 2 }; say 3;
camelia rakudo-moar 091f0c: OUTPUT«1␤succeed without when clause␤ in block <unit> at /tmp/DuqiaZpp5O:1␤␤»
rakudo-moar 091f0c: OUTPUT«1␤3␤»
22:44 kaare_ left
AlexDaniel aahh without when clause… 22:44
hm what about sub { return } 22:45
gfldex sub aint a block
grondilu has no idea what is this succeed keyword 22:46
masak grondilu: it's Perl 6's `break`
AlexDaniel m: say 5; sub { say 8; return; 9 }(); say 10
camelia rakudo-moar 091f0c: OUTPUT«5␤8␤10␤»
AlexDaniel m: say 5; sub { say 8; return; say 9 }(); say 10
camelia rakudo-moar 091f0c: OUTPUT«5␤8␤10␤»
masak grondilu: it exits from the block that contains the `when` block (usually a `given` block, but not necessarily) 22:47
AlexDaniel m: sub x { say 5; sub { say 8; return; say 9 }(); say 10 }; x
camelia rakudo-moar 091f0c: OUTPUT«5␤8␤10␤»
masak grondilu: it's called `succeed`, because once you've matched a particular `when` block, your match has succeeded, and (by default) you will exit the surrounding block.
grondilu: the opposite is `proceed`, as in "keep matching stuff, or whatever comes after this `when` block"
grondilu ok 22:48
grondilu adds re-reading S04 to his TODO
gfldex m: sub f (&c) { say 1; c; say 2 }; f({ say 3; return }); say 4;
camelia rakudo-moar 091f0c: OUTPUT«1␤3␤Attempt to return outside of any Routine␤ in block <unit> at /tmp/5vLcwohdfV:1␤␤»
masak grondilu: those keywords got their final names shortly after I published the advent post about given/when back in 2009: perl6advent.wordpress.com/2009/12/...witcheroo/
TimToady
.oO(Attempt to think outside the box at line 42)
AlexDaniel
.oO(Expected any of … ?)
22:49
gfldex m: sub f (&c) { say 1; c; say 2 }; f({ say 3; OUTER::return }); say 4;
camelia rakudo-moar 091f0c: OUTPUT«1␤3␤2␤4␤»
gfldex that is a little confusing 22:50
grondilu m: for 2 { when * %% 3 { say "huh?" }; say "ok" }
camelia rakudo-moar 091f0c: OUTPUT«ok␤»
grondilu hum weird, few days ago I had noticed ^this failed.
(maybe it was fixed since) 22:51
RabidGravy everything gets fixed 22:55
masak gfldex: OUTER::return would return from the whole program, which is nonsensical. 22:56
gfldex: recall that OUTER:: has to do with lexical blocks, not call frames.
and the OUTER:: of the block in the f() call is the block for the whole program, which -- nominally, at least -- is not a function that can be returned from. 22:57
gfldex m: sub MAIN () { sub f (&c) { say 1; c; say 2 }; f({ say 3; OUTER::return }); say 4; }
camelia rakudo-moar 091f0c: OUTPUT«1␤3␤2␤4␤»
masak in Rakudo, unfortunate-ish-ly, it seems to be a function... but that doesn't matter, since the OUTER::return doesn't seem to work anyway in this case.
m: return; say "!" 22:58
camelia rakudo-moar 091f0c: OUTPUT«Attempt to return outside of any Routine␤ in block <unit> at /tmp/UTIkdXz9nl:1␤␤»
masak Rakudo++
'night, #perl6
22:58 snarkyboojum joined
tadzik g'night masak 22:58
(good evening #perl6 :))
vendethiel bai :) 23:00
Skarsnik Good night
RabidGravy toodlepip 23:03
grondilu is wondering if he can write the XOR swap algorithm in one statement 23:08
m: my ($a, $b) = 1, 2; $a +^= $b; $a +^= $b = $a +^ $b; say "$a, $b"; # two statements 23:09
camelia rakudo-moar 091f0c: OUTPUT«2, 1␤»
grondilu m: my ($a, $b) = 1, 2; ($a +^= $b) +^= $b = $a +^ $b; say "$a, $b"; # one statement
camelia rakudo-moar 091f0c: OUTPUT«2, 1␤»
23:09 leont left
grondilu oh that does work? I thought I had failed locally 23:09
grondilu looks at his history and notice he had a typo: += instead of +^= 23:10
23:12 vendethiel left
grondilu m: my ($a, $b) = 13, 24; $a +^= $b +^= $b = $a +^ $b; say "$a, $b"; 23:12
camelia rakudo-moar 091f0c: OUTPUT«13, 0␤»
grondilu m: my ($a, $b) = 13, 24; ($a +^= $b) +^= $b = $a +^ $b; say "$a, $b";
camelia rakudo-moar 091f0c: OUTPUT«24, 13␤»
grondilu parens are needed though 23:13
23:13 vendethiel joined, bjz left, bjz joined
grondilu m: my ($a, $b) = 13, 24; ($a +^= $b) +^= $b +^= $a; say "$a, $b"; 23:15
camelia rakudo-moar 091f0c: OUTPUT«24, 13␤»
grondilu pretty cool 23:17
ChristopherBotto Good night #perl6. Thank you all for all of your work. 23:18
23:18 ChristopherBotto left 23:20 lucasb joined 23:21 leont joined 23:25 lmmx joined
grondilu also, still looking at how to improve performance for permutations, I'm wondering : do we have to create the Iterator class on the fly every time? 23:29
m: sub f { class :: { say "hi" }.new }; f(); f();
camelia rakudo-moar 091f0c: OUTPUT«hi␤hi␤»
23:30 pierre-vigier joined
grondilu m: sub f { class Foo { say "hi" }; Foo.new }; f(); f(); 23:30
camelia rakudo-moar 091f0c: OUTPUT«hi␤hi␤»
grondilu m: class Foo { say "hi" }; sub f { Foo.new }; f(); f();
camelia rakudo-moar 091f0c: OUTPUT«hi␤»
grondilu m: sub f { state class :: { say "hi" }.new }; f(); f(); 23:31
camelia rakudo-moar 091f0c: OUTPUT«hi␤hi␤»
skids m: sub f { BEGIN { class :: { say "hi" }.new } }; f().perl.say; f().perl.say; 23:32
camelia rakudo-moar 091f0c: OUTPUT«hi␤<anon|55967680>.new␤<anon|55967680>.new␤»
23:32 secwang joined
grondilu m: sub f { BEGIN { class :: { say "hi" } }.new }; f(); f(); 23:32
camelia rakudo-moar 091f0c: OUTPUT«hi␤»
grondilu though on second though it should not matter much. It's not like this class is created at each pull-one call 23:33
23:34 secwang left 23:35 snarkyboojum_ joined
skids m: sub f { class :: { say "hi" } }; f().perl.say; f().perl.say; # looks like the class is actually the same thing anyway 23:36
camelia rakudo-moar 091f0c: OUTPUT«hi␤<anon|73070784>␤hi␤<anon|73070784>␤»
lucasb m: say ().permutations
camelia rakudo-moar 091f0c: OUTPUT«Constraint type check failed for parameter '$n'␤ in block <unit> at /tmp/Z8j40O4LBe:1␤␤»
lucasb star: say ().permutations
camelia star-m 2015.09: OUTPUT«()␤»
lucasb for comparison: ruby -e 'p [].permutation.to_a' #=> [[]] 23:38
23:39 MadcapJake joined
grondilu it's a recent choice not to allow null or negative parameter for permutations. Maybe it can be revised. 23:40
lucasb ok, but thanks anyway for improving its performance, grondilu++
23:41 RabidGravy left 23:43 Begi left
timotimo grondilu++ 23:46
23:47 raiph joined
TimToady certainly we allow 0 on combinations 23:47
m: say (1,2).combinations 23:48
camelia rakudo-moar 091f0c: OUTPUT«(() (1) (2) (1 2))␤»
TimToady or we couldn't get the powerset
23:52 zengargo1le joined, zengargoyle left
grondilu taking 0 elems among n makes sense, but not quite permuting 0 elements. 23:52
AlexDaniel m: my @a = 1; @a = @a, 1; say @a.combinations 23:53
camelia rakudo-moar 091f0c: OUTPUT«(() ((\Array_60551968 = [Array_60551968 1])) (1) ((\Array_60551968 = [Array_60551968 1]) 1))␤»
grondilu the real equivalent is taking k elements among 0 23:54
that should not be allowed imho
m: say combinations(0, 1)
camelia rakudo-moar 091f0c: OUTPUT«()␤»
23:56 Psyche^ joined