Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-07

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:14 kid51 joined #perl6
00:19 kid511 joined #perl6
00:20 Herby_ joined #perl6
00:21 Herby_ Evening, everyone!
00:21 Herby_ \o
00:22 Herby_ o/
00:26 Herby_ If I'm on Windows 10, and I want my Perl 6 to use winrar on a file, what's the best way to call it?
00:27 ZoffixWin Proc::Async?
00:28 ZoffixWin http://docs.perl6.org/languag​e/concurrency#Proc%3A%3AAsync
00:29 Herby_ Hadn't heard of that, I'll give it a shot
00:29 Herby_ Also, I really enjoyed your recent Perl 6 presentation.  Good job on it
00:30 Herby_ Easy for a beginner to follow
00:31 ZoffixWin Thanks.
00:35 Herby_ Hmm.  I copied that Proc::Async example and I'm receiving an error "no such file or directory... line 11".  Looks like it breaks on the " await $promise" line
00:35 timotimo are you on windows?
00:36 Herby_ Yep, Windows 10
00:36 Herby_ using the perl 6 MSI
00:36 timotimo you may have to find an absolute path to a .exe file
00:37 timotimo "echo" may not work at all; it may be a shell built-in, which we can't just execute like that from Proc::Async
00:38 Herby_ hmm
00:44 colomon joined #perl6
00:46 addison joined #perl6
00:47 Herby_ Yep, putting the full path to an .exe worked
01:08 [Coke] joined #perl6
01:08 * [Coke] managed to screw up his IRC, whoops.
01:12 Herby_ what a headache...I can't figure out how to use Proc::Async to call an .exe that has a space in its path
01:13 timotimo isn't it enough to put that as the first string in the list of things?
01:14 Herby_ C:/Program Files/WinRAR/WinRAR.exe
01:14 Herby_ Trying every variation
01:14 Herby_ it keeps trying to open:   Files/WinRAR/WinRAR.exe
01:14 timotimo show code?
01:15 Herby_ my $program = "C:/Program /Files/WinRAR/WinRAR.exe"; my $proc = Proc::Async.new($program);
01:15 Herby_ my $program = "C:/Program Files/WinRAR/WinRAR.exe"; my $proc = Proc::Async.new($program);
01:16 geekosaur at a guess, it passes that to cmd.exe and you need something like
01:16 geekosaur my $program = '"C:/Program Files/WinRAR/WinRAR.exe"'; my $proc = Proc::Async.new($program);
01:16 Herby_ no such file or directory
01:17 Herby_ but I can copy that path directly into the cmd prompt and it launches WinRAR just fine
01:19 timotimo perhaps you have to put a "\\" in there in front of the " "?
01:19 timotimo oh, oh, oh
01:19 timotimo what about [$program] ?
01:19 timotimo oh, no, it's *@args
01:20 timotimo so it wouldn't try to split on whitespace for you if there's only one argument
01:20 addison joined #perl6
01:20 timotimo my $program = '"C:/Program\\ Files/WinRAR/WinRAR.exe"'; my $proc = Proc::Async.new($program);
01:20 timotimo i'm going to bed now, sorry
01:21 Herby_ no such file or directory
01:21 Herby_ thanks for the try.  have a good night
01:23 Actualeyes1 joined #perl6
01:28 Actualeyes joined #perl6
01:28 shinobi-cl joined #perl6
01:33 addison joined #perl6
01:34 colomon joined #perl6
01:34 ZoffixWin Herby_, are you sure you actually have WinRAR at that location? This works fine for me on Win7:    perl6 -e "await Proc::Async.new('C:\Program Files\7-Zip\7zFM.exe
01:34 ZoffixWin ').start"
01:35 ZoffixWin (minus the spurious newline)
01:37 Herby_ if I type in:    ""C:/Program Files/WinRAR/WinRAR.exe"      at the command line, WinRAR launches
01:37 Herby_ if I do:         perl6 -e "await Proc::Async.new('C:/Program Files/WinRAR/WinRAR.exe').start"
01:38 Herby_ I receive an error   "Cannot open Files/WinRAR/WinRAR.exe"
01:38 Herby_ ignore the extra quotation on the first line
01:38 Herby_ On Windows 10
01:39 Herby_ if I use backslashes instead of forward slashes, I get the same error
01:40 ZoffixWin Well, then the problem is obvious....
01:40 ZoffixWin Windows 10 sucks :D
01:40 Herby_ Windows is the devil?
01:40 Herby_ hah
01:40 addison joined #perl6
01:41 Herby_ I guess I could copy the executable to a path that doesn't have spaces
01:43 cdg joined #perl6
01:46 Herby_ something weird is going on with this
01:46 Herby_ perl6 -e "await Proc::Async.new('C:\Program Files (x86)\Battle.net\Battle.net.exe').start"  launches the executable just fine
01:46 Herby_ I'm missing something simple here
01:46 mohae joined #perl6
01:48 ZoffixWin :S
01:50 Herby_ your example works fine on multiple executables, some even in the same directory
01:50 Herby_ but it does not like WinRAR
01:50 ZoffixWin (installed WinRar) FWIW, I get the same error as you, on Win7
01:50 Herby_ Maybe WinRAR offended Perl 6 in another life, so they want nothing to do with each other
01:51 ZoffixWin It might be an error generated by WinRAR.. Calling perl6 -e "await Proc::Async.new('C:/Program Files/WinRAR/WinRAR.exe', 'foo').start" doesn't give that error
01:51 Herby_ good to know you're getting the same error and I'm not crazy
01:53 zhida joined #perl6
01:57 Herby_ yeah, i'm seeing the same. when I pass it some arguements, it doesn't error but it doesn't seem to do anything
01:59 b2gills .oO( doesn't 7zip work with rar files? )
01:59 ZoffixWin Seems like you should be using C:/Program Files/WinRAR/UnRAR.exe instead.
01:59 ZoffixWin b2gills, it does
02:00 ZoffixWin Herby_, it takes 'e' and filename as arguments to extract an archive and it works on command line, but fails with Perl 6 with "The spawned process exited unsuccessfully (exit code: 7)" and I've no idea why :S
02:00 ZoffixWin Windows is stupid
02:00 Herby_ yes is. I'll skip that part of my little program for now
02:00 Herby_ thanks for testing it for me
02:00 b2gills could it be that Winrar doesn't like being a subprocess?
02:01 Calibellus joined #perl6
02:02 geekosaur if that's the gui, I imagine it doesn't like to be run in DETACH mode
02:02 Herby_ http://stackoverflow.com/questions/131566​2/extracting-zip-with-winrar-command-line
02:02 Herby_ the 2nd answer, with 18 votes
02:02 Herby_ thats the example I'm trying to follow.  Works great when used directly in the cmd prompt
02:37 noganex_ joined #perl6
02:40 addison joined #perl6
02:51 addison joined #perl6
02:59 winfred joined #perl6
03:03 tharkun_ joined #perl6
03:04 atta joined #perl6
03:25 shinobi-cl joined #perl6
03:25 shinobi-cl hi all :)
03:25 shinobi-cl is there a way to code my own adverb? i want to use :exists for my own class
03:28 shinobi-cl basically, it is a "matrix" class, with rows and columns. When i do $m.get-cell(3,3) and this position is beyond bounds, it is returning Nil. And using $m.get-cell(3,3):exists complains because i apply :exists on a Nil
03:29 shinobi-cl Nevermind, found it ... so is just like a parameter..
03:31 addison joined #perl6
03:31 awwaiid Tonight at the DC-Polyglot-Programming meetup we did some Randori-style group programming with Elixer and then Perl6. It was very interesting how many similarities there were in a simple program (in this case multi-dispatch, default values, parameter guards)
03:32 awwaiid er, Elixir
03:34 * MadcapJake is realizing that people find an easy-to-argue complaint (unicode operators) and just blabber on about it without actually understanding the finer points.
03:40 Vlavv_ joined #perl6
03:46 pdcawley_ joined #perl6
03:47 * MadcapJake closes reddit and takes a deep breath :P
03:49 petercommand joined #perl6
03:56 johndau joined #perl6
04:08 petercommand joined #perl6
04:08 shinobi-cl m: sub s1($x, :double) { };
04:08 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FlPfDEXeWU␤Malformed parameter␤at /tmp/FlPfDEXeWU:1␤------> 3sub s1($x, :7⏏5double) { };␤»
04:10 jeek joined #perl6
04:12 shinobi-cl m: sub negative($x, :double) { say (-1 * $x) * ($double) ?? 2 !! 1;}  }; negative(3):double;
04:12 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j7UhHU_44d␤Malformed parameter␤at /tmp/j7UhHU_44d:1␤------> 3sub negative($x, :7⏏5double) { say (-1 * $x) * ($double) ?? 2␤»
04:17 MadcapJake m: sub negative($x, :$double) { say (-1 * $x) * ($double) ?? 2 !! 1;}  };
04:17 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PEnUMTXVY9␤Unexpected closing bracket␤at /tmp/PEnUMTXVY9:1␤------> 3 say (-1 * $x) * ($double) ?? 2 !! 1;}  7⏏5};␤»
04:17 MadcapJake m: sub negative($x, :$double) { say (-1 * $x) * ($double) ?? 2 !! 1 }
04:17 camelia rakudo-moar 61d231: ( no output )
04:17 shinobi-cl m: sub negative($x, :$double) { say (-1 * $x) * (($double) ?? 2 !! 1)  }; negative(3):double; negative(3)
04:17 camelia rakudo-moar 61d231: OUTPUT«-6␤-3␤»
04:19 orbus MadcapJake: I think you've just summarized the internet in general
04:20 jeek joined #perl6
04:27 Cabanossi joined #perl6
04:29 labster joined #perl6
04:54 avalenn joined #perl6
05:03 MadcapJake orbus: It might be even more universal than just the internet.  The internet just makes it easier for people to do it more anonymously (at least with several degrees of separation from social ramifications)
05:04 orbus can't argue
05:04 orbus tends to bring out the worst in people
05:05 MadcapJake that's why computers make much better friends ;)
05:08 MadcapJake in other news, my Forth now supports anonymous functions!
05:08 MadcapJake will try and get named functions fully working here and then I'm gonna wrap up for the night.
05:47 cognominal Is there a convention to pass moar switches from the rakudo command ? Or is the only way is modifing  the shell script that calls rakudo in term of a moar exec ?
05:54 shinobi-cl m: class A {  has @.data; method new(@data) {}; method postcircumfix:<[ ]>(A $a, @posspec) { say "op []"; } }; my @data = (1,2,3); my $o = A.new(@data); say $o.perl;
05:54 camelia rakudo-moar 61d231: OUTPUT«Any␤»
05:55 shinobi-cl m: class A {  has @.data; method postcircumfix:<[ ]>(A $a, @posspec) { say "op []"; } }; my @data = (1,2,3); my $o = A.new(data => @data); say $o.perl;
05:55 camelia rakudo-moar 61d231: OUTPUT«A.new(data => [1, 2, 3])␤»
05:55 shinobi-cl m: class A {  has @.data; method postcircumfix:<[ ]>(A $a, @posspec) { say "op []"; } }; my @data = (1,2,3); my $o = A.new(@data); say $o.perl;
05:55 camelia rakudo-moar 61d231: OUTPUT«Default constructor for 'A' only takes named arguments␤  in block <unit> at /tmp/6M_6fpWrSN line 1␤␤»
05:55 shinobi-cl m: class A {  has @.data; method postcircumfix:<[ ]>(A $a, @posspec) { say "op []"; } }; my @data = (1,2,3); my $o = A.new(data=>@data); say $o.perl; say $o[2];
05:55 camelia rakudo-moar 61d231: OUTPUT«A.new(data => [1, 2, 3])␤Index out of range. Is: 2, should be in 0..0␤  in block <unit> at /tmp/JgiDx9mJXQ line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/JgiDx9mJXQ line 1␤␤»
05:56 shinobi-cl left #perl6
05:58 shinobi-cl joined #perl6
06:01 johndau joined #perl6
06:06 CIAvash joined #perl6
06:10 wamba joined #perl6
06:14 johndau joined #perl6
06:15 mr-foobar joined #perl6
06:18 cpage_ joined #perl6
06:21 TEttinger joined #perl6
06:27 firstdayonthejob joined #perl6
06:33 johndau joined #perl6
06:35 johndau` joined #perl6
06:37 johndau`` joined #perl6
06:43 nakiro joined #perl6
06:51 domidumont joined #perl6
06:52 johndau`` joined #perl6
06:52 ufobat good morning perl6
06:57 Actualeyes joined #perl6
07:00 fireartist joined #perl6
07:07 sue_ joined #perl6
07:11 moritz \o ufobat
07:16 abraxxa hi!
07:18 Dunearhp joined #perl6
07:18 zakharyas joined #perl6
07:22 maybekoo2 joined #perl6
07:24 Ulti https://glot.io/new/perl6  OMG \o/
07:24 Ulti I'll take a look at interacting with the API tonight and mock something up for perl6.org
07:25 moritz \o/
07:25 Ulti Camelia amongst the other logos https://glot.io/ looks quite good too tbqh despite my nay saying
07:26 moritz it runs a 2016.01 it seems
07:27 Ulti yeah it uses the rakudo-star latest Docker image
07:28 Ulti I dont think there is a rakudo release Docker thats kept up to date monthly?
07:36 masak morning, #perl6
07:36 darutoko joined #perl6
07:41 sortiz \o #perl6
07:41 sue_ joined #perl6
07:41 masak o/ sortiz
07:42 sortiz masak, is DBIish working well?
07:50 g4 joined #perl6
07:51 masak sortiz: yes, after upgrading my rakudo on the heroku buildpack
07:51 masak thanks for asking
08:01 RabidGravy joined #perl6
08:08 g4 joined #perl6
08:08 CurtisOvidPoe joined #perl6
08:08 CurtisOvidPoe Morning, all.
08:09 parisba_ hello
08:10 DrForr Morning.
08:12 CurtisOvidPoe Gonna guess that some of you have seen the “Perl 6 Game of Thrones” article: http://techbeacon.com/why-perl-6-g​ame-thrones-programming-languages
08:12 CurtisOvidPoe I wrote it, but didn’t choose the title
08:13 psch aha, i knew the argument seemed familiar :)
08:13 psch CurtisOvidPoe++
08:13 * masak .oO( unlike with The Song of Ice And Fire, with Perl the sixth one has actually been released ) :P
08:15 masak CurtisOvidPoe++ # article
08:16 dakkar joined #perl6
08:16 DrForr CurtisOvidPoe++ # obviously :)
08:16 El_Che CurtisOvidPoe: everyone dies? :)
08:18 rindolf joined #perl6
08:19 DrForr Well, George R.R. Martin *is* the most notorious serial killer in fantasy :)
08:21 masak I still remember reading through the first book, and not being all that impressed. basically just reading it and bored.
08:21 masak felt like a very standard whodunit in a fantasy setting.
08:22 masak and then... I got to the end of the first book, and [spolert alert], and I went "huh", and read through it from the beginning, a tad more interested
08:23 El_Che my significant other never got over the first 5 episodes of the tv series. It was pretty bland and boring
08:23 * masak .oO( rage of thrones )
08:23 bioexpress joined #perl6
08:24 bioexpress Hello, I have a function which gathers all directories of a given directory. From these directories the user can choose directories which are returned by the function. Should the function return the chosen directories as strings or as IO::Path objects?
08:24 yoleaux 10 Mar 2016 22:17Z <b2gills> bioexpress: You will probably need to convert from a Str to a Buf to work with wchar_t functions
08:24 DrForr https://www.youtube.com/watch?v=1CLCOvZOh1o # ask and you shall be linked.
08:25 masak DrForr: listening to it now :P
08:28 DrForr https://www.youtube.com/watch?v=SVaD8rouJn0 # The Honest Trailers take on it, which is about as accurate as anything...
08:30 DrForr All men must die... who are related to Sean Bean.
08:33 RabidGravy bioexpress, depends what you want to do with those directories, I'd probably go with IO::Path objects if listing or creating files in the directories or strings if just printing them out
08:34 johndau`` joined #perl6
08:38 bioexpress RabidGravy: thx
08:45 Actualeyes1 joined #perl6
08:49 darutoko joined #perl6
09:01 sjoshi joined #perl6
09:10 RabidGravy I'm in two minds as to whether to release this web thingy for Lumberjack as a module
09:12 RabidGravy I mean it works and I think it's quite useful
09:27 espadrine_ joined #perl6
09:41 ufobat joined #perl6
09:46 ufobat does anyone have an opinion on that: https://github.com/tadzik/Bailador/issues/55 ?
09:49 masak ufobat: `return True session<is_logged_in>;` -- two terms in a row. missing an `if` there?
09:50 masak ufobat: `$route->append_route` -- accidental Perl 5 syntax. did you mean `$route.append_route` ?
09:50 ufobat 2 times aye!
09:51 masak I would suggest looking a lot at prior art for this one
09:51 masak AFAIK, both Mojo and Catalyst solve this in some way
09:52 ufobat my suggestion is quite mojo like
09:52 DrForr Dancer solves that through application hooks, because at least what I'm seeing there looks like authentication.
09:53 ufobat i just find the naming in mojo strange, there is for example a "under" which is not much related to "over", but the "group" is similar to under
09:53 DrForr And keep in mind that Bailador is modeled on Dancer, so looking to Mojo/Cat for inspiration may not be the right place to look.
09:57 ufobat its just my excample that is about authentication, its basically a "route under contition". and your point is valid, of course. I also wanted to know if bailador is staying a dancer clone or should it be developed on its own / pick good ideas from somewhere else
09:58 DrForr Requiring 'response_content = ...' makes using handlers much more awkward IMO as well. Prancer just uses a dynamic variable for content-type, headers and such.
09:58 ufobat https://github.com/tadzik/Bailador/commit​/b64c14c51be70d2921efd756da52f95036d488c7
09:59 ufobat oh! thats a cool idea!
10:00 ufobat thats something i dont like curently. that you export methods wheres some can only be called outside of the route code, and others only inside of the route code
10:00 ufobat having it as dynamic variables you might reduce this "problem" a bit
10:01 ufobat Thanks so far! :-))
10:01 DrForr Just removing the "a port of Dancer" doesn't mean that the code is suddenly laid out like Mojo :)
10:02 ufobat haha! right. i dont know it either,
10:03 DrForr Not saying that you shouldn't use Mojo as a model, just saying that the model may need to be changed.
10:04 ufobat i am not perfectly sure if that is the example I disliked a few days ago, at least it's quite similar... https://metacpan.org/pod/Dance​r2::Tutorial#Other-HTTP-verbs look at the code exampel in the section
10:05 ufobat to my understanding here this requires that you check if you are logged in in each route
10:05 ufobat and again this is basically not about authentication, its about "routes under conditions"
10:06 ufobat or https://metacpan.org/pod/D​ancer2::Plugin::Auth::Tiny
10:06 DrForr Right, I'm just saying that the most common case is authentication.
10:06 ufobat yeah, i agree!
10:08 DrForr Which is why Dancer uses a more generic hook mechanism. I've worked recently with fixing authentication in a Dancer app and am not quite convinced that hooks are the solution, so I'm somewhat on your side here.
10:08 ocbtec joined #perl6
10:12 ufobat mojo uses events, i assume that those events are somehow similar to the hooks. i will read some documentation on it
10:13 DrForr I haven't thought about it too much because I wanted to get more experience with how Dancer does that, but in the current Dancer app I'm working on I'm 98% confident that the people who wrote the original went as far as running the Dancer build tool and then just started writing.
10:13 ufobat ah! maybe! tadzik accepting gabors PR on changing the readme might be a sign that its not ment to be a pure dancer clone ;p
10:16 ufobat i dont know a "dancer build tool"?
10:17 DrForr I might be thinking of Cat actually.
10:20 ufobat what is (or should) prancer be? the name strongly reminds on dancer
10:20 ufobat is it a clone (as well)?
10:22 DrForr Not a clone.
10:23 timotimo https://doc.perl6.org/routine/chars  - !!! this claims our .chars method returns codepoints
10:23 timotimo someone can fix this
10:24 timotimo m: say "👩‍❤️‍💋‍👩".chars
10:24 camelia rakudo-moar 61d231: OUTPUT«4␤»
10:24 timotimo m: say "‍❤️‍💋‍".chars
10:24 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/EpEhrpZSGE:1␤------> 3say7⏏5 "‍❤️‍💋‍".chars␤Bogus postfix␤at /tmp/EpEhrpZSGE:1␤------> 3say 7⏏5"‍❤️‍💋‍".chars␤    expecting any of:␤   …»
10:25 timotimo i can't handle this with my console %)
10:26 grondilu I always forget what's the difference between 'my Foo @bar' and 'my @bar of Foo'.
10:26 timotimo m: my Foo @bar; say @bar.of; my @bar of Foo; say @bar.of
10:26 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5===␤Type 'Foo' is not declared␤at /tmp/vgLnFAUnKA:1␤------> 3my Foo7⏏5 @bar; say @bar.of; my @bar of Foo; say ␤Malformed my␤at /tmp/vgLnFAUnKA:1␤------> 3my7⏏5 Foo @bar; say @bar.of; my @bar of Foo; ␤␤»
10:26 timotimo m: my Str @bar; say @bar.of; my @bar of Str; say @bar.of
10:26 camelia rakudo-moar 61d231: OUTPUT«Potential difficulties:␤    Redeclaration of symbol @bar␤    at /tmp/ymxJau3cCg:1␤    ------> 3my Str @bar; say @bar.of; my @bar of Str7⏏5; say @bar.of␤(Str)␤(Str)␤»
10:27 timotimo m: my Str @bar; say @bar.of; my @barb of Str; say @barb.of
10:27 camelia rakudo-moar 61d231: OUTPUT«(Str)␤(Str)␤»
10:27 timotimo i don't think there is a difference between those two?
10:27 grondilu I think there is but it may be subtle.
10:28 grondilu m: say (my Int @).WHAT; say (my @ of Int).WHAT;
10:28 camelia rakudo-moar 61d231: OUTPUT«(Array[Int])␤(Array[Int])␤»
10:28 grondilu hum, looks like the same indeed.
10:29 timotimo you may be thinking of "is"?
10:29 labster joined #perl6
10:29 timotimo like, what you'd use to specify a %-container is actually a Set or something
10:32 timotimo http://www.unicode.org/emoji/c​harts/emoji-zwj-sequences.html - oh, wow.
10:33 timotimo we should be giving "1 character" for those
10:33 timotimo ...probably?
10:34 ZoffixWin Seems like it
10:34 timotimo m: say "\x1f496".&uniname
10:34 camelia rakudo-moar 61d231: OUTPUT«SPARKLING HEART␤»
10:34 timotimo oops, twisted nums
10:34 timotimo m: say "\x1f469".&uniname
10:34 camelia rakudo-moar 61d231: OUTPUT«WOMAN␤»
10:35 ZoffixWin m: "\x1F469\x200D\x2764\xFE0F\x200D​\x1F48B\x200D\x1F468".chars.say
10:35 camelia rakudo-moar 61d231: OUTPUT«4␤»
10:35 timotimo ah, you were faster at copy-pasting :)
10:38 ilmari https://twitter.com/FakeUnico​de/status/717751277342490624
10:39 timotimo that's what i got the inspiration from, yeah
10:40 jnthn timotimo: Not until Unicode 9
10:40 timotimo OK
10:40 jnthn NFG is aligned with Annex 29, and the emoji stuff isn't in there until Unicode 9 :)
10:41 jnthn So, "this summer"
10:41 timotimo yay :)
10:43 ZoffixWin :o Looks like I found a fun Perl 6 project for this weekend: https://api.nasa.gov/
10:44 timotimo the url alone sounds exciting
10:44 ZoffixWin :)
10:44 timotimo The objective of this endpoint is to unlock the significant public investment in earth observation data.
10:46 timotimo Sound exists in space. Sometimes. And NASA has released a series of space sounds via sound cloud. We have abstracted away some of the hassle in accessing these sounds, so that developers can play with the audio files. For example, a useful application would be an automatic filter to identify human voices in these audio files. For now, that would help identify content. Later, however, when we retrieve sounds
10:46 timotimo from far-off planets, we can apply the filter to identify unknown human space colonies. That was a joke. Sort of.
10:46 timotimo :D :D :D
10:46 ZoffixWin :D
10:46 moritz nasa++
10:48 timotimo moritz: oh, do we happen to have public_html active on hack?
10:48 timotimo yes, we do!
10:48 timotimo yay!
10:51 moritz what a crazy happenstance!
10:53 timotimo http://hack.p6c.org/~timo/
10:54 dvinciguerra__ joined #perl6
10:55 kaare_ joined #perl6
10:55 masak moritz++ # such a serendipidous turn of events!
11:01 grondilu m: use Test; is-approx pi, 355/113;
11:01 camelia rakudo-moar 61d231: OUTPUT«Absolute tolerance must be a positive number greater than zero␤  in sub is-approx at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 251␤  in block <unit> at /tmp/FqjWUtPdRX line 1␤␤»
11:03 moritz wtf.
11:05 masak m: use Test; is-approx pi, 355/113, 1e-6
11:05 camelia rakudo-moar 61d231: OUTPUT«ok 1 - ␤»
11:05 masak when I read the Test.pm6 source, that looks to be what should happen implicitly
11:05 molaf joined #perl6
11:09 grondilu also where are we supposed to put the comments then?
11:10 moritz m: use Test; is-approx pi, 355/113, 1e-6, 'I know pi!'
11:10 camelia rakudo-moar 61d231: OUTPUT«ok 1 - I know pi!␤»
11:10 grondilu well ok that works
11:10 masak grondilu: you mean the test description? see the Test.pm6 source code, it's quite straightforward with two multis
11:10 masak but there is clearly something wrong that makes 1e-6 need to be passed
11:10 grondilu I don't know where Test.pm6 is and I'm too lazy to look for it :P
11:10 masak grondilu: rakudo/lib
11:11 grondilu ok I have no excuse now :/
11:11 timotimo (also there's an installed version on your system)
11:11 timotimo (so you may have to "make install" for changes to take effect)
11:14 grondilu I think the first multi should mark desc as Str
11:14 grondilu hang on.  Nope, my bad.
11:17 grondilu maybe the issue is with :$abs_tol = 0.  That default value automatically calls the error message, doesn't it?
11:17 moritz right
11:17 moritz and it makes it not very approximate :/
11:21 kid51 joined #perl6
11:31 sue joined #perl6
11:44 stmuk https://asciinema.org/ might be useful for some p6 demos
11:44 yoleaux 6 Apr 2016 22:49Z <ZoffixWin> stmuk: our current modules.perl6.org doesn't support GitLab, so your Task::Galaxy isn't indexed....
11:44 cgfbee joined #perl6
11:45 stmuk ZoffixWin: thanks! I'll have a look
11:45 timotimo are we still going to have the "lexically scoped 'idea' of what a character is"?
11:45 timotimo because the docs still refer to that
11:46 moritz I don't think so
11:46 mtj__ joined #perl6
11:46 timotimo should i kick the mention out?
11:46 moritz instead we put the Unicode level into the types
11:46 moritz timotimo: yes, please
11:46 mtj__ joined #perl6
11:48 dalek doc: f352c3a | timotimo++ | doc/Type/Cool.pod:
11:48 dalek doc: remove outdated warning about lack of NFG
11:48 dalek doc:
11:48 dalek doc: @JulesFM on twitter pointed this out. thanks!
11:48 dalek doc: review: https://github.com/perl6/doc/commit/f352c3a2d8
11:48 dalek doc: e612cd3 | timotimo++ | doc/Type/Str.pod:
11:48 dalek doc: "lexically scoped idea of what a character is" is no longer a thing
11:48 dalek doc: review: https://github.com/perl6/doc/commit/e612cd30c1
12:01 mr-foobar joined #perl6
12:06 Begi joined #perl6
12:06 gabiruh left #perl6
12:16 rindolf joined #perl6
12:22 tes091 joined #perl6
12:37 dalek perl6-most-wanted: 21ed1a2 | (Zoffix Znet)++ | most-wanted/modules.md:
12:37 dalek perl6-most-wanted: Toss Twitter WIP: added to ecosystem
12:37 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/21ed1a217a
12:37 zakharyas joined #perl6
12:47 [Tux] joined #perl6
12:52 stmuk ZoffixWin: so I assume modules.perl6.org needs to query github mostly to get the description field from the module's metafile?
12:53 maybekoo2 joined #perl6
12:55 sufrostico joined #perl6
13:02 stmuk ZoffixWin: wouldn't it be easier to use http://ecosystem-api.p6c.org/projects.json rather than adding a new ModulesPerl6::DbBuilder::Dist::Source::Foo for every new module hosting system?
13:05 moritz stmuk: it also asks for stuff like travis integration
13:06 stmuk actually isn't that the same as https://github.com/ugexe/Perl6-​ecosystems/blob/master/p6c.json
13:07 stmuk moritz: true and the number of stars but this are really github specific features likely to be absent or not map cleanly to gitlab, CPAN whatever
13:07 stmuk s/this/these
13:08 stmuk but they are still useful
13:10 sufrostico joined #perl6
13:12 TreyHarris joined #perl6
13:13 jameslenz joined #perl6
13:14 stmuk ZoffixWin: maybe ModulesPerl6::DbBuilder::Dist should query projects.json and the sub-classes any extra system dependent API stuff?
13:14 BrassLantern joined #perl6
13:14 BrassLantern joined #perl6
13:16 skids joined #perl6
13:28 grondilu I have a module that works fine until I try to install it with panda.  Panda does not complain but once installed, trying to say an instance gobbles up all memory.  https://github.com/grondilu/vec​tor/blob/master/lib/Vector.pm6
13:28 grondilu That's annoying since I have no idea how I could debug that.
13:29 stmuk http://hack.p6c.org:5001/author/JDV/
13:31 cdg joined #perl6
13:36 ZoffixW joined #perl6
13:39 ZoffixW stmuk, it's been many moons and many beers since I last looked at that codebase. If you see a better way to do thing, sure implement them. I kinda gave up on that code base when we decided there'll be MetaCPAN6/PAUSE6 stuff that'll replace the current system.
13:40 Begi "there'll be MetaCPAN6/PAUSE6 stuff that'll replace the current system."
13:40 Begi -> when ?
13:41 ZoffixW Begi, well, you can already upload P6 modules to PAUSE. jdv79++ and others done some preliminary works on converting MetaCPAN into a P6-friendly version. That was about 4 months ago and I haven't been following the project.
13:43 stmuk I think https://github.com/perl6mod​ules/perl6-module-uploader is ran occasionally which populates http://www.cpan.org/author​s/id/P/PS/PSIXDISTS/Perl6/
13:44 stmuk its a nice effort but I don't really see how the old CPAN could fit with the new
13:44 MadcapJake great another Perl 5 thing I gotta learn (CPAN)
13:45 stmuk ZoffixW: I suspect modules.perl6.org isn't likely to go away anytime soon
13:45 ZoffixW Yeah, the fact that two authors can have a module with exactly the same name complicates things.
13:46 ZoffixW stmuk, what is that suspicion based on? :)
13:47 MadcapJake So, will Meta::CPAN gain a perl 6 selector or will we just have to figure that out for ourselves? o_O
13:48 ZoffixW MadcapJake, it'll be a separate site. We'll just use their codebase as a starting point instead of starting entirely from scratch.
13:49 MadcapJake ahh phew, I'm glad, coexisting with Perl 5 stuff would just be information overload
13:49 stmuk ZoffixW: a gloomy nature
13:50 stmuk well the file mirroring aspect of CPAN is good
13:50 stmuk I suppose the crack fueled solution would be something like gittorrent
13:50 ZoffixW :o
13:52 MadcapJake I'm still interested in working out Perl 6 tooling for this: https://github.com/whyrusleeping/gx
13:52 wamba joined #perl6
13:54 jamesneko joined #perl6
13:55 jamesneko hi
13:55 gfldex m: say "ohai jamesneko!"
13:55 camelia rakudo-moar 61d231: OUTPUT«ohai jamesneko!␤»
13:55 jamesneko =D
13:56 stmuk MadcapJake: looks interesting too .. not sure how mature any of these are and don't see much sign of multiple implementations :(
13:56 sufrostico joined #perl6
13:58 jamesneko So, I have a question about IO::Handle.read
13:59 MadcapJake stmuk: yeah it's early alpha for sure, but still it's such a cool idea, no need for mirrors or any centralized resources!
14:00 jamesneko It dies with an error if you ask for too much data in one go. But I was kinda surprised at this, since the documentation doesn't mention that. I've since realised that okay, it must be wrapping C's read() call, and that's limited to SSIZE_MAX. But how do I find out what that is from Perl?
14:00 gfldex jamesneko: you don't. Please file a rakudobug.
14:01 jnthn What's the error?
14:01 jamesneko I mean, if I were doing C programming, then sure, I can't expect arbitrarily large buffers to be returned. I kind of figured Perl's read would do any amount of looping necessary and return a Buf the size I wanted.
14:02 jamesneko okay, sure, how do I file a bug for rakudo? Or perhaps it's a documentation bug?
14:02 jnthn jamesneko: It's a bug for sure; I was under the impression there was even code that makes such things work...
14:02 gfldex "Bugs can be submitted by sending an email to rakudobug@perl.org. For more information about bugs and bug reporting, see the bug tracker page." (from http://rakudo.org/how-to-help/)
14:03 jamesneko jnthn: Basically I found myself wanting a large block of random data; so naturally, I opened /dev/urandom and tried to read() 128MiB from it. But I'm limited to values < 100_000_000.
14:04 jamesneko The resulting error is "Out of range: attempted to read 100000000 bytes from filehandle
14:08 jamesneko ... is it normal to follow the links to the bugtracker (checking if the bug is already reported), only to be warned about possible CSRF?
14:09 jamesneko specifically, I went to http://rakudo.org/tickets/ then clicked "List of all new and open tickets" http://rakudo.org/rt/open-all
14:17 Actualeyes joined #perl6
14:17 skids Hrm, well usually I start at rt, so not usual for me :-)
14:17 tharkun joined #perl6
14:22 moritz jamesneko: yes, it's pretty normal; RT is too paranoid
14:22 jamesneko Thanks; just checking for similar reports now.
14:22 moritz GET requests should *never* be possible CSRF attacks
14:27 ptolemarch joined #perl6
14:29 mcsnolte joined #perl6
14:41 dogbert1 hello #perl6
14:41 yoleaux 4 Apr 2016 06:54Z <perlawhirl> dogbert1: my 'first :kv' patch has been merged
14:41 dogbert1 ah, perlawhirl++, many thanks
14:47 dogbert1 Stupid question, how do you confirm that a mail sent to rakudobug.perl.org actually goes into the system?
14:48 dogbert1 Tried to report the profiler bug a few days ago but can't find any trace of it
14:48 diakopter rakudobug@perl.org, right?
14:49 dogbert1 Have looked there but I did not find my report
14:49 kurahaupo joined #perl6
14:49 diakopter where did you look
14:49 breinbaas joined #perl6
14:49 dogbert1 https://rt.perl.org/Public/Search/Results.html?Q​uery=Queue=%27perl6%27%20AND%20Status=%27new%27
14:50 dogbert1 and yes, I meant rakudobug@perl.org :-)
14:50 diakopter worthless RT
14:50 MadcapJake what was your email's subject?
14:50 marcw joined #perl6
14:51 MadcapJake searching for profile/profiler brings up one ticket from 3 years ago
14:51 nine a perl5 ticket
14:51 diakopter the columns aren't searchable on the RT results? truly useless
14:51 dogbert1 Gah, don't remember exactly, am at $work, but the word profile was in it. The bug golf,[Coke]++ is perl6 --profile -e 'my @m[5]'
14:51 diakopter *sortable
14:52 nine diakopter: they are
14:52 diakopter not for me
14:52 nine diakopter: log in with your priviledged user instead of the extremely restricted anonymous
14:52 diakopter maybe you have to be logged in?
14:52 diakopter oh ffs
14:52 rindolf joined #perl6
14:53 ufobat what is wrong with my setup of travis, or why is panda here not building? https://travis-ci.org/ufobat/p6-t​ime-crontab/jobs/121441368#L1004
14:53 diakopter because anonymous people shouldn't be allowed to sort things
14:53 MadcapJake dogbert1: might want to check your sent emails when you get home
14:53 dogbert1 ok, will do
14:54 MadcapJake diakopter: RT is very restrictive
14:54 diakopter right, useless
14:54 nine diakopter: perlbug-admin at perl.org is the right address for those complains. RT doesn't even have defaults for anonymous users
14:54 nine It's all in how it's set up by the admin
14:54 diakopter I'm quite certain they couldn't care less
14:55 nine So what's the point of this bitching?
14:55 MadcapJake diakopter: it's quite easy to setup a bitcard account
14:55 moritz and it's still a total PITA, because RT doesn't redirect you to your old page after login
14:56 diakopter nine: same reason for all the other bitching; ditch RT and use something from this century
14:56 moritz so you have to open the log-in link in a new tab, and you are being redirected to the *logout* page, where  you can then chose to login
14:56 Upasaka joined #perl6
14:56 perlpilot diakopter: good luck with that.
14:56 MadcapJake moritz: true, but I usually don't logout
14:56 diakopter MadcapJake: no, bitcard is the worst ever
14:56 moritz and when you've done that, you have to close the tab, and reload the original tab
14:57 moritz MadcapJake: me neither, but I'm still logged out all the time
14:57 khw joined #perl6
14:57 MadcapJake diakopter: why? it's so easy.
14:57 nine diakopter: so we should switch tools because the one we use now is configured to your dislike? Could there be a weaker reason?
14:57 diakopter no, for all the hundreds of other reasons
14:57 MadcapJake moritz: strange, maybe you're browser wipes the session when you close it?
14:58 MadcapJake s/you're/your/
14:58 diakopter perlpilot: good luck with what? I wasn't volunteering
14:58 nine diakopter: are those hundreds of reasons listed somewhere? Sounds like too much to paste into the channel.
14:58 [Coke] Ulti: that glot website is a security hack waiting to happen.
14:58 diakopter nine: there have been untold hours spent debating this already on this channel and mailing lists over the last decade
14:59 diakopter nine: you can search the logs if you care at all, but I'm guessing you don't
14:59 perlpilot and none of that discussion has resulted in a change away from RT
14:59 diakopter (I wouldn't care either)
14:59 nine And no one bothered to at least collect these "hundreds" of reasons for review? But others are expected to do the real work of migrating?
14:59 MadcapJake diakopter: this has all been discussed on perl6/user-experience repo, the general consensus is (1) RT works fine and most complains are really just minor annoyances, (2) NO ONE wants to do the work of migrating, and (3) GitHub Issues aren't anything special (and I would argue that's still the case even with the recent upgrades)
15:00 diakopter MadcapJake: as I wrote here the other day, I read that thread, and we already talked about it
15:01 Juerd I really dislike RT and wouldn't mind doing migration work. The thing is, such a migration will always be lossy because you can't make people have accounts on both systems.
15:01 perlpilot Juerd: loss is a feature of the migration  ;)
15:01 Juerd (And of course, things like Github won't allow you to post on behalf of someone else)
15:01 diakopter who doesn't have a github account [besides nwc]?
15:02 perlpilot somewhere there is a script that will automatically migrate from RT to github.   It's all of the social implications that are the problem.
15:02 Juerd And I don't really understand why migration would be necessary. RT could be used for everything that's already in there, and something else for new issues.
15:02 diakopter Juerd: I completely agree with that
15:03 diakopter Juerd++
15:03 MadcapJake diakopter: I'm personally not in favor of tying Perl 6 issues to something that has no migration path OUT (or IN for that matter), what if GH decides to become a SourceForge down the road?
15:03 * perlpilot wanders off after realizing this discussion has happened before
15:03 nine The Parrot project successfully invested lots of time in moving from RT to GH issues. Obviously time well spent.
15:03 diakopter heh
15:03 MadcapJake ok, I guess IN is covered at least :P
15:04 Juerd MadcapJake: It's not as if we can be certain that rt.perl.org will stay with us forever.
15:04 MadcapJake Juerd: at least it's tied to Perl Foundation rather than some for-profit company
15:04 Juerd Tied?
15:04 domidumont joined #perl6
15:04 MadcapJake perl.org
15:04 diakopter somehow I think github, with probably 100,000x the users and activity levels of perl.org, will last longer.
15:04 MadcapJake diakopter: I'm guessing everyone said that about SF back in the day
15:05 Juerd RT's development is tied more to Best Practical, a for-profit company, than to TPF, and if development halts we're stuck anyway.
15:05 MadcapJake RT is written by BestPractical, not hosted by them
15:05 MadcapJake They can't change our version because TPF is running it, not BestPractical, we only upgrade if we want to
15:06 diakopter we?!
15:06 MadcapJake well, that's a really loose 'we'
15:06 Juerd "This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure."
15:06 diakopter yes, sponsored and maintained
15:06 MadcapJake Juerd: keyw words: "runs on"
15:07 Juerd Still we depend on BP for RT to continue to run well
15:07 MadcapJake Ok, so let's say that it's just as bad, why would moving to GH be *better*?
15:07 Juerd I don't mind that, by the way.
15:07 Juerd MadcapJake: I'm saying that as for depending on a single company, it's on par, not better or worse.
15:07 diakopter MadcapJake: do you know how many users Github has?
15:08 MadcapJake Juerd: that's fair
15:08 MadcapJake diakopter: that's really not what I'm talking about
15:08 diakopter why not?
15:08 MadcapJake diakopter: because I am discussing corporate ties not user base
15:09 MadcapJake If any migration path is done, it should be a move closer to in-house rather than the same level or worse (which I would say GH would be worse, in terms of tying to some for-profit)
15:09 diakopter wtf. there's no "in-house"
15:10 Juerd Unless we dogfood an issue tracker :)
15:10 diakopter perl.org is donated by other companies
15:10 MadcapJake diakopter: I'm speaking in terms of some hosting that we manage and maintain
15:10 diakopter the servers and admin time
15:10 nine The big difference is that with perl.org infrastructure we will always be able to at least get our data out. With GitHub we could be locked out any day. The most probable cause would be someone simply buying GH and changing business strategy.
15:10 Juerd nine: This is a matter of scraping and making backups, really.
15:10 MadcapJake nine++ # that's exactly what I've been trying to articulate
15:10 nine Code maintenance is completely orthogonal. And really, you don't need much maintenance to keep RT running over a couple of years of migration period.
15:11 MadcapJake Juerd: well make sure you right that scraper, then maybe the case could be made to switch :P oh and make sure you scrape it before you can't anymore, and make sure you update the scraper every time they change their frontend
15:11 MadcapJake s/right/write/ :P
15:11 Juerd MadcapJake: https://github.com/joeyh/github-backup
15:12 Juerd MadcapJake: First hit in google for 'github backup' :)
15:12 Juerd As for frontend... they apparently have an API
15:12 diakopter total idiocy. losing data to perl.org or RT is astronomically far more likely
15:12 Juerd I think both are quite unlikely.
15:13 MadcapJake Juerd: hosted on GH, and how is it implemented? does it gather issues (the only thing we need)
15:13 nine diakopter: throwing words like "idiocy" into a discussion usually helps your cause a lot
15:14 Juerd MadcapJake: I don't see the point in answering these questions if the decision has been made and you have made up your mind.
15:14 diakopter how else do I name-call something that truly is an argument from ignorance.
15:15 Juerd MadcapJake: I was just pointing out some flaws in the general consensus you summarized. It was not my intention to restart the entire discussion. That happened anyway, and I'll refrain from further participation because it's a waste of everyone's energy.
15:15 MadcapJake Juerd: I'm not trying to be rude, it's just, I don't really feel that a scraper is the best security
15:16 Juerd It's like the name "Perl 6". I disagree strongly, but making the decision isn't up to me. I don't like having the discussion over and over just because I happen to still disagree with decisions made.
15:16 MadcapJake Juerd: there was certainly more to it than that, I've just tried to boil it down to some major points (I feel I've posted that in here a few times and most of them with diakopter)
15:17 Juerd That's okay. I don't mind to just disagree and leave it at that :)
15:18 diakopter forget it, no one regularly reviews the bug reports anyway with any frequency (Coke and jnthn review them thoroughly every year or two)
15:19 kalio joined #perl6
15:19 diakopter probably tons are fixed already or other non-reproducible
15:19 diakopter *otherwise
15:19 diakopter or using obsolete syntax or semantics
15:20 diakopter most are low quality bug reports
15:20 Azry joined #perl6
15:20 MadcapJake diakopter: I think your tone is really quite obtuse and I would appreciate it if you consider your words more carefully.  This is a project done by volunteers and everyone's time is valuable.
15:20 labster joined #perl6
15:21 nine diakopter: Exactly. I'd consider going through the tickets we have and closing off the useless ones time much better spent than migrating to another tool. And it would help with some usability issues. And might even make a migration easier...
15:21 Juerd diakopter: The majority of bug reports are auto generated from failing tests :|
15:22 [Coke] I'm seeing a lot of not-quite-true facts going by. :)
15:22 diakopter miracle of miracles, I was able to log in to bitcard
15:23 nine Back to: Code ref name '' sf cuuid (1) sf name '' sf dep idx 1 sf sc idx 16 sf cu from '' does not exist in serialization context
15:23 [Coke] I don't think tons of tickets are fixed already. if there's code, it's probably been reproduced. Most of the "useless" tickets have been closed - the majority of RTs are not auto generated (there are a huge number of these which are indirectly my fault - but they are tied to roast, and while they're in roast, they need to be dealt with one way or another)
15:24 Juerd Then I misremembered that. But I recall going through pages and pages of autogenerated reports.
15:26 [Coke] yup. all stuff which needs to be dealt with because of the stuff in roast.
15:26 [Coke] If folks want to help out with bugs, I have a gist somewhere with concrete stuff that's doable, one sec.
15:27 Juerd Still, though... 914 "new" bugs and 394 "open" in a single queue with no organization other than some tags in subjects. It's tough to get an overview of the situation.
15:28 [Coke] https://gist.github.com/coke/ac078396e8f216b83e9a had some pointers, and could probably be updated with more stuff in a post-xmas world.
15:28 [Coke] Juerd: sure is. If anyone would like to carve out some tickets to work on, I'm happy to help them find some.
15:28 nine Juerd: I don't understand why we're using only a single queue anyway.
15:30 [Coke] just added "Open vs. New RTs" to that gist.
15:30 [Coke] nine: we're not, really.
15:30 [Coke] there's at least a half dozen queues on at least 2 different ticketing systems.
15:31 pmurias joined #perl6
15:32 nine [Coke]: well I only see the queues perl5, perl6 and spam in RT
15:34 diakopter m: multi sub angry () {}
15:34 camelia rakudo-moar 61d231: ( no output )
15:34 diakopter m: multi sub cross () {}
15:34 camelia rakudo-moar 61d231: OUTPUT«(signal SEGV)»
15:34 diakopter this is my favorite
15:35 nine lol
15:35 [Coke] what other RT queues would you like to see?
15:37 nine [Coke]: I don't know because I don't know what other queues there are :)
15:37 [Coke] and also, if we're talking about the queues from a developer perspective, we should probably be on p6dev, not #perl6
15:37 [Coke] nine: there are no other rt queues
15:37 nine [Coke]: but don't waste time on this. I've got plenty of work before I need to look at RT to find new things.
15:37 diakopter [Coke]: I think 71482 can be closed
15:38 [Coke] #71482
15:38 [Coke] RT #71482     rtbot?
15:38 [Coke] diakopter: why?
15:38 timotimo hm, systemctl thinks synopsebot is running, i wonder why it's not in here
15:38 diakopter b/c the error is better & different and in line with what they expected
15:39 timotimo must have reached a state in which it doesn't realize it's disconnected
15:39 synopsebot6 joined #perl6
15:39 timotimo RT #71482
15:39 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=71482
15:39 [Coke] m: A::B
15:39 camelia rakudo-moar 61d231: OUTPUT«Could not find symbol '&B'␤  in block <unit> at /tmp/ik0K8qsBkP line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ik0K8qsBkP line 1␤␤»
15:40 [Coke] the complaint from pawel at the end isn't addressed by that.
15:40 diakopter oh
15:41 [Coke] RT: 1308; LTA: 132; WEIRD: 14; PERF: 13; SEGV: 27
15:41 diakopter well 78188 definitely changed
15:43 [Coke] m: &infix:<Xxx>
15:43 camelia rakudo-moar 61d231: OUTPUT«WARNINGS for /tmp/hUohiONVeT:␤Useless use of &infix:<Xxx> in sink context (line 1)␤»
15:43 [Coke] m: &infix:<Xxx>.WHAT.say
15:43 camelia rakudo-moar 61d231: OUTPUT«(Block)␤»
15:43 diakopter 72830 seems fixed
15:43 [Coke] ok. what I would do as someone going through the bug reports is capture the new behavior, and report it as a comment, cc'ing the mailing list.
15:43 [Coke] I'm not going to update all these bugs with your feedback here.
15:43 [Coke] I am happy to make you a bug admin, though.
15:44 [Coke] if you're not sure if the new behavior fixes the issue, then just comment if it does, and needs tests, we note that.
15:44 [Coke] *"just comment. If it does"
15:45 diakopter I think I already was a bug admin
15:49 [Coke] ok.
15:51 mkz joined #perl6
15:51 diakopter I mean, how would I know
15:51 diakopter if there are 7 items in the Actions menu?
15:52 [Coke] if you go to https://rt.perl.org/Ticket/Display.html?id=72830 - do you have an actions menu in the upper right hand corner that has an option like "Reject" ?
15:52 diakopter yah
15:52 [Coke] yah, that's a good indicator, I think
15:52 [Coke] should also give you the rights to comment on tickets, etc.
15:52 dalek modules.perl6.org: d8ad2a6 | (Steve Mynott)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitLab.pm:
15:52 dalek modules.perl6.org: minimal GitLab support (displays time as start of epoch)
15:52 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/d8ad2a62a5
15:52 dalek modules.perl6.org: 06b2996 | (Steve Mynott)++ | lib/ModulesPerl6/DbBuilder/Dist/Source/GitLab.pm:
15:52 dalek modules.perl6.org: fix regexp
15:52 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/06b2996fa8
15:52 diakopter lizmat: I think this one is closeable [if you agree]: https://rt.perl.org/Ticket/Display.html?id=76294
15:53 [Coke] I'm happy to write up something on "how to do <x> in RT" if it's helpful to get more people commenting on and moving tickets along.
15:53 [Coke] m: "abcd".index("xyz") == 0
15:53 camelia rakudo-moar 61d231: OUTPUT«WARNINGS for /tmp/01UH1o3Lkx:␤Useless use of "==" in expression ".index(\"xyz\") == 0" in sink context (line 1)␤Use of Nil in numeric context  in block <unit> at /tmp/01UH1o3Lkx line 1␤»
15:53 [Coke] m: say "abcd".index("xyz") == 0
15:53 camelia rakudo-moar 61d231: OUTPUT«Use of Nil in numeric context  in block <unit> at /tmp/krRAwuUbbe line 1␤True␤»
15:54 diakopter [Coke]: I'd like to see your test program for https://rt.perl.org/Ticket/Display.html?id=77170 :)
15:54 stmuk ZoffixWin: that's a minimal fix to display gitlab urls on modules.perl6.org .. at least one known issue which is updated time is epoch start .. maybe the javascript is parsing undef as 0 somewhere
15:55 [Coke] diakopter: Tue Aug 17 21:46:38 2010 Will - "Here's a simple program..."
15:55 [Coke] m: sub recursion($a) { recursion($a) } ␤ recursion("see also");
15:56 camelia rakudo-moar 61d231: OUTPUT«Memory allocation failed; could not allocate 4194304 bytes␤»
15:56 diakopter [Coke]: I mean the one where you got some iteration
15:56 diakopter some counter
15:56 diakopter adding the counter made it eat memory *that* much more slowly? :)
16:00 siriu5b joined #perl6
16:00 hjst joined #perl6
16:03 Ulti is there an official Perl 6 project email address we could register the glot.io api key against?
16:06 ptolemarch joined #perl6
16:09 djbkd joined #perl6
16:09 stmuk ZoffixWin: date_updated integer NOT NULL,
16:12 ZoffixW joined #perl6
16:12 ZoffixW stmuk, date_updated comes out as 0, right?
16:12 [Coke] diakopter: added some sample code that I just rewrote, no clue where the old one went.
16:12 [Coke] Ulti: no.
16:13 nightfrog joined #perl6
16:13 [Coke] we looked into getting one for reporting security exploits, which stalled.
16:14 ZoffixW stmuk, probably can just fix it on this line. Set it to 'N/A' if it's zero instead of piping all values through strftime: https://github.com/perl6/modules.perl6.org/blob​/master/lib/ModulesPerl6/Controller/Root.pm#L28
16:14 Josh4all joined #perl6
16:15 ZoffixW $_->{date_updated} = $_->{date_updated} ? strftime "%Y-%m-%d", gmtime $_->{date_updated} : 'N/A';
16:15 ZoffixW (may need parentheses there)
16:15 stmuk 'N/A' isn't an int
16:15 Josh4all left #perl6
16:15 stmuk maybe it works in sqlite :)
16:16 ZoffixW stmuk, doesn't matter in this case. This is controller processing values fetched from DB and shoving them into the template.
16:16 stmuk ah yes
16:17 stmuk but it probably comes back from the DB as 1970...
16:18 ZoffixW Nah. It's epoch. And I believe it would be zero in this case.
16:19 stmuk actually you are right it's not even a daytime type but int of course
16:20 muraiki joined #perl6
16:20 dalek modules.perl6.org: b348b73 | (Steve Mynott)++ | lib/ModulesPerl6/Controller/Root.pm:
16:20 dalek modules.perl6.org: display start of epoch as N/A Zoffix++
16:20 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/b348b73ded
16:21 * ilmari prefers nighttime types ;)
16:21 stmuk oh your META.list.local you doc'd wasn't impl'd :P
16:21 ilmari that's a rather misleading place to break the line
16:22 ilmari it makes it look like 'N/A' can be an argument to strftime
16:22 diakopter [Coke]: now that 77644 is fixed on Moar, can we close it? :>
16:24 ZoffixW stmuk, hm? META.list.local should be implemented.
16:24 diakopter [Coke]: well, it's fixed in MoarVM master; hasn't bumped nqp/rakudo yet
16:25 stmuk ZoffixW: also you refer to a "web" directory which doesn't exist
16:25 stmuk and you used your own OO module :)
16:27 dalek modules.perl6.org: f6c1a36 | (Zoffix Znet)++ | README.md:
16:27 dalek modules.perl6.org: Clarify README
16:27 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/f6c1a36b9e
16:28 dalek modules.perl6.org: 3a8d0e1 | (Zoffix Znet)++ | README.md:
16:28 dalek modules.perl6.org: Fix path
16:28 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/3a8d0e12e5
16:28 ZoffixW Yeah, I kinda found Moo a bit repetitive, so I wrote that wrapper.
16:29 stmuk otherwise it was an order of magnitude better than most work perl 5
16:30 ZoffixW "otherwise"? :P Mew is my greatest achievement! :P
16:30 mst I keep meaning to write a blog post taking Mew apart to show how it works
16:30 mst since I harassed you until the code didn't annoy me too much
16:30 ZoffixW :D
16:30 stmuk surely the three letter m-- namespace is full now!
16:31 stmuk . o O ( perl6 beat p5-mop out of the door as well )
16:32 dalek perl6.org: d2ae9e2 | (Christopher Bottoms)++ | source/fun/index.html:
16:32 dalek perl6.org: Added link to -Ofun slides
16:32 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/d2ae9e2321
16:32 dalek perl6.org: 73ec905 | (Zoffix Znet)++ | source/fun/index.html:
16:32 dalek perl6.org: Merge pull request #46 from molecules/patch-1
16:32 dalek perl6.org:
16:32 dalek perl6.org: Added link to -Ofun slides
16:32 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/73ec9058f1
16:33 dalek perl6.org: 3927867 | (Zoffix Znet)++ | source/fun/index.html:
16:33 dalek perl6.org: Fix markup error
16:33 dalek perl6.org: review: https://github.com/perl6/p​erl6.org/commit/392786762f
16:33 diakopter was callwith deprecated?
16:34 timotimo i think it's called "samewith" now
16:34 timotimo m: samewith(1,2,3)
16:34 camelia rakudo-moar 61d231: OUTPUT«Cannot use samewith outside of a routine␤  in block <unit> at /tmp/Bd0uzoAL0r line 1␤␤»
16:34 timotimo m: nextwith(1,2,3)
16:34 camelia rakudo-moar 61d231: OUTPUT«nextwith is not in the dynamic scope of a dispatcher␤  in block <unit> at /tmp/TtCxAZvq6C line 1␤␤»
16:34 timotimo that's the other one
16:34 diakopter I don't see that on https://doc.perl6.org/type/Sub
16:35 diakopter (where it mentions callwith)
16:35 timotimo sounds like a ticket ought to be filed
16:35 brabo joined #perl6
16:35 diakopter well I was looking at #95970
16:35 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=95970
16:35 diakopter to see if it still means anything at all
16:35 spintronic left #perl6
16:42 spintronic joined #perl6
16:44 stmuk callwith is in http://doc.perl6.org/language/functions
16:48 dogbert2 joined #perl6
16:51 tharkun joined #perl6
16:52 diakopter m: say (^2**64).pick.fmt('%64b')
16:52 camelia rakudo-moar 61d231: OUTPUT« 100000000000000000000000000000000​110010100010000011100011101000␤»
16:52 diakopter m: say (^2**64).pick.fmt('%64b')
16:52 camelia rakudo-moar 61d231: OUTPUT«111100000000000000000000000000​0001000110110101110111110101111010␤»
16:52 diakopter m: say (^2**64).pick.fmt('%64b')
16:52 camelia rakudo-moar 61d231: OUTPUT«                                 1110100100100010101011001111111␤»
16:52 diakopter heh, drops leading zeroes
16:53 diakopter ... not to mention still exhibiting the same behavior as in #109586
16:53 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=109586
16:56 labster joined #perl6
16:57 RabidGravy isn't dropping the leading zeroes what it is supposed to do?
16:58 RabidGravy m: say (^2**64).pick.fmt('%064b')
16:58 camelia rakudo-moar 61d231: OUTPUT«000000000000000000000000000000​0001101110110101000011001011111110␤»
16:58 RabidGravy leading 0 in the quantifier if you don't want that
16:59 diakopter oh. yes. oops
17:00 domidumont joined #perl6
17:04 M-tadzik joined #perl6
17:10 stmuk ZoffixWin: shouldn't the modules cron have run by now?
17:14 firstdayonthejob joined #perl6
17:15 stmuk oh it has now
17:17 RabidGravy stmuk, btw the FreeBSD 8.4 compiler thingy is completely fixed now
17:19 stmuk RabidGravy: I was actually reminded by TomH who had noticed too!
17:20 RabidGravy yay
17:22 gabiruh joined #perl6
17:26 buharin joined #perl6
17:30 Ulti [Coke] ok I'll use my email for now, doubt it will be a problem
17:33 diakopter [Coke]: how do I rename a ticket
17:34 diakopter [Coke]: for instance, 115270 needs renamed to [JVM]
17:35 MadcapJake diakopter: under Basics
17:36 diakopter ah
17:42 RabidGravy there, Lumberjack::Application at play http://rabidgravy.com:8898/
17:43 [Coke] diakopter: what does "[JVM] for some code in Rakudo" mean?
17:43 [Coke] should that keep the [SEGV] as well?
17:44 [Coke] ah, the segv is gone. but the current title doesn't say anythign.
17:44 diakopter don't know what else to put
17:45 psch "Inconsistency across backends when piping code into the rakudo executable" or something?
17:45 psch i mean, that's what's happening vOv
17:46 psch although, seeing as moar is doing the right thing it's probably not a good title
17:47 pmurias__ joined #perl6
17:47 [Coke] I got something. no worries.
17:48 psch hm, apparently the piping doesn't even matter
17:48 cdg joined #perl6
17:48 psch i also get "False\nTrue\n" when i run it manually
17:48 leont joined #perl6
17:49 [Coke] diakopter++ # RT wrangling.
17:51 Actualeyes left #perl6
17:54 psch that really is a weird bug
17:55 diakopter m: say { 0 => 1, 1 => 0 }.max(:by(*.value))
17:55 camelia rakudo-moar 61d231: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at /tmp/tumHHcORyR line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/tumHHcORyR line 1␤␤»
17:55 diakopter from #115758
17:55 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=115758
17:55 diakopter masak: closeable?
17:56 diakopter m: say 1.0000000000000000000000000000001 # Rat fail?
17:56 camelia rakudo-moar 61d231: OUTPUT«1.00000000000000003641037050347531␤»
17:57 psch m: say 1.0000000000000000000000000000001.WHAT
17:57 camelia rakudo-moar 61d231: OUTPUT«(Rat)␤»
17:57 psch m: say 1.0000000000000000000000000000001.nude
17:57 camelia rakudo-moar 61d231: OUTPUT«(10000000000000000000000000000001 9999999999999999635896294965248)␤»
17:57 diakopter ooo
17:57 psch m: say Rat.nu.^type
17:57 camelia rakudo-moar 61d231: OUTPUT«Method 'nu' not found for invocant of class 'Rat'␤  in block <unit> at /tmp/h_fcFeWJyh line 1␤␤»
17:57 psch grml
17:57 psch m: say Rat.numerator.^type
17:57 camelia rakudo-moar 61d231: OUTPUT«Cannot look up attributes in a type object␤  in method numerator at /home/camelia/rakudo-m-inst-1/share​/perl6/runtime/CORE.setting.moarvm line 1␤  in block <unit> at /tmp/Gcg8Bcf6uC line 1␤␤»
17:58 psch m: say (1/3).numerator.^type
17:58 camelia rakudo-moar 61d231: OUTPUT«Method 'type' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at /tmp/WW_ex0WwjU line 1␤␤»
17:58 psch oh whatever /o\
17:58 psch m: say (1/3).numerator.WHAT
17:58 camelia rakudo-moar 61d231: OUTPUT«(Int)␤»
17:58 _nadim joined #perl6
17:58 diakopter the denominator is wrongish
17:58 psch m: my Int $x = 9999999999999999635896294965248; say ++$x
17:58 camelia rakudo-moar 61d231: OUTPUT«9999999999999999635896294965249␤»
17:58 psch we have a few tickets with numbers in that area being weird iirc
17:59 psch probably mostly related to Rat
17:59 diakopter updating #116423
17:59 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=116423
17:59 _nadim hi, is there a prepend operator for  Str or can one do something like $s [R.]= $to_prepend ?
17:59 psch _nadim: infix:<~> is the concatenation operator
17:59 psch _nadim: and using that in your R= should work
18:00 psch m: $_ = "foo"; $_ [R~]= "bar"; .say
18:00 camelia rakudo-moar 61d231: OUTPUT«barfoo␤»
18:00 _nadim m: my $s = 's' ;  ... damit you're faster!
18:00 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/W5hRXjfQi4␤Bogus postfix␤at /tmp/W5hRXjfQi4:1␤------> 3my $s = 's' ;  ... damit you're faster7⏏5!␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statemen…»
18:01 _nadim yes  I meant ~ I was being P5ish !
18:02 _nadim IMHO an operator should exist for that that is less fuzzy, prpending to strings is not uncommon
18:03 perlpilot _nadim: I know!  It should be =~   ;)
18:03 psch o.o
18:03 timotimo um, why not just R~=
18:03 timotimo [R~]=
18:03 perlpilot yeah, I think [R~]= is rightly huffman for the amount of use it gets.
18:05 average joined #perl6
18:05 average left #perl6
18:05 _nadim timotimo: R~= would be fine, right now that says "can't modify an immutable string.
18:05 psch [Coke]: i've added some information to #115270
18:05 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=115270
18:06 psch and i kinda think that'd warrant another rename... :|
18:06 addison joined #perl6
18:07 psch no clue where to start, hoelzro++ might have an idea
18:07 psch with fixing that bug, to be clear
18:08 timotimo m: my $foo = "world"; $foo [R~]= "hello "; say $foo
18:08 camelia rakudo-moar 61d231: OUTPUT«hello world␤»
18:08 hoelzro that's quite odd
18:08 timotimo _nadim: it needs to explicitly be bracketed, otherwise it ends up as R[~=], which expects the writable variable to be on the RHS rather than the LHS
18:08 hoelzro I'm wondering if we should start using [REPL] in RT as well
18:11 RabidGravy "pid 97392 (moar), uid 1002, was killed: out of swap space"
18:11 psch hoelzro: i am suspecting the JVM Binder, but that might just be because it's one of the few spots in the code base i at least somewhat have a handle on...
18:11 hoelzro that's probably where it is, knowing my luck =/
18:12 hoelzro I want to help with the JVM backend more, but my JVM-fu is super weak, and it takes *forever* to build
18:12 psch maybe there's a junc_or_fail missing somewhere... vOv
18:13 webmind joined #perl6
18:16 FROGGS joined #perl6
18:18 _nadim timotimo:++
18:18 Begi joined #perl6
18:19 kerframil joined #perl6
18:21 addison joined #perl6
18:21 diakopter [Coke]: will you look at 117683 ? I think the test is only failing on Mac OS X (if it still is) because it converts LF to NL
18:22 diakopter (so it's not a unicode problem; it just need a platform specific test to be utterly pedantic (or easier, remove the test)
18:30 awwaiid joined #perl6
18:30 bartolin joined #perl6
18:30 diakopter moritz: X::IO stuff are not restricted in safe mode
18:31 diakopter (and so they read filesystem stuff)
18:31 moritz diakopter: safe mode isn't really safe; it's just to stop from the most obvious vandalism
18:33 addison joined #perl6
18:35 cdg joined #perl6
18:37 ZoffixW joined #perl6
18:37 ZoffixW Is it possible to precompile a script?
18:37 timotimo yes, but it's iffy.
18:37 ZoffixW k
18:37 timotimo you pretend the script is a module, and then you load that module so that its "mainline" gets executed
18:38 timotimo it probably won't execute MAIN in that case
18:40 moritz uhm, the mainline is executed at compile time, no?
18:40 El_Che I was under the impression that script also got precompiled nowadays? Did I dream that?
18:41 moritz El_Che: there are some shims automatically generated to deal with versions etc.
18:41 moritz but precompiled? I don't think so
18:41 El_Che ok
18:42 ZoffixW say "bar"; INIT say "foo"; in mainline prints "foo" .. "bar"
18:42 ZoffixW That means it's not compile time, right?
18:42 ZoffixW not executed at compile time
18:43 timotimo INIT is run-time, yeah
18:43 timotimo BEGIN and CHECK are compile-time
18:44 ZoffixW Seems it *is* executed at compile time: http://fpaste.scsys.co.uk/509793
18:44 M-tadzik joined #perl6
18:45 moritz echo 'say 42' > Foo.pm6
18:45 moritz ./perl6 -I. -c -e 'use Foo;'
18:45 moritz 42
18:45 moritz Syntax OK
18:45 ZoffixW k
18:45 moritz so the mainline of the module is run at the compile time of the script
18:45 Juerd m: say BEGIN { now } - INIT { now }
18:45 camelia rakudo-moar 61d231: OUTPUT«-0.01279679␤»
18:46 awwaiid uhg. Why must I have a day $job instead of hacking on p6 repl all day?
18:46 [Coke] psch++ - when adding correspondance to tickets, please click the "cc perl6-..." checkbox so people outside of RT can see the comment.
18:47 [Coke] m: say "\c[LINE FEED (LF)]"
18:47 camelia rakudo-moar 61d231: OUTPUT«␤␤»
18:48 [Coke] m: say "\c[LINE FEED]"
18:48 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6hRUyyukOz␤Unrecognized character name LINE FEED␤at /tmp/6hRUyyukOz:1␤------> 3say "\c[LINE FEED7⏏5]"␤»
18:48 [Coke] ^^ still busted.
18:48 addison joined #perl6
18:50 [Coke] awwaiid: mmm. not having a day job would help us prepare our presentations, anyway. :)
18:51 psch [Coke]: oh.  i thought that's what "Reply" does, in contrast to "Comment".  i'll keep it in mind
18:52 [Coke] Reply: original requestor.
18:52 [Coke] Comment: just on the ticket.
18:52 [Coke] you have to check the box to send an email to the mailing list.
18:53 Juerd In practice you usually want both...
18:53 Juerd Like reply-to-all in mail clients
18:53 ZoffixW m: sub count {}; sub count {}; count
18:53 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H7QU0IaHPw␤Redeclaration of routine count␤at /tmp/H7QU0IaHPw:1␤------> 3sub count {}; sub count {}7⏏5; count␤    expecting any of:␤        horizontal whitespace␤»
18:54 ZoffixW The "... expecting any of whitespace" through me off there... is this an LTA error?
18:54 ZoffixW s/through/threw/;
18:55 M-matthew joined #perl6
18:55 M-Illandan joined #perl6
18:57 awwaiid [Coke]: indeed!
18:57 awwaiid I'm starting to observe that many programs from many paradigms can be translated almost line-by-line into p6
18:58 awwaiid (and if we get all of our Inline:: going all them more)
18:58 yurivish joined #perl6
18:59 psch m: sub count {}; sub count {}␤
18:59 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cb_eOVN3k5␤Redeclaration of routine count␤at /tmp/cb_eOVN3k5:2␤------> 3<BOL>7⏏5<EOL>␤»
18:59 psch ZoffixW: well, having the white removes the expectation
19:01 addison joined #perl6
19:01 ZoffixW psch, but there's nothing wrong with whitespace in that example. Your version simply avoids the case with the problematic error
19:02 psch ZoffixW: yeah, the highexpect is weird
19:02 [Coke] diakopter: you marked https://rt.perl.org/Ticket/Display.html?id=81974 as resolved - part of the resolution is making sure there are tests in roast to prevent the bug from regressing - if there aren't tests (or if you're not sure) please reopen and mark the ticket as testneeded (under custom fields .... it's already marked testneeded)
19:02 nienacko joined #perl6
19:03 jnthn iirc, it's just that we show highexpect on all X::Comp errors, but on those that aren't actually syntax errors it's not usually so useful
19:03 [Coke] (not sure if you marked it resolved, actually, but it is resolved atm)
19:04 diakopter [Coke]: well, the original complaint was kindof obviated by various spec and implementation changes, none of which were related to the initial investigation/resolution ideas
19:05 diakopter so there's not really a way it could "regress"
19:06 ZoffixW lizmat++ # grepping through commits for optimizations and see you doing stellar work :)
19:07 addison joined #perl6
19:12 AlexDaniel joined #perl6
19:12 pmurias joined #perl6
19:13 [Coke] diakopter: ok. adding a note to that point on the ticket is probably sufficient then.
19:15 AlexDaniel oh, and it looks like 2016.03 is now in debian unstable. domidumont++
19:15 diakopter o_O
19:15 ufobat joined #perl6
19:21 zakharyas joined #perl6
19:33 TimToady joined #perl6
19:43 addison left #perl6
19:51 chrisdotcode TimToady, hi Larry, thanks for perl <3
19:52 MadcapJake what exactly is meant by "precompiled"? You can still read and edit them, so how is that being compiled?
19:54 Skarsnik joined #perl6
19:59 psch MadcapJake: what do you mean?
20:00 spider-mario joined #perl6
20:00 MadcapJake well if I go into share/perl6/site/sources, I may have a hard time finding the file, but I can still edit them and it will affect any scripts that load the module.
20:01 AlexDaniel psch: well, the question is “where is the precompiled stuff? All I can see is just the source code”
20:01 psch MadcapJake: look in share/perl6/precomp instead
20:01 MadcapJake psch: so how come when I edit the files in sources, it still impacts the running of scripts?
20:01 psch MadcapJake: because it sees that the source file has a newer timestamp and re-precompiles
20:01 skids Timestamps get checked, recompilation happens.
20:02 labster joined #perl6
20:02 MadcapJake oh, well it certainly doesn't take long then, I haven't even noticed that it was precompiling after I edit the source files.
20:03 psch well, module size obviously impacts precomp time
20:03 psch bogomips too... :)
20:04 MadcapJake well it *seems* fast! :D
20:05 Skarsnik Hello
20:06 cdg joined #perl6
20:11 AlexDaniel m: my %h = ‘a’ => 42, ‘b’ => 69; say %h<a>++; say %h<a>++
20:11 camelia rakudo-moar 61d231: OUTPUT«42␤43␤»
20:11 AlexDaniel m: my $h = {‘a’ => 42, ‘b’ => 69}; say $h<a>++; say $h<a>++
20:11 camelia rakudo-moar 61d231: OUTPUT«42␤43␤»
20:28 yurivish joined #perl6
20:29 yurivish left #perl6
20:29 domidumont joined #perl6
20:33 MadcapJake made a little fish shell script for creating modules https://gist.github.com/MadcapJake​/486242e5ab0bcd25d9ea5859a8bfa4a6
20:36 stmuk hmmm there probably should be a FAQ entry "what is precompilation?"
20:37 MadcapJake stmuk++ # for precomp FAQ entry :)
20:38 hankache joined #perl6
20:38 gorgor joined #perl6
20:39 stmuk ++stmuk :P
20:39 MadcapJake lol
20:42 AlexDaniel MadcapJake: please quote your variables
20:43 AlexDaniel MadcapJake: e.g. 「mkdir $path/lib」 → 「mkdir -- "$path/lib"」
20:49 grondilu m: my %{Int};
20:49 camelia rakudo-moar 61d231: ( no output )
20:49 grondilu m: my %{Int}{Int};
20:49 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pMJG4e6SDJ␤Multiple shapes not yet understood␤at /tmp/pMJG4e6SDJ:1␤------> 3my %{Int}{Int}7⏏5;␤    expecting any of:␤        constraint␤»
20:49 grondilu ^that's disappointing.
20:50 AlexDaniel m: my %{Int;Int}
20:50 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SSVKMtIV4R␤coercive type declarations not yet implemented. Sorry. ␤at /tmp/SSVKMtIV4R:1␤------> 3my %{Int;Int}7⏏5<EOL>␤    expecting any of:␤        constraint␤»
20:50 psch m: say (%{Int}).perl
20:50 camelia rakudo-moar 61d231: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/y8SswkWGEG line 1␤␤»
20:50 psch m: say (my %{Int}).perl
20:50 camelia rakudo-moar 61d231: OUTPUT«(my Any %{Int} = )␤»
20:50 psch grondilu: you're creating an anonymous hash that takes Int as key
20:51 grondilu I know.
20:51 psch grondilu: i don't even know what %{Int}{Int} is supposed to mean in that context, fwiw :)
20:51 grondilu TimToady added that syntax some time ago.
20:51 MadcapJake AlexDaniel: fixing now, thanks!
20:51 psch a Hash of Hash that takes Int as key where the values are Hashes that take Int as key..?
20:51 grondilu I would have sweared the deep typing used to work.
20:52 grondilu psch: yes
20:52 grondilu I basically want a data structure indexed by two integers.  But I don't want an array for some reason.
20:53 grondilu one of the reason is that my keys will be very sparse.  Like there is data for 10 and data for 2**32 but nothing in between.
20:54 grondilu so I really want a hash.
20:55 MadcapJake what's the inner hash for?
20:55 MadcapJake regular hashy data? :)
20:55 AlexDaniel MadcapJake: here too: > "$path/META6.json"
20:55 grondilu same kind
20:57 MadcapJake grondilu: maybe more of a linked list then?
20:57 MadcapJake AlexDaniel: thanks
20:57 grondilu a linked list would be a hassle to modify.
20:57 grondilu but it would indeed be the most efficient.
20:59 grondilu Imagine an infinite 2D grid.  On each point of the grid, I can place an arbitrary number of stones.  I want a data structure to store any possible ways of putting a finite number of stones on the grid.
21:00 grondilu so the first key is the X position, the second is the Y position, and the value is the number of stones.
21:00 grondilu Basically I want a data structure for what physicists call a field.
21:01 grondilu (a discrete one, though)
21:01 AlexDaniel MadcapJake: in the example above I wrote 「mkdir -- "…"」, and ‘--’ is there for a reason. Not sure if you really want to get this script that right, but I'd mention it anyway. If you're passing some arbitrary variable (like a filename) as an argument to some command, then bad things can happen if this variable starts with a dash. That's why most commands support -- as in “okay, no more options are going to be passed after this, tr
21:01 AlexDaniel everything as plain strings”
21:01 AlexDaniel MadcapJake: a quick way to see that in action is 「x='-n'; echo "$x"」
21:03 AlexDaniel that is, 「git init -q -- "$path"」, 「touch -- "$path/lib/$name.pm6"」, etc
21:04 grondilu m: my Real %field{Real}{Real}{Real};
21:04 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FT7EeX1w9a␤Multiple shapes not yet understood␤at /tmp/FT7EeX1w9a:1␤------> 3my Real %field{Real}{Real}{Real}7⏏5;␤    expecting any of:␤        constraint␤»
21:05 grondilu I guess I could create a Point class with an appropriate WHICH method.
21:05 MadcapJake AlexDaniel: thanks! my shell-fu is minimal at best :)
21:06 grondilu but I would prefer using multiple shapes, frankly.
21:06 grondilu it's less verbose.
21:09 psch grondilu: ...patches welcome? ;)
21:09 MadcapJake grondilu: your subs may end up carrying some of that complexity that a Point class could hide (though it really depends on what you are planning on doing with the data)
21:09 psch grondilu: the error message seems to suggest what you want should work
21:09 psch grondilu: it just seems no one got around to make it work yet
21:10 AlexDaniel MadcapJake: if you are interested in improving your shell-fu, then this is one of the fastests ways that I know: http://mywiki.wooledge.org/BashPitfalls . Just go through the list one by one and that's it. Most of this stuff applies to other fancy shells like fish
21:10 psch i'm not sure what would make a field discrete, though
21:11 psch hmm, representing what wikipedia describes as a field does seem kinda hard-ish
21:11 AlexDaniel MadcapJake: in fact, shell-fu of fish developers is kinda weak too… At some point I heard about fish, went to their website and found some example with unquoted variables
21:11 AlexDaniel MadcapJake: so I joined their irc channel and was like “oh guys! Fish autoquotes everything? THAT'S AWESOME!!”
21:11 AlexDaniel MadcapJake: and then I just figured out that their examples are all wrong
21:12 AlexDaniel :(
21:13 MadcapJake fish shell does things a bit differently though; I've not had anything that hasn't just worked, TBH
21:13 TEttinger joined #perl6
21:15 grondilu m: my Real %f{List}; %f{4, 5} =pi; say %f{4, 5};
21:15 camelia rakudo-moar 61d231: OUTPUT«Type check failed in binding key; expected List but got Int (4)␤  in block <unit> at /tmp/sooTHiM8bT line 1␤␤»
21:16 grondilu m: my Real %f{List}; %f{(4, 5)} =pi; say %f{(4, 5)};
21:16 camelia rakudo-moar 61d231: OUTPUT«Type check failed in binding key; expected List but got Int (4)␤  in block <unit> at /tmp/7uGhJt7Zgm line 1␤␤»
21:16 psch m: my Hash[Int] %x; %x{5} = Hash[Int].new(5 => 5); say %x.perl
21:16 camelia rakudo-moar 61d231: OUTPUT«(my Hash[Int] % = "5" => (my Int % = "5" => 5))␤»
21:16 grondilu m: my Real %f{List}; %f{(4, 5).List} =pi; say %f{(4, 5).List};
21:16 camelia rakudo-moar 61d231: OUTPUT«Type check failed in binding key; expected List but got Int (4)␤  in block <unit> at /tmp/zwlXgNVbWl line 1␤␤»
21:16 psch hmm, kinda-sorta but not really
21:16 lostinfog joined #perl6
21:17 _28_ria joined #perl6
21:17 grondilu meh, I'll use a dedicated class with a WHICH method.
21:17 grondilu but that's LTA
21:18 * psch doesn't really get how WHICH plays a role there
21:18 psch but then i'm no physicist... :)
21:18 psch i do agree that an error that says "not yet understood" is LTA, in any case
21:18 jnthn m: my Real %f{List}; %f{$(4, 5)} = pi; say %f
21:18 camelia rakudo-moar 61d231: OUTPUT«{(4 5) => 3.14159265358979}␤»
21:18 MadcapJake WHICH is for identity checks, right?
21:18 psch MadcapJake: eqv, not =:=
21:18 psch err, no
21:18 psch the other way around
21:19 psch i think..
21:19 psch so, yeah, identity
21:19 jnthn You need to force the list to be an item to have it treated as a single key
21:19 jnthn Rather than a slice
21:20 AlexDaniel MadcapJake: actually, playing with it right now, I see some progress!
21:20 grondilu m: my Real %f{List}; %f{$(4, 5)} =pi; say %f{$(4, 5)};
21:20 camelia rakudo-moar 61d231: OUTPUT«(Real)␤»
21:20 jnthn Ah, and List is not a value type :)
21:20 sufrostico joined #perl6
21:20 jnthn So yeah, you'd need something that is
21:21 grondilu I feel we already had this conversation.  I was wondering why there is not a true 'Tuple' type, that is like a list but a value type.  I forgot the explanation you gave me.
21:22 jnthn Well, the history on it is that when we had Parcel *and* List, Parcel played that role
21:22 jnthn And nothing really took it up again after the GLR
21:22 jnthn The reason *Array* can't be is very clear though: it's mutable
21:23 AlexDaniel MadcapJake: their examples are still expecting that files do no start with dashes, so it's still wrong… but at least quoting issues are fixed by using some magic?
21:23 grondilu I agree Array can't play that role.  But the lack of a tuple seems LTA
21:23 AlexDaniel MadcapJake: so maybe your gist does not need all these quotes, I'm not sure now. Maybe I was wrong because my information is outdated
21:24 MadcapJake AlexDaniel: no idea :P but it did work before
21:24 jnthn Well, the name Tuple is still free... :) I'd not be against some solution for this, but I'm not surprised we didn't find time for it between the GLR landing and Christmas :)
21:25 grondilu between this and multiple shapes, I'd rather have multiple shapes though.
21:27 _nadim joined #perl6
21:27 grondilu with the WHICH solution, I have to make a key out of two integers.  Something like "$a;$b".  That's really ugly code.
21:28 ZoffixLappy joined #perl6
21:29 ZoffixLappy Anyone know a good example where using a native type gives a massive performance increase?
21:29 dvinciguerra__ joined #perl6
21:29 grondilu digests, maybe.
21:30 Juerd ZoffixLappy: Native packed arrays are the best, especially because they're memory efficient.
21:31 ZoffixLappy Hm. Both of those are over my head (and perhaps the audience I'm writing this for)... I guess I'll stick with my one-liner example that shows a 25% boost
21:31 psch m: my Int $x = 0; $x++ while $x < 2**16 - 1; say now - INIT now
21:31 camelia rakudo-moar 61d231: OUTPUT«0.0309969␤»
21:31 psch m: my int $x = 0; $x++ while $x < 2**16 - 1; say now - INIT now
21:31 camelia rakudo-moar 61d231: OUTPUT«0.0020999␤»
21:31 psch vOv
21:32 ZoffixLappy psch++ thanks
21:32 AlexDaniel is that the one that is faster than perl5?
21:32 jnthn ZoffixLappy: Did you see my blog post a week or two ago where I used them in the heap analyzer?
21:33 ZoffixLappy jnthn, I saw the title of the blog, but I didn't read it, because I assumed things like "heaps" are some tough stuff that I wouldn't understand :)
21:33 * ZoffixLappy looks at it again
21:34 geekosaur heap's just where "permanent" memory is allocated (as opposed to stack or thread local allocations)
21:34 jnthn ZoffixLappy: I tried to make it fairly accessible :)
21:35 ZoffixLappy Alright. I'll read it when I'm not at a bar, downing booze :)
21:35 geekosaur it can get deep but doesn't have to (and iirc the blog posts are themselves exploratory and learning from the top down)
21:35 geekosaur (or at least teaching from top down)
21:36 AlexDaniel MadcapJake: not sure what went wrong back then like 5+ years ago, but right now it works as it should, and it looks very promising. So I my remarks are wrong (except the one about --) for fish
21:36 AlexDaniel /I//
21:38 MadcapJake AlexDaniel: fish shell certainly has come a long way since then! It's still continually being worked on. If you're interested, there is the very nice http://fisherman.sh/ for managing plugins
21:38 AlexDaniel MadcapJake: how often do they break compatibility?
21:40 MadcapJake AlexDaniel: according to github releases, they've only had one release with backward-incompatible changes in the last 4 years
21:40 yqt joined #perl6
21:57 ZoffixLappy Damn. await and three promises: "Cannot invoke this object (REPR: Null)"
21:58 ZoffixLappy Code that generated it after 5 runs: https://gist.github.com/zoffixznet​/3af17815e34f63e45562c1173c2b5ad1
21:58 espadrine joined #perl6
21:58 raoulvdberge joined #perl6
22:00 jnthn ZoffixLappy: Ugh. Done about 15 runs of it here just now and didn't see that once...
22:01 * jnthn sticks it in a loop
22:01 ZoffixLappy I saw it thrice already in 45 runs.
22:02 ZoffixLappy I'm on a 2-core lappy on an ancient 32-bit linux install
22:02 ZoffixLappy Linux ZofLap 3.8.0-31-generic #46~precise1-Ubuntu SMP Wed Sep 11 17:49:16 UTC 2013 i686 i686 i386 GNU/Linux
22:03 ZoffixLappy In a loop of 50 iterations, it happened 4 times: https://gist.github.com/zoffixznet​/a6b3fe5476400dee0da94c6ec48483eb
22:03 Vitrifur joined #perl6
22:04 * jnthn tried in a Linux VM (which happens to have 2 cores allocated to it) and on Windows and no luck...
22:04 ZoffixLappy Oh wait
22:05 ZoffixLappy Ah no. I thought my Perl 6 was old, but it's rather recent: This is Rakudo version 2016.03-40-g81558b8 built on MoarVM version 2016.03-46-g50c7f6a
22:05 jnthn Yeah, I fixed a load of such things last year
22:06 jnthn My linux VM doesn't want to reproduce it still
22:06 jnthn It's 64-bit, mind
22:06 jnthn Can you add --ll-exception?
22:08 TEttinger joined #perl6
22:09 ZoffixLappy jnthn, here you go. I moved the `await` down below the `start`s and it crashes on await: https://gist.github.com/zoffixznet​/61db9966dd19cdc8a368503c06e3358f
22:09 psch not sure i'd call 3.8 "ancient" heh
22:09 psch my roommates laptop is on 3.2 because everything newer gets stuck during boot somewhere and she's too lazy to figure what or why
22:09 AlexDaniel nah, can't get that to crash on camelia
22:09 psch and, well, it's not my laptop so i don't care :P
22:11 jnthn ZoffixLappy: Interesting, that suggests one of the promises exploded
22:12 jnthn ZoffixLappy: Given I'm so failing to reproduce it, I'm wondering if the 32-bit is what's significant...
22:13 AlexDaniel I am pretty sure that I've seen that problem myself. But I didn't manage to golf it down to something simple so I didn't report it. I don't remember if it was 32-bit or 64-bit system though…
22:16 AlexDaniel ok, reproduced
22:16 jnthn AlexDaniel: On what platform?
22:17 AlexDaniel Linux Margo 4.4.0-1-amd64 #1 SMP Debian 4.4.2-3 (2016-02-21) x86_64 GNU/Linux
22:17 AlexDaniel This is Rakudo version 2015.12-344-gbc4c6df built on MoarVM version 2016.01-28-g2136293
22:17 jnthn Interesting, so it can happen on 64-bit
22:19 jnthn AlexDaniel: ooc, can you put a CATCH inside the start blocks and print the exception there?
22:20 AlexDaniel jnthn: actually, I am not sure about this one. I actually upgraded my setup from 32-bit to 64-bit so some things are actually mixed
22:22 AlexDaniel jnthn: nope, it does not fire
22:23 ZoffixLappy Doesn't seem to happen if I only fire off one Promise
22:23 ZoffixLappy (does happen with two)
22:23 ZoffixLappy m: say "test"; # wifi went down for a sec for me...
22:23 camelia rakudo-moar 61d231: OUTPUT«test␤»
22:24 AlexDaniel can't reproduce if I change sleep 1 to something lower than 1… huh?
22:26 jnthn Odd...
22:27 jnthn Anyway, my beer has run out, and I need to sleep. Back tomorrow... o/
22:28 ZoffixLappy night
22:28 psch \o
22:46 kid51 joined #perl6
22:47 kurahaupo_ joined #perl6
22:47 wamba joined #perl6
22:48 Sgeo joined #perl6
22:51 Xliff_ m: my($index, $newIndex) = (0, 0); say $index
22:51 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Zvvz2Rv5k2␤Variable '$index' is not declared. Did you mean any of these?␤    &index␤    &rindex␤␤at /tmp/Zvvz2Rv5k2:1␤------> 3my(7⏏5$index, $newIndex) = (0, 0); say $index␤»
22:51 Xliff_ m: my $index, $newIndex = (0, 0); say $index
22:51 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KfBJINzzit␤Variable '$newIndex' is not declared␤at /tmp/KfBJINzzit:1␤------> 3my $index, 7⏏5$newIndex = (0, 0); say $index␤»
22:51 Xliff_ m: my [$index, $newIndex] = (0, 0); say $index
22:51 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/e5EmtcEJ4V␤Malformed my␤at /tmp/e5EmtcEJ4V:1␤------> 3my7⏏5 [$index, $newIndex] = (0, 0); say $inde␤»
22:52 Xliff_ m: my $index && my $newIndex; ($index, $newIndex) = (0, 0); say $index
22:52 camelia rakudo-moar 61d231: OUTPUT«0␤»
22:52 Xliff_ Really? P6 has lost the ability to scope multiple variables at once?
22:55 ZoffixLappy m: my ($index, $newIndex) = (0, 0); say $index
22:55 camelia rakudo-moar 61d231: OUTPUT«0␤»
22:55 ZoffixLappy Seems like an LTA error there.
22:56 Xliff_ m: my ($index, $newIndex) = (0, 0); say $index
22:56 camelia rakudo-moar 61d231: OUTPUT«0␤»
22:56 Xliff_ Hum. Need a space between "my" and "("
22:57 ZoffixLappy Yup.
22:57 ZoffixLappy m: sub term:<my($index> { say "Look, ma! No space!"}; my($index
22:57 camelia rakudo-moar 61d231: OUTPUT«Look, ma! No space!␤»
22:58 cpage_ joined #perl6
23:00 jack_rabbit pff
23:00 dalek DBIish: f76f0b6 | (Salvador Ortiz)++ | / (5 files):
23:00 dalek DBIish: Move standard SQL type defs to DBIish:Common
23:00 dalek DBIish: review: https://github.com/perl6/DBIish/commit/f76f0b623d
23:00 dalek DBIish: 97cf7db | (Salvador Ortiz)++ | lib/DB (4 files):
23:00 dalek DBIish: ErrorHandling and defaults passing cleanup
23:00 dalek DBIish: review: https://github.com/perl6/DBIish/commit/97cf7db8a8
23:00 dalek DBIish: aaa1851 | (Salvador Ortiz)++ | lib/DBDish/Oracle (2 files):
23:00 dalek DBIish: Oracle: Get metadata at prepare time
23:00 dalek DBIish:
23:00 dalek DBIish: Get ready for 'DataSet' interface + minor ErrorHandling cleanup
23:00 dalek DBIish: review: https://github.com/perl6/DBIish/commit/aaa185177e
23:00 dalek DBIish: 9bc4191 | (Salvador Ortiz)++ | / (8 files):
23:00 dalek DBIish: Attempt native library version detection.
23:00 dalek DBIish:
23:00 dalek DBIish: Added to mysql and Pg for testing + minor cleanups.
23:00 dalek DBIish: Will be extended but now closes #60.
23:00 dalek DBIish: review: https://github.com/perl6/DBIish/commit/9bc4191e64
23:00 dalek DBIish: 1baccc4 | (Salvador Ortiz)++ | / (4 files):
23:00 dalek DBIish: For panda's users, now v0.5.5
23:00 dalek DBIish:
23:00 dalek DBIish: Minor cleanup in SQLite and add version to TestMock
23:00 dalek DBIish: review: https://github.com/perl6/DBIish/commit/1baccc440d
23:01 sue joined #perl6
23:01 ZoffixLappy m: sub term:<¯\_(ツ)_/¯> { say "Hey, not my fault" }; ¯\_(ツ)_/¯
23:01 camelia rakudo-moar 61d231: OUTPUT«Hey, not my fault␤»
23:05 AlexDaniel m: my$test = 42; say $test # you don't need any spaces!!!
23:05 camelia rakudo-moar 61d231: OUTPUT«42␤»
23:06 AlexDaniel :D
23:06 ZoffixLappy :o
23:07 AlexDaniel okay I'll submit a ticket about this LTA error
23:09 Xliff_ ZoffixLappy, That's evil.
23:09 Xliff_ OK. I have been looking on the Google and still can't find a way to alias a variable.
23:10 sortiz Skarsnik, hi, see https://github.com/perl6/DBIish/blob/​master/lib/DBDish/mysql/Native.pm6#L7 , comments?
23:11 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab = $w ? $a : $b; $ab = 0; } mySub(1); say "$a $b";
23:11 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1NHfqDYx7y␤Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !!␤at /tmp/1NHfqDYx7y:1␤------> 3$b = "bb"; sub mySub($w) { my $ab = $w ?7⏏5 $a : $b; $ab = 0; …»
23:11 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab = $w ?? $a || $b; $ab = 0; } mySub(1); say "$a $b";
23:11 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lbdTjFx5zc␤Confused: Found ?? but no !!␤at /tmp/lbdTjFx5zc:1␤------> 3 sub mySub($w) { my $ab = $w ?? $a || $b7⏏5; $ab = 0; } mySub(1); say "$a $b";␤»
23:12 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab = $w ?? $a !! $b; $ab = 0; } mySub(1); say "$a $b";
23:12 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1YtQljG_gB␤Strange text after block (missing semicolon or comma?)␤at /tmp/1YtQljG_gB:1␤------> 3w) { my $ab = $w ?? $a !! $b; $ab = 0; }7⏏5 mySub(1); say "$a $b";␤    expecting any of:␤        i…»
23:12 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab = $w ?? $a !! $b; $ab = 0; }; mySub(1); say "$a $b";
23:12 camelia rakudo-moar 61d231: OUTPUT«aa bb␤»
23:13 Xliff_ Second "bb" should be "0"
23:13 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab = $w ?? \$a !! \$b; $ab = 0; }; mySub(1); say "$a $b";
23:13 camelia rakudo-moar 61d231: 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 var…»
23:13 Xliff_ Oooo
23:13 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab ::= $w ?? \$a !! \$b; $ab = 0; }; mySub(1); say "$a $b";
23:13 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5===␤"::=" not yet implemented. Sorry. ␤at /tmp/H8r40ywNun:1␤------> 3 mySub($w) { my $ab ::= $w ?? \$a !! \$b7⏏5; $ab = 0; }; mySub(1); say "$a $b";␤Other potential difficulties:␤    To pass an array, hash or sub to a functio…»
23:13 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab ::= $w ?? $a !! $b; $ab = 0; }; mySub(1); say "$a $b";
23:13 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/no_bBxpNRF␤"::=" not yet implemented. Sorry. ␤at /tmp/no_bBxpNRF:1␤------> 3ub mySub($w) { my $ab ::= $w ?? $a !! $b7⏏5; $ab = 0; }; mySub(1); say "$a $b";␤»
23:14 AlexDaniel Xliff_: you are not changi $a or $b, so why should it change?
23:14 AlexDaniel changing*
23:14 Xliff_ (⋋▂⋌)
23:15 Xliff_ AlexDaniel, this is a simplified example.
23:15 Xliff_ I want to change $a or $b depending on the argument passed to mySub()
23:16 ZoffixLappy m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab := $w ?? $a !! $b; $ab = 0; }; mySub(1); say "$a $b";
23:16 camelia rakudo-moar 61d231: OUTPUT«0 bb␤»
23:16 AlexDaniel m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab := $w ?? $a !! $b; $ab = 0; }; mySub(1); say "$a $b"
23:16 camelia rakudo-moar 61d231: OUTPUT«0 bb␤»
23:16 AlexDaniel m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab := $w ?? $a !! $b; $ab = 0; }; mySub(0); say "$a $b"
23:16 camelia rakudo-moar 61d231: OUTPUT«aa 0␤»
23:17 Xliff_ m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab := $w ?? $a !! $b; $ab = 0; }; mySub(0); say "$a $b";
23:17 camelia rakudo-moar 61d231: OUTPUT«aa 0␤»
23:17 ZoffixLappy m: my $a = "aa"; my $b = "bb"; multi mySub(1) { $a = 0 }; multi mySub($) { $b = 0 }; mySub(1); say "$a $b";
23:17 camelia rakudo-moar 61d231: OUTPUT«0 bb␤»
23:17 Xliff_ Trinary operator logic has been reversed,too.
23:18 AlexDaniel huh?
23:18 ZoffixLappy Ternary is the same as in Perl 5, if that's what you're referring to.
23:18 Skarsnik sortiz, does that return a sub?
23:18 Xliff_ logic ?? trueVal !! falseVal
23:18 Skarsnik sortiz, otherwise it will get evalued at compile time once
23:18 ZoffixLappy Same as in P5 and JS. What's it been reversed from?
23:18 AlexDaniel Xliff_: so 1 is trueval, so it should change $a
23:19 AlexDaniel m: my $a = "aa"; my $b = "bb"; sub mySub($w) { my $ab := $w ?? $a !! $b; $ab = 0; }; mySub(1); say "$a $b"
23:19 camelia rakudo-moar 61d231: OUTPUT«0 bb␤»
23:19 AlexDaniel yeah, works
23:19 Xliff_ *sigh*
23:19 Xliff_ Brainfard.
23:19 Xliff_ I just turned 45.
23:19 ZoffixLappy :)
23:19 Xliff_ I can tell. I can't even spell "Brainfart" properly.
23:20 Xliff_ Thanks.
23:20 AlexDaniel Xliff_: I do that sometimes when I switch from writing some shell scripts…
23:20 geekosaur 45? still a kid. :p
23:20 sufrostico joined #perl6
23:25 cpage_ joined #perl6
23:27 sortiz Skarsnik, yep. That is why I called it '.at-runtime' ;-)
23:30 AlexDaniel Xliff_: https://rt.perl.org/Ticket/Display.html?id=127856
23:30 AlexDaniel Xliff_: thanks for bringing it here
23:30 Skarsnik sortiz, and if you don't want to export all NC, you can do use NativeCall :TEST to have g_l_n
23:32 sortiz Yep, but that way our customer don't need to 'use NativeCall' again.
23:36 sortiz Skarsnik, once well tested I'll try to push NativeLibs (or part of it) to core.
23:38 Skarsnik I wish it was pushed https://github.com/rakudo/rakudo/pull/716 x) so it's easier to add custome handler
23:42 Xliff_ AlexDaniel: No problem. As always! Thanks for the help.
23:44 Xliff_ Humm....
23:44 Xliff_ Seems there should be a shorter way to do $a = $a ~ $b.
23:44 Xliff_ $a ~= $b?
23:45 * Xliff_ checks operators.
23:45 AlexDaniel Xliff_: any infix op has …= form
23:45 AlexDaniel Xliff_: even your custom ops
23:46 Xliff_ m: $a = "aa"; $b = "bb"; $a ~= $b; say $a;
23:46 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TL2PedQgup␤Variable '$a' is not declared␤at /tmp/TL2PedQgup:1␤------> 3<BOL>7⏏5$a = "aa"; $b = "bb"; $a ~= $b; say $a;␤»
23:46 AlexDaniel my
23:46 Xliff_ my $a = "aa"; my $b = "bb"; $a ~= $b; say $a;
23:46 Xliff_ M: my $a = "aa"; my $b = "bb"; $a ~= $b; say $a;
23:46 camelia rakudo-MOAR 273e89: OUTPUT«aabb␤»
23:47 AlexDaniel m: sub infix:<what>($a, $b) { $a + $b }; my $x = 42; $x = $x what 69; say $x
23:47 camelia rakudo-moar 61d231: OUTPUT«111␤»
23:47 AlexDaniel m: sub infix:<what>($a, $b) { $a + $b }; my $x = 42; $x what= 69; say $x
23:47 camelia rakudo-moar 61d231: OUTPUT«111␤»
23:47 Xliff_ I confused "m:" with the first "my" ... I am having a great time tonight!!
23:47 Xliff_ I should get beer so at least I have an excuse! :P
23:47 Xliff_ AlexDaniel: I see.
23:48 Xliff_ m: my $a = 1; my $b = 2; say $a eqv= $b
23:48 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FdF0a9N45b␤Cannot make assignment out of eqv because chaining operators are too diffy␤at /tmp/FdF0a9N45b:1␤------> 3my $a = 1; my $b = 2; say $a eqv=7⏏5 $b␤»
23:48 Xliff_ LOL
23:48 Xliff_ So not any infix....
23:49 AlexDaniel Xliff_: http://design.perl6.org/S99.html#diffy
23:51 AlexDaniel Xliff_: also note that . (as in a method call) can also be used as an infix op
23:51 AlexDaniel m: my $x = 41.9; $x = $x.round; say $x
23:51 camelia rakudo-moar 61d231: OUTPUT«42␤»
23:51 AlexDaniel which means that we can have some spaces in there
23:51 AlexDaniel m: my $x = 41.9; $x = $x  .  round; say $x
23:51 camelia rakudo-moar 61d231: OUTPUT«42␤»
23:52 AlexDaniel and it also means that we can use .=
23:52 AlexDaniel m: my $x = 41.9; $x .= round; say $x
23:52 camelia rakudo-moar 61d231: OUTPUT«42␤»
23:53 AlexDaniel though I have no idea how it works underneath… “magic”, I guess. But at least it feels consistent
23:55 Xliff_ Heh!
23:55 Xliff_ Is there any way I can form a substitute regexp without having to quote angle brackets?
23:55 Xliff_ Ack! Dumb question. nevermind.
23:55 Xliff_ (Really should get that beer, now)
23:56 Juerd AlexDaniel: Magic? Fiddly, at least:
23:56 Juerd m: "new" R. Str
23:56 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8qCG9YoI7i␤Cannot reverse the args of . because dotty infix operators are too fiddly␤at /tmp/8qCG9YoI7i:1␤------> 3"new" R.7⏏5 Str␤»
23:57 AlexDaniel m: new R. Str
23:57 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Mm1qUiuH8P␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax␤at /tmp/Mm1qUiuH8P:1␤------> 3new R7⏏5. Str␤»
23:57 AlexDaniel C++ what?
23:57 Juerd AlexDaniel: It's recognizing "new R" before anything else
23:58 Juerd That's C++-style object construction
23:58 AlexDaniel .oO( Unsupported use of Pyth constructor syntax; … )
23:58 Juerd Just like how for (a;b;c) is called "C-style for"
23:59 Juerd In fact,
23:59 Juerd m: for (;;) { }
23:59 camelia rakudo-moar 61d231: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0Lece54waq␤Unsupported use of C-style "for (;;)" loop; in Perl 6 please use "loop (;;)"␤at /tmp/0Lece54waq:1␤------> 3for 7⏏5(;;) { }␤»
23:59 Juerd Good night!

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

Perl 6 | Reference Documentation | Rakudo