Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-23

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 Skarsnik AlexDaniel, fun, if I remove the wget and replace by slurping a local copy of this page memory consuption (110Mb) is consistent across rakudo version, otherwise I can get crazy stuff like 2017-06 and 2017 taking over 250-400Mb
00:01 Skarsnik *2017-07
00:02 Skarsnik well time to sleep
00:06 AlexDaniel MasterDuke: can you try dd %tree.kv; ? :)
00:07 AlexDaniel MasterDuke: nvm
00:07 MasterDuke with what in %tree?
00:08 AlexDaniel MasterDuke: it's from the dugword's issue, but nvm I think I'm progressing with golfing
00:08 Ben_Goldberg joined #perl6
00:09 MasterDuke nice
00:18 itaipu joined #perl6
00:41 Zoffix "zengargoyl+? 13:36 < Zoffix> Stop adding features just because you can. There's a word for it: featuritis. -- lol ²² :P"
00:41 Zoffix zengargoyle: yes, and now we have to support it!
00:42 Zoffix MasterDuke: "have you seen dugword's problem" I see a giant wall of text.. What's the problem or did someone answer already?
00:44 eyck joined #perl6
00:46 MasterDuke he has a List with an Any in it that gets turned into a Mu when the List is Slipped
00:47 dugword Zoffix: The flatten "|" operator returns different values than what appears with say .perl or dd
00:48 Zoffix zengargoyle: in fact. The powers were first implemented in a module, but then were rushed into core becausee in the module you couldn't chain more than one char and also custom ops at the time were unusably slow. And the superscript ops do have a problem with precedence that Texas versions don't have. Not to mention the endless grief over `²²` being valid code. If there ever were an example that you can't
00:48 Zoffix anticipate all the issues, power ops are it. And given that unlike the power ops the `:?foo` thing affects much broader part of the language it'll likely have more severe issues, and given that unlike the power ops the `:?foo` is entirely useless, any issues it'll introduce will have zero justification behind them.
00:49 Zoffix dugword: how do I repro it?
00:52 MasterDuke git clone git@github.com:dugword/perl-Convert-ASN1.git
00:52 dugword Then run perl6 t/00prim.t
00:52 Zoffix ok. Then?
00:53 SmokeMachine I prefer :?$foo than :foo($foo.Bool)
00:53 dugword The output near the end will have output with Mu
00:53 dugword https://github.com/dugword/perl-Convert-ASN1/blob/master/lib/Convert/ASN1P6.pm6#L1100
00:53 Zoffix SmokeMachine: that's not what we're discussing though. It's adding `:?foo` to do the same thing as `:foo`
00:54 SmokeMachine Or :foo(?$foo)
00:54 Zoffix dugword: ok. Gonna have a quick dinner first and then take a look
00:55 SmokeMachine Isn’t it the same usage?
00:55 dugword I'm trying to golf it down to a more simple example
00:56 gdonald joined #perl6
00:57 Zoffix SmokeMachine: no, `:foo` is equivalent to `:foo(True)` `:$foo` is equivalent to `:foo($foo)`. The usage you showed sticks an op between `:` and a variable
01:00 SmokeMachine m: my $foo =42; say :?$foo
01:00 camelia rakudo-moar b14721: OUTPUT: «5===SORRY!5===?Argument to "say" seems to be malformed?at <tmp>:1?------> 3my $foo =42; say7?5 :?$foo?Confused?at <tmp>:1?------> 3my $foo =42; say :7?5?$foo?    expecting any of:?        colon pair?Other potential diffi…»
01:00 Cabanossi joined #perl6
01:01 SmokeMachine m: sub a(:$f) {say $f}; my $foo = 42;  a :?$foo
01:01 camelia rakudo-moar b14721: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Confused?at <tmp>:1?------> 3sub a(:$f) {say $f}; my $foo = 42;  a :7?5?$foo?    expecting any of:?        colon pair?»
01:01 SmokeMachine I mean: if :?$foo was possible, :?foo should be possible to (imho)... and I think :?$foo should be possible
01:03 ugexe its bad enough the 'required' marker (!) does one thing on the right side of a signature param and something else on the other when give as a param
01:04 ugexe e.g. :!foo and :$foo!
01:05 itaipu joined #perl6
01:07 Zoffix It's bad enough we have fifty ways to write colon pairs. No need to invent a million more.
01:09 Zoffix Consdering SmokeMachine was using Perl 6 longer than me and still didn't know :?$foo wasn't one of the valid syntaxes :)
01:12 Zoffix dugword: so you want to have a Mu but somehow getting an Any?
01:12 SmokeMachine Were I?
01:13 MasterDuke Zoffix: other way around
01:14 Zoffix MasterDuke: so the code wants to convert a Mu to an Any?
01:14 Zoffix MasterDuke: I see the test code with Compiled.new being created by being given one Mu and two Anys
01:14 MasterDuke i don't think he wants to convert anything, it's just happening when slipping
01:15 dugword No, I have an Any but somehow I'm getting a Mu
01:16 dugword I have a work around by not using |, but I thought it was weird I got one set of values using it and a different set using anything else. Thought it might be a perl6 bug
01:16 Zoffix dugword: but why do you say "somehow"? You got one here https://github.com/dugword/perl-Convert-ASN1/blob/master/t/00prim.t#L121 and here https://github.com/dugword/perl-Convert-ASN1/blob/master/t/00prim.t#L141
01:18 dugword Yeah, that's the expected value that the test is testing against. I changed it to Mu so the test would pass.
01:18 Zoffix Ah
01:19 Zoffix m: my @a = <a b c>; @a[1]:delete; dd @a
01:19 camelia rakudo-moar b14721: OUTPUT: «Array @a = ["a", Any, "c"]?»
01:19 Zoffix m: my @a = <a b c>; @a[1]:delete; dd [|@a]
01:19 camelia rakudo-moar b14721: OUTPUT: «["a", Mu, "c"]?»
01:20 AlexDaniel don't we have a ticket for this ??
01:23 BenGoldberg m: my @a = <a b c>; @a[1] = Nil; dd @a;
01:23 camelia rakudo-moar b14721: OUTPUT: «Array @a = ["a", Any, "c"]?»
01:23 BenGoldberg m: my @a = <a b c>; @a[1] = slip(); dd @a;
01:23 camelia rakudo-moar b14721: OUTPUT: «Array @a = ["a", Empty, "c"]?»
01:23 Zoffix m: use nqp; my @a = <a b c>; nqp::bindpos(nqp::getattr(nqp::decont(@a), List, '$!reified'),1,nqp::null); dd @a
01:23 camelia rakudo-moar b14721: OUTPUT: «Array @a = ["a", Any, "c"]?»
01:23 Zoffix m: use nqp; my @a = <a b c>; nqp::bindpos(nqp::getattr(nqp::decont(@a), List, '$!reified'),1,nqp::null); dd |@a
01:23 camelia rakudo-moar b14721: OUTPUT: «Str @a = "a"?Mu?Str @a = "c"?»
01:24 BenGoldberg m: my @a = <a b c>; @a[1] = slip(); dd @a[1];
01:24 camelia rakudo-moar b14721: OUTPUT: «Slip @a = Empty?»
01:24 BenGoldberg m: my @a = <a b c>; @a[1]:delete; dd @a[1];
01:24 camelia rakudo-moar b14721: OUTPUT: «Any @a = Any?»
01:25 BenGoldberg m: my @a = <a b c>; @a[|1]:delete; dd @a[1];
01:25 camelia rakudo-moar b14721: OUTPUT: «Any @a = Any?»
01:25 BenGoldberg m: my @a = <a b c>; @a[|1]:delete; dd [@a[1]];
01:25 camelia rakudo-moar b14721: OUTPUT: «[Any]?»
01:25 luxio BenGoldberg: camelia works in queries, you know
01:31 Zoffix .ask lizmat should "holes" in Arrays that get created from `:delete` use `is default` value maybe? IIRC we talked about it long time ago and at the time the `nqp::null` was decided to be good enough, but now some users are having issues that they get an unwanted Mu in a hole ( https://irclog.perlgeek.de/perl6/2017-07-23#i_14909593 ). I figured maybe it should be what you'd get as if an element was never there.
01:31 yoleaux Zoffix: I'll pass your message to lizmat.
01:31 luxio Is perl generally considered a lightweight language?
01:31 Zoffix luxio: which one?
01:31 luxio perl6
01:32 Zoffix don't think so
01:32 Zoffix "A lightweight programming language is one that is designed to have very small memory footprint, is easy to implement (important when porting a language), and/or has minimalist syntax and features."
01:32 Zoffix Yeah, we're definitely not minimalist syntax
01:32 luxio I'm more concerned about memory footprint
01:33 geekosaur luxio, lightweight languages are generally things like lua and tcl that are extremely compact
01:33 AlexDaniel luxio: definitely not yet
01:35 Zoffix Ohhhh
01:35 Zoffix .tell lizmat disregard. I see it already does use is default :)
01:35 yoleaux Zoffix: I'll pass your message to lizmat.
01:50 Zoffix dugword: well, I see the problem but I think the current behaviour might be correct.
01:50 Zoffix dugword: deleted hole has `is default` value, which is an `Any` by default in Arrays, which is what you get when you dump it. But Slips ain't got an `is default`, so when you convert your array to a Slip, you get the hole in all of it's Mu glory
01:50 dugword Interesting
01:50 Cabanossi joined #perl6
01:51 ilbot3 joined #perl6
01:51 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:56 AlexDaniel actually, the problem in this case is not with :delete
01:56 AlexDaniel but it is about holes, yes
01:56 AlexDaniel m: my @a = 42; @a[5] = 49; say |@a
01:56 camelia rakudo-moar b14721: OUTPUT: «42(Mu)(Mu)(Mu)(Mu)49?»
01:57 Zoffix aye
01:57 AlexDaniel dugword: and here is the exact line where it appears in your case :) https://github.com/dugword/perl-Convert-ASN1/blob/master/lib/Convert/ASN1P6.pm6#L873
01:58 dugword Great, thanks Alex
01:58 AlexDaniel there are many similar lines, so I guess they are problematic as well
01:58 timotimo luxio: rakudo perl6 on moarvm takes about 63 megabytes of ram for bare startup. there's room for improvement, though
01:58 AlexDaniel but you can do this before and after that line and see what it says: say |$vs[4];
02:06 noganex_ joined #perl6
02:36 mr-foobar joined #perl6
02:40 Ben_Goldberg joined #perl6
02:45 skids joined #perl6
02:52 BenGoldberg m: my @a; ++@a[1]; dd @a.slip
02:52 camelia rakudo-moar b14721: OUTPUT: «No such method 'slip' for invocant of type 'Array'. Did you mean any of these??    Slip?    flip?    sin?    skip??  in block <unit> at <tmp> line 1??»
02:52 BenGoldberg m: my @a; ++@a[1]; dd @a.Slip
02:52 camelia rakudo-moar b14721: OUTPUT: «slip(Mu, 1)?»
03:00 Cabanossi joined #perl6
03:18 skids joined #perl6
03:40 Cabanossi joined #perl6
04:19 araraloren_ joined #perl6
04:22 skids joined #perl6
04:25 Cabanossi joined #perl6
05:16 Sgeo joined #perl6
05:16 CorePower joined #perl6
05:31 skids joined #perl6
06:34 setty1 joined #perl6
06:50 darutoko joined #perl6
07:00 vendethiel joined #perl6
07:26 rindolf joined #perl6
07:28 mr-foobar joined #perl6
07:32 dugword joined #perl6
07:34 * AlexDaniel fire in the hole!!
07:34 nadim joined #perl6
07:38 evalable6 joined #perl6
07:38 committable6 joined #perl6
07:38 quotable6 joined #perl6
07:38 unicodable6 joined #perl6
07:39 bisectable6 joined #perl6
07:39 bloatable6 joined #perl6
07:39 greppable6 joined #perl6
07:39 benchable6 joined #perl6
07:39 statisfiable6 joined #perl6
07:39 Cabanossi joined #perl6
07:41 coverable6 joined #perl6
07:42 parv joined #perl6
08:08 domidumont joined #perl6
08:13 domidumont joined #perl6
08:19 wamba joined #perl6
08:22 jeromelanteri joined #perl6
08:22 jeromelanteri https://imagebin.ca/v/3UKfuqqjDgZI
08:22 jeromelanteri https://f.perlbot.pl/p/ncocds
08:23 jeromelanteri the second prompt question does not appear but the prompt is running and waiting for an answer. After you hit y or n, the prompt question appera with the answer.
08:23 jeromelanteri Just because i use Term::Prompt (if not use, all works fine).
08:24 jeromelanteri i can not resolve this because i definitly not understand why this happen.
08:24 jeromelanteri *try the code and see by yourself (i do this little code specificaly for show the problem and find someone should ba able to help me on that)
08:24 Cabanossi joined #perl6
08:36 rindolf joined #perl6
08:39 Dunearhp_ joined #perl6
09:02 nine jeromelanteri: that is Perl 5 code. This channel is about Perl 6 which is an entirely different (though related) programming language. Please try #perl instead
09:04 jeromelanteri nine, oh ok, sorry, bye
09:05 nine jeromelanteri: no worry :) You can also stay here anyway. This is a very friendly place.
09:05 jeromelanteri i was banned from perl by Grinnz because of i ignored him on an other one serveur then... i tryed here (and i see  there were no one on line speaking also)
09:05 jeromelanteri nine, thank you, but i just start learning perl5
09:06 nine And FWIW I see nothing obviously wrong with your script
09:06 jeromelanteri nine, ho thank you to look at it (very sympatic). did you try to run it ?
09:09 nine I also haven't seen a for (my $i = 0; $i < scalar(@selection); $i++) { style loop in a long while. In Perl the loop is better written as for my $item (@selection) { push @table, [ $list_of_items[$item], $link_with_items[$item] ]; } or just my @table = map { [ $list_of_items[$_], $link_with_items[$_] ] } @selection;
09:10 jeromelanteri nine, yes sure, i also cut this part for check if this have an influence on the result code...
09:10 jeromelanteri https://f.perlbot.pl/p/l9bnkt
09:10 jeromelanteri and in fact, same problem...
09:12 nine jeromelanteri: oh, before you do anything else at all, add "use strict; use warnings;" before line 2 of your script
09:13 nine jeromelanteri: oh, disregard that. I see it in line 3
09:13 jeromelanteri nine, yes, and i do an other change for clarify the situation (just change sub name and remove table part totaly)
09:13 jeromelanteri https://f.perlbot.pl/p/uno44m
09:13 nine I jumpted to conclusions because I can't find -y1 as a valid option in IO::Prompter's docs
09:14 jeromelanteri yes, and this works fine.
09:14 jeromelanteri if i just remove Term::Prompt, IO::Prompter works well (not if i use Term::Prompt BEFORE).
09:15 jeromelanteri nine, ok then i know something more because of you: 1/ my code is not wrong, 2/ you havbe the same problem as me: your  IO::Prompter prompt line appear AFTER it wait for an answer (that's not normal).
09:16 nebuchadnezzar joined #perl6
09:19 nine jeromelanteri: in fact, the script seems to work just fine for me
09:19 nine jeromelanteri: https://gist.github.com/niner/9563745f2db939fe8d50ae91297eef6a
09:19 jeromelanteri nine, you have the second prompt question  appear BEFORE it wait for answer ?
09:20 nine The "Now could you read.."? yes
09:20 jeromelanteri ho... i have it after i answer...
09:20 Skarsnik joined #perl6
09:20 jeromelanteri what is your OS running ?
09:21 jeromelanteri i can make a video for show that...
09:22 nine jeromelanteri: openSUSE Tumbleweed, perl 5.24.1 IO::Prompter 0.004014 Term::Prompt 1.04 using bash in konsole 17.04.2
09:22 jeromelanteri ho, you think it should be linked because i use zsh ?
09:22 Skarsnik Hello
09:23 nine jeromelanteri: terminals are arcane beasts full of surprises. Shells, too. That's software with 4 or 5 decades of history.
09:23 jeromelanteri nine, mmmh, yes.
09:24 jeromelanteri i may have to look at the module Term::Prompt code, but i think my level should be not suffisant for find bug related to shell console used.
09:24 jeromelanteri ok, thank you
09:25 nine jeromelanteri: to come back on topic though, may I interest you in writing that script in Perl 6 just for fun? Perl 6 does have a builtin "prompt" function and fewer ways to screw up. E.g. you wrote @list_of_items[$selection[$i]] which would be somewhat correct Perl 6 but not actually Perl 5 ;)
09:26 jeromelanteri nine, yes sure, why not ? if for me use perl6 for write little script (actually i plan to script for vim plugins implementation from git remote repo helper)...
09:26 jeromelanteri is more easy
09:26 jeromelanteri nine, i'm on archlinux and or antergos OS... any pacman packages for that ?
09:27 nine jeromelanteri: not sure. I've never used arch
09:28 nine And never heard about the other one :)
09:28 jeromelanteri ok, i will find it this day and try to copy then change my code relatively to perl6. Any link for learn "quickly" this perl6 langage ?
09:29 nine jeromelanteri: if not, installation is really just: git clone https://github.com/rakudo/rakudo.git && cd rakudo && perl Configure.pl --gen-moar --make-install
09:30 jeromelanteri nine, ok i will before to try this search for nice pacman packages of perl6, it should have some...
09:30 nine jeromelanteri: https://docs.perl6.org/ is your place to go. https://perl6.org/resources/ lists a lot more
09:31 nine jeromelanteri: package could be named rakudo (as that's the implementation)
09:31 jeromelanteri ok
09:33 rindolf joined #perl6
09:52 jeromelanteri https://f.perlbot.pl/p/umuq64
09:56 jeromelanteri nine,  i find rakudo, zef, alacryd, panda, and some "modules" ?
09:56 jeromelanteri bamboo
09:57 jeromelanteri and is ther any cpan related modules for perl6 ? (or an other than mspan ?)
09:57 jeromelanteri s/mspan/mcpan/
10:01 nadim joined #perl6
10:14 setty1 joined #perl6
10:15 jeromelanteri joined #perl6
10:28 nine jeromelanteri: what do you mean by "cpan related"?
10:30 lizmat joined #perl6
10:30 jeromelanteri nine, i have cpan command for install module (from cpan site i think... or mcpan). I think i understand that it is zef who does this... install modules...
10:31 jeromelanteri nine, i'm just reading doc of perl6 now... it seems to be more OO than perl5
10:31 nine jeromelanteri: yes, zef is the too to use
10:31 nine s/too/tool
10:31 nine much more so, yes
10:31 jeromelanteri syntax is nice
10:32 nine Though it's perfectly fine with being used as a functional or procedural language as well. Whatever fits better with the problem
10:32 jeromelanteri yes, i read this also... like haskell then ?
10:32 nine It got much inspiration from haskell. But also tries to be more easily accessible
10:33 jeromelanteri i have some little problem for install zef from archlinux (actually, packages are not in official maintained repos, but in AUR repos... then... fight a little for install things, it should run soon)
10:33 jeromelanteri nine, can it be also linked with a GUI ?
10:33 nine Installing zef from source is rather trivial if using the package doesn't work out
10:34 nine There's a Gtk::Simple module
10:34 jeromelanteri nine, package ask for perls-file-find and perl6-shell-command (that i allready install...)
10:34 jeromelanteri nine, only tk GUI ?
10:35 jeromelanteri oh ... gtk... 2 or 3?
10:35 nine GTK 3
10:35 jeromelanteri (gtk is fine for me)
10:35 jeromelanteri good
10:35 nine http://modules.perl6.org/#q=gtk%3A%3Asimple
10:36 jeromelanteri yes... i think i would like to try that, it seems to be powerfull and funny for use, let's try that...
10:46 El_Che jeromelanteri: I thought arch got rakudo pkgs covered. If not I can have a look at creating a pkg
10:47 jeromelanteri El_Che, yes, i do install rakudo well, now i'm trying to install zef, but there is some problem (it search for alacryd... who is allready installed but whereis alacryd show nothing).
10:47 jeromelanteri i also have to install pand who actually failed for same reason.
10:47 jeromelanteri panda
10:48 jeromelanteri (and i see my vim has allready perl6 syntax ability)
10:50 El_Che jeromelanteri: panda is obsoleted
10:50 jeromelanteri El_Che, ok, a problem fixed then... :)
10:51 El_Che I provide 2 scripts in my rakudo pkgs:
10:51 El_Che https://github.com/nxadm/rakudo-pkg/blob/master/docker/install_zef_as_user
10:51 El_Che https://github.com/nxadm/rakudo-pkg/blob/master/docker/install_zef_as_root
10:52 El_Che most users will use the first
10:52 jeromelanteri well.. let's see that...
10:52 El_Che the magic is just /opt/rakudo/bin/perl6 -Ilib bin/zef --install-to=perl install .
10:53 El_Che (I just returned from holidays todat, I'll try to push new rakudo pkgs today or soonish)
10:53 jeromelanteri El_Che, then i have just to change my rakudo real directory position...
10:54 jeromelanteri El_Che, an idea should be to use command find in the script for find rakudo directory also ?
10:54 nine El_Che: why --install-to=perl?
10:55 itaipu joined #perl6
10:55 jeromelanteri also, why (but maybe it is your distro who ask for that, i don't know) not just link on /usr/local/bin ?
10:56 El_Che nine: I need to check that. If I remeber correctly that will it will end in whatver .perl6 dir is
10:56 El_Che jeromelanteri: the idea is to have it locally contained without needing root to install modules
10:56 lizmat_ joined #perl6
10:56 jeromelanteri ho yes, why not...
10:57 El_Che everything in the pkg is in /opt/rakudo. The user modules in .perl6 (expect if installed as_root, then in /opt/rakudo)
10:57 nine El_Che: no, that would be home. perl is the name of the repo that's meant to contain only the CORE dist which is installed with rakudo itself
10:57 El_Che I need to check with ugexe that game me the info. However, this works as expected (despite the cargo cult)
10:58 El_Che nine: I had trouble getting it to install correctly at the beginning.
10:58 * El_Che off
10:59 jeromelanteri i see there also have a solution for install from docker.
10:59 jeromelanteri with docker
11:00 nine m: say $*REPO.repo-chain.grep({$_.can("name") and $_.can("prefix")}).map({"$_.name(): $_.prefix()"}).join(", ")
11:00 camelia rakudo-moar b14721: OUTPUT: «home: /home/camelia/.perl6, site: /home/camelia/rakudo-m-inst-1/share/perl6/site, vendor: /home/camelia/rakudo-m-inst-1/share/perl6/vendor, perl: /home/camelia/rakudo-m-inst-1/share/perl6?»
11:00 nine El_Che: ^^^
11:04 jeromelanteri El_Che, from pacaur AUR repos installation, i have my perl6 (so rakudo) inside /usr/share/perl6 and binary linked to /usr/bin/perl6
11:05 nine jeromelanteri: installing zef is a matter of: git clone https://github.com/ugexe/zef.git && cd zef && perl6 -Ilib bin/zef install .
11:05 jeromelanteri nine, yes, i'm just doing that.
11:10 jeromelanteri nine, then now, how to use zef ?
11:10 nine zef install Whatever::Module
11:10 nine zef --help
11:10 jeromelanteri nine, no
11:11 jeromelanteri we just install zef somewhere distro can not find it...
11:12 nine jeromelanteri: zef should have told you where it installed itself, so you can add that path to your $PATH
11:12 mr-fooba_ joined #perl6
11:12 jeromelanteri i just see that... alacryd is inside /usr/share/perl6/vendor/bin/  and zef is inside: /usr/share/perl6/site/bin (w t f)
11:13 nine That actually sounds quite sane
11:13 jeromelanteri nine, i would prefer to just create a symbolic link and not do things dirty inside my PATH variable env
11:13 nine What is dirty about that?
11:13 nine That's exactly what PATH is there for
11:13 jeromelanteri nin, ok... good news then ?
11:14 nine /usr/share/perl6/vendor is for stuff installed from packages, /usr/share/perl6/site is for manually installed stuff
11:15 jeromelanteri nine, yes but if i loose this or for reason of backup things, it will become dirty and boring to remember all the (unorganized) place of every thing in the room.. (i like when things are sorted and clean)...
11:15 jeromelanteri nine
11:15 jeromelanteri well
11:15 jeromelanteri i will use ln -s
11:15 jeromelanteri nine, why is there: zef zef-j zef-m ?
11:16 nine Because rakudo can run on different backends (JVM, MoarVM) and sometimes you want to be explicit about which one you use
11:16 jeromelanteri (same for alacryd ?)
11:16 jeromelanteri ok, fine
11:16 jeromelanteri it will find them alone or i need to syboli linked them also ?
11:17 nine You can pretty much ignore that issue
11:17 jeromelanteri ok
11:19 jeromelanteri fine... well, something more usual to install for use perl6 ?
11:20 El_Che lizmat_ dropping the _ is like a Clarck Ken/Superman experience
11:20 lizmat yeah, exposed by a flaky Ziggo ubee base station
11:22 jeromelanteri nine, a last question... is there any problem relative to use perl6 things from zsh shell (doesn't want bash anymore) ?
11:25 nine jeromelanteri: none that I'm aware of
11:26 jeromelanteri cool
11:27 mr-foobar joined #perl6
11:29 El_Che jeromelanteri: just backup your profile file containing your PATH config. It's a lot less messy than remembering syslinks
11:32 jeromelanteri El_Che, that is right.
11:36 jeromelanteri well... tomorrow i will be back if i failed to convert my code or for ask questions. thank you nine and El_Che.
11:39 BenGoldberg joined #perl6
11:43 El_Che np
11:47 nadim joined #perl6
12:06 espadrine joined #perl6
12:09 Cabanossi joined #perl6
12:24 bjz joined #perl6
12:45 nadim Hi, can we return a list with named elements?  sub x { :name<...>. :other<...>, 123, 456 }  my  (:$other, @positional, :$name) = x() ;  # I will return a Hash but I am curious
12:45 nadim Zoffix: that sounds like a question for you ^
12:49 khw joined #perl6
13:00 mr-fooba_ joined #perl6
13:08 Skarsnik AlexDaniel, here?
13:09 Cabanossi joined #perl6
13:10 bioexpress joined #perl6
13:13 bioexpress Hello, is it save to splice more elements than the array contains?
13:16 Juerd Yes
13:18 bioexpress Thx!
13:18 MasterDuke Skarsnik: i tried running your leaktest script, but didn't notice any leaking
13:19 Skarsnik witch one? did it output stuff? x)
13:20 MasterDuke i modified https://gist.github.com/Skarsnik/03b970d2a4b827ba1e1d
13:20 jeromelanteri it is oo really... this concept is colser than C++... il love it.
13:21 MasterDuke i took out the Linux::Proc::Statm stuff since i didn't have that installed. ran it under heaptrack and memory consumed plateaued at ~120mb
13:21 jeromelanteri is there any prompt module for multi-selections menu ?
13:22 Skarsnik hm weird
13:22 Skarsnik did you ran it long?
13:22 MasterDuke i reduced the loop to 10
13:23 Skarsnik well it leak very little now
13:23 Skarsnik so it hard to notice
13:24 eliasr joined #perl6
13:29 zakharyas joined #perl6
13:40 timotimo jeromelanteri: we do have "Term::Choose"
13:40 timotimo .eco Term::Choose
13:40 timotimo buggable: eco Term::Choose
13:40 buggable timotimo, Term::Choose 'Choose items from a list interactively.': https://github.com/kuerbis/Term-Choose-p6 2 other matching results: https://modules.perl6.org/#q=Term%3A%3AChoose
13:44 jeromelanteri timotimo, thank you
13:44 timotimo this website there has pretty much all of our modules
14:06 jeromelanteri timotimo, very good. now... how to use class/modules from different files (for perl5, create a .pm file, then import it by use package_name, use of @INC, etc...) but for perl6 ? i not find any tuto on that. any link for tutos ?
14:07 Skarsnik https://docs.perl6.org/language/modules.html
14:08 jeromelanteri Skarsnik, thank you
14:08 Skarsnik https://docs.perl6.org/language.html lot of stuff in there already
14:09 Zoffix .tell nadim yes you can. Just use binding instead of asignment to cause signature binding instead of list assignment. `my () :=` is just a signature so you can use whatever you can use in normal signatures (sans anything currently not implemented yet).   sub x { :name<foos>, :other<meows>, 123, 456 }; my (:$other, *@positional, :$name) := x; dd [$other, $name, @positional]
14:09 yoleaux Zoffix: I'll pass your message to nadim.
14:14 Zoffix m: my @a is default(42); @a[2] = 70; { dd [$^a, $^b, $^c ]  }(|@a)
14:14 camelia rakudo-moar 0970ba: OUTPUT: «[Mu, Mu, 70]?»
14:15 Zoffix m: my @a is default(42); @a[2] = 70; dd @a.FLATTENABLE_LIST
14:15 camelia rakudo-moar 0970ba: OUTPUT: «(Mu, Mu, 70)?»
14:15 Zoffix wc
14:24 Cabanossi joined #perl6
14:35 pilne joined #perl6
14:40 nadim joined #perl6
14:40 gdonald joined #perl6
14:41 zacts joined #perl6
14:58 zakharyas joined #perl6
15:04 BenGoldberg joined #perl6
15:08 El_Che if someone asks, new rakudo 2017.07 linux packages: https://twitter.com/nxadm/status/889139909860130817
15:08 skids joined #perl6
15:10 Guest90987 joined #perl6
15:10 macsnowball joined #perl6
15:24 Cabanossi joined #perl6
15:30 timotimo cool, El_Che++
15:38 BenGoldberg Ubuntu version numbering has me confused -- why is 16.10 at the end of it's life now, whereas 16.04 expires in April 2021?
15:44 nowan joined #perl6
15:46 skaji X.04 where X is even is LTS (long term support).
15:52 itaylor57 joined #perl6
16:01 nadim joined #perl6
16:06 zakharyas joined #perl6
16:24 Cabanossi joined #perl6
16:32 stmuk_ http://pl6anet.org/drop/rakudo-star-2017.07-RC1.tar.gz
16:33 stmuk_ that's likely to be the release tomorrow
16:33 dugword joined #perl6
16:38 El_Che stmuk_++
16:39 El_Che stmuk_: although my main OS is linux and I use my own packages, I have a win and osx around where precompiled pkgs are handy :)
16:39 El_Che BenGoldberg: non LTS version have a 9 month support window
16:40 stmuk_ El_Che: the Mac DMG RC will follow shortly!
16:40 El_Che BenGoldberg: so when 18.04 comes out, I'll end up having 16.04, 17.10 and 18.04 debs
16:40 El_Che stmuk_: appreciated!
16:49 mr-foobar joined #perl6
16:56 stmuk_ El_Che: see #perl6-dev (if you haven't)
16:58 rubio_terra joined #perl6
17:03 zakharyas joined #perl6
17:03 SmokeMachine I was thinking: if :!$foo is valid, shouldn’t :?$foo be valid? (As I said earlier) but now I’m not sure what I think, because if that’s true, so I think :+$foo, :-$foo, :~$foo, :++$foo, etc should all be valid... I don’t know what I think about it...
17:09 Actualeyes joined #perl6
17:09 Cabanossi joined #perl6
17:13 zengargoyle hehe, i now want ://$foo, :||$foo, for like the p5 (foo => $foo)x!!$foo, or (:$foo if defined $foo) like things where you only want to pass the named param if it is true/defined but otherwise leave it out and accept the default...
17:14 zengargoyle maybe ':' should be a slang like 'Q' :P
17:14 * zengargoyle jests
17:16 domidumont joined #perl6
17:18 zengargoyle i did tend to use the Enterprise operator ()x!! quite a bit, not sure of the most p6 way ATM.
17:25 Juerd I have a hash that I'm passing to a standard .new with Foo.new(|%hash); one of its values is an array, which gets into the "has @.bar;" as item 0
17:25 Juerd Instead I'd like to assign the elements from that array to @.bar flattened
17:25 Juerd The hash comes from JSON::Tiny
17:26 Juerd Is there a way to do this, without specifying the specific key?
17:30 Juerd As a work-around I've changed "has @.bar;" to "has $.bar;" :(
17:31 zengargoyle that was sorta going to be my suggestion, or make a BUILD/TWEAK to patch it up otherwise.
17:33 zengargoyle what would you want?  some sort of trait to say 'flatten any has @. attributes'?
17:34 zengargoyle or 'has @.bar something-that-says-to-flatten'
17:40 itaipu joined #perl6
17:43 AlexDaniel Skarsnik: yes
17:48 mr-foobar joined #perl6
17:51 Skarsnik AlexDaniel, I did a small version of the gumbo/xml module for test purpose, sadly no crash
17:51 Zoffix SmokeMachine: :!$foo is not valid
17:52 Skarsnik want it to play around?
17:52 Zoffix Seriously, all the people who want to pile in on feature proposals should at least learn the current ones >_<
17:53 parsnip joined #perl6
17:53 parsnip after doing `brew install rakuda-star`, i have issues like http://sprunge.us/
17:54 parsnip oops, http://sprunge.us/fMNA
17:55 SmokeMachine Zoffix: you are right!
17:55 AlexDaniel Skarsnik: hm, yeah? I can try running it for a little longer… :)
17:55 geekosaur parsnip, sounds like something replaced your perl 5 in the process without rebuilding a perl-enabled vim
17:55 geekosaur which would be a brew packaging/maintenance issue
17:56 parsnip thanks
17:56 geekosaur (in fact the kind of issue which is why I don't use homebrew)
17:56 geekosaur too easy to get into that kind of situation
17:56 parsnip but also, when i open a terminal, it seems .bashrc isn't loaded anymore
17:56 Skarsnik http://www.nyo.fr/~skarsnik/tmp/minigumbo/
17:57 AlexDaniel Skarsnik: wow that's really small
17:58 Skarsnik You will need the Binding.pm6 from Gumbo
17:59 setty1 joined #perl6
18:02 AlexDaniel Skarsnik: well, yes, I don't see any issue with this
18:03 AlexDaniel Skarsnik: would be nice to have a minimal example that *does* crash :)
18:03 zengargoyle Zoffix: i think we're just thinking out loud and not terribly serious....
18:04 Skarsnik My best guess at this point is stuff inside the xml module
18:05 geekosaur parsnip, there's only a billion things that can lead to that :/
18:06 zengargoyle m: my $x; sub foo(:$x = 42){ say $x }; foo( |%(:$x if $x) );
18:06 camelia rakudo-moar 9b5cce: OUTPUT: «42?»
18:06 zengargoyle is that a decent thing?
18:07 Zoffix zengargoyle: no need foe %
18:07 Zoffix *for
18:08 Zoffix |(:)   aka the ninja operator
18:10 zengargoyle m: my $x; sub foo(:$x = 42){ say $x }; foo( |($x andthen :$x) );
18:10 camelia rakudo-moar 9b5cce: OUTPUT: «42?»
18:10 zengargoyle depending on which direction you think in. :)
18:12 Zoffix oh hah
18:12 Zoffix I looked in the logs and 42 has a question marl after i
18:12 Zoffix had me confused
18:13 Zoffix moritz: looks like log encoding isn't 100% back to normal unicode n/l char turns up as a question
18:13 eyck joined #perl6
18:13 Zoffix Unless it's my font :/ though I'm pretty sure it used to work
18:13 parsnip ah, my .bashrc wasn't being loaded because installing rakudo-star also added a file .bash_profile with the line `eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"`
18:14 zengargoyle parsnip: ouch!
18:15 Zoffix :o
18:15 MasterDuke anybody have a machine with more than 16gb ram to test something on?
18:17 parsnip could rent a VPS
18:17 zengargoyle is OSX default shell bash?
18:19 MasterDuke parsnip: seems like overkill to run one line of code though...
18:19 zengargoyle that would bonk a Debian as well, uses .profile instead of .bash_profile
18:20 parsnip not sure what did that, i don't see it at https://github.com/Homebrew/homebrew-core/blob/master/Formula/rakudo-star.rb
18:22 geekosaur bash uses .bash_profile if it exists, otherwise .profile
18:22 parsnip hmm, but file creation time was 13 hours ago, so i must have done something else...
18:23 geekosaur so yes this situation is a nasty corner case by someone who didn't think through how shells work. (also doesn't allow for people using zsh, fish, etc.)
18:23 parsnip i don't think this is perl6 related
18:23 parsnip i don't know where that file came from
18:23 stmuk_ Outer Space?
18:23 stmuk_ or local::lib
18:24 geekosaur the latter from what I am seeing
18:24 geekosaur homebrew got "clever:
18:24 geekosaur well, the hb maintainer for local::lib
18:24 Cabanossi joined #perl6
18:25 geekosaur there's some hb bug reports for past instances of that maintainer being "clever" too
18:25 geekosaur in any case it'd be related to the same issue of something upgrading your hb-installed perl with one that breaks stuff
18:25 geekosaur (perl5)
18:28 parsnip the same line appears at http://search.cpan.org/~haarg/local-lib-2.000023/lib/local/lib.pm
18:30 zengargoyle that's a pretty standard thing for installing local::lib, you put that in your .profile/.bash_profile.  hb should have checked if .profile existed and put it there instead of to .bash_profile.
18:31 macsnowball left #perl6
18:32 zengargoyle i don't think it's even bash specific and would be fine for plain old sh as well.
18:32 zengargoyle is your bash also homebrew?
18:33 parsnip no, i think my bash is from macos
18:33 parsnip so like, gplv2
18:34 parsnip does this edit of .profile take into account how macos does things differently? i'm trying to recall, but i think macos loads .profile on every terminal.
18:35 parsnip *terminal emulator instance
18:35 zengargoyle *maybe* homebrew bash is setup to use a .bash_profile vs falling back to .profile.  so *maybe* hb rakudo-star is built with hb bash in mind....  but it's still a bit wonky.
18:36 parsnip i'm not even sure rakudo-star did it, i can't reproduce
18:36 zengargoyle in general, bash does .bash_profile (if it exists) or .profile otherwise (but only on 'login' shells) and does .bashrc on non-login shells.  IIRC
18:36 geekosaur I don;t think it did it directly, most likely it just depended on a new perl5 package
18:36 geekosaur and that package is .. unfortunate
18:37 pompomcrab joined #perl6
18:38 geekosaur anyway "brew doctor" might help with the collateral damage from the new perl5 package
18:38 zengargoyle i don't ack local::lib or .bash_profile in rakudo source.
18:39 zengargoyle i'd guess it's in one of those bottle things...
18:40 parsnip timestamp is 13 hours ago, i installed rakudo-star only an hour ago, so i either started trying perl last night, or something else provoked it.
18:45 zengargoyle some systems use a .bash_profile that sources .profile (if it exists) and then source .bashrc (if it exists).
18:49 zengargoyle it's actually a bit of a horrorshow on like older Solaris when you have a /bin/sh to get everything *just right* so you have the environment you want both when you login and when you just `ssh host comman`.
18:51 geekosaur ob https://github.com/geekosaur/dotty
18:51 geekosaur (I haven't completely removed the horrorshow to support ultrix, much less solaris (which I actually have to still care about because of customers)
18:54 zengargoyle geekosaur++ :)  i went mad with like 4 versions of Solaris, RedHat, Gentoo, and Debian and finally just mostly gave up.
18:56 zengargoyle i keep around ~/profile.XXX scripts and just source them as needed.  (i don't have to worry about such things ATM)
18:57 ufobat joined #perl6
18:59 geekosaur well, that came from a university environment where I didn't get to say what platforms I had to deal with
19:05 zengargoyle same. 30 years of cruft basically...
19:06 Juerd zengargoyle: Maybe, or maybe something that can un-itemize the array in a |, or ... I don't know. The current things just don't combine well.
19:07 gfldex joined #perl6
19:11 zengargoyle Juerd: i totally see where it could be a handy thing.  i could imagine a Role or something that does the BUILD thing and introspects for @/% attributes and does stuff.  but it's way beyond me.
19:14 ugexe thats just how binding works
19:14 ugexe otherwise method BUILDALL(|) { my $self = callsame; @.foo = |@.foo; $self; } or some such works
19:25 DBeepBeep joined #perl6
19:26 DBeepBeep How do we run a script with multiple files?
19:26 |oLa| joined #perl6
19:26 TEttinger joined #perl6
19:30 zengargoyle DBeepBeep: what do you mean?
19:32 DBeepBeep zengargoyle, I've got a grammar in one file that I'd like to test, but I can't seem to get the test file to find it.
19:33 DBeepBeep I'm running with a -I to the directory.
19:37 zengargoyle sounds like you need to make a module.
19:44 zengargoyle DBeepBeep: is your grammar file a module that can be use'd?
19:45 DBeepBeep Yeah
19:45 DBeepBeep It's just a grammar surrounded by module. The file has a pm6 extension
19:46 zengargoyle try putting it in a ./lib/NAMEGOESHERE.pm6
19:46 zengargoyle i'm not sure if -I. looks in the current directory or actually expects loadable things to be in ./lib
19:47 zengargoyle but modules go under ./lib is the norm....
19:49 AlexDaniel u: combining
19:49 unicodable6 AlexDaniel, U+0300 COMBINING GRAVE ACCENT [Mn] ( ?)
19:49 unicodable6 AlexDaniel, U+0301 COMBINING ACUTE ACCENT [Mn] ( ?)
19:49 unicodable6 AlexDaniel, 440 characters in total: https://gist.github.com/6c5a7d6aaf79516e652331bb39364c96
19:49 zengargoyle i think most people now are using App::Mi6 to generate a skeleton 'distribution' that creates some files and tests and has some commands to make module building and testing a bit easier.  if you havn't tried it yet, it's worth a look.
19:50 AlexDaniel Skarsnik: I let it run 10000 times and it did not crash
19:50 AlexDaniel Skarsnik: so I'd say there's no bug in this one for sure
19:50 AlexDaniel u: combining letter
19:50 unicodable6 AlexDaniel, U+0363 COMBINING LATIN SMALL LETTER A [Mn] ( ?)
19:50 unicodable6 AlexDaniel, U+0364 COMBINING LATIN SMALL LETTER E [Mn] ( ?)
19:50 unicodable6 AlexDaniel, 145 characters in total: https://gist.github.com/8acbef9bf1f5d04372cf1c64daf5d8d8
19:51 zengargoyle or i have a module that uses a grammar with actions and tests that you could look at.  or there are some other modules that use grammars that you could look at how they are laid out...
19:52 SmokeMachine zengargoyle: I’m using 6pm... :P
19:52 AlexDaniel u: -2
19:52 unicodable6 AlexDaniel, U+106A MYANMAR SIGN WESTERN PWO KAREN TONE-2 [Mc] (?)
19:52 unicodable6 AlexDaniel, U+1087 MYANMAR SIGN SHAN TONE-2 [Mc] (?)
19:52 zengargoyle SmokeMachine: haven't even heard of it... :)
19:52 unicodable6 AlexDaniel, 854 characters in total: https://gist.github.com/ab97f1a0c8e64d2fbe9e80fd1e1c2909
19:53 SmokeMachine zengargoyle: github.com/FCO/6pm
19:53 AlexDaniel test (??)
19:53 AlexDaniel moritz: well… irclog currently does something weird
19:54 AlexDaniel moritz: compare this https://irclog.perlgeek.de/perl6/2017-05-25#i_14635499 and this https://irclog.perlgeek.de/perl6/2017-07-23#i_14911623
19:54 DBeepBeep left #perl6
19:55 AlexDaniel (oops, I meant the line below my message)
19:55 zengargoyle SmokeMachine: looks neat.  like Carton-ish.
19:56 ugexe if you point -I to a directory the name of the module must be split into subdirectories by name part unless the -I directory contains a meta6.json
19:57 SmokeMachine zengargoyle: that’s the idea :)
19:57 Skarsnik AlexDaniel, could be because the MiniXML object are really small
19:59 zengargoyle ugexe: so more likely some naming problem?  ./MyGrammar.pm6 and -I. should be able to 'use MyGrammar;'
20:00 Skarsnik or because parse-html in gumbo create a whole class that is not here
20:00 ugexe well you can still do -Isome/dir and `use NameOfFile;` but NameOfFile wouldnt be the name of your grammar/classes
20:00 zengargoyle guess i haven't really tried things apart from mi6 and a probably decent starting point for a module..
20:02 ugexe but -I. usually refers to something containing a META6.json file, which won't just guess the filename if it exists
20:03 zengargoyle ah, think i probably got it but woud have to play around to grok the details. :)
20:12 rindolf joined #perl6
20:14 zengargoyle does rakudobrew build take advantage of multiple cores?
20:14 perigrin joined #perl6
20:17 zengargoyle heh, 6pm seems bork'd
20:21 mr-foobar joined #perl6
20:23 rindolf joined #perl6
20:27 SmokeMachine zengargoyle: really? Could you send me the error?
20:33 zengargoyle SmokeMachine: https://gist.github.com/4f614ac3d10f88438230a5e942310625
20:34 zengargoyle with the zef debug magic: ZEF_PLUGIN_DEBUG=1 zef --debug install 6pm
20:36 zengargoyle it's a fresh (like just nuked and rebuilt via rakudobrew) moar... so no surprise something may have changed.. :)
20:37 |oLa| joined #perl6
20:38 zengargoyle but i nuked and built because it failed the same way on like 2017-07 from a few days back...
20:38 eyck joined #perl6
20:45 itaipu joined #perl6
20:52 ugexe maybe try `zef install 6pm --deps-only && zef look 6pm && perl6 --ll-exception -Ilib t/01-six-pm.t` to show the stack trace
21:15 zengargoyle ok, weird.  Installing: JSON::Fast:ver('0.9.2') ... # Could not find JSON::Fast:ver<0.4..*> at line 62 in:
21:16 zengargoyle did zef look 6pm and zef install --deps-only and JSON::Class fails from JSON::Marshal which fail from JSON::Fast.
21:19 test joined #perl6
21:20 test hello?
21:20 Guest31196 hello to everyone...
21:20 Guest31196 anyone there?
21:21 Guest31196 p6: say (9+9);
21:21 camelia rakudo-moar 640641: OUTPUT: «18?»
21:21 geekosaur sort of/not very...
21:22 Guest31196 anyone?
21:22 Guest31196 there are lots of people here apparently
21:23 zengargoyle SmokeMachine: ugexe: i'm getting crazy stuff, might be some local issue (though i nuked and rm-rf ~/.perl6 just in case).
21:23 zengargoyle https://gist.github.com/2abf87cd6740d64d1d4aba96945b8bfc
21:23 ugexe you should zef update, those modules were updated recently fixing that
21:24 zengargoyle deps-only croaks in some JSON::Class -> JSON::Marshal -> JSON::Fast.
21:24 zengargoyle i literally nuked and rebuilt via rakudobrew and build zef just hours ago.
21:25 ugexe rakudobrew doesnt nuke anything related to zef
21:25 Manifest0 joined #perl6
21:25 ugexe its cache/store anyway
21:26 zengargoyle does it not nuke site?  i install under opt/rakudobrew (via permissions) and also nuked ~/.perl6 just in case.
21:27 zengargoyle i'll try a hard rm-rf of moar-nom
21:27 ugexe zef caching in ~/.zef, like the project list
21:27 zengargoyle oh, that update.  i thought that always happened anyway for convienence....
21:27 * zengargoyle thinks i complained about it once... :)
21:29 zengargoyle no help.  zef update; zef install --deps-only . -> same JSON error.
21:30 zengargoyle maybe because still in look directory.
21:32 zengargoyle no love.  think i'll go on actual rm-rf purge.
21:32 timotimo you'll go on a rmpage?
21:33 zengargoyle lol
21:33 itaipu joined #perl6
21:38 JAP{NECRO}H joined #perl6
21:38 JAP{NECRO}H p6: say 3;
21:38 camelia rakudo-moar 640641: OUTPUT: «3?»
21:39 JAP{NECRO}H hello
21:39 zengargoyle huh .... i had a lib/.precomp directory in /opt/rakudobrew probably from an ancient PERL6LIB=lib in .profile long since removed... that caused 'lib' to show up under 'rakudobrew versions'.
21:39 JAP{NECRO}H everyone
21:39 Cabanossi joined #perl6
21:39 Zoffix JAP{NECRO}H: hi
21:41 JAP{NECRO}H have any books about p6?
21:42 timotimo https://perl6book.com/ - here's a page about perl 6 books
21:43 JAP{NECRO}H ok. 10q
21:43 zengargoyle that lib/.precomp must have been in a CUR or something....  success after removing stray lib/.precomp in rakudobrew.
21:43 zengargoyle that PERL6LIB thing in evil and infectious.
21:44 timotimo being worked on
21:46 zengargoyle i'm not sure how rakudobrew picked it back up... it's just a directory named lib with a .precomp in it.  how did 'build moar; build zef' end up borked?
21:46 timotimo at least i believe the "unexpected lib folders get made" thing will be fixed
21:47 * zengargoyle stumbler-upon-the-wtf
21:49 zengargoyle now i wish i had done perl6 -V sometime in the middle....
21:51 ugexe easy enough to replicate
21:51 zengargoyle sadly /opt isn't under my backup plan, wish i knew what was in that .precomp directory.
21:51 ugexe perl6 -Ibaz -e 'use Test;'
21:52 ugexe cd baz
21:54 parsnip left #perl6
22:01 * geekosaur really needs to do the "human fuzzer" shirt thing someday :p
22:03 itaipu joined #perl6
22:04 JAP{NECRO}H joined #perl6
22:04 unop joined #perl6
22:11 zengargoyle lol, the stories i have about stumbing-upon-wtf.  i thought complaining like an a** would get me out of vendor meetings... it just made vendors track me down and conferences to send me more sh*t to complain about. :P
22:13 unop Is there a way to .reduce a list where the operator is held in a variable (user-defined)? e.g. something like:   my $op = <+ - * />.pick;   (5, 10).reduce(&$op)
22:14 AlexDaniel why not? :)
22:14 jnthn &("infix:<$op>") or so
22:14 jnthn Or just my $op = (&[+], &[-], &[*], &[/]).pick to avoid the named lookup
22:15 jnthn D'oh, shoulda been
22:16 jnthn &::("infix:<$op>") or so
22:16 zengargoyle m: my &op = (&("infix:<+>"), &("infix:<*>")).pick; say &op.perl;
22:16 camelia rakudo-moar 12d7d5: OUTPUT: «Type check failed in assignment to &op; expected Callable but got Str ("infix:<+>")?  in block <unit> at <tmp> line 1??»
22:16 AlexDaniel m: my @ops = &[+], &[-], &[*], &[/]; say (5, 10).reduce(@ops.pick)
22:16 camelia rakudo-moar 12d7d5: OUTPUT: «-5?»
22:16 AlexDaniel m: my @ops = &[+], &[-], &[*], &[/]; say (5, 10).reduce(@ops.pick)
22:16 camelia rakudo-moar 12d7d5: OUTPUT: «15?»
22:16 zengargoyle m: my &op = (&::("infix:<+>"), &::("infix:<*>")).pick; say &op.perl;
22:16 camelia rakudo-moar 12d7d5: OUTPUT: «sub infix:<*> (Mu $?, Mu $?) { #`(Sub+{<anon|52354672>}+{Precedence}|42153536) ... }?»
22:17 zengargoyle nm
22:17 unop jnthn: Sweet!! That does it, Thanks! :)
22:19 AlexDaniel m: my &op = (&[+], &[-], &[*], &[/]).pick; say (5, 10).reduce(&op)
22:19 camelia rakudo-moar 12d7d5: OUTPUT: «0.5?»
22:19 zengargoyle m:
22:19 zengargoyle m: my &op = (&::("infix:<+>"), &::("infix:<*>")).pick; say [&op] 3,2;
22:19 camelia rakudo-moar 12d7d5: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Two terms in a row?at <tmp>:1?------> 3<+>"), &::("infix:<*>")).pick; say [&op]7?5 3,2;?    expecting any of:?        infix?        infix stopper?        postfix?        statement end…»
22:19 AlexDaniel I guess it's not a good idea to use & sigil in this case?
22:20 zengargoyle m: my &op = (&::("infix:<+>"), &::("infix:<*>")).pick; say [[&op]] 3,2;
22:21 camelia rakudo-moar 12d7d5: OUTPUT: «6?»
22:21 zengargoyle m: my &op = (&::("infix:<+>"), &::("infix:<*>")).pick; say [[&op]] 3,2;
22:21 camelia rakudo-moar 12d7d5: OUTPUT: «5?»
22:21 Ptolemarch joined #perl6
22:23 jnthn AlexDaniel: Using the & sigil would handily catch the mistake I made in my first answer :)
22:23 zengargoyle jnthn: it would...
22:24 zengargoyle m: my &op = (&("infix:<+>"), &("infix:<*>")).pick; say &op.perl;
22:24 camelia rakudo-moar 12d7d5: OUTPUT: «Type check failed in assignment to &op; expected Callable but got Str ("infix:<+>")?  in block <unit> at <tmp> line 1??»
22:24 Cabanossi joined #perl6
22:24 zengargoyle m: my &op = (&::("infix:<+>"), &::("infix:<*>")).pick; say [[&op]] 3,2;
22:24 camelia rakudo-moar 12d7d5: OUTPUT: «5?»
22:27 AlexDaniel m: sub op() { say ‘hello’ }; my &op = (&[+], &[*]).pick; op 5, 10
22:27 camelia rakudo-moar 12d7d5: OUTPUT: «Potential difficulties:?    Redeclaration of symbol '&op'?    at <tmp>:1?    ------> 3sub op() { say ‘hello’ }; my &op7?5 = (&[+], &[*]).pick; op 5, 10?»
22:27 AlexDaniel nice, this warns
22:32 SmokeMachine zengargoyle: so, is 6pm working?
22:33 zengargoyle SmokeMachine: yes, was a rakudobrew/PERL6LIB/cruft problem.  it installed. haven't played with it yet.. :)
22:35 zengargoyle i probably installed something that used JSON modules while i was in /opt/rakudobrew directory and had PERL6LIB=lib set and somehow got a /opt/rakudobrew/lib/.precomp that somehow was relevant.
22:35 ugexe PERL6LIB="lib" perl6 -e 'use Test;'
22:35 ugexe that creates a directory "lib"
22:35 ugexe so if you ever have PERL6LIB set... heh
22:36 ugexe to a non-absolute path anyway
22:36 zengargoyle ugexe: it's more that `rakudobrew nuke moar-nom; rakudobrew build moar; rakudobrew build zef` still picked up that stray lib/.precomp
22:37 SmokeMachine zengargoyle: thanks!
22:37 zengargoyle the .profile setting of PERL6LIB was *ages* ago.  it interfered with rsyncing /opt/rakudobrew betewwn machines.
22:37 ugexe it wouldnt pick it up if it wouldnt get created in the first place
22:37 zengargoyle it was already there from the past.
22:37 ugexe right
22:38 ugexe now imagine instead that it was never created in the past
22:39 zengargoyle i think me having PERL6LIB set way back and installing things when i was in /opt/rakudobrew somehow stuck because maybe rakudobrew with it's magic has a -Ilib somewhere and cd's during execution.
22:40 zengargoyle i noticed when `rakudobrew versions` showed up a mysterious 'lib' version...
22:40 * Praise va a nascondere il suo cuore, che quest'arya pare minaciosa
22:41 zengargoyle it thought lib/.precomp was an actual previous install and added it to a CUR or something like that.
22:42 zengargoyle there are several lines in my previous gists where zef told me JSON::XXXX was already installed.
22:46 zengargoyle ugexe: sorry, missed "now imagine instead..."
22:50 konsolebox joined #perl6
22:54 JAP{NECRO}H joined #perl6
22:56 ugexe instead it should not be created if the CURFS target does not exist. presumably there was never a legit lib/ folder in your rakudobrew folder
23:02 zengargoyle sigh, Praise thinks we're fighting. :(
23:05 zengargoyle i'm just more curious as to how that lib directory broke things.  because i rm-rf'd the moar-nom and ~/.zef and ~/.perl6 and re-built and still failed until i deleted the lib directory.
23:06 zengargoyle i know how it got there and that it soon would not happen again.
23:08 cognominal joined #perl6
23:09 zengargoyle the only option i see is that somehow rakudobrew noticed it and integrated it into the CUR.  even --force-install of JSON modules after they were 'already installed' still picked up old broken versions of the module.
23:09 rindolf joined #perl6
23:10 zengargoyle *really* wish i had done a perl6 -V or more zef install location searching to figure out what was happening.
23:16 zengargoyle how does recomp work now?  in the past when doing 'build moar' you had to re-install all modules, now it seems to notice and reinstall zef and modules get carried over and re-precompd if needed.
23:21 zengargoyle when do you actually need to nuke everything and start from scratch?
23:22 * zengargoyle answers when it doesn't work. :)
23:22 Guest90987 joined #perl6
23:24 Cabanossi joined #perl6
23:39 Guest90987 joined #perl6
23:50 gdonald joined #perl6

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

Perl 6 | Reference Documentation | Rakudo