»ö« 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 Zoffix on 25 May 2018.
00:10 Kaiepi left 00:35 markoong left, markoong joined 00:37 BenGoldberg joined 00:42 markoong left 00:45 wamba left 01:33 zachk left
tbrowder_ jnthn: do you want to read or write 01:42
there’s Text::CSV so you can export and then manipulate data 01:43
01:55 spycrab0 left 02:06 psychoslave_ joined 02:07 eliasr left 02:42 xtreak joined 02:43 epony joined 02:47 ufobat_ joined 02:50 ufobat left 03:00 psychoslave_ left 03:01 xtreak left 03:19 jeromelanteri joined 04:09 xi- joined, kaare_ left 04:14 Sgeo joined 04:33 xtreak joined 04:37 xtreak left 04:46 kaare_ joined 04:51 curan joined 05:20 sno left 05:22 BenGoldberg left 05:29 sauvin joined 05:41 jmerelo joined 05:42 hythm_ joined
hythm_ p6: grammar Deps { token TOP { <dep-name> <space> <condition> <space> <version> }; token dep-name { 'rakudo' }; token condition { '>' | '<' }; token version { '0.0.1' }; }; class Actions { method TOP ($/) { make { dep-name => $<dep-name>.Str, condition => * > *, version => Version.new($<version>.Str) } }; }; Deps.parse('rakudo > 0.0.1', actions => Actions.new).ast; 05:43
camelia ( no output )
hythm_ p6: grammar Deps { token TOP { <dep-name> <space> <condition> <space> <version> }; token dep-name { 'rakudo' }; token condition { '>' | '<' }; token version { '0.0.1' }; }; class Actions { method TOP ($/) { make { dep-name => $<dep-name>.Str, condition => * > *, version => Version.new($<version>.Str) } }; }; Deps.parse('rakudo > 0.0.1', actions => Actions.new).ast.say;
camelia {condition => { ... }, dep-name => rakudo, version => v0.0.1}
05:44 xtreak joined
hythm_ how to make TOP method returns WhateverCode * $condition *, instead of explicit * > * and * < * 05:44
05:45 fake_space_whale left
moritz hythm_: you mean turn the string '<' into callable? 05:46
hythm_ moritz: yes 05:47
moritz m: my $str = '<'; my &op = &::("$infix:<$str>"); say op(1, 2); say op(2, 2)
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$infix:<$str>' is not declared. Did you mean any of these?
&infix:<X>
&infix:<(|)>
&infix:<//>
&infix:<gt>
&infix:<leg>

at <tmp>:1
------> 3my $str = '<';…
moritz m: my $str = '<'; my &op = &::("infix:<$str>"); say op(1, 2); say op(2, 2)
camelia Earlier failure:
No such symbol ''
in block <unit> at <tmp> line 1

