Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-08

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 comborico1611 joined #perl6
00:04 cpage_ joined #perl6
00:06 ryn1x joined #perl6
00:06 ryn1x_ joined #perl6
00:08 ryn1x__ joined #perl6
00:35 ryn1x joined #perl6
00:44 ZzZombo joined #perl6
00:49 ryn1x joined #perl6
00:49 ryn1x_ joined #perl6
00:51 cpage_ joined #perl6
00:55 pecastro joined #perl6
00:57 Exodist joined #perl6
01:01 mcmillhj joined #perl6
01:10 Exodist joined #perl6
01:10 mempko joined #perl6
01:11 ryn1x joined #perl6
01:11 ryn1x_ joined #perl6
01:12 ryn1x__ joined #perl6
01:16 comborico1611 Anyone around?
01:17 MasterDuke .seen Anyone
01:17 yoleaux I haven't seen Anyone around.
01:17 comborico1611 heh
01:17 MasterDuke sorry, doesn't look like it
01:18 comborico1611 I haven't seen you in here yet.
01:19 MasterDuke i'm usually only here in the evenings
01:19 Exodist joined #perl6
01:19 cdg joined #perl6
01:19 comborico1611 Want to try to answer a question?
01:20 MasterDuke shoot
01:21 comborico1611 I'm wondering if the variable is the actual object, or the foo-class.new
01:21 comborico1611 Example:
01:22 comborico1611 my $variable = Foo-class.new( );
01:23 geekosaur it's not lazy, if that's what you mean
01:23 MasterDuke not quite sure what you mean by your question
01:23 geekosaur if you dump it out, it'll show a Foo-class.new(...) because that's the only way it knows to create a new object
01:24 MasterDuke m: my $variable = Foo-class.new( ); say $variable.^name
01:24 camelia rakudo-moar ad7c97dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Foo-class used at line 1␤␤»
01:24 MasterDuke m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.^name
01:24 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class␤»
01:24 geekosaur m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.WHAT
01:24 camelia rakudo-moar ad7c97dfb: OUTPUT: «(Foo-class)␤»
01:24 geekosaur um, not what I wanted
01:25 geekosaur m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.WHICH
01:25 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class|81720992␤»
01:25 comborico1611 Like is $variable the object or Foo-class?
01:25 geekosaur it should normally be the object. nothing stops some class from overriding .new in such a way as to return the class itself, but that would be somewhat odd
01:26 geekosaur meanwhile that .WHICH I did shows a Foo-class object
01:26 geekosaur m: class Foo-class {}; dd Foo-class.WHICH
01:26 camelia rakudo-moar ad7c97dfb: OUTPUT: «ObjAt.new("Foo-class|U62882856")␤»
01:27 MasterDuke_ joined #perl6
01:27 geekosaur hm, that wasn't what I intended
01:28 geekosaur oh, right, type object
01:28 geekosaur (which is not the same thing as the class itself; it's the "undefined" value for the class, as indicated by the U)
01:29 Exodist joined #perl6
01:29 geekosaur m: my $x = Int; say defined $x
01:29 camelia rakudo-moar ad7c97dfb: OUTPUT: «False␤»
01:29 giraffe joined #perl6
01:30 comborico1611 So normally $variable is the object, but you can make Foo-class the object if you wanted?
01:30 geekosaur as long as you understand that is not the class itself
01:31 geekosaur (this is somewhat confusing_
01:31 MasterDuke_ do you mean object in the non-programming language sense?
01:32 MasterDuke_ i.e., my $variable = Foo-class.new kind of maps to $variable = subject, Foo-class = object, .new = verb
01:32 comborico1611 Object in the sense of an instantiation of a class.
01:33 MasterDuke_ ah, then $variable would usually be the object/instantation, yes
01:33 gfldex joined #perl6
01:33 comborico1611 Is $variable an alias for Foo-class object?
01:33 Redrield left #perl6
01:34 comborico1611 Is $variable ro, then?
01:34 MasterDuke_ kind of. could also say it's a container for a Foo-class object
01:34 geekosaur no
01:35 geekosaur m: class Foo-class {}; my Foo-class $x .= new; dd $x.VAR
01:35 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class.new␤»
01:35 comborico1611 Hmm.  Alright. Thanks guys.  Back to the book. I'm watching the screen, though.
01:35 geekosaur hm, wrong thinhg
01:36 comborico1611 I think container for the object is the most accurate description.
01:36 geekosaur well. $var is bound to a Scalar object, which is a container with something in it
01:36 geekosaur the container is mutable
01:36 geekosaur if you used := then you would be binding the object directly; that would be read-only, although you can re-bind with another :=
01:36 mson joined #perl6
01:37 comborico1611 If $var gets assigned to something else, what happens to Foo-class instantiation?
01:37 geekosaur if there are no other references to the object, it will eventually get garbage-collected
01:38 comborico1611 Hmm. I see. Thanks, guys.
01:40 itaipu joined #perl6
01:41 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); for ^4 { my @a = rand xx 10000; }
01:41 camelia rakudo-moar ad7c97dfb: ( no output )
01:41 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); for ^4 { my @a = rand xx 10000; say +@a }
01:41 camelia rakudo-moar ad7c97dfb: OUTPUT: «10000␤10000␤10000␤10000␤»
01:42 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); for ^4 { my @a = rand xx 1000000; say +@a }
01:42 camelia rakudo-moar ad7c97dfb: OUTPUT: «1000000␤1000000␤1000000␤1000000␤»
01:42 timotimo that's not enough work?
01:42 timotimo ... i forgot to re-assign :)
01:42 Cabanossi joined #perl6
01:42 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); dd $var; $var = 99; for ^4 { my @a = rand xx 10000; }
01:42 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class $var = Foo-class.new␤»
01:42 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); dd $var; $var = 99; for ^10 { my @a = rand xx 100000; }
01:42 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class $var = Foo-class.new␤»
01:42 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); dd $var; $var = 99; for ^10 { my @a = rand xx 100000; say +@a }
01:42 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class $var = Foo-class.new␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤»
01:42 timotimo *shrug*
01:43 comborico1611 I'm not sure what you're doing. Heh.
01:44 timotimo i'm trying to create lots of objects so that the garbage collector would run
01:44 timotimo i might be doing something wrong anyway
01:46 comborico1611 Welp. I'm going to rest now. Goodnight.
01:46 timotimo good nigth!
01:46 comborico1611 Thanks for trying!
01:46 timotimo er
01:49 ZzZombo1 joined #perl6
01:50 El_Che joined #perl6
01:50 ryn1x_ joined #perl6
01:50 ryn1x joined #perl6
01:50 ryn1x__ joined #perl6
01:51 cdg joined #perl6
01:52 kalkin-- joined #perl6
02:06 aborazmeh joined #perl6
02:06 aborazmeh joined #perl6
02:07 MasterDuke_ m: use nqp; class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); dd $var; $var = 99; for ^100 { my @a = rand xx 100000; nqp::force_gc; nqp::force_gc }
02:07 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class $var = Foo-class.new␤»
02:08 timotimo a heap snapshot seems to suggest dd is making it unhappy
02:08 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); $var = 99; for ^10 { my @a = rand xx 100000; say +@a }
02:08 camelia rakudo-moar ad7c97dfb: OUTPUT: «i got garbage collected!␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤»
02:08 timotimo look, see?
02:08 timotimo somehow $*PERLSEEN or so is hanging on to it?
02:09 timotimo could it be things you dd and/or .perl will stick around forever
02:10 timotimo m: class Foo-class { submethod DESTROY { say "i got garbage collected!" } }; my $var = Foo-class.new(); dd $var; $var = 99; dd $var; for ^10 { my @a = rand xx 100000; say +@a }
02:10 camelia rakudo-moar ad7c97dfb: OUTPUT: «Foo-class $var = Foo-class.new␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤100000␤Int $var = 99␤»
02:10 timotimo wait what :)
02:10 timotimo ah, stdout vs stderr i suppose?
02:12 MasterDuke_ i guess you aren't likely to see dd in production code / hot paths, so not terrible
02:12 MasterDuke_ but could throw off debugging
02:16 yht joined #perl6
02:16 wander joined #perl6
02:18 ryn1x joined #perl6
02:18 ryn1x_ joined #perl6
02:23 ryn1x joined #perl6
02:23 ryn1x_ joined #perl6
02:23 ryn1x__ joined #perl6
02:56 ilbot3 joined #perl6
02:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:57 Cabanossi joined #perl6
03:01 ryn1x joined #perl6
03:01 ryn1x_ joined #perl6
03:01 ryn1x__ joined #perl6
03:08 napo1eon joined #perl6
03:10 colomon_ joined #perl6
03:12 ufobat___ joined #perl6
03:20 noganex_ joined #perl6
03:26 llfourn joined #perl6
03:35 jameslenz joined #perl6
03:44 ryn1x joined #perl6
03:50 colomon joined #perl6
03:57 Cabanossi joined #perl6
04:09 Cabanossi joined #perl6
04:12 ryn1x joined #perl6
04:12 ryn1x_ joined #perl6
04:13 ryn1x__ joined #perl6
04:20 wamba joined #perl6
04:25 ryn1x joined #perl6
04:25 ryn1x_ joined #perl6
04:25 ryn1x__ joined #perl6
04:32 dugword joined #perl6
04:44 ryn1x joined #perl6
04:44 ryn1x_ joined #perl6
04:45 wander joined #perl6
04:49 ryn1x__ joined #perl6
05:17 ryn1x joined #perl6
05:19 ryn1x_ joined #perl6
05:19 ryn1x__ joined #perl6
05:20 Geth ¦ Pod-To-HTML: 0ae43c1fd1 | W4anD0eR96++ | 2 files
05:20 Geth ¦ Pod-To-HTML: fix html block now emit raw HTML
05:20 Geth ¦ Pod-To-HTML:
05:20 Geth ¦ Pod-To-HTML: Inside html block, `=begin html #lines =end html`, we assume
05:20 Geth ¦ Pod-To-HTML: almost *everything* is raw HTML.
05:20 Geth ¦ Pod-To-HTML:
05:20 Geth ¦ Pod-To-HTML: Because of the implementation, pod6 syntax will be removed.
05:20 Geth ¦ Pod-To-HTML: That is, `C<code> -> code`, `=item1 sth -> sth`. To write down
05:20 Geth ¦ Pod-To-HTML: <…commit message has 7 more lines…>
05:20 Geth ¦ Pod-To-HTML: review: https://github.com/perl6/Pod-To-HTML/commit/0ae43c1fd1
05:24 Cabanossi joined #perl6
05:52 dugword joined #perl6
05:56 ryn1x joined #perl6
05:56 ryn1x_ joined #perl6
06:08 philomath joined #perl6
06:11 cdg joined #perl6
06:25 wamba joined #perl6
06:29 ryn1x joined #perl6
06:30 ryn1x_ joined #perl6
06:31 ryn1x__ joined #perl6
06:32 cdg joined #perl6
06:39 Cabanossi joined #perl6
06:48 nadim joined #perl6
06:57 darutoko joined #perl6
06:57 Todd_ joined #perl6
06:58 Todd_ I think I may have foudn a booboo in the documentation.  https://docs.perl6.org/syntax/qqx
06:58 Todd_ my $output = qqx{grep $option $word $file};
06:59 Todd_ I can not get qxx to work unless I put a space between the qxx and the {
06:59 Todd_ The error message of `qxx{` is
06:59 domidumont joined #perl6
06:59 Todd_ $ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx($cmd);' ===SORRY!=== Error while compiling -e Undeclared routine:     qqx used at line 1. Did you mean 'QX'?
07:00 moritz Todd_: qqx is not a function, so you can't use ()
07:00 moritz Todd_: just use it as it is in the example (qqx{...}), and it works
07:00 Todd_ $ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx ($cmd);'
07:00 Todd_ works
07:01 Todd_ $ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx{$cmd};'
07:01 Todd_ works too
07:01 Todd_ What am I doing wrong with this code?
07:02 Todd_ my $cmd = "cd /opt/Cimcor/CimTrak/CimTrakServer; CimTrakServer.exe -Diagnostics \"Level=255\"";
07:02 Todd_ my $str = qxx { $cmd };
07:02 Todd_ Undeclared routine:     qxx used at line 465. Did you mean 'QX'?
07:03 Todd_ same proble if I remove the space.
07:05 moritz Todd_: qxx is wrong
07:05 Todd_ I though qxx was for when I wanted to run a shell with a variable in it?
07:05 domidumont joined #perl6
07:06 Todd_ Like this;
07:06 Todd_ $ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx{$cmd};'
07:06 moritz Todd_: no, that's qqx
07:06 moritz you wrote qxx
07:06 moritz you can't just make stuff up, and expect it to work :-)
07:07 Todd_ mumble mumble mumble.  Thank you for the second pair of eyes!
07:07 Todd_ Why not!  Forget I asked that.
07:09 Cabanossi joined #perl6
07:09 ryn1x joined #perl6
07:09 ryn1x_ joined #perl6
07:09 ryn1x__ joined #perl6
07:31 lowbro joined #perl6
07:31 lowbro joined #perl6
07:39 Cabanossi joined #perl6
07:44 domidumont joined #perl6
07:45 92AACENXH joined #perl6
07:45 7GHAA3V3X joined #perl6
07:45 ryn1x joined #perl6
07:49 abraxxa joined #perl6
07:52 wamba joined #perl6
07:59 Geth ¦ doc: 0f657e57d1 | W4anD0eR96++ | 3 files
07:59 Geth ¦ doc: Fix #641 Add hook of TypeGraph in each Type at TOC
07:59 Geth ¦ doc:
07:59 Geth ¦ doc: Local build success.
07:59 Geth ¦ doc:
07:59 Geth ¦ doc: Close #641
07:59 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0f657e57d1
08:02 jonas1 joined #perl6
08:19 cpage_ joined #perl6
08:24 ryn1x joined #perl6
08:25 ryn1x_ joined #perl6
08:27 ryn1x__ joined #perl6
08:29 aeruder joined #perl6
08:32 pmurias joined #perl6
08:34 zakharyas joined #perl6
08:35 Todd_ Is there a way to slurp the stderr?
08:39 Cabanossi joined #perl6
09:00 ryn1x joined #perl6
09:01 ryn1x_ joined #perl6
09:01 piojo joined #perl6
09:02 geospeck joined #perl6
09:02 Todd_ With qqx{...} is there a way to pick up the both STDIN and STDERR?
09:03 dakkar joined #perl6
09:05 samcv Todd_, you could use pipes since qqx uses the shell
09:06 sena_kun joined #perl6
09:06 Todd_ I am frustrated as this command works:
09:06 Todd_ bash -c "cd /opt/Cimcor/CimTrak/CimTrakServer; CimTrakServer.exe -Diagnostics Level=255 > /opt/Cimcor/CimTrak/CimTrakServer/logs/cimtrakdiagnosticreport.stderr.txt 2>&1"
09:07 Todd_ But this one does not catch the stderr
09:07 Todd_ perl6 -e 'my $cmd="cd /opt/Cimcor/CimTrak/CimTrakServer; CimTrakServer.exe -Diagnostics Level=255 > /opt/Cimcor/CimTrak/CimTrakServer/logs/cimtrakdiagnosticreport.stderr.txt 2&>1"; my $str = qqx{$cmd}; say $str;'
09:07 Todd_ cimtrakdiagnosticreport.stderr.txt exists but is zero lenght using qqx
09:10 holyghost I get an error : Cannot import symbol Sprite from Sprite, because it already exists in this lexical scope on https://pastebin.com/grgkSDKh
09:10 holyghost I don't know how to proceed
09:10 holyghost there's PERL6LIB=.
09:11 Todd_ Here is an easier way to reproduce this:
09:11 Todd_ perl6 -e 'my $str=qqx{ls .kjf}.Supply; say "<$str>";'
09:11 Todd_ ls: cannot access '.kjf': No such file or directory <Supply<448989002624>>
09:12 philomath joined #perl6
09:14 Todd_ And the stupid command has to be run from its own directory or it errors out ( the reason for the cd)
09:15 sproctor joined #perl6
09:18 holyghost never mind, I found out
09:19 Todd_ If I do not incude the 2&>1 in teh qqx{}, the stderr splatter all over my terminal.  But do use it in the qqx, I get nothing back.
09:19 neilb joined #perl6
09:20 holyghost timotimo are you there ?
09:20 tyil Todd_: shouldnt it be 2>&1
09:20 Todd_ will check
09:23 Todd_ Yup, you are correct.  Let me see it is helps anything
09:23 holyghost ok, I have gotten my Holly6Game module compiled, the meaning now is to put SDL2::Raw upon it, the code is at http://gomez.yellowcouch.org/holly6src-1.5.tar.gz
09:23 shmibs joined #perl6
09:23 holyghost Then later on I will try to make games with it
09:24 holyghost It's a sublayer for 2D games, the 3D should not be that difficult if you understand something from meshes and materials. I chose SDL2 as it is up to date, I have written far too many SDL 1.2 derived programs
09:25 Todd_ It worked.  Thank you for the second pair of eyes!  I must have stared at that 200 times!
09:25 jast fwiw I didn't see it, either
09:26 tyil :>
09:26 jast didn't help that my client wrapped the line exactly before the 2&>1 so I kind of half-skipped over it
09:27 wander joined #perl6
09:27 wander tyil: o/
09:27 tyil I only noticed when he said the 2&>1 the second time
09:27 tyil wander: hey!
09:28 tyil I might write a new perl 6 related tutorial on my site later today or tomorrow
09:28 tyil not sure if I should use GTK::Simple or GTK::Simpler
09:29 wander where is the site :P
09:30 tyil https://tyil.nl/
09:34 ZzZombo1 I'm parsing an hierarchical data format. I want to add a special callback for then an element is parsed, but it
09:34 ZzZombo1 but I also need to have its parent available there.
09:34 ZzZombo1 How can it be done?
09:35 ZzZombo joined #perl6
09:36 wander tyil: looking forward to it :)
09:36 ryn1x joined #perl6
09:37 ryn1x_ joined #perl6
09:39 ryn1x__ joined #perl6
09:41 dugword joined #perl6
09:44 HoboWithAShotgun joined #perl6
09:44 jhill joined #perl6
09:45 benchable6 joined #perl6
09:45 statisfiable6 joined #perl6
09:45 unicodable6 joined #perl6
09:46 Todd_ chuckle, I found a file called "1' and "2' with a ton of garbage in it.
09:46 jast sounds familiar
09:46 holyghost same here :-)
09:46 jast from back when I didn't have the redirection operators memorized
09:49 bwisti joined #perl6
09:49 ccakes joined #perl6
09:49 scott joined #perl6
09:49 kipd joined #perl6
09:49 obfusk joined #perl6
09:49 pilne joined #perl6
09:49 DickClarke joined #perl6
09:49 jdv79 joined #perl6
09:49 Praise joined #perl6
09:49 dogbert2 joined #perl6
09:49 notbenh_ joined #perl6
09:49 lumimies joined #perl6
09:49 Spot__ joined #perl6
09:49 rindolf joined #perl6
09:53 Todd_ I am calling it a night.  Thank you guys for the help!
09:55 john51 joined #perl6
09:57 domidumont joined #perl6
09:57 mienaikage joined #perl6
09:59 wamba joined #perl6
10:00 sproctor m: role logger { method do-log( $d ) { say "{self} : $d" } };my Int $n = 5;$n does logger; $n.do-log( "Test" );
10:00 camelia rakudo-moar b0cda5909: OUTPUT: «5 : Test␤»
10:00 sproctor So. That works (which is cool) but I'm a bit confused about how.
10:00 sproctor I thought using does for composition won't work on immutable object and Int's are immutable.
10:01 sproctor (Still cool though)
10:01 tyil timotimo: modules.perl6.org says your JSON::Fast module is at 0.9.6, but zef says 0.9.5 is the latest
10:03 greppable6 joined #perl6
10:03 squashable6 joined #perl6
10:03 coverable6 joined #perl6
10:03 bloatable6 joined #perl6
10:09 tyil .tell moritz the .git dir in App::MPD::Notify seems to be a bug thats fixed in App::Cpan6, I can't seem to reproduce it
10:09 yoleaux tyil: I'll pass your message to moritz.
10:09 Cabanossi joined #perl6
10:09 moritz tyil: have you uploaded a version of App::MPD::Notify that does not contain the .git dir?
10:09 yoleaux 10:09Z <tyil> moritz: the .git dir in App::MPD::Notify seems to be a bug thats fixed in App::Cpan6, I can't seem to reproduce it
10:10 tyil moritz: not yet, I can bump the version and reupload if you wish
10:11 robertle joined #perl6
10:12 moritz tyil: that would be nice, though not strictly necessary
10:13 tyil I uploaded a App-MPD-Notify-0.1.0, should be coming around in a bit here
10:14 zakharyas joined #perl6
10:14 tyil seems like App::MPD::Notify was one of my earlier tests to get started with cpan, and I never fixed it to be a "good" upload there
10:15 moritz tyil++
10:23 cgfbee joined #perl6
10:23 buggable New CPAN upload: App-MPD-Notify-0.1.0.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/App-MPD-Notify-0.1.0.tar.gz
10:30 ryn1x joined #perl6
10:32 AlexDaniel` joined #perl6
10:32 CIAvash[m] joined #perl6
10:32 tadzik joined #perl6
10:32 unclechu joined #perl6
10:32 mack[m] joined #perl6
10:32 tyil[m] joined #perl6
10:32 wamba[m] joined #perl6
10:32 M-Illandan joined #perl6
10:32 wictory[m] joined #perl6
10:32 ilmari[m] joined #perl6
10:32 Matthew[m] joined #perl6
10:32 Garland_g[m] joined #perl6
10:32 xui_nya[m] joined #perl6
10:37 AlexDaniel joined #perl6
10:38 stmuk joined #perl6
10:40 ryn1x joined #perl6
10:40 ryn1x_ joined #perl6
10:40 wander joined #perl6
10:40 ryn1x__ joined #perl6
10:47 cdg joined #perl6
10:50 konsolebox joined #perl6
10:50 piojo1 joined #perl6
10:54 Cabanossi joined #perl6
10:58 AlexDaniel wander++
11:06 Exodist joined #perl6
11:11 AlexDaniel joined #perl6
11:16 ryn1x joined #perl6
11:16 ryn1x_ joined #perl6
11:16 ryn1x__ joined #perl6
11:17 wander \o
11:21 wander AlexDaniel: Where is "doc for method Str.val" in "https://docs.perl6.org/routine/Str"?
11:21 wander https://docs.perl6.org/routine/Str
11:21 AlexDaniel wander: Ah! wrong page!
11:21 AlexDaniel wander: https://docs.perl6.org/type/Str
11:21 AlexDaniel wander: look in the ToC
11:21 AlexDaniel wander: it says “Methods”
11:21 AlexDaniel and then lists all methods…  and “sub val”
11:22 wander see
11:23 wander in fact I found that we list all routines below "Methods" in every Type
11:24 wander https://docs.perl6.org/type/Any
11:25 wander https://docs.perl6.org/type/Channel
11:25 wander like these
11:25 wander meanwhile someone use "Subroutine" head
11:27 wander I will modify that issue, for 1. it's about /type/Str, not /routine/Str; 2. it's not build issue, but issue of doc conventions
11:46 raschipi joined #perl6
11:47 xinming joined #perl6
11:52 HoboWithAShotgun joined #perl6
11:53 ryn1x joined #perl6
11:53 ryn1x_ joined #perl6
11:53 ryn1x__ joined #perl6
11:54 Cabanossi joined #perl6
12:02 llfourn joined #perl6
12:03 azawawi joined #perl6
12:03 azawawi good afternoon #perl6
12:04 azawawi https://gist.github.com/azawawi/6c57670d2ec07f539794628e8c3a44e6 # Latest MessagePack benchmark (Pure P6 vs Native P6 vs Inline::Perl5)
12:08 azawawi How can one create a Perl 6 structure in C and then return to Perl 6?
12:11 azawawi .tell nine it is passing all the tests on macOS and linux. Please take a look @ it when you're free. Thanks :)
12:12 azawawi nine: it is passing all the tests on macOS and linux. Please take a look @ it when you're free. Thanks :)  # seems like .tell is down...
12:14 Exodist joined #perl6
12:14 eugene_barsky joined #perl6
12:15 ZzZombo Can I the exact source fragment from this:
12:15 ZzZombo "Cannot look up attributes in a Grammar::VDF::Actions type object
12:15 ZzZombo in method root at I:\Developer\Perl\VDF\lib\.precomp\531476C94944C40F030060AEB60539343668769B.1500922671.09494\11\115941A6FC88ECE1A178278587E96C028C0B56B9 line 1"?
12:15 ZzZombo see*
12:16 raschipi ZzZombo: I'm not sure what you want...
12:17 ZzZombo I can't debug my program based on that, I want to know where exactly it trips on.
12:18 azawawi joined #perl6
12:18 azawawi ZzZombo: i encountered a similar error a lot, most likely an undefined object.. (i.e. Any)
12:19 xinming joined #perl6
12:19 ZzZombo Yeah, and there are many places where an undefined object might be.
12:19 ZzZombo How can I know what line exactly is it at?
12:23 Exodist joined #perl6
12:24 azawawi share the code?
12:25 mcmillhj joined #perl6
12:25 azawawi m: my $a;  say "Undefined" if $a.defined
12:25 camelia rakudo-moar b0cda5909: ( no output )
12:25 azawawi m: my $a;  say "Undefined" unless $a.defined
12:25 camelia rakudo-moar b0cda5909: OUTPUT: «Undefined␤»
12:26 azawawi ZzZombo: perl6-debug-m is your friend.
12:26 azawawi ZzZombo: also remember to `zef install Debugger::UI::CommandLine` for it to work
12:29 nine azawawi: so Data::MessagePack (via Inline::Perl5) is 2 orders of magnitude faster?
12:29 HoboWithAShotgun can i allow Any in a typed has statement? something like: has Int or Any $.foo;
12:29 eliasr joined #perl6
12:30 azawawi nine: 4097 vs 11 iterations/sec ?
12:31 raschipi HoboWithAShotgun: "Int or Any" is just Any because Int is Any
12:31 raschipi "has Any $.foo;" will accept Int or Any
12:32 Exodist joined #perl6
12:32 HoboWithAShotgun m: class Foo { has Int $.bar = Any };
12:32 camelia rakudo-moar b0cda5909: ( no output )
12:32 HoboWithAShotgun m: class Foo { has Int $.bar = Any }; Foo.new
12:32 camelia rakudo-moar b0cda5909: OUTPUT: «Type check failed in assignment to $!bar; expected Int but got Any (Any)␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
12:32 nine azawawi: I've worked a lot on performance, but that difference surprises me :)
12:33 azawawi nine: let me commit the script then :)
12:34 HoboWithAShotgun see? i have a base class. i want to see if a subclass set attribute values over the initial values. any zero is allowed so i want it initialize to Any,
12:35 HoboWithAShotgun hang an, i could use "but" for that
12:35 HoboWithAShotgun *on
12:36 HoboWithAShotgun meh, doesnt work with ints.
12:40 HoboWithAShotgun "has Any $.foo;", yes but also accepts everything else
12:40 raschipi Could you cast to Int in the method where you're setting it?
12:40 HoboWithAShotgun i just want a constraint that says "of this type or undefined"
12:41 ChoHag joined #perl6
12:44 azawawi nine: https://github.com/azawawi/perl6-msgpack/blob/master/benchmark/test-msgpack.pl6
12:44 HoboWithAShotgun subset IntOrAny where * ~~ Int|Any; works
12:45 raschipi But will accept anything that fits into Any
12:46 raschipi "subset IntOrAny where * ~~ Int|Any;" is the same as Any
12:46 Exodist joined #perl6
12:47 HoboWithAShotgun rev2: subset CoolOrAny where { !.defined || $_ ~~ Cool };
12:48 HoboWithAShotgun bad name
12:48 lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = "foo"
12:48 camelia rakudo-moar b0cda5909: OUTPUT: «Type check failed in assignment to $a; expected IntOrAny but got Str ("foo")␤  in block <unit> at <tmp> line 1␤␤»
12:48 lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = Any
12:48 camelia rakudo-moar b0cda5909: ( no output )
12:48 lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = 42
12:48 camelia rakudo-moar b0cda5909: ( no output )
12:50 lizmat m: subset IntOrAny where { .WHAT =:= Int:D || .WHAT =:= Any }; my IntOrAny $a = 42  # if you want to exclude Int type objects
12:50 camelia rakudo-moar b0cda5909: OUTPUT: «Type check failed in assignment to $a; expected IntOrAny but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
12:50 neilb joined #perl6
12:50 lizmat HoboWithAShotgun: ^^^
12:51 wander joined #perl6
12:54 aborazmeh joined #perl6
12:54 aborazmeh joined #perl6
12:54 Cabanossi joined #perl6
12:59 wander m: $[1].^name.say
12:59 camelia rakudo-moar f8e1a5faa: OUTPUT: «Array␤»
12:59 wander m: $[1].[0].^name.say
12:59 camelia rakudo-moar f8e1a5faa: OUTPUT: «Int␤»
13:01 HoboWithAShotgun it's all unneccesary anyway.
13:02 HoboWithAShotgun m: my Int $i; say $i
13:02 camelia rakudo-moar f8e1a5faa: OUTPUT: «(Int)␤»
13:02 HoboWithAShotgun i expected zero.
13:02 HoboWithAShotgun old habits die hard
13:05 raschipi Only Any becomes zero when cast to numeric, doesn't apply to other type objects
13:05 raschipi Or not
13:05 raschipi m: my $i := Int; say +$i
13:05 camelia rakudo-moar f8e1a5faa: OUTPUT: «Use of uninitialized value of type Int in numeric context␤0␤  in block <unit> at <tmp> line 1␤»
13:06 raschipi m: my $i := Int; quietly say +$i
13:06 camelia rakudo-moar f8e1a5faa: OUTPUT: «0␤»
13:09 Exodist joined #perl6
13:12 ryn1x joined #perl6
13:12 ryn1x_ joined #perl6
13:12 ryn1x__ joined #perl6
13:17 wander .ask lizmat we assume text inside Pod::Block::Table are all raw text, but someone uses FormattingCode inside it and think it'll be handled. so should we enable Table to handle nested pod6 code?
13:18 lizmat .
13:18 lizmat good question: I'm not sure I'm qualified to answer that question
13:19 wander examples: https://gist.github.com/W4anD0eR96/925d00160a69c1ec2ae537b2387ec700
13:20 lizmat you mean, using C<*INIT-INSTANT> ?
13:21 lizmat if that's it, then I would say: yes, one could expect that to be handled ?
13:21 Exodist joined #perl6
13:21 wander yes
13:22 lizmat so, yes, I would assume that to be handled.  Is that a problem ?
13:22 wander https://docs.perl6.org/language/variables#Dynamic_variables
13:23 wander Unexpected result here
13:24 wander To fix it outside rakudo, the problem is I cannot build object instanceof Pod without EVAL
13:24 wander ===SORRY!=== Pod::Block::Code is a builtin type, not an external module
13:25 timotimo just means you're not supposed to "use" it
13:25 wander oh
13:25 ryn1x joined #perl6
13:25 ryn1x_ joined #perl6
13:25 ryn1x__ joined #perl6
13:27 wander m: use MONKEY-SEE-NO-EVAL; my $cell = "earlier than C<INIT now> or even C<BEGIN now> executed."; say my $local-pod = EVAL("=begin pod\n"~$cell ~ "\n=end pod\n\$=pod");
13:27 camelia rakudo-moar f8e1a5faa: OUTPUT: «[Pod::Block::Named{:name("pod")}␤  Pod::Block::Para␤    earlier than ␤    Pod::FormattingCode{:type("C")}␤      INIT now␤     or even ␤    Pod::FormattingCode{:type("C")}␤      BEGIN now␤     executed.␤]␤»
13:27 wander ugly :(
13:28 alexk joined #perl6
13:29 wander by any other way I can parse string to build a Pod object(like something done above)?
13:30 lizmat not as far as *I* know, but in this case, that's not saying much
13:31 Exodist joined #perl6
13:31 domidumont joined #perl6
13:32 wander sorry, I don't know what "that's not saying much" literally means :P
13:32 alexk6 joined #perl6
13:33 alexk6 m: package A::B::A::B {}; say A::B::.keys;
13:33 camelia rakudo-moar f8e1a5faa: OUTPUT: «(A)␤»
13:33 alexk6 package A { package B { package A::B {}}}; say A::B::.keys;
13:33 alexk6 m: package A { package B { package A::B {}}}; say A::B::.keys;
13:33 camelia rakudo-moar f8e1a5faa: OUTPUT: «()␤»
13:34 alexk6 m: package A { package B { package C::B {}}}; say A::B::.keys;
13:34 camelia rakudo-moar f8e1a5faa: OUTPUT: «(C)␤»
13:38 HoboWithAShotgun i broke something. "Method call must either supply a name or have a child node that evaluates to the name"
13:39 * HoboWithAShotgun sighs and goes looking for a stray comma or something
13:39 timotimo oh, that's an internal error that no user should be seeing
13:39 timotimo it'd be nice if you could give us a golf
13:40 HoboWithAShotgun it would nice if i knew what i did
13:40 * HoboWithAShotgun applies binary commenting out patterns
13:41 Exodist joined #perl6
13:42 dogbert17 joined #perl6
13:44 mcmillhj joined #perl6
13:47 alexk6 m: package A { package B { package A::B {}}}; say A::B::A::B.WHAT;
13:47 camelia rakudo-moar f8e1a5faa: OUTPUT: «Could not find symbol '&B'␤  in block <unit> at <tmp> line 1␤␤»
13:47 alexk6 m: package A { package B { package C::B {}}}; say A::B::C::B.WHAT;
13:47 camelia rakudo-moar f8e1a5faa: OUTPUT: «(B)␤»
13:49 HoboWithAShotgun timotimo: i forgot to use a module
13:50 timotimo OK, but how did the error appear? o_O
13:51 Exodist joined #perl6
13:52 HoboWithAShotgun basically,
13:53 HoboWithAShotgun m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance }
13:53 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3r-use-dNorHasAnInstanceMethod.instance }7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤»
13:54 HoboWithAShotgun heres the offending code: https://hastebin.com/otujocorof.pl
13:55 timotimo m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance } }
13:55 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod used at line 1␤␤»
13:55 timotimo m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance.WHAT } }
13:55 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod used at line 1␤␤»
13:55 timotimo m: module Something::Blah { sub test { Something.lol } }
13:55 camelia rakudo-moar f8e1a5faa: ( no output )
13:56 timotimo m: module Something::Blah { sub test { Something.lol.what().WHAT.new } }
13:56 camelia rakudo-moar f8e1a5faa: ( no output )
13:56 timotimo m: module Something::Blah { sub test { return Something.lol.what().WHAT.new } }
13:56 camelia rakudo-moar f8e1a5faa: ( no output )
13:56 timotimo not sure how you got that error :(
13:57 HoboWithAShotgun want a tarball?
13:58 timotimo sure
13:59 timotimo i'll be afk soon, but maybe i'll find the time
13:59 scovit joined #perl6
14:00 darkmorph joined #perl6
14:01 cdg joined #perl6
14:01 geospeck joined #perl6
14:04 zakharyas joined #perl6
14:04 domidumont joined #perl6
14:05 Exodist joined #perl6
14:05 wamba joined #perl6
14:05 wander timotimo: yes that means i cannot "use" Pod::To::Table, but how can I build an object of it without ugly EVAL?
14:06 wander from a string
14:07 HoboWithAShotgun i have a tarball ready timotimo. can send when u are ready
14:07 wander the procedure of parsing pod file is inside rakudo, isn't it?
14:07 timotimo wander: you cannot put "use Pod::To::Table" in your code, that's what i meant
14:08 wander ok >_<
14:10 raschipi wander: if you have a string and wants to treat it as code, you need EVAL. Or you could save it to a file and call rakudo on it.
14:10 AlexDaniel joined #perl6
14:14 wander 😝
14:14 perlpilot joined #perl6
14:16 wander yes, that can get thingd done, if I confirm EVAL doesn't do evil things, maybe I should use it bravely
14:16 mempko joined #perl6
14:17 yht joined #perl6
14:21 ZzZombo How can I in my custom Positional class add support for custom subscript adverbs?
14:23 ugexe How would eval (or any method) be able to evaluate code in a ?safe way?
14:25 wander ugexe, in a very case
14:26 wander m: use MONKEY-SEE-NO-EVAL; my $cell = "earlier than C<INIT now> ."; say my $local-pod = EVAL("=begin pod\n"~$cell ~ "\n=end pod\n\$=pod")
14:26 camelia rakudo-moar f8e1a5faa: OUTPUT: «[Pod::Block::Named{:name("pod")}␤  Pod::Block::Para␤    earlier than ␤    Pod::FormattingCode{:type("C")}␤      INIT now␤     .␤]␤»
14:26 dpk joined #perl6
14:26 yoleaux joined #perl6
14:27 Guest84061 joined #perl6
14:27 census can someone please give me step by step directions on how to do perl6 on a mac for a novice? i only use windows. and in windows i put my code in a .txt file and then go into a cmd and type perl6 program.pl6
14:27 wander $cell supplied by user, but all put in =pod pod
14:27 ugexe So if $cell is malicious it runs anyway right
14:28 perlpilot census: you'd do the same thing on a Mac (first making sure that perl6 is in your path)
14:29 census a mac can do a cmd?
14:29 ugexe It’s not all out it pod if cell contains an end pod marker
14:29 census thanks perlpilot
14:29 census also how do i open a .txt in a mac? i use notepad in windows
14:29 perlpilot census: well ... on a Mac you'd open a terminal
14:29 jast I believe textEdit is the default editor
14:30 perlpilot census: you can also use vi and other unix-y programs on a mac
14:30 census perlpilot in cmd with windows i use "cd" to get into the path.
14:30 perlpilot census: same in a terminal on a mac
14:30 census like "cd ..." or "cd desktop" to go ahead or back a path
14:31 ryn1x joined #perl6
14:31 ryn1x_ joined #perl6
14:36 Exodist joined #perl6
14:38 wander ugexe, yes
14:39 wander that is what I worry about
14:39 Cabanossi joined #perl6
14:40 wander the very purpose is to detect and parse pod6 code inside Pod::To::Table, however, out Table treats every item as raw text
14:40 wander instead of recursive parsing it
14:42 Exodist joined #perl6
14:43 mson joined #perl6
14:45 dugword joined #perl6
14:48 ugexe You can’t parse it without running it.
14:53 wander what does rakudo do when runs `perl6 --doc=Text main.p6`, I notice that codes except pod didn't execute
14:55 ilmari wander: put a 'BEGIN say "boom!";' in it
14:56 wander oops
15:02 ChoHag_ joined #perl6
15:02 geospeck Hi guys, I am reading the doc about Dynamic Vars from this(https://docs.perl6.org/language/variables#The_*_Twigil) and trying the code examples in the repl, but I am getting this error "Dynamic variable $*dynamic1 not found"
15:03 geospeck do I need to execute the code from a file and not from the repl?
15:03 wamba joined #perl6
15:07 ryn1x_ joined #perl6
15:07 ryn1x joined #perl6
15:09 ugexe PSA: don’t declare bin scripts in meta6.json ‘provides’ section for modules
15:10 ryn1x__ joined #perl6
15:11 wander geospeck: from a file works well
15:13 geospeck wander: yes, when I execute the script from a file there is no problem, only in repl.
15:15 wander At first I will set a note at that doc section, but to fix it, maybe you can open an issue of it
15:19 geospeck wander: is this the repo https://github.com/perl6/doc so I can open the issue
15:20 wander maybe better in https://github.com/rakudo/rakudo
15:23 wander .ask Zoffix do we have tickets that report the same issue (improperly handle $*variable in REPL)?
15:23 yoleaux wander: I'll pass your message to Zoffix.
15:23 comborico1611 joined #perl6
15:25 comborico1611 m: my $test = test; say "my", $test;
15:25 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    test used at line 1␤␤»
15:25 comborico1611 m: my $test = "test"; say "my", $test;
15:25 camelia rakudo-moar f8e1a5faa: OUTPUT: «mytest␤»
15:26 comborico1611 m: my $test = " test"; say "my", $test;
15:26 camelia rakudo-moar f8e1a5faa: OUTPUT: «my test␤»
15:26 comborico1611 m: my $test = " test"; say "my" $test;
15:26 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3my $test = " test"; say "my"7⏏5 $test;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤      …»
15:26 comborico1611 I see.
15:31 azawawi joined #perl6
15:31 mcmillhj joined #perl6
15:31 azawawi https://gist.github.com/azawawi/9c59b5f48b08aff02e30b92e19f91a4c  # Better MsgPack::unpack performance (hash lookup)
15:32 Geth ¦ doc: 74f9310ac3 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
15:32 Geth ¦ doc: Dispel puzzle caused by rakudo REPL bug
15:32 Geth ¦ doc: review: https://github.com/perl6/doc/commit/74f9310ac3
15:32 synopsebot Link: https://doc.perl6.org/language/variables
15:36 Actualeyes joined #perl6
15:36 Grimy joined #perl6
15:36 Grimy Hi~
15:36 Grimy p6: Bag.new.pick(1)
15:36 camelia rakudo-moar f8e1a5faa: OUTPUT: «(signal SEGV)»
15:36 Grimy Is this already ticketed, or should I make one?
15:39 Cabanossi joined #perl6
15:49 moritz I'm not aware of a ticket/issue
15:53 Actualeyes joined #perl6
15:54 azawawi moritz: i noticed a performance problem... 0.5s difference on a 100_000 for loop
15:54 azawawi moritz: and hi :)
15:55 azawawi moritz: https://github.com/azawawi/perl6-msgpack/blob/master/lib/MsgPack/Unpacker.pm6#L103
15:56 azawawi moritz: apparently for range calculation is slow... if i put it in a variable it is faster by 0.5s. Is that normal?
15:56 timotimo Grimy: investigating
15:57 azawawi is the upper limit of a range evaluated everytime or once in a for loop?
15:57 azawawi i.e. cached or not
15:58 timotimo only once
15:58 timotimo you're creating the range object at which point it just becomes a single object (int, num, rat, Str, doesn't matter)
15:59 timotimo and then you get an iterator that goes from beginning to end
16:01 azawawi apparently that's not the case
16:02 timotimo have you considered --profile?
16:02 mcmillhj_ joined #perl6
16:02 timotimo Grimy: i'm getting rid of the segfault and making it an exception inside moarvm, then the rakudo code can be changed to make sure Bag.new and friends get a valid hash inside them
16:03 timotimo or an empty hash being properly treated
16:03 azawawi timotimo: im already doing that
16:03 * azawawi double checks
16:06 timotimo anyway, moarvm will no longer segfault there, rakudo ought to be patched, i need to rest my rists
16:07 Grimy good, good. no need to make a ticket, since it’s already being fixed, right?
16:08 HoboWithAShotgun joined #perl6
16:09 ilmari m: say Bag.new(1).pick(1)
16:09 camelia rakudo-moar f8e1a5faa: OUTPUT: «P6opaque: get_boxed_ref could not unbox for the representation '20' of type Scalar␤  in block <unit> at <tmp> line 1␤␤»
16:14 mr-foobar joined #perl6
16:18 khw joined #perl6
16:19 troys joined #perl6
16:26 comborico1611 joined #perl6
16:29 pmurias_ joined #perl6
16:30 mcmillhj joined #perl6
16:32 pmurias_ joined #perl6
16:38 comborico1611 joined #perl6
16:45 ryn1x joined #perl6
16:45 ryn1x_ joined #perl6
16:45 ryn1x__ joined #perl6
16:51 kaare_ joined #perl6
16:54 Cabanossi joined #perl6
16:58 ufobat___ m: say so $*CWD.e == $*CWD.resolve.e
16:58 camelia rakudo-moar f8e1a5faa: OUTPUT: «True␤»
16:58 ufobat___ thats False on windows, btw
16:58 azawawi so what does "MoarVM panic: Internal error: zeroed target thread ID in work pass" really mean? :)
17:00 HoboWithAShotgun it means your fans aren't working properly and your motherboard is about to melt
17:01 azawawi :)
17:02 * azawawi built rakudobrew with debug3 opts for valgrind
17:03 comborico1611 Question: please fill in the blank. Defining a class creates a BLANK. a) type object b) type c) both, they mean the same thing
17:06 [Coke] m: my $a = class barf {}; say $a.WHAT;
17:06 camelia rakudo-moar f8e1a5faa: OUTPUT: «(barf)␤»
17:06 [Coke] m: my $a = class :: {}; say $a.WHAT;
17:06 camelia rakudo-moar f8e1a5faa: OUTPUT: «(<anon|81859200>)␤»
17:07 ilmari m: my $a = class :: {}; say $a.HOW
17:07 camelia rakudo-moar f8e1a5faa: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤»
17:08 comborico1611 or d) other :-)
17:09 kaare_ joined #perl6
17:10 comborico1611 I tried to look up :: , but there are too many of those and the docs.
17:10 comborico1611 IN the docs.
17:11 [Coke] comborico1611: https://docs.perl6.org/language/typesystem might be a good read.
17:11 comborico1611 K, thank you.
17:11 [Coke] your question seems to have two parts: is there a distinction between a type and a type object, and then which of those is a class. neh?
17:13 comborico1611 Nope, just the first one.
17:14 comborico1611 My understanding is a Class creates a Type.  I've never heard of a Type Object.
17:15 [Coke] everything's an object, even a Type. :)
17:15 [Coke] as i understand it, it's just one thing.
17:16 Geth ¦ doc: 01d36736ae | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
17:16 Geth ¦ doc: fix typo, azawawi++
17:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/01d36736ae
17:16 synopsebot Link: https://doc.perl6.org/language/variables
17:16 comborico1611 And last night on here, we determined that a variable assigned to The Constructor it's just a container not the object. Ex. my $point = Point2D.new( )
17:18 comborico1611 My understanding is that not everything is an object, but Pearl can internally treat everything as an object. And this is known as Auto boxing.
17:18 comborico1611 Perl*
17:18 comborico1611 Autoboxing*
17:19 comborico1611 If this is splitting hairs, I don't know.
17:20 comborico1611 Related to this topic is how to create an actual name for an object rather than just using ClassName.new and assigning that to a variable.
17:21 mcmillhj joined #perl6
17:21 tyil comborico1611: what do you mean, an actual name for an object? can you give an example on how you want to use it?
17:21 mst I'm not sure how what you mean by 'an actual name for an object'
17:21 HoboWithAShotgun when i have a FALLBACK method and it's arguments are not something i want to handle, can i somehow raise the error that would have been raised without the callback?
17:21 [Coke] comborico1611: https://docs.perl6.org/language/mop
17:21 wander .tell lizmat "tbrowder" is working on Pod::To::Table parsing at rakudo PR#1240.
17:21 yoleaux wander: I'll pass your message to lizmat.
17:22 comborico1611 my $var = ActualNameOfObject ClassName.new( )
17:23 mst yes, but what would that even do/mean ?
17:23 HoboWithAShotgun i know have multi method FALLBACK( $m ) { dosometinginteresting(); } multi method FALLBACK ( $m, *@_ ) { die "unknown mehod" };
17:23 comborico1611 Or even better: ActualNameOfObject = ClassName.new( )
17:24 mst what is this name? why does it exist? what is it for?
17:24 HoboWithAShotgun but that is suboptimal,
17:24 tyil comborico1611: you can type your var, my Class $foo = Foo.new
17:24 tyil if that's what you're aiming to do
17:24 tyil you can also `my Class $foo .= new;`
17:24 setty1 joined #perl6
17:25 tyil s/Foo.new/Class.new/
17:25 mst comborico1611: random syntax doesn't help our confusion when we're trying to understand what the thing *means* - what semantics are you thinking of?
17:25 comborico1611 this may sound snobbish, but it's not the intent. The purpose of the name of the object is to know the name of the object.
17:26 tyil mst: I asked for an example to see the context he wants to use it in, to get a clearer case of what he means
17:26 mst yeah, that would also help
17:26 comborico1611 I'm just trying to figure out the name of the object is always the same as the class. Or if the object is anonymous.
17:27 mst I don't believe objects have names at all in the sense you're talking about, because an object is a value
17:27 mst perl6 is fairly clear about variables having names and values not having names
17:27 comborico1611 I'm coming from C++, where we have names for objects, not variables containing objects.
17:28 comborico1611 Hmm. The value of the object being the address in memory of the class?
17:28 mst if you try and understand perl6 via things like "address in memory" you will not end up understanding perl6
17:29 mst also I can't say I really feel like C++ has names for objects as such
17:30 tyil are you trying to achieve something in particular with these names?
17:30 comborico1611 No.
17:30 tyil then I can't say I quite understand what you mean, sorry
17:32 comborico1611 In C++ you create an object by two things, the name of the class (type) and the objects name.  Ex. Time t; (Time is the class and t is the object.)
17:32 tyil in perl 6 you can do the same, my Time $t;
17:33 tyil (also, that doesn't create the object, you'd need a `new` for that in c++, no?)
17:34 comborico1611 The constructor is called implicitly.
17:34 domidumont joined #perl6
17:34 tyil afaik, there's no implicit constructor call in perl 6
17:34 tyil the shortest you can get is `my Time $t .= new;`
17:35 comborico1611 I see. But $t is not the object, but a variable containing the object.
17:36 comborico1611 (Or so I was told last night.)
17:36 moritz most method calls ignore the container, and go right into the object
17:36 tyil that's probably going in deeper than I know of, you might want to ask a core rakudo dev for that
17:37 perlpilot comborico1611: have you read https://docs.perl6.org/language/containers ?
17:38 mst comborico1611: in C++ can't you still later do 't = new Time(...)' or whatever the syntax is?
17:38 comborico1611 The docs are confusing. 😯
17:38 tyil heh
17:38 comborico1611 Mst, yes.
17:39 perlpilot comborico1611: well ... at least they match life in that regard.  ;)
17:39 comborico1611 Haha.
17:39 Geth ¦ doc: 397588b526 | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
17:39 Geth ¦ doc: Fix spelling typo
17:39 Geth ¦ doc: review: https://github.com/perl6/doc/commit/397588b526
17:39 synopsebot Link: https://doc.perl6.org/language/variables
17:39 mst comborico1611: right, so it's as I remembered - C++ is the same, effectively, and perl6 just makes the distinction more explicit
17:39 Cabanossi joined #perl6
17:39 mst if you can change the value of the variable t to a different instance, then the C++ variable t isn't the object either
17:40 tyil moritz: now there's two App::MPD::Notify on modules.perl6, and they both show they were last updated last month, with the .git dir :(
17:40 mst it's a variable that happens to currently have a value of a particular unnamed object instance
17:40 comborico1611 But seriously I'm trying to get through this beginners book. And often when I go and read the docs, there are operators I'm not aware of. For example // or ===. Then, I have to go look those up. And I don't want to. I would rather focus on the book then go down the rabbit trail
17:41 tyil which beginner's book are you reading?
17:41 perlpilot .oO( Perl 6 -- it's full of rabbits )
17:41 comborico1611 Think Perl
17:42 tyil does it not explain the examples in enough detail?
17:42 comborico1611 Mst, you could be correct. But I don't remember ever running into any code in my C++ book that would indicate that the 't' was rw.
17:43 mst comborico1611: but you just told me it was
17:43 comborico1611 No.
17:43 mst 't = new Time(...)' # you said yes to that, how is that not rw?
17:43 comborico1611 I'm actually a beginner programmer. I've only read one book on c++.  I thought you were referring to another way of creating a object not reassigning it.
17:44 mst ok, so, if you don't understand C++ properly and I don't understand C++ properly, then we're probably best not trying to use C++ to try and understand anything else
17:44 dugword joined #perl6
17:45 comborico1611 lol. I I think I understand it properly.
17:45 perlpilot comborico1611: newbies always think they understand stuff when really they don't quite  :)
17:45 mst if you can't tell me how variable assignment works, then I don't think it's going to be useful to us :)
17:45 domidumont joined #perl6
17:47 tyil comborico1611: if you can supply us with a task you're trying to achieve, we might be able to assist you in getting you what you want
17:47 tyil if the docs are unclear, that too would be appreciated to inform, then we can try to improve it
17:47 mst yeah, I've still not worked out what this mythical 'name of an object' would actually be useful for if it existed
17:48 comborico1611 Haha. Yes.  Thanks for trying.
17:48 mst note: same "I'm not trying to sound snobbish/etc." caveat applies to my comments too
17:49 tyil we're all here to help eachother, so I think that's implied :>
17:49 mspo you mean like a $this ?
17:51 comborico1611 I'm not saying the docs are unclear as they are written for someone soley to use learn from. But from the perspective of someone using another's source, going and looking up a term only to see code they don't recognize, that is going to be unclear.
17:52 tyil I think that could be attributed to the source having unclear or incomplete examples
17:52 comborico1611 Roger that. Much appreciated.
17:52 mcmillhj joined #perl6
17:52 mst I suspect at least in part the problem is that perl6's features interlock to an extent that makes it *really* hard to write an introduction that doesn't end up depending on things it hasn't had a chance to explain yet
17:52 comborico1611 Yeah, I don't expect the docs to line up with a book.
17:52 releasable6 joined #perl6
17:52 mst note that I've attempted to do a completely synthetic intro to perl5, and aaaaaaaaaaa
17:53 tyil comborico1611: I'd suggest you just read the book and ignore the parts that aren't quite clear, hope that everything will be explained in due time, and after that look up things as needed in the docs
17:53 comborico1611 Synthetic? Intro to p6 for p5 users?
17:53 tyil or ask around here to see if anyone might have a simple solution
17:53 perlpilot comborico1611: btw, when you figure this stuff out, maybe write a blog post or some docs or something to help the next guy  :)
17:54 mst synthetic as in synthetic proof
17:54 wamba joined #perl6
17:54 mst where you don't rely on a concept until you've introduced it
17:54 comborico1611 Perlpilot, yes, I'm taking very detailed notes of my experience through the book.
17:54 mst think e.g. Euclid's Elements
17:54 tyil perlpilot++ more perl 6 blogs to help people realize its usable and help beginners understand it are always nice
17:54 comborico1611 I plan on submitting a review.
17:55 comborico1611 Mst, i see.
17:55 comborico1611 Alright guys.  Off to lunch.
17:55 mst because basically that's what you sound like you want, and, well, I agree, but also I'm not good enough to make it happen for perl5 let alone perl6
17:56 perlpilot tyil: "ignore the parts that aren't quite clear"  reminds me of reading LoTR.  I read them when I was 8 or 9 then again as an adult.  But as an adult I was incredulous that I read and understood some of the words Tolkien used.   I'm pretty sure my 8 year old self just glossed over the big words (if they couldn't be figured out from context) and just kept on reading.
17:58 tyil its what I often do when I find something I don't quite understand, hoping for it to be explained shorty afterwards
17:58 tyil then go back to see if the block I was reading is more clear now
18:01 stmuk when I read Tolkien at 11 I skipped the songs ... which I still did last time I read it!
18:02 teatime (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'})  <-- this does not seem to make a lazy iterable
18:03 teatime what am I missing
18:03 teatime or is it because I am assigning it to a @-sigil'd variable
18:04 zakharyas joined #perl6
18:05 tadzik perlpilot: that's how I used to read books in english in general, as a non-native speaker :)
18:06 ExtraCrispy joined #perl6
18:07 ilmari m: my $v = (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'}) say $v.is-lazy;
18:07 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3FFFF).map({.chr}).grep({.unimatch: 'M'})7⏏5 say $v.is-lazy;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        s…»
18:07 teatime (^0x10FFFF).lazy.map… seems to do what I want ...
18:08 ilmari m: my $v = (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'}); say $v.is-lazy;
18:08 camelia rakudo-moar f8e1a5faa: OUTPUT: «False␤»
18:08 ilmari huh, in my repl that hangs spinning on the CPU
18:09 ilmari but in -e '' it works fine
18:09 ilmari m: (^0x10FFFF).lazy.map({.chr}).grep({.unimatch: 'M'}).say
18:09 camelia rakudo-moar f8e1a5faa: OUTPUT: «(...)␤»
18:09 ilmari m: (^0x10FFFF).lazy.map({.chr}).grep({.unimatch: 'M'}).is-lazy.say
18:09 camelia rakudo-moar f8e1a5faa: OUTPUT: «True␤»
18:10 Cabanossi joined #perl6
18:11 Cabanossi joined #perl6
18:15 yht joined #perl6
18:20 philomath joined #perl6
18:23 buggable New CPAN upload: MsgPack-0.0.7.tar.gz by AZAWAWI https://cpan.metacpan.org/authors/id/A/AZ/AZAWAWI/Perl6/MsgPack-0.0.7.tar.gz
18:27 ryn1x joined #perl6
18:27 ryn1x_ joined #perl6
18:27 ryn1x__ joined #perl6
18:30 isBEKaml joined #perl6
18:37 espadrine joined #perl6
18:44 mcsnolte joined #perl6
18:54 yht joined #perl6
18:54 Cabanossi joined #perl6
18:55 AlexDaniel joined #perl6
19:02 geospeck joined #perl6
19:05 p6steve joined #perl6
19:05 AlexDani` joined #perl6
19:14 HoboWithAShotgun m: class Units::MetrePerSecond² {}
19:14 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse class definition␤at <tmp>:1␤------> 3class Units::MetrePerSecond7⏏5² {}␤    expecting any of:␤        generic role␤»
19:14 HoboWithAShotgun meh. :-)
19:23 Ven joined #perl6
19:25 Ven_ joined #perl6
19:34 ufobat___ is there a guide that explains how to compile rakudo on windows? e.g what compiler i could use ..and so one?
19:36 timotimo ufobat___: you can read the appveyor config for a working example
19:39 ufobat___ appvayor offers visual studio, this meens i would need to spend money, right?
19:39 timotimo no
19:39 El_Che ufobat: no,
19:39 timotimo you only need the "community edition"
19:39 ufobat okay :-) i am googling for that
19:39 El_Che ufobat: I use for an other opensource project
19:40 El_Che ufobat: you have open source accounts and the vms have lots of compilers and libs
19:41 ufobat i've created a win7 x64 vm today :-) i have no clue about windows and all the stuff
19:42 El_Che ufobat: on my todo list for some day far in the future :)
19:43 AndChat|688961 joined #perl6
19:44 ufobat actually my "problem" is that resolve() of IO::Path doesn't work on windows. So i first looked at the rakudo code and I tryd to fix it: https://github.com/ufobat/rakudo/commit/db6495868fb3c53527966bf792f157f85bcc637a
19:44 ufobat most probably my fix is quite bad but, i wanted to try in on a windows box
19:47 mcmillhj joined #perl6
19:52 El_Che ufobat: rakudo star has also windows instruction in their gh repo
19:52 El_Che ufobat: dunno how up to date it is
19:54 ufobat found it :)
20:01 ryn1x joined #perl6
20:01 ryn1x_ joined #perl6
20:01 ryn1x__ joined #perl6
20:03 comborico1611 joined #perl6
20:06 HoboWithAShotgun is there an easy way to get the superscript of a given character? for instance 1 => \x[0xB9]
20:08 geekosaur probably not. and it wouldn't necessarily do you any good anyway: I tried scripting that and found that I didn;t have a font with all the superscripts/subscripts, or maybe my terminal was "correcting" them >.<
20:08 moritz HoboWithAShotgun: go through the unicode name?
20:10 moritz what's the reverse of uniname?
20:10 lizmat c[] ?
20:11 moritz my $x = "SUPERSCRIPT ONE"; say "\c[$x]"
20:11 moritz m: my $x = "SUPERSCRIPT ONE"; say "\c[$x]"
20:11 camelia rakudo-moar f8e1a5faa: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3my $x = "SUPERSCRIPT ONE"; say "\c[7⏏5$x]"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
20:11 moritz lizmat: not at run time, it seems
20:11 lizmat :-(
20:11 lizmat I would have expected that to work
20:12 eugene_barsky joined #perl6
20:12 eugene_barsky hi
20:12 moritz hi eugene_barsky
20:13 eugene_barsky every time I write $a = $b if defined $b I feel I'm doing smth wrong, since $b needs to be evaluated twice.
20:13 eugene_barsky Is there a better way?
20:14 HoboWithAShotgun i wonder why they didnt treat super and subscripts like diacritics you can just combine two characters
20:14 colomon eugene_barsky: $a = $b // $a # I think?  it’s an odd question
20:14 moritz then you duplicate $a :-)
20:15 eugene_barsky Sorry for an odd question. :)
20:15 moritz HoboWithAShotgun: maybe they didn't want to turn Unicode into a markup language
20:16 moritz lizmat: do you know where \c within quotes are resolved?
20:16 HoboWithAShotgun but defining a-z superscripts but ommiting the q is a sensible design choice
20:16 lizmat m: my $a = "LATIN CAPITAL LETTER A"; say $a.parse-names   # samcv++ on #perl6-dev
20:16 camelia rakudo-moar f8e1a5faa: OUTPUT: «A␤»
20:16 moritz nqp: say("\c[SUPERSCRIPT ONE]")
20:16 camelia nqp-moarvm: OUTPUT: «¹␤»
20:17 HoboWithAShotgun nqp: say("\c[SUPERSCRIPT A]")
20:17 camelia nqp-moarvm: OUTPUT: «Unrecognized character name 'SUPERSCRIPT A' at line 2, near "]\")"␤   at gen/moar/stage2/NQPHLL.nqp:707  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic)␤ from gen/moar/stage2/NQPHLL.nqp:1332  (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQP…»
20:18 colomon moritz: I don’t think $a R//= $b is going to do it?
20:18 moritz HoboWithAShotgun: uni SUPERSCRIPT|wc -l only gives me 25
20:18 moritz colomon: no
20:18 lizmat m: my $a = "SUPERSCRIPT TWO"; say $a.parse-names
20:18 camelia rakudo-moar f8e1a5faa: OUTPUT: «²␤»
20:20 lizmat m: say "SUPERSCRIPT $_".parse-names for <ONE TWO THREE FOUR>
20:20 camelia rakudo-moar f8e1a5faa: OUTPUT: «¹␤²␤³␤⁴␤»
20:21 rodrigok joined #perl6
20:23 Geth ¦ doc: b663b0428c | (Moritz Lenz)++ | doc/Type/Cool.pod6
20:23 Geth ¦ doc: Reference parse-names in the uniname(s) docs
20:23 Geth ¦ doc:
20:23 Geth ¦ doc: this is where I went looking when I did not know the name of the method
20:23 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b663b0428c
20:23 synopsebot Link: https://doc.perl6.org/type/Cool
20:28 comborico1611 joined #perl6
20:29 azawawi joined #perl6
20:30 azawawi Caught where the pesky heap corruption bug happens at 100_000 elements (randomly) https://github.com/azawawi/perl6-msgpack/blob/master/lib/MsgPack/Packer.pm6#L25
20:32 azawawi CArray indexing has a serious bug... $sbuf.data[ ^$sbuf.size ]
20:33 azawawi Sometimes it works... sometimes it dies with either a rakudo heap corruption panic or internal error: MoarVM panic: Internal error: invalid thread ID \d+ in GC work pass...
20:33 rindolf azawawi: hi
20:34 azawawi rindolf: hey... how r u?
20:34 rindolf azawawi: I extracted a CPAN dist today
20:36 rindolf azawawi: this one - https://metacpan.org/pod/release/SHLOMIF/Test-HTML-Recursive-DeprecatedTags-0.0.1/lib/Test/HTML/Recursive/DeprecatedTags.pm
20:37 Ven joined #perl6
20:37 rindolf azawawi: and worked on freecell solver
20:37 azawawi cool
20:37 rindolf azawawi: you?
20:37 azawawi MsgPack heap corruption bug hunting :)
20:38 rindolf azawawi: ah, good luck
20:52 cdg joined #perl6
20:52 Geth ¦ ecosystem: 898d69601d | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
20:52 Geth ¦ ecosystem: Move MsgPack to CPAN
20:52 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/898d69601d
20:53 ryn1x joined #perl6
20:53 ryn1x_ joined #perl6
20:53 ryn1x__ joined #perl6
20:55 Cabanossi joined #perl6
20:56 Ven_ joined #perl6
21:01 comborico1611 Are there any other ways of creating an object besides new constructor?
21:03 comborico1611 And why does the constructor use => instead of using = ?
21:03 ufobat m: class Foo { method factory() { return self.bless() }}; say Foo.factory()
21:03 camelia rakudo-moar f8e1a5faa: OUTPUT: «Foo.new␤»
21:04 comborico1611 What does bless method do?
21:04 ufobat bless actually creates an object of a class
21:05 ufobat https://docs.perl6.org/routine/bless
21:05 neilb joined #perl6
21:05 comborico1611 I see. Thank you.
21:05 ufobat have you read this: https://docs.perl6.org/language/objects#index-entry-BUILDALL_%28method%29-Object_Construction
21:06 comborico1611 Nope. I'll check it out.
21:06 geekosaur you aren't assigning, you are passing named parameters whose names are the fields to be initialized
21:06 geekosaur if you tried to assign there, it would set values in the calling function, not inside the new object
21:08 comborico1611 This stuff is crazy.
21:09 Exodist joined #perl6
21:09 geekosaur foo($a = 5) assigns 5 to $a and then calls foo($a) aka foo(5)
21:10 geekosaur same would happen with new, except that it would probably throw errors about undefined names
21:10 comborico1611 I feel like C++ is a programming language, and Perl 6 is the thing that builds programming languages.
21:11 geekosaur => creates a key-value binding (a pair) in pair syntax. :name(value) does the same in a different and sometimes more convenient syntax
21:11 geekosaur m: dd (foo => 5)
21:11 camelia rakudo-moar f8e1a5faa: OUTPUT: «:foo(5)␤»
21:11 comborico1611 Hmm.
21:13 comborico1611 I'll write your response in my book.
21:13 ufobat m: sub foo(:$a, :$b) { say "a is $a and b is $b" }; foo(a => 1, b => 2)
21:13 camelia rakudo-moar f8e1a5faa: OUTPUT: «a is 1 and b is 2␤»
21:13 comborico1611 (that I'm reading)
21:14 ufobat thats basically the regular way of passing named parameters in perl6
21:14 comborico1611 Hmm.
21:20 comborico1611 geekosaur, in the expression foo.new( x => 1 ), we are passing the parameter x?
21:21 geekosaur you are passing a single parameyter that is a Pair
21:21 geekosaur the key of the pair is the Str 'x', the value is the Int 1
21:22 comborico1611 Hmm. This is strange.
21:22 geekosaur => is the Pair constructor
21:22 comborico1611 Right.
21:22 geekosaur it can be also written as :x(1)
21:22 comborico1611 Can x be initialized any other way besides these two?
21:23 mcmillhj joined #perl6
21:23 comborico1611 (Initialized by the conductor, that is.)
21:23 geekosaur not from outside the class definition
21:24 comborico1611 Hmm. Okay. I'll add these notes. Thank you.
21:28 eugene_barsky joined #perl6
21:35 * ugexe clicks stackoverflow link on google for programming question. question is closed with the title 'This question is an exact duplicate of:' and the link text shown ends with [DUPLICATE] itself (also the link is a 404)
21:36 Ven joined #perl6
21:42 nadim joined #perl6
21:46 ryn1x_ joined #perl6
21:46 ryn1x joined #perl6
21:46 ryn1x__ joined #perl6
21:46 mson joined #perl6
21:54 Cabanossi joined #perl6
21:56 Ven_ joined #perl6
22:03 dgsntro joined #perl6
22:16 Ven_ joined #perl6
22:22 margeas joined #perl6
22:29 mempko joined #perl6
22:36 Ven joined #perl6
22:40 Exodist joined #perl6
22:46 ryn1x joined #perl6
22:46 ryn1x_ joined #perl6
22:46 ryn1x__ joined #perl6
22:51 Exodist joined #perl6
22:52 mcmillhj joined #perl6
22:52 tabv Just discovered after much frustration that Buf has an append method. This isn't implied somewhere in the docs https://docs.perl6.org/type/Buf, is it?
22:54 Cabanossi joined #perl6
22:54 jnthn tabv: It does indeed appear to be missing in the docs.
22:55 jnthn Ah, it's already filed in the issued tracker also: https://github.com/perl6/doc/issues/530
22:55 tabv feels like reading the sources is the best way to learn something like perl6 anyway
22:55 tabv but it's a steep road
22:56 jnthn The sources of the built-ins are, at least, written in Perl 6 :)
22:56 Ven_ joined #perl6
23:08 jnthn m: say Buf.^methods # there's also introspection, btw
23:08 camelia rakudo-moar f8e1a5faa: OUTPUT: «(reallocate subbuf-rw)␤»
23:08 jnthn m: say Buf.new.^methods # there's also introspection, btw
23:08 camelia rakudo-moar f8e1a5faa: OUTPUT: «(COMPARE unpack bytes of join allocate subbuf-rw Int encoding subbuf Numeric reverse Capture contents SAME decode chars reallocate WHICH Method+{is-nodal}.new Method+{is-nodal}.new Method+{is-nodal}.new pop shift splice Method+{is-nodal}.new Method+{i…»
23:09 jnthn m: say Buf.new.^methods.map(*.name)
23:09 camelia rakudo-moar f8e1a5faa: OUTPUT: «(COMPARE unpack bytes of join allocate subbuf-rw Int encoding subbuf Numeric reverse Capture contents SAME decode chars reallocate WHICH AT-POS ASSIGN-POS list pop shift splice push append unshift prepend elems perl EXISTS-POS gist Bool Str new String…»
23:09 jnthn Finally
23:11 tabv ah, right!
23:16 Ven_ joined #perl6
23:20 ryn1x joined #perl6
23:20 ryn1x_ joined #perl6
23:20 ryn1x__ joined #perl6
23:23 dct joined #perl6
23:24 Geth ¦ doc: holli-holzer++ created pull request #1665: Update 5to6-nutshell.pod6 (mentioned AUTOLOAD/FALLBACK)
23:24 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1665
23:25 HoboWithAShotgun letzte amtshandlung. good night ppl
23:29 b2gills m: my $a = 1; my $b = 3; $a [R//]= $b; say $a
23:29 camelia rakudo-moar f8e1a5faa: OUTPUT: «3␤»
23:32 colomon m: my $a = 1; my $b; $a [R//]= $b; say $a
23:32 camelia rakudo-moar f8e1a5faa: OUTPUT: «1␤»
23:33 colomon b2gills++
23:35 colomon eugene_barsky: ^^
23:36 colomon though I don’t think I’d recommend using it instead of $a = $b if defined $b
23:36 Ven joined #perl6
23:37 b2gills m: my $a = 1; my $b = 3; [[[R[[[//]]]]=]] $a, $b; say $a # always remember you can always add [] around infix operators, and usually even as list reductions
23:37 camelia rakudo-moar f8e1a5faa: OUTPUT: «3␤»
23:48 mempko joined #perl6
23:48 comborico1611 joined #perl6
23:52 Aaronepower joined #perl6
23:53 cdg joined #perl6
23:54 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo