»ö« 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.
Thrush I find myself really enjoying learning and using Perl 6. However, I haven't been able to install IO::Glob on my Rakudo Star installation. (I'm using Windows.) For some reason, when I type "zef install IO::Glob", Microsoft's web browser pops up. 02:15
AlexDaniel Thrush: I don't use windows so can't help unfortunately, but can you install other modules? 02:18
titsuki zef(rakudo-star 2017.10) itself seems to have a bug. I also tried to install IO::Glob on Windows: gist.github.com/titsuki/2332f051bf...ecebcf35fe 02:49
AlexDaniel .tell stmuk fwiw irclog.perlgeek.de/perl6/2018-02-12#i_15806100 02:54
yoleaux AlexDaniel: I'll pass your message to stmuk.
Thrush AlexDaniel: I've never been able to successfully install anything on Perl 6, with or without zef. 03:15
When I type "zef install <anything>", I get this page popping up on a web browser: support.microsoft.com/en-us/help/9...luded-or-h 03:16
geekosaur sounds like it is assuming that an http handler is installed somehow 03:18
I think that might be a known issue? iirc if all else fails it tries powershell, but if you don;'t have that there's nothing it can do reliably to get http/https support (no, that is not included with perl 6. if this is going to be a problem on windows, maybe we have to bow to reality and include it in the core) 03:19
Thrush If I "use" something (such as "use IO::Glob") from the Perl 6 REPL, am I supposed to see "Nil" on success? 03:21
I just tried "zef install IO::Glob --force-install" (with the --force-install LAST instead of earlier), and it seemed to work for me. 03:23
ZzZombo `use` doesn't return anything. It would fail though if the module wasn't found. 03:25
Thrush However, I've noticed that "my @a = glob('../*')" won't work for me (it sets @a to an empty array). I found that using '\' instead of '/' DOES work, though, so apparently the module doesn't treat '/' as directory separators on all platforms, like Windows. 03:26
ZzZombo '\' is the escape character. YOU should treat it as such. 03:29
geekosaur I think you understood them backwards 03:33
Thrush ZzZombo: Sure, '\' is the escape character. And '/' is the directory separator in both Unix and Windows, at least according to Perl5, Ruby, Python, and GNU C++. But not according to Perl6, evidently. 04:00
lizmat_ notable6: help 05:23
notable6 lizmat_, Like this: notable6: weekly rakudo is now 10x faster # See wiki for more examples: github.com/perl6/whateverable/wiki/Notable
lizmat_ notable: weekly 05:24
notable6 lizmat_, 6 notes: gist.github.com/bc3c075a0621e06e9f...81ca301eea
ZzZombo I don't get it, this `EXPORTHOW` stuff just doesn't work for me at all. 05:51
ZzZombo I copied the code from github.com/jnthn/oo-monitors/blob/...s.pm6#L111 into a module, replaced `constant class` with `constant test`, used the module in Perl REPL, wrote `use Test;my<HERE> test C {};C.HOW.^name` and it returns the standard `ClassHOW`! 05:53
ZzZombo wtf 05:54
I meant I wrote `test C {};C.HOW.^name`.
Geth doc: 85322f76ba | (JJ Merelo)++ | doc/Language/list.pod6
Fixes warning and changes to list, refs e01b3ca and follows @coke advice
06:47
synopsebot Link: doc.perl6.org/language/list
doc: 4eda9f8e26 | (JJ Merelo)++ | xt/examples-compilation.t
Makes easier identification of chunk

In the compilation tests. Shows the first 10 chars excluding whitespace
doc: 0a952d0950 | (JJ Merelo)++ | 2 files
Changes quotes

And eliminates other "sink context" warnings from the list document.
lizmat And another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/02/12/...om-apopka/ 06:56
a little earlier than usual, but I won't have any time for it in the next 72 hours 06:58
lizmat is off to bed
notable6: clear weekly 06:59
hmmm... guess notable6 also went to bed
sleep&
Xliff Does the latest version of rakudo properly include zef? 09:18
After the tree change from nom to master, I don't see the proper bin installed. 09:19
Indeed, if I call zef from moar-nom, it errors out and says "Could not find Zef::CLI at line 2 in"
El_Che Xliff: rakudo does not include zef. My packages (rakudo-pkg on github and rakudo star do) 09:20
Xliff So I have to build zef from git sources, then? 09:21
zef used to be a part of moar-nom, so I am curious as to why the change.
At least as far as rakudobrew was concerned. 09:22
El_Che Xliff: this will install it in your home: github.com/nxadm/rakudo-pkg/blob/m...ef-as-user (in case rakudo does not have a "install zef" switch) 09:23
(as an example, change paths accordingly) 09:24
it been a while since I used rakudobrew
Xliff Yeah. "rakudobrew build zef" is b0rked. 09:25
ZzZombo Can anybody tell me step-by-step how to work with `EXPORTHOW` since it doesn't work for me. 09:27
Xliff El_Che: Yeah, even those instructions aren't working. 09:31
ZzZombo: Sorry. I know nothing about EXPORTHOW, and would like to know myself.
El_Che it's a simple git clone + install, it's just on how a user can build zef in their $HOME next to the one install globally 09:32
Xliff El_Che: Yes, and those aren't working for me. 09:33
Let me see if there is another zef in path.
El_Che git clone github.com/ugexe/zef.git && cd zef && perl6 -Ilib bin/zef install . 09:34
there you go
Xliff Done that. No luck.
Seriously.
cbwood@infinity:~/.rakudobrew/moar-master/zef$ perl6 -Ilib bin/zef install 09:35
El_Che no perl6 in path?
Xliff ^^ works.
No. Perl6 is in path.
El_Che ok
Xliff [02/12/2018 04:35:25] cbwood@infinity:~$ which zef
El_Che (like saidn it has been ages since I used rakudobrew)
Xliff This isn't a rakudobrew issue though since I am doing it from git, now. 09:36
El_Che zef is in ~/.perl6/bin normally
Xliff That isn't the issue, either.
El_Che Xliff: I know where the perl6 I build puts stuff because I know with which options I built it 09:37
I don't know how rakudo builds perl 6
hence my remark
Xliff Oh DUH 09:38
perl6 -Ilib bin/zef install >.<
/o\
Zoffix lizmat++ # good weekly 09:39
Xliff lizmat++ # Indeed
I'm bored. I need a new perl6 project.
Zoffix Is it [safe/does it make sense] to shove a Str object as a :value to QAST::SVal?
El_Che Xliff: write something to package dependencies so that a perl6 project can be deplied with one file 09:40
Xliff El_Che: I assume you mean "deployed"
El_Che yes
Zoffix The `<x>` construct creates a single QAST::WVal(Str) which causes some wantedness not to propagate right. Wondering if I should teach the wanter to want QAST::WVals, or to change the `<x>` to make a QAST::Want(WVal(Str), 'Ss', SVal(Str)). It compiles and seems to work, but wonder if that's sane
Xliff What do you mean by "one file"? 09:41
El_Che like fatpack does for perl 5, a fat jar/war in Java, a static compiled file in Go
Xliff Oh.
I was thinking about something like that. 09:42
El_Che I gave it a go some time back, but didn't get far to to lack of time
El_Che (and the procompiling complicated stuff) 09:42
Xliff making it so that you can package a perl project, including all precompiled modules so that it could be run directly via the moarvm exec
Sounds like we are on the same page. 09:43
Although that sounds like messing with nqp / moar internals, which I am not well versed with.
El_Che extra points if it could include compiled C stuff for nativecall, but that's hairy 09:44
Xliff Meh. Best if the nativecall stuff is separately installed with a build script.
El_Che perl6 ./big_fat_packed_script.pl6 would also be nice
Xliff Precisely because of the 80's hair. 09:44
Zoffix eco: Wix 09:45
buggable Zoffix, App::InstallerMaker::WiX 'Tool to make basic WiX installers for Perl 6 apps, bundling MoarVM/Rakudo.': github.com/jnthn/p6-app-installermaker-wix
Xliff El_Che: That would be the goal, yes. Where ./big_fat_packed_script.pl6 would be ./project_distro_installer.pl6 and it would put everything in a directory, including a simple exec that ran the project with all the needed command line switches. 09:46
Zoffix++ # Will look into WiX
Although I think that falls short of having something that runs directly via moarvm, rather than the perl6 interpreter. 09:47
The idea is to avoid stage parse.
Although jnthn++ does have a good workaround putting everthing in a module and the exec is simply "use App::Module" 09:48
El_Che maybe worth looking at stuff like rust cargo?
Zoffix m: use nqp; use QAST:from<NQP>; my $v := QAST::SVal.new(:value("meows")).value; say(nqp::objprimspec($v)) 09:49
camelia 0
Zoffix m: use nqp; use QAST:from<NQP>; my $v := QAST::SVal.new(:value(nqp::unbox_s("meows"))).value; say(nqp::objprimspec($v))
camelia 0
Zoffix :(
Xliff & 09:50
Zoffix well, I'll stick an unbox_s over it and assume it'd good 'nuf 09:52
ZofBot: #YOLO
ZofBot Zoffix, com/b10bb6a66d4948ff03655731d82a9d4a Files=1229, Tests=75884, 316 wallclock secs (14
fireartist Hi - is there a simple way to use a string var as a filehandle, and pull a line at a time out of it? 10:08
moritz fireartist: for $filename.IO.lines() -> $line { ... } 10:13
fireartist: .lines() returns a lazy iterator, so that doesn't read the whole file into memory
fireartist moritz: just realised I was being daft - I did run().out.slurp-rest; then wanted to parse the output - realised I could drop the slurp-rest, and out() might give me something useful I could use :-) 10:14
moritz fireartist: run().out.lines ?
fireartist moritz: exactly :-) I'll actually use get(), as I'm wanting to make a stately parser - my fault for reading 5to6 without thinking for myself 10:16
moritz: btw, are you the same moritz on tau station alpha?
moritz fireartist: yes 10:18
I'm EVERYWHERE! :-)
fireartist moritz: ah, I'm firefu there - greetings omnipresent one! 10:19
moritz fireartist: :) how do you like it so far? 10:21
I guess they have quite a few beta testers from the Perl community; Perleone also plays it, and he sits right next to me at $work :-) 10:22
fireartist yes, I've been rss subscribed to ovid's blog for years - that's where I saw the invite 10:24
I am enjoying it, but there's not enough to do yet - but that's to be expected for early testers 10:26
El_Che plot a take over of the universe? most SF ends up on that scenario anyways :) 10:33
Xliff Um. 10:54
Tau Station Alpha?
moritz: Pray tell?
Xliff taustation.space/blog/on-writing-c...base-code/ 11:02
O_o
That's cool.
Well, waiting for confirmation, now. :/. 11:07
Geth doc: eda32c5fd2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Exception.pod6
Document behaviour of &die without args
11:09
synopsebot Link: doc.perl6.org/type/Exception
moritz Xliff: sorry, was offline 11:38
moritz blogs.perl.org/users/ovid/ has some more blog posts on that game, it used to be called "Veure" or so in its earlier stages, iirc 11:39
buggable New CPAN upload: MeCab-0.0.6.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.6.tar.gz 11:42
Xliff moritz: Yeah. I signed up. Waiting for the confirmation email. 11:47
Xliff Has anyone written a grammar for SQL? 12:43
SQL::Parser was started on github but has no code. 12:45
DrForr I have it as a TODO item, should that actually help :) 13:16
ZzZombo jnthn, since you are the author of OO:Monitors, and used `EXPORTHOW` stuff, can you tell me why I fail to utilize it at all? 13:40
I used pretty much the same code as you do.
jnthn ZzZombo: No idea, if you're using pretty much the same code. I presume your EXPORTHOW is in UNIT of the module? 13:45
(It must be.)
ZzZombo Yes.
jnthn And you're putting something under a sub-package, like DECLARE
ZzZombo It's a standard module file, like this "unit module Test;" 13:46
jnthn ?
Hm, does mine also use "unit module ..." ?
ZzZombo No, but even w/o it it didn't work.
jnthn Hm
Got code I can look at?
ZzZombo Oh well, I just realized when copying the code I missed the `my` in front of declaration of `EXPORTHOW`. Adding it fixed that. 13:50
jnthn ah, yes, that'd important 13:52
*that's
ZzZombo Aw, a pity `COMPOSE` isn't available yet. 13:55
ZzZombo m: class C {our $.a=123};$C::a.say 14:02
camelia (Any)
ZzZombo m: class C {our $.a=123};C.^attributes 14:02
camelia ( no output )
ZzZombo m: class C {our $.a=123};C.^attributes.say
camelia ()
ZzZombo m: class C {our $.a=123};C.a 14:04
camelia ( no output )
ZzZombo m: class C {our $.a=123};C.a.say
camelia 123
ZzZombo m: class C {my $.a=123};C.a.say
camelia 123
ZzZombo m: class C {my $.a=123;has $.a='asd'};C.a.say
camelia Potential difficulties:
Redeclaration of symbol '$.a'
at <tmp>:1
------> 3class C {my $.a=123;has $.a7⏏5='asd'};C.a.say
123
ZzZombo m: class C {my $.a=123;has $!a='asd'};C.a.say
camelia 123
sergot .seen masak 14:29
yoleaux I saw masak 26 Jan 2018 22:00Z in #perl6: * masak groans preemptively
jkramer What is this for? docs.perl6.org/routine/tree 14:32
m: dd 'foo'.tree 14:33
camelia "foo"
ZzZombo s: &tree,\(Str) 14:54
SourceBaby ZzZombo, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ tree used at line 6␤␤
ZzZombo s: Str,'tree'
SourceBaby ZzZombo, Something's wrong: ␤ERR: Type check failed in binding to parameter '&code'; expected Callable but got Method+{is-nodal} (Method+{is-nodal}.new)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e li
ZzZombo s: help 14:55
SourceBaby ZzZombo, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ help used at line 6␤␤
ZzZombo s: Any, 'tree' 14:56
SourceBaby ZzZombo, Something's wrong: ␤ERR: Type check failed in binding to parameter '&code'; expected Callable but got Method+{is-nodal} (Method+{is-nodal}.new)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e li
ZzZombo IDK
s: Int, 'base' 14:57
SourceBaby ZzZombo, Sauce is at github.com/rakudo/rakudo/blob/e72e...Int.pm#L82
ZzZombo s: Int, 'tree'
SourceBaby ZzZombo, Something's wrong: ␤ERR: Type check failed in binding to parameter '&code'; expected Callable but got Method+{is-nodal} (Method+{is-nodal}.new)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤ in block <unit> at -e li
ZzZombo m: Int.tree 14:58
camelia ( no output )
ZzZombo m: Int.tree.say
camelia (Int)
ZzZombo m: (Int.^methods.first: *.name eq 'tree').say 14:59
camelia Nil
ZzZombo m: say Int.^methods.first: *.name eq 'tree' 15:00
camelia Nil
ZzZombo What in hell?
m: tree
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
tree used at line 1
ZzZombo m: tree: ''
camelia WARNINGS for <tmp>:
Useless use of constant string "" in sink context (line 1)
ZzZombo m: say tree: '' 15:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
tree used at line 1
jkramer According to the source it simply returns self, unless it's iterable, in which case it maps over its elements calling .tree on each, which then just returns self :) 15:04
Xliff DrForr: Was that TODO mention in response to me?
DrForr: If so, if you have a syntax graph of SQL, or something like it, I would really appreciate it.
ZzZombo m: (1,2,3,4,(123,'asd'),False,Nil,True).tree.say 15:05
camelia (1 2 3 4 (123 asd) False Nil True)
jnthn m: dd (1,2,3,4,(123,'asd'),False,Nil,True).tree
camelia $((1, 2, 3, 4, $((123, "asd").Seq), Bool::False, Nil, Bool::True).Seq)
jnthn Note the itemization
jkramer So what is it meant for? :) I guess there must be some purpose for it to be there? 15:06
jnthn To take a nested list structure and itemize things, so that they won't flatten away in flattening contexts 15:08
jkramer Someone should fix the docs then :) It currently only says "Returns Any." 15:10
jkramer Also I don't understand how the method name `tree` relates to what it's doing 15:10
Geth doc: bf0cf99efa | (Will "Coke" Coleda)++ | doc/Type/Exception.pod6
remove duplicate
15:13
doc: fabd8b51a9 | (Will "Coke" Coleda)++ | doc/Type/Exception.pod6
remove trailing whitespace
synopsebot Link: doc.perl6.org/type/Exception
Xliff m: my %a; %a{$_} = $_.ord - 65 for 'A'..'E'; %a.tree.say 15:21
camelia (B => 1 A => 0 E => 4 D => 3 C => 2)
Xliff m: my %a; %a{$_} = $_.ord - 65 for 'A'..'C'; %a<Z>{$_} = $_.ord - 65 for 'D'..'F'; %a.tree.say 15:22
camelia (Z => {D => 3, E => 4, F => 5} B => 1 A => 0 C => 2)
Xliff m: my %a; %a{$_} = $_.ord - 65 for 'A'..'C'; %a<Z>{$_} = $_.ord - 65 for 'D'..'F'; %a.keys.say 15:23
camelia (Z B A C)
Xliff DrForr: YEEEEs! cdn.rawgit.com/GuntherRademacher/a...yacc.xhtml 15:27
Xliff .tell DrForr SQL Diagram cdn.rawgit.com/GuntherRademacher/a...yacc.xhtml 15:29
yoleaux Xliff: I'll pass your message to DrForr.
Xliff If I have a syntax that has 3 variations of a string: say "STRING1 OPT1"; "STRING1 OPT2"; and "STRING1 OPT3". How would I formulate a grammar so that I can detect the invalid input "STRING1 OPT4", and report that "OPT4" is invalid. 16:15
Xliff Something like... 16:16
[Coke] github.com/rakudo/rakudo/blob/mast...#L622-L633 16:17
there's an example where there's an "or panic" in the token itself.
jnthn maybe something like: "STRING " [ "OPT1" | "OPT2" | "OPT3" | (\w+) { die "bad $0" }]
[Coke] (was trying to find a simpler one.)
[Coke] jnthn++ that's much simpler. :) 16:18
Xliff jnthn++ # So THAT'S what executable blocks in grammars are for!
moritz Xliff: if you find such things interesting, maybe read my book? :-) 16:20
it explains a few more use cases
Xliff [Coke]: Are you trying to fry my brain? That grammar is not easy! :P
moritz: When I get the money.
Is it on Amazon?
moritz aye, smile.amazon.com/dp/1484232275/ 16:21
moritz you can also get a DRM-free PDF from apress directly 16:21
www.apress.com/us/book/9781484232279
Xliff moritz++ # Added to wishlist.
moritz: <!before... and <?before ... give me migraines when I look at them. Please tell me you make those easier to understand. 16:23
timotimo Xliff: "are we before" "are we not before" is how i think of them 16:24
Xliff !before == "not before" 16:25
?before == "<query> before"
Rather... ?before == "before?"
Please tell me that simple mnemonic works. 16:26
timotimo yeah, ? and ! are simply opposites; both mean "zero-length assertion" 16:27
ZzZombo m: sub x($i(:$a)){say $a};x 1;x :a<2> 16:27
camelia 5===SORRY!5=== Error while compiling <tmp>
Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info to the function's type
at <tmp>:1…
ZzZombo m: sub x(:$i(:$a)){say $a};x 1;x :a<2>
camelia 5===SORRY!5=== Error while compiling <tmp>
Shape declaration with () is reserved;
please use whitespace if you meant a subsignature for unpacking,
or use the :() form if you meant to add signature info to the function's type
at <tmp>:1…
Xliff timotimo: I get that they are ZLA, but I never picked up on their proper use. 16:28
Xliff Time to read up on those, I guess. 16:28
Especially when reading SQL syntax diagrams.... (yeesh!)
moritz Xliff: I think look-around assertions are bound to give you headache, no matter how you approach them :( 16:29
ZzZombo m: sub x(i($a)){say $a};x 1;x :a<2> 16:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in typename; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3sub x(i(7⏏5$a)){say $a};x 1;x :a<2>
moritz especially if you do nasty things like .* inside them
ZzZombo m: sub x(:i($a)){say $a};x 1;x :a<2>
camelia Too many positionals passed; expected 0 arguments but got 1
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
ZzZombo m: sub x(:i($a)){say $a};x :a<2>
camelia Unexpected named argument 'a' passed
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff moritz: <sarcasm type="dripping">Thanks for the warning</sarcasm> 16:31
ZzZombo m: sub x(:i($a)){say $a};x :i<2>
camelia 2
ZzZombo what
Xliff m: sub x(:i($a)){say $a};x :i; 16:32
camelia True
Xliff ZzZombo: :i gets turned into a named parameter.
[Coke] looks right.
Xliff m: sub x(:$i){say $i};x :i; 16:33
camelia True
Xliff ^^ Equiv
ZzZombo How come it doesn't make `a` an alias to `i`?
Xliff It did.
[Coke] ... $a is the value of the named parameter.
ZzZombo m: sub x(:i($a)){say $a};x :a<2>
Xliff m: sub x(:i($a)){say $a};x :i(<a b c>);
camelia Unexpected named argument 'a' passed
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
(a b c)
moritz m: sub x(:i(:$a)){say $a};x :i(<a b c>); 16:34
[Coke] there is no :a, only :i
camelia (a b c)
ZzZombo m: sub x(:i(:$a)){say $a};x :a<2>
camelia 2
Xliff [Coke]: "There is only Zuul!"
moritz if you add a : before the $a, then a becomes a possible alias
ZzZombo NOw there is
Xliff moritz: Aaaiee! That's hard to read. What's the usecase? 16:35
ZzZombo So I was thinking if it's possible to have a named argument be an alias to a positional, or vice versa.
Xliff Oh. Nevermind.
moritz Xliff: short and long options; color and colour. Backwards compat. 16:36
we had that in earlier version of Perl 6
it was very confusing :-)
Xliff Yeah. As soon as I asked, I figured it out.
Xliff ZzZombo: If you want to do that, it's better to do as a multi with either the named-arg or the positional version as the canonical method. 16:37
And the other properly aliasing to that.
ZzZombo Or how easier you can make custom constructor that accepts a positional and initializes an attribute with it, given you can't directly set one if it's private. 16:38
Currently the way I figured involves calling `bless` with this positional turned into named, and custom `BUILD` to set the private attribute from the passed named parameter, is it how the `Int` and other similar constructors in core do it? 16:41
moritz Int is kinda special, since it uses boxing, which is a concept not exposed to userland 16:43
ZzZombo And another thing that I wonder, why this 16:44
m: sub look{my &m;my $i=2;while !&m && try callframe($i++) -> $f {given $f.code {when Method {say $f.my.map({.key=>.value});&m=$_};when Sub {last}}};$i.say;&m};class A {method m{}};class B is A {method m{my $a=123;look.say}};B.new.m
camelia ($_ => (Any) $/ => Nil self => (Mu) %_ => (Mu) $*DISPATCHER => (MethodDispatcher) $! => Nil $a => 123 $¢ => Nil)
3
m
ZzZombo has pretty much everything as its type object? 16:45
Most interesting is `self`, as you can clearly see it's not supposed to be undefined and `Mu` while at that. 16:46
shillo p6: say 0.333333333333333333333333333333333333333333333333333333333 16:48
camelia 0.333333333333333303727386009995825588703155517578125
jnthn Mu tends to mean "this was optimized away"
Guest47043 Just here to report an amusing failure to dwim :) 16:48
ZzZombo Uh, huh, bad, bad optimization! 16:49
jnthn ZzZombo: Only things that are declared "is dynamic" can be expected to stick around for instropsection that way 16:50
If we don't do that, we can't optimize, well, much of anything
m: say <0.333333333333333333333333333333333333333333333333333333333>.FatRat 16:51
camelia 0.333333333333333333333333333333333333333333333333333333333
moritz m: sy <0.333333333333333333333333333333333333333333333333333333333>
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
sy used at line 1. Did you mean 'so'?
moritz m: say <0.333333333333333333333333333333333333333333333333333333333>
camelia 0.333333333333333333333333333333333333333333333333333333333
Guest47043 I guess it should print fewer digits if it approximated with lower precision? 16:52
(bummer, somebody took my normal username. Eh... I guess I'll have to start coming as sh1llo 16:53
jnthn There's too many ways to DWIM. We once had it such that Rat had big integer numerator and denominator
tyil Guest47043: should've regged it :>
jnthn Turns out that can make certainly kinds of calculation crazily slow
AlexDaniel Guest47043: actually that looks kinda correct, but we can do better of course 16:54
Guest47043 jnthn: I wish there was a dynamic flag or pragma that I want to DWITY decimals, reading them as floats or doubles unconditionally.
jnthn If you want them as a double then just stick e0 after the literal 16:55
Guest47043 DWITY is, of course, 'do what I told you' ;) -- yeah, I know. It's not too bad.
... I just want to use this acronym on a perl channel :)
ZzZombo What exactly is under `CALLER::`? What `caller` even stands for? Calling scope? 16:56
Geth perl6-most-wanted: cb6c8f333a | (Curt Tilmes)++ (committed using GitHub Web editor) | most-wanted/bindings.md
Update bindings.md
16:57
Guest47043 AlexDaniel: and I agree, it's plausible, I just wondered what I'll get when perl6 reads too many decimals and runs out of tolerance 16:58
AlexDaniel: My expectation was to approximate as 1/3
AlexDaniel: ... I already assumed it will clam down on precision, just not in this way 16:59
Guest47043 Anyway, need to go. Laters! 17:06
Zoffix Guest14511: it's actually currently a bug. It creates a Rat with denominator over 64bits. You said you wanted it to DWIM. What would that be: create a Num (a float type) instead of a Rat or create a FatRat that could actually hold that precision? 17:28
(or die)
Wrong guest...
And the right one left :( 17:29
Zoffix Maybe die for literal in code (asking to clarify between FatRat/Rat/Num) and make &val make a FatRat 17:38
Or FatRat in both cases if we pass literals through val 17:39
RT#132313
synopsebot RT#132313 [open]: rt.perl.org/Ticket/Display.html?id=132313 Rat literal syntax creates Rats with denominators larger than 64 bits
Geth doc: 55a94ac30e | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6
add missing acronym

add more details later if needd
17:51
synopsebot Link: doc.perl6.org/language/glossary
SmokeMachine m: multi trait_mod:<is>(Attribute $a, :$bla!) {$a does role :: {method set_value(Mu $obj, Mu \value) {say "HERE"; nextsame}}}; class C {has $.a is rw is bla}; C.new.a = 42 # why it doesn't print HERE? 18:16
camelia ( no output )
SmokeMachine Is that expected? 18:28
timotimo the default accessor is implemented by returning the container in $!a as a read-writable one 18:33
it doesn't go through set_value
timotimo but you can use set_value to set a value if all you have is the attribute object 18:33
SmokeMachine Yes, of course! That’s not the first time I ask that... thank you! 18:53
Xliff What is the difference between '<ws>' and '<.ws>' in a grammar? 19:50
Xliff blames [Coke]
moritz <ws> captures
Xliff Yes, moritz++. You have another customer. I just need to get the $$$ 19:51
I will run out of karma to give you if you keep this up. :)
Xliff moritz: Now explain THIS! github.com/rakudo/rakudo/blob/mast...#L654-L668 19:54
:) :) :) :) :) 19:55
moritz Xliff: so, MARKED is basically a cache for whether a <.ws> has matched at the current cursor position before 20:01
in particular, it caches the cursor where it matched
Xliff Got that part 20:02
moritz the highexpect part stores which of several alternatives are trying to match 20:04
Xliff But what is :dba?
moritz :dba('whitespace') means "do business as", and just sets the name of the current for reporting in the highwater marks
Xliff And is there a reason why this is written as self.'!fresh_highexpect'(); 20:05
moritz basically interop with NQP 20:06
Xliff Ah! Thanks again, moritz++
moritz it's a method written in NQP, which intentionally uses a non-identifier name to not be accidentally called from perl 6 code
Xliff Is that all in your book?
moritz no :-)
Xliff LOL!
Still getting it, tho.
moritz that is... way too deep in rakudo guts to be interesting to the general public 20:07
and doesn't fit into 180 pages or so :-)
Xliff Well, I am trying to build a grammar to parse SQL create statements. 20:08
Starting with MySQL.
Maybe I'll share it with DrForr... 8-)
moritz so, DDL, basically
Xliff Y
Eventually.
It's called "starting small" 20:09
cdn.rawgit.com/GuntherRademacher/a...tml#create
moritz very small :-) 20:14
including DEFAULT <expr>
Xliff <moritz> including DEFAULT <expr> 21:26
moritz: ^^ Was that directed at me?
moritz Xliff: it was a comment on the fact that a CREATE statment needs the full SQL expression grammar 21:28
moritz for example in DEFAULT clauses 21:28
Xliff Ooh. Right. 21:32
As you have rightly assumed, Happy Hour has long since started. :)
Xliff hoists a pint. 21:33
moritz: Oooooh. The "full SQL expression grammar" finally hit me. 21:39
I think I can get it. %-)
Will grammars handle recursion? 21:41
Although I don't think MySQL allows you to use "DEFAULT <expr>" 21:45
It's just "DEFAULT <value>" 21:46
Geth doc/coke/build: 7 commits pushed by (Will "Coke" Coleda)++ 21:48
jimav I've found several doc issues and perhaps code bugs. Should I file a separte issue/bug for each, or would 21:49
it be better to send the whole list to someone?
Xliff Separate issues
That way it can be distributed. 21:50
jimav Ok, will do. Thanks. 21:51
Xliff No proble. And thank YOU! 21:52
[Coke] Thank you for asking; if you have small ones like "spelling error", those can be lumped together, but for anything bigger, separate is best. thanks. 22:00
Xliff++ jimav++
timotimo Xliff: grammars definitely handle recursion 22:47
buggable New CPAN upload: PowerNap-0.0.2.tar.gz by SAMGWISE cpan.metacpan.org/authors/id/S/SA/...0.2.tar.gz 23:12
buggable New CPAN upload: Music-Engine-0.0.2.tar.gz by SAMGWISE cpan.metacpan.org/authors/id/S/SA/...0.2.tar.gz 23:22