»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by masak on 28 November 2015.
00:00 Psyche^ left
AlexDaniel autarch: I wish browsers had better defaults 00:01
what's the point of having acid blue links if everyone is changing it. Perhaps offer a better default, right? 00:02
autarch: another common mistake is to change the font color of inputs but forget to change the background color
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?
oops
I meant #111
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:04
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
or just don't touch it at all and let my OS handle it. That's OK too
00:10 firstdayonthejob left
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
timotimo in this case i'm most likely writing to a filesystem
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
RabidGravy right, went with my strategy of wrapping up at midnight
diakopter goes to read
RabidGravy perl6advent.wordpress.com/2015/12/...ve-perl-6/
timotimo reads
00:16 AlexDaniel left, AlexDaniel joined
AlexDaniel RabidGravy: “. Most” three spaces :) 00:16
diakopter well it's certainly entertaining
AlexDaniel RabidGravy: I don't know why but multiple spaces instead of one make me uncomfortable 00:17
perhaps I should not care about such things
RabidGravy I learned to type on a real typewriter, we've done this before 00:21
timotimo "infortunately" :) 00:22
nice post. RabidGravy++ 00:23
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:24
fixed the typo, I hadn't noticed the red squiggly line for that one 00:26
diakopter RabidGravy: so did I (real typewriter)!
I type very loudly
RabidGravy :)
AlexDaniel RabidGravy++ # very motivational post
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
00:27 leont joined 00:28 BenGoldberg joined 00:32 Peter_R left, patrickz left 00:34 TEttinger joined 00:47 joeatwork joined
joeatwork Say folks - does anybody know how to spell "perl -i~ -pe" in perl6? 00:51
(Or in rakudo/perl6?)
RabidGravy it doesn't do -i as yet but -pe works 00:53
joeatwork Sweet! Is -i in the cards?
(The "yet" bit is great!) 00:54
Thanks for your help!
RabidGravy i.e ls | perl6 -pe ' say "$_ *"' works as expected 00:55
joeatwork Perfect! 00:56
00:56 logiz joined
RabidGravy dunno if -i is on anyone elses radar 00:57
diakopter someone explain -i
RabidGravy it does -p -n -e pretty much as you'd expect
-i does "inplace" editing
AlexDaniel diakopter: change file inplace 00:58
diakopter: you can't just pipe into the same file that you are reading
timotimo yeah, you need sponge for that
diakopter oh
RabidGravy so "perl -pie 's/foo/bar/g' bam" will change all the foo into bar in the file bam
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 leont left
RabidGravy there's sed, awk and perl 5 ;-) 01:00
01:00 skids joined 01:01 n0tjack left
AlexDaniel and no Perl 6. I don't like it 01:01
is it a known issue?
or maybe someone should file it?
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}}”
that's from S19
timotimo ah 01:03
oh, bedtime for time
timo
joeatwork It seems like something you could write a script for - I use it a whole lot as an editor thing
find . ... | xargs perl -i~ -pe 's/foo/bar/g'
But it's not something I have any right to expect from a programming language :) 01:04
AlexDaniel well, there's 「sponge」 but…
joeatwork What's sponge?
AlexDaniel a workaround for -i
01:04 yeahnoob joined
joeatwork googles around... 01:04
RabidGravy bed time for me anyway 01:05
toodlepip
AlexDaniel it's in 「moreutils」 if you are using Debian
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?
BenGoldberg tries to imagine a -i option for the C programming language ;) 01:07
joeatwork :)
AlexDaniel joeatwork: perl6 -pe 'smth' < file1 | sponge file1 # I think 01:08
joeatwork Beauty!
Giving it a try now
Works a treat! 01:09
Perfect
Thanks for your help! 01:10
01:10 RabidGravy left
AlexDaniel maybe we can put that up somewhere. Or maybe we just have to implement -i 01:10
01:10 pippo_ left
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.
joeatwork For reference, your command line worked pretty much exactly
AlexDaniel joeatwork: can you omit < ? 01:11
joeatwork Trying now
But I'm not sure how that'd work...
AlexDaniel joeatwork: it works in Perl 5 I think 01:12
joeatwork cat sponger.dot | perl6 -pe 's:g/node/BJORK/' | sponge sponger.dot
perl5 read args from the command line
AlexDaniel basically it is smart enought to understand that it's the input (because -e is given)
enough*
joeatwork Ohh!
Trying now!
SWEET! 01:13
perl6 -pe 's:g/BJORK/zork/' sponger.dot | sponge sponger.dot
Totally works great!
AlexDaniel nice :)
01:19 n0tjack joined 01:23 colomon left, colomon joined, n0tjack left
dalek kudo/nom: ef8929a | TimToady++ | src/Perl6/Actions.nqp:
make list assoc infixes work again

This fixes both the defor and the ==> regressions.
01:25
01:29 glaukommatos joined, FreezerburnV joined
FreezerburnV Evenin’ 01:30
01:31 petercommand joined, petercommand left, petercommand joined
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 geekosaur left
AlexDaniel m: say ’inverted!‘ 01:33
camelia rakudo-moar ef8929: OUTPUT«inverted!␤»
01:33 geekosaur joined 01:35 BenGoldberg left, Ben_Goldberg joined, n0xff left
TimToady m: 1 orelse 2 orelse 3 01:39
camelia ( no output )
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.
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:42 geekosaur left 01:44 geekosaur joined, geekosaur left 01:46 geekosaur joined 01:47 xpen joined 02:01 BenGoldberg joined 02:02 Ben_Goldberg left
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:08
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:10
02:12 Actualeyes joined
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:13
skids FreezerburnV: you should be able to make .moarvms using something like perl6 --target=mbc --output=/tmp/ttt.pm6.moarvm /tmp/ttt.pm6 02:17
FreezerburnV skids: Awesome, thanks! 02:19
02:23 joeatwork left 02:26 adrianchong joined 02:27 adrianchong left 02:28 Sqirrel left 02:34 Zoffix joined
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␤%DEPRECATIONS␤Failure␤NQPCursorRole␤blob16␤blob32␤blob64␤blob8␤buf16␤buf32␤buf64␤buf8␤»
02:45 Zoffix left 02:50 kaare_ joined 02:54 woodruffw is now known as yossarian-bot 02:56 vendethiel joined 02:57 Ben_Goldberg joined, yossarian-bot is now known as woodruffw 02:58 BenGoldberg left 03:00 snarkyboojum_ joined, geekosaur left 03:02 BenGoldberg_ joined 03:04 Ben_Goldberg left 03:12 AndyDee left 03:15 snarkyboojum_ left 03:19 vendethiel left 03:20 snarkyboojum_ joined 03:22 kid51 left 03:30 noganex joined 03:31 Guest28147 is now known as konobi 03:32 noganex_ left 03:39 Sqirrel joined, kaare_ left 03:49 BenGoldberg joined, FreezerburnV left 03:50 BenGoldberg_ left 03:59 snarkyboojum_ left 04:00 lucs left
dalek kudo/nom: 083e070 | TimToady++ | src/Perl6/Actions.nqp:
propagate wanted thru callstatic as well as call
04:02
kudo/nom: 2326cc3 | TimToady++ | src/Perl6/Actions.nqp:
abbreviate want pedigrees
kudo/nom: a5bf8f5 | TimToady++ | src/Perl6/Actions.nqp:
propagate want into nested blocks properly

The bare block as the final statement in another block should get the same context as the outer block.
TimToady [Coke]: with that, your run should be pretty clean now 04:03
04:03 n0tjack joined
TimToady notes that the warning from S02-literals/subscript.t is actually correct 04:03
lives-ok({ all(@newval2) < any(@oldval); all(@newval1) > all(@oldval) }, "parses correctly, second statement is true"); 04:04
the < really is in sink context
04:10 n0tjack left 04:18 geekosaur joined 04:20 labster joined 04:24 dwarring joined
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:29
04:30 labster left 04:31 yqt left 04:33 labster joined 04:48 cpage_ left 04:49 vividsnow joined 04:54 labster left 04:56 BenGoldberg left 04:57 regreg left 05:09 skids left
dalek ast: 780f5bf | lizmat++ | S04-declarations/my.t:
Unfudge now passing tests
05:11
05:21 labster joined
dalek kudo/nom: 99294ba | TimToady++ | src/Perl6/Actions.nqp:
want feed ops wantonly
05:24
kudo/nom: 3a82a2e | TimToady++ | src/Perl6/Actions.nqp:
want lhs of assignment and binding a little harder
05:26 cpage_ joined 05:35 molaf joined 05:43 molaf left 05:45 ajs_ left 05:47 inokenty left 05:53 khw left 06:03 krunen left 06:05 inokenty joined, khw joined 06:07 n0tjack joined 06:11 n0tjack left 06:24 japhb left 06:26 japhb joined
dalek kudo/nom: a67c726 | TimToady++ | src/Perl6/Actions.nqp:
want insides of s/// and ~~
06:41
06:55 geraud left 06:57 _nadim joined 07:00 CIAvash joined, n0tjack joined
dalek kudo/nom: df82f43 | TimToady++ | src/Perl6/Actions.nqp:
want macro arguments
07:03
TimToady I think that pretty much puts a ribbon on the GSR now 07:04
07:05 n0tjack left 07:10 adu joined 07:16 geekosaur left 07:21 CIAvash left 07:22 balazs left 07:23 CIAvash joined 07:28 go|dfish joined 07:34 quester joined 07:35 dwarring left 07:37 firstdayonthejob joined 07:39 b7j0c joined
b7j0c p6: True ~~ Int; 07:40
camelia ( no output )
b7j0c p6: say True ~~ Int;
camelia rakudo-moar df82f4: OUTPUT«True␤»
b7j0c p6: say True ~~ Bool; 07:41
camelia rakudo-moar df82f4: OUTPUT«True␤»
b7j0c p6: say 1 ~~ Int;
camelia rakudo-moar df82f4: OUTPUT«True␤»
b7j0c p6: say 1 ~~ Bool;
camelia rakudo-moar df82f4: OUTPUT«False␤»
b7j0c p6: say True + True;
camelia rakudo-moar df82f4: OUTPUT«2␤»
TEttinger what's the S in GSR?
b7j0c doesn't that seem wrong?
True + True = 2? 07:42
Juerd m: say True.WHAT
camelia rakudo-moar df82f4: OUTPUT«(Bool)␤»
Juerd m: say +True
camelia rakudo-moar df82f4: OUTPUT«1␤»
TEttinger Good Samaritan Rap
Juerd b7j0c: + forces both operands to numbers, and in numeric context, True is 1.
Compare:
m: say True ~ True
camelia rakudo-moar df82f4: OUTPUT«TrueTrue␤»
Juerd ~ forces both operands to strings, and in string context, True is 'True'
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
b7j0c if i have `method foo(Int $n)`, i should not be able to get lives-with { ...foo(True); } 07:45
Juerd TEttinger: Sink
b7j0c: Why not?
b7j0c because a Bool is not an Int?
TEttinger mm. is that what affected this type cast-type stuff testing with camelia?
Juerd b7j0c: Are they not? 07:46
m: say Bool ~~ Int
camelia rakudo-moar df82f4: OUTPUT«True␤»
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
nine b7j0c: that's by design
Juerd has no opinion
Juerd never cared about the lack of "proper" true and false in Perl 5 either :)
07:48 zakharyas joined
b7j0c go knows better: 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
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 :)
Oh, by the way, if True + True == 2 bothers you, consider: 07:50
m: multi sub infix:<+> (Bool $a, Bool $b) { return $a || $b }; say True + True;
camelia rakudo-moar df82f4: OUTPUT«True␤»
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
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.
b7j0c i still like perl6 though :)
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 adu left
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
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␤␤»
nine b7j0c: if your code really cannot deal with Bools, you can still use this ^^^
07:56 patrickz joined
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
Juerd I do wonder why it's important to have Bool *not* be an Int, for your program 07:57
Is this a purely academic endeavour or do you have some real use case that needs it?
b7j0c because i want my method to take integers
its not "academic", its type safety
Juerd Bools are integers 07:58
Bool is an enum, enums are integers
b7j0c i think you might want to rephrase that to "camelia believes bools are integers"...it is clearly not a universal truth!
Woodi if Bools are ints then multidispatch on Bool don't work ?
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
nine m: multi foo(Bool $i) { say "Bool!"; }; multi foo(Int $i) { say "Int!"; }; foo(1); foo(True);
camelia rakudo-moar df82f4: OUTPUT«Int!␤Bool!␤»
moritz Woodi: everything is Mu. Does that mean multidispatch on everything doesn't work?
Woodi b7j0c: you can put multi sub/method with Bools as arguments
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
moritz b7j0c: but why reject Bool at all?
b7j0c seems to violate my idea of type safety
moritz m: say 42 * True 08:01
camelia rakudo-moar df82f4: OUTPUT«42␤»
moritz b7j0c: type safety means that you protect your code from input it can't work with
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. ;)
moritz b7j0c: but if your code can work with Int, it *can* work with Bool
Woodi probably problem is typesystem vs real reality...
08:02 adu joined
moritz b7j0c: don't go out of your way to make your user's live harder 08:02
08:02 n0tjack joined
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" ;)
AlexDaniel m: sub foo(Int $x) { say $x }; foo ❶ # oh noes! It does not look like an Int, why does it accept it?????
camelia rakudo-moar df82f4: OUTPUT«1␤»
moritz .u ❶ 08:03
yoleaux U+2776 DINGBAT NEGATIVE CIRCLED DIGIT ONE [No] (❶)
moritz m: say unival '❶'
camelia rakudo-moar df82f4: OUTPUT«1␤»
Juerd m: say ½ + ¾
camelia rakudo-moar df82f4: OUTPUT«1.25␤»
Woodi atually Int cast to Bool is common but in other way it is strange...
b7j0c haha maybe camelia's unique approach to typing will take a little getting used to :)
AlexDaniel Woodi: not really, it's pretty much typical 08:04
08:04 adu left
Juerd b7j0c: I wonder why you say 'camelia' instead of 'Perl 6', but I like it. 08:04
08:04 patrickz left
Woodi AlexDaniel: I mean: hard to thing about use case... not about easy of thinking... 08:04
b7j0c Juerd: a cute butterfly seems more forgivable 08:05
Juerd Aww
08:05 FROGGS joined 08:06 n0tjack left
AlexDaniel b7j0c: I don't really see any problem with type safety because it is not going to cause any errors 08:07
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?
b7j0c values beyond the defined range 08:09
Juerd b7j0c: 0 and 1 are quite normal integers
b7j0c but True is not 1, True is True
Juerd Well, that's where you're not describing Perl 6. 08:10
b7j0c i understand :)
Juerd I'd say "that's where you're wrong", but you may be right in other contexts.
True actually is 1.
m: say True == 1
camelia rakudo-moar df82f4: OUTPUT«True␤»
_nadim Good morning
Juerd m: say True == 2
camelia rakudo-moar df82f4: OUTPUT«False␤»
Woodi hi _nadim
masak Juerd: I disagree.
_nadim Woodi: :)
masak (morning, #perl6)
Juerd As a number, True is 1 in Perl 6. As a string it's "True".
masak Juerd: True *numifies* to 1, it's not that it *is* 1. 08:11
m: say True === `
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␤»
masak m: say True === 1
camelia rakudo-moar df82f4: OUTPUT«False␤»
Juerd Heck, False as a string is "False", which in turn is true!
masak Juerd: strangely enough, that doesn't bother me much.
but yeah, it does mean that stringification of bools isn't a proper functor.
08:11 darutoko joined
Juerd masak: Well, I explain the same thing with different words, using "is" more freely than ===. 08:12
m: say so ~False
camelia rakudo-moar df82f4: OUTPUT«True␤»
masak that's why I disagree :)
True is not an integer, not in Perl 6
Juerd masak: It is. It's an enum, and enums are integers.
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?
Juerd m: enum NotBool <Tralse Fue>; say Fue ~~ Int;
camelia rakudo-moar df82f4: OUTPUT«True␤»
Juerd Feel free to read any occurrence of 'is' as 'works as if it were'
Woodi _nadim: maybe add role to Match object somehow ? 08:14
_nadim then I have the ugly code that works already
masak Juerd: ok -- conceded.
was that FROGGS++ who finally made that work? or timotimo++? 08:15
Juerd # class Bool is Int {
Bool.HOW.set_base_type(Bool, Int);
Just saying... that use of 'is' isn't all that weird :P
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
moritz there are Str-based enums too, no?
m: enum Flurb a => 'x', b => 'y'; say Flurb.^mro; say a
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␤␤»
FROGGS masak: what exactly?
masak FROGGS: making Bool ~~ Int
moritz m: enum Flurb (a => 'x', b => 'y'); say Flurb.^mro; say a
camelia rakudo-moar df82f4: OUTPUT«((Flurb) (Str) (Cool) (Any) (Mu))␤x␤»
Woodi Juerd: but implementation usually wins, like gravity ;) 08:17
FROGGS masak: that was nine++ AFAIK
masak FROGGS: oh, or making Bool be proper enums, rather.
oh!
nine++
nine :)
FROGGS and since Bool is an enum now we can finally add things to it? 08:18
like, say, FileNotFound
FROGGS throws in thedailywtf.com/articles/What_Is_Truth_0x3f_ as a reference 08:19
Juerd FROGGS: Ooh, there True is 0 and False is 1
DrForr True === Truthy?
FROGGS Juerd: shell like :o)
moritz Juerd: like with shell return codes :-) 08:20
AlexDaniel m: say +?~?+?~False
camelia rakudo-moar df82f4: OUTPUT«1␤»
AlexDaniel m: say +?~?+?1 08:21
camelia rakudo-moar df82f4: OUTPUT«1␤»
AlexDaniel m: say ?+?~?+?1
camelia rakudo-moar df82f4: OUTPUT«True␤»
AlexDaniel m: say ?~?+?~?+?1
camelia rakudo-moar df82f4: OUTPUT«True␤»
AlexDaniel m: say +?~?+?~?+?1
camelia rakudo-moar df82f4: OUTPUT«1␤»
AlexDaniel it's so fun!
FROGGS *g*
b7j0c well its True that this has been illuminating and entertaining. bye for now! 08:22
08:22 zakharyas left, b7j0c left 08:23 zakharyas joined, psy_ left
_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␤␤»
_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␤␤»
_nadim ^^ is there a way to know if there is something in hash (which is constructed on demand it seems) 08:28
moritz m: my $m = 'a' ~~ m:g/(a)/ ; say $m.^name 08:29
camelia rakudo-moar df82f4: OUTPUT«List␤»
moritz _nadim: well, with :g you get a List
m: my @m = 'a' ~~ m:g/(a)/ ; say @m[0].hash<a>:exists 08:30
camelia rakudo-moar df82f4: OUTPUT«False␤»
moritz ... and (a) is a positional capture, so the hash (which returns named captures) is empty anyway
_nadim m: my $m = 'aa' ~~ m:g/(a)/ ; $m.hash.elems.say ; 08:31
camelia rakudo-moar df82f4: OUTPUT«1␤»
_nadim ^^ note that the string to match is 'aa'
Juerd
_nadim all I want is to know if hash has soething in it
moritz _nadim: that doesn't change anything what I said
_nadim neither does it change anything to what I said. 08:32
AlexDaniel m: “hello”.length.say
camelia rakudo-moar df82f4: OUTPUT«Method 'length' not found for invocant of class 'Str'␤ in block <unit> at /tmp/dCTZ0D4Q9_:1␤␤»
dalek kudo/nom: eac2b86 | TimToady++ | src/Perl6/Optimizer.nqp:
also speed up non-sunk ++, as well as --

Turns out that, even in non-sunk context, turning $++ into ($i = $i + 1) - 1 is a whole lot faster than allocating a temp.
AlexDaniel doc.perl6.org/type/Str#method_length
moritz _nadim: then I still don't understand what you're trying to do
AlexDaniel what am I missing?
moritz AlexDaniel: .chars
AlexDaniel ahhhh
hahahaha
_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
moritz _nadim: but you can check $m.elems before even constructing the hash
_nadim moritz: just trying to find out if hash has eleements
moritz _nadim: you can also catch exceptions if failing to create a hash is fine for you
_nadim moritz: I try that
moritz m: my $m = 'aa' ~~ m:g/(a)/ ; say $m.elems 08:34
camelia rakudo-moar df82f4: OUTPUT«2␤»
moritz _nadim: ^^ there
_nadim I prefer to keep exception out of it if possible
08:34 ShimmerFairy left 08:35 firstdayonthejob left
_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
camelia rakudo-moar df82f4: OUTPUT«False␤True␤»
masak _nadim: ^
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␤»
TimToady that will be a couple orders of magnitude faster
m: loop (my int $i = 10000000; $i > 0; $i--) {}; say $i; say now - INIT now
camelia rakudo-moar df82f4: OUTPUT«0␤4.5384695␤»
TimToady so will that 08:37
moritz TimToady++
08:37 abraxxa joined
Juerd What is sink, sunk, etc? Which document should I read? 08:38
moritz Juerd: sink = void
TimToady it's just void context like in Perl 5
abraxxa Good morning!
yoleaux 15 Dec 2015 17:01Z <Skarsnik> abraxxa: I have the same error with is-deeply, I think Num does not work correctly
Juerd Oh, haha :)
moritz but we didn't like the kitchen void
abraxxa Skarsnik: thanks for the info!
TimToady and we wanted a verb
_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
_nadim abraxxa: morning
Juerd TimToady: Aw, we could have voided :)
Juerd likes 'sink' now that he knows what it's about.
08:39 mohae_ joined
TimToady most of the rest of the test failures are related to line numbers going sour in callframe, looks like 08:40
08:40 mohae left
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?
TimToady which is not my problem, since I'm going to be about an hour ago :)
_nadim moritz: yes
TimToady *bed
moritz _nadim: so, check .elems on the list.
Juerd TimToady: Welterusten :)
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?
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
ok, elements on each list-element
moritz _nadim: no; but calling .hash on the list of posittionals won't ether
*either
and a grammar isn't called with :g, so I don't understand the point of your example at all 08:43
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:44
_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
camelia rakudo-moar df82f4: OUTPUT«「a」␤ alpha => 「a」␤1␤»
moritz _nadim: but there isn't nothing in the hash; the hash never existed
08:45 RabidGravy joined, rindolf joined
moritz _nadim: and that's a big difference from "nothing in the hash" 08:45
_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
_nadim and if there was a match with odd number of elements , one gets the error message
moritz _nadim: no
_nadim: you only get that when cou call .hash on an odd-sized list 08:47
and it's doesn't mattter much if the elements of that list contain Match objects or not
but calling $/.hash on an empty, successfull Match doesn't give an error 08:48
m: say '' ~~ /<alpha>*/; say $/.hash
camelia rakudo-moar df82f4: OUTPUT«「」␤Map.new((:alpha([])))␤»
moritz m: say '' ~~ / '' /; say $/.hash
camelia rakudo-moar df82f4: OUTPUT«「」␤Map.new(())␤»
08:49 ShimmerFairy joined
moritz m: say '' ~~ / '' /; say $/.hash.elems 08:50
camelia rakudo-moar df82f4: OUTPUT«「」␤0␤»
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␤»
TimToady m: loop (my int $i = 10000000; $i > 0; $i--) {}; say $i; say now - INIT now
camelia rakudo-moar eac2b8: OUTPUT«0␤0.0618409␤»
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␤»
TimToady huh
m: loop (my int $i = 10000000; $i; $i--) {}; say $i; say now - INIT now
camelia rakudo-moar eac2b8: OUTPUT«0␤1.4391514␤»
TimToady I bet that's boxing $i to test it
well, zzz & 08:53
masak zzz well, TimToady 08:54
RabidGravy morning! 08:55
_nadim morning
Woodi TimToady++ 08:56
# however it is madness that native types are slower... ;) 08:57
_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
Woodi _nadim: maybe using .perl on Match could help ? except .perl gives string... 09:00
moritz proper debugging helps
instead of trying to blame the compiler or language
_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
RabidGravy: congratulations on it, you really provide a nice overview
El_Che _nadim: it took me while a while to get named mateches/nested matches/etc right 09:02
_nadim: now waiting on DrForr's rewrite of the grammars tutorial to get that :)
Woodi El_Che: how you "look" what's in objects ?
RabidGravy hahainternet, cheers :) 09:03
El_Che Woodi: let me post an example for the code I am writing at the moment
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:04
_nadim timotimo: example is my bad. the problem is somewhere else 09:05
moritz: nopaste.linux-dev.org/?884363
09:05 g4 joined, g4 left, g4 joined
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
masak RabidGravy++ # perl6advent.wordpress.com/2015/12/...ve-perl-6/
09:06 psy_ joined
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
_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
_nadim timotimo: yes he did :) the "real" code here nopaste.linux-dev.org/?884363
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
09:08 zakharyas left
timotimo why would a regex match have a named capture store a Nil in it? 09:08
|Tux| ===SORRY!===
Could not find Test in:
/pro/3gl/CPAN/rakudobrew/.panda-work/1450256669_1/lib
t/01-basic.t ..
Dubious, test returned 1 (wstat 256, 0x100)
masak RabidGravy: well, it's your post :) just noticed it and felt it was an unexplained deviation. 09:09
I'm not a native speaker, but "stop worrying" sounds more natural to me 09:10
masak stops bikeshedding :)
hahainternet it should be blue masak god!
:D
i am a native speaker, and it should technically be 'worrying'
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
_nadim timotimo: github.com/nkh/P6-Data-Dump-Tree.git t/12_xxxx.t has the Grammar example and other examples 09:14
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
_nadim: and if $a.hash dies, please show me how you call the method 09:16
_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:18
moritz _nadim: ah, because you call .defined on it 09:19
_nadim: an empty hash is still defined
09:20 n0tjack joined
Begi Is there a free hosting offer for Perl 6 code ? 09:22
I'd like to use Bailador for one of my website 09:23
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
hahainternet oh do we? who pays for that?
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
i may hammer my head against my c code from yesterday, though
as that's at least only in one file %)
09:25 n0tjack left
Begi moritz : I create a small site for a school, can I use this server ? 09:26
moritz hahainternet: the hardware was donated from the community, and my employer sponsors the colo in its own data center 09:27
Begi: sure
Begi: please tell me your desired username
Begi "Emeric", is it possible ?
hahainternet moritz: oh very nice, i could probably arrange the same with my employer
but unfortunately for most things, i'm my own employer
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 !
moritz Begi: well, I'll lower-case it
hahainternet: well yes, more hardware for continuous integration stuff would help 09:29
hahainternet moritz: interesting, i'm buying a new server from SYS in january 09:30
i'll buy two instead
moritz hahainternet: SYS?
hahainternet moritz: 'so you start'
OVH's startup brand in the EU 09:31
very nice servers for very low prices
www.soyoustart.com/en/essential-servers/
DrForr I really wish I felt that Bailador was ready for prime time, I'd put blogs.perl.org on it.
09:31 yeahnoob left
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
they're pretty good! 09:32
masak Begi: I seem to recall there was an unofficial www.heroku.com/ middleware for Perl 6.
timotimo DrForr: oh, you run blogs.perl.org?
masak Begi: yep: github.com/pnu/heroku-buildpack-rakudo
Begi: use at your own risk, of course, but... definitely a nice option 09:33
DrForr I will officially as of January, yes.
Begi masak : it could be enough for me, I'll try 09:34
09:35 Hameed_ joined, Hameed_ left
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:36
09:38 AlexDaniel left 09:44 labster left
timotimo an amazon EC2 t2.nano instance doesn't have enough ram to run most interesting perl6 workloads :| 09:49
RabidGravy that sucks 09:50
timotimo 512 megabytes 09:51
IIUC that has to hold a linux, too
El_Che Woodi: example of nested named captures as mentioned: paste.ubuntu.com/14048213/ 09:52
09:54 zakharyas joined, maziar joined, maziar left, labster joined 09:56 labster left
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 :)
RabidGravy m: say $*OUT.native-descriptor 10:01
camelia rakudo-moar eac2b8: OUTPUT«1␤»
El_Che Woodi: well, it took me some trial and error to get to the nested named captures :)
Woodi El_Che: maybe you have grammar for ldif ?
RabidGravy Hmm, that's odd,
[jonathan@coriolanus ecosystem]$ perl6 -e 'say $*OUT.native-descriptor'
11
Woodi I tried to make OpenLDAP bindings but stopped on search params, some magic C struct there... 10:02
10:02 maziar joined
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:02
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 ?
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, brrt joined
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)
Woodi El_Che: so it's probably stuff above ldap db/protocol... 10:07
El_Che Woodi: yes, by default
Woodi: I start from a slapcat dump
Woodi: transform it to make diffs between the nodes and report the differences if any 10:08
Woodi El_Che: replication not work ?
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:09
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
10:10 espadrine joined
Woodi El_Che: maybe just new entries differ, not yet synchronised ? 10:11
err, new modifications all over db :) 10:12
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:13
Woodi: like said, it's just I failsafe to detect micro differences in really border cases (as acknowledged in de openldap docs) 10:14
Woodi: I've been there, hence this program
Woodi El_Che: yes, probably I need refresh that...
El_Che Woodi: I ended changing the architecture from multi-master to maste+slaves+slaves-chain-to-master-for-password-related-changes 10:15
10:15 smls joined
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: github.com/niner/Apache-To-Nginx/b.../Parser.pm github.com/niner/Apache-To-Nginx/b...Actions.pm
El_Che thx nine, I'll review it
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.
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
10:17 quester left
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
totally not related to 6.c ;) 10:18
El_Che Woodi: whell, maybe related
Woodi El_Che: I know :)
El_Che the perl-ldap libraries are the golden standard of ldap language libraries
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;
El_Che nine: make, made, head explodes :) 10:19
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 rurban left
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␤»
nine El_Che: ^^^ this is it in a nutshell
El_Che: .made is just a synonym for .ast. make is just $/.ast =
moritz one small thing to add: missing action methods are not errors 10:22
just nothing happens
nine m: grammar Foo { rule TOP { .* }; }; class FooAction { method TOP($/) { $/.ast = 1; }; }; Foo.new.parse("whatever", :actions(FooAction.new)).ast.say;
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␤␤»
smls TimToady: I found another useless use of 'useless use' for you... ;)
m: sub a { "$_ $_" given 42 }
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 ␤…»
RabidGravy speaking of actions, is badness likely to ensue if one was to start parsing from within an action method?
moritz RabidGravy: no; you just have take care not to clobber your $/
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
arnsholt Oh, but moritz has a very good point
moritz easy fix: don't name the parameter $/
RabidGravy :)
El_Che nine: I see. thx.
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:25
10:26 leont left
moritz fwiw the python "ldap3" library also feels like solid engineering to me 10:28
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:30
10:33 psy_ left 10:37 bpmedley joined
dalek rl6-most-wanted: afb08f7 | (Claudio Ramirez)++ | most-wanted/modules.md:
Add Net::LDAP
10:46
rl6-most-wanted: 86f0932 | nxadm++ | most-wanted/modules.md:
Merge pull request #11 from nxadm/master

Add Net::LDAP
10:46 virtualsue joined
Woodi yay :) (Claudio Ramirez)++ 10:46
10:46 Peter_R joined
El_Che :) 10:47
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:51
El_Che: anyway hate this, gui recomended... 10:52
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:53
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 ??
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.
Woodi: no downtime, but if the IO is heavy, your clients will get timeouts 10:56
10:56 Averna joined
Woodi El_Che: yes, so you have problems with offline crating new db for slave or master... 10:56
El_Che Woodi: no, not really, but you need to be careful when creating indexes on existings db's 10:57
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
El_Che anyway, let stop annoyting #perl6 with LDAP problems :)
jnthn Phew :)
smls m: say «aa bb:cc=dd».perl 10:59
camelia rakudo-moar eac2b8: OUTPUT«("aa", "bb", :cc, "=dd")␤»
smls ^^ Is that supposed to happen?
RabidGravy marnin jnthn 11:01
11:03 lucs joined
brrt anybody know a git-like thing for syncing Documents (as in, binary-blobs-used-by-office-suites) 11:07
'use latex and git' is not, unfortunately, a suitable answer :-)
'use dropbox' is also not, unfortunatey, a suitable answer either 11:08
RabidGravy share point :-O
jnthn smls: I think pairs are special inside <<...>>
smls Even without a space before it?
Also: why? 11:09
jnthn brrt: There are various git add-ons to ease dealing with binary things, iirc
brrt hmm.. ok, well, i'll try that then :-)
11:09 Averna left
jnthn I think git annex is one such thing 11:09
m: say <<"a""b">>
camelia rakudo-moar eac2b8: OUTPUT«(a b)␤»
jnthn Seems we're not that strict generally about the whitespace in there... 11:10
smls Seems so
11:12 vividsnow left, Averna joined, vividsnow joined 11:13 Averna left 11:17 Averna joined 11:30 rurban joined, Begi left 11:31 Skarsnik joined
abraxxa which is the preferred way of accessing a hash element? 11:34
%hash<$key> or %hash{$key} ?
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
timotimo it'd have to be %hash<<$key>> if you want interpolation of $key
and in the <<$key>> case you're forcing stringification, whereas %hash{$key} can also work with "object" keys (also simpler things like Int)
abraxxa i see, thanks
jnthn %hash<key> for literal keys, %hash{$var} otherwise
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>
gfldex m: my Any %h; my class C {}; my C $c.=new; %h<<$c>> = 42; dd %h
camelia rakudo-moar eac2b8: OUTPUT«Hash[Any] $var = (my Any % = "C<140082277671008>" => 42)␤»
gfldex abraxxa: please note ^^^
abraxxa jnthn: me neither (in Perl 5) 11:37
timotimo gfldex: um, i think you mean my %h{Any} 11:38
m: my %h{Any}; class C {}; my C $c .=new; %h{$c} = 42; dd %h
camelia rakudo-moar eac2b8: OUTPUT«Hash[Any,Any] $var = (my Any %{Any} = (C.new) => 42)␤»
gfldex indeed, no tea yet
timotimo m: my Any %h; class C {}; my C $c .=new; %h{$c} = 42; dd %h
camelia rakudo-moar eac2b8: OUTPUT«Hash[Any] $var = (my Any % = "C<140172659421336>" => 42)␤»
11:38 Begi joined
timotimo ^- that also does the stringification you wanted to warn about with <<$c>> 11:38
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!
timotimo good mroning
jnthn What is this morning...tea...you speak of? :)
11:41 Averna left
abraxxa jnthn: that's what %hash<key> is for, i got it 11:43
gfldex: what exactly did you want to show me with your example? 11:44
do i need to call private methods with !? 11:45
method !private {} method foo { self.!private(); } 11:46
jnthn Yes
abraxxa if the method returns a hash, can i access one element directly? 11:47
i tried my $parmdp = self.!parmd{$field_index};
but got: Unsupported use of . to concatenate strings; in Perl 6 please use ~
timotimo it's just "self!parmd"
abraxxa aren't method calls .? 11:48
does the ! replace the .?
11:48 g4 left
jnthn Private method calls are done with !, not . 11:49
abraxxa ah, the perl6intro.com doc shows it even, overlooked it, sorry!
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:49 yakudza left 11:50 xpen left
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:50
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
jnthn Well, this is bother...
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␤»
jnthn BUT
abraxxa so can I access the key of a hash returned from a method call directly when calling the method?
jnthn m: my \a = 42; say a; a = 69; say a;
camelia rakudo-moar eac2b8: OUTPUT«42␤Cannot modify an immutable Int␤ in block <unit> at /tmp/cclZKv2ObX:1␤␤»
jnthn m: my (\a) = 42; say a; a = 69; say a;
camelia rakudo-moar eac2b8: OUTPUT«42␤69␤»
jnthn If it's going to stay we have to live with that discrepancy...
Probably 11:53
abraxxa what is \a?
jnthn Or do something horrible in the code-gen :)
sigilless variable, *meant* to be static single assignment :)
abraxxa like a constant?
jnthn Yes and no :)
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
abraxxa isn't that what a binding does too?
gfldex yes
jnthn TimToady: Design ruling on ^^ welcome; I've not much idea what to do :-)
oh, or maybe I do... :) 11:55
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 vividsnow left
jnthn my (\a, \b) := 1, 2; 11:56
Then it's a signature bind that is happening
smls Is there a way to drop the first item from a Seq (like Haskell's "tail") without caching it? 11:57
11:57 vividsnow joined
jnthn hm, tail caches? 11:57
smls Perl 6's tail does something different, doesn't it?
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
jnthn Yeah, I don't know we have a method for doing that. 11:59
Of course, there are tricks
smls I guess .grep({ $++ }) works
jnthn .grep({ ...yes, that :)
smls but probably inefficient compared to a true Haskell "tail"
11:59 rurban left
jnthn Indeed 12:00
cxreg "my other car is a cdr" 12:02
lucs "When my wife left me, she took everything. The kids, the house, the car. She didn't even leave me the cdr!" 12:03
Woodi lucs: becouse womans are like tornados - first it is warm and wet.... ;) 12:05
12:11 kaare_ joined
virtualsue well that conversation took a wrong turn somewhere 12:11
moritz indeed 12:12
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
Begi pnu : I haven't try it yet
jnthn sighs at Woodi 12:17
Seems I've found a way to keep my (\a, \b) = 1,2; working but not let it be assigned afterwards.
So I guess we can keep it. 12:18
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
moritz m: say "one" ~~ "at least two" 12:19
camelia rakudo-moar eac2b8: OUTPUT«False␤»
12:20 RabidGravy left
moritz erm 12:21
whatever :-)
m: say 2 ~~ (1..*)
camelia rakudo-moar eac2b8: OUTPUT«True␤»
12:22 yakudza joined
dalek kudo/nom: f303efc | jnthn++ | src/Perl6/Actions.nqp:
Enforce SSA on sigilless in `my (\x, \y) = 1, 2;`.
12:27
ast: a1c2454 | jnthn++ | S04-declarations/my.t:
Tests for RT #126626.
12:28
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:29
abraxxa m: my %hash; say %hash.defined; 12:32
camelia rakudo-moar f303ef: OUTPUT«True␤»
abraxxa m: my %hash; say %hash.Bool; 12:33
camelia rakudo-moar f303ef: OUTPUT«False␤»
abraxxa m: my %hash = (); say %hash.Bool;
camelia rakudo-moar f303ef: OUTPUT«False␤»
abraxxa m: my %hash = (key => 'value'); say %hash.Bool;
camelia rakudo-moar f303ef: OUTPUT«True␤»
abraxxa so unless %!hash {} should be fine to check if the hash has been populated before?
jnthn An empty hash boolifies to False 12:35
lunch &
12:35 kid51 joined
abraxxa yes, nice 12:35
Skarsnik you could probably do %hash.elems == 0
abraxxa I have expected that defined behaves like Bool
Skarsnik: I've thought about .keys 12:36
12:38 rurban joined
timotimo .defined and .Bool aren't the same in many cases 12:39
m: say "".defined; say "".Bool
camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
timotimo m: say 0.defined; say 0.Bool
camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
timotimo m: say [].defined; say [].Bool
camelia rakudo-moar f303ef: OUTPUT«True␤False␤»
abraxxa what is the idea behind the two methods? 12:41
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;
camelia rakudo-moar f303ef: OUTPUT«FalseFalse␤TrueFalse␤»
12:43 n0tjack joined
gfldex that something if false doesn't mean it's undefined 12:43
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?
it's not explicitly initialized to an empty hash with my %hash = ();
dalek blets: da7c5e0 | (Herbert Breunung)++ | docs/appendix-e-exciting.txt:
added more comparison exampel (stole one from jnthn++ slide)
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
timotimo my %hash is implicitly filled with an empty hash for you 12:45
gfldex The assumption that something in Perl 6 design is wrong, is almost always wrong. :) 12:46
m: my Hash $h; say $h.defined;
camelia rakudo-moar f303ef: OUTPUT«False␤»
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;
abraxxa m: my %h; say %h.defined;
camelia rakudo-moar f303ef: OUTPUT«True␤»
abraxxa awesome, the same object returning different things depending on the sigil!
gfldex %h is ready to use. my Hash $h is not
abraxxa i was told yesterday that the sigils are just the same as defining a type 12:48
gfldex sigil defines interface, not existence
that was wrong then
abraxxa m: my Hash $h; $h<key> = 'value';
camelia ( no output )
abraxxa seems to work
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;
camelia rakudo-moar f303ef: OUTPUT«key => value␤»
gfldex sometimes you don't want short cuts. That's why there are other ways to do it.
abraxxa gfldex: so how do you define 'not ready to use'?
masak m: my Hash $h; $h<key> = 'value'; say $h.defined 12:50
camelia rakudo-moar f303ef: OUTPUT«True␤»
12:50 kid51 left
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;␤»
abraxxa masak: sure, it contains data now
12:50 gio01122001 joined
gfldex @b is not ready to use 12:50
gio01122001 hi 12:51
abraxxa gfldex: i'm not talking about an array!
gio01122001 why
masak gio01122001: because! :)
gfldex you are taking about a hash. And it's definedness matters if you use it as a member of a complex data structure.
Woodi m: my Hash $h; say $h.defined; say %h.defined; # this is strange...
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...␤»
gfldex the whole defineness-thing becomes really important when you do MMD 12:52
masak Woodi: why is that strange?
Woodi ok, ir 2015.11 it was False\nTrue...
moritz Woodi: it's exactly as I'd expect it
gio01122001 hey what's this?
moritz gio01122001: we're talking about Perl 6
Woodi but now message about %h.defined; is correct to me
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.
abraxxa and why does if %hash check for bool and not definedness? 12:53
gio01122001 i don't understand anything fuck you
im offline
smls abraxxa: because 'if' always checks for .Bool
masak gio01122001: thank you for passing by. good bye.
gfldex abraxxa: because if it would you would lose the distinction between defineness and trueness
abraxxa smls: so a Hash $hash is a typed Container not containing a Hash at this time?
gio01122001 suka bliad 12:54
masak gio01122001: have a nice day <3
gio01122001 bitch
masak hugs
Woodi gio01122001: pleas leave
gio01122001 idi naxui tvoiu mat
smls abraxxa: Technically it containes the "type object" of class Hash by default
12:54 gio01122001 left
timotimo i'm surprised autoviv makes "my Hash $h; $h<key>;" vivify $h, tbh 12:54
m: my Array $foo; $foo[1] = "hi"; say $foo
camelia rakudo-moar f303ef: OUTPUT«[(Any) hi]␤»
gfldex Woodi: kindness doesn't work with russians. Please don't feed him.
masak oh, he was Russian. 12:55
timotimo seems like it's the same for Array. pretty nice.
masak gio01122001: should be "tvoyu mat"
smls abraxxa: For each class there is an uninitialized object called the "type object", which counts as undefined.
abraxxa smls: is the Container proxying the method calls to its inner object?
smls indeed 12:56
the container hides itself very well
abraxxa and my %hash doesn't contain a type object?
sounds like useless memory usage to me
smls %hash is a variable name being directly associated with an instantiated (a.k.a. defined) Hash object
gfldex abraxxa: autovivication can be quite useful
12:57 n0tjack left
abraxxa what is the use case of the defined method? 12:57
12:57 maziar left
moritz abraxxa: mostly distinguishing type objects from instances, missing from absent data 12:57
12:57 TEttinger left 12:58 maziar joined, maziar left
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
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␤»
gfldex abraxxa: if you can force definedness (using type smilies) you can make assumptions about defineness in the rest of the sub.
and you assumption will be enfoced by the compiler 13:01
looks like i have to take my keyboad apat 13:02
Woodi any shortcut to look into objects like .perl is doing but without stringifcation and reflections ? 13:04
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:05
13:07 administrator joined, administrator is now known as Guest37407 13:08 sufrostico joined 13:11 prammer joined 13:19 vividsnow left 13:32 virtualsue left
abraxxa hm, should this work because it seems to: CArray[Pointer[Str]] $attributep is encoded('utf8'), 13:33
13:37 koo8 joined 13:40 geekosaur joined, geekosaur left 13:41 geekosaur joined
Skarsnik hm, no idea x) 13:42
abraxxa interesting things happen
i fetch the column names of a prepared query with an OCI function
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
not once but on multiple testruns
i can't use 'is rw' here because it's a pointer to a pointer 13:44
DBDish::Oracle passes all tests but the one where is-deeply seems to be buggy 13:47
13:52 vividsnow joined
brrt abraxxa; maybe you want to use buf8 or something to decode them 'manually' in perl6? 13:55
i'm being of course totally ignorant
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
abraxxa would be nice if there are helpers for this in NativeCall 13:57
Skarsnik hm, you managed to get Buf from C? 13:58
dalek kudo-star-daily: b31ab98 | coke++ | log/ (8 files):
today (automated commit)
13:59
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
i'm returning Rat's
hoelzro good morning #perl6 14:03
rindolf Hi all! rakudobrew build jvm consumes 29.8% of my 8 GB of RAM.
hoelzro o/ rindolf
rindolf hoelzro: good morning.
14:03 xpen left
rindolf Oops! There was an exception. :-(. 14:04
Maybe it's not suitable for openjdk yet.
Skarsnik abraxxa, if you look at travis-ci.org/perl6/DBIish I have the same issue with is-deeply, I marked the test as Todo x)
hoelzro rindolf: the JVM build is currently broken, sad to say =( 14:05
happy to say, I'm working on fixing it right now =)
rindolf hoelzro: ah.
hoelzro: thanks!
abraxxa Skarsnik: gimme a sec, commiting in progress ;)
rindolf hoelzro: did the CI catch that?
moritz rindolf: do we even have JVM-based CI builds? 14:07
hoelzro I thought we did, but maybe that was for NQP
rindolf moritz: no idea.
hoelzro we do 14:08
for rakudo, that is
but it's marked as "allow failures"
which, iirc, says "don't yell at people if that build is failing"
14:09 molaf joined 14:10 p6newbie joined
p6newbie Function 'CompUnit::Repository' needs parens to avoid gobbling block at .rakudobrew/moar-2015.11/panda/bootstrap.pl:30 14:11
Missing block (apparently claimed by 'CompUnit::Repository') at .rakudobrew/moar-2015.11/panda/bootstrap.pl:31
cannot install "panda" because of those messages. any idea?
hoelzro that looks like panda is too new for that rakudo
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
p6newbie commit 372e9c323aaea76f953b0ff7b2e65d07a2ca9614 Merge: ee64893 a63e344 Author: nine Date: 12.12 14:13
hoelzro hmm, that's why
I guess it couldn't check out the 2015.11 tag, because there isn't one?
rindolf abraxxa: OK, I have an x86-64 machine. 14:14
hoelzro p6newbie: if you git checkout 490c859 && perl6 bootstrap.pl, it should work
p6newbie I followed the instructions...
14:15 andreoss joined
hoelzro p6newbie: yeah, it should usually work; I assume you did something like rakudobrew build 2015.11 ? 14:15
abraxxa Skarsnik: pushed, finally!
Skarsnik: now I will rebase onto the main repo
Skarsnik huhu good luck
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:16
hoelzro p6newbie: could you try e9055fe97c759a7e2eeb3503cb0b69a734b82256? 14:18
that should do it, I think
14:18 void1 joined 14:19 p6newbie left 14:20 cdg joined 14:23 Sqirrel left 14:24 petercommand left, skids joined, snarkyboojum left
[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?
moritz Skarsnik: Int 14:25
14:27 RabidGravy joined
RabidGravy boom 14:29
andreoss m: sub foo is cached { 1 }
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…»
andreoss is 'is cached' gone?
geekosaur yes
well, experimental
14:30 petercommand joined, zz3 joined
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)
andreoss what do i use instead for now? only state vars?
[Coke] you have to declare it if you use it.
m: use experimental :cached; sub foo is cached { 1 } 14:31
camelia ( no output )
nine hoelzro: wouldn't it be better to recommend rakudo nom to people? That should give the best chance for the ecosystem to work
hoelzro nine: yes, that's probably for the best
14:31 n0tjack joined
[Coke] but, it's experimental. use at your own risk. 14:31
hoelzro I was just thinking about how we don't really have management for versions of dependencies 14:32
it's basically "use Star or nom"
nine I guess backwards compatibility will become a hot topic in the coming months
moritz aye
14:32 Sqirrel joined
andreoss [Coke]: so there will be no default memorization for perl 6 in upcomming release? 14:32
[Coke] andreoss: correct. 14:33
moritz we should really start doing releases of modules :-)
nine I guess we would have releases if it weren't for panda's --force option ;)
hoelzro moritz: agreed
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
I feel like a lot of people won't take us very seriously if we don't get our module story straight
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
hoelzro nine: I think this is just something we've all been kind of putting off =/ 14:36
ecosystem authors should probably have been doing YYYY.MM releases for a while now
hoelzro is guilty as charged
14:36 ZoffixW joined
Skarsnik Go seems to use json (github.com/bwmarrin/discordgo/blob...tructs.go) but I have no idea how go work x) 14:36
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 :)
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 ? :)
ZoffixW Crazy back compat mentality is what I don't like about P5. 14:38
14:38 adu joined
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 :-)
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
ZoffixW nine, you're running perl 5.6.1 on a security hole riddled ancient Debian?
Skarsnik Qt have a good crazy backcompat
hoelzro RabidGravy++
Woodi ZoffixW: we are not there yet and any ISO/POSIX/CCTTI/ANSI/.gov have form of errata to just "update" things...
ZoffixW The crazy back compat will be the reason why robots will take over. 14:40
14:40 andreoss left, andreoss joined
Woodi thinks perl5 back compat is not crazy... 14:40
14:41 andreoss left, andreoss joined
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 :)
ZoffixW :)
14:41 n0tjack left
ZoffixW As for the ecosystem, can't we utilize git tags for "releases"? 14:41
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"...
RabidGravy I do for myself
grondilu is there anything faster than @a.List?
Juerd grondilu: I suspect that 1 + 1 will be faster ;)
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?
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.
andreoss also is p6doc going to be standard tool in the release?
[Coke] gist.github.com/coke/1f5ff064a85f13e13261 - current failures on os x (including timtoady++s fixes earlier)
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.
nine grondilu: .List really gives you a plain List and for that it has to copy the array's elements.
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:48
hoelzro so I found the problem with the JVM build: $_.type on github.com/rakudo/rakudo/blob/nom/...AN.nqp#L41 is null, so accessing information about it causes an NPE 14:49
$_ is an NQPAttribute
14:49 void1 left
hoelzro but I'm not sure how $_.type ended up as null =/ 14:49
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])␤»
smls ^^ Is it .clone on an object not supposed to create a new Array object for an @ attribute?
s/it//
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:51
RabidGravy Oooh "rakudo-star x86_64 0.0.2015.11-1.fc22 updates" 14:52
14:53 balazs joined
RabidGravy fedora++ 14:53
moritz ZoffixW: or maybe we should star to do proper releases, upload them to PAUSE, and install them from CPAN
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
14:54 sfg joined
RabidGravy I'm with moritz 14:54
moritz Skarsnik: agreed
ZoffixW moritz, that's definitely a better option. 14:55
But... what was the whole "we'll have two ecosystems" jdv79 mentioned? one MetaCPAN and one github-based system
Skarsnik root@testperl6:~/piko/Discord# apt-cache show rakudo 14:56
Package: rakudo
Version: 2015.09-2
ZoffixW I never really investigated that further with them
And making announcable uploads scratches the completionist itch in me too :)
.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: irclog.perlgeek.de/perl6/2015-12-16#i_11727140 14:57
yoleaux ZoffixW: I'll pass your message to jdv79.
ZoffixW .botsnack
yoleaux :D
Skarsnik Actually having a tool using the git repository and another that use fixed release by author is not that bad
14:57 zakharyas left
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
Woodi fedora++ # but systemd--
dj_goku ZoffixW: you write perl 5 for your day job?
15:03 zz3 left 15:05 n0tjack joined 15:06 regreg joined
Ulti Anyone know about the status of HTTP::UserAgent? www.reddit.com/r/perl6/comments/3x...mendation/ 15:08
Skarsnik I think it had trouble building with the next rakudo 15:09
*new
let me check real quick
moritz well, the solution is to fix HTTP::UserAgent, not look for another module 15:10
Ulti travis-ci.org/sergot/http-useragent doesn't look /that/ broken 15:11
Skarsnik travis is only run when there is a commit ~~
http::ua depend on the universe x) 15:12
oh yeah...
===SORRY!===
Cannot find method 'run_alt'
Ulti well the travis build is borked regardless so its at least those problems
moritz run_alt is some NFA thing, right? 15:13
Skarsnik NFA?
andreoss does 'is cached' avoid to use Seq or use something else instead?
15:14 sammers left
moritz Skarsnik: the Non-deterministic Finite Automaton stuff used the in regex engine 15:14
Skarsnik Could be something wrong in one of the grammar or another compile unit bug then? 15:16
dalek p: b8fc603 | jnthn++ | t/nqp/19-file-ops.t:
Make test insensitive to \n -> \r\n translation.
15:18
p: a4d6b4b | hoelzro++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Return 0 for objprimspec(null)

This follows Moar's behavior, and fixes the JVM backend for Rakudo
15:19
hoelzro ok, JVM build is "fixed" if you use nqp master
there's still a "No writeable path found" during tools/build/install-core-dist.pl, but at least it doesn't NPE 15:20
15:21 travis-ci joined
travis-ci NQP build failed. jnthn 'Make test insensitive to \n -> \r\n translation.' 15:21
travis-ci.org/perl6/nqp/builds/97236403 github.com/perl6/nqp/compare/b1320...fc603b61b4
15:21 travis-ci left
Skarsnik du wtf Type 'HTTP::Request' is not declared 15:21
at /home/skarsnik/http-useragent/.panda-work/1450279104_1/lib/HTTP/Response.pm6:9
------> has HTTP::Request⏏ $.request is rw;
RabidGravy Utli, moritz, Skarsnik : there is an RT on the run_alt thing
Skarsnik but there is a use HTTP::Request at the beginning
RabidGravy It's a real mess 15:22
Skarsnik Could it came from because everything use unit class blabalba?
15:22 travis-ci joined
travis-ci NQP build failed. Rob Hoelz 'Return 0 for objprimspec(null) 15:22
travis-ci.org/perl6/nqp/builds/97236623 github.com/perl6/nqp/compare/b8fc6...d6b4b9768e
15:22 travis-ci left 15:26 sammers joined
gfldex Pod::Item is not very concurency frieldy. I presume chances to have it changed are very slim? 15:32
moritz gfldex: what changes to you have in mind? 15:33
dalek ast: 6edc4ed | jnthn++ | S17-procasync/print.t:
Harden test against newline translation.
gfldex any item list must be surrounded by a block (of some new type) similar to Pod::Table 15:34
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 adu left
dalek p: f73fb45 | jnthn++ | t (2 files):
Get Moar with newline translation.

Also update one test to match these new semantics.
15:35
moritz I'm not saying I object, I just don't see the connection
jnthn *sigh* of course, every change to newline stuffs means there's tests to fix 15:36
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:37
or i have to convert to some tree-structure and correct those free floating items in a 2nd pass 15:38
15:38 travis-ci joined
travis-ci NQP build passed. jnthn 'Get Moar with newline translation. 15:38
travis-ci.org/perl6/nqp/builds/97240393 github.com/perl6/nqp/compare/a4d6b...3fb45a350f
15:38 travis-ci left
gfldex but that would be real slow. What is defeating the whole idea of concurrency 15:39
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:40
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
well, there is to Array
moritz well, if it has a parent reference, it'd be empty anyway :-)
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:42
gfldex it would for sure 15:43
moritz well, you can do a three-phase thing
1) introduce a Pod::ItemList type 15:44
2) patch all modules to work with the old and the new structure
2.5) wait a month or two
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. :)
moritz 3) patch core to change the struture
3.5) wait a few months
4) clean up the modules to only work with the new structure 15:45
ok, I lied about three phases
15:45 [particle] joined
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
dalek ast: 5605a58 | jnthn++ | S16-filehandles/io.t:
Add missing .close call.

Required on Windows.
jnthn RabidGravy: Nice! :) 15:46
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:47
moritz gfldex: unless it's a feature of the parser to auto-generate the container at the data structure level 15:49
gfldex: I didn't even realize you wanted to change Pod syntax too 15:50
_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" :)
dalek kudo/nom: 680da78 | jnthn++ | / (2 files):
Switch to doing newline translation on Win32.

Now, \n always means \x0A by default (the newline pragma currently is still available, pending a decision from TimToady++ on its future). We translate \r\n on file/pipe input to \n, and \n to \r\n on output. We don't perform any such translation on sockets, nor on explict .encode and .decode calls (providing an escape hatch). \r\n remains a single grapheme, though you're now much less likely to run in to one. This brings us in line with how the problem has commonly been tackled in other languages; logical \n turned out not to work out so well in real life, even if avoiding the cost of boundary translation was nice. Note that we translate at grapheme, not codepoint, level, so a \r\n will never accidentally become \r\r\n (as can happen in some translation layers).
moritz _nadim: you're welcome
_nadim How do I ignore some of the elements returned from a sub? ($want, Nil, Nil) = sends_a_list()
moritz jnthn++
my ( $want ) = sends_a_list()
dalek ast: ad0164f | jnthn++ | S (5 files):
Update tests to cope with newline translation.
moritz or my ( $, $want) = returns_a_list() 16:01
jnthn I hope the tests will look OK off Windows too
To the degree they look OK at all at the moment :S
moritz starts a rebuild and spectest run 16:02
jnthn Doing a fresh one on Windows too to see if I missed anything :) 16:04
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␤»
lizmat m: sub a() { 1,2,3 }; my ($,$,$a) = a; say $a # _nadim just bare $ in front
camelia rakudo-moar f303ef: OUTPUT«3␤»
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:08
lizmat jnthn: does that imply that if a supply gets a \r\n from a socket, that it won't be translated ? 16:09
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
and the two parts are merged ?
jnthn No
"\r" ~ "\n" does exactly as it does now
The translation is purely at I/O boundaries
And only for file/pipe handles 16:11
lizmat $ 6 'my $a = "\r"; my $b = "\n"; say ($a ~ $b).chars'
1
seems it is doing it on concat as well ?
jnthn Of course
\r\n is 1 grapheme 16:12
lizmat ok, so then Supply.lines is severely broken atm
jnthn m: my $a = "\r"; my $b = "\n"; say ($a ~ $b).codes
camelia rakudo-moar 680da7: OUTPUT«2␤»
jnthn ?
Supply.lines test failures have gone away at last for me
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 perlpunks.de/paste/show/56718d8e.333.3c1
lizmat whereas if the \r\n is the result of a concat, it *is* ?
jnthn lizmat: You're confused.
moritz that's my test summary failure
jnthn This isn't about graphemes
moritz lizmat: .codes
erm
never ind
jnthn This is about \r\n => \n mapping on input
That is, a file containing a \r\n, when you .get without chomp, will get you a string ending in \n 16:14
Just as in Perl 5.
lizmat ok, *phew*
I guess
jnthn We don't play any games with \n any more; it's always 0x0A 16:15
(short of a use newline)
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
moritz lizmat: it passes for me when I re-run in isolation
jnthn I think the UDP one is being worked on by hoelzro++ 16:16
lizmat so it's a flapper
abraxxa Skarsnik: rebased successfully
moritz lizmat: but running it in isolation several times in a row makes it always pass as well
just had 21 passes in a row
nine moritz: does it still pass when your machine is under heavy load (like a TEST_JOBS=20 spectest)? 16:18
moritz: or after removing all .precomp files? 16:19
s/files/directories/
16:20 ZoffixW left, domidumont joined
moritz nine: yes with removing precomp 16:20
nine: ... and I don't want to start 20 spectest jobs at once :-)
nine moritz: or whatever puts some real load on your machine :)
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
16:21 zakharyas joined 16:22 brrt left
moritz time to decommute& 16:22
16:23 zakharyas left
nine moritz: that's probably it! 16:24
16:25 zakharyas joined
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:25
jnthn nine: Which test is this in? 16:26
nine jnthn: t/spec/S32-io/socket-recv-vs-read.t
Looks like a very plain race condition to me
jnthn RT #124005 and RT #122658 have been dropped from the xmas list; I left notes on each wrt why 16:29
16:29 raiph joined
jnthn ah, yes 16:30
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 c: 4883a73 | RabidGravy++ | doc/Type/IO/ (2 files):
Add native-descriptor description
16:31 FROGGS left
smls I Perl 5 I'd use fork for that. 16:32
jnthn smls: Supply.interval(1).tap({ do stuff }) 16:34
Oh, you want them all to complete?
smls yes
jnthn You said fire and forget. :P
smls right, I don't care about the return value, but they have I/O side-effects
jnthn The threadpool doesn't care about completion, so you'll need to use supplies or promises in some way 16:35
smls OK, I guess I finally have to learn how to use Supplies :) 16:36
16:37 zakharyas left
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:37
dalek ast: b2394b1 | jnthn++ | S32-io/socket-recv-vs-read.t:
Harden test against race.
16:38
RabidGravy m: my $s = Supply.from-list({ say "1"}, { say "2"}); react { whenever $s -> $v { $v() } }'
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…»
RabidGravy m: my $s = Supply.from-list({ say "1"}, { say "2"}); react { whenever $s -> $v { $v() } }
camelia rakudo-moar 680da7: OUTPUT«1␤2␤»
nine jnthn: your workaround seems to work well :) 16:39
16:40 zamolxes joined
jnthn :) 16:40
abraxxa Skarsnik: why did you name the new required method _row where Perl 6 uses ! to mark private methods?
should be !row or even a better named one 16:41
16:43 jernster joined, jme` left
abraxxa when I want to return an empth Hash or Array should i do: return Hash.new? 16:50
16:50 iH2O joined
nine abraxxa: return {} 16:50
abraxxa i had return () before for the Array case 16:51
nine [] is an Array
abraxxa so instead of: $hash ?? return Hash.new !! return Array.new
nine () is a List
abraxxa $hash ?? {} !! [];
nine looks about right 16:52
16:52 b7j0c joined
grondilu m: say { foo => "bar" }.WHAT; 16:52
camelia rakudo-moar 680da7: OUTPUT«(Hash)␤»
grondilu m: say { [=>] <foo bar> }.WHAT;
camelia rakudo-moar 680da7: OUTPUT«(Block)␤»
16:53 zakharyas joined
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
nine Then you're excused :)
abraxxa i'll takle the DBIish or its successor API after getting DBDish::Oracle to a usable state 16:54
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
camelia rakudo-moar 680da7: OUTPUT«-> ;; $_? is raw { #`(Block|68693144) ... }␤»
jnthn ah 16:56
m: my @k = <a b c>; my @v = 1, 2, 3; say (@k Z=> @v).hash.perl
camelia rakudo-moar 680da7: OUTPUT«{:a(1), :b(2), :c(3)}␤»
hoelzro psch: do you remember why you changed PERL6_LANG_DIR = $(PREFIX)/share/nqp in the JVM build?
abraxxa return (self.column_names Z=> @row).hash if $hash; 16:57
nice!
what's the Z=> thing?
jnthn Z is the zip meta-operator
m: say (1, 2, 3) Z+ (4, 5, 6)
camelia rakudo-moar 680da7: OUTPUT«(5 7 9)␤»
abraxxa understood 16:58
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
Skarsnik: multi-sub in Role::StatementHandle
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
17:00 domidumont left
abraxxa ah, I didn't know Pair so far 17:00
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>
camelia rakudo-moar 680da7: OUTPUT«(a => 1 b => 2 c => 3)␤»
abraxxa 'just' 17:04
andreoss m: my %h = <a b c> Z=> <1 2 3>; say %h.perl
camelia rakudo-moar 680da7: OUTPUT«{:a(IntStr.new(1, "1")), :b(IntStr.new(2, "2")), :c(IntStr.new(3, "3"))}␤»
abraxxa what's an IntStr? 17:05
Juerd abraxxa: A value that's both and Int and a Str
abraxxa omg, again
andreoss why not just Int?
Juerd You can get it from <...>
andreoss: Because <...> returns a list of strings
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")}␤»
timotimo not exactly, Juerd
because < > gives you val() semantics
RabidGravy m: my $a = IntStr.new(100, "z"); say "$a"; say $a + 1;
camelia rakudo-moar 680da7: OUTPUT«z␤101␤»
andreoss looks like dual_vars from perl 5
Juerd timotimo: That's implementation, but isn't the reason for this, that whatever < > returns should at least be usable as strings? 17:07
17:07 andreoss left
Juerd andreoss: Yep, it's much like that. 17:07
17:07 andreoss joined
Juerd andreoss: Yep, it's much like that. 17:07
iH2O m: say 2 + 2 17:08
camelia rakudo-moar 680da7: OUTPUT«4␤»
17:08 ZoffixW joined
abraxxa then why not return Str? 17:08
ZoffixW How can I use Perl 5 regex modifiers?
m: say 'foo' ~~ m:P5/(?^ux:foo)/
camelia rakudo-moar 680da7: OUTPUT«False␤»
andreoss m: ۱.WHAT.say
camelia rakudo-moar 680da7: OUTPUT«(Int)␤»
ZoffixW Also, this error is LTA:
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>␤»
timotimo Juerd: actually, it's not only implementaiton, but also spec and design :)
Juerd abraxxa: Because Str !~~ Int
abraxxa Juerd: so?
andreoss m: say "11" ~~ Int
camelia rakudo-moar 680da7: OUTPUT«False␤»
abraxxa if <> quotes why not return Str?
andreoss m: say +"11" ~~ Int
camelia rakudo-moar 680da7: OUTPUT«True␤»
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
oh, i didn't even read the context
you were already very aware of IntStr
sorry :S
Juerd timotimo: It's okay :)
abraxxa: I don't know why exactly 17:11
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)
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
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. "
design.perl6.org/S02.html#Allomorph..._semantics
17:14 iH2O left
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␤␤»
ZoffixW :(
Hotkeys .u ۱
yoleaux U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE [Nd] (۱)
andreoss m: my $x = 10; &($x.Str) = -> { "hi" }. say $x;
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␤…»
Juerd m: my Int $foo = 5 does role { method Str { "Yes" } }; say ~$foo
camelia rakudo-moar 680da7: OUTPUT«Yes␤»
ZoffixW m: say ۱ + ۱
camelia rakudo-moar 680da7: OUTPUT«2␤»
Juerd andreoss: So... yes.
ZoffixW :o
Juerd, how to access its value from inside that method? 17:16
Like to do return self == 42 ?? 'life and universe' !! self
Hotkeys m: say ٣ - ٢
camelia rakudo-moar 680da7: OUTPUT«1␤»
Hotkeys heh
ZoffixW :)
abraxxa etoocomplex
Hotkeys I like that it is fine with the right to left
ZoffixW .u ٣٢ 17:17
Juerd ZoffixW: self. Just don't stringify it there because that's infinite recursion ;)
yoleaux U+0662 ARABIC-INDIC DIGIT TWO [Nd] (٢)
U+0663 ARABIC-INDIC DIGIT THREE [Nd] (٣)
Juerd m: my Int $foo = 5 does role { method Str { (self * 2) ~ " / 2" } }; say ~$foo
camelia rakudo-moar 680da7: OUTPUT«10 / 2␤»
17:17 administrator joined
andreoss m: 1.WHAT.say 17:17
camelia rakudo-moar 680da7: OUTPUT«(Int)␤»
ZoffixW m: my Int $foo = 5 does role { method Str { "Yes" } }; say $foo
camelia rakudo-moar 680da7: OUTPUT«Yes␤»
17:17 administrator is now known as Guest28950 17:18 Guest37407 left
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␤␤»
ZoffixW tsk tsk
m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! 'something else' } }; say $foo
camelia rakudo-moar 680da7: OUTPUT«something else␤»
ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (self+0).Str } }; say $foo
camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 56400 bytes␤» 17:19
ZoffixW orly
Juerd Heh, is +0 optimized away? :)
ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (Int.new: self).Str } }; say $foo
andreoss ZoffixW: it seems to be recursive call
camelia rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 103280 bytes␤»
ZoffixW m: my Int $foo = 5 does role { method Str { self == 42 ?? 'life and universe' !! (Int.new: self.Int).Str } }; say $foo
Hotkeys my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
ZoffixW *lesigh* 17:20
Hotkeys m: my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
camelia rakudo-moar 680da7: OUTPUT«5␤»
rakudo-moar 680da7: OUTPUT«Memory allocation failed; could not allocate 8192 bytes␤»
Hotkeys m: my Int $foo = 42 does role { method gist { self == 42 ?? 'life and universe' !! self.Str } }; say $foo
camelia rakudo-moar 680da7: OUTPUT«life and universe␤»
Hotkeys kek
timotimo i suggest you use nextsame
ZoffixW Hotkeys, that just sidesteps the problem
timotimo instead of trying to call stuff yourself
Hotkeys I wasn't solving the problem I was just being cheekyt
Juerd nextsame?
timotimo m: my Int $foo = 5 does role { method gist { self == 42 ?? 'life and universe' !! nextsame } }; say $foo;
camelia rakudo-moar 680da7: OUTPUT«5␤»
stmuk hmm I'm seeing panda not finding Test
Juerd Oh :)
That's nice
Hotkeys that's fancy timotimo
ZoffixW timotimo++ thanks 17:21
timotimo basically a "goto" into the next candidate in the candidate list
YW :)
Juerd Is nextsame Perl 6's ->SUPER::foo?
ZoffixW I'm surprised that doesn't need a multi :o
Ah
Never mind, now that I get what it's doing, I'm not surprised :P
jnthn Juerd: Sorta, but works out smarter with multiple inheritance, multi-dispatch, etc.
timotimo and role composition :)
Juerd Right, figures 17:22
nine And less smart by producing endless loops if you do it twice...
jnthn nine: ? 17:23
17:23 zakharyas left
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?
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
er
wrong channel
Juerd Hotkeys: No, right channel. Interesting! Why latin?
jnthn hoelzro: Oh?
nine jnthn: there's a ticket about that: rt.perl.org/Ticket/Display.html?id=123989
Hotkeys idk
17:25 administ1ator joined
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 =/
jnthn hoelzro: Travis was a bit noisy earlier 'cus it was building NQP atop of moar master
Juerd Hotkeys: I had latin in secondary school and loved it.
jnthn hoelzro: And missing an NQP test update to compensate.
Juerd Forgot nearly everything though :)
Hotkeys figured I might as well get latin in there since it's on a different level
ie it's a dead language etc.
andreoss m: role LiterateInt { method Str { given self { when 42 { "hi" } ; when 666 { "bye" } ; default { ~ self } } } } ; my Int $x = 666 does LiterateInt; say $x;
camelia rakudo-moar 680da7: OUTPUT«bye␤»
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.
Juerd % spelling
Hotkeys well
17:26 Guest28950 left
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
Hotkeys I kind of want to get the ball rolling on this latin nonsense 17:27
lol Juerd
Juerd Hotkeys: Yes, it would.
jnthn nine: eek, that's an icky one
nine: You diagnosed it right though
Juerd Hotkeys: In school we got French first, then Latin, and only after I learned some latin did French begin to make sense.
jnthn nine: Just a code-gen ordering issue, it seems
Hotkeys I'm canadian so I had french for 5 years, grades 4-9
but we don't really uh
learn a ton in those 5 years 17:28
Juerd 5 years of comment ça va?
Hotkeys it was kind of a joke
pretty much
I can understand written french reasonably well with some guess work
I can barely produce the language though
and I can kind of understand spoken french 17:29
ZoffixW Huh? "Use translate_regex.pl from Blue Tiger in the meantime." at docs.perl6.org/language/5to6-nutshe...Regexp_%29
What Blue Tiger?
timotimo baguette! soup du jour! camembert! jacousto!
ZoffixW Would be nice if that were a link
Juerd Omelette du fromage!
ZoffixW Or just some pain 17:30
:P
jnthn had 5 years of French at high school, got the top grade, but didn't feel he learned a lot... :)
ZoffixW chuckles as they recall buying the "Pain Machine" a few years back
Juerd jnthn: Sounds awfully familiar :)
ZoffixW: No bread, no gain.
ZoffixW :)
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
17:31 telex left
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
jnthn (Spanish for "stale bread" :D)
timotimo hoelzro++ # still. for the blog postage
hoelzro timotimo: hehe, nope =)
don't worry, I didn't steal all the leaks =P 17:32
17:32 dakkar left, luis joined
jnthn nine: Ah...so it is a bit more involved.. 17:32
timotimo rakudo memory leaks end up on wikileaks?
17:32 telex joined
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␤»
andreoss bug?
17:33 zakharyas joined
jnthn andreoss: LTA error 17:33
ZoffixW What's the actual error?
timotimo "subsets can't do role composition"
ZoffixW Ah
jnthn Something like what timo said
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: www.youtube.com/watch?v=Bch595Y4s7U 17:34
timotimo damn
hoelzro if NQP is ok on Moar, I don't see any reason not to bump it up in tools/build
timotimo that's not bad
17:34 andreoss left 17:35 andreoss joined
jnthn hoelzro: I think I already did bump it 17:36
hoelzro: My Moar bump went in after your patch
hoelzro ah, ok 17:37
andreoss m: role Foo { method Str { ~ self ~ "!" } } ; class FooInt is Int does Foo {*}; say FooInt.new(10); 17:38
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);
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␤»
andreoss m: class FooInt is Int {*}; say FooInt.new(10); 17:40
camelia rakudo-moar 680da7: OUTPUT«10␤»
jnthn andreoss: ~self will call self.Str, so you did an infinite recursion
17:40 virtualsue joined
timotimo i wonder if we should give moar a little extra information for "memory allocation failed" 17:42
like "when trying to allocate stack frames: memory allocation failed"?
abraxxa what does this mean? Cannot look up attributes in a type object
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
abraxxa: tried to call a method that requires a defined instance on a type object
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␤␤»
abraxxa got it, thanks
timotimo ^- this is the "a bit more awesome" companion to that exact error
andreoss m: role Foo { method Str { Int.new(self).Str ~ "!" } } ; class FooInt is Int does Foo {*}; say FooInt.new(10);
camelia rakudo-moar 680da7: OUTPUT«10!␤»
abraxxa would be helpful to print the methodname and the object
ZoffixW Never mind, found my answer. It's actually in the same doc: docs.perl6.org/language/5to6-nutshell#Blue_Tiger
timotimo in some cases, that can be really difficult. but we could surely try
17:43 jme` joined
dalek c: 376e0d1 | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
Actually link to Blue Tiger script instead of just mentioning it
17:44
abraxxa Skarsnik: do you know why magic_cmp has two Arrays as params? 17:45
17:45 jernster left
abraxxa moritz: you wrote magic_cmp according to git 17:46
moritz: github.com/perl6/DBIish/commit/e0c...fe538ac1a7
any idea?
as two column values are passed this should be $a, $b imho
17:47 sufrostico left
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
and some queries now return five columns
17:49 sufrostico joined, pierre-vigier joined
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
17:49 hankache joined
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
abraxxa which is quite magic as @row is the varname in the fetch method
hankache hello #perl6
ZoffixW hallo
abraxxa moritz: but a NULL value is returned as type object
is that the correct term? type object? 17:51
moritz yes
abraxxa: then you shouldn't use that function to compare the values
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
abraxxa even fully defined ones without type objects
moritz I guess I should have worked harder on finding a better name
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
abraxxa it's printout isn't really helpful 17:53
i've added tons of diag $.perl and $.^name without finding the cause
hankache why does io-prompt in modules.perl6.org/ point to the ecosystem? 17:54
17:54 sufrostico left
ZoffixW Good question 17:55
17:55 zakharyas left
ZoffixW m: say so "source-url" eq 'source-url' 17:57
camelia rakudo-moar 680da7: OUTPUT«True␤»
lucasb both io-prompt and lolsql have moved to other repos. they were in ecosystem/SHELTER directory
17:57 dwarring joined, cdg left
lucasb the meta list can be updated to fix this 17:57
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
i'm going home, bye!
hankache bye abraxxa
17:59 abraxxa left
dalek href="https://modules.perl6.org:">modules.perl6.org: ae43207 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitHub.pm:
Anchor GitHub source regex so it does not incorrectly match weird URLs
18:01
ZoffixW Well... that fixes that issue not showing up in error log X)
hankache ZoffixW++ 18:02
ZoffixW As for having more than one repo... hm
s/repo/dist/;
18:02 andreoss left
ZoffixW ... that won't do. 18:04
We fetch recent commits, Issues, Stars.
lucasb ah, understood. it just complicates things. thanks ZoffixW
ZoffixW <lucasb> both io-prompt and lolsql have moved to other repos. 18:07
Which repos?
If I follow source url, I get a repo without a META.info in it :/
At least for io-prompt 18:08
18:08 yqt joined
ZoffixW Same with lolsql 18:09
dalek osystem: 397189b | (Pierre VIGIER)++ | META.list:
Add Math::Matrix for some matrix operations

  github.com/pierre-vigier/Perl6-Math-Matrix
osystem: 364c610 | (Zoffix Znet)++ | META.list:
Merge pull request #103 from pierre-vigier/master

Add Math::Matrix for some matrix operations
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:10
ZoffixW lucasb, what was the purpose of SHELTER? 18:11
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
We can actually make modules.perl6.org show those differently :) 18:13
And that should be pretty easy because... *drumroll*... we designed modules.perl6.org to allow multiple Dist Sources
So we can add a "SHELTER" Dist Source that would match URLs in shelter \o/
hankache excellent!! 18:14
18:16 mohae_ is now known as mohae 18:18 sfg left 18:19 CIAvash left
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:19
I mean a "Matrix" module surely is not about the 1999 movie, is it? 18:20
ZoffixW grondilu, ... or is it XD
grondilu thinks of the dramatic chipmonks suddenly
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:21
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
TimToady yeah, the basic problem isn't that math is math, but that language is language...
ZoffixW TimToady, what does that mean? 18:23
TimToady is Integration talking about math, or about systems, or about racial policies?
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?
ZoffixW grondilu, I don't think the decision to put it in math was necessarily to disambiguate but to categorize
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 :)
ZoffixW Which brings back the point I mentioned some time ago: we use search these days and not browsing by categories, really.
grondilu putting the category in the name is meh
TimToady well, how many times do you have to type it, if it's used just once in a program?
seems a bit of a false economy 18:26
ZoffixW What's if it's a class? :D
grondilu it's not just about the number of characters
ZoffixW For me it is.
grondilu, what else is it about?
TimToady if it's a class, that's when your use provides a lexical alias
grondilu ZoffixW: it's hard to explain, something about odd things being an annoying distraction. 18:27
an also being more difficult to remember.
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
and then you try and fail.
ZoffixW grondilu, what are you thoughts on, say, WWW::Google::Time vs. WebService::Google::Time?
s/you/your/;
grondilu I don't know exactly what those do so I can't really tell.
hankache if $var == 1 | 2 | 3 what do you call the 1 | 2 | 3 part?
a junction?
ZoffixW grondilu, goes to google to find out what time it is. 18:29
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?
hankache, I believe so, yes
timotimo yeah, that's a junction 18:30
hankache thank you :)
grondilu ZoffixW: I have no opinion on this. Seems to be different an issue enough. 18:31
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
ZoffixW cool
timotimo they ... are?
grondilu I think so anyaway
timotimo surely haskell already had something like that? and lisp probably had it for 40 years before haskell go tit?
grondilu haskell does not count
ZoffixW heh 18:33
TimToady counting is a side effect
18:33 yqt left
hankache yes!! an additional argument to troll people that Perl 6 is better ;) 18:33
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?
timotimo also, letting junctions escape your own code into other people's code is not a good idea
hankache ah! 18:35
timotimo perl5 already has a quantum superposition module, does it not? 18:36
18:37 AlexDaniel joined
ZoffixW Yeah: metacpan.org/pod/Quantum::Superpositions 18:37
timotimo This document describes version 1.03 of Quantum::Superpositions, released August 11, 2000.
ZoffixW >_<
I wasn't even born yet! :)
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?
AlexDaniel hankache: $var ~~ @List ?
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?
timotimo AlexDaniel: i don't think so
ZoffixW timotimo, that's classified :P
timotimo hankache: you can any(|@list) or all(|@list) or so
ZoffixW m: my @a = ^10; say 42 ~~ @a; say 5 ~~ @a
camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
ZoffixW aww
nine ZoffixW: define "born" ;)
AlexDaniel m: my @a = ^100; say 42 ~~ @a; say 5 ~~ @a
camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
ZoffixW I'm still waiting for Perl 6 to appear on wiki.theory.org/YourLanguageSucks
AlexDaniel m: my @a = ^10; say @a ~~ 42; say @a ~~ 5 18:40
camelia rakudo-moar 680da7: OUTPUT«False␤False␤»
ZoffixW m: my @a = ^10; say 42 ~~ @a; say 5 ~~ any @a
camelia rakudo-moar 680da7: OUTPUT«False␤True␤»
ZoffixW m: my @a = ^10; say 42 ~~ any @a; say 5 ~~ any @a
camelia rakudo-moar 680da7: OUTPUT«False␤True␤»
AlexDaniel m: my @a = ^10; say 10 ~~ @a;
camelia rakudo-moar 680da7: OUTPUT«False␤»
18:41 smls_ joined, smls left
AlexDaniel what does 「10 ~~ @a」 then? 18:41
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;␤»
ZoffixW m: my @a = ^10; my @b = ^10; say @b ~~ @a;
camelia rakudo-moar 680da7: OUTPUT«True␤»
ZoffixW m: my @a = ^10; my @b = ^5; say @b ~~ @a;
camelia rakudo-moar 680da7: OUTPUT«False␤»
ZoffixW m: my @a = ^10; my @b = ^10 .reverse; say @b ~~ @a;
camelia rakudo-moar 680da7: OUTPUT«False␤»
18:43 lucasb left
hankache thanks 18:44
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
18:45 psy_ joined
timotimo " - really? 18:45
Hotkeys How do I make an immutable object, do I just make all of its attributes 'is r'?
ZoffixW timotimo, sure do-stuff unless $x or $bar
timotimo um. yeah. i know.
why is that a reason for the language to suck?
ZoffixW timotimo, allows such uses? *shrug* :) 18:46
geekosaur sounds like a pythoner whining?
worshipper of the One True Way
ZoffixW I'd think on a page YourLanguageSucks all sorts of whining is perfectly permitted
timotimo the "perl 5 sucks because" list contains almost exclusively points that perl 6 fixes
AlexDaniel m: my @a = ^10; say %(flat @a Z (1,1 ... Inf))<5>:exists
camelia rakudo-moar 680da7: OUTPUT«True␤»
AlexDaniel m: my @a = ^10; say %(flat @a Z (1,1 ... Inf))<42>:exists
camelia rakudo-moar 680da7: OUTPUT«False␤»
timotimo we've been good at doing different mistakes this time around, it seems
ZoffixW m: my $x = NaN; say $x.WHAT 18:47
camelia rakudo-moar 680da7: OUTPUT«(Num)␤»
ZoffixW m: my $x = NaN; say $x === $x
camelia rakudo-moar 680da7: OUTPUT«True␤»
ZoffixW m: my $x = NaN; say $x === NaN
camelia rakudo-moar 680da7: OUTPUT«True␤»
timotimo AlexDaniel: yeah, Z stops at the shorter list
Juerd doesn't like 'unless' but can't imagine that anyone would dislike a langugae for having it.
18:47 vividsnow left
ZoffixW eh, some of the stuff on that page are major nitpicks. 18:48
skids tries to picture a major nit 18:49
Juerd s/some/most/
AlexDaniel ZoffixW: yeah, it sucks
ZoffixW AlexDaniel, what does?
m: my $num = 0e0; my $int = 0; say $x == $x
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␤»
ZoffixW m: my $num = 0e0; my $int = 0; say $num == $int
camelia rakudo-moar 680da7: OUTPUT«True␤»
AlexDaniel ZoffixW: this webpage :)
ZoffixW m: my $num = 0e0; my $int = 0; say $num === $int
camelia rakudo-moar 680da7: OUTPUT«False␤»
diakopter "which can lead to confusion and spoiling readability of code" - "can lead to"...... such a useless argument
useless use of slippery slope argument
ZoffixW ^ that is someone's complaint for JS
I meant my code evals 18:50
[Coke] updated gist.github.com/coke/1f5ff064a85f13e13261 with current OS X failures, including detailed test output on failing tests.
ZoffixW Under the excuse of "but is confusing coming from other languages"
heh
18:50 [TDH]rcwolf joined
[Coke] looks like line numbers are still an issue. 18:51
18:51 AndyDee joined
[Coke] t/spec/S17-procasync/stress.t still failing. 18:52
18:52 leont joined
diakopter the line numbers have had a couple oscillating interaction issues between VM, nqp, rakudo for many years 18:52
TimToady must've tickled it too hard
18:52 [TDH]rcwolf_alt joined
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.
lichtkind cant find it in the log
[Coke] this is a recent failure mode.
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
diakopter yes, he must've fixed it too hard in rakudo
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 :(
m: -1**½
camelia ( no output )
ZoffixW m: say -1**½
camelia rakudo-moar 680da7: OUTPUT«-1␤»
ZoffixW :o
m: say -1**0.5
camelia rakudo-moar 680da7: OUTPUT«-1␤»
AlexDaniel ZoffixW: well, in Perl 6 you just use {} :)
ZoffixW AlexDaniel, yeah, I'm not yet convinced that it's a good idea
m: say sqrt -1 18:55
camelia rakudo-moar 680da7: OUTPUT«NaN␤»
18:55 [TDH]rcwolf left
TimToady remember ** is tighter 18:55
18:55 [TDH]rcwolf_alt is now known as [TDH]rcwolf
ZoffixW Ah 18:55
m: say (-1)**0.5
camelia rakudo-moar 680da7: OUTPUT«NaN␤»
ZoffixW That's terrible
18:55 zakharyas joined
ZoffixW m: say (-1+i)**0.5 18:55
camelia rakudo-moar 680da7: OUTPUT«0.455089860562227+1.09868411346781i␤»
TimToady no, you have to opt into complex arithmetic
18:55 xfix joined
ZoffixW m: say (-1+0i)**0.5 18:55
camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17+1i␤»
ZoffixW Fair enough 18:56
diakopter what's the approx thing
dalek ast: cd6ef58 | (Stefan Seifert)++ | S11-compunit/rt126904.t:
Remove obsolete TODO marker - bug is fixed
18:57
AlexDaniel ZoffixW: what makes you think that it might not be a good idea?
dalek kudo/nom: a54024a | (Stefan Seifert)++ | t/spectest.data:
Run testfile for RT126904
ZoffixW diakopter, ≅
Juerd m: Sqrt(-1.Complex).say
camelia rakudo-moar 680da7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uiM4y1SGLu␤Undeclared name:␤ Sqrt used at line 1␤␤»
Juerd m: sqrt(-1.Complex).say
camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17-1i␤»
Juerd Where does the 6e-17 come from?
ZoffixW From how it's calculated 18:58
18:58 Actualeyes left
Juerd Oh, of course! Silly me :) 18:58
diakopter m: sqrt((-1).Complex).say
camelia rakudo-moar 680da7: OUTPUT«6.12323399573677e-17+1i␤»
ZoffixW m: sqrt((-1).Complex) ≅ 0+1i
camelia rakudo-moar 680da7: OUTPUT«Type check failed for return value; expected Bool but got Slip␤ in block <unit> at /tmp/XV8wQzA0yA:1␤␤»
Juerd diakopter: Oh, right.
Still, though.
diakopter Slip??
TimToady complex and fatrats are both contagious types
18:58 firstdayonthejob joined
ZoffixW sits farther away 18:59
How contagious? :)
Hotkeys mutates into a complex number
ZoffixW m: sqrt((-1).Complex) ≅ (0+1i)
camelia rakudo-moar 680da7: OUTPUT«Type check failed for return value; expected Bool but got Slip␤ in block <unit> at /tmp/VAKHNBySeg:1␤␤»
diakopter
.oO( complexes have numbers? )
TimToady NYI I think
ZoffixW *shrug* no idea what it wants from me
Ahhh
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␤␤»
diakopter whateven isSlip
ZoffixW m: sqrt((-1).Complex) == (0+1i)
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…»
ZoffixW m: say sqrt((-1).Complex) == (0+1i)
camelia rakudo-moar 680da7: OUTPUT«False␤»
diakopter useless use of == ?
Juerd diakopter: Slip is the kind of list that flattens into other lists.
Hotkeys class Slip
: A kind of List that automatically flattens into an outer container
ZoffixW diakopter, wasn't it?
diakopter I see
well yeah because the eval bot does some code wrapping 19:01
I think
Juerd m: my $foo = Slip.new(1, 2, 3); say (4, 5, $foo, 6).perl
camelia rakudo-moar 680da7: OUTPUT«(4, 5, 1, 2, 3, 6)␤»
diakopter differenly from the repl mode I mean
[Coke] that generates the same error in the repl
ZoffixW m: 2
camelia rakudo-moar 680da7: OUTPUT«WARNINGS for /tmp/3NwgPNGPaK:␤Useless use of constant integer 2 in sink context (line 1)␤»
Juerd m: my $foo = (1, 2, 3); say (4, 5, |$foo, 6).perl
camelia rakudo-moar 680da7: OUTPUT«(4, 5, 1, 2, 3, 6)␤»
diakopter m: ;
camelia ( no output )
Juerd Guess what | makes :P
diakopter m: 0^0 19:02
timotimo | makes pie?
camelia ( no output )
timotimo diakopter: that's just a junction
ZoffixW Juerd, the torso of a stick figure?
diakopter useless use of junction!
Hotkeys m: my $foo = <1 2 3>; |$foo.WHAT
camelia ( no output )
Hotkeys m: my $foo = <1 2 3>; say |$foo.WHAT
camelia rakudo-moar 680da7: OUTPUT«Cannot look up attributes in a type object␤ in block <unit> at /tmp/ch_ALnpf1s:1␤␤»
ZoffixW m: my $foo = <1 2 3>; say (|$foo).WHAT
camelia rakudo-moar 680da7: OUTPUT«(Slip)␤»
Hotkeys there we go
19:02 zakharyas left
ZoffixW m: -> { my $x = 42; say $x } 19:03
camelia ( no output )
19:04 leont left, zakharyas joined
TimToady that one should probably warn 19:04
19:05 vendethiel joined
TimToady in a useless way... 19:05
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
[Coke] -1
ZoffixW diakopter, yes, there's a whole club who want that :) 19:07
Juerd Or say the return value if the output is empty.
ZoffixW [Coke], why -1?
[Coke] then you can't track "useless use" errors, etc.
19:07 [TDH]rcwolf left
diakopter but yes, the repl should do something different 19:07
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?
ZoffixW (though then, I suppose, everyone will start using it and error will go misssing)
Juerd Come on, .say isn't that much typing :)
[Coke] diakopter: no, it's giving the Slip error.
ZoffixW Juerd, it's not about typing, it's about forgetting to add it
diakopter oh
Juerd ZoffixW: And then typing it :)
TimToady maybe it should give both answers, sink vs wanted
ZoffixW heh 19:09
[Coke] "sqrt((-1).Complex) ≅ 0+1i" behaves the same in camelia & the REPL.
TimToady or pick the more interesting answer :)
NYI I think
skids Typing "say" will sink in eventually, pun intended.
diakopter a smarter evalbot could keep a repl open, per user, within dynamic resource constraints 19:10
(it already must have as much power for single evaluations)
19:10 zjmarlow joined
moritz that would be a terrible default behavior 19:10
diakopter probably yeah 19:11
moritz code doing different things depending on how runs it
Juerd I can see us doing m: ^D all te time
diakopter heh
moritz just autoprinting when the program produced no output confused the heck out of people (me included, occasionally) 19:12
diakopter oh, I didn't know it did that at one point 19:14
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"
camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/P9f1q9UJaM:␤Useless use of constant string "ency" in sink context (line 1)␤»
skids :)
19:17 FreezerburnV joined
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"
camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/R8SD9O9eRQ:␤Useless use of constant string "titanic" in sink context (line 1)␤»
ZoffixW (because it reduces the visibility of said code)
m: "dirty dishes"
camelia rakudo-moar a54024: OUTPUT«WARNINGS for /tmp/vWex6gvu4R:␤Useless use of constant string "dirty dishes" in sink context (line 1)␤»
AlexDaniel ZoffixW: well, why don't you use ‘’ then? 19:19
ZoffixW AlexDaniel, 'cause I had variables too
19:19 zakharyas1 joined
[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?
ZoffixW How?
[Coke] m: say "{pi}"; say '{pi}'
camelia rakudo-moar a54024: OUTPUT«3.14159265358979␤{pi}␤»
[Coke] that, for one.
ZoffixW m: my $foo = 42; say "$foo {pi}"; say '$foo {pi}'
camelia rakudo-moar a54024: OUTPUT«42 3.14159265358979␤$foo {pi}␤»
[Coke] so you want variable interpolation, but not block interpolation? Is that the implication you're making? 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, GLcl
GLclampf) where GLclampf is a float)
ZoffixW [Coke], yes
[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'}’
camelia rakudo-moar a54024: OUTPUT«5 {say 'hello'}␤»
AlexDaniel ZoffixW: ↑
ZoffixW Ah
(Perl 6)++ AlexDaniel++
19:21 zakharyas left 19:22 virtualsue left
ZoffixW FreezerburnV, I think you need to call it with 1e0 19:22
AlexDaniel ZoffixW: design.perl6.org/S02.html#Adverbs_on_quotes
ZoffixW m: say 1e0.WHAT, ' ', 1.0.WHAT
camelia rakudo-moar a54024: OUTPUT«(Num) (Rat)␤»
19:23 spider-mario joined
ZoffixW AlexDaniel, thanks 19:23
FreezerburnV ZoffixW: Ah, thank you!
19:24 espadrine left
ZoffixW Cool, you can specify hashes/arrays to interpolate 19:24
AlexDaniel ZoffixW: yeah, choose your weapon :)
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
AlexDaniel ZoffixW: it is a bit sad though that “macro” stuff is not working
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
[Coke] AlexDaniel: macros "work". 19:26
they're just experimental.
AlexDaniel let's see
FreezerburnV AlexDaniel: I’ll see if I can find the place to add that message today :)
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␤»
AlexDaniel m: use experimental :macros; macro qx { ‘qq:x ’ }; say qx /test/
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␤»
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␤»
ZoffixW :(
"{{{$text}}}" <-- lol those braces :D
b2gills ZoffixW: 「qq:!c"..."」 you can start with full qq behavior and just turn off closures
AlexDaniel b2gills: oh wow! 19:29
ZoffixW m: my $x =42 ; say qq!c/$x {say "neat"}/
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:␤ !␤»
ZoffixW m: my $x =42 ; say qq:!c/$x {say "neat"}/
camelia rakudo-moar a54024: OUTPUT«42 {say "neat"}␤»
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:…»
AlexDaniel m: my $x =42 ; say Qs/$x {say "neat"}/
camelia rakudo-moar a54024: OUTPUT«42 {say "neat"}␤»
AlexDaniel that's much shorter though
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
ZoffixW m: say '❰❱'.».comb 19:36
camelia rakudo-moar a54024: OUTPUT«((❰ ❱))␤»
ZoffixW m: say '❰❱'».comb
camelia rakudo-moar a54024: OUTPUT«((❰ ❱))␤»
ZoffixW .». 19:37
timotimo ».« 19:39
ZoffixW I don't get it :/
Is there a difference between .». and ». ? 19:40
AlexDaniel m: say '❰abc❱'.comb
camelia rakudo-moar a54024: OUTPUT«(❰ a b c ❱)␤»
AlexDaniel m: say '❰abc❱'.comb.perl
camelia rakudo-moar a54024: OUTPUT«("❰", "a", "b", "c", "❱").Seq␤»
ZoffixW m: say '❰abc❱'.comb».perl
camelia rakudo-moar a54024: OUTPUT«("❰" "a" "b" "c" "❱")␤»
ZoffixW m: say '❰abc❱'.comb.».perl
camelia rakudo-moar a54024: OUTPUT«("❰" "a" "b" "c" "❱")␤»
AlexDaniel what's .». ? :) 19:41
ZoffixW I dunno
skids My guess is pretty much there for the same reason as .() 19:42
ZoffixW m: say (* * *).(2, 2)
camelia rakudo-moar a54024: OUTPUT«4␤»
ZoffixW And what reason is it? :) 19:43
AlexDaniel m: say '❰abc❱'.comb ».perl
camelia rakudo-moar a54024: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vGo4pHiAQ7␤Missing « or »␤at /tmp/vGo4pHiAQ7:1␤------> 3say '❰abc❱'.comb ».7⏏5perl␤»
AlexDaniel m: say '❰abc❱'.comb» .perl
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␤»
AlexDaniel m: say '❰abc❱'.comb .».perl
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␤»
AlexDaniel m: say '❰abc❱'.comb. ».perl
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␤»
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
now everybody and their dog wants whitespaces in any postfix position
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.
ZoffixW In fact, before you guys fixed the requirement of unspaces for that, I wasn't even that interested in trying Perl 6 out.
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…»
ZoffixW m: use exeperimental :cached; sub yay($n) is cached { say "woop"; $n+1; } say yay(1); say yay(1);
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␤ …»
ZoffixW m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; } say yay(1); say yay(1);
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:␤ …»
ZoffixW m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
camelia rakudo-moar a54024: OUTPUT«woop␤2␤2␤»
19:49 FROGGS joined
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…»
Ulti :/
ZoffixW weird
Ulti so cached is now experimental?
ZoffixW Ulti, yeah
FROGGS m: use experimental :cached; sub yay($n) is cached { say "woop"; $n+1; }; say yay(1); say yay(1);
camelia rakudo-moar a54024: OUTPUT«woop␤2␤2␤»
ZoffixW And the message should probably mention that fact
As it does for macros
m: macro x ($text){}
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){}␤»
Ulti yup 19:50
especially as it's been around a while
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: rt.perl.org/Ticket/Display.html?id=126936
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
El_Che goodevening
ZoffixW goodafternoon
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
19:54 virtualsue left
jnthn Ulti: So experimental in this case means "you can use it but we *will* change its semantics a bit down the line" 19:54
19:55 pierre-vigier left 19:57 ollej left
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:57
Ulti ahh ok thanks jnthn thats essentially the same as the p5 use 19:58
19:58 ZoffixW left
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:58
19:58 FreezerburnV left
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
Juerd: but I think it's mostly a matter of interface consistency (more)
Juerd moritz: Yes. I originally had that, but then figured that a simple semicolon would be nicer.
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
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 { }
timotimo i expect after "is cached" gets solidified, "use experimental :is-cached" will start giving deprecation messages
20:01 virtualsue joined
moritz what if, in the future, you find a neither way to asynchronously connect without having to start a new thread? 20:01
timotimo: I don't think you can expect deprecation warnings from experimental features
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?
Ulti yeah I guess feature is more enable feature but I dont want to specify perl version
jnthn Juerd: Mostly consistency, including with IO::Socket::Async itself which is also giving you a Promise 20:02
Juerd: Uh, it's connect method I mean
Juerd: I don't feel especially strongly on it
Juerd jnthn: Does start {} return a promise then?
Hm
El_Che use experimental :cached v0.001alpha;
timotimo that's what it does, yeah
Juerd m: (start { }).WHAT.say 20:03
camelia rakudo-moar a54024: OUTPUT«(Promise)␤»
jnthn Juerd: yes
Juerd Ah
I missed that. I guess that consistency makes sense
20:06 cinch joined, prammer left
dalek kudo/nom: aa12a40 | TimToady++ | src/core/Complex.pm:
use better approximately equal algo for Complex
20:06
ast: 5ba241d | TimToady++ | S03-operators/relational.t:
some basic tests that Complex can do approx
20:07
cinch so this channel is pure bot spam?
Juerd cinch: No, not purely that
TimToady a lot of the bot spam is impure
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 :)
timotimo so ... did anybody try golfing "cannot find method run_alt" yet?
jnthn Hotkeys: Anywhere that imports the module (perhaps through doing a use) will get a Baz
nine timotimo: closest is PERL6LIB=lib perl6 --ll-exception -e 'use lib "t/spec/packages"; for <A B> { my $comp-unit = $*REPO.need(CompUnit::DependencySpecification.new(:short-name("Example::$_"))); say $comp-unit.precompiled; };' 20:09
Hotkeys alright, thanks
cinch :-)
timotimo huh? that's where that comes from? o_O
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:10
[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
[Coke] that's why it's experimental.
timotimo how often do i have to run that for it to break?
TimToady m: say sqrt((-1).Complex) ≅ 0+i # is this imaginary bot spam?
camelia rakudo-moar aa12a4: OUTPUT«True␤»
[Coke] *imagines
nine timotimo: for me it breaks reliably. You may have to clean your .precomp directories 20:12
TimToady feel free to fuzz the new ≅
lunch &
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;'
timotimo: yes
timotimo find . -iname '.precomp' reports 0 lines now 20:14
it just reports "True\nTrue\n" for me now 20:15
nine timotimo: and with <C A B> instead of just <A B>?
timotimo let me try
three times True
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
[Coke] anyone running the Inline::perl5 tests?
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
timotimo yeah, i got it in HTTP::UserAgent, too
[Coke] er, any way, if I'm starting from scratch behind a firewall.
20:18 darutoko left
[Coke] I've asked before and gotten no response - how do folks feel about bundling http proxy support in panda? 20:18
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?
nine timotimo: yes, that's what I see in HTTP::UserAgent 20:20
20:20 virtualsue left
moritz [Coke]: I don't care very much either way 20:20
geekosaur lot of businesses still use proxies, yes
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
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.
timotimo hm, right.
[Coke] everything goes through the proxy.
can't even lookup hack.p6c.org via DNS, e.g.
FROGGS nine: if I would be forced to bet I'd say it is about the EVAL in Cursor.pm
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
FROGGS because EVALs at compile time...
Juerd [Coke]: Why did they cripple the network like that?
ChoHag What happens if I call $foo.map({$_}).list
?
[Coke] Juerd: it's a fairly large company.
Juerd So? 20:24
[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
masak ChoHag: is that the whole context of the question? 20:26
m: my $foo = 42; say $foo.map({$_}).list.perl
camelia rakudo-moar aa12a4: OUTPUT«(42,)␤»
masak ChoHag: that's what happens :)
RabidGravy not ideal but it gets people working again
masak m: my $foo = [1, 2, 3]; say $foo.map({$_}).list.perl
camelia rakudo-moar aa12a4: OUTPUT«(1, 2, 3)␤»
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
masak ChoHag: slightly different if it's already a mappable type, as you see.
nine FROGGS: I wonder how we could test your hypothesis
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:27
[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
sounds like "Feel Free" is the response. that's fine.
moritz [Coke]: though for an authorotative answer, ask tadzik++ 20:30
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:32
20:33 zjmarlow left
tadzik well, panda does work with proxies if HTTP::UA is installed 20:33
though I've heard the latter is broken recently
_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.
FROGGS nine: I dunno... checking that we do or do not interpolate variables in regex in CUR related code?
[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:34
masak seems (by tadzik's) answer that's already the case 20:35
at least when everything works
FROGGS tadzik: panda does make use of it?
nine FROGGS: neither IO::Spec::UNIX::canonpath nor the CompUnit::PrecompilationId regex interpolate variables 20:36
Skarsnik it there is an issue with URI, maybe try URI2 in h::ua? 20:37
nine Skarsnik: the issue is definitely with rakudo
geekosaur _nadim, substr-rw 20:38
20:38 maziar joined
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...
(if you need it)
tadzik FROGGS: if it's installed, yes
github.com/tadzik/panda/blob/maste...tem.pm#L87 20:40
Skarsnik should be shipped with panda or star? x)
_nadim geekosaur: thanks, thank I'll avoid sustr-rw as I am replacing regexes to go faster.
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:41
Skarsnik substr and subst should be renamed ~~ 20:42
20:43 autarch joined
RabidGravy so HTTP::UserAgent is working again, I'll try and do a more precise hack tomorrow 20:44
btw it's rt.perl.org/Ticket/Display.html?id=126832 isn't it
Hotkeys Does perl 6 regex have backrefs? it got mad at me for trying to do \1
jnthn TimToady: Today's ticket to rule on: 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, integral joined
jnthn Hotkeys: \1 is written $0 now 20:45
Hotkeys: \2 as $1, etc.
Hotkeys ah
alright, thanks
masak m: /\1/
camelia rakudo-moar aa12a4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xVKLyLTxtQ␤Unrecognized backslash sequence: '\1'␤at /tmp/xVKLyLTxtQ:1␤------> 3/\7⏏051/␤ expecting any of:␤ term␤»
masak huh. 20:46
masak expected an excellent p5->p6 error message :)
FROGGS std: /\1/
camelia std : OUTPUT«No such file or directory»
jnthn Patches welcome ;-)
20:46 virtualsue left
camelia std : OUTPUT«(timeout)cat: /home/camelia/std/snap/revision: No such file or directory␤» 20:46
20:50 psy_ left
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:53
20:54 virtualsue joined, regreg left
jnthn TimToady: So, the ticket survives, but as a "not this xmas" one? :) 20:55
TimToady yeah 20:56
20:56 regreg joined
jnthn OK 20:56
That gets us under 10 :)
TimToady it's a WBNI
IWBNI
20:56 zakharyas1 left
ilmari TimToady: was there a ruling on oversize/negative bitshift for native ints? implementation-specified? 20:57
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
Hotkeys m: Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
camelia rakudo-moar aa12a4: OUTPUT«[DISLOCATED MESSAGE] Useless use of sm_result_1 symbol in sink context␤»
Hotkeys m: say Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
Hotkeys how do I match the <!after ...> only for the immediately preceding character
?
jnthn I think the metal does nasal demons... :)
ilmari TimToady: js and java both have defined behaviour for it, only C is UB
20:58 zakharyas joined
jnthn ilmari: Do you know what price they pay for it, ooc? 20:58
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"
TimToady well, we could require it if the CPU supports it :)
ilmari but it varies between CPUs, so C leaves it undefined
20:59 gugod left
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
21:00 smash left
ilmari jnthn: github.com/ilmari/MoarVM/commit/7b...9dd306bc8c 21:00
that gives moar the same behaviour as perl5
jnthn That's quite some overhead over a single CPU instruction. 21:01
21:02 cinch left
jnthn Is our behavior on Int sane? 21:02
We have the flexibility to decide differently on Int vs int
21:02 roguelazer left
TimToady more or less what I said, yeah 21:02
diakopter well the JIT behavior is pretty rudimentary
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
jnthn TimToady: BTW, I looked into 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:03
FROGGS nine: damn 21:04
jnthn TimToady: I'm currently working on rt.perl.org/Ticket/Display.html?id=124084 and rt.perl.org/Ticket/Display.html?id=124294
Where currently means "I'm a bit too tired to do any more today, but I started" :)
ilmari m: say 1 << -65
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␤»
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
camelia rakudo-moar aa12a4: OUTPUT«0␤»
nine FROGGS: yes 21:06
21:06 psy_ joined
ilmari m: say 4 +< -2 21:06
camelia rakudo-moar aa12a4: OUTPUT«1␤»
nine FROGGS: if that doesn't trigger it just running test test suite should
Hotkeys Anyone know how I can do a single character lookbehind in perl 6? 21:07
m: say Q|eaebeced\efegeh| ~~ /( <!after [\\]> e<[a..z]> )+/
camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
Hotkeys I want this to match everything except \ef
diakopter m: say 4 +< 9999999999999999999 21:08
camelia rakudo-moar aa12a4: OUTPUT«2␤»
diakopter \o/
FROGGS m: say Q|eaebeced\efegeh| ~~ /( <!before [\\]> e<[a..z]> )+/
camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「ea」␤ 0 => 「eb」␤ 0 => 「ec」␤ 0 => 「ed」␤»
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
ShimmerFairy Hotkeys: seems to work, you just didn't specify what to do after you encounter a \
Hotkeys oh
FROGGS m: say Q|eaebeced\efegeh| ~~ /( <!before \\e<[a..z]>> . )+/
camelia rakudo-moar aa12a4: OUTPUT«「eaebeced」␤ 0 => 「e」␤ 0 => 「a」␤ 0 => 「e」␤ 0 => 「b」␤ 0 => 「e」␤ 0 => 「c」␤ 0 => 「e」␤ 0 => 「d」␤»
Hotkeys I see
masak Hotkeys: if you want it to find all occurrences like you describe, consider using .comb
ShimmerFairy (or even once you encounter a \ )
jnthn nine: One is about ints, one about nums :)
moritz Hotkeys: ... or maybe just .split on '\ef' ?
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 :)
jnthn (Which I fixed, but now I have to fix eveything else :))
ilmari m: say 4 >> -1
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␤»
masak m: say Q|eaebeced\efegeh|.comb(/<!after [\\]> e<[a..z]>/)
camelia rakudo-moar aa12a4: OUTPUT«(ea eb ec ed eg eh)␤»
ilmari m: say 4 +> -1
camelia rakudo-moar aa12a4: OUTPUT«8␤»
21:10 cdg joined, administ1ator left
Hotkeys masak: that's fancy 21:10
masak yeah, I like .comb
21:10 cdg left
FROGGS ==> Installing MIME::Base64 21:11
Internal error: zeroed target thread ID in work pass
uff
21:11 cdg joined
jnthn o.O 21:11
21:11 virtualsue left
FROGGS that was when trying to install MIME::Base64 21:11
jnthn That's ungood.
FROGGS most likely 21:12
masak compiler release tomorrow? :P
diakopter double plus ungood
dalek ast: 1d7b816 | usev6++ | S11-modules/require.t:
Revert "Remove troublesome "use lib '.'""

This reverts commit 6bafc9245c10ba70012beae208ba30847f398b2a.
That "use lib '.'" no longer causes problems. Test file should not cause an abort any longer.
FROGGS I guess it picks up old precomped things or so
jnthn Still should never explode in that way 21:13
FROGGS t/030-cookies.t ............ ===SORRY!===
Failed to open file /home/froggs/dev/nqp/install/share/perl6/site/dist/B86EDFCF9E4D0C0EED4FAD8E9266DB077567DA8A: no such file or directory
jnthn should get some rest, so he can fix more stuffs tomorrow
diakopter jnthn: at least it didn't segv :P
jnthn diakopter: True :) 21:14
'night, #perl6
raiph o/
ShimmerFairy FROGGS: ooc, does such a file or directory exist? :)
Skarsnik precompiled stuff x) 21:15
FROGGS ShimmerFairy: no idea, I cleaned the directories right now :o)
ShimmerFairy FROGGS: So I guess the answer is "now it doesn't!" ? :P
21:16 colomon left
FROGGS exactly *g* 21:16
21:18 pecastro left 21:21 zjmarlow left
FROGGS nine: now I can reproduce 21:21
21:23 M-eternaleye is now known as eternaleye, zjmarlow joined 21:24 balazs left
dalek kudo/nom: b6373d5 | moritz++ | src/core/Supply.pm:
Fix error reporting from Suppy.quit

this changes the UDP error on linux from "Unexplained error" to "Unknown system error", which is not really that much more helpful
  (but the fix is still worth it on its own)
21:24
21:25 firstdayonthejob left 21:26 redhands joined 21:29 zjmarlow left 21:30 geraud joined
moritz jnthn: looking at S32-io/IO-Socket-Async-UDP.t, I'm surprised it works at all 21:33
jnthn: the Listener $sock and $tap go out of scope immediately after being set up
jnthn: what keeps the socket alive? 21:34
geekosaur jnthn went to bed
moritz oh
I could imagine it's being kept alive by the lack of a GC run in between :-) 21:37
21:37 colomon joined
moritz oh fun, "Unknown system error" comes from libuv when it can't map the error number to a string 21:44
I am tempted to say that there's a libuv error involved
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.
stmuk moritz: I assume you are using hoelzro's nread patch? 21:47
moritz stmuk: I don't even know what that is :-) 21:48
hoelzro forgot to push it =/
stmuk irclog.perlgeek.de/perl6/2015-12-15#i_11722965
hoelzro I have a fix in MoarVM and roast at home
just need to push
ShimmerFairy m: say 10**-1 # boo 21:49
camelia rakudo-moar b6373d: OUTPUT«0.1␤»
hoelzro the fixes are trivial; +1/-1 line in Moar, +2 to roast
ShimmerFairy huh, fails here. Hm.
21:49 zengargoyle left
stmuk hoelzro: did you change the test scope? 21:49
moritz hoelzro: ok, then I won't sink moar time into this issue :-)
hoelzro you just need to check nread >= 0 in MoarVM, and if $chars.chars > 0 { #`(keep promise) } in the UDP test
;)
stmuk ah
diakopter ShimmerFairy: that should arguably return a Rat 21:50
hoelzro stmuk: are you in #moarvm?
21:50 zengargoyle joined
hoelzro I figured out why we get the second callback with nread=0 21:50
stmuk yes
ShimmerFairy diakopter: I would think it does :)
say (10**-1).WHAT
diakopter oh, yes.
ShimmerFairy m: say (10**-1).WHAT
camelia rakudo-moar b6373d: OUTPUT«(Rat)␤»
hoelzro apparently libuv uses nread=0 to indicate an empty datagram OR as a signal that the buffer is ok to discard
moritz: the error handling surrounding that issue was definitely LTA 21:51
I would like to improve that, if I have tuits
moritz hoelzro: well, at least I improved the Rakudo side just now :-)
hoelzro \o/
moritz++
21:51 Begi left
hoelzro does uv_strerror(0) return "Unknown system error"? 21:52
ShimmerFairy m: say 10**−1 # guess the problem :P
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␤»
hoelzro I wish it did something like "actually it succeeded"
moritz hoelzro: yes, which rakudo now reports (instead of "unexplained error")
masak .u −
yoleaux U+2212 MINUS SIGN [Sm] (−)
geekosaur sees an emdash...
ah
moritz sees an ambush
geekosaur too many kinds of middlebars, clearly 21:53
AlexDaniel .u -
yoleaux U+002D HYPHEN-MINUS [Pd] (-)
masak those two do look different on my screen...
hoelzro moritz: did you manage to coax a stack trace out of that issue?
masak enough that I notice
geekosaur hyphen em-dash en-dash minus-sign 5-bar ...
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
AlexDaniel geekosaur: still less than the number of spaces
21:53 zjmarlow joined 21:54 redhands left
moritz hoelzro: nope 21:54
AlexDaniel geekosaur: www.cs.tut.fi/~jkorpela/chars/spaces.html # wheeeee!
geekosaur sp[ae]cious
moritz hoelzro: it's not a real exception; it sends .quit to a Supply
RabidGravy are the docs being built? github.com/perl6/doc/commit/4883a7...d4812a11bf isn't in there? 21:56
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
stmuk RabidGravy: I think the docs process is still broken 21:59
22:00 maziar left, lostinfog joined 22:01 kaare_ left, zakharyas left, zjmarlow left 22:02 kid51 joined
RabidGravy boo! 22:02
stmuk I could try 'no precompilation' a bit on tomorrow since I'm about to Stars Wars soon 22:07
maybe that would temporarily fix it
22:08 skids left 22:09 colomon left, Zoffix joined
hoelzro ahhhh 22:10
moritz RabidGravy: doc.perl6.org/build-log/build-2015-...5+0000.log looks like "no"
Cannot unbox a type object in method lookup at /home/doc.perl6.org/doc/lib/Perl6/Documentable/Registry.pm:26 22:11
RabidGravy boo
22:13 AlexDaniel left, firstdayonthejob joined
RabidGravy I'll try and look at it in the morning 22:15
dalek kudo/nom: 33ac495 | TimToady++ | src/Perl6/Actions.nqp:
subs should want their return value, duh
22:20
lichtkind good night 22:22
22:22 lichtkind left
TimToady that fixes: sub a { "$_ $_" given 42 } 22:22
22:23 zjmarlow joined
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:27
22:28 colomon joined 22:29 Zoffix left, Zoffix joined 22:30 zjmarlow left, xfix left
Zoffix m: say (permutations 100).elems 22:38
camelia rakudo-moar 33ac49: OUTPUT«93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000␤»
Zoffix 0.o
it does that many permuations that fast? wow
m: my @a = permutations 100; say @a.elems 22:39
Ah, it's a lazy list? How does it know how many .elems it got in it?
camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
Zoffix Oh wait.. never mind me. 22:40
I'm confused on what the first giant number represents then
Or is it smart enough to compute the total number of permutations there is
22:41 TEttinger joined
masak advent blog post for tomorrow scheduled. 22:41
Zoffix masak++
masak you can pre-peek at it here: wordpress.com/post/perl6advent.wor...s.com/4400 (if you have advent privs)
gfldex i peeked already and i learned something new 22:42
masak :)
RabidGravy :)
22:43 raiph left
gfldex Zoffix: see github.com/rakudo/rakudo/blob/ba27...ay.pm#L729 22:43
Zoffix gfldex, ah :) I see :) 22:44
kinda makes me wonder why my @a = permutations 100; say @a.elems doesn't just call that method count-only 22:46
22:47 lucasb joined
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:47
gfldex m: my $a = permutations 100; say $a.elems 22:48
camelia rakudo-moar 33ac49: OUTPUT«93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000␤»
gfldex Zoffix: it's calling the wrong count-only
Zoffix I see
ShimmerFairy masak: six years worth of posts + lack of search bar :P
lucasb if permutations knows how many elements it has, then why not put it in combinations too? is that possible?
Zoffix lucasb, yes 22:49
lucasb grondilu: ^^ can you use your math skillz to add it to combinations? :)
Zoffix m: say (combinations 100).elems
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␤»
masak ShimmerFairy: I opened up the "table of contents" label, and searched among the blog post titles. 22:50
22:50 Sqirrel left, raiph joined
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 :)
masak ShimmerFairy: it's an internal post tagging system in WordPress.
ShimmerFairy ah
22:51 rurban left
ShimmerFairy masak++ # good post :) 22:52
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␤»
Zoffix gfldex, ^^ if you're going to ad it
*add
(if not, I could give it a go 22:54
)
22:54 zjmarlow joined
Zoffix hm 22:54
It's wrong tho 22:55
22:55 rurban joined
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␤»
Zoffix m: my ($n1, $n2) = 1, 2; say (combinations $n1, $n2).elems; say (([*] 1..$n1)/(([*] 1..$n2)*([*] 1..($n1-$n2)))).Int
camelia rakudo-moar 33ac49: OUTPUT«0␤0␤»
gfldex Zoffix: i'm going to add my self to me bed. The code is all yours.
Zoffix \o/
Sleep well :)
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
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:57
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?
ShimmerFairy RabidGravy: I'll try a make clean in rakudo then :) 23:00
23:00 zjmarlow left, b7j0c left
cognominal .u « 23:00
yoleaux U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK [Pi] («)
ShimmerFairy RabidGravy: I haven't updated in several days, so it's very possible I still had/have problematic files around :)
RabidGravy :) 23:01
lichtkind my fault
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:02
dalek kudo-star-daily: 487b013 | coke++ | log/ (8 files):
today (automated commit)
23:04
23:05 Skarsnik left
ShimmerFairy RabidGravy: still fails, but I'll clear out the relevant files in /usr/local, where the backtrace points for me 23:05
23:05 zjmarlow joined
masak 'night, #perl6 23:05
lichtkind good night masak 23:06
23:06 RabidGravy left
_nadim good night all 23:06
ShimmerFairy that worked, I just needed to delete /usr/local/share/perl6/ :) 23:08
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
The match succeeds, but the output is Use of Nil in string context in block <unit> at -e:1
num:
zengargoyle /mark 23:12
Zoffix /mark
oops
What's /mark?
ShimmerFairy Zoffix: I'm going to guess the red line you get in things like Hexchat 23:13
Zoffix heh 23:14
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␤»
lucasb zjmarlow: I don't know the IO API very well... maybe it's something with IO::Path basename?
23:15 snarkyboojum joined
Zoffix masak++ # It goes without saying that this is a situation up with which Perl 6 will not put 23:15
:) 23:16
23:17 rindolf left
Zoffix huh 23:18
m: my $s = '12345'; say $s ~~ /^ ** 5 $/;
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 $/;␤»
Zoffix m: my $s = '12345'; say $s ~~ /^ . ** 5 $/;
camelia rakudo-moar 33ac49: OUTPUT«「12345」␤»
Zoffix oh, I thought there was magic.
masak, ^ seems there's an error in your post code 23:19
23:19 spider-mario left
lucasb In the last TimToady commit, he used "elsif ... || False { ... }". I wonder why the "|| False" was needed there... 23:21
masak Zoffix: oh -- another HTML angle brackets casualty. thanks for catching ahead of time. Zoffix++ 23:22
ShimmerFairy seriously, we should consider an alternate blogging platform for the next advent o_- 23:23
Zoffix yeah
masak Zoffix: fix'd.
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.
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"
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++ }
camelia rakudo-moar 33ac49: OUTPUT«0␤1␤2␤3␤4␤»
Zoffix way cool
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.
Zoffix masak++ # I didn't know about "repeat" before your post :)
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)
masak I should really have used my q&d markdown-to-broken-WordPress-HTML converter instead :)
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
Hotkeys Zoffix: I disapprove of your churchill reference
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)
Hotkeys with the preposition nonsense
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.
ShimmerFairy masak: I thought "December" was for P6, and "November" was named to take the closest available month :P
Hotkeys I know
Zoffix :)
Hotkeys that's why I disapprove
masak ShimmerFairy: my ideal (which I was only reminded of just now) is writing in Markdown, and then converting.
dalek blets: 4cc23d5 | (Herbert Breunung)++ | docs/appendix-e-exciting.txt:
repare bitrot in examples
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"
which, in retrospect, there was
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
diakopter giggle
masak Hotkeys: the 17th is for the compiler.
camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
masak really 'night
Hotkeys ah
what is christmas then 23:30
Zoffix Hotkeys, Perl 6 the language spec
Hotkeys oic
23:31 snarkyboojum left
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)) )␤»
Zoffix m: my ( $n, $k ) = 4000, 2; say ( ([*] 1..$n) / (([*] 1..$k) * ([*] 1..$n-$k)) ).Int; say now - INIT now
camelia rakudo-moar 33ac49: OUTPUT«7998000␤0.3285333␤»
Zoffix m: my ( $n, $k ) = 4000, 2; say ( combinations $n, $k ).elems
k.. looks like my fix is sane 23:32
camelia rakudo-moar 33ac49: OUTPUT«(timeout)»
Zoffix Submitted my PR to make (combinations blah blah).elems compute fast same as (permutations blah).elems: github.com/rakudo/rakudo/pull/635/files 23:35
Time for some gaming \o/ 23:36
23:36 Zoffix left
[Coke] the compiler release is probably also on xmas. 23:40
23:45 hankache left 23:46 rurban left 23:48 pdcawley left
zengargoyle Zoffix: /mark is github.com/mjholtkamp/irssi-trackbar -- marks a position and lets you jump back to it later to catchup on backlog. 23:51
23:56 lostinfog left, Psyche^ joined 23:59 [particle] left