»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
IOninja People don't read these days :P 00:00
timotimo some people don't read days at all!
samcv only on days that end in days though
*day
naxieAlDle ah ok, .lines was broken 00:01
timotimo when did it get fixed?
can you bisect something that uses "run"?
samcv timotimo, nice on the error change timotimo++
IOninja no
Todd *day ??? oh no! More C code! :-)
IOninja restricted
timotimo was very easy
naxieAlDle timotimo: not yet, but it has stdin 00:02
is stdin broken as well or just Proc?
or, can somebody give me the snippet so that I can put it into unrestricted bisectable?
.oO(can I just use the code above?)
IOninja naxieAlDle: "/tmp/foo".IO.spurt: "a\nb\nc"; my $p = run :out, "cat", "/tmp/foo"; say $p.out.lines 00:04
naxieAlDle IOninja: Output on both points: «(a b c)»
Todd I update my clipboard module and tester over at vpaste.net/vprdG
00:04 risou is now known as risou_awy
IOninja naxieAlDle: "/tmp/foo".IO.spurt: "a\nb\nc\nd"; my $p = run :out, "cat", "/tmp/foo"; say $p.out.lines 00:05
naxieAlDle: what about that one ^ with even number of lines?
naxieAlDle: are you using 2016.11 as old?
naxieAlDle IOninja: ¦6c (16 commits): «(a b c)»
samcv nice Todd i like 00:07
naxieAlDle IOninja: or ¦6c (16 commits): «(a b c d)» 00:08
IOninja weird 00:09
naxieAlDle: OSX vs Linux?
timotimo the congressedits and bankedits accounts on twitter are kind of fascinating
naxieAlDle IOninja: Linux
IOninja Todd: what OS are you using? What's the full code that had the "object with REPR MVMOSHandle" error? 00:10
Todd I just finished up a program that will let me mouse over a series of invoice numbers in a column on a Libre Office spreadsheet and Ctrl-v paste them into a search field in Lotus Approach (wine-staging). Wine does not read the mouse over clipboard. This will save me acres of time balancing my books 00:11
IO, it is fixed now. The full code can be seen at vpaste.net/vprdG 00:12
naxieAlDle 6c: $++ for $*PROGRAM.IO.lines.batch(30) 00:13
committable6 naxieAlDle, gist.github.com/d9f79759a678782757...33112f3f81
00:13 perlawhirl joined
naxieAlDle commit: e0201f1 $++ for $*PROGRAM.IO.lines.batch(30) 00:13
committable6 naxieAlDle, ¦e0201f1: «readline requires an object with REPR MVMOSHandle␤ in block <unit> at /tmp/69aBmr7iY5 line 1␤ «exit code = 1»»
naxieAlDle bisect: old=e0201f1 $++ for $*PROGRAM.IO.lines.batch(30)
bisectable6 naxieAlDle, Bisecting by exit code (old=e0201f1 new=1754dc5). Old exit code: 1
naxieAlDle, bisect log: gist.github.com/8fc20357a2e59ece85...1ecfaf3c0d
naxieAlDle, (2017-01-27) github.com/rakudo/rakudo/commit/ed...8789cbded8
naxieAlDle IOninja: this?
IOninja commit: e0201f1 say $*PERL.compiler.version 00:14
committable6 IOninja, ¦e0201f1: «v2017.01.16.ge.0201.f.1»
IOninja commit: e0201f1~1 say $*PERL.compiler.version
committable6 IOninja, ¦e0201f1~1: «v2017.01.15.g.8.a.448.d.4»
IOninja commit: 2016.11 $++ for $*PROGRAM.IO.lines.batch(30)
committable6 IOninja, ¦2016.11: «No such method 'batch' for invocant of type 'Seq'␤ in block <unit> at /tmp/0zxS0akZPy line 1␤ «exit code = 1»»
IOninja naxieAlDle: no
naxieAlDle: I'd ask Todd for a test case, but it's a bit hard to communicate with them :/
naxieAlDle bisect: old=2016.12 new=HEAD $++ for '/home/bisectable/.bash_history'.IO.lines.rotor(30, :partial) 00:15
bisectable6 naxieAlDle, On both starting points (old=2016.12 new=1754dc5) the exit code is 0 and the output is identical as well
naxieAlDle, Output on both points: «»
naxieAlDle bisect: old=4a295dc5 $++ for '/home/bisectable/.bash_history'.IO.lines.rotor(30, :partial) 00:16
bisectable6 naxieAlDle, Bisecting by exit code (old=4a295dc new=1754dc5). Old exit code: 1
IOninja naxieAlDle: Todd's version is 2016.11 tho
bisectable6 naxieAlDle, bisect log: gist.github.com/fec92f7b9b24bf06df...2fad21c13a
naxieAlDle, (2017-01-27) github.com/rakudo/rakudo/commit/ed...8789cbded8
IOninja The rotor bug wasn't there yet
naxieAlDle meh that's the same one
Todd what would you like me to test?
IOninja Todd: we'd like a small example that still has the "object with REPR MVMOSHandle" error
naxieAlDle Todd: we are trying to find when we fixed the bug that you've just encountered
IOninja Todd: disregard. I managed to repro it. 00:17
naxieAlDle \o/ 00:18
IOninja: on HEAD?
IOninja ... I think... I managed... 00:19
Yes.
naxieAlDle: on 2017.02-189-g5b7b7fb
Todd in progress 00:20
00:21 wamba1 left
IOninja Todd: I got it already 00:21
And figured out what the bug is about too :)
my $l = .out.lines -> a lazy Seq; proc.close <-- closed handle; say $l <--- trying to reify the seq by reading on closed handle 00:22
naxieAlDle ah
Todd okay.
IOninja well, not 100% a bug, I guess :) but it'll make my IO work notes. 00:24
naxieAlDle so again, why not .out.lines ? 00:26
:P
just read them all before you close
Todd update: that run method you guys had me use does not require that my Xfce launcher run it from a terminal. Yippee! My Perl 5 one for doing something like that is going to be rewriten in Perl 6, but first I have to modify some lotus script first. I never ends. Lotus script is weird for the sake of being weird. 00:29
00:30 BenGoldberg joined
geekosaur isn't that just their dialect of VBA, more or less? 00:36
00:37 Ven left, bjz left
Geth modules.perl6.org/tag-fixes: 424adb1157 | (Zoffix Znet)++ | 2 files
Ensure we remove any unused tags from DB
00:39
00:40 Ven joined
geekosaur (this does not disprove "weird for the sake of being weird", it just pushes it elsewhere) 00:41
00:41 kalkin- joined
SmokeMachine IOninja: where is that table with all methods? 00:44
IOninja SmokeMachine: map.perl6.party 00:46
SmokeMachine IOninja: thanks!
naxieAlDle huggable: methods :is: map.perl6.party/
huggable naxieAlDle, Added methods as map.perl6.party/
00:49 Actualeyes joined
lichtkind thanks again wonderful people 00:53
maybe i fix the test for Math::matrix
a module which i partly author
00:56 Cabanossi left
samcv IOninja, is there a web directory of all the special perl6 sites 00:56
00:57 Cabanossi joined
IOninja samcv: none that I'm aware of. 00:59
perl6.vip perl6.fail perl6.party perl6.wtf (and getperl6.com) are ones I own 01:00
Geth whateverable: 5ae5c3dae9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t
Test helpful message when no revision is specified

Added a test for issue #85
01:04
whateverable: 69a71260ff | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t
Make sure committable does not crash

Added a test for issue #65
BenGoldberg .tell Todd Might I suggest: sub XOpenDisplay(Str $display_name --> Pointer) is native('X11'); sub XFetchBytes(Pointer $display, int nbytes_return is rw --> Blob) is native('X11'); sub XFree(Blob) is native('X11'); my $d = XOpenDisplay(":0"); my int $len = 0; my Blob $b = XFetchBytes( $d, $len ); my Str $str = $b.subbuf( 0, $len ).decode; XFree( $b ); # now use $str. 01:05
yoleaux BenGoldberg: I'll pass your message to Todd.
samcv IOninja, atom 1.16beta: Add the "dalek" package to let people know when they have built-in packages installed in ~/.atom/packages that are overshadowing core packages. 01:08
Geth modules.perl6.org/tag-fixes: d03a0180c1 | (Zoffix Znet)++ | 2 files
Implement tag aliaser and blocker

  - add tag-aliases.json file; lets us:
   - alias variations of the same tag to one name
   - block spammy/profane tags
01:11
01:11 aborazmeh joined, aborazmeh left, aborazmeh joined
IOninja is not following... 01:12
samcv oh i just thought it was a coincidence 01:13
that it's called dalek
IOninja heh
tbrowder hi gang, i see the new HUGE tag list on the modules site. i assume its 01:22
it's still a WIP?
IOninja Yes 01:26
samcv woah 01:28
FULLCAPS FTW
tbrowder how are the tags derived?
samcv probably from github tags 01:29
timotimo "cruise control for cool"
samcv m: say "cruise control" ~~ Cool 01:30
camelia True
IOninja tbrowder: perl6.party/post/Tag-Your-Dists 01:31
Geth ecosystem: kalkin++ created pull request #308:
Add new version of Ddt
01:32
IOninja hm... and we probably need to teach modules.perl6.org to dedupe stuff like that ^ :/ 01:34
by using name + auth as primary key or something
Geth ecosystem: 334be523b3 | (Bahtiar `kalkin-` Gadimov)++ | META.list
Add new version of Ddt

  - Add `v0.4.0` tag
  - Replace the previous master branch with `v0.3.2` tag
kalkin- ups sorry for merging my own pr. 01:38
tbrowder IOninja: good link, and my first module has tags in style of yours and shows up well. i will change my others to do the same. but what about adding the tags made up of the actual module name parts? i remember asking for module naming advice last year and such topic breaks in names were recommended as are the rule in Perl 5 modules
kalkin- I pushed to the wrong remote
tbrowder that of course could be done automagically. 01:39
and that same scheme works with the manual modules search now 01:41
IOninja Many module names will be that... names... DBIish, Green, zef, panda; or parts that don't make sense without context, ::WTF, ::Mangle, ::Elo. I see little reason to spam an already over-crowded tag list with more useless tags. 01:43
tbrowder also you might put the tag list on another page--it's kind of overwhelming at first glance, esp. on small screens
yep, lack of context is a bummer. how do you plan to get around that? sounds like. project for "deep learning" 01:45
01:45 skids joined 01:47 bjz joined
SmokeMachine m: my &r = { @ = $^a ..^ $^b }; say r(0, 4); say r(0, 4), r(1, 4) # there's something very strange... 01:48
camelia [0 1 2 3]
[1 2 3][1 2 3]
SmokeMachine use Test; my &r = { @ = $^a ..^ $^b }; is r(0, 4), r(1, 4) # shouldn't be ok 01:49
m: use Test; my &r = { @ = $^a ..^ $^b }; is r(0, 4), r(1, 4) # shouldn't be ok
camelia ok 1 -
SmokeMachine is it using the same state var? 01:50
m: use Test; sub r { @ = $^a ..^ $^b }; is r(0, 4), r(1, 4) 01:51
camelia ok 1 -
SmokeMachine use Test; sub r { @ = $^a ..^ $^b }; isnt r(0, 4), r(1, 4) # better this way 01:52
m: use Test; sub r { @ = $^a ..^ $^b }; isnt r(0, 4), r(1, 4) # better this way
camelia not ok 1 -

