Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-12-16

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 AlexDaniel autarch: I wish browsers had better defaults
00:02 AlexDaniel what's the point of having acid blue links if everyone is changing it. Perhaps offer a better default, right?
00:02 AlexDaniel autarch: another common mistake is to change the font color of inputs but forget to change the background color
00:03 autarch I find the default color mostly acceptable, but that's just me
00:03 AlexDaniel e.g. “I don't want the font color to be black, I want it to be #EEE” – okay idiot, that's my background color, how am I supposed to read it?
00:03 AlexDaniel oops
00:03 AlexDaniel I meant #111
00:04 autarch I think the main reason one should change the link color is to find a blue that matches the site's color palette if the default blue does not
00:05 AlexDaniel in other words, don't expect that people have white-ish backgrounds. Some don't. If you force some font color then you have to force background color as well
00:05 AlexDaniel or just don't touch it at all and let my OS handle it. That's OK too
00:13 timotimo how expensive is it to fflush after every short-ish line printed?
00:13 diakopter not very, if you're sure you're writing to someone's monitor
00:13 timotimo in this case i'm most likely writing to a filesystem
00:14 timotimo in my case it's tmpfs, though. usually it won't be.
00:14 diakopter otherwise it adds up and quickly becomes an output bottleneck for large outputs
00:14 RabidGravy right, went with my strategy of wrapping up at midnight
00:14 * diakopter goes to read
00:14 RabidGravy https://perl6advent.wordpress.com/2015/12/16​/day-16-yak-shaving-for-fun-and-profit-or-ho​w-i-learned-to-stop-worry-and-love-perl-6/
00:14 * timotimo reads
00:16 AlexDaniel left #perl6
00:16 AlexDaniel joined #perl6
00:16 AlexDaniel RabidGravy: “.   Most” three spaces :)
00:16 diakopter well it's certainly entertaining
00:17 AlexDaniel RabidGravy: I don't know why but multiple spaces instead of one make me uncomfortable
00:17 AlexDaniel perhaps I should not care about such things
00:21 RabidGravy I learned to type on a real typewriter, we've done this before
00:21 timotimo "infortunately" :)
00:23 timotimo nice post. RabidGravy++
00:24 RabidGravy I was going to go into the trait thing more until I realised that gfldex had already done one the other day on the subject
00:25 RabidGravy fixed the typo, I hadn't noticed the red squiggly line for that one
00:26 diakopter RabidGravy: so did I (real typewriter)!
00:26 diakopter I type very loudly
00:26 RabidGravy :)
00:26 AlexDaniel RabidGravy++ # very motivational post
00:27 RabidGravy I concluded that I had no massive technical insight to offer but a perspective as someone who set out with an intention to write some software
00:27 leont joined #perl6
00:28 BenGoldberg joined #perl6
00:34 TEttinger joined #perl6
00:47 joeatwork joined #perl6
00:51 joeatwork Say folks - does anybody know how to spell "perl -i~ -pe" in perl6?
00:51 joeatwork (Or in rakudo/perl6?)
00:53 RabidGravy it doesn't do -i as yet but -pe works
00:53 joeatwork Sweet! Is -i in the cards?
00:54 joeatwork (The "yet" bit is great!)
00:54 joeatwork Thanks for your help!
00:55 RabidGravy i.e ls | perl6 -pe ' say "$_ *"' works as expected
00:56 joeatwork Perfect!
00:56 logiz joined #perl6
00:57 RabidGravy dunno if -i is on anyone elses radar
00:57 diakopter someone explain -i
00:57 RabidGravy it does -p -n -e pretty much as you'd expect
00:57 RabidGravy -i does "inplace" editing
00:57 AlexDaniel diakopter: change file inplace
00:58 AlexDaniel diakopter: you can't just pipe into the same file that you are reading
00:58 timotimo yeah, you need sponge for that
00:58 diakopter oh
00:58 RabidGravy so "perl -pie 's/foo/bar/g' bam" will change all the foo into bar in the file bam
00:59 * diakopter guesses the level of optimization/efficiency achieved in perl 5 for such things is unapproachable for quite a while in perl6
00:59 RabidGravy I'm relaxed about it not doing it
01:00 RabidGravy there's sed, awk and perl 5 ;-)
01:00 skids joined #perl6
01:01 AlexDaniel and no Perl 6. I don't like it
01:01 AlexDaniel is it a known issue?
01:01 AlexDaniel or maybe someone should file it?
01:02 timotimo what exactly is what?
01:02 AlexDaniel “Modify files in-place. Haven't thought about it enough to add yet, but I'm certain it has a strong following. {{TODO review decision here}}”
01:02 AlexDaniel that's from S19
01:03 timotimo ah
01:03 timotimo oh, bedtime for time
01:03 timotimo timo
01:03 joeatwork It seems like something you could write a script for - I use it a whole lot as an editor thing
01:03 joeatwork find . ... | xargs perl -i~ -pe 's/foo/bar/g'
01:04 joeatwork But it's not something I have any right to expect from a programming language :)
01:04 AlexDaniel well, there's 「sponge」 but…
01:04 joeatwork What's sponge?
01:04 AlexDaniel a workaround for -i
01:04 yeahnoob joined #perl6
01:04 * joeatwork googles around...
01:05 RabidGravy bed time for me anyway
01:05 RabidGravy toodlepip
01:05 AlexDaniel it's in 「moreutils」 if you are using Debian
01:06 joeatwork gotcha - so something like cat file1 | sponge > file1 ? Maybe 'cp file1 file1~ && cat file1~ | perl -pe > file1` is good enough
01:06 AlexDaniel S19 says “-i *extension*” – what kind of “extension”, huh?
01:07 * BenGoldberg tries to imagine a -i option for the C programming language  ;)
01:07 joeatwork :)
01:08 AlexDaniel joeatwork: perl6 -pe 'smth' < file1 | sponge file1 # I think
01:08 joeatwork Beauty!
01:08 joeatwork Giving it a try now
01:09 joeatwork Works a treat!
01:09 joeatwork Perfect
01:10 joeatwork Thanks for your help!
01:10 AlexDaniel maybe we can put that up somewhere. Or maybe we just have to implement -i
01:10 AlexDaniel that's a very common thing to do
01:10 BenGoldberg The sponge program is specially designed to not open (or at least, not truncate/write to) the file on it's commandline, until after it receives eof on it's stdin, to avoid clobbering said file.
01:10 joeatwork For reference, your command line worked pretty much exactly
01:11 AlexDaniel joeatwork: can you omit < ?
01:11 joeatwork Trying now
01:11 joeatwork But I'm not sure how that'd work...
01:11 AlexDaniel joeatwork: it works in Perl 5 I think
01:12 joeatwork cat sponger.dot | perl6 -pe 's:g/node/BJORK/' | sponge sponger.dot
01:12 joeatwork perl5 read args from the command line
01:12 AlexDaniel basically it is smart enought to understand that it's the input (because -e is given)
01:12 AlexDaniel enough*
01:12 joeatwork Ohh!
01:12 joeatwork Trying now!
01:13 joeatwork SWEET!
01:13 joeatwork perl6 -pe 's:g/BJORK/zork/' sponger.dot | sponge sponger.dot
01:13 joeatwork Totally works great!
01:13 AlexDaniel nice :)
01:19 n0tjack joined #perl6
01:23 colomon joined #perl6
01:25 dalek rakudo/nom: ef8929a | TimToady++ | src/Perl6/Actions.nqp:
01:25 dalek rakudo/nom: make list assoc infixes work again
01:25 dalek rakudo/nom:
01:25 dalek rakudo/nom: This fixes both the defor and the ==> regressions.
01:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ef8929a70e
01:29 glaukommatos joined #perl6
01:29 FreezerburnV joined #perl6
01:30 FreezerburnV Evenin’
01:31 petercommand joined #perl6
01:31 petercommand joined #perl6
01:32 AlexDaniel m: ’
01:32 camelia rakudo-moar ef8929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UurdSkpnpN␤Unable to parse expression in high smart single quotes; couldn't find final <[’‘]> ␤at /tmp/UurdSkpnpN:1␤------> 3’7⏏5<EOL>␤    expecting any of:␤        high smart single quote…»
01:33 AlexDaniel m: say ’inverted!‘
01:33 camelia rakudo-moar ef8929: OUTPUT«inverted!␤»
01:33 geekosaur joined #perl6
01:35 Ben_Goldberg joined #perl6
01:35 n0xff left #perl6
01:39 TimToady m: 1 orelse 2 orelse 3
01:39 camelia rakudo-moar ef8929: ( no output )
01:40 TimToady .tell jnthn the orelse/defor problem turned out to be totally my fault, a side effect of generalizing EXPR wrongly; the feed operators also blew up for the same reason
01:40 yoleaux TimToady: I'll pass your message to jnthn.
01:40 FreezerburnV How would I compile a library for faster start of a script? Like panda does when installing (I want to modify a panda library but not pay the multi-second recompile penalty on each start)
01:44 geekosaur joined #perl6
01:45 geekosaur joined #perl6
01:47 xpen joined #perl6
02:01 BenGoldberg joined #perl6
02:08 skids FreezerburnV: they will autocompile on the first run on the newer rakudos, though I'm unclear on whether they have figured out what to do about per-user precomp stores yet.
02:10 glaukommatos Are there any fun tips on making the debugger not blow chunks and scream "ctxlexpad needs an MVMContext" any time I try to debug something of any complexity (by which I really mean, any time I'm trying to debug code that pulls in a panda module)? Is this really common, or is there maybe a bug to file against a module I have installed?
02:12 Actualeyes joined #perl6
02:13 FreezerburnV skids: I have version 2015.07.02. What version do I need to get a *.moarvm file when running a pl6/pm6 file? And is there any way to manually compile to a .moarvm?
02:17 skids FreezerburnV: you should be able to make .moarvms using something like perl6 --target=mbc --output=/tmp/ttt.pm6.moarvm /tmp/ttt.pm6
02:19 FreezerburnV skids: Awesome, thanks!
02:26 adrianchong joined #perl6
02:34 Zoffix joined #perl6
02:37 cognominal m: my @keys = CORE::.keys.sort: { (my $alpha = $_) ~~ s:g/\W//; (my $non-alpha = $_) ~~ s:g/\w//; $alpha ~ $non-alpha }; for @keys { .say unless try { CORE::($_).gist }}
02:37 camelia rakudo-moar ef8929: OUTPUT«ContainerDescriptor␤%DEPRECATIO​NS␤Failure␤NQPCursorRole␤blob16␤blob32​␤blob64␤blob8␤buf16␤buf32␤buf64␤buf8␤»
02:50 kaare_ joined #perl6
02:56 vendethiel joined #perl6
02:57 Ben_Goldberg joined #perl6
03:00 snarkyboojum_ joined #perl6
03:02 BenGoldberg_ joined #perl6
03:20 snarkyboojum_ joined #perl6
03:30 noganex joined #perl6
03:39 Sqirrel joined #perl6
03:49 BenGoldberg joined #perl6
04:02 dalek rakudo/nom: 083e070 | TimToady++ | src/Perl6/Actions.nqp:
04:02 dalek rakudo/nom: propagate wanted thru callstatic as well as call
04:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/083e0703e2
04:02 dalek rakudo/nom: 2326cc3 | TimToady++ | src/Perl6/Actions.nqp:
04:02 dalek rakudo/nom: abbreviate want pedigrees
04:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2326cc39d9
04:02 dalek rakudo/nom: a5bf8f5 | TimToady++ | src/Perl6/Actions.nqp:
04:02 dalek rakudo/nom: propagate want into nested blocks properly
04:02 dalek rakudo/nom:
04:02 dalek rakudo/nom: The bare block as the final statement in another block should get
04:02 dalek rakudo/nom: the same context as the outer block.
04:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a5bf8f5245
04:03 TimToady [Coke]: with that, your run should be pretty clean now
04:03 n0tjack joined #perl6
04:03 * TimToady notes that the warning from S02-literals/subscript.t is actually correct
04:04 TimToady lives-ok({ all(@newval2) < any(@oldval); all(@newval1) > all(@oldval) }, "parses correctly, second statement is true");
04:04 TimToady the < really is in sink context
04:18 geekosaur joined #perl6
04:20 labster joined #perl6
04:24 dwarring joined #perl6
04:29 dj_goku glaukommatos: I have wondered the same. I had to add some print statements to diagnose an issue with a module. I got the same debug error you spoke of.
04:33 labster joined #perl6
04:49 vividsnow joined #perl6
05:11 dalek roast: 780f5bf | lizmat++ | S04-declarations/my.t:
05:11 dalek roast: Unfudge now passing tests
05:11 dalek roast: review: https://github.com/perl6/roast/commit/780f5bf69c
05:21 labster joined #perl6
05:24 dalek rakudo/nom: 99294ba | TimToady++ | src/Perl6/Actions.nqp:
05:24 dalek rakudo/nom: want feed ops wantonly
05:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/99294ba1a6
05:24 dalek rakudo/nom: 3a82a2e | TimToady++ | src/Perl6/Actions.nqp:
05:24 dalek rakudo/nom: want lhs of assignment and binding a little harder
05:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3a82a2e7fe
05:26 cpage_ joined #perl6
05:35 molaf joined #perl6
06:05 inokenty joined #perl6
06:05 khw joined #perl6
06:07 n0tjack joined #perl6
06:26 japhb joined #perl6
06:41 dalek rakudo/nom: a67c726 | TimToady++ | src/Perl6/Actions.nqp:
06:41 dalek rakudo/nom: want insides of s/// and ~~
06:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a67c72635f
06:57 _nadim joined #perl6
07:00 CIAvash joined #perl6
07:00 n0tjack joined #perl6
07:03 dalek rakudo/nom: df82f43 | TimToady++ | src/Perl6/Actions.nqp:
07:03 dalek rakudo/nom: want macro arguments
07:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/df82f43785
07:04 TimToady I think that pretty much puts a ribbon on the GSR now
07:10 adu joined #perl6
07:23 CIAvash joined #perl6
07:28 go|dfish joined #perl6
07:34 quester joined #perl6
07:37 firstdayonthejob joined #perl6
07:39 b7j0c joined #perl6
07:40 b7j0c p6: True ~~ Int;
07:40 camelia rakudo-moar df82f4: ( no output )
07:40 b7j0c p6: say True ~~ Int;
07:40 camelia rakudo-moar df82f4: OUTPUT«True␤»
07:41 b7j0c p6: say True ~~ Bool;
07:41 camelia rakudo-moar df82f4: OUTPUT«True␤»
07:41 b7j0c p6: say 1 ~~ Int;
07:41 camelia rakudo-moar df82f4: OUTPUT«True␤»
07:41 b7j0c p6: say 1 ~~ Bool;
07:41 camelia rakudo-moar df82f4: OUTPUT«False␤»
07:41 b7j0c p6: say True + True;
07:41 camelia rakudo-moar df82f4: OUTPUT«2␤»
07:41 TEttinger what's the S in GSR?
07:41 b7j0c doesn't that seem wrong?
07:42 b7j0c True + True = 2?
07:42 Juerd m: say True.WHAT
07:42 camelia rakudo-moar df82f4: OUTPUT«(Bool)␤»
07:42 Juerd m: say +True
07:42 camelia rakudo-moar df82f4: OUTPUT«1␤»
07:42 TEttinger Good Samaritan Rap
07:42 Juerd b7j0c: + forces both operands to numbers, and in numeric context, True is 1.
07:42 Juerd Compare:
07:42 Juerd m: say True ~ True
07:42 camelia rakudo-moar df82f4: OUTPUT«TrueTrue␤»
07:42 Juerd ~ forces both operands to strings, and in string context, True is 'True'
07:43 TEttinger Gabber Sounds Radical
07:43 b7j0c i have a unit test for a method that takes an Int parameter. if i pass it True, it passes. that seems wrong
07:44 rurban joined #perl6
07:45 b7j0c if i have `method foo(Int $n)`, i should not be able to get lives-with { ...foo(True); }
07:45 Juerd TEttinger: Sink
07:45 Juerd b7j0c: Why not?
07:45 b7j0c because a Bool is not an Int?
07:45 TEttinger mm. is that what affected this type cast-type stuff testing with camelia?
07:46 Juerd b7j0c: Are they not?
07:46 Juerd m: say Bool ~~ Int
07:46 camelia rakudo-moar df82f4: OUTPUT«True␤»
07:47 b7j0c well i know that perl6 says they are, but i am saying that i think perl6 is wrong in this
07:47 Juerd I see
07:47 nine b7j0c: that's by design
07:47 * Juerd has no opinion
07:47 * Juerd never cared about the lack of "proper" true and false in Perl 5 either :)
07:48 zakharyas joined #perl6
07:48 b7j0c go knows better: http://play.golang.org/p/PhfbZrC7fQ
07:48 nine 0 and 1 are used so often for False and True in systems outside Perl 6 that it's a lot less hassle to have them be compatible
07:48 Juerd b7j0c: But if Perl 6 did everything exactly the same way that Go does it, then we wouldn't need to have two separate languages :)
07:50 Juerd Oh, by the way, if True + True == 2 bothers you, consider:
07:50 Juerd m: multi sub infix:<+> (Bool $a, Bool $b) { return $a || $b }; say True + True;
07:50 camelia rakudo-moar df82f4: OUTPUT«True␤»
07:53 b7j0c right, but it means i cannot expect the type annotations of my methods to provide real guarantees
07:53 Juerd Not for Bool vs Int
07:54 b7j0c seems this is one instance where the desire to keep perl6 somewhat maleable did not mesh well with gradual typing :(
07:54 Juerd It's gradual typing, just not in a way that you agree with.
07:54 b7j0c i still like perl6 though :)
07:54 nine b7j0c: oh you _can_ expect them to provide guarantees. It's just that Bools _are_ Ints. You can do everything with them as with any other Int.
07:55 Juerd According to doc.perl.org, Bool isa Cool isa Any isa Mu, no Int there.
07:55 b7j0c well, in fairness, bools are ints in all of the broken old languages we are trying to improve upon....all the rest (Go, Rust) get it right
07:56 nine m: subset OnlyInt of Int where * !~~ Bool; sub foo(OnlyInt $i) { say $i; }; foo(1); foo(True);
07:56 camelia rakudo-moar df82f4: OUTPUT«1␤Constraint type check failed for parameter '$i'␤  in sub foo at /tmp/ZSCSkNwZDc:1␤  in block <unit> at /tmp/ZSCSkNwZDc:1␤␤»
07:56 nine b7j0c: if your code really cannot deal with Bools, you can still use this ^^^
07:56 patrickz joined #perl6
07:56 nine b7j0c: because Perl 6 provides you with opinions and the means to have other opinions
07:56 b7j0c nah its cool, just grappling with the first time perl6 seems to have not blown my mind in a good way
07:57 Juerd I do wonder why it's important to have Bool *not* be an Int, for your program
07:57 Juerd Is this a purely academic endeavour or do you have some real use case that needs it?
07:57 b7j0c because i want my method to take integers
07:57 b7j0c its not "academic", its type safety
07:58 Juerd Bools are integers
07:58 Juerd Bool is an enum, enums are integers
07:58 b7j0c i think you might want to rephrase that to "camelia believes bools are integers"...it is clearly not a universal truth!
07:58 Woodi if Bools are ints then multidispatch on Bool don't work ?
07:59 Juerd Woodi: It does work, because they're a more specific kind of integer.
07:59 moritz b7j0c: you can do Int arithmetics on Bool
07:59 nine m: multi foo(Bool $i) { say "Bool!"; }; multi foo(Int $i) { say "Int!"; }; foo(1); foo(True);
07:59 camelia rakudo-moar df82f4: OUTPUT«Int!␤Bool!␤»
07:59 moritz Woodi: everything is Mu. Does that mean multidispatch on everything doesn't work?
07:59 Woodi b7j0c: you can put multi sub/method with Bools as arguments
08:00 b7j0c yeah i think that might be the answer....in this case, if i don't want to allow Bool, make a multimethod and raise an error
08:00 Woodi moritz: right
08:00 moritz b7j0c: but why reject Bool at all?
08:00 b7j0c seems to violate my idea of type safety
08:01 moritz m: say 42 * True
08:01 camelia rakudo-moar df82f4: OUTPUT«42␤»
08:01 moritz b7j0c: type safety means that you protect your code from input it can't work with
08:01 Juerd b7j0c: Basically, True and False are defined as: enum Bool <False True>; A element from an enum stringifies to its name, numifies to its index (here, 0 and 1). They were probably very carefully placed to prevent that False became 1 and True 0. ;)
08:01 moritz b7j0c: but if your code can work with Int, it *can* work with Bool
08:01 Woodi probably problem is typesystem vs real reality...
08:02 adu joined #perl6
08:02 moritz b7j0c: don't go out of your way to make your user's live harder
08:02 n0tjack joined #perl6
08:02 b7j0c if being incorrect means being hard, then be hard!
08:02 nine Juerd: oh yes, I really didn't want to do that beginners mistake, though my first instinct actually was "True, False" ;)
08:02 AlexDaniel m: sub foo(Int $x) { say $x }; foo ❶ # oh noes! It does not look like an Int, why does it accept it?????
08:02 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:03 moritz .u ❶
08:03 yoleaux U+2776 DINGBAT NEGATIVE CIRCLED DIGIT ONE [No] (❶)
08:03 moritz m: say unival '❶'
08:03 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:03 Juerd m: say ½ + ¾
08:03 camelia rakudo-moar df82f4: OUTPUT«1.25␤»
08:03 Woodi atually Int cast to Bool is common but in other way it is strange...
08:03 b7j0c haha maybe camelia's unique approach to typing will take a little getting used to :)
08:04 AlexDaniel Woodi: not really, it's pretty much typical
08:04 Juerd b7j0c: I wonder why you say 'camelia' instead of 'Perl 6', but I like it.
08:04 Woodi AlexDaniel: I mean: hard to thing about use case... not about easy of thinking...
08:05 b7j0c Juerd: a cute butterfly seems more forgivable
08:05 Juerd Aww
08:05 FROGGS joined #perl6
08:07 AlexDaniel b7j0c: I don't really see any problem with type safety because it is not going to cause any errors
08:08 b7j0c well of course, if you make the types unsafe, you won't get any errors!
08:08 AlexDaniel by unsafe you mean? What error should it prevent?
08:09 b7j0c values beyond the defined range
08:09 Juerd b7j0c: 0 and 1 are quite normal integers
08:09 b7j0c but True is not 1, True is True
08:10 Juerd Well, that's where you're not describing Perl 6.
08:10 b7j0c i understand :)
08:10 Juerd I'd say "that's where you're wrong", but you may be right in other contexts.
08:10 Juerd True actually is 1.
08:10 Juerd m: say True == 1
08:10 camelia rakudo-moar df82f4: OUTPUT«True␤»
08:10 _nadim Good morning
08:10 Juerd m: say True == 2
08:10 camelia rakudo-moar df82f4: OUTPUT«False␤»
08:10 Woodi hi _nadim
08:10 masak Juerd: I disagree.
08:10 _nadim Woodi: :)
08:10 masak (morning, #perl6)
08:10 Juerd As a number, True is 1 in Perl 6. As a string it's "True".
08:11 masak Juerd: True *numifies* to 1, it's not that it *is* 1.
08:11 masak m: say True === `
08:11 camelia rakudo-moar df82f4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Rzu9nrKZd8␤Missing required term after infix␤at /tmp/Rzu9nrKZd8:1␤------> 3say True ===7⏏5 `␤    expecting any of:␤        prefix␤        term␤»
08:11 masak m: say True === 1
08:11 camelia rakudo-moar df82f4: OUTPUT«False␤»
08:11 Juerd Heck, False as a string is "False", which in turn is true!
08:11 masak Juerd: strangely enough, that doesn't bother me much.
08:11 masak but yeah, it does mean that stringification of bools isn't a proper functor.
08:11 darutoko joined #perl6
08:12 Juerd masak: Well, I explain the same thing with different words, using "is" more freely than ===.
08:12 Juerd m: say so ~False
08:12 camelia rakudo-moar df82f4: OUTPUT«True␤»
08:12 masak that's why I disagree :)
08:12 masak True is not an integer, not in Perl 6
08:12 Juerd masak: It is. It's an enum, and enums are integers.
08:13 Woodi masak: why you used 'functor' there ?
08:13 _nadim I needed to see if Match.hash had something in it, first I did it wih some ugly ass code that I though I would replace with $m.hash.defined, but that is always true.  Any tip here?
08:13 Juerd m: enum NotBool <Tralse Fue>; say Fue ~~ Int;
08:13 camelia rakudo-moar df82f4: OUTPUT«True␤»
08:13 Juerd Feel free to read any occurrence of 'is' as 'works as if it were'
08:14 Woodi _nadim: maybe add role to Match object somehow ?
08:14 _nadim then I have the ugly code that works already
08:14 masak Juerd: ok -- conceded.
08:15 masak was that FROGGS++ who finally made that work? or timotimo++?
08:15 Juerd # class Bool is Int {
08:15 Juerd Bool.HOW.set_base_type(Bool, Int);
08:15 Juerd Just saying... that use of 'is' isn't all that weird :P
08:16 Woodi Juerd: it is "implementation" level. but in brain it is abstracted and then it mismatches...
08:16 * masak thinks about whether the point he originally wanted to make is valid
08:16 moritz there are Str-based enums too, no?
08:16 moritz m: enum Flurb a => 'x', b => 'y'; say Flurb.^mro; say a
08:16 camelia rakudo-moar df82f4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EUwOTTxGcE␤Undeclared name:␤    Flurb used at line 1␤Undeclared routines:␤    a used at line 1␤    enum used at line 1␤␤»
08:16 FROGGS masak: what exactly?
08:16 masak FROGGS: making Bool ~~ Int
08:16 moritz m: enum Flurb (a => 'x', b => 'y'); say Flurb.^mro; say a
08:16 camelia rakudo-moar df82f4: OUTPUT«((Flurb) (Str) (Cool) (Any) (Mu))␤x␤»
08:17 Woodi Juerd: but implementation usually wins, like gravity ;)
08:17 FROGGS masak: that was nine++ AFAIK
08:17 masak FROGGS: oh, or making Bool be proper enums, rather.
08:17 masak oh!
08:17 masak nine++
08:17 nine :)
08:18 FROGGS and since Bool is an enum now we can finally add things to it?
08:18 FROGGS like, say, FileNotFound
08:19 * FROGGS throws in http://thedailywtf.com/art​icles/What_Is_Truth_0x3f_ as a reference
08:19 Juerd FROGGS: Ooh, there True is 0 and False is 1
08:19 DrForr True === Truthy?
08:19 FROGGS Juerd: shell like :o)
08:20 moritz Juerd: like with shell return codes :-)
08:20 AlexDaniel m: say +?~?+?~False
08:20 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:21 AlexDaniel m: say +?~?+?1
08:21 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:21 AlexDaniel m: say ?+?~?+?1
08:21 camelia rakudo-moar df82f4: OUTPUT«True␤»
08:21 AlexDaniel m: say ?~?+?~?+?1
08:21 camelia rakudo-moar df82f4: OUTPUT«True␤»
08:21 AlexDaniel m: say +?~?+?~?+?1
08:21 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:21 AlexDaniel it's so fun!
08:21 FROGGS *g*
08:22 b7j0c well its True that this has been illuminating and entertaining. bye for now!
08:22 b7j0c left #perl6
08:23 zakharyas joined #perl6
08:26 _nadim m: my $m = 'a' ~~ m:g/(a)/ ; $m.hash.perl.say ;
08:26 camelia rakudo-moar df82f4: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/diRWk7XLKb:1␤␤»
08:27 _nadim m: my $m = 'a' ~~ m:g/(a)/ ; $m.hash.elems.say ;
08:27 camelia rakudo-moar df82f4: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/yZhPz7b0RL:1␤␤»
08:28 _nadim ^^ is there a way to know if there is something in hash (which is constructed on demand it seems)
08:29 moritz m: my $m = 'a' ~~ m:g/(a)/ ; say $m.^name
08:29 camelia rakudo-moar df82f4: OUTPUT«List␤»
08:29 moritz _nadim: well, with :g you get a List
08:30 moritz m: my @m = 'a' ~~ m:g/(a)/ ; say @m[0].hash<a>:exists
08:30 camelia rakudo-moar df82f4: OUTPUT«False␤»
08:30 moritz ... and (a) is a positional capture, so the hash (which returns named captures) is empty anyway
08:31 _nadim m: my $m = 'aa' ~~ m:g/(a)/ ; $m.hash.elems.say ;
08:31 camelia rakudo-moar df82f4: OUTPUT«1␤»
08:31 _nadim ^^ note that the string to match is 'aa'
08:31 Juerd
08:31 _nadim all I want is to know if hash has soething in it
08:31 moritz _nadim: that doesn't change anything what I said
08:32 _nadim neither does it change anything to what I said.
08:32 AlexDaniel m: “hello”.length.say
08:32 camelia rakudo-moar df82f4: OUTPUT«Method 'length' not found for invocant of class 'Str'␤  in block <unit> at /tmp/dCTZ0D4Q9_:1␤␤»
08:32 dalek rakudo/nom: eac2b86 | TimToady++ | src/Perl6/Optimizer.nqp:
08:32 AlexDaniel http://doc.perl6.org/type/Str#method_length
08:32 dalek rakudo/nom: also speed up non-sunk ++, as well as --
08:32 dalek rakudo/nom:
08:32 dalek rakudo/nom: Turns out that, even in non-sunk context, turning $++ into ($i = $i + 1) - 1
08:32 dalek rakudo/nom: is a whole lot faster than allocating a temp.
08:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eac2b86fe2
08:32 moritz _nadim: then I still don't understand what you're trying to do
08:32 AlexDaniel what am I missing?
08:32 moritz AlexDaniel: .chars
08:32 AlexDaniel ahhhh
08:32 AlexDaniel hahahaha
08:33 _nadim One can't ask if hash is defined, it is always. one can't ask if the hash has elements, as one may get the error message above
08:33 AlexDaniel it says “Perl 6 does not have a length function”. I didn't even read it
08:33 moritz _nadim: but you can check $m.elems before even constructing the hash
08:33 _nadim moritz: just trying to find out if hash has eleements
08:33 moritz _nadim: you can also catch exceptions if failing to create a hash is fine for you
08:33 _nadim moritz: I try that
08:34 moritz m: my $m = 'aa' ~~ m:g/(a)/ ; say $m.elems
08:34 camelia rakudo-moar df82f4: OUTPUT«2␤»
08:34 moritz _nadim: ^^ there
08:34 _nadim I prefer to keep exception out of it if possible
08:35 _nadim moritz: I check it with when the match comes from a grammar, 2 mn
08:35 masak m: my %h; say ?%h; %h<foo> = 42; say ?%h
08:35 camelia rakudo-moar df82f4: OUTPUT«False␤True␤»
08:35 masak _nadim: ^
08:35 TimToady m: my int $foo = 0; True while $foo++ < 10_000_000; say $foo; say now -  INIT now;
08:36 camelia rakudo-moar df82f4: OUTPUT«10000001␤5.3016314␤»
08:36 TimToady that will be a couple orders of magnitude faster
08:36 TimToady m: loop (my int $i = 10000000; $i > 0; $i--) {}; say $i; say now - INIT now
08:36 camelia rakudo-moar df82f4: OUTPUT«0␤4.5384695␤»
08:36 TimToady so will that
08:37 moritz TimToady++
08:37 abraxxa joined #perl6
08:38 Juerd What is sink, sunk, etc? Which document should I read?
08:38 moritz Juerd: sink = void
08:38 TimToady it's just void context like in Perl 5
08:38 abraxxa Good morning!
08:38 yoleaux 15 Dec 2015 17:01Z <Skarsnik> abraxxa: I have the same error with is-deeply, I think Num does not work correctly
08:38 Juerd Oh, haha :)
08:38 moritz but we didn't like the kitchen void
08:38 abraxxa Skarsnik: thanks for the info!
08:38 TimToady and we wanted a verb
08:39 _nadim moritz: the number of elements and what is in hash are not the same thing. If there is no named capture, then hash is empty even if the regex matched
08:39 TimToady well, "void that list" is legal English, but doesn't mean much
08:39 _nadim abraxxa: morning
08:39 Juerd TimToady: Aw, we could have voided :)
08:39 * Juerd likes 'sink' now that he knows what it's about.
08:39 mohae_ joined #perl6
08:40 TimToady most of the rest of the test failures are related to line numbers going sour in callframe, looks like
08:40 Juerd Especially since taps are often placed in sink context :)
08:40 moritz _nadim: but you want to know if a hash is empty, not if the regex matched. Right?
08:40 TimToady which is not my problem, since I'm going to be about an hour ago :)
08:40 _nadim moritz: yes
08:40 TimToady *bed
08:40 moritz _nadim: so, check .elems on the list.
08:40 Juerd TimToady: Welterusten :)
08:41 moritz _nadim: or just the list itself (in boolean context it checks .elems for you)
08:41 _nadim moritz: and that would tell me if there are name captures?
08:42 TimToady :g is a dimension above matches, so you want to look at each match in the list
08:42 _nadim moritz: when the result come from a Grammar mach, I list the resuts
08:42 _nadim ok, elements on each list-element
08:42 moritz _nadim: no; but calling .hash on the list of posittionals won't ether
08:42 moritz *either
08:43 moritz and a grammar isn't called with :g, so I don't understand the point of your example at all
08:44 moritz if you want to know the named captures, you need to call .hash on an actual match object, not on a list of match objects
08:45 _nadim moritz: the point of :g in the example is to show the error message that makes no sense. if nothing should be in the hash, then it should be empty, not generate errors.
08:45 moritz m: say 'abc' ~~ /<alpha>/; say $/ && $/.hash.elems
08:45 camelia rakudo-moar df82f4: OUTPUT«「a」␤ alpha => 「a」␤1␤»
08:45 moritz _nadim: but there isn't nothing in the hash; the hash never existed
08:45 RabidGravy joined #perl6
08:45 rindolf joined #perl6
08:45 moritz _nadim: and that's a big difference from "nothing in the hash"
08:46 _nadim moritz: the problem is that Match.hash, will return a hash
08:46 moritz it's like the difference between an empty bank account and not even being able to receive money
08:46 _nadim and if there was a match with odd number of elements , one gets the error message
08:46 moritz _nadim: no
08:47 moritz _nadim: you only get that when cou call .hash on an odd-sized list
08:47 moritz and it's doesn't mattter much if the elements of that list contain Match objects or not
08:48 moritz but calling $/.hash on an empty, successfull Match doesn't give an error
08:48 moritz m: say '' ~~ /<alpha>*/; say $/.hash
08:48 camelia rakudo-moar df82f4: OUTPUT«「」␤Map.new((:alpha([])))␤»
08:48 moritz m: say '' ~~ / '' /; say $/.hash
08:48 camelia rakudo-moar df82f4: OUTPUT«「」␤Map.new(())␤»
08:49 ShimmerFairy joined #perl6
08:50 moritz m: say '' ~~ / '' /; say $/.hash.elems
08:50 camelia rakudo-moar df82f4: OUTPUT«「」␤0␤»
08:51 TimToady m: my int $foo = 0; True while $foo++ < 10_000_000; say $foo; say now -  INIT now;
08:51 camelia rakudo-moar eac2b8: OUTPUT«10000001␤0.0570110␤»
08:51 TimToady m: loop (my int $i = 10000000; $i > 0; $i--) {}; say $i; say now - INIT now
08:51 camelia rakudo-moar eac2b8: OUTPUT«0␤0.0618409␤»
08:52 TimToady m: loop (my int $i = 10000000; $i; $i--) {}; say $i; say now - INIT now
08:52 camelia rakudo-moar eac2b8: OUTPUT«0␤1.450048␤»
08:52 TimToady huh
08:52 TimToady m: loop (my int $i = 10000000; $i; $i--) {}; say $i; say now - INIT now
08:52 camelia rakudo-moar eac2b8: OUTPUT«0␤1.4391514␤»
08:52 TimToady I bet that's boxing $i to test it
08:53 TimToady well, zzz &
08:54 masak zzz well, TimToady
08:55 RabidGravy morning!
08:55 _nadim morning
08:56 Woodi TimToady++
08:57 Woodi # however it is madness that native types are slower... ;)
08:58 _nadim moritz: I have a Match object, in my code not the exaple above, I .hash on the Match, no list involved.
08:58 moritz _nadim: and it doesn't die
08:59 Begi joined #perl6
08:59 Woodi _nadim: maybe using .perl on Match could help ? except .perl gives string...
09:00 moritz proper debugging helps
09:00 moritz instead of trying to blame the compiler or language
09:01 _nadim morits. let me give you the whole thing, 5 lines, it would be easier on everyone :)
09:01 hahainternet today's advent is truly fantastic
09:01 hahainternet RabidGravy: congratulations on it, you really provide a nice overview
09:01 El_Che _nadim: it took me while a while to get named mateches/nested matches/etc right
09:02 El_Che _nadim: now waiting on DrForr's rewrite of the grammars tutorial to get that :)
09:02 Woodi El_Che: how you "look" what's in objects ?
09:03 RabidGravy hahainternet, cheers :)
09:03 El_Che Woodi: let me post an example for the code I am writing at the moment
09:04 timotimo _nadim: i may be too late already, but you were getting the "odd number of elements" error because you were not calling .hash on a Match (which would give you its hash part) but on a List (which tries to coerce the List into a Hash)
09:05 _nadim timotimo: example is my bad. the problem is somewhere else
09:05 _nadim moritz: http://nopaste.linux-dev.org/?884363
09:05 g4 joined #perl6
09:05 g4 joined #perl6
09:06 hahainternet RabidGravy: i really enjoyed the "I did a thing, it was simple, here it is" style of teaching
09:06 timotimo ah, moritz already told you
09:06 masak RabidGravy++ # https://perl6advent.wordpress.com/2015/12/16​/day-16-yak-shaving-for-fun-and-profit-or-ho​w-i-learned-to-stop-worry-and-love-perl-6/
09:06 psy_ joined #perl6
09:06 hahainternet lots of people seem afraid of perl6, but your post makes it clear that it's approachable
09:06 masak RabidGravy: nitpick: I think it's "stop worrying" originally
09:07 _nadim El_Che: I get match and grammar match OK already, it's just stubborness as I think the three lines of code that handle it look ugly. I'll take an URL to the tutorial if you have it :)
09:07 hahainternet although i must say you should have been a bit more explanatory about the first segment
09:07 _nadim timotimo: yes he did :) the "real" code here http://nopaste.linux-dev.org/?884363
09:07 RabidGravy masak, I actually thought I had typed that originally, but when I realised I hadn't I quite liked what it was :)
09:08 timotimo why would a regex match have a named capture store a Nil in it?
09:08 |Tux| ===SORRY!===
09:08 |Tux| Could not find Test in:
09:08 |Tux| /pro/3gl/CPAN/rakudobrew/.p​anda-work/1450256669_1/lib
09:08 |Tux| t/01-basic.t ..
09:08 |Tux| Dubious, test returned 1 (wstat 256, 0x100)
09:09 masak RabidGravy: well, it's your post :) just noticed it and felt it was an unexplained deviation.
09:10 masak I'm not a native speaker, but "stop worrying" sounds more natural to me
09:10 * masak stops bikeshedding :)
09:10 hahainternet it should be blue masak god!
09:10 hahainternet :D
09:10 hahainternet i am a native speaker, and it should technically be 'worrying'
09:11 hahainternet but i've corrected a bunch of spelling/grammar in here and it doesn't seem people mind it, so i'll shut up :)
09:11 timotimo _nadim: i find it hard without an example string + regex that you want to introspect
09:11 dakkar joined #perl6
09:14 _nadim timotimo: https://github.com/nkh/P6-Data-Dump-Tree.git  t/12_xxxx.t has the Grammar example and other examples
09:15 * masak tries not to imagine a blue masak god
09:15 moritz _nadim: you should use Match:D $a in the signature to prevent type objects from coming in
09:16 moritz _nadim: and if $a.hash dies, please show me how you call the method
09:18 _nadim moritz: I think type object are filtered out earlier, I'll check. in the test cases no type object is used.  The code doesn't die, it just doesn't find out if .hash has anything of interrest. the uglier code works fine.
09:19 moritz _nadim: ah, because you call .defined on it
09:19 moritz _nadim: an empty hash is still defined
09:20 n0tjack joined #perl6
09:22 Begi Is there a free hosting offer for Perl 6 code ?
09:23 Begi I'd like to use Bailador for one of my website
09:24 Begi The other way is to user Dancer, but with Perl 5 :/
09:24 moritz Begi: not really hosting, but we have a community server which you can use for Perl 6 stuff
09:24 hahainternet oh do we? who pays for that?
09:25 hahainternet i'm happy to buy a year's server rental from ovh or whatever, but i didn't know there was a community server
09:25 timotimo _nadim: sorry, my brain doesn't feel sufficiently awake for me to dig into perl6 code
09:25 timotimo i may hammer my head against my c code from yesterday, though
09:25 timotimo as that's at least only in one file %)
09:26 Begi moritz : I create a small site for a school, can I use this server ?
09:27 moritz hahainternet: the hardware was donated from the community, and my employer sponsors the colo in its own data center
09:27 moritz Begi: sure
09:27 moritz Begi: please tell me your desired username
09:27 Begi "Emeric", is it possible ?
09:27 hahainternet moritz: oh very nice, i could probably arrange the same with my employer
09:27 hahainternet but unfortunately for most things, i'm my own employer
09:28 hahainternet moritz: tell me if you need more hardware or think another server would be valuable, my company will back it
09:28 Begi That's cool, thanks #perl6 community !
09:28 moritz Begi: well, I'll lower-case it
09:29 moritz hahainternet: well yes, more hardware for continuous integration stuff would help
09:30 hahainternet moritz: interesting, i'm buying a new server from SYS in january
09:30 hahainternet i'll buy two instead
09:30 moritz hahainternet: SYS?
09:30 hahainternet moritz: 'so you start'
09:30 hahainternet OVH's startup brand in the EU
09:31 hahainternet very nice servers for very low prices
09:31 hahainternet http://www.soyoustart.com/en/essential-servers/
09:31 DrForr I really wish I felt that Bailador was ready for prime time, I'd put blogs.perl.org on it.
09:31 moritz hahainternet: ah, I have a VM for personal stuff at ovh
09:31 hahainternet moritz: i think i have 3 dedis, plus 2 more for work lol
09:31 hahainternet they're pretty good!
09:32 masak Begi: I seem to recall there was an unofficial https://www.heroku.com/ middleware for Perl 6.
09:32 timotimo DrForr: oh, you run blogs.perl.org?
09:32 masak Begi: yep: https://github.com/pnu/heroku-buildpack-rakudo
09:32 masak Begi: use at your own risk, of course, but... definitely a nice option
09:33 DrForr I will officially as of January, yes.
09:34 Begi masak : it could be enough for me, I'll try
09:35 Hameed_ joined #perl6
09:35 RabidGravy well, I compiled Perl 6 on the server that has my websites on and it worked, still haven't done anything with it though
09:49 timotimo an amazon EC2 t2.nano instance doesn't have enough ram to run most interesting perl6 workloads :|
09:50 RabidGravy that sucks
09:51 timotimo 512 megabytes
09:51 timotimo IIUC that has to hold a linux, too
09:52 El_Che Woodi: example of nested named captures as mentioned: http://paste.ubuntu.com/14048213/
09:53 zakharyas joined #perl6
09:54 maziar joined #perl6
09:54 labster joined #perl6
10:00 Woodi El_Che: hehe :) above I was wondering about Perl6 object instances. but I like all that LDAP/LDIF stuff :)
10:00 El_Che Woodi: haha :)
10:01 RabidGravy m: say $*OUT.native-descriptor
10:01 camelia rakudo-moar eac2b8: OUTPUT«1␤»
10:01 El_Che Woodi: well, it took me some trial and error to get to the nested named captures :)
10:01 Woodi El_Che: maybe you have grammar for ldif ?
10:01 RabidGravy Hmm, that's odd,
10:01 RabidGravy [jonathan@coriolanus ecosystem]$ perl6 -e 'say $*OUT.native-descriptor'
10:01 RabidGravy 11
10:02 Woodi I tried to make OpenLDAP bindings but stopped on search params, some magic C struct there...
10:02 maziar joined #perl6
10:02 El_Che Woodi: I started writing a grammar for ldif, but I never got the Actions right (too many holes for me in the tutorial). So I scaled down for the moment and used regexes without making the a grammar. I wanted to have this programs working (I'll adapt it later)
10:04 vytas RabidGravy++, nice post. I am thinking of porting a large library myself, which would mean implementing many prerequisites, so it was pleasure to read :)
10:04 Woodi El_Che: you are enabling schema maybe ? or just modifing ?
10:05 RabidGravy :)  vytas do it! do it!
10:05 El_Che Woodi: actually, the goal of the program is to check data consistency of ldap databases, e.g. every night
10:06 leont joined #perl6
10:06 brrt joined #perl6
10:06 Woodi El_Che: eg. other way to change something is in the login app: user logs in and then entry is modified to new format, etc
10:06 El_Che Woodi: so not a quick sync check like with nagios (eg contextCSN) but really the complete db's from all the nodes (we've been bitten before by small discrepensies)
10:07 Woodi El_Che: so it's probably stuff above ldap db/protocol...
10:07 El_Che Woodi: yes, by default
10:07 El_Che Woodi: I start from a slapcat dump
10:08 El_Che Woodi: transform it to make diffs between the nodes and report the differences if any
10:08 Woodi El_Che: replication not work ?
10:09 El_Che Woodi: it does. But e.g. a multi-master setup does not warrant data consistency. Specially when the provisioning is done by an external system with its own state
10:10 El_Che Woodi: 99.99% of the time you will be OK. What I am writing is more of a failcheck to make sure the data stays consistent.
10:10 espadrine joined #perl6
10:11 Woodi El_Che: maybe just new entries differ, not yet synchronised ?
10:12 Woodi err, new modifications all over db :)
10:13 El_Che Woodi: when changes happen on 2 nodes at the same time, change 2 may shadow change 1. Povisioning on node 1, e.g. new phone nr, and at the same time a passwword failure time writing on node 2. On a multimaster setup both nodes will race to write the change and 1 change will shadow the other (in extreme case, e.g. high load)
10:14 El_Che Woodi: like said, it's just I failsafe to detect micro differences in really border cases (as acknowledged in de openldap docs)
10:14 El_Che Woodi: I've been there, hence this program
10:14 Woodi El_Che: yes, probably I need refresh that...
10:15 El_Che Woodi: I ended changing the architecture from multi-master to maste+slaves+slaves-chain-to-mas​ter-for-password-related-changes
10:15 smls joined #perl6
10:15 El_Che Woodi: a lot safer for data consitency and pretty HA (when the master is down, no new external provisioning is done, buyt that's ok, it's what we want)
10:16 nine El_Che: maybe this example for Grammar/Action may help you: https://github.com/niner/Apache-To-Nginx​/blob/master/lib/Apache/Config/Parser.pm https://github.com/niner/Apache-To-Nginx/​blob/master/lib/Apache/Config/Actions.pm
10:16 El_Che thx nine, I'll review it
10:16 nine El_Che: there's little documentation for actions because there really is not all that much to it :) Took me a while to understand that, too.
10:17 El_Che nine: the problem I had was that I got the examples working by cargo cult. Once I wanted to do the smalles change I was lost :)
10:17 quester left #perl6
10:17 Woodi El_Che: you know what ? it's standards problem :) they make standard in 1988 but not include few things like replication and chaining and in next period - 4 years - add more things. in meantime some implementations are done and they have "planned" things implemented but every one in it's own way ;)
10:17 Woodi totally not related to 6.c ;)
10:18 El_Che Woodi: whell, maybe related
10:18 Woodi El_Che: I know :)
10:18 El_Che the perl-ldap libraries are the golden standard of ldap language libraries
10:18 nine El_Che: your :action is an object that has a method for every named token or rule in your grammar. When ever such a token matches the corresponding method of the action object is called. This method just has to set the .ast property of the match object ($/) to the desired value. "make 1" is a shortcut for $/.ast = 1;
10:19 El_Che nine: make, made, head explodes :)
10:20 nine m: grammar Foo { rule TOP { .* }; }; class FooAction { method TOP { make 1; }; }; Foo.new.parse("whatever").ast.say;
10:20 camelia rakudo-moar eac2b8: OUTPUT«(Any)␤»
10:21 nine m: grammar Foo { rule TOP { .* }; }; class FooAction { method TOP($/) { make 1; }; }; Foo.new.parse("whatever", :actions(FooAction.new)).ast.say;
10:21 camelia rakudo-moar eac2b8: OUTPUT«1␤»
10:21 nine El_Che: ^^^ this is it in a nutshell
10:21 nine El_Che: .made is just a synonym for .ast. make is just $/.ast =
10:22 moritz one small thing to add: missing action methods are not errors
10:22 moritz just nothing happens
10:22 nine m: grammar Foo { rule TOP { .* }; }; class FooAction { method TOP($/) { $/.ast = 1; }; }; Foo.new.parse("whatever", :actions(FooAction.new)).ast.say;
10:22 camelia rakudo-moar eac2b8: OUTPUT«Cannot modify an immutable Any␤  in method TOP at /tmp/uRppfADBHI:1␤  in regex TOP at /tmp/uRppfADBHI:1␤  in block <unit> at /tmp/uRppfADBHI:1␤␤»
10:22 smls TimToady: I found another useless use of 'useless use' for you... ;)
10:22 smls m: sub a { "$_ $_" given 42 }
10:22 camelia rakudo-moar eac2b8: OUTPUT«Useless use of "$_ $_" in expression "$_ $_" in sink context␤- QAST::Op(call &infix:<~>)  $_ $_␤  - QAST::Op(callstatic &infix:<~>) ␤    - QAST::Op(callmethod Stringy) ␤      - QAST::Var(lexical $_) :BY<nibbler2 W> :WANTED $_␤    - QAST::Want ␤…»
10:22 RabidGravy speaking of actions, is badness likely to ensue if one was to start parsing from within an action method?
10:22 moritz RabidGravy: no; you just have take care not to clobber your $/
10:23 arnsholt No, I think the regex engine is reentrant in that sense
10:23 moritz RabidGravy: that is, a regex match usually sets $/, but if you declare $/ as a paramater, it's read-only
10:23 arnsholt Oh, but moritz has a very good point
10:23 moritz easy fix: don't name the parameter $/
10:23 RabidGravy :)
10:23 El_Che nine: I see. thx.
10:25 El_Che Woodi: about openldap standards and perl6. The openldap people moved to the olc format some time ago making the slapd.conf format obsolete for configuration. They drop deprecated stuff very fast, so a perl6 olc reader writer would be nice :)
10:28 moritz fwiw the python "ldap3" library also feels like solid engineering to me
10:30 El_Che moritz: I am sure it is. But a standard is also a defacto standard. There is a zillion LDAP related code in perl5, e.g. our load balancing appliance uses perl6 code for the healthcheck test for LDAP services
10:37 bpmedley joined #perl6
10:45 dalek perl6-most-wanted: afb08f7 | (Claudio Ramirez)++ | most-wanted/modules.md:
10:45 dalek perl6-most-wanted: Add Net::LDAP
10:45 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/afb08f799d
10:45 dalek perl6-most-wanted: 86f0932 | nxadm++ | most-wanted/modules.md:
10:45 dalek perl6-most-wanted: Merge pull request #11 from nxadm/master
10:45 dalek perl6-most-wanted:
10:46 dalek perl6-most-wanted: Add Net::LDAP
10:46 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/86f0932c60
10:46 virtualsue joined #perl6
10:46 Woodi yay :) (Claudio Ramirez)++
10:46 Peter_R joined #perl6
10:47 El_Che :)
10:51 Woodi El_Che: yea, I prefer slap.conf... but new .config is just ldap protocol so app to use this needs just to parse ldif format
10:52 Woodi El_Che: anyway hate this, gui recomended...
10:53 El_Che Woodi: I am kind of fond of the olc way of doing thing. With 2 exepcions: 1. the doc is pretty much still stuck in slapd.conf 2. slapindex is gone (so the thing indexes by itself => in practice unavailable to the clients)
10:54 El_Che Woodi: I moved all the olc generation to Puppet. I was a lot of work, but it works very nicely.
10:54 Woodi El_Che: err? so how to make slapadd create indexes on empty db ??
10:55 RabidGravy could the fact that $*IN.native-descriptor returns 10 here, except if the input is redirected (when it returns 0 as I expect) be something the shell is doing?
10:55 El_Che Woodi: once you add indexes through an ldif* online command, the thing starts indexing by itself.
10:56 El_Che Woodi: no downtime, but if the IO is heavy, your clients will get timeouts
10:56 Averna joined #perl6
10:56 Woodi El_Che: yes, so you have problems with offline crating new db for slave or master...
10:57 El_Che Woodi: no, not really, but you need to be careful when creating indexes on existings db's
10:58 jnthn morning, #perl6
10:58 yoleaux 01:40Z <TimToady> jnthn: the orelse/defor problem turned out to be totally my fault, a side effect of generalizing EXPR wrongly; the feed operators also blew up for the same reason
10:58 El_Che anyway, let stop annoyting #perl6 with LDAP problems :)
10:58 jnthn Phew :)
10:58 smls m: say «aa bb:cc=dd».perl
10:58 camelia rakudo-moar eac2b8: OUTPUT«("aa", "bb", :cc, "=dd")␤»
10:59 smls ^^ Is that supposed to happen?
11:01 RabidGravy marnin jnthn
11:03 lucs joined #perl6
11:07 brrt anybody know a git-like thing for syncing Documents (as in, binary-blobs-used-by-office-suites)
11:07 brrt 'use latex and git' is not, unfortunately, a suitable answer :-)
11:08 brrt 'use dropbox' is also not, unfortunatey, a suitable answer either
11:08 RabidGravy share point :-O
11:08 jnthn smls: I think pairs are special inside <<...>>
11:08 smls Even without a space before it?
11:09 smls Also: why?
11:09 jnthn brrt: There are various git add-ons to ease dealing with binary things, iirc
11:09 brrt hmm.. ok, well, i'll try that then :-)
11:09 jnthn I think git annex is one such thing
11:09 jnthn m: say <<"a""b">>
11:09 camelia rakudo-moar eac2b8: OUTPUT«(a b)␤»
11:10 jnthn Seems we're not that strict generally about the whitespace in there...
11:10 smls Seems so
11:12 Averna joined #perl6
11:12 vividsnow joined #perl6
11:17 Averna joined #perl6
11:30 rurban joined #perl6
11:31 Skarsnik joined #perl6
11:34 abraxxa which is the preferred way of accessing a hash element?
11:34 abraxxa %hash<$key> or %hash{$key} ?
11:35 timotimo the first of those won't work the way you expect
11:35 abraxxa the intro docs on hashes are missing this topic completely
11:35 timotimo it'd have to be %hash<<$key>> if you want interpolation of $key
11:35 timotimo and in the <<$key>> case you're forcing stringification, whereas %hash{$key} can also work with "object" keys (also simpler things like Int)
11:35 abraxxa i see, thanks
11:35 jnthn %hash<key> for literal keys, %hash{$var} otherwise
11:35 jnthn I pretty much never use %h{'key'}
11:36 timotimo me neither, and i hate that other languages tend to not have something like %hash<literalkey>
11:36 gfldex m: my Any %h; my class C {}; my C $c.=new; %h<<$c>> = 42; dd %h
11:36 camelia rakudo-moar eac2b8: OUTPUT«Hash[Any] $var = (my Any % = "C<140082277671008>" => 42)␤»
11:36 gfldex abraxxa: please note ^^^
11:37 abraxxa jnthn: me neither (in Perl 5)
11:38 timotimo gfldex: um, i think you mean my %h{Any}
11:38 timotimo m: my %h{Any}; class C {}; my C $c .=new; %h{$c} = 42; dd %h
11:38 camelia rakudo-moar eac2b8: OUTPUT«Hash[Any,Any] $var = (my Any %{Any} = (C.new) => 42)␤»
11:38 gfldex indeed, no tea yet
11:38 timotimo m: my Any %h; class C {}; my C $c .=new; %h{$c} = 42; dd %h
11:38 camelia rakudo-moar eac2b8: OUTPUT«Hash[Any] $var = (my Any % = "C<140172659421336>" => 42)␤»
11:38 Begi joined #perl6
11:38 timotimo ^- that also does the stringification you wanted to warn about with <<$c>>
11:39 jnthn abraxxa: Yes, but in Perl 6 you can't write %h{literal} :)
11:39 gfldex even without a morning tea, i'm only halve wrong!
11:39 timotimo good mroning
11:39 jnthn What is this morning...tea...you speak of? :)
11:43 abraxxa jnthn: that's what %hash<key> is for, i got it
11:44 abraxxa gfldex: what exactly did you want to show me with your example?
11:45 abraxxa do i need to call private methods with !?
11:46 abraxxa method !private {} method foo { self.!private(); }
11:46 jnthn Yes
11:47 abraxxa if the method returns a hash, can i access one element directly?
11:47 abraxxa i tried my $parmdp = self.!parmd{$field_index};
11:47 abraxxa but got: Unsupported use of . to concatenate strings; in Perl 6 please use ~
11:47 timotimo it's just "self!parmd"
11:48 abraxxa aren't method calls .?
11:48 abraxxa does the ! replace the .?
11:49 jnthn Private method calls are done with !, not .
11:49 abraxxa ah, the perl6intro.com doc shows it even, overlooked it, sorry!
11:49 jnthn Nice way to think of it: you can freely refactor things involving a ! without having to consider anything outside of the body of your class
11:50 gfldex abraxxa: <<$object-ref>> will turn the object reference into a string, a bit like turing a c-pointer into a string. Most likely not what you want.
11:51 abraxxa gfldex: i see, thanks!
11:51 gfldex abraxxa: so, use <<>> if you know for sure that you will never change the key-type from it's default Str to something else
11:51 jnthn Well, this is bother...
11:52 jnthn m: my (\a, \b) = 1, 2; say a; say b; # so I accidentally made this work
11:52 camelia rakudo-moar eac2b8: OUTPUT«1␤2␤»
11:52 jnthn BUT
11:52 abraxxa so can I access the key of a hash returned from a method call directly when calling the method?
11:52 jnthn m: my \a = 42; say a; a = 69; say a;
11:52 camelia rakudo-moar eac2b8: OUTPUT«42␤Cannot modify an immutable Int␤  in block <unit> at /tmp/cclZKv2ObX:1␤␤»
11:52 jnthn m: my (\a) = 42; say a; a = 69; say a;
11:52 camelia rakudo-moar eac2b8: OUTPUT«42␤69␤»
11:52 jnthn If it's going to stay we have to live with that discrepancy...
11:52 jnthn Probably
11:53 abraxxa what is \a?
11:53 jnthn Or do something horrible in the code-gen :)
11:53 jnthn sigilless variable, *meant* to be static single assignment :)
11:53 abraxxa like a constant?
11:53 jnthn Yes and no :)
11:54 jnthn It's meant to be constant from the point you assign it.
11:54 gfldex '\' makes you talk about the container, '$' makes you talk to the container
11:54 abraxxa isn't that what a binding does too?
11:54 gfldex yes
11:54 jnthn TimToady: Design ruling on ^^ welcome; I've not much idea what to do :-)
11:55 jnthn oh, or maybe I do... :)
11:56 gfldex (\a, \b) looks to my like a binding on the position into an anonymous list. A list is invariable, it's elements are not. That is easy to document but hard to guess. Not optimal in my eyes.
11:56 jnthn Well, in the case of
11:56 jnthn my (\a, \b) := 1, 2;
11:56 jnthn Then it's a signature bind that is happening
11:57 smls Is there a way to drop the first item from a Seq (like Haskell's "tail") without caching it?
11:57 vividsnow joined #perl6
11:57 jnthn hm, tail caches?
11:57 smls Perl 6's tail does something different, doesn't it?
11:58 jnthn Ah, there is that :)
11:58 gfldex you could take an iterator and skip the first element before you really start iterating over that Seq
11:58 jnthn Yeah, I don't know we have a method for doing that.
11:59 jnthn Of course, there are tricks
11:59 smls I guess  .grep({ $++ })  works
11:59 jnthn .grep({ ...yes, that :)
11:59 smls but probably inefficient compared to a true Haskell "tail"
12:00 jnthn Indeed
12:02 cxreg "my other car is a cdr"
12:03 lucs "When my wife left me, she took everything. The kids, the house, the car. She didn't even leave me the cdr!"
12:04 Woodi lucs: becouse womans are like tornados - first it is warm and wet.... ;)
12:11 kaare_ joined #perl6
12:11 virtualsue well that conversation took a wrong turn somewhere
12:12 moritz indeed
12:15 pnu Begi: please let me know if the heroku-buildpack-rakudo works for you, and if there's something I can do for it.
12:16 RabidGravy right off shopping
12:16 Begi pnu : I haven't try it yet
12:17 * jnthn sighs at Woodi
12:17 jnthn Seems I've found a way to keep my (\a, \b) = 1,2; working but not let it be assigned afterwards.
12:18 jnthn So I guess we can keep it.
12:18 jnthn TimToady++ did say in the RT we should make at least one of them work, so I guess I'm allowed to make 2 of them work :P
12:19 moritz m: say "one" ~~ "at least two"
12:19 camelia rakudo-moar eac2b8: OUTPUT«False␤»
12:21 moritz erm
12:21 moritz whatever :-)
12:21 moritz m: say 2 ~~ (1..*)
12:21 camelia rakudo-moar eac2b8: OUTPUT«True␤»
12:22 yakudza joined #perl6
12:27 dalek rakudo/nom: f303efc | jnthn++ | src/Perl6/Actions.nqp:
12:27 dalek rakudo/nom: Enforce SSA on sigilless in `my (\x, \y) = 1, 2;`.
12:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f303efcea4
12:28 dalek roast: a1c2454 | jnthn++ | S04-declarations/my.t:
12:28 dalek roast: Tests for RT #126626.
12:28 dalek roast: review: https://github.com/perl6/roast/commit/a1c2454fd7
12:29 jnthn The way it works is kinda crazy, but given half the crazy was already happening "for free", I figured I'd just implement the other half :)
12:32 abraxxa m: my %hash; say %hash.defined;
12:32 camelia rakudo-moar f303ef: OUTPUT«True␤»
12:32 abraxxa m: my %hash; say %hash.Bool;
12:32 camelia rakudo-moar f303ef: OUTPUT«False␤»
12:33 abraxxa m: my %hash = (); say %hash.Bool;
12:33 camelia rakudo-moar f303ef: OUTPUT«False␤»
12:33 abraxxa m: my %hash = (key => 'value'); say %hash.Bool;
12:33 camelia rakudo-moar f303ef: OUTPUT«True␤»
12:33 abraxxa so unless %!hash {} should be fine to check if the hash has been populated before?
12:35 jnthn An empty hash boolifies to False
12:35 jnthn lunch &
12:35 kid51 joined #perl6
12:35 abraxxa yes, nice
12:35 Skarsnik you could probably do %hash.elems == 0
12:35 abraxxa I have expected that defined behaves like Bool
12:36 abraxxa Skarsnik: I've thought about .keys
12:38 rurban joined #perl6
12:39 timotimo .defined and .Bool aren't the same in many cases
12:39 timotimo m: say "".defined; say "".Bool
12:39 camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
12:39 timotimo m: say 0.defined; say 0.Bool
12:39 camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
12:39 timotimo m: say [].defined; say [].Bool
12:39 camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
12:41 abraxxa what is the idea behind the two methods?
12:43 timotimo the one tells you whether something is defined, the other tells you whether something is truth-y
12:43 gfldex m: my Bool $b; say $b.defined, $b.Bool; $b = False; say $b.defined, $b.Bool;
12:43 camelia rakudo-moar f303ef: OUTPUT«FalseFalse␤TrueFalse␤»
12:43 n0tjack joined #perl6
12:43 gfldex that something if false doesn't mean it's undefined
12:44 gfldex undefinedness means (in most cases) "This container is unfilled, it doesn't even contain Nothing."
12:44 abraxxa so why is my %hash; defined true?
12:44 abraxxa it's not explicitly initialized to an empty hash with my %hash = ();
12:44 dalek tablets: da7c5e0 | (Herbert Breunung)++ | docs/appendix-e-exciting.txt:
12:44 dalek tablets: added more comparison exampel (stole one from jnthn++ slide)
12:44 dalek tablets: review: https://github.com/perl6/tablets/commit/da7c5e0a4e
12:45 abraxxa so if it is always True for hashes it's useless
12:45 gfldex because if you got an array of hashes, you need to know if the hashes are already there
12:45 lichtkind joined #perl6
12:45 timotimo my %hash is implicitly filled with an empty hash for you
12:46 gfldex The assumption that something in Perl 6 design is wrong, is almost always wrong. :)
12:46 gfldex m: my Hash $h; say $h.defined;
12:46 camelia rakudo-moar f303ef: OUTPUT«False␤»
12:47 abraxxa in which spec is this defined?
12:47 gfldex there may be a fairly long sub-calls chain between the my and the .defined;
12:47 abraxxa m: my %h; say %h.defined;
12:47 camelia rakudo-moar f303ef: OUTPUT«True␤»
12:47 abraxxa awesome, the same object returning different things depending on the sigil!
12:47 gfldex %h is ready to use. my Hash $h is not
12:48 abraxxa i was told yesterday that the sigils are just the same as defining a type
12:48 gfldex sigil defines interface, not existence
12:48 gfldex that was wrong then
12:48 abraxxa m: my Hash $h; $h<key> = 'value';
12:48 camelia rakudo-moar f303ef: ( no output )
12:48 abraxxa seems to work
12:49 gfldex sigils are a way for you to tell the compiler to provide you with some short cuts
12:49 abraxxa m: my Hash $h; $h<key> = 'value'; say $h.gist;
12:49 camelia rakudo-moar f303ef: OUTPUT«key => value␤»
12:49 gfldex sometimes you don't want short cuts. That's why there are other ways to do it.
12:49 abraxxa gfldex: so how do you define 'not ready to use'?
12:50 masak m: my Hash $h; $h<key> = 'value'; say $h.defined
12:50 camelia rakudo-moar f303ef: OUTPUT«True␤»
12:50 gfldex m: my @a of Hash; @a[0]{'a'} = 42; my @b; @b[0]{'b'} = 0815;
12:50 camelia rakudo-moar f303ef: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6.␤    Please use 0o815 if you mean that.␤    at /tmp/psK7sFjR8r:1␤    ------> 3a[0]{'a'} = 42; my @b; @b[0]{'b'} = 08157⏏5;␤»
12:50 abraxxa masak: sure, it contains data now
12:50 gio01122001 joined #perl6
12:50 gfldex @b is not ready to use
12:50 gio01122001 hi
12:51 abraxxa gfldex: i'm not talking about an array!
12:51 gio01122001 why
12:51 masak gio01122001: because! :)
12:51 gfldex you are taking about a hash. And it's definedness matters if you use it as a member of a complex data structure.
12:51 Woodi m: my Hash $h; say $h.defined; say %h.defined;  # this is strange...
12:51 camelia rakudo-moar f303ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KFNbWdoFS8␤Variable '%h' is not declared. Did you mean '$h'?␤at /tmp/KFNbWdoFS8:1␤------> 3my Hash $h; say $h.defined; say 7⏏5%h.defined;  # this is strange...␤»
12:52 gfldex the whole defineness-thing becomes really important when you do MMD
12:52 masak Woodi: why is that strange?
12:52 Woodi ok, ir 2015.11 it was False\nTrue...
12:52 moritz Woodi: it's exactly as I'd expect it
12:52 gio01122001 hey what's this?
12:52 moritz gio01122001: we're talking about Perl 6
12:52 Woodi but now message about %h.defined; is correct to me
12:52 smls abraxxa: A $ variable is a generic item container, it can contain any value, defined or undefined. Whereas @ and % variables are much more special - they *are* an instantiated Array/Hash object, they don't just contain one.
12:53 abraxxa and why does if %hash check for bool and not definedness?
12:53 gio01122001 i don't understand anything fuck you
12:53 gio01122001 im offline
12:53 smls abraxxa: because   'if'  always checks for .Bool
12:53 masak gio01122001: thank you for passing by. good bye.
12:53 gfldex abraxxa: because if it would you would lose the distinction between defineness and trueness
12:53 abraxxa smls: so a Hash $hash is a typed Container not containing a Hash at this time?
12:53 gio01122001 suka bliad
12:54 masak gio01122001: have a nice day <3
12:54 gio01122001 bitch
12:54 masak hugs
12:54 Woodi gio01122001: pleas leave
12:54 gio01122001 idi naxui tvoiu mat
12:54 smls abraxxa: Technically it containes the "type object" of class Hash by default
12:54 timotimo i'm surprised autoviv makes "my Hash $h; $h<key>;" vivify $h, tbh
12:54 timotimo m: my Array $foo; $foo[1] = "hi"; say $foo
12:54 camelia rakudo-moar f303ef: OUTPUT«[(Any) hi]␤»
12:54 gfldex Woodi: kindness doesn't work with russians. Please don't feed him.
12:54 masak oh, he was Russian.
12:55 timotimo seems like it's the same for Array. pretty nice.
12:55 masak gio01122001: should be "tvoyu mat"
12:55 smls abraxxa: For each class there is an uninitialized object called the "type object", which counts as undefined.
12:55 abraxxa smls: is the Container proxying the method calls to its inner object?
12:56 smls indeed
12:56 smls the container hides itself very well
12:56 abraxxa and my %hash doesn't contain a type object?
12:56 abraxxa sounds like useless memory usage to me
12:56 smls %hash is a variable name being directly associated with an instantiated (a.k.a. defined) Hash object
12:56 gfldex abraxxa: autovivication can be quite useful
12:57 abraxxa what is the use case of the defined method?
12:57 moritz abraxxa: mostly distinguishing type objects from instances, missing from absent data
12:57 maziar joined #perl6
12:58 gfldex m: my %h is default(Hash); say %h.defined, %h.Bool; my $h is default(Hash); say $h.defined, ?$h;
12:58 camelia rakudo-moar f303ef: OUTPUT«TrueFalse␤FalseFalse␤»
12:58 lucasb joined #perl6
13:00 gfldex m: multi sub f(Hash:D $h) { say 'defined' }; multi sub f($h){ say 'undefined' }; my %h; my Hash $h; f %h; f $h;
13:00 camelia rakudo-moar f303ef: OUTPUT«defined␤undefined␤»
13:00 gfldex abraxxa: if you can force definedness (using type smilies) you can make assumptions about defineness in the rest of the sub.
13:01 gfldex and you assumption will be enfoced by the compiler
13:02 gfldex looks like i have to take my keyboad apat
13:03 Woodi any shortcut to look into objects like .perl is doing but without stringifcation and reflections ?
13:05 lucasb Seems like vivification only works based on the subscript used, so you can only vivify an array or hash. Should something like 'my SetHash $s; $s<foo> = True' also vivify a SetHash? It doesn't work at the moment.
13:07 administrator joined #perl6
13:08 sufrostico joined #perl6
13:11 prammer joined #perl6
13:33 abraxxa hm, should this work because it seems to: CArray[Pointer[Str]]    $attributep is encoded('utf8'),
13:37 koo8 joined #perl6
13:40 geekosaur joined #perl6
13:41 geekosaur joined #perl6
13:42 Skarsnik hm, no idea x)
13:42 abraxxa interesting things happen
13:42 abraxxa i fetch the column names of a prepared query with an OCI function
13:43 abraxxa the first three columns returned the correct names, the fourth one had the name of the third appended because it was behind the memory location and it reads until finding the null termination
13:43 abraxxa not once but on multiple testruns
13:44 abraxxa i can't use 'is rw' here because it's a pointer to a pointer
13:47 abraxxa DBDish::Oracle passes all tests but the one where is-deeply seems to be buggy
13:52 vividsnow joined #perl6
13:55 brrt abraxxa; maybe you want to use buf8 or something to decode them 'manually' in perl6?
13:55 brrt i'm being of course totally ignorant
13:57 abraxxa brrt: yes, that's what I already do when getting the errortext and for getting out-bind values
13:57 El_Che aghr. I need to stop programming perl6 and get other stuff with deadlines doen. Fun to play with the presents before christmas
13:57 xpen joined #perl6
13:57 abraxxa would be nice if there are helpers for this in NativeCall
13:58 Skarsnik hm, you managed to get Buf from C?
13:59 dalek rakudo-star-daily: b31ab98 | coke++ | log/ (8 files):
13:59 dalek rakudo-star-daily: today (automated commit)
13:59 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/b31ab98886
14:00 Skarsnik abraxxa, be careful 2.3 is Rat not Num, 2.3e0 is Num
14:01 abraxxa Skarsnik: I hacked on that the last two days
14:01 abraxxa i'm returning Rat's
14:03 hoelzro good morning #perl6
14:03 rindolf Hi all! rakudobrew build jvm consumes 29.8% of my 8 GB of RAM.
14:03 hoelzro o/ rindolf
14:03 rindolf hoelzro: good morning.
14:04 rindolf Oops! There was an exception. :-(.
14:04 rindolf Maybe it's not suitable for openjdk yet.
14:04 Skarsnik abraxxa, if you look at https://travis-ci.org/perl6/DBIish I have the same issue with is-deeply, I marked the test as Todo x)
14:05 hoelzro rindolf: the JVM build is currently broken, sad to say =(
14:05 hoelzro happy to say, I'm working on fixing it right now =)
14:05 rindolf hoelzro: ah.
14:05 rindolf hoelzro: thanks!
14:05 abraxxa Skarsnik: gimme a sec, commiting in progress ;)
14:05 rindolf hoelzro: did the CI catch that?
14:07 moritz rindolf: do we even have JVM-based CI builds?
14:07 hoelzro I thought we did, but maybe that was for NQP
14:07 rindolf moritz: no idea.
14:08 hoelzro we do
14:08 hoelzro for rakudo, that is
14:08 hoelzro but it's marked as "allow failures"
14:08 hoelzro which, iirc, says "don't yell at people if that build is failing"
14:09 molaf joined #perl6
14:10 p6newbie joined #perl6
14:11 p6newbie Function 'CompUnit::Repository' needs parens to avoid gobbling block at .rakudobrew/moar-2015.11/panda/bootstrap.pl:30
14:11 p6newbie Missing block (apparently claimed by 'CompUnit::Repository') at .rakudobrew/moar-2015.11/panda/bootstrap.pl:31
14:11 p6newbie cannot install "panda" because of those messages. any idea?
14:11 hoelzro that looks like panda is too new for that rakudo
14:12 hoelzro p6newbie: could you cd .rakudobrew/moar-2015.11/panda and do a git show -s ?
14:12 abraxxa rindolf: I was able to build 2015.09 or so on my Raspberry PI 1 with 256MB memory and 1GB swapfile
14:13 p6newbie commit 372e9c323aaea76f953b0ff7b2e65d07a2ca9614 Merge: ee64893 a63e344 Author: nine Date: 12.12
14:13 hoelzro hmm, that's why
14:13 hoelzro I guess it couldn't check out the 2015.11 tag, because there isn't one?
14:14 rindolf abraxxa: OK, I have an x86-64 machine.
14:14 hoelzro p6newbie: if you git checkout 490c859 && perl6 bootstrap.pl, it should work
14:14 p6newbie I followed the instructions...
14:15 andreoss joined #perl6
14:15 hoelzro p6newbie: yeah, it should usually work; I assume you did something like rakudobrew build 2015.11 ?
14:15 abraxxa Skarsnik: pushed, finally!
14:15 abraxxa Skarsnik: now I will rebase onto the main repo
14:15 Skarsnik huhu good luck
14:16 p6newbie Dynamic variable %*CUSTOM_LIB not found in sub MAIN at bootstrap.pl:19 in block <unit> at bootstrap.pl:1   I'll try again with 2015.12 when it's out
14:18 hoelzro p6newbie: could you try e9055fe97c759a7e2eeb3503cb0b69a734b82256?
14:18 hoelzro that should do it, I think
14:18 void1 joined #perl6
14:20 cdg joined #perl6
14:24 skids joined #perl6
14:24 [Coke] rindolf: jvm needs some care at the moment; we'll probably fix it up after the christmas release.
14:24 Skarsnik hm, what is the typename for bigint?
14:25 moritz Skarsnik: Int
14:27 RabidGravy joined #perl6
14:29 RabidGravy boom
14:29 andreoss m: sub foo is cached { 1 }
14:29 camelia rakudo-moar f303ef: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cN6uk1LJts␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/cN6uk1LJts:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
14:29 andreoss is 'is cached' gone?
14:29 geekosaur yes
14:29 geekosaur well, experimental
14:30 petercommand joined #perl6
14:30 zz3 joined #perl6
14:30 geekosaur needs some work before going back into mainline
14:30 Skarsnik RabidGravy, haha I was searching for you for JSON::Name. why not choose the is json trait instead of json-name? x)
14:30 andreoss what do i use instead for now? only state vars?
14:30 [Coke] you have to declare it if you use it.
14:31 [Coke] m: use experimental :cached; sub foo is cached { 1 }
14:31 camelia rakudo-moar f303ef: ( no output )
14:31 nine hoelzro: wouldn't it be better to recommend rakudo nom to people? That should give the best chance for the ecosystem to work
14:31 hoelzro nine: yes, that's probably for the best
14:31 n0tjack joined #perl6
14:31 [Coke] but, it's experimental. use at your own risk.
14:32 hoelzro I was just thinking about how we don't really have management for versions of dependencies
14:32 hoelzro it's basically "use Star or nom"
14:32 nine I guess backwards compatibility will become a hot topic in the coming months
14:32 moritz aye
14:32 Sqirrel joined #perl6
14:32 andreoss [Coke]: so there will be no default memorization for perl 6 in upcomming release?
14:33 [Coke] andreoss: correct.
14:33 moritz we should really start doing releases of modules :-)
14:33 nine I guess we would have releases if it weren't for panda's --force option ;)
14:33 hoelzro moritz: agreed
14:34 jnthn Aye. If 2015 was the year of getting the Perl 6 language straightened out, I hope 2016 will be the year of getting ecosystem things straightened out.
14:34 hoelzro I sure hope so
14:34 hoelzro I feel like a lot of people won't take us very seriously if we don't get our module story straight
14:35 nine If I had known that my code would be in the middle of the next hot topic, I might have reconsidered :)
14:35 RabidGravy Skarsnik, simply "json" would be a bit vague for my taste
14:36 hoelzro nine: I think this is just something we've all been kind of putting off =/
14:36 hoelzro ecosystem authors should probably have been doing YYYY.MM releases for a while now
14:36 * hoelzro is guilty as charged
14:36 ZoffixW joined #perl6
14:36 Skarsnik Go seems to use json (https://github.com/bwmarrin/dis​cordgo/blob/master/structs.go) but I have no idea how go work x)
14:37 hoelzro CURLI just brought this to light, much like "unit module" did a few months ago
14:37 ZoffixW Let's go with the Go's recommendation of creating a new repo for each new version :) This way we can really boost Perl 6 stats on all sorts of module counts sites :)
14:37 * Woodi think that "worrying about backward compat" is something what we unnsecsarilly do to ourselves (now and in some time in the future)... are we realy && 100% so serious now ? :)
14:38 ZoffixW Crazy back compat mentality is what I don't like about P5.
14:38 adu joined #perl6
14:38 nine "Crazy" back compat mentality is what makes P5 a good choice for our business.
14:38 moritz there's much space between "Crazy back compat" and what we do now :-)
14:39 RabidGravy hoelzro, I've been doing release tags on my modules
14:39 nine I replaced 10s of thousands of lines of PHP code by Perl exactly because we have to maintain it for decades
14:39 ZoffixW nine, you're running perl 5.6.1 on a security hole riddled ancient Debian?
14:39 Skarsnik Qt have a good crazy backcompat
14:39 hoelzro RabidGravy++
14:39 Woodi ZoffixW: we are not there yet and any ISO/POSIX/CCTTI/ANSI/.gov have form of errata to just "update" things...
14:39 ZoffixW The crazy back compat will be the reason why robots will take over.
14:40 andreoss left #perl6
14:40 andreoss joined #perl6
14:40 * Woodi thinks perl5 back compat is not crazy...
14:41 andreoss left #perl6
14:41 andreoss joined #perl6
14:41 ZoffixW my fingers are bleeding from typing use 5.020 just to get "say" to do what I want
14:41 Woodi ZoffixW: now I'm with you :)
14:41 ZoffixW :)
14:41 ZoffixW As for the ecosystem, can't we utilize git tags for "releases"?
14:42 andreoss what drawbacks should I accept by using experimental "is cached" now? Tried p6doc experimental, seems it doesn't exist
14:42 ZoffixW I mentioned that earlier, but jdv79 said those were "fungible"...
14:42 RabidGravy I do for myself
14:42 grondilu is there anything faster than @a.List?
14:42 Juerd grondilu: I suspect that 1 + 1 will be faster ;)
14:43 ZoffixW One of the possible drawbacks I see is someone pushing updates and never updating tags, so the installed versions never get updated.
14:43 nine grondilu: what are you trying to achieve?
14:44 ZoffixW One other approach I'm doing with IRC::Client is to do all new development in "bleed" branch and merge it into master whenever I make a "release" (i.e. when the updates are workable and tested).
14:44 grondilu I'm still thinking how to make permutatinos faster.
14:44 andreoss also is p6doc going to be standard tool in the release?
14:44 [Coke] https://gist.github.com/coke/1f5ff064a85f13e13261 - current failures on os x (including timtoady++s fixes earlier)
14:45 grondilu I've tried the heap algorithm but could not make it faster
14:45 [Coke] andreoss: if it's installed now, it's going to be installed next week.
14:45 nine grondilu: .List really gives you a plain List and for that it has to copy the array's elements.
14:48 Woodi grondilu: you need to create/have somewhere all permutations or just print them ? in secon case maybe just printing elements will be faster and real work be done with some ops on numbers/indexes ?
14:49 hoelzro so I found the problem with the JVM build: $_.type on https://github.com/rakudo/rakudo/blob/no​m/src/Perl6/Metamodel/BUILDPLAN.nqp#L41 is null, so accessing information about it causes an NPE
14:49 hoelzro $_ is an NQPAttribute
14:49 hoelzro but I'm not sure how $_.type ended up as null =/
14:50 smls m: class A { has @.a };  my $x = A.new(a => 42);  my $y = $x.clone;  $y.a.push(100);  say $x
14:50 camelia rakudo-moar f303ef: OUTPUT«A.new(a => [42, 100])␤»
14:50 smls ^^ Is it .clone on an object not supposed to create a new Array object for an @ attribute?
14:50 smls s/it//
14:51 ZoffixW Or we could have a special panda option where we specify module version to install (unless that already exists). That version matches git tag. If one is not found, install craps out. If version is not specified, the tag with the highest version number gets installed. And a special version value of "bleed" installs from master branch
14:52 RabidGravy Oooh "rakudo-star                         x86_64   0.0.2015.11-1.fc22        updates"
14:53 balazs joined #perl6
14:53 RabidGravy fedora++
14:53 moritz ZoffixW: or maybe we should star to do proper releases, upload them to PAUSE, and install them from CPAN
14:54 Skarsnik Probably need a module authoring management tool or something to do this stuff without having to get mad by Git command x)
14:54 sfg joined #perl6
14:54 RabidGravy I'm with moritz
14:54 moritz Skarsnik: agreed
14:55 ZoffixW moritz, that's definitely a better option.
14:55 ZoffixW But... what was the whole "we'll have two ecosystems" jdv79 mentioned? one MetaCPAN and one github-based system
14:56 Skarsnik root@testperl6:~/piko/Discord# apt-cache show rakudo
14:56 Skarsnik Package: rakudo
14:56 Skarsnik Version: 2015.09-2
14:56 ZoffixW I never really investigated that further with them
14:56 ZoffixW And making announcable uploads scratches the completionist itch in me too :)
14:57 ZoffixW .tell jdv79 what is the status of MetaCPAN and what were the objections you had in mind for making it the "standard" Perl 6 module ecosystem instead of having two ecosystems? There were a discussion on the ecosystem stuff: http://irclog.perlgeek.de/p​erl6/2015-12-16#i_11727140
14:57 yoleaux ZoffixW: I'll pass your message to jdv79.
14:57 ZoffixW .botsnack
14:57 yoleaux :D
14:57 Skarsnik Actually having a tool using the git repository and another that use fixed release by author is not that bad
14:59 ZoffixW Skarsnik, a tool is fine. It's nearly how Perl 5's cpanm works, as you can give it a URL, but I think the question at hand was that we leave modules.perl6.org as what it is right now and have a separate MetaCPAN that has uplodable releases....
14:59 * ZoffixW & meeting
14:59 Woodi fedora++ # but systemd--
14:59 dj_goku ZoffixW: you write perl 5 for your day job?
15:05 n0tjack joined #perl6
15:06 regreg joined #perl6
15:08 Ulti Anyone know about the status of HTTP::UserAgent? https://www.reddit.com/r/perl6/comments/3​x2tx5/http_client_module_recommendation/
15:09 Skarsnik I think it had trouble building with the next rakudo
15:09 Skarsnik *new
15:09 Skarsnik let me check real quick
15:10 moritz well, the solution is to fix HTTP::UserAgent, not look for another module
15:11 Ulti https://travis-ci.org/sergot/http-useragent doesn't look /that/ broken
15:11 Skarsnik travis is only run when there is a commit ~~
15:12 Skarsnik http::ua depend on the universe x)
15:12 Skarsnik oh yeah...
15:12 Skarsnik ===SORRY!===
15:12 Skarsnik Cannot find method 'run_alt'
15:12 Ulti well the travis build is borked regardless so its at least those problems
15:13 moritz run_alt is some NFA thing, right?
15:13 Skarsnik NFA?
15:13 andreoss does 'is cached' avoid to use Seq or use something else instead?
15:14 moritz Skarsnik: the Non-deterministic Finite Automaton stuff used the in regex engine
15:16 Skarsnik Could be something wrong in one of the grammar or another compile unit bug then?
15:18 dalek nqp: b8fc603 | jnthn++ | t/nqp/19-file-ops.t:
15:18 dalek nqp: Make test insensitive to \n -> \r\n translation.
15:18 dalek nqp: review: https://github.com/perl6/nqp/commit/b8fc603b61
15:19 dalek nqp: a4d6b4b | hoelzro++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
15:19 dalek nqp: Return 0 for objprimspec(null)
15:19 dalek nqp:
15:19 dalek nqp: This follows Moar's behavior, and fixes the JVM backend for Rakudo
15:19 dalek nqp: review: https://github.com/perl6/nqp/commit/a4d6b4b976
15:19 hoelzro ok, JVM build is "fixed" if you use nqp master
15:20 hoelzro there's still a "No writeable path found" during tools/build/install-core-dist.pl, but at least it doesn't NPE
15:21 travis-ci joined #perl6
15:21 travis-ci NQP build failed. jnthn 'Make test insensitive to \n -> \r\n translation.'
15:21 travis-ci https://travis-ci.org/perl6/nqp/builds/97236403 https://github.com/perl6/nqp/com​pare/b13205bf1bd7...b8fc603b61b4
15:21 travis-ci left #perl6
15:21 Skarsnik du wtf Type 'HTTP::Request' is not declared
15:21 Skarsnik at /home/skarsnik/http-useragent/.panda-wo​rk/1450279104_1/lib/HTTP/Response.pm6:9
15:21 Skarsnik ------> has HTTP::Request⏏ $.request is rw;
15:21 RabidGravy Utli, moritz, Skarsnik : there is an RT on the run_alt thing
15:21 Skarsnik but there is a use HTTP::Request at the beginning
15:22 RabidGravy It's a real mess
15:22 Skarsnik Could it came from because everything use unit class blabalba?
15:22 travis-ci joined #perl6
15:22 travis-ci NQP build failed. Rob Hoelz 'Return 0 for objprimspec(null)
15:22 travis-ci https://travis-ci.org/perl6/nqp/builds/97236623 https://github.com/perl6/nqp/com​pare/b8fc603b61b4...a4d6b4b9768e
15:22 travis-ci left #perl6
15:26 sammers joined #perl6
15:32 gfldex Pod::Item is not very concurency frieldy. I presume chances to have it changed are very slim?
15:33 moritz gfldex: what changes to you have in mind?
15:33 dalek roast: 6edc4ed | jnthn++ | S17-procasync/print.t:
15:33 dalek roast: Harden test against newline translation.
15:33 dalek roast: review: https://github.com/perl6/roast/commit/6edc4ed1ed
15:34 gfldex any item list must be surrounded by a block (of some new type) similar to Pod::Table
15:35 gfldex problem is that Pod::Item are free floating and can be top level items
15:35 moritz what has that got to do with concurrency?
15:35 dalek nqp: f73fb45 | jnthn++ | t (2 files):
15:35 dalek nqp: Get Moar with newline translation.
15:35 dalek nqp:
15:35 dalek nqp: Also update one test to match these new semantics.
15:35 dalek nqp: review: https://github.com/perl6/nqp/commit/f73fb45a35
15:35 moritz I'm not saying I object, I just don't see the connection
15:36 jnthn *sigh* of course, every change to newline stuffs means there's tests to fix
15:37 gfldex since they are top level items, running rendering of top level items in parallel becomes tricky. I basicly have to stop as soon as I see =item1 and continue single threaded. I can get away with a state variable if there is only one item list in a document.
15:38 gfldex or i have to convert to some tree-structure and correct those free floating items in a 2nd pass
15:38 travis-ci joined #perl6
15:38 travis-ci NQP build passed. jnthn 'Get Moar with newline translation.
15:38 travis-ci https://travis-ci.org/perl6/nqp/builds/97240393 https://github.com/perl6/nqp/com​pare/a4d6b4b9768e...f73fb45a350f
15:38 travis-ci left #perl6
15:38 gfldex but that would be real slow. What is defeating the whole idea of concurrency
15:40 gfldex Pod::Block doesn't have a ref to siblings or it's parent either. That makes reasoning about it's structure with recursive functions quite hard.
15:41 moritz a reference to a parent is trivial to keep while you descend into the tree
15:41 gfldex there is no such reference for top level items
15:41 gfldex well, there is to Array
15:41 moritz well, if it has a parent reference, it'd be empty anyway :-)
15:42 moritz gfldex: I generally like the idea of collecting multiple subsequent Pod::Items into a container; but it has to be done with care as to not break the existing Pod:: modules
15:43 gfldex it would for sure
15:43 moritz well, you can do a three-phase thing
15:43 moritz 1) introduce a Pod::ItemList type
15:44 moritz 2) patch all modules to work with the old and the new structure
15:44 moritz 2.5) wait a month or two
15:44 gfldex i may be able to get away with a lock in the multi that handles Pod::Item. I will try and may come back to whine and bitch a little more. :)
15:44 moritz 3) patch core to change the struture
15:44 moritz 3.5) wait a few months
15:45 moritz 4) clean up the modules to only work with the new structure
15:45 moritz ok, I lied about three phases
15:45 [particle] joined #perl6
15:45 RabidGravy jnthn++ the native-descriptor thing so works :)  "sub syswrite(int $fd, CArray[uint8] $buf, int $bytes) is native is symbol('write') { * }; .... ; syswrite($*OUT.native-descriptor, $ca, $buf.elems)" all worky
15:45 gfldex and you missed that fact that all .pod-files that contain Pod::Item have to be changed too
15:45 dalek roast: 5605a58 | jnthn++ | S16-filehandles/io.t:
15:45 dalek roast: Add missing .close call.
15:45 dalek roast:
15:45 dalek roast: Required on Windows.
15:45 dalek roast: review: https://github.com/perl6/roast/commit/5605a58f37
15:46 jnthn RabidGravy: Nice! :)
15:47 RabidGravy I was somewhat confused that $*OUT.native-description is 11, but I guess it's something to do with libuv's handle pool or something
15:49 moritz gfldex: unless it's a feature of the parser to auto-generate the container at the data structure level
15:49 moritz gfldex: I didn't even realize you wanted to change Pod syntax too
15:59 _nadim moritz:  thanksfor the help earlier, got drawn into a bug and forget to tell you.
15:59 ZoffixW dj_goku, it's part of my job yes. I wrote and maintain our ~12 web sites and ~20 of different apps in different areas, but my job title is "Multi-Media Designer" :)
15:59 dalek rakudo/nom: 680da78 | jnthn++ | / (2 files):
15:59 dalek rakudo/nom: Switch to doing newline translation on Win32.
15:59 dalek rakudo/nom:
15:59 dalek rakudo/nom: Now, \n always means \x0A by default (the newline pragma currently is
15:59 dalek rakudo/nom: still available, pending a decision from TimToady++ on its future). We
15:59 dalek rakudo/nom: translate \r\n on file/pipe input to \n, and \n to \r\n on output. We
15:59 dalek rakudo/nom: don't perform any such translation on sockets, nor on explict .encode
15:59 dalek rakudo/nom: and .decode calls (providing an escape hatch). \r\n remains a single
15:59 dalek rakudo/nom: grapheme, though you're now much less likely to run in to one. This
15:59 moritz _nadim: you're welcome
15:59 dalek rakudo/nom: brings us in line with how the problem has commonly been tackled in
15:59 dalek rakudo/nom: other languages; logical \n turned out not to work out so well in real
16:00 dalek rakudo/nom: life, even if avoiding the cost of boundary translation was nice. Note
16:00 dalek rakudo/nom: that we translate at grapheme, not codepoint, level, so a \r\n will
16:00 dalek rakudo/nom: never accidentally become \r\r\n (as can happen in some translation
16:00 dalek rakudo/nom: layers).
16:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/680da780fb
16:00 _nadim How do I ignore some of the elements returned from a sub? ($want, Nil, Nil) = sends_a_list()
16:00 moritz jnthn++
16:00 moritz my ( $want ) = sends_a_list()
16:00 dalek roast: ad0164f | jnthn++ | S (5 files):
16:00 dalek roast: Update tests to cope with newline translation.
16:00 dalek roast: review: https://github.com/perl6/roast/commit/ad0164f301
16:01 moritz or my ( $, $want) = returns_a_list()
16:01 jnthn I hope the tests will look OK off Windows too
16:01 jnthn To the degree they look OK at all at the moment :S
16:02 * moritz starts a rebuild and spectest run
16:04 jnthn Doing a fresh one on Windows too to see if I missed anything :)
16:05 lizmat m: sub a() { 1,2,3 }; my ($a) = a; say $a   # _nadim at the end it's simple
16:05 camelia rakudo-moar f303ef: OUTPUT«1␤»
16:05 lizmat m: sub a() { 1,2,3 }; my ($,$,$a) = a; say $a   # _nadim   just bare $ in front
16:05 camelia rakudo-moar f303ef: OUTPUT«3␤»
16:08 gfldex moritz: forget my rambling please. I just checked how the other POD renderer cheat and I intend to use the same cheat now. :)
16:09 lizmat jnthn: does that imply that if a supply gets a \r\n from a socket, that it won't be translated ?
16:10 jnthn Yes
16:10 lizmat but that it *will* be translated if the \r happens to be the last byte and the \n is in the next chunk
16:10 lizmat and the two parts are merged ?
16:10 jnthn No
16:10 jnthn "\r" ~ "\n" does exactly as it does now
16:10 jnthn The translation is purely at I/O boundaries
16:11 jnthn And only for file/pipe handles
16:11 lizmat $ 6 'my $a = "\r"; my $b = "\n"; say ($a ~ $b).chars'
16:11 lizmat 1
16:11 lizmat seems it is doing it on concat as well ?
16:11 jnthn Of course
16:12 jnthn \r\n is 1 grapheme
16:12 lizmat ok, so then Supply.lines is severely broken atm
16:12 jnthn m: my $a = "\r"; my $b = "\n"; say ($a ~ $b).codes
16:12 camelia rakudo-moar 680da7: OUTPUT«2␤»
16:12 jnthn ?
16:12 jnthn Supply.lines test failures have gone away at last for me
16:13 lizmat because, if I understand you corectly, if a \r\n is inside a chunk coming from a socket, it is *not* translated
16:13 moritz http://perlpunks.de/paste/show/56718d8e.333.3c1
16:13 lizmat whereas if the \r\n is the result of a concat, it *is* ?
16:13 jnthn lizmat: You're confused.
16:13 moritz that's my test summary failure
16:13 jnthn This isn't about graphemes
16:13 moritz lizmat: .codes
16:13 moritz erm
16:13 moritz never ind
16:13 jnthn This is about \r\n => \n mapping on input
16:14 jnthn That is, a file containing a \r\n, when you .get without chomp, will get you a string ending in \n
16:14 jnthn Just as in Perl 5.
16:14 lizmat ok, *phew*
16:14 lizmat I guess
16:15 jnthn We don't play any games with \n any more; it's always 0x0A
16:15 jnthn (short of a use newline)
16:15 lizmat fwiw, other than t/spec/S32-io/socket-recv-vs-read.t  *not* failing for me, my spectest result is the same as moritz
16:15 moritz lizmat: it passes for me when I re-run in isolation
16:16 jnthn I think the UDP one is being worked on by hoelzro++
16:16 lizmat so it's a flapper
16:16 abraxxa Skarsnik: rebased successfully
16:16 moritz lizmat: but running it in isolation several times in a row makes it always pass as well
16:16 moritz just had 21 passes in a row
16:18 nine moritz: does it still pass when your machine is under heavy load (like a TEST_JOBS=20 spectest)?
16:19 nine moritz: or after removing all .precomp files?
16:19 nine s/files/directories/
16:20 domidumont joined #perl6
16:20 moritz nine: yes with removing precomp
16:20 moritz nine: ... and I don't want to start 20 spectest jobs at once :-)
16:20 nine moritz: or whatever puts some real load on your machine :)
16:21 moritz nine: while a TEST_JOBS=3 make spectest runs at the same time, I got one pass, and several "Failed to connect: connection refused"
16:21 zakharyas joined #perl6
16:22 moritz time to decommute&
16:24 nine moritz: that's probably it!
16:25 zakharyas joined #perl6
16:25 nine IO::Socket::Async.listen starts listening on a different thread which under heavy load probably did not yet have time to create the socket when IO::Socket::INET.new tries to connect!
16:26 jnthn nine: Which test is this in?
16:26 nine jnthn: t/spec/S32-io/socket-recv-vs-read.t
16:26 nine Looks like a very plain race condition to me
16:29 jnthn RT #124005 and RT #122658 have been dropped from the xmas list; I left notes on each wrt why
16:29 raiph joined #perl6
16:30 jnthn ah, yes
16:31 smls Is there a way to continually schedule little "fire and forget" closures (which don't produce return values) on the thread pool, without having to collect an ever increasing list of Promises to "await" before exiting the main threat?
16:31 dalek doc: 4883a73 | RabidGravy++ | doc/Type/IO/ (2 files):
16:31 dalek doc: Add native-descriptor description
16:31 dalek doc: review: https://github.com/perl6/doc/commit/4883a73ab1
16:32 smls I Perl 5 I'd use fork for that.
16:34 jnthn smls: Supply.interval(1).tap({ do stuff })
16:34 jnthn Oh, you want them all to complete?
16:34 smls yes
16:34 jnthn You said fire and forget. :P
16:34 smls right, I don't care about the return value, but they have I/O side-effects
16:35 jnthn The threadpool doesn't care about completion, so you'll need to use supplies or promises in some way
16:36 smls OK, I guess I finally have to learn how to use Supplies :)
16:37 nine I now have empirical evidence: adding a sleep 5; after the listen call makes t/spec/S32-io/socket-recv-vs-read.t pass even when a TEST_JOBS=25 spectest is running at the same time. Without it, it breaks every time.
16:38 dalek roast: b2394b1 | jnthn++ | S32-io/socket-recv-vs-read.t:
16:38 dalek roast: Harden test against race.
16:38 dalek roast: review: https://github.com/perl6/roast/commit/b2394b1955
16:38 RabidGravy m: my $s = Supply.from-list({ say "1"}, { say "2"}); react { whenever $s -> $v { $v() } }'
16:38 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/04F2gCufan␤Strange text after block (missing semicolon or comma?)␤at /tmp/04F2gCufan:1␤------> 3}); react { whenever $s -> $v { $v() } }7⏏5'␤    expecting any of:␤        infix␤        infix s…»
16:38 RabidGravy m: my $s = Supply.from-list({ say "1"}, { say "2"}); react { whenever $s -> $v { $v() } }
16:38 camelia rakudo-moar 680da7: OUTPUT«1␤2␤»
16:39 nine jnthn: your workaround seems to work well :)
16:40 zamolxes joined #perl6
16:40 jnthn :)
16:40 abraxxa Skarsnik: why did you name the new required method _row where Perl 6 uses ! to mark private methods?
16:41 abraxxa should be !row or even a better named one
16:43 jernster joined #perl6
16:50 abraxxa when I want to return an empth Hash or Array should i do: return Hash.new?
16:50 iH2O joined #perl6
16:50 nine abraxxa: return {}
16:51 abraxxa i had return () before for the Array case
16:51 nine [] is an Array
16:51 abraxxa so instead of: $hash ?? return Hash.new !! return Array.new
16:51 nine () is a List
16:51 abraxxa $hash ?? {} !! [];
16:52 nine looks about right
16:52 b7j0c joined #perl6
16:52 grondilu m: say { foo => "bar" }.WHAT;
16:52 camelia rakudo-moar 680da7: OUTPUT«(Hash)␤»
16:52 grondilu m: say { [=>] <foo bar> }.WHAT;
16:52 camelia rakudo-moar 680da7: OUTPUT«(Block)␤»
16:53 zakharyas joined #perl6
16:53 nine abraxxa: though I'm a bit uncomfortable with methods returning different types in different conditions. Feels like the design may need some review
16:53 abraxxa nine: yeah, not my choice either
16:53 nine Then you're excused :)
16:54 abraxxa i'll takle the DBIish or its successor API after getting DBDish::Oracle to a usable state
16:55 abraxxa how can i generate a hash out of a keys and a values array?
16:55 jnthn m: my @k = <a b c>; my @v = 1, 2, 3; say { @k Z=> @v }.perl
16:55 camelia rakudo-moar 680da7: OUTPUT«-> ;; $_? is raw { #`(Block|68693144) ... }␤»
16:56 jnthn ah
16:56 jnthn m: my @k = <a b c>; my @v = 1, 2, 3; say (@k Z=> @v).hash.perl
16:56 camelia rakudo-moar 680da7: OUTPUT«{:a(1), :b(2), :c(3)}␤»
16:56 hoelzro psch: do you remember why you changed PERL6_LANG_DIR = $(PREFIX)/share/nqp in the JVM build?
16:57 abraxxa return (self.column_names Z=> @row).hash if $hash;
16:57 abraxxa nice!
16:57 abraxxa what's the Z=> thing?
16:57 jnthn Z is the zip meta-operator
16:57 jnthn m: say (1, 2, 3) Z+ (4, 5, 6)
16:57 camelia rakudo-moar 680da7: OUTPUT«(5 7 9)␤»
16:58 abraxxa understood
16:59 abraxxa a List is generated by taking elements from the left and the right lists or arrays and .hash converts a hash out of it
16:59 abraxxa Skarsnik: multi-sub in Role::StatementHandle
17:00 nine abraxxa: specifically, Z takes elements from left and right, => combines them into a Pair, so you get a list of Pairs which then becomes a hash by .hash
17:00 abraxxa ah, I didn't know Pair so far
17:03 nine => is just: sub infix:«=>»(Mu $key, Mu \value) is pure { Pair.new($key, value) }
17:03 andreoss m: say <a b c> Z=> <1 2 3>
17:03 camelia rakudo-moar 680da7: OUTPUT«(a => 1 b => 2 c => 3)␤»
17:04 abraxxa 'just'
17:04 andreoss m: my %h =  <a b c> Z=> <1 2 3>; say %h.perl
17:04 camelia rakudo-moar 680da7: OUTPUT«{:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3"))}␤»
17:05 abraxxa what's an IntStr?
17:05 Juerd abraxxa: A value that's both and Int and a Str
17:05 abraxxa omg, again
17:05 andreoss why not just Int?
17:05 Juerd You can get it from <...>
17:05 Juerd andreoss: Because <...> returns a list of strings
17:06 andreoss m: my %h =  <a b c> Z=> <1 2 x>; say %h.perl
17:06 camelia rakudo-moar 680da7: OUTPUT«{:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c("x")}␤»
17:06 timotimo not exactly, Juerd
17:06 timotimo because < > gives you val() semantics
17:06 RabidGravy m: my $a = IntStr.new(100, "z");    say "$a";  say $a + 1;
17:06 camelia rakudo-moar 680da7: OUTPUT«z␤101␤»
17:06 andreoss looks like dual_vars from perl 5
17:07 Juerd timotimo: That's implementation, but isn't the reason for this, that whatever < > returns should at least be usable as strings?
17:07 andreoss left #perl6
17:07 Juerd andreoss: Yep, it's much like that.
17:07 andreoss joined #perl6
17:07 Juerd andreoss: Yep, it's much like that.
17:08 iH2O m: say 2 + 2
17:08 camelia rakudo-moar 680da7: OUTPUT«4␤»
17:08 ZoffixW joined #perl6
17:08 abraxxa then why not return Str?
17:08 ZoffixW How can I use Perl 5 regex modifiers?
17:08 ZoffixW m: say 'foo' ~~ m:P5/(?^ux:foo)/
17:08 camelia rakudo-moar 680da7: OUTPUT«False␤»
17:08 andreoss m: ۱.WHAT.say
17:08 camelia rakudo-moar 680da7: OUTPUT«(Int)␤»
17:08 ZoffixW Also, this error is LTA:
17:09 ZoffixW m: say 'foo' ~~ m:P5/(?^ux:foo)/x
17:09 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HAkSJNckXN␤Unsupported use of /x; in Perl 6 please use normal default whitespace␤at /tmp/HAkSJNckXN:1␤------> 3say 'foo' ~~ m:P5/(?^ux:foo)/x7⏏5<EOL>␤»
17:09 timotimo Juerd: actually, it's not only implementaiton, but also spec and design :)
17:09 Juerd abraxxa: Because Str !~~ Int
17:09 abraxxa Juerd: so?
17:09 andreoss m: say "11" ~~ Int
17:09 camelia rakudo-moar 680da7: OUTPUT«False␤»
17:09 abraxxa if <> quotes why not return Str?
17:09 andreoss m: say +"11" ~~ Int
17:09 camelia rakudo-moar 680da7: OUTPUT«True␤»
17:10 Juerd timotimo: Different layer of abstraction: it's the implementation (in the spec) of a concept. I didn't mean implementation at the rakudo layer :)
17:10 timotimo oke
17:10 timotimo oh, i didn't even read the context
17:10 timotimo you were already very aware of IntStr
17:10 timotimo sorry :S
17:10 Juerd timotimo: It's okay :)
17:11 Juerd abraxxa: I don't know why exactly
17:11 Juerd I do know that <2/3> is a literal 2 thirds, whereas 2/3 is 2 divided by 3 (which results is the same value)
17:12 ZoffixW m: my $ans = IntStr.new: 42,'the answer to the universe, life, and everything'; say "Is $ans 42?"; say $ans == 42
17:12 camelia rakudo-moar 680da7: OUTPUT«Is the answer to the universe, life, and everything 42?␤True␤»
17:12 ollej joined #perl6
17:14 andreoss can we just modify .Str method for particular Int?
17:14 Juerd Found it: "One purpose of this is to facilitate compile-time analysis of multi-method dispatch, when the user prefers angle notation as the most readable way to represent a list of numbers, which it often is. "
17:14 Juerd http://design.perl6.org/S02.ht​ml#Allomorphic_value_semantics
17:14 iH2O left #perl6
17:15 ZoffixW m: class Bar is Int { method Str { "the answer to the universe, life and everything" } }; my Bar $m = 42; say $m
17:15 camelia rakudo-moar 680da7: OUTPUT«Type check failed in assignment to $m; expected Bar but got Int␤  in block <unit> at /tmp/jNcVWkcgLM:1␤␤»
17:15 ZoffixW :(
17:15 Hotkeys .u ۱
17:15 yoleaux U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE [Nd] (۱)
17:15 andreoss m: my $x = 10; &($x.Str) = -> { "hi" }. say $x;
17:15 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kCAMUMlsSu␤Two terms in a row␤at /tmp/kCAMUMlsSu:1␤------> 3my $x = 10; &($x.Str) = -> { "hi" }. say7⏏5 $x;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤…»
17:15 Juerd m: my Int $foo = 5 does role { method Str { "Yes" } }; say ~$foo
17:15 ZoffixW m: say ۱ + ۱
17:15 camelia rakudo-moar 680da7: OUTPUT«Yes␤»
17:15 camelia rakudo-moar 680da7: OUTPUT«2␤»
17:15 Juerd andreoss: So... yes.
17:15 ZoffixW :o
17:16 ZoffixW Juerd, how to access its value from inside that method?
17:16 ZoffixW Like to do return self == 42 ?? 'life and universe' !! self
17:16 Hotkeys m: say ٣ - ٢
17:16 camelia rakudo-moar 680da7: OUTPUT«1␤»
17:16 Hotkeys heh
17:16 ZoffixW :)
17:16 abraxxa etoocomplex
17:16 Hotkeys I like that it is fine with the right to left
17:17 ZoffixW .u ٣٢
17:17 Juerd ZoffixW: self. Just don't stringify it there because that's infinite recursion ;)
17:17 yoleaux U+0662 ARABIC-INDIC DIGIT TWO [Nd] (٢)
17:17 yoleaux U+0663 ARABIC-INDIC DIGIT THREE [Nd] (٣)
17:17 Juerd m: my Int $foo = 5 does role { method Str { (self * 2) ~ " / 2" } }; say ~$foo
17:17 camelia rakudo-moar 680da7: OUTPUT«10 / 2␤»
17:17 administrator joined #perl6
17:17 andreoss m: 1.WHAT.say
17:17 camelia rakudo-moar 680da7: OUTPUT«(Int)␤»
17:17 ZoffixW m: my Int $foo = 5 does role { method Str { "Yes" } }; say $foo
17:17 camelia rakudo-moar 680da7: OUTPUT«Yes␤»
17:18 ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! self } }; say $foo
17:18 camelia rakudo-moar 680da7: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/YL2yNSORqM:1␤␤»
17:18 ZoffixW tsk tsk
17:18 ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! 'something else' } }; say $foo
17:18 camelia rakudo-moar 680da7: OUTPUT«something else␤»
17:18 ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (self+0).Str } }; say $foo
17:19 camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 56400 bytes␤»
17:19 ZoffixW orly
17:19 Juerd Heh, is +0 optimized away? :)
17:19 ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (Int.new: self).Str } }; say $foo
17:19 andreoss ZoffixW: it seems to be recursive call
17:19 andreoss
17:19 camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 103280 bytes␤»
17:19 ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (Int.new: self.Int).Str } }; say $foo
17:19 Hotkeys my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
17:20 ZoffixW *lesigh*
17:20 Hotkeys m: my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
17:20 camelia rakudo-moar 680da7: OUTPUT«5␤»
17:20 camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 8192 bytes␤»
17:20 Hotkeys m: my Int $foo = 42 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
17:20 camelia rakudo-moar 680da7: OUTPUT«life and universe␤»
17:20 Hotkeys kek
17:20 timotimo i suggest you use nextsame
17:20 ZoffixW Hotkeys, that just sidesteps the problem
17:20 timotimo instead of trying to call stuff yourself
17:20 Hotkeys I wasn't solving the problem I was just being cheekyt
17:20 Juerd nextsame?
17:20 timotimo m: my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! nextsame } }; say $foo;
17:20 camelia rakudo-moar 680da7: OUTPUT«5␤»
17:20 stmuk hmm I'm seeing panda not finding Test
17:20 Juerd Oh :)
17:20 Juerd That's nice
17:20 Hotkeys that's fancy timotimo
17:20 ZoffixW timotimo++ thanks
17:21 timotimo basically a "goto" into the next candidate in the candidate list
17:21 timotimo YW :)
17:21 Juerd Is nextsame Perl 6's ->SUPER::foo?
17:21 ZoffixW I'm surprised that doesn't need a multi :o
17:21 ZoffixW Ah
17:21 ZoffixW Never mind, now that I get what it's doing, I'm not surprised :P
17:21 jnthn Juerd: Sorta, but works out smarter with multiple inheritance, multi-dispatch, etc.
17:21 timotimo and role composition :)
17:22 Juerd Right, figures
17:22 nine And less smart by producing endless loops if you do it twice...
17:23 jnthn nine: ?
17:23 jnthn nine: nextsame walks through a pre-determined candidate list, destructively
17:23 [Coke] hoelzro: did you bump npq requirement in rakudo for your fix?
17:24 hoelzro I did not; I saw jnthn had just pushed something to nqp that rakudo didn't seem to like
17:24 Hotkeys I'm thinking of teaching myself latin
17:24 Hotkeys er
17:24 Hotkeys wrong channel
17:24 Juerd Hotkeys: No, right channel. Interesting! Why latin?
17:24 jnthn hoelzro: Oh?
17:24 nine jnthn: there's a ticket about that: https://rt.perl.org/Ticket/Display.html?id=123989
17:24 Hotkeys idk
17:25 administ1ator joined #perl6
17:25 Hotkeys I'm currently learning german at uni, and I know some basic french and am taking it next year alongside german
17:25 hoelzro probably a false alarm; I pushed it up and then had to get ready to go to work =/
17:25 jnthn hoelzro: Travis was a bit noisy earlier 'cus it was building NQP atop of moar master
17:25 Juerd Hotkeys: I had latin in secondary school and loved it.
17:25 jnthn hoelzro: And missing an NQP test update to compensate.
17:25 Juerd Forgot nearly everything though :)
17:25 Hotkeys figured I might as well get latin in there since it's on a different level
17:25 Hotkeys ie it's a dead language etc.
17:25 andreoss m: role LiterateInt { method Str { given self { when 42 { "hi" } ; when 666 { "bye" } ; default { ~ self } } } } ; my Int $x = 666 does LiterateInt; say $x;
17:25 camelia rakudo-moar 680da7: OUTPUT«bye␤»
17:26 Juerd Hotkeys: Take French and Latin simultaneously. The "plusque parfait" and "plusquamperfectum" make more sense that way ;)
17:26 nine jnthn: some day I will return to that ticket and see if my understanding of rakudo has grown enough to actually fix it :) I know I've already learned a lot when I tried to debug it.
17:26 Juerd % spelling
17:26 Hotkeys well
17:26 Hotkeys Would it be equally as helpful if I learned it in latin first and then french?
17:26 Juerd Oh, sorry, I guess it's PLVSQVAMPERFECTVM :P
17:27 Hotkeys I kind of want to get the ball rolling on this latin nonsense
17:27 Hotkeys lol Juerd
17:27 Juerd Hotkeys: Yes, it would.
17:27 jnthn nine: eek, that's an icky one
17:27 jnthn nine: You diagnosed it right though
17:27 Juerd Hotkeys: In school we got French first, then Latin, and only after I learned some latin did French begin to make sense.
17:27 jnthn nine: Just a code-gen ordering issue, it seems
17:27 Hotkeys I'm canadian so I had french for 5 years, grades 4-9
17:27 Hotkeys but we don't really uh
17:28 Hotkeys learn a ton in those 5 years
17:28 Juerd 5 years of comment ça va?
17:28 Hotkeys it was kind of a joke
17:28 Hotkeys pretty much
17:28 Hotkeys I can understand written french reasonably well with some guess work
17:28 Hotkeys I can barely produce the language though
17:29 Hotkeys and I can kind of understand spoken french
17:29 ZoffixW Huh? "Use translate_regex.pl from Blue Tiger in the meantime." at http://docs.perl6.org/language/5to6-nutshell#​Regular_Expressions_%28_Regex_%2F_Regexp_%29
17:29 ZoffixW What Blue Tiger?
17:29 timotimo baguette! soup du jour! camembert! jacousto!
17:29 ZoffixW Would be nice if that were a link
17:29 Juerd Omelette du fromage!
17:30 ZoffixW Or just some pain
17:30 ZoffixW :P
17:30 * jnthn had 5 years of French at high school, got the top grade, but didn't feel he learned a lot... :)
17:30 * ZoffixW chuckles as they recall buying the "Pain Machine" a few years back
17:30 Juerd jnthn: Sounds awfully familiar :)
17:30 Juerd ZoffixW: No bread, no gain.
17:30 ZoffixW :)
17:31 nine jnthn: how can it be an ordering issue? We do have to execute the block in the signature first to find out if it matches and this block does have to do a takedispatcher. But it's > 8 months since I worked on that so I may miss something there.
17:31 jnthn heh, reminds me of the craft stores in Scandinavia: panduro :)
17:31 timotimo hoelzro: you sneaky devil. i thought that memory leak you were talking about was still live! :P
17:31 jnthn (Spanish for "stale bread" :D)
17:31 timotimo hoelzro++ # still. for the blog postage
17:31 hoelzro timotimo: hehe, nope =)
17:32 hoelzro don't worry, I didn't steal all the leaks =P
17:32 luis joined #perl6
17:32 jnthn nine: Ah...so it is a bit more involved..
17:32 timotimo rakudo memory leaks end up on wikileaks?
17:32 telex joined #perl6
17:32 andreoss m: role Descriptive { method Str { given self { when 42 { "hi" } ; when 666 { "bye" } ; default { ~ self } } } } ;  subset LiterateInt of Int does Descriptive ; my LiterateInt @x = (1,42,666); ; say @x
17:32 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tXEfqX5KIR␤Method 'add_role' not found for invocant of class 'Perl6::Metamodel::SubsetHOW'␤at /tmp/tXEfqX5KIR:1␤»
17:32 andreoss bug?
17:33 zakharyas joined #perl6
17:33 jnthn andreoss: LTA error
17:33 ZoffixW What's the actual error?
17:33 timotimo "subsets can't do role composition"
17:33 ZoffixW Ah
17:33 jnthn Something like what timo said
17:34 Juerd timotimo: Since this was on TV a long time ago, I still can't read "wikileaks" without hearing this melody. I thought I'd share my pain: https://www.youtube.com/watch?v=Bch595Y4s7U
17:34 timotimo damn
17:34 hoelzro if NQP is ok on Moar, I don't see any reason not to bump it up in tools/build
17:34 timotimo that's not bad
17:34 andreoss left #perl6
17:35 andreoss joined #perl6
17:36 jnthn hoelzro: I think I already did bump it
17:36 jnthn hoelzro: My Moar bump went in after your patch
17:37 hoelzro ah, ok
17:38 andreoss m: role Foo { method Str { ~ self ~ "!" } } ; class FooInt is Int does Foo {*}; say FooInt.new(10);
17:39 camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 13312 bytes␤»
17:39 andreoss m: class FooInt is Ini {*}; say FooInt.new(10);
17:39 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7B4UkyGrae␤'FooInt' cannot inherit from 'Ini' because it is unknown.␤Did you mean one of these?␤    'Int'␤    'Uni'␤␤at /tmp/7B4UkyGrae:1␤»
17:40 andreoss m: class FooInt is Int {*}; say FooInt.new(10);
17:40 camelia rakudo-moar 680da7: OUTPUT«10␤»
17:40 jnthn andreoss: ~self will call self.Str, so you did an infinite recursion
17:40 virtualsue joined #perl6
17:42 timotimo i wonder if we should give moar a little extra information for "memory allocation failed"
17:42 timotimo like "when trying to allocate stack frames: memory allocation failed"?
17:42 abraxxa what does this mean? Cannot look up attributes in a type object
17:42 timotimo it's not terribly common to have stack frames live on the heap, or at least it's not common that languages report a stack overflow as a heap problem
17:42 timotimo abraxxa: tried to call a method that requires a defined instance on a type object
17:43 timotimo m: class Foo { has $.a }; say Foo.a
17:43 camelia rakudo-moar 680da7: OUTPUT«Invocant requires an instance of type Foo, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/FowZC1TkCt:1␤␤»
17:43 abraxxa got it, thanks
17:43 timotimo ^- this is the "a bit more awesome" companion to that exact error
17:43 andreoss m: role Foo { method Str { Int.new(self).Str ~ "!" } } ; class FooInt is Int does Foo {*}; say FooInt.new(10);
17:43 camelia rakudo-moar 680da7: OUTPUT«10!␤»
17:43 abraxxa would be helpful to print the methodname and the object
17:43 ZoffixW Never mind, found my answer. It's actually in the same doc: http://docs.perl6.org/langua​ge/5to6-nutshell#Blue_Tiger
17:43 timotimo in some cases, that can be really difficult. but we could surely try
17:43 jme` joined #perl6
17:44 dalek doc: 376e0d1 | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
17:44 dalek doc: Actually link to Blue Tiger script instead of just mentioning it
17:44 dalek doc: review: https://github.com/perl6/doc/commit/376e0d141b
17:45 abraxxa Skarsnik: do you know why magic_cmp has two Arrays as params?
17:46 abraxxa moritz: you wrote magic_cmp according to git
17:46 abraxxa moritz: https://github.com/perl6/DBIish/commit/e​0ca68b4286e7cbb4a7594a6cc3b64fe538ac1a7
17:46 abraxxa any idea?
17:46 abraxxa as two column values are passed this should be $a, $b imho
17:48 moritz abraxxa: it's for a very specific use case of comparing two four-colum rows, the first wto of which are strings, the other two are numbers
17:48 abraxxa OH! it compares the whole row
17:48 abraxxa and some queries now return five columns
17:49 sufrostico joined #perl6
17:49 pierre-vigier joined #perl6
17:49 moritz it might be not as magic as the name suggests, but it's much more magical than doing the comparison inline everywhere :-)
17:49 hankache joined #perl6
17:50 abraxxa it still results in Use of uninitialized value @row of type Str in string context
17:50 moritz you're not meant to pass type objects to it
17:50 abraxxa which is quite magic as @row is the varname in the fetch method
17:50 hankache hello #perl6
17:50 ZoffixW hallo
17:50 abraxxa moritz: but a NULL value is returned as type object
17:51 abraxxa is that the correct term? type object?
17:51 moritz yes
17:51 moritz abraxxa: then you shouldn't use that function to compare the values
17:52 abraxxa moritz: Skarsnik and I tried to use is-deeply instead but it fails on identical rows
17:52 lucasb an @-sigiled variable of type Str is strange... idk if it's possible. Str doesn't do Positional
17:52 abraxxa even fully defined ones without type objects
17:52 moritz I guess I should have worked harder on finding a better name
17:52 moritz abraxxa: is_deeply is *very* strict; like it treats an Array and a List as different, even when you often don't mind the distinction
17:53 abraxxa it's printout isn't really helpful
17:53 abraxxa i've added tons of diag $.perl and $.^name without finding the cause
17:54 hankache why does  io-prompt in https://modules.perl6.org/ point to the ecosystem?
17:55 ZoffixW Good question
17:57 ZoffixW m: say so "source-url" eq 'source-url'
17:57 camelia rakudo-moar 680da7: OUTPUT«True␤»
17:57 lucasb both io-prompt and lolsql have moved to other repos. they were in ecosystem/SHELTER directory
17:57 dwarring joined #perl6
17:57 lucasb the meta list can be updated to fix this
17:58 lucasb but I would argue that it should be possible to have more than one distribution in a github repo
17:58 abraxxa Skarsnik: i've pushed my work to github if you want to review it. some test fixes are missing that will come tomorrow
17:58 abraxxa i'm going home, bye!
17:58 hankache bye abraxxa
18:01 dalek modules.perl6.org: ae43207 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitHub.pm:
18:01 dalek modules.perl6.org: Anchor GitHub source regex so it does not incorrectly match weird URLs
18:01 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/ae432076a9
18:01 ZoffixW Well... that fixes that issue not showing up in error log X)
18:02 hankache ZoffixW++
18:02 ZoffixW As for having more than one repo... hm
18:02 ZoffixW s/repo/dist/;
18:04 ZoffixW ... that won't do.
18:04 ZoffixW We fetch recent commits, Issues, Stars.
18:04 lucasb ah, understood. it just complicates things. thanks ZoffixW
18:07 ZoffixW <lucasb> both io-prompt and lolsql have moved to other repos.
18:07 ZoffixW Which repos?
18:07 ZoffixW If I follow source url, I get a repo without a META.info in it :/
18:08 ZoffixW At least for io-prompt
18:08 yqt joined #perl6
18:09 ZoffixW Same with lolsql
18:09 dalek ecosystem: 397189b | (Pierre VIGIER)++ | META.list:
18:09 dalek ecosystem: Add Math::Matrix for some matrix operations
18:09 dalek ecosystem:
18:09 dalek ecosystem: https://github.com/pierre-vigier/Perl6-Math-Matrix
18:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/397189bf9c
18:09 dalek ecosystem: 364c610 | (Zoffix Znet)++ | META.list:
18:09 dalek ecosystem: Merge pull request #103 from pierre-vigier/master
18:09 dalek ecosystem:
18:09 dalek ecosystem: Add Math::Matrix for some matrix operations
18:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/364c610492
18:10 lucasb ZoffixW: yes, seems they are in pnu's and jnthn's github, but they are not mantained and don't have a META.info file
18:11 ZoffixW lucasb, what was the purpose of SHELTER?
18:12 lucasb idk, maybe other people can give more information. to me it seems a place that was used in the past to gather "orphaned" modules
18:12 ZoffixW Hm, seems to be the P6 equivalent of ADOPTME
18:13 ZoffixW We can actually make modules.perl6.org show those differently :)
18:13 ZoffixW And that should be pretty easy because... *drumroll*... we designed modules.perl6.org to allow multiple Dist Sources
18:13 ZoffixW So we can add a "SHELTER" Dist Source that would match URLs in shelter \o/
18:14 hankache excellent!!
18:19 grondilu TimToady mentioned a few times how silly it is to have to import a "math" module to do stuff like trigonometry.  Yet I notice people keep naming their modules Math::something.  Guys, just name them "something" when it's clear it's about math.
18:20 grondilu I mean a "Matrix" module surely is not about the 1999 movie, is it?
18:20 ZoffixW grondilu, ... or is it XD
18:20 * grondilu thinks of the dramatic chipmonks suddenly
18:21 ZoffixW grondilu, but I agree, to some extent. What I see is many people seem to be blindly copying the Perl 5 namespacing on the assumption that it's perfect and is perfectly applicable to Perl 6 and this being 2016
18:22 * hankache thinks that there should be some kind of guidelines on namespaces
18:22 ZoffixW Since we can have different :auth<> on modules, there's nothing wrong with taking up top level namespaces liberally
18:22 TimToady yeah, the basic problem isn't that math is math, but that language is language...
18:23 ZoffixW TimToady, what does that mean?
18:23 TimToady is Integration talking about math, or about systems, or about racial policies?
18:24 grondilu I look at the ecosystem and search for Math::.  Not everything could be renamed but here for instance : Math::RungeKutta.  Not only RungeKutta is not quite about math (it's arguably more about physics), but also RungeKutta is such a peculiar name, why should we have to desambiguate?
18:24 TimToady then the question arises, if you have the category, why use it just some of the time?
18:24 ZoffixW grondilu, I don't think the decision to put it in math was necessarily to disambiguate but to categorize
18:25 grondilu meh
18:25 TimToady and one of the reasons for building in basic math is so that we don't have to worry about the naming :)
18:25 ZoffixW Which brings back the point I mentioned some time ago: we use search these days and not browsing by categories, really.
18:25 grondilu putting the category in the name is meh
18:25 TimToady well, how many times do you have to type it, if it's used just once in a program?
18:26 TimToady seems a bit of a false economy
18:26 ZoffixW What's if it's a class? :D
18:26 grondilu it's not just about the number of characters
18:26 ZoffixW For me it is.
18:26 ZoffixW grondilu, what else is it about?
18:26 TimToady if it's a class, that's when your use provides a lexical alias
18:27 grondilu ZoffixW: it's hard to explain, something about odd things being an annoying distraction.
18:27 grondilu an also being more difficult to remember.
18:28 grondilu Like:  "oh, I need to call a Runge Kutta module.  I remember there is one in the ecosystem.  How is it named already?  Surely just "RungeKutta".
18:28 grondilu and then you try and fail.
18:28 ZoffixW grondilu, what are you thoughts on, say, WWW::Google::Time vs. WebService::Google::Time?
18:28 ZoffixW s/you/your/;
18:28 grondilu I don't know exactly what those do so I can't really tell.
18:28 hankache if $var == 1 | 2 | 3  what do you call the 1 | 2 | 3 part?
18:28 hankache a junction?
18:29 ZoffixW grondilu, goes to google to find out what time it is.
18:29 ZoffixW grondilu, or I can phrase it more generally, what are your thoughts on there being WWW:: and WebService:: namespaces for "web things"? Is one better than the other and should we have two?
18:29 ZoffixW hankache, I believe so, yes
18:30 timotimo yeah, that's a junction
18:30 hankache thank you :)
18:31 grondilu ZoffixW: I have no opinion on this.  Seems to be different an issue enough.
18:32 hankache is this new to Perl 6 or is it present in other languages?
18:32 grondilu Junctions are definitely new and unique to Perl 6
18:32 ZoffixW cool
18:32 timotimo they ... are?
18:32 grondilu I think so anyaway
18:32 timotimo surely haskell already had something like that? and lisp probably had it for 40 years before haskell go tit?
18:32 grondilu haskell does not count
18:33 ZoffixW heh
18:33 TimToady counting is a side effect
18:33 hankache yes!! an additional argument to troll people that Perl 6 is better ;)
18:34 grondilu I would not do that.  Junctions are cool but actually rarely really needed.
18:34 ZoffixW grondilu, why is it a different issue? It's a naming issue. How is having WWW different than Math?
18:34 timotimo also, letting junctions escape your own code into other people's code is not a good idea
18:35 hankache ah!
18:36 timotimo perl5 already has a quantum superposition module, does it not?
18:37 AlexDaniel joined #perl6
18:37 ZoffixW Yeah: https://metacpan.org/pod/Quantum::Superpositions
18:37 timotimo This document describes version 1.03 of Quantum::Superpositions, released August 11, 2000.
18:37 ZoffixW >_<
18:37 ZoffixW I wasn't even born yet! :)
18:38 hankache if i want to check if $var is present in a list how can i do it?
18:38 timotimo ZoffixW: wow, at what age were you born?
18:38 AlexDaniel hankache: $var ~~ @List ?
18:39 timotimo hankache: you can use "defined @list.index($var)" at the very least
18:39 hankache is there something that forces a list to a junction?
18:39 timotimo AlexDaniel: i don't think so
18:39 ZoffixW timotimo, that's classified :P
18:39 timotimo hankache: you can any(|@list) or all(|@list) or so
18:39 ZoffixW m: my @a = ^10; say 42 ~~ @a; say 5 ~~ @a
18:39 camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
18:39 ZoffixW aww
18:39 nine ZoffixW: define "born" ;)
18:39 AlexDaniel m: my @a = ^100; say 42 ~~ @a; say 5 ~~ @a
18:39 camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
18:39 ZoffixW I'm still waiting for Perl 6 to appear on https://wiki.theory.org/YourLanguageSucks
18:40 AlexDaniel m: my @a = ^10; say @a ~~ 42; say @a ~~ 5
18:40 camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
18:40 ZoffixW m: my @a = ^10; say 42 ~~ @a; say 5 ~~ any @a
18:40 camelia rakudo-moar 680da7: OUTPUT«False␤True␤»
18:40 ZoffixW m: my @a = ^10; say 42 ~~ any @a; say 5 ~~ any @a
18:40 camelia rakudo-moar 680da7: OUTPUT«False␤True␤»
18:40 AlexDaniel m: my @a = ^10; say 10 ~~ @a;
18:40 camelia rakudo-moar 680da7: OUTPUT«False␤»
18:41 smls_ joined #perl6
18:41 AlexDaniel what does 「10 ~~ @a」 then?
18:42 ZoffixW m: my @a = ^10; @b = ^10; say @b ~~ @a;
18:42 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xeqSko2x6O␤Variable '@b' is not declared␤at /tmp/xeqSko2x6O:1␤------> 3my @a = ^10; 7⏏5@b = ^10; say @b ~~ @a;␤»
18:42 ZoffixW m: my @a = ^10; my @b = ^10; say @b ~~ @a;
18:42 camelia rakudo-moar 680da7: OUTPUT«True␤»
18:42 ZoffixW m: my @a = ^10; my @b = ^5; say @b ~~ @a;
18:42 camelia rakudo-moar 680da7: OUTPUT«False␤»
18:42 ZoffixW m: my @a = ^10; my @b = ^10 .reverse; say @b ~~ @a;
18:42 camelia rakudo-moar 680da7: OUTPUT«False␤»
18:44 hankache thanks
18:45 timotimo perl5 sucks (among other things) because "just like Ruby it has redundant keyword "unless". You can do "if not" at least in three ways, which can lead to confusion and spoiling readability of code:
18:45 psy_ joined #perl6
18:45 timotimo "  -  really?
18:45 Hotkeys How do I make an immutable object, do I just make all of its attributes 'is r'?
18:45 ZoffixW timotimo, sure do-stuff unless $x or $bar
18:45 timotimo um. yeah. i know.
18:45 timotimo why is that a reason for the language to suck?
18:46 ZoffixW timotimo, allows such uses? *shrug* :)
18:46 geekosaur sounds like a pythoner whining?
18:46 geekosaur worshipper of the One True Way
18:46 ZoffixW I'd think on a page YourLanguageSucks all sorts of whining is perfectly permitted
18:46 timotimo the "perl 5 sucks because" list contains almost exclusively points that perl 6 fixes
18:46 AlexDaniel m: my @a = ^10; say %(flat @a Z (1,1 ... Inf))<5>:exists
18:46 camelia rakudo-moar 680da7: OUTPUT«True␤»
18:46 AlexDaniel m: my @a = ^10; say %(flat @a Z (1,1 ... Inf))<42>:exists
18:46 camelia rakudo-moar 680da7: OUTPUT«False␤»
18:46 timotimo we've been good at doing different mistakes this time around, it seems
18:47 ZoffixW m: my $x = NaN; say $x.WHAT
18:47 camelia rakudo-moar 680da7: OUTPUT«(Num)␤»
18:47 ZoffixW m: my $x = NaN; say $x === $x
18:47 camelia rakudo-moar 680da7: OUTPUT«True␤»
18:47 ZoffixW m: my $x = NaN; say $x === NaN
18:47 camelia rakudo-moar 680da7: OUTPUT«True␤»
18:47 timotimo AlexDaniel: yeah, Z stops at the shorter list
18:47 * Juerd doesn't like 'unless' but can't imagine that anyone would dislike a langugae for having it.
18:48 ZoffixW eh, some of the stuff on that page are major nitpicks.
18:49 * skids tries to picture a major nit
18:49 Juerd s/some/most/
18:49 AlexDaniel ZoffixW: yeah, it sucks
18:49 ZoffixW AlexDaniel, what does?
18:49 ZoffixW m: my $num = 0e0; my $int = 0; say $x == $x
18:49 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XNQ8cLv4UC␤Variable '$x' is not declared␤at /tmp/XNQ8cLv4UC:1␤------> 3my $num = 0e0; my $int = 0; say 7⏏5$x == $x␤»
18:49 ZoffixW m: my $num = 0e0; my $int = 0; say $num == $int
18:49 camelia rakudo-moar 680da7: OUTPUT«True␤»
18:49 AlexDaniel ZoffixW: this webpage :)
18:49 ZoffixW m: my $num = 0e0; my $int = 0; say $num === $int
18:49 camelia rakudo-moar 680da7: OUTPUT«False␤»
18:49 diakopter "which can lead to confusion and spoiling readability of code" - "can lead to"...... such a useless argument
18:49 diakopter useless use of slippery slope argument
18:49 ZoffixW ^ that is someone's complaint for JS
18:50 ZoffixW I meant my code evals
18:50 [Coke] updated https://gist.github.com/coke/1f5ff064a85f13e13261 with current OS X failures, including detailed test output on failing tests.
18:50 ZoffixW Under the excuse of "but is confusing coming from other languages"
18:50 ZoffixW heh
18:50 [TDH]rcwolf joined #perl6
18:51 [Coke] looks like line numbers are still an issue.
18:51 AndyDee joined #perl6
18:52 [Coke] t/spec/S17-procasync/stress.t still failing.
18:52 leont joined #perl6
18:52 diakopter the line numbers have had a couple oscillating interaction issues between VM, nqp, rakudo for many years
18:52 diakopter TimToady must've tickled it too hard
18:52 [TDH]rcwolf_alt joined #perl6
18:52 lichtkind lizmat: would you please direct me to the author file you editet?
18:52 [Coke] diakopter: these tests haven't been failing for some time.
18:52 lichtkind cant find it in the log
18:52 [Coke] this is a recent failure mode.
18:53 AlexDaniel I've found this one very funny though: “it generally takes you ten years to figure out how to call functions or methods inside double-quoted strings like any other variable. If you're reading this, though, you get a break: "You do it @{[sub{'like'}]} this. Easy"”
18:53 TimToady I don't *think* I tickled the line numbers, but I could be wrong
18:53 diakopter yes, he must've fixed it too hard in rakudo
18:54 diakopter ISTR a succession of like 111 off-by-one fixes in the various layers, one year
18:54 ZoffixW AlexDaniel, that one kinda makes me mad, because that's not an advised way to Do Things :(
18:54 ZoffixW m: -1**½
18:54 camelia rakudo-moar 680da7: ( no output )
18:54 ZoffixW m: say -1**½
18:54 camelia rakudo-moar 680da7: OUTPUT«-1␤»
18:54 ZoffixW :o
18:54 ZoffixW m: say -1**0.5
18:54 camelia rakudo-moar 680da7: OUTPUT«-1␤»
18:54 AlexDaniel ZoffixW: well, in Perl 6 you just use {} :)
18:54 ZoffixW AlexDaniel, yeah, I'm not yet convinced that it's a good idea
18:55 ZoffixW m: say sqrt -1
18:55 camelia rakudo-moar 680da7: OUTPUT«NaN␤»
18:55 TimToady remember ** is tighter
18:55 ZoffixW Ah
18:55 ZoffixW m: say (-1)**0.5
18:55 camelia rakudo-moar 680da7: OUTPUT«NaN␤»
18:55 ZoffixW That's terrible
18:55 zakharyas joined #perl6
18:55 ZoffixW m: say (-1+i)**0.5
18:55 camelia rakudo-moar 680da7: OUTPUT«0.455089860562227+1.09868411346781i␤»
18:55 TimToady no, you have to opt into complex arithmetic
18:55 xfix joined #perl6
18:55 ZoffixW m: say (-1+0i)**0.5
18:55 camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17+1i␤»
18:56 ZoffixW Fair enough
18:56 diakopter what's the approx thing
18:57 dalek roast: cd6ef58 | (Stefan Seifert)++ | S11-compunit/rt126904.t:
18:57 dalek roast: Remove obsolete TODO marker - bug is fixed
18:57 dalek roast: review: https://github.com/perl6/roast/commit/cd6ef5875b
18:57 AlexDaniel ZoffixW: what makes you think that it might not be a good idea?
18:57 dalek rakudo/nom: a54024a | (Stefan Seifert)++ | t/spectest.data:
18:57 dalek rakudo/nom: Run testfile for RT126904
18:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a54024ab65
18:57 ZoffixW diakopter, ≅
18:57 Juerd m: Sqrt(-1.Complex).say
18:57 camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uiM4y1SGLu␤Undeclared name:␤    Sqrt used at line 1␤␤»
18:57 Juerd m: sqrt(-1.Complex).say
18:57 camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17-1i␤»
18:57 Juerd Where does the 6e-17 come from?
18:58 ZoffixW From how it's calculated
18:58 Juerd Oh, of course! Silly me :)
18:58 diakopter m: sqrt((-1).Complex).say
18:58 camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17+1i␤»
18:58 ZoffixW m: sqrt((-1).Complex) ≅ 0+1i
18:58 camelia rakudo-moar 680da7: OUTPUT«Type check failed for return value; expected Bool but got Slip␤  in block <unit> at /tmp/XV8wQzA0yA:1␤␤»
18:58 Juerd diakopter: Oh, right.
18:58 Juerd Still, though.
18:58 diakopter Slip??
18:58 TimToady complex and fatrats are both contagious types
18:58 firstdayonthejob joined #perl6
18:59 * ZoffixW sits farther away
18:59 ZoffixW How contagious? :)
18:59 * Hotkeys mutates into a complex number
18:59 ZoffixW m: sqrt((-1).Complex) ≅ (0+1i)
18:59 camelia rakudo-moar 680da7: OUTPUT«Type check failed for return value; expected Bool but got Slip␤  in block <unit> at /tmp/VAKHNBySeg:1␤␤»
18:59 diakopter .oO( complexes have numbers? )
18:59 TimToady NYI I think
18:59 ZoffixW *shrug* no idea what it wants from me
18:59 ZoffixW Ahhh
19:00 ZoffixW m: sqrt((-1).Complex) = (0+1i)
19:00 camelia rakudo-moar 680da7: OUTPUT«Cannot modify an immutable Complex␤  in block <unit> at /tmp/_GuB9gKo3n:1␤␤»
19:00 diakopter whateven isSlip
19:00 ZoffixW m: sqrt((-1).Complex) == (0+1i)
19:00 camelia rakudo-moar 680da7: OUTPUT«Useless use of "==" in expression "sqrt((-1).Complex) == (0+1i)" in sink context␤- QAST::Op(chain &infix:<==>) :BY<comp_unit ua u u u> :statement_id<?> ==␤  - QAST::Op(callstatic &sqrt) :BY<EXPR/list W> :WANTED sqrt((-1).Complex)␤    - QAST::Op(hlliz…»
19:00 ZoffixW m: say sqrt((-1).Complex) == (0+1i)
19:00 camelia rakudo-moar 680da7: OUTPUT«False␤»
19:00 diakopter useless use of == ?
19:00 Juerd diakopter: Slip is the kind of list that flattens into other lists.
19:00 Hotkeys class Slip
19:00 Hotkeys : A kind of List that automatically flattens into an outer container
19:00 ZoffixW diakopter, wasn't it?
19:00 diakopter I see
19:01 diakopter well yeah because the eval bot does some code wrapping
19:01 diakopter I think
19:01 Juerd m: my $foo = Slip.new(1, 2, 3); say (4, 5, $foo, 6).perl
19:01 camelia rakudo-moar 680da7: OUTPUT«(4, 5, 1, 2, 3, 6)␤»
19:01 diakopter differenly from the repl mode I mean
19:01 [Coke] that generates the same error in the repl
19:01 ZoffixW m: 2
19:01 camelia rakudo-moar 680da7: OUTPUT«WARNINGS for /tmp/3NwgPNGPaK:␤Useless use of constant integer 2 in sink context (line 1)␤»
19:01 Juerd m: my $foo = (1, 2, 3); say (4, 5, |$foo, 6).perl
19:01 camelia rakudo-moar 680da7: OUTPUT«(4, 5, 1, 2, 3, 6)␤»
19:01 diakopter m: ;
19:01 camelia rakudo-moar 680da7: ( no output )
19:01 Juerd Guess what | makes :P
19:02 diakopter m: 0^0
19:02 timotimo | makes pie?
19:02 camelia rakudo-moar 680da7: ( no output )
19:02 timotimo diakopter: that's just a junction
19:02 ZoffixW Juerd, the torso of a stick figure?
19:02 diakopter useless use of junction!
19:02 Hotkeys m: my $foo = <1 2 3>; |$foo.WHAT
19:02 camelia rakudo-moar 680da7: ( no output )
19:02 Hotkeys m: my $foo = <1 2 3>; say |$foo.WHAT
19:02 camelia rakudo-moar 680da7: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at /tmp/ch_ALnpf1s:1␤␤»
19:02 ZoffixW m: my $foo = <1 2 3>; say (|$foo).WHAT
19:02 camelia rakudo-moar 680da7: OUTPUT«(Slip)␤»
19:02 Hotkeys there we go
19:03 ZoffixW m: -> { my $x = 42; say $x }
19:03 camelia rakudo-moar 680da7: ( no output )
19:04 zakharyas joined #perl6
19:04 TimToady that one should probably warn
19:05 vendethiel joined #perl6
19:05 TimToady in a useless way...
19:06 Juerd Useless use of purity in sink context...
19:06 diakopter imho evalbot should wrap a "say (" ... ")" if it doesn't see a 'say' or 'print' in the code
19:06 [Coke] -1
19:07 ZoffixW diakopter, yes, there's a whole club who want that :)
19:07 Juerd Or say the return value if the output is empty.
19:07 ZoffixW [Coke], why -1?
19:07 [Coke] then you can't track "useless use" errors, etc.
19:07 diakopter but yes, the repl should do something different
19:08 ZoffixW We could have some sort of a different trigger for it
19:08 diakopter TimToady: did you see [Coke]'s comment about the repl giving useless use of the top level?
19:08 ZoffixW (though then, I suppose, everyone will start using it and error will go misssing)
19:08 Juerd Come on, .say isn't that much typing :)
19:08 [Coke] diakopter: no, it's giving the Slip error.
19:08 ZoffixW Juerd, it's not about typing, it's about forgetting to add it
19:08 diakopter oh
19:08 Juerd ZoffixW: And then typing it :)
19:08 TimToady maybe it should give both answers, sink vs wanted
19:09 ZoffixW heh
19:09 TimToady or pick the more interesting answer :)
19:09 [Coke] "sqrt((-1).Complex) ≅ 0+1i" behaves the same in camelia & the REPL.
19:09 TimToady NYI I think
19:09 skids Typing "say" will sink in eventually, pun intended.
19:10 diakopter a smarter evalbot could keep a repl open, per user, within dynamic resource constraints
19:10 diakopter (it already must have as much power for single evaluations)
19:10 zjmarlow joined #perl6
19:10 moritz that would be a terrible default behavior
19:11 diakopter probably yeah
19:11 moritz code doing different things depending on how runs it
19:11 Juerd I can see us doing m: ^D all te time
19:11 diakopter heh
19:12 moritz just autoprinting when the program produced no output confused the heck out of people (me included, occasionally)
19:14 diakopter oh, I didn't know it did that at one point
19:17 ZoffixW AlexDaniel, oh, forgot to answer you. I'm not yet convinced {} for code interpolation in strings is such a good idea because recently I was working with code that handled CSS strings that... have {} in them so I had to escape them (and use q{} in some places)
19:17 skids m: "ency"
19:17 camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/P9f1q9UJaM:␤Useless use of constant string "ency" in sink context (line 1)␤»
19:17 skids :)
19:17 FreezerburnV joined #perl6
19:18 ZoffixW AlexDaniel, and it encourages embedding code in strings, which I'm also not yet convinced is too desirable to do :)
19:18 jnthn m: "titanic"
19:18 camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/R8SD9O9eRQ:␤Useless use of constant string "titanic" in sink context (line 1)␤»
19:18 ZoffixW (because it reduces the visibility of said code)
19:18 ZoffixW m: "dirty dishes"
19:18 camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/vWex6gvu4R:␤Useless use of constant string "dirty dishes" in sink context (line 1)␤»
19:19 AlexDaniel ZoffixW: well, why don't you use ‘’ then?
19:19 ZoffixW AlexDaniel, 'cause I had variables too
19:19 zakharyas1 joined #perl6
19:19 [Coke] ZoffixW: if you don't want interpolation, you have an easy way not to use it.
19:19 AlexDaniel ZoffixW: then specify what you want to interpolate?
19:19 ZoffixW How?
19:19 [Coke] m: say "{pi}"; say '{pi}'
19:19 camelia rakudo-moar a54024: OUTPUT«3.14159265358979␤{pi}␤»
19:19 [Coke] that, for one.
19:19 ZoffixW m: my $foo = 42; say "$foo {pi}"; say '$foo {pi}'
19:19 camelia rakudo-moar a54024: OUTPUT«42 3.14159265358979␤$foo {pi}␤»
19:20 FreezerburnV When attempting to write some NativeCall wrapper code, I just ran into an issue where I have “sub glClearColor(num32 $r, num32 $g, num32 $b, num32 $a) is native($lib) is export {*}” that I’m attempting to call with “glClearColor(1.0, 1.0, 1.0, 1.0);” and I’m getting the error: “This type cannot unbox to a native number”. What do I need to do to fix that? (the original is defined as void glClearColor(GLclampf, GLc
19:20 [Coke] so you want variable interpolation, but not block interpolation? Is that the implication you're making?
19:20 FreezerburnV GLclampf) where GLclampf is a float)
19:20 ZoffixW [Coke], yes
19:21 ZoffixW [Coke], by want I mean "would be nice if there were some sort of delimiters that did that"
19:21 AlexDaniel m: my $x = 5; say Q:s‘$x {say 'hello'}’
19:21 camelia rakudo-moar a54024: OUTPUT«5 {say 'hello'}␤»
19:21 AlexDaniel ZoffixW: ↑
19:21 ZoffixW Ah
19:21 ZoffixW (Perl 6)++ AlexDaniel++
19:22 ZoffixW FreezerburnV, I think you need to call it with 1e0
19:22 AlexDaniel ZoffixW: https://design.perl6.org/S​02.html#Adverbs_on_quotes
19:22 ZoffixW m: say 1e0.WHAT, ' ', 1.0.WHAT
19:22 camelia rakudo-moar a54024: OUTPUT«(Num) (Rat)␤»
19:23 spider-mario joined #perl6
19:23 ZoffixW AlexDaniel, thanks
19:23 FreezerburnV ZoffixW: Ah, thank you!
19:24 ZoffixW Cool, you can specify hashes/arrays to interpolate
19:24 AlexDaniel ZoffixW: yeah, choose your weapon :)
19:24 FreezerburnV Might consider an error message which suggest that if it gets a Rat when a Num is expected. If I get some time, and nobody else does that, I might try and put in a pull request for that
19:24 AlexDaniel ZoffixW: it is a bit sad though that “macro” stuff is not working
19:25 ZoffixW FreezerburnV, probably a good idea. I saw someone else encounter the exact same issue just yesterday
19:25 AlexDaniel FreezerburnV: just go for it
19:26 [Coke] AlexDaniel: macros "work".
19:26 [Coke] they're just experimental.
19:26 AlexDaniel let's see
19:26 FreezerburnV AlexDaniel: I’ll see if I can find the place to add that message today :)
19:27 AlexDaniel m: use experimental :macros; macro qx { ‘qq:x ’ }; say qx/test/
19:27 camelia rakudo-moar a54024: OUTPUT«===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
19:27 AlexDaniel m: use experimental :macros; macro qx { ‘qq:x ’ }; say qx /test/
19:27 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Vu3wmYT5Hs␤Too many positionals passed; expected 0 arguments but got 1␤at /tmp/Vu3wmYT5Hs:1␤»
19:28 ZoffixW m: use experimental :macros; macro quote:<❰ ❱> ($text) { quasi { {{{$text}}}.quoteharder } }; say ❰ {say "foo"} ❱;
19:28 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2DqmdjWmvA␤Cannot add tokens of category 'quote'␤at /tmp/2DqmdjWmvA:1␤------> 3 experimental :macros; macro quote:<❰ ❱>7⏏5 ($text) { quasi { {{{$text}}}.quotehard␤»
19:28 ZoffixW :(
19:28 ZoffixW "{{{$text}}}" <-- lol those braces :D
19:28 b2gills ZoffixW:  「qq:!c"..."」 you can start with full qq behavior and just turn off closures
19:29 AlexDaniel b2gills: oh wow!
19:29 ZoffixW m: my $x =42 ; say qq!c/$x {say "neat"}/
19:29 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JCX8RDty4N␤Couldn't find terminator ! (corresponding ! was at line 1)␤at /tmp/JCX8RDty4N:1␤------> 3my $x =42 ; say qq!c/$x {say "neat"}/7⏏5<EOL>␤    expecting any of:␤        !␤»
19:29 ZoffixW m: my $x =42 ; say qq:!c/$x {say "neat"}/
19:29 camelia rakudo-moar a54024: OUTPUT«42 {say "neat"}␤»
19:30 ZoffixW m: my $x =42 ; say :regex/$x {say "neat"}/
19:30 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qxJEiaoNuI␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/qxJEiaoNuI:1␤------> 3my $x =42 ; say :regex/$x7⏏5 {say "neat"}/␤    expecting any of:…»
19:30 AlexDaniel m: my $x =42 ; say Qs/$x {say "neat"}/
19:30 camelia rakudo-moar a54024: OUTPUT«42 {say "neat"}␤»
19:30 AlexDaniel that's much shorter though
19:32 AlexDaniel m: say Q:p‘/home’
19:32 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w38SYultKR␤Unrecognized adverb: :p␤at /tmp/w38SYultKR:1␤------> 3say Q:p7⏏5‘/home’␤»
19:36 virtualsue joined #perl6
19:36 ZoffixW m: say '❰❱'.».comb
19:36 camelia rakudo-moar a54024: OUTPUT«((❰ ❱))␤»
19:36 ZoffixW m: say '❰❱'».comb
19:36 camelia rakudo-moar a54024: OUTPUT«((❰ ❱))␤»
19:37 ZoffixW .».
19:39 timotimo ».«
19:39 ZoffixW I don't get it :/
19:40 ZoffixW Is there a difference between .». and ». ?
19:40 AlexDaniel m: say '❰abc❱'.comb
19:40 camelia rakudo-moar a54024: OUTPUT«(❰ a b c ❱)␤»
19:40 AlexDaniel m: say '❰abc❱'.comb.perl
19:40 camelia rakudo-moar a54024: OUTPUT«("❰", "a", "b", "c", "❱").Seq␤»
19:40 ZoffixW m: say '❰abc❱'.comb».perl
19:40 camelia rakudo-moar a54024: OUTPUT«("❰" "a" "b" "c" "❱")␤»
19:40 ZoffixW m: say '❰abc❱'.comb.».perl
19:40 camelia rakudo-moar a54024: OUTPUT«("❰" "a" "b" "c" "❱")␤»
19:41 AlexDaniel what's .». ? :)
19:41 ZoffixW I dunno
19:42 skids My guess is pretty much there for the same reason as .()
19:42 ZoffixW m: say (* * *).(2, 2)
19:42 camelia rakudo-moar a54024: OUTPUT«4␤»
19:43 ZoffixW And what reason is it? :)
19:43 AlexDaniel m: say '❰abc❱'.comb ».perl
19:43 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vGo4pHiAQ7␤Missing « or »␤at /tmp/vGo4pHiAQ7:1␤------> 3say '❰abc❱'.comb ».7⏏5perl␤»
19:43 AlexDaniel m: say '❰abc❱'.comb» .perl
19:43 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mnZTvAH_BA␤Missing postfix␤at /tmp/mnZTvAH_BA:1␤------> 3say '❰abc❱'.comb»7⏏5 .perl␤    expecting any of:␤        method arguments␤        postfix␤»
19:43 AlexDaniel m: say '❰abc❱'.comb .».perl
19:43 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v9o0xMHKnq␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/v9o0xMHKnq:1␤------> 3say '❰abc❱'.comb .»7⏏5.perl␤»
19:43 AlexDaniel m: say '❰abc❱'.comb. ».perl
19:43 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/O95FAqYLOR␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/O95FAqYLOR:1␤------> 3say '❰abc❱'.comb. »7⏏5.perl␤»
19:44 AlexDaniel I've never liked how sensitive » is to whitespace
19:44 moritz I think it's a mistake to allow method calls with spaces
19:44 moritz now everybody and their dog wants whitespaces in any postfix position
19:45 ZoffixW Noooo!!! It's not a mistake to allow spaces. It's my bread and butter :( method chaining and all.
19:45 timotimo moritz: i disagree. i like that we have it now.
19:45 ZoffixW In fact, before you guys fixed the requirement of unspaces for that, I wasn't even that interested in trying Perl 6 out.
19:48 Ulti m: sub yay($n) is cached { say "woop"; $n+1; } say yay(1); say yay(1);
19:48 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AfwzkndSm0␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/AfwzkndSm0:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
19:48 ZoffixW m: use exeperimental :cached; sub yay($n) is cached { say "woop"; $n+1; } say yay(1); say yay(1);
19:48 camelia rakudo-moar a54024: OUTPUT«===SORRY!===␤Could not find exeperimental in:␤    /home/camelia/.perl6/2015.11-590-ga54024a␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤  …»
19:48 ZoffixW m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; } say yay(1); say yay(1);
19:48 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BEMrahOBw_␤Strange text after block (missing semicolon or comma?)␤at /tmp/BEMrahOBw_:1␤------> 3 yay($n) is cached { say "woop"; $n+1; }7⏏5 say yay(1); say yay(1);␤    expecting any of:␤        …»
19:48 ZoffixW m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
19:48 camelia rakudo-moar a54024: OUTPUT«woop␤2␤2␤»
19:49 FROGGS joined #perl6
19:49 ZoffixW m: sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
19:49 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aGuHkHSdB6␤Can't use unknown trait 'is cached' in a sub declaration.␤at /tmp/aGuHkHSdB6:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
19:49 Ulti :/
19:49 ZoffixW weird
19:49 Ulti so cached is now experimental?
19:49 ZoffixW Ulti, yeah
19:49 FROGGS m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
19:49 camelia rakudo-moar a54024: OUTPUT«woop␤2␤2␤»
19:49 ZoffixW And the message should probably mention that fact
19:49 ZoffixW As it does for macros
19:49 ZoffixW m: macro x ($text){}
19:49 camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/C1ZA2QCies␤Use of macros is experimental; please 'use experimental :macros'␤at /tmp/C1ZA2QCies:1␤------> 3macro7⏏5 x ($text){}␤»
19:50 Ulti yup
19:50 Ulti especially as it's been around a while
19:52 Ulti so what does experimental mean explicitly that there is no real expectation its going to be part of Perl 6 yet?
19:52 ZoffixW Submitted an report: https://rt.perl.org/Ticket/Display.html?id=126936
19:53 Ulti since in the p5 world there is also the feature pragma
19:53 ZoffixW Ulti, I believe it's features that haven't been solidified. They're marked as experimental so we could still tinker with them after 6.Christmas
19:53 El_Che goodevening
19:53 ZoffixW goodafternoon
19:54 jnthn Ulti: There were a bunch of outstanding issues with "is cached" that really want resolving, and there was no way we were going to manage to do them in a good way this side of Christmas.
19:54 jnthn Ulti: So experimental in this case means "you can use it but we *will* change its semantics a bit down the line"
19:57 ollej left #perl6
19:57 Juerd jnthn: For your Stomp::Client, you chose to let .connect do everything in start { ... }, so that the caller needs to await it. Why? I figured that blocking would be the common use case, and the user can start { } it if they need it async.
19:58 Ulti ahh ok thanks jnthn thats essentially the same as the p5 use
19:58 timotimo i wonder if you'll continue to get the "old" "is cached" when you keep "use experimental :is-cached" even when we've solidified the semantics and implementation?
19:59 Juerd timotimo: In general, keeping multiple implementations is a burden
19:59 moritz Juerd: one could easily do a .connect(...).then({ send the message here }) for example
19:59 moritz Juerd: but I think it's mostly a matter of interface consistency (more)
19:59 Juerd moritz: Yes. I originally had that, but then figured that a simple semicolon would be nicer.
20:00 El_Che timotimo: wouldn't be that confusing as hell?
20:00 timotimo El_Che: i don't think so. it just means that your code will work for another release or two without needing to be changed
20:00 moritz Juerd: when you offer an asynchronous interface, it's better to have it always asynchronous, and not forcing the user to make some parts asynchronous themselves, just because it'd be implemented with start { }
20:00 timotimo i expect after "is cached" gets solidified, "use experimental :is-cached" will start giving deprecation messages
20:01 virtualsue joined #perl6
20:01 moritz what if, in the future, you find a neither way to asynchronously connect without having to start a new thread?
20:01 moritz timotimo: I don't think you can expect deprecation warnings from experimental features
20:01 El_Che timotimo: if you don't want to change code, don't use experimental ("the pony may be a crocodile later, we don't know") or use and older release of rakudo?
20:01 Ulti yeah I guess feature is more enable feature but I dont want to specify perl version
20:02 jnthn Juerd: Mostly consistency, including with IO::Socket::Async itself which is also giving you a Promise
20:02 jnthn Juerd: Uh, it's connect method I mean
20:02 jnthn Juerd: I don't feel especially strongly on it
20:02 Juerd jnthn: Does start {} return a promise then?
20:02 Juerd Hm
20:02 El_Che use experimental :cached v0.001alpha;
20:02 timotimo that's what it does, yeah
20:03 Juerd m: (start { }).WHAT.say
20:03 camelia rakudo-moar a54024: OUTPUT«(Promise)␤»
20:03 jnthn Juerd: yes
20:03 Juerd Ah
20:03 Juerd I missed that. I guess that consistency makes sense
20:06 cinch joined #perl6
20:06 dalek rakudo/nom: aa12a40 | TimToady++ | src/core/Complex.pm:
20:06 dalek rakudo/nom: use better approximately equal algo for Complex
20:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa12a40600
20:07 dalek roast: 5ba241d | TimToady++ | S03-operators/relational.t:
20:07 dalek roast: some basic tests that Complex can do approx
20:07 dalek roast: review: https://github.com/perl6/roast/commit/5ba241d2f0
20:07 cinch so this channel is pure bot spam?
20:07 Juerd cinch: No, not purely that
20:07 TimToady a lot of the bot spam is impure
20:08 Hotkeys if I have a 'class Baz is export' in module Foo::Bar, and I 'use Foo::Bar', do I then refer to Baz as 'Foo::Bar::Baz' or just 'Baz' (or other?)?
20:08 Juerd cinch: I think about half of it is bot spam, but it's useful bot spam :)
20:08 timotimo so ... did anybody try golfing "cannot find method run_alt" yet?
20:08 jnthn Hotkeys: Anywhere that imports the module (perhaps through doing a use) will get a Baz
20:09 nine timotimo: closest is PERL6LIB=lib perl6 --ll-exception -e 'use lib "t/spec/packages"; for <A B> { my $comp-unit = $*REPO.need(CompUnit::DependencySpecific​ation.new(:short-name("Example::$_"))); say $comp-unit.precompiled; };'
20:09 Hotkeys alright, thanks
20:09 cinch :-)
20:09 timotimo huh? that's where that comes from? o_O
20:10 nine timotimo: both Example::A and B use Example::C which uses experimental. I can replace experimental by Test and the bug still shows
20:11 * [Coke] images that anything under use experimental is subject to being dropped in any release with no expectation of backwards compatibility.
20:11 nine timotimo: both experimental and Test can be found in the lib directory
20:11 [Coke] that's why it's experimental.
20:11 timotimo how often do i have to run that for it to break?
20:11 TimToady m: say sqrt((-1).Complex) ≅ 0+i  # is this imaginary bot spam?
20:11 camelia rakudo-moar aa12a4: OUTPUT«True␤»
20:11 [Coke] *imagines
20:12 nine timotimo: for me it breaks reliably. You may have to clean your .precomp directories
20:12 TimToady feel free to fuzz the new ≅
20:12 TimToady lunch &
20:13 timotimo nine: all .precomps i can find under rakudo/ ?
20:13 nine timotimo: HTTP::UserAgent breaks with perl6 -Ilib -e 'use HTTP::Message; use URI;'
20:13 nine timotimo: yes
20:14 timotimo find . -iname '.precomp' reports 0 lines now
20:15 timotimo it just reports "True\nTrue\n" for me now
20:15 nine timotimo: and with <C A B> instead of just <A B>?
20:15 timotimo let me try
20:15 timotimo three times True
20:16 Juerd Are there any guidelines for module names? I'm wondering if I should drop the Net:: prefix.
20:16 FROGGS same on my box fwiw
20:16 [Coke] anyone running the Inline::perl5 tests?
20:17 [Coke] I still don't have an easy way to run those in a rakudo checkout. :|
20:17 nine It is elusive. I just added some more RAKUDO_MODULE_DEBUG output and it's gone. But I can still repro it with HTTP::UserAgent
20:17 timotimo yeah, i got it in HTTP::UserAgent, too
20:17 [Coke] er, any way, if I'm starting from scratch behind a firewall.
20:18 [Coke] I've asked before and gotten no response - how do folks feel about bundling http proxy support in panda?
20:19 Juerd Are proxies still used? I thought they're kind of obsolete with all the https going on everywhere...
20:19 timotimo hmm. it happens when trying to .child on a path?
20:20 nine timotimo: yes, that's what I see in HTTP::UserAgent
20:20 moritz [Coke]: I don't care very much either way
20:20 geekosaur lot of businesses still use proxies, yes
20:21 timotimo did you go down into moar's guts yet for this?
20:21 nine timotimo: the Example::C thingy breaks on checking a value against CompUnit::PrecompilationId which uses a Regex
20:22 nine No. I wouldn't know where to start.
20:22 [Coke] Juerd: without http proxy support, I can't do anything web related at work.
20:22 timotimo hm, right.
20:22 [Coke] everything goes through the proxy.
20:22 [Coke] can't even lookup hack.p6c.org via DNS, e.g.
20:22 FROGGS nine: if I would be forced to bet I'd say it is about the EVAL in Cursor.pm
20:23 timotimo well, i have a serious craving for something sweet to have after dinner or maybe even before ... i ought to get to the grocery shop, as it'll close in ~40 minutes
20:23 Juerd [Coke]: Wow, that's gotta suck
20:23 FROGGS because EVALs at compile time...
20:23 Juerd [Coke]: Why did they cripple the network like that?
20:23 ChoHag What happens if I call $foo.map({$_}).list
20:23 ChoHag ?
20:23 [Coke] Juerd: it's a fairly large company.
20:24 Juerd So?
20:25 [Coke] 1) they like to keep things under control 2) I have no insight into why these decisions are made.
20:25 RabidGravy I'm just going to "fix" HTTP:::UserAgent as a liberal sprinkiling of "no precompilation"  in HTTP::Message, HTTP::Request, HTTP::Response and HTTP::Cookies makes it go away
20:26 virtualsue joined #perl6
20:26 masak ChoHag: is that the whole context of the question?
20:26 masak m: my $foo = 42; say $foo.map({$_}).list.perl
20:26 camelia rakudo-moar aa12a4: OUTPUT«(42,)␤»
20:26 masak ChoHag: that's what happens :)
20:26 RabidGravy not ideal but it gets people working again
20:26 masak m: my $foo = [1, 2, 3]; say $foo.map({$_}).list.perl
20:26 camelia rakudo-moar aa12a4: OUTPUT«(1, 2, 3)␤»
20:26 jnthn [Coke]: imho (though I'm not the one who maintains toolchain stuff like this) if it'd help make it usable by more people, then I'd go for it
20:26 masak ChoHag: slightly different if it's already a mappable type, as you see.
20:26 nine FROGGS: I wonder how we could test your hypothesis
20:27 masak [Coke]: I'd be for it even if it helps one person. but it's still a matter of someone having the tuits to add such support...
20:29 [Coke] Yes, I'm not asking anyone to patch panda (though that would be awesome), I'm asking if anyone sees an issue with the request.]
20:29 [Coke] sounds like "Feel Free" is the response. that's fine.
20:30 moritz [Coke]: though for an authorotative answer, ask tadzik++
20:32 nine [Coke]: one of panda's jobs is to download. It can't do its job properly without proxy support, so just do it.
20:33 tadzik well, panda does work with proxies if HTTP::UA is installed
20:33 tadzik though I've heard the latter is broken recently
20:33 _nadim hi, is ist possible to use substr as an lvalue? specifically I want to split a string into parts without having to do regex.
20:33 FROGGS nine: I dunno... checking that we do or do not interpolate variables in regex in CUR related code?
20:34 FROGGS [Coke]: btw, my opinion about proxy support for panda would be to let panda use HTTP::UserAgent (after making it rock solid if needed)
20:35 masak seems (by tadzik's) answer that's already the case
20:35 masak at least when everything works
20:35 FROGGS tadzik: panda does make use of it?
20:36 nine FROGGS: neither IO::Spec::UNIX::canonpath nor the CompUnit::PrecompilationId regex interpolate variables
20:37 Skarsnik it there is an issue with URI, maybe try URI2 in h::ua?
20:37 nine Skarsnik: the issue is definitely with rakudo
20:38 geekosaur _nadim, substr-rw
20:38 maziar joined #perl6
20:39 geekosaur making substr an lvalue made it too slow in the general case
20:39 [Coke] "if http::ua in installed" - right, but you can't install it without having it...
20:39 [Coke] (if you need it)
20:39 tadzik FROGGS: if it's installed, yes
20:40 tadzik https://github.com/tadzik/panda/blo​b/master/lib/Panda/Ecosystem.pm#L87
20:40 Skarsnik should be shipped with panda or star? x)
20:40 _nadim geekosaur: thanks, thank I'll avoid sustr-rw as I am replacing regexes to go faster.
20:41 geekosaur well, substr-rw is also not an lvalue, it takes a parameter for a replacement string IIRC. so neither one incurs the substantial overhead of a Proxy
20:42 Skarsnik substr and subst should be renamed ~~
20:43 autarch joined #perl6
20:44 RabidGravy so HTTP::UserAgent is working again, I'll try and do a more precise hack tomorrow
20:44 RabidGravy btw it's https://rt.perl.org/Ticket/Display.html?id=126832 isn't it
20:44 Hotkeys Does perl 6 regex have backrefs? it got mad at me for trying to do \1
20:45 jnthn TimToady: Today's ticket to rule on: https://rt.perl.org/Ticket/Display.html?id=74902 I suspect the answer is going to be "no, we've decided not to try and do that", at this point.
20:45 Skarsnik RabidGravy++ even if it's just a workaround ^^
20:45 zjmarlow joined #perl6
20:45 integral joined #perl6
20:45 jnthn Hotkeys: \1 is written $0 now
20:45 jnthn Hotkeys: \2 as $1, etc.
20:45 Hotkeys ah
20:45 Hotkeys alright, thanks
20:45 masak m: /\1/
20:45 camelia rakudo-moar aa12a4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xVKLyLTxtQ␤Unrecognized backslash sequence: '\1'␤at /tmp/xVKLyLTxtQ:1␤------> 3/\7⏏1/␤    expecting any of:␤        term␤»
20:46 masak huh.
20:46 * masak expected an excellent p5->p6 error message :)
20:46 FROGGS std: /\1/
20:46 camelia std : OUTPUT«No such file or directory»
20:46 jnthn Patches welcome ;-)
20:46 camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤»
20:53 TimToady jnthn: I think we can classify it as erroneous, don't do that but we won't prevent you, but don't be surprised if we break it someday
20:54 virtualsue joined #perl6
20:55 jnthn TimToady: So, the ticket survives, but as a "not this xmas" one? :)
20:56 TimToady yeah
20:56 regreg joined #perl6
20:56 jnthn OK
20:56 jnthn That gets us under 10 :)
20:56 TimToady it's a WBNI
20:56 TimToady IWBNI
20:57 ilmari TimToady: was there a ruling on oversize/negative bitshift for native ints? implementation-specified?
20:58 ilmari currently moar has nasal demons there
20:58 TimToady I don't want to get too far away from the metal on that one, when it comes to natives
20:58 Hotkeys m: Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
20:58 camelia rakudo-moar aa12a4: OUTPUT«[DISLOCATED MESSAGE] Useless use of sm_result_1 symbol in sink context␤»
20:58 Hotkeys m: say Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
20:58 camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
20:58 Hotkeys how do I match the <!after ...> only for the immediately preceding character
20:58 Hotkeys ?
20:58 jnthn I think the metal does nasal demons... :)
20:58 ilmari TimToady: js and java both have defined behaviour for it, only C is UB
20:58 zakharyas joined #perl6
20:58 jnthn ilmari: Do you know what price they pay for it, ooc?
20:59 ilmari jnthn: AIUI the CPU instructions usually have defined behaviour
20:59 Hotkeys so I want it to match everything in that mess of characters except the "\ef"
20:59 TimToady well, we could require it if the CPU supports it :)
20:59 ilmari but it varies between CPUs, so C leaves it undefined
21:00 TimToady on the theory that the code will be tested to be correct on the well-behaved CPU, so is likely to still work when ported elsewhere
21:00 ilmari jnthn: https://github.com/ilmari/MoarVM/commit/​7b35375b69222734c115fc154b240b9dd306bc8c
21:00 ilmari that gives moar the same behaviour as perl5
21:01 jnthn That's quite some overhead over a single CPU instruction.
21:02 jnthn Is our behavior on Int sane?
21:02 jnthn We have the flexibility to decide differently on Int vs int
21:02 TimToady more or less what I said, yeah
21:02 diakopter well the JIT behavior is pretty rudimentary
21:03 skids Also unsigned will need to shift in zeros even when the high bit is set.
21:03 nine FROGGS: adding a die; to sub EVAL does not trigger...
21:03 roguelazer joined #perl6
21:03 jnthn TimToady: BTW, I looked into https://rt.perl.org/Ticket/Display.html?id=125769 a little, even with --optimize=off (which disables the lexical => local transform) it still does the wrong thing.
21:04 FROGGS nine: damn
21:04 jnthn TimToady: I'm currently working on https://rt.perl.org/Ticket/Display.html?id=124084 and https://rt.perl.org/Ticket/Display.html?id=124294
21:04 jnthn Where currently means "I'm a bit too tired to do any more today, but I started" :)
21:04 ilmari m: say 1 << -65
21:04 camelia rakudo-moar aa12a4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F6ZOlrfhgO␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~<␤at /tmp/F6ZOlrfhgO:1␤------> 3say 1 <<7⏏5 -65␤»
21:05 FROGGS nine: do I have to do this command in a H:UA checkout? perl6 -Ilib -e 'use HTTP::Message; use URI;'
21:05 ilmari m: say 1 +< -65
21:05 camelia rakudo-moar aa12a4: OUTPUT«0␤»
21:06 nine FROGGS: yes
21:06 psy_ joined #perl6
21:06 ilmari m: say 4 +< -2
21:06 camelia rakudo-moar aa12a4: OUTPUT«1␤»
21:06 nine FROGGS: if that doesn't trigger it just running test test suite should
21:07 Hotkeys Anyone know how I can do a single character lookbehind in perl 6?
21:07 Hotkeys m: say Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
21:07 camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
21:07 Hotkeys I want this to match everything except \ef
21:08 diakopter m: say 4 +< 9999999999999999999
21:08 camelia rakudo-moar aa12a4: OUTPUT«2␤»
21:08 diakopter \o/
21:08 FROGGS m: say Q|eaebeced\efegeh| ~~ /( <!before [\\]> e<[a..z]> )+/
21:08 camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
21:09 nine jnthn: Nice combination! One bug about num32 behaving too much like num64 and one where they behave differently...
21:09 masak Hotkeys: the + makes it match as much as possible. it stops when it reaches \ef
21:09 ShimmerFairy Hotkeys: seems to work, you just didn't specify what to do after you encounter a \
21:09 Hotkeys oh
21:09 FROGGS m: say Q|eaebeced\efegeh| ~~ /( <!before \\e<[a..z]>> . )+/
21:09 camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「e」␤ 0 => 「a」␤ 0 => 「e」␤ 0 => 「b」␤ 0 => 「e」␤ 0 => 「c」␤ 0 => 「e」␤ 0 => 「d」␤»
21:09 Hotkeys I see
21:09 masak Hotkeys: if you want it to find all occurrences like you describe, consider using .comb
21:09 ShimmerFairy (or even once you encounter a \ )
21:09 jnthn nine: One is about ints, one about nums :)
21:09 moritz Hotkeys: ... or maybe just .split on '\ef' ?
21:10 jnthn nine: Both slipped in 'cus Moar did sloppy validation of bytecode
21:10 nine jnthn: oh...I guess I'm a bit tired myself :)
21:10 jnthn (Which I fixed, but now I have to fix eveything else :))
21:10 ilmari m: say 4 >> -1
21:10 camelia rakudo-moar aa12a4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mOcDHkvxQh␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~>␤at /tmp/mOcDHkvxQh:1␤------> 3say 4 >>7⏏5 -1␤»
21:10 masak m: say Q|eaebeced\efegeh|.comb(/<!after [\\]> e<[a..z]>/)
21:10 camelia rakudo-moar aa12a4: OUTPUT«(ea eb ec ed eg eh)␤»
21:10 ilmari m: say 4 +> -1
21:10 camelia rakudo-moar aa12a4: OUTPUT«8␤»
21:10 cdg joined #perl6
21:10 Hotkeys masak: that's fancy
21:10 masak yeah, I like .comb
21:11 FROGGS ==> Installing MIME::Base64
21:11 FROGGS Internal error: zeroed target thread ID in work pass
21:11 FROGGS uff
21:11 cdg joined #perl6
21:11 jnthn o.O
21:11 FROGGS that was when trying to install MIME::Base64
21:11 jnthn That's ungood.
21:12 FROGGS most likely
21:12 masak compiler release tomorrow? :P
21:12 diakopter double plus ungood
21:12 dalek roast: 1d7b816 | usev6++ | S11-modules/require.t:
21:12 dalek roast: Revert "Remove troublesome "use lib '.'""
21:12 dalek roast:
21:12 dalek roast: This reverts commit 6bafc9245c10ba70012beae208ba30847f398b2a.
21:12 dalek roast:
21:12 dalek roast: That "use lib '.'" no longer causes problems.
21:12 dalek roast: Test file should not cause an abort any longer.
21:12 dalek roast: review: https://github.com/perl6/roast/commit/1d7b816c66
21:12 FROGGS I guess it picks up old precomped things or so
21:13 jnthn Still should never explode in that way
21:13 FROGGS t/030-cookies.t ............ ===SORRY!===
21:13 FROGGS Failed to open file /home/froggs/dev/nqp/install/share/perl6/site/​dist/B86EDFCF9E4D0C0EED4FAD8E9266DB077567DA8A: no such file or directory
21:13 * jnthn should get some rest, so he can fix more stuffs tomorrow
21:13 diakopter jnthn: at least it didn't segv :P
21:14 jnthn diakopter: True :)
21:14 jnthn 'night, #perl6
21:14 raiph o/
21:14 ShimmerFairy FROGGS: ooc, does such a file or directory exist? :)
21:15 Skarsnik precompiled stuff x)
21:15 FROGGS ShimmerFairy: no idea, I cleaned the directories right now :o)
21:15 ShimmerFairy FROGGS: So I guess the answer is "now it doesn't!" ? :P
21:16 FROGGS exactly *g*
21:21 FROGGS nine: now I can reproduce
21:23 zjmarlow joined #perl6
21:24 dalek rakudo/nom: b6373d5 | moritz++ | src/core/Supply.pm:
21:24 dalek rakudo/nom: Fix error reporting from Suppy.quit
21:24 dalek rakudo/nom:
21:24 dalek rakudo/nom: this changes the UDP error on linux from "Unexplained error"
21:24 dalek rakudo/nom: to "Unknown system error", which is not really that much more helpful
21:24 dalek rakudo/nom: (but the fix is still worth it on its own)
21:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6373d5c13
21:26 redhands joined #perl6
21:30 geraud joined #perl6
21:33 moritz jnthn: looking at S32-io/IO-Socket-Async-UDP.t, I'm surprised it works at all
21:33 moritz jnthn: the Listener $sock and $tap go out of scope immediately after being set up
21:34 moritz jnthn: what keeps the socket alive?
21:34 geekosaur jnthn went to bed
21:34 moritz oh
21:37 moritz I could imagine it's being kept alive by the lack of a GC run in between :-)
21:37 colomon joined #perl6
21:44 moritz oh fun, "Unknown system error" comes from libuv when it can't map the error number to a string
21:44 moritz I am tempted to say that there's a libuv error involved
21:45 moritz we might be using it wrong, but its error reporting is borked too
21:45 * [Coke] hopes he can find some time to hack on things tonight. whee.
21:47 stmuk moritz: I assume you are using hoelzro's nread patch?
21:48 moritz stmuk: I don't even know what that is :-)
21:48 * hoelzro forgot to push it =/
21:48 stmuk http://irclog.perlgeek.de/p​erl6/2015-12-15#i_11722965
21:48 hoelzro I have a fix in MoarVM and roast at home
21:48 hoelzro just need to push
21:49 ShimmerFairy m: say 10**-1    # boo
21:49 camelia rakudo-moar b6373d: OUTPUT«0.1␤»
21:49 hoelzro the fixes are trivial; +1/-1 line in Moar, +2 to roast
21:49 ShimmerFairy huh, fails here. Hm.
21:49 stmuk hoelzro: did you change the test scope?
21:49 moritz hoelzro: ok, then I won't sink moar time into this issue :-)
21:49 hoelzro you just need to check nread >= 0 in MoarVM, and if $chars.chars > 0 { #`(keep promise) } in the UDP test
21:49 hoelzro ;)
21:49 stmuk ah
21:50 diakopter ShimmerFairy: that should arguably return a Rat
21:50 hoelzro stmuk: are you in #moarvm?
21:50 zengargoyle joined #perl6
21:50 hoelzro I figured out why we get the second callback with nread=0
21:50 stmuk yes
21:50 ShimmerFairy diakopter: I would think it does :)
21:50 ShimmerFairy say (10**-1).WHAT
21:50 diakopter oh, yes.
21:50 ShimmerFairy m: say (10**-1).WHAT
21:50 camelia rakudo-moar b6373d: OUTPUT«(Rat)␤»
21:50 hoelzro apparently libuv uses nread=0 to indicate an empty datagram OR as a signal that the buffer is ok to discard
21:51 hoelzro moritz: the error handling surrounding that issue was definitely LTA
21:51 hoelzro I would like to improve that, if I have tuits
21:51 moritz hoelzro: well, at least I improved the Rakudo side just now :-)
21:51 hoelzro \o/
21:51 hoelzro moritz++
21:52 hoelzro does uv_strerror(0) return "Unknown system error"?
21:52 ShimmerFairy m: say 10**−1 # guess the problem :P
21:52 camelia rakudo-moar b6373d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nloFGMtYiO␤Missing required term after infix␤at /tmp/nloFGMtYiO:1␤------> 3say 10**7⏏5−1 # guess the problem :P␤    expecting any of:␤        prefix␤        term␤»
21:52 hoelzro I wish it did something like "actually it succeeded"
21:52 moritz hoelzro: yes, which rakudo now reports (instead of "unexplained error")
21:52 masak .u −
21:52 yoleaux U+2212 MINUS SIGN [Sm] (−)
21:52 * geekosaur sees an emdash...
21:52 geekosaur ah
21:52 * moritz sees an ambush
21:52 geekosaur too many kinds of middlebars, clearly
21:53 AlexDaniel .u -
21:53 yoleaux U+002D HYPHEN-MINUS [Pd] (-)
21:53 masak those two do look different on my screen...
21:53 hoelzro moritz: did you manage to coax a stack trace out of that issue?
21:53 masak enough that I notice
21:53 geekosaur hyphen em-dash en-dash minus-sign 5-bar ...
21:53 ShimmerFairy masak: not in my text editor, I only noticed when I tried removing one of them to see if the error moved, and then put it back and noticed my major mode colors the real - different :P
21:53 AlexDaniel geekosaur: still less than the number of spaces
21:53 zjmarlow joined #perl6
21:54 redhands left #perl6
21:54 moritz hoelzro: nope
21:54 AlexDaniel geekosaur: https://www.cs.tut.fi/~jkorpela/chars/spaces.html # wheeeee!
21:54 geekosaur sp[ae]cious
21:54 moritz hoelzro: it's not a real exception; it sends .quit to a Supply
21:56 RabidGravy are the docs being built?  https://github.com/perl6/doc/commit/48​83a73ab1f878bec5b09a35832d80d4812a11bf isn't in there?
21:58 Skarsnik still not updated it seems
21:58 ShimmerFairy good news:  postfix:(/m <?alpha>/)  is valid as a sub name. Bad news: it makes Perl 6 confused if you try to use it :P     (if you're curious, that funny name is to try and disambiguate the m in 42ms and in 42km)
21:58 yqt joined #perl6
21:59 stmuk RabidGravy: I think the docs process is still broken
22:00 lostinfog joined #perl6
22:02 kid51 joined #perl6
22:02 RabidGravy boo!
22:07 stmuk I could try 'no precompilation' a bit on tomorrow since I'm about to Stars Wars soon
22:07 stmuk maybe that would temporarily fix it
22:09 Zoffix joined #perl6
22:10 hoelzro ahhhh
22:10 moritz RabidGravy: http://doc.perl6.org/build-log/​build-2015-12-16T17:45+0000.log looks like "no"
22:11 moritz Cannot unbox a type object in method lookup at /home/doc.perl6.org/doc/lib/Per​l6/Documentable/Registry.pm:26
22:11 RabidGravy boo
22:13 firstdayonthejob joined #perl6
22:15 RabidGravy I'll try and look at it in the morning
22:20 dalek rakudo/nom: 33ac495 | TimToady++ | src/Perl6/Actions.nqp:
22:20 dalek rakudo/nom: subs should want their return value, duh
22:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/33ac495730
22:22 lichtkind good night
22:22 TimToady that fixes: sub a { "$_ $_" given 42 }
22:23 zjmarlow joined #perl6
22:27 ShimmerFairy I noticed that rakudo slows down to a ridiculous startup time when I've defined postfixes for all the SI prefixes, which shouldn't be too surprising :P . (I'm updating my rakudo now, but I don't envision things improving much)
22:28 colomon joined #perl6
22:29 Zoffix joined #perl6
22:38 Zoffix m: say (permutations 100).elems
22:38 camelia rakudo-moar 33ac49: OUTPUT«93326215443944152681699238856266700​490715968264381621468592963895217599993229​915608941463976156518286253697920827223758​251185210916864000000000000000000000000␤»
22:38 Zoffix 0.o
22:38 Zoffix it does that many permuations that fast? wow
22:39 Zoffix m: my @a = permutations 100; say @a.elems
22:39 Zoffix Ah, it's a lazy list? How does it know how many .elems it got in it?
22:39 camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
22:40 Zoffix Oh wait.. never mind me.
22:40 Zoffix I'm confused on what the first giant number represents then
22:40 Zoffix Or is it smart enough to compute the total number of permutations there is
22:41 TEttinger joined #perl6
22:41 masak advent blog post for tomorrow scheduled.
22:41 Zoffix masak++
22:41 masak you can pre-peek at it here: https://wordpress.com/post/pe​rl6advent.wordpress.com/4400 (if you have advent privs)
22:42 gfldex i peeked already and i learned something new
22:42 masak :)
22:42 RabidGravy :)
22:43 gfldex Zoffix: see https://github.com/rakudo/rakudo/blo​b/ba273ef183b98c1696816d260b1d69be3c​0eb59d/src/core/native_array.pm#L729
22:44 Zoffix gfldex, ah :) I see :)
22:46 Zoffix kinda makes me wonder why my @a = permutations 100; say @a.elems doesn't just call that method count-only
22:47 lucasb joined #perl6
22:47 Zoffix It's pretty cool that you can just point to more Perl 6 to explain the way Perl 6 works :) I expect this to allow for more people to contribute to the core
22:48 gfldex m: my $a = permutations 100; say $a.elems
22:48 camelia rakudo-moar 33ac49: OUTPUT«93326215443944152681699238856266700​490715968264381621468592963895217599993229​915608941463976156518286253697920827223758​251185210916864000000000000000000000000␤»
22:48 gfldex Zoffix: it's calling the wrong count-only
22:48 Zoffix I see
22:48 ShimmerFairy masak: six years worth of posts + lack of search bar :P
22:48 lucasb if permutations knows how many elements it has, then why not put it in combinations too? is that possible?
22:49 Zoffix lucasb, yes
22:49 lucasb grondilu: ^^ can you use your math skillz to add it to combinations? :)
22:49 Zoffix m: say (combinations 100).elems
22:49 camelia rakudo-moar 33ac49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yVpt45y_wO␤Calling combinations(Int) will never work with declared signature (\n, \k)␤at /tmp/yVpt45y_wO:1␤------> 3say (7⏏5combinations 100).elems␤»
22:50 masak ShimmerFairy: I opened up the "table of contents" label, and searched among the blog post titles.
22:50 raiph joined #perl6
22:51 RabidGravy masak++ # nice
22:51 ShimmerFairy masak: I'm not sure what a "label" is in this context, but nice to hear there's *some* way :)
22:51 masak ShimmerFairy: it's an internal post tagging system in WordPress.
22:51 ShimmerFairy ah
22:52 ShimmerFairy masak++ # good post :)
22:53 Zoffix m: my ($n1, $n2) = 15, 4; say (combinations $n1, $n2).elems; say ([*] 1..$n1)/(([*] 1..$n2)*([*] 1..($n1-$n2)))
22:53 camelia rakudo-moar 33ac49: OUTPUT«1365␤1365␤»
22:53 Zoffix gfldex, ^^ if you're going to ad it
22:53 Zoffix *add
22:54 Zoffix (if not, I could give it a go
22:54 Zoffix )
22:54 zjmarlow joined #perl6
22:54 Zoffix hm
22:55 Zoffix It's wrong tho
22:55 rurban joined #perl6
22:55 Zoffix m: my ($n1, $n2) = 1, 2; say (combinations $n1, $n2).elems; say ([*] 1..$n1)/(([*] 1..$n2)*([*] 1..($n1-$n2)))
22:55 camelia rakudo-moar 33ac49: OUTPUT«0␤0.5␤»
22:55 Zoffix m: my ($n1, $n2) = 1, 2; say (combinations $n1, $n2).elems; say (([*] 1..$n1)/(([*] 1..$n2)*([*] 1..($n1-$n2)))).Int
22:55 camelia rakudo-moar 33ac49: OUTPUT«0␤0␤»
22:55 gfldex Zoffix: i'm going to add my self to me bed. The code is all yours.
22:55 Zoffix \o/
22:55 Zoffix Sleep well :)
22:57 lucasb Zoffix++: I would appreciate if you added that :) After all, it seems it's just a single line of code: method count-only { ... } in List.pm
22:57 Zoffix Yeah, I'm on it
22:57 lichtkind joined #perl6
22:57 ShimmerFairy Huh, I get "  Could not find symbol '&bool'" in a precomp thing upon 'sudo make install' --- I'm gonna take a guess and say this has been reported before?
22:58 RabidGravy yeah but I thought it was fixed, it's possible a make clean was required
22:58 lichtkind are there known issues with chars. method?
23:00 ShimmerFairy RabidGravy: I'll try a make clean in rakudo then :)
23:00 cognominal .u «
23:00 yoleaux U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK [Pi] («)
23:00 ShimmerFairy RabidGravy: I haven't updated in several days, so it's very possible I still had/have problematic files around :)
23:01 RabidGravy :)
23:01 lichtkind my fault
23:02 lucasb I think simple arithmetic and geometric progression created with "..." could also be known the number of elements in it. But idk if it's possible in rakudo...
23:04 dalek rakudo-star-daily: 487b013 | coke++ | log/ (8 files):
23:04 dalek rakudo-star-daily: today (automated commit)
23:04 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/487b013d44
23:05 ShimmerFairy RabidGravy: still fails, but I'll clear out the relevant files in /usr/local, where the backtrace points for me
23:05 zjmarlow joined #perl6
23:05 masak 'night, #perl6
23:06 lichtkind good night masak
23:06 _nadim good night all
23:08 ShimmerFairy that worked, I just needed to delete /usr/local/share/perl6/ :)
23:10 zjmarlow Hi.  I was wondering why the following doesn't work (besides the restricted setting here -- it doesn't work with my copy of perl6 on the moarvm compiled yesterday): my $rx = rx/(\d\d)/; my $file = IO::Path.new("/path/file12"); if $file.basename ~~ $rx { say "num: $0"; }
23:11 zjmarlow The match succeeds, but the output is Use of Nil in string context  in block <unit> at -e:1
23:11 zjmarlow num:
23:12 zengargoyle /mark
23:12 Zoffix /mark
23:12 Zoffix oops
23:12 Zoffix What's /mark?
23:13 ShimmerFairy Zoffix: I'm going to guess the red line you get in things like Hexchat
23:14 Zoffix heh
23:15 lucasb m: my $basename = 'file12'; my $rx = rx/(\d\d)/; if $basename ~~ $rx { say "num: $0" }
23:15 camelia rakudo-moar 33ac49: OUTPUT«num: 12␤»
23:15 lucasb zjmarlow: I don't know the IO API very well... maybe it's something with IO::Path basename?
23:15 snarkyboojum joined #perl6
23:15 Zoffix masak++ # It goes without saying that this is a situation up with which Perl 6 will not put
23:16 Zoffix :)
23:18 Zoffix huh
23:18 Zoffix m: my $s = '12345'; say $s ~~ /^  ** 5 $/;
23:18 camelia rakudo-moar 33ac49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2HXGfMJJzt␤Can only quantify a construct that produces a match␤at /tmp/2HXGfMJJzt:1␤------> 3my $s = '12345'; say $s ~~ /^  ** 57⏏5 $/;␤»
23:18 Zoffix m: my $s = '12345'; say $s ~~ /^ . ** 5 $/;
23:18 camelia rakudo-moar 33ac49: OUTPUT«「12345」␤»
23:18 Zoffix oh, I thought there was magic.
23:19 Zoffix masak, ^ seems there's an error in your post code
23:21 lucasb In the last TimToady commit, he used "elsif ... || False { ... }". I wonder why the "|| False" was needed there...
23:22 masak Zoffix: oh -- another HTML angle brackets casualty. thanks for catching ahead of time. Zoffix++
23:23 ShimmerFairy seriously, we should consider an alternate blogging platform for the next advent o_-
23:23 Zoffix yeah
23:23 masak Zoffix: fix'd.
23:24 lucasb It's a misfortune that 6 years of content is locked in wordpress database. Maybe there is someway to export it?
23:24 masak surely, yes.
23:24 masak the ambitious part of me is thinking "well, we have a year to implement the parts we need for an advent blog engine, in Perl 6"
23:25 ShimmerFairy there's always a bunch of wget-ing the pages, if nothing else :)
23:25 Zoffix m: my $x = 0; repeat until $x == 5 { say $x++ }
23:25 camelia rakudo-moar 33ac49: OUTPUT«0␤1␤2␤3␤4␤»
23:25 Zoffix way cool
23:25 masak but I also want to say that it was my fault that the angle-brackets thing happened. because I was writing (and pasting) in plain HTML for some reason.
23:25 Zoffix masak++ # I didn't know about "repeat" before your post :)
23:25 ShimmerFairy masak: I thought of a Perl6-driven version of Wordpress before, call it "October" (and maybe then get the "November" thing going again :P)
23:25 masak I should really have used my q&d markdown-to-broken-WordPress-HTML converter instead :)
23:26 masak ShimmerFairy: clearly a blogging engine should be called "December" ;) we don't want to give the impression of going backwards in time.
23:26 Zoffix :D
23:26 Hotkeys Zoffix: I disapprove of your churchill reference
23:26 ShimmerFairy masak: the catch-22 there is that plain html mode is often the only/best way of writing posts, I've found. (At the very least it doesn't feel as fragile or "I don't know what'll actually happen in HTML mode)
23:26 Hotkeys with the preposition nonsense
23:27 masak but (even more relevant), you have less than a month to call any Perl 6 product "December" -- after release, the joke is defunct
23:27 Zoffix Hotkeys, but the preposition nonsense is not an actual rule.
23:27 ShimmerFairy masak: I thought "December" was for P6, and "November" was named to take the closest available month :P
23:27 Hotkeys I know
23:27 Zoffix :)
23:27 Hotkeys that's why I disapprove
23:27 masak ShimmerFairy: my ideal (which I was only reminded of just now) is writing in Markdown, and then converting.
23:27 dalek tablets: 4cc23d5 | (Herbert Breunung)++ | docs/appendix-e-exciting.txt:
23:27 dalek tablets: repare bitrot in examples
23:27 dalek tablets: review: https://github.com/perl6/tablets/commit/4cc23d548f
23:28 ShimmerFairy masak: my ideal is being able to write in the superior Pod 6, but that means I have to work on SUPERNOVA more often than "rarely" :)
23:28 masak ShimmerFairy: no, the name "November" (back in 2008) was an oblique way of saying "there's some time left until Christmas just yet"
23:28 masak which, in retrospect, there was
23:29 Hotkeys is the release target still the 17th or is it going to be christmas as it should be?
23:29 Zoffix m: say (combinations 4000, 2).elems
23:29 diakopter giggle
23:29 masak Hotkeys: the 17th is for the compiler.
23:29 camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
23:29 masak really 'night
23:29 Hotkeys ah
23:30 Hotkeys what is christmas then
23:30 Zoffix Hotkeys, Perl 6 the language spec
23:30 Hotkeys oic
23:31 Zoffix m: my ( $n, $k ) = 4000, 2; say (  ([*] 1..$!n) / (([*] 1..$!k) * ([*] 1..$!n-$!k))  ).Int; say now - INIT now
23:31 camelia rakudo-moar 33ac49: OUTPUT«5===SORRY!5=== Error while compiling /tmp/k_z99HUpii␤Variable $!n used where no 'self' is available␤at /tmp/k_z99HUpii:1␤------> 3( $n, $k ) = 4000, 2; say (  ([*] 1..$!n7⏏5) / (([*] 1..$!k) * ([*] 1..$!n-$!k))  )␤»
23:31 Zoffix m: my ( $n, $k ) = 4000, 2; say (  ([*] 1..$n) / (([*] 1..$k) * ([*] 1..$n-$k))  ).Int; say now - INIT now
23:31 camelia rakudo-moar 33ac49: OUTPUT«7998000␤0.3285333␤»
23:31 Zoffix m: my ( $n, $k ) = 4000, 2; say (  combinations $n, $k ).elems
23:32 Zoffix k.. looks like my fix is sane
23:32 camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
23:35 Zoffix Submitted my PR to make (combinations blah blah).elems compute fast same as (permutations blah).elems: https://github.com/rakudo/rakudo/pull/635/files
23:36 Zoffix Time for some gaming \o/
23:40 [Coke] the compiler release is probably also on xmas.
23:51 zengargoyle Zoffix: /mark is https://github.com/mjholtkamp/irssi-trackbar -- marks a position and lets you jump back to it later to catchup on backlog.
23:56 Psyche^ joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo