»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
jeromelanteri for PERL6LIB variable env, where is the usual perl6 module directory ? 00:28
i do zef install Term::Choose, then use Term::Choose::Export, but failed to find in @INC...
inside /usr/share/perl6/source ? 00:29
or inside /usr/share/perl6/site/soures ? 00:30
or inside /usr/share/perl6/site/resoures ?
geekosaur it's more complex than that; it's installed in a precompiled form, with a name based on the ABI hash 00:33
jeromelanteri geekosaur, ok then how i can resolve an error talk about module importation ? 01:02
my modules, i put them where i want and add directory in PERL6LIb (yes ?), but for modules zef install ? use Prompt::Gruff is not suffisant ? 01:03
oh... sorry, i made an error (perl5 and perl6 transition) the module i called is wrong and not exist... so if i call a module than zef has allready installed, it should works. 01:07
geekosaur I'd expect a p6 module error (presuming it's installed) to give both the human readable module name and the hash 01:08
jeromelanteri geekosaur, is there some Cwd, warnings, feature modules to use (like perl) at first lines ? 01:11
geekosaur it's all pretty much by default now 01:12
rarely you might want "use lib '.';"
warnings, strict, etc. are on by default
jeromelanteri and use lib is same than perl5 ? (for example i can put my directory modules inside instead of use PERL6LIB ?) ? 01:13
jeromelanteri ptpb.pw/Ozzf 01:23
but find /usr -name "libncurses.so*" show me this lib in /usr/lib and /usr/lib32
what i can do ? 01:24
geekosaur someone's still doing that, I see 01:25
the problem is that you're on a system which "cleverly" makes it a linker script
which is quite useless for runtime loading
jeromelanteri yes sure, it is archlinux. most of the lib there are linked 01:26
geekosaur er
ok, what I said went over your head
jeromelanteri geekosaur, so i need to copy this lib inside /usr/lib instead of symbolic link ?
geekosaur the complaint is "file too short"
the most probably reason is that its contents are: INPUT(-lncursesw) 01:27
a linker script, meaning commands understood by the ld program
(well, most probably it is a symlink to a versioned one, which contains that.) 01:28
anyway the symlink is not the problem, the fact that it is a script understood only by the ld command is the problem
jeromelanteri yes, ls -la /usr/lib/libncu* show me the bigger are libncurses++.so.6.0 and libncursesw.so.6.0 (76Ko and 435Ko)
geekosaur (also it should really not be using the unversioned one but that;s an argument I will always lose because programmers know ABIs never ever change) 01:29
jeromelanteri and actualy, libncurses.so is not a simbolic link on system file
but maybe redirected inside the file ... 01:30
yes... cat /usr/lib/libncurses.so show INPUT(-lncursesw)
geekosaur in any case you probably need need to file an issue at github.com/azawawi/perl6-ncurses/issues 01:31
(although there is already one that is closely related)
jeromelanteri geekosaur, ok, i'm going to do that. and by the time, what i can do for resolve the problem actually ? 01:32
geekosaur you would need to replace the file containing that linker script with a symlink to the correct one
pacman may be annoyed at you in the future though
since it will no longer be what it thinks should be there 01:33
jeromelanteri no other "clean OS" way ?
this lib is important...
geekosaur nope, your OS chose to do things that way, perl6-ncurses needs to be modified to deal with it or the script needs to be replaced with a more direct link to the correct object 01:34
jeromelanteri geekosaur, do you think the Term::Choose bug is important and difficult to resolve ?
geekosaur this is not really a problem with Term::Choose, it's a problem with one of the modules that requires
jeromelanteri i'm going to post bug and looking in the source code.. maybe i can find an idea ? 01:35
NCurses i think ?
geekosaur perl6-ncurses is trying to find a compatible ncurses shared object and choking on that. it needs to be taught to look in more places. 01:36
specifically it needs to attempt the -w variant (which there's already a bug open for)
jeromelanteri Use wide char library if it is installed 01:44
(i just post a bug issue)
jeromelanteri geekosaur, github.com/azawawi/perl6-ncurses/b...Curses.pm6 01:47
this code should be modified... correct ? 01:48
geekosaur heh, actually I see a workaround right at the top of that file
jeromelanteri ligne 19
geekosaur export PERL6_NCURSES_LIB=/usr/lib/libncursesw.so.6.0 01:49
but the code needs more than you think, which I tried to hint at you earlier
jeromelanteri but also maybe inside module LibraryCheck, who should contain cglobal method
geekosaur it needs to *try* multiple libraries until it finds one that works
jeromelanteri geekosaur, PERL6_NCURSES_LIB is not only for push the directory ? 01:50
i can try that: add /usr/lib/libncursesw.so.6.0in PERL6_NCURSES_LIB then ? 01:51
geekosaur export PERL6_NCURSES_LIB=/usr/lib/libncursesw.so.6.0
AlexDaniel wow, using “but” in your code is so tempting
geekosaur this is a bash command
AlexDaniel I'm only afraid that it will turn anything I write into spaghettified monkey shit… 01:52
jeromelanteri and.... 01:53
geekosaur AlexDaniel, yeh, that was recognized fairly early on after some initial thinking that it could be quite useful (e.g. to implement perl 5's "-s" behavior)
jeromelanteri WORKS ! (happy !) 01:54
geekosaur, thank you for help me to find a clean solution
geekosaur th eonly problem is you need to make sure you do that before running anything using perl 6's ncurses module
(maybe put it in ~/.bash_profile)
...if you already have ~/.profile then put it in there instead 01:55
(if bash sees ~/.bash_profile then it will ignore ~/.profile and any existing shell config will "vanish")
jeromelanteri geekosaur, yes sure... inside my /etc/profile for system wide 01:57
and i use zsh
jeromelanteri on perl5 for get variable environment you get it by $ENV["MY_VAR"}. And with perl6 ? 02:11
s/[/{/
AlexDaniel %*ENV<MY_VAR> 02:12
geekosaur $*ENV{"MY_VAR"} or more conventionally $*ENV<MY_VAR>
jeromelanteri thank you
AlexDaniel geekosaur: wrong sigil though
geekosaur er yes 02:13
%*ENV{"MY_VAR"} or %*ENV<MY_VAR>
AlexDaniel m: say %*ENV<ME>.comb.pick(*).join
camelia eDnlAeixal
geekosaur jeromelanteri, you actually saw that in the NCurses.pm6 earlier
for PERL6_NCURSES_LIB
jeromelanteri yes correct 02:14
actually, perl6 (but also perl5) is new for me... my eyes see, but my brain is to hot for record and understand all quickly... need more time to memorize also. 02:16
(is to hot and to little also :) )
i translate perl5 new code to perl6 code...
jeromelanteri perl6 is real OO, then it may have an API to read ? where ? 02:37
i'm searching for something like if $string.is_directory { }
get the API for Str 02:40
ugexe m: say "my string".^methods 02:43
camelia (BUILD Int Num chomp starts-with ends-with substr-eq contains indices index rindex pred succ comb match subst-mutate subst ords lines parse-base parse-names samecase samemark samespace word-by-word trim-leading trim-trailing trim words encode NFC NFD NFK…
geekosaur it is OO but that doesn't guarantee that things are where you expect them to be 02:44
docs.perl6.org/type/IO::Path#method_d
jeromelanteri ugexe, i read api doc for Str and linked/herited class (Mo Cool Any) but not find how to check if the content string should be a directory who exist (or not)... 02:45
geekosaur, yes sure.
geekosaur m: say ".".IO.d
camelia True
jeromelanteri geekosaur, thank you again...
geekosaur and in general you probably want docs.perl6.org open 02:46
jeromelanteri geekosaur, yes, i'm on it. 02:47
geekosaur but it might not help you with realizing that to treat a string as a path, you need to use the .IO method to get an IO::Path you can do things with
jeromelanteri i'mtrying googlize also (but not too much output relative to perl6 on gogol)
geekosaur, so yes, if i do: $.full_filename = "/my/full/filename.yml"; unless $.full_filename.IO.d { mkdir $.full_filename; } 02:49
it should works
geekosaur it hsould although there are a few rough spots around making intermediate directories on various platforms 02:50
jeromelanteri geekosaur, ho yes... i doesn't care actually about windows things...
jeromelanteri sometimes, doc is minimalist: github.com/perl6-community-modules/yaml-pm6 03:10
so from there, how to know what to do for dumlp yaml file and load yaml file ?
does it mean, by deduction, that i have to dump yaml data in something object, then write it inside a file (spurt ?) ? 03:12
nine jeromelanteri: yes, spurt "myfile.yml", dump($any_perl6_object); should do the trick 06:33
jeromelanteri nine, yes it does. but i think there is no "load" method actually aviable, correct ? (i read a bit the source code of YAML perl6 module... it seems to be not implemented. So, for load file... 06:38
nine jeromelanteri: yeah, seems like you're better off with github.com/yaml/yaml-libyaml-perl6 or github.com/Leont/yamlish 06:42
jeromelanteri nine, ok, i will soon. 06:45
jeromelanteri nine, may i directly declare a type of class variable (like has Str $.file;) with an imported class object ? like: use YAML; class try_it{ has YAML $.datas; } ? 06:58
but by the way, it should have no sens with YAML ... 06:59
but with something who should have a sens (declare a variable who is a specific type of object... a class object i created...) 07:00
possible ? 07:01
nine jeromelanteri: yes 07:07
jeromelanteri: there is really no difference between types created by you, any module you load or the builtin ones. Even builtin types are written in Perl 6 and declared pretty much the same way. 07:08
nine Like the builtin Date class: github.com/rakudo/rakudo/blob/nom/...re/Date.pm 07:10
jeromelanteri fine ! 07:12
what is key-wrod "proto" and "multi" mean ? (ligne 23 and 24, etc... 07:13
key word
moritz multis are several subs or methods with the same, but different signatures 07:14
jeromelanteri ok
moritz and a proto basically groups them together, and can do things like pre- and post-processing for the individual multis
jeromelanteri fine
more i learn, more i like perl6 actually... 07:15
parv moritz: i read about proto (somewhere...) usage to validate/verfiy required parameters. how does post-processing work? 07:37
jeromelanteri is ther any tools for increase usability of perl6 shell ? for example, when i run perl6, i go inside the shell prompt of perl6 (well...), but if i do arrow up, i can not have the last sentence i hit before... i would like something more easy for use/test code. There is some ? 07:42
jeromelanteri a kind of perl6 console with easy history things... 07:43
(maybe completions... why not ?) 07:44
like irb for ruby or ipython for python, etc...
parv jeromelanteri, do you have linenoise|readline installed? (that's what comes up when perl6 REPL is stared if not installed.)
jeromelanteri parv, no. but find it in AUR repos. I think i have readline. 07:46
yes, readline, but i just see there is perl6-readline and perl6-linenoise.
parv, what you think the best ? 07:47
parv Those are the perl 6 modules, installed via zef.
jeromelanteri which one should do the best helper worker ?
readline vs linenoise
parv jeromelanteri, i haven't used either much..
jeromelanteri ok
go for readline
parv somebody else would have to chime in about that.
aye 07:48
moritz parv: proto mysub(|) { my $result = {*}; die "I don't like result $result" unless $result == 42; return $result }
parv perl6-(linenoise|readline) might be those modules (speculating here) 07:48
jeromelanteri by zef then...
parv, ok, history works (no completion i think, but np, that's fine). 07:50
parv jeromelanteri, yeah with python (2.7), perl [56] history is all care about. mostly. completion would be good but i am not going to put any extra effort to get that. 07:51
jeromelanteri parv, for test code for me, it help a lot. 07:53
parv might have seen REPL completion mentioned per fuzzy memory. 07:56
zengargoyle when do you actually need to nuke everything and start from scratch? 08:06
jeromelanteri: linenoise is self contained and has liberal license for inclusion in projects, readline is GNU readline and requries library to be installed and is GPL license. readline is better (i think) if you already use/know other readline using programs. 08:07
zengargoyle *hates* gnome-terminal. it maps touchpad scroll to up/down arrow/history and there's no way to turn it off. grr. 08:08
parv sings: xterm, xterm, xterm. rainbow xterm. multitude of xterm. X TERM! 08:09
zengargoyle parv: have you figured out how to get full unicode ttf support in xterm? 08:11
tinita nine, jeromelanteri or you could even have a look at github.com/yaml/yaml-perl6
zengargoyle only goog thing about gnome-terminal (other libvte based terminals) is cairo and full fallback font matching. 08:12
tinita i posted this a couple of weeks ago, but so far got no feedback at all
parv zengargoyle, i have not tried printing of unicode in xterm much. last time i did send the output to a file; opened the file in Firefox to see the glory that is unicode emoji 08:14
zengargoyle ah, i type Japanese enough and weird stuff enough that xterm just doesn't do font picking well enough. 08:15
i used xterm and the fixed font (with pretty decent unicode supprt) for ages, but with HiDPI monitor the Xfonts are *way* too small to be usable (and non-scalable). i'm constantly looking for better solutions than libvte terminals that look good but behave bad... :) 08:18
parv zengargoyle, there are (at least) two font options in xterm, one of them is for wide characters. Does setting that option for japanese font help you?
zengargoyle not good enough, it needs to do fontconfig like fallback. it's impossible to have a single .ttf that covers unicode. 08:19
parv zengargoyle, set the truetype font which can be scaled (14-32+)
zengargoyle setting -fa and -fd with decent options still leaves lots of holes. 08:20
zengargoyle the problem to me it that xterm only uses 2 font files. 08:20
parv yeah, sorry 8-[
zengargoyle gnome-terminal/browser/other things do a lookup that pretty much tries every font you have...
parv 3rd D: twitter.com/jonnysun/status/888849874631802880 08:24
jeromelanteri tinita, zengargoyle yes, thank you, i do use readline because of two reason you give. And yes, i do look at yaml-perl6 to. thnak you 08:53
and how to test if something is a has ? .WHAT show that, but something like .isa-hash (true or false) ? 08:54
is a hash 08:55
zengargoyle m: say so { foo => 'bar' } ~~ Hash
camelia True
zengargoyle m: my %x = foo => 'bar'; say %h;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%h' is not declared
at <tmp>:1
------> 3my %x = foo => 'bar'; say 7⏏5%h;
zengargoyle m: my %x = foo => 'bar'; say %x;
camelia {foo => bar}
zengargoyle m: my %x = foo => 'bar'; say %x; say so %x ~~ Hash 08:56
camelia {foo => bar}
True
jeromelanteri zengargoyle, well.. thank you
zengargoyle jeromelanteri: i think there's another way, but it boils down to matching vs the Type. 08:57
m: my %x = foo => 'bar'; my $y = "woot"; say so Hash.ACCEPTS(%x); say so Hash.ACCEPTS($y); 09:00
camelia True
False
zengargoyle jeromelanteri: the ~~ does something like that. 09:01
jeromelanteri zengargoyle, well, i like the first syntax, but which one the best for the code ? 09:03
if ~~ do that, then i just go for use it.
zengargoyle i'm pretty sure ~~ is the usual thing. 09:06
nine zengargoyle: what did you mean by that? "10:06 < zengargoyle> when do you actually need to nuke everything and start from scratch?" 09:10
zengargoyle nine: using rakudobrew, in the past, 'build moar' usually required re-installing modules. it seems now with zef it doesn't and things get re-compiled as needed. is there a case where nqp/moar/etc gets changed that *really* requires a nuke of moar-nom and re-install? 09:14
lizmat zengargoyle: haven't seen such a case just yet 09:16
nine zengargoyle: no, not ever.
zengargoyle ok, the question just happend to occur at the same time as the PERL6LIB and .../rakudobrew/lib/.precomp thing i had. otherwise i also haven't had to reinstall things in a long time. :) 09:18
nine zengargoyle: if an upgrade breaks something, that's a bug and we have to fix it. Users should never be required to reinstall modules. 09:22
zengargoyle cool, is there some way to trigger a re-precomp of everthing yet? i build on one system and rsync to another and would like to avoid the random delay when a module needs re-precomiled. 09:24
nine zengargoyle: I guess you could do something like for $repo.installed -> $dist { for $dist.meta<provides>.keys -> $module { require $module } } 09:27
zengargoyle nine: thanks, i'll try and remember to give it a shot the next time. 09:29
nine zengargoyle: this seems to do the trick: for $*REPO.repo-chain.grep(CompUnit::Repository::Installable) -> $repo { for $repo.installed -> $dist { for $dist.meta<provides>.keys -> $module { next if $module eq "Zef::CLI"; $repo.need(CompUnit::DependencySpecification.new(:short-name($module), :ver($dist.meta<ver>))) } } } 09:36
zengargoyle clips into my cool.p6 Q/A file. 09:43
faraco hey guys, I'm stuck at moar installation. I'm running ubuntu and rakudobrew is installed successfully. However when running `rakudobrew build moar`, I got connection reset by peer error. I don't think it is something with my connection since I can clone my other repos on Github. :o 10:25
faraco hmm, when I try to clone github.com/rakudo/rakudo.git instead of git://github.com/rakudo/rakudo.git that rakudobrew use, it works, but why? 10:29
pmurias faraco: can you git clone git://github.com/rakudo/rakudo.git from the command line? 10:52
faraco pmurias: I did try then, and still the same error. I instead manually patch the $GIT_PROTO in rakudobrew to use http instead of git:// and it works for me. 10:59
<faraco> pmurias: I did try then, and still the same error. I instead manually patch the $GIT_PROTO in rakudobrew to use http instead of git:// and it works for me. 11:00
oops
AlexDaniel is there any difference between “sub ($x) { … }” and “anon sub ($x) { … }” ? 11:58
moritz no 12:00
but with "anon" you can write a sub that knows its own name without it being installed into a symbol table 12:01
m: my $x = anon sub fany () { }; say $x.name
camelia fany
moritz m: my $x = anon sub fany () { }; say $x.name; say &fancy
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
fancy used at line 1
AlexDaniel thanks 12:03
moritz m: my $x = anon sub fancy () { }; say $x.name; say &fancy 13:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
fancy used at line 1
moritz (helps to acctually spell the name right to demonstrate that it doesn't work :-)
nadim rakudo people, I notice that dd $var, $var2 ... will output the name of the variable it is dumping automatically; can one get that information easilly? 13:12
yoleaux 23 Jul 2017 14:09Z <Zoffix> 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]
Zoffix m: my $var = 42; say "{.VAR.name} = $_" with $var
camelia $var = 42
moritz nadim: there's $var.VAR.name, but t's unreliable in the face of binding 13:13
m: my $var = 42; say $var.VAR.name; my $x := $var; say $x.VAR.name;
camelia $var
$var
raschipi m: my $var = 42; my $x := $var; dd $x.VAR.name; 13:14
camelia "\$var"
raschipi m: my $var = 42; my $x := $var; dd $x
camelia Int $var = 42
raschipi Well, as unreliable as the one he was aiming for.
nadim thanks moritz, i'll write that down somewhere to be integrated in my dumper 13:16
Zoffix: thanks for the answer about signature binding instead for list assignment
wamba m: say "aaanbbb".match( /a+ <( n )> b+ /).chunks 13:20
camelia (~ => nbbb)
perlpilot m: say "aaanbbb".match( / (a+) <( n )> (b+) /).chunks 13:25
camelia (0 => 「aaa」 ~ => n 1 => 「bbb」)
perlpilot weird
jeromelanteri first in perl6 is not equivalent of first in perl5. Then, what is equivament of first (in perl5) for perl6 ? 13:27
jeromelanteri perl5 code: $a = first { $_ eq "string" } @array; 13:28
perl6 => ?
jnthn What does first in Perl 5 do? 13:29
moritz jeromelanteri: $a = @array.first("string)
jeromelanteri: $a = @array.first("string")
jeromelanteri moritz, thank you 13:30
jeromelanteri moritz, can it be write like: $a = first @array, "string"; 13:31
moritz m: say first "a", ["a", "b", "c"] 13:32
camelia a
moritz jeromelanteri: you can do it like this
jeromelanteri moritz, yes, the second example you give, i like. 13:33
moritz jeromelanteri: docs.perl6.org/type/List#routine_first
perlpilot m: say first { $_ eq 'bar' }, <foo bar baz>; # Just like map, you need the comman in P6 13:34
camelia bar
perlpilot er comma
jeromelanteri perlpilot, so it is the same as perl5 (not far)
perlpilot essentially.
perlpilot
.oO( what would `first` do otherwise? )
13:35
jeromelanteri perlpilot, fine. I wasn't understand the API this way.
perlpilot, i thank it give the first of the list...
Skarsnik Hello
raschipi Hi 13:37
perlpilot jeromelanteri: btw, in P6, you can do things like my ($index,$value) = first { /a/ }, < foo bar baz >, :kv; 13:40
perlpilot jeromelanteri: (that should be in the docs that moritz linked you to, but I thought I'd mention it anyway) 13:41
jeromelanteri perlpilot, what is :kv ? 13:43
perlpilot, just reading the doc, that's ok, thank you 13:44
perlpilot jeromelanteri: see docs.perl6.org/language/subscripts#Adverbs 13:45
jeromelanteri fine 13:49
robertle m: say "1 2 3".subst(/(2)/, $0 + 1); "1 2 3" ~~ /(2)/; say "1 2 3".subst(/(2)/, $0 + 1) 13:55
camelia Use of Nil in numeric context
in block <unit> at <tmp> line 1
1 1 3
1 3 3
Zoffix m: say "1 2 3".subst(/(2)/, {$0 + 1}); "1 2 3" ~~ /(2)/; say "1 2 3".subst(/(2)/, {$0 + 1}) 13:56
camelia 1 3 3
1 3 3
robertle docs.perl6.org/routine/subst suggests that you can use the capturing $i in the second argument to subst, but apparently that is not the case. evaluation order?
eh? don't get it
what do the curlies do in there? 13:57
Zoffix robertle: the examples show a block. Is there any of them that use $0 and don't use a block?
robertle: create a Callable that's given as the second argument. In your version, you're giving the value of $0, which is Nil
robertle looking at it no, but that is surprising to me
right, so I was kinda onto something with the evaluation order
makes sense now
Zoffix robertle: there's no magic involved. You're just giving two arguments to a routine; it can't magically know that the variable you gave it needs to be thunked 13:58
robertle yeah, it is obvious once you know what's going on ;) 13:59
ilmari m: say "1 2 3".subst(/(2)/, * + 1)
yoleaux 20 Jul 2017 11:20Z <nwc10> ilmari: lunch!
camelia 1 3 3
robertle eh, now *that* does involve magic from where I stand. how does that work? 14:00
ilmari using * in an expression makes it a WhateverCode
Aaronepower Hello, is there anywhere with complete documentation of LWP::Simple? Or is there a better documented http library?
ilmari m: say (* + 42).WHAT
camelia (WhateverCode)
Skarsnik damn, could be cool if error like Use of uninitialized value of type Any in numeric context could tell wich variable xà 14:01
Skarsnik Aaronepower, did you try http::useragant? 14:02
Aaronepower Skarsnik: No, because it sounded like a library for handling the User-Agent header. :D 14:03
jeromelanteri can not import symbol EXPORT from add(add is a module add.pm6), because it already exists in this lexical scope (inside my main .pl6 file at line 6)
so there is something i not understand for import/export module.
at line 6 of main file, there is use add;
and in first line of y add.pm6, there is unit module add; 14:04
that's wrong ?
Geth doc: d54b95568f | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Str.pod6
Restructure .subst with Callables section

  - Merge the "Captures" and "Closure" sections, as they're the same
  - Provide more examples for using captures and the Match object
Zoffix robertle: no, that's still no magic. That's just WhateverCode, which is Rakudo's concise method of creating closures: docs.perl6.org/type/WhateverCode 14:06
jeromelanteri or does it mean that my package EXPORT::DEFAULT { should be unik ?
Zoffix jeromelanteri: please show your code. 14:07
jeromelanteri ok
Skarsnik Aaronepower, user agent refer to a http client I think, but it's more complete than lwp::simple 14:09
Zoffix Aaronepower: I tend to use WWW for off-the-cuff HTTP client needs 14:10
buggable: eco WWW
buggable Zoffix, WWW 'No-nonsense, simple HTTPS client with JSON decoder': github.com/zoffixznet/perl6-WWW 3 other matching results: modules.perl6.org/#q=WWW
jeromelanteri gist.github.com/jerome-diver/a00c8...636d79dc37 14:11
Zoffix jeromelanteri: just remove `my package EXPORT::DEFAULT {` and the closing brace for it 14:13
jeromelanteri: just adding `is export` trait to subs will make them exported by default. You generally don't need the `my package EXPORT::*` stuff unless you're doing something arcane 14:14
m: '/tmp/Foobaradd.pm6'.IO.spurt: 'unit module Foobaradd; sub bars is export { say "teh bars!" }'
camelia ( no output ) 14:15
Zoffix m: use lib </tmp>; use Foobaradd; bars
camelia ===SORRY!===
Failed to open dir: 13
jeromelanteri Zoffix, well... i totaly missunderstood this part, but ok, i will remove that from add.pm6 and check.pm6 and add is export for each function
Aaronepower Zoffix: Can you provide better examples of using WWW? The ones in the repo don't explain how to use multiple headers or send json.
jeromelanteri Zoffix, how to distingate (and then declare) a function who should onlt be used by the module himself and a public function ? 14:16
only
Zoffix jeromelanteri: by the module itself == that's default. public function == use `is export` trait 14:17
jeromelanteri Zoffix, clear. thank you.
Zoffix Aaronepower: headers would just be %(:Some<Custom-Header>, :Some-Other<Customer-Header>) 14:21
Aaronepower: for JSON; do you mean send it as POST request's body? Don't see how to do that off hand
moritz you probably have to encode it yourself first 14:22
Aaronepower Zoffix: That doesn't actually explain how to put in something like `Authorization: Bearer blah`.
nadim hi, I read an article some times ago that was either recommended by someone here or maybe listed in the Perl6 weekly; the article was about lazy evaluation, possibly smalltalk examples, and had a very nifty example about using the max length of something before one had it computed (while computing it actually), does this ring any bell?
Zoffix Aaronepower: headers would just be %(:Authorization("Bearer blah"))
moritz nadim: perl6.party/post/Perl-6-Seqs-Drugs...ll--Part-2 maybe? 14:23
Zoffix nadim: specifically this section: rakudo.party/post/Perl-6-Seqs-Drug...socount...
Zoffix & 14:24
[Coke] several xtest doc failures after recent commits. 14:25
nadim lol, that document is open in a tab and waiting to be read since two days back. weird, I was sure what I wrote was not a Perl or Perl6 text
Skarsnik moritz, did you have a look recently at svg-plot? 14:26
Aaronepower Zoffix: Is there anywhere that hosts pod documentation? 14:27
Zoffix Aaronepower: pod documentation to what? 14:28
Aaronepower Zoffix: To any modules hosted. For example HTTP::UserAgent?
Zoffix Aaronepower: I think modules.zef.pm used to. Though there's a 500 error now: modules.zef.pm/search?terms=HTTP%3A%3AUserAgent 14:29
.tell tony-o any idea why modules.zef.pm is puking a rainbow? modules.zef.pm/search?terms=HTTP%3A%3AUserAgent
yoleaux Zoffix: I'll pass your message to tony-o.
Zoffix Aaronepower: I think p6doc can display them; though that tool is a bit of a beta-quality 14:30
buggable: eco p6doc
buggable Zoffix, p6doc 'Perl 6 documentation (tools and docs)': github.com/perl6/doc
Zoffix (if you're using Rakudo Star, you should already have it installed)
Zoffix &&
Aaronepower yoleaux: It seems to give a 500 error on any search aswell.
Aaronepower Zoffix: How do you use it on a project? 14:42
Skarsnik here an example github.com/Skarsnik/fimstuff/blob/...nStuff.pm6 14:46
stmuk_ pl6anet.org/drop/rakudo-star-2017.07-RC2.tar.gz 15:09
araraloren gist.github.com/araraloren/22a2801...rver-p6-L9 15:13
This is a sample http server 15:14
araraloren Is there a way get result form the Supply except use a Channel 15:15
I tried use another tap on $out
But it is not working
or use whenever inside a supply
timotimo maybe you need to .share the supply 15:16
araraloren `start { supply { whenever $out -> $msg { } } } ` Do this before I emit the @r;
timotimo well, depends on whether it's an on-demand supply or a live one
araraloren .share ?
jnthn supply in void context does nothing 15:17
Maybe you want start react { whenever ... } ?
timotimo ah, yes, you have to .tap the result of the supply { } block or it never gets entered
araraloren use that replace Channel ? 15:18
I will try it
I update the code : gist.github.com/araraloren/22a2801...ver-p6-L32 15:33
Is this the right way? 15:34
jnthn, timotimo :)
really appreciate for the help
timotimo that doesn't seem right 15:39
you'd be closing every $res with every result of the supply, wouldn't you? 15:40
hm, so you use /add to put the operators in and then /addresult to get the result from adding the two operators?
araraloren yeah
right 15:41
timotimo oh, /add gives you a form and that submits to /addresult
araraloren yeah
And the **add server** is always running ..
timotimo if this were real-world code, you might want to associate requests and results to the add server 15:43
because as it stands you've got a little race
as in, if two users submit /add at the same time, one might get the result of the wrong request
araraloren yeah, this is only test 15:44
timotimo well, i'm not really sure i'd do it like this 15:45
araraloren you mean send the $res or $req to the server?
timotimo but it probably depends on what the server is supposed to do
because if you use the restart mechanism, then it'll be somewhat like an event loop anyway
timotimo hmm. i think i like the channel approach better that you had 15:46
araraloren Hmm 15:46
timotimo what i meant with associate is you could send the original request (only the two operators would be enough) back with the results and only use the result that matches your requested operands 15:47
araraloren Hmm, but how I know the server is work out the request ? 15:48
In this example
The sub pass to route would not exit before the result return from server 15:49
s/would/should/
Then again, seems like have to use Channel .. 15:51
:/
timotimo mhm 15:54
araraloren If there are some Async http server sample, it will be better. XD 15:56
araraloren Night, it's time for bed 15:56
timotimo gnite! 15:57
araraloren :) Thanks anyway have a good day 15:58
Juerd Is there a way to assign to $!foo if you have only a string $x = "foo"? I.e. is there a way to refer to private attributes by name? 16:15
raschipi Juerd: If you want it proper, go with a Hash. There is a way, but you probably don't want to do that. 16:19
Juerd Basically I need to replace an object with updated information from a json file 16:21
It was originally created with ::($class).new(|%hash)
And at some point, there's a new hash, and the existing object needs updating
So I'm curious... what is that way? :) 16:22
raschipi m: my $a_var = 42; my $b_var = "a_var"; $::($b_var) = 23; say $a_var; 16:23
camelia 23
Juerd But what's the syntax for use with twigils?
raschipi m: my $a_var = 42; $::("a_var")= 5; say $a_var; 16:24
camelia 5
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; $::("!$attr") = 43; say $.bar } }; Foo.new.update 16:25
camelia No such symbol ''
in method update at <tmp> line 1
in block <unit> at <tmp> line 1
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; $!::("$attr") = 43; say $.bar } }; Foo.new.update
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 032; method update { my $attr = "bar"; $!:7⏏5:("$attr") = 43; say $.bar } }; Foo.new.
expecting any of:
colon pair
raschipi m: my @a_var = 42; @::("a_var")= 10; say @a_var;
camelia [10]
Juerd I don't have a 'my' though.
It's a 'has' 16:26
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; $."$attr" = 43; say $.bar } }; Foo.new.update 16:28
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. .lines
at <tmp>:1
------> 0342; method update { my $attr = "bar"; $.7⏏5"$attr" = 43; say $.bar } }; Foo.new.upd
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; $."$attr"() = 43; say $.bar } }; Foo.new.update 16:29
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $. variable; in Perl 6 please use the .kv method on e.g. .lines
at <tmp>:1
------> 0342; method update { my $attr = "bar"; $.7⏏5"$attr"() = 43; say $.bar } }; Foo.new.u
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; self."$attr"() = 43; say $.bar } }; Foo.new.update
camelia Cannot modify an immutable Int (42)
in method update at <tmp> line 1
in block <unit> at <tmp> line 1
raschipi And you want those available as fields of the object? 16:30
Juerd They already are. I have an existing code base that I'd like to give extra functionality.
geekosaur there's also some MOP stuff to get at attributes 16:31
Juerd I'm tempted to just slap "is rw" on everything :|
[Coke] the latest example committed to the Str type has a failure in the example, which is an actual bad example. Maybe we should turn these on by default.
Juerd m: class Foo { has $.bar = 42; method update { my $attr = "bar"; self!"$attr"() = 43; say $.bar } }; Foo.new.update 16:35
camelia No such private method '!!bar' for invocant of type 'Foo'. Did you mean 'bar'?
in method update at <tmp> line 1
in block <unit> at <tmp> line 1
Juerd Where does that second ! come from?
raschipi Juerd: You should look into the FALLBACK method and put the attributes into a Hash. 16:36
Juerd raschipi: I'll eval a string before I get rid of regular attributes. 16:38
raschipi So you need to look into the metamodel so that you can add and remove attributes at runtime.
Juerd I don't have to add attributes, I only need to change their values :)
andrss if there're a value of some type A and a another value of type B, and also .B method defined in A. is there a way of calling B methods on A objects? 16:40
raschipi Well, you can also get their names and bind a working variable to them.
Juerd andrss: I'm not sure if I understand your question, but maybe you're looking for docs.perl6.org/language/operators#...ethod_call 16:41
andrss aka. implicit conversions in Scala
Zoffix m: class Foo { has $.bar = 42; method !bar is rw { $!bar }; method update { my $attr = "bar"; self!"$attr"() = 43 } }; with Foo.new { .update; .bar.say } 16:42
camelia 43
jnthn m: class A { has $.x; has $.y; method update(*%updates) { self.BUILDALL((), %updates) } }; my $a = A.new(x => 1, y => 2); say $a; $a.update(x => 3, y => 4); say $a; $a.update(x => 5); say $a
camelia A.new(x => 1, y => 2)
A.new(x => 3, y => 4)
A.new(x => 5, y => 4)
Zoffix hah jnthn++
geekosaur andrss, if the point of .B is to provide a value of type B for a value of type A, you may want the handles trait? 16:43
otherwise I wonder if this is A(B) coercion stuff 16:44
Juerd jnthn: Thanks so much! I was just looking into the implementation of BUILDALL to see how it works, not realizing it could just be called again
andrss &prefix:<~> honors .Str method on object, right? 16:45
i wonder about more general case
[Coke] Zoffix: you added the word "thunking" in a recent doc patch. It's only used in a few places, defined as a noun, not as a verb in the glossary; can you perhaps rephrase that sentence? (and or expand the glossary entry and link to it?)
Zoffix andrss: yeah 16:46
andrss: though I'd say that's not guaranteed on Str objects (though it does call .Str on allomorphs)
s: &prefix:<~>, \("") 16:47
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/2fb8...r.pm#L2794
Zoffix Rakudo calls .Str even then tho
Zoffix [Coke]: TBH, I think I'm just gonna stop committing to docs. 16:49
andrss s: &prefix<~>, Any
SourceBaby andrss, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ prefix used at line 6␤␤
Zoffix It's not helping me any, and any time I commit something I'm getting told to fix a typo or rephrase stuff, even after I thought we agreed that'll be done once a month during release time. 16:50
andrss m: class Foo { method Str { 'hi' }}; say(~Foo)
camelia hi
Zoffix If you want stellar commits at the cost of fewer contributors, be my guest.
Geth doc: 8ef3c500bd | (Zoffix Znet)++ | doc/Type/Str.pod6
Revert "Restructure .subst with Callables section"

This reverts commit d54b95568f871c157651a47c265b943206786c8f.
16:51
andrss Zoffix: are you sure this chunk does it? I was expecting &prefix<~> defined for Any and doing $_.?Str 16:52
Zoffix andrss: you didn't use the bot correctly. It expects a Capture, not just a type 16:52
s: &prefix<~>, \(Any) 16:53
SourceBaby Zoffix, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ prefix used at line 6␤␤
Zoffix s: &prefix:<~>, \(Any)
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/2fb8...ngy.pm#L15
Zoffix buggable: eco sourcery
buggable Zoffix, CoreHackers::Sourcery 'Helper for showing actual source code locations of core subs and methods': github.com/zoffixznet/perl6-CoreHa...s-Sourcery
Zoffix ^ you can use that module to look up source locally.
Zoffix Though, don't assume a specific behaviour just because the source code shows it. What rakudo does doesn't define the language, the spec does. 16:54
andrss great feature. I would love it in the repl. Or as .^source
Zoffix -1 on that. Even without the feature people peek at the source and assume a specific behaviour and use undocumented/unspecced features, which makes it problematic for us to improve them later on 16:55
andrss so there's no possible general case for such conversions 16:58
Zoffix andrss: what? .Str? You can override .Str method to define how your object is stringified (and .gist if you want say() to stringify differently) 17:00
That happens for all objects, other than Str
m: class Foo { method Str { "
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"'
at <tmp>:1
------> 3class Foo { method Str { "7⏏5<EOL>
expecting any of:
double quotes
term
Zoffix oops
andrss I understand that. But what if it's not Str but some arbitrary class 17:01
[Coke] Zoffix: so is there a better way to give you feedback on the actual text?
Zoffix m: class Foo { method Str { "teh Str" }; method gist { "teh gist" }; method Numeric { 42 } }; dd [+$_, ~$_, ] with Foo.new
camelia [42, "teh Str"]
Zoffix m: class Foo { method Str { "teh Str" }; method gist { "teh gist" }; method Numeric { 42 } }; .say with Foo.new
camelia teh gist
Zoffix andrss: yeah, what I'm saying is that's the method to define on arbitrary classes. 17:02
[Coke] I get your stance on examples, whitespace, etc., which is why none of those were specifically addressed to you.
andrss m: class A { method B { B.new }}; class B {}; sub foo(B:D $b) { say "hi" }; foo(A.new)
camelia 5===SORRY!5=== Error while compiling <tmp>
Illegally post-declared type:
B used at line 1
Zoffix m: class B {…}; class A { method B { B.new }}; class B {}; sub foo(B:D() $b) { say "hi" }; foo(A.new) 17:03
camelia Type check failed in binding to parameter '$b'; expected B but got A (A.new)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
andrss m: class B {};class A { method B { B.new }}; sub foo(B:D $b) { say "hi" }; foo(A.new)
camelia Type check failed in binding to parameter '$b'; expected B but got A (A.new)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix m: class B {…}; class A { method B { B.new }}; class B {}; sub foo(B() $b) { say "hi" }; foo(A.new)
camelia hi
Zoffix andrss: that works. Should work on B:D, but I guess that's a bug there
Filed as rt.perl.org/Ticket/Display.html?id=131791 17:05
And there are tentative plans to expand the coercer feature so that if `B() $b` where $b is `A` fails (which does it by calling .B on $b), to try `B.from-A($b)`. This way you could write, say sub (Foo(Int) $a) {...} and have it work, without having to augment core Int class to stick method Foo into it 17:07
likely not with that method name but this sort of mechanism
jnthn I thought it was just going to be the 1-arg constructor. :) 17:08
B.new($b)
That's what's mentioned in the design docs, anyways.
andrss m: class B {};class A { method B { B.new }}; sub foo(B(A) $b) { say "hi" }; foo(A.new) 17:09
camelia hi
andrss thanks. 17:09
still not implicit though
m: class B {};class A {}; augment class A { method B { B.new } }; sub foo(B(A) $b) { say "hi" }; foo(A.new) 17:10
camelia 5===SORRY!5=== Error while compiling <tmp>
augment not allowed without 'use MONKEY-TYPING'
at <tmp>:1
------> 3class B {};class A {}; augment class A7⏏5 { method B { B.new } }; sub foo(B(A) $b
expecting any of:
generic rol…
Zoffix jnthn: that makes more sense, yeah 17:11
andrss m: USE MONKEY-TYPING; class B {};class A {}; augment class A { method B { B.new } }; sub foo(B(A) $b) { say "hi" }; foo(A.new);
camelia 5===SORRY!5=== Error while compiling <tmp>
augment not allowed without 'use MONKEY-TYPING'
at <tmp>:1
------> 3; class B {};class A {}; augment class A7⏏5 { method B { B.new } }; sub foo(B(A) $b
expecting any of:
generic r…
Zoffix use not USE
andrss m: use MONKEY-TYPING; class B {};class A {}; augment class A { method B { B.new } }; sub foo(B(A) $b) { say "hi" }; foo(A.new); 17:12
camelia hi
Juerd github.com/Juerd/shalog/commit/5e9...5f50fe5fd3 # jnthn's BUILDALL suggestion works well. 17:32
And meh, I messed up that commit :( 17:33
Second hunk shouldn't be in it.
Geth doc: f99445fed6 | (Zoffix Znet)++ | doc/Type/Str.pod6
Revert "Revert "Restructure .subst with Callables section""

This reverts commit 8ef3c500bd82460d7bd6f2f7f9d9759154f908e9.
17:37
doc: 2b7895b8f0 | (Zoffix Znet)++ | doc/Type/Str.pod6
Make xtest pass
raschipi What would be an easy way to return itens from a list until one element matches a condition? 18:08
Juerd Bufs are hard to work with.
moritz raschipi: gather for @items { last if $condition; take $_ } 18:09
m: my @a = 1, 5, 3, 7, 8, 4, 10; say gather for @a { last if $_ > 6; take $_ } 18:10
camelia (1 5 3)
Juerd really wants buf literals and string operators :(
raschipi I really wanted a .head that accepted the same argument as .first, I think it would be useful (just a request)
moritz m: my @a = 1, 5, 3, 7, 8, 4, 10; say[^@a.first(*>=6, :k)] 18:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Use of non-subscript brackets after "say" where postfix is expected; please use whitespace before any arguments
at <tmp>:1
------> 3my @a = 1, 5, 3, 7, 8, 4, 10; say7⏏5[^@a.first(*>=6, :k)]
moritz m: my @a = 1, 5, 3, 7, 8, 4, 10; say @a[^@a.first(*>=6, :k)]
camelia (1 5 3)
moritz m: my @a = 1, 5, 3, 7, 8, 4, 10; say @a.grep({last if * >= 6; 1}) 18:12
camelia ()
moritz m: my @a = 1, 5, 3, 7, 8, 4, 10; say @a.grep({last if $_ >= 6; 1})
camelia (1 5 3)
raschipi Noice, that works beautifully. 18:14
TimToady m: my @a = 1, 5, 3, 7, 8, 4, 10; say @a ...^ * >= 6 18:22
camelia (1 5 3)
moritz TimToady: that's kinda scary
TimToady well, "return itens from a list until one element matches a condition" is pretty much the definition of the sequence operator 18:23
Zoffix TimToady: there's a PR for Version that waits what you think on it: github.com/rakudo/rakudo/pull/1118...-316624260 18:25
moritz TimToady: I realized that, but I've never used the series operator with an explicit generator
Zoffix m: say 1..4 ... 7..10 18:30
camelia (1 2 3 4 5 6 7 8 9 10)
Zoffix :)
m: say 1...4 ... 4...1 ... 1...4 ... 4...1 18:32
camelia (1 2 3 4 3 2 1 2 3 4 3 2 1)
TimToady Zoffix: commented on it 18:36
Zoffix Thanks.
[Coke] Zoffix++ 19:09
lizmat starts on the Perl 6 Weekly 19:29
stmuk_ lizmat: rakudo.org/2017/07/24/announce-raku...e-2017-07/ 19:32
lizmat stmuk_++
moritz stmuk_++ indeed 19:33
Zoffix stmuk_: the files are missing or something. I see Win64 turned up since the first email on the mailing list, but the .dmg is still missing. Still uploading? 19:34
stmuk_ yeah still building .. should be a matter of mins 19:35
Zoffix hehe. Test::When made into R*. 19:38
ZofBot: my plan for world domination is progressing!
I guess I should write a blog post about what that module is about and why people should use it. 19:39
lizmat doesn't understand the use case for github.com/moznion/p6-Object-Container 19:41
raschipi It's... a Hash, but slower? 19:43
Zoffix The docs say it's for DI, which I'm guessing Dependency Injection 19:44
Hashes aren't lazy
dha starts having pseudohash flashbacks
ufobat can i export a sub from a module that is not implemented, but imported into this module? 19:46
Geth_ perl6.org: b161043cc1 | (Steve Mynott)++ | 2 files
Rakudo Star 2017.07 release
19:48
El_Che lizmat: new rakudo linux pkgs for 2017.07 as well. New: support for freshly released fedora 26, eol of ubuntu 16.10 ( only 16.04lts and 17.04)
lizmat El_Che++
Zoffix m: '/tmp/foo42'.IO.mkdir; '/tmp/foo42/Foo.pm6'.IO.spurt: 'use Test; sub EXPORT { { "&is" => &is } }' 19:49
camelia Failed to open file /tmp/foo42/Foo.pm6: Not a directory
in block <unit> at <tmp> line 1
Zoffix m: '/tmp/foozzz42'.IO.mkdir; '/tmp/foozzz42/Foo.pm6'.IO.spurt: 'use Test; sub EXPORT { { "&is" => &is } }'
camelia ( no output )
Zoffix m: use lib </tmp/foozzz42>; use Foo; is 1, 1;
camelia ok 1 -
Zoffix ufobat: ^ yup 19:50
Zoffix &
stmuk_ ok mac dmg uploaded
b33r and Game of Thrones!
ufobat Zoffix, :) thank you 19:51
sub EXPORT "does" the same as package EXPORT::DEFAULT, right? 19:52
ufobat ahh found it in the documentation 19:53
if feels as if both approaches can do pretty much the same, why are there 2 versions of exporting? next to the simple "is export"? 19:54
Zoffix ufobat: that probably suggests they're not the same :) 20:06
lizmat ufobat: TIMTOWTDI ?
ufobat hah! so there is something that can just achived one way - or how are they not the same? 20:07
Zoffix ufobat: one thing the docs mention is: "Whereas UNIT::EXPORT packages deal with the named parameters passed to use, the EXPORT sub handles positional parameters." 20:08
ufobat AH! 20:09
thank you very much :)
lizmat El_Che: I'm lazy, where can your linux packages be found again ? 20:12
Zoffix huggable: deb
huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases
Zoffix lizmat: there ^
lizmat thank Zoffix++ El_Che++
El_Che is the naming discussion still going? My pkgs have a spanish type of name: perl6-rakudo-moarvm-debian8.7_20170700-01_amd64.deb 20:15
Juan Gonzalez de la Mancha de la Comunión Immaculada
ufobat i cant get the sub EXPORT working on my perl wich is 2017.06 *confused*
the package EXPORT::DEFAULT thingy works 20:16
Zoffix ufobat, what's the issue? 20:33
El_Che: yes, the naming discussion will go on until about a month before 6.d release
El_Che: comment on this thread: www.reddit.com/r/perl6/comments/6l...ed_rakudo/ 20:34
raschipi So, September. We just don't know which. 20:35
Zoffix No, this year, between September and December
And to remind: the current discussion is whether and with what to extend "Perl 6" name. There's not enough consensus to abandon that name entirely. 20:37
dha Can we just call it Fred and be done with it? 20:42
;-)
Zoffix Nope. 20:43
Why Fred? :) 20:44
[Coke] she was awesome on Angel.
lizmat
.oO( it's better than Lrep )
20:45
dha I'm probably making a Spike Milligan reference. Or I was subconsiously thinking of Amy Acker. You can never tell with me. :-)
DBeepBeep I'm having some trouble using a module I made. It's saying, "Cannot import symbol, SYMBOL, from MODULE because it already exists in this lexical scope. I can't find any information on what this means. 21:03
timotimo m: sub is { }; use Test
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot import symbol &is from Test, because it already exists in this lexical scope
at <tmp>:1
------> 3sub is { }; use Test7⏏5<EOL>
timotimo it means that something the module has in it would override something you already have in your code 21:04
timotimo m: use Test; use Test; 21:04
camelia ( no output )
timotimo interesting 21:05
zengargoyle wouldn't the second one be optimized away? 21:05
DBeepBeep I figured that's what the problem is, but I can't find any duplication besides a 'use v6;' 21:06
timotimo dunno
jnthn timotimo: It doesn't whine if the symbol you're installing is precisely the one that's already there
timotimo ah, right
that's what we "merge" things for
jnthn DBeepBeep: Maybe try before the use statement that errors something like BEGIN say SYMBOL.perl; to see what's already there 21:07
zengargoyle DBeepBeep: do you have your code up somewhere? did you figure out yesterday's testing question? 21:09
zengargoyle does anybody know... do you have to have a github account to use git: URLs? 21:11
zengargoyle re: backlog where rakudobrew was failing for someone when using git: but worked with https: URLx 21:12
geekosaur you don't, but I think https is preferred unless you are planning to push to a git: url
iirc
DBeepBeep zengargoyle: I can throw the code up on gitlab in a second 21:13
geekosaur and that kind of failure could be specifying auth incorrectly/inappropriately, or a proxy that only works for http/https, or anything in between
zengargoyle might have been a firewall or other blocking that caused that user a problem... rakudobrew uses the git: version.
yeah.
mspo you shouldn't push via git:// since it doesn't offer tls 21:16
git+ssh:// is okay
(although in that case just using ssh:// is fine)
zengargoyle rather than editing rakudobrew stuff to make it use https: i think it may have been possible to manually create the git_reference dir with https: clones ... but probably rakudobrew should use https: 21:18
geekosaur I was kinda including that in there, the point being more that the git protocol (with or without tls) is not optimal for pull-only
iirc
zengargoyle mspo: never thought about that....
geekosaur in addition to things like not always playing well with proxies and the like 21:19
zengargoyle i wonder why github doesn't put git+ssh: in their dropdown menu for cloning? 21:20
zengargoyle guess i always thought it would magically upgrade to secure. 21:21
[Coke] zengargoyle: you can get the ssh link if you click on the 'use SSH' link
mspo isn't git:// just for non-logged-in? 21:22
I thought it defaulted to https or ssh
zengargoyle the Clone with SSH link still shows git:
ah, nm, it's [email@hidden.address] 21:26
not git:
DBeepBeep zengargoyle: gitlab.com/nathanielchanning/Beep-Board 21:29
I'm trying to run it with 'perl6 -I lib/ t/Parser.t'
mspo zengargoyle: yeah that's gitolite-style hooks 21:33
ssh for encryption bit "common" user (git) with AA by shell scripts 21:34
although I would assume github is using ruby
zengargoyle looks like you can't do Beep-Tag::Parser and export a Beep-Tag grammar. 21:35
because the Beep-Tag grammar that you want to export collides with the Beep-Tag of Beep-Tag::Parser. 21:36
DBeepBeep I've tried switching the name of it, but I can try again
zengargoyle use-ok doesn't actually 'use' the module (i think)... add 'use Beep-Tag::Parser;' after the use-ok test. rename grammar to 'G' and remove is export; do Beep-Tag::Parser::G.new; and all your tests pass! :) 21:41
really i'm not sure about the clever naming and importing stuff but i can make it work by being a bit less clever. 21:42
zengargoyle but you can start from there and know it works and then go back and tweak things to make the usage easier? 21:43
DBeepBeep zengargoyle: Yep, thatnks 21:44
zengargoyle DBeepBeep: if you have it installed (it's from Perl 5, but likely you have it): prove -e 'perl6 -Ilib' t/Parser.t -v 21:47
zengargoyle is the regular testing thing (but i use just what you used often enough when printing out stuff while getting it to actually work :) ) 21:49
and you can give prove just 't' and it will runn all the .t tests when you add more. 21:51
DBeepBeep Okay, thanks
Juerd The first time running a program after upgrading Rakudo is scary. 21:53
Juerd A few seconds of suspense 21:53
zengargoyle DBeepBeep: i think it's using the same name for things. you can do 'grammar Beep-Tag-Parser is export' and 'use Beep-Tag::Parser' and just use 21:55
Beep-Tag-Parser.new;
zengargoyle Juerd: did you see nine's answer to my precomp question earlier? 21:57
Juerd zengargoyle: No 22:02
zengargoyle Juerd: gist.github.com/b0b5d2a468e2796833...a46a507c78 22:09
haven't tested, but probably works... :) 22:10
Juerd Ooh, this is like Jeopardy. I get to guess the question based on the answer? :)
"How can you precompile all installed modules?" 22:11
zengargoyle bingo!
zengargoyle is keeping a 'cool.p6' file that collects snippets of wizardry. hopefully, eventually, i'll clean it up and github it or make a fortune file out of it. 22:16
or channel the Z and make a bot. :) 22:17
Juerd Does anyone have an opinion about modules with horrible source code, in the ecosystem? 22:25
I'm considering releasing github.com/Juerd/shalog/blob/maste.../Prompt.pm as a separate module
Juerd Although it's horrific, it's useful, and I already have a second project that could benefit from it. 22:26
Hopefully in the future the horrible parts can be replaced
zengargoyle better than some of mine. :) we have :auth<> and :ver<> so anything is better than nothing. 22:29
zengargoyle has that lcp in cool.p6 already... 22:30
Juerd I copied it because I have no idea how it works
It's a bit too terse for me :) 22:31
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2017/07/24/...h-produce/ 22:33
zengargoyle i have a mostly done linear equation solver for balancing chemical formulas and a maze-solver laying around because i don't really know how they work. :P 22:34
(and i wanted to do multi-thread/proc for the maze but that wasn't finished at the time) 22:36
timotimo lizmat: there's a rendering bug (?) "a <a source release"
sorry, "source version" it says
lizmat checks 22:39
lizmat timotimo++ # fixed 22:40
timotimo hm, i'm not sure "made sure" (in the part about me) really fits 22:41
lizmat you mean, because this fix is not 100% sure to work ? 22:43
timotimo: ^^^ ?? 22:44
timotimo yeah 22:46
i think things can still crash and burn
but i think the case where it just continues reading bytecode from the newly installed file at incorrect offsets is gone
lizmat well, that's good enough for me now :-)
so I'm going to call it a day 22:47
"a day"
and good night!
timotimo OK
good night!
Zoffix__ lizmat++ #g good weekly
audiatorix Hey peeps 22:49
I've made a Discord server dedicated to perl (5 & 6). Is it okay to post an invite link? 22:50
I'd like to get some people involved 22:52
timotimo i don't think anybody would complain
audiatorix Anyone is free to join. Roles have to be added manually right now, but I am working on a bot (in perl 6 of course) to handle roles discord.gg/T2PN9nV 22:53
Sadly the module for Discord on the ecosystem is not perfect 22:54
Geth doc: be8b759937 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Str.pod6
Remove confusing base-10 mention

Resolves issue #1011.
I couldn't find an easy way to rephrase it so that it doesn't mention base 10 in a confusing way, but I figured that not mentioning the resulting base resolves the issue.
23:29