Final error:
Type check failed in assignment to &op; expected Callable but got Failure (Failure.new(exception => X::...)
in block <unit> at <tmp> line 1
jmerelo hythm_: I would be grateful if you asked this question also in Stackoverflow. More searchable, would get to more people.
05:47 xtreak__ joined
hythm_ jmerelo: I will add it to stackoverflow as well 05:48
jmerelo hythm_++
05:49 xtreak left
moritz m: my $str = '*'; my &op = &::("infix:<$str>"); say op(1, 2); say op(2, 2) 05:49
camelia 2
4
moritz hythm_: ^^ in general, this how you do a named lookup of an operator
but this doesn't work for <; I'm not sure how the name mangling works off the top of my head 05:50
m: say &[<].name
camelia infix:«<»
moritz m: say &infix:«<»
camelia sub infix:«<» ($?, $?, *%) { #`(Sub+{is-pure}|52066128) ... }
moritz m: my $str = '<'; my &op = &::("infix:«$str»"); say op(1, 2); say op(2, 2)
camelia True
False
moritz ah, that's better :)
hythm_ thanks moritz. basically I have grammar that parse package dependencies of the form or "dep-name > version", dep-name >= version", .... and what I'm trying to do is to get actions class method return "dep-name >= version" as code object so I can use it to compare against available versions. I will write a snippit of what I did so far and will post it here and in stackoverflow as well. in case if there is simple way to achive that 05:57
05:57 wamba joined
moritz hythm_: there is, see my last example above :-) 05:58
the other option is to have a hash of operations 05:59
my %ops = ( '<' => &[<], '==' => &[==], ... );
that way you're not bound to a 1:1 mapping between version specs and Perl 6 operator names 06:00
Geth doc: 201878c865 | (Ben Davies)++ | doc/Language/nativecall.pod6
More documentation on library paths and names
doc: 8994f4fad8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Merge pull request #2140 from Kaiepi/nativecall

More documentation on library paths and names This closes #1513
synopsebot Link: doc.perl6.org/language/nativecall
06:00 fake_space_whale joined
hythm_ moritz: what does the double colon mean in &::("infix:<<$str>>"); 06:02
moritz hythm_: symbol lookup 06:03
06:03 sno joined 06:07 fake_space_whale left
hythm_ moritz: makes sense now, so basically looking up symbol perl6 symbol '>' and store it in &op, and then use it 06:07
would this work if I want to also parse the form pf "0.0.1 > dep-name > 0.0.3" ? 06:08
06:09 mcmillhj joined 06:13 mcmillhj left
Geth rakudo.org: 54b81b15f8 | (Naoum Hankache)++ (committed using GitHub Web editor) | templates/docs.html.ep
http -> https

  perl6intro.com now supports https
06:16
06:19 hythm_ left
Geth doc: 03b47cde3e | Coke++ | doc/Language/list.pod6
rework phrasing slightly.

  (Avoids "it it" construct)
06:26
synopsebot Link: doc.perl6.org/language/list
06:28 Kaiepi joined
Geth doc: 27d885dccd | Coke++ | doc/Language/contexts.pod6
pass xt/links-not-links
06:34
synopsebot Link: doc.perl6.org/language/contexts
Geth doc: b1812c0687 | (JJ Merelo)++ | 2 files
Adds a section for `only`

In the place that was already prepared for it with a =comment. It addresses all cases in roast, and reuses (pretty much) the definition in the synopse. It adds intent and use case also.
This would close #2141 if everyone is satisfied with it.
06:37
06:38 konsolebox left 06:41 konsolebox joined 06:48 robertle joined 06:52 ufobat_ is now known as ufobat 06:55 xtreak__ left 07:09 domidumont joined 07:14 sarna joined 07:16 domidumont left, domidumont joined, psychoslave joined 07:17 hami joined 07:22 dakkar joined 07:34 hami left 07:42 vytautas joined
vytautas Hi, I try perl6intro and get some unexpected output here: pastebin.com/eXYRDy0h 07:47
p6: my $a; my $b; $b := $a; $a = 7; say $b; 07:49
07:49 sno left
camelia 7 07:49
vytautas p6; my $a; $a := 7; say $a; 07:51
p6: my $a; $a := 7; say $a;
camelia 7
vytautas p6: my $a; $a = 7; say $a;
camelia 7
vytautas p6: say 3; 07:52
camelia 3
07:57 hankache joined, rindolf joined
hankache .tell vytautas the issue is due to the REPL. If you write the code on one line in the REPL like this: my $a; my $b; $b := $a; $a = 7; say $b; and hit enter it works. Alternatively you can put it in a file and run it. 08:00
yoleaux hankache: I'll pass your message to vytautas.
hankache .tell vytautas A ticket has already been opened to fix this: github.com/rakudo/rakudo/issues/1565 08:01
yoleaux hankache: I'll pass your message to vytautas.
08:02 zakharyas joined
hankache .tell vytautas I hope you're enjoying Perl 6. Good luck! 08:03
yoleaux hankache: I'll pass your message to vytautas.
vytautas oh thx, IMHO 'quit' should be quite good way to exit too. 08:04
yoleaux 08:00Z <hankache> vytautas: the issue is due to the REPL. If you write the code on one line in the REPL like this: my $a; my $b; $b := $a; $a = 7; say $b; and hit enter it works. Alternatively you can put it in a file and run it.
08:01Z <hankache> vytautas: A ticket has already been opened to fix this: github.com/rakudo/rakudo/issues/1565
08:03Z <hankache> vytautas: I hope you're enjoying Perl 6. Good luck!
08:06 Ven` joined 08:11 HaraldJoerg joined 08:13 zakharyas left 08:15 sena_kun joined 08:16 zakharyas joined
sarna m: enum TrafficLight <red yellow green>; say red + yellow + green; 08:17
yoleaux 3 Jul 2018 17:20Z <lizmat> sarna: that's all water under the bridge
camelia 3
sarna .tell lizmat good to hear :) 08:18
yoleaux sarna: I'll pass your message to lizmat.
08:20 markk_ joined
lookatme Where is the size_t ? I notice it is not mentioned in the new native type documents 08:22
docs.perl6.org/language/nativetype...ntry-int32
It's not clear than old table in Native Calling Interface section 08:23
jmerelo lookatme: please create an issue.
lookatme Okay, I will 08:24
jmerelo I have created a flow chart for the Squashathon: www.draw.io/?lightbox=1&highli...3Ddownload
08:24 sno joined
jmerelo Please check it out and give me any suggestion. Most issues are personal choice, but they are generally the older in the mentioned category. 08:24
squashable6: status 08:27
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 2 days and ≈1 hour (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
08:34 zakharyas left, zakharyas joined 08:42 vytautas left 08:45 domidumont left 08:46 domidumont joined 08:51 scimon joined 08:56 xtreak joined 09:01 xtreak left
jmerelo A flowchart for the next Squashathon: www.draw.io/?lightbox=1&highli...3Ddownload 09:07
(I have changed the URL). Comments and suggestions are welcome.
09:08 mcmillhj joined
sarna jmerelo: link to issue #650 links me to issue #516 09:09
jmerelo: well, other links link to issue #516 as well
09:12 mcmillhj left 09:13 hankache left 09:16 konsolebox left 09:20 spycrab0 joined 09:25 xtreak joined 09:26 imcsk8 left
jmerelo sarna: right. Will fix that 09:27
sarna: fixed. Thanks! 09:30
sarna jmerelo: am I officially a bug squasher now? 09:33
09:33 HaraldJoerg1 joined 09:34 imcsk8 joined
jmerelo sarna: we all are :-) 09:35
09:35 HaraldJoerg left
sarna sweet! 09:35
jmerelo sarna: you know we have the squashathon next (roughly) weekend. It would be great if you could participate, even for a little while. 09:36
sarna jmerelo: yeah, I've been browsing through the issues and trying to find something I could fix 09:37
I'll try my best :^) 09:38
09:40 louisono joined
louisono hi 09:40
I might not be in the right place but is there someone who could help me? 09:42
sarna louisono: go ahead :) 09:43
louisono I am a beginner in both Perl6 and Linux, and I'm trying to run some basic script from bash
sarna `perl6 yourscript.pl6` should work 09:44
louisono I wrote a shebang line '#!/usr/bin/env perl6' at the top of my script
jmerelo sarna: great!
louisono: so far, so good
louisono and try to run it with ./myscript.p6
sarna I think it's `chmod +x myscript.pl6` 09:45
louisono but I get a message that /usr/bin/env : "perl6" is not ok
sarna oh, it's not
louisono the file already has permission for being run 09:47
jmerelo louisono: can you please put the file in a gist, including the error message?
louisono: I assume perl6 has been installed somehow, right?
louisono: you should write "which perl6" and you should obtain something.
louisono yea I followed instruction from the rakudo star site 09:48
jmerelo louisono: try "which perl"
louisono also writing perl6 myscript.p6 works fine
jmerelo If that works, there must be some whitespace somewhere weird. We should have to see the precise error
louisono: that means perl6 is installed alright 09:49
louisono: then it's a weird whitespace character in the line.
louisono which perl6 gives me /home/louisono/rakudo/rakudo-star-2018.04/install/bin//perl6 09:50
is the double slash normal?
sarna double slashes should be ignored (I mean converted to a single slash) 09:52
09:52 sno left
sarna louisono: have you tried `#! /usr/bin/env perl6`? note the space after the hashbang 09:53
louisono just tried it, doesn't work.. 09:55
09:55 scimon left
louisono it says '/usr/bin/env: "perl6": no such file or directory 09:55
09:55 scimon joined
sarna heck. does `#! /home/louisono/rakudo/rakudo-star-2018.04/install/bin//perl6` work? 09:56
louisono oh wait it works now 09:57
with the shebang '#! usr/bin/env perl6' 09:58
sarna :^)
wait, that's weird
louisono I tried sudo ./myscript.p6 it didn't work and now without sudo it works fine
sarna what's the output of `pwd`? 09:59
without sudo
louisono pwd gives me the directory in which my script is
and from which I ran it 10:00
sarna that's really weird then
louisono what should it be? 10:01
sarna there should be a leading slash after the hashbang, ie `/usr/bin/env` 10:02
without a leading slash, it should look for a folder named `env` in your current directory 10:03
(running `pwd` gives you the name of your current directory)
louisono oh yea my bad I mistyped it here, it has the leading slash before usr 10:04
sarna ha! then everything's fine
:)
louisono anyway thanks for the help :)
10:04 konsolebox joined
sarna no worries :^) 10:06
if any new problems should arise, don't hesitate and just ask here
louisono I definitely will 10:07
is there some kind of forum or irc dedicated to perl6 beginner though? 10:08
sarna this channel is for everyone 10:10
as you shall see, I'm a beginner as well
louisono ok, cool :o) 10:11
sarna how have you been learning so far? reading perl6intro? louisono
jmerelo louisono: and you can also try the perl6-users mailing list... and StackOverflow, of course. 10:12
10:13 Ven` left
sarna is still afraid of mailing lists, they seem so official 10:13
jmerelo sarna: you shouldn't be. Lately it's quieter than here, though. 10:14
10:14 donaldh joined
louisono well I read some slides from a presentation by Jonathan Worthington 10:15
sarna oh, that's cool
louisono I began reading perl6 fundamentals too 10:16
10:16 sno joined
louisono and been fooling around with examples from these 10:16
sarna I've been reading it too, it's a bit too dense for me though 10:17
jmerelo wonders if pitching own books is OK 10:20
louisono well it is but I type scripts and test what happens if I change stuff
:jmerelo what's the name of your book? 10:21
10:22 phdphil joined
sarna I'm going through perl6 deep dive now, it's more.. relaxed 10:22
it has some weird typos at times though
louisono haha, title doesn't sound relaxed though 10:23
10:25 lizmat joined
phdphil p6: my&f=(^*).map(*~*);say &f(20) 10:26
yoleaux 25 Jun 2018 07:53Z <jmerelo> phdphil: A lazy list could be infinite. Kind of hard to do combinations on that thing...
camelia (01 23 45 67 89 1011 1213 1415 1617 1819)
phdphil Hmm 10:27
Can anyone explain what .map(*~*) does?
lizmat phdphil: .map: -> $a, $b { $a ~ $b } 10:28
yoleaux 08:18Z <sarna> lizmat: good to hear :)
lizmat weekly: leejo.github.io/2018/07/04/five_years_of_spw/
notable6 lizmat, Noted!
lizmat phdphil: or in english: take 2 values from the thing we're iterating upon, concatenate them, and return that 10:29
10:29 rindolf left
phdphil So if you pass a 2-arg closure then map munches the list in pairs? 10:29
lizmat it munches 2 arguments, a Pair is a single argument with a key and a value 10:30
not sure what you mean though :-)
10:30 BenGoldberg joined
phdphil Sorry, meant two at a time (not Pairs) 10:30
10:31 louisono left
phdphil I had expected it to complain about only having a single argument, so that makes more sense, thanks 10:31
lizmat yes, then the answer is yes
10:32 Ven` joined
lizmat well, if the thing iterated over produces an odd number of elements, it *will* complain 10:32
as it won't get enough elements for the last iteration then
10:33 xtreak left
phdphil p6: say (^10 Z ^10) 10:33
camelia ((0 0) (1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7) (8 8) (9 9))
phdphil p6: say (^10 Z ^10).map(*~*) 10:34
camelia (0 01 1 2 23 3 4 45 5 6 67 7 8 89 9)
lizmat m: dd (^10 Z ^10).map(*~*)
camelia ("0 01 1", "2 23 3", "4 45 5", "6 67 7", "8 89 9").Seq
phdphil So how do we get to this result?
lizmat phdphil: dd makes things clearer
phdphil It does 10:35
Although I still don't understand
Oh wait, yes I do
"0 0" ~ "1 1"
lizmat yup, with "0 0" being the stringification of (0,0)
phdphil Thanks, I was having a bit of a moment 10:36
lizmat you're welcome :-)
sarna how does perl know that the second * is different from the first? in *~*
phdphil It assumes you meant a second argument 10:37
Ven` not sure what you mean? how does it know it's 2 arguments?
lizmat well, it is by definition
sarna yeah, I thought I'd need something like *1 ~ *2
lizmat if you have a WhateverCode construction, then having 2 *'s means 2 arguments
no, you don't 10:38
Ven` the compiler just counts how many of them there are
you can use {$^a ~ $^b}, though
lizmat which is also the disadvantage of WhateverCode construction
sarna oh. what if I want to use the first argument again?
lizmat you cannot refer to the same argument twice in a WhateverCode construction
Ven` sarna: you can't with *.
you can with implicit arguments though.
lizmat Ven`: you mean with $^a ? 10:39
Ven` yes
sarna I get it now, thanks :)
10:39 rindolf joined
phdphil p6: say (^10).map(* xx 2) 10:39
camelia Cannot resolve caller map(Range: Seq); none of these signatures match:
($: Hash \h, *%_)
(\SELF: &block;; :$label, :$item, *%_)
in block <unit> at <tmp> line 1
Ven` don't remember if they're called implicit arguments or something else :P
lizmat Ven`: I usually refer to them as auto-signature generating variables
Ven` too long!
jmerelo sarna: you can use things like $^a and $^b in that case
jmerelo realizes slowness
sarna jmerelo: now I'll remember it for sure! :D 10:40
jmerelo pushes again Squashaton flowchart looking for suggestions www.draw.io/?lightbox=1&highli...3Ddownload
10:44 SyrupThinker joined 10:49 psychoslave left 10:51 zakharyas left 10:59 Ven` left
El_Che jmerelo: you can know perl§ and JS at the same time 11:15
11:18 markoong joined
El_Che and JS + CSS is a common combo 11:19
11:21 kerframil joined
jmerelo El_Che: yep, but it kinda prioritizes issues 11:34
11:39 Ven` joined 11:43 raschipi joined 11:46 xtreak joined 11:49 wamba left 11:58 noganex joined 11:59 Zoffix joined, Zoffix left 12:07 sno left 12:13 noganex_ joined 12:16 noganex left
jkramer m: val Nil 12:19
camelia Value of type Nil uselessly passed to val()
in block <unit> at <tmp> line 1
jkramer Is this error/warning necessary? Wouldn't it be better to silently return Nil?
Also: 12:20
m: val 123
camelia Value of type Int uselessly passed to val()
in block <unit> at <tmp> line 1
jmerelo val 123, val-or-fail => False 12:21
m: val 123, val-or-fail => False
camelia Unexpected named argument 'val-or-fail' passed
in block <unit> at <tmp> line 1
jmerelo m: val(123, val-or-fail => False)
camelia Unexpected named argument 'val-or-fail' passed
in block <unit> at <tmp> line 1
12:22 imcsk8 left
jkramer val 123, :val-or-fail 12:22
m: val 123, :val-or-fail
camelia Unexpected named argument 'val-or-fail' passed
in block <unit> at <tmp> line 1
12:22 imcsk8 joined
jkramer Hmm 12:22
12:22 psychoslave joined
jkramer Oh it's because &val is a multi and the val-or-fail argument is only known to the &val that takes a Str:D, not the ones of other types 12:23
m: val '123', :val-or-fail
camelia ( no output )
jkramer m: say val '123', :val-or-fail 12:24
camelia 123
12:24 psychoslave left 12:25 SyrupThinker left
jmerelo jkramer: right... 12:25
jkramer Anyway I see &val as helper that extracts something useful from a Str of possible and (unless val-or-fail is set) returns the original Str otherwise. So wouldn't it make sense to just return the original value (Nil, Int, whatever) if it can't extract a value from them instead of bashing the user for doing pointless things? :) 12:26
12:26 jmerelo left
buggable New CPAN upload: Object-Trampoline-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/Object::Tram...:ELIZABETH 12:34
12:41 kaare_ left 12:44 sarna left 12:58 wamba joined 12:59 xtreak left, sno joined 13:18 kaare_ joined
Ven` .ask TimToady hey, I was wondering if you uploaded your talk you did a few months back, with the data for each RFCs, the notes, resolution, etc? ty! 13:22
yoleaux Ven`: I'll pass your message to TimToady.
13:27 sno left 13:29 sarna joined 13:38 n1ge joined
masak m: my $x = BEGIN 42; BEGIN say $x 13:41
camelia (Any)
masak m: BEGIN my $x = BEGIN 42; BEGIN say $x
camelia 42
13:42 turdmonkey joined 13:43 a_ joined 13:44 a_ left
jkramer I was looking through the "good first issues" of rakudo and solved two but I don't know what the procedure is so I just pushed them in a fork and added "Fixes <issue in rakudo>" so the commits show up there, I hope that's ok. 13:45
github.com/rakudo/rakudo/issues/1745 and github.com/rakudo/rakudo/issues/1906 13:47
13:48 turdmonkey is now known as Bowlslaw
sena_kun jkramer, you likely should open a pull request. 13:49
jkramer sena_kun: Yes but these are my first commits in rakudo and probably suboptimal so I thought I'd wait for some feedback first 13:50
sena_kun jkramer, from your fork branch(or master if you committed directly there) to rakudo master I believe. Then someone can review it and after (maybe) some changes merge your fixes.
jkramer, you can get the feedback during pull request review, it is for what it was made for. 13:51
raschipi jkramer: The way to ask for review is to do the pull request. 13:52
jkramer Alright :) 13:56
14:00 Zoffix joined
Zoffix jkramer: the only comment is instead of using `quietly` you can just use something cheaper, like `nqp::defined(my \res := $*IN.get) ?? val(res) !! res` 14:01
masak: in the first one the value is generated at compile time, but assigned at runtime, so when you print the var at compile time, the value ain't there yet 14:03
14:03 Bowlslaw left
masak Zoffix: thank you for this unsolicited, but perfectly correct, explanation ;) 14:04
Zoffix jkramer: also, be sure to run `make spectest`
masak Zoffix: I was pretty sure what would happen, but I did some research (first in my shell, then on camelia) for github.com/masak/007/issues/332 14:05
Zoffix masak: if you run random evals in the channel without any explanation, the default is to assume there's an implic question.
implicit
masak Zoffix: yes, you are right. sorry, didn't mean to offend. making that assumption is probably a good default.
Zoffix: I don't know why, but I find the first eval "amusing". maybe because $x *does* get the value 42, but the timing's off 14:06
jkramer Zoffix: Good point, I'll change that and also run `make spectest`, didn't know about that one. 14:10
Zoffix oops :}
Zoffix should be less eager to merge PRs
jkramer Zoffix: Well I can just make a new one :) 14:12
Well I guess &prompt is not turbo-critical in regards to speed :)
Zoffix jkramer: I meant the other one 14:13
make-output | ./my-prompt-script.p6 # turbo-critical here :)
jkramer :D Ok let me just change it and run all the tests 14:14
Zoffix masak: don't remember what it was now, but there's some construct where you can print a variable before it's declared :)
masak well, 14:15
m: say foo; sub foo {}
camelia Nil
jkramer Hmm I'm not too familiar with pull requests, can I just push more commits to my issue-specific branch and they get included in the existing pull request?
timotimo jkramer: that's right
masak m: say &foo; sub foo {}
camelia sub foo () { #`(Sub|81864960) ... }
jkramer \o/
Zoffix m: say foo; constant foo = 42; sub foo {} 14:16
camelia Nil
Zoffix m: constant foo = 42; say foo; sub foo {}
camelia 42
Zoffix :)
masak m: say 2 + 2; sub infix:<+> { $^l ~ $^r }
camelia 22
Zoffix masak: I think it was a variable tho. Something with BEGING time hacking, but maybe the non-detection of it being undeclared was fixed already
I meant a $foo variable 14:17
masak in Java, you can observe some `final` fields in their `null` state
Zoffix m: say BEGIN 2 + 2; sub infix:<+> { $^l ~ $^r }
camelia 4
masak I wonder why that isn't a "use and shadow" error 14:18
like this one
m: my $x = 1; { say $x; my $x = 2 }
camelia 5===SORRY!5=== Error while compiling <tmp>
Lexical symbol '$x' is already bound to an outer symbol;
the implicit outer binding must be rewritten as OUTER::<$x>
before you can unambiguously declare a new '$x' in this scope
at <tmp>:1
----…
Zoffix
.oO( wtf is "the implicit outer binding" )
14:19
masak: because it'd be pretty annoying to have to rewrite all `2+2` into `OUTER::infix:<+>(2, 2)` :) 14:20
masak it's an outer binding which doesn't explicitly look like an outer binding, as `OUTER::<$x>` does
Zoffix Especially since you can easily re-use the same short variable twice, but declaring subs is more... specialer 14:21
14:21 psychoslave joined
Zoffix I guess you'd only need to do it in the same scope where you're defined that sub 14:22
masak m: sub foo { "outer" }; { BEGIN say foo(); sub foo() { "inner" }
camelia outer
5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3{ BEGIN say foo(); sub foo() { "inner" }7⏏5<EOL>
expecting any of:
postfix
statement end
masak m: sub foo { "outer" }; { BEGIN say foo(); sub foo() { "inner" } }
camelia outer
masak I guess I see the distinction, yes
at BEGIN time, there is no shadowing yet
Zoffix Right, it has no idea you're about to deefine it. 14:23
timotimo one-pass-parsing forbids it, right?
Zoffix m: sub foo { "outer" }; { say foo(); sub foo() { "inner" } }
camelia inner
Zoffix m: my &foo = { "outer" }; { say foo(); my &foo = { "inner" } }
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in block <unit> at <tmp> line 1
masak timotimo: well, we *could* keep track and complain later, but by then "outer" would've already been printed 14:24
timotimo mhm
Zoffix m: my $foo = { "outer" }; { say $foo(); my $foo = { "inner" } }
camelia 5===SORRY!5=== Error while compiling <tmp>
Lexical symbol '$foo' is already bound to an outer symbol;
the implicit outer binding must be rewritten as OUTER::<$foo>
before you can unambiguously declare a new '$foo' in this scope
at <tmp>:1…
Zoffix hehe
looks like sub calls are exempt from this rule and the `my &foo` eval tries to call yet-uninitialized symbol 14:25
m: (Mu)()
camelia Cannot find method 'Mu' on object of type List
in block <unit> at <tmp> line 1
Zoffix m: Mu.()
camelia Cannot find method 'Mu' on object of type List
in block <unit> at <tmp> line 1
Zoffix Fine then! Be that way
m: my &foo; foo 14:26
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in block <unit> at <tmp> line 1
masak Zoffix: it's not exactly "sub calls are exempt" -- I thought so too before I implemented it in 007. it's "complaining about undeclared things is deferred until CHECK time, and if at that point it's been initialized as a sub, then no complaint" 14:27
I *constantly* make the mental mistake of thinking "well, we only need to defer checking until the end of the current block" -- but no, you need to defer checking until the end of *all* blocks, that is the end of the compunit, that is, CHECK time 14:28
14:29 sno joined
Zoffix But it's not a complaint about undeclared things? 14:30
14:31 donaldh left
masak sorry, I was referring to the `say foo(); sub foo() { }` case as opposed to the `say $foo; my $foo;` case 14:31
14:32 raynold left 14:36 wamba left 14:41 subroot joined
jkramer m: my $x = Nil; say $x.WHAT eq Nil.WHAT; say $x.WHAT; say Nil.WHAT 14:43
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
True
(Any)
Nil
in block <unit> at <tmp> line 1
Use of Nil in string context
in block…
Zoffix `eq` is the stringy comparison, but you're comparing type objects. 14:44
jkramer Oh right, I thought WHAT was a string with the type name in it :)
Anyway, is it normal that Nil.WHAT is Nil and my $x = Nil. $x.WHAT is (Any)?
Zoffix No, .^name is, but using .^name is the wrong tool for checking if the thing is the same type of object
masak $x ~~ Nil 14:45
Zoffix jkramer: yes, because Nil is a special value that indicates absense of value and assigning it to a container uses container's default value and the default default value is Any for variables
m: use nqp; my $x := Nil; nqp::eqaddr($x, Nil) 14:46
camelia ( no output )
Zoffix m: use nqp; my $x := Nil; dd nqp::eqaddr($x, Nil)
camelia 1
Zoffix (^ that uses binding instead of assignment, so `Nil` is preserved)
jkramer Zoffix: Ah ok, that got me confused because Nil is also a class so I thought a variable with Nil should be an instance of Nil
masak m: say Nil.^name 14:47
camelia Nil
masak m: say Nil.new ~~ Nil
camelia True
jkramer Will push your suggested fix in a couple of minutes, just running spectest again. 14:48
14:49 zakharyas joined
Geth doc: f115cf71e9 | (Elizabeth Mattijsen)++ | 2 files
Introduce index page for 5->6 translation

There was no overview page for Perl 5 to Perl 6 translation. Although the nutshell page came close, I think it grew too large to be used as an entry point, running the risk that people would miss the other pages that deal with Perl 5 -> Perl 6 translation.
This commit introduces 5to-6-overview, which is basically a link to the other pages. The comments section was moved from the nutshell.
14:51
Zoffix jkramer: FWIW, there's also `make stresstest` that runs 153433 top-level tests instead of ~56K that spectest runs. Though `spectest` is sufficient for most things, unless you're changing something that can affect a lot of things 14:52
jkramer Zoffix: Noted, thanks 14:53
Zoffix m: say 169/130
camelia 1.3
Zoffix And it takes 30% more time to run
14:55 Zoffix left
jkramer Regarding lizmat's comment on the other PR, what would be a better fix? Revert the commit and instead add another candidate for the 2-argument version, multi sub round($a, $scale) { $a.Numeric.round($scale) } ? 14:56
Also does Numeric() really add overhead compared to Numeric without () when the argument already is a Numeric?
lizmat jkramer: fwiw, I've ran some benchmarks, and apparently our spesh / JIT has gotten so good, I've not been able to find a difference in performance 14:57
so I have no comments anymore :-)
jkramer lizmat: Alright, thanks! :) I thought it would be weird anyway if Numeric() was slower, since Numeric (presumably) does a type check as well, so assuming Numeric() does the same and just uses the value as-is if it already is a Numeric shouldn't add overhead. But I don't know anything about the internals, so... :) 14:59
lizmat well, it is another runtime typecheck 15:00
which you wouldn't have if there'd be a separate candidate for it
15:01 curan left
jkramer ZofBot: I pushed the change for #1906 15:04
Geth doc: ee0485471e | (Elizabeth Mattijsen)++ | doc/Language/5to6-nutshell.pod6
Remove reference to MAD

The people who know what MAD was, are most likely not interested in Perl 6
  (anymore) anyway. MAD was removed in 5.22, but it already hadn't really
worked since 5.14. Which makes that at least 7 years ago already for this to be even considered a future viable option.
synopsebot Link: doc.perl6.org/language/5to6-nutshell
15:06 Ven` left 15:10 Ven` joined 15:14 jmerelo joined
jmerelo squashable6: status 15:14
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in 1 day and ≈18 hours (2018-07-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
15:15 fake_space_whale joined, blackberry9900 joined 15:18 sena_kun left
raschipi Can synopsebot be made to wait until Geth is finished to send the links? 15:19
Geth doc: 22f15f6bb4 | (Elizabeth Mattijsen)++ | doc/Language/5to6-overview.pod6
Hopefully fix broken links?
15:20
synopsebot Link: doc.perl6.org/language/5to6-overview
15:21 blackberry9900 left
lizmat synopsebot: help 15:21
synopsebot lizmat, See: github.com/perl6/synopsebot
lizmat raschipi: ^^^ :-) 15:23
Should we mention Perl 6 books on docs.perl6.org ? github.com/perl6/doc/issues/2143 15:27
AlexDaniel jmerelo: a lot of search issued just need some X<> tags, no javascript knowledge required 15:28
jmerelo: or at least that's how it used to be in the past
15:28 robertle left 15:31 perlpilot joined, troys joined
AlexDaniel jmerelo: also it never says “check the issue list” or something like that 15:32
jmerelo: picking up a random page is not very efficient I think
jmerelo AlexDaniel: yep, that's true. But if there's JS, it's there. 15:34
AlexDaniel: do you mean it should never say that?
lizmat: maybe. good idea. 15:35
AlexDaniel jmerelo: ah… hm… it's in “would love to, but have no time to learn perl 6”. That's kinda sad :)
jmerelo AlexDaniel: any alternative? 15:36
15:36 subroot left
AlexDaniel jmerelo: I think it should say “read perl 6 introduction and something something” 15:37
jmerelo AlexDaniel: my alternative would be single-author pages; those are the ones that need the most revision.
AlexDaniel jmerelo: except that we don't have that on docs.perl6.org
jmerelo: “do you know perl5?” yes → “read 5to6 docs and report/fix any issues”
jmerelo AlexDaniel: Well, the whole point of that is they don't want or don't care to learn, but we still need them. Finding typos would be a good place to start
AlexDaniel yes but finding typos in introduction docs, so that it's a win-win for all of us :) 15:38
jmerelo AlexDaniel: OK, I can do that.
AlexDaniel: but I don't know what's introductory in perl6/doc. Maybe start with the biggest pages, the oldest or the ones with a single-author in perl6/doc. I can pick one of them randomly.
AlexDaniel: will add the perl thing.
AlexDaniel jmerelo: for the rest, perhaps just point to docs.perl6.org/language.html and suggest to read anything they like? 15:40
Geth doc: d7dfc2b400 | (Elizabeth Mattijsen)++ | doc/Language/5to6-overview.pod6
Fix perlsyn link
15:42
synopsebot Link: doc.perl6.org/language/5to6-overview
jmerelo AlexDaniel: OK
AlexDaniel: done. Can you please check? 15:45
AlexDaniel jmerelo: where? 15:46
ah I see
jkramer Would this be the appropriate place and way for testing #1745? gist.github.com/jkramer/072d3b3ffb...1d2ebb6920
jmerelo AlexDaniel: www.draw.io/?lightbox=1&highli...3Ddownload
jkramer (In the perl6/roast repo) 15:47
Geth doc: 11a0662a31 | (JJ Merelo)++ | doc/Language/nativetypes.pod6
Some reflow and minor fixes
synopsebot Link: doc.perl6.org/language/nativetypes
16:02 psychoslave left
jmerelo Help with native: stackoverflow.com/questions/511775...-in-perl-6 16:06
16:08 Zoffix joined
Zoffix jkramer: FWIW, there's also #perl6-dev that has a higher dev-over-user ratio, so more eyes might notice your dev questions :) 16:09
raschipi This channel has a bigger dev-to-user ratio regarding the docs, though. 16:10
Zoffix yeah 16:11
16:14 AlexDaniel left, FROGGS joined
Altreus is it common to have t/lib like in perl5? 16:15
16:15 BenGoldberg left
jkramer Zoffix: Just joined. :) Regarding your comment about the test description, I was wondering about that too but decided to just imitate the existing tests right above the ones because I was unsure about it :) 16:15
Zoffix jkramer: the rule of thumb for finding where to put tests: `tree -f | grep -i CONCEPT_OR_ROUTINE_NAME_YOU'RE_TESTING` if did not find the file, `grep -FIRn ROUTINE_NAME_OR_THING_YOU'RE_TESTING .`, if still not found: "is it a bug fix?" stick into one of MISC/bug-coverage* files where -stress.t is for lengthy bugs or bugs that are not very likely to easily regress, .t is for those that might regress easily, and
-6.d.t is for 6.d bugs. Otherwise, just aim for the most appropriate dir, create a new test file, and add it to the list of files in rakudo: github.com/rakudo/rakudo/blob/mast...ctest.data
jmerelo Altreus: yep, it's found in some places... 16:16
Altreus cool, a familiar mechanism
I can dig it
16:16 domidumont left
Altreus I can't find documentation on what unit means... anyone know offhand? 16:19
MasterDuke docs.perl6.org/syntax/unit 16:20
lets you remove a level of indentation from a file 16:21
jmerelo Altreus: it's basically a way of declaring stuff and save curly braces
Altreus makes sense
:)
jkramer Zoffix: Are the tests sufficient for #1745 (to get closed) though? 16:22
Zoffix R#1745
synopsebot R#1745 [open]: github.com/rakudo/rakudo/issues/1745 [consistency][easy to resolve][good first issue][testneeded] [RESOLVED; NEED TEST] &round inconsistent on types of arguments.
Zoffix jkramer: closed. Thanks. 16:23
The prompt() one will also need docs, before closing it tho
jkramer \o/ My first completed issue!
Zoffix jkramer++
jkramer Zoffix: Yup I'm adding tests for prompt now, almost forgot about docs :) 16:24
Zoffix So what dictates that it's too late for `unit`?
m: sub foo {}; unit class Bar;
camelia ( no output )
Zoffix That's fine, but this isn't:
m: class foo {}; unit class Bar;
camelia 5===SORRY!5=== Error while compiling <tmp>
Too late for unit-scoped class definition;
Please use the block form.
at <tmp>:1
------> 3class foo {}; unit class Bar;7⏏5<EOL>
jmerelo Zoffix: once you've declared class with curly braces, you don't need to save them any more. You wasted two perfectly good braces, and the compiler punishes you for that. 16:25
16:25 fake_space_whale left
Zoffix jmerelo: hm? 16:26
16:26 dakkar left
Zoffix jmerelo: I'm declaring two classes, which is forbidden, yet a sub and a class is allowed 16:26
m: sub foo {}; unit sub MAIN;
camelia ( no output )
Zoffix Or two subs where one is MAIN
jmerelo Zoffix: just kidding (and following my definition of unit above).
16:27 FROGGS left
jmerelo But you're right, it's weird. 16:27
m: class foo {}; unit sub MAIN;
camelia 5===SORRY!5=== Error while compiling <tmp>
Too late for unit-scoped sub definition;
Please use the block form.
at <tmp>:1
------> 3class foo {}; unit sub MAIN;7⏏5<EOL>
jmerelo Zoffix: it's always too late after declaring a class. 16:28
16:28 Khisanth joined, robertle joined 16:30 scimon left 16:31 scovit left, sena_kun joined 16:35 ambs joined, ambs left
Zoffix Filed R#2020 and D#2148 16:37
synopsebot R#2020 [open]: github.com/rakudo/rakudo/issues/2020 [@LARRY] What makes `unit` be too late?
D#2148 [open]: github.com/perl6/doc/issues/2148 [docs] Error in the docs for `unit` declarator
16:39 Ven` left 16:41 ambs joined
robertle Zoffix: the two first module packages we need in debian are perl6-tap-harness and perl6-zef. typically it's a good idea for someone "upstream" to review some of the packaging. would you mind having a look at salsa.debian.org/perl6-team/module...p-harness? 16:42
most notably debian/copyright and debian/control. the latter could probably also benefit from better short and long descriptions. 16:43
but I suck at descriptions ;) 16:44
Zoffix robertle: yeah, looks good to me 16:45
robertle if anyone has opinions on salsa.debian.org/perl6-team/modules/perl6-zef, then I would be happy to hear about that as well! 16:47
raschipi robertle: I have some packaging experience, I will review it if you want too, bu I'm not 'upstream'
robertle any review is welcome!
Zoffix robertle: how do you come up with people to put into "Copyright" info? 16:48
robertle in the case of zef, I also have a more technical question: how is the installation of executables meant to work? zef would by itself install them somewhere under site/vendor. but that isn't normally in anyones PATH. so is the idea that people need to add the corresponding dirs to their PATH?
Zoffix: first one or two contributors from the github page. which isn't ideal... 16:49
Zoffix ah ok. I just noticed I made it into the list for tap harness with only 8 commits, but tony-o didn't make it to zef, with 72 commits :)
robertle right, that sounds weird 16:50
raschipi robertle: I think the correct thing to do is to create a link in /usr/local/bin
robertle I'll find a better metric
jmerelo robertle: executables are compunits, and theoretically where compunits are installed should be transparent to the user. So I'm not really sure.
robertle jmerelo: yes, that would be fab. but can I convince zef to call some post-install hook or so?
raschipi jmerelo: He's talking about executable, hence the mention of PATH 16:51
modules will be found by p6 itself. apps, in the other hand, have to be found by the shell
robertle executable compunits are already treated specially by zef, they do end up in a predictable location
jmerelo robertle: I'm pretty sure zef has some clever way to deal with executables. But installation of them is something more than just copying files to location, it involves precompilation and precomp stores and stuff. 16:52
robertle but not one that is typically in the PATH
right, the precomp of modules we have covered. I just need some way to affect where the executables end up, or even better a post- intall/remove script that can create/remove symlinks
I can cobble something together, just wondering whether there is a recommended way 16:53
jmerelo robertle: CompUnits include an "uninstall" feature. And I'm pretty sure there's some recommended way, but if it's not in zef documentation, it's better to ask there...
robertle Zoffix: another thing regarding the copyright files: we really prefer real names in copyright files, would you mind that? 16:55
raschipi Taking into account that zef is a depedency of distro packages already due to precomp, I think that if zef doesn't know about it, it should learn. This way it can give accurate results when users ask it where the stuff is. 16:56
Zoffix robertle: just remove me instead. I don't even remember what commits I made to that module
robertle fort distro packages themselves we (debian) actually do not use zef, but install-dist.pl that comes with rakudo 16:57
in distro packages the binary is also not a problem, because we know what we are installing and can create the symlink
it's just the case when root uses zef to install non-distro but site-wide modules that contain executables
16:59 domidumont joined
raschipi I see. That's much easier to solve. 17:01
So zef should learn to create links in /usr/local/bin.
robertle domidumont: just the man! do you have an opinion on how to get executables installed by zef into a PATH?
Geth doc: 917a52afe3 | (Jonas Kramer)++ | doc/Type/IO.pod6
Update &prompt docs according to the changes introduced with rakudo/rakudo#1906.
17:03
synopsebot Link: doc.perl6.org/type/IO
RAKUDO#1906 [open]: github.com/rakudo/rakudo/issues/1906 [RFC][docs needed][easy to resolve][good first issue][testneeded] [RESOLVED; NEED TEST] &prompt should pass stuff through `val`
17:06 scovit joined
Geth doc: 6e3c746efc | (Jonas Kramer)++ | doc/Type/IO.pod6
Revert "Update &prompt docs according to the changes introduced with rakudo/rakudo#1906."

This reverts commit 917a52afe3ed70edf429001d42f7d856242e883d.
Reverted because the change is not released yet. My fault, sorry!
17:11
synopsebot Link: doc.perl6.org/type/IO
RAKUDO#1906 [open]: github.com/rakudo/rakudo/issues/1906 [RFC][docs needed][easy to resolve][good first issue][testneeded] [RESOLVED; NEED TEST] &prompt should pass stuff through `val`
Zoffix jmerelo: jkramer: I'd just put it in with "as of Rakudo 2018.07, prompt will create L<allomorphs|/language/numerics#Allomorphs> for numeric values". 17:17
(and soonish we'll have some metadata-based stuff to mark this with, I think; we'll need to, for 6.d)
jmerelo Zoffix: you mean on the documentation? That would be great, but it's major. Refactoring everything in the documentation, basically. 17:18
Zoffix jmerelo: so is 6.d :)
Geth doc: 166afeaf4a | (Zoffix Znet)++ (committed using GitHub Web editor) | CONTRIBUTING.md
Remove suggestion to wait for Star releases

  - Only 25% of users use Star, so waiting for something is requesting
bookkeeping (i.e. trying not to forget to document it when the time comes) for the benefit of a minority of users.
  - "technically" the stuff in the docs is meant to be compiler-neutral, so it's
very weird to have a CONTRIBUTING instruction that indicates a specific distribution of a specific compiler
17:21
domidumont robertle: IIRC third party executable should land in /usr/local/bin, i.e. executable installed by zef should land there
Zoffix oh shit
Zoffix that was meant to be a PR
jmerelo Zoffix: no problem. 17:22
robertle domidumont: ok, but how? do we patch zef for debian? have a config or so in zef proper?
jmerelo Zoffix: you are probably right, too.
domidumont robertle: where do the executables installed by zef land by default ? 17:24
jmerelo Zoffix: what you mention about versions is in this issue github.com/perl6/doc/issues/302 created by [Coke]. Specification is not done, as far as I can see. 17:25
domidumont robertle: anyway, we'll patch zed if needed, although I would prefer a configuration option 17:26
jmerelo Zoffix: it would probably need a big overhaul of the whole document generation thing, as in generating different versions of the documentation for different releases. Would make it more difficult to contribute...
Zoffix: so, baseline is, I don't know. If we had a 3-person full-time devoted to the documentation, I would say "go for it". But... 17:27
raschipi jmerelo: most of the time it works the other way around, create the work and volunteers will come. Just need to make it keep working in the meantime. 17:29
Zoffix jmerelo: It's not different versions of documentation. We can have tagged blocks: =for :lang<6.d+> :early-impl(Rakudo => 2018.06)␤Attempts to create allomorphs for numeric data 17:30
And the htmlfiy will just stick blocks with classes, that then can be styled/manipulated with JS. 17:31
robertle domidumont: /usr/lib/perl6/site/bin
jmerelo raschipi: not really. There's a certain elasticity in the demand, mainly because most people who create issues are also able to work on them. But that scales up to a certain size. 17:32
17:32 Kaiepi left 17:33 Kaiepi joined
jmerelo Zoffix: please add that to the discussion of the issue. I understand that's only for code. 17:33
Zoffix jmerelo: what do you mean only for code?
jmerelo Zoffix: well, =for is currently used for code only. But I guess it could be used for any kind of paragraph... 17:34
raschipi: major issues need a cluster of person-hours to fix. And that cluster is simply not there for the time being. 17:35
Zoffix jkramer: oh forgot to mention: don't include "uses val" in the description. That will make people assume they can override `val` and get different behaviour, so it's best to just describe what's being done (e.g. "creates allomorphs") or say *equivalent to* ("equivalent to calling val"). This way we can change the implementation if we have to in the future without breaking users' expectations
jmerelo: no, `=for code` is for code, `=for` is for paragraphs
jmerelo Zoffix: Ah, ok, great. Anyway, please contribute to that discussion, it will help to have stuff fixed in a single place. 17:36
Zoffix: I guess it's not so big if we don't have to retrofit all existing documentation, but use it only for new features.
Zoffix Well, we'll also have to go through and convert the "as of Rakudo blah blah" to the tagged versions 17:37
jmerelo Zoffix: I guess so.
Zoffix: that would be major, though. 17:38
Zoffix And the whole early-documentation is actually one of the problems that needs solving: "technically" prompt making allomorphs isn't required by The Perl 6 Language. Rakudo can do whatever it wants, but it won't become part of The Language until 6.d is released, so this stuff shouldn't even be in the docs in the first place.
domidumont robertle: users won't easily find programs in /usr/lib/perl6/site/bin . Patching zef is the safest option
jmerelo domidumont: do you mean patching zef for the Debian release? 17:39
domidumont jmerelo: yes
Zoffix Probably can just use the same tagging format to tag implemented-prop-specced-behaviour and it won't get out of hand, if we keep true to releasing minor spec versions quarterly.
jmerelo domidumont: OK, that makes sense.
domidumont Otherwise, all users wanting to use programs installed by zef will have to tweak their PATH
jmerelo Zoffix: that would make sense.
raschipi Especially because the FHS already have a directory specifically meant for this, and distros already set it up so the user doesn't need to take further action. Not using it breaks expectations. 17:42
17:55 Kaiepi left 17:56 Kaiepi joined
raschipi zef should also be able to install in /usr/local/games in case it applies 18:02
18:03 thowe joined 18:08 lizmat left 18:10 zakharyas left 18:17 lizmat joined
Geth doc: 834b3030a6 | (JJ Merelo)++ | doc/Language/structures.pod6
Minor reflow and rephrasing
18:17
synopsebot Link: doc.perl6.org/language/structures
Geth doc: b9f9757a7c | (JJ Merelo)++ | doc/Language/hashmap.pod6
Fixes bad pod
18:26
synopsebot Link: doc.perl6.org/language/hashmap
SmokeMachine Sorry, but I was wandering... why SetHash is called SetHash? Wouldnt something like MutableSet make more sense? 18:31
Zoffix Map -> Hash, Set -> SetHash 18:32
raschipi Naming is hard. As long as it works, it's fine. 18:33
SmokeMachine every time I have to use it I first try HashSet... than change to SetHash... 18:34
lizmat SmokeMachine: the name has been the source of a loooong discussion 18:36
Zoffix SmokeMachine: seems like naming it "MutableSet" wouldn't help with that particular problem :) 18:37
lizmat and I seem to recall having to change the name twice since 2012 when I got involved with Rakudo Perl 6
Zoffix :)
lizmat SmokeMachine: in any case, if you like MutableSet better than SetHash, simply do"
m: constant MutableSet = SetHash; my %h is MutableSet; %h<a> = True; dd %h 18:38
camelia SetHash.new("a")
SmokeMachine Zoffix: SetMutable doesnt work on my head... so that would work... :)
lizmat: yes I going to use that next time! :) 18:39
thanks!
lizmat hmmm...maybe we should have a books.perl6.org (like www.perl.org/books/library.html) 18:42
hmmm... LTA error following that first link :-)
perlpilot lizmat: +1 18:43
Zoffix lizmat: how about perl6.org/books in line with perl6.org/resources ?
lizmat well, the books.perl.org redirects as well, so...
metacpan.org/pod/distribution/perl...rlbook.pod # inspiration, also D#24 18:44
Zoffix It just blocks me in my browser, saying here be dragons.
synopsebot D#24 [closed]: github.com/perl6/doc/pull/24 fix 1 reported issue with p6doc eval breakage and fix p6doc under star
lizmat Grrr
D#2143
synopsebot D#2143 [open]: github.com/perl6/doc/issues/2143 [docs][meta][new] No books mentioned in Perl 6 documentation
18:46 kerframil left 18:47 jmerelo left
Zoffix ugh... ===SORRY!=== 18:50
P6M Merging GLOBAL symbols failed: duplicate definition of symbol DocLinks
what's that aboot? 18:51
also, where :|
lizmat Zoffix: when does that happen ? 18:53
Zoffix lizmat: R#2021 18:56
synopsebot R#2021 [open]: github.com/rakudo/rakudo/issues/2021 [LTA] Bad error "P6M Merging GLOBAL symbols failed: duplicate definition of symbol DocLinks"
SmokeMachine m: class MutableSet is SetHash {}; my %a is MutableSet = 1, 2; %a<3> = True; dd %a
camelia MutableSet.new(2,IntStr.new(3, "3"),1)
Zoffix lizmat: I just now noticed that I forgot to change the name of the class, so this one was pretty easy to find, but a location information would be better
SmokeMachine m: class MutableSet is SetHash {}; my %a is MutableSet = 1, 2; %a{3} = True; dd %a
camelia MutableSet.new(1,3,2)
lizmat SmokeMachine: that also works, but may have some short-term performance issues 18:57
but yes, then you'd have the name in there as well
SmokeMachine lizmat: yes
perlpilot or ... you could just use SetHash enough that you get used to it ;) 18:58
SmokeMachine perlpilot: I already used it a lot... I should continue tying... :) 18:59
lizmat m: constant A = SetHash; BEGIN A.^set_name("A"); my %h is A; %h<a> = True; dd %h # slightly more evil and action at a distance :-)
camelia A.new("a")
lizmat SmokeMachine: ^^ 19:00
SmokeMachine lizmat: I was trying something like that... but didnt work... :( 19:03
m: constant MutableSet := SetHash but role :: { method ^name {"MutableSet"}}; say MutableSet # doesnt work
camelia Potential difficulties:
Useless declaration of a has-scoped method in role (did you mean 'my method name'?)
at <tmp>:1
------> 3tableSet := SetHash but role :: { method7⏏5 ^name {"MutableSet"}}; say MutableSet #
(SetHash+{<an…
Zoffix m: constant MutableSet := SetHash).HOW does role :: { method name(|) {"MutableSet"} }; MutableSet.^name.say 19:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3constant MutableSet := SetHash7⏏5).HOW does role :: { method name(|) {"Mu
Zoffix m: (constant MutableSet := SetHash).HOW does role :: { method name(|) {"MutableSet"} }; MutableSet.^name.say 19:06
camelia MutableSet
SmokeMachine Zoffix: :)
lizmat I think the "is SetHash" method would be quicker and easier to understand :-) 19:07
SmokeMachine lizmat: use MutableSet; :P 19:08
19:09 domidumont left
SmokeMachine a role does not add ^methods on a metaclass when does'ing? 19:11
Zoffix "Cannot invoke object with invocation handler in this context"
ugh, why did I went to implement this feature...
SmokeMachine: I'm not quite sure `method ^foo` is some specced thing for overriding meta methods. 19:13
It might be working by accident
19:13 wamba joined 19:14 sarna left
SmokeMachine Zoffix: I think I already saw a special treatment for that somewere on the rakudo code... 19:14
Zoffix SmokeMachine: just because rakudo does something, doesn't mean it's part of the language. 19:15
Rakudo has dispatch:<.?> methods, but those aren't spec and just an implementation detail that definitely cannot be relied upon
What does "Cannot invoke object with invocation handler in this context" mean? 19:16
Or rather, what could the cause be?
SmokeMachine so, isnt MetaModel::MetamethodContainer official?
*Metamodel::MetaMethodContainer 19:17
Zoffix SmokeMachine: it might've been intented to be, but it doesn't feature in The Perl 6 Language Specification, so it's not part of the language. 19:18
19:19 HaraldJoerg1 is now known as HaraldJoerg 19:20 ChoHag_ joined 19:21 ChoHag left
lizmat jmerelo++ # news.perlfoundation.org/2018/07/gra...and-i.html 19:22
Zoffix raschipi: I tried implementing the geth waiter feature, but it's too annoying: github.com/perl6/synopsebot/commit/3eaf934046 19:25
19:29 zachk joined, zachk left, zachk joined 19:30 Khisanth left 19:42 Khisanth joined 19:44 perlpilot left 19:47 Kaiepi left, Kaiepi joined
lizmat weekly: rpubs.com/jjmerelo/p6survey-documentation-score 19:49
notable6 lizmat, Noted!
19:49 psychoslave joined 19:52 ufobat left
lizmat Zoffix: wouldn't a simple "sleep 10" be enough ? 20:10
Zoffix lizmat: that was my first though, but then it'd have this delay when Geth stopped talking and before the links to issues pop up... 20:12
lizmat hmmm...
20:16 AlexDaniel joined 20:21 dct joined 20:24 raymond joined 20:25 raymond is now known as Guest96817, Guest96817 left 20:27 benjikun joined 20:29 benji__ left 20:35 dogbert17 left 21:10 robertle left 21:12 BenGoldberg joined 21:19 gabiruh joined 21:29 raschipi left 21:45 markoong left 21:46 markoong joined 21:50 markoong left 22:04 sena_kun left 22:05 rindolf left
Geth p6-sake: coke++ created pull request #21:
Make 'default' the default task
22:12
22:12 HaraldJoerg left
[Coke] AlexDaniel`: github.com/perl6/p6-sake/pull/21 22:14
AlexDaniel Yeah, I'm looking at it :)
yoleaux 15:49Z <Zoffix> AlexDaniel: FYI there's a M#892 that's IMO a Rakudo release blocker
synopsebot M#892 [open]: github.com/MoarVM/MoarVM/issues/892 [⚠ blocker ⚠] Windows failures: `rc\jit\x64\emit.dasc:2892: error: missing operand size in `mov x?,i?'`
22:15 perlpilot joined
Geth p6-sake: 412b09c6c4 | Coke++ | 3 files
Make 'default' the default task

Closes #15
22:17
p6-sake: 8540b55da6 | (Aleks-Daniel Jakimenko-Aleksejev)++ (committed using GitHub Web editor) | 3 files
Merge pull request #21 from coke/master

Make 'default' the default task
Altreus So I tried predeclaring a class but it just complains that it never gets a definition gist.github.com/Altreus/4e151a1726...7d33ef5cbb 22:19
The following packages were stubbed but not defined: API::Discord::API::Discord::Connection
timotimo you have an API::Discord too much, no?
22:20 benjikun2 joined
Altreus well I'm realising I've defined an entire namespace and I am not sure about how to make this also a class :P 22:20
22:20 benjikun left
Altreus maybe I just don't need unit module at all? 22:20
I confess I have not learned much from the docs on modules
timotimo i think it'll be enough to remove one API::Discord from the implementation part 22:21
Altreus removing the unit module line, I get the same error but with the expected removal of one level of namespace
rather, two levels
timotimo since by virtue of being inside API::Discord, its long name will already have an API::Discord in front 22:22
so i think you're actually implementing API::Discord::API::Discord::API::Discord::Connection
Altreus well
I have updated the gist, and now I get The following packages were stubbed but not defined: API::Discord::Connection 22:23
but still
surely the class name I predeclare and the class name I implement should match, in the same scope?
timotimo you still have class API::Discord::API::Discord::Connection is export {
Altreus wups
timotimo did it still error when you change that to class API::Discord::Connection?
Altreus :)
I forgot I did that
I added that because of the original error
timotimo right
Altreus right, that did it 22:24
why did the `unit module` line have this effect?
22:24 benjikun2 is now known as benjikun
Altreus I mean surely with or without that line it would look for the same name in the same place? 22:24
timotimo "unit module blah" is almost exactly like "module blah {" and "}" around the whole file
if that helps
Altreus yes I learned that earlier on :) 22:25
timotimo OK
Altreus basically
timotimo i think the difference is that the thing after the "class" keyword is the name of the class, and "is export" means that exact name will land in the "use"r's scope
Altreus If I do that, it says I declared API::Discord::API::Discord::Connection but did not define it
timotimo if you have something declared "our", it'll also be available inside the package of that name, i.e. "our sub foo { }" ought to be available as API::Discord::foo even though it's not "is export" 22:26
Altreus oaky
but still I'd like to understand why I can't actually define API::Discord::Connection if I predeclare it within a module namespace 22:27
22:27 perlpilot left
timotimo can you update the gist again? 22:27
[Coke] you define it as "Connection" inside, no?
Altreus I can
timotimo if i understood correctly, it does work now?
Altreus I have a working version 22:28
I'm now trying to understand a bit more :)
So the version currently in the gist doesn't work
and I do not understand why
(the presence of `unit module API::Discord;` is now academic)
timotimo if you use cro as an example, they have "unit module Cro::Something::Blah" inside Cro/Something/Bla.pm6 22:29
[Coke] why are you using module -and- class?
timotimo and then "class SomethingOne { }" and "class SomethingTwo { }"
Altreus [Coke]: as I mentioned, I have learned very little from the documentation on modules
Coming from perl5, I'm very confused as to when I should use each of those structures and why 22:30
I have just now learned I don't need to use the module line
which is why putting it there is an academic exercise
because I want to understand why, by adding it, my implementation of the class can no longer be found 22:31
[Coke] because now it's two levels of namespace down.
Altreus Why is the same namespace not applied to both the forward-declaration and the implementation?
I would have expected the scope of the file to imply that namespace on all such identifiers 22:32
The error shows clearly that it has added the module namespace to the forward-declaration but has not used the namespace in scope to find the actual implementation
and when I add the rest of the namespace to the implementation, it still doesn't find it 22:33
[Coke] ok. I see the interaction you're talking about. You'd expect it to be in both cases or neither. But: "don't do that" and it won't hurt. 22:35
Altreus :)
don't over-namespace classes
[Coke] but please feel free to open a github ticket in rakudo calling out that inconsistency.
Altreus will do
a class is not the only thing I can forward-declare, is it? 🤔 22:36
might have to make some test files 22:37
hmm I can't reproduce it in a small file 22:40
SmokeMachine is there something like this (github.com/jamiebuilds/babel-handb...-sub-node) for QAST? 22:41
is it? github.com/rakudo/rakudo/blob/mast...r.nqp#L918 22:46
22:49 kjk joined 22:53 g- left 22:56 psychoslave left
timotimo SmokeMachine: children of a node are exposed with an array-like interface 22:59
so $foo[1] would be the second child of $foo, if it's a QAST node
23:03 konsolebox left 23:05 stmuk joined 23:21 benjikun2 joined 23:25 benjikun left 23:27 MilkmanDan joined 23:37 thowe left 23:38 Zoffix left 23:43 blackberry9900 joined