»ö« 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.
Xliff DayMargin? 00:00
guifa hmm, what about 00:01
role Inexact { method margin ( —> Range) {…} } 00:02
Xliff Ah! Not bad! :)
Did you really need any help?
guifa Sometimes talking it out with someone else helps haha
So thanks for being that person :-) 00:03
guifa is actually kinda surprised that the ICU library doesn’t contemplate the errors in calendar conversion much, seems like a good way to make the P6 library even better
00:12 wildtrees left
Xliff :) 00:13
00:17 benjif joined, MilkmanDan left 00:25 MilkmanDan joined 00:34 benjif left 00:35 Black_Ribbon joined 00:38 d84 left 01:01 lucasb left 01:08 molaf left 01:20 MasterDuke left 01:21 ChoHag left, molaf joined 01:22 ChoHag joined
elcaro guifa: just playing around with a parameterized role: gist.github.com/0racle/c32fc7f9c11...f5cc389611 01:26
01:40 Actualeyes left, Actualeyes joined 01:50 AlexDani` joined 01:51 Kaiepi joined 01:54 AlexDaniel left 01:58 p9s```` left 02:20 squashable6 left 02:21 Cabanossi left 02:23 squashable6 joined, ChanServ sets mode: +v squashable6, Cabanossi joined 02:26 cpan-p6 left 02:27 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 02:39 benjif joined 02:58 hythm joined, epony left
hythm Is it possible to add a new enum value to an exisiting `Enum`? 02:59
I'm asking because I'm using a module that has enum `Loglevels`, and I want to add another loglevel 03:04
m: enum E < A B >; E.^add_enum_value: 'E' 03:09
camelia Cannot find method 'key' on object of type Str
in block <unit> at <tmp> line 1
hythm figured, enum E < A B >; E.^add_enum_value: 'C' => 2 03:11
03:28 softmoth left 03:42 stu002 joined 04:02 Black_Ribbon left
elcaro hythm: you might get a better response during U.S. daytime hours. In the mean time... 04:05
I tried this and it works, though it definitely feels like a hack job
my enum Levels « { my enum Levels < A B >; |Levels.enums.keys, < C > } »; say Levels.enums;
evalable6 Map.new((A => 0, B => 1, C => 2))
elcaro but that probably doesn't help much if your enum is being imported from another function :/
04:06 sno left
hythm eclaro, yeah I tired that at first but it did not work, I thin it became different Type and the imported module did not recognize it 04:07
I think I was able to do it with: ` enum E < A B >; E.^add_enum_value: 'C' => 2` 04:08
m: enum E < A B >; E.^add_enum_value: 'C' => 2
camelia ( no output )
hythm m: enum E < A B >; E.^add_enum_value: 'C' => 2; E.enums.say
camelia Map.new((A => 0, B => 1, C => 2))
hythm its documented here docs.perl6.org/type/Metamodel::EnumHOW 04:10
actually what I tried first was not exactly as you mentioned, but similar 04:12
04:26 hythm left 04:39 Doc_Holliwood joined 04:43 ZzZombo joined 04:46 reach_satori_ left
guifa elcaro: didn’t think about using parameterized, but that’s a great use case for it 04:47
(see this is why I think outloud on #perl haha)
05:06 jmerelo joined 05:08 ZzZombo left 05:09 ZzZombo joined
Geth_ doc/master: 4 commits pushed by (Greg Donald)++, (Juan Julián Merelo Guervós)++ 05:17
05:20 reach_satori joined 05:26 wamba joined 05:34 Doc_Holliwood left 05:35 macaronus joined
Geth_ doc: 423c94bd57 | (JJ Merelo)++ | doc/Type/Hash.pod6
Reflowing while revising #2632
05:45
synopsebot Link: doc.perl6.org/type/Hash
doc: 0a009349cb | (JJ Merelo)++ | doc/Type/Any.pod6
Adds examples of min working on Hashes #2632
synopsebot Link: doc.perl6.org/type/Any
doc: 19cbd79a20 | (JJ Merelo)++ | doc/Type/Any.pod6
Adds examples of max working on Hashes #2632
jmerelo If you want to work towards your Hacktoberfest tee, take a look at this issue in the documentation github.com/perl6/doc/issues/2632 there are lots of things that can be done, some of them very easy 05:46
06:13 webart left 06:14 ZzZombo_ joined 06:16 ZzZombo left, ZzZombo_ is now known as ZzZombo 06:29 wamba left 06:37 epony joined 06:46 reach_satori left 06:56 reach_satori joined 07:05 reach_satori left 07:06 wamba joined 07:10 krychu left 07:22 kensanata joined 07:27 molaf left 07:52 epony left 07:54 epony joined 08:00 zakharyas joined 08:09 dakkar joined 08:21 Cabanossi left 08:32 Cabanossi joined 08:36 ZzZombo_ joined 08:39 ZzZombo left, ZzZombo_ is now known as ZzZombo 08:44 stu002 left 08:46 ZzZombo_ joined 08:48 ZzZombo left, ZzZombo_ is now known as ZzZombo 09:03 molaf joined
ZzZombo Hello again, folks! Is there anything what can let you embed Perl 6 into other applications yet? 09:13
09:14 epony left
Xliff m: say 1350 / 270 09:14
camelia 5
Xliff m: say 1350 / 450
camelia 3
09:15 epony joined 09:19 reach_satori joined 09:20 pecastro joined 09:24 zakharyas left 09:26 zakharyas joined
SmokeMachine m: class C { method a { 1,2,3 }; method b { $.a }; method c { @.a } } 09:27
camelia ( no output )
SmokeMachine m: class C { method a { 1,2,3 }; method b { $.a }; method c { @.a } }; dd C.a; dd C.b; dd C.c
camelia (1, 2, 3)
$(1, 2, 3)
(1, 2, 3)
09:29 ZzZombo left
SmokeMachine .tell ugexe Hi, I'm thinking of PRing something like this on zef (it still is using `no precompilation` and I'll try to fiz that before PRing) that way I think it will be easier to use zef inside of other code... what do you think about that? github.com/FCO/zef/commit/1c95922a...b6d7c220e0 09:37
tellable6 SmokeMachine, I'll pass your message to ugexe
SmokeMachine s/fiz/fix/ 09:38
(again... :( )
09:51 rindolf5 joined 09:52 rindolf5 left
Xliff m: my @a = (0, 90, *+180 ... Inf); say @[^5] 09:57
camelia [0 1 2 3 4]
Xliff m: my @a = (0, 90, *+180 ... Inf); say @a[^5]
camelia (0 90 270 450 630)
lizmat Xliff: Method::Also 0.03 on its way to CPAN 10:00
Xliff lizmat++ 10:01
10:03 ZzZombo joined
cpan-p6 New module released to CPAN! Method::Also (0.0.3) by 03ELIZABETH 10:04
10:11 molaf left
Xliff m: my @a = (0, 90, *+180 ... Inf); say @a.first: * > 182 10:11
camelia 270
Xliff m: my @a = (0, 90, *+180 ... Inf); say @a.first: * > 182, :k
camelia 2
Xliff m: my @a = (0, 90, *+180 ... Inf); say @a.first: 182 > *, :k 10:16
camelia 0
10:23 reach_satori left 10:24 softmoth joined, AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
jmerelo SmokeMachine: zef hasn't changed too much in the last few months... I would say either go ahead and do the PR, or else create a fork with your PR included. 10:34
SmokeMachine: as a matter of fact, I've wanting to have that kind of thing for a really long time so that zef could be subclassed.
Xliff github.com/Xliff/p6-CardDeck 10:35
Installation instructions are on the project page. 10:36
They are just demos, though. For now.
jmerelo Xliff: can't you just install prerrequisites from the ecosystem?
Xliff: apart from that, nifty! 10:37
Xliff jmerelo: No.
jmerelo Xliff: but do you mean gtk itself, or also Pango and so on...
SmokeMachine jmerelo: yes, that would make 6pm much easier! :)
Xliff Because some of the prereq packages are NOT IN the ecosystem.
jmerelo: Pango, GtkPlus and Clutter
jmerelo: Check the instructions and let me know if they need work. 10:38
jmerelo Xliff: so you can't just go zef install Pango (after installing the gtk libraries...)
Xliff No.
SmokeMachine jmerelo: But I'll still try to remove the `no precompilation` before PRing...
jmerelo Xliff: I'll try to find the time...
Xliff And you need the native libs, too.
jmerelo: What distro?
jmerelo Xliff: I use Ubuntu.
Xliff OK. So do I. Let me update. 10:39
jmerelo SmokeMachine: librarifying zef would be A Good Thing. Keeping up with upstream might be a bit more difficult, but nothing that git can't handle. 10:40
SmokeMachine: and 6pm is A Good Thing too.
Xliff jmerelo: Done 10:42
10:45 wamba left 10:51 zakharyas left 10:52 wamba joined, zakharyas joined 11:04 zakharyas left, wamba left 11:08 wamba joined
SmokeMachine jmerelo: or maybe we could do something like this: 11:13
m: module Librerify { use Zef::CLI; for &MAIN.candidates>>.signature>>.params { my @params = .self; my $cmd = @params.shift.constraint_list().head() if @params.head.constraint_list ~~ { .elems == 1 && .head ~~ Str }; say "sub $cmd\(|c ({@params>>.gist.join: ", "})) \{ MAIN |c \}"}}
camelia sub fetch(|c (Bool :$force, *@identities (Any $, *@))) { MAIN |c }
Use of uninitialized value element of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
sub test(|c (Bool :$f…
SmokeMachine jmerelo: www.irccloud.com/pastebin/xJyqQ0Wb/ 11:14
m: module Librerify { use Zef::CLI; my %cmds = do for &MAIN.candidates>>.signature>>.params { my @params = .self; my $cmd = @params.shift.constraint_list().head() if @params.head.constraint_list ~~ { .elems == 1 && .head ~~ Str }; $cmd => &MAIN.assuming($cmd) if $cmd }; %cmds<install>("Red")} 11:25
camelia ===> Searching for: Red
Failed to update cpan mirror No such method 'IO' for invocant of type 'Any'
No candidates found matching identity: Red
Failed to update cpan mirror No such method 'IO' for invocant of type 'Any'
Failed to update p6c mir…
SmokeMachine jmerelo: ^^
www.irccloud.com/pastebin/unpQwUSH/
and we can just export that hash... 11:26
I think I'll create the Librerify module... :)\ 11:29
jmerelo SmokeMachine: that would be cool :-) 11:30
SmokeMachine www.irccloud.com/pastebin/O72fdaZg/ 11:39
Xliff m: use Zef::CLI; 11:41
camelia Zef - Perl6 Module Management

USAGE

zef [flags|options] command [args]


COMMANDS

install Install specific dependencies by name or path
uninstall Uninstall specified distributions
Xliff m: use Zef::CLI; my %cmds = do for &MAIN.candidates>>.signature>>.params { my @params = .self; my $cmd = @params.shift.constraint_list().head() if @params.head.constraint_list ~~ { .elems == 1 && .head ~~ Str }; $cmd => &MAIN.assuming($cmd) if $cmd }; %cmds.keys.say 11:42
camelia (nuke smoke search rdepends test uninstall update look install locate build info list upgrade fetch)
Zef - Perl6 Module Management

USAGE

zef [flags|options] command [args]


COMMANDS

install Install speci…
11:43 squashable6 left
Xliff SmokeMachine: You need to do something to suppress the usage, tho... 11:43
SmokeMachine Xliff: until now, generically: 11:45
www.irccloud.com/pastebin/ldYRYfg5/
11:46 sftp left 11:47 squashable6 joined, ChanServ sets mode: +v squashable6, sftp joined 12:22 pat_js joined 12:24 aborazmeh joined, aborazmeh left, aborazmeh joined
Xliff m: [**](3, 6, 9).say 12:29
12:29 abraxxa joined
Xliff m: say [**](3, 6, 9) 12:29
12:29 reach_satori joined, pat_js left
Xliff m: say [*](3, 6, 9) 12:29
camelia (timeout)
162
Xliff m: say 3 ** 6 12:30
camelia 729
Xliff m: say [*](3, 6, 2)
camelia 36
Xliff m: say [**](3, 6, 2)
camelia 150094635296999121
Xliff m: say [**](1, 2, 2, 4) 12:31
camelia 1
12:31 Guest93 joined
Xliff m: say [**](2, 2, 2, 4) 12:31
camelia 20035299304068464649790723515602557504478254755697514192650169737108940595563114530895061308809333481010382343429072631818229493821188126688695063647615470291650418719163515879663472194429309279820843091048559905701593189596395248633723672030029169695…
Xliff m: say [**](2, 2, 2)
camelia 16
Xliff m: say 16 ** 3 12:32
camelia 4096
12:32 kurahaupo left, EuAndreh[m] left, TravisRt2botio[m left, Matthew[m] left
Xliff m: say 16 ** 4 12:32
camelia 65536
12:33 sftp left
Xliff m: say [**](2, 2, 2, 1) 12:33
camelia 16
Xliff m: say [**](2, 2, 2, 4)
camelia 20035299304068464649790723515602557504478254755697514192650169737108940595563114530895061308809333481010382343429072631818229493821188126688695063647615470291650418719163515879663472194429309279820843091048559905701593189596395248633723672030029169695…
12:33 abraxxa left
Xliff ^^^ WTF? 12:33
m: say [**](2, 2, 2, 3)
camelia 115792089237316195423570985008687907853269984665640564039457584007913129639936
Xliff m: say [**](2, 2, 2, 2) 12:34
camelia 65536
12:34 xliff[m] left
Xliff m: say [**](2, 2, 2) 12:34
camelia 16
Xliff m: say [*](2, 2, 2, 2)
camelia 16
Xliff m: say [**](2, 2, 2, 2) 12:35
camelia 65536
SmokeMachine m: require Zef::CLI
camelia ( no output )
SmokeMachine m: module A { require Zef::CLI } 12:36
Xliff m: say [**](2, 4)
camelia ( no output )
16
Xliff m: say [**](2, 2, 4)
camelia 65536
12:36 matiaslina left, wamba left 12:37 kurahaupo joined, xliff[m] joined, sftp joined 12:38 matiaslina joined, Matthew[m] joined, TravisRt2botio[m joined 12:39 EuAndreh[m] joined
SmokeMachine odd... www.irccloud.com/pastebin/59r0bHTk/ 12:41
12:48 abraxxa joined 12:52 kurahaupo left, xliff[m] left 12:53 xliff[m] joined 12:56 kurahaupo joined 12:58 matiaslina left 12:59 matiaslina joined, Actualeyes left, Actualeyes joined 13:02 wamba joined 13:08 aborazmeh left 13:11 zakharyas joined 13:30 aborazmeh joined, aborazmeh left, aborazmeh joined, ChoHag left
kybr ackermann's? 13:31
13:31 ChoHag joined 13:38 ChoHag left 13:40 ChoHag joined
SmokeMachine www.irccloud.com/pastebin/cePyfFdi/ 13:42
kawaii I figured out how to use `.IO.watch` to monitor a directory for "things", how can I filter the supply so I only get alerted on `FileChanged` events? 13:48
and is there an easy way to just `.slurp` the file which was modified/created? 13:49
masak kawaii: .grep ? (to your first question) 13:50
13:50 vrurg_ joined
masak second, just slurp it...? 13:50
13:51 guifa_ joined, stux|RC-- joined
masak .oO( masak, you make it sound so easy! ) 13:51
13:51 hernan604 joined 13:53 eaterof joined, astronavt___ joined
SmokeMachine m: start react whenever "/tmp".IO.watch.grep: { .event ~~ FileChangeEvent::FileChanged } { .&dd }; "/tmp/bla".IO.spurt: "bla"; sleep 1 13:53
camelia IO::Notification::Change.new(path => "/tmp/bla", event => FileChangeEvent::FileChanged)
IO::Notification::Change.new(path => "/tmp/bla", event => FileChangeEvent::FileChanged)
IO::Notification::Change.new(path => "<tmp>", event => FileChangeEvent:…
13:53 tony-o_ joined, xi joined, DrForr_ joined
SmokeMachine kawaii: ^^ 13:54
13:54 Sharparam_ joined, ccntrq- joined, Util_ joined 13:55 broquaint joined, literal_ joined, gks joined, astronavt left, guifa left, eater left, ChoHag left, MilkmanDan left, stux|RC left, cibs left, KotH left, vrurg left, broquain1 left, kawaii left, renormalist left, cgfbee left, xi- left, hernan605 left, shlomif left, rindolf left, tadzik left, KotH joined, vrurg_ is now known as vrurg, guifa_ is now known as guifa, cibs joined, shlomif joined, kawaii joined 13:56 rindolf joined 13:57 tadzik joined 13:58 mornfall joined, epony left, cgfbee joined 14:01 MilkmanDan joined 14:02 cpan-p6 left 14:04 lucasb joined 14:05 ChoHag joined 14:07 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 14:11 rindolf3 joined
rindolf3 Hi all 14:11
14:13 aborazmeh left
Kaiepi there's some stuff with how sockets get closed i need to deal with first, but udp, unix, and raw socket support for IO::Socket::INET is the next stage of my grant work 👀 14:19
14:27 wamba left 14:28 Doc_Holliwood joined 14:41 rindolf3 left 14:46 _jrjsmrtn joined, __jrjsmrtn__ left 14:51 pmurias joined
pmurias SmokeMachine: I found the issue with your 6pad 14:51
SmokeMachine pmurias: great! what was it? 14:52
14:53 ChoHag left, ChoHag_ joined
pmurias SmokeMachine: there seems to be some issue with passing $result to the second promise 14:53
if you pass a number like 42 in the first then it works fine
SmokeMachine hum! so the problem is on serialising the fetch result? 14:54
14:54 MilkmanDan left
pmurias investigating it deeper now 14:55
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png 14:56
pmurias: maybe the ReadableStream? 14:57
pmurias my intution is that an exception is being lost 14:59
15:03 MilkmanDan joined
pmurias SmokeMachine: the .result.say is not working because it's calling a say method on a wrapped js object that doesn't have one 15:06
SmokeMachine pmurias: but shouldn't it receive the promise itself? 15:07
m: Promise.in(1).then: .result.say
camelia No such method 'result' for invocant of type 'Any'
in block <unit> at <tmp> line 1
SmokeMachine m: Promise.in(1).then: *.result.say
camelia ( no output )
SmokeMachine m: await Promise.in(1).then: *.result.say 15:08
camelia True
SmokeMachine m: await Promise.kept(42).then: *.result.say
camelia 42
SmokeMachine I was wrong...
Was that always that way?
pmurias I haven't used Promises in Perl 6 before 15:09
I haven't worked *in* Perl 6 as opposed to working *on* it that much
why are exceptions in a Promise.then *IGNORED*?
SmokeMachine no, that's right! 15:10
m: await Promise.kept(42).then: *.say
camelia Promise.new(scheduler => ThreadPoolScheduler.new(initial_threads => 0, max_threads => 64, uncaught_handler => Callable), status => PromiseStatus::Kept)
SmokeMachine pmurias: it isn't if you are using await
m: await Promise.broken: test 15:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
test used at line 1
SmokeMachine wrong method
m: await Promise. broken: "test" 15:12
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
test
in block <unit> at <tmp> line 1
SmokeMachine pmurias: ^^
m: await Promise. broken: *.result
camelia WhateverCode object coerced to string (please use .gist or .perl to do that)
in block <unit> at <tmp> line 1
An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:

in block <unit> at <tmp> line 1…
SmokeMachine pmurias: or if you .result it
pmurias ah ok
SmokeMachine: so this solves the puzzle of you example 15:13
SmokeMachine m: await Promise. broken("test").then: *.result
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
Tried to get the result of a broken Promise

Original exception:
test
pmurias you where calling .result.say, and the .result had no say method
SmokeMachine pmurias: yes, that makes sense... what about the JSWrapped obj being a Any? 15:14
m: Any.say
camelia (Any)
15:17 wildtrees joined
pmurias SmokeMachine: I guess it should at least implement all the Mu methods 15:18
SmokeMachine pmurias: with the updated version, it's working...perl6.github.io/6pad/#9789cd026063...7aaa2d489f 15:19
15:21 Cabanossi left
pmurias SmokeMachine: I would have to think if adding the whole kitchen sink (and some garbage) from Any onto every wrapped js object makes sense 15:21
kawaii I don't suppose there's a way to make `IO::Notification` ignore `FileChanged` if it's a delete event? 15:23
I use `FileChanged` triggers to detect when there's a new file in a dir, and then after I'm done with it I want to use `unlink` to remove it 15:24
but that triggers another FileChanged event and my program crashes since I'm using FileChanged elsewhere to slurp the file in the first place
www.irccloud.com/pastebin/7vdKxR3r/ 15:25
15:29 Cabanossi joined
jnthn kawaii: There's not, though in general, the file could get removed between you getting the notification and you trying to read it anyway. The only thing for these cases is to make sure you handle any exceptions that arise. 15:29
kawaii jnthn: mmm thanks for that, will just have to catch it :) 15:33
ZzZombo What is this: `.&dd`? What syntax?
SmokeMachine pmurias: finally! perl6.github.io/6pad/#9789cd026063...7aaa2d489f 15:34
15:35 stux|RC-- left, stux|RC joined
jnthn ZzZombo: Call the sub &dd passing the thing to the left of the . as the first argument 15:36
ZzZombo m: 1.&say 15:37
SmokeMachine m: dd 42; dd [42]; 42.&dd; sub print-something-diferent($something) { say "print $something in a different way" }; print-something-diferent 42; 42.& print-something-diferent
camelia 1
5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3ay" }; print-something-diferent 42; 42.&7⏏5 print-something-diferent
expecting any of:
infix
infix stopper
statement …
jnthn ZzZombo: Though in general in `.&foo` then &foo can be anything invokable, and if it's a Method then it's just a dynamic method call, identifying the code to call
SmokeMachine m: dd 42; dd [42]; 42.&dd; sub print-something-diferent($something) { say "print $something in a different way" }; print-something-diferent 42; 42.&print-something-diferent 15:38
camelia 42
print 42 in a different way
print 42 in a different way
Array element = [42]
42
ZzZombo Okay. 15:39
15:40 Doc_Holliwood left 15:42 wamba joined 15:49 kensanata left 15:53 NorthernMonster joined 15:54 Doc_Holliwood joined
NorthernMonster is Perl the 6th still compiled and alive, nothing new since March 15:55
Juerd NorthernMonster: To find out what's new in Perl 6, read p6weekly.wordpress.com/
timotimo we've been having a bit of a hold-up with releases 15:56
Juerd There's a new one almost every Monday
jmerelo NorthernMonster: Rakudo Star has not released a new version, but the regular Rakudo has seen at least one... 15:57
tony-o_ guifa: wrt the perl is dying article, the first example he gives of perl doing things wrong is him not understanding how HTTP headers work and programming it incorrectly. that's his problem, not perl's and that bug would happen regardless of programming language if he terminated headers with only \n
jmerelo tony-o_: plus using CGI as an example is sooo 90s...
tony-o_ yea but that part is fine, people have to maintain old code 15:58
and in the 90s cgi made that $
15:58 gtodd joined
Grinnz CGI isn't really the problem, it's CGI.pm, even though its not a bad idea to talk about it for legacy code, it's still a good idea to explain the huge caveats every time you do so (as the documentation does) 16:00
16:02 wamba left, wamba joined 16:11 pmurias left
cpan-p6 New module released to CPAN! Markit (0.0.1) by 03UZLUISF 16:16
16:16 pat_js joined, NorthernMonster left
Kaiepi m: use MONKEY-SEE-NO-EVAL; EVAL 'our $foo = 1'; say OUR::.keys 16:18
camelia ($foo)
Kaiepi m: sub foo { use MONKEY-SEE-NO-EVAL; EVAL 'our $foo = 1'; }; foo; say OUR::.keys 16:19
camelia ($foo)
Kaiepi m: use MONKEY-SEE-NO-EVAL; EVAL 'our $foo = 1'; EVAL 'say OUR::.keys'; 16:20
camelia ($foo)
16:20 zakharyas left
Kaiepi i could've sworn i've had code basically doing this not end up with $foo in OUR at some point 16:21
bisectable6, use MONKEY-SEE-NO-EVAL; EVAL 'our $foo = 1'; EVAL 'say OUR::.keys'
bisectable6 Kaiepi, On both starting points (old=2015.12 new=7e76762) the exit code is 0 and the output is identical as well
Kaiepi, Output on both points: «($foo)␤»
Xliff m: ('a'...'z').sort( rand ).say 16:22
camelia Cannot resolve caller sort(Seq:D: Num:D); none of these signatures match:
($: *%_)
($: &by, *%_)
in block <unit> at <tmp> line 1
Xliff m: ('a'...'z').sort( *.rand ).say
camelia 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
Xliff m: ('a'...'z').sort( rand(*) ).say
camelia 5===SORRY!5=== Error while compiling <tmp>
Calling rand(Whatever) will never work with signature of the proto (*%)
at <tmp>:1
------> 3('a'...'z').sort( 7⏏5rand(*) ).say
16:23
Xliff m: ('a'...'z').sort( rand() ).say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of rand(); in Perl 6 please use rand
at <tmp>:1
------> 3('a'...'z').sort( rand7⏏5() ).say
Xliff m: ('a'...'z').sort( rand ).say
camelia Cannot resolve caller sort(Seq:D: Num:D); none of these signatures match:
($: *%_)
($: &by, *%_)
in block <unit> at <tmp> line 1
Xliff m: ('a'...'z').sort({ rand }).say
camelia (o k s p c d w m v f h x b t u i j l y e a n q r g z)
moritz m: say ('a'...'z').sort(&term:rand) 16:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
term:rand used at line 1
moritz m: say ('a'...'z').sort(&term:<rand>)
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
term:<rand> used at line 1. Did you mean 'term:<now>', 'term:<time>'?
16:34 vike left, hythm joined, patrickb joined 16:35 dakkar left
Kaiepi m: use MONKEY-SEE-NO-EVAL; EVAL 'my $foo = 1'; EVAL 'say MY::.keys'; 16:35
camelia (EXPORT ::?PACKAGE $_ GLOBALish !EVAL_MARKER $?PACKAGE $=pod !UNIT_MARKER)
16:36 hythm_ joined
hythm_ m: enum E <A B>; E.add_enum_value( 'C' => 2); say C; 16:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
C used at line 1
Kaiepi add_enum_value doesn't create any lexical symbols
hythm_ so its not possible to add a value to enum and Access it? 16:38
16:39 hythm left
Kaiepi there is a way, but it depends on rakudo's internals 16:39
hythm_ is it documented? 16:40
Kaiepi no, but there's an issue open for it
hythm_ thanks, will check the issues
16:41 Doc_Holliwood left
Kaiepi m: enum E <A B>; BEGIN { my $val := $*W.create_enum_value: E, 'C', 2, 2; $*W.install_lexical_symbol: $*W.cur_lexpad, 'C', $val }; say C 16:41
camelia C
Kaiepi wait that's if E were MY scoped
ok you can do this without $*W 16:42
well, sort of, C => 2 is not the same as a real enum value 16:43
m: enum E <A B>; BEGIN { constant C = C => 2; E.^add_enum_value: C; }; say C 16:45
camelia C => 2
Kaiepi this doesn't make any symbol for E::C though
and i'm not sure if you're supposed to be adding enum values after composition like this 16:46
jnthn Not really; what's the problem? 16:47
(As in, why the desire to do this in the first place?)
hythm_ im using a module which has enum Loglevels, and I want to add a another loglevel 16:49
sorry cant explain well because im not near a computer, but seems im doing something wrong. will think in another way to achieve what I'm trying to do. 16:58
16:59 pat_js left
jmerelo notable6: we're looking for contributions for this year's Perl 6 advent calendar. Please claim a slot by doing a PR (or simply editing) this github.com/perl6/advent/blob/maste...9/schedule 17:03
notable6 jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Notable
jmerelo weekly: we're looking for contributions for this year's Perl 6 advent calendar. Please claim a slot by doing a PR (or simply editing) this github.com/perl6/advent/blob/maste...9/schedule
notable6 jmerelo, Noted! (weekly)
17:04 epony joined 17:05 hythm_ left
AlexDaniel squashable6: status 17:07
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈10 hours (2019-10-12 UTC-12⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
AlexDaniel jmerelo: thoughts? 17:08
jmerelo AlexDaniel: tomorrow already?
AlexDaniel jmerelo: it was supposed to be one week ago, but yeah
jmerelo: should we like… delay it a bit more and make it a Raku squashathon?
or something like that?
I don't know if there's anything people will be able to help with though 17:09
jmerelo AlexDaniel: Do we have a fresh run of Blin? That would be nice for the Hacktoberfest
AlexDaniel jmerelo: yeah, but what for exactly?
17:10 Doc_Holliwood joined
AlexDaniel jmerelo: there are just two modules that need a PR: github.com/rakudo/rakudo/issues/3207 17:10
jmerelo: we can use the data to repopulate github.com/perl6/ecosystem-unbitrot
jmerelo AlexDaniel: that would be nice.
AlexDaniel buuut… I don't know if that really makes a lot of sense
K let's try to update the ticket queue first… 17:11
jmerelo OK
AlexDaniel that thing just ate all my RAM… 17:14
jmerelo bad, bad thing! Give Alex his RAM back! 17:19
AlexDaniel: BTW, the dependence graph is _very_ cool. 17:20
AlexDaniel it's usually very messy when there are many modules failing 17:21
17:23 vike joined
Geth_ ¦ doc: JJ assigned to antoniogamiz Issue independent-routines is missing github.com/perl6/doc/issues/3051 17:32
mensvaga What extension should I give to a perl 6 script? 17:35
.p6?
jmerelo mensvaga: right
AlexDaniel mensvaga: yes
mensvaga k
17:38 chloekek joined
mensvaga In Perl (5), I'd do something like: use FindBin qw($RealBin); use lib "$RealBin/../lib" 17:40
What docs should I read to find the perl6 equivalent?
modules.perl6.org/dist/FindBin:cpan:LEMBARK ? 17:41
Is there something that's available (typically by default, somehow) ? 17:42
Xliff mensvega: What are you trying to do? I've never used FindBin in Perl5. 17:43
m: $*PERL.^name
camelia ( no output )
Xliff m: $*PERL.^name.say
camelia Perl
mensvaga I want to load a perl module that's located relative to the real location of the script 17:44
japhb mensvaga: Then "use lib $*PROGRAM.parent.sibling('lib');" or somesuch
mensvaga Then, it looks like I'll need something like: IO::Path::resolve($*PROGRAM).parent.sibling('lib') 17:46
I'll experiment. Thanks for the info.
Xliff mensvaga: What do you mean by "resolve"? 17:47
mensvaga docs.perl6.org/language/5to6-perlfunc#readlink
If my script is a symbolic link
Xliff Ah. OK 17:48
mensvaga If I do this: require IO::Path; I get this error message: IO::Path is a builtin type, not an external module 17:50
If I don't require it, then this: say IO::Path::resolve($*PROGRAM).parent.sibling('lib');
Xliff Yes. IO::Path is built in. You can juse use it.
mensvaga Could not find symbol '&resolve'
17:51 khisanth_ left
mensvaga (sorry about the load of questions; I read the intro to perl6, and now I'm trying to "make a new home" as it were. 17:51
Xliff m: $*PROGRAM.IO.resolve.parent.sibling('lib')
camelia ( no output )
Xliff m: $*PROGRAM.IO.resolve.parent.sibling('lib').say
camelia "/lib".IO
17:51 macaronus left
Xliff There you go. 17:51
Kaiepi oh i didn't know about .sibling, i was trying to do the same thing with .parent.child 17:52
*same thing it does
jmerelo Hey, Kaiepi, Xliff: I want *you* for the advent calendar this year. Claim your slot here: github.com/perl6/advent/blob/maste...9/schedule 17:53
mensvaga xliff: thanks
Xliff mensvaga: Anytime. 17:54
jmerelo: I hope there will be slots left when I find something to write about. 17:55
mensvaga Loading a library relative to the real location of a script is one of the first things I do when I'm learning a new language.
It allows me to set up my repos in a particular way.
jmerelo Xliff: you claim the slot with a TBA. You can talk about your gtk work or anything else. Pleeeeeez
Xliff jmerelo: Heh! How can I resist a request like that. 17:56
japhb m: say $*PROGRAM.WHAT;
camelia (Path)
japhb Xliff: No need to coerce with .IO ^ 17:57
jmerelo Xliff: then don't :-)
Xliff jmerelo: Is this December?
jmerelo Xliff: right, but I want to prepare stuff during November so that tbrowder and me don't get a heart attack come December.
Xliff November will be busy for me. I will try and write up something within the next few weeks. Hopefully will be starting a new job, though. 17:58
It will be dicey.
jmerelo Xliff: best of luck
18:03 khisanth_ joined
jmerelo AlexDaniel: for a moment there, I though we'd have to approve the PR all over again... 18:04
AlexDaniel jmerelo: we might if somebody demands more changes
Kaiepi jmerelo, i was bouncing around an idea for this
AlexDaniel I won't though :P
jmerelo Kaiepi: great!
AlexDaniel: please don't
AlexDaniel xP 18:05
jmerelo AlexDaniel: there's a Raku bus stop where?
Kaiepi a part 2 for zoffix's the grinch article from a few years ago, to do with type coercion. it's possible to port some code you can generate with www.jsfuck.com/ to perl 6 because of it
AlexDaniel jmerelo: in Tallinn, about 15 km away from me
jmerelo Kaiepi: great! Feel free to claim two slots, then :-)
AlexDaniel: :-) Let's have our RakuCon there! 18:06
AlexDaniel jmerelo: there's also a Raku lake and a kindergarten
jmerelo: I wish there was a Raku street, imagine if one of the devs lived there :D 18:07
jmerelo AlexDaniel: it would have a nice level of indirection.
lizmat www.booking.com/hotel/jp/raku.en-gb.html 18:08
jmerelo From now on, let's only have RakuCons in places called Raku. We might want to change that tradition when we get to the lake, though.
AlexDaniel jmerelo: as for the conference, just do it in Tallinn, Raku is unfortunately not a walking distance away but it's still really close 18:09
Xliff That place in Japan looks kinda nice. Unfortunately, I don't have much of a travel budget. 18:10
AlexDaniel jmerelo: what's funny is that I passed that bus stop several times and never really paid any attention 18:11
18:12 epony left
AlexDaniel though most of these times it was before Raku got any good traction 18:12
jmerelo AlexDaniel: :-)
18:17 epony joined
jmerelo Kaiepi, Xliff : Thanks! 18:18
Kaiepi np
jmerelo Still a few to go: github.com/perl6/advent/blob/maste...9/schedule 18:19
Grinnz mensvaga: IMO, it's much clearer to think of it in terms of "relative to this file" than whatever the "script" might be. just one reason I recommend against findbin 18:20
mensvaga Oh, yes.
Grinnz the other reasons aren't relative to raku, hopefully :)
mensvaga This is just for the purposes of allowing for the executable to be symbolically linked
Grinnz right. you want to resolve symlinks for "this file" as well 18:21
mensvaga I'm sure other people do this too; the "script" itself is just an entry point to a library
Yes, nothing else (in the way I'm doing things) uses code that is relative somehow to another link.
I usually do dirname(__FILE__).'/MyModule/some_template.tt' 18:22
Grinnz there are logical and practical problems with "the original script" - what if there's multiple scripts involved? yes normally you don't do this, but how do you think hypnotoad on a Mojolicious::Lite script works? it works around the problem for you using FindBin specific features, but why have to consider all of that 18:23
jmerelo Grinnz: would you care to write an article for the Advent calendar? Please? github.com/perl6/advent/blob/maste...9/schedule 18:24
mensvaga The goal (initially) is to get a framework with some structure around it so that organization comes easy during difficult times. 18:25
I try to force everything into a "library" somehow initially, and get the deployment part of it nailed so that there aren't issues with introducing new files and new libraries, etc. 18:26
Grinnz jmerelo: not sure what I could contribute having not used the language :P
18:26 ravenousmoose joined
mensvaga The end result is mobility, and the ability to remove chunks of library code to other repos, which might consist of "proper" modules. 18:26
I don't feel comfortable saying "I know a programming language" unless I have that mobility. 18:27
jmerelo Grinnz: I'm pretty sure you can contribute something... Maybe check some aspect of the language you like, tell something about it...
18:30 sauvin left 18:31 MasterDuke joined
mensvaga modules.perl6.org/dist/BSON:cpan:M....gitignore 18:34
That has some stuff in there that I should ignore for git.
Is there a "better" list for "stuff I should ignore by default" ?
.precomp definitely comes to mind 18:35
cpan-p6 New module released to CPAN! Grammar::PrettyErrors (0.0.4) by 03BDUGGAN
lizmat Grinnz: I think jmerelo wasn't aware of why you're on this channel
El_Che jmerelo: I see you went into the rabbithole of a troll tweet... 18:45
AlexDaniel jmerelo: so it start eating memory on this: github.com/perl6/ecosystem-unbitro...m6#L13-L17 18:58
where the url is modules.perl6.org/search.json 18:59
let's see if the same happens in a script…
jmerelo El_Che: well... 19:00
jmerelo goes AFK for the day. 19:01
19:01 jmerelo left
AlexDaniel can anybody try to reproduce? gist.github.com/AlexDaniel/53d478a...cb83e8585b 19:02
it starts slow but then eats your memory pretty fast, so be careful
19:04 Kaiepi left
tony-o_ AlexDaniel: yea .. that at 14GB pretty quick 19:14
19:14 sno joined
tony-o_ ate^ 19:16
AlexDaniel yup… what do I do now?
like, uh… bisect it? 19:17
tony-o_ that'd be a start 19:18
19:18 reach_satori left
tony-o_ first thing to do is make the script die 19:18
after a certain point
AlexDaniel tony-o_: by the way: github.com/perl6/problem-solving/p...-540117093
tony-o_ i plan to abstain, i can write that in the issue for posterity if you'd like 19:19
AlexDaniel I see, it's ok, just making sure that you saw it 19:20
tony-o_ i appreciate it, there's tons of emails coming from that repo
AlexDaniel alright I have the code to bisect it… 19:21
lizmat afk&
AlexDaniel hmm it's probably easier to just use Blin 19:22
6c: use Telemetry; 19:23
19:24 patrickb left
AlexDaniel committable6: huh? 19:24
committable6 AlexDaniel, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Committable
AlexDaniel committable6: use Telemetry;
committable6 AlexDaniel, ¦use: «Cannot find this revision (did you mean “all”?)»
AlexDaniel committable6: all use Telemetry;
committable6: use Telemetry; say 42
committable6 AlexDaniel, ¦use: «Cannot find this revision (did you mean “all”?)» 19:25
AlexDaniel committable6: all use Telemetry; say 42
I see, hmm 19:26
19:26 committable6 left
tony-o_ ? 19:26
19:27 committable6 joined
AlexDaniel committable6: all use Telemetry; say 42 19:31
committable6 AlexDaniel, gist.github.com/ccd784979b9a953a19...0188eb0803
AlexDaniel committable6: all use v6.d; 19:50
committable6 AlexDaniel, gist.github.com/9dda83c9a7b2a27816...9efc61bf48
AlexDaniel what? 19:51
u: use v6.d;
unicodable6 AlexDaniel, U+0075 LATIN SMALL LETTER U [Ll] (u)
AlexDaniel, U+0073 LATIN SMALL LETTER S [Ll] (s)
AlexDaniel, 9 characters in total (use v6.d;): gist.github.com/761d642bfc52c4ab2a...fef4fc77c5
AlexDaniel ahh k 19:52
looking at the wrong thing :)
cpan-p6 New module released to CPAN! Getopt::Long (0.1.3) by 03LEONT
19:52 leont joined
AlexDaniel so Cro is v6.d only? 19:52
at least one of its dependencies is 19:53
SmokeMachine jmerelo: github.com/FCO/Librarify/blob/mast...ZefLib.pm6 19:56
tellable6 SmokeMachine, I'll pass your message to jmerelo
SmokeMachine Xliff: github.com/FCO/Librarify/blob/mast...ZefLib.pm6
20:04 ravenousmoose left
leont I just wrote .rakutest support for prove6, will merge as soon as the vote is closed github.com/Leont/app-prove6/commit...70470f9289 20:08
20:08 molaf joined
El_Che leont++ 20:15
20:17 wamba left 20:27 Black_Ribbon joined 20:28 kst` joined 20:30 kst left
AlexDaniel tony 20:36
tony-o_: ouch! Bisected: github.com/rakudo/rakudo/commit/54...6f7b736104
I have not double checked it, so it could be wrong, but I think that's the problem
20:43 pmurias joined 20:45 ravenousmoose joined 20:50 ravenousmoose left
tony-o_ curious what the code looks like for cro that flattening causes an issue 20:57
20:59 pmurias left 21:00 pmurias joined, macaronus joined
tony-o_ likely an error being swallowed somewhere around github.com/croservices/cro-http/bl...t.pm6#L354 21:03
21:03 Kaiepi joined 21:16 leont left 21:20 wamba joined 21:25 krychu joined 21:35 guifa left 21:40 chloekek left 21:45 leont joined 22:05 wildtrees left 22:14 wamba left 22:23 quester left, quester joined 22:24 jjatria left, agentzh left 22:25 agentzh joined, agentzh left, agentzh joined 22:27 jjatria joined 22:28 kst` is now known as kst
Xliff m: class A { method b { callframe(1).gist.say }; method a { self.b; }; A.a; 22:31
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3).gist.say }; method a { self.b; }; A.a;7⏏5<EOL>
Xliff m: class A { method b { callframe(1).gist.say }; method a { self.b; }; }; A.a;
camelia <tmp> at line 1
Xliff m: class A { method b { callframe(1).code.package.^name.say }; method a { self.b; }; }; A.a; 22:32
camelia A
Xliff class A { has $!a; method a is rw { $!a }; }; (my $a = A.new).a = 42; $a.gist.say 22:35
evalable6 A.new
Xliff class A { has $!a; method a is rw { $!a }; }; (my $a = A.new).a = 42; $a.perl.say
evalable6 A.new
Xliff class A { has $!a; method a is rw { $!a }; }; (my $a = A.new).a = 42; $a.a.say
evalable6 42
Xliff class A { has $!a; method a is rw { $!a }; }; A.^attributes.gist.say; 22:38
evalable6 (Mu $!a)
22:38 pecastro left 22:39 softmoth left
Xliff class A { has $!a; has $!b; has $!z; has $!x; method a is rw { $!a }; }; A.^attributes».map( *.name.substr(2) )».say 22:42
evalable6 a
b
z
x
22:55 Doc_Holliwood left 23:07 |oLa|1 joined 23:16 Kaiepi left
Xliff I get the following when using .wrap: 23:28
Attempt to return outside of immediately-enclosing Routine (i.e. `return` execution is outside the dynamic scope of the Routine where `return` was used)
What does that mean? 23:29
23:33 lucasb left 23:42 gdonald left 23:45 gdonald joined
vrurg Xliff: wrap is quite contradictional thing. Can you find a way around without it? 23:46
23:58 leont left