Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-05-24

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:08 Cabanossi joined #perl6
00:11 greppable6 joined #perl6
00:15 zengargoyle has anybody done a blog post or something that collects all of the new-ish best practices or tools related to module creation?  like the META6 license and CPAN and zef vs panda and that /todo/ website that tells me my modules are all missing a MANIFEST and is App::Mi6 the best shiny thing and there seems to be a Test::META sort of thing ...
00:18 Geth ¦ whateverable: 5f010e77af | (Aleks-Daniel Jakimenko-Aleksejev)++ | Greppable.p6
00:18 Geth ¦ whateverable: New bot: Greppable
00:18 Geth ¦ whateverable:
00:18 Geth ¦ whateverable: Just a few lines of code, but this should be good enough.
00:18 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/5f010e77af
00:19 samcv AlexDaniel, more bots :O
00:19 samcv greppable6, help
00:19 greppable6 samcv, Like this: greppable6: password # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Greppable
00:19 samcv greppable6, password
00:19 greppable6 samcv, https://gist.github.com/3e2a5cf8a1464d5aa59da354a8ed49b4
00:19 AlexDaniel greppable6: samcv
00:19 greppable6 AlexDaniel, https://gist.github.com/631fd4d62b0204cf7d300c0995923c12
00:20 samcv so it greps all the modules. ah
00:20 samcv greppable6, EVAL
00:20 greppable6 samcv, https://gist.github.com/c49a84ea7c869b4d65b41bb0726d74ee
00:20 samcv hmm it's not case sensitive
00:21 AlexDaniel should it be?
00:22 samcv dunno
00:22 samcv maybe not
00:24 mcmillhj joined #perl6
00:24 greppable6 joined #perl6
00:31 Possum joined #perl6
00:31 lookatme joined #perl6
00:31 lookatme morning .o/
00:34 Geth ¦ whateverable: d65e539647 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Greppable.p6
00:34 Geth ¦ whateverable: Print a meaningful message if nothing is found
00:34 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/d65e539647
00:34 Geth ¦ whateverable: af3c913dbf | (Aleks-Daniel Jakimenko-Aleksejev)++ | Quotable.p6
00:34 Geth ¦ whateverable: Old bot: Quotable
00:34 Geth ¦ whateverable:
00:34 Geth ¦ whateverable: This bot is rather old but nobody committed it. I can see that the
00:34 Geth ¦ whateverable: code can be improved a lot, and the functionality is not that great
00:34 Geth ¦ whateverable: too. However, at this point it makes sense to commit whatever we have
00:34 Geth ¦ whateverable: and improve it later.
00:34 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/af3c913dbf
00:34 greppable6 joined #perl6
00:37 samcv too many bots
00:38 AlexDaniel when exactly is it too many?
00:38 samcv too many compared to yesterday
00:38 samcv idk. two bots in a day is a statistical anomoly
00:38 AlexDaniel what's the second one?
00:39 AlexDaniel quotable6: uptime
00:39 quotable6 AlexDaniel, 1 week, 2 days, 6 hours, 59 minutes, and 20 seconds
00:41 mcmillhj joined #perl6
00:42 Geth ¦ doc: antquinonez++ created pull request #1328: Grammar
00:42 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1328
00:46 AlexDaniel 99 whateverable issues… damn…
00:46 AlexDaniel I need a bot to work on these bots
00:47 mcmillhj_ joined #perl6
00:52 Geth ¦ doc: 059825d015 | (Zoffix Znet)++ | doc/Type/Pair.pod6
00:52 Geth ¦ doc: Reference .antipair from Pair.invert
00:52 Geth ¦ doc: review: https://github.com/perl6/doc/commit/059825d015
00:52 Actualeyes joined #perl6
00:54 AlexDaniel 100 issues… that's it
00:58 mcmillhj joined #perl6
00:58 MasterDuke AlexDaniel: summer break is coming up right? just 1 issue a day and you'll be done by the time the next semester starts!
01:08 Cabanossi joined #perl6
01:14 lookatme joined #perl6
01:21 cdg joined #perl6
01:21 Possum joined #perl6
01:26 lookatme Is there any document about macro ?
01:28 Nex6 joined #perl6
01:29 MasterDuke lookatme: masak is doing pretty much all the macro work in his 007 repo
01:33 lookatme MasterDuke, oh thanks, I see
01:33 MasterDuke buggable: eco 007
01:33 buggable MasterDuke, 007 'Small experimental language with a license to macro': https://github.com/masak/007
01:35 lookatme Em, I was reading the tutorial now
01:38 Cabanossi joined #perl6
01:48 ilbot3 joined #perl6
01:48 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:48 BenGoldberg joined #perl6
01:51 Geth ¦ doc: antquinonez++ created pull request #1329: io-guide updates
01:51 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1329
02:03 noganex joined #perl6
02:08 Cabanossi joined #perl6
02:13 pilne multi seems to allow for a lot over very "functional" style programming idioms to pop out at me on rosettacode.
02:40 khw joined #perl6
02:42 raiph joined #perl6
02:42 raschipi joined #perl6
02:54 pilne over == of**
02:58 TEttinger joined #perl6
02:59 noganex_ joined #perl6
03:01 lookatme - - ?
03:01 lookatme --?
03:03 pilne a lot of things that would be used as like an end case in a haskell function, are just a part of a multi-dispatch function, it's... super neat to me (:
03:08 Cabanossi joined #perl6
03:10 pilne i just feel that no matter how my brain thinks up a particular solution and structures that solution, perl6 will allow me to easily compose code that works how I'm wanting.
03:10 mcmillhj joined #perl6
03:13 lookatme such as ?
03:15 pilne the zeckendorf numbers example there, uses a multi dispatched to (0) as one case and then the case for 1 and above (which always hits 0). i first saw stuff like that used a lot when dabbling in haskell.
03:18 lookatme Yeah, Perl 6 provides a quite natural functional style
03:19 pilne it feels like a super-powered, super-easy way to create "generic" functions as well
03:20 pilne and i'm often shocked at how much perl6 will resemble the psuedo-code without having to finagle things into existence to implement it in the way the challenge specifies.
03:21 pilne or if it does take finagle-ing (by the nature of the challenge), perl6 does it very elegantly.
03:22 Cabanossi joined #perl6
03:22 pilne well, i should get a few hours of shut-eye, until next time!
03:23 lookatme Em .
03:26 mcmillhj joined #perl6
03:36 Possum joined #perl6
03:56 Possum joined #perl6
03:56 mcmillhj joined #perl6
03:59 Herby_ joined #perl6
03:59 Herby_ o/
04:02 aborazmeh joined #perl6
04:02 aborazmeh joined #perl6
04:05 Herby_ Good evening
04:06 Herby_ I recently reinstalled perl6 and I noticed that on the Rakudo download page, the file name I downloaded is rakudo-star-2017.04.2-x86_64 (JIT)
04:06 Herby_ but when I installed that file and did a:  perl6 -v
04:07 Herby_ its telling me that I actually installed 2017.04.3
04:07 mcmillhj joined #perl6
04:07 Herby_ not sure if it matters that the version in the file name and the version installed don't quite match
04:07 Herby_ or if i'm reading it wrong
04:12 skids I think the .2 is a bugfix release # on the star distro, and the .3 is a point revision on the compiler.
04:14 Herby_ i figured it had a reason and i was reading it wrong :)
04:22 Actualeyes joined #perl6
04:38 kotp joined #perl6
04:52 Cabanossi joined #perl6
04:58 curan joined #perl6
05:20 mcmillhj joined #perl6
05:21 wamba joined #perl6
05:22 Cabanossi joined #perl6
05:29 astj_ joined #perl6
05:32 jap6h I've been working on a custom debugger but noticed in CORE.settings we're explicitly requring the binary is named 'perl6-debug'... otherwise precompile will compile the UI of the binary... perhaps there could be a command line option for this?
05:34 domidumont joined #perl6
05:41 domidumont joined #perl6
05:52 Cabanossi joined #perl6
05:53 samcv hmm wish there were a Perl 6 module for DBus. gonna try Net::DBus perl 5 module
05:58 lowbro joined #perl6
05:58 lowbro joined #perl6
06:01 xtreak joined #perl6
06:10 astj joined #perl6
06:12 domidumont joined #perl6
06:12 cognominal joined #perl6
06:14 rindolf joined #perl6
06:16 ufobat joined #perl6
06:22 Cabanossi joined #perl6
06:29 lowbro joined #perl6
06:29 lowbro joined #perl6
06:32 mcmillhj joined #perl6
06:39 Ulti has Zoffix taken down his twitter account? or have I specifically managed to get myself blocked? >:Z
06:48 mcmillhj joined #perl6
06:50 CacoS joined #perl6
06:52 Ven joined #perl6
06:53 kurahaupo joined #perl6
06:59 nadim_ joined #perl6
06:59 moritz you can always check when you're not logged in
07:01 huf joined #perl6
07:08 wamba joined #perl6
07:22 Cabanossi joined #perl6
07:24 Sound joined #perl6
07:26 zakharyas joined #perl6
07:37 xtreak joined #perl6
07:37 lookatme my @a = lazy gather for 1 ... 1024 { take "$_ => ", $*THREAD; }; for @a { start { .say } };
07:39 lookatme Sometimes rakudo hang on a while with this code
07:39 nine joined #perl6
07:40 lookatme Version This is Rakudo version 2017.05 built on MoarVM version 2017.05
07:40 camelia joined #perl6
07:44 LeCamarade joined #perl6
07:46 huf joined #perl6
07:48 camelia joined #perl6
07:51 parv joined #perl6
07:52 Ven joined #perl6
07:54 Sound joined #perl6
08:08 mr-foobar joined #perl6
08:13 wamba joined #perl6
08:14 dakkar joined #perl6
08:25 cognominal joined #perl6
08:33 raiph joined #perl6
08:38 lizmat Ulti: last tweet from Zoffix was 8h ago
08:43 xtreak joined #perl6
08:46 xtreak joined #perl6
08:58 rindolf joined #perl6
08:58 lookatme lizmat, do you have time look at this :)
08:58 lookatme my @a = lazy gather for 1 ... 1024 { take "$_ => ", $*THREAD; }; for @a { start { .say } }; # Sometimes rakudo hang on a while with this code
08:59 robertle joined #perl6
08:59 margeas joined #perl6
08:59 margeas joined #perl6
09:05 nadim_ Good morning, I think I have a serious problem;  I describe it here with code https://nopaste.linux-dev.org/?1128479 . Apart the problem described in the link, I also notice that if I place some dd calls to debug, the behavior changes, in this case I get different errors.
09:05 lizmat lookatme: not sure what you expect with that code: runs fine for me but all $*THREAD are thread #1
09:05 lookatme lizmat, I mean sometimes
09:05 lookatme not always
09:06 bjz joined #perl6
09:06 lookatme The result is not important
09:06 lizmat ran it 30 times now, no hang (on MacOS)
09:06 lizmat on what OS are you running >
09:06 lizmat ?
09:06 mcmillhj joined #perl6
09:07 lookatme my pc is fedora 25
09:07 lookatme Linux localhost.localdomain 4.10.13-200.fc25.x86_64 #1 SMP Thu Apr 27 20:39:25 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
09:08 lookatme It was hang on a while every 3 or 4 times
09:09 eater hangs for me the 21th time
09:10 moritz does need the reference to $*THREAD to hang?
09:10 lookatme No
09:10 lookatme I tried without $*THREAD
09:11 eater also works w/o $*THREAD ye
09:11 eater s/works/hangs
09:12 lookatme But it not hang on forever
09:12 lizmat lookatme eater: if you do "use 6.d.PREVIEW", does it also hang ?
09:12 lookatme no
09:12 lookatme perl6 -e ' my @a = lazy gather for 1 ... 1024 { take "$_ => ", $*THREAD; }; my @z = gather for @a { take start { say $_.Str } }; await Promise.allof(@z);'
09:12 eater it won't hang with strace attached :(
09:13 eater it does!
09:13 lookatme I run that code in terminal
09:14 lookatme sorry this code
09:14 lookatme perl6 -e ' my @a = lazy gather for 1 ... 1024 { take "$_ => "; }; for @a { start { $_.say } };'
09:14 lookatme This is without $*THREAD, also hang on
09:14 eater let me build the newest rakudo :)
09:14 jnthn https://rt.perl.org/Ticket/Display.html?id=129787
09:14 jnthn It's very likely that
09:14 lookatme my rakudo version is newest
09:14 lookatme This is Rakudo version 2017.05 built on MoarVM version 2017.05
09:15 lizmat lookatme: those fixes jnthn mentioned were post 2017.05 release
09:15 eater I was still on my own .04
09:15 darutoko joined #perl6
09:15 jnthn lizmat: The fixes for that issue are also still in a branch, not merged
09:15 jnthn (Branch is refactor-handle-encoding)
09:16 lizmat ah, ok
09:16 lizmat apparently on macOS not such an issue
09:16 lizmat haven't been able to get it to hang at all
09:16 lookatme lizmat, use 6.d.PREVIEW hang on too
09:17 lizmat yeah, I now understand it's not in blead at all anyway  :-)
09:18 eater with strace your example gives a SEGFAULT jnthn :')
09:18 eater it's the wrong tool anyway
09:18 eater oh no
09:18 eater it does just so
09:21 lookatme lizmat, oh so it was fixed ? but not in .05 release ?
09:21 lizmat lookatme: it is about to be fixed, and will most likely be in 2017.06
09:21 zengargoyle i've been trying it the past couple of minutes on 2017.04.3-293-ga7c23aa21 built on MoarVM version 2017.04-68-g5f233249 and nothing weird happens.
09:21 lizmat zengargoyle: what OS ?
09:22 zengargoyle debian sid Linux zim 4.9.0-3-amd64 #1 SMP Debian 4.9.25-1 (2017-05-02) x86_64 GNU/Linux
09:23 eater perl6 kills the child threads when the main thread finishes right?
09:23 moritz I think it just exits the process
09:23 moritz and the OS kills the child threads
09:23 nadim_ I found the error I posted about, I had ($x, $y, ...) := ($a, $b, ...)  so I used ":=" and it worked fine till I gave it a Pair. Now I must admit that I don't remember why it is ":=", it is probably from old code that I did not change. but it worked till it groaked on a Pair, anyone could explain why?
09:24 mcmillhj joined #perl6
09:24 Actualeyes left #perl6
09:24 zengargoyle i'm assuming its suppost to hang and not get me back to the prompt rather instantly...
09:24 moritz nadim_: can you boil it down to a one- or two-liner here to demonstrate the problem?
09:24 eater replacing note w/ say in jnthn examples gives no errors at all
09:25 nadim_ m: my ($final, $rendered, $s, $continuation_glyph) = (True, False, 1 => "a", "") ;
09:25 camelia rakudo-moar 833c12: ( no output )
09:25 nadim_ m: my ($final, $rendered, $s, $continuation_glyph) := (True, False, 1 => "a", "") ;
09:25 camelia rakudo-moar 833c12: OUTPUT: «This type cannot unbox to a native string: P6opaque, Int␤  in block <unit> at <tmp> line 1␤␤»
09:26 nadim_ m: my ($final, $rendered, $s, $continuation_glyph) := (True, False, 1 , "") ;
09:26 camelia rakudo-moar 833c12: ( no output )
09:26 nadim_ it happens when given a Pair
09:26 moritz weird
09:27 moritz m: sub ($final, $rendered, $s, $continuation_glyph) {}(True, False, 1 => "a", "")
09:27 camelia rakudo-moar 833c12: ( no output )
09:27 moritz I suspect that's a bug
09:28 nadim_ So do I
09:28 lookatme :1("a") It will be convert to this ?
09:29 jnthn m: (True, False, 1 => "a", "").Capture
09:29 camelia rakudo-moar 833c12: OUTPUT: «This type cannot unbox to a native string: P6opaque, Int␤  in block <unit> at <tmp> line 1␤␤»
09:29 xtreak joined #perl6
09:29 jnthn There's a gold
09:29 jnthn *golf
09:30 lookatme m: my ($s) := (1 => "a"); say $s;
09:30 camelia rakudo-moar 833c12: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
09:30 lizmat it's assuming the key of a Pair is a Str
09:31 lookatme m: my ($s) := \(1 => "a"); say $s;
09:31 camelia rakudo-moar 122aca: OUTPUT: «1 => a␤»
09:31 jnthn That form doesn't use .Capture
09:31 lookatme m: my ($final, $rendered, $s, $continuation_glyph) := (True, False, \(1 => "a"), "") ;
09:31 camelia rakudo-moar 122aca: ( no output )
09:31 jnthn lizmat: Yeah, I guessed so
09:31 lookatme m: my ($final, $rendered, $s, $continuation_glyph) := (True, False, \(1 => "a"), "") ; say $s;
09:31 camelia rakudo-moar 122aca: OUTPUT: «\(1 => "a")␤»
09:32 lookatme m: my ($final, $rendered, $s, $continuation_glyph) := (True, False, "1" => "a", "") ; say $s;
09:32 camelia rakudo-moar 122aca: OUTPUT: «Too few positionals passed; expected 4 arguments but got 3␤  in block <unit> at <tmp> line 1␤␤»
09:32 jnthn It should check and leave it as a Pair otherwise I guess
09:32 lizmat now, not making it blow up is simple, but whether it should be getting there, is another question
09:34 lizmat have fix, running spectest now
09:39 lizmat nadim_: could you check if  https://github.com/rakudo/rakudo/commit/5b25836f21 does it for you?
09:40 lookatme see #perl6 tomorrow .. bye
09:41 nadim_ lizmat: sure, will come back later with the result
09:43 xtreak joined #perl6
09:51 skids joined #perl6
09:55 Ven joined #perl6
09:59 bacek joined #perl6
10:00 nadim_ lizmat: I get an error: Too few positionals passed; expected 4 arguments but got 3
10:01 lizmat hmmm... could you golf again?  because the golfed code works for me
10:01 nadim_ ok
10:01 lizmat aahhhh
10:01 lizmat hold on...
10:01 lizmat you're binding
10:02 nadim_ that's what caused the error
10:02 nadim_ with assignment it works fine
10:02 astj joined #perl6
10:03 lizmat argh, I missed that
10:03 lizmat please RT it, this is not as simple to fix as I thought  :-(
10:03 nadim_ ok
10:04 jnthn You'd only get .Capture called for you if you were binding; that's why it golfed to .Capture
10:04 bacek aloha
10:07 Cabanossi joined #perl6
10:08 bacek can anyone help with running rakudo under valgrind? It doesn't produce output at the exit.
10:09 nadim_ golfed to this: my ($y) := (Pair.new(1, 1)) ;
10:09 nadim_ RT is only via mail or there is an interface somewhere?
10:10 parv is there not a way to avoid "Too many poistionals passed..." during binding when there are not enough "receivers" (e.g. my ($x ) := (1,2) )?
10:11 lizmat nadim_: Zoffix already made a ticket: https://rt.perl.org/Ticket/Display.html?id=131351
10:11 lizmat perhaps you could add your golf to that ?
10:11 jnthn parv: my ($x, *@)
10:12 parv thanks jnthn.
10:18 nadim_ lizmat: the link above gives me "No permission to display that ticket "
10:21 astj joined #perl6
10:22 lizmat nadim_: no idea why, maybe [Coke] knows why
10:22 astj joined #perl6
10:24 yqt joined #perl6
10:28 astj joined #perl6
10:30 Geth ¦ doc: 60a1d89875 | (Zoffix Znet)++ | doc/Type/List.pod6
10:30 Geth ¦ doc: Document List.Capture stringifies .keys of Pairs
10:30 Geth ¦ doc:
10:30 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/5b25836f21
10:30 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/ae935c92eb
10:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/60a1d89875
10:42 robertle joined #perl6
10:45 Zoffix joined #perl6
10:45 Zoffix bacek: are you using ./perl-valgrind-m in rakudo
10:46 Zoffix bacek: or rather... a thing you get when you build rakudo from repo
10:46 Zoffix oh, rakudobrew installs it too: perl6-valgrind-m
10:48 mr-foobar joined #perl6
10:49 moritz bacek is back!
10:50 nine Now that's a name I haven't read in a long time!
10:50 Zoffix nadim_: that's likely because you don't have an account on RT
10:51 Zoffix nadim_: but after a discussion, lizmat++'s original fix was put back.... I think all the problems are solved now
10:52 TEttinger sounds like whatever it was got fixed rather quickly
10:52 Cabanossi joined #perl6
10:53 Zoffix m: my ($final, $rendered, $continuation_glyph, *%nameds) := (True, False, 1 => "a", ""); dd [ $final, $rendered, $continuation_glyph, *%nameds ]
10:53 camelia rakudo-moar e65800: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    nameds used at line 1␤␤»
10:53 Zoffix m: my ($final, $rendered, $continuation_glyph, *%nameds) := (True, False, 1 => "a", ""); dd [ $final, $rendered, $continuation_glyph, %nameds ]
10:53 camelia rakudo-moar e65800: OUTPUT: «[Bool::True, Bool::False, "", {"1" => "a"}]␤»
10:55 Zoffix Ulti: you're unblocked
10:57 Zoffix left #perl6
11:00 xtreak joined #perl6
11:02 AlexDaniel joined #perl6
11:02 bacek Zoffix: yes. Just found full execution of moar so I can pass --tool=callgrind to it
11:03 bacek moritz, not really :)
11:03 timotimo the perl6-valgrind-m script really want to learn how to select other tools and pass other options
11:11 hankache joined #perl6
11:14 finanalyst joined #perl6
11:14 araraloren joined #perl6
11:15 juliaaa joined #perl6
11:15 juliaaa hello
11:16 araraloren hi o/
11:17 juliaaa how are you?
11:19 tbrowder hi, araraloren
11:19 araraloren tbrowder, hi
11:21 araraloren eating dinner now :)
11:30 nadim_ still can't see the ticket, I rapported the bug with this title:  [BUG] can't bind to a Pair
11:31 AlexDaniel nadim_: it's there
11:31 AlexDaniel nadim_: https://rt.perl.org/Ticket/Display.html?id=131353
11:42 Zoffix joined #perl6
11:43 Zoffix nadim_: that's not a bug though. See my evals above. Pairs are passed as named args
11:45 nadim_ ok, how does it translate for the user? am i supposed to know what type it has before binding to it? Note that this becomes a theoretical question as I am not sure I need to bind them, assignment passes all the tests.
11:49 haxmeister joined #perl6
11:49 Zoffix nadim_: it's not about binding, but unpacking, which you'd doing because you put parens around ($x). This uses the return value of .Capture method to unpack into positionals and named args. Pairs inside lists become nameds, the rest positionals (my eval above). A lone pair unpacks into two named args: :key and :value (your ticket). Are you supposed to know what you're unpacking to unpack it correctly?... Well,
11:50 Zoffix yes, an object can define whatever Capture it wants. You can use slurpries and captures in sigs to handle varying cases
11:50 rjbs joined #perl6
11:50 jercos joined #perl6
11:51 Zoffix m: class Foo { method Capture { \(1, 2, :42a) }}; my ($x, $y, :$a) := Foo.new; dd [$x, $y, $a]
11:51 camelia rakudo-moar b43303: OUTPUT: «[1, 2, 42]␤»
11:51 xxpor joined #perl6
11:51 Zoffix m: class Foo { method Capture { \(1, 2, :42a) }}; my ($x, |) := Foo.new; dd $x
11:51 camelia rakudo-moar b43303: OUTPUT: «1␤»
11:52 LeCamarade joined #perl6
11:53 Zoffix m: class Foo { method Capture { \(1, 2, :42a) }}; my (*@pos, *%named) := Foo.new; dd [ @pos, %named ]
11:53 camelia rakudo-moar b43303: OUTPUT: «[[1, 2], {:a(42)}]␤»
11:53 Zoffix etc
11:54 risou joined #perl6
11:54 eythian joined #perl6
11:55 Zoffix m: class Foo { method Capture { \(1, 2, :42a) }}; my $obj := Foo.new; dd $obj
11:55 camelia rakudo-moar b43303: OUTPUT: «Foo.new␤»
11:55 Zoffix ^ no unpacking here
11:56 Zoffix m: class Foo { method Capture { \(1, 2, :42a) }}; my ($a, $b) = (Foo.new, 42) ; dd [$a, $b]
11:56 camelia rakudo-moar b43303: OUTPUT: «[Foo.new, 42]␤»
11:56 Zoffix ^ or there (note assignment and not binding)
11:56 xtreak joined #perl6
11:56 * Zoffix concludes the "type Perl 6 on your phone" session :)
11:56 Zoffix left #perl6
11:56 nadim_ since the code is generic, objects are passes without knowing what type they are., the error would be to .capture it. Question: the capture is on thereceiving side only, eg: return ($, $, $) does not involve a capture, right?
11:57 nadim_ is there a way to get the returned elements without involving a capture so we can bind to each element, thus avoiding .capture transformation of the Pair?
11:57 AlexDaniel WHEREFORE? XD
12:00 silug joined #perl6
12:01 araraloren Why not using `=` ?
12:01 moritz WILLITFLY?
12:01 araraloren m: my ($Y) = (Pair.new(1, 1)); say $Y;
12:01 camelia rakudo-moar b43303: OUTPUT: «1 => 1␤»
12:01 nadim_ you missed half the conversation araraloren
12:02 araraloren :(
12:02 nadim_ don't worry, there will be more ;)
12:02 jnthn nadim_: The syntax my (signature) := foo; *always* unambiguously means "coerce whatever foo produces to a Capture and bind it to the signature on the left"
12:04 jnthn return ($a, $b, $c) just returns a List
12:04 jnthn So no, there's nothing Capture-y going on there
12:05 jnthn Also worth noting that while list assignment exists (like ($xy, $y) = blah()), there's no such thing as list binding
12:05 nadim_ thank you, I was 99.99.
12:05 nadim_ sure of it but better ask than be sorry
12:06 jnthn Binding is a very low-level operation typically
12:06 nadim_ jnthn: I got that. the case is $x = whatever;   ... ; do_stuff_with($s) ;   ...; ($t, $, $) := give_me_back_my_origina_and_other_stuff() ;
12:06 jnthn The `my (signature) := ...` thing is a special syntactic case that does something differnet to what the bind operator usually does
12:07 nadim_ please explain the difference
12:07 nadim_ so I can die in peace after this long discussion ;)
12:07 jnthn my $x := foo; # evaluate foo and make the variable $x point to the result
12:08 araraloren jnthn, Any document about this ?
12:08 jnthn my @x := foo; # same, but check that it does Positional
12:08 jnthn araraloren: No idea
12:08 jnthn araraloren: But surely it's in the docs somewhere
12:08 jnthn I know there's a bunch of docs on container semantics
12:08 araraloren Em
12:09 jnthn my (signature) := foo; # declares the variables in signature as lexicals, then uses the exact same logic that is used to bind arguments to a signature when calling a sub
12:09 nadim_ I'll just have to check what the purpose of my original ":=" was and what difference it makes. So far all the test pass with "="
12:10 jnthn Yeah, if you didn't want to do signature unpacking then there'd be no reason to use := there
12:11 jnthn araraloren: https://docs.perl6.org/language/containers describes binding
12:13 araraloren I already read it, there is no relate to `() := ...`
12:13 jnthn Yeah, that'd probably not be the right place for it
12:13 jnthn https://docs.perl6.org/type/Signature only mentions it in passing and doesn't have a good example
12:13 jnthn In fact the case it shows doesn't use binding so it degenerates to a list
12:14 araraloren oh
12:14 jnthn So maybe we are missing something for that
12:14 jnthn Gotta take care of some errands; bbiab
12:15 araraloren bye
12:17 araraloren It's just like passing arguments. The docs said that: Passing arguments to a signature binds the arguments, contained in a Capture, to the signature.
12:20 Geth ¦ doc: c798ff64c5 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
12:20 Geth ¦ doc: Document Mu.Capture
12:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c798ff64c5
12:22 g4 joined #perl6
12:22 g4 joined #perl6
12:22 Cabanossi joined #perl6
12:23 raschipi joined #perl6
12:23 rindolf joined #perl6
12:34 wamba joined #perl6
12:38 Geth ¦ ecosystem: 13b309cac5 | (Martin Barth)++ (committed using GitHub Web editor) | META.list
12:38 Geth ¦ ecosystem: Created an github organisation for Bailador
12:38 Geth ¦ ecosystem:
12:38 Geth ¦ ecosystem: changes the URL to match the new repository for Bailador
12:38 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/13b309cac5
12:49 xtreak joined #perl6
12:52 bisectable6 joined #perl6
12:56 mcmillhj joined #perl6
13:02 xtreak_ joined #perl6
13:02 cdg joined #perl6
13:05 pmurias joined #perl6
13:22 Cabanossi joined #perl6
13:28 szabgab joined #perl6
13:32 nadim_ araraloren: and that sentence needs an example, a drawing, and some headache pills
13:40 tbrowder privmsg jnthn : check edument e-mail
13:56 khw joined #perl6
14:02 xinming joined #perl6
14:20 Sgeo joined #perl6
14:22 Cabanossi joined #perl6
14:26 astj joined #perl6
14:30 Sgeo joined #perl6
14:34 raiph joined #perl6
14:39 wamba joined #perl6
14:49 eyck joined #perl6
14:54 Nex6 joined #perl6
14:56 greppable6 joined #perl6
15:05 Zoffix joined #perl6
15:06 Zoffix Is anyone in touch with the travis stuff? I tweeted slightly wrong travis setup and it made it into the Perl 6 travis docs update. I also think the default test script is wrong, but I don't know travis. I made suggestions here, but it's a closed PR and I don't know if the suggestions are sound: https://github.com/travis-ci/docs-travis-ci-com/pull/1190#issuecomment-303750710
15:07 * Zoffix wishes for Royalty on White Horse to sweep this problem up
15:10 pmurias hmm, should 'make js-all' do a 'npm install' for the js deps?
15:12 Sgeo joined #perl6
15:22 Cabanossi joined #perl6
15:28 Geth ¦ ecosystem: 86a5a47ed2 | loren++ (committed using GitHub Web editor) | META.list
15:28 Geth ¦ ecosystem: Update Terminal::Table version
15:28 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/86a5a47ed2
15:31 yqt joined #perl6
15:32 eyck joined #perl6
15:32 tbrowder .tell
15:32 yoleaux Relay a telegram to someone
15:34 Zoffix Is there a way to make `zef` display detailed test output? Like `prove -v` does
15:34 tbrowder .tell moritz apress is having probs (on linux and win, chrome), i can't but yr book from U.S.
15:34 yoleaux tbrowder: I'll pass your message to moritz.
15:37 Zoffix or more specifically: verbose test output with Zef::Service::TAP plugin
15:37 Zoffix so case when TAP::Harness *is* installed
15:41 Zoffix .ask ugexe is there a way to map Zef::Service::TAP plugin print full output. We're trying to update the travis test script to use `zef install .` and give detailed test output. Any idea? https://github.com/travis-ci/docs-travis-ci-com/pull/1190#issuecomment-303762219
15:41 yoleaux Zoffix: I'll pass your message to ugexe.
15:41 greppable6 joined #perl6
15:46 ugexe probably, not sure off the top of my head how though. there is a Formatter::Volume that could be set to verbose but not sure how to pass it in
15:46 yoleaux 15:41Z <Zoffix> ugexe: is there a way to map Zef::Service::TAP plugin print full output. We're trying to update the travis test script to use `zef install .` and give detailed test output. Any idea? https://github.com/travis-ci/docs-travis-ci-com/pull/1190#issuecomment-303762219
15:52 Zoffix I remember struggling with it before... I see Harness takes a Reporter class, so feels like one should be able to set volume on the formatter and pass it, BUT, the attribute is type-constrainted to :U only :/
15:53 Zoffix maybe it's a bug...
15:56 grondilu joined #perl6
15:57 Zoffix Well, I opened this Issue. Hopefully, leont will have time to spot it and answer: https://github.com/perl6/tap-harness6/issues/14
15:57 skids joined #perl6
15:57 Zoffix And for anyone else wishing to take a crack at it. The code is here: https://github.com/rakudo/rakudo/blob/nom/lib/TAP.pm6#L302
15:58 Zoffix You can run some tests with `perl6 -e 'use TAP; TAP::Harness.new.run("some-test-file.t").result'` and the goal is to make output `Verbose`, like `prove -v`
15:59 Zoffix I mean the code is here: https://github.com/perl6/tap-harness6/blob/master/lib/TAP.pm#L302
16:00 devmikey joined #perl6
16:01 pochi joined #perl6
16:01 ugexe ah yeah prove6 doesn't seem to have a -v either
16:07 Zoffix "No extracting backend available" :(
16:07 Cabanossi joined #perl6
16:07 Zoffix time to update stuff, I guess
16:07 Zoffix this box is still on 2017.04.2-6-g894ba82
16:08 rblackwe joined #perl6
16:08 Zoffix `zef update` solved the issue...
16:08 Zoffix left #perl6
16:09 bioduds joined #perl6
16:11 Sound joined #perl6
16:11 ugexe wonder if its due to meta.info -> meta6.json renaming + zef cache somehow
16:11 ugexe (zef update also rewrites its cache index file)
16:12 ugexe hmmm no i don't think thats it
16:14 ugexe maybe just a network hiccup
16:18 mst joined #perl6
16:18 Ulti joined #perl6
16:18 garu joined #perl6
16:36 greppable6 joined #perl6
16:36 Cabanossi joined #perl6
16:37 greppable6 joined #perl6
16:39 Geth ¦ whateverable: 8278ed7be5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Greppable.p6
16:39 Geth ¦ whateverable: Output .md files instead of plain text
16:39 Geth ¦ whateverable:
16:39 Geth ¦ whateverable: This will create a much nicer output with links to the sources.
16:39 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/8278ed7be5
16:43 grumble2 joined #perl6
16:45 ufobat joined #perl6
16:46 jmerelo joined #perl6
16:47 jmerelo Need help again
16:48 jmerelo this is probably a stupid question, but can't find the way to eliminate Nils from an array
16:48 jmerelo p6: my @þ = (1,Nil,2,Nil); @þ.grep( * )
16:48 camelia rakudo-moar 6dbe85: ( no output )
16:49 jmerelo p6: my @þ = (1,Nil,2,Nil); @þ.grep( * );
16:49 camelia rakudo-moar 6dbe85: ( no output )
16:49 jmerelo (Returns (1 (Any) 2 (Any)) in my system)
16:50 jmerelo @þ.grep( * != Nil ) is correct, but returns several warnings
16:51 jmerelo Use of Nil in numeric context
16:51 jmerelo in whatevercode  at <unknown file> line 1
16:51 jmerelo @þ.grep( * ne Nil )
16:51 jmerelo @þ.grep( * ne Nil )
16:51 jmerelo Use of Nil in string context
16:51 jmerelo in whatevercode  at <unknown file> line 1
16:51 jmerelo Any idea?
16:52 ugexe m: my @arr = (1,Nil,2,Nil); say @arr.grep(*.defined)
16:52 camelia rakudo-moar 338193: OUTPUT: «(1 2)␤»
16:52 jmerelo Thanks!
16:52 ugexe m: my @arr = (1,Nil,2,Nil); say @arr.grep(* !~~ Nil)
16:52 camelia rakudo-moar 338193: OUTPUT: «(1 (Any) 2 (Any))␤»
16:53 ugexe eh
16:54 domidumont joined #perl6
16:54 moritz tbrowder: I don't know if the book is for sale already
16:54 yoleaux 15:34Z <tbrowder> moritz: apress is having probs (on linux and win, chrome), i can't but yr book from U.S.
16:54 moritz so far it's just a landing page
16:55 tinita m: my $data = undef; my @arr = (\$data); say @arr
16:55 camelia rakudo-moar 338193: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ an undefined type object such as Any or Int,␤   :!defined as a matcher,␤        Any:U as a type constraint,␤    Nil as the ab…»
16:55 moritz tbrowder: if you're on the book mailing list, you'll get an email once it's available for presale
16:55 tinita m: my $data = Nil; my @arr = (\$data); say @arr
16:55 camelia rakudo-moar 338193: OUTPUT: «Potential difficulties:␤    To pass an array, hash or sub to a function in Perl 6, just pass it as is.␤    For other uses of Perl 5's ref operator consider binding with ::= instead.␤    Parenthesize as \(...) if you intended a capture of a single v…»
16:55 tinita m: my $data = Nil; my @arr = (\($data)); say @arr
16:55 camelia rakudo-moar 338193: OUTPUT: «[\(Any)]␤»
16:56 tinita m: my $data = Nil; my @arr = (item($data)); say @arr
16:56 camelia rakudo-moar 338193: OUTPUT: «[(Any)]␤»
16:56 Zoffix joined #perl6
16:57 Zoffix jmerelo: by default, those Nils would turn to Any in the array, so you'd need to grep for them
16:57 pilne joined #perl6
16:57 Zoffix m: my @arr = (1,Nil,2,Nil); say @arr.grep: * !=== Any
16:57 camelia rakudo-moar 338193: OUTPUT: «(1 2)␤»
16:58 tinita hi, i would like to save a reference to $data in an array, but $data is undef at the beginning. any hint?
16:58 Zoffix tinita: Perl 6 is far removed from Perl 5. The \ is not a reference maker.
16:58 tinita Zoffix: yeah, just found out =)
16:58 timotimo m: my @arr = (1, Nil, 2, Nil); say @arr.perl
16:58 camelia rakudo-moar 338193: OUTPUT: «[1, Any, 2, Any]␤»
16:58 timotimo jmerelo: you can't grep out the nils because there are no nils in there
16:58 tinita Zoffix: the docs say item(), but it seems it doesn't work like i expect
16:58 timotimo array assignment is assignment, assigning Nil to a variable resets it to its default value
16:59 timotimo m: my @a is default "hello"; @a = (1, Nil, 2, Nil); say @a.perl
16:59 camelia rakudo-moar 338193: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my @a is default7⏏5 "hello"; @a = (1, Nil, 2, Nil); say @a.␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        p…»
16:59 Zoffix m: my $data; my @arr; @arr[0] := $data; dd @arra; $data = 42; dd @arr
16:59 camelia rakudo-moar 338193: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@arra' is not declared. Did you mean '@arr'?␤at <tmp>:1␤------> 3my $data; my @arr; @arr[0] := $data; dd 7⏏5@arra; $data = 42; dd @arr␤»
16:59 Zoffix m: my $data; my @arr; @arr[0] := $data; dd @arr; $data = 42; dd @arr
16:59 camelia rakudo-moar 338193: OUTPUT: «Array @arr = [Any]␤Array @arr = [42]␤»
16:59 timotimo how do we do that again ...
17:00 Zoffix tinita: ^ like that. Arrays make containers, so you need to bind the $data's container to the array's item's container. But this feels an odd thing to what. What are you actually trying to accomplish?
17:00 tinita m: my $data = Nil; my @arr = (item($data)); $data = 23; dd @arr
17:00 camelia rakudo-moar 338193: OUTPUT: «Array @arr = [Any]␤»
17:00 Zoffix tinita: which docs are you reading?
17:00 tinita Zoffix: i'm building a data structure from parser events
17:00 setty1 joined #perl6
17:00 tinita Zoffix: https://docs.perl6.org/language/5to6-nutshell#Reference_creation
17:00 Zoffix tinita: OK, but why do you need (a) an Array (b) references to original
17:01 Zoffix tinita: ahhh.. Yeah, that entire section is terrible and needs to be removed
17:01 tinita Zoffix: i guess there is a different way to do this, but this is like I do it i perl5:
17:01 tinita Zoffix: so i have an array of references
17:01 Zoffix Ticket for it: https://github.com/perl6/doc/issues/1081
17:01 tinita Zoffix: while getting events and diving into the data structure, i keep the references of all levels
17:02 tinita Zoffix: so i can add data to hashes and arrays later
17:03 Zoffix tinita: I think you'll have a lot of trouble trying to do this by rebinding array item containers. How about proper classes? What's @arr[0]? It can be $.something-more-descriptive
17:03 tinita Zoffix: https://github.com/perlpunk/YAML-PP-p5/blob/master/lib/YAML/PP/Loader.pm#L78 ff.
17:03 * Zoffix takes a look
17:03 tinita Zoffix: it's called @refs there
17:04 jmerelo @zoffix thanks!
17:04 tinita Zoffix: and it contains references to $self->data
17:05 Zoffix timotimo: you need parens around default value
17:05 tinita so i simply need a pointer/reference/whatever to a data structure
17:06 Zoffix m: my @a is default("hello"); @a = (1, Nil, 2, Nil); say @a.perl
17:06 camelia rakudo-moar 338193: OUTPUT: «[1, "hello", 2, "hello"]␤»
17:07 Zoffix m: class DataStructure { has $.data is rw = "foos"; }; my $d = DataStructure.new; sub do-things ($d) { $d.data = "meows" }( $d ); dd $d.data
17:07 camelia rakudo-moar 338193: OUTPUT: «Str $!data = "meows"␤»
17:07 Zoffix tinita: ^ I was thinking more along those lines.
17:07 * tinita reads
17:08 Zoffix m: my $x = 'foos'
17:08 camelia rakudo-moar 338193: ( no output )
17:08 Zoffix oops
17:08 tinita hm, i think creating objects will make this thing much bigger and slower...
17:09 Zoffix m: my $x = 'foos'; sub ($y is rw) { $y = "meows" }( $x ); dd $x
17:09 camelia rakudo-moar 338193: OUTPUT: «Str $x = "meows"␤»
17:09 tinita Zoffix: the alterative is to stack up data and integrate them into lower levels when I get the closing events
17:09 Zoffix tinita: you already have objects! :) Everything's an object. Except instead of hacking around with container rebinding, you'll have something neater.
17:09 Zoffix tinita: also see my last eval above. You can pass `is rw` to subs and then can write back to original results.
17:09 Zoffix original container I mean
17:10 tinita Zoffix: i'm just disappointed that this neat and short p5 solution can't work in p6 =)
17:10 Zoffix pffft
17:10 Zoffix It can. I just showed you how
17:10 tinita i'm very new to perl 6, i have to say
17:10 tinita so i have to understand first
17:11 Zoffix tinita: my advice: forget Perl 5. I found Perl 6 very frustrating until I stopped trying to map Perl 5 concepts to Perl 6.
17:13 Zoffix Don't know what's neat about this: https://github.com/perlpunk/YAML-PP-p5/blob/master/lib/YAML/PP/Loader.pm#L74-L97
17:13 Zoffix The scalar reference to scalar reference to undef is particularly shiny heh
17:14 Zoffix If it's parser, perhaps Grammar is what you want?
17:14 tinita it's a loader
17:15 tinita the parser port comes later (hopefully)
17:15 Zoffix Ah
17:15 Zoffix m: my @a = 1, 2, 3, <a b c>, <d e g>; dd @a
17:15 camelia rakudo-moar 931012: OUTPUT: «Array @a = [1, 2, 3, ("a", "b", "c"), ("d", "e", "g")]␤»
17:16 pilne hrm when i apply elems to @array[2;2] i get 2, even though there are four elements to a 2x2 matrix, or are "multidimensional arrays" seen more as "arrays of arrays" than as a matrix?
17:16 Zoffix tinita: ^ note how Perl 6 doesn't have Perl 5's flattening. So there are no "references" any more as far as talking about the language is concerned
17:17 tinita Zoffix: yeah, maybe I can get it working when I find an alternative to undef. it's only undef initially, until i make an array or hash of it
17:18 pilne couldn't it just be (Any) then?
17:18 Zoffix Perl 6 has infinite number of undefs, so I think you won't have any issues picking one :)
17:19 tinita m: my $data = Any; my @arr = ($data); $data = 23; dd @arr
17:19 camelia rakudo-moar 931012: OUTPUT: «Array @arr = [Any]␤»
17:19 pilne m: my @array[2;2]
17:19 camelia rakudo-moar 931012: ( no output )
17:19 pilne a bit different than repl >.<
17:20 domidumont1 joined #perl6
17:20 Zoffix pilne: not sure. The source just looks at reified: https://github.com/rakudo/rakudo/blob/17c052e/src/core/ShapedArray.pm#L533-L535
17:21 Zoffix .ask lizmat is .elems on shadped arrays supposed to just give the number of "top" dimensions? Like, (my @array[2;42]).elems.say gives 2. Code in question: https://github.com/rakudo/rakudo/blob/17c052e/src/core/ShapedArray.pm#L533-L535
17:21 yoleaux Zoffix: I'll pass your message to lizmat.
17:21 Zoffix pilne: ^ lizmat is our resident expert on this stuff. Maybe she'll know
17:22 Zoffix \o
17:22 Zoffix left #perl6
17:22 pilne when i repl it it shoes  [[(Any) (any)] [(Any) (Any)]]
17:22 pilne tu zpffox
17:22 pilne jeebus.. why does my hexchat have such input lag >.< i'm dying here
17:23 timotimo are you accidentally using it over X11 forwarding?
17:23 timotimo did you start a rakudo in the background that eats up all your ram and swap?
17:24 pilne afaik no, ubuntu mate 16.04, higher-end compositor, rakudo repl in the background but system is basically idling
17:25 pilne i do have my wow-launcher idling using wine.. but it does this all the time, it just hit me hard there for a minute lol.
17:25 timotimo weird.
17:25 domidumont joined #perl6
17:26 pilne and this is a gaming laptop, older, but still lets me raid when i feel like it.
17:26 pilne yeah, it's due for a refreshening sometime before the next lts... i'm itching for it.
17:26 nadim_ joined #perl6
17:27 timotimo hardware refresh?
17:28 pilne lol, os install refresh, i've got more compilers and libs i'll probably never use from dabbling around in things... and i still don't fully trust something like apt.
17:28 timotimo *shrug*
17:30 pilne does perl6 represent shaped arrays as matricies internally, or are they more "arrays of arrays(of arrays... etc)"?
17:30 timotimo it's one contiguous memory block
17:31 nadim_ pilne: the good thing is that you don't have to trust apt, just install and compile everything by hand.
17:33 stmuk joined #perl6
17:34 * pilne looks at the steam games file and shudders deeply
17:46 kent\n joined #perl6
17:50 robertle joined #perl6
17:52 Cabanossi joined #perl6
18:00 lizmat .
18:00 yoleaux 17:21Z <Zoffix> lizmat: is .elems on shadped arrays supposed to just give the number of "top" dimensions? Like, (my @array[2;42]).elems.say gives 2. Code in question: https://github.com/rakudo/rakudo/blob/17c052e/src/core/ShapedArray.pm#L533-L535
18:00 lizmat m: my @a{2,3,4]; dd @a.elems
18:00 camelia rakudo-moar 931012: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shape definition; couldn't find final '}' ␤at <tmp>:1␤------> 3my @a{2,3,47⏏5]; dd @a.elems␤    expecting any of:␤        statement end␤        statement modif…»
18:00 lizmat m: my @a{2,3,4]; dd @a.elems
18:00 camelia rakudo-moar 931012: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shape definition; couldn't find final '}' ␤at <tmp>:1␤------> 3my @a{2,3,47⏏5]; dd @a.elems␤    expecting any of:␤        statement end␤        statement modif…»
18:00 lizmat m: my @a{2;3;4]; dd @a.elems
18:01 camelia rakudo-moar 931012: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in shape definition; couldn't find final '}' ␤at <tmp>:1␤------> 3my @a{2;3;47⏏5]; dd @a.elems␤    expecting any of:␤        statement end␤        statement modif…»
18:01 bacek joined #perl6
18:01 lizmat m: my @a[2;3;4]; dd @a.elems   # duh
18:01 camelia rakudo-moar 931012: OUTPUT: «2␤»
18:02 lizmat .tell Zoffix I seem to recall that's what jnthn decided on
18:02 yoleaux lizmat: I'll pass your message to Zoffix.
18:09 perlpilot huh ... I just realized that I responded on #perl6-dev because that's the "normal" #perl6 channel for me
18:10 perlpilot m: my @a[2;3;4]; dd @a.shape;  # for those that may have missed it.
18:10 camelia rakudo-moar 931012: OUTPUT: «(2, 3, 4)␤»
18:13 Geth ¦ doc: 8e673dbe4c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Array.pod6
18:13 Geth ¦ doc: Document Array.elems
18:13 Geth ¦ doc:
18:13 Geth ¦ doc: Include info on .elems of shaped arrays, per:
18:13 Geth ¦ doc: https://irclog.perlgeek.de/perl6/2017-05-24#i_14631924
18:13 Geth ¦ doc: https://irclog.perlgeek.de/perl6/2017-05-24#i_14631943
18:13 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8e673dbe4c
18:15 [Coke] https://github.com/perl6/doc/issues/1325 - LHF for a doc commit.
18:18 Geth ¦ doc: 4ee4ff26a0 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_entry.pod6
18:18 Geth ¦ doc: Remove trailing ws; Fixes #1325
18:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4ee4ff26a0
18:19 Geth ¦ doc: 64e6aa44cf | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Array.pod6
18:19 Geth ¦ doc: Remove more trailing ws
18:19 Geth ¦ doc:
18:19 Geth ¦ doc: (GitHub web editor)--
18:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/64e6aa44cf
18:30 [Coke] Zoffix=+
18:30 [Coke] Zoffix++, even.
18:33 dylanwh Zoffix+=1
18:34 * [Coke] is bummed that the TPC is YA being held during the local school year.
18:34 [Coke] (makes it very hard for us old farts to go.)
18:35 Geth ¦ DBIish: 13d2759538 | (Zoffix Znet)++ (committed using GitHub Web editor) | .travis.yml
18:35 Geth ¦ DBIish: Use more recent "older Star" version
18:35 Geth ¦ DBIish:
18:35 Geth ¦ DBIish: zef don't work on 2016.01 no more and travis build fails
18:35 Geth ¦ DBIish: review: https://github.com/perl6/DBIish/commit/13d2759538
18:41 espadrine joined #perl6
18:50 kaare__ joined #perl6
19:20 Geth ¦ doc: 1bc21a4e16 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Socket.pod6
19:20 Geth ¦ doc: Document Socket.recv $elems maxes out at 65535
19:20 Geth ¦ doc:
19:20 Geth ¦ doc: https://irclog.perlgeek.de/perl6-dev/2017-05-24#i_14632217
19:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1bc21a4e16
19:21 azawawi joined #perl6
19:21 azawawi hi
19:21 yoleaux 23 May 2017 21:34Z <thundergnat> azawawi: Thanks for the Terminal::Libcaca bindings. It's been fun to play with. Some code in the wild: http://rosettacode.org/wiki/Draw_a_rotating_cube#Perl_6
19:23 azawawi .tell thundergnat You're welcome :)
19:23 yoleaux azawawi: I'll pass your message to thundergnat.
19:24 * azawawi starts working on Chart::PLPlot :)
19:24 azawawi Is the Chart:: namespace a good place for plotting libraries?
19:28 lizmat seems there is a precedent in the Perl 5 world
19:28 lizmat https://metacpan.org/pod/Chart
19:29 azawawi starting blocks for PLPlot support in Perl 6 :)
19:29 azawawi https://github.com/azawawi/scripts/blob/master/plplot.p6
19:30 azawawi Chart::PLPlot or PLPlot
19:30 dwarring joined #perl6
19:32 kaare__ joined #perl6
19:33 ufobat joined #perl6
19:38 azawawi hmmm https://metacpan.org/pod/PDL::Graphics::PLplot
19:38 azawawi It is seems the Graphics:: namespace is better
19:40 Geth ¦ doc: 5da4951268 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Rational.pod6
19:40 Geth ¦ doc: Document Rational.Int
19:40 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5da4951268
19:42 * azawawi looks at the Silent Perl 6 guild halls in the distance and throws a needle
19:43 lizmat azawawi: naming modules in Perl 6 is less important than in Perl 5, because we cannot have name clashes
19:43 lizmat either that, or everybody is watching the soccer final
19:43 azawawi between?
19:43 azawawi :)
19:47 azawawi aha https://metacpan.org/pod/Graphics::PLplot
19:47 * azawawi starts working on Graphics::PLplot
19:47 mst azawawi: there's quite a few things in the Chart:: namespace in perl5 and if you're specifically making a thing that's doing plotting then I'd probably call it Chart::PLPlot
19:48 azawawi Looking at the examples, i guess its graphics http://plplot.sourceforge.net/examples.php
19:48 azawawi and not only charts
19:48 azawawi mst: thx :)
19:49 mst I think it mostly boils down to "what do you expect your users to be looking for this to use it for"
19:49 mst and I *suspect* the answer is tat that means Chart:: is better
19:49 mst but that's a free opinion, worth exactly what you paid ;)
19:50 pmurias Chart:: seems a lot of more specific
19:55 pmurias azawawi: aren't charts and plots synonyms?
19:55 TreyHarris I asked this the other day when no one was around, and got no answer, so let me try again: is there a way to incrementally build docs for local viewing? It's painful to make a small change and have to wait minutes for even 'perl6 htmlify.p6 --no-highlight' to complete, but I don't want to push a commit before viewing it in case I made a POD mistake
19:56 azawawi pmurias: yup
19:56 brrt joined #perl6
19:56 * azawawi dev VM has crashed...
19:57 TreyHarris pmurias: not exactly, but close: https://english.stackexchange.com/questions/43027/whats-the-difference-between-a-graph-a-chart-and-a-plot
19:59 lizmat TreyHarris: fwiw, I do *not* know the answer to your question
20:02 cdg joined #perl6
20:04 [Coke] TreyHarris: doc building is known to be slow and the build is kind of complicated. if you break something temporarily, no one is going to yell at you.
20:04 yoleaux 19:36Z <Zoffix> [Coke]: any idea why a whole bunch of code in Rational.pod6 have :skip-test on them? https://github.com/perl6/doc/blob/master/doc/Type/Rational.pod6#L26
20:04 TreyHarris lizmat: thanks for the validation that I'm not alone :-)
20:05 TreyHarris I can't build with highlight at all, it spits out a node.js error about a worker and hangs forever, but I'm not worried about that so much.
20:08 [Coke] TreyHarris: you on a mac?
20:08 TreyHarris [Coke]: Ubuntu xenial
20:09 TreyHarris I followed the instructions in CONTRIBUTING
20:09 stmuk_ joined #perl6
20:09 TreyHarris I built both versions of the SASS compiler
20:09 TreyHarris but with --no-highlight, it works fine, just takes a long time as you noted
20:09 [Coke] Please open a ticket on perl6/doc showing the command you ran, uname (or whatever), and the error you got.
20:10 [Coke] well, it'll be even longer with highlight. :)
20:10 Possum joined #perl6
20:14 pilne ahhhhh .shape is good
20:16 Zoffix joined #perl6
20:20 Zoffix TreyHarris: you can do perl6 --doc=HTML thefile.pod6 to check pod syntax. There are sparse and web-dev make targets for building every-N file, when you want to check site rendering. Personally, I mostly use github editor for making changes and fix any errors when travis emails me build failures
20:21 TEttinger joined #perl6
20:22 kaare__ joined #perl6
20:23 zapwai joined #perl6
20:37 nadim_ joined #perl6
20:37 leont joined #perl6
20:39 leont Zoffix: I think I got that verbose logic where I want it to be now. Haven't tested it on anything large yet though
20:39 skids pilne: .of is pretty great, too.
20:40 leont Content with how little code it took to implement the feature (and fix a small bug along the way)
20:40 ugexe leont++
20:40 Zoffix awesome. leont++
20:43 skids m: uint16.min.say; uint16.max.say; # Funny symptom of known NYI.
20:43 camelia rakudo-moar 2efd81: OUTPUT: «Inf␤-Inf␤»
20:46 Zoffix skids: what's the NYI?
20:46 Zoffix m: say Str.max
20:46 camelia rakudo-moar 2efd81: OUTPUT: «-Inf␤»
20:46 Zoffix That's the behaviour for type objects
20:47 Zoffix m: say uint16.Range.minmax
20:47 camelia rakudo-moar 2efd81: OUTPUT: «(0 65535)␤»
20:47 lizmat m: say uint16.Range.max #  skids:
20:47 camelia rakudo-moar 2efd81: OUTPUT: «65535␤»
20:47 Zoffix pergaps you were thinking of that ^
20:48 skids Zoffix: real unsigned natives is the NYI.
20:48 timotimo yeah, .min and .max on a type object will just act like .min and .max on an empty list
20:49 Zoffix skids: ah, yeah, that's not the side effect of that.
20:50 azawawi https://a.uguu.se/jlMbghkyp0lz.png  # Initial 2D Plot via Graphics::PLplot (https://github.com/azawawi/perl6-graphics-plplot/blob/master/examples/plplot.p6) :)
20:50 Zoffix and .Range is all hardcoded based on type: https://github.com/rakudo/rakudo/blob/nom/src/core/Int.pm#L165
20:51 skids Not sure what the logic of equating any type object with an empty list is, but OK.
20:51 committable6 joined #perl6
20:52 Zoffix so that (42, Int).max gives right results
20:52 Cabanossi joined #perl6
20:52 Zoffix m: say (42, Int).max
20:52 camelia rakudo-moar 07bff0: OUTPUT: «42␤»
20:53 Zoffix m: say (42, Int, NaN).max
20:53 camelia rakudo-moar 07bff0: OUTPUT: «NaN␤»
20:53 Zoffix heh
20:53 * Zoffix &
20:53 Zoffix left #perl6
20:53 timotimo neat, azawawi
20:54 lizmat azawawi: cool
20:55 lizmat fwiw, I would have probably written:Graphics::PLplot.new(...) -> $o {
20:55 Geth ¦ ecosystem: caee0b6909 | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
20:55 Geth ¦ ecosystem: Add Graphics::PLplot
20:55 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/caee0b6909
20:56 lizmat azawawi: given my $o = ...   feels like a weird mix of a P5ism and P6
20:56 lizmat if Graphics::PLplot.new(...) -> $o {   # azawawi, duh  :-)
20:57 azawawi :)
20:57 azawawi im learning
20:57 azawawi im learning :)
20:58 * azawawi gasps at the perl6 endless void... So much to learn. so little time :)
20:59 leont ugexe: https://github.com/perl6/tap-harness6/commits/has-errors ;-)
21:06 azawawi lizmat: Attempt #2 => https://github.com/azawawi/perl6-graphics-plplot/blob/master/examples/plplot.p6 :)
21:07 timotimo honestly, i'd still use $_ instead of $o so you can just .foo on the object
21:08 pmurias it would be cool if someone check if 'make js-install' for nqp works on their box
21:13 kurahaupo joined #perl6
21:20 nadim_ hi, is there some mechanism to set a set of entries in a hash is they are not defined? something like %h{v1, v2, v3} //= (v1_def, v2_def, v3_def)
21:20 timotimo you can Z//= i bet
21:21 jnthn m: my %h = a => 1; %h<a b c> Z//= 4,5,6; say %h
21:21 camelia rakudo-moar 07bff0: OUTPUT: «===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
21:21 jnthn eww
21:21 jnthn m: my %h = a => 1; %h<a b c> Z[//=] 4,5,6; say %h
21:21 camelia rakudo-moar 07bff0: OUTPUT: «===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
21:21 timotimo wow, whoops
21:21 jnthn m: my %h = a => 1; %h<a b c> >>//=<< 4,5,6; say %h
21:21 camelia rakudo-moar 07bff0: OUTPUT: «Non ast passed to WANTED: NQPMu␤Non ast passed to UNWANTED: NQPMu␤Weird node in analyze: NQPMu␤WARNINGS for <tmp>:␤Useless use of constant integer 5 in sink context (lines 1, 1)␤Useless use of constant integer 6 in sink context (lines 1, 1)␤=…»
21:23 timotimo my %h = a => 1; %h<a b c> >>//=<< (4,5,6);
21:23 timotimo m: my %h = a => 1; %h<a b c> >>//=<< (4,5,6);
21:23 camelia rakudo-moar 07bff0: OUTPUT: «Non ast passed to WANTED: NQPMu␤Non ast passed to UNWANTED: NQPMu␤===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
21:23 timotimo well, at least it doesn't think it's useless any more
21:23 nadim_ hehe
21:24 jnthn m: my %h = a => 1; %h<a b c> Z[//]= 4,5,6; say %h
21:24 camelia rakudo-moar 07bff0: OUTPUT: «===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
21:24 jnthn aww
21:24 jnthn m: my %h = a => 1; %h<a b c> [Z//]= 4,5,6; say %h
21:24 camelia rakudo-moar 07bff0: OUTPUT: «{a => 1, b => 5, c => 6}␤»
21:24 jnthn ooh
21:24 nadim_ this is fascinating to look at!
21:24 jnthn That variant works :)
21:24 jnthn That probably tells us what codepath the bug is on too
21:25 timotimo huh, i woudln't have expected [Z//]= to work
21:28 jnthn It's a bit indirect
21:28 jnthn But if you expand it out, it's %h<a b c> = (%h<a b c> Z// 4, 5, 6)
21:29 jnthn But only doing the hash lookups to get the containers once
21:29 timotimo ah, ok
21:29 timotimo yeah, that isn't half bad
21:31 pilne pmurias=> i'm a newbie here but i'll give it a go if there's some instructions i could follow.
21:32 jnthn First-class l-values are both a great and a horrible feature. :)
21:32 timotimo oh yes
21:32 timotimo especially our WHENCE stuff :D
21:32 jnthn That too
21:32 pilne so we has footshotguns, but you have to look for them? :p
21:33 jnthn pilne: The horror is primarily for those implementing Perl 6 rather than those using it
21:33 timotimo aye, the users are usually just happy and probably pleasantly surprised by 'em
21:34 pilne ahhhhh, the practitioners of c'thulian horrors that make it possible to code in such an expressive language, and have performance (: y'all rock by the way.
21:36 pilne i say this as having done a few "write a scheme" tutorials, and if something as "simple" as that takes a decent effort, something like perl6 is far beyond my current abilities.
21:36 bjz joined #perl6
21:38 robertle what are your schemes written in?
21:40 pilne i've done a blargh-y one in python, a bit more capable one in ruby because it was more fun to work with, and i've skimmed one on haskell that was sadly out of date in a few conflicting ways. and i'm itching to give it a whirl in perl6 (even though there are the inline grammars) because it's fun.
21:42 robertle I have done one in C, but it doesn't do call/cc
21:42 timotimo call/cc is so cool
21:42 robertle lots of other stuff missing as well, but that could be fixed
21:43 robertle cool, but also hurts my head
21:43 pilne yeah, like even implementing a y-combinator in a language tends to bend my brain, but it's a fun bending (:
21:44 robertle did you see that chez was open-sourced by cisco a while ago?
21:44 robertle the source is hugely entertaining
21:44 pilne i saw it was open sourced... i haven't read the source yet, i can only imagine... i'm pretty colorful sometimes in my shell scripts lol
21:45 pilne because many of them are written in postemptive anger, instead of preemptive calm.
21:46 robertle ok, get your point. chez isn't entertaining in *that* sense, but the guy certainly did get quite far with a surprising little amount of work
21:46 pilne which for better or worse, was the extent of my perl anything up to 5, so i knew the basics digging into 6, but not much more.
21:46 robertle that's not right. lots of work spread over not so many lines
21:47 pilne i could micro-optimize code to death given the chance... but usually my pragmatic sense takes over before carpal hits... lol
21:47 pilne idk, i feel like perl6 is the language i wish I could have been introduced to when i first started programming.
21:48 * AlexDaniel wouldn't mind rakudo being optimized to death
21:48 pilne it grows logically with your abilities and needs.
21:49 pilne i'm still trying to wrap my brain deep enough into the language to do something original, however small, using rosettacode stuff for ideas and just to get a feel for how the language works.
21:50 AlexDaniel there's also exercism which is kinda fun
21:50 AlexDaniel ( http://exercism.io/languages/perl6/exercises )
21:52 pilne neat, i'll give it a looksee.
21:58 AlexDaniel I even submitted a couple of solutions myself :)
22:01 Geth Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/d74f1620cb
22:02 imcsk8 joined #perl6
22:08 Sound joined #perl6
22:15 dct joined #perl6
22:37 Cabanossi joined #perl6
22:42 skids joined #perl6
23:00 kurahaupo_ joined #perl6
23:05 BenGoldberg joined #perl6
23:15 Herby_ joined #perl6
23:15 kurahaupo joined #perl6
23:20 kurahaupo joined #perl6
23:28 AndyDee joined #perl6
23:46 kurahaupo_ joined #perl6
23:49 kurahaupo joined #perl6
23:51 kurahaupo joined #perl6
23:52 Cabanossi joined #perl6
23:55 mcmillhj joined #perl6
23:59 dj_goku joined #perl6

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

Perl 6 | Reference Documentation | Rakudo