»ö« 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.
00:00 AndChat|688961 left, comborico1611 joined 00:01 mcmillhj left 00:02 cpage_ left 00:03 ryn1x__ left, ryn1x_ left, ryn1x left, wamba left 00:04 cpage_ joined 00:06 ryn1x joined, ryn1x_ joined 00:08 ryn1x__ joined 00:15 ryn1x_ left 00:16 ryn1x__ left 00:17 ryn1x left 00:35 ryn1x joined 00:39 ryn1x left 00:43 ZzZombo left 00:44 ZzZombo joined 00:46 troys is now known as troys_ 00:49 cpage_ left, ryn1x joined, ryn1x_ joined 00:51 cpage_ joined 00:54 ryn1x_ left, ryn1x left, Exodist left 00:55 pecastro left, pecastro joined 00:56 mempko left 00:57 Exodist joined 01:01 mcmillhj joined 01:05 gfldex left 01:07 Exodist left 01:10 Exodist joined, mempko joined 01:11 ryn1x joined, ryn1x_ joined 01:12 ryn1x__ joined 01:14 cdg_ left
comborico1611 Anyone around? 01:16
01:16 Exodist left
MasterDuke .seen Anyone 01:17
yoleaux I haven't seen Anyone around.
comborico1611 heh
MasterDuke sorry, doesn't look like it
comborico1611 I haven't seen you in here yet. 01:18
MasterDuke i'm usually only here in the evenings 01:19
01:19 Exodist joined, cdg joined
comborico1611 Want to try to answer a question? 01:19
MasterDuke shoot 01:20
01:20 troys_ is now known as troys
comborico1611 I'm wondering if the variable is the actual object, or the foo-class.new 01:21
Example:
my $variable = Foo-class.new( ); 01:22
geekosaur it's not lazy, if that's what you mean 01:23
01:23 cdg left
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
MasterDuke m: my $variable = Foo-class.new( ); say $variable.^name 01:24
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Foo-class used at line 1
MasterDuke m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.^name
camelia Foo-class
geekosaur m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.WHAT
camelia (Foo-class)
geekosaur um, not what I wanted
m: class Foo-class { }; my $variable = Foo-class.new( ); say $variable.WHICH 01:25
camelia Foo-class|81720992
comborico1611 Like is $variable the object or Foo-class?
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
meanwhile that .WHICH I did shows a Foo-class object 01:26
m: class Foo-class {}; dd Foo-class.WHICH
camelia ObjAt.new("Foo-class|U62882856")
01:27 MasterDuke_ joined
geekosaur hm, that wasn't what I intended 01:27
01:28 Exodist left
geekosaur oh, right, type object 01:28
(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
geekosaur m: my $x = Int; say defined $x 01:29
camelia False
01:29 giraffe joined 01:30 giraffe is now known as Guest32325
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
(this is somewhat confusing_ 01:31
MasterDuke_ do you mean object in the non-programming language sense?
01:31 MasterDuke left
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.
MasterDuke_ ah, then $variable would usually be the object/instantation, yes 01:33
01:33 gfldex joined
comborico1611 Is $variable an alias for Foo-class object? 01:33
01:33 Redrield left
comborico1611 Is $variable ro, then? 01:34
MasterDuke_ kind of. could also say it's a container for a Foo-class object
geekosaur no
m: class Foo-class {}; my Foo-class $x .= new; dd $x.VAR 01:35
camelia Foo-class.new
comborico1611 Hmm. Alright. Thanks guys. Back to the book. I'm watching the screen, though.
geekosaur hm, wrong thinhg
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
the container is mutable
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
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
comborico1611 Hmm. I see. Thanks, guys. 01:38
01:39 Cabanossi left 01:40 itaipu joined
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 ( no output )
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 }
camelia 10000
10000
10000
10000
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 1000000
1000000
1000000
1000000
timotimo that's not enough work?
... i forgot to re-assign :)
01:42 Cabanossi joined
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 Foo-class $var = Foo-class.new
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; }
camelia Foo-class $var = Foo-class.new
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 }
camelia Foo-class $var = Foo-class.new
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
timotimo *shrug*
comborico1611 I'm not sure what you're doing. Heh. 01:43
timotimo i'm trying to create lots of objects so that the garbage collector would run 01:44
i might be doing something wrong anyway
01:45 ryn1x left 01:46 ryn1x__ left, ryn1x_ left
comborico1611 Welp. I'm going to rest now. Goodnight. 01:46
timotimo good nigth!
comborico1611 Thanks for trying!
timotimo er
01:46 comborico1611 left 01:49 ZzZombo1 joined 01:50 El_Che joined, ryn1x_ joined, ryn1x joined, ryn1x__ joined, ZzZombo left 01:51 cdg joined 01:52 kalkin-- joined 01:55 ryn1x_ left, ryn1x left, ryn1x__ left 01:56 kalkin--- left, cdg left 02:01 rindolf left 02:02 Actualeyes left 02:06 aborazmeh joined, aborazmeh left, aborazmeh joined
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 Foo-class $var = Foo-class.new
timotimo a heap snapshot seems to suggest dd is making it unhappy 02:08
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 }
camelia i got garbage collected!
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
timotimo look, see?
somehow $*PERLSEEN or so is hanging on to it?
could it be things you dd and/or .perl will stick around forever 02:09
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 Foo-class $var = Foo-class.new
100000
100000
100000
100000
100000
100000
100000
100000
100000
100000
Int $var = 99
timotimo wait what :)
ah, stdout vs stderr i suppose?
MasterDuke_ i guess you aren't likely to see dd in production code / hot paths, so not terrible 02:12
02:12 wander left
MasterDuke_ but could throw off debugging 02:12
02:16 yht joined, wander joined 02:18 ryn1x joined, ryn1x_ joined 02:23 ryn1x_ left, ryn1x left, ryn1x joined, ryn1x_ joined, ryn1x__ joined 02:24 mempko left 02:27 ryn1x left 02:28 ryn1x_ left, ryn1x__ left 02:47 ilbot3 left 02:48 imcsk8 left, imcsk8 joined 02:52 troys is now known as troys_ 02:54 Cabanossi left 02:55 noganex joined 02:56 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:57 Cabanossi joined, noganex_ left 02:59 dogbert17 left 03:01 ryn1x joined, ryn1x_ joined, ryn1x__ joined 03:08 napo1eon joined 03:09 mcmillhj left 03:10 colomon_ joined 03:12 ufobat___ joined 03:13 colomon left, colomon_ is now known as colomon 03:16 ufobat_ left 03:20 noganex_ joined 03:23 noganex left 03:24 llfourn left 03:26 llfourn joined 03:33 ryn1x left, ryn1x__ left, ryn1x_ left 03:35 jameslenz joined 03:44 ryn1x joined 03:48 ryn1x left 03:49 colomon left 03:50 colomon joined 03:55 Cabanossi left 03:57 Cabanossi joined 04:03 wander left 04:06 Cabanossi left 04:09 Cabanossi joined 04:12 ryn1x joined, ryn1x_ joined 04:13 ryn1x__ joined 04:14 espadrine left 04:20 wamba joined, ryn1x__ left, ryn1x_ left, ryn1x left 04:25 ryn1x joined, ryn1x_ joined, ryn1x__ joined 04:32 dugword joined 04:34 ryn1x__ left, ryn1x_ left, ryn1x left 04:39 HoboWithAShotgun left 04:44 ryn1x joined, ryn1x_ joined 04:45 wander joined 04:49 ryn1x__ joined 04:52 yht left 04:53 khw left 04:59 aborazmeh left 05:05 ryn1x__ left, ryn1x_ left, ryn1x left 05:17 ryn1x joined 05:19 ryn1x_ joined, ryn1x__ joined
Geth Pod-To-HTML: 0ae43c1fd1 | W4anD0eR96++ | 2 files
fix html block now emit raw HTML

Inside html block, `=begin html #lines =end html`, we assume almost *everything* is raw HTML.
Because of the implementation, pod6 syntax will be removed. That is, `C<code> -> code`, `=item1 sth -> sth`. To write down ... (7 more lines)
05:20
05:21 Cabanossi left 05:23 wamba left 05:24 Cabanossi joined 05:25 ryn1x left, ryn1x__ left, ryn1x_ left 05:32 wander left 05:49 dugword left 05:52 dugword joined 05:56 ryn1x joined, ryn1x_ joined 06:00 ryn1x_ left, ryn1x left 06:08 philomath joined 06:11 cdg joined 06:13 troys_ is now known as troys 06:15 mson left, cdg left 06:18 piojo left 06:25 wamba joined 06:29 ryn1x joined 06:30 ryn1x_ joined 06:31 ryn1x__ joined 06:32 cdg joined 06:36 cdg left 06:38 Cabanossi left 06:39 Cabanossi joined 06:48 nadim joined 06:57 darutoko joined, Todd_ joined
Todd_ I think I may have foudn a booboo in the documentation. docs.perl6.org/syntax/qqx 06:58
my $output = qqx{grep $option $word $file};
I can not get qxx to work unless I put a space between the qxx and the { 06:59
The error message of `qxx{` is
06:59 domidumont joined
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'? 06:59
moritz Todd_: qqx is not a function, so you can't use () 07:00
Todd_: just use it as it is in the example (qqx{...}), and it works
Todd_ $ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx ($cmd);'
works
$ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx{$cmd};' 07:01
works too
What am I doing wrong with this code?
my $cmd = "cd /opt/Cimcor/CimTrak/CimTrakServer; CimTrakServer.exe -Diagnostics \"Level=255\""; 07:02
my $str = qxx { $cmd };
Undeclared routine: qxx used at line 465. Did you mean 'QX'?
same proble if I remove the space. 07:03
07:03 ryn1x__ left, ryn1x_ left, ryn1x left 07:04 domidumont left
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
Todd_ Like this; 07:06
$ perl6 -e 'my $msg="help me!"; my $cmd="echo $msg | notify-send -u normal -t 2000 test \"$msg\""; qqx{$cmd};'
moritz Todd_: no, that's qqx
you wrote qxx
you can't just make stuff up, and expect it to work :-)
Todd_ mumble mumble mumble. Thank you for the second pair of eyes! 07:07
Why not! Forget I asked that.
07:08 Cabanossi left 07:09 Cabanossi joined, ryn1x joined, ryn1x_ joined, ryn1x__ joined 07:14 ryn1x__ left, ryn1x_ left, ryn1x left 07:20 cpage_ left 07:31 lowbro joined, lowbro left, lowbro joined 07:36 Cabanossi left 07:39 Cabanossi joined 07:41 dugword left 07:42 philomath left 07:44 domidumont left, domidumont joined 07:45 AACENXH joined, GHAA3V3X joined, ryn1x joined 07:46 wamba left 07:49 abraxxa joined 07:50 ryn1x left 07:52 troys left, wamba joined
Geth doc: 0f657e57d1 | W4anD0eR96++ | 3 files
Fix #641 Add hook of TypeGraph in each Type at TOC

Local build success.
Close #641
07:59
08:02 jonas1 joined 08:19 cpage_ joined 08:24 aeruder left, ryn1x joined 08:25 ryn1x_ joined 08:27 ryn1x__ joined 08:29 aeruder joined 08:32 pmurias joined 08:34 zakharyas joined, konsolebox left
Todd_ Is there a way to slurp the stderr? 08:35
08:37 Cabanossi left 08:39 Cabanossi joined 08:53 neilb left 08:58 ryn1x__ left 08:59 ryn1x left, ryn1x_ left 09:00 ryn1x joined 09:01 ryn1x_ joined, piojo joined 09:02 geospeck joined
Todd_ With qqx{...} is there a way to pick up the both STDIN and STDERR? 09:02
09:03 dakkar joined 09:05 ryn1x left
samcv Todd_, you could use pipes since qqx uses the shell 09:05
09:06 ryn1x_ left, sena_kun joined
Todd_ I am frustrated as this command works: 09:06
bash -c "cd /opt/Cimcor/CimTrak/CimTrakServer; CimTrakServer.exe -Diagnostics Level=255 > /opt/Cimcor/CimTrak/CimTrakServer/logs/cimtrakdiagnosticreport.stderr.txt 2>&1"
But this one does not catch the stderr 09:07
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;'
cimtrakdiagnosticreport.stderr.txt exists but is zero lenght using qqx
holyghost I get an error : Cannot import symbol Sprite from Sprite, because it already exists in this lexical scope on pastebin.com/grgkSDKh 09:10
I don't know how to proceed
there's PERL6LIB=.
Todd_ Here is an easier way to reproduce this: 09:11
perl6 -e 'my $str=qqx{ls .kjf}.Supply; say "<$str>";'
ls: cannot access '.kjf': No such file or directory <Supply<448989002624>>
09:12 philomath joined
Todd_ And the stupid command has to be run from its own directory or it errors out ( the reason for the cd) 09:14
09:15 sproctor joined
holyghost never mind, I found out 09:18
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
09:19 neilb joined
holyghost timotimo are you there ? 09:20
tyil Todd_: shouldnt it be 2>&1
Todd_ will check
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 gomez.yellowcouch.org/holly6src-1.5.tar.gz
09:23 shmibs joined
holyghost Then later on I will try to make games with it 09:23
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:24
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
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
wander tyil: o/ 09:27
tyil I only noticed when he said the 2&>1 the second time
wander: hey!
I might write a new perl 6 related tutorial on my site later today or tomorrow 09:28
not sure if I should use GTK::Simple or GTK::Simpler
wander where is the site :P 09:29
tyil tyil.nl/ 09:30
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
but I also need to have its parent available there.
How can it be done?
09:34 ZzZombo1 is now known as ZzZombo 09:35 ZzZombo left, ZzZombo joined
wander tyil: looking forward to it :) 09:36
09:36 ryn1x joined 09:37 ryn1x_ joined 09:39 ryn1x__ joined 09:41 dugword joined 09:43 philomath left, bwisti left, Matthew[m] left, ccakes left, scott left, kipd left 09:44 HoboWithAShotgun joined, jhill joined 09:45 unicodable6 left, statisfiable6 left, benchable6 left, coverable6 left, bloatable6 left, greppable6 left, benchable6 joined, statisfiable6 joined, unicodable6 joined, squashable6 left 09:46 dugword left
Todd_ chuckle, I found a file called "1' and "2' with a ton of garbage in it. 09:46
jast sounds familiar
holyghost same here :-)
09:46 wictory[m] left
jast from back when I didn't have the redirection operators memorized 09:46
09:46 CIAvash[m] left, M-Illandan left 09:47 mack[m] left, unclechu left, xui_nya[m] left, AlexDaniel` left, tadzik left, ilmari[m] left, tyil[m] left, Garland_g[m] left, mienaikage left, wamba[m] left 09:49 bwisti joined, ccakes joined, scott joined, kipd joined, obfusk joined, pilne joined, DickClarke joined, jdv79 joined, Praise joined, dogbert2 joined, notbenh_ joined, lumimies joined, Spot__ joined, rindolf joined 09:50 wamba left, john51 left
Todd_ I am calling it a night. Thank you guys for the help! 09:53
09:54 Todd_ left 09:55 john51 joined 09:56 domidumont left 09:57 domidumont joined, mienaikage joined 09:59 wamba joined
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 5 : Test
sproctor So. That works (which is cool) but I'm a bit confused about how.
I thought using does for composition won't work on immutable object and Int's are immutable.
(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, squashable6 joined, ChanServ sets mode: +v greppable6, ChanServ sets mode: +v squashable6, coverable6 joined, ChanServ sets mode: +v coverable6, bloatable6 joined, ChanServ sets mode: +v bloatable6 10:06 zakharyas left 10:07 Cabanossi left
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
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
tyil moritz: not yet, I can bump the version and reupload if you wish 10:10
10:10 ryn1x__ left 10:11 ryn1x left, robertle joined, ryn1x_ left
moritz tyil: that would be nice, though not strictly necessary 10:12
tyil I uploaded a App-MPD-Notify-0.1.0, should be coming around in a bit here 10:13
10:14 zakharyas joined
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:14
moritz tyil++ 10:15
10:18 cgfbee left 10:23 cgfbee joined
buggable New CPAN upload: App-MPD-Notify-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz 10:23
10:30 ryn1x joined 10:31 llfourn left 10:32 wander left, AlexDaniel` joined, CIAvash[m] joined, tadzik joined, unclechu joined, mack[m] joined, tyil[m] joined, wamba[m] joined, M-Illandan joined, wictory[m] joined, ilmari[m] joined, Matthew[m] joined, Garland_g[m] joined, xui_nya[m] joined 10:35 ryn1x left 10:37 AlexDaniel joined 10:38 stmuk joined 10:40 ryn1x joined, ryn1x_ joined, wander joined, ryn1x__ joined 10:45 ryn1x_ left, ryn1x left, ryn1x__ left 10:47 domidumont left, cdg joined 10:50 konsolebox joined, piojo1 joined 10:51 piojo left 10:52 cdg left 10:53 Cabanossi left 10:54 Cabanossi joined
AlexDaniel wander++ 10:58
11:06 Exodist left, Exodist joined 11:08 MasterDuke_ left 11:11 AlexDaniel left, AlexDaniel joined 11:16 ryn1x joined, ryn1x_ joined, ryn1x__ joined
wander \o 11:17
AlexDaniel: Where is "doc for method Str.val" in "docs.perl6.org/routine/Str"? 11:21
docs.perl6.org/routine/Str
AlexDaniel wander: Ah! wrong page!
11:21 ryn1x__ left, ryn1x_ left, ryn1x left
AlexDaniel wander: docs.perl6.org/type/Str 11:21
wander: look in the ToC
wander: it says “Methods”
and then lists all methods… and “sub val”
wander see 11:22
in fact I found that we list all routines below "Methods" in every Type 11:23
docs.perl6.org/type/Any 11:24
docs.perl6.org/type/Channel 11:25
like these
meanwhile someone use "Subroutine" head
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:27
11:39 piojo1 left 11:41 HoboWithAShotgun left 11:46 raschipi joined 11:47 xinming joined 11:50 AlexDaniel left 11:52 Cabanossi left, HoboWithAShotgun joined 11:53 ryn1x joined, ryn1x_ joined, ryn1x__ joined 11:54 Cabanossi joined 12:02 llfourn joined 12:03 azawawi joined
azawawi good afternoon #perl6 12:03
gist.github.com/azawawi/6c57670d2e...8e8c3a44e6 # Latest MessagePack benchmark (Pure P6 vs Native P6 vs Inline::Perl5) 12:04
How can one create a Perl 6 structure in C and then return to Perl 6? 12:08
.tell nine it is passing all the tests on macOS and linux. Please take a look @ it when you're free. Thanks :) 12:11
12:11 Exodist left
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:12
12:13 azawawi left 12:14 Exodist joined, eugene_barsky joined
ZzZombo Can I the exact source fragment from this: 12:15
"Cannot look up attributes in a Grammar::VDF::Actions type object
in method root at I:\Developer\Perl\VDF\lib\.precomp\531476C94944C40F030060AEB60539343668769B.1500922671.09494\11\115941A6FC88ECE1A178278587E96C028C0B56B9 line 1"?
see*
raschipi ZzZombo: I'm not sure what you want... 12:16
ZzZombo I can't debug my program based on that, I want to know where exactly it trips on. 12:17
12:17 xinming left 12:18 azawawi joined
azawawi ZzZombo: i encountered a similar error a lot, most likely an undefined object.. (i.e. Any) 12:18
12:19 xinming joined
ZzZombo Yeah, and there are many places where an undefined object might be. 12:19
How can I know what line exactly is it at?
12:20 Exodist left 12:23 Exodist joined
azawawi share the code? 12:24
12:25 mcmillhj joined
azawawi m: my $a; say "Undefined" if $a.defined 12:25
camelia ( no output )
azawawi m: my $a; say "Undefined" unless $a.defined
camelia Undefined
azawawi ZzZombo: perl6-debug-m is your friend. 12:26
12:26 eugene_barsky left, ryn1x__ left
azawawi ZzZombo: also remember to `zef install Debugger::UI::CommandLine` for it to work 12:26
12:27 neilb left, ryn1x_ left 12:28 ryn1x left, wander left
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 Exodist left, eliasr joined
azawawi nine: 4097 vs 11 iterations/sec ? 12:30
12:30 mcmillhj left
raschipi HoboWithAShotgun: "Int or Any" is just Any because Int is Any 12:31
"has Any $.foo;" will accept Int or Any
12:32 Exodist joined
HoboWithAShotgun m: class Foo { has Int $.bar = Any }; 12:32
camelia ( no output )
HoboWithAShotgun m: class Foo { has Int $.bar = Any }; Foo.new
camelia 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
nine azawawi: I've worked a lot on performance, but that difference surprises me :)
12:33 zakharyas left
azawawi nine: let me commit the script then :) 12:33
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:34
hang an, i could use "but" for that 12:35
*on
meh, doesnt work with ints. 12:36
12:39 ChoHag left
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?
HoboWithAShotgun i just want a constraint that says "of this type or undefined"
12:41 ChoHag joined
azawawi nine: github.com/azawawi/perl6-msgpack/b...sgpack.pl6 12:44
HoboWithAShotgun subset IntOrAny where * ~~ Int|Any; works
raschipi But will accept anything that fits into Any 12:45
12:45 Exodist left
raschipi "subset IntOrAny where * ~~ Int|Any;" is the same as Any 12:46
12:46 Exodist joined
HoboWithAShotgun rev2: subset CoolOrAny where { !.defined || $_ ~~ Cool }; 12:47
bad name 12:48
lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = "foo"
camelia Type check failed in assignment to $a; expected IntOrAny but got Str ("foo")
in block <unit> at <tmp> line 1
lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = Any
camelia ( no output )
lizmat m: subset IntOrAny where { .WHAT =:= Int || .WHAT =:= Any }; my IntOrAny $a = 42
camelia ( no output )
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 Type check failed in assignment to $a; expected IntOrAny but got Int (42)
in block <unit> at <tmp> line 1
12:50 neilb joined
lizmat HoboWithAShotgun: ^^^ 12:50
12:51 wander joined 12:52 Cabanossi left 12:54 aborazmeh joined, aborazmeh left, aborazmeh joined, Cabanossi joined
wander m: $[1].^name.say 12:59
camelia Array
wander m: $[1].[0].^name.say
camelia Int
HoboWithAShotgun it's all unneccesary anyway. 13:01
m: my Int $i; say $i 13:02
camelia (Int)
HoboWithAShotgun i expected zero.
old habits die hard
raschipi Only Any becomes zero when cast to numeric, doesn't apply to other type objects 13:04
Or not 13:05
m: my $i := Int; say +$i
camelia Use of uninitialized value of type Int in numeric context
0
in block <unit> at <tmp> line 1
13:05 geospeck left 13:06 Exodist left
raschipi m: my $i := Int; quietly say +$i 13:06
camelia 0
13:09 Exodist joined 13:12 ryn1x joined, ryn1x_ joined, ryn1x__ joined 13:17 ryn1x__ left, ryn1x_ left, ryn1x left, azawawi left
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:17
lizmat . 13:18
good question: I'm not sure I'm qualified to answer that question
wander examples: gist.github.com/W4anD0eR96/925d001...b2387ec700 13:19
13:20 Exodist left
lizmat you mean, using C<*INIT-INSTANT> ? 13:20
if that's it, then I would say: yes, one could expect that to be handled ? 13:21
13:21 Exodist joined
wander yes 13:21
lizmat so, yes, I would assume that to be handled. Is that a problem ? 13:22
wander docs.perl6.org/language/variables#..._variables
Unexpected result here 13:23
To fix it outside rakudo, the problem is I cannot build object instanceof Pod without EVAL 13:24
===SORRY!=== Pod::Block::Code is a builtin type, not an external module
timotimo just means you're not supposed to "use" it 13:25
wander oh
13:25 ryn1x joined, ryn1x_ joined, ryn1x__ joined
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 [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.
]
wander ugly :(
13:28 Exodist left, alexk joined 13:29 alexk is now known as Guest10595
wander by any other way I can parse string to build a Pod object(like something done above)? 13:29
lizmat not as far as *I* know, but in this case, that's not saying much 13:30
13:31 Exodist joined, domidumont joined
wander sorry, I don't know what "that's not saying much" literally means :P 13:32
13:32 Guest10595 left, alexk6 joined
alexk6 m: package A::B::A::B {}; say A::B::.keys; 13:33
camelia (A)
alexk6 package A { package B { package A::B {}}}; say A::B::.keys;
m: package A { package B { package A::B {}}}; say A::B::.keys;
camelia ()
alexk6 m: package A { package B { package C::B {}}}; say A::B::.keys; 13:34
camelia (C)
13:37 wamba left
HoboWithAShotgun i broke something. "Method call must either supply a name or have a child node that evaluates to the name" 13:38
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
it'd be nice if you could give us a golf
HoboWithAShotgun it would nice if i knew what i did 13:40
13:40 Exodist left
HoboWithAShotgun applies binary commenting out patterns 13:40
13:41 Exodist joined 13:42 dogbert17 joined 13:44 mcmillhj joined 13:45 aborazmeh left
alexk6 m: package A { package B { package A::B {}}}; say A::B::A::B.WHAT; 13:47
camelia Could not find symbol '&B'
in block <unit> at <tmp> line 1
alexk6 m: package A { package B { package C::B {}}}; say A::B::C::B.WHAT;
camelia (B)
13:48 Exodist left
HoboWithAShotgun timotimo: i forgot to use a module 13:49
timotimo OK, but how did the error appear? o_O 13:50
13:51 Exodist joined
HoboWithAShotgun basically, 13:52
m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance } 13:53
camelia 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
HoboWithAShotgun heres the offending code: hastebin.com/otujocorof.pl 13:54
timotimo m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance } } 13:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod used at line 1
timotimo m: module Foo { sub { SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod.instance.WHAT } }
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
SomeObjectThatExistsButIsNeither-use-dNorHasAnInstanceMethod used at line 1
timotimo m: module Something::Blah { sub test { Something.lol } }
camelia ( no output )
timotimo m: module Something::Blah { sub test { Something.lol.what().WHAT.new } } 13:56
camelia ( no output )
timotimo m: module Something::Blah { sub test { return Something.lol.what().WHAT.new } }
camelia ( no output )
timotimo not sure how you got that error :(
HoboWithAShotgun want a tarball? 13:57
timotimo sure 13:58
i'll be afk soon, but maybe i'll find the time 13:59
13:59 scovit joined 14:00 darkmorph joined 14:01 ryn1x_ left, ryn1x left, cdg joined, geospeck joined 14:02 ryn1x__ left, Exodist left 14:04 domidumont left, zakharyas joined, domidumont joined 14:05 Exodist joined, wamba joined
wander timotimo: yes that means i cannot "use" Pod::To::Table, but how can I build an object of it without ugly EVAL? 14:05
from a string 14:06
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?
timotimo wander: you cannot put "use Pod::To::Table" in your code, that's what i meant
wander ok >_< 14:08
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
14:10 AlexDaniel joined
wander 😝 14:14
14:14 perlpilot joined
wander yes, that can get thingd done, if I confirm EVAL doesn't do evil things, maybe I should use it bravely 14:16
14:16 mempko joined 14:17 yht joined
ZzZombo How can I in my custom Positional class add support for custom subscript adverbs? 14:21
ugexe How would eval (or any method) be able to evaluate code in a ?safe way? 14:23
wander ugexe, in a very case 14:25
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 [Pod::Block::Named{:name("pod")}
Pod::Block::Para
earlier than
Pod::FormattingCode{:type("C")}
INIT now
.
]
14:26 dpk joined, yoleaux joined, ChanServ sets mode: +v yoleaux 14:27 Guest84061 joined
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
ugexe So if $cell is malicious it runs anyway right
perlpilot census: you'd do the same thing on a Mac (first making sure that perl6 is in your path) 14:28
census a mac can do a cmd? 14:29
ugexe It’s not all out it pod if cell contains an end pod marker
census thanks perlpilot
also how do i open a .txt in a mac? i use notepad in windows
perlpilot census: well ... on a Mac you'd open a terminal
jast I believe textEdit is the default editor
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.
perlpilot census: same in a terminal on a mac
census like "cd ..." or "cd desktop" to go ahead or back a path
14:30 Exodist left 14:31 ryn1x joined, ryn1x_ joined 14:36 ryn1x_ left, ryn1x left, Exodist joined 14:38 Cabanossi left
wander ugexe, yes 14:38
14:38 Guest84061 left
wander that is what I worry about 14:39
14:39 Cabanossi joined
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
instead of recursive parsing it
14:41 Exodist left 14:42 Exodist joined 14:43 mson joined 14:45 dugword joined
ugexe You can’t parse it without running it. 14:48
14:49 dugword left
wander what does rakudo do when runs `perl6 --doc=Text main.p6`, I notice that codes except pod didn't execute 14:53
ilmari wander: put a 'BEGIN say "boom!";' in it 14:55
wander oops
14:57 wamba left 14:59 HoboWithAShotgun left 15:02 ChoHag_ joined
geospeck Hi guys, I am reading the doc about Dynamic Vars from this(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:02
do I need to execute the code from a file and not from the repl? 15:03
15:03 wamba joined 15:05 ChoHag left 15:07 ryn1x_ joined, ryn1x joined
ugexe PSA: don’t declare bin scripts in meta6.json ‘provides’ section for modules 15:09
15:10 ryn1x__ joined
wander geospeck: from a file works well 15:11
geospeck wander: yes, when I execute the script from a file there is no problem, only in repl. 15:13
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:15
geospeck wander: is this the repo github.com/perl6/doc so I can open the issue 15:19
wander maybe better in github.com/rakudo/rakudo 15:20
15:21 jferrero left
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 alexk6 left, comborico1611 joined
comborico1611 m: my $test = test; say "my", $test; 15:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
test used at line 1
comborico1611 m: my $test = "test"; say "my", $test;
camelia mytest
comborico1611 m: my $test = " test"; say "my", $test; 15:26
camelia my test
comborico1611 m: my $test = " test"; say "my" $test;
camelia 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
comborico1611 I see.
15:29 mcmillhj left 15:31 azawawi joined, mcmillhj joined
azawawi gist.github.com/azawawi/9c59b5f48b...2e19f91a4c # Better MsgPack::unpack performance (hash lookup) 15:31
Geth doc: 74f9310ac3 | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Dispel puzzle caused by rakudo REPL bug
15:32
synopsebot Link: doc.perl6.org/language/variables
15:36 Actualeyes joined, Grimy joined
Grimy Hi~ 15:36
p6: Bag.new.pick(1)
camelia (signal SEGV)
Grimy Is this already ticketed, or should I make one?
15:37 Cabanossi left 15:39 Cabanossi joined 15:41 ryn1x__ left, ryn1x_ left, ryn1x left 15:44 Actualeyes left
moritz I'm not aware of a ticket/issue 15:49
15:53 Actualeyes joined
azawawi moritz: i noticed a performance problem... 0.5s difference on a 100_000 for loop 15:54
moritz: and hi :)
moritz: github.com/azawawi/perl6-msgpack/b...r.pm6#L103 15:55
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:56 geospeck left 15:57 lowbro left
azawawi is the upper limit of a range evaluated everytime or once in a for loop? 15:57
i.e. cached or not
timotimo only once 15:58
you're creating the range object at which point it just becomes a single object (int, num, rat, Str, doesn't matter)
and then you get an iterator that goes from beginning to end 15:59
azawawi apparently that's not the case 16:01
16:02 AlexDaniel left
timotimo have you considered --profile? 16:02
16:02 mcmillhj_ joined
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:02
or an empty hash being properly treated 16:03
azawawi timotimo: im already doing that
azawawi double checks
16:05 mcmillhj left
timotimo anyway, moarvm will no longer segfault there, rakudo ought to be patched, i need to rest my rists 16:06
Grimy good, good. no need to make a ticket, since it’s already being fixed, right? 16:07
16:08 HoboWithAShotgun joined
ilmari m: say Bag.new(1).pick(1) 16:09
camelia 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 16:18 khw joined 16:19 troys joined 16:25 llfourn left, comborico1611 left 16:26 comborico1611 joined 16:29 pmurias_ joined 16:30 mcmillhj joined 16:31 pmurias_ left 16:32 pmurias left, pmurias_ joined, pmurias_ is now known as pmurias 16:34 mcmillhj_ left 16:37 Grimy left, comborico1611 left 16:38 comborico1611 joined 16:41 wamba left 16:45 ryn1x joined, ryn1x_ joined, ryn1x__ joined 16:47 mson left 16:51 kaare_ left, Cabanossi left, kaare_ joined 16:54 Cabanossi joined 16:55 mcmillhj left, abraxxa left
ufobat___ m: say so $*CWD.e == $*CWD.resolve.e 16:58
camelia True
ufobat___ thats False on windows, btw
azawawi so what does "MoarVM panic: Internal error: zeroed target thread ID in work pass" really mean? :)
HoboWithAShotgun it means your fans aren't working properly and your motherboard is about to melt 17:00
azawawi :) 17:01
azawawi built rakudobrew with debug3 opts for valgrind 17:02
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:03
[Coke] m: my $a = class barf {}; say $a.WHAT; 17:06
camelia (barf)
[Coke] m: my $a = class :: {}; say $a.WHAT;
camelia (<anon|81859200>)
17:06 robertle left
ilmari m: my $a = class :: {}; say $a.HOW 17:07
camelia Perl6::Metamodel::ClassHOW.new
17:08 domidumont left
comborico1611 or d) other :-) 17:08
17:08 kaare_ left 17:09 kaare_ joined 17:10 azawawi left
comborico1611 I tried to look up :: , but there are too many of those and the docs. 17:10
IN the docs.
[Coke] comborico1611: docs.perl6.org/language/typesystem might be a good read. 17:11
comborico1611 K, thank you.
[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?
comborico1611 Nope, just the first one. 17:13
My understanding is a Class creates a Type. I've never heard of a Type Object. 17:14
[Coke] everything's an object, even a Type. :) 17:15
as i understand it, it's just one thing.
Geth doc: 01d36736ae | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
fix typo, azawawi++
17:16
synopsebot Link: doc.perl6.org/language/variables
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( )
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
Perl*
Autoboxing*
If this is splitting hairs, I don't know. 17:19
17:20 ryn1x left
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:20
17:20 ryn1x__ left, ryn1x_ left 17:21 mcmillhj joined
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'
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?
[Coke] comborico1611: docs.perl6.org/language/mop
wander .tell lizmat "tbrowder" is working on Pod::To::Table parsing at rakudo PR#1240.
yoleaux wander: I'll pass your message to lizmat.
comborico1611 my $var = ActualNameOfObject ClassName.new( ) 17:22
mst yes, but what would that even do/mean ? 17:23
17:23 dakkar left
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( )
mst what is this name? why does it exist? what is it for? 17:24
HoboWithAShotgun but that is suboptimal,
tyil comborico1611: you can type your var, my Class $foo = Foo.new
if that's what you're aiming to do
you can also `my Class $foo .= new;`
17:24 setty1 joined
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?
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.
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 mcmillhj left
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:26
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
perl6 is fairly clear about variables having names and values not having names
comborico1611 I'm coming from C++, where we have names for objects, not variables containing objects.
Hmm. The value of the object being the address in memory of the class? 17:28
17:28 sproctor left
mst if you try and understand perl6 via things like "address in memory" you will not end up understanding perl6 17:28
also I can't say I really feel like C++ has names for objects as such 17:29
tyil are you trying to achieve something in particular with these names? 17:30
comborico1611 No.
tyil then I can't say I quite understand what you mean, sorry
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;
(also, that doesn't create the object, you'd need a `new` for that in c++, no?) 17:33
comborico1611 The constructor is called implicitly. 17:34
17:34 domidumont joined
tyil afaik, there's no implicit constructor call in perl 6 17:34
the shortest you can get is `my Time $t .= new;`
comborico1611 I see. But $t is not the object, but a variable containing the object. 17:35
(Or so I was told last night.) 17:36
moritz most method calls ignore the container, and go right into the object
tyil that's probably going in deeper than I know of, you might want to ask a core rakudo dev for that
perlpilot comborico1611: have you read docs.perl6.org/language/containers ? 17:37
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. 😯
tyil heh
17:38 Cabanossi left
comborico1611 Mst, yes. 17:38
perlpilot comborico1611: well ... at least they match life in that regard. ;) 17:39
comborico1611 Haha.
Geth doc: 397588b526 | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Fix spelling typo
synopsebot Link: doc.perl6.org/language/variables
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
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:39
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
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
tyil which beginner's book are you reading? 17:41
perlpilot
.oO( Perl 6 -- it's full of rabbits )
comborico1611 Think Perl
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.
mst comborico1611: but you just told me it was 17:43
comborico1611 No.
mst 't = new Time(...)' # you said yes to that, how is that not rw?
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:43 domidumont left
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
17:44 dugword joined
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 :)
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
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
if the docs are unclear, that too would be appreciated to inform, then we can try to improve it
mst yeah, I've still not worked out what this mythical 'name of an object' would actually be useful for if it existed
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 dugword left
tyil we're all here to help eachother, so I think that's implied :> 17:49
mspo you mean like a $this ?
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:51
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
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
17:52 releasable6 left
comborico1611 Yeah, I don't expect the docs to line up with a book. 17:52
17:52 releasable6 joined, ChanServ sets mode: +v releasable6
mst note that I've attempted to do a completely synthetic intro to perl5, and aaaaaaaaaaa 17:52
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?
tyil or ask around here to see if anyone might have a simple solution
perlpilot comborico1611: btw, when you figure this stuff out, maybe write a blog post or some docs or something to help the next guy :)
mst synthetic as in synthetic proof 17:54
17:54 wamba joined
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.
mst think e.g. Euclid's Elements
tyil perlpilot++ more perl 6 blogs to help people realize its usable and help beginners understand it are always nice
comborico1611 I plan on submitting a review.
17:55 nadim left
comborico1611 Mst, i see. 17:55
Alright guys. Off to lunch.
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
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:56
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
then go back to see if the block I was reading is more clear now
stmuk when I read Tolkien at 11 I skipped the songs ... which I still did last time I read it! 18:01
18:01 yht left
teatime (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'}) <-- this does not seem to make a lazy iterable 18:02
what am I missing 18:03
or is it because I am assigning it to a @-sigil'd variable
18:04 zakharyas left, zakharyas joined
tadzik perlpilot: that's how I used to read books in english in general, as a non-native speaker :) 18:05
18:06 ExtraCrispy joined
ilmari m: my $v = (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'}) say $v.is-lazy; 18:07
camelia 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…
teatime (^0x10FFFF).lazy.map… seems to do what I want ...
ilmari m: my $v = (^0x10FFFF).map({.chr}).grep({.unimatch: 'M'}); say $v.is-lazy; 18:08
camelia False
18:08 Cabanossi left
ilmari huh, in my repl that hangs spinning on the CPU 18:08
but in -e '' it works fine 18:09
m: (^0x10FFFF).lazy.map({.chr}).grep({.unimatch: 'M'}).say
camelia (...)
ilmari m: (^0x10FFFF).lazy.map({.chr}).grep({.unimatch: 'M'}).is-lazy.say
camelia True
18:10 Cabanossi joined, Cabanossi left 18:11 Cabanossi joined 18:14 napo1eon left 18:15 yht joined 18:20 philomath joined
buggable New CPAN upload: MsgPack-0.0.7.tar.gz by AZAWAWI cpan.metacpan.org/authors/id/A/AZ/...0.7.tar.gz 18:23
18:27 zakharyas left, ryn1x joined, ryn1x_ joined, ryn1x__ joined 18:30 isBEKaml joined 18:33 darutoko left, yht left 18:35 philomath left 18:37 espadrine joined 18:44 mcsnolte joined 18:46 jonas1 left 18:52 Cabanossi left 18:54 yht joined, Cabanossi joined 18:55 AlexDaniel joined 19:01 ryn1x__ left, ryn1x_ left, ryn1x left 19:02 geospeck joined 19:05 p6steve joined, AlexDani` joined 19:06 AlexDaniel left 19:08 ExtraCrispy left 19:10 p6steve left 19:12 AlexDani` is now known as AlexDaniel, cdg left
HoboWithAShotgun m: class Units::MetrePerSecond² {} 19:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse class definition
at <tmp>:1
------> 3class Units::MetrePerSecond7⏏5² {}
expecting any of:
generic role
HoboWithAShotgun meh. :-)
19:15 troys is now known as troys_ 19:19 perlpilot left 19:23 Ven joined, Ven is now known as Guest86124 19:24 Guest86124 left 19:25 Ven_ joined 19:31 mcmillhj left
ufobat___ is there a guide that explains how to compile rakudo on windows? e.g what compiler i could use ..and so one? 19:34
timotimo ufobat___: you can read the appveyor config for a working example 19:36
ufobat___ appvayor offers visual studio, this meens i would need to spend money, right? 19:39
19:39 ufobat___ is now known as ufobat
timotimo no 19:39
El_Che ufobat: no,
timotimo you only need the "community edition"
ufobat okay :-) i am googling for that
El_Che ufobat: I use for an other opensource project
ufobat: you have open source accounts and the vms have lots of compilers and libs 19:40
ufobat i've created a win7 x64 vm today :-) i have no clue about windows and all the stuff 19:41
El_Che ufobat: on my todo list for some day far in the future :) 19:42
19:43 AndChat|688961 joined, troys_ is now known as troys, comborico1611 left
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: github.com/ufobat/rakudo/commit/db...f85bcc637a 19:44
most probably my fix is quite bad but, i wanted to try in on a windows box
19:47 mcmillhj joined
El_Che ufobat: rakudo star has also windows instruction in their gh repo 19:52
ufobat: dunno how up to date it is
ufobat found it :) 19:54
20:01 ryn1x joined, ryn1x_ joined, ryn1x__ joined 20:03 comborico1611 joined, AndChat|688961 left 20:04 domidumont left
HoboWithAShotgun is there an easy way to get the superscript of a given character? for instance 1 => \x[0xB9] 20:06
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?
what's the reverse of uniname? 20:10
lizmat c[] ?
moritz my $x = "SUPERSCRIPT ONE"; say "\c[$x]"
m: my $x = "SUPERSCRIPT ONE"; say "\c[$x]" 20:11
camelia 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
moritz lizmat: not at run time, it seems
lizmat :-(
I would have expected that to work
20:12 eugene_barsky joined
eugene_barsky hi 20:12
moritz hi eugene_barsky
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
Is there a better way?
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
moritz then you duplicate $a :-)
20:14 comborico1611 left
eugene_barsky Sorry for an odd question. :) 20:15
moritz HoboWithAShotgun: maybe they didn't want to turn Unicode into a markup language
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
lizmat m: my $a = "LATIN CAPITAL LETTER A"; say $a.parse-names # samcv++ on #perl6-dev
camelia A
moritz nqp: say("\c[SUPERSCRIPT ONE]")
camelia ¹
HoboWithAShotgun nqp: say("\c[SUPERSCRIPT A]") 20:17
camelia 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…
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
colomon: no
lizmat m: my $a = "SUPERSCRIPT TWO"; say $a.parse-names
camelia ²
lizmat m: say "SUPERSCRIPT $_".parse-names for <ONE TWO THREE FOUR> 20:20
camelia ¹
²
³
20:21 rodrigok joined
Geth doc: b663b0428c | (Moritz Lenz)++ | doc/Type/Cool.pod6
Reference parse-names in the uniname(s) docs

this is where I went looking when I did not know the name of the method
20:23
synopsebot Link: doc.perl6.org/type/Cool
20:25 raschipi left 20:28 comborico1611 joined 20:29 azawawi joined
azawawi Caught where the pesky heap corruption bug happens at 100_000 elements (randomly) github.com/azawawi/perl6-msgpack/b...er.pm6#L25 20:30
CArray indexing has a serious bug... $sbuf.data[ ^$sbuf.size ] 20:32
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
20:33 Ven_ left
rindolf azawawi: hi 20:33
azawawi rindolf: hey... how r u? 20:34
rindolf azawawi: I extracted a CPAN dist today
20:35 ryn1x__ left, ryn1x_ left, ryn1x left
rindolf azawawi: this one - metacpan.org/pod/release/SHLOMIF/T...tedTags.pm 20:36
20:37 Ven joined
rindolf azawawi: and worked on freecell solver 20:37
azawawi cool
20:37 Ven is now known as Guest53140
rindolf azawawi: you? 20:37
azawawi MsgPack heap corruption bug hunting :)
rindolf azawawi: ah, good luck 20:38
20:45 wamba left 20:49 azawawi left, Guest53140 left 20:52 cdg joined
Geth ecosystem: 898d69601d | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
Move MsgPack to CPAN
20:52
20:53 Cabanossi left, ryn1x joined, ryn1x_ joined, ryn1x__ joined 20:55 Cabanossi joined 20:56 Ven_ joined 20:58 ryn1x__ left, ryn1x_ left, ryn1x left 20:59 neilb left
comborico1611 Are there any other ways of creating an object besides new constructor? 21:01
And why does the constructor use => instead of using = ? 21:03
ufobat m: class Foo { method factory() { return self.bless() }}; say Foo.factory()
camelia Foo.new
21:03 Ven_ left
comborico1611 What does bless method do? 21:04
ufobat bless actually creates an object of a class
docs.perl6.org/routine/bless 21:05
21:05 neilb joined
comborico1611 I see. Thank you. 21:05
ufobat have you read this: docs.perl6.org/language/objects#in...nstruction
21:05 eugene_barsky left
comborico1611 Nope. I'll check it out. 21:06
21:06 Exodist left
geekosaur you aren't assigning, you are passing named parameters whose names are the fields to be initialized 21:06
if you tried to assign there, it would set values in the calling function, not inside the new object
comborico1611 This stuff is crazy. 21:08
21:09 Exodist joined
geekosaur foo($a = 5) assigns 5 to $a and then calls foo($a) aka foo(5) 21:09
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.
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
21:11 sena_kun left
geekosaur m: dd (foo => 5) 21:11
camelia :foo(5)
comborico1611 Hmm.
I'll write your response in my book. 21:13
21:13 geospeck left
ufobat m: sub foo(:$a, :$b) { say "a is $a and b is $b" }; foo(a => 1, b => 2) 21:13
camelia a is 1 and b is 2
comborico1611 (that I'm reading)
ufobat thats basically the regular way of passing named parameters in perl6 21:14
comborico1611 Hmm.
21:18 mempko left
comborico1611 geekosaur, in the expression foo.new( x => 1 ), we are passing the parameter x? 21:20
geekosaur you are passing a single parameyter that is a Pair 21:21
the key of the pair is the Str 'x', the value is the Int 1
comborico1611 Hmm. This is strange. 21:22
21:22 mcmillhj left
geekosaur => is the Pair constructor 21:22
comborico1611 Right.
geekosaur it can be also written as :x(1)
comborico1611 Can x be initialized any other way besides these two?
21:23 mcmillhj joined
comborico1611 (Initialized by the conductor, that is.) 21:23
geekosaur not from outside the class definition
comborico1611 Hmm. Okay. I'll add these notes. Thank you. 21:24
21:28 eugene_barsky joined 21:34 eugene_barsky left
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:35
21:36 Ven joined, Ven is now known as Guest76170 21:42 nadim joined 21:46 ryn1x_ joined, ryn1x joined, ryn1x__ joined, mson joined 21:51 Guest76170 left 21:52 Cabanossi left 21:54 Cabanossi joined 21:56 Ven_ joined 21:59 troys is now known as troys_ 22:03 dgsntro joined 22:04 setty1 left 22:06 Ven_ left 22:16 Ven_ joined 22:17 mcmillhj left, Ven_ left 22:20 ryn1x__ left, ryn1x_ left, ryn1x left 22:22 margeas joined 22:24 rindolf left 22:29 mempko joined 22:36 Ven joined, Ven is now known as Guest54836 22:38 Exodist left 22:40 Exodist joined 22:46 ryn1x joined, ryn1x_ joined, ryn1x__ joined 22:49 Exodist left 22:51 Exodist joined, ryn1x left, Guest54836 left, ryn1x__ left, ryn1x_ left 22:52 mcmillhj joined
tabv Just discovered after much frustration that Buf has an append method. This isn't implied somewhere in the docs docs.perl6.org/type/Buf, is it? 22:52
22:53 Cabanossi left 22:54 pmurias left, Cabanossi joined
jnthn tabv: It does indeed appear to be missing in the docs. 22:54
Ah, it's already filed in the issued tracker also: github.com/perl6/doc/issues/530 22:55
tabv feels like reading the sources is the best way to learn something like perl6 anyway
but it's a steep road
jnthn The sources of the built-ins are, at least, written in Perl 6 :) 22:56
22:56 Ven_ joined 23:05 Ven_ left
jnthn m: say Buf.^methods # there's also introspection, btw 23:08
camelia (reallocate subbuf-rw)
jnthn m: say Buf.new.^methods # there's also introspection, btw
camelia (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…
jnthn m: say Buf.new.^methods.map(*.name) 23:09
camelia (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…
jnthn Finally
tabv ah, right! 23:11
23:12 itaipu left 23:16 Ven_ joined 23:20 ryn1x joined, ryn1x_ joined, ryn1x__ joined 23:21 mempko left, Ven_ left 23:23 dct joined
Geth doc: holli-holzer++ created pull request #1665:
Update 5to6-nutshell.pod6 (mentioned AUTOLOAD/FALLBACK)
23:24
HoboWithAShotgun letzte amtshandlung. good night ppl 23:25
23:27 troys_ is now known as troys
b2gills m: my $a = 1; my $b = 3; $a [R//]= $b; say $a 23:29
camelia 3
colomon m: my $a = 1; my $b; $a [R//]= $b; say $a 23:32
camelia 1
colomon b2gills++ 23:33
eugene_barsky: ^^ 23:35
23:35 dct left
colomon though I don’t think I’d recommend using it instead of $a = $b if defined $b 23:36
23:36 Ven joined, Ven is now known as Guest31726
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 3
23:37 Guest31726 left 23:48 mempko joined, comborico1611 left, comborico1611 joined 23:50 cdg left 23:52 ryn1x left, ryn1x_ left, Cabanossi left, Aaronepower joined 23:53 cdg joined, ryn1x__ left 23:54 Cabanossi joined 23:57 cdg left