Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-14

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 ugexe maybe someone does actually want to test that, but enough to give it an "all" command?
00:02 raschipi Well, tbrowder was just asking for it.
00:03 raschipi People also created a Task::Popular to do just that, for testing.
00:04 ugexe thats not ambiguous
00:11 Cabanossi joined #perl6
00:15 ugexe there is zef smoke, which mostly works, but it does not install anything to avoid the issues i described earlier. it does test everything, but dependencies are fulfilled with -I/path/to/dep instead of from an installation
00:16 tbrowder ugexe: my thought was the ALL option would just install the
00:18 Zoffix alias zefall='for i in `perl6 -MWWW -e '\''"http://modules.perl6.org/search.json?q=".&jget<dists>»<name>».say'\''`; do echo "Installing $i"; zef install "$i"; done'
00:18 tbrowder latest which is what i'm doing at the moment (i hope). if i just ask zef ti install module X (without multiple authors), i assume the latest will be installed.
00:21 MasterDuke joined #perl6
00:25 * TimToady waves vacantly from Kyoto...
00:28 TimToady in general, .succ and .pred make little sense on enums; we only allow ++ and -- on Bool because it's more convenient for %seen{$key}++ and such
00:30 TimToady but those should be read as "set true" and "set false", not as relying on any underlying ordering of the type
00:30 TimToady because the idiom is relying primarily on the post-crement functionality, not the enum model
00:32 TimToady seetsighing &
00:33 AlexDaniel another thing to consider:
00:33 AlexDaniel m: enum Animal (Cat => 25, Dog => 42); say Cat.succ
00:33 camelia rakudo-moar c4043b: OUTPUT: «26␤»
00:34 Zoffix \o
00:35 * Zoffix imagines .succ/.pred stepping through the available enums
00:37 Zoffix There's an ordered list of them in one of the methods...
00:43 Kyo91_ joined #perl6
00:52 Possum joined #perl6
01:03 Geth ¦ ecosystem: paulohrpinheiro++ created pull request #366: Add Brazilian::FederalDocuments to ecosystem
01:03 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/366
01:08 llfourn joined #perl6
01:11 Cabanossi joined #perl6
01:19 BenGoldberg joined #perl6
01:20 Geth ¦ ecosystem/gabrielash-patch-1: 3d95475d18 | gabrielash++ (committed using GitHub Web editor) | META.list
01:20 Geth ¦ ecosystem/gabrielash-patch-1: Update META.list
01:20 Geth ¦ ecosystem/gabrielash-patch-1: review: https://github.com/perl6/ecosystem/commit/3d95475d18
01:20 Geth ¦ ecosystem: gabrielash++ created pull request #367: Update META.list
01:20 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/367
01:37 cdg joined #perl6
01:54 ilbot3 joined #perl6
01:54 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:58 Garland_g[m] Thanks.
01:58 sacomo Garland_g[m], maybe something like this https://glot.io/snippets/etlq6yu6jg
02:00 ugexe thats not a keypress value though
02:00 sacomo it only captures input
02:00 ugexe or at least i understood it to be like they want to capture the keypress themselves
02:01 sacomo if you want to moitor keypresses in the background then I would use a different approach. maybe the promise.
02:02 sacomo s/moitor/monitor/
02:02 Garland_g[m] In this case it's more of a timing issue. I have an audio loop that I'm playing until I hit the keypress, and then it goes on to the next track.
02:02 Garland_g[m] The promise approach is working welll.
02:03 sacomo sweet
02:08 margeas joined #perl6
02:09 noganex_ joined #perl6
02:10 Cabanossi joined #perl6
02:12 AlexDaniel is there any way to list all dependencies of a module in zef?
02:13 AlexDaniel I'd like to get a dependency tree or something like that
02:21 ugexe AlexDaniel: i can easily add it, i just never decided how to handle the output format for deep dependencies / long names
02:22 AlexDaniel ugexe: just a list of module names is probably ok
02:22 AlexDaniel that'd be enough for me at least
02:25 ugexe the graph/structure is important, but i suppose that could be the eventual verbose output
02:40 cdg joined #perl6
02:40 Cabanossi joined #perl6
03:01 lustlife joined #perl6
03:02 Kyo91_ joined #perl6
03:22 AlexDaniel .seen Llfourn
03:23 yoleaux I saw llfourn 8 Aug 2017 16:12Z in #perl6-dev: <llfourn> nine: cheers :)
03:23 AlexDaniel llfourn: ping? :)
03:26 AlexDaniel .tell llfourn maybe you can take a look at RT #132085
03:26 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132085
03:26 yoleaux AlexDaniel: I'll pass your message to llfourn.
03:37 pyrimidi_ joined #perl6
03:37 ugexe AlexDaniel: added `zef depends $identity` to 0.1.28
03:37 AlexDaniel \o/
03:37 AlexDaniel ugexe: thanks
03:39 Cabanossi joined #perl6
03:51 llfourn AlexDaniel: cheers I'll take a look
03:51 yoleaux 03:26Z <AlexDaniel> llfourn: maybe you can take a look at RT #132085
03:51 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132085
03:52 AlexDaniel llfourn: thanks!
03:55 pyrimidine joined #perl6
04:00 aborazmeh joined #perl6
04:00 aborazmeh joined #perl6
04:02 llfourn AlexDaniel: I responded to the RT please go ahead and close it :)
04:03 AlexDaniel llfourn: I see. OK, thanks!
04:06 pyrimidine joined #perl6
04:07 pyrimidine joined #perl6
04:09 pyrimidine joined #perl6
04:09 Cabanossi joined #perl6
04:14 pyrimidine joined #perl6
04:18 pyrimidi_ joined #perl6
04:21 pyrimidine joined #perl6
04:24 pyrimidi_ joined #perl6
04:29 pyrimidine joined #perl6
04:35 pyrimidine joined #perl6
04:39 Cabanossi joined #perl6
04:40 pyrimidine joined #perl6
04:45 pyrimidine joined #perl6
04:45 xtreak joined #perl6
04:51 M-Illandan joined #perl6
04:53 aborazmeh joined #perl6
04:53 aborazmeh joined #perl6
04:54 pyrimidine joined #perl6
04:55 todd joined #perl6
04:56 cdg joined #perl6
04:56 todd Hi All.  Sorry for such a dump question, but google inundates me with Perl 5 hits when I ask this.  How do I get the name of my program?
04:57 _28_ria joined #perl6
04:58 geekosaur joined #perl6
04:59 mr-foobar joined #perl6
05:01 xtreak joined #perl6
05:02 todd I think I found it:  $*PROGRAM-NAME
05:03 Kyo91_ joined #perl6
05:04 lustlife joined #perl6
05:05 pyrimidine joined #perl6
05:07 yoleaux joined #perl6
05:07 geekosaur joined #perl6
05:09 Cabanossi joined #perl6
05:11 Geth ¦ ecosystem: 3d95475d18 | gabrielash++ (committed using GitHub Web editor) | META.list
05:11 Geth ¦ ecosystem: Update META.list
05:11 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/3d95475d18
05:11 Geth ¦ ecosystem: d73d30af51 | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
05:11 Geth ¦ ecosystem: Merge pull request #367 from perl6/gabrielash-patch-1
05:11 Geth ¦ ecosystem:
05:11 Geth ¦ ecosystem: Update META.list
05:11 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/d73d30af51
05:12 Geth ¦ ecosystem: bcc602fc02 | (Paulo Henrique Rodrigues Pinheiro)++ | META.list
05:12 Geth ¦ ecosystem: Add Brazilian::FederalDocuments to ecosystem
05:12 Geth ¦ ecosystem:
05:12 Geth ¦ ecosystem: See https://github.com/paulohrpinheiro/Brazilian-FederalDocuments
05:12 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/bcc602fc02
05:12 Geth ¦ ecosystem: 2789971e87 | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
05:12 Geth ¦ ecosystem: Merge branch 'master' into paulohrpinheiro
05:12 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/2789971e87
05:12 Geth ¦ ecosystem: 9c8805b20c | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
05:12 Geth ¦ ecosystem: Merge pull request #366 from paulohrpinheiro/paulohrpinheiro
05:13 Geth ¦ ecosystem:
05:13 Geth ¦ ecosystem: Add Brazilian::FederalDocuments to ecosystem
05:13 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/9c8805b20c
05:14 adu joined #perl6
05:17 pyrimidine joined #perl6
05:25 pyrimidine joined #perl6
05:26 xtreak joined #perl6
05:27 araujo joined #perl6
05:27 araujo joined #perl6
05:27 hythm joined #perl6
05:30 luis` joined #perl6
05:42 wamba joined #perl6
05:51 Skarsnik joined #perl6
05:51 _28_ria joined #perl6
06:02 Skarsnik_ joined #perl6
06:12 domidumont joined #perl6
06:23 u-ou what should I do about a failed test when trying to zef install something?
06:23 domidumont joined #perl6
06:24 simonm joined #perl6
06:25 AlexDaniel u-ou: which module?
06:25 AlexDaniel u-ou: normally you'd just create an issue in the module repo
06:26 domidumont joined #perl6
06:26 u-ou NCurses
06:26 AlexDaniel ah
06:27 u-ou it worked on macos but not whatever the rakudo star docker image is running on
06:27 AlexDaniel u-ou: https://github.com/azawawi/perl6-ncurses/issues/16
06:27 u-ou ahh. I see.
06:27 AlexDaniel actually, you're probably seeing some other issue
06:28 u-ou yeah, I'm on 2017.07
06:28 AlexDaniel it should work on 2017.07 and 2017.08
06:28 AlexDaniel but not on HEAD
06:29 u-ou how can I find out what went wrong?
06:29 AlexDaniel u-ou: what's the error?
06:30 u-ou it just says Aborting due to test failure: NCurses:ver('0.6.2'):auth('github:azawawi') (use --force-test to override)
06:30 u-ou and then a stack trace
06:31 AlexDaniel u-ou: what's the output of perl6 --version ?
06:31 knobo joined #perl6
06:35 u-ou This is Rakudo version 2017.07 built on MoarVM version 2017.07
06:35 u-ou implementing Perl 6.c.
06:45 AlexDaniel u-ou: hmmm
06:45 u-ou is there somewhere I can look that tells what went wrong? zef logs or something?
06:46 u-ou I'm doing this on the rakudo star docker image. I git cloned zef so it should be easy to reproduce.
06:47 u-ou maybe I'm using the wrong version of zef or something
06:47 AlexDaniel u-ou: you did get Test Summary Report, right? When zef install failed
06:48 AlexDaniel u-ou: and if so, what file failed?
06:49 AlexDaniel u-ou: oh. maybe not. Try zef --verbose install NCurses
06:51 ShalokShalom joined #perl6
06:52 mr-foobar joined #perl6
06:55 u-ou sec
06:56 _28_ria joined #perl6
07:00 xgorex joined #perl6
07:02 xgorex joined #perl6
07:03 u-ou it's not really saying much
07:06 AlexDaniel u-ou: indeed
07:06 AlexDaniel u-ou: what about
07:06 darutoko joined #perl6
07:07 AlexDaniel git clone https://github.com/azawawi/perl6-ncurses.git
07:07 u-ou https://pastebin.com/RKgMXuef
07:07 AlexDaniel PERL6LIB=lib perl6 t/02-basic.t
07:07 AlexDaniel (after cd-ing into the cloned repo)
07:09 u-ou hmm. it passed.
07:10 Cabanossi joined #perl6
07:10 AlexDaniel u-ou: relevant comment https://rt.perl.org/Ticket/Display.html?id=132030#txn-1490032
07:10 AlexDaniel but it's weird because you should not be seeing this issue on rakudo 2017.07
07:11 AlexDaniel the change that introduced the problem happened just 10 days ago
07:12 u-ou am I trapped in a time warp?
07:13 u-ou weird
07:14 u-ou well. must be a different problem, idk.
07:16 AlexDaniel u-ou: you can install the module anyway
07:18 AlexDaniel u-ou: zef install --force NCurses
07:20 nadim joined #perl6
07:21 nine Worth reading: https://tomdale.net/2017/09/compilers-are-the-new-frameworks/
07:21 u-ou thanks
07:22 jast I kind of wish more people "aggressively" optimized their web code by deploying less of it in the first place
07:22 astj joined #perl6
07:22 jast writing and bundling, too
07:23 nine It's about Javascript, but it easily translates to backend code as well. What if your router would actually compile optimized code for the routes you defined?
07:23 nine This also reminds me of nginx: its configuration is not interpreted. It actually compiles the configuration to byte code which runs on nginx' VM.
07:23 jast I believe load balancers already do this
07:24 nine Forced by the decision to write Perl 6 in Perl 6, it has become a language that's really nice for writing compilers. This could give us an edge in that game :)
07:38 TEttinger once the whole... optimizing thing is added to complete the phrase optimizing compiler
07:44 dakkar joined #perl6
07:54 xtreak joined #perl6
08:02 jast I think what the article is describing is going to happen, but if you keep piling frameworks and libraries on top of each other, only whole program optimization will help cut that back down, and it's not necessarily *that* smart :)
08:13 knobo joined #perl6
08:13 sproctor joined #perl6
08:14 xtreak joined #perl6
08:17 xtreak joined #perl6
08:25 Cabanossi joined #perl6
08:31 robertle_ joined #perl6
08:36 mattr joined #perl6
08:39 mattr p6: sub jojo (Str $s, Str $salu) { say "$salu $s"; }
08:39 camelia rakudo-moar c4043b: ( no output )
08:39 mattr p6: multi sub cap (Str $s, Str $salu) { say "$salu $s"; }
08:39 camelia rakudo-moar c4043b: ( no output )
08:40 mattr p6: multi sub cap (Str $s, Str $salu) { say "All's well, $salu $s"; }
08:40 camelia rakudo-moar c4043b: ( no output )
08:40 mattr p6: cap "Tom", "Captain"
08:40 camelia rakudo-moar c4043b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    cap used at line 1. Did you mean 'cas', 'map'?␤␤»
08:40 lizmat mattr: p6: is not a REPL: it forgets everything between invocations
08:41 mattr Hi lizmat, I am wondering is this a bug in perl6 repl? When I redefine a multi sub with same signature I get something like this: Ambiguous call to 'jojo'; these signatures all match: :(Str $s, Str $salu) :(Str $s, Str $salu)   in block <unit> at <unknown file> line 1
08:42 mattr I expected to be able to redefine the sub for that signature.. indeed thought that is what had been happening until now.
08:42 lizmat m: multi a() {}; multi a() {}; a
08:42 camelia rakudo-moar c4043b: OUTPUT: «Ambiguous call to 'a'; these signatures all match:␤:()␤:()␤  in block <unit> at <tmp> line 1␤␤»
08:42 xtreak joined #perl6
08:42 lizmat one could argue that should be a compile-time error
08:43 knobo joined #perl6
08:45 mattr Hi lizmat, I see this is how perl6 programs work too so not in repl or the irc p6. Thanks, I am just trying to learn.
08:48 sftp joined #perl6
08:51 mattr @lizmat followup question please. In the repl I create a sub and then tried this: undefine &unwantedsub Cannot modify an immutable Sub (sub unwantedsub ()
08:52 lizmat yeah, you cannot easily remove subs
08:52 mattr Sub inherits from Mu so I wondered why it is immutable. Then the docs for undef say "There is no undef in Perl 6. You can't undefine a function" so what is happening when I call undefine?
08:52 lizmat they're basically immutable (as the message says)
08:53 lizmat sub undefine(\x) { x = Nil }
08:53 lizmat is basically what happens
08:53 eliasr joined #perl6
08:53 lizmat m: undefine(42)
08:53 camelia rakudo-moar c4043b: OUTPUT: «Cannot modify an immutable Int (42)␤  in block <unit> at <tmp> line 1␤␤»
08:53 lizmat basically the same
08:54 lizmat fwiw, I think undefine() is a P5 relic that should be removed
08:54 lizmat it gives people the wrong idea  :-)
08:54 u-ou I like perl 6 better tha perl 5 now
08:54 u-ou than
08:55 mattr Thanks. Sorry for taking a trip into the rabbit hole! ;)
08:56 cdg joined #perl6
08:57 lizmat mattr: no worries, sorry you did
08:58 lizmat need to be afk for a few hours&
08:58 u-ou bye
08:58 mattr thanks and best regards. signing off now. bye!
08:58 u-ou bye
08:59 u-ou it looks like im all alone here!
09:02 jonas1 joined #perl6
09:04 Kyo91_ joined #perl6
09:10 Cabanossi joined #perl6
09:13 rindolf joined #perl6
09:17 rmck joined #perl6
09:18 nadim no you are not
09:19 u-ou :)
09:34 margeas joined #perl6
09:42 ChoHag joined #perl6
09:44 Ulti out of interest is there a way to define unicode operators without actually having to use unicode? something akin to sub infix:<"\c[SHRUG]"> {}
09:47 pmurias joined #perl6
09:48 telex joined #perl6
09:48 okl joined #perl6
09:49 pmurias nine: once slang work without nqp bits sticking out everywhere we will have advantage in that web-frameworks-as-compilers will be just modules in Perl 6
09:49 pmurias * slangs
09:49 jnthn Ulti: A bit like that but since <...> is literal inside it won't work that way
09:49 jnthn Ulti: Try infix:<< "\c[SHRUG]" >> or some such
09:50 Ulti aha
10:01 rindolf joined #perl6
10:02 Kyo91_ joined #perl6
10:21 Zoffix Anyone in Toronto and wanna do a lightning talk on Perl, Rakudo, or anything else? https://www.meetup.com/Toronto-Perl-Mongers/events/243346657/
10:24 Zoffix Maybe I can do a Rakudo IO one. It's probably the one topic I can talk about without getting impostor syndrome :P
10:25 Cabanossi joined #perl6
10:26 ShalokShalom_ joined #perl6
10:30 |oLa| joined #perl6
10:32 Zoffix Actually, last year a few people telecommuted. I think you don't have to be in Toronto.
10:32 mr-foobar joined #perl6
10:33 robertle_ should https://docs.perl6.org/language/regexes#Adverbs mention :P5 ?
10:38 zakame joined #perl6
10:41 Zoffix robertle_: yeah
10:41 Zoffix Would you add it, please?
10:41 Zoffix robertle_: just need to edit this file: https://github.com/perl6/doc/edit/master/doc/Language/regexes.pod6
10:44 robertle_ jup, will do
10:44 Zoffix robertle_++ Thanks!
10:45 * Zoffix decides not to do a talk
10:46 Zoffix It's hard to understand me when I speak.
10:46 MasterDuke i thought that one you did a while ago was fine (i think for some toronto thing also)
10:48 Zoffix This? https://www.youtube.com/watch?time_continue=2973&amp;v=pWuxwurtALc
10:49 Ven`` joined #perl6
10:51 MasterDuke yep
10:56 Zoffix Ok, then. I'll sign up for the IO talk. 10mins ain't gonna kill me :)
11:04 wamba joined #perl6
11:10 Cabanossi joined #perl6
11:22 Zoffix .ask moritz Is there an easy way to build a PDF out of your book's sources? I think reading a PDF on the bus and later making corrections to markdown works out best for me. I think I can get a PDF off leanpub, but I'd like to get one freshly-squeezed
11:22 yoleaux Zoffix: I'll pass your message to moritz.
11:23 moritz Zoffix: leanpub builds it for me
11:23 yoleaux 11:22Z <Zoffix> moritz: Is there an easy way to build a PDF out of your book's sources? I think reading a PDF on the bus and later making corrections to markdown works out best for me. I think I can get a PDF off leanpub, but I'd like to get one freshly-squeezed
11:23 moritz Zoffix: I can either give it to you once, or give you an invitation to a dropbox folder where it's built all the time
11:25 Zoffix moritz: I'll have a go at building from markdown. Just thought maybe you already had a command handy for that
11:25 skids joined #perl6
11:26 moritz Zoffix: it's a bit of an enhanced thingy; plain pandoc works partially, but for example the image captions don't work
11:27 Zoffix moritz: ok, then I'll go with give it to me once option.
11:29 Zoffix cpan@zoffix.com if you need it
11:29 * Zoffix steps away for a bit
11:33 moritz Zoffix: sent
11:33 piojo joined #perl6
11:38 sproctor joined #perl6
11:39 Zoffix Thanks!
11:40 * Zoffix decides again not to do the talk; if anyone was keeping track :)
11:40 * lizmat tries to persuade Zoffix to give it anyway
11:41 lizmat but only a little
11:42 Zoffix m: <go not-go>.pick.say
11:42 camelia rakudo-moar c4043b: OUTPUT: «not-go␤»
11:43 Zoffix The Universe has spoken :p
11:43 * Zoffix goes into isolation until next week to continue learning C and proofreading moritz++ book :)
11:46 lizmat m: <go not-go>.pick.say
11:46 camelia rakudo-moar c4043b: OUTPUT: «go␤»
11:46 lizmat m: <go not-go>.pick.say
11:46 camelia rakudo-moar c4043b: OUTPUT: «not-go␤»
11:46 lizmat ok, 2 out of 3  :-)
11:50 vendethiel- joined #perl6
11:51 ShalokShalom joined #perl6
12:03 rick_ joined #perl6
12:09 zakame joined #perl6
12:10 Cabanossi joined #perl6
12:15 xtreak joined #perl6
12:18 mr-foobar joined #perl6
12:32 piojo Hey, do y'all have any advice about how manage the different versions of rakudo/nqp/moar when doing a git bisect to find a bad commit?
12:32 yoleaux 12 Sep 2017 12:10Z <[Coke]> piojo: - if you use rakudo's Configure.pl --gen-nqp it will automatically insure you have the appropriate version of nqp available. (it won't update if it finds a version that is new enough)
12:32 piojo oh! Coke already answered than!
12:33 piojo .tell Coke thanks for the answer
12:33 yoleaux piojo: I'll pass your message to Coke.
12:38 ShalokShalom joined #perl6
12:40 piojo out of curiosity, I assume implementing "-i" wouldn't be ridiculously hard, would it? just hard?
12:43 ShalokShalom joined #perl6
12:46 perlpilot piojo: are you volunteering?  :)
12:47 piojo perlpilot: I'd like to
12:47 perlpilot Cool.  As far as using P6 for one-liners, '-i' is a conspicuous absence.
12:48 piojo it seems like if $*ARGFILES, -n, and -p are implemented, the pieces are there
12:49 piojo I'll do some reading about settings and see if there's anything that gets in my way
12:54 pilne joined #perl6
12:54 MasterDuke piojo: btw, if you're bisecting rakudo, there's a bot that'll do that for you
12:54 MasterDuke bisectable6: help
12:54 bisectable6 MasterDuke, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Bisectable
12:54 [Coke] leont++ # just read the backscroll on the prove issue.
12:55 piojo MasterDuke: thanks, that'll be helpful in the future :)   Buf for now, I want to debug broken terminal interaction in the REPL within cygwin
12:56 piojo I bet it was the recent change to output buffering, so I can start by reverting that... but not until I'm at work and have a windows box nearby
12:58 piojo (the repl seems to just hang in cygwin, but in cmd.exe it works fine)
12:59 piojo err, I mean with rlwrap. because the repl ALWAYS kills the terminal without rlwrap. (We should really add something about that to the documentation...)
12:59 jnthn Is this a normal Windows build being used from cygwin?
13:00 piojo jnthn: yes, built from either plain source or rakudobrew
13:00 jnthn (Since afaik you can't actually build MoarVM on cygwin, because libuv until recently wouldn't build there either, and we didn't bump to that libuv yet, though will after the next release)
13:00 piojo jnthn: oh, full cygwin support is coming? That's very exciting!
13:01 piojo but it's a normal windows build that has multiple problems doing its REPL in cygwin
13:01 jnthn piojo: Well, more like: one big blocker is out of the way
13:02 piojo jnthn: gotcha. I'll be patient, and maybe try to contribute to the things that are within my ability :)
13:03 Ven`` joined #perl6
13:03 jnthn That would be most welcome. :)
13:08 mcmillhj joined #perl6
13:10 Cabanossi joined #perl6
13:12 mr-foobar joined #perl6
13:15 cdg joined #perl6
13:17 knobo joined #perl6
13:21 [particle] joined #perl6
13:21 cdg_ joined #perl6
13:29 pyrimidi_ joined #perl6
13:35 knobo joined #perl6
13:39 mr-foobar joined #perl6
13:40 Cabanossi joined #perl6
13:43 timo1 joined #perl6
13:44 [Coke] piojo: note that my comment is on a fresh install, or when you're always just upgrading. if you go backwards in time and build, you might end up with a too-new nqp
13:57 piojo Coke: I figured. I'll use the flag, and delete the nqp repo and install if I get a version error anyway.
13:58 piojo oh, I saw there's also --gen-moar. I think I'm set :)
14:08 AlexDaniel joined #perl6
14:09 mr-foobar joined #perl6
14:13 pyrimidine joined #perl6
14:24 raschipi joined #perl6
14:25 Cabanossi joined #perl6
14:26 Kyo91_ joined #perl6
14:29 BooK lizmat: ping
14:31 ruoso___ joined #perl6
14:32 lizmat pong
14:33 APic B-)
14:37 BooK lizmat: I did dump a wall of text on you in private :-)
14:41 mr-foobar joined #perl6
14:42 lizmat BooK: then why don't you answer my /privmsg ?  :-)
14:51 ritre joined #perl6
14:56 knobo joined #perl6
15:01 Ven`` joined #perl6
15:04 Skarsnik joined #perl6
15:04 Skarsnik Hello
15:11 llfourn joined #perl6
15:14 troys joined #perl6
15:17 raschipi Hi
15:18 APic Hi
15:29 BooK lizmat: because I don't see it?
15:30 tyil anyone have some time to give feedback on https://www.tyil.work/tutorials/getting-perl6-on-raspberry-pi.html ?
15:31 tyil (its a small tutorial on getting a fresh pi up and running with perl 6, to make it easy for beginners to try out perl)
15:33 Possum joined #perl6
15:34 sena_kun joined #perl6
15:34 koto joined #perl6
15:35 Skarsnik_ joined #perl6
15:38 mr-foobar joined #perl6
15:40 Cabanossi joined #perl6
15:43 haxmeister joined #perl6
15:44 haxmeister is there a module in the repo for writing excel files?
15:44 yoleaux 21 May 2017 00:58Z <b2gills> haxmeister: If you want to see Perl 6 features misused have a look at my code golf entries https://codegolf.stackexchange.com/users/1147/b2gills?tab=answers
15:45 haxmeister I found XLSX::Writer but zef can't see it..
15:45 khw joined #perl6
15:51 knobo joined #perl6
15:52 raschipi haxmeister: Download it and have zef install it from the directory directly.
15:52 haxmeister ok ty
15:59 BooK is there a more idionatic way to write: my %h = map { $_ => $i++ }, @keys;
16:00 BooK especially without the intermediate $i value
16:00 sena_kun joined #perl6
16:01 jnthn $++
16:01 moritz my %h = @keys Z=> 0..*
16:01 BooK nice
16:01 lizmat m: dd %h = <a b c>.antipairs
16:01 camelia rakudo-moar c4043b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '%h' is not declared␤at <tmp>:1␤------> 3dd 7⏏5%h = <a b c>.antipairs␤»
16:02 lizmat m: dd my %h = <a b c>.antipairs
16:02 camelia rakudo-moar c4043b: OUTPUT: «Hash %h = {:a(0), :b(1), :c(2)}␤»
16:02 jnthn hah, win :)
16:03 moritz I thought something might that might exists, but I thought .vk instead of .kv :-)
16:03 lizmat well, that would be cheaper still
16:03 lizmat and yes, .vk has been on my mind a few times, first time around 4 years ago already I think
16:10 Cabanossi joined #perl6
16:20 BooK if I create an enumeration with enum Foo < a b c >, it it possible to add a method to it after that?
16:21 timo m: enum Foo < a b c >; augment class Foo { method hello { say "hi" } }; a.hello
16:21 camelia rakudo-moar c4043b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤augment not allowed without 'use MONKEY-TYPING'␤at <tmp>:1␤------> 3enum Foo < a b c >; augment class Foo7⏏5 { method hello { say "hi" } }; a.hello␤    expecting any of:␤        generic role␤»
16:21 timo m: use MONKEY-TYPING; enum Foo < a b c >; augment class Foo { method hello { say "hi" } }; a.hello
16:21 camelia rakudo-moar c4043b: OUTPUT: «hi␤»
16:21 BooK nice
16:21 perlpilot BooK: why would you want this though?
16:22 jnthn I think you can use the does trait to compose a role into an enum
16:22 BooK for testing
16:22 jnthn Which would avoid the need for the augment
16:22 timo m: role greeting { method hello { say "hi" } }; enum Foo does greeting < a b c >; a.hello
16:22 camelia rakudo-moar c4043b: OUTPUT: «hi␤»
16:22 timo cool, jnthn++
16:26 leont joined #perl6
16:32 knobo joined #perl6
16:38 mr-foobar joined #perl6
16:39 mcmillhj joined #perl6
16:41 ChoHag joined #perl6
16:46 knobo joined #perl6
16:48 dubi0us joined #perl6
16:55 numin0us joined #perl6
16:56 mcmillhj joined #perl6
16:56 ugexe i just switched a bunch of zef stuff from Proc to Proc::Async, so if anyone sees any strange behavior in v0.1.29+ please let me know
16:57 domidumont joined #perl6
16:58 nohuhu joined #perl6
17:07 haxmeister my zef is all messed up on this windows machine
17:08 haxmeister Failed to update messages when I try to zef update
17:10 Cabanossi joined #perl6
17:11 haxmeister Failed to update cpan m https//raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan.json
17:15 timo how did the : disappear
17:15 haxmeister mirror:
17:15 haxmeister dunno
17:16 haxmeister Failed to update cpan mirror:
17:16 haxmeister Failed to update cpan mirror: https:
17:16 haxmeister I'm in cygwin man.. I dunno
17:17 numin0us joined #perl6
17:18 ShalokShalom joined #perl6
17:18 leont Is there an ordered map implementation for perl6?
17:20 kyan joined #perl6
17:22 Skarsnik sort ? HashMap?
17:22 Skarsnik *Set
17:24 numin0us joined #perl6
17:24 ugexe haxmeister: ive never used cygwin. i'll try and setup such an env, but it'll take some time
17:26 haxmeister ugexe: I'm only using cygwin to ssh to this irssi instance on my server
17:26 pyrimidine joined #perl6
17:26 haxmeister my perl6 install should be standard windows installation on this machine
17:27 haxmeister though I'm not sure why it won't update..
17:29 tyil have you tried turning it off and on again
17:30 tyil its amazing how many bugs in windows get "fixed" with that
17:30 haxmeister lmao
17:30 haxmeister I considered punching the monitor.. but I restrained myself
17:31 setty1 joined #perl6
17:31 ugexe you could try `zef nuke StoreDir` then see if the update works. if not, then zef is failing to find a viable adapter (program) to download with
17:32 haxmeister still no work
17:32 pyrimidine joined #perl6
17:33 ugexe what is your version of zef? shown in identity field of `zef info zef`
17:34 haxmeister ver<0.1.29>
17:34 ugexe ah that is the latest version
17:36 leont I should have phrased better, I'm looking for something like insertion order
17:36 ugexe i think i know where to look, but can you paste the output of `zef update` after running `set ZEF_PLUGIN_DEBUG=1` ? (run `set ZEF_PLUGIN_DEBUG=` after to disable it)
17:36 pyrimidine joined #perl6
17:39 haxmeister https://paste.pound-python.org/show/MxF0FmWZr2uNtB2FKNpz/
17:39 haxmeister ugexe: ^
17:41 pyrimidine joined #perl6
17:41 timo not sure why it fails after saying that pswebrequest works
17:42 konsolebox joined #perl6
17:46 numin0us joined #perl6
17:46 DerAlex joined #perl6
17:48 ugexe haxmeister: what files are in C:\Users\jday\.zef\store and its subdirectory?
17:50 ugexe i presume there are only 2 or 3
17:50 ugexe or none
17:52 ugexe only guess right now is maybe file locks aren't working properly? i'm not personally able to reproduce on a windows vm
17:53 numin0us joined #perl6
17:55 ugexe i mean it also fails to fetch the git repo version of the ecosystem after the powershell download attempt fails
17:56 pyrimidine joined #perl6
17:59 pyrimidi_ joined #perl6
18:00 ugexe it must be something with file locks, because zef was able to install itself (which takes a path that has no file locks)
18:01 ugexe but why wouldn't i be able to reproduce it?
18:06 mr-fooba_ joined #perl6
18:09 pyrimidine joined #perl6
18:10 ugexe one way to check would be to comment out all lines in sub lock-file-protect except the one with `code()` https://github.com/ugexe/zef/blob/403fb9f77ea62caa8d951bcef316f0fa42749e62/lib/Zef/Utils/FileSystem.pm6#L54 but you'd have to `zef uninstall zef`, clone zef, edit that file, then see if `perl6 -I. bin/zef update` then works
18:10 Cabanossi joined #perl6
18:15 skids joined #perl6
18:15 haxmeister MANIFEST.zef and 3 folders
18:15 headcase joined #perl6
18:16 haxmeister folders are cpan, p6c, and Perl6-ecosystem.git and all are empty
18:17 headcase_ joined #perl6
18:17 haxmeister ugexe: maybe I can just uninstall zef and start over from scratch with it?
18:18 haxmeister or maybe I should be running these commands in cygwin instead of regular windows command line
18:18 haxmeister ?
18:18 haxmeister nope.. cygwin don't see perl6
18:19 zakharyas joined #perl6
18:23 cdg joined #perl6
18:23 ugexe does `cmd.exe /c git --help` (type this entire thing into command line) show git help?
18:23 haxmeister https://paste.pound-python.org/show/SlAdeqr6RDirIikZIPiO/
18:24 haxmeister tried to reinstall... I deleted /users/jday/zef which you can't see
18:24 ugexe can you run with --debug flag to get test output?
18:24 haxmeister ok
18:26 headcase joined #perl6
18:26 haxmeister https://paste.pound-python.org/show/eCagteQSKKYvODikvA8u/
18:26 ugexe hmmm, its failing to find prove even
18:27 haxmeister well this is windows.. so it may be easier to remove everything thoroughly and reinstall from scratch proper
18:27 haxmeister at least I thought
18:30 haxmeister wow.. trying to uninstall again says
18:31 ugexe did `cmd.exe /c git --help` show git help?
18:34 haxmeister brb got business to deal with
18:36 ugexe its looking like you're not getting the same env/path when the processes get spawned (since it cant see git, prove, or perl6 when zef itself tries to launch them)
18:37 ugexe i almost wonder if you launch zef from a different command prompt, such as `x86 Native Tools Command Prompt` (or whatever variant comes with your version of MSVC) if it would start working
18:37 haxmeister reinstalling latest perl6
18:37 haxmeister Rakudo Star 2017.07
18:37 headcase joined #perl6
18:38 cdg_ joined #perl6
18:40 AlexDaniel leont: what about ArrayHash module?
18:40 cdg__ joined #perl6
18:40 AlexDaniel buggable: eco ArrayHash
18:40 buggable AlexDaniel, ArrayHash 'An array in a hash in an array... like a turducken': https://github.com/zostay/perl6-ArrayHash
18:41 leont The description confused me, but it might be what I want
18:42 mcmillhj joined #perl6
18:47 zakharyas joined #perl6
18:49 okl joined #perl6
18:58 Rawriful joined #perl6
18:59 pyrimidine joined #perl6
19:16 pyrimidine joined #perl6
19:24 tabv joined #perl6
19:25 pyrimidine joined #perl6
19:27 pyrimidine joined #perl6
19:31 knobo joined #perl6
19:31 andrzejku joined #perl6
19:32 pyrimidine joined #perl6
19:33 andrzejku joined #perl6
19:35 pyrimidine joined #perl6
19:38 xinming joined #perl6
19:39 pyrimidine joined #perl6
19:39 haxmeister ugexe: uninstalled, reinstalled Perl6 rakudo to the latest and then zef reinstalled fine and updates fine
19:41 ugexe haxmeister: cool, glad you were able to solve it
19:42 mcmillhj joined #perl6
19:43 haxmeister now just need to find and figure how to install a module for making excel files
19:44 haxmeister zef search doesn't see anything
19:46 ugexe do you know if one exists already?
19:46 haxmeister found 2
19:47 haxmeister https://github.com/jmcnamara/excel-writer-xlsx
19:47 pyrimidine joined #perl6
19:47 haxmeister this one looks good because it doesn't say I need to install an additional binary
19:47 ugexe that is perl 5
19:48 haxmeister https://github.com/evanmiller/XLSX-Writer\
19:48 haxmeister https://github.com/evanmiller/XLSX-Writer
19:48 haxmeister will have to be that one then
19:49 haxmeister I already see problems getting it to find the library :(
19:49 moritz or you can use Inline::Perl5 and use the excellent perl5 library
19:49 andrzejku j #simulavr
19:50 leont Are BUILD and is default supposed to work together, because I think I'm observing that they don't
19:50 pyrimidi_ joined #perl6
19:51 leont Never mind, suddenly problem is gone, no idea where I messed up
19:51 lizmat BUILD is agnostic of "is default"
19:51 lizmat "is default" is a property of the container used for the attribute
19:51 ugexe its not in the ecosystem. and while you could install it by url i dont see any example of how to setup the libxlsxwriter in windows
19:51 leont Ah, I think I can reproduce it now
19:52 leont m: class Foo { has Rat $.version is default(1.2); submethod BUILD(:$!version) { } }; Foo.new
19:52 camelia rakudo-moar a8e035: OUTPUT: «Type check failed in assignment to $!version; expected Rat but got Any (Any)␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:52 yqt joined #perl6
19:53 leont It works fine if $.version is an Any
19:54 leont m: class Foo { has Rat $.version is default(1.2); submethod BUILD(:$!version = Nil) { } }; Foo.new # does seem to work
19:54 camelia rakudo-moar a8e035: ( no output )
19:57 pyrimidine joined #perl6
20:00 El_Che moritz: how is the regex book coming into shape?
20:02 moritz El_Che: I'm writing an email to the mailing list right now, on this very topic :-)
20:02 TEttinger joined #perl6
20:02 pyrimidine joined #perl6
20:02 moritz El_Che: TL;DR: it's now feature complete, and I'm looking for proof-readers
20:03 El_Che moritz: I can have a look if I find some time. However, there are some parts of the grammars that I don't completely get yet
20:05 pyrimidine joined #perl6
20:09 eater joined #perl6
20:10 pyrimidine joined #perl6
20:12 headcase joined #perl6
20:17 headcase joined #perl6
20:17 pyrimidine joined #perl6
20:18 cdg joined #perl6
20:21 pyrimidi_ joined #perl6
20:24 cdg joined #perl6
20:28 BooK I'm working on a patch for the core. Which version is preferred for operators? texas or unicode?
20:28 BooK >= or ≥ ?
20:28 timo a Channel is a really neat mechanism for work credit management
21:08 headcase joined #perl6
21:15 Zoffix BooK: as a general thing, I don't think there's a hard preference. I think in the past more Texas stuff was used and now more Unicodey stuff sneaks in. But as for those ops in particular, check which one performs faster. There was a ticket where Unicode ones were a ton slower; I think there was a workaround inserted for the ops but the underlying issue wasn't fixed.
21:15 Zoffix m: for ^10000 { $ = rand ≥ rand }; say now - INIT now
21:15 camelia rakudo-moar a8e035: OUTPUT: «0.00846099␤»
21:15 Zoffix m: for ^1000000 { $ = rand ≥ rand }; say now - INIT now
21:15 camelia rakudo-moar a8e035: OUTPUT: «0.49497320␤»
21:15 Zoffix m: for ^1000000 { $ = rand >= rand }; say now - INIT now
21:15 camelia rakudo-moar a8e035: OUTPUT: «0.33882657␤»
21:16 Zoffix m: for ^1000000 { $ = rand >= rand }; say now - INIT now
21:16 camelia rakudo-moar a8e035: OUTPUT: «0.3456027␤»
21:16 Zoffix m: for ^1000000 { $ = rand ≥ rand }; say now - INIT now
21:16 camelia rakudo-moar a8e035: OUTPUT: «0.50973210␤»
21:16 Zoffix Yeah, the Texas version still looks to be a bit faster for whatever reason
21:17 Zoffix But used to be 36x slower :D https://rt.perl.org/Public/Bug/Display.html?id=131626#ticket-history
21:17 knobo joined #perl6
21:17 Zoffix BooK: BTW, there's also #perl6-dev channel :) Some devs some times don't read all of this channel, so more eyes will see dev questions up in there :)
21:19 pyrimidine joined #perl6
21:26 Zoffix moritz: you asquare?
21:27 moritz Zoffix: kinda
21:27 Zoffix moritz: How much editing am I allowed to make? If a sentence reads better with a change, should I make it or should I only focus on proofreading words themselves and punctuation?
21:28 moritz Zoffix: if it reads better, change it
21:28 Zoffix k :)
21:28 moritz Zoffix: if you want to re-arrange whole paragraphs or sections, better check with me first, or push it to a branch that's not master
21:28 Zoffix Nah, I don't plan to do that at the moment.
21:29 skids joined #perl6
21:34 [Coke] rt #132091, timo - the implication is that you'd like this behavior not to change, ay?
21:34 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132091
21:40 headcase joined #perl6
21:43 headcase_ joined #perl6
21:44 * moritz -> slee
21:44 moritz p
21:44 moritz :-)
22:00 alpha6 joined #perl6
22:00 Ulti someone is asking on StackOverflow about UNIX sockets, then I noticed this https://design.perl6.org/S32/IO.html#IO%3A%3ASocket%3A%3AUnix
22:01 Ulti I'm right in thinking nothing like that has made it to Rakudo?
22:01 tyil afaik theres no unix sockets in it
22:01 tyil I believe someone was looking at it, though
22:05 leont I was looking at it a while ago, but I didn't have time to get very far
22:06 pyrimidine joined #perl6
22:06 leont It will require moar support, which is where I'm threading slowly
22:08 pyrimidi_ joined #perl6
22:08 BooK Zoffix: thanks for the advice about #perl6-dev
22:12 BooK so I made a pred and succ for enumeration (following the recent discussions), and returning a Failure object seems to stop processing
22:13 BooK I thought it was a "soft" exception?
22:13 leont It depends on how it's used
22:15 BooK ah, ok
22:16 pyrimidine joined #perl6
22:17 BooK and if I want to try and just show the exception, but not actually stop processing?
22:17 BooK well, just exit the try block and move on
22:19 BooK try { CATCH { .say } ... } seems to print and then die
22:19 pyrimidine joined #perl6
22:20 ugexe try { CATCH { default { .say } }
22:21 ugexe or try die "xxx"; say $!; say 42; if you fancy that way
22:21 timo [Coke]: i think it's an unwanted side-effect, but if there's not yet a test for the behavior, there should be one, IMO
22:22 timo m: enum enomnom (Foo => 1, Bar => 1, Baz => 1); say +Foo; say +Bar; say enomnom(1);
22:22 camelia rakudo-moar a8e035: OUTPUT: «1␤1␤Baz␤»
22:23 mcmillhj joined #perl6
22:23 timo BooK: not sure if it has any bearing on your work on enum's succ and pred, but consider that multiple entries can have the same value, and also that entries and their values could come in different orders in the declaration
22:24 BooK timo: I don't understand the second part of your sentence
22:25 timo m: enum enomnom (Foo => 9, Bar => 1, Baz => 5, Quux => 2);
22:25 camelia rakudo-moar a8e035: ( no output )
22:25 timo would this change how succ and pred behave compared to if i had put it like
22:25 BooK in the above example, that Foo.succ would be Bar and Bar.succ would be Baz
22:25 timo m: enum enomnom (Bar => 1, Quux => 2, Baz => 5, Foo => 9);
22:25 camelia rakudo-moar a8e035: ( no output )
22:26 BooK as for the second example, yes the result would be different
22:26 timo OK
22:27 timo i don't have a preference, i just thought i'd point it out
22:27 BooK it's not about the values, but about the order of declaration
22:27 timo i think that's a good decision
22:27 timo we're not expecting people to have "enum Bool <True False FileNotFound>" :D
22:27 Zoffix BooK: FWIW try {} enables `use fatal`, which causes Failures to explode
22:28 mcmillhj joined #perl6
22:28 Zoffix (inside the `try` block)
22:28 Zoffix Many method calls also explode Failures
22:28 Zoffix m: Failure.new.meow
22:28 camelia rakudo-moar a8e035: OUTPUT: «Failed␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:29 Zoffix As does sinking it
22:29 Zoffix m: Failure.new
22:29 camelia rakudo-moar a8e035: OUTPUT: «Failed␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:29 pyrimidine joined #perl6
22:30 BooK Zoffix: basically I'm running this to test my changes:
22:30 BooK try { CATCH { .say; }; .pred.say }, .say , try { CATCH { .say;  }; .succ.say }, "".say for Order.^enum_value_list;
22:31 BooK I just want to check the failure is what I expect, and move on
22:31 Zoffix `try` fatalizes Failures
22:31 BooK so what should I use instead?
22:31 BooK oh what a dummy
22:31 BooK ah no, this fails too: .pred.say, .say, .succ.say, "".say for Order.^enum_value_list
22:31 timo CATCH is allowed inside a block without a try
22:32 BooK oh
22:32 Zoffix BooK: .say call on Failure will explode it
22:32 BooK ah
22:33 BooK .gist.say too it seems
22:33 Zoffix .say calls .gist
22:33 pyrimidine joined #perl6
22:33 BooK oh
22:33 Zoffix A rule of thumb is: if you try to use a Failure where you'd use a value it'll explode. Failure is Nil and some methods will just propagate it further
22:33 Zoffix What are you trying to do, just dump it for debug purposes?
22:34 BooK yes
22:35 BooK for Order.^enum_value_list { CATCH { .dd }; .pred.say, .say, .succ.say, "".say } # gives me No such method 'dd' for invocant of type 'X::OutOfRange'
22:35 Zoffix m: sub f { rand ≥ ½ ?? fail("ded") !! "no fail" }; f() andthen .say orelse "Got a Failure; its exception is {.head.exception.gist}".say
22:35 camelia rakudo-moar a8e035: OUTPUT: «Got a Failure; its exception is Nil␤»
22:35 BooK so it seems I get the Expection and not the Failure
22:36 adu joined #perl6
22:36 Zoffix dd is a subroutine, not method
22:36 BooK ok
22:36 john51 joined #perl6
22:36 Zoffix Yeah, by that time the Failure already exploded by the .say call
22:36 pyrimidine joined #perl6
22:37 Zoffix m: sub f { $^a eq 'b' ?? fail("ded") !! "no fail" }; for <a b c> { CATCH { default { "Got exception {.^name}; its exception is {.message}".say }; f }
22:37 camelia rakudo-moar a8e035: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3 its exception is {.message}".say }; f }7⏏5<EOL>␤»
22:37 Zoffix m: sub f { $^a eq 'b' ?? fail("ded") !! "no fail" }; for <a b c> { CATCH { default { "Got exception {.^name}; its exception is {.message}".say } }; f.say; f.say }
22:37 camelia rakudo-moar a8e035: OUTPUT: «5===SORRY!5===␤Calling f() will never work with declared signature ($a)␤at <tmp>:1␤------> 3; its exception is {.message}".say } }; 7⏏5f.say; f.say }␤Calling f() will never work with declared signature ($a)␤at <tmp>:1␤------> 3xcep…»
22:38 * Zoffix is too sleepy to see what the problem is
22:39 BooK my $o = Order::Less; while $o.defined { $o.say ; $o = $o.succ } # says Less, Same, More
22:39 BooK my $o = Order::Less; while $o.defined { $o.say ; $o = $o.pred } # says Less
22:39 Zoffix But yeah just CATCH {} above won't catch it. It'll do its thing and pass the exception further up. You need a `default` or some other `when` thing
22:39 pyrimidi_ joined #perl6
22:40 Cabanossi joined #perl6
22:40 Zoffix Yeah, that'll work. `.defined` (and `.Bool`) disarm Failures
22:40 BooK using Order in a while is kinda annoying, because Same is basically false
22:41 Zoffix Maybe this is helpful. Our impl. of `fails-like` routine that examines Failures: https://github.com/perl6/roast/blob/master/packages/Test/Util.pm#L304-L319
22:41 john51 joined #perl6
22:41 BooK Zoffix: so using a default block inside the CATCH did disarm it
22:41 Zoffix Yeah
22:41 Zoffix Well, no
22:42 timo hmm, we have "repeat { } while foo", right?
22:42 timo should we perhaps also have "repeat { } with $foo"?
22:42 Zoffix I mean disarmed what? Failure? No, by that point it wasn't a Failure already. But yeah, it disarmed (handled) the exception
22:43 BooK sorry, I'm still new to Perl 6, don't know the words
22:43 Zoffix Yeah, me too.
22:44 Zoffix m: Failure.new orelse .perl.say
22:44 camelia rakudo-moar a8e035: OUTPUT: «Failure.new(exception => X::AdHoc.new(payload => "Failed"), backtrace => Backtrace.new)␤»
22:45 pyrimidine joined #perl6
22:45 zacts joined #perl6
22:48 pyrimidi_ joined #perl6
22:51 Zoffix TIP: $o = $o.succ can be written as $o .= succ  (same as $o = $o + 42 can be written as $o += 42)
22:51 timo and $_ = $_.succ can even be written just .=succ
22:51 Zoffix (currently it's slower tho; so don't use it in core
22:51 Zoffix timo: wow really? TIL
22:51 timo er, at least i think so
22:52 timo m: $_ = "aaa"; .= succ; .say
22:52 camelia rakudo-moar a8e035: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix .= instead␤at <tmp>:1␤------> 3$_ = "aaa"; .=7⏏5 succ; .say␤»
22:52 timo oops, i'm wrong
22:52 Zoffix Same thing with the `»` hyper method call :) Wish it worked :)
22:52 Zoffix As in `».uc with <a b c>` :)
22:53 nige joined #perl6
22:54 BooK timo, Zoffix: yeah I tried with .succ= and found myself looking for what to put on the rhs
22:54 BooK https://github.com/rakudo/rakudo/pull/1156 # so here it is
22:58 pyrimidine joined #perl6
22:59 BooK Bool has its own versions of pred/succ, but my plan is to drop most Bool methods that are provided by Enumeration
22:59 BooK m: say Errno.WHAT
22:59 camelia rakudo-moar a8e035: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Errno used at line 1␤␤»
23:00 BooK I'd have thought Errno would also be an enumeration :-)
23:01 geekosaur errnos don't generally have a meaningful progression
23:01 pyrimidi_ joined #perl6
23:01 nige joined #perl6
23:02 Zoffix BooK: it might be too early in the "setting" (the core code) for it to afford that luxury
23:03 Zoffix BooK: not sure about the Failure in the PR. We can't do it with Bool, because we need to keep $foo++ idiom working, and if we don't do it in Bool, we still have this inconsistency that started this whole thing :)
23:04 BooK geekosaur: enums don't generally have a meaningful progression
23:05 pyrimidine joined #perl6
23:05 BooK Zoffix: what's the $foo++ idiom?
23:06 Zoffix "%seen{$key}++"
23:06 Zoffix From TimToady++'s comments yesterday https://irclog.perlgeek.de/perl6/2017-09-14#i_15160486
23:06 BooK right
23:07 BooK scrape my PR then :-)
23:08 BooK from this comment, I'd think -- could be made special for Bool too, and follow the lead of Perl5's $|
23:08 pyrimidine joined #perl6
23:09 BooK and that False.pred should be True
23:09 BooK and not look for consistency in the other enums
23:10 * Zoffix likes consistency more than Perl's use of $| and all the associated magicks :P
23:10 timo excuse me, what's $| do?
23:10 Zoffix timo: turns off buffering when it's False
23:10 timo oh, autoflush
23:11 tyil oh member when I used $|++; in perl 5
23:11 Zoffix timo: and it has this magic stuff where $|++ always makes it true and $|-- flips it back and forth
23:11 tyil it confused many people
23:11 BooK it's either 0 or 1, and $|++ goes to 1 and stays there, while $|-- flip flops
23:11 timo that's a bit strange
23:11 BooK golfers loved it
23:11 pyrimidine joined #perl6
23:12 timo of course they did %)
23:12 BooK imagine %seen_odd_times{$key}-- :-)
23:12 BooK and I meant even
23:12 BooK arg
23:12 tyil %seen_odd_times{$even}-- looks ever weirder
23:14 Zoffix If we make .pred go to previous element (and just return the first element if it's already at the first element) and .succ go to next element (and just return the first element if it's already at the last element). We make Enumeration <-> Bool consistent AND keep the behaviour of Order and Bool semantically the same (More.succ currently returns 2, which is still "more")
23:15 Zoffix and user can assume that calling .succ/.pred on Order/Bool will always be non-explosive
23:15 BooK Zoffix: right, so remove the Failure
23:15 pyrimidine joined #perl6
23:16 aindilis joined #perl6
23:16 nige joined #perl6
23:19 Zoffix Yeah
23:25 Cabanossi joined #perl6
23:26 orac1e_ joined #perl6
23:29 BooK do people link to perlgeek.de in the commit messages?
23:30 BooK nevermind, they do
23:31 BooK Failure dropped from the PR
23:32 pyrimidine joined #perl6
23:35 pyrimidine joined #perl6
23:36 mcmillhj joined #perl6
23:38 pyrimidine joined #perl6
23:42 pyrimidi_ joined #perl6
23:42 Zoffix BooK++ merged. Thanks.
23:45 nige joined #perl6
23:49 BenGoldberg joined #perl6
23:51 TEttinger joined #perl6
23:51 BenGoldberg m: constant meaning = 42; sub life () is asdf {};
23:51 camelia rakudo-moar 627de7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is asdf' in a sub declaration.␤at <tmp>:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED inlinable nodal␤   …»
23:51 BenGoldberg m: constant meaning = 42; sub life () is meaning {};
23:51 camelia rakudo-moar 627de7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is ' in a sub declaration.␤at <tmp>:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED inlinable nodal␤       …»
23:51 mcmillhj joined #perl6
23:51 pyrimidine joined #perl6
23:52 BenGoldberg That is an LTA error message :(
23:53 * Zoffix doesn't see the LTAness
23:53 Zoffix Which part?
23:53 Zoffix Ah, now I see it
23:53 Zoffix lulz :) Would you file it?
23:53 Zoffix huggable: rakudobug
23:53 huggable Zoffix, Report bugs by emailing to <rakudobug@perl.org>. See also: https://github.com/rakudo/rakudo/wiki/rt-introduction
23:58 nige joined #perl6
23:58 pyrimidine joined #perl6

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

Perl 6 | Reference Documentation | Rakudo