»ö« 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.
hythm_ right :) 00:00
Kaiepi evalable6, say \x10000..\x1FFFD 00:31
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/H0QMSP9bi0
Undeclared routines:
x10000 used at line 1
x1FFFD used at line 1
Kaiepi evalable6, / <[\x10000..\x1FFFD]> / 00:32
evalable6
Kaiepi odd
i can't use Cro::Uri on HEAD because i get this error: 00:33
===SORRY!=== Error while compiling /home/morfent/Documents/p6-PSBot/site#sources/C1872F8D5E3D16ECE82926420495D80ACBBB20C8 (Cro::Uri)
Illegal range endpoint in regex:
\x10000..\x1FFFD
also when i run the repl, i get this error: 00:34
bastille% perl6
I ran into a problem while trying to set up Linenoise: Unhandled exception: Wrong number of arguments passed; expected 1..1, but got 1
i'd make an issue but i'm not sure what exactly the problem is
Xliff \o 00:44
m: for 0…2 { LAST { say $_ + 1 }; .say } 00:45
camelia 0
1
2
3
Xliff my ($a, @a) = (0); @a = 0…3; $a = @a; say $a 00:47
evalable6 [0 1 2 3]
Kaiepi evalable6, 1..1 01:00
evalable6 WARNINGS for /tmp/FSWNHucAfX:
Useless use of ".." in expression "1..1" in sink context (line 1)
Kaiepi evalable6, say 1..1
evalable6 1..1
Kaiepi this hangs on the repl 01:01
evalable6, say $*VM.version 01:02
evalable6 v2018.12.45.ga.9.d.02578.a
Kaiepi never mind, everything hangs on the repl 01:03
guifa I can't for the life of me seem to find it right now. What's the way to catch method calls on an object for methods that don't exist? 01:19
sena_kun hmm, catch like in catch an exception or catch as override with some default one? 01:20
guifa the latter 01:21
sena_kun sigh. no idea then, sorry.
guifa For some strange reason, the method in an extended action isn't getting called, even though the extended grammar is definitely matching it. Trying to figure out what's going on =\ 01:22
lookatme_q check out the FALLBACK method
guifa lookatme_q: bingo, thanks! Sadly, didn't end up working (I mean, the FALLBACK did, just not working to help solve the issue lol) 01:29
guifa OMG I'm the biggest idiot. A missing comma that didn't get caught by the compiler 01:47
Xliff We've all been there, guifa 01:51
El_Che Commas are important: "OMG I'm the biggest, idiot". 01:53
less friendly :)
guifa Touché, El_Che, touché 01:54
El_Che :)
guifa This BF interpreter is seriously starting to fucking with my head. But I'll be damned if it's not going to be the coolest one ever hahahaha 01:55
guifa Things like MONKEY-TYPING will be limited to the file that includes them, yeah? 02:03
Xliff Yeah. 02:07
MONKEY-TYPING can even be limited to the specific block. 02:08
El_Che: You should get a stand-up show, buddy. ;)
guifa I'm going to show how new BF commands can be added by both augment and creating new grammar/action classes based off of the original, wanted to make sure MONKEY-TYPING wouldn't potentially allow things in other programs that it shouldn't. 02:10
Geth doc: f2303e9fdb | (JJ Merelo)++ | html/.htaccess
Changes rewrite rule to avoid encoding

This goes towards fixing #935. I'll reopen it if it does not, I can't test it locally.
Anyway, this is a hack that should probably be avoided at all costs. If we can't provide a meaningful page, we should simply eliminate it from the graph. I leave this issue open until that is fixed.
06:47
ufobat__ .tell alex-daniel done. it's deleted 06:55
yoleaux ufobat__: I'll pass your message to alex-daniel.
AlexDaniel . 07:19
AlexDaniel ufobat: I think you should have received something to confirm the transfer 07:22
ufobat AlexDaniel++ 07:33
done
AlexDaniel also github++ because this currently redirects: github.com/zoffixznet/perl6-Temp-Path 07:34
even though it was transferred to perl6-community-modules, then to me, and then to you :)
had to transfer it to myself because github doesn't allow transferring from an org to a personal account that is not yours… weird stuff
these redirects btw are not guaranteed to work for a long time, but usually they do :) 07:35
ufobat funny
i am going to fix it, ill put in on cpan
ufobat btw, i've got an question, all all the perl6-community-modules to be taken from someone? like a place where orphaned modules lie? 07:36
if so maybe that whould be written down somewhere
jmerelo ufobat: I think it is... 07:40
AlexDaniel ufobat: that's my understanding, but I'm not sure what the original goals for that org were 07:51
ufobat should we add this in the github organisation description? 08:19
AlexDaniel ufobat: yes, like what exactly? 08:24
moritz the original plan for perl6-community-modules was to have a convenient space where people could put modules where they didn't mind unmoderated contributions from the community 08:25
"I've put this code up, but if you want to improve it, go ahead"
ufobat "shelter for orphaned modules, please considder taking maintainership for one of the them"
unmoderated contribution.. vs PR 08:26
because contribution on GH is rather easy
AlexDaniel moritz: yeah, that sounds nice… but I don't think it works 08:27
moritz AlexDaniel: agreed
ufobat i think it just encourages "oh someone else will look after it"
like the coffee maschine at work ;)
AlexDaniel ufobat: fwiw I don't think we should add is-true and is-so at the same time 08:29
ufobat: one of them should go in, for sure, because `is $expr, *.so` is horrible :) 08:30
ufobat then choose one form :)
moritz wait, what are you trying to do? 08:31
AlexDaniel moritz: github.com/perl6-community-modules...-458854262
AlexDaniel oops, not that commment specifically, but the whole PR 08:31
ufobat issue 8 and 18 seem to be duplicates, and i've implemented both, but one are just an alias (more or less) 08:32
moritz you know that Test.pm6 uses "ok" and "nok" for the boolean tests?
AlexDaniel yes
ufobat moritz, it's testo, its the hot new shit :p
AlexDaniel ufobat: I think Zoffix forgot about the first ticket and accidentally created a new one
moritz just thought you might take some naming suggestions from established modules :) 08:33
ufobat i am happy with test, i dont need(like) testo, but one of zoffix other modules use Testo and do boolean tests with is $expression, *.not
and if the tests fail you're compeltly confused by the message that gets generated
moritz that's... brain-twisty :D
ufobat i want to fix this issue, with adding is-so/is-true
so is-so / is-not vs is-true / is-false? 08:35
moritz how about just naming them true and false?
"is-true" suggests "=== True" to me
and doesn't suggest that there is some kind of coercion to Bool going on 08:36
ufobat otoh: `is` in Test doesn't suggest that there is stringification going on either 08:37
you could also still call them `ok` or `nok` 08:38
I dont have the Testo-mindset, i don't care 08:39
if i need to pick i'd say for all tests something like `is-so-and-so` or `does-so-and-so` because it reads as if you're checking for something 08:44
ufobat .tell jmerelo i've got some questions, ping me if you have time :-) 08:47
yoleaux ufobat: I'll pass your message to jmerelo.
ravenousmoose_ As someone entirely new to Perl(6) and its community, I'm oddly surprised at the lack of emacs support. Am I missing something, or is there only perl6-mode/perl6-flycheck for the very basics of editor support? 08:51
I don't mind if the community sees no use in autocompletion/documentation support for any/all editors; I was simply wondering :-) 08:53
ufobat i am using emacs as well, and I am just not qualified to improve things :( 09:00
ravenousmoose_ ufobat: I feel the same way. I'm not familiar enough with either perl6 or emacs itself to improve on the current situation, but was wondering if it was any better than it seemed so far 09:11
Guess not, I'll make do with the actual documentation and just fiddling around then :) 09:12
ufobat there are other IDEs of course
ravenousmoose_ Yes, sure, and by no means am I an emacs zealot or anything, but I try to incorporate as much of my development work into emacs where I can 09:14
ufobat is there any convention for verions of modules? i usually have something like 1.0.3 but Temp::Path does 1.001006 10:05
cpan-p6 New module released to CPAN! Temp-Path (1.001007) by 03UFOBAT 10:20
AlexDaniel ravenousmoose_: maybe see github.com/perl6/user-experience/issues/19 10:27
ravenousmoose_: in my opinion, perl6-mode is pretty good at what it is
ravenousmoose_: yes, it's not IDE-like, but at least the highlighting is right 10:28
ravenousmoose_: in spacemacs there's a layer for perl 6 which is a bit better, I think: github.com/CodingSolo/spacemacs/co...f7ef8b815a 10:29
ok, that's a wrong link, but github.com/syl20bnr/spacemacs/commit/bb7e304e 10:30
there was no new spacemacs release in more than a year, so it's still not quite there… 10:31
but if you use spacemacs from develop branch then it should be fine
ravenousmoose AlexDaniel: I use my own config, but that did remind me I could use universal-ctags for some form of completion 10:32
Thanks for the heads-up, didn't think to check in with Spacemacs' layers if there was something 10:33
ufobat ravenousmoose_, if your ctags work pls tell me :-) i am intersted in that 11:34
cpan-p6 New module released to CPAN! App-Platform (0.4.3) by 03KAJI 12:07
tyil there's an bridge between Freenode's #perl6-discord and the Discord Raku community for those looking to test it out 13:28
if its stable for a week, and people here aren't against it, I'd like to bridge the discord community to this channel 13:29
cono tyil: what is the link for discord? 13:51
tyil give me a sec, it was posted to Reddit
discord.gg/gg2a3T6 13:52
cono: ^
cono thank you
cpan-p6 New module released to CPAN! Cro-WebSocket (0.8.0.1) by 03JNTHN 13:55
SmokeMachine m: class CX::A does X::Control {}; CONTROL { when CX::A { .resume } }; CX::A.new.throw 14:25
camelia Cannot find method 'sink': no method cache and no .^find_method
in block <unit> at <tmp> line 1
SmokeMachine Is that expected?
moritz not really 14:36
ufobat can i declare a subset to cover the :U case as well? 14:42
m: subset T of Str where * ~~ any("a", "b"); sub a(T :$t) { say $t }; sub b(T :$t) { a(:$t) }; b()
camelia Constraint type check failed in binding to parameter '$t'; expected T but got Str (Str)
in sub b at <tmp> line 1
in block <unit> at <tmp> line 1
ufobat m: subset T of Str where * ~~ any("a", "b"); sub a(Str :$t) { say $t }; sub b(Str :$t) { a(:$t) }; b() 14:42
camelia (Str)
ufobat or class type
MasterDuke ufobat: fwiw, i think `subset T of Str where * ~~ any("a", "b");` could be `subset T of Str where "a"|"b";` 14:46
hans_ rakudo: say "Hello y'all!" 16:12
camelia Hello y'all!
cfa 👋🏽 16:30
cfa { .a = <a b>; .b = <a b>; .&dd } given class { has $.a = SetHash.new; has $.b is rw = SetHash.new }.new; 16:34
evalable6 <anon|1>.new(a => SetHash.new("b","a"), b => $("a", "b"))
cfa that strikes me as a trap (store vs. assign on ro vs. rw method [or sub]) 16:35
thoughts?
m: for (BagHash, MixHash, SetHash) -> $h { { .a = <a b>; .b = <a b>; .&dd } given class { has $.a = $h.new; has $.b is rw = $h.new }.new }
camelia <anon|1>.new(a => ("b"=>1,"a"=>1).BagHash, b => $("a", "b"))
<anon|1>.new(a => ("a"=>1,"b"=>1).MixHash, b => $("a", "b"))
<anon|1>.new(a => SetHash.new("b","a"), b => $("a", "b"))
cfa same deal for all these mutable collections 16:36
the subtler version is actually: 16:37
m: { .a = <a b>.SetHash; .b = <a b>.SetHash; .&dd } given class { has $.a = SetHash.new; has $.b is rw = SetHash.new }.new;
camelia <anon|1>.new(a => SetHash.new(SetHash.new("a","b")), b => SetHash.new("a","b"))
cfa hi jmerelo 16:39
jmerelo cfa: hi! 16:41
yoleaux 08:47Z <ufobat> jmerelo: i've got some questions, ping me if you have time :-)
jmerelo .tell ufobat I'm back! 16:42
yoleaux jmerelo: I'll pass your message to ufobat.
pmurias jnthn: do we do anything crafty with .WHO when loading modules? 16:59
jnthn: modules put stuff in it during loading times right? but it then seems to gets overriden somehow 17:00
jnthn pmurias: Yes. :) 17:02
pmurias: Grep for resolve_repossession_conflicts
pmurias jnthn: thank you, completely forgot about it and was getting super confused 17:06
ufobat jmerelo, i am busy now, sorry :( maybe later 17:19
yoleaux 16:42Z <jmerelo> ufobat: I'm back!
melezhik Hi! What is the simplest way to define class constructor? 17:20
AlexDaniel melezhik: it depends, but a lot of the times TWEAK is the answer 17:21
it's not for creating your own constructor, but maybe that's not exactly what you need :)
melezhik yeah, AlexDaniel: probably is what I am looking for . Actually I need just class initializer 17:22
not even constructor
but tweak probably ok too
jmerelo ufobat: no problem, wherever.
lucs I'd like to pass a junction as a function argument, for example foo(1|2), but it turns out that that invokes foo(1), then foo(2). 18:32
Can it be done somehow?
jmerelo lucs: what's the signature of the function?
lucs jmerelo: I think that's what I'm trying to figure out :)
jmerelo m: sub foo( Junction $j ) { $j }; say foo( 1|2 ) 18:33
camelia any(1, 2)
jmerelo ^^^
lucs D'oh!
Thanks :)
jmerelo lucs: my pleasure :-)
lucs Um, could the signature specify for example "a junction of Int"? 18:34
pmurias jnthn: with just a 'use SomeModule' (from a precompiled piece of code) there shouldn't be any conflicts just repossession? 18:35
jmerelo lucs: you can use a where clause 18:37
lucs jmerelo: Trying... 18:38
m: sub foo( Junction $j where all($j) ~~ Int ) { $j }; say foo( 1|'a' ) # No cigar, but is it close? 18:44
camelia any(1, a)
jmerelo m: say all(3,'a') ~~ Int 18:45
camelia False
jmerelo m: my $j = 3|'a'; say all($j) ~~ Int
camelia True
jmerelo m: my $j = 3|'a'; say all(|$j) ~~ Int
camelia This type (Junction) does not support elems
in block <unit> at <tmp> line 1
jmerelo m: my $j = 3|'a'; say $j; say all(|$j) ~~ Int 18:46
camelia any(3, a)
This type (Junction) does not support elems
in block <unit> at <tmp> line 1
jmerelo m: my $j = 3|'a'; say $j; say all($j); say all($j) ~~ Int
camelia any(3, a)
all(any(3, a))
True
jmerelo m: my $j = 3|'a'; say $j; say all($j); say $j ~~ Int 18:47
camelia any(3, a)
all(any(3, a))
True
jmerelo lucs: you need to "all" an "any"
jnthn pmurias: I think that's right
jmerelo m: my $j = 3|'a'; say $j; say all($j); say $j == Int 18:48
camelia any(3, a)
Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'?
in block <unit> at <tmp> line 1

all(any(3, a))
lucs jmerelo: Now that you mention it, I think what I really need is "&" junction. 18:49
jmerelo lucs: maybe try StackOverflow? Can't think offhand how to fix it...
lucs jmerelo: OK, thanks for the ideas, I'll keep trying. 18:51
jmerelo lucs++ 18:53
pmurias ' 19:01
sorry
cfa any thoughts on the trap i mentioned earlier?
lucs jmerelo: You know what, coercing the output, in addition to making sense, does what I need: 19:13
m: sub foo( Junction $j where all($j) ~~ Int ) { so $j == 2 }; say foo( 1|2|'a' )
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
lucs m: sub foo( Junction $j where all($j) ~~ Int ) { so $j == 2 }; say foo( 1|3 ) 19:14
camelia False
lucs m: sub foo( Junction $j where all($j) ~~ Int ) { so $j == 2 }; say foo( 1|2 )
camelia True
lucs Also, looks like 'where $j ==' is sufficient (instead of 'where all($j) ==') 19:16
Er, ~~, not ==.
cfa you could do $j ~~ 2 instead of so $j == 2 too, i think? 19:17
m: say 1|3 ~~ 2; 1|2 ~~ 2; 19:18
camelia False
cfa m: say 1|3 ~~ 2; say 1|2 ~~ 2;
camelia False
True
lucs Yep, thanks.
cfa lucs: i don't think your type constraint it doing what you intend though 19:31
m: all(1|2).say
camelia all(any(1, 2))
cfa note that's all of any 19:32
m: say 'a'|'b'|'c' ~~ Int; say 'a'|'b'|'c'|1 ~~ Int; say all('a'|'b'|'c'|1) ~~ Int;
camelia False
True
True
cfa note the second and third statements are both true
lucs Hmm... 19:34
Ah, so the error I got when I had 'a' up there was occurring when the == operation was being attempted then, right? 19:36
cfa yeah, 19:37
m: 'a' == 2
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "'a' == 2" in sink context (line 1)
Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in block <unit> at <tmp> line 1
lucs Right
lucs I'll just forget about the signature for now -- it would have been nice to have, for code documenting reasons, but I'm not too worried about passing in the wrong type of arguments. 19:39
(I'll forget about the constraint part of the signature that is) 19:40
lucs Heh, turns out foo(1|2) is fine when the signature specifies that the argument is a Junction, but what if I sometimes want to have a "one-element junction", like foo(42). 19:48
I think I can do foo(42|Any), is that the way to go? 19:49
MasterDuke lucs: just another multi candidate 19:50
?
lucs Hmm... 19:51
Can I do that without having to clone the whole function body? 19:53
tobs m: multi f (Junction $j) { say $j }; multi f ($x) { samewith any($x) }; f(1|2); f(2) 19:55
camelia any(1, 2)
any(2)
tobs lucs: ^ although you have to decide which kind of junction a single thing should become
moritz if you want to accept either a junction or any single value, use Mu as the type constraint
lucs So many ideas, it's great :) 19:57
lucs tobs, moritz: both techniques work, thanks. 20:02
MasterDuke: Thanks to you too :) 20:03
moritz my pleasure 20:11
MasterDuke np 20:38
dant Is there a collection of useful p6 grammars? I often rewrite simple grammars for df output, /etc/hosts, git logs, etc. I'd prefer to contibute to an existing effort rather than duplicate it. 21:11
sena_kun I don't think there is one, but you can factor it out in a module and publish one. 21:21
lizmat dant: modules.perl6.org/search/?q=Grammar # perhaps a good start
cpan-p6 New module released to CPAN! Lumberjack-Application (0.0.7) by 03JSTOWE 21:49
Geth gtk-simple: 94036201c7 | (David Warring)++ | 2 files
bump CI Rakudo baseline for deps
22:46