# Failed test at <tmp> line 1
# expected: anything except '$[1, 2, 3]'
# got: '$[1, 2, 3]'
SmokeMachine i think its not the state var:
m: use Test; sub r { @($^a ..^ $^b) }; isnt r(0, 4), r(1, 4)
camelia ok 1 -
SmokeMachine i mean: I think it IS the state var 01:53
IOninja It is. You're returning the same container that gets updated.
You also seem to be reinventing infix:<+>(Range, Int)
Ah no. Never mind.
SmokeMachine IOninja: thanks 01:54
01:54 Cabanossi left 01:55 lukaramu_ left
SmokeMachine IOninja: yes, I was just translating a levenshtein's distance from functional js to perl... 01:55
perl6 01:56
01:57 Cabanossi joined
IOninja m: say +StrDistance.new: :before<levenshtein> :after<levenfpain> # SmokeMachine 01:57
camelia 4
SmokeMachine IOninja: I was just judging a interview challenge and got curious to see that code in perl6... 01:59
kalkin- for some reason the TravisCI badge doesn't show up in modules.perl6.org 02:02
(The TravisCI badge for Ddt)
SmokeMachine great: github.com/rakudo/rakudo/blob/f325...istance.pm
02:04 labster left 02:07 kalkin-_ joined 02:10 kalkin- left, mcmillhj joined
Todd Please forgive anohter total mooch. I am trying to convert a perl 5 code to 6. The idea is to extract the hours, minutes, and seconds. 02:11
yoleaux 01:05Z <BenGoldberg> Todd: Might I suggest: sub XOpenDisplay(Str $display_name --> Pointer) is native('X11'); sub XFetchBytes(Pointer $display, int nbytes_return is rw --> Blob) is native('X11'); sub XFree(Blob) is native('X11'); my $d = XOpenDisplay(":0"); my int $len = 0; my Blob $b = XFetchBytes( $d, $len ); my Str $str = $b.subbuf( 0, $len ).decode; XFree( $b ); # now use $str.
Todd This is the Perl 5 code: $Tmp ~~ /^(\d+):(\d+):?(\d+)?$/;
This is what I have so far with P6: perl6 -e 'my $x="10:44:36"; $x ~~ /^(\d+):(\d+):?(\d+)?$/; say $1; say $2;' Nil Nil 02:12
What am I doing wrong, this time?
IOninja my ($hours, $minutes, $seconds = "00) = $x.split: ":"
my ($hours, $minutes, $seconds = "00") = $x.split: ":"
m: my $x="10:44:36"; my ($hours, $minutes, $seconds = "00") = $x.split: ":"; dd [ $hours, $minutes, $seconds ] 02:13
camelia ["10", "44", "36"]
IOninja m: my $x="10:44"; my ($hours, $minutes, $seconds = "00") = $x.split: ":"; dd [ $hours, $minutes, $seconds ]
camelia ["10", "44", Any]
IOninja aww
AH right
m: my $x="10:44"; my ($hours, $minutes, $seconds) = $x.split: ":"; $seconds //= "00"; dd [ $hours, $minutes, $seconds ] 02:14
camelia ["10", "44", "00"]
IOninja Disappointed the signature default don't work :P
Ah, 'cause it's not interpreted as signature there
Todd I take it dd does not mean the same thing in P6 as it does in bash. 02:15
IOninja m: my $x="10:44"; my ($hours, $minutes, $seconds = "00") := \(|$x.split: ":"); dd [ $hours, $minutes, $seconds ]
camelia ["10", "44", "00"]
IOninja huzza \o/
02:15 mcmillhj left 02:16 labster joined
IOninja : my $x="10:44:00"; my ($hours, $minutes, $seconds = "00") := \ |$x.split: ":", 3; dd [ $hours, $minutes, $seconds ] 02:17
my $x="10:44:00"; my ($hours, $minutes, $seconds = "00") := \ |$x.split: ":", 3; dd [ $hours, $minutes, $seconds ]
m: my $x="10:44:00"; my ($hours, $minutes, $seconds = "00") := \ |$x.split: ":", 3; dd [ $hours, $minutes, $seconds ]
camelia ["10", "44", "00"]
IOninja Death to parens!
Todd perl6 -e 'my $x="10:44:36"; my ($hours, $minutes, $seconds = "00) := \ |$x.split: ":",3; say $hours; say $minutes;' ===SORRY!=== Error while compiling -e Unable to parse expression in double quotes; couldn't find final '"' at -e:1 ------> .split: ":",3; say $hours; say $minutes;⏏<EOL> expecting any of: postfix 02:18
IOninja m: my $x="10:44:55"; dd [.hour, .minute, .second] with DateTime.new: '2016-12-31T' ~ $x
camelia [10, 44, 55]
Todd docs.perl6.org/programs/01-debuggi...x-entry-dd wow, that was no help! 02:19
IOninja Todd: debugging the error your pasted is left as an exercise to the reader. 02:20
Todd sorry
perl6 -e 'my $x="10:44:36"; my ($hours, $minutes, $seconds = "00) := \ |$x.split: ":"; say $hours; say $minutes;'
===SORRY!=== Error while compiling -e 02:21
Unable to parse expression in double quotes; couldn't find final '"'
------> $x.split: ":"; say $hours; say $minutes;⏏<EOL>
IOninja Todd: yes, debug it.
Todd found it. Forgot the " after 00
IOninja Find the problem.
:)
02:22 Ven left 02:25 Ven joined 02:28 mcmillhj joined 02:32 mcmillhj left, lichtkind left
Geth whateverable: e285e61890 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
Allow comma delimiter (for real this time)

Resolves #32. Also adds tests for #28 and #48.
02:34
Todd I am trying to conver a p5 program over to p6. Of course I am missing something but I an't get "perl6 -c" t tell me what. I just get back: 02:39
===SORRY!=== Cannot call method 'List' on a null object
What "List"?
02:39 Cabanossi left, unicodable6 left 02:40 statisfiable6 left, unicodable6 joined, ChanServ sets mode: +v unicodable6, statisfiable6 joined, ChanServ sets mode: +v statisfiable6
araraloren m: dd ().List; 02:40
camelia ()
Todd I don't understand 02:41
araraloren Your object is null, maybe should new first.
Todd but what object? It won't tell me a line number 02:42
02:42 Cabanossi joined
araraloren Hm, rakudo error message is not friendly, sometimes.. 02:42
02:43 kanishka joined
araraloren Maybe you can paste your code in gist or something else ... 02:43
Geth modules.perl6.org/tag-fixes: 019c775390 | (Zoffix Znet)++ | 4 files
Fix tag usability

  - Do not show tags with ≤ 2 dists for them by default
  - Fix failure to display tags with `/` or `.` in them
02:44
02:45 ilbot3 left
Todd vpaste.net/XwGDq 02:45
timotimo Todd: you've got something that causes the compiler to asplode
please try perl6 --ll-exception -c ... ...
is there any way to download that as a raw .txt? 02:46
ah!
add ?raw to the end
02:46 mcmillhj joined
araraloren let me run that code first.. 02:46
IOninja Todd: you have lots of messed up sub calls. Don't use parentheses or don't put space between the name and the ( 02:47
Todd --ll-exception tell me I have an "Unexpected closing bracket" on line 64, which is blank 02:48
02:48 ilbot3 joined, ChanServ sets mode: +v ilbot3
Todd Oh no fooling! 02:48
IOninja Or is that Perl 5 code?
timotimo "use lib /home/linuxutil" bad idea
IOninja m: foreach ^2 { .say } 02:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of 'foreach'; in Perl 6 please use 'for'
at <tmp>:1
------> 3foreach7⏏5 ^2 { .say }
timotimo Todd: can't try that without having X11Clipboard
Todd fixed the " (" problem. that was an easy one. I am embarrased 02:50
araraloren Yeah, it's bad idea, rakudo will search some directory crazy..
timotimo i found the problem why the compiler is asploding
m: use CheckSystemDependency ( $name ) { say "lol" } 02:51
camelia ===SORRY!===
Cannot call method 'List' on a null object
timotimo that's meant to be "sub" instead of use
good catch
02:51 mcmillhj left
timotimo i mean, good catch finding a piece of code so simple that makes the compiler explode with a shitty error message 02:51
Todd Okay, now it is giving me line numbes. I am off to the races! It was the " (" issue.
timotimo i didn't see a ( error
oh 02:52
*all* the ( errors
that's not what made the compiler asplode, though :)
araraloren Hm, line 53 has a error
replace use with sub
Todd what was on 53 (i have been fixig things) 02:53
timotimo anybody want to rakudobug the "use" bug? i've gotta go real soon
araraloren Also , line 26/27
IOninja kalkin-_: no idea why... It shows up fine on my local build :/ 02:54
Todd 24 and 25 were missing a {}
araraloren Perl6 has a multi line comment
#`()
timotimo he already uses multi line comments
oh ... but not correctly
araraloren Yeah, in line 26/27 02:55
Todd fixed that already 02:56
araraloren Maybe your should write code step by step, write some and just test it, if not error, go on ..
02:57 mcmillhj joined
IOninja kalkin-_: the only thing I can think of is travis wasn't yet ready when it fetched the status, but that should be rebuilt on next update... And I don't know if "next update" happened already 02:58
Gonna push a bunch of fixes soon, maybe that'll set it straight
02:58 bjz left
Todd Unless I get in trouble, stop helping me with this. I am not that big a mooch and it helps me learn by debugging. I have a lot of p5 code I want o eventually convert 02:59
kalkin-_ IOninja: thanks!
yes now it's also showing passing for me
IOninja Oh does it? cool 03:00
araraloren Hm, :)
kalkin-_ IOninja: probably travis wasn't ready yet
03:01 mcmillhj left
Geth modules.perl6.org/tag-fixes: 2306d9eed0 | (Zoffix Znet)++ | 3 files
Update to latest Mojolicious

  - bump prereq version
  - toss deprecated Mojo::Util::slurp
03:04
IOninja oh gee there are many more of those :( 03:08
Geth modules.perl6.org/tag-fixes: a2c0502f69 | (Zoffix Znet)++ | 3 files
Revert "Update to latest Mojolicious"

This reverts commit 2306d9eed03f66e5c36be9f4ac8c4350b0c094c0.
There many more other instances of deprecated stuff; will upgrade some other time.
03:09
IOninja This kinda sums up Perl 5 to me. Running around the codebase, changing something as basic as slurp/spurt of files, just 'cause the handful of authors decided to change it. 03:12
MasterDuke timotimo: rakudobugged as RT #130979
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130979
Todd perl6 -e 'my $HHMM="10:44"; my $HH; my $MM; ( $HH, $MM ) := \ |$HHMM.split: ":"; say $HH; say $MM;'
Cannot use bind operator with this left-hand side
IOninja Todd: you can do it only with `my` 03:13
Todd it works with `my ( $MM, $HH )`, but not if I have already defined the variables. Why?
oh. Okay
IOninja And funny enough, before I switched modules.perl6.org to Mojolicious, I had to update it from File::Slurp that's buggy and deprecated.
Todd: well, I mean my thing with the defaults and stuff 03:14
Todd: you can assign ($hh, $mm) = $blah.split: ":"
^ note, no := but =
Geth modules.perl6.org/tag-fixes: a7b4708732 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source.pm
Log info for dists with no tags in build log
03:18
Todd cool 03:20
03:25 buggable left, buggable joined, ChanServ sets mode: +v buggable 03:32 zakharyas joined 03:36 risou_awy is now known as risou 03:38 zakharyas left 03:40 aborazmeh left
Geth modules.perl6.org: zoffixznet++ created pull request #70:
Tag fixes
03:42
modules.perl6.org/master: 8 commits pushed by (Zoffix Znet)++
03:43 noganex_ joined
IOninja :/ 03:43
03:44 bjz joined
IOninja I've obviously been off web for too long :/ Didn't even bother testing in Chrome, and of COURSE it's broken in it -_- 03:44
03:45 naxieAlDle left, Actualeyes left 03:46 noganex left 03:52 Ven left
IOninja oh, jquery doesn't have .sort.. Where did I dig it up :/ 03:53
03:57 Ven joined
BenGoldberg IOninja, You have a grep with this condition: length and not ref and not $no_index->{$_} 03:57
On the results of map uc, ...
I'm pretty sure that uc will stringify everything, and thus, 'ref' will always be undef. 03:58
04:05 bjz left
Geth modules.perl6.org/tag-fixes: 106e4ff7bc | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source.pm
Fix tag processing pipeline; BenGoldberg++
04:05
IOninja BenGoldberg: thanks
BenGoldberg Welcome :) 04:06
Geth modules.perl6.org/tag-fixes: dc358e9b86 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/Source.pm
Add missing conditional
04:07
BenGoldberg shall not ask why trim is needed, nor how tags might end up with spaces in them.
IOninja Because the user types them. 04:08
BenGoldberg Gotcha.
04:09 Cabanossi left
IOninja ugh this stupid sort is doing my head in 04:10
04:11 Cabanossi joined 04:12 Actualeyes joined 04:13 bjz joined 04:21 mcmillhj joined 04:23 bwisti joined, bwisti left 04:26 mcmillhj left 04:27 wamba1 joined
Geth modules.perl6.org/tag-fixes: 8807d51806 | (Zoffix Znet)++ | 2 files
Fix tag sorting
04:31
modules.perl6.org: zoffixznet++ created pull request #71:
Tag fixes
modules.perl6.org/master: 4 commits pushed by (Zoffix Znet)++
IOninja *sigh*
Hopefully that fixes everything I wanted to fix.
Annoying :/ wasted entire evening. Too sleepy now to even play video games :\
IOninja drops to bed
BenGoldberg G'night. 04:32
04:32 mcmillhj joined 04:37 mcmillhj left, Ven left 04:41 Ven joined, khw left 04:42 risou is now known as risou_awy 04:54 mcmillhj joined 05:00 mcmillhj left 05:08 bjz_ joined, Cabanossi left 05:11 Cabanossi joined, bjz left 05:12 mcmillhj joined 05:17 Ptolemarch joined 05:20 mcmillhj left 05:21 mcmillhj joined 05:22 Ven left 05:25 Ven joined 05:26 mcmillhj left 05:47 rindolf joined 05:49 mcmillhj joined 05:55 BenGoldberg left
Todd got a sub question: are the values in the () read only? 05:58
samcv unless you mark them `is rw`
05:59 mcmillhj left
samcv it passes through the object not the actual value so prevents you from modifying it. if it's rw then it can effect other part of the program 05:59
m: sub thing ($var is rw) { $var = 2; } my $var1 = 0; thing($var1); say $var1 06:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3sub thing ($var is rw) { $var = 2; }7⏏5 my $var1 = 0; thing($var1); say $var1
expecting any of:
infix
samcv m: sub thing ($var is rw) { $var = 2; }; my $var1 = 0; thing($var1); say $var1
camelia 2
samcv but you can mark it `is copy` if you want it to just be a copy of what you pass through
Todd thank you. DuckDuckGo failed me. I got reference to it, but no examples 06:01
in general best practice, is it better to do a `return ( $var1, $var2)` than to do an `$var1 is rw, $var2 is rw`? Or is it up to the mood of the programmer? 06:02
moritz returning is better 06:03
samcv ^ 06:04
Todd Thank you!
06:39 agentzh left, Cabanossi left 06:41 Cabanossi joined 06:54 risou_awy is now known as risou
Todd I am trying to print the ascii value of every character in a string. DuckDuckGo is loading me full of Perl 5 ways of doing this. This is what I have that does not work: 06:55
perl6 -e 'my $x="1 2 9 8"; for $x -> $chr { print "<" ~ ord($chr) ~ ">\n"; }'
This seems like I am betting away with h***: 06:59
perl6 -e 'my $x="1 2 9 8"; for $x.split: " " -> $chr { print "<" ~ ord($chr) ~ ">\n"; }'
Is it that easy?
07:03 eroux left
geekosaur m: say "abcd".comb 07:06
camelia (a b c d)
geekosaur preferred over split if you just want to split to individual characters
07:07 eroux joined 07:19 CIAvash joined 07:24 eroux left
Todd how to I do a split with an either/or? @TimeEntries = split chr(9) || ":space", $Clipboard; 07:24
or do I need to make it two liens? 07:25
lines not liens
07:31 bjz joined 07:32 bjz_ left 07:33 RabidGravy joined 07:39 wamba1 left 07:42 mcmillhj joined
RabidGravy MORNING! 07:45
07:45 Ptolemarch_ joined 07:46 Ptolemarch_ left, Ptolemarch left 07:47 mcmillhj left 07:51 dct joined 07:53 mcmillhj joined 07:54 Cabanossi left 07:56 Cabanossi joined 07:57 mcmillhj left 08:03 skids left 08:05 mcmillhj joined 08:09 mcmillhj left
nine Todd: you'd need a Regex for that 08:11
RabidGravy wonders how sane a binding to LV2 would be
nine m: say "abaabaca".split: /<{chr(98)}> | c/ 08:14
camelia (a aa a a)
08:17 perlawhirl left 08:19 xinming_ joined 08:22 xinming left 08:23 Ven left 08:26 Ven joined 08:30 Peter_R left 08:31 Peter_R joined 08:33 mcmillhj joined 08:37 dct left, mcmillhj left 08:40 Ven left 08:42 Ven joined 08:44 mcmillhj joined 08:48 mcmillhj left 08:59 dct joined 09:01 Todd left
Geth Inline-Perl5: e66fa091c8 | (Stefan Seifert)++ | 2 files
Speed up converting non-UTF8 Perl 5 strings to Perl 6 blobs

By using blob8's constructor that takes a Positional, we can save a lot of ASSIGN-KEY calls. This saves about 60 % of the time to convert youtube.com's source code.
Improves GH #82
09:04
09:05 dct left 09:06 mcmillhj joined, parv joined
samcv nine, i am getting failing tests for Inline::Perl5 is it just me? 09:08
have perl5 v5.24.1 09:09
09:10 mcmillhj left
nine samcv: which ones? 09:14
samcv well the ones to install it, and several of the roast ones
nine, gist.github.com/samcv/90015550e1c0...fc61c38f8b this is when installing the package 09:15
09:15 espadrine joined 09:17 mcmillhj joined 09:21 mcmillhj left 09:22 mcmillhj joined
nine samcv: ah, I've seen those, too. Though those messages never caused the tests to actually fail for me. 09:24
samcv oh
let me run the tests and i'll tell you which fail
nine Also they are kinda hard to reproduce. Sometimes they're there, sometimes not. Sometimes I seem them when running with prove but not with make test
samcv did it every time i did it
for at least the last week 09:25
09:25 Ven left
nine When working on the above commit, I got them every time when running prove from vim. Now they're suddenly gone again. 09:26
09:27 mcmillhj left
samcv ok i get 3/6 failed in hash.t 4/5 failed in roudtrip.t 09:27
other ones pass
09:27 Ven joined
nine Do you have any details for me? Error messages or segfaults? 09:29
samcv yeah second
uhm segfault on hash.t
same for roundtrip.t 09:30
for the hash.t it segfaultcs after the 3rd test 09:31
gist.github.com/samcv/38dfdab08046...7a628970c7
09:32 perlawhirl joined, robertle joined
Geth ecosystem: 7057dadce0 | (Jonathan Stowe)++ | META.list
Rename the META of Cache::Memcached
09:33
09:33 mcmillhj joined
RabidGravy just giving some love to the modules I'm a surrogate parent to 09:34
nine samcv: very, very odd. Especially since I cannot repro 09:36
samcv what perl version do you have
i updated mine like 2 weeks ago 09:37
nine 5.24.0
09:38 mcmillhj left 09:39 Cabanossi left 09:40 mcmillhj joined, Ven left, dct joined 09:41 Cabanossi joined
Geth perl6.org: hankache++ created pull request #79:
Add Perl 6 from haskell / python
09:42
09:42 Ven joined 09:45 mcmillhj left, dct left 09:56 dct joined 10:01 mcmillhj joined 10:04 parvx joined 10:06 mcmillhj left 10:07 parv left 10:08 dct left
Geth perl6.org: 1abc12d693 | (Naoum Hankache)++ | source/resources/index.html
Add Perl 6 from haskell / python
10:11
perl6.org: 530f6265ba | (Samantha McVey)++ | source/resources/index.html
Merge pull request #79 from hankache/master

Add Perl 6 from haskell / python
10:18 kanishka left 10:23 TEttinger left 10:26 firestarter joined
firestarter hey again guys 10:26
can anyone explain me this weird behaviour i'm having 10:27
pastebin.com/Mbpfmhvq
why doesn't the grammar work if i change the quantifier in line 10 from 0..* to 0..2?
it does work if i drop the proto 10:28
samcv firestarter, so it works if you drop the proto and use 0..2 ? 10:32
firestarter, it works fine if i change it from 0..* to 0..2. the 10th line right? 10:33
firestarter yeah
samcv yeah it works for me
firestarter, tell me your `perl6 --version` 10:34
output
also i can't believe you named a token `my´ haha
firestarter This is Rakudo version 2017.01 built on MoarVM version 2017.01
implementing Perl 6.c.
samcv hmm that's the newest one 10:35
i think. or something
firestarter m: grammar A { token TOP { <ma>\s+<mt>\s*|| <ma>\s*<mm>\s+<mt>\s* }; token ma { \d+ }; proto token mm {*}; token mm:sym<a> { '(' <[a..zA..Z\d]>**0..2 ')' }; token mt { <.dec> }; token dec { <[\d,.]>+ };}; say A.parse('0000 (a) 5,555,555'); say A.parse('0000 (a0) 6,666,666'); 10:36
camelia 「0000 (a) 5,555,555」
ma => 「0000」
mm => 「(a)」
mt => 「5,555,555」
「0000 (a0) 6,666,666」
ma => 「0000」
mm => 「(a0)」
mt => 「6,666,666」
samcv newest star at least
firestarter it works here as well
but locally i get this:
Nil
「0000 (a0) 6,666,666」
ma => 「0000」
mm => 「(a0)」
mt => 「6,666,666」
samcv bisectable6, grammar A { token TOP { <ma>\s+<mt>\s*|| <ma>\s*<mm>\s+<mt>\s* }; token ma { \d+ }; proto token mm {*}; token mm:sym<a> { '(' <[a..zA..Z\d]>**0..2 ')' }; token mt { <.dec> }; token dec { <[\d,.]>+ };}; say A.parse('0000 (a) 5,555,555'); say A.parse('0000 (a0) 6,666,666');
firestarter [Finished in 0.246s]
bisectable6 samcv, Bisecting by output (old=2015.12 new=1754dc5) because on both starting points the exit code is 0
samcv well let's find out
bisectable6 samcv, bisect log: gist.github.com/65d3729d4f2cbe1e55...52daeb9b8f
samcv, (2017-01-31) github.com/rakudo/rakudo/commit/9e...978bd56057
samcv well there you go 01-31
Fix NFA generation for the constructs `x ** 1..2` and `:i <[A..Z]>`, 10:37
that's one of the fixes
this commit is what fixed it github.com/rakudo/rakudo/commit/9e...978bd56057
firestarter, how did you install rakudo? 10:38
10:38 mcmillhj joined
firestarter i downloaded the binaries (running on Win10 x64) 10:38
samcv if you do ..3 does it work? or only if you do 0..* 10:39
firestarter no, it doesn't, not with ..3, not with ..100 and not with ..^100
so this was fixed later than the compiled version?
samcv yep
firestarter last night i literally spent 3 hours trying to figure this out :D 10:40
samcv heh
you can compile the latest if you want to go that way. i haven't done it on windows, have linux myself
if you have MSVC or gcc are pre-requisites 10:41
firestarter yeah i have these
samcv ok. see github.com/rakudo/rakudo#configuri...-on-moarvm
clone the repo and run that
firestarter thanks, man!
samcv and it should mostly do the work for you. then you just run `make install`
which will install it in uh. some folder under the checked out folder 10:42
10:43 mcmillhj left
samcv but you can do `--prefix=/Users/blah/perl6` or whatever you do or is best on windows 10:43
otherwise it'll just do it to the same folder
10:44 fir3starter joined
fir3starter ok, will try that 10:45
samcv firestarter, feel free to ask any questions, this irc is great :)
fir3starter Beats reviewing commits or design docs 10:46
10:46 aborazmeh joined, aborazmeh left, aborazmeh joined
samcv heh. usually some of the devs are around (i'm one of them) and at least one of them will hopefully know what needs to be done somewhere 10:47
perl 6 is a big language
10:49 mcmillhj joined 10:50 f1r3starter joined, parvx left, firestarter left
samcv fir3starter, the bugtracker is at rt.perl.org if you need to search for bugs. 10:50
10:51 bjz left
f1r3starter Currently i'm aiming to build a substantial project that mainly revolves on grammars. My biggest concern now is the stability of the environment 10:51
samcv environment= perl 6 functioning or just everything? 10:52
what's the project if i can ask
10:53 fir3starter left
f1r3starter Yeah, it's perl6 bridged with a python codebase 10:53
samcv ah ok. so using Inline::Python?
10:54 mcmillhj left
f1r3starter Right now, im using json 10:54
samcv the grammar stuff is usually fairlry robust. big reason is perl 6 is parsed using grammars
f1r3starter Unfortunately couldnt get inline::python to work on win
samcv ah ok
10:55 Ven left
samcv what editor are you using? 10:55
f1r3starter Right now im using atom but what i really miss is an IDE 10:56
Im a bit spoiled by pycharm
samcv you will like this page github.com/samcv/Atom-as-a-Perl6-IDE
did you have language-perl6 plugin already installed? curious 10:59
11:00 mcmillhj joined
f1r3starter I have the perl6-fe and script plugins installed 11:00
samcv language-perl6fe is the old plugin 11:01
language-perl6 is the new plugin that's an official perl6 project, and have like 100 improvements
11:02 eroux joined, bjz joined, Ven joined
samcv language-perl6 is also the same that github now uses for their syntax highlighting as well. the old one is not maintained or getting updates at all 11:02
11:03 TeamBlast left
f1r3starter So language-perl6 is the one preinstalled? 11:03
samcv no
lanuageg-perl is the one pre-installed
which has shitty syntax highlighting for perl 6 11:04
if you're curious things that have changed since language-perl6fe github.com/perl6/atom-language-per...ANGELOG.md there's a long list
11:05 mcmillhj left
samcv changelog is since it changed to language-perl6 and was moved to github.com/perl6/atom-language-perl6 11:05
11:05 TeamBlast joined 11:06 mcmillhj joined
samcv also it's what docs.perl6.org uses since a month or so ago and i converted the site over to that 11:07
before used pygments
f1r3starter Wow didn't know that. I actually thought this was an old unmaintained plugin 11:09
Will definitely try it
samcv oh the language-perl6 cause it has less dls?
hopefully the number will keep going up lol
11:10 domidumont joined, mcmillhj left 11:11 Ven left, Cabanossi left
f1r3starter Exactly :D what i am really missing is a graphical debugger 11:11
samcv there is a grammar debugger 11:12
buggable, eco debugger
buggable samcv, Found 3 results: Tardis, Grammar::Debugger, Debugger::UI::CommandLine. See modules.perl6.org/#q=debugger
samcv buggable, grammar::debugger
buggable, eco grammar::debugger 11:13
buggable samcv, Grammar::Debugger 'Simple tracing and debugging support for Perl 6 grammars': github.com/jnthn/grammar-debugger
samcv this one. it works using magic
11:13 Cabanossi joined
samcv and if you don't want interactive and just want lots of messages debug use `use Grammar::Tracer;` and magically you get tons of debugging 11:15
11:15 domidumont left
grondilu_ hum...: 11:18
Configuration FAIL. You can try to salvage the generated Makefile.
Command failed (status 256): /usr/bin/perl Configure.pl --optimize --prefix=/usr/local --make-install
11:18 grondilu_ is now known as grondilu, grondilu left, grondilu joined
grondilu command was: 11:20
$ perl Configure.pl --gen-moar --gen-nqp --backends=moar --prefix=/usr/local
moritz grondilu: is there more output?
(if yes, please use a pastebin)
11:21 domidumont joined
grondilu hang on 11:21
tbrowder IOninja: ref modules page, what about a page showing the broken down modules in a tree, e.g., Acme::Foo::Bar becomes Acme / Foo / Bar with appropriate indentation or other embellishment. I know what you think of most of the names, but I like to think most authors were trying to use something like cpan structure, and a tree view might help find modules of
interest.
samcv grondilu, what is this --optimize flag 11:22
grondilu paste.debian.net/919254/
11:22 Ven joined
grondilu I don't know about this --optimize flag, it was not part of my initial command 11:22
samcv oh
ok
that's fgine then
11:23 Ven left
samcv grondilu, do you have a longer log? of the whole thing? 11:23
oh maybe this is it in the history paste.debian.net/919253
is that correct?
grondilu no
I don't think so
samcv ok
f1r3starter I've tried the grammar::tracer and it does its job but a GUI breakpoint debugger would really improve the workflow imho
grondilu forgot how to redirect both stdin and stdout 11:24
samcv i think it has that f1r3starter
if you read the page on the module. i have not tried it but 11:25
that's what it says
grondilu ok, found it (2>1): paste.debian.net/919256/
samcv 1>&2 i think
err yeah that
had it reversed. 11:26
grondilu ah, failed. 2>1 directs to file 1
11:27 wamba1 joined
grondilu ok, both stdin and stdout this time: paste.debian.net/919257 11:27
I mean stderr
grondilu forgot to LANG=C it 11:28
f1r3starter Ive also seen a perl6 plugin to intellij but it was abandoned midway
grondilu first error seems to be: 11:29
git error: fatal: destination path '/usr/local/src/rakudo/nqp/MoarVM/3rdparty/libtommath' already exists and is not an empty directory
I guess I could wipe it
paste.debian.net/919258
grondilu wipes his nqp directory 11:30
grondilu vaguely remembers that he has to do that from times to times 11:31
samcv grondilu, cd into the MoarVM folder
and then try `git reset --hard`
and then git pull
grondilu to late, already wiped it
*too
11:32 araraloren left, araraloren joined 11:35 lukaramu joined
Geth doc: hankache++ created pull request #1244:
about.pod6
11:37
11:38 ZzZombo joined, ZzZombo left, ZzZombo joined 11:42 Ven joined
ZzZombo is there a generic way to match opening character with the corresponding closing one, like '{'=>'}'? 11:42
samcv uhm
m: say '{'.uniprop('Bidi_Mirroring_Glyph').say 11:43
camelia }
True
samcv i added that a month or so ago i think
:) you're welcome
pretty useful
works on any mirroring character
ZzZombo wow, I actually was pretty sure it was much more... difficult.
Nice
samcv well not anymore! 11:44
ZzZombo thanks a lot!
samcv you're welcome!
curious about your usecase btw. what is it?
ZzZombo m: say '“'.uniprop('Bidi_Mirroring_Glyph')
camelia
ZzZombo Well, random text generator, but I want it to correctly output -- possibly nested -- brackets and such. 11:45
m: say '«'.uniprop('Bidi_Mirroring_Glyph')
camelia »
samcv m: say '“'.uniprop('Bidi_Mirroring_Glyph') 11:46
camelia
11:46 labster left
samcv hmm i think those aren't mirrored. 11:46
ZzZombo well, not that I've seen the whole lot of them anyway.
Shouldn't matter.
samcv yeah they are not
ZzZombo, this is the whole unicode list of mirroring characters ftp://ftp.unicode.org/Public/UNIDATA/BidiMirroring.txt 11:47
ZzZombo But possibly it should return Nil instead of NL char?
samcv no that's just the bot
it returns an empty string if there is no mirroring glyph
when you use say it adds a newline
ZzZombo ah
samcv so it'll evaluate as false in bool context 11:48
ZzZombo m: say '‘'.uniprop('Bidi_Mirroring_Glyph') 11:52
camelia
samcv ZzZombo, quotation marks aren't mirrored 11:53
but basically everything else is
11:56 Ven left 11:57 Cabanossi left
Woodi_ samcv++ # Unicode nice madness :) 11:58
11:58 Cabanossi joined
samcv the best madness! 11:59
12:01 Ven joined 12:02 perlawhirl left 12:06 dogbert17 joined
dogbert17 any camelia experts around? 12:07
12:12 Ven left 12:20 ZzZombo left 12:21 Ven joined 12:23 Ven left 12:33 perlawhirl joined 12:37 TeamBlast left 12:40 TeamBlast joined 12:42 Ven joined 12:44 perlawhi1l joined, bjz left 12:45 bjz_ joined, salv0 left 12:47 perlawhirl left, MeirG joined 12:48 robertle left 12:49 TeamBlast left 12:50 perlawhi1l left
MeirG Tried to install Rakudo Star 17.01 Windows 10 64bit. Got Error 2503 then Error 2503. Any fix for that? 12:50
12:50 TeamBlast joined
MeirG I mean error 2502 then error 2503 12:52
12:55 MeirG left 12:56 MeirG joined, Ven left 13:01 Ven joined 13:06 bjz_ left 13:08 cibs left 13:10 cibs joined 13:12 ZzZombo joined, ZzZombo left, ZzZombo joined, Ven left
IOninja dogbert17: what did you want? 13:21
13:21 Ven joined
samcv MeirG, an error while installing it? 13:23
13:23 Ven left
rindolf MeirG: hi 13:24
Geth perl6-most-wanted: a7a38688e4 | (Tom Browder)++ | most-wanted/modules.md
removed two modules recently entered into the ecosystem
13:34 lukaramu_ joined, aborazmeh left 13:37 lukaramu left 13:41 cale2 joined, Ven joined
cale2 Is there a way to index into a Hash based upon the value? 13:43
13:44 Sound joined
cale2 m: my %hash = <this that those> X=> <A B C>; say "A. %hash.keys.<A>" 13:44
camelia Type Seq does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
cale2 m: my %hash = <this that those> X=> <A B C>; say "A. %hash.values.<A>"
camelia Type Seq does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
gfldex m: my %h = a => 1, b => 2, c => 2; %h.antipairs.hash{2}.say 13:45
camelia b
cale2 bingo, thanks
m: my %hash = <this that those> X=> <A B C>; say "A. %hash.antipairs<A>"
camelia A. %hash.antipairs<A>
gfldex please note that this might swallow pairs
cale2 m: my %hash = <this that those> X=> <A B C>; say "A. {%hash.antipairs<A>}" 13:46
camelia Type Seq does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
cale2 m: my %hash = <this that those> X=> <A B C>; say "A. %hash.antipairs.<A>"
camelia Type Seq does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
cale2 m: my %hash = <this that those> X=> <A B C>; say "A. %hash.antipairs.hash<A>"
camelia A. %hash.antipairs.hash<A>
cale2 Okay, not sure how to do it actually
moritz m: my %h = <this that those> X=> <A B C>; say %h.invert.perl
camelia (:C("those"), :C("that"), :C("this")).Seq 13:47
moritz m: my %h = <this that those> X=> <A B C>; say %h.invert.hash.perl
camelia {:C("this")}
moritz m: my %h = <this that those> Z=> <A B C>; say %h.invert.hash.perl
camelia {:A("this"), :B("that"), :C("those")}
gfldex m: my %h = a => 1, b => 2, c => 2; %h.invert.say
camelia (1 => a 2 => c 2 => b)
cale2 no easy way to index into it after inverting/antipairing though? 13:48
gfldex m: my %h = a => 1, b => 2, c => 2; %h.invert.hash{2}.say
camelia b
cale2 m: my %h = a => 1, b => 2, c => 2; %h.invert.Hash{2}.say 13:49
camelia b
gfldex cale2: what you want to do is dangerous, you may want to consider a better algorithm
cale2 lowercase same as uppercase
moritz well, it's a list, because in general the hash loses information 13:50
so you can index it as a list
m: my %h = <this that those> x=> <A B C>; say %h.invert.grep(*.key eq 'C')>>.value
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead
at <tmp>:1
------> 3my %h = <this that those> x=>7⏏5 <A B C>; say %h.invert.grep(*.key eq 'C
moritz m: my %h = <this that those> x=> <A B C>; say %h.invert.grep(*.key eq 'C')>>.value
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix > instead
at <tmp>:1
------> 3my %h = <this that those> x=>7⏏5 <A B C>; say %h.invert.grep(*.key eq 'C
moritz m: my %h = <this that those> X=> <A B C>; say %h.invert.grep(*.key eq 'C')>>.value 13:51
camelia (those that this)
cale2 I like how it reads when making this answer key. You just put `%option{$correct}` and it gives the correct letter answer
but maybe I should not do it this way because of what you mentioned
Anyone know how to stop seeing every notification from perl6-org on github? I only want to see the stuff that is relevant to myself :) 13:54
Oh, it's because when I got added to the org, it set all the repos to "watching" 13:55
gfldex m: my %h = a => 1, b => 2, c => 2; %.push(%h.antipairs).say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable %.push used where no 'self' is available
at <tmp>:1
------> 3 1, b => 2, c => 2; %.push(%h.antipairs)7⏏5.say
moritz m: my %h = a => 1, b => 2, c => 2; (%).push(%h.antipairs).say
gfldex m: my %h = a => 1, b => 2, c => 2; my %h2; %h2.push(%h.antipairs); dd %h2
camelia {1 => a, 2 => [c b]}
Hash %h2 = {"1" => "a", "2" => $["c", "b"]}
13:58 Ven left
IOninja cale2: github.com/watching 14:01
gfldex m: my %h = a => 1, b => 2, c => 2; my method pushHash { Hash.new.push(self) }; %h.antipairs.&pushHash.say
camelia {1 => a, 2 => [c b]}
14:01 Ven joined 14:05 benchable6 left, lukaramu_ left
IOninja my %h = a => 1, b => 2, c => 2; %h = % .push: %h.antipairs; say %h 14:05
m: my %h = a => 1, b => 2, c => 2; %h = % .push: %h.antipairs; say %h
camelia {1 => a, 2 => [c b]}
IOninja m: my %h = a => 1, b => 2, c => 2; %h = % .push: %h.invert; say %h 14:06
camelia {1 => a, 2 => [c b]}
IOninja wonders of the difference between .antipairs and .invert
14:11 Cabanossi left
Geth doc: d3014fc04f | (Zoffix Znet)++ | doc/Type/Any.pod6
Any does not provide .invert
14:11
14:11 Ven left
IOninja huh 14:11
gfldex: what's with this commit? github.com/perl6/doc/commit/bdf8ca...e0698c123b 14:12
gfldex that's part of a result from util/list-missing-methods.p6 14:13
14:13 Cabanossi joined
IOninja That runs counter to "Rakudo does not define what Perl 6 is" thing. 14:15
gfldex that's why I also checked roast
IOninja gfldex: but many of those aren't even in Rakudo's Any. invert wasn't, I see unique, repeated, squish, reduce, first aren't either. There's like more of them that aren't 14:18
gfldex i need to double check then
IOninja Unless my browser's search feature is busted :/ 14:19
m: <invert unique repeated squish reduce>.grep({ class {}.^can("$_") }).say
camelia (invert unique repeated squish reduce)
IOninja m: class {}.^lookup('invert').say 14:20
camelia Method+{<anon|56564848>}.new
IOninja gfldex: oh, my fault.
gfldex: these are in Any-iterable file, not in Any.pm -_-
Brain fart :)
14:20 mscha joined
Geth doc: 9c2b7269f6 | (Zoffix Znet)++ | doc/Type/Any.pod6
Revert "Any does not provide .invert"; Zoffix--

This reverts commit d3014fc04f48ee7085e9d79d754a17a14e02a19c.
14:21
14:21 Ven joined
mscha Quick question: is there a protocol for entering "optimization requests"? 14:21
I'm so fed up that even simple "for a..b -> $i { ... }" loops are so much slower than corresponding c-type loops. 14:22
IOninja mscha: yes, report them as a bug and include code that you think is running slow and include [PERF] as first thing in the subject
gfldex invert is in roast all over the place. Not quite sure to do with Any and the docs.
mscha And that should be something that's relatively easy to optimize, right? (I know, easy to say for an ‘outsider’...)
IOninja gfldex: it's fine. Sorry, my mistake.
mscha OK, will do.
IOninja mscha: like, actual code, not "for a..b" which isn't valid code. 14:23
mscha Actual code like this? pastebin.com/SVYAyA5z
IOninja mscha: would be helpful to have something a bit reduced :) Like a particular construct that runs slow. 14:24
14:24 Ven left
samcv IOninja, what is the preferred way to write RT ticket numbers? 14:25
IOninja samcv: where?
samcv RT#130913 or RT #130913
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130913
samcv in git commit body
IOninja samcv: no idea
samcv putting together a draft style guide
for commit messages
IOninja write as "Fixes RT#13091: rt.perl.org/rt3//Public/Bug/Displa...id=130913"
14:26 MasterDukeMobile joined, cale2 left
samcv so no spaces 14:26
looks like 3/5 use space and 2/5 use no spaces 14:27
IOninja I think sometimes I also write "...blah in the ticket[^1] blah... [1] rt.perl.org/rt3//Public/Bug/Displa...id=130913" 14:28
samcv ok actually it's 728 instances of RT # and 293 instances of RT#
IOninja m: for ^100_000 { for 1..10 -> $i { $ = $i } }; say now - INIT now 14:29
camelia 0.55580332
IOninja m: for ^100_000 { loop (my $i = 1; $i <= 10; $i++) { $ = $i } }; say now - INIT now 14:30
camelia 0.51271986
samcv i like the way with the space better personally. and we have 71.3% using RT # and 28.6% using RT#
IOninja mscha: ^ doesn't seen too outrageous a difference?
*seem
Especially considering in the 1..10 case you're creating and reifying a Range object
samcv i mean for ^1000 complies to a while loop i think 14:32
gets optomized so there should not be a speed up doing it another way if it's just iterating numbers +1 each time
IOninja * │ IOninja wonders of the difference between .antipairs and .invert 14:33
m: %(:a(2, 3), :17b).invert.say
camelia (2 => a 3 => a 17 => b)
IOninja m: %(:a(2, 3), :17b).antipairs.say
camelia ((2 3) => a 17 => b)
IOninja m: %(:a[2, [3,5]], :17b).invert.say 14:34
camelia (2 => a [3 => a 5 => a] 17 => b)
IOninja :S
Is that how it's meant to work?
samcv wow. editing .md files in Atom. it highlights ```language sections using that syntax hilghlighter
neat af
14:35 MasterDukeMobile left 14:36 MasterDukeMobile joined
samcv m: %(:a[2, [3,5]], :17b).invert.perl.say 14:36
camelia (2 => "a", $[3 => "a", 5 => "a"], 17 => "b").Seq
mscha IONinja: in pastebin.com/SVYAyA5z , it takes 86s with Perl6-style loops, and 55s with C-style loops. (Rakudo Star 2017.01.) Significant to me.
samcv mscha, this is using `loop`? 14:37
mscha samcv: yes, the fast version is with loop.
IOninja m: say 86/55
camelia 1.563636
mscha But maybe current Rakudo is less of a difference? I know there have been a lot of performance tweaks. 14:38
14:38 cdg joined
samcv what do the for loops look like mscha 14:38
can i see that version
14:38 MasterDukeMobile left, agentzh joined
mscha samcv: see pastebin.com/SVYAyA5z. 14:38
The commented-out lines are the "for" version. 14:39
samcv oh i see
m: my $var = 2 .. (1000 div 2); dd $var
camelia Range $var = 2..500
samcv m: my $var = 2..(1000 div 2); dd $var 14:40
camelia Range $var = 2..500
14:41 Ven joined 14:42 Cabanossi left
IOninja m: say 87/52 14:42
camelia 1.673077
IOninja slowage on my box...
14:43 agentzh left, Cabanossi joined
IOninja m: say 11.387/10.944 14:44
camelia 1.040479
IOninja Differnce if you turn the optimizer off.
mscha: well, as I've said, file it so we could bench it and stuff... But keep in mind cases of X being slower than Y could really end up being cases of Y being much faster than X because we can do more to optimize it... 14:46
jnthn fwiw, I'm not surprised that loop comes out faster than for
I somewhat suspect that we'll always have a bit of an easier time optimizing it.
I'd not be surprised if no matter how well we optimize for, loop still manages to edge it. 14:47
Zero-cost abstractions are great when you can get them, but hard. :)
14:50 dakkar joined
mscha I'll file it, yes, with a reduced case. I'm just hoping that it will be possible to optimize the whole Range away. (The compiler could recognize a "for 1..10⁹ -> $i" and optimize it into a "loop (my $i = 1; $i ≤ 10⁹; $i++)", couldn't it?) 14:50
jnthn mscha: We already detect the range case and optimize it a good bit, I believe 14:52
The difference is largely because -> $i { ... } is a closure taking a parameter 14:53
We can't actually the the transform you suggested because it'd mis-scope $i
*actually do
That isn't automatically a problem because in theory if the closure is small we could inline it anyway 14:54
Unfortunately, we can't actually inline closures yet in the MoarVM specializer
mscha Ah, I see. Good point. 14:55
jnthn (It's on the todo list, just not completely trivial to make happen.)
IOninja And we can't transform for 1..10 -> $i {} to {loop (....) {} } to avoid the mis-scope?
jnthn IOninja: Synthesising scopes needs a huge amount of care, since it can break OUTER:: and friends 14:56
IOninja Ah
jnthn So "possibly" but "not without a bunch of analysis"
14:57 Ven left
jnthn The other problem we have to keep in mind is that putting a bunch of fancy optimizations into Perl6::Optimizer can actually make things worse for many cases 14:57
(Because it adds to compilation time of everything) 14:58
samcv IOninja, jnthn any comments on draft style guide for commits? github.com/samcv/rakudo/blob/commi...t-messages
jnthn Well, not so much problem as trade-off
(Stuff needs to be hard to do in spesh to warrant putting it in Perl6::Compiler, essentially) 14:59
Anyway, I'd expect the for/loop gap to shrink once we can better handle closure call optimization and/or inlining.
IOninja samcv: irc.perl6.org? wrong url
samcv that page links to irclog.perlgeek.de 15:00
IOninja samcv: also `Example: Fix foo and bar. This is good because reasons.` should probably not have the period at the end, even if it's outside the code marks
samcv: doesn't for me: "Attackers might be trying to steal your information from irc.perl6.org (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID"
samcv yeah i just removed it
hm. it just redirects for me. will use the actual url
damn hackers! at it again
jnthn samcv: "50 or under" should probably be be "50 or less" 15:01
*be
15:01 Ven joined
jnthn samcv: Those seem like quite typical git guidelines, so seems reasonable enough 15:01
samcv kk cool
IOninja "Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug."" 15:03
That's fine for title but can sound confusing in the body
nine samcv: could you please paste your perl -V somewhere?
IOninja nine: camelia is stuck on an old commit. It needs to nuke somethign. there's a bot message in #perl6 15:04
ZzZombo Remind please, how to print a character by it's Unicode name, like PARAGRAPH SEPARATOR. 15:06
IOninja samcv: my honest opinion on that style guide is it goes into details on somewhat irrelevant formatting minutae but says nothing about how to write USEFUL commit messages.
samcv nine, gist.github.com/8080bdb791210f2ef1...7e3db4a357
ok will go into that more.
maybe you want to write it? 15:07
i'm about to go to bed
IOninja samcv: without making any judgement on the author of this commit... I'd say this is a terrible commit message, but it passes your style guide: github.com/rakudo/rakudo/commit/27...dbf9e129b5
samcv heh 15:08
IOninja samcv: because when the time to do the changelog comes, I'll need to look up the ticket. And then usually wade through several replies on that ticket to figure out what the problem was and at the end I'm often unsure what the ACTUAL problem was that got fixed.
samcv: and another issues with it is if I go to github.com/rakudo/rakudo/commits/nom trying to find a recent commit that affected, say, infix:<xx>, I won't find it because the titles are just a bunch of RT numbers
So to me, I rather have a thousand periods at the end than no description :) 15:09
"samcv │ maybe you want to write it?" 15:10
samcv ...............
IOninja Nah, I don't. I think style guides stifle contributions
15:12 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Revert "Any does not provide .invert"; Zoffix-- 15:12
travis-ci.org/perl6/doc/builds/210056959 github.com/perl6/doc/compare/d3014...2b7269f606
15:12 travis-ci left
nine IOninja: can't find anything in the logs but I guess it's the change of libtommath in MoarVM. Tripped me, too 15:12
15:12 Ven left
IOninja nine: yeah, it is. 15:12
nine Ok, cleaned libtommath and ran git submodule update. Should update on the next commit 15:17
IOninja nine++ thanks 15:20
15:21 BenGoldberg joined, Ven joined 15:23 firestarter joined 15:25 n1ce left, f1r3starter left 15:26 n1ce joined, naxieAlDle joined 15:27 Ven left, Cabanossi left 15:28 Cabanossi joined
mscha m: say (^20).map({ ($_ % 9) || 9 }); say (^20).map((* % 9) || 9); 15:29
camelia (9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1)
(0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1)
15:29 Exchizz joined, Exchizz is now known as Exchizz0rz
mscha Why the difference? (The first one is correct, AFAICT.) 15:29
Exchizz0rz Hi guys :> I'm trying to do the following: $myhash<$somevar> = "cool"; but $somevar is not evaluated, so the key is just $somevar... $somevar is a Str. Do you guys know how I tell it to evaluate the variable so that it uses the content of $somevar as key ? Thanks in advance 15:30
mscha $myhash{$somevar} 15:31
15:34 dakkar left
Exchizz0rz ah awesome mscha, it works ! so <> is only with text and{} when variables ? 15:34
Thanks :)
mscha <> quotes the contents, yes. See docs.perl6.org/language/subscripts for all the details. 15:35
Exchizz0rz Thanks man, I'll look into it, thanks for your help !
nine .tell samcv Still can't reproduce with gist.github.com/niner/7fc21d70805d...0604c7efa2 :/ 15:40
yoleaux nine: I'll pass your message to samcv.
ZzZombo I made progress: 15:41
"The Italian Ufficio Informazioni del Commando Supremo was first permanent footing in 1850 as botanists or archaeologists – more professional tactics of the Topographical & Statistic Department T&SD was discredited through the War Office as the Austrian Empire."
mscha m: say (^20).map({ ($_ % 9) || 9 }); say (^20).map((* % 9) || 9); say (^20).map(((+*) % 9) || 9); # Huh?
camelia (9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1)
(0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1)
(0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1)
15:41 Ven joined
ZzZombo LOL, it looks almost as written by a human! 15:41
samcv i downgraded perl and it works fine 15:45
yoleaux 15:40Z <nine> samcv: Still can't reproduce with gist.github.com/niner/7fc21d70805d...0604c7efa2 :/
samcv i'm using Arch linux
15:46 cdg left
samcv just downgraded to 5.24.0 I head 5.24.1 15:46
i can reproduce 100% of the time, but only on 5.24.1 15:47
downgrade and it all is fine
nine I'm now compiling 5.24.1 again trying to match your flags exactly 15:48
15:49 as_ joined 15:51 as_ left
sergot sjn: have you solved the http::useragent issue somehow? :) 15:51
nine samcv: still no luck. Or too much luck depending on how you see it. 15:52
samcv i can try compiling it myself 15:54
15:54 TeamBlast left
samcv i'm not using perl brew, gonna just compile the PKGBUILD 15:54
15:54 mcmillhj joined 15:56 TeamBlast joined
nine Our perl -V matches almost exactly. Our gcc versions are a mere 3 weeks apart. 15:57
15:57 Ven left
IOninja mscha: the difference is the first one is { ($_ % 9) || 9 } while the second one is { $_ % 9 } 15:59
samcv hmm i recompiled and it's passing 16:00
mscha IOninja: why? The second one has " || 9 " as well? 16:01
m: say (-2..2).map({ $_ || 9 }); say (-2..2).map(+* || 9); 16:02
camelia (-2 -1 9 1 2)
(-2 -1 0 1 2)
16:02 Ven joined
IOninja mscha: it's not part of the whatever closure 16:03
mscha So, it's just thrown away? Without error or warning?
CIAvash mscha: (* % 9) is True, so the result of 「(* % 9) || 9」 is (* % 9) and it gets passed to map 16:04
mscha Ah, I get it/
IOninja mscha: no, it's evaluated
16:09 benchable6 joined, ChanServ sets mode: +v benchable6 16:11 Ven left 16:12 robertle joined 16:17 SCHAAP137 left 16:18 skids joined 16:19 pmurias joined 16:22 SCHAAP137 joined
IOninja <> is for text and allomorphs, {} is for any objects, including once made with an expression or from a variable 16:25
m: my %h{Numeric}; %h<42> = "yo"; dd %h
camelia Hash[Any,Numeric] %h = (my Any %{Numeric} = IntStr.new(42, "42") => "yo")
16:25 Cabanossi left 16:28 Cabanossi joined 16:43 iH2O joined
araraloren m: my @args = 1, 2, 3; True ?? { print $_ for @args } !! (print "132"); 16:44
camelia ( no output )
araraloren m: my @args = 1, 2, 3; False ?? { print $_ for @args } !! (print "132");
camelia 132
araraloren Seems like have a bug .
iH2O sorry to hear that 16:45
16:45 cibs left, mcmillhj left
araraloren :) Hm, it's good to found it, better than no ones knows until .. 16:46
naxieAlDle um, and the bug is? 16:47
6c: my @args = 1, 2, 3; True ?? { print $_ for @args } !! (print "132");
CIAvash m: my @args = 1, 2, 3; True ?? { print $_ for @args }() !! (print "132");
camelia 123
committable6 naxieAlDle, ¦6c (16 commits): «»
naxieAlDle all: my @args = 1, 2, 3; True ?? { print $_ for @args } !! (print "132");
16:47 iH2O left
IOninja sees no bug 16:47
naxieAlDle yea it returns a block, no issue there
committable6 naxieAlDle, ¦all (38 commits): «»
naxieAlDle and in fact, it never worked this way ↑
16:47 cibs joined
araraloren Oh, so it's my mistake.. 16:48
naxieAlDle by the way, do we have any places where a block is automatically called? 16:49
m: { say 42 }
camelia 42
araraloren m: my @args = 1, 2, 3; False ?? { print $_ for @args } !! (print "132"); {print $_ for @args};
camelia 132123
IOninja m: my &code = rand > ½ ⁇ {say "big"} ‼ {say "small"}; say "hi"; code
camelia hi
big
16:49 andrzejku joined
araraloren m: my @args = 1, 2, 3; True ?? { print $_ for @args } !! (print "132"); {print $_ for @args}; 16:49
camelia 123
araraloren Does that have different between ` {print $_ for @args};` and **block** in `True ?? { print $_ for @args } !! (print "132");` 16:51
IOninja naxieAlDle: yeah, I think any place where the block is the whole statement or something and only a bare block 16:52
m: -> { say 42 }
camelia ( no output )
araraloren m: my @args = 1, 2, 3; {print $_ for @args}
camelia 123
16:52 mcmillhj joined
IOninja m: { $ = $^a; say 42 } 16:52
camelia Too few positionals passed; expected 1 argument but got 0
in block <unit> at <tmp> line 1
IOninja heh
araraloren I confused .. 16:53
m: my @args = 1, 2, 3; True ?? { print $_ for @args } !! (print "132"); {print $_ for @args; #`(no output)}; 16:54
camelia 123
araraloren m: my @args = 1, 2, 3; {print $_ for @args #`(output)};
camelia 123
16:56 isBEKaml joined 16:57 mcmillhj left, skids left
araraloren Hm, my mistake 16:57
m: my @args = 1, 2, 3; True ?? { print $_ for @args; #`(no output) } !! (print "132"); {print $_ for @args; #`(output)};
camelia 123
IOninja You do realize that code doesn't tell you which statement ran? All three produce idential output.
naxieAlDle xD 16:58
naxieAlDle had this kind of issue in whateverable tests
araraloren Anyway, It's a expect behavior ? 17:00
s/expect/expected/
IOninja Yes 17:01
17:03 gdonald joined
araraloren OK.. I just regard it as trap, use -> {}() replaced .. 17:04
m: my @args = 1, 2, 3; True ?? -> { print $_ for @args; #`(no output) }() !! (print "132"); -> {print $_ for @args; #`(output)}();
camelia 123123
araraloren Ok that's right now ..
IOninja m: my @args = 1, 2, 3; print True ⁇ @args ‼ '132' 17:05
camelia 1 2 3
IOninja m: my @args = 1, 2, 3; print True ⁇ |@args ‼ '132'
camelia 1 2 3
naxieAlDle IOninja: hehe, you will like this
IOninja scew you then, robot.
naxieAlDle m: (0…∞)[^10].say; (0…∞).is-lazy.say
camelia (0 1 2 3 4 5 6 7 8 9)
True
naxieAlDle m: (0…-∞)[^10].say; (0…-∞).is-lazy.say 17:06
camelia (0 -1 -2 -3 -4 -5 -6 -7 -8 -9)
False
IOninja :)
naxieAlDle or more generally 17:07
m: (∞ … -∞).is-lazy.say
camelia False
naxieAlDle m: (-∞ … ∞).is-lazy.say
camelia True
17:11 agentzh joined
IOninja naxieAlDle: then you gonna like this: 17:11
m: my @a = 1, 6 … 6; say @a[^10]
camelia (1 6 (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any))
IOninja m: my @a = 1, Inf … Inf; say @a[^10]
camelia (1 Inf Inf Inf Inf Inf Inf Inf Inf Inf)
17:11 andrzejku left
naxieAlDle not that surprised actually 17:12
IOninja Really?
Looks like a clear bug to me
Possibly a short-curcuit for Inf RHS
naxieAlDle m: (∞…∞)[^10].say 17:14
camelia (Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf)
naxieAlDle m: (-∞…-∞)[^10].say
camelia (-Inf Nil Nil Nil Nil Nil Nil Nil Nil Nil)
naxieAlDle m: (NaN…NaN)[^10].say
camelia (NaN Nil Nil Nil Nil Nil Nil Nil Nil Nil)
naxieAlDle IOninja: it only thinks that it is .is-lazy if there's ∞ on the RHS. For some reason lazy==infinite, so it keeps going… 17:15
lizmat I guess it boils down to:
m: say Inf.succ cmp Inf
camelia Same
IOninja It's actually the same with Ranges too:
lizmat m: say 6.succ cmp 6
camelia More
IOninja m: my @a = Inf .. Inf; say @a[^3] 17:16
camelia (Inf Inf Inf)
IOninja m: my @a = 5 .. 5; say @a[^3]
camelia (5 (Any) (Any))
naxieAlDle m: say (-Inf).succ cmp Inf
camelia Less
naxieAlDle m: say (-Inf).succ cmp -Inf
camelia Same
naxieAlDle lizmat: nope
IOninja lizmat: so it stops generating only when the .succ is ABOVE the Inf? 17:17
I thought it smartmatched and stopped whne smartmatch is true
naxieAlDle IOninja: no, because it keeps going with -∞…-∞
lizmat I guess that could be considered the bug ?
afk again&
IOninja naxieAlDle: no to what?
naxieAlDle oops, it stops with -∞…-∞
IOninja: no, that's not the condition for it to stop 17:18
IOninja ...
there are multiple possible "that"s
17:18 dmaestro left
naxieAlDle ok, look 17:18
m: say (Inf).succ cmp Inf 17:19
camelia Same
naxieAlDle m: say (-Inf).succ cmp -Inf
camelia Same
naxieAlDle m: (∞…∞)[^10].say
camelia (Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf)
naxieAlDle m: (-∞…-∞)[^10].say
camelia (-Inf Nil Nil Nil Nil Nil Nil Nil Nil Nil)
IOninja What am I supposed to be looking at?
naxieAlDle IOninja: -∞.succ is not above -∞, but it stops anyway 17:21
17:21 eroux left
naxieAlDle the only difference I see is that one is .is-lazy, and the other one is not 17:22
IOninja naxieAlDle: so then YES to the condition for it to stop, because I said it smartmatched. 17:23
17:23 ChoHag left
jnthn It's sequences that use smartmatch, I thought, not ranges? 17:24
Thought ranges uses cmp
IOninja jnthn: we were talking about sequence
jnthn Oh, you are looking at sequences :P
IOninja Or at least I were.
jnthn Yeah, I mis-counted the dots in the fancy pants Unicode operator :P 17:25
17:25 eroux joined
naxieAlDle IOninja: maybe. Smartmatching what to what exactly? 17:25
jnthn Yeah, then I'm not sure what's going on :)
IOninja I know. 17:26
IOninja │ Possibly a short-curcuit for Inf RHS
naxieAlDle let's see the source code…
IOninja Here's the one for Range's bug github.com/rakudo/rakudo/blob/nom/...#L120-L130
17:28 gdonald left, gdonald joined
naxieAlDle well, the sequence thingy is over here, I think… github.com/rakudo/rakudo/blob/f929...rs.pm#L120 17:29
IOninja And here's the one for sequences: github.com/rakudo/rakudo/blob/f190...#L120-L121 17:30
naxieAlDle yea
so sequences are only .is-lazy if the endpoint is ∞ 17:31
OK
I mean, it's stupid, but I can write that down…
17:31 isBEKaml left
IOninja or * 17:31
naxieAlDle rigth
ht
17:33 andrzejku joined, khw joined 17:34 agentzh left 17:37 fir3starter joined 17:39 mcmillhj joined 17:43 mcmillhj left
naxieAlDle IOninja: github.com/rakudo/rakudo/wiki/is-lazy 17:49
17:50 mcmillhj joined 17:55 mcmillhj left
BenGoldberg m: use nqp; say nqp::istype( *>3, Whatever ); 17:59
camelia WARNINGS for <tmp>:
Useless use of ">" in expression "*>3" in sink context (line 1)
0
BenGoldberg m: use nqp; say nqp::istype( (*>3), Whatever );
camelia WARNINGS for <tmp>:
Useless use of ">" in expression "*>3" in sink context (line 1)
0
BenGoldberg m: my $e = (*>3); use nqp; say nqp::istype( $e, Whatever );
camelia 0
BenGoldberg m: my $e = (*>3); dd $e; use nqp; say nqp::istype( $e, Whatever ); 18:00
camelia WhateverCode $e = { ... }
0
18:01 mcmillhj joined
BenGoldberg m: say * === * 18:02
camelia { ... }
BenGoldberg m: my $a = *; my $b = *; say $a === $b;
camelia True
18:02 gk- joined, agentzh joined, gk- left, bbkr left
SmokeMachine jnthn: hi! I was reading your Test::Mock's readme, and you talk about dependency injector... is there any dependency injector that you use in perl6? 18:03
ugexe im trying to think of a way to not do dependency injection in perl6
SmokeMachine ugexe: sorry, I didn't get it... what do you mean? 18:04
TimToady how 'bout not modifying a closed lexical scope? :)
jnthn SmokeMachine: No, I've never felt need to reach for some kind of framework to do that for any of the projects I've written in Perl 6.
SmokeMachine jnthn: I'm asking because I'm writing a dependency injector... 18:05
ugexe SmokeMachine: i mean Perl6 gives you lots of different, easy, ways to accomplish dependency injection and inversion that i'm curious what your problem is
18:05 mscha left
jnthn SmokeMachine: I've used such things a bunch in the C# world in the past. I had somewhat mixd feelings about them. :) 18:05
*mixed
18:06 mcmillhj left
ugexe if you're reading an old java design pattern book or something it might seem confusing 18:06
SmokeMachine ugexe: I'm just studying... I thought that would be a good exercise to write a dependency injector... and I think it's getting beautiful... 18:07
ugexe dependency inversion, not injection, is also what I usually want 18:08
SmokeMachine I'm not sure if it's useful... but I'm liking how it's being written...
jnthn The danger is that we do dependency inversion to decouple things, but using a dependency injection framework then end up coupling to a DI framework in return. 18:09
And while in theory a good DI framework ends up coupled very loosely to the code (like, mentioned in hardly any places)...my expereince was any team that had one would then go and use all the bells and whistles of the darn DI framework to solve all kinds of problems that, frankly, woulda been easier if they'd just written some darn code. 18:10
SmokeMachine ugexe and jnthn: would you mind to take a look at the Injector? github.com/FCO/Injector
jnthn And of course, no two frameworks had the same bells and whistles so you were coupled anyway. D'oh.
ugexe I looked at the example code you wrote with that module and I couldnt grok what was oging on 18:11
jnthn class C2 { has Int $.a is injected
That "is inejected" is an example of coupling
SmokeMachine jnthn: yes, it is...
ugexe: what didn't you understand? 18:12
18:12 mcmillhj joined, Cabanossi left
ugexe grok means i looked at it and couldnt understand any of it intuitively 18:13
jnthn I tended to prefer things that just did constructor introspection, and made instances to pass in
Thing is, in Perl 6 it's dead easy to say
SmokeMachine ugexe: ok... sorry about my terrible English...
jnthn has Some::Dependency $.dep .= new;
And then for tests you can pass in a mock
18:13 Cabanossi joined
jnthn And for production you just end up with the default thing 18:14
ugexe thats what zef does^
jnthn And for cases where there's no sensible default thing, production has to pick anyway
SmokeMachine jnthn: it's not so easy if Some::Dependency is a role...
ugexe Some::Depenendency should be an interface role defining what is required 18:15
SmokeMachine This is another example: github.com/FCO/Injector/tree/master/examples
Using a role
jnthn "should" is a little strong, but yeah, it gives more flexibility...
Oops, I was meant to cook dinner here :) 18:16
jnthn bbiab :)
SmokeMachine bon apetit! Thanks
18:17 mcmillhj left
SmokeMachine If Some::Dependency is a role, probably it will be easier to use it with the Injector than without it... 18:18
ugexe: don't you think? 18:21
fir3starter i'm trying to build rakudo star on windows but get "unknown OS 'msys'". anyone knows how to solve this? 18:22
18:23 mcmillhj joined
ugexe m: role IFace { method work { ... } }; class MyImpl1 does IFace { method work { 1 } }; class MyImpl2 does IFace { method work { 2 } }; my IFace $impl1 = MyImpl1.new; my IFace $impl2 = MyImpl2.new; 18:24
camelia ( no output )
ugexe in this case "IFace" is your Some::Dependency
the actual dependency is MyImpl1 and MyImpl2 though (Some::Dependency is a bad name for this example) 18:25
18:27 mcmillhj left 18:33 pmurias left 18:35 BenGoldberg left
SmokeMachine jnthn: now thinking again, is injected isn't coupling... because if you leave the C2 class as it is, you don't need the injector to instantiate it... you can just C2.new: :42a 18:37
18:37 gk-- joined
SmokeMachine ugexe: my IFace $impl is injected; would work too... 18:40
18:41 gdonald left, gdonald joined 18:44 gk-- left
ugexe why use 'is injected' and some strange injection syntax that is doing regular constructor injection? 18:50
a huge caveat to dependency injection is that is so difficult to follow, even for established DI patterns 18:52
the wikipedia article on dependency injection is a good place to start reading on DI. But you'd probably also want to read about similar patterns (strategy pattern) and dependency inversion 18:55
that should help you refine your idea 18:56
18:56 ChoHag joined 18:59 mcmillhj joined 19:04 TEttinger joined, mcmillhj left 19:06 bjz joined 19:08 fir3starter left
SmokeMachine ugexe: the best motivation of doing that with injector is because with it you can change the injected class how many levels intern you want... 19:08
ugexe: thanks
19:12 mcmillhj joined 19:15 wamba1 left 19:17 mcmillhj left, Exchizz0rz left 19:29 BenGoldberg joined 19:38 mcmillhj joined 19:39 fir3starter joined, risou is now known as risou_awy 19:41 Cabanossi left 19:44 Cabanossi joined 19:46 domidumont left, mcmillhj left
moritz \o 19:53
any objections to deleting github.com/perl6/glr-test-failures-annotated ?
19:59 mcmillhj joined
moritz simply does it 20:01
last activity two years ago, and it's about the long-merged GLR branch of rakudo
20:03 mcmillhj left 20:08 Ven joined 20:10 mcmillhj joined
Woodi_ hallo #perl6 :) 20:12
moritz \o 20:14
moritz has his next perl 6 blog post scheduled for tomorrow 20:15
afterwards there might be about 3 weeks pause, because i'll be on vaction, with unknown Internet connectivity (and other things on my mind)
20:16 mcmillhj left
Woodi_ SmokeMachine: I just know some theory and you already wrote DI framework :) but something to note: injection injects instantiated object of some class and client just use it. but other patterns are usefull too but are more about *creating* objects: simple Factory Method, Abstract Factory, Bridge, Registry and Plugin - as much "framework" as someone wants 20:17
20:17 bjz left
Woodi_ also few days ago somehow I wanted to mention here about Factories and now I could ! ;) 20:17
and I realy like Abstract Factory and Bridge :) 20:19
moritz: so it is scheduled or stil WIP ? :) 20:20
moritz Woodi_: scheduled 20:21
Woodi_ you could just post it. maybe... :) 20:22
moritz Woodi_: I could. But I've kept a weekly post cadence since November at least, and I like the regularity 20:26
20:27 andrzejku left 20:30 lukaramu joined 20:38 eroux left 20:39 mcmillhj joined, risou_awy is now known as risou 20:41 Ven left 20:43 mcmillhj left, ecocode joined 20:47 andrzejku joined 20:53 agentzh left 20:54 dct joined, jeffythedragonsl joined
jeffythedragonsl hey 20:54
yoleaux 4 Mar 2017 11:00Z <IOninja> jeffythedragonsl: RE how hard is it to get a grant: the process involves community feedback and committee voting, with two major questions: (1) is the work needs doing; and (2) can this person do it well. They don't charge you for applying, so you can always try, but IMO your chances of succeeding dramatically increase if you can point at a pile of commits you've already contributed, to show what your
4 Mar 2017 11:01Z <IOninja> jeffythedragonsl: work looks like.
20:56 CIAvash left, jeffythedragonsl left, risou is now known as risou_awy 21:01 bpmedley joined 21:06 andrzejku left 21:07 Ven joined, Ven left 21:09 Ven joined 21:10 emdashcomma left 21:11 emdashcomma joined 21:25 dct left
RabidGravy boom! 21:25
moritz bang! 21:35
21:37 dct joined
DrForr o/' Onomatopoeia / Wouldn't wanna be ya o/' 21:38
21:39 mcmillhj joined, risou_awy is now known as risou 21:42 grumble left 21:43 fir3starter left 21:44 bjz joined, mcmillhj left 21:50 mcmillhj joined 21:54 mcmillhj left 21:57 mcmillhj joined 21:58 risou is now known as risou_awy 22:00 rindolf left 22:03 kyan joined 22:14 mcmillhj left 22:16 emdashcomma is now known as emdashcomma_, emdashcomma joined 22:17 DarthGandalf left, DarthGandalf joined 22:19 dct left 22:20 mcmillhj joined 22:21 BenGoldberg left 22:25 mcmillhj left 22:28 emdashcomma_ left
ugexe I wonder if parallel installation can be brought back if install/precomp used more fine grained file locks (per distribution instead of per CUR) 22:32
22:33 perlawhirl joined 22:34 bjz left 22:38 mcmillhj joined 22:40 dct joined, Voldenet left 22:41 grumble joined, risou_awy is now known as risou 22:45 Voldenet joined, Voldenet left, Voldenet joined 22:54 agentzh joined 22:57 Hotkeys left 22:58 risou is now known as risou_awy 23:11 Cabanossi left 23:13 Cabanossi joined 23:17 mcmillhj left 23:19 mcmillhj joined 23:20 RabidGravy left 23:23 mcmillhj left 23:28 mcmillhj joined 23:33 mcmillhj left 23:37 bjz joined 23:42 Cabanossi left 23:43 Cabanossi joined 23:47 espadrine left 23:50 mcmillhj joined 23:59 mcmillhj left