»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
lookatme_q :) 00:29
benjikun howdy 00:31
lookatme_q benjikun, good morning 00:37
benjikun good 8:37PM :P
lookatme_q haha It's 8:37 am 00:38
benjikun opposites :P 00:52
lookatme_q: where are you from?
philippines, japan, china or something? 00:53
those are my guessed :3
*guesses
lookatme_q china 00:57
benjikun ah, cool 01:00
buggable New CPAN upload: Async-Command-0.0.2.tar.gz by MLDEVINE cpan.metacpan.org/authors/id/M/ML/...0.2.tar.gz 01:01
Elronnd is it possible to improve perl6 startup time? Maybe it can be compiled to native code? 01:19
lookatme_q yeah, I think one day it can 01:21
benjikun Elronnd: It's an ongoing WIP 01:22
timotimo compiling perl6 code to native code isn't worth a lot, since it's so dynamic. you really need run-time stats and such to know what's worth what
i mean pre-compiling perl6 the compiler and such to native assembly code ahead of time 01:23
we already do just-in-time compilation to x86_64 assembly
but that's famously not helpful for startup :)
benjikun is there an issue open for ongoing additions to improvements in startup time on rakudo/rakudo?
timotimo not sure if we create tickets for such broad topics 01:24
anyway, Elronnd, the more of your code is in modules, the faster your program will start up
Elronnd I just mean a literal hello world -- it takes a noticeable amount of time to startup 01:25
I had planned to port some of my shell utilities to perl6 to learn it -- those run almost instantly
timotimo yeah, 0.11 seconds for me
benjikun timotimo: There is one open on MoarVM for contributing to the task of creating executables in the future
seems equally broad 01:26
timotimo wasn't that just created yesterday?
benjikun not sure, just saw Zoffix link it
timotimo i don't mean to gatekeep or anything, just not sure if the ticket would be of much use? 01:27
Elronnd has anyone experimented with compiling to the jvm and then compiling that to native?
benjikun yeah idk
a discussion could help contributing to the idea is what I thought
timotimo hmm 01:28
benjikun Elronnd: there were hacky ways to do it a long time ago, but not that I know of as of recently
even then, it depended on stuff being installed still
geekosaur jvm rakudo's never been functional enough to be worth trying
timotimo it was quite functional at a few points in the past
those were before the 1.0 release, though, i believe
benjikun :/
timotimo are there compile-to-native-code jvm things that support invokedynamic? 01:29
geekosaur iirc it never recovered from the GLR
MasterDuke truffle supports it
but that's just part of nqp so far 01:30
timotimo OK, cool. people are working on a truffle backend
Zoffix huggable: compiled 01:31
huggable Zoffix, Is it possible to compile a Perl 6 program to a standalone executable? Not yet, but you can help make it happen: github.com/MoarVM/MoarVM/issues/875
Zoffix timotimo: no, the Issue has been there for 2 months. As for gatekeeping... Well, it's easier to link to an Issue that explains everything instead of writing a paragraph each time someone asks about it 01:32
And last time it was asked about was literally yesterday.
benjikun Yeah lol
timotimo well, i guess that's fair, then
benjikun it's asked about pretty frequently :P 01:33
Zoffix Damn. Thought I forgot about toaster results, and after 5 minutes of trying to get a VM up, I remembered toaster on HEAD doesn't even run due to R#2195 :P 01:40
synopsebot R#2195 [open]: github.com/rakudo/rakudo/issues/2195 [⚠ blocker ⚠] False positive throwage of "flattening of other hash reprs NYI"
MasterDuke github.com/perl6/nqp/tree/truffle the bottom of the readme shows how to build a binary image for the subtratevm for the truffle build. obviously not really useful yet, but the binary image do start very quickly
Zoffix awesome
MasterDuke anyone else using arch linux? i just installed the zef package, but it dies with `Could not find Zef::CLI at line 3 in: <...>` whenever i try to run it 02:01
Elronnd MasterDuke: it works for me 02:01
I ahd to add /usr/share/perl6/vendor/bin to my PATH before it would run, though 02:02
are you using aur?
MasterDuke yeha
*yeah
Elronnd huh 02:03
did you install rakudo or rakudo-star?
MasterDuke yep. i think it's just i forgot to add the path 02:05
Elronnd but it shouldn't even run in the first place if it's not in the path
MasterDuke oh, no, that was already part of my $PATH
Elronnd does zef-m work? 02:06
MasterDuke same 02:07
Elronnd try reinstalling 02:08
MasterDuke interesting, now `zef --version` gives `===SORRY!=== '/usr/share/perl6/vendor/short/34674DE0B49051C42E89F10D51FE788C3C3A3816' is a directory, cannot do '.open' on a directory` 02:09
Elronnd wat 02:10
benjikun try not installing it from AUR
build it
MasterDuke hm, that worked 02:14
benjikun building it?
MasterDuke yeah. but know will that zef know about the other modules installed from the aur...? 02:15
*now will
benjikun modules installed from AUR?
Perl6 modules?
MasterDuke yeah
benjikun are there Perl6 modules on AUR, lol
weird
MasterDuke seems like it does 02:16
benjikun I guess it checks precomp files or something in the perl6 directory 02:17
not sure
Elronnd benjikun: freebsd ports have a lot of perl (5) and python packages 02:42
benjikun haven't used freebsd 02:44
only openbsd/netbsd
SmokeMachine hi again! 02:49
benjikun howdy SmokeMachine :)
SmokeMachine I have a module named Red, that uses an module called Red::Traits that exports some trait_mod:<is> subs... how can I make Red export those too? 02:51
geekosaur painfully >.> 02:52
SmokeMachine benjikun: :)
geekosaur there' a lot of export machinery that's only conjectured at present; you get to create aliases in Red::EXPORTS to things in Red::Traits::EXPORTS, iirc
benjikun oof 02:53
geekosaur (those are packages)
SmokeMachine geekosaur: like that? its not working... glot.io/snippets/f3pm6viiz0 03:02
geekosaur no, not like that. somewhere in the docs is an explanation of how the EXPORT packages work; you will have to switch to the package and create entries 03:03
docs.perl6.org/language/modules#UNIT::EXPORT::* 03:05
you will need to mess with the packages directly; there is no machinery to do it for you
SmokeMachine geekosaur: this worked: glot.io/snippets/f3pm6viiz0 03:14
thanks 03:15
benjikun join #wallstreetbets 03:47
oops
ignore that, lol
ownTheLibs amp.tomshardware.com/news/x86-hidd...37582.html 04:38
wbn any way to type-constrain arrays so that all the elements are of one type? 05:10
benjikun m: my Int @a = 1, 2, 3; 05:11
camelia ( no output )
benjikun m: my Int @a = 1, 2, 'a'; 05:12
camelia Type check failed in assignment to @a; expected Int but got Str ("a")
in block <unit> at <tmp> line 1
geekosaur if it doesn't work to just type it (e.g. my Int @foo), then a where can do it
wbn great
ok
ty 05:13
benjikun np
jmerelo releasable6: status 07:38
releasable6 jmerelo, Next release in ≈8 days and ≈11 hours. 4 blockers. 81 out of 391 commits logged (⚠ 9 warnings) 07:38
jmerelo, Details: gist.github.com/bea5d2f0a8fe9e264b...4daea01d32
petercommand what's the last unicode character in the topic? 08:16
I can't display it properly >_>
petercommand Or is it not supposed to display properly..@_@ 08:19
benjikun petercommand: It's a butterfly 08:20
the emoji one
petercommand benjikun: that's the first few charaters right? I am asking about the last character 08:21
this one
imgur.com/a/mvxyKkS
this is how it looks like on my screen 08:22
benjikun I'll give you a screenshot, sec
petercommand :D
benjikun my.mixtape.moe/wfuuga.png
petercommand benjikun: Oh.. 08:23
benjikun: wow, that's beautiful
benjikun lol
petercommand can't display it properly >_> 08:24
benjikun It's one of the later unicode versions 08:25
with all the emoji stuff
benjikun urxvt doesn't display it either :P 08:25
petercommand hmm, I have the font to display the butterfly emoji
in my web browser
I am using screen + irssi for my freenode connection 08:26
benjikun I see 08:27
I'm using urxvt + irssi
petercommand :3 08:28
Kaiepi regular hexchat here 08:34
if you install noto sans you can see the butterfly in urxvt 08:35
it just takes some extra configuration benjikun
jmerelo Kaiepi: I'll try that
petercommand hmm, I can display the butterfly properly without screen 08:40
masak .oO( how can you display anything without screen ) :P 08:42
petercommand hah
pmurias
.oO( you could display frustration if you don't have a screen )
08:46
Kaiepi it takes some configuration with urxvt to get it to show unicode properly 08:47
i can post my config if you want
perl6nopath on WIndows 7 installation without error reported, but:C:\Users\swbsend>\rakudo\bin\perl6 I ran into a problem while trying to set up Linenoise: Must specify something as a path: did you mean '.' for the current directory? Continuing without tab completions or line editor You may want to consider using rlwrap for simple line editor functionality To exit type 'exit' or '^D' > 08:47
benjikun Kaiepi: I want it 08:49
timotimo perl6nopath: i have to be AFK for a bit, but maybe someone else can help; how did you install Linenoise, and how did you try to "set it up"? i.e. did you enter anything in the perl6 shell before that message popped up? 08:51
Kaiepi this is my .Xresources hastebin.com/yecahuqibe.http
stmuk perl6nopath: yes it's a known error, now fixed by hoelzro++ 08:53
perl6nopath i jus downloaded the *.msi (last version) and the result (as shown) is the same wehter started from the menu or via cmd shell,
timotimo oh that was the forward slash and backwards slash business?
stmuk perl6nopath: I'm hoping to release a fixed version this weekend
timotimo: I think so github.com/hoelzro/p6-linenoise/issues/26
errr actually I may not be able to. Depends how easy backporting to 2018.06 is 08:54
timotimo github.com/rakudo/rakudo/commit/c3e1ec0bb8
it looks benign at first glance 08:55
stmuk yeah I think its ok
timotimo i mean, should be easy to apply
perl6nopath is there any perl 6 interpreter ? (not compiler) . I am using different versions of Strawberry perl and have also PADRE installed.
timotimo ok, BBL
benjikun thanks Kaiepi 08:56
Kaiepi np 08:57
stmuk really the moarvm based compiler is the only currently practical perl 6
perl6nopath thanks for the answers. may be better a wait a little. 09:03
timotimo: did not do anythig except installation. don't see any config file to fill, may be it must be created. but thats a bit difficult for a perl6 novice as he does not know. dont know what linenois is. may be ide/editor would prefer Padre, notepad++ or vi which is already on the system. 09:07
perl6nopath timotimo: by the way found: www.progville.com/c/linenoise-tiny...placement/ which explains linenoise 09:10
timotimo perl6nopath: in that case the message is harmless, it just means you won't be able to use arrow keys or similar in the REPL itself 09:14
perl6 will continue working, except i guess it won't find some of the modules? i'm not sure
petercommand Yay, I can display the butterfly properly now in my screen connection~
updated screen
Lasse_ Hi I try to follow building a SPA with CRO I'm stuck with Tipsy.t. How should I run it? I try perl6 Tipsy.t - But I only got response Could not find Tipsy at line 1. How should I trace and find Tipsy? 09:15
perl6nopath timotimo: no it does not work. no simple function available, not even help. only exit or ^D accepted which ends the program. 09:19
timotimo the perl6 repl doesn't have a "help" function, AFAIK 09:19
perl6nopath sorry, but have it still open what can i check else ? 09:20
timotimo well, the simplest thing is of course just: say "hello world"
i do most of my perl6 development in vim, specifically gvim 09:22
perl6nopath ok seems to work: > say "it works"; it works >
timotimo that's a good start
perl6nopath but how to integrate in IDE or editor . don't want to past alwasy may file content ? 09:23
timotimo of course
first step is usually to make sure perl6 is in the system's PATH 09:24
i.e. if you just open a cmd.exe and type "perl6", does it already give you the REPL?
stmuk the MSI installation should set the windows PATH
timotimo oh, nice
then, all you need to do is make your editor or ide call perl6 with the filename you're editing, or whatever script file it is you want to run 09:25
vim, for example, should allow something like :!perl6 %
pmurias would it make sense to have the windows MSI install linenoise?
timotimo pmurias: it does already
if you have a "lib/" folder with module stuff in it, you will also have to put a -I lib in front of the % 09:26
stmuk the problem was linenoise stopped working due to a new rakudo bug (now fixed)
perl6nopath no the PATH seems unchanged after installation:Path=C:\Oracle\11_64;C:\Oracle\11_64\bin;C:\Oracle\11_32;C:\Oracle\11_32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ OWS\System32\WindowsPowerShell\v1.0\ ;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Program Files\TortoiseSVN\bin;C:\Dwimperl\per n;C:\Dwimperl\perl\site\bin;C:\Dwimperl\c\bin; ;C:\Program Files (x86)\d.velop\d3client
no path to C:\rakudo\...... 09:27
stmuk even if you open a new cmd.exe after the MSI installation?
stmuk it certainly worked in the past 09:28
timotimo i mean, if you're setting up a command for your vim, like for example ":rp6" or so, you can set it up to use the full path, then you don't have to add it to PATH
stmuk perl6nopath: I think it asks you if you want to add to PATH in the installer so you may have clicked "No" 09:29
perl6nopath any idea for PADRE, i started installing V6 pacvkage, but that does not need got answer: Line 1: use V6; Syntax Check: Line 1:() Perl V6.0.0 required-- this is only v5.14.2, stopped 09:31
Lasse_ Thanks timotimo, you answered someone else but -I lib was the remedy for my problem too:) 09:32
timotimo cool, glad to help 09:33
perl6nopath i am reinstalling to check, there is an checkbox which i have not unchecked, and there are two lines what pathes have to or will be added (C:\rakudo\...) 09:37
stmuk yes the shorter PATH points to perl6 and the longer to the zef install directory 09:40
perl6nopath no the PATH is not changed, despite the checkbox, but i can do it manually. 09:42
stmuk even if you login and logout again? 09:44
I thought a new cmd.exe session picked up the new PATH but I'm not sure and don't use Windows much
logout/login I mean 09:45
perl6nopath stmuk: good idea, may be i try to logout/in 09:53
Ulti 􏿽xA7/win 2 09:54
:(
perl6nopath have just changed the PATH manually
perl6nopath manual cahnge was not helpful even if PATH changed, will logout and be back in a few moments. 09:59
Geth Pod-To-HTML: JJ++ created pull request #42:
After no-break space change problems with TOC generation
10:02
Geth Pod-To-HTML/master: 7 commits pushed by (JJ Merelo)++, (Juan Julián Merelo Guervós)++ 10:13
Geth doc: e5908559fe | (JJ Merelo)++ | htmlify.p6
Adds line break for space
10:17
doc: 257222a6dd | (JJ Merelo)++ | META6.json
Bumps up version requirement, refs #2245
rindolf hi all 11:27
Ulti .O/ 11:31
APic \o 11:34
masak /o 11:36
moritz |o| 11:38
pmurias \o/ 11:39
Ulti /O\ what have I done 11:51
perl6nopath after reboot the PATH is ok (extended) 12:17
perl6nopath vim /gvim works with !perl6 %, but PADRE has problems to find perl6 12:18
perl6nopath Error meggage in german : für dieses Dokument ist kein Ausführungsmodus definiert Application/x-perl6 (no execution mode defined....) 12:20
.. corr ... message..
masak perl6nopath: seems you're trying to run a Perl 6 script directly somehow, maybe by double-clicking on it? 12:21
perl6nopath: and there's no associated executable that will run them for you, for some reason
perl6nopath: though I guess you already installed Rakudo, so it's a little odd that there isn't 12:22
perl6nopath i checked the presets (expert -Mode) bur there only presets for perl5 and i can not add new ones for perl 6 ????
perl6nopath but never mind if there is no answer i will look for the special forum for PADRE. 12:23
masak perl6nopath: all I can share at this point is that I usually run scripts by typing `perl6 myscript` on the command line ;) 12:24
and that works well
perl6nopath ok, that's oviosly here the case too, as it runs from vi it will even run from commandline. will check. 12:26
yes it works from command line. 12:27
obviously , bad in typing today.
masak obviously ;) 12:29
stmuk I think you can use "assoc" and "ftype" to associate p6 with perl6 on windows 12:30
although I only read about it on stackoverflow rather than actually trying it
masak wow, that takes me back. I wonder if something like `assoc` didn't exist already back in the Windows 3.11 days. it feels familiar. 12:31
stmuk yes it probably hasn't changed that much yet (although I notice the "Classic Shell" windows maintainer was complaining about the recent rate of change on windows) 12:32
or more exactly former maintainer 12:34
masak .oO( he's an ex-maintainer. he has joined the choir invisible. if you hadn't nailed him to his chair he would've been pushing up the daisies ) 12:37
xinming Is it possible to write signature to something like sub t ($a, $b where { $b eq $a }) { } ? 13:08
What I mean is, the second arg has some rules according to $a 13:09
timotimo m: sub t ($a, $b where * eq $a) { say "yup" }; t("hi", "hi")
camelia yup
timotimo m: sub t ($a, $b where * eq $a) { say "yup" }; t("hi", "goodbye")
camelia Constraint type check failed in binding to parameter '$b'; expected anonymous constraint to be met but got Str ("goodbye")
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: sub t ($a, $b where { $a eq $b }) { say "yup" }; t("hi", "goodbye")
camelia Constraint type check failed in binding to parameter '$b'; expected anonymous constraint to be met but got Str ("goodbye")
in sub t at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo you can do it exactly like you wrote it :)
xinming ... 13:10
never thought that's possible. :-)
so powerful perl6 is
jnthn Can do it with defaults too :)
And yeah, signatures are pretty powerful :)
timotimo m: sub same-count(| where { .list == .hash }) { say "yup" }; same-count(); same-count(1, :hi); same-count(1, 2, 3, :hi, :bye, :food) 13:12
camelia yup
Odd number of elements found where hash initializer expected:
Only saw: 1
in sub same-count at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: sub same-count(| where .list == .hash) { say "yup" }; same-count(); same-count(1, :hi); same-count(1, 2, 3, :hi, :bye, :food)
camelia yup
Odd number of elements found where hash initializer expected:
Only saw: 1
in sub same-count at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo m: sub same-count(|c where c.list == c.hash) { say "yup" }; same-count(); same-count(1, :hi); same-count(1, 2, 3, :hi, :bye, :food)
camelia yup
yup
yup
timotimo m: sub same-count(|c where c.list == c.hash) { say "yup" }; say try same-count(1); say try same-count(1, :hi, :bye); say try same-count(1, 2, 3, :hi) 13:13
camelia Nil
Nil
Nil
timotimo ^- probably not useful, but fun
Zoffix buggable: toast 13:37
buggable Zoffix, Between 2018.06-404-g0b3fc07 and 2018.06: 29 (2.58%) modules got burnt; 45 (4.01%) got unsucced; 271 (24.13%) out of 1123 modules appear unusable. See toast.perl6.party/ for details.
Zoffix 271 now (was 311 before squashathon) 13:37
timotimo that still counts things with native dependencies as unusable, right? 13:38
Zoffix Currently yeah 13:39
timotimo there's 51 closed and 8 open issues with "native dependency" in ecosystem-unbitrot's issue tracker 13:40
Zoffix If someone collects the list of those deps, I can install them on the toaster VM so those dists get toasted too 13:54
Zoffix (the VM is Debian) 13:54
xelak m: run('ls'); 14:04
camelia run is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in sub run at src/RESTRICTED.setting line 14
in block <unit> at <tmp> line 1
xelak If I have something like '$*OUT=open("/tmp/foo.out", :w"); run("ls");', should the output of 'ls' be redirected to the file? 14:10
Currently, it does not. 14:11
timotimo correct, run does not use $*OUT by itself 14:14
in fact, if you don't pass anything for :out, it won't do any capturing at all
it will just inherit the stdio file descriptors
xelak Is this behavior intentional? When I do something similar in perl -e 'open(STDOUT, ">/tmp/foo.out"); system("ls");' the output will be redirected. 14:21
timotimo i have no opinion on that 14:27
Zoffix xelak: it's not exactly equivalent in that $*OUT isn't a global variable. It's dynamic and could have many threads, each writing to it's own $*OUT set to different handles. But there's just one STDOUT. By default run makes the process inherit the actual STDOUT. 14:28
xelak: you can give it $*OUT to write to: $*OUT=open("/tmp/foo.out", :w); run("ls", :out($*OUT)); 14:29
xelak: and I think the difference lies in that in Perl 6 you can't just rebind the actual STDOUT from within the program like you did in that Perl program.
Zoffix (unless NativeCall maybe?) 14:29
xelak Zoffix: I'm currently working on a fix for R#1882, and my question was more about that. My current solution uses a somehow a write to $*OUT in a certain case ... 14:33
synopsebot R#1882 [open]: github.com/rakudo/rakudo/issues/1882 [easy to resolve][good first issue] run(..., :$out, :merge) does not redirect stderr to the $out file handle
xelak elsif nqp::istype($out, Str) && $out eq '-' { @!pre-spawn.push({ $!proc.Supply(:bin).act: -> $buf { $*OUT.write($buf); }; }) if $merge; } 14:34
Zoffix: So how can I do a write to stdout then? 14:36
Zoffix xelak: isn't the bug that STDERR doesn't get written to the given IO::Handle? 14:37
So this conditional sets $!out to a merged pipe: github.com/rakudo/rakudo/blob/mast...m6#L51-L61 14:40
But it should check if $out is set to an IO::Handle, and if it is, then do `@!pre-spawn.push({ $!proc.bind-stdout: $out; $!proc.bind-stderr: $out });` and not do the rest of the things
At least in theory. I'm not familiar with proc guts 14:41
Like this I mean: gist.github.com/zoffixznet/782784e...6377b08952 14:43
Zoffix adds a missing semicolon to that diff 14:46
Zoffix m: IO::Handle.new(:path(IO::Special.new: "<STDOUT>")).open(:w).say: "meows" # FWIW, that's how you can get to the actual STDOUT 14:47
camelia IO::Handle is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method new at src/RESTRICTED.setting line 32
in block <unit> at <tmp> line 1
Zoffix e: IO::Handle.new(:path(IO::Special.new: "<STDOUT>")).open(:w).say: "meows" # FWIW, that's how you can get to the actual STDOUT
evalable6 meows
Zoffix $ ./perl6 -e 'with $*TMPDIR.add: "meows" { $ = run <<ls -la adfadsf>>, :out(.open: :w), :merge; .slurp.uc.say }' 14:56
LS: CANNOT ACCESS ADFADSF: NO SUCH FILE OR DIRECTORY
Seems to work
Zoffix I notice an LTA thing tho: passing wrong handle to :out/:err (e.g. open opened in read mode only) silently fails 15:00
Zoffix Filed as R#2197 15:06
synopsebot R#2197 [open]: github.com/rakudo/rakudo/issues/2197 [IO][LTA] LTA: giving Proc's :err wrongly-opened handle fails silently
xinming m: ulti t("c", $b) { "good".say; t("c", $b); }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say 15:25
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3ulti t("c", 7⏏5$b) { "good".say; t("c", $b); }; multi
xinming m: ulti t("c", $b) { "good".say; t("c", $b); }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$b' is not declared
at <tmp>:1
------> 3ulti t("c", 7⏏5$b) { "good".say; t("c", $b); }; multi
xinming m: multi t("c", $b) { "good".say; t("c", $b); }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say
camelia (timeout)good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good
good…
15:26
xinming I know this is a recursion, How can we call the "next" multi, which is second one?
so, we print "good", then, we call the default t
tobs xinming: nextsame, I think
m: multi t("c", $b) { "good".say; nextsame }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say
camelia good
c b default.
timotimo depends, do you want to call, or do you want to "goto" 15:27
i.e. anything after nextsame is dead code
timotimo BBL 15:28
tobs m: multi t("c", $b) { "good".say; nextsame; say "back" }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say 15:28
camelia good
c b default.
tobs m: multi t("c", $b) { "good".say; callsame; say "back" }; multi t ($a, $b) { "$a $b default." }; t("c", "b").say
camelia good
back
True
tobs m: multi t("c", $b) { "good".say; callsame; say "back" }; multi t ($a, $b) { "$a $b default.".say }; t("c", "b").say
camelia good
c b default.
back
True
xinming tobs: Thanks, that's what I want.
what is the difference between nextsame and callsame? 15:29
I'I think callsame will come back.
tobs as timotimo said, nextsame is like "goto". It jumps to next callee and never returns. 15:30
exactly
xinming and nextsame will go
Thanks.
can these 2 work with methods?
letmetry
let me try 15:31
m: class A { multi method t("c", $b) { "good".say; t("c", $b); }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b").say
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
t used at line 1
xinming m: class A { multi method t("c", $b) { "good".say; t("c", $b); }; multi method t ($a, $b) { "$a $b default." } }; 15:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
t used at line 1
xinming m: class A { multi method t("c", $b) { "good".say; callnext; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b")
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
callnext used at line 1
xinming m: class A { multi method t("c", $b) { "good".say; nexxtsame; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b") 15:33
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
nexxtsame used at line 1. Did you mean 'nextsame'?
xinming m: class A { multi method t("c", $b) { "good".say; nextsame; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b")
camelia good
xinming m: class A { multi method t("c", $b) { "good".say; nextsame "c", $b; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b")
camelia good
Too many positionals passed; expected 0 arguments but got 2
in method t at <tmp> line 1
in block <unit> at <tmp> line 1
xinming m: class A { multi method t("c", $b) { "good".say; callsame; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b")
camelia good
xinming m: class A { multi method t("c", $b) { "good".say; callsame; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b").say; 15:34
camelia good
c b default.
xinming m: class A { multi method t("c", $b) { "good".say; nextsame; }; multi method t ($a, $b) { "$a $b default." } }; A.new.t("c", "b").say;
camelia good
c b default.
xinming Worked.
lizmat waves from a ferry about to depart IJmuiden 15:39
diakopter here's hoping for cell signal on the water 15:42
andrzejku2 araraloren: hey 15:48
araraloren andrzejku2 have to go to bed now :)
lizmat diakopter: cell signal ?? Wifi all the way! (or so they claim) 15:50
Geth doc: 30b4d48d51 | (JJ Merelo)++ | doc/Language/faq.pod6
Some small, mainly typographic, changes to the FAQ
16:10
synopsebot Link: doc.perl6.org/language/faq
sarna_ o/ 16:26
can I pretty-print a custom object somehow?
jmerelo sarna_: you can define ".gist" for it. 16:26
Xliff sarna_: use Data::Dump::Tree; ddt $obj 16:27
sarna_ thanks jmerelo, Xliff :) 16:28
Xliff Or define a .gist, as jmerelo suggested.
jmerelo :-) 16:29
sarna_ Xliff: is ddt still actively maintained though? 16:30
johnjohn101 hi perl6 peeps 16:39
what is going on with all the spam here? does someone not like perl6?
moritz it's freenode wide 16:40
nothing to do with perl6, afaict
johnjohn101 oh ok
i can't wait to try perl 6 again... not sure what is keeping me from installing though 16:41
Xliff sarna_: I don't know. I don't see why not. 16:41
You can always fork it.
Xliff How can I get the sinatures for a multi? 16:44
Especially if I pass it a parameter.
sarna_ Xliff: because of this github.com/nkh/P6-Data-Dump-Tree/issues/46 and unmerged PRs
but yeah, it's forkable
lichtkind lizmat cheers , how can i search perl 6 modules on cpan? 16:45
lizmat modules.perl6.org
lichtkind lizmat, thanks that i know i just thought i overlooked something on metacpan 16:49
lizmat yeah, you won't find Perl 6 modules on MetaCPAN :-( 16:49
Altreus in order to have sensible type constraints that don't risk resulting in a circular dependency it seems the right way to do that is use a role for the type, and then independently implement that role in a real class somewhere, and then only use the class when needed. But this means I either have role The::Type::Role and class The::Type, or role The::Type and class The::Type::Class 16:54
this seems wonky
anyone got any good advice on naming these things?
Geth doc: MorayJ++ created pull request #2252:
Any list clarity
16:57
Xliff \o/ 16:58
First demo of my GTK project is working.
moritz Altreus: typically, role names are more abstract than class names 17:04
for example, a class maybe a Tree, but the type constraint you need for a depth-first traversal is Traversable, no Tree or Treeish 17:05
timotimo Treeable
moritz and it typically makes sense to ask yourself "what role do I care about for this particular method?" rather than defaulting to the class itself as a type constraint 17:06
timotimo TreeShared 17:08
Xliff How can I get the signatures for a given multi method?
^signatures?
xinming m: my %h = (a => "b", c => "d"); %h.push: :^C"f"); %h.perl.say;
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3my %h = (a => "b", c => "d"); %h.push: :7⏏5^C"f"); %h.perl.say;
expecting any of:
colon pair
17:09
moritz xinming: .candidates.map(*.signature)
xinming m: my %h = (a => "b", c => "d"); %h.push: :e("f"); %h.perl.say;
camelia {:a("b"), :c("d")}
moritz m: my %h; say %h.^lookup('push').candidates.map(*.signature)
camelia ((Hash: + is raw, *%_))
xinming Is there other way to add pair to hash? 17:10
%h = (%h, :e("f")); will what I want.
I'm trying to see if we have "append" kind of method
%h<e> = "f"; will also do.
but is there a way to add pair to %hash? 17:11
jnthn m: my %h = :a<b>; %h ,= :e<f>; say %h
camelia {a => b, e => f}
Geth doc: uzluisf++ created pull request #2253:
Add some small advise about module's update
jnthn , is just an infix operator, so like += saves repeating something with + then ,= saves repeating it with , :)
dinner & 17:12
Geth doc: f2f3991a84 | (Luis F. Uceta)++ | doc/Language/modules.pod6
Add some small advise about module's update

This seems pretty obvious (after you know it) but I learned it the hard way after struggling for half an hour.
synopsebot Link: doc.perl6.org/language/modules
doc: 3de86208d8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Merge pull request #2253 from uzluisf/master

Add some small advise about module's update
xinming Ok, never thought , can be an operator. 17:14
Xliff OK. I can still not get a list of candidates from a method.
lizmat m: my $a = 42; dd $a; $a .= Str; dd $a
camelia Int $a = 42
Str $a = "42"
Xliff I have 3 multi methods on "add". one is (-->Supply), and two others are (GtkWidget) and (GTK::Widget). If I do: "$box.add.candidates", it tells me it can't run candidates method on a supply. 17:15
geekosaur doesn't there need to be a & in there so you're speaking of the method and not its result? 17:16
Xliff Lemme check.
geekosaur although I think methods aren't currently convenient that way, may need to do something like .^find_method 17:17
xinming when I upgraded rakudo, I got Type check failed for return value; expected CompUnit::Handle:D error
xinming How do we force perl6 modules to be rebuilt? 17:17
Zoffix Xliff: look back at moritz's code. His had ".^lookup..." bit in it
You're just calling .candidates on the return value of the method call
geekosaur right, I see that in scrollback now 17:18
El_Che xinming: I run my script with -Ilib in de module dir of the module
so changes are picked up
El_Che no need to install it 17:18
xinming El_Che: But what if the rakudo is upgraded?
Xliff OK, so I have these candidates: 17:19
((GTK::Container: *%_) (GTK::Container: GTK::Raw::Types::GtkWidget $widget, *%_) (GTK::Container: GTK::Widget $widget, *%_))
El_Che it will regenerate the sha1 dir
Zoffix xinming: yeah, there might be more warts currently being ironed out on new work (R#2196) You need to use a tested release if you want stability.
synopsebot R#2196 [open]: github.com/rakudo/rakudo/issues/2196 [⚠ blocker ⚠] 2018-08-10 Toast results / 29 burns
xinming I'll remove the ~/.perl6 and try
Xliff For the "add" method.
Zoffix xinming: modules get updated by themselves on upgrade
Zoffix xinming: I mean.. what do you mean by "rebuilt"? They'll get recompiled on their own. 17:19
Xliff No matter what I want to do, the first method in the list is checked.
xinming Ok, so, seems that's the bug in rakudo
Xliff s/checked/used/ 17:19
xinming I'm using newest rakudo. :-)
Xliff Do I need to move that method further down the class method order to get the other two to be checked, first? 17:20
Zoffix xinming: newest is 2018.06 :)
geekosaur Xliff, I think currently iorder matters, for speed, you want the ore specific ones first
Zoffix Xliff: they take entirely different arguments tho. The first one takes no positionals, but later two do.
xinming the masterbranch
will wait for 2018.07 released
downgrading now.
Zoffix xinming: 2018.08. The .07 was skipped
Xliff Zoffix: I get that, but everytime I use a parameter, I don't get the expected behavior. 17:21
Zoffix Xliff: isn't that's because the first candidate doesn't take any positional arguments, so naturally if you do provide one, the first candidate won't be used? 17:22
Xliff: oh, misread, nm
Xliff: just make signature more specific than the other two candidates 17:23
or less specific
Xliff Yes, but the method I want is never called. Specificity regardless. 17:27
Zoffix Xliff: sounds like you didn't get specificity right :) 17:29
Zoffix Xliff: what's the actual signatures after you use a parameter for the first candidate? 17:31
xinming Zoffix: The 2018.08 is still not tagged. :-) 17:33
Zoffix xinming: it's not released
releasable6: status
releasable6 Zoffix, Next release in ≈8 days and ≈1 hour. 4 blockers. 81 out of 404 commits logged (⚠ 9 warnings)
Zoffix, Details: gist.github.com/11c5f2f9f3c5f13b30...4641d42c1f
Zoffix Won't be for another ~8 days
Xliff Zoffix: add takes one parameter or none. 17:38
Xliff The difference between the one parameter version is the type. 17:38
xinming Type check failed for return value; expected CompUnit::Handle:D but got Nil (Nil) <--- What might this be caused?
xinming the master branch 17:39
Zoffix xinming: return spesh plugin probably: github.com/rakudo/rakudo/commit/dc...bd8a4de9a3
mst fairly to open a file containing code?
*failure
xinming I don't know, I just run 'cro run' to test things. :-) 17:40
Zoffix :D was meant to block Nil and Failures, but people used it as if it meant not to and before the plugin merge it didn't, so now it does, and causes that crash 17:41
colabti.org/irclogger/irclogger_log...08-10#l303 17:42
xinming Any fix for this?
Zoffix "wait for jnthn to change the semantics"? :)
xinming Will wait. 17:43
Zoffix Or ask him how to change the code so you could help out?
Or golf the problem and write a test for it. That's also a lot of help.
xinming just read the code, I don't think I'm familiar with that enough to help. :-) 17:50
thundergnat m: say my $um = '🇬🇧 is not 🇧🇬'; say $um.flip; # This seems problematic 18:28
yoleaux 22 Jul 2018 15:21Z <AlexDaniel> thundergnat: thanks GH#2111
synopsebot GH#2111 [closed]: github.com/rakudo/rakudo/issues/2111 [regression] `please 'use experimental :pack'` even if code does exactly that
camelia 🇬🇧 is not 🇧🇬
🇬🇧 ton si 🇬🇧
[Coke] thundergnat: yup, that seems buggy. 18:29
m: "🇬🇧🇧🇬".flip.say 18:30
camelia 🇧🇬🇬🇧
[Coke] m: "🇬 🇧🇧🇬".flip.say
camelia 🇬🇧🇧 🇬
thundergnat Issue submitted: GH#2198 18:41
synopsebot GH#2198 [open]: github.com/rakudo/rakudo/issues/2198 The Regional Indicator Symbols seem to get mangled when flipped sometimes
AlexDaniel 6c: say my $um = '🇬🇧 is not 🇧🇬'; say $um.flip; 18:52
thundergnat: ↑ interesting, isn't it?
I mean ↓
committable6 AlexDaniel, gist.github.com/68fdbc3c75aba00672...4eaa72e73e
AlexDaniel bisect: say my $um = '🇬🇧 is not 🇧🇬'; say $um.flip;
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=ce5a011) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/053fb5a471e3a8fa15...b934723831
AlexDaniel, (2017-06-10) github.com/rakudo/rakudo/commit/56...41a406cfeb
AlexDaniel c: 56e71d5925e^,56e71d5925e say my $um = '🇬🇧 is not 🇧🇬'; say $um.flip; 18:53
committable6 AlexDaniel, ¦56e71d5925e^: «🇬🇧 is not 🇧🇬␤🇧🇬 ton si 🇬🇧␤» ¦56e71d5: «🇬🇧 is not 🇧🇬␤🇬🇧 ton si 🇬🇧␤»
AlexDaniel 6c: "🇬 🇧🇧🇬".flip.say; 18:54
committable6 AlexDaniel, gist.github.com/17c4b76c0b1c91ff8d...5c0ec3fec1
AlexDaniel thundergnat: what's the expected result in case №2 ? 18:55
AlexDaniel .tell samcv GH#2198 18:56
yoleaux AlexDaniel: I'll pass your message to samcv.
synopsebot GH#2198 [open]: github.com/rakudo/rakudo/issues/2198 [UNI][regression] The Regional Indicator Symbols seem to get mangled when flipped sometimes
thundergnat AlexDaniel: Um... That's why I commented that it might be a case of DIHWIDT. I'm not sure that when you actively abuse it, you shouldn't get nonsensical results. 18:58
The first one surprised me though
AlexDaniel thundergnat: because it's incorrect, yes
:)
it used to work… wish we noticed it earlier
thundergnat++ 18:59
xinming Is it possible to make zef to use socks5 proxy? 19:00
the GFW is blocking github.com which make zef always timeout trying to get content on github rawcontent
!!!> Failed to update cpan mirror: raw.githubusercontent.com/ugexe/Pe...cpan1.json 19:01
This is what I got when I try to install module today.
It works sometimes
colomon Am I correct in thinking -I no longer works to set the path to look for p6 libraries? 19:08
moritz it should 19:09
(though installed libraries are handled differently)
colomon … okay, now I have to scratch my head and wonder how I managed to do it wrong on my first few tries. 19:11
that attempt just worked, so progress!
Geth doc: fe6cdef6c0 | Moray++ | doc/Language/5to6-nutshell.pod6
Replace broken link with a new link

Replace www.perlfoundation.org/perl6/index....lta_tablet with docs.perl6.org/language/5to6-overview for tips on translating Perl 5 to Perl 6
19:28
synopsebot Link: doc.perl6.org/language/5to6-nutshell
doc: e31068d4a3 | MorayJ++ (committed using GitHub Web editor) | doc/Language/5to6-nutshell.pod6
Merge pull request #2251 from MorayJ/fix-minor-404

Replace broken link with a new link
Geth doc/master: 5 commits pushed by Moray++, (Zoffix Znet)++ 20:49
Geth doc: zoffixznet self-assigned Broken Any.list POD github.com/perl6/doc/issues/2254
8591eff146 | (Zoffix Znet)++ | doc/Type/Any.pod6

Closes github.com/perl6/doc/issues/2254 D#2254
20:51
synopsebot Link: doc.perl6.org/type/Any
synopsebot D#2254 [closed]: github.com/perl6/doc/issues/2254 [docs][easy to resolve] Broken Any.list POD
Geth doc: e08820abd8 | (Zoffix Znet)++ | doc/Type/Any.pod6
Make descriptions of .list/.hash more precise

  - Only *core* Positional/Associative types can be returned:
   Closes github.com/rakudo/rakudo/issues/2199 R#2199
  - Fix up remaining POD errors
  - Reduce prose on .hash and make it more equivalent to that on .list
20:57
synopsebot Link: doc.perl6.org/type/Any
synopsebot R#2199 [closed]: github.com/rakudo/rakudo/issues/2199 [question] .list/.hash can give any Positional/Associative, but core code has stricter assumptions
Geth modules.perl6.org: mienaikage++ created pull request #114:
Update donation URL
21:20
modules.perl6.org: 3b9c5ee0b2 | (Daniel Mita)++ (committed using GitHub Web editor) | templates/layouts/default.html.ep
Update donation URL

The page under the donate subdomain doesn't seem to be the correct place to go. Many of the links on the page lead to 404s.
21:21
modules.perl6.org: 589c6de615 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/layouts/default.html.ep
Merge pull request #114 from mienaikage/patch-1

Update donation URL
hahainternet so, 1/0 doesn't seem to generate a failure, just a rat, and the exception occurs when you include it in anything, but there's some weirdness as a result? 21:43
m: defined 1/0
camelia WARNINGS for <tmp>:
Useless use of "defined 1/0" in expression "defined 1/0" in sink context (line 1)
hahainternet m: say defined 1/0
camelia True
hahainternet etc
bit odd?
i get how it might work, but it's still weird to me :) 21:44
AlexDaniel hahainternet: you mean mathematically odd? That 1/0 is “defined”? 21:46
if it's not Nil then it is .defined, sure
hahainternet well, i'd expect 1/0 to generate a failure, which wouldn't be defined
as it stands, it's a defined rat, but you can't detect it's erroneous 21:47
AlexDaniel hahainternet: can you create a doc ticket about 1/0 Rats? 21:48
because docs.perl6.org/type/Rat doesn't even mention 1/0
hahainternet it does sorta: 21:49
Returns False if numerator is 0, otherwise returns True. This applies for <0/0> zero-denominator Rational as well, despite ?<0/0>.Num being True.
under the bool method
so yeah, it's actually weirder
m: say so 1/0; say so 0/0;
camelia True
False
AlexDaniel that's too far down
hahainternet true, but is that behaviour even reasonable?
i guess a numerator of 0 does imply the number is 0, but still smells 21:50
AlexDaniel hm, well, .Bool is for checking if something is non-zero 21:51
m: say so 0
camelia False
AlexDaniel m: say so 0.0
camelia False
AlexDaniel so it's sorta not related to division by zero
AlexDaniel so yeah, this isn't even about 1/0 Rats 21:52
hahainternet sure, i understand why, but i would like to know whether a rational will cause an exception when printed, i don't think i can find that out without explicitly checking denominator can i?
AlexDaniel and a doc ticket will help :) 21:52
hahainternet: generally if you want to handle exceptions you use try { } 21:53
hahainternet sure, it just seems a case where i'd expect a Failure and for it to be false
i'll sort out a ticket tomorrow, 11pm for me
AlexDaniel hahainternet: it's not a Failure, (1/0) is still a Rat 21:57
it only becomes a Failure when you do something with it
hahainternet AlexDaniel: i understand, and has a valid Num
but i can't predict it'll become a failure or test it can I? because it becomes an exception immediately? 21:58
i'd have to try/catch it, which i'm not opposed to
just learning
Elronnd is perl6intro.com/ recommended as a learning resource? 22:45
timotimo it's pretty good
Elronnd is there one better? 22:47
timotimo well, there's a couple of books 22:49
it really depends on how you learn best
Geth doc: mienaikage++ created pull request #2255:
Modify case in link to Finding_modules
23:02
Zoffix hahainternet: FWIW, Bool on Rats is a deliberate decision for how it works ATM 23:11
Zoffix hahainternet: and is there really a difference between doing if .denominator or if .some-other-method? 23:13
Geth doc: a04dd727b8 | (Daniel Mita)++ | 2 files
Modify case in link to Finding_modules
23:26
doc: f3ca3e7a49 | (Daniel Mita)++ (committed using GitHub Web editor) | 2 files
Merge pull request #2255 from mienaikage/finding-modules-link

Modify case in link to Finding_modules