Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-10-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 sufrostico joined #perl6
00:07 Sgeo_ joined #perl6
00:08 awwaiid joined #perl6
00:10 sufrostico joined #perl6
00:18 cpage_ joined #perl6
00:19 firefish5000 joined #perl6
00:32 awwaiid joined #perl6
00:33 bjz joined #perl6
00:47 seatek Should stuff like $*HOME and $*TMPDIR work cross-platform to Windows too?
00:48 skids Those two should, I think.
00:48 p3rln00b Yup
00:49 skids Though I don't know what $*HOME ends up being when nobody is logged in.
00:49 seatek k. thanks. not that I care really. just curious
00:49 seatek wonder if they use something like c:\Users\<userid> for $*HOME
00:50 skids I think $HOME in cmd may even be a thing.  Memory is fuzzy.
00:50 p3rln00b I get "C:\Users\p3rln00b".IO for it
00:50 MasterDuke joined #perl6
00:51 p3rln00b "C:\Users\p3rln00b\AppData\Local\Temp".IO for $*TMPDIR
00:51 seatek interesting stuff.
00:51 seatek oh my gosh
00:54 geekosaur cmd should be using things like %HOME% but that'd be odd, the windows version is something longer
00:55 p3rln00b %UserProfile%
00:55 awwaiid joined #perl6
00:58 seatek i've tried using stuff like cygwin before in windows. it always feels like i'm in this tiny little plastic oasis, with giant walls surrounding me that may come crashing down at any moment to squash me
00:59 cyphase joined #perl6
00:59 skids Yeah, until you fire up find and actually find stuff windows search cannot.
01:00 cyphase joined #perl6
01:01 seatek i was hoping for dd there one time, i remember. but i couldn't find it anywhere. strange that cygwin wouldn't have such a useful thing
01:01 seatek maybe they do now
01:02 firefish5000 I don't think they were able to properly implement dd in cygwin, I need it often since windows cannot recognize my flash drives when I image them with isos
01:03 MasterDuke try dc3dd
01:05 seatek MasterDuke, interesting
01:06 MasterDuke i haven't used it in recent Windows, but it worked fine on XP years ago
01:10 seatek i wonder if there will ever be any ide's that can handle perl6 stuff. seems possible with formal class and sub and method structures, and the fact that variables always looks like variables. well, mostly.
01:15 awwaiid joined #perl6
01:17 geekosaur I am vaguely recalling that vista and later removed access to the device level stuff that was being used?
01:17 seatek oh my gosh, there's tab completion in the interactive perl6 interpreter
01:18 geekosaur like, restricted to SYSTEM only as an anti-virus/worm measure or something like that
01:18 geekosaur (not even LSA)
01:19 geekosaur unless I have confused those, LSA is the administrator account and SYSTEM is the user that the privileged parts of Windows run as?
01:20 seatek i sure don't know. I went from OS/2 Warp to Linux -- Windows for games, and to know what other people are dealing with
01:24 firefish5000 I wish I could get the Readline module to work on my gentoo system. It failes the copy-keymap test for me. Anyone know if it works with libreadline-6.3?
01:31 seatek firefish5000, i could try to emerge readline 6.3 on my gentoo box and give it a whirl
01:31 firefish5000 if it works for you, I would like to know what version of readline your currently using. lets not try breaking another system
01:33 seatek you're wanting Term::Readline?
01:33 seatek you're wanting Term::ReadLine?
01:34 firefish5000 I was aiming for Readline, for perl6 cli
01:34 seatek ah.. ha baba ;) not sure if i put perl6 on here... checking
01:35 seatek oo i did
01:35 seatek installing readline
01:36 seatek all tests passed. your computer is broken
01:36 firefish5000 lol, thanks for going through the trouble to test it.
01:36 * skids tries to build the habit of leaving trailing commas on all lists for future editability.
01:36 skids Not used to the language not barfing over that and adding nil elements.
01:37 firefish5000 what version of sys-libs/readline and rakudo are you using?
01:37 skids .o(Once I've built the habit, then I'll no doubt have to unbuild it when I do something else.)
01:37 seatek firefish5000, I'm using readline libs 6.3p8-r2 from the Gentoo sources
01:38 firefish5000 hmm, well, that confirms it. my computer is broken! Time to through it out, lol
01:38 seatek :)
01:38 awwaiid joined #perl6
01:41 _slade_ joined #perl6
01:46 seatek firefish5000, oh sorry -- moar 2016.09.1.gdebb.859
01:47 ilbot3 joined #perl6
01:47 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!
01:52 Xliff joined #perl6
02:02 awwaiid joined #perl6
02:25 Actualeyes joined #perl6
02:32 pierre_ joined #perl6
02:33 awwaiid joined #perl6
02:52 noganex_ joined #perl6
02:57 awwaiid joined #perl6
03:23 bjz joined #perl6
03:27 awwaiid joined #perl6
03:31 pierre_ joined #perl6
03:46 bjz joined #perl6
03:50 woolfy joined #perl6
03:51 awwaiid joined #perl6
04:15 awwaiid joined #perl6
04:30 Actualeyes joined #perl6
04:35 awwaiid joined #perl6
04:40 hobbs joined #perl6
04:40 hobbs joined #perl6
04:41 awwaiid joined #perl6
04:53 Cabanossi joined #perl6
04:59 awwaiid joined #perl6
05:02 pierre_ joined #perl6
05:03 Actualeyes joined #perl6
05:04 bjz joined #perl6
05:16 fudje joined #perl6
05:18 _slade_ joined #perl6
05:23 awwaiid joined #perl6
05:34 pierre_ joined #perl6
05:38 Actualeyes joined #perl6
05:43 fudje m: role A[$B] { method C { $B } }; say A['D'].C;
05:43 camelia rakudo-moar 2285d3: OUTPUT«D␤»
05:43 fudje m: #|{ I am some pod } role A[$B] { method C { $B } }; say A['D'].C;
05:43 camelia rakudo-moar 2285d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Could not instantiate role 'A':␤Too few positionals passed; expected 2 arguments but got 1␤at <tmp>:1␤»
05:43 fudje :'(
05:46 awwaiid joined #perl6
05:50 cpage_ joined #perl6
06:09 awwaiid joined #perl6
06:28 awwaiid joined #perl6
06:43 mr-foobar joined #perl6
06:47 grondilu I'm not sure #| can be used on-line
06:49 Actualeyes joined #perl6
06:52 awwaiid joined #perl6
06:58 darutoko joined #perl6
07:02 FROGGS joined #perl6
07:05 ShimmerFairy grondilu: the problem is with roles and multi-line declarator blocks in general: https://rt.perl.org/Public/​Bug/Display.html?id=128810
07:25 awwaiid joined #perl6
07:31 RabidGravy joined #perl6
07:37 domidumont joined #perl6
07:42 domidumont joined #perl6
07:50 awwaiid joined #perl6
07:56 vimal2012 joined #perl6
07:56 vimal2012 joined #perl6
08:01 eliasr joined #perl6
08:02 nadim joined #perl6
08:05 bjz joined #perl6
08:08 itaipu joined #perl6
08:13 awwaiid joined #perl6
08:16 rurban joined #perl6
08:26 bjz joined #perl6
08:36 bjz_ joined #perl6
08:37 awwaiid joined #perl6
08:42 mohae_ joined #perl6
08:45 wamba joined #perl6
08:57 d^_^b joined #perl6
08:57 d^_^b joined #perl6
08:58 pecastro_ joined #perl6
09:03 FROGGS o/
09:08 camelia joined #perl6
09:10 domidumont joined #perl6
09:13 vimal2012 joined #perl6
09:14 rindolf joined #perl6
09:14 vimal2012 joined #perl6
09:17 andrzejku_ joined #perl6
09:17 andrzejku_ hello my friends :)
09:24 vimal2012 joined #perl6
09:25 vimal2012 left #perl6
09:27 canopus joined #perl6
09:37 pierre_ joined #perl6
09:38 rudolfochrist joined #perl6
09:44 domidumont joined #perl6
09:57 ggoebel joined #perl6
10:02 breinbaas left #perl6
10:03 breinbaas joined #perl6
10:07 TimToady joined #perl6
10:17 ocbtec joined #perl6
10:26 TimToady joined #perl6
10:39 canopus joined #perl6
10:43 rindolf joined #perl6
11:03 awwaiid joined #perl6
11:09 Actualeyes joined #perl6
11:28 awwaiid joined #perl6
11:35 pierre_ joined #perl6
11:37 pierre_ joined #perl6
11:48 telex joined #perl6
11:49 RabidGravy boo
12:02 sftp joined #perl6
12:07 FROGGS /o\
12:08 setty1 joined #perl6
12:20 dalek doc: a7716fc | (Zoffix Znet)++ | README.md:
12:20 dalek doc: Clarify deps installation instructions
12:20 dalek doc:
12:20 dalek doc: Per discussion[^1], revert previous commit[^2] and clarify how to get
12:20 dalek doc: rakudobrew going The Right Way™ by updating the shim with `rehash` command.
12:20 dalek doc:
12:20 dalek doc: [1] https://github.com/perl6/doc/commit/1b3cf974258b26​f390c3054ca1fc76596674a93a#commitcomment-19334016
12:20 dalek doc: [2] https://github.com/perl6/doc/commit/1b​3cf974258b26f390c3054ca1fc76596674a93a
12:20 dalek doc: review: https://github.com/perl6/doc/commit/a7716fccb7
12:38 lucasb joined #perl6
12:39 BenGoldberg joined #perl6
12:57 lucasb #129830
12:57 lucasb RT #129830
12:57 lucasb :|
12:58 lucasb so, it seems any parameterized role has problems with gist?
12:58 lucasb m: Positional.gist
12:58 camelia rakudo-moar 2285d3: ( no output )
12:58 lucasb m: Positional[Int].gist
12:58 camelia rakudo-moar 2285d3: OUTPUT«Cannot unbox a type object (NQPMu) to a str.␤  in block <unit> at <tmp> line 1␤␤»
12:58 lucasb same thing for Associative[T], Rational[T, U]
12:59 lucasb m: role R[::T] {}; say R.gist
12:59 camelia rakudo-moar 2285d3: OUTPUT«(R)␤»
12:59 lucasb m: role R[::T] {}; say R[Int].gist
12:59 camelia rakudo-moar 2285d3: OUTPUT«Cannot unbox a type object (NQPMu) to a str.␤  in block <unit> at <tmp> line 1␤␤»
13:01 psch m: role R[::T] {}; say R[Int].new.gist
13:01 camelia rakudo-moar 2285d3: OUTPUT«R[Int].new␤»
13:01 psch m: put Int.gist
13:01 camelia rakudo-moar 2285d3: OUTPUT«(Int)␤»
13:01 psch m: role R[::T] {}; say R[Int].^mro
13:01 camelia rakudo-moar 2285d3: OUTPUT«No such method 'mro' for invocant of type 'Perl6::Metamodel::CurriedRoleHOW'␤  in block <unit> at <tmp> line 1␤␤»
13:01 psch m: role R[::T] {}; say R[Int].new.^mro
13:01 camelia rakudo-moar 2285d3: OUTPUT«((R[Int]) (Any) (Mu))␤»
13:02 psch m: role R { }; put R.gist
13:02 camelia rakudo-moar 2285d3: OUTPUT«(R)␤»
13:02 gfldex m: role R[::T] {}; R[Int].gist; CATCH{ default { say .backtrace.full } }
13:02 camelia rakudo-moar 2285d3: OUTPUT«  in block  at gen/moar/m-CORE.setting line 17361␤  in method join at gen/moar/m-CORE.setting line 17356␤  in sub infix:<~> at gen/moar/m-CORE.setting line 13936␤  in method gist at gen/moar/m-CORE.setting line 1393␤  in block <unit> at <tmp> line …»
13:05 psch m: role R[::T] {}; say R[Int].^name
13:05 camelia rakudo-moar 2285d3: OUTPUT«R[Int]␤»
13:06 psch m: role R[::T] {}; say R[Int].^shortname
13:06 camelia rakudo-moar 2285d3: OUTPUT«No such method 'gist' for invocant of type 'NQPMu'␤  in block <unit> at <tmp> line 1␤␤»
13:06 psch there
13:06 psch so shortname in CurriedRoleHOW has a problem
13:06 psch lucasb: ^^^ in case you wanna look what's wrong there
13:07 lucasb shortname comes from role Perl6::Metamodel::Naming
13:07 lucasb is that the case that it is not getting set for curried roles?
13:07 lucasb oh, nevermind
13:09 lucasb I don't have the skills to navigate the Perl6::Metamodel:: namespace :)
13:09 psch don't give up! :)
13:17 lucasb nqp-m: class C { has $!name; method name() { $!name } }; C.new.name.gist
13:17 camelia nqp-moarvm: OUTPUT«Cannot find method 'gist' on object of type NQPMu␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1428  (/home/camelia/rakudo-m-inst-2/sh​are/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1631  (/home/camelia/rakud…»
13:18 lucasb idk what my snippet eval is supposed to mean, but... yeah. my guess is that no code is setting the shortname of curried roles :)
13:19 awwaiid joined #perl6
13:27 psch lucasb: "curried role type objects", actually :)
13:27 psch lucasb: when it's punned it works
13:27 psch m: role R[::T] { }; put R[Int].new.gist
13:27 camelia rakudo-moar 2285d3: OUTPUT«R[Int].new␤»
13:28 lucasb indeed, correct
13:28 psch lucasb: please RT that if it's not yet
13:28 lucasb it already is #129830
13:29 psch ah okay
13:34 perlawhirl joined #perl6
13:44 awwaiid joined #perl6
13:49 rindolf joined #perl6
14:07 awwaiid joined #perl6
14:14 AlexDaniel joined #perl6
14:33 awwaiid joined #perl6
14:34 skids joined #perl6
14:36 yqt joined #perl6
14:45 awwaiid joined #perl6
14:46 ocbtec joined #perl6
14:51 rgrinberg joined #perl6
14:51 darutoko- joined #perl6
14:58 domidumont joined #perl6
14:59 rindolf joined #perl6
15:01 khw joined #perl6
15:08 bazzaar joined #perl6
15:09 bazzaar o/ perl6
15:10 bazzaar m: my @c = <a b c>; my @n = <1 2 3>; for @c Z @n -> $cv, $nv { say $cv ~ ":" ~ $nv };
15:10 camelia rakudo-moar 2285d3: OUTPUT«a 1:b 2␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
15:12 awwaiid joined #perl6
15:12 bioduds joined #perl6
15:12 bazzaar not sure why that code fails, I thought I passed 2 args with the Z operator, to the block
15:13 bazzaar m: my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n) -> $cv, $nv { say $cv ~ ":" ~ $nv };
15:13 camelia rakudo-moar 2285d3: OUTPUT«a 1:b 2␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
15:14 AlexDaniel m: sub infix:<⁢> ($a, $b) is equiv(&infix:<*>) { $a [*] $b }; my \a = 5; my \b = 10; sa⁢y ab + 42
15:14 camelia rakudo-moar 2285d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    ab used at line 1␤    sa used at line 1. Did you mean 'so'?␤    y used at line 1 (in Perl 6 please use tr instead)␤␤»
15:14 AlexDaniel m: sub infix:<⁢> ($a, $b) is equiv(&infix:<*>) { $a [*] $b }; my \a = 5; my \b = 10; sa⁢y a⁢b + 42
15:14 camelia rakudo-moar 2285d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    sa used at line 1. Did you mean 'so'?␤    y used at line 1 (in Perl 6 please use tr instead)␤␤»
15:14 AlexDaniel m: sub infix:<⁢> ($a, $b) is equiv(&infix:<*>) { $a [*] $b }; my \a = 5; my \b = 10; say a⁢b + 42
15:14 camelia rakudo-moar 2285d3: OUTPUT«92␤»
15:16 seatek joined #perl6
15:18 gfldex m: my @c = <a b c>; my @n = <1 2 3>; for @c Z @n -> [$cv, $nv] { say $cv ~ ":" ~ $nv };
15:18 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:20 gfldex m: sub infix:<|Z>(\a, \b){ (a Z b).flat }; my @c = <a b c>; my @n = <1 2 3>; for @c |Z @n -> $cv, $nv { say $cv ~ ":" ~ $nv };
15:20 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:20 bazzaar gfldex: aaah, the penny has dropped, thank you very much
15:20 bioduds hey all, cheers!
15:21 AlexDaniel gfldex: is there any difference between using [] and () in this case?
15:21 AlexDaniel m: my @c = <a b c>; my @n = <1 2 3>; for @c Z @n -> ($cv, $nv) { say $cv ~ ":" ~ $nv };
15:21 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:21 gfldex don't think so
15:21 gfldex it's a little easier to read in my eyes
15:25 bazzaar I found the example on Perl6 maven, after searching for documentation on how to iterate over multiple arrays in parallel.
15:26 AlexDaniel committable6: pre-glr my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n) -> $cv, $nv { say $cv ~ ":" ~ $nv };
15:26 committable6 AlexDaniel, ¦«pre-glr»: a 1:b 2␤Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/Qn8aGvF3HJ:1␤ «exit code = 1»
15:26 bazzaar presumably the syntax has been tightened up since that post.
15:27 AlexDaniel uh, this result does not make any sense
15:28 AlexDaniel what's going on there?
15:28 AlexDaniel why was it “a 1:b 2” ?
15:28 AlexDaniel aah
15:28 AlexDaniel committable6: pre-glr my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n) -> $cv { say $cv };
15:28 committable6 AlexDaniel, ¦«pre-glr»: a 1␤b 2␤c 3
15:28 AlexDaniel committable6: pre-glr my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n) -> $cv { say $cv.perl };
15:28 committable6 AlexDaniel, ¦«pre-glr»: $("a", "1")␤$("b", "2")␤$("c", "3")
15:28 perlawhirl like this
15:28 perlawhirl m: my @c = <a b c>; my @n = <1 2 3>; for @c Z @n -> ($cv, $nv) { say $cv ~ ":" ~ $nv };
15:28 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:29 AlexDaniel committable6: pre-glr my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n) { say .[0] ~ ‘:’ ~ .[1] };
15:29 committable6 AlexDaniel, ¦«pre-glr»: a:1␤b:2␤c:3
15:29 AlexDaniel yeah, that's it!
15:29 DrForr RabidGravy: I took the repo down only because I just got tired of the approach I was taking. It'll be back up n a few hours.
15:31 awwaiid joined #perl6
15:33 bazzaar I'm using perl6 to parse a horribly formatted text file, I am now back on track after your help, thank you. Perl6 is brilliant, so intuitive.
15:33 AlexDaniel bazzaar: if interested, you can take a look at this: https://perl6advent.wordpress.com/2015/12/14/da​y-15-2015-the-year-of-the-great-list-refactor/
15:34 bazzaar AlexDaniel: thanks for the help, and for the link, I will check it out.
15:34 kaare_ joined #perl6
15:35 AlexDaniel bazzaar: well, it's not something you should care about today :) still a good read if you want to see how we got here
15:36 dalek doc: 0765d1d | gfldex++ | doc/Language/operators.pod6:
15:36 dalek doc: better description and example for Z
15:36 dalek doc: review: https://github.com/perl6/doc/commit/0765d1d0c4
15:36 dalek doc: 34c6f3c | gfldex++ | doc/Language/operators.pod6:
15:36 dalek doc: meta-Z is no the same thing as Z, link there
15:36 dalek doc: review: https://github.com/perl6/doc/commit/34c6f3c545
15:37 gfldex bazzaar++ # for asking the right question
15:39 perlawhirl bazaar: the main thing to remember in this particular case is that zip (or Z) creates a list of lists, so you need to destructure that list in the signature of the loop
15:39 perlawhirl ie, you just needed to relocate your brackets downstream :D
15:40 perlawhirl from: for (@c Z @n) -> $cv, $nv { ... }
15:40 perlawhirl to  : for @c Z @n -> ($cv, $nv) { ... }
15:41 gfldex m: my @c = <a b c>; my @n = <1 2 3>; for (@c Z @n).kv -> $cv, $nv { say $cv ~ ":" ~ $nv };
15:41 camelia rakudo-moar 2285d3: OUTPUT«0:a 1␤1:b 2␤2:c 3␤»
15:41 perlawhirl kv is different in that it actually creates 2 loop items
15:42 perlawhirl zip creates a list... so it needs to be destructured in a sig... or subscripted in the loop (ie $_[0] and $_[1])
15:44 bazzaar perlawirl: thanks for the explanation of what the bracket syntax of the signature is doing
15:45 AlexDaniel m: my @c = <a b c>; my @n = <1 2 3>; .say for @c Z[&(* ~ *)] @n
15:45 camelia rakudo-moar 2285d3: OUTPUT«a1␤b2␤c3␤»
15:45 AlexDaniel hehe
15:45 AlexDaniel m: my @c = <a b c>; my @n = <1 2 3>; .say for @c Z[&(* ~ ‘:’ ~ *)] @n
15:45 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:46 AlexDaniel m: my @c = <a b c>; my @n = <1 2 3>; .say for @c Z[&(-> $a, $b { “$a:$b” } )] @n
15:46 camelia rakudo-moar 2285d3: OUTPUT«a:1␤b:2␤c:3␤»
15:48 bazzaar AlexDaniel: so you've eliminated the block, right ... I like it
15:49 MasterDuke m: my @c = <a b c>; my @n = <1 2 3>; .say for @c Z[&("{*}:{*}")] @n
15:49 camelia rakudo-moar 2285d3: OUTPUT«No such method 'CALL-ME' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
15:49 perlawhirl I just figured you were trying to wrap your head around the Z opertor. if your really do just want to colon-separate them...
15:49 perlawhirl m: my @c = <a b c>; my @n = <1 2 3>; say (@c Z @n).map: *.join(':')
15:49 camelia rakudo-moar 2285d3: OUTPUT«(a:1 b:2 c:3)␤»
15:50 perlawhirl or this would work too:  (@c Z @n)».join(':')
15:51 bazzaar TIMTOWTDI ... brilliant
15:53 AlexDaniel MasterDuke: :P you can't put * inside stuff like that
15:54 AlexDaniel committable6: 2015.12 my @c = <a b c>; my @n = <1 2 3>; .say for @c Z[&(* ~ ‘:’ ~ *)] @n
15:54 committable6 AlexDaniel, ¦«2015.12»: a:1␤b:2␤c:3
15:54 AlexDaniel ok
15:56 awwaiid joined #perl6
15:56 MasterDuke yeah, i sometimes forget they're more than just placeholders
15:56 bazzaar perlawhirl: actually one of the input arrays to the Zip op (in my file) is an AofA, so I'm just steadily working down through the data levels
15:58 perlawhirl AlexDaniel: re our conversation earlier on »... yes it does seem it's more deepmap than map... but i think the huffman coding is sound. my take on » is that it's aimed at huffmanising quick method calls, rather than complex functions
15:58 perlawhirl ie, if you just wanna uppercase a list of names, ».uc is shorter than .map: &uc
15:59 perlawhirl but the deepmap like properties come into play in unexpectedly helpful ways
15:59 perlawhirl m: say <john paul geoge ringo>.classify(*.comb[0])».uc
15:59 camelia rakudo-moar 2285d3: OUTPUT«{g => [GEOGE], j => [JOHN], p => [PAUL], r => [RINGO]}␤»
15:59 perlawhirl uc acts on the items i was classifying, not on the Hash that .classify created
16:00 kenh83 joined #perl6
16:00 Khisanth joined #perl6
16:01 AlexDaniel I'm not sure I get it. Like maybe, but I'm just thinking… if .deepmap is more useful than .map (which » existence seems to imply?), then why is it called .deepmap and not .dp or something…
16:01 AlexDaniel .dm I mean
16:03 perlawhirl well » (and by extension, .deepmap) acts like .map in a lot of circumstances. it's huffmanizing a lot of common things you would normally need map for... as well as some things you would need deepmap for
16:03 AlexDaniel hmm
16:04 perlawhirl i think ».&{ ... } is a bad use-case for »
16:05 gfldex i'm getting careful with » to because I can't test autothreading that isn't there yet
16:05 perlawhirl i think it's better suited for method calls. if you need anything more complex, a map ( or deepmap, as the case might be ) is a better option
16:06 perlawhirl gfldex: agree, though i think i recall jnthn saying ».foo should eventually implement something (probably) identical to .hyper.map( *.fo )o
16:06 perlawhirl erm , i mean.. .hyper.map( *.foo )
16:07 perlawhirl but even .hyper is a little wonky... or has that beed fixed recently
16:07 perlawhirl *been
16:08 gfldex threading in general is buggy, including segfaults, but we got a golf of (at last one) of those bugs now
16:12 AlexDaniel gfldex: I think that we've got a good grip on it with MasterDuke
16:12 AlexDaniel once #129781 is resolved we will report the next issue… and we will repeat that until bisectable fucking works ;)
16:13 AlexDaniel right now I think the biggest problem is that there are not many people willing to work on such bugs
16:14 lucasb gfldex: you just inserted an example about Z in the docs, but you forgot the parentheses, right?
16:14 AlexDaniel like you know, it's nice to have jnthn but it would be better to have 5 jnthns
16:14 lucasb for <a b c> Z <1 2 3> -> $l, $r { say "$l:$r" }
16:14 lucasb for <a b c> Z <1 2 3> -> ($l, $r) { say "$l:$r" }
16:15 gfldex i did
16:15 lucasb well, parentheses or brackets, whichever style is prefered
16:16 AlexDaniel perlawhirl: I am not sure if I understand your idea of “X is a bad use-case for »”. If you want it to be parallelized if possible, then you use », if you don't – you use map/deepmap
16:16 AlexDaniel whether it is ».&{} or a plain method call is irrelevant, isn't it?
16:16 dalek doc: 2e00e39 | (Tom Browder)++ | doc/Language/modules.pod6:
16:16 dalek doc: clarify point
16:16 dalek doc:
16:16 dalek doc: description is still a little muddy
16:16 dalek doc: review: https://github.com/perl6/doc/commit/2e00e39ce5
16:16 dalek doc: 6a52de1 | gfldex++ | doc/Language/operators.pod6:
16:16 dalek doc: fix example
16:16 dalek doc: review: https://github.com/perl6/doc/commit/6a52de19f3
16:17 lucasb gfldex++ thanks
16:18 perlawhirl probably a bad turn of phrase on my part... not really a bad use case, per se
16:19 awwaiid joined #perl6
16:20 perlawhirl until » is parallelised in at least 1 implementation of perl6 it's kind of a moot point
16:20 timotimo we used to have the execution order of >> be scrambled
16:21 timotimo it got taken out, probably due to performance concerns?
16:21 lucasb what does it mean that Z metaoperator is not the same thing as Z infix?
16:21 gfldex it did a ».pick on the whole list
16:21 timotimo well, Z infix is Z,
16:22 lucasb yes, that's my understanding as well
16:22 timotimo you can't use Z, on an operator
16:22 AlexDaniel m: 42 xx (2 ** 62)
16:22 camelia rakudo-moar 2285d3: OUTPUT«(signal SEGV)WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
16:22 timotimo where did you read that?
16:22 perlawhirl lucasb: im confused... maybe they meant Z infix and metaop is not the same as zip()
16:22 AlexDaniel ok, this one is still there
16:22 dalek doc: 0219118 | (Tom Browder)++ | doc/Language/modules.pod6:
16:22 dalek doc: use title case for consistency
16:22 dalek doc:
16:22 dalek doc: grammar fix
16:22 dalek doc: review: https://github.com/perl6/doc/commit/0219118cc5
16:23 gfldex i wanted to link from meta-Z to Z, because meta-Z didn't really say what was going on
16:23 gfldex and they don't behave the same way. Flattening is a little different.
16:24 lucasb hmm, I'm not sure :)
16:24 lucasb say (zip <a b c>, <1 2 3>).perl
16:24 lucasb say (<a b c> Z, <1 2 3>).perl
16:25 lucasb say (<a b c> Z <1 2 3>).perl
16:25 lucasb all 3 returns the same thing
16:25 gfldex m: dd (<1 2 3> Z~ <a b c>);
16:25 camelia rakudo-moar 2285d3: OUTPUT«("1a", "2b", "3c").Seq␤»
16:25 gfldex the result is flat already
16:25 perlawhirl lucasb: zip( @AoA ) will not transpose the @AoA... but [Z] @AoA will
16:26 lucasb say ([Z] <a b c>, <1 2 3>).perl
16:26 lucasb all 4 returns the same thing :D
16:27 lucasb perlawhirl: I may not have understood what you said
16:27 timotimo AlexDaniel: oh, that must be an overflow when multiplying the slot size with the number of elements requested
16:27 perlawhirl m: my @AoA = ('A'..'I').rotor: 3; say zip(@AoA);
16:27 camelia rakudo-moar 2285d3: OUTPUT«(((A B C) (D E F) (G H I)))␤»
16:27 perlawhirl m: my @AoA = ('A'..'I').rotor: 3; say [Z] @AoA;
16:27 camelia rakudo-moar 2285d3: OUTPUT«((A D G) (B E H) (C F I))␤»
16:28 perlawhirl zip() treats it's values as scalar
16:28 perlawhirl ermm, it's arguments
16:28 AlexDaniel timotimo: fwiw it is #126014
16:29 perlawhirl that's the only zip related difference I'm aware of... I was not aware of any difference between infix Z and metaop Z
16:29 synopsebot6 joined #perl6
16:29 AlexDaniel timotimo: and yeah, that makes sense
16:29 perlawhirl but i'm welcome to be show how they differ so I don't misuese it :D
16:29 timotimo AlexDanie+│ timotimo: fwiw it is #126014
16:29 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=126014
16:30 MasterDuke added valgrind output
16:30 timotimo so, how do i properly check for multiplication overflow? internet says i have to check before doing the multiplication so that i don't run into undefined behaviour that could make any test "after the multiplication" bogus
16:30 perlawhirl bedtime for me... 3:30 am here :/
16:31 perlawhirl g'night #perl6
16:31 lucasb perlawhirl: I wasn't aware of that. thanks for clarifying
16:31 timotimo gnite perlawhirl
16:31 lucasb perlawhirl: good night
16:33 kaare_ joined #perl6
16:34 AlexDaniel timotimo: is it signed or unsigned?
16:34 timotimo the result is size_t
16:36 timotimo but yeah, unsigned
16:37 arnsholt In that case, a*b <= MAX_INT should be equivalent to a <= MAX_INT/b
16:37 arnsholt Modulo floating-point bugbears due to division
16:38 timotimo it's rather likely that the element size is a simple and small value
16:38 timotimo but yeah, i'll try that
16:40 lucasb nqp-m: nqp::setelems(nqp::list,2**62)
16:40 camelia nqp-moarvm: OUTPUT«(signal SEGV)»
16:41 lucasb :D
16:41 timotimo same thing, because it nulls out the slots
16:42 AlexDaniel timotimo: just wanted to note that wrap of unsigned integers is actually defined, if I recall correctly
16:42 timotimo oh, it is?
16:43 arnsholt Oh, that's true, I think!
16:43 awwaiid joined #perl6
16:44 AlexDaniel I don't see how it is going to help in this case, but yeah
16:44 timotimo what do i include to get MAX_INT, limits.h?
16:45 timotimo apparently not
16:45 AlexDaniel isn't it SIZE_MAX ?
16:45 timotimo ah
16:45 timotimo right, i want the max of size_t anyway
16:47 lucasb stdint.h
16:47 lucasb for SIZE_MAX
16:51 lucasb funny, the error mesg changes, depending of the size specified
16:51 lucasb nqp-m: nqp::setelems(nqp::list,2**31)
16:51 camelia nqp-moarvm: OUTPUT«Memory allocation failed; could not allocate 17179869184 bytes␤»
16:51 lucasb nqp-m: nqp::setelems(nqp::list,2**64)
16:51 camelia nqp-moarvm: OUTPUT«MVMArray: Can't resize to negative elements␤   at <tmp>:1  (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1428  (/home/camelia/rakudo-m-inst-2/sh​are/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1631  (/home/camelia/rakudo-m-in…»
16:51 lucasb nqp-m: nqp::setelems(nqp::list,2**62)
16:51 camelia nqp-moarvm: OUTPUT«(signal SEGV)»
16:52 timotimo lucasb: i put a branch up on moarvm that addresses this issue, but it clearly has shortcomings
16:53 timotimo please feel free to look into it some more while i'm AFK
16:53 timotimo AlexDaniel: you're invited to take a look, too
16:53 AlexDaniel I'm already looking :)
16:53 timotimo thank you kindly
16:53 timotimo i think the check may want to either be repeated at the top or move to the top entirely because otherwise it'll say something about negative sizes
16:58 AlexDaniel timotimo: “Can't resize to a number bigger than 64bits” who said that it is 64bits?
16:59 AlexDaniel is it actually so?
16:59 AlexDaniel I mean, is it 64bits on 32-bit platforms?
17:03 awwaiid joined #perl6
17:05 AlexDaniel timotimo: in fact in 2**64 case it complains about n being negative, isn't it already too late to attempt any fixes in set_size_internal ?
17:07 AlexDaniel OK you will fix a segfault, but the problem of xx wrapping around will be there still
17:08 dalek doc: b8cdb18 | (Tom Browder)++ | doc/Language/modules.pod6:
17:08 dalek doc: remove pod tag, shorten commen
17:08 dalek doc: review: https://github.com/perl6/doc/commit/b8cdb18044
17:12 timotimo AlexDaniel: right, that verbiage was put in before i thought to put the value we compare against into the exception string, too
17:12 timotimo but yeah, set_size_internal takes an MVMint64, and bind_pos does, too
17:12 timotimo but set_size - the instruction you get with setelems - takes a uint
17:14 timotimo clearly we'd prefer this to be uniform across the board. not sure how many pieces of the Everything will need changing
17:14 timotimo however ... are you really going to be asking for 2**63 slots anyway?
17:14 AlexDaniel that's stupid, but what if I do?
17:15 timotimo m: say (2 ** 63) / (1024 * 1024 * 1024 * 1024), " terabyte"
17:15 camelia rakudo-moar 2285d3: OUTPUT«8388608 terabyte␤»
17:15 timotimo then you shall get an exception
17:16 AlexDaniel m: 42 xx (2 ** 100)
17:16 camelia rakudo-moar 2285d3: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤Cannot unbox 101 bit wide bigint into native integer␤  in block <unit> at <tmp> line 1␤␤»
17:16 AlexDaniel ah
17:16 AlexDaniel there's an exception for that
17:16 timotimo yeah, it happens way earlier
17:16 AlexDaniel OK
17:17 timotimo the ops that we use to access arrays and other positional things "under the hood" all take 64 bit integers
17:17 timotimo (apparently a mix of signed and unsigned)
17:17 timotimo so it'll have to unbox your Int to an int
17:17 timotimo and boom
17:19 timotimo i mean ... we could also "if (ssize > 2 ** 48) exception('cowardly refusing to allocate an array with more than 2 ** 48 slots')"
17:19 timotimo m: say (2 ** 48) / (1024 * 1024 * 1024 * 1024), " terabyte"
17:19 camelia rakudo-moar 2285d3: OUTPUT«256 terabyte␤»
17:19 timotimo we don't likely have users with that much ram, do we?
17:20 AlexDaniel not yet
17:20 timotimo consider also that things like sorting aren't in-place
17:20 timotimo oh, multiply that with the size of your elements, too
17:21 timotimo so if you have a list of regular objects, that'll be a 64bit int for each slot
17:21 MasterDuke i use machines with 278Gb at work, and we're soon getting 512Gb machines
17:21 timotimo so 2048 terabyte just for a single of those arrays
17:21 MasterDuke and those are just regular dell servers
17:21 timotimo and our implementation requires all those slots in there to be nulled whenever we increase the size of such an array
17:21 AlexDaniel yeah, 256 Tb of RAM does not seem like some unimaginable amount nowadays
17:22 timotimo OK, so we go up to 56
17:22 timotimo m: say (2 ** 56) / (1024 * 1024 * 1024 * 1024), " terabyte"
17:22 camelia rakudo-moar 2285d3: OUTPUT«65536 terabyte␤»
17:22 timotimo month after month we can go and increase that
17:22 AlexDaniel xD
17:23 psch r: my @a; say @a[2**64]
17:23 camelia rakudo-moar 2285d3: OUTPUT«Cannot unbox 65 bit wide bigint into native integer␤  in block <unit> at <tmp> line 1␤␤»
17:23 camelia ..rakudo-jvm 2a1605: OUTPUT«(Any)␤»
17:23 psch except jvm limitations
17:23 psch well, we can shuffle somewhere
17:23 psch ...assuming i got the gist of the discussion.  it felt relevant enough :P
17:24 timotimo hmm
17:24 psch point being that array indices on jvm have to be native ints
17:24 MasterDuke timotimo: while you're messing around with bigints, https://github.com/MoarVM/MoarVM/pull/405
17:24 AlexDaniel MasterDuke: 278Gb is great. That probably means that you can have a year long bisectable uptime on that machine
17:24 psch so yeah, shuffling would be some kind of higher level abstraction for the underlying slots of Array
17:24 psch but that, on the other hand, again limits us for native typed arrays
17:24 MasterDuke AlexDaniel: :) -> :(
17:25 psch cause there we have to kinda sorta do C-style pointer arithmetic
17:25 psch i mean, clearly not as bad, but it's a thing
17:26 psch j: use nqp; nqp::setelems(nqp::list, 2**64)
17:26 camelia rakudo-jvm 2a1605: ( no output )
17:26 psch j: use nqp; say nqp::setelems(nqp::list, 2**64).elems
17:27 camelia rakudo-jvm 2a1605: OUTPUT«Method 'elems' not found for invocant of class 'BOOTArray'␤  in block <unit> at <tmp> line 1␤␤»
17:27 psch oh right
17:27 psch j: use nqp; say nqp::elems(nqp::setelems(nqp::list, 2**64))
17:27 camelia rakudo-jvm 2a1605: OUTPUT«0␤»
17:27 timotimo neat.
17:27 psch j: use nqp; my \l := nqp::list; say nqp::setelems(l, 2**64); say nqp::elems(l)
17:27 camelia rakudo-jvm 2a1605: OUTPUT«()␤0␤»
17:27 timotimo clearly they have some sort of sparse array implementation there?
17:27 timotimo eh .. or it just silently fails?
17:27 psch i'd go with that, yeah
17:28 psch j: use nqp; my \l := nqp::list; say nqp::setelems(l, 2**64); nqp::bindpos(l, 2**64, 1); say nqp::elems(l)
17:28 camelia rakudo-jvm 2a1605: OUTPUT«()␤1␤»
17:28 psch hm, maybe not
17:28 AlexDaniel timotimo: here's a thing… set_elems receives 「MVMuint64 count」, then passes it to set_size_internal as 「MVMint64 n」. Why?
17:28 timotimo AlexDaniel: yes, why indeed.
17:28 psch AlexDaniel: that looks like an oversight, honestly
17:28 awwaiid joined #perl6
17:29 dalek doc: ff008f5 | (Luca Ferrari)++ | doc/Language/exceptions.pod6:
17:29 dalek doc: Change a supposed sub title to head2
17:29 MasterDuke i found this a little confusing: MVMuint64 mp_get_int64
17:29 dalek doc: review: https://github.com/perl6/doc/commit/ff008f5ca9
17:29 dalek doc: 006be40 | (Luca Ferrari)++ | doc/Language/objects.pod6:
17:29 dalek doc: Reword the private method section
17:29 dalek doc: review: https://github.com/perl6/doc/commit/006be40318
17:29 dalek doc: 5359d4c | (Luca Ferrari)++ | doc/Language/objects.pod6:
17:29 dalek doc: Autopunning of a role creates a class and instantiate an object.
17:29 dalek doc: review: https://github.com/perl6/doc/commit/5359d4cb81
17:29 dalek doc: 45b3701 | (Tom Browder)++ | doc/Language/ (2 files):
17:29 dalek doc: Merge pull request #946 from fluca1978/master
17:29 dalek doc:
17:29 dalek doc: A few improvements
17:29 dalek doc: review: https://github.com/perl6/doc/commit/45b37017c0
17:29 wamba joined #perl6
17:30 psch j: use nqp; my \l := nqp::list; say nqp::setelems(l, 2**64); nqp::bindpos(l, $_, 1) for do $_ ** 10 for ^21; say nqp::elems(l)
17:30 MasterDuke and then later in the function: if (bits > 64) { MVM_exception_throw_adhoc(tc, "Cannot unbox %d bit wide bigint into native integer", bits); }
17:30 camelia rakudo-jvm 2a1605: OUTPUT«()␤java.lang.OutOfMemoryError: Java heap space␤  in block <unit> at <tmp> line 1␤␤»
17:30 * psch isn't actually sure if that's a sensible thing to do..?
17:30 psch the point being, i'm only assigning 21 elements
17:30 AlexDaniel MasterDuke: where's that?
17:30 MasterDuke is that error message precisely correct on 32bit machines
17:30 MasterDuke ?
17:31 MasterDuke MoarVM/src/6model/reprs/P6bigint.c
17:31 psch oh, i swapped the operand order for **
17:31 psch j: use nqp; my \l := nqp::list; say nqp::setelems(l, 2**64); nqp::bindpos(l, $_, 1) for do 10 ** $_ for ^21; say nqp::elems(l)
17:31 camelia rakudo-jvm 2a1605: OUTPUT«()␤java.lang.OutOfMemoryError: Java heap space␤  in block <unit> at <tmp> line 1␤␤»
17:31 timotimo MasterDuke: our native integers are always 64bit
17:31 psch ...i think
17:31 psch aaanyway, yeah, there's a different challenge for array sizes on jvm as well
17:32 timotimo hooray, it's never easy
17:32 psch i assume whatever moar will do will be somewhat portable
17:32 AlexDaniel MasterDuke: don't assume that something is correct with 32-bit rakudo. Just test it
17:32 arnsholt In Java checking for overflow is easy though!
17:32 psch but only if it does introduce another layer of abstraction
17:32 psch and, well, more abstraction on java clearly is a slow thing, so uhm
17:32 arnsholt You can just stuff it in a long and do it stupidly, since Java array indices are only ints =D
17:32 arnsholt But yeah, native ints on JVM are long, not int
17:33 AlexDaniel MasterDuke: for a while I had 32-bit rakudo and found a bunch of bugs this way ;)
17:33 arnsholt And nums are double, not float
17:33 MasterDuke i don't currently have a 32bit machine
17:33 AlexDaniel yeah… me too…
17:33 timotimo just fire up a qemu :)
17:33 psch m: use NativeCall; say nativesizeof(my int $ = 0)
17:33 camelia rakudo-moar 2285d3: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque (Int)␤  in sub nativesizeof at /home/camelia/rakudo-m-inst-2/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
17:34 psch feh
17:34 psch m: my int $x = 0; use NativeCall; say nativesizeof($x)
17:34 camelia rakudo-moar 2285d3: OUTPUT«NativeCall op sizeof expected type with CPointer, CStruct, CArray, P6int or P6num representation, but got a P6opaque (Int)␤  in sub nativesizeof at /home/camelia/rakudo-m-inst-2/share/perl6/sou​rces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) li…»
17:34 MasterDuke turns out i have a 32bit XP vm sitting around
17:34 psch why is int suddenly P6opaque..?
17:34 psch j: my int $x = 0; use NativeCall; say nativesizeof($x)
17:34 camelia rakudo-jvm 2a1605: OUTPUT«␤(timeout)␤»
17:34 MasterDuke not sure i want to try and do anything useful in it though
17:34 psch ooh boy
17:35 psch i guess i really don't know enough about NC :P
17:35 AlexDaniel MasterDuke: there you go: https://github.com/perl6/whateverable/issues/43
17:35 AlexDaniel 18 open issues /o\
17:36 erdic joined #perl6
17:38 psch r: my int $x = 0; say $x.REPR
17:38 camelia rakudo-moar 2285d3, rakudo-jvm 2a1605: OUTPUT«P6opaque␤»
17:38 psch r: use nqp; my int \x = 0; use NativeCall; say nativesizeof(nqp::getattr(x, Int, '$!value'))
17:39 camelia rakudo-moar 2285d3: OUTPUT«Type check failed in binding; expected int but got Int (0)␤  in block <unit> at <tmp> line 1␤␤»
17:39 camelia ..rakudo-jvm 2a1605: OUTPUT«␤(timeout)␤»
17:39 * psch walks away
17:43 timotimo o_O
17:43 AlexDaniel bisectable6: oh you poor soul…
17:50 dalek ecosystem: 235c98a | (Tom Browder)++ | META.list:
17:50 dalek ecosystem: another try at a link to tar ball per irc with ugexe
17:50 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/235c98a1d9
17:51 bisectable6 joined #perl6
17:53 awwaiid joined #perl6
17:55 bisectable6 joined #perl6
17:58 bisectable6 joined #perl6
18:00 lucs m: my $foo = 'FOO'; print q:s'\latexstuff{$fooBAR} # How to get 'FOOBAR', with scalar interpolation, but no closure ones (to avoid having to escape all the '{')?
18:00 camelia rakudo-moar 2285d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$fooBAR' is not declared␤at <tmp>:1␤------> 3my $foo = 'FOO'; print q:s'\latexstuff{7⏏5$fooBAR} # How to get 'FOOBAR', with sca␤»
18:01 psch m: say q{foo\qq[{"bar".succ}]}
18:01 camelia rakudo-moar 2285d3: OUTPUT«foobas␤»
18:01 psch lucs: ^^^ you can switch between q and qq inside any quoted string
18:01 psch m: say "foo \q[{ bar }]" # ther other way around
18:01 camelia rakudo-moar 2285d3: OUTPUT«foo { bar }␤»
18:02 psch s/ther/the/
18:03 lucs Hmm... Interesting.
18:03 psch i *think* we also have a modifier for qq that only supresses closures
18:04 psch m: say qq:s[foo { 1 + 1 }]
18:04 camelia rakudo-moar 2285d3: OUTPUT«foo 2␤»
18:04 psch ...well, that's not it
18:04 psch m: say qq:S[foo { 1 + 1 }]
18:04 camelia rakudo-moar 2285d3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized adverb: :S␤at <tmp>:1␤------> 3say qq:S7⏏5[foo { 1 + 1 }]␤»
18:04 psch yeah, no idea.  i don't know if it's doc'd either
18:04 Actualeyes left #perl6
18:06 lucasb m: say qq:!c/oh { 2 + 2 }/
18:06 camelia rakudo-moar 2285d3: OUTPUT«oh { 2 + 2 }␤»
18:07 Matt_ joined #perl6
18:13 lucs m: my $foo = 'FOO'; print "\\latexstuff\{{$foo}BAR} ", q:s'\latexstuff{$foo\qq{}BAR}'  # Both are LTA :(
18:13 camelia rakudo-moar 2285d3: OUTPUT«\latexstuff{FOOBAR} \latexstuff{FOOBAR}»
18:14 girafe joined #perl6
18:17 lucasb m: my $foo = 'FOO'; say q:s'\oh{$foo<>BAR}', q:s'\oh{$foo[]BAR}', q:s'\oh{$foo{}BAR}'
18:17 camelia rakudo-moar 2285d3: OUTPUT«\oh{FOOBAR}\oh{FOOBAR}\oh{FOOBAR}␤»
18:17 gfldex m: sub latexstuff(|c){ '\latexstuff{' ~ c ~ '}' }; my $foo = 'FOO'; say latexstuff($foo ~ 'BAR');
18:17 camelia rakudo-moar 2285d3: OUTPUT«\latexstuff{FOOBAR}␤»
18:17 psch oh my what
18:17 dalek whateverable: 8ec09c6 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
18:17 dalek whateverable: Bail out if there is something wrong
18:17 dalek whateverable:
18:17 dalek whateverable: Not sure why this forgotten, but it is essential (in fact, it was
18:17 dalek whateverable: working properly before the rewrite).
18:17 dalek whateverable:
18:17 dalek whateverable: Tests needed.
18:17 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/8ec09c6542
18:18 psch so i ordered takeout
18:18 psch and it just arrived
18:18 psch but there was some kind of weird interaction between me using the doorbell receiver/speaker thing
18:18 psch and the delivery guy ringing the doorbell again
18:18 psch and now it wont stop ringing
18:19 psch i dismantled part of the speaker-thingy in our flat and it stopped, but if i reassemble it it starts again
18:19 lucs lucasb: That's pretty good. I don't understang how they work, but hey, there they are :)
18:19 psch i'm really unsure what to do
18:19 lucs lucasb: Thanks.
18:19 bisectable6 joined #perl6
18:20 gfldex m: my $foo = 'BAR'; say $foo<>;
18:20 camelia rakudo-moar 2285d3: OUTPUT«BAR␤»
18:21 gfldex lucs: see https://docs.perl6.org/lang​uage/subscripts#Zen_slices
18:21 lucs gfldex: Thanks
18:21 psch the lesson is clearly "don't order takeout"
18:21 psch i think
18:21 lucasb psch: what food did you order?
18:22 psch lucasb: a "Kebap Teller" with extra feta
18:22 pmurias joined #perl6
18:22 lucasb hmm, yummy
18:22 lucasb .botsnack
18:22 synopsebot6 om nom nom
18:22 yoleaux :D
18:22 gfldex you could get yourself one of those big cast iron castle-dracula-doornockers
18:23 psch right now i'm going with "it's gonna stop eventually"
18:23 psch which, honestly, seems really unlikely
18:23 psch cause the board and all looks lots digital so it's probably reach some weird racey edge case and is stuck
18:24 MasterDuke have you tried kinetic debugging?
18:24 psch well, i did rip off the speaker...
18:24 MasterDuke threaten it with a hammer
18:25 psch i'm gonna eat first :S
18:25 awwaiid joined #perl6
18:28 dalek joined #perl6
18:36 AlexDaniel What's the first rakudo release that had support for moarvm?
18:37 psch yey, it fixed itself
18:37 psch the speaker/doorbell thingy
18:37 lucasb hmm, back in 2012?
18:38 psch afair the nqp refactor that made nqp-m work was instrumental in making nqp-j work
18:38 AlexDaniel 2013.11 ? https://github.com/rakudo/rakudo/commit/​0a4172e7f9ed949165eeab03d8ce360aa36f0d4b
18:38 psch the first moar relase was 2014.01, according to http://www.moarvm.org/releases.html
18:39 AlexDaniel ah, 2014.01 indeed
18:50 awwaiid joined #perl6
18:55 woolfy left #perl6
19:06 _slade_ joined #perl6
19:06 awwaiid joined #perl6
19:17 dalek whateverable: 2bf7d40 | (Aleks-Daniel Jakimenko-Aleksejev)++ | build.p6:
19:17 dalek whateverable: Stop attempting to build pre-moar tags
19:17 dalek whateverable:
19:17 dalek whateverable: 2014.01 is the first rakudo release with MoarVM support. Given that we
19:17 dalek whateverable: cannot build parrot or anything else, let's just cut off older tags.
19:17 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/2bf7d401cf
19:20 emmmmm joined #perl6
19:25 jabits joined #perl6
19:27 lucasb m: role A::B::C[::T] {}; say A::B::C[Int].new.^shortname
19:27 camelia rakudo-moar 3ca0f8: OUTPUT«C[Int]␤»
19:27 lucasb m: role A::B::C[::T] {}; say A::B::C[Int].^shortname
19:27 camelia rakudo-moar 3ca0f8: OUTPUT«A::B::C[Int]␤»
19:28 lucasb oops, I meant to eval this in #perl6-dev
19:28 psch D:
19:28 lucasb MasterDuke++ for taking a look at it
19:28 psch MasterDuke++ indeed
19:29 lucasb but the shortname should be... short :)
19:29 psch m: class A { class B { class C { } } }; say A::B::C.^shortname
19:29 camelia rakudo-moar 3ca0f8: OUTPUT«C␤»
19:29 psch hmm, yeah, that's a valid concern
19:30 awwaiid joined #perl6
19:32 dalek ecosystem: bc28e60 | (Tom Browder)++ | META.list:
19:32 dalek ecosystem: another META6.json fix
19:32 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/bc28e6032a
19:34 labster joined #perl6
19:41 DrBojingle joined #perl6
19:42 pierre_ joined #perl6
19:42 DrBojingle What kind of projects are you guys using Perl6 for?
19:45 psch the last not-backend thing i did was https://github.com/Perl6-N​oise-Gang/p6-Music-Helpers
19:45 psch which is a library for generating musical cadences
19:46 psch it might have bitrotted a bit 'cause i didn't quite find the time to work on it in a few months
19:49 masak DrBojingle: I'm implementing a language using Perl 6. (though it's slightly dogfooding, since the language is also exploring macro mechanisms, and the lessons are then meant to be used in Perl 6 itself.)
19:52 * moritz is about to earn shitloads of money by giving a perl 6 training course
19:53 lucasb moritz: will your material be available afterwards? :)
19:54 awwaiid joined #perl6
19:55 DrForr moritz: Heh, I finally got paid for my training course yesterday.
20:03 TEttinger joined #perl6
20:06 HoloIRCUser2 joined #perl6
20:07 HoloIRCUser3 joined #perl6
20:09 * masak was reminded by the above to keep pushing for putting out an abstract for a Perl 6 course on his employer's web site
20:11 mohae joined #perl6
20:11 HoloIRCUser1 joined #perl6
20:12 HoloIRCUser2 joined #perl6
20:17 [ptc] moritz: where will you be giving it?
20:18 woolfy joined #perl6
20:20 woolfy left #perl6
20:25 wongjtf99 joined #perl6
20:25 awwaiid joined #perl6
20:26 wongjtf99 ok, does anyone know of an up to date Perl 6 book/ebook that i can purchase?
20:27 gfldex wongjtf99: we don't got that yet, maybe in a few month
20:28 gfldex wongjtf99: see https://www.reddit.com/r/perl/comm​ents/557m4k/any_new_perl_6_books/)
20:37 smee joined #perl6
20:37 moritz lucasb: not clear yet
20:37 moritz [ptc]: Berlin
20:38 moritz lucasb: it'll be a fairly small group (2-4 devs), so I won't have too much slides or so anyway, much will be interactive/dicussions/exercises
20:38 moritz and maybe I'll do a code kata or two
20:39 timotimo cool
20:40 moritz nothing final yet, though
20:42 moritz (oh, and it'll be all in German, so not very interesting for the broader audience)
20:44 lizmat moritz++
20:44 lizmat :-)
20:45 moritz ... and I wonder if my next big project should be a book on Perl 6
20:45 bjz joined #perl6
20:46 moritz anybody else wondered if they should write a book on Perl 6, and just needed the right trigger? we could join forces :-)
20:47 DrForr I've been approached several times; I just don't know if I could do the subject justice.
20:48 moritz DrForr: that's your imposter syndrome talking
20:49 DrForr I'm aware.
20:49 timotimo become a Subject Justice Warrior? :) :)
20:49 MasterDuke will the real DrForr please stand up?
20:49 awwaiid joined #perl6
20:53 moritz DrForr: I'd certainly be interested in a collaboration; I'll write up some thoughts and paste it in a gist
20:55 DrForr Nod.
21:01 labster joined #perl6
21:09 AlexDaniel m: sub foo { once { say "HELLO! THIS IS PRINTED ONCE" }; foo if $++ < 5 }; foo
21:09 camelia rakudo-moar 3ca0f8: OUTPUT«HELLO! THIS IS PRINTED ONCE␤»
21:09 AlexDaniel m: sub foo { if True { once { say "HELLO! THIS IS PRINTED ONCE" } }; foo if $++ < 5 }; foo
21:09 camelia rakudo-moar 3ca0f8: OUTPUT«HELLO! THIS IS PRINTED ONCE␤HELLO! THIS IS PRINTED ONCE␤HELLO! THIS IS PRINTED ONCE␤HELLO! THIS IS PRINTED ONCE␤HELLO! THIS IS PRINTED ONCE␤HELLO! THIS IS PRINTED ONCE␤»
21:10 AlexDaniel ¯\_(ツ)_/¯
21:10 Ven_ joined #perl6
21:10 gfldex is this a newbug?
21:11 AlexDaniel gfldex: I have no idea
21:12 AlexDaniel so once means maybe once
21:13 gfldex it does not. It's like a block that is guarded by a state variable
21:13 gfldex i can see any RT for this. Please rakudobug.
21:14 awwaiid joined #perl6
21:14 gfldex m: sub f { { once { say 'oi‽' } } }; f; f
21:14 camelia rakudo-moar 3ca0f8: OUTPUT«oi‽␤oi‽␤»
21:15 gfldex AlexDaniel: ^^^ golfed
21:15 HoloIRCUser1 joined #perl6
21:15 HoloIRCUser2 joined #perl6
21:16 lizmat m: sub f { { { say "oi‽" } unless $++ } }; f; f   # same issue / DIHWIDT
21:16 camelia rakudo-moar 3ca0f8: OUTPUT«oi‽␤oi‽␤»
21:17 xxdxdd joined #perl6
21:17 lizmat aka, the once is bound to its scope, not to the outer sub
21:18 lizmat and I think that is intentional
21:19 gfldex if it's intentional we need to doc that
21:20 AlexDaniel .oO( and a good way to doc it is “do not use 「once」” )
21:20 AlexDaniel really, I've been bitten by this thing too many times
21:20 HoloIRCUser1 joined #perl6
21:20 AlexDaniel you move some stuff around and BOOM! It no longer does what you mean
21:21 moritz DrForr, [ptc], everybody else: https://gist.github.com/moritz/2​930131695511e6b5ec63d90e4ce9e7b
21:21 moritz feedback would be very welcome
21:21 cgfbee joined #perl6
21:21 HoloIRCUser3 joined #perl6
21:21 MasterDuke i love the idea of once, but it seems really tricky to get it to do what everybody expects in every situation
21:22 jnthn Every issue you can create with `once` has an equivalent state var issue
21:22 jnthn It ties into the discussion in https://design.perl6.org/S04.html​#When_is_a_closure_not_a_closure
21:23 DrForr Are you planning to be at LPW, FOSDEM or OSCON?
21:23 DrForr (moritz)
21:23 moritz one of my favorite sections of the design docs :-)
21:23 moritz DrForr: no plans yet, which likely means "no" :(
21:24 moritz maybe YAPC::EU in Amsterdam, but that's like, 10 months away :/
21:24 DrForr I know :/
21:24 jnthn In short, closure clones (by design) produce a fresh set of state vars
21:25 jnthn Which is what you want in, say, sub accumulater() { return { ++state $ } } or so
21:25 moritz anyway, I really need to get some sleep now
21:25 jnthn 'night, moritz
21:26 moritz will backlog of anybody hilights me; thoughts via other channels on that gist would be very welcome too
21:26 moritz \o~
21:26 DrForr moritz: I like the look from  a cursory glance, but I'm needing to get to bed as well.
21:26 DrForr o/'
21:26 moritz DrForr: sure, will talk tomorrow
21:28 eliasr joined #perl6
21:33 gfldex jnthn: does that mean the behaviour of once we got right now is by design?
21:37 AlexDaniel “The semantics of INIT and once are not equivalent to each other in the case of cloned closures. An INIT only runs once for all copies of a cloned closure. A once runs separately for each clone, so separate clones can keep separate state variables:”
21:38 awwaiid joined #perl6
21:39 jnthn gfldex: Well, it means that if we want to consider, say, if blocks differently, we're going to have to introduce a mechanism for doing so
21:39 jnthn gfldex: And rules for when it applies
21:40 jnthn gfldex: And it'll get "interesting" fast, I suspect (consider which side of the sense a while loop should land on, for example)
21:41 jnthn (Especially when considering return lazy while ... style things which can be lazily evaluated.)
21:42 AlexDaniel well, it would be nice if 「once」 meant once always
21:42 jferrero m: say 4 == (1E12.log10 / 3).Int
21:42 camelia rakudo-moar 6977b8: OUTPUT«False␤»
21:42 lucasb in that reddit thread, the laurent_r user said he had written a book which was getting reviewed. does anybody knows him? I'd love to be a reviewer :)
21:43 pierre_ joined #perl6
21:45 DrForr He talked about it at YAPC, I think it was an LT on the last day.
21:45 firstdayonthejob joined #perl6
21:46 dalek ecosystem: e84bca2 | (Tom Browder)++ | META.list:
21:46 dalek ecosystem: update to v0.1.2
21:46 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e84bca2929
21:46 lucasb DrForr: I'll search if it is on youtube. thanks!
21:46 DrForr Should be up.
22:02 labster joined #perl6
22:03 awwaiid joined #perl6
22:04 FROGGS joined #perl6
22:08 lucasb found it! https://www.youtube.com/watch?v=dV5TR8UC6vU
22:08 lucasb starts around 13 minutes
22:08 timotimo which part are we interested in here?
22:09 HoloIRCUser4 joined #perl6
22:09 lucasb I was just looking for this person, who said he had written a book about P6
22:09 timotimo ah
22:09 lizmat Laurent Rosenfeld's announcement of the "Think Perl 6" book
22:09 HoloIRCUser3 joined #perl6
22:09 lucasb based on the book how to think like a computer scientist
22:09 lucasb I read that book, the python version, a decade ago, I think. and I liked.
22:10 * timotimo has a review copy of that book that asks for it not to be spread without asking the author first
22:10 lizmat "The goal of this book is to teach you to think like a computer scientist.:
22:10 lizmat but instead of using Python, it uses Perl 6
22:10 timotimo right
22:11 * lizmat is proofreading
22:12 timotimo it has many pages
22:13 lizmat 379
22:13 lizmat (so far)
22:14 dalek whateverable: 2702bd7 | MasterDuke17++ | Benchable.p6:
22:14 dalek whateverable: Error out before saying anything
22:14 dalek whateverable:
22:14 dalek whateverable: Also use the correct pluralization when saying how many commits are
22:14 dalek whateverable: being benchmarked.
22:14 dalek whateverable:
22:14 dalek whateverable: Fixes #37
22:14 dalek whateverable: review: https://github.com/perl6/wha​teverable/commit/2702bd7cc9
22:14 timotimo i have one with 277 here
22:14 lizmat good night, #perl6!
22:15 timotimo gnite lizmat
22:19 yqt joined #perl6
22:20 BenGoldberg joined #perl6
22:22 awwaiid joined #perl6
22:39 awwaiid joined #perl6
22:50 canopus joined #perl6
22:52 tbrowder nite lizmat!
22:53 bjz joined #perl6
23:00 obfusk joined #perl6
23:02 awwaiid joined #perl6
23:08 nukosuke joined #perl6
23:19 bjz joined #perl6
23:25 awwaiid joined #perl6
23:45 pierre_ joined #perl6
23:46 Zoffix joined #perl6
23:46 Zoffix How can I tell if I've got a native int?
23:46 Zoffix m: my int $x = 2; say $x.^name
23:46 camelia rakudo-moar 6977b8: OUTPUT«Int␤»
23:49 buggable joined #perl6
23:49 NeuralAnomaly joined #perl6
23:49 awwaiid joined #perl6
23:50 labster joined #perl6
23:52 timotimo m: use nqp; my int $x = 4; my Int $y = 5; say nqp::objprimspec($x); say nqp::objprimspec($y);
23:52 camelia rakudo-moar 6977b8: OUTPUT«0␤0␤»
23:52 timotimo m: use nqp; my int $x = 4; my Int $y = 5; say nqp::objprimspec($x<>); say nqp::objprimspec($y<>);
23:52 camelia rakudo-moar 6977b8: OUTPUT«0␤0␤»
23:52 timotimo m: use nqp; my int $x = 4; my Int $y = 5; say nqp::objprimspec(nqp::decont($x)); say nqp::objprimspec($y<>);
23:52 camelia rakudo-moar 6977b8: OUTPUT«0␤0␤»
23:52 timotimo grmbl
23:56 AlexDaniel m: say ‘hello’; say ‘world’
23:56 camelia rakudo-moar 6977b8: OUTPUT«hello␤world␤»
23:56 Zoffix m: use nqp; my int $x = 4; my Int $y = 5; say nqp::isint($x); say nqp::isint($y);
23:56 camelia rakudo-moar 6977b8: OUTPUT«0␤0␤»

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

Perl 6 | Reference Documentation | Rakudo