»ö« 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.
TreyHarris Xliff: since you ventured an opinion, would you do the same--write it as a class rather than a module? 00:00
Kaiepi: no, I'm not sure I'm suggesting that--like I said, I may be missing something. (And sorry, I didn't realize I was in "hold" mode so wasn't seeing your reply before) 00:01
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 00:04
tyil now I just hope it'll behave as it did during testing :) 00:05
tyil is there a(n easy) way for a module to retrieve it's own META6.json content, so I can refer it's own version without hardcoding it? 00:10
Xliff TreyHarris: Yes. Especially if the functions were part of a coherent set. 00:10
I just did that, as a matter of fact! :)
TreyHarris Xliff: what is the advantage over a module, though? I only see disadvantages 00:11
Xliff It's easier for you to tell me the disadvantages you see, than for me to tell you the advantages. 00:12
The largest advantage is that it gives you a namespace to keep your routines in and prevents subroutine name collisions.
TreyHarris Xliff: As I wrote above, if it were `unit module Digest::BubbleBabble; our sub encode....`, then you just do `need Digest::BubbleBabble; Digest::BubbleBabble::encode($data); my $encoder = &Digest::BubbleBabble::encode; $encoder($data);` to call it directly or indirectly. As a class, you have to write a shim routine or do ugly MOP stuff like ^lookup to call it indirectly 00:14
TreyHarris It doesn't pollute any namespace either way 00:15
Xliff TreyHarris: Then do it that way! 00:16
I am not familiar with Digest::BubbleBabble. I don't know what problems you are having with it. Do you have an example of how you are working around it and how you would prefer to use it? 00:17
(I have not been paying much attention to IRC over the last few hours. Fixing dinner. Coding. Cats! ...)
El_Che Xliff: be very suspicious of cats: twitter.com/i/status/1081392923659382784 00:19
TreyHarris Xliff: I wanted to compare several encoders. The natural way to do that was to put them in a list and create a harness to compare them however I want. But, as a class, even though it has no instance state, I can't assign the .encode method to a variable or as an item in a list directly. That caused me to wonder why, as a design question, one would prefer a class over a module when there's no object state and 00:20
no OO semantics.
Xliff El_Che: DON'T BLINK! 00:20
El_Che hehe 00:21
Was thinking that as well
Xliff TreyHarris: As a module designer, I have no clue how my modules will be used. All I can do is make them as usable as possible and hope for the best. The author of Digest::BubbleBabble never expected your use case. 00:22
El_Che (I have a weeping angel statuette at work)
Xliff That's software development for you. Code up a workaround and submit a PR. :/
El_Che: You live dangerously. I hope you have some tear droppers in your desk drawer!
TreyHarris Xliff: But I was asking because I do happen to be writing a module that I want to release that is like this--a collection of functions. I've written it as a module with our subs. But seeing this example leads me to ask: what use cases others have am *I* missing where, if I do it that way, users will wish I did it as a class with static methods? 00:23
timotimo TreyHarris: you can get the method into a variable, though. you can also just have a tiny closure that calls it and then that can go into the list 00:24
El_Che Xliff: lol
Xliff timotimo++
TreyHarris timotimo: I understand that. I'm just wondering what use cases the module makes harder, since I've identified one the class makes harder. 00:25
Some languages don't let you write any callables that aren't methods. Perl 6 does. So I feel like I should understand the tradeoffs 00:26
timotimo classes make it a little easier to have multi candidates extended by users i guess 00:42
TreyHarris timotimo: "Because a non-multi will hide multi candidates of the same name in any parent scope or child scope. The same is true for imported non-multi candidates" quoting from the docs? Is that true in this case, though, since you don't actually import our subs? 00:48
timotimo hm, well, you'll be refering to the proto valid at the exact point you do the assignment of the sub to the list or what-have-you 00:50
so i suppose multis would still work fine as well
and since you can just as well hold state in subs ...
timotimo what's the difference between anything, really 00:50
TreyHarris timotimo: I think it's a case of the obviousness of the syntax for any higher-order metaprogramming. Like, if I wanted to wrap a static method, how would I do it? `my $wrapper = &Some::UnitModule::func.wrap(sub ...);` feels quite obvious to me. But if it's a `Some::UnitModule.func(...)` static method... I'm not sure how you do it 00:57
timotimo right, you'd .^find_method 00:59
since methods aren't a simple "contains" thing
timotimo the object is completely in charge of what a method call means 01:00
TreyHarris Of course. I'm not someone who eschews OO in general, or even when not absolutely required--I know our community includes many who do. But a collection of stateless functions, the Perl 6 equivalent of a math.h or something--I can't see any reason to implement them as static methods. TMTOWTDI always, of course--but as a module author you want to choose the most flexible syntax for users that does what you need 01:05
without requiring you as the module author to jump through hoops either, I think.
timotimo true 01:06
TreyHarris Sorry--*"them as static methods in a Math class" I meant
timotimo my school didn't have carpets, so there was no static in math class 01:07
TreyHarris heh ;-)
simple oh, ffs, perl6 has no proper 'goto <label>;' statement =/ 01:35
timotimo true, that's not yet implemented 01:36
you can have labelled loops at least, and "next" or "break" with a label
simple that makes me a sad panda
simple so.. can someone go ahead and implement that now plz kthx, i'll need it by morning... 01:39
timotimo well volunteered!
it should be simple! (get it? it's a joke)
simple i suppose if my C were as good as my perl5, i could give it a shot 01:40
but alas, 'tis not so simple in this case
timotimo not everything that hasn't been implemented is hard, but i reckon this isn't easy 01:43
TreyHarris I think it's more complex than it appears... I know there has been lots of desire for a way to replace the current calling stack like perl 5'ss `goto &sub` 01:44
simple i'd reckon so
i don't even want to call a sub, just jump to a label in the same method
timotimo i mean, you can abuse try/catch probably :S 01:46
TreyHarris A goto that was limited to just a label in the same method and scope might be fairly easy. But would a patch to implement goto in that sub-case by accepted? (I don't know)
timotimo do we already have the semantics defined for something gosub-like? especially with regards to the leave queue? 01:47
simple i'd even be happy with a separate implementation, like 'goto-label label1;'
timotimo unfortunately, that'd be the easiest part 01:48
simple then you could make a 'goto-sub &whatnot;' separately
making all the goto use-cases fit into a single 'goto' might be nice, but hardly necessary, at least in my opinion 01:49
timotimo i think it'd literally be exactly as easy to have both be "goto" than to have two different ones
TreyHarris With a pragma it might be allowable. But ease of working within Rakudo's implementation shouldn't drive language constructs. The behavior of goto has already been defined by TimToady. See github.com/perl6/roast/blob/master...nts/goto.t 01:50
timotimo huh, goto a string is supposed to look up the label by name, eh? 01:51
simple design.perl6.org/S04.html#The_goto_statement
timotimo do note however that the design docs are not authoritative 01:53
simple nods 01:54
MasterDuke timotimo: does implementing some form of 'goto' require MoarVM work (i.e., C)? or could it be done in Rakudo/NQP? 01:56
Xliff simple: Do you have code to show where you need goto?\
TreyHarris I don't want to dissuade you... Adding variants of goto's with a Rakudo-only pragma would probably be okay, and if one turns out to be especially useful, maybe it'll make it into the language separate from the general goto
Xliff You could work around it (since you "need it by morning") and refactor back when it's in-place. 01:57
TreyHarris Personally I've never used the goto statement in other languages for anything but frame replacement so I can blame errors on the caller when I can identify them 01:58
So examples would probably be helpful, yeah
simple Xliff: i'm doing text processing on decomplied code, so not really
decompiled* 01:59
Xliff simple: Ah! Sorry. Wish I could be of more help. :/
simple thanks anyway =)
Xliff simple: Using grammars?
If not, it might be too late to convert, now.
timotimo MasterDuke: i don't really know tbh, it might be possible to do without 02:01
SmokeMachine m: given 42 { say |(do if False { $_ } else { $_ }) } 02:20
camelia (LoweredAwayLexical)
SmokeMachine from where is the LoweredAwayLexical comming? 02:21
is that expected?
m: given 42 { say |(do if True { $_ } else { $_ }) } 02:22
camelia (LoweredAwayLexical)
SmokeMachine m: given 42 { say do if True { $_ } else { $_ } }
camelia (LoweredAwayLexical)
timotimo wow, that's impressive 02:23
SmokeMachine m: given 42 { if True { .say } else { .say } }
camelia 42
timotimo clearly it's not doing the lowering fully correctly
MasterDuke bisectable6: old=2018.12 given 42 { say do if True { $_ } else { $_ } }
bisectable6 MasterDuke, Problem with e87b7af commit: Commit exists, but a perl6 executable could not be built for it
MasterDuke bisectable6: old=2018.11 given 42 { say do if True { $_ } else { $_ } }
bisectable6 MasterDuke, Problem with e87b7af commit: Commit exists, but a perl6 executable could not be built for it
Xliff MasterDuke: There is no "goto" opcode for Moar, so unless you can convert it to an existing loop control structure, I don't see how it would work without changes to moar. 02:24
SmokeMachine m: say do given 42 { $_ }
camelia 42
SmokeMachine m: say do if 42 { $_ }
camelia (LoweredAwayLexical)
SmokeMachine m: say do for 42 { $_ } 02:25
camelia (42)
timotimo Xliff: there actually is a goto opcode for moar, though?
Xliff timotimo: It's not listed here: github.com/perl6/nqp/blob/master/d...s.markdown
Oh! But that's NQP. :/
timotimo there's lots of stuff in moarvm that can't be reached with nqp::blah
github.com/MoarVM/MoarVM/blob/mast...ore/oplist 02:26
this is the more interesting file for this purpose
Xliff github.com/MoarVM/MoarVM/blob/mast...erp.c#L238
:-O
timotimo yup 02:27
SmokeMachine m: say do { $_ } 02:28
camelia (Any)
timotimo m: say do { } or do { not * }
camelia WARNINGS for <tmp>:
Nil
Useless use of "not " in expression "not *" in sink context (line 1)
Xliff I'm seeing op_goto statements in nqp, so it there. I stand corrected! 02:36
Still would need Perl6 grammar and action changes.
AlexDaniel SmokeMachine, MasterDuke please leave a comment on R#2601 02:42
synopsebot R#2601 [open]: github.com/rakudo/rakudo/issues/2601 [regression][⚠ blocker ⚠] Scope flattening causes inner scope to lose value of topic variable
Geth doc: Xliff++ created pull request #2565:
- Improved wording for IO::Path.slurp and IO::Path.spurt.
05:35
Geth doc: 8f4063e8e7 | Xliff++ | doc/Type/IO/Path.pod6
- Improved wording for IO::Path.slurp and IO::Path.spurt.
06:25
doc: ec67ab3dc1 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
Merge pull request #2565 from Xliff/master

  - Improved wording for IO::Path.slurp and IO::Path.spurt.
synopsebot Link: doc.perl6.org/type/IO::Path
Geth doc: aafb12525d | (JJ Merelo)++ | 2 files
Documents HOME(DRIVE|PATH). Closes #2566
07:16
Xliff_ m: my $a; my $b = 0; say "set" with $a && $b 07:19
camelia ( no output )
Xliff_ m: my $a = 1; my $b = 0; say "set" with $a && $b
camelia set
Xliff_ m: my $a = 0; my $b = 0; say "set" with $a && $b
camelia set
Xliff_ m: my @a = ^6; @a.rotor(1).say 07:40
camelia ((0) (1) (2) (3) (4) (5))
Xliff_ m: my @a = ^6; @a.rotor(1 => 1).say
camelia ((0) (2) (4))
Bri 3 08:27
cpan-p6 New module released to CPAN! Inline-Perl5 (0.37) by 03NINE 08:43
cpan-p6 New module released to CPAN! Log-Syslog-Native (0.0.8) by 03JSTOWE 09:46
lizmat weekly: www.reddit.com/r/perl6/comments/af...g_zelda_3/ 10:12
notable6 lizmat, Noted!
lizmat urg
weekly: blogs.perl.org/users/sylvain_coline...3-gfx.html 10:13
notable6 lizmat, Noted!
Xliff_ lizmat: How odd! :) 10:18
SmokeMachine m: sub bla(::T Int $a --> T) { $a * 2 }; bla 21 10:30
camelia Died with X::TypeCheck::Return
in sub bla at <tmp> line 1
in block <unit> at <tmp> line 1
SmokeMachine m: sub bla(::T Int $a) { say T }; bla 42 10:32
camelia (Int)
lizmat SmokeMachine: it probably shouldn't do that 10:33
SmokeMachine lizmat: do you mean the first or the second one?
lizmat the error means there's an error in the exception
the first
it's probably got to do with the value that it got, which cannot be represented 10:34
SmokeMachine Yes... I added it here: github.com/rakudo/rakudo/issues/1417
lizmat sorry, no quick fix 10:36
SmokeMachine :( 11:11
lizmat: thanks!
Kaiepi m: my Instant $now = now; dd DateTime.new($now).Instant == $now 11:35
camelia Bool::True
Kaiepi m: my Instant $now = now; dd DateTime.new($now.Num).Instant == $now 11:36
camelia Bool::False
Kaiepi m: my Instant $now = now; dd DateTime.new($now.Num).Instant; dd $now
camelia Instant.from-posix(<1295228906581/837>, Bool::False)
Instant $now = Instant.from-posix(<1295228875612/837>, Bool::False)
Kaiepi why are they different?
lizmat the CPAN upload Twitter feed was offline from 7-11 Jan... 11:37
does anybody know of a log of uploads to CPAN for that period?
moritz I'd expect PAUSE to have such logs, but I currently can't login, TLS SNAFU 11:40
scimon Johnathon Stowe was doing a LOT recently. AFAIK moving his non CPAN stuff to CPAN.
lizmat scimon moritz: thanks, in the end I went through the ecosystem commits at github.com/ugexe/Perl6-ecosystems 12:19
cpan-p6 New module released to CPAN! BSON (0.11.5) by 03MARTIMM 13:58
New module released to CPAN! Crypt-Libcrypt (0.0.9) by 03JSTOWE
cpan-p6 New module released to CPAN! Util-Bitfield (0.0.4) by 03JSTOWE 15:01
lizmat And another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2019/01/14/...it-spring/ 15:07
tyil lizmat++ 15:10
timotimo m: say do if 42 { $_ } 15:15
camelia (LoweredAwayLexical)
timotimo jnthn: ^- did you see this? :)
cpan-p6 New module released to CPAN! Tomtit (0.0.27) by 03MELEZHIK 15:17
jnthn timotimo: Yeah 15:18
No idea what it thinks it's doing there
MasterDuke lizmat++ 15:19
SmokeMachine Is Red a problem to the users? stackoverflow.com/questions/541430...d-properly 15:22
tbrowder o/ #perl6 15:34
tbrowder i’m trying to debug a regex attempt given an eps file line that looks like this: 15:35
%%BoundingBox: 0 -1 210 320 15:36
lizmat SmokeMachine: I'm not sure I follow 15:39
tbrowder i’m trying this regex: / ‘%%BoundingBox:’ \s+ ([\+\-]? \d+) \s+ ([\+\-]? \d+) /
which doesn’t work with my p6 2018.06 15:40
however, if i drop the second grouping it works!
SmokeMachine lizmat: Red is one of those modules that uses metamethods extensively...
lucs I think you mean something like <[+-]> (with appropriate escapes, eh)
(I keep forgetting the <> for character classes in p6) 15:41
lizmat SmokeMachine: there's a difference between using ^methods and writing them yourself
the latter case requires more knowledge
tbrowder arg, 15:42
tbrowder lucs: thanks! 15:42
lucs You're welcome
SmokeMachine lizmat: I mean Red creates and exports ^methods... 15:45
lizmat SmokeMachine: that's fine, is it not ? 15:53
SmokeMachine lizmat: I think so... I am just in doubt if it is making the users think ^methods are common methods... 15:56
Geth doc: 1f15419fcf | cfa++ | doc/Type/IO/Path.pod6
Whitespace.
16:28
synopsebot Link: doc.perl6.org/type/IO::Path
huyna Hi 17:25
sena_kun o/ 17:28
Xliff \o 17:29
Manifest0 How do i defined a type constraint for an array that can only contain digits or the letter 'x'? Example: ['1','2','3','x'] 17:42
I'm doing: subset Number-or-X where {$_ ~~ /\d/ || $_ eq 'x' };
and then: multi my_func(Number-or-X @input where Array), but it's not working :-(. What am i doing wrong/missing?
timotimo doing it like that will only work when the value passed was declared as that type already 17:43
it's probably easier to use a $-sigiled parameter and have the subset be of Positional, then check all members in that
m: subset NumOrX of Positional where { .all eq any("1".."9", "x") and .all ~~ Str }; my NumOrX $foo = Array.new("1", "2", "x") 17:44
camelia Type check failed in assignment to $foo; expected NumOrX but got Array ($["1", "2", "x"])
in block <unit> at <tmp> line 1
timotimo hm, not quite
m: subset NumOrX of Positional where { .all eq any(|("1".."9"), "x") and .all ~~ Str }; my NumOrX $foo = Array.new("1", "2", "x") 17:45
camelia ( no output )
timotimo this is how it works
m: subset NumOrX of Positional where { .all eq any(|("1".."9"), "x") and .all ~~ Str }; multi my_func(NumOrX $foo) { say "it's all right" }; multi my_func($anything) { say "not correct: $anything" }; my_func([1, 2, 3]); my_func(["1", "2"]); my_func([]) 17:46
camelia not correct: 1 2 3
it's all right
it's all right
timotimo there's also a module that helps with subsets
github.com/zoffixznet/perl6-Subset-Helper 17:47
Manifest0 Ah! Thanks! I will give it a try 17:47
Super! I'm going to look at that module :-)
timotimo hm, not entirely sure if that also helps with arrays of things
timotimo anyway, i gotta go, see you later! 17:48
Manifest0 bye :-)
cpan-p6 New module released to CPAN! Inline-Perl5 (0.38) by 03NINE 17:51
03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot
tbrowder back again with my prob regex. the eps file claims it is Clean7bit” 18:22
will that affect “normal” regexes expecting unicode files?
Kaiepi in a project i'm working on i want to test some methods but they make database queries 18:23
Kaiepi is there a way i can prevent them from being made while running tests? 18:23
tbrowder i get my regex working with a test string but it fails on the read-in line
Kaiepi like an env var or something? 18:24
tbrowder going to look at “od”... 18:25
Xliff Kaiepi: Why not code in a switch to such a var? 18:28
Kaiepi wdym? 18:29
Xliff Kaiepi: Can you show me some code?
Kaiepi this is the database module hastebin.com/dohomirono.pl 18:30
Kaiepi this is a method that uses the database hastebin.com/aziranizar.pl 18:31
Xliff You could wrap the methods if an env-var is present. 18:32
Kaiepi i was thinking of doing something like adding BEGIN %*ENV<TESTING> = 1 before including the modules in the unit tests and returning from the database methods if the env var is present
but i was wondering if there's a better way
Xliff This accomplishes the same thing, without all of the work: submethod BUILD(:$!dbh) { if %*ENV<TESTING] { self.^find_method($_).wrap(-> | { return }) for self.^methods }; }; 18:34
Correction: submethod BUILD(:$!dbh) { if %*ENV<TESTING> { self.^find_method($_).wrap(-> | { return }) for self.^methods }; };
Basically, if TESTING is present, all methods become no-ops
Xliff m: Int.^methods.say 18:36
camelia (new Capture Int Num Rat FatRat abs Bridge chr sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range unival asech atanh exp sech atan2 acosh Complex conj sec sin roots cosech rand cosh tan cotan sign truncate sinh cos succ pred ci…
Xliff You wouldn't even need the return, really. 18:37
Xliff The problem after that would be that the ode in aziranizar.pl is expecting a hash, with values. You'd have to Nil proof the code. 18:39
AlexDaniel sooo there was no spam? 18:45
AlexDaniel I just removed +m from #moarvm and #perl6-dev 18:47
maybe p6bannerbot can take a break, too
AlexDaniel I can reverse that in minutes if bullshit reappears 18:47
Kaiepi m: for Nil { .say } 18:48
camelia Nil
Kaiepi oh nice that works
m: +Nil
camelia WARNINGS for <tmp>:
Useless use of "+" in expression "+Nil" in sink context (line 1)
Use of Nil in numeric context
in block <unit> at <tmp> line 1
Kaiepi m: say +Nil 18:49
camelia Use of Nil in numeric context
0
in block <unit> at <tmp> line 1
Kaiepi ok there's not a lot of Nil-proofing i have to do
thanks Xliff
AlexDaniel p6bannerbot: help
hmm
Kaiepi m: class Foo { submethod BUILD { self.^find-method($_).wrap({ return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 18:53
camelia No such method 'find-method' for invocant of type 'Perl6::Metamodel::ClassHOW'. Did you mean 'find_method'?
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { self.^find_method($_).wrap({ return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo
camelia Submethod object coerced to string (please use .gist or .perl to do that)
in block at <tmp> line 1
Submethod object coerced to string (please use .gist or .perl to do that)
in block at <tmp> line 1
Method object coerced to string (please…
Kaiepi m: class Foo { submethod BUILD { self.^find_method($_).wrap(-> | { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo
camelia Submethod object coerced to string (please use .gist or .perl to do that)
in block at <tmp> line 1
Submethod object coerced to string (please use .gist or .perl to do that)
in block at <tmp> line 1
Method object coerced to string (please…
Kaiepi m: class Foo { submethod BUILD { $_.wrap(-> | { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 18:56
camelia Attempt to return outside of immediately-enclosing Routine (i.e. `return` execution is outside the dynamic scope of the Routine where `return` was used)
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { $_.wrap(-> *@, *% { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 18:57
camelia Attempt to return outside of immediately-enclosing Routine (i.e. `return` execution is outside the dynamic scope of the Routine where `return` was used)
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { self.^find_method($_.^name).wrap(-> | { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 18:58
camelia No such method 'wrap' for invocant of type 'Mu'
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { self.^find_method($_.name).wrap(-> | { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo
camelia Attempt to return outside of immediately-enclosing Routine (i.e. `return` execution is outside the dynamic scope of the Routine where `return` was used)
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon sub (|) { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 18:59
camelia ( no output )
Kaiepi there we go
m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return }) for self.^methods }; method foo { 1 } }; my Foo $foo .= new; $foo.foo 19:00
camelia ( no output )
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return $_.signature.returns; }) for self.^methods }; method foo(--> Int) { 1 } }; my Foo $foo .= new; $foo.foo 19:02
camelia No such method 'signature' for invocant of type 'Any'
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return $_.signature.returns if $_.signature; }) for self.^methods }; method foo(--> Int) { 1 } }; my Foo $foo .= new; $foo.foo 19:03
camelia No such method 'signature' for invocant of type 'Any'
in method <anon> at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return $_.signature.returns if $_; return; }) for self.^methods }; method foo(--> Int) { 1 } }; my Foo $foo .= new; $foo.foo
camelia ( no output )
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return $_.signature.returns if $_; return; }) for self.^methods }; method foo(--> Int) { 1 } }; my Foo $foo .= new; say $foo.foo 19:04
camelia Nil
Kaiepi m: class Foo { submethod BUILD { $_.wrap(anon method (|) { return $_.signature.returns.new if $_; return; }) for self.^methods }; method foo(--> Int) { 1 } }; my Foo $foo .= new; say $foo.foo
camelia Nil
Xliff m: @a; @a[0;1] =1; 19:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@a' is not declared
at <tmp>:1
------> 3<BOL>7⏏5@a; @a[0;1] =1;
Xliff m: my @a; @a[0;1] =1;
camelia ( no output )
Xliff m: my @a; @a[0;1] =1; @a.gist.say 19:06
camelia [[(Any) 1]]
Kaiepi m: class Foo { submethod BUILD { for self.^methods -> &method { my \returns = &method.signature.returns; &method.wrap(anon method (|) { return returns; }) } }; method foo(--> Int) { 1 } }; my Foo $foo .= new; say $foo.foo
camelia (Int)
Kaiepi m: for Array:U { .say } 19:14
camelia Invocant of method 'iterator' must be an object instance of type 'Array', not a type object of type 'Array:U'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
tyil 503 errors on modules.perl6.org :( 19:27
moritz please try again 19:34
tyil works again :D 19:40
jmerelo moritz: what happened? 19:41
moritz jmerelo: no idea 19:46
I started the webservice again 19:47
jmerelo moritz++ 19:48
cpan-p6 03cpan-p6 reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadnotifierbot 19:56
AlexDaniel weekly: git.tyil.nl/perl6/app-cpan-uploadnotifierbot (new buggable) 19:58
notable6 AlexDaniel, Noted!
AlexDaniel tyil: please see which features buggable has, maybe you can implement them so that we can deprecate buggable github.com/zoffixznet/perl6-buggable 19:59
tyil AlexDaniel: noted :) 20:00
I'm applying some finishing touches on cpan-p6, which now has NickServ auth and other cool tricks
tyil once it's "done", I want to rename the "App::CPAN" module (that contains the code to keep track of updates on cpan) to something more sensible, and migrate it to my k8s infra instaed of running it on my desktop 20:01
AlexDaniel although to me it's a bit unclear why buggable is being reimplemented… 20:03
tyil idk, I just felt bored and noticed we didnt have CPAN notifications anymore
so I became unbored by solving that specific issue 20:04
AlexDaniel hmmm…
AlexDaniel buggable had a bunch of features beyond cpan notifications, so it'll be sad to lose them 20:06
but chances are you can just use these plugins: github.com/zoffixznet/perl6-buggab...ble/Plugin
tyil the rest is Perl 6 huh 20:10
that makes it easier 20:11
AlexDaniel there's no license specified in that repo, but we can fix that 20:12
ooooooooooooooooh I don't have access to that particular repo! 20:13
tyil oh
AlexDaniel OK that needs to be figured out, I think?
tyil preferably
I don't think Zoffix will get mad if I were to fork it, but it'd still be better to have a clear license attached to it 20:14
I'm not in a hurry anyway 20:15
AlexDaniel OK, I filed an issue, I think it wouldn't take too long to resolve that 20:19
tyil neat, thanks 20:20
ufobat does zoffix still maintain his perl6 modules, or not? 20:35
lizmat he does not intend to afaik, as he's given the keys to AlexDaniel 20:36
ufobat okay
AlexDaniel yeah, and they're up for grabs, I'd say
I will be moving them to perl6-community-modules soon, I think
tyil I wouldn't mind hosting buggable on my infra, together with cpan-p6 20:37
ufobat the perl6-community github group is just a small grp of people, i noticed
perl6-community-modules 20:38
ufobat is there a ascii only version of \w and \d and so on? 21:17
AlexDaniel ufobat: I don't think so, but you can create your own tokens for convenience, and generally <[a..zA..Z]> is explicit and short enough in many cases 21:19
lizmat <[0123456789]>
AlexDaniel m: say ‘25719’ ~~ /<[0..9]>/
camelia 「2」
AlexDaniel m: say ‘25719’ ~~ /<[0..9]>+/
camelia 「25719」
ufobat okay, ty :)
AlexDaniel ufobat: I wonder if this should be documented as a trap… 21:20
because when parsing human-written text of course it makes sense to include unicode stuff
but for protocols, it may be tempting to use \w \d
because 1) it's short and 2) newcomers may not know that it includes unicode stuff 21:21
ufobat exactly
El_Che AlexDaniel: it should be a "principle": Asume it's utf-8 unless otherwise documented
AlexDaniel ufobat: can you file a ticket on github.com/perl6/doc/issues/ ?
ufobat sure :)
AlexDaniel I wonder how many modules are out there that would happily take non-ascii characters in places where they shouldn't 21:22
AlexDaniel greppable6: \\d 21:22
greppable6 AlexDaniel, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/0f400ac0be138fa1c7...132e74ef9f
AlexDaniel what? :) 21:23
ufobat issue created 21:30
cpan-p6 New module released to CPAN! MongoDB (0.43.3) by 03MARTIMM
ufobat omg thats so funny. my new laptop addapts the brightness of the screen to the environmental brightnes. I am sitting in a dark room, when I switch from my dark themed IRC to a white github website, the room gets so much brighter then the screen of my laptop gets even more brighter.. then a recursion starts 21:33
El_Che ufobat: I *hate* that with passion. My TV has it (but I could disable it), my cheap dell inspiron has it but it can not be disabled on the OS. 21:45
ufobat cant you just "disable" the sensor?
moritz tape over it? 21:46
ftr I love automatic brightness adjustments with mobile phones 21:47
ufobat moritz, will you attend the erlangen pm in 2 days? 21:50
El_Che ufobat: I think it's the screen and not a sensor 21:51
anyway, it's my "desktop" laptop connected to a big screen, so it's not annoying 21:52
but when I used it as a laptop, it sucked
on xps models they added a bios setting to disable it 21:53
my work latitudes don't have the "feature"
the macbook air doesn't have it either
ufobat El_Che, I dont know my sensor, but it isnt the webcam :-( 21:54
El_Che Actually it's not measuring the room
but the colours on the screen
(if it's the same thing)
ufobat what is the sense of making a white screen brighter and a dark screen darker? 21:55
El_Che a line on a sticker 21:56
I thought it was a Linux driver problem, but Win 7 has exact the same problem 21:57
and people are complaining on the dell forums :)
ufobat m: subset ET of Str:D where * ~~ m / <[abc]>+ /; sub foo(ET $x) { say $x}; foo("a") 22:01
camelia Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in whatevercode at <tmp> line 1
Use of uninitialized value of type Any in string context.
M…
ufobat what did i do wrong?
El_Che, I've got a old (5year old) lenovo yoga
ufobat m: subset ET of Str:D where m / <[abc]>+ /; sub foo(ET $x) { say $x}; foo("a") 22:04
camelia a
ufobat odd ;)
m: subset ET of Str:D where { $_ ~~ m / <[abc]>+ /}; sub foo(ET $x) { say $x}; foo("a") 22:06
camelia a
ufobat why doesn't it work with *
cfa 👋🏽 22:20
lizmat waves back in ASCII 22:23
cfa :) 22:26
tbrowder ref my eps file bbox regex prob: stupidly i forgot the '\' (backslashes0 in front of the 'd's and so it wasn't finding the bbox group of 4 ints! old people need programming aides as well as they need nurses for mobility problems!
kkrev say IO::Path.new('C:\Program Files\Windows NT\Accessories\wordpad.exe').x(); # prints 'False'. Bug? 22:52
pony try it with Q{\} or '\\' 23:14
kkrev it's parsing the string fine. That's not the issue. 23:20
It can correctly report the size, etc. It just seems rakudo doesn't have a concept of "executable" on windows? 23:21
AlexDaniel tyil: ok, I have access! Zoffix++ 23:30
tyil: where do you want me to move it?
community modules or your account, or anywhere else?
pony m: my $list = (1 ... *).map({ sleep 0.2; $_ }); react { whenever $list.Supply { .put }; whenever Promise.in(3) { done } } 23:43
camelia (timeout)1
pony it seems here that the done stops the counting, but after that the program hangs
is this a bug? 23:44
AlexDaniel c: 2018.10 my $list = (1 ... *).map({ sleep 0.2; $_ }); react { whenever $list.Supply { .put }; whenever Promise.in(3) { done } } 23:45
committable6 AlexDaniel, ¦2018.10: «1␤«timed out after 40 seconds» «exit signal = SIGHUP (1)»» 23:46
AlexDaniel pony: it does look like a bug 23:51
pony any idea what could be causing it?
m: react { whenever Supply.interval(0.2) { put $_ + 1 }; whenever Promise.in(3) { done } } 23:53
camelia 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
AlexDaniel pony: it seems like it is trying to iterate $list till the end 23:55
pony ahh
AlexDaniel even though the `whenever` does not fire, it's still tapping on the values
pony I see
AlexDaniel please file a ticket here: github.com/rakudo/rakudo/issues 23:56
I think it's a legit bug
pony all right