»ö« 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.
Kaiepi god there's so much i have to explain about functions in the js nutshell 00:38
318 lines and i'm still not done yet
guifa Does one of us need to write a TLDR for it? :-) 00:39
Kaiepi maybe 00:40
i've explained declaring functions and writing signatures. i'm in the middle of writing how to invoke functions, and i still have multiple dispatch to write about
as well as traits
actually i might leave out traits 00:41
guifa with the exception of is export I don’t think any of the method/sub traits is too particularly important, and it’s not even particular to them 00:49
Kaiepi finished writing the functions section at 426 lines 01:58
discord6 <Tyler (Aearnus)> what are you writing Kaiepi? 01:59
discord6 <Kaiepi> the functions section of the js nutshell 02:09
discord6 <Kaiepi> i'll make a pr for it whenever the one i already have open is merged 02:10
<Tyler (Aearnus)> hey all, is there an easy way to run a loop once before checking the condition? 02:35
<Tyler (Aearnus)> as in, I want the condition to be checked after the loop is run instead of before 02:36
<Rogue> do/while?
<Tyler (Aearnus)> ahh, repeat, nvm
<Rogue> I've never actually had to do that in Perl 6 for some reason
<Rogue> or at least I don't remember having to
<Tyler (Aearnus)> it was to write a little name generator: my @ws = '/usr/share/dict/words'.IO.lines.grep(none / .+ \'s /); repeat { @ws.grep({ .chars < 10 }).pick(2)>>.tclc.say } while { 'do you like this name? (y/n)'.say; get() ne 'y' }() 02:37
MasterDuke Aearnus: do you know about prompt()? 02:38
discord6 <Tyler (Aearnus)> no, I didn't 😮 02:39
<Tyler (Aearnus)> my @ws = '/usr/share/dict/words'.IO.lines.grep(none / .+ \'s /); repeat { @ws.grep({ .chars < 10 }).pick(2)>>.tclc.say } while { prompt('do you like this name? (y/n) ') ne 'y' }() much better 02:40
MasterDuke Aearnus: if you care, `grep(! *.contains(q|'s|))` is a bit faster 02:47
discord6 <Tyler (Aearnus)> i would indeed care, thank you 02:48
Geth doc/MasterDuke17-patch-1: b42f2e533a | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/Proc/Async.pod6
Remove line that refers to non-existent text
02:59
doc: MasterDuke17++ created pull request #2712:
Remove line that refers to non-existent text
Geth doc: b42f2e533a | MasterDuke17++ (committed using GitHub Web editor) | doc/Type/Proc/Async.pod6
Remove line that refers to non-existent text
05:36
doc: 5baf2ab4a8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Proc/Async.pod6
Merge pull request #2712 from perl6/MasterDuke17-patch-1

Remove line that refers to non-existent text
synopsebot Link: doc.perl6.org/type/Proc::Async
Geth doc: 40a534c5c2 | (Ben Davies)++ | doc/Language/js-nutshell.pod6
JS nutshell: clarify variables section, clean up code examples
05:37
doc: d2a09a4533 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/js-nutshell.pod6
Merge pull request #2711 from Kaiepi/nodejs

JS nutshell: clarify variables section, clean up code examples
synopsebot Link: doc.perl6.org/language/js-nutshell
Geth doc: 7dc04c92f5 | (JJ Merelo)++ | doc/Type/Blob.pod6
Adds list refs #2694
05:45
synopsebot Link: doc.perl6.org/type/Blob
jmerelo notable6: Published results of last Squashathon github.com/rakudo/rakudo/wiki/Mont...Squash-Day 06:39
notable6 jmerelo, Noted! 06:40
jmerelo squashable6: status
squashable6 jmerelo, Next SQUASHathon in 24 days and ≈5 hours (2019-05-04 UTC-14⌁UTC+12). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo .tell kawaii This next squashathon is supposed to be devoted to Rakudo. Please check you're OK with it. 06:41
yoleaux jmerelo: I'll pass your message to kawaii.
jmerelo And we do need contributors for the documentation. Contributions have lately dwindled to a trickle, and sometimes they have just stopped altogether.
Besides 6.d, there are many old issues that still need to be addressed. 06:42
kawaii jmerelo: good morning! Yes of course, other than the usual Squashathon page is there any additional reading material I should see this time? 07:09
yoleaux 06:41Z <jmerelo> kawaii: This next squashathon is supposed to be devoted to Rakudo. Please check you're OK with it.
pmurias now that rakudo.js passess tests on chrome, what would be the next step for the grant? email [Coke]? 08:07
timotimo sounds like a good idea 08:13
tadzik pmurias: is there anything stopping it from passing tests on firefox? 08:15
yoleaux 7 Apr 2019 22:44Z <patrickb> tadzik: I got some thumbs up to just put my changes to rakudobrew in the current repo (github.com/tadzik/rakudobrew) and not try to be clever about the upgrade.
7 Apr 2019 22:44Z <patrickb> tadzik: The new version will just show a message when it detected the incompatibility and shortly explains what to do to fix it.
7 Apr 2019 22:45Z <patrickb> tadzik: Would you be OK with this? If yes, I'll prepare a PR.
pmurias tadzik: most of them should run (I'll check if we aren't depending on anything chrome specific for basic functionality) 08:17
tadzik: some of them depend on better stack traces in chrome 08:18
tadzik I see
patrickb: it sounds reasonable enough; but what is the reason for the change, what benefit does it bring? 08:19
and is there any reason why the fix can't be automated?
pmurias I haven't seen if it's actually missing in firefox, but working async/await stack traces are feature of the latest chrome
also I'm using puppeeter to run tests directly because had issuess with karma (which didn't like the huge .js generated sizes) 08:21
patrickb tadzik: The new directory layout is a requirement for the new mode of operation based on PATH manipulation. The fix can't be automated, because the location of the installations moves and since up to now rakudo has not been portable that would break them. So as long as we don't automatically rebuild all installed perl6s there is no way to automate 08:22
that.
tadzik: Well, it's sort of a requirement. 08:23
Hm. Thinking about it, actually the breaking change (move of the installation paths) is not completely related to the other features. It does clean up rakudobrew a lot and prevents nameclashes of the installations with the other files lying around in the .rakudobrew dir though. 08:25
discord6 <Tyler (Aearnus)> how does rakudo.js work? ahead of time compilation? 08:26
pmurias yes 08:34
patrickb tadzik: What do you think? 08:35
pmurias Tyler (Aernus): it emits JavaScript from QAST and in the browser we precompile as compiling stuff at page load doesn't seem very sane 08:36
abraxxa isn't webassembly the way to go? 08:50
pmurias abraxxa: not obviously, currently is built for compiled languages like C++ or Rust while Perl 6 is a lot more dynamic 08:55
abraxxa compile MoarVM to wasm?
pmurias abraxxa: that should work 08:57
that worked for Perl 5
pmurias abraxxa: not something I'm personaly interested in pursuing because I don't consider fiddling with build system and platform differences that fun ;) 09:04
patrickb currently reading up on object construction. What's the most official documentation for that? I looked at S12, docs/language/objects and docs/type/Mu and roast/S12-construction/ 09:58
holyghost I'm going to try to find an attractor for a matrix interpolated WAV file channel (a channel which is taken from a channel value to a float) 10:17
This means I can get my music to the point 10:18
I need to extend Bayes::Learn for it though
It's quasi impossible but I'm going to try it
Thus we have some code on plus 10:19
holyghost It should work somehow with a (Bayesian) Loss function 10:21
It'll probably take me more than 40 days :-) 10:42
patrickb What do I need to do to pm evaluate stuff in here? [/msg evalable6 m: say "Hi"] doesn't seem to work... 11:52
lizmat m: say "Hi"
evalable6 Hi
patrickb That's not private. :-) I didn't want to spam the channel with my evals until I got them working. 11:53
Anyways
lizmat hmmm.. why isn't evalable allowing privmsg ?
patrickb m: class P {has $.x = 0; submethod BUILD() { $!x }} say P.new(x=>5).perl
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/TsRqnaDesC
Strange…
patrickb, Full output: gist.github.com/bb11ec1b19fea8a711...8d5f3c958b
lizmat camelia used to
lizmat evalable6: help 11:54
evalable6 lizmat, Like this: evalable6: say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Evalable
patrickb lizmat: Might be a security thing...
Like, the evildoer at least has to do his evil doings in open sight...
patrickb m: class P {has $.x = 0; submethod BUILD() { $!x }}; say P.new(x=>5).perl 11:55
evalable6 P.new(x => Any)
lizmat github.com/perl6/whateverable/issues/350
patrickb Is the above a bug?
m: class P {has $.x = 0; submethod BUILD() { #`[$!x] }}; say P.new(x=>5).perl 11:56
evalable6 P.new(x => 0)
AlexDaniel r: say 42 11:58
perlbot AlexDaniel: 42␤
AlexDaniel patrickb: talk to perlbot instead
patrickb AlexDaniel: Thanks! 12:00
pmurias abraxxa: if Perl 6 gets ported to the graalvm, once graalvm works on wasm we could use that too 12:27
patrickb lizmat: wrt the Parameters subclassing problem from yesterday, is that intended? Should I rakudobug? 12:46
lizmat please rakudobug :-)
patrickb github.com/rakudo/rakudo/issues/2829 12:55
lizmat: ^
guifa What’s the difference between <.foo> and <foo> when using an always succeed assertion? 13:03
sena_kun I remember that one is capturing and the second is not. 13:05
but I am not sure, let me check...
guifa Ah yeah, that’s what it is 13:06
sena_kun also, `.foo` cannot be used outside of the grammar.
m: my regex a {'a'}; say 'a' ~~ /<a>/;
evalable6 「a」
a => 「a」
sena_kun m: my regex a {'a'}; say 'a' ~~ /<.a>/ 13:07
evalable6 (exit code 1) No such method 'a' for invocant of type 'Match'. Did you mean 'at'?
in block <unit> at /tmp/QPcbKYkZFS line 1
guifa I’ve been writing all of my actions purely via make/made so no instantiation is necessary, so I definitely need it to capture ha
sena_kun m: grammar A { token TOP {<a>}; regex a {'a'} }; A.parse('a').say
evalable6 「a」
a => 「a」
sena_kun m: grammar A { token TOP {<.a>}; regex a {'a'} }; A.parse('a').say
evalable6 「a」
sena_kun so the method form cannot be used outside of grammar and is not captured. 13:08
guifa sena_kun++
pmurias vrurg: hi 13:56
vrurg pmurias: Hi! Just've merged your PR. Thanks!
pmurias vrurg: would it make sense to turn the tie used with NQP::Config into a regular object? 13:58
s/tie/tied hash/
vrurg: I saw the github issue respons 14:00
* response
vrurg Oops, I answered on your ticket, but only now comprehended what you mean. Still, the answer is correct.
tie was needed to minimize the initial changes in Configure.pl. Not really needed anymore. OTOH, why not?
And NQP Configure.pl is still using it, though it's just three lines of code. 14:03
pmurias it's not a significant thing, just makes the code a tiny bit more plain 14:04
pmurias vrurg: paste.debian.net/1076830/ - I get this error when trying to build things as specified in the email 14:10
vrurg Can you delete nqp/ and try again? 14:14
It cold happen if you previously ran Configure without github-user. 14:15
cpan-p6 New module released to CPAN! License::SPDX (3.5.1) by 03JSTOWE 14:20
vrurg pmurias: After a bit of thinking, I'll get rid of tie today if have time. 14:31
tony-o guifa: do you use blead ? 16:09
lizmat weekly: www.khanate.co.uk/blog/2019/04/09/p...ly-week-3/
notable6 lizmat, Noted!
tony-o guifa: i implemented with [FROM|TO]-ZERO 16:10
tony-o re:rounding 16:10
guifa tony-o I don’t but I can look into switching to it 16:11
tony-o are you using rakudobrew?
i need to write tests for it before i submit a patch
and make sure i didn't break anything
guifa heads to rakudobrew 16:13
lizmat clickbaits p6weekly.wordpress.com/2019/04/08/...aking-off/ 16:16
tony-o clickbaited 16:17
makes me think i should be on twitter 16:18
scimon It's something of a cesspool but it has it's good points. 16:23
And I'm getting some good feedback on Brexit at the moment. 16:24
Which is helping my sanity.
tony-o good in which direction? 16:38
guifa tony-o want me to go ahead and build moar-blead or should i wait for you to make the tests? (I’m happy to help write tests, too) 16:41
tony-o i don't have anything in blead yet for the rounding, here is an initial crack at the tests gist.github.com/tony-o/7fc00f98002...d16a74b3cb 16:52
(that's a WIP, not sure i even hae the values correct yet) 16:54
guifa I was just about to say I found one that was off ha 16:55
sena_kun El_Che, ping? 17:46
tyil stupid bot 18:19
cpan-p6_ New module released to CPAN! URL (0.2.0) by 03TYIL 18:38
Seance[m] Can someone explain to me what "Use of Nil in string context" means exactly 19:25
guifa That means that a variable that you tried to use where you need a string had a value of Nil
guifa Check each variable / method call and see if any of them are actually Nil 19:27
lizmat mm: say ~Nil
m: say ~Nil
evalable6 Use of Nil in string context

in block <unit> at /tmp/Yd5gvc7klF line 1
Seance[m] Thank you 19:30
discord6 <Tyler (Aearnus)> What's the rationale behind not having ~Nil eq 'Nil'?
<Tyler (Aearnus)> (ala JS's undefined) 19:31
ugexe because the string "Nil" is true?
Xliff If I "require" modules in a BEGIN block, will they be in scope at run-time? 19:32
guifa Any call to Nil generates more Nil. That means if you call Nil.Str, you get Nil, which can’t be stringified 19:33
lizmat Xliff: don't think so, if they are in a block
Xliff: fortunately, you can also BEGIN a statement
Xliff OK. So I'd have to preserve whatever type objects that are defined in a global? 19:34
Or BEGIN require ::($ = 'blah')
lizmat the latter, I would think ? 19:35
Xliff OK.
ugexe of course that is not robust if you are using it for loading something that might not exists (instead of something you know will always exist alongside the calling module)
Xliff ugexe: Well... the "require ::($ = 'blah')" thing seems to be working, so thanks for that. 19:40
ugexe: In this situation, that module BETTER exist. It just isn't loaded.
If I get a failure, that's a fatal exception.
ugexe right, thats fine. for a plugin system though, or for e.g. optionally loading IO::Socket::SSL not so much 19:41
Xliff No. This is not "optional" loading. Consider it more "late" loading. 19:42
But I want that loading to happen as soon as possible.
ugexe one thing to consider
Xliff However, I grok what you are saying. Thanks!
ugexe module loading is not thread safe
discord6 <Tyler (Aearnus)> > <guifa> Any call to Nil generates more Nil. That means if you call Nil.Str, you get Nil, which can’t be stringified Makes sense, thanks!
Xliff 'k
This is not multi-threaded.
tony-o guifa: putting some commits together 19:44
guifa Of course, if you really wanted Nil to stringify to Nil…
ugexe too bad you werent able to golf the ::($ = ...) thing though... i never could
guifa p6: my $a = Nil but ‘Nil’; say “I can print $a!” 19:45
evalable6 I can print Nil!
tony-o guifa: you have any updates for that test? 19:54
guifa tony-o I double checked the values and added about two tests. How extensive should I go? A couple of extremely large numbers? Or do you think staying in the -20 < $x < 20 range is sufficient? 20:01
tony-o the world is your oyster
i've only implemented for Real
guifa Ah, I may add some that do integer with round(10) 20:02
afk for a sec, plumber is here (neighbor has a huge water leak :( ) 20:03
discord6 <Tyler (Aearnus)> is it possible to parametrize a subset and a class like you can parametrize a role? 20:09
sena_kun what's the purpose? 20:15
ugexe m: role Foo[$param] { has $.foo = $param; }; say Foo[420].new.foo 20:18
evalable6 420
sena_kun m: class Foo[$type] {} 20:19
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ZuBhztIG3M
Unable …
sena_kun, Full output: gist.github.com/e558ebd673751c0de1...fc77747589
guifa tony-o: there’s a few more on here + double checked values (may want to trip check them), I think hitting some giant numbers and 0 should about cover it. 20:37
gist.github.com/alabamenhu/1dce8f5...04967e98e2
Xliff m: multi sub a(1) { say "One" }; multi sub a(42) { say "Fourty Two"; }; multi sub a(Int $a) { say $a; }; a(1); a(2); a(42); 21:42
evalable6 One
2
Fourty Two
Xliff Anyone know what this means: "Cannot invoke object with invocation handler in this context" 21:46
lizmat Xliff: feels like a bug in core 21:52
if you're programming pure Perl 6, that error shouldn't happen, I don't think
in any case, the error is LTA
Xliff Ah. That's going to be difficult to bug. Particularly because it's beyond my ability to golf, ATM 21:55
Will try anyway.
To bug.
lizmat: Also to note, this is nativecall. It may not be considered pure Perl6. 21:56
lizmat ah, then you should be glad you didn't segfault :-)
Xliff Interestingly enough, I cannot find that string in source. 21:57
lizmat: No kidding! :)
lizmat Xliff: pretty sure that lives in nqp
sena_kun m: sub a { 1 }; sub b($a) { say $a }; a() ==> b;
evalable6 1
sena_kun ==> does what I am thinking it does, right? chains subs and nothing more and that's okay? 21:58
Xliff sena_kun: Isn't that the feed op?
sena_kun sub a { 1 }; sub b($a) { say $a }; b <== b;
it is
m: sub a { 1 }; sub b($a) { say $a }; b <== b;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/SmJtUbeTPP
Unable …
sena_kun, Full output: gist.github.com/2441b3eafcc16a329d...6f641ee1bd
sena_kun m: sub a { 1 }; sub b($a) { say $a }; b <== a;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/yHlK7G_ckZ
Unable …
sena_kun, Full output: gist.github.com/1ecb5fd9925ecdd723...5ef6f27c90
sena_kun m: sub a { 1 }; sub b($a) { say $a }; b <== a();
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/8B8wybD_nZ
Unable …
sena_kun, Full output: gist.github.com/3d3644c118bcedf587...3a18b0b7a4
sena_kun um
m: sub a { 1 }; sub b($a) { say $a }; b() <== a; 22:00
evalable6 1
Xliff lizmat: Actually, it's Moar. frame.c:1795
lizmat perhaps check on #moarvm ? 22:01
that's above my paygrade :)
Xliff LOL! 22:04
Will do. Thanks.
tony-o 3what's your code look like Xliff ? 22:06
Xliff tony-o: I will have to gist. 22:07
tony-o guifa: failing those large number tests
guifa: ahh, due to a typo in expected (have positive numbers expected for the rounded negatives) 22:08
guifa ooops! that’s what I get for numbers that requiring three screens of horizontal scrolling 22:09
tony-o yea that output isn't pretty 22:10
implemented for Real and Rat
guifa tony-o +++ 22:11
tony-o guifa: github.com/rakudo/rakudo/pull/2831 22:38
AlexDaniel: i don't see anything in that request?
is my browser mucking up?
AlexDaniel tony-o: no, I just don't want somebody to click merge by accident 22:39
:)
tony-o ah - ty
AlexDaniel tony-o: also I have a big problem with this whole thing :) 22:40
tony-o you're in the camp of it being in a stats module?
AlexDaniel no, I'd prefer the proposal to go through the problem-solving repo github.com/perl6/problem-solving/ 22:41
just throwing some adverbs on top of an existing sub doesn't sound like a great idea in general. It may be justified in this case, but generally it's a red flag for me 22:42
tony-o ah, i may have mislead guifa in the request for rounding methods in that case
AlexDaniel not really, you did the right thing at the time :)
tony-o: officially, problem-solving is not a thing yet :D 22:43
the PR for it will be merged on April 15th
( github.com/perl6/problem-solving/pull/2 )
tony-o ah
AlexDaniel tony-o: colabti.org/irclogger/irclogger_lo...04-08#l148 22:44
tony-o missed that one i think due to my mucking around with aws 22:45
do you want to add me to that meta list? 22:47
AlexDaniel: ^ 22:51
AlexDaniel tony-o: yes, I think that's a good idea. File a ticket in github.com/perl6/problem-solving/issues and in the first post explain that other rounding methods are not currently available and why it's an issue, and then in the comment propose to add adverbs
tony-o ah, i can't add labels in that repo :) 22:56
AlexDaniel tony-o: what label do you want to add? Also, you want to be a responsible dev for `meta` tickets? Or did you mean that you want to be in the list of reviewers? 22:57
lucasb hello AlexDaniel! I'm trying to understand the purpose of the repo. "used for working on all issues that require discussion and/or consensus" so all language design issues and feature requests in the rakudo issues queue would (in theory) belong there? 22:58
AlexDaniel lucasb: yes
tony-o list of reviewers please AlexDaniel 23:00
Xliff Hmm... compling an app that uses a module with a bunch of need statements is taking an extraordinary amount of compile time. 23:09
Currently over 15 minutes.
Finally errored out after hitting the single module that was changed. 23:11
Xliff 18 minutes in to compile the module with the use statements from the command line. 23:31
And it's still not done, yet.
This smells like a regression. I don't remember this taking so long. Using optimal build order this module only takes 9 seconds to compile. 23:32
gist.github.com/Xliff/ce03bf24897d...14c35fd3d5 23:36
GTK module in question now linked at the beginning of the gist. 23:38
m: my $a = --> Int { 0; }; say $a() 23:48
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/9XouvFWeGD
Prefix …
Xliff, Full output: gist.github.com/92c614a434463b46c7...430456833b
Xliff m: my $a = -> --> Int { 0; }; say $a()
evalable6 0
Xliff m: my $a = sub returns Int { 0; }; say $a()
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/_6sHszwpOB
Missing…
Xliff, Full output: gist.github.com/cad0fdb8cc332f2d90...fd6b9d95a1
Xliff m: my $a = sub (returns Int) { 0; }; say $a()
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/AKz_A7SD4w
Invalid…
Xliff, Full output: gist.github.com/bd3859c9591f1a4157...672abb44c9
Xliff m: my $a = sub () returns Int { 0; }; say $a() 23:49
evalable6 0