Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 raschipi Can also mean any language that's not a low-level one, which would be an assembler.
00:32 Cabanossi joined #perl6
01:03 Geth ¦ ecosystem: 147e3a9538 | (Tom Browder)++ | META.list
01:03 Geth ¦ ecosystem: make maintenance easier
01:03 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/147e3a9538
01:15 u-ou- joined #perl6
01:22 u-ou- joined #perl6
01:27 skids joined #perl6
01:31 committable6 joined #perl6
01:31 quotable6 joined #perl6
01:31 nativecallable6 joined #perl6
01:31 coverable6 joined #perl6
01:31 bisectable6 joined #perl6
01:31 bloatable6 joined #perl6
01:31 greppable6 joined #perl6
01:31 releasable6 joined #perl6
01:31 evalable6 joined #perl6
01:31 unicodable6 joined #perl6
01:32 benchable6 joined #perl6
01:32 statisfiable6 joined #perl6
01:32 squashable6 joined #perl6
01:42 mcmillhj joined #perl6
01:49 mcmillhj_ joined #perl6
01:51 ilbot3 joined #perl6
01:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:51 dj_goku joined #perl6
01:53 mcmillhj joined #perl6
01:57 itaipu joined #perl6
02:00 cdg joined #perl6
02:17 mcmillhj joined #perl6
02:20 noganex joined #perl6
02:44 brimonk_ joined #perl6
03:01 kyan joined #perl6
03:02 Cabanossi joined #perl6
03:07 u-ou- joined #perl6
03:07 u-ou- I have an Int and want to make an int32 out of its value. How do I do that?
03:16 u-ou- m: int32.new(1).WHAT.say
03:16 camelia rakudo-moar 4b02b8: OUTPUT: «(Int)?»
03:16 u-ou- :I
03:22 u-ou- OK that wasn't even my problem I was just missing an argument
03:22 u-ou- the conversion seems to happen automatically now
03:49 mcmillhj joined #perl6
03:51 samcv ugexe, use a typed variable
03:51 samcv m: my int32 $thing = 10; say $thing.WHAT
03:51 camelia rakudo-moar 4b02b8: OUTPUT: «(Int)?»
03:51 samcv also yes the conversion happens when you display it
03:51 samcv it's still an int32 though
03:53 AlexDaniel uhhhh int32…
03:54 AlexDaniel (RT #131994)
03:54 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131994
04:01 Cabanossi joined #perl6
04:03 Cabanossi joined #perl6
04:06 Cabanossi joined #perl6
04:09 samcv well
04:09 samcv m: my int64 $a; say $a.WHAT
04:09 camelia rakudo-moar 4b02b8: OUTPUT: «(Int)?»
04:09 samcv m: my int16 $a; say $a.WHAT
04:09 camelia rakudo-moar 4b02b8: OUTPUT: «(Int)?»
04:09 samcv m: my int16 $a = 999999; say $a.WHAT; say $a
04:09 camelia rakudo-moar 4b02b8: OUTPUT: «(Int)?16959?»
04:10 zakame joined #perl6
04:15 cdg joined #perl6
04:17 lizmat afk until probably much later today&
04:36 zakame joined #perl6
05:16 Cabanossi joined #perl6
05:21 domidumont joined #perl6
05:28 domidumont joined #perl6
05:48 nadim_ joined #perl6
05:59 wamba joined #perl6
06:01 Cabanossi joined #perl6
06:03 KDr2__ joined #perl6
06:07 ufobat joined #perl6
06:12 espadrine joined #perl6
06:16 lowbro joined #perl6
06:16 lowbro joined #perl6
06:31 Cabanossi joined #perl6
06:33 abraxxa joined #perl6
06:41 leont joined #perl6
06:50 domidumont joined #perl6
06:55 ChoHag joined #perl6
06:55 darutoko joined #perl6
07:01 Cabanossi joined #perl6
07:31 Cabanossi joined #perl6
07:38 TimToady joined #perl6
07:39 dakkar joined #perl6
07:52 sproctor joined #perl6
07:56 nattefrost joined #perl6
07:57 sproctor joined #perl6
07:58 sproctor joined #perl6
07:59 sproctor left #perl6
08:00 sproctor joined #perl6
08:01 Cabanossi joined #perl6
08:01 zakharyas joined #perl6
08:02 jonas1 joined #perl6
08:18 wamba joined #perl6
08:25 TreyHarris joined #perl6
08:31 Cabanossi joined #perl6
08:31 shady0wl_ joined #perl6
08:33 pmurias joined #perl6
08:42 rurban joined #perl6
08:43 domidumont joined #perl6
09:01 Cabanossi joined #perl6
09:03 Sound joined #perl6
09:13 Skarsnik joined #perl6
09:18 Ven`` joined #perl6
09:20 Ven`` wow, I stop looking for a few days, and we now have a JSX slang :o. pmurias++
09:21 Ven`` Not me.
09:22 pmurias joined #perl6
09:25 Sgeo joined #perl6
09:31 Cabanossi joined #perl6
09:48 pmurias joined #perl6
09:58 ChoHag joined #perl6
10:00 matthias__ joined #perl6
10:03 zakharyas joined #perl6
10:16 robertle joined #perl6
10:26 ShalokShalom_ joined #perl6
10:29 lowbro joined #perl6
10:29 lowbro joined #perl6
10:31 Cabanossi joined #perl6
10:39 Gothmog_ joined #perl6
10:39 BooK surely perl6 has an equivalent for AUTOLOAD?
10:40 moritz BooK: look for FALLBACK in the docs
10:40 timotimo that's only for methods on classes, though. not for packages in general
10:40 timotimo (because we don't use package lookup for method dispatch in perl6)
10:44 someuser joined #perl6
10:48 BooK thanks
10:52 sftp joined #perl6
10:55 eliasr joined #perl6
11:01 pmurias m:
11:18 rindolf joined #perl6
11:18 piojo2 joined #perl6
11:22 BooK timotimo: if I wanted to add a small section about it in a 5to6 page on doc.perl6.org, which one would that be?
11:23 BooK since there's no 5to6-perlobj, I was thinking maybe 5to6-nutshell#Functions
11:24 sena_kun joined #perl6
11:24 moritz or start a 5to6-perlobj :-)
11:25 BooK I was afraid someone would say that :-)
11:25 moritz moritz: speaking out loud what everybody else was sensible enough not to say since around 1988 :-)
11:34 BooK it's just that he perlobj toc is scary if you have to write it in perl6 :-)
11:34 domidumont joined #perl6
11:39 moritz it doesn't need to be complete by any measure
11:44 BooK what about I make a file with all the headers, fill in the AUTOLOAD one, and let someone else figure it out ?
11:44 BooK An Object is Simply a Data Structure / A Class is Simply a Package / A Method is Simply a Subroutine # the first three sound like fun
11:45 moritz Objects are Instances of Classes / Classes are Firs-Class Citizen / Methods Are A Real Thing :-)
11:49 Skarsnik hm, what is the clever to give a replacement pattern in a conf file (something that get EVAL)? I want to pass something like 'LibFoo::*::Binding' and have the * replaced?
11:51 rurban joined #perl6
11:51 moritz where does the replacement come from?
11:51 moritz from within the config file? or from the application?
11:52 Skarsnik the app
11:53 Skarsnik I mean I can do a s/*/$stuff/ probably
11:54 moritz then do it
11:54 moritz nothing easier than that
11:58 nksr joined #perl6
12:01 [Coke] MasterDuke: I know that HLL means "High Level Language" it doesn't make sense in terms of the text I was referring to.
12:02 [Coke] Sorry I was not clear.
12:03 [Coke] (the only HLL here that it could mean is Rakudo. And this is on the docs site and we're talking about Perl 6 already.
12:04 nksr joined #perl6
12:04 nksr JOIN
12:05 Zoffix Join successful
12:05 Skarsnik hm, is there a concensus about circular dependancy btw?
12:06 Zoffix I thought it was something impossible; 'cause one-pass-parse and what not
12:06 [Coke] Skarsnik: https://github.com/perl6/doc/issues/1419 ?
12:07 committable6 joined #perl6
12:07 Skarsnik I had legit need for circular dependancy in Discord, since I like to type thing
12:09 moritz it's possible within a compunit
12:09 jnthn I think the general principle is that if two things are so tightly related as to have a circular dependency, they probably belong in the same compilation unit. Thus there's ways to handle circular deps within a compilation unit, but not between them.
12:10 moritz I don't like that restriction, but there are hard technical problems to solve if we want to lift that
12:10 * jnthn kinda likes it
12:10 moritz any IMHO it's not worth the effort, compared to other areas we can put effort in
12:10 * Zoffix is neutral about it
12:11 Skarsnik I think last time I tried it stuck rakudo in an infinite loop
12:11 Zoffix The first time I came across it, I just dropped type contraints and moved on :P (gradual typing)++
12:11 Zoffix Skarsnik: there should be a mechanism preventing that and complaining about circular dependency. If it hangs again, that's a bug
12:12 nksr better make mediator to avoid cir...deps
12:12 Skarsnik_ joined #perl6
12:13 Skarsnik_ https://github.com/Skarsnik/perl6-discord/blob/master/lib/Discord/User.pm6 some field need Discord::Channel but Discord::Channel need Discord::User x)
12:14 Skarsnik_ full typing is usefull for IDE for example
12:18 nksr up vote 2 down vote For purely object-oriented code, there is no circular dependency problem. You can quite happily have something like:  # AAAA.pm package AAAA; use strict; use warnings; use BBBB; sub new {     my $class = shift;     my ($i) = @_;     bless {         b => $i > 0 ? BBBB->new($i-1) : $i     }, $class; } 1;  # BBBB.pm package BBBB; use strict; use warnings; use AAAA; sub new {     my $class = shift;     my ($i) = @_;
12:18 nksr https://stackoverflow.com/questions/27093514/is-a-cyclic-dependency-solved-with-require
12:18 nksr soory dooooooddddd.....
12:19 nksr the link may help you
12:20 Skarsnik it's for perl5 code x)
12:21 nksr k
12:21 Skarsnik maybe beable able to write 'class B {*}; class A { blablalb}'  could be a workaround?
12:26 raschipi joined #perl6
12:27 rurban1 joined #perl6
12:28 rurban2 joined #perl6
12:31 Cabanossi joined #perl6
12:32 Zoffix Skarsnik: what does {*} do in that case?
12:33 Skarsnik dunno, like with NC native routine. 'this is not real code, but something elsewhere'?
12:33 Zoffix Looks to be just a * as a term inside class's body.
12:34 Zoffix Skarsnik: we have class B {…} where you can provide the body elsewhere in the file, but that doesn't solve the problem if it's in another file.
12:35 Zoffix And the * doesn't seem to be needed in NC routines. I don't know why people put it in. The {*} is a thing in protos tho
12:35 Zoffix m: use NativeCall; sub fork is native {}; fork; $*PID.say
12:35 camelia rakudo-moar 4b02b8: OUTPUT: «20800?20798?»
12:36 Zoffix m: proto foo { say "before"; {*}; say "after }; multi foo { say "?"
12:36 camelia rakudo-moar 4b02b8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Missing block?at <tmp>:1?------> 3; {*}; say "after }; multi foo { say "?"7?5<EOL>?    expecting any of:?        postfix?        statement end?        statement modifier?        state…»
12:36 Zoffix m: proto foo { say "before"; {*}; say "after }; multi foo { say "?" }; foo
12:36 camelia rakudo-moar 4b02b8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unable to parse expression in double quotes; couldn't find final '"'?at <tmp>:1?------> 3say "after }; multi foo { say "?" }; foo7?5<EOL>?    expecting any of:?        horizontal whitespace…»
12:37 Zoffix m: proto foo { say "before"; {*}; say "after" }; multi foo { say "?" }; foo
12:37 camelia rakudo-moar 4b02b8: OUTPUT: «before???after?»
12:37 Zoffix m: proto foo { {*}; say "before"; {*}; say "after"; {*} }; multi foo { say "?" }; foo
12:37 camelia rakudo-moar 4b02b8: OUTPUT: «??before???after???»
12:37 Zoffix ^_^
12:37 itaipu joined #perl6
12:40 Zoffix m: proto foo { {*} xx {*} }; multi foo { "?".say but 70 }; foo
12:40 camelia rakudo-moar 4b02b8: OUTPUT: «????»
12:40 Zoffix kinda expected it to make 70 hearts
12:40 Zoffix or 71 rather
12:43 Zoffix Ah, it's coercing to Num
12:43 jnthn m: proto foo { {*} xx {*} }; multi foo { "?".say; 70 }; foo
12:43 camelia rakudo-moar 4b02b8: OUTPUT: «????????????????????????????????????????????????????????????????????????????????????…»
12:43 Zoffix m: proto foo { {*} xx {*} }; multi foo { "?".say but role { method Num { 70e0 } } }; foo
12:43 camelia rakudo-moar 4b02b8: OUTPUT: «????»
12:43 jnthn Numeric maybe?
12:44 jnthn Oh but
12:44 jnthn .say returns Bool
12:44 Zoffix m: proto foo { {*} xx {*} }; multi foo { "?".say but role { method Num { 70e0 }; method Int { 70 } } }; foo
12:44 camelia rakudo-moar 4b02b8: OUTPUT: «????»
12:44 jnthn Bool
12:44 jnthn is an Int
12:44 jnthn as it's an enum
12:44 jnthn So it'll just go and unbox the 1
12:44 Zoffix It goes through Num() coercer here: https://github.com/rakudo/rakudo/blob/4b02b8aad/src/core/List.pm#L1507
12:45 Zoffix And then gets .Int called on it
12:45 jnthn There's an Int candidate below: https://github.com/rakudo/rakudo/blob/4b02b8aad/src/core/List.pm#L1517
12:45 Zoffix Oh
12:45 Zoffix s: &infix:<xx>, \(42, ("42".uc but 42))
12:45 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/4b02b8aad/src/core/List.pm#L1507
12:46 Zoffix I used ^ that because .say interfered with the bot :P
12:46 Zoffix s: &infix:<xx>, \(42, ("42".so but 42))
12:46 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/4b02b8aad/src/core/List.pm#L1517
12:46 Zoffix *phew* mistery solved :)
12:46 * jnthn returns to his spesh mystery :)
12:50 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: f4cd255c17 | rafaelschipiura++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
12:50 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: Mention importance of closing handles in 5to6
12:50 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: review: https://github.com/perl6/doc/commit/f4cd255c17
12:50 BooK jnthn: actually Bool is not realy an enum, but faking it well (from what I've seen/understood of the code)
12:50 Geth ¦ doc: rafaelschipiura++ created pull request #1537: Mention importance of closing handles in 5to6
12:50 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1537
12:50 jnthn m: say Bool.HOW.^name
12:50 BooK or, is an enum in a different way than other enums :-)
12:50 camelia rakudo-moar 4b02b8: OUTPUT: «Perl6::Metamodel::EnumHOW?»
12:51 jnthn It needs a bit of bootstrap screwery, but it really is using the enum meta-object :)
12:51 jnthn It used to be much more cheaty
12:51 BooK m: say Bool.enums; say Order.enums
12:51 camelia rakudo-moar 4b02b8: OUTPUT: «{False => 0, True => 1}?Map.new((:Less(-1),:More(1),:Same(0)))?»
12:52 jnthn Hm, interseting discrepancy
12:52 BooK nine is going to show me around on Thursday evening, this is on my map
12:52 jnthn :)
12:53 BooK the rough plan is to see if we can make Bool do the Enumeration role
12:54 jnthn Aha
12:54 BooK the real plan is that I know more at the end than I did at the beginning :-)
12:54 Altreus can someone confirm my understanding here? In the docs for but, it gives this example: «say 42 but 'forty two';» Does this take 'forty two'.^name, which is Str, then override 42.Str with that, so that say calls 42.Str and actually gets the object we butted it with?
12:54 jnthn Altreus: Yes
12:54 Altreus ace
12:54 Altreus thanks :)
12:54 jnthn Or something like that
12:55 Altreus say calls .gist, right? so it's probably .gist calling .Str
12:55 BooK perl6 is really handwavy :-)
12:55 evalable6 Altreus, rakudo-moar 4b02b8aad: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/fnSQjv4agP?Bogus p…»
12:55 evalable6 Altreus, Full output: https://gist.github.com/cdd583b99fd4c667d900781d579ccfd9
12:55 Altreus no thank you eval bot
12:55 jnthn Actually, almsot exactly that: https://github.com/rakudo/rakudo/blob/f1b086308de6016753ffc81c98d924c8d46f1cbe/src/core/operators.pm#L84
12:56 jnthn s/almost// :)
12:56 raschipi Altreus: In the other hand, it's written in Perl6, so after learning Perl6 you can go and easily know exactly what's happening.
12:58 Altreus Yeah once I understand it all fully I can finally start to learn it
12:58 Zoffix say calls .Str on the object we butted it with, not on 42 :)
12:58 evalable6 Zoffix, rakudo-moar 4b02b8aad: OUTPUT: «(exit code 1) ===SORRY!===?Argument to "say" seems to be malformed?at /t…»
12:58 evalable6 Zoffix, Full output: https://gist.github.com/f316a20bdf419285f0339300475ea122
12:58 Zoffix evalable6: shoo!
12:58 evalable6 Zoffix, rakudo-moar 4b02b8aad: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/cw37llz1IJ?Bogus p…»
12:58 evalable6 Zoffix, Full output: https://gist.github.com/f500e8cd21ffadc8fb40af61433d8752
13:00 Zoffix m: { Bool.enums<bar> = 42 }; say Bool.enums
13:00 camelia rakudo-moar 4b02b8: OUTPUT: «{False => 0, True => 1, bar => 42}?»
13:01 Zoffix m: enum Foo <a b c>; Foo.enums.^name.say
13:01 camelia rakudo-moar 4b02b8: OUTPUT: «Map?»
13:02 Zoffix Easy fix. Just need a .Map on here: https://github.com/rakudo/rakudo/blob/nom/src/core/Bool.pm#L37 same as it's here: https://github.com/rakudo/rakudo/blob/4b02b8aad/src/core/Enumeration.pm#L6
13:02 Zoffix Who wants to do it? :D
13:04 Zoffix cd $(mktemp -d); git clone https://github.com/rakudo/rakudo/ . ;  edit src/core/Bool.pm ; perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make install; make test; make spectest; git commit src/core/Bool.pm -m 'Make Bool.enums consistent with Enumeration.enums'; git push;
13:05 Zoffix change https://github.com/rakudo/rakudo/ to the URL of your fork; click "Submit PR" button on GitHub after last step :)
13:05 * Zoffix &
13:05 Altreus Zoffix: that was my understanding!
13:05 Altreus oh
13:05 Altreus thanks then :)
13:06 Zoffix I meant that by the time it arrives to say, it's already the new object.
13:07 Zoffix And more specifically, it's .gist that gets called. So `say $blah but "foo"` will only print "foo" for objects whose .gist calls .Str. And also, since `say Str:D` doesn't call anything and just unboxes it, it won't work then
13:07 cosimo joined #perl6
13:07 Zoffix m: say "orig" but "no workie"
13:07 camelia rakudo-moar 4b02b8: OUTPUT: «orig?»
13:07 Zoffix m: say [] but "no .Str for you"
13:07 camelia rakudo-moar 4b02b8: OUTPUT: «[]?»
13:08 Zoffix m: say [] but role { method gist { "no .Str for you" } }
13:08 camelia rakudo-moar 4b02b8: OUTPUT: «no .Str for you?»
13:08 * Zoffix &
13:09 wictory[m] Hi! so this code https://hastebin.com/ulalikuvir gives me this error https://hastebin.com/pegezaxali what am I doing wrong?
13:09 wictory[m] (I want a NEXT phaser in the outer loop)
13:10 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: f000fe2a4f | rafaelschipiura++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
13:10 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: Remove mention of phaser.
13:10 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: review: https://github.com/perl6/doc/commit/f000fe2a4f
13:11 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: 83e87839fa | rafaelschipiura++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
13:11 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: Mention the close docs.
13:11 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: review: https://github.com/perl6/doc/commit/83e87839fa
13:15 Zoffix wictory[m]: looks like a bug to me
13:17 Zoffix m: FOO: for 1 { next FOO }
13:17 camelia rakudo-moar 4b02b8: ( no output )
13:17 Zoffix m: FOO: for 1 { NEXT {}; next FOO }
13:17 camelia rakudo-moar 4b02b8: OUTPUT: «labeled next without loop construct?  in block <unit> at <tmp> line 1??»
13:17 * Zoffix looks at sauce
13:18 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: 9979c173c6 | rafaelschipiura++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
13:18 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: Change to a link to the close routine.
13:18 Geth ¦ doc/rafaelschipiura-mention-close-in-5to6: review: https://github.com/perl6/doc/commit/9979c173c6
13:18 Geth ¦ doc: 0f8ba22ff0 | rafaelschipiura++ (committed by Zoffix Znet) | doc/Language/5to6-perlfunc.pod6
13:18 Geth ¦ doc: Mention importance of closing handles in 5to6 (#1537)
13:18 Geth ¦ doc:
13:18 Geth ¦ doc: * Mention importance of closing handles in 5to6
13:18 Geth ¦ doc:
13:18 Geth ¦ doc: * Remove mention of phaser.
13:18 Geth ¦ doc:
13:18 Geth ¦ doc: * Mention the close docs.
13:18 Geth ¦ doc:
13:18 Geth ¦ doc: * Change to a link to the close routine.
13:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0f8ba22ff0
13:19 wictory[m] Zoffix: ok, nice so I wasn't crazy. There is not much documentation on how to use phasers, so I wasn't sure if I had written it correctly.
13:19 Zoffix k, it's over my head :) Gonna file a bug report
13:20 Skarsnik hm how do I append a hash in a @ but without it trying to make the % a list?
13:20 Skarsnik m: my %h = a => 'b', b => 'c'; say %h; my @a; @a.append(%h); say @a.elems
13:20 camelia rakudo-moar 4b02b8: OUTPUT: «{a => b, b => c}?2?»
13:20 wictory[m] Zoffix: thanks
13:20 Skarsnik like I want 1 elem ^^
13:21 Zoffix wictory[m]: filed: https://rt.perl.org/Ticket/Display.html?id=132034
13:21 Zoffix It's probably a 1-line fix. Just need to know where to put that one line :P
13:21 Zoffix m: my %h = a => 'b', b => 'c'; say %h; my @a; @a.append($%h); say @a.elems
13:21 camelia rakudo-moar 4b02b8: OUTPUT: «{a => b, b => c}?1?»
13:21 Skarsnik ooh $
13:22 Zoffix Yeah, Hash does Iterable, so need to shove it into scalar container for it to be treated as one item
13:23 Skarsnik damn I think I will run into a circular dependancy stuff with libxml2 binding
13:24 Skarsnik since I can't not type field in c struct
13:24 Zoffix wictory[m]: once you learn more about phasers than what the docs say, you could improve the docs. Just need to edit this file: https://github.com/perl6/doc/blob/master/doc/Language/phasers.pod6
13:24 Zoffix :)
13:24 * Zoffix &
13:25 travis-ci joined #perl6
13:25 travis-ci Doc build passed. rafaelschipiura 'Mention importance of closing handles in 5to6'
13:25 travis-ci https://travis-ci.org/perl6/doc/builds/272040793 https://github.com/perl6/doc/commit/f4cd255c17b5
13:25 travis-ci left #perl6
13:26 Geth ¦ doc: 8c00cec776 | rafaelschipiura++ (committed by Zoffix Znet) | doc/Language/variables.pod6
13:26 Geth ¦ doc: “my” docs mentioning dynamic variables (#1522)
13:26 Geth ¦ doc:
13:26 Geth ¦ doc: * “my” docs mentioning dynamic variables
13:26 Geth ¦ doc:
13:26 Geth ¦ doc: Explains the relationship between lexical/package and normal/dynamic scope a bit more.
13:26 Geth ¦ doc:
13:26 Geth ¦ doc: Asked in  #1082
13:26 Geth ¦ doc: <…commit message has 6 more lines…>
13:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8c00cec776
13:27 travis-ci joined #perl6
13:27 travis-ci Doc build errored. rafaelschipiura 'Change to a link to the close routine.'
13:27 travis-ci https://travis-ci.org/perl6/doc/builds/272051218 https://github.com/perl6/doc/compare/83e87839fa88...9979c173c62a
13:27 travis-ci left #perl6
13:27 buggable [travis build above] ? Did not recognize some failures. Check results manually.
13:27 Kyo91_ joined #perl6
13:41 travis-ci joined #perl6
13:41 travis-ci Doc build passed. rafaelschipiura 'Mention the close docs.'
13:41 travis-ci https://travis-ci.org/perl6/doc/builds/272048583 https://github.com/perl6/doc/compare/f000fe2a4f77...83e87839fa88
13:41 travis-ci left #perl6
13:42 Skarsnik hm I kinda screw... xmlio.h use xmlparser.h and xmlparser.h use xmlio.h
13:45 timotimo that's what #ifdef is for :P
13:45 Skarsnik yep in C
13:45 Skarsnik but how I work around that in Perl 6 ?
13:45 timotimo stub classes? move shared things to a third module?
13:46 Skarsnik I mean I could generate a bug huge binding, but kinda meh
13:47 Skarsnik or I should write a circular dependancy detection and merge all files involved
13:48 travis-ci joined #perl6
13:48 travis-ci Doc build passed. rafaelschipiura 'Remove mention of phaser.'
13:48 travis-ci https://travis-ci.org/perl6/doc/builds/272048231 https://github.com/perl6/doc/compare/f4cd255c17b5...f000fe2a4f77
13:48 travis-ci left #perl6
13:49 S007 joined #perl6
13:49 ruoso___ joined #perl6
13:50 silug joined #perl6
13:51 skids joined #perl6
13:54 Skarsnik timotimo, I probably should bother people to allow for circular dependancy x)
13:55 Skarsnik It will probably be common with C/C++ binding
13:56 timotimo could very well be :|
13:57 Skarsnik since it's a place you can't avoid typing
14:00 Cabanossi joined #perl6
14:04 zakharyas joined #perl6
14:05 cosimo joined #perl6
14:12 Skarsnik Should it be closed https://rt.perl.org/Ticket/Display.html?id=126688 ? it does not run indefinitly now
14:15 Zoffix Skarsnik: does it report "circular something something detected"?
14:15 Skarsnik skarsnik@devel:~/perl6/gptrixie$ ../rakudo/install/bin/perl6 -I. -e 'use A;'
14:15 Skarsnik ===SORRY!===
14:15 Skarsnik Circular module loading detected trying to precompile /home/skarsnik/perl6/gptrixie/A.pm
14:15 Skarsnik with the last example
14:15 moritz python should really do the same
14:16 moritz instead of just saying "cannot import name "
14:16 timotimo it'd probably be neat if it could output a little graph/tree of what parts are involved
14:16 timotimo if the circle is bigger than just two modules
14:16 Skarsnik could probably tell what in A trigger the circular?
14:16 Zoffix Skarsnik: I marked the ticket as TESTNEEDED now
14:17 Zoffix buggable: tag TESTNEEDED
14:17 buggable Zoffix, There are 42 tickets tagged with TESTNEEDED; See http://fail.rakudo.party/t/TESTNEEDED for details
14:17 Zoffix ^ lots of low-hanging contibuting potential if anyone wants to jump in :)
14:18 Skarsnik dunno what you call testneeded? a test in roast?
14:19 Zoffix Skarsnik: yes. All bugs receive a test covering them, so we don't fix the same bug twice.
14:19 Zoffix (and other impls don't make the same mistakes we did :P)
14:26 [Coke] .tell lizmat forgot to use tell ; your use of HLL in recent doc patch; it trips the spell checker, but rather than just add it, wondering if we can eliminate its use, since the only HLL we have is Perl 6 and that's what we're writing the docs for.
14:26 yoleaux [Coke]: I'll pass your message to lizmat.
14:26 [Coke] (docs are otherwise xt clean)
14:27 [Coke] is there an alternative to 'rakudobrew build moar nom' to get the latest version, but tied to its own dir-by-commit-sha?
14:28 [Coke] would probably help eliminate some of the already-compiled-but-not-what-you-wanted module issues I've been having with zef.
14:28 [Coke] (nuke before build, maybe?)
14:29 Zoffix Do you even need rakudobrew?
14:29 [Coke] No, I could write my own shell script that does what I want.
14:29 [Coke] Or I could try to make RB a little better.
14:29 Zoffix There's a minimally-tested bash alias for building latest rakudo: https://github.com/zoffixznet/r#linux
14:29 [Coke] Trying to be a good citizen.
14:30 [Coke] thanks.
14:31 Cabanossi joined #perl6
14:32 sumdoc joined #perl6
14:32 Zoffix And I've been using this for clean update with rakudobrew: rm -fr ~/.perl6; rm -fr ~/.zef; rm -fr ~/.rakudobrew/; git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef; zef install TAP::Harness;
14:39 [Coke] I will work on one that does a bunch of nukes and updates in place so we don't have to redownload the rakudo/nqp/moarvm repos.
14:39 [Coke] (but this is fine for how often I need to do this.) danke.
14:54 Kyo91 joined #perl6
14:57 margeas joined #perl6
15:14 zakharyas joined #perl6
15:15 dj_goku joined #perl6
15:17 cdg joined #perl6
15:25 cdg_ joined #perl6
15:31 dj_goku_ joined #perl6
15:31 dj_goku_ joined #perl6
15:41 Geth ¦ doc/polymod-digits: 7c52912dbb | rafaelschipiura++ (committed using GitHub Web editor) | doc/Type/Int.pod6
15:41 Geth ¦ doc/polymod-digits: Update Int.pod6
15:41 Geth ¦ doc/polymod-digits: review: https://github.com/perl6/doc/commit/7c52912dbb
15:41 Geth ¦ doc: 1fd4b0f3bf | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Int.pod6
15:41 Geth ¦ doc: Document the use of polymod for base conversion
15:41 Geth ¦ doc:
15:41 Geth ¦ doc: Attempt to resolve issue #1436.
15:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1fd4b0f3bf
15:41 Geth ¦ doc: 7c52912dbb | rafaelschipiura++ (committed using GitHub Web editor) | doc/Type/Int.pod6
15:41 Geth ¦ doc: Update Int.pod6
15:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/7c52912dbb
15:41 Geth ¦ doc: d9929798de | rafaelschipiura++ (committed using GitHub Web editor) | doc/Type/Int.pod6
15:41 Geth ¦ doc: Merge pull request #1487 from perl6/polymod-digits
15:41 Geth ¦ doc:
15:41 Geth ¦ doc: Document the use of polymod for base conversion
15:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d9929798de
15:43 khw joined #perl6
15:43 wamba joined #perl6
15:47 lizmat joined #perl6
15:50 Geth ¦ doc/any-clarification: 537bea1613 | rafaelschipiura++ (committed using GitHub Web editor) | doc/Type/Any.pod6
15:50 Geth ¦ doc/any-clarification: Missing )
15:50 Geth ¦ doc/any-clarification: review: https://github.com/perl6/doc/commit/537bea1613
15:53 Geth ¦ doc/any-clarification: df2a8b917f | rafaelschipiura++ (committed using GitHub Web editor) | doc/Type/Any.pod6
15:53 Geth ¦ doc/any-clarification: Missing )
15:53 Geth ¦ doc/any-clarification: review: https://github.com/perl6/doc/commit/df2a8b917f
15:53 raschipi dejavu
15:53 yqt joined #perl6
15:53 sena_kun SHA is different though.
15:54 perlpilot Is LISP silently stealing ) from the P6 docs?
15:54 raschipi The ) added in the first one is summed in the second
15:57 * lizmat clickbaiits https://p6weekly.wordpress.com/2017/09/04/2017-36-blogs-a-reading/
15:57 yoleaux 14:26Z <[Coke]> lizmat: forgot to use tell ; your use of HLL in recent doc patch; it trips the spell checker, but rather than just add it, wondering if we can eliminate its use, since the only HLL we have is Perl 6 and that's what we're writing the docs for.
15:57 raschipi That pull request just need a decision for what to do about .sum  Should it stay or should it go?
15:59 raschipi m: my $a; $a.sum;
15:59 camelia rakudo-moar 4b02b8: OUTPUT: «Use of uninitialized value of type Any in numeric context?  in block <unit> at <tmp> line 1?»
15:59 raschipi m: my $a.=new; $a.sum;
15:59 camelia rakudo-moar 4b02b8: OUTPUT: «Cannot resolve caller Numeric(Any: ); none of these signatures match:?    (Mu:U \v: *%_)?  in block <unit> at <tmp> line 1??»
16:01 mcmillhj joined #perl6
16:04 sena_kun raschipi, and `reduce` with `produce` explanations. Along with `collate` and `cache`.
16:05 raschipi Can't there be new pull requests when someone writes them?
16:05 sena_kun Dunno. Maybe it can.
16:06 sena_kun m: say Any.sum;
16:06 camelia rakudo-moar 4b02b8: OUTPUT: «Use of uninitialized value of type Any in numeric context?0?  in block <unit> at <tmp> line 1?»
16:06 sena_kun It actually produces "0".
16:09 raschipi I see now that you actually removed the sum method from there.
16:10 sena_kun Should I return it?
16:10 raschipi If you think so, you can create a new pull request.
16:10 raschipi This way we can merge it right now.
16:11 sena_kun `This method treats Any as 1-item list and sums it, returning 0, throwing a by-design error alongside(don't mind it too much)`
16:12 Geth ¦ doc/master: 4 commits pushed by Altai-man++, rafaelschipiura++
16:12 Geth ¦ doc/master: 12ce8cf704 | Attempt to document most of `Any` methods
16:12 Geth ¦ doc/master: 537bea1613 | Missing )
16:12 Geth ¦ doc/master: df2a8b917f | Missing )
16:12 Geth ¦ doc/master: 581bf09bd9 | Merge pull request #1503 from perl6/any-clarification
16:12 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/d9929798de...581bf09bd9
16:14 sumdoc joined #perl6
16:15 sumdoc Is there "dataframe" like data structure in Perl 6? Like this http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
16:18 Zoffix If it's a lot different from 2D array, then nothing in core.
16:18 SHODAN joined #perl6
16:18 Zoffix or hash of arrays
16:19 timotimo it's different enough to a 2d array
16:19 timotimo but a hash of arrays could do what you want
16:19 timotimo just doesn't have the many constructors and labeling features and functions to work with them and such
16:20 Zoffix m: my %h = :one(1…3), :index<a b c>; %h<one>[1].say
16:20 camelia rakudo-moar 4b02b8: OUTPUT: «2?»
16:20 skids joined #perl6
16:21 piojo2 m: grammar F { token TOP { ^ <.indent(0)> 'foo' $ }; proto token indent(Int $level) {*}; token indent:sym<spaces>(Int $level) { ' ' ** {$level * 4} } }; say so F.parse('    foo');
16:21 camelia rakudo-moar 4b02b8: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1?  in regex indent:sym<spaces> at <tmp> line 1?  in regex indent at <tmp> line 1?  in regex TOP at <tmp> line 1?  in block <unit> at <tmp> line 1??»
16:22 piojo2 It seems like with a proto token, my arguments get eaten
16:23 piojo2 regex token arguments work fine without a proto token
16:23 Sound joined #perl6
16:24 Zoffix piojo2: I see a ticket with that https://rt.perl.org/Ticket/Display.html?id=122972#ticket-history
16:25 piojo2 Zoffix: yeah, looks the same
16:25 Zoffix m: grammar F { token TOP { ^ :my $*level = 0; <.indent> 'foo' $ }; proto token indent(|) {*}; token indent:sym<spaces> { ' ' ** {$*level * 4} } }; say so F.parse('    foo');
16:25 camelia rakudo-moar 4b02b8: OUTPUT: «False?»
16:25 piojo2 Wow, since 2014??
16:25 Zoffix possible workaround ^
16:26 Zoffix piojo2: well, 2015 was about getting ready for first stable release; 2016 was about making performance usable; 2017 was about polishing various things like IO and stuff. :)
16:26 Zoffix And it's not a painful feature (like, there's a workaround like above)
16:28 piojo2 Zoffix: thanks. Will that workaround nest like an equivalent lexical variable, as each new "my" hides the previous one?
16:29 Zoffix piojo2: yeah
16:29 piojo2 thanks
16:31 okl joined #perl6
16:32 llfourn joined #perl6
16:39 araujo joined #perl6
16:41 piojo2 Zoffix: I wish I were experienced enough to implement that feature myself. It's so seemingly small (since it's analogous to features that already exist)
16:42 Zoffix Yeah, I know the feeling :) Kinda wish we had chips in brains you could download knowledge onto :)
16:43 piojo2 :)
16:43 Sgeo_ joined #perl6
16:44 Kyo91_ joined #perl6
16:57 andrzejku joined #perl6
17:03 kybr joined #perl6
17:08 piojo2 joined #perl6
17:10 piojo2 m: grammar G { token TOP { :my $*val = 0; <match1(0)> }; token match1($val) { :my $*val = $*val+1; <recursive-match> }; token recursive-match { . } }; say so G.parse('x');
17:10 camelia rakudo-moar c39db8: OUTPUT: «Use of uninitialized value of type Any in numeric context?True?  in regex match1 at <tmp> line 1?»
17:10 SHODAN joined #perl6
17:10 piojo2 Apparently dynamic variables don't work the way I thought they did...
17:11 piojo2 m: grammar G { token TOP { :my $*val = 0; <match1> }; token match1 { :my $*val = $*val+1; <recursive-match> }; token recursive-match { . } }; say so G.parse('x');
17:11 camelia rakudo-moar c39db8: OUTPUT: «Use of uninitialized value of type Any in numeric context?True?  in regex match1 at <tmp> line 1?»
17:12 piojo2 what am I doing wrong? Shouldn't I be able to create a new "my $*val" to shadow the old "$*val"?
17:12 rindolf joined #perl6
17:15 perlpilot piojo2: variables are available immediately upon declaration.  so, in "my $x = $x + 1",  the second $x is the same as the first $x
17:16 [Coke] ugexe++ for zef install --serial (and for not making it the default)
17:20 piojo2 m: grammar G { token TOP { :my $*val = 0; <match1> }; token match1 { :my $oldval = $*val; :my $*val = $oldval+1; <recursive-match> }; token recursive-match { . } }; say so G.parse('x');
17:20 camelia rakudo-moar c39db8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Illegal post-declaration of dynamic variable '$*val';?earlier access must be written as CALLERS::<$*val>?if that's what you meant?at <tmp>:1?------> 3 match1 { :my $oldval = $*val; :my $*val7?…»
17:21 piojo2 perlpilot: thanks. Is this new error happening because "my" affects the whole block, so it's illegal to refer to both the old $*val and the new "my $*val"?
17:22 piojo2 m: grammar G { token TOP { :my $*val = 0; <match1> }; token match1 { :my $oldval = CALLERS::<$*val>; :my $*val = $oldval+1; <recursive-match> }; token recursive-match { . } }; say so G.parse('x');
17:22 camelia rakudo-moar c39db8: OUTPUT: «True?»
17:22 perlpilot pretty much.  Though it does give you the info you needed to make it work like you want.
17:23 piojo2 whoa, that error message was so crazy looking I actually didn't believe it! Next time, I won't think I'm smarter than the compiler...
17:23 perlpilot piojo2: you could have also said: ":my $*val = CALLERS::<$*val> + 1;"  btw
17:23 piojo2 Yeah, it's just inertia to change things. Thanks!
17:23 perlpilot piojo2: any time.
17:25 devmikey joined #perl6
17:26 perlpilot piojo2: btw, is your nick spanish or is that just a coincidence?
17:26 zakharyas joined #perl6
17:26 piojo2 Yeah, some Mexican guys used to call me that :P
17:27 piojo2 I guess it's less rude than the English version would be
17:33 * perlpilot wonders how hard it would be to make "my $x = <some expression involving $x>" generate that CALLERS message rather than what it currently does.
17:39 piojo2 perlpilot: It's not always wrong
17:39 piojo2 echo -n 'hello\nworld' | perl6 -ne 'my $*line //= 0; say "line {$*line++}";'
17:40 perlpilot piojo2: in an initializer, it's probably not what the programmer intended.
17:44 piojo2 perlpilot: yeah, I'm still a little fuzzy on the rules. Especially since "my" changed a little bit between perl 5 and 6 (particularly, what it does with -n or -p)
17:44 piojo2 don't take me as an example of what real programmers do :)
17:47 P6steve joined #perl6
17:48 P6steve hullo - do we have ::T type variables yet? (REPL seems to barf if I go my ::T = Int;) ??
17:48 raschipi https://docs.perl6.org/type/Any Looks much better. I wonder if we should leave it like it was because it's what motivated me to contribute to the docs.
17:49 ugexe m: sub foo(::T $val) { say "type: {T}"; say "value: {$val}" }; foo("1"); foo(1);
17:49 camelia rakudo-moar c39db8: OUTPUT: «Use of uninitialized value of type Str in string context.?Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.?type: ?value: 1?type: ?value: 1?  in sub foo at <tmp> line 1?Use of uninitialized value of …»
17:49 raschipi m: sub awoo ( ::T $a) { say ::T }; awoo 1;
17:49 camelia rakudo-moar c39db8: OUTPUT: «(Int)?»
17:49 ugexe m: sub foo(::T $val) { say "type: {T.^name}"; say "value: {$val}" }; foo("1"); foo(1);
17:49 camelia rakudo-moar c39db8: OUTPUT: «type: Str?value: 1?type: Int?value: 1?»
17:50 geekosaur P6steve, at present if something doesn;t work in the REPL then the first thing to do is see if it works in file or perl6 -e
17:50 geekosaur because the REPL is filled with edge cases and hacks
17:50 P6steve aha - thanks!
17:51 konsolebox joined #perl6
17:51 Zoffix m: grammar { token TOP { :my $*v = 42; <foo> }; token foo { {dd $*v } <bar> }; token bar { :temp $*val = 100; <bez> }; token bez { {dd $*val } .+ } }.parse: "foo"
17:51 camelia rakudo-moar c39db8: OUTPUT: «Int $*v = 42?Can only use 'temp' on a container?  in regex bar at <tmp> line 1?  in regex foo at <tmp> line 1?  in regex TOP at <tmp> line 1?  in block <unit> at <tmp> line 1??»
17:51 Zoffix ... and I'm using it on... ?
17:51 Zoffix piojo2: well, that would've been ^ a better solution, but apparently that's also broken :P
17:52 Zoffix Oh, wait
17:52 Zoffix m: grammar { token TOP { :my $*v = 42; <foo> }; token foo { {dd $*v } <bar> }; token bar { :temp $*v = 100; <bez> }; token bez { {dd $*v } .+ } }.parse: "foo"
17:52 camelia rakudo-moar c39db8: OUTPUT: «Int $*v = 42?Int $*v = 100?»
17:52 Zoffix It works if you name your variables right :P
17:53 geekosaur that error seems a trifle LTA
17:54 Zoffix Well, it gets a Failure
17:55 Zoffix m: temp Failure.new
17:55 camelia rakudo-moar c39db8: OUTPUT: «Can only use 'temp' on a container?  in block <unit> at <tmp> line 1??»
17:55 piojo2 haha
17:59 Zoffix m: say $*v.exception.^name
17:59 camelia rakudo-moar c39db8: OUTPUT: «X::Dynamic::NotFound?»
18:00 Zoffix maybe it could inspect stuff and explain or maybe that's overreach
18:02 piojo2 Zoffix: :temp definitely works. But strangely, I'm gonna keep :my $*val = CALLERS::<$*val>, because that's the option I'm more afraid of forgetting
18:02 piojo2 I strongly prefer :temp, though
18:02 piojo2 thanks!
18:02 Zoffix use temp then :)
18:02 piojo2 I'm too new. I'm using whatever there's the most danger of me forgetting about.
18:03 piojo2 I have just a few scripts. I'll be able to grep them later and refresh my memory about how to do things.
18:03 Zoffix If it's something you forget, it's not worth remembering :P But for record, that's a Pseudo Package and there's a bunch of them: https://docs.perl6.org/language/packages#Pseudo-packages
18:07 perlpilot Zoffix: I occasionally forget the implicit *% in method signatures and that is totally worth remembering.
18:08 espadrine joined #perl6
18:09 Zoffix yeah, could bite you. The other day I made datetime object passing :0h :0m and :0s for time and it "worked" because I wanted that time... but then I changed the values and realized the names were wrong :)
18:10 cdg joined #perl6
18:11 pilne joined #perl6
18:12 cdg__ joined #perl6
18:12 setty1 joined #perl6
18:18 cdg joined #perl6
18:23 AlexDaniel hmmmm
18:23 AlexDaniel LEAVE try close $fh;
18:23 AlexDaniel what about LEAVE .close with $fh;
18:24 ash_gti joined #perl6
18:25 Zoffix what about LEAVE $fh andthen .close;
18:26 Zoffix :)
18:26 Zoffix LEAVE $fh.?close
18:27 Zoffix (unless you typed $fh with IO::Handle :P)
18:28 Zoffix Actrually, `my $fh does auto-close = "foo".IO.open` is what the cool kids use these days.
18:29 Zoffix I think lizmat++ has plans to improve this area.
18:29 Zoffix buggable: eco Trait::IO
18:29 buggable Zoffix, Trait::IO 'Helper IO traits': https://github.com/zoffixznet/perl6-Trait-IO
18:30 Kyo91_ joined #perl6
18:30 Zoffix (discussion about this topic in #moarvm: https://irclog.perlgeek.de/moarvm/2017-09-05#i_15119697 )
18:31 AlexDaniel huggable: irc unicode http://colabti.org/irclogger/irclogger_log/perl6
18:31 huggable AlexDaniel, nothing found
18:31 AlexDaniel huggable: irc unicode :is: http://colabti.org/irclogger/irclogger_log/perl6
18:31 huggable AlexDaniel, Added irc unicode as http://colabti.org/irclogger/irclogger_log/perl6
18:31 AlexDaniel ????????????
18:31 Zoffix The comparison with Perl is overhyped IMO. You don't deal with handles in Rakudo as often as you do in Perl. Most common operations can be done with IO::Path that does the closing for you.
18:32 Zoffix AlexDaniel: did everyone give up trying to fix our "official" log site? :)
18:33 mst same as in sensible perl you'd use IO::All or these days Path::Tiny
18:33 * Zoffix uses Mojo::File
18:34 mst which is pretty much mojo's version of Path::Tiny
18:34 cdg_ joined #perl6
18:34 Zoffix :)
18:34 mst (my mojo code totally uses Mojo::File, my non-mojo code uses Path::Tiny)
18:34 AlexDaniel Zoffix: well, I looked at it, to me it seems like it's broken on *saving* the data, so I guess we've missed unicode characters of these couple of months
18:35 AlexDaniel and then I didn't have time to look any further… but I need irc logs with unicode
18:38 AlexDaniel greppable6: LEAVE
18:38 scottchiefbaker joined #perl6
18:38 greppable6 AlexDaniel, https://gist.github.com/aeb9f154fec340d8ba757bf0752dde39
18:39 * Zoffix reads IO::All docs with jelousy
18:39 AlexDaniel :S
18:39 Zoffix backwards reading... in-place editing. Sounds really cool.
18:43 mspo reading backwards rocks
18:44 Zoffix mst: do you read all the channels you're in or do you have a highlight for word "Perl"? :)
18:45 Kyo91 joined #perl6
18:47 mst Zoffix: not all, but I often read in here because it's slowly teaching me more rakudo by osmosis
18:47 Zoffix Ah :)
18:47 mst and then if somebody's mentioning a low-level perl5 thing and there's a decent high-level one, I mention it so (a) you can better compare (b) if we've got any ideas you haven't you can steal them
18:48 * mst still v. glad TWEAK made it in, for example
18:48 dogbert2 joined #perl6
18:48 mst it seemed excessively silly to me that there was a case where rakudo's OO was blantaly inferior to the giant pile of duct tape we use in perl5 :)
18:49 Zoffix mst: someone showed me a picture of you being hugged. I don't know how I should feel about it. Is it a good picture because you're getting a hug, or is it a bad picture because of the slide accompanying it: https://www.flickr.com/photos/hercynium/5892245323/
18:49 mst that was *hilarious* at the time, he jumped up from the audience to do it
18:50 mst also piers gives excellent hugs
18:50 Zoffix lol :D
18:50 mspo https://www.flickr.com/photos/hercynium/5892809946/in/photostream/
18:50 Zoffix hehe :)
18:51 mspo nice use of > and >> operators in that IO::All
18:52 piojo2 I'm trying to parse YAML, and perl just told me "Cannot resolve caller <my token name>", then I put in some print statements, and the problem goes away whenever I print debug output, and comes back when I remove it
18:53 piojo2 rakudo bug ? time for bed
18:53 timotimo did you put { } into your regex to do the printing?
18:53 piojo2 timotimo: yes, why?
18:53 timotimo that has an influence on longest token matching semantics
18:55 piojo2 timotimo: this part doesn't have any branches. It's just in a [ <token1> <token2> ] +% '\n'
18:55 piojo2 but thanks for pointing that out--I wouldn't have thought of it.
18:56 SU85 joined #perl6
18:57 piojo2 I'll submit a rakudobug after I clean the junk out of the script and get permission to share the input file
19:08 moritz \o
19:09 moritz I've created a small grammar that parses an indention-based language (mini-python): https://gist.github.com/moritz/46b8ff0a9f44200a0a23869bbf63a90e
19:10 Zoffix \o/
19:10 Skarsnik :)
19:12 nadim joined #perl6
19:13 moritz I think somebody mentioned interest in such a thing... who was it? maybe raschipi?
19:14 Zoffix m: https://gist.github.com/moritz/46b8ff0a9f44200a0a23869bbf63a90e
19:14 camelia rakudo-moar c39db8: OUTPUT: «True?Inconsistent indentation: expected at most 0, got 4 spaces?Inconsistent indentation: expected at most 4, got 8 spaces?Unexpected indentation level: 2.?»
19:14 Zoffix moritz: dunno; though I saw piojo2 ask question about a grammar that had <indent> token
19:16 Sound joined #perl6
19:18 ash_gti joined #perl6
19:18 kyan joined #perl6
19:24 r7c joined #perl6
19:28 raschipi Not me.
19:29 raschipi Yuck, semantic whitespace.
19:30 Zoffix .oO( b-b-but Rakudo has it! )
19:31 zakharyas joined #perl6
19:32 El_Che Zoffix: shut it.
19:32 El_Che :)
19:32 moritz it's called "parse it." :-)
19:33 Zoffix m: sub foo ($, $a?) { "There's {$a ?? "no" !! "a"} space between the name and (".say }; foo(1, 2); foo (1, 2);
19:33 camelia rakudo-moar c39db8: OUTPUT: «There's no space between the name and (?There's a space between the name and (?»
19:33 Zoffix :)
19:34 Zoffix m: dd <1/2>; dd <1/2 >
19:34 camelia rakudo-moar c39db8: OUTPUT: «0.5?RatStr.new(0.5, "1/2")?»
19:35 Skarsnik haha
19:35 Skarsnik it create a list
19:35 Skarsnik ?
19:35 Zoffix m: say "e ehehe hehehe hehe" ~~ / [ \S+ ]**4/
19:35 camelia rakudo-moar c39db8: OUTPUT: «?ehehe??»
19:35 Zoffix m: say "e ehehe hehehe hehe" ~~ /:s [ \S+ ]**4/
19:35 camelia rakudo-moar c39db8: OUTPUT: «?e ehehe hehehe hehe??»
19:36 Zoffix Not to mention semantic whitespace after } :)
19:36 Zoffix Skarsnik: no, <1/2> is a Rat literal, <1/2 > is a RatStr literal
19:36 Zoffix m: dd <1/2>.^name; dd <1/2 >.^name;  # a bit more clear
19:36 camelia rakudo-moar c39db8: OUTPUT: «"Rat"?"RatStr"?»
19:37 Skarsnik this is confusing x)
19:37 Zoffix Not really
19:37 Skarsnik m: "1/2".say
19:37 camelia rakudo-moar c39db8: OUTPUT: «1/2?»
19:37 Skarsnik m: "1/2".Rat.say
19:37 camelia rakudo-moar c39db8: OUTPUT: «0.5?»
19:37 Skarsnik m: "1/2 ".Rat.say
19:37 camelia rakudo-moar c39db8: OUTPUT: «0.5?»
19:38 Zoffix Skarsnik: if there's an operator needed to produce a literal, you can wrap it into <> to make a literal-literal (without any operators). So Complex and Rat do that. But <> construct makes allomorphs, so if you meant to make an allomorph add moar whitespace to indicate you want the allomorph and not the literal
19:38 raschipi A little bit of semantic whitespace is fine, for obvious reasons.
19:38 Zoffix <42> for example is IntStr, not an Int, because you don't need an operator to make it (so there's no reason to write <42> instead of 42 if you meant an Int)
19:39 Zoffix m: <1*2**2>.^name.say
19:39 camelia rakudo-moar c39db8: OUTPUT: «IntStr?»
19:40 Zoffix And in that form you need operators, but it's a crazy lookin' thing so you get an IntStr instead of just an Int anyway
19:43 Zoffix m: <-42>.^name.say
19:43 camelia rakudo-moar c39db8: OUTPUT: «IntStr?»
19:43 Zoffix Bah. The operator-based explanation don't work :P
19:45 Zoffix AlexDaniel loves the < > construct. It's just a thing that keeps on giving.
19:45 Zoffix AlexDaniel: I have another present for you
19:45 AlexDaniel \o/
19:45 Zoffix m: say +<1*-2**2>
19:45 camelia rakudo-moar c39db8: OUTPUT: «4?»
19:45 Zoffix m: say +1*-2**2
19:45 camelia rakudo-moar c39db8: OUTPUT: «-4?»
19:45 Zoffix :)
19:45 AlexDaniel but… but
19:46 lizmat joined #perl6
19:46 Zoffix m: say (1*(-(2**2)))
19:46 camelia rakudo-moar c39db8: OUTPUT: «-4?»
19:47 Zoffix TBH, I don't know what the <1*2**2> form is even doing in there.
19:47 AlexDaniel committable6: all say +<1*-2**2>
19:47 Zoffix Is there some programming niche where this form is in common use or something?
19:48 AlexDaniel let's see how fresh it is
19:48 committable6 AlexDaniel, ¦all (44 commits): «4»
19:48 AlexDaniel okay
19:48 Zoffix I'm guessing it's some mathematical trick that mathematicians appreciate.
19:48 moritz I think it's mainly useful for something like 6.022*10**23
19:48 Zoffix Ah
19:48 Zoffix Right. moritz++
19:48 moritz and then we couldn't help but generalize it to all bases and such
19:49 moritz because 6.022e23 would be too easy, and not give a Rat, or something
19:49 Zoffix AlexDaniel: but wait! There's more!
19:49 Zoffix m: say <1*—2**2>.^name
19:49 camelia rakudo-moar c39db8: OUTPUT: «Str?»
19:49 Zoffix :)
19:49 BooK say (6.022*10**23).WHAT
19:49 evalable6 BooK, rakudo-moar c39db8789: OUTPUT: «(Rat)»
19:49 BooK uh
19:50 BooK ah yes, Num are with explicit e notation
19:50 Zoffix Oh, U+2212 minus doesn't work at all in <...>.
19:51 Xal joined #perl6
19:52 AlexDaniel can you make <> execte arbitrary code?
19:52 AlexDaniel then we can call it <>lang
19:52 AlexDaniel … and have a separate documentation for its features /o\
19:53 AlexDaniel quotable6: AlexDaniel .* present
19:53 moritz AlexDaniel: I don't think so
19:54 Skarsnik AlexDaniel, plz stap
19:54 quotable6 AlexDaniel, https://gist.github.com/055d419703a367f3e267b17c0d29e794
19:55 AlexDaniel Skarsnik: stop doing what exactly?
19:56 * AlexDaniel is in the middle of doing 5 things at once
19:57 AlexDaniel greppable6: \x4C\x45\x41\x56\x45
19:57 greppable6 AlexDaniel, https://gist.github.com/879cec80dcdf381e98eebbf219625988
19:58 AlexDaniel argh
19:58 ggoebel joined #perl6
19:59 Skarsnik AlexDianelable6, foo
19:59 Skarsnik don't mind me I am just tired x)
20:00 AlexDaniel okay I'll make greppable6 case-sensitive
20:00 AlexDaniel if you need it to be case-insensitive, stick (?i) into it
20:01 Cabanossi joined #perl6
20:01 greppable6 joined #perl6
20:01 AlexDaniel greppable6: LEAVE
20:02 greppable6 AlexDaniel, https://gist.github.com/63cd9da70c23a9886f8c8971ab239489
20:02 AlexDaniel greppable6: (?i)password
20:02 greppable6 AlexDaniel, https://gist.github.com/ef29995428d5b02253853659d994e806
20:07 Geth ¦ whateverable: d2f8ffda3f | (Aleks-Daniel Jakimenko-Aleksejev)++ | bin/Greppable.p6
20:07 Geth ¦ whateverable: Drop -i flag in greppable
20:07 Geth ¦ whateverable:
20:07 Geth ¦ whateverable: It's easier to add (?i) when you need it.
20:07 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/d2f8ffda3f
20:07 Geth ¦ whateverable: cac6af2a98 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/quotable.t
20:07 Geth ¦ whateverable: Enable quotable tests
20:07 Geth ¦ whateverable:
20:07 Geth ¦ whateverable: Malformed UTF-8 issue has been resolved, so now it's ok.
20:07 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/cac6af2a98
20:07 r7c left #perl6
20:09 cdg joined #perl6
20:09 cdg_ joined #perl6
20:31 konsolebox joined #perl6
20:32 samcv good *
20:33 moritz \o samcv
20:36 raschipi m: ('????'.ord.uniname / 2).say
20:36 camelia rakudo-moar c39db8: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3?5MUSICAL SYMBOL CUT TIME' (indicated by ?)?  in block <unit> at <tmp> line 1??»
20:36 raschipi Showing the string is very nice.
20:44 samcv m: say "FIVE"/10
20:44 camelia rakudo-moar c39db8: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3?5FIVE' (indicated by ?)?  in block <unit> at <tmp> line 1??»
20:44 samcv :P
21:12 Rawriful joined #perl6
21:31 * teatime has flash-backs to marching band
21:38 AlexDaniel joined #perl6
21:45 rindolf samcv: hi
21:50 TEttinger joined #perl6
22:01 Cabanossi joined #perl6
22:08 cpage_ joined #perl6
22:16 samcv hey rindolf
22:20 rindolf samcv: sup?
22:22 samcv not much. moarvm hacking
22:22 teatime if I was gonna use a command-line spell-checker on *nix which one is current... aspell/ispell/etc.
22:28 samcv i use aspell
22:33 raschipi joined #perl6
22:34 teatime thanks
22:35 zapwai joined #perl6
22:38 kyan joined #perl6
22:42 skids joined #perl6
22:53 MasterDuke that's what my kubuntu 17.04 machine defaults to
23:06 cdg joined #perl6
23:10 Cabanossi joined #perl6
23:12 japhb Zoffix: FWIW, val(Str:D) is a bit ... overpowered.  The notation you found is only a fraction of its disturbing power.  ;-)
23:15 ash_gti joined #perl6
23:17 * Zoffix eyes https://docs.perl6.org/routine/val
23:17 Zoffix If the power is not documented, I'd say it's not a power, but a bug :P
23:22 raschipi Where are ou guys using val?
23:22 Zoffix m: <\qq[{say "Pwned lulz!"}]>
23:22 camelia rakudo-moar c39db8: OUTPUT: «Pwned lulz!?»
23:23 Zoffix AlexDaniel: moritz ^ you *can* execute arbitrary code in < >
23:23 AlexDaniel okay
23:23 AlexDaniel very good
23:23 Zoffix raschipi: it's what the < > uses under the hood
23:23 Zoffix IIRC
23:25 AlexDaniel Zoffix: how did you find this?
23:26 Zoffix AlexDaniel: I new \qq[] escape existed in "" quotes, so I tried it out in <>
23:26 AlexDaniel oh
23:26 AlexDaniel didn't know both
23:26 AlexDaniel Zoffix++
23:26 Zoffix raschipi: and I think japhb++ is the implementor of this stuff
23:27 AlexDaniel TIL ? so that you can find it in IRC logs :)
23:27 Zoffix AlexDaniel: oh, then it might be new to you that it also works in single quotes
23:27 Zoffix m: my $x = "Look mah!, I'm interpolating \\o/"; say '\qq[$x]'
23:27 camelia rakudo-moar c39db8: OUTPUT: «Look mah!, I'm interpolating \o/?»
23:28 AlexDaniel well, I hate single quotes tbh
23:28 Zoffix :)
23:28 AlexDaniel thinking about autoreplacing them all to ??
23:28 AlexDaniel it's really weird that you can do crazy stuff like this but not \n
23:28 Zoffix :)
23:28 AlexDaniel ‘useless quotes’
23:30 MasterDuke i think ShimmerFairy implemented one of the vals
23:31 raschipi japhb: Tell us more about the power of val...
23:32 Zoffix .oO( the power of val compells you! )
23:32 Zoffix s: &val
23:32 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/c39db8789/src/core/allomorphs.pm#L151
23:34 Zoffix m: dd ":36[1,2,3]".&val.Numeric
23:34 camelia rakudo-moar c39db8: OUTPUT: «1371?»
23:36 Zoffix That's the only other magik I see in the sauce that I didn't know it did :)
23:36 Zoffix m: say <?42>.Numeric
23:36 camelia rakudo-moar c39db8: OUTPUT: «-42?»
23:36 Zoffix m: say <10*10**?42>.Numeric
23:36 camelia rakudo-moar c39db8: OUTPUT: «Type check failed in binding; expected Int but got Num (1e-41)?  in block <unit> at <tmp> line 1??»
23:37 Zoffix k, so it's my fault for not fixing the ? thoroughly enough :P
23:40 eater joined #perl6
23:46 cdg joined #perl6
23:50 zoll_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo