»ö« 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.
00:00 reportable6 left, wildtrees left 00:01 reportable6 joined, ChanServ sets mode: +v reportable6 00:09 thundergnat left 00:37 mowcat left, molaf left 00:59 Xliff left 01:15 jaldhar left 01:16 jaldhar joined 01:21 jaldhar left, jaldhar joined 01:39 fake_space_whale joined 02:04 Manifest0 left, Manifest0 joined 02:30 Cabanossi left 02:41 Cabanossi joined
fake_space_whale Is there a inbuilt function like 'say' but that returns the thing passed to it. For example, if it was called echo then "echo(4) == 4" would be true. this sort of function can be very helpful during debugging, and while it is trivial to define it yourself, I was wondering if it was prebuilt 02:59
aearnus[m] m: 'hello'.say.say; 03:02
camelia hello
True
aearnus[m] huh, I thought that was how it worked...
03:11 jaldhar left 03:12 jaldhar joined 03:20 jaldhar left, jaldhar joined
aearnus[m] m: 'hello'.&{ .say }.say; 03:22
camelia hello
True
03:45 fake_space_whale left 03:54 hythm joined
Elronnd m: sub echo($x) { say $x; $x; } echo echo 5 04:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3sub echo($x) { say $x; $x; }7⏏5 echo echo 5
expecting any of:
infix
infix stopper
Elronnd m: sub echo($x) { say $x; $x; }; echo echo 5
camelia 5
5
aearnus[m] m: use MONKEY-TYPING; augment class Mu { method echo { self.say; self } }; 'hello'.echo.echo; 04:16
camelia No such method 'echo' for invocant of type 'Str'. Did you mean any of these?
chop
chr
echo
sech

in block <unit> at <tmp> line 1
aearnus[m] uhh? Isn't that supposed to work 04:17
04:32 mahafyi left 04:34 pilne left, mahafyi joined 04:48 hythm left 04:58 jaldhar left 05:15 Xliff joined 06:00 reportable6 left 06:04 reportable6 joined, ChanServ sets mode: +v reportable6 06:39 molaf joined 06:52 Xliff left
MasterDuke aearnus[m]: i think augment only works for new instances of classes, you'd need to recompose pre-existing ones 06:55
m: use MONKEY-TYPING; augment class Mu { method echo { self.say; self } }; Str.^compose; "hello".echo.echo;
camelia hello
hello
aearnus[m] MasterDuke: Is there an automatic way to recompose all classes which have the base class in its mro then?
MasterDuke aearnus[m]: i don't think so, but this is stuff i've only seen in the channel, not played with myself. i'd suggest searching the channel logs for '^compose' and see if you find anything interesting 06:57
aearnus[m] hmm will do. the idea of "getting every class which inherits from some other class" is 99% of the time totally XY'ed, but this is the 1% of times when i actually want that functionality, haha 06:58
MasterDuke yeah, i don't think it'll be easy, classes know who they inherit from, but not who inherits from them. oO(`Mu.^reverse-mro`) 07:01
07:16 ravenous_ joined
aearnus[m] is there an easy way to print columns? 07:16
(easier than printf'ing over a list, at least) 07:17
MasterDuke i'm not thinking of anything built it, but there are several table-related module 07:20
xliff[m]: you might be interested in github.com/rakudo/rakudo/commit/23cfe1c697 07:23
07:30 cpage left 07:31 rindolf joined 07:41 sjm_uk joined 07:54 obfusk__ left 07:55 obfusk__ joined 08:12 obfusk__ left 08:13 obfusk__ joined 08:16 rindolf left 08:22 S007 left, S007 joined 08:25 S007 left, S007 joined
Geth ecosystem: 86da237b1d | lukasvalle++ (committed using GitHub Web editor) | META.list
Add jsonhound to ecosystem

Add jsonhound "a system for parsing JSON data structures and identifying anomalies" (github.com/oposs/jsonhound) to ecosytem.
08:46
ecosystem: 32b78d0a9d | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
Merge pull request #464 from perl6/lukasvalle-patch-1

Add jsonhound to ecosystem
aearnus[m] what's the opinion on pushing binary-only modules to the module repository 08:47
09:02 Manifest0 left, Manifest0 joined 09:09 [Sno] left 09:11 [Sno] joined 09:13 holyghost joined
daxim comic.browserling.com/95 09:13
09:14 rindolf joined 09:25 leont joined 09:40 sjm_uk left
moritz aearnus[m]: I don't think the ecosystem is designed for that 09:43
tadzik :) 09:45
are compiled modules relocatable (across systems?) 09:46
nine tadzik: yes 09:47
moritz but not across rakudo versions, are they?
nine Actually there's really not much missing for supporting binary only modules
moritz: no, not across versions
09:49 domidumont joined
tadzik right 09:50
09:57 Black_Ribbon left 09:59 chloekek joined 10:03 hcit joined 10:20 cygx joined
cygx tadzik: precompiled modules aren't all that useful, though 10:21
10:21 ravenous_ left
cygx as far as I'm aware, you'd have to fix exact versions of all dependencies 10:21
but precompiled applications are another matter
that's something I'd like to see happening
AlexDaniel Juerd: hello 10:23
10:26 fake_space_whale joined
AlexDaniel Juerd: not sure if my PMs will arrive, so letting you know that you should now be able to comment on problem-solving issues :) 10:26
10:28 Kaiepi left 10:29 Kaiepi joined 10:36 nadim joined
nine cygx: precompiled libraries with dependencies are exactly what binary Linux distributions are good at handling 10:38
10:42 ravenous_ joined 10:47 sjm_uk joined
leont precompiled applications sound useful, yes 10:50
cygx nine: in conclusion, let's ship modules via the system package manager ;) 10:52
chloekek is working on that in case the system is NixOS 10:53
cygx leont: in principle, you can already do that if you implement all the logic yourself 10:56
eg github.com/cygx/p6-freezer/blob/ma...ecorder.p6 is how I record a list of modules a program needs
nine cygx: that's in fact how we install Perl 6 modules on our servers: build.opensuse.org/project/show/de...ages:perl6 10:57
cygx nine: correct me if I'm wrong, but I assume that means having to cut new releases every time a dependency gets a security fix? 10:59
nine cygx: yes. But that's quite trivial since the whole packaging process is automated. Makes deployment and having the same versions on all machines a breeze 11:00
chloekek What's the alternative? You can't just automatically download the latest version of every distribution, since that itself is a security problem.
(See the npm disaster that happens every other week.) 11:01
cygx freezing deps at application instead of library level 11:02
library Foo:ver<0.5> depends on Bar:ver<0.3.5..*>, and an application usinf Foo and Bar will depend on exact versions 11:04
chloekek If the package repository has those versions then that would work just fine. 11:08
11:10 ravenous_ left 11:12 cygx left
El_Che maybe is looking at "minimal version selection" algorythm golang uses useful 11:23
as a static compiled language it makes sense, so it could make sense if a perl 6 app bundles binary modules
github.com/golang/go/wiki/Modules#...-selection 11:25
11:29 cygx joined
cygx there's a lso supposed to be recommendation managers, which I imagine would correspond to a list of 'known-good' versions 11:31
El_Che well, it depends a little on what model you take. Recommendation managers make sense for shared modules 11:33
go goes for the app+modules packages, which is nice
I think that's a model that would appeal to people running apps written in dynamic languages 11:34
deploying perl/ruby/python in production is painfully sucky
(compared to java or go)
relocatable rakudo and binary relocatable modules could lead to a jar like deployment process 11:35
which would rock 11:36
cygx that's basically possible right now 11:39
I've written a proof of concept, it seems to work
I'm more ambitious than that
the goal is a single-file executable 11:40
when run, it unpacks resources to disk and loads bytecode directly from memory
there are still pieces missing to make that a reality
the jar-like thing can in pprinciple be done right now in 'user-space' 11:41
timotimo cygx: i fixed update_ops.p6 recently btw
11:42 lichtkind__ joined
cygx timotimo++ 11:42
11:45 lichtkind_ left
cygx ~~ 11:46
11:47 cygx left
El_Che does it include the runtime? 11:49
11:52 chloekek left 11:55 aborazmeh joined, aborazmeh left, aborazmeh joined 12:00 reportable6 left 12:05 reportable6 joined 12:20 aborazmeh left, mahafyi left 12:22 mahafyi joined 12:40 ravenous_ joined 12:42 kiwi_21 joined
kiwi_21 p6: $_ = 'a'; .say for m/a/, m/a/; .say for m/a/, m/b/; .say for m/b/, m/a/; 12:43
camelia 「a」
「a」
Nil
Nil
「a」
「a」
12:44 Ven`` joined 12:51 leont left 12:53 chloekek joined
kiwi_21 ah, got it, m/.../ doesn't just return the match object but also binds (not assigns) to $/ 12:54
12:54 kiwi_21 left
chloekek p6: $/.VAR.say; given 'foo' { m/o/; $/.VAR.say }; $/.VAR.say 12:55
camelia Nil
「o」
「o」
13:00 Kaiepi left, Kaiepi joined
timotimo m: Hello Perl 6 13:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3Hello Perl7⏏5 6
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
timotimo you think we could do better for this?
13:03 Kaiepi left, Kaiepi joined
chloekek Enclose any actual code inside <?perl6 ... ?> brackets and write any text outside of those to stdout. 13:05
Oh you mean the LTA error message.
timotimo yeah, the latter 13:06
i mean, Perl is actually a valid class 13:07
13:07 molaf left
timotimo Hello isn't though 13:07
but subs are allowed to be post-declared
13:07 nadim left
timotimo so the problem here is that Perl is a class, and that makes it definitely-not-a-sub 13:07
m: Hello World 6
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared names:
Hello used at line 1
World used at line 1
13:09 pamplemousse joined 13:10 mowcat joined
chloekek Ah. 13:12
timotimo the "expecting any of:" list isn't especially readable to someone who just started out with perl6, tbh
*shrug* maybe someone will come up with something smart at some point 13:13
MasterDuke if you remember, i made a PR a while ago that removed those unless you'd done --ll-exceptions (or something like that), but it was rejected 13:14
timotimo now if we could somehow output what the recent text has been "parsed as" in a simplified format, that could perhaps be interesting 13:16
chloekek I think the message you want here is something like: "can't apply Perl to 6 since it's not a sub but a class" 13:17
13:18 nadim joined 13:32 tellable6 joined, ChanServ sets mode: +v tellable6 13:35 lizmat joined 13:46 nadim left 13:48 evalable6 left 13:49 evalable6 joined 14:04 Ven`` left 14:11 ravenous_ left 14:12 ravenous_ joined 14:17 Ven`` joined 14:22 lucasb joined 14:23 Cabanossi left 14:29 Cabanossi joined 14:40 pilne joined, chloekek left 14:49 evalable6 left 14:52 evalable6 joined, ChanServ sets mode: +v evalable6 14:55 khisanth_ left 14:59 nadim joined 15:02 leont joined 15:06 nepugia joined 15:08 khisanth_ joined 15:11 sjm_uk left 15:16 ExtraCrispy joined, ExtraCrispy left 15:18 nadim_ joined 15:21 nadim left 15:25 zakharyas joined 15:34 Sgeo__ joined 15:37 Sgeo_ left 15:52 evalable6 left 15:56 evalable6 joined, ChanServ sets mode: +v evalable6 16:00 mhasch joined
mhasch Hi p6 crowd, where would be a good place to discuss Perl 6 language features? I take it the rakudo issue tracker on github is more about compiler issues. 16:06
moritz mhasch: here 16:07
16:10 dogbert17 joined 16:11 aborazmeh joined, aborazmeh left, aborazmeh joined
mhasch moritz: chat is nice and direct, but too telegram style. I'd rather elaborate a bit in an article somewhere. We could always chat later. 16:12
timotimo there's also the perl6-language (or so?) mailing list 16:13
16:15 Ven`` left
mhasch The mailing list perl6-language exists and looks appropriate. Also somewhat comatose. But I'll try that. Thanks. 16:20
timotimo i'm sure people are reactive when something does get posted 16:21
mhasch Yes, it is not necessarily bad if the language as such gets less discussion than implementation topics. 16:23
16:24 lembark left 16:31 ravenou__ joined 16:33 ravenous_ left
lucasb Maybe write a gist and share it here. Or create an issue in the PS repo. See the "language" issues: github.com/perl6/problem-solving/l...s/language 16:34
AlexDaniel mhasch: correct, problem-solving repo is what you're looking for 16:40
lucasb sorry for the "PS", I'm was lazy to type :) 16:42
also, s/problem-solving/proposals/ ? 16:43
Kaiepi idk, i've opened issues there that aren't so much proposals but rather "this needs to happen, but how should it be approached?" 16:46
AlexDaniel well, previously we had a little issue with people proposing things without really defining what the actual problem is, so… 16:47
lucasb understood. "proposals" doesn't catch all uses of the issue queue
and "rfcs" is already an overloaded term in the P6 history :) 16:48
16:50 MilkmanDan left
mhasch Ah yes, the problem-solving repo feels about right. I'll have to browse what has already been addressed there. If I chime in, I will try to be specific. 16:51
16:51 molaf joined 16:52 MilkmanDan joined
timotimo do you want to give us a brief preview of what you'll be addressing? 16:52
AlexDaniel mhasch: in a few words, what do you have in mind? Maybe I'll be able to point you into the right direction if there are existing efforts in that area
16:53 Black_Ribbon joined 16:56 evalable6 left
Kaiepi what did i miss with the language name changing situation over the past week? i couldn't really keep up with it for reasons 16:57
mhasch Of course. I'd like to talk about how the (numerical) type system could be made more suitable for computer algebra programming and at the same time safer to use. My main concern is how precise types (Int, Rat, FatRat) will happily eat all your memory unless used with great care.
Kaiepi interesting!
16:59 evalable6 joined, ChanServ sets mode: +v evalable6
moritz mhasch: are you aware that Rat automatically degrades to Float if the denominator gets too big? 17:00
El_Che moritz: maybe that does not falls under safely? 17:02
mhasch moritz: yes i am aware of that, but Rats can still explode like Ints, and for math purposes you need to catch overflows rather than switch to unprecise silently. 17:03
AlexDaniel Kaiepi: there's a PR github.com/perl6/problem-solving/pull/89 17:04
Kaiepi: feedback is welcome
(if anybody wants to review it seriously but can't because of the lock, let me know, I'll fix that for you)
timotimo didn't we just recently get something like $*PRECISION for rats? 17:06
AlexDaniel timotimo: yeah, but it's unlikely to get into the release
timotimo 'k 17:07
Kaiepi thanks
AlexDaniel mhasch: so, how big are your numbers?
lucasb R#3122
synopsebot R#3122 [open]: github.com/rakudo/rakudo/pull/3122 Introduce the $*PRECISION variable
AlexDaniel yeah, it's a useful change because people keep demaning non-floaty behavior :) 17:08
mhasch AlexDaniel: depends. But finite. Small fraction of RAM anyways.
AlexDaniel mhasch: I'm wondering because I don't remember any code eating memory just because Ints or Rats are growing too fast, but there's a lot of code out there that simply becomes really slow 17:10
mhasch Pull 3122 actually sounds not half bad. But, like I said, Rat denominar limit does by far bot catch all dangerous cases. 17:11
AlexDaniel and in general performance of Rats or huge Ints is not exactly fixable, something still needs to crunch all the numbers
Kaiepi the only input i have about the name change is even though i argued for the name change because of perl's reputation, i was still hesitant about it because we also lose the recognizability that comes with the name. but if marketed properly this could be a really good thing for the language 17:12
mhasch It is not a performance issue, it is a question of catching large numbers before your os starts panicking. 17:13
17:14 ravenous_ joined 17:16 ravenou__ left
mhasch AlexDaniel: Perl 6 behaves similar to python when numbers grow. The program (and everything else on your machine) slows down for sheer memory consumption. Not considered safe. 17:17
17:18 aborazmeh left 17:20 ravenous_ left, ravenou__ joined 17:22 Sgeo joined 17:24 Sgeo__ left
AlexDaniel mhasch: not exactly. Really big numbers still have relatively small memory footprint, it's just that operations with big numbers take time to finish. It doesn't affect anything else on your machine (well OK you can have a process crunching numbers 100% of a core, but that's about it). And what's unsafe about it, exactly? People still have to validate your input, so might as well check how big of a thing they received (you have to do 17:25
that for strings anyway, so why not for numbers)
17:28 CIAvash joined
timotimo i mean, we don't re-use big integers at the moment, so you end up with lots of copies 17:28
until the next GC run
MasterDuke well, the underlying big int object (in libtommath) can get large
timotimo which will happen earlier if you're working with many big, big, big integers 17:29
MasterDuke though we now track their size better for GC purposes than we used to
AlexDaniel timotimo: but you probably run into the same issue with small numbers too, and in fact it's probably easier to generate a bunch of small objects anyway? 17:30
timotimo if your number is hundreds of megabytes big, you'll eat up your ram with just a few operations 17:31
AlexDaniel why would you have a number that big
timotimo because you're a mathematician, physician, number theorist, whatever?
17:32 netrino joined
AlexDaniel ok, let me rephrase that 17:33
robertle but isn't it possible to create a really large FatRat by accident? even without being a mathmatician? just by multiplying up other rats where the denomniators are coprime-ish?
AlexDaniel where do you get that number from?
like a binary file that is hundreds of megabytes big, generated by something else?
I don't think this is the use case that mhasch is concerned about 17:34
timotimo robertle: i think adding is much more dangerous in that regard?
AlexDaniel robertle: not exactly 17:35
robertle yeah, quite possibly. I am thinking of cases like gauss elimination on a large matrix. a quite common thing to do. wouldn't the FatRats get really large quickly?
note that I think that may be a good thing, after all the alternative is to do the math wrong, but just saying that they can get large by doing math on them, not only by using large numbers as inputs to your maths... 17:36
AlexDaniel they'll be slow but not too big
robertle ok, I guess subjectively that feels like the same thing to me :) 17:38
tobs timotimo: not really. The denominator of a sum is the lcm of denominators worst-case and for a product it's the product of denominators, where the lcm is the best case.
mhasch It does not take much to get big numbers from small ones with just a few operations. Think 5 ** 5 ** 5 ** 5.
AlexDaniel mhasch: that's correct, and it'll take a lot of time to compute that 17:39
although in this case we just die with numeric overflow…
m: say 5 ** 5 ** 5 ** 5 17:40
evalable6 (exit code 1) Numeric overflow
in block <unit> at /tmp/xhAmgvk_rD line 1
camelia Numeric overflow
in block <unit> at <tmp> line 1
timotimo tobs: gets fantastic when you add up 1/n
tobs timotimo: or well, depends on how much you can cancel in the result, too...
AlexDaniel but it gets slow before that 17:41
m: my $x = 5 ** 5 ** 13
evalable6 (signal SIGHUP) «timed out after 10 seconds»
mhasch Oh, so we do have overflow exceptions. Last time I checked, the slowly grinding to a halt thing happened. I wonder what triggeres it? 17:42
timotimo no, that's just the bot
it kills everything that takes too long
AlexDaniel timotimo: see the previous eval
timotimo oh 17:43
but that's only for some operations i think?
mhasch Might be a simple check on the second ** argument though. Real life examples can be less obvious.
AlexDaniel mhasch: so the problem is that things can become slow? 17:45
17:45 camelia left
mhasch No. Slowliness is collateral, size is the issue. 17:46
17:46 camelia joined
camelia (timeout) 17:48
17:48 ChanServ sets mode: +v camelia
mhasch A FattishRat type limited to $FATTISHRATSIZE bytes perhaps, with an overflow exception. No exception, precise result. Exception, no result, but no harm done to the envirnment either. 17:49
AlexDaniel mhasch: now, I don't know how libtommath works exactly, but generally with every added bit you get twice the range. How come size could possibly be an issue?
mhasch AlecDaniel: Very easy. Coefficients of interpolation polynomials, say. 17:50
moritz the assumption is that if you use FatRat, you kinda know what you're doing, and take care of limiting sizes yourself
AlexDaniel and *even if* memory consumption was an issue, you still need to run things under ulimit if you're worried that they'll eat all your ram
moritz the problem is that if you add checks, then that slows down every operation, even in scenarios where you don't need them 17:51
mhasch AlexDaniel: Still not right. Ulimit kills my program, I want the operator to give me a result or say "bonk".
AlexDaniel check your inputs then 17:52
timotimo then you have to put the checks everywhere :\
moritz no
AlexDaniel no, only in places where this is relevant
moritz often when you implement an algorithm, you have a pretty good idea where your numbers grow
so you can do it much more intelligently than if the setting needs to insert it EVERYWHERE 17:53
mhasch Moritz: Yes, I was thinking along the lines of adding new types with slower but safer operations. 17:54
AlexDaniel now, if you suggested that it should be possible to cancel math operations midway from another thread, then I would at least understand that… but memory consumption? meh
timotimo we'll eventually get "throw an exception for another thread", but that won't be able to interrupt internal loops like what tommath would use to implement a lengthy operation 17:56
AlexDaniel yeah, but at least I would understand the concern
18:00 reportable6 left
moritz mhasch: you could implement that as a module. If it works and has many use cases, we could decide that it goes into the core setting 18:00
18:03 reportable6 joined
Kaiepi has anyone else been running into deadlocks that never used to happen before using at least release 2019.07.1 18:07
i can't post the main example of this i have since it's several thousand lines of code across several modules, but t/02-pod-valid.t in the docs repo also does this 18:08
t/02-pod-valid.t works when i set TEST_THREADS=1 fwiw 18:09
18:09 ravenou__ left
mhasch moritz: Modules are fine, of course. I still would like the attention of language designers, as some consequences of standard behaviour might not be fully understood so far. But ymmv. 18:12
18:14 ravenous_ joined
Geth doc: e8c3cfebf1 | (Ben Davies)++ | doc/Type/Metamodel/EnumHOW.pod6
Make a couple corrections to Metamodel::EnumHOW's type page

The example code for creating an enum directly using Metamodel::EnumHOW wasn't adding the Enumeration role to the new type, and .add_enum_value takes an instance of the enum itself, not a Pair.
18:16
synopsebot Link: doc.perl6.org/type/Metamodel::EnumHOW
18:16 cpan-p6 left
18:16 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 18:36 domidumont left
AlexDaniel m: say 42 18:36
camelia 42
18:36 evalable6 left 18:37 evalable6 joined
Kaiepi m: sub foo($p) { say CALLER::MY =:= $p }; foo MY 18:53
evalable6 False
camelia False
Kaiepi m: sub foo($p) { say CALLER::MY =:= $p<> }; foo MY
evalable6 False
camelia False
Kaiepi m: sub foo($p) { say CALLER::MY === $p }; foo MY
evalable6 False
camelia False
Kaiepi m: sub foo($p) { say CALLER::MY ~~ $p }; foo MY
evalable6 False
camelia False
Kaiepi argh
m: sub foo($p) { say CALLER::MY.WHICH =:= $p.WHICH }; foo MY 18:55
evalable6 False
camelia False
Kaiepi m: sub foo($p) { say CALLER::MY.WHICH; say $p.WHICH }; foo MY
evalable6 MY|U94739801515896
MY|U94739801515968
camelia MY|U63428736
MY|U63428808
18:55 ufobat joined
AlexDaniel uhhhh 18:56
evalable!! you're doing it wrong!
18:56 evalable6 left
AlexDaniel I'll turn it off for now 18:56
Kaiepi m: use nqp; sub foo($p) { say nqp::eqaddr(nqp::getattr(CALLER::MY.WHO, PseudoStash, '$!ctx'), nqp::getattr($p.WHO, PseudoStash, '$!ctx')) }; foo MY 18:57
camelia 0
Kaiepi ...wait a minute
m: my $foo = 1; sub foo { say CALLER::MY.keys }; foo 18:58
camelia ()
Kaiepi m: my $foo = 1; sub foo { say CALLERS::MY.keys }; foo
camelia ()
Kaiepi m: my $foo = 1; sub foo { say CALLER::.keys }; foo
cpan-p6 New module released to CPAN! Bailador (0.0.19) by 03UFOBAT
camelia ($=finish $=pod $?PACKAGE $/ &foo GLOBALish EXPORT $¢ $! !UNIT_MARKER $foo ::?PACKAGE $_)
Kaiepi m: my $foo = 1; sub foo { say CALLER::LEXICAL.keys }; foo
camelia ()
18:59 adu joined
Kaiepi m: my $foo = 1; sub foo { say CALLER::LEXICAL::.keys }; foo 18:59
camelia ($¢ $! $/ $=pod $_ $=finish &foo !UNIT_MARKER GLOBALish $foo EXPORT ::?PACKAGE $?PACKAGE)
Kaiepi m: my $foo = 1; sub foo { say CALLER::MY::.keys }; foo 19:00
camelia (!UNIT_MARKER ::?PACKAGE $! $foo $?PACKAGE &foo EXPORT $_ $/ $¢ $=finish $=pod GLOBALish)
Kaiepi m: sub foo($p) { say nqp::eqaddr(nqp::getattr(CALLER::MY.WHO, Map, '$!storage'), nqp::getattr($p.WHO, Map, '$!storage')) }; foo MY 19:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::getattr, did you forget 'use nqp;' ?
at <tmp>:1
------> 3etattr(CALLER::MY.WHO, Map, '$!storage')7⏏5, nqp::getattr($p.WHO, Map, '$!storage')
Kaiepi m: use nqp; sub foo($p) { say nqp::eqaddr(nqp::getattr(CALLER::MY.WHO, Map, '$!storage'), nqp::getattr($p.WHO, Map, '$!storage')) }; foo MY
camelia 0
Kaiepi m: sub foo($p) { say CALLER.WHO =:= $p.WHO }; foo MY
camelia False
Kaiepi m: sub foo($p) { say CALLER.WHO ~~ $p.WHO }; foo MY
camelia False 19:02
Kaiepi m: sub foo($p) { say CALLER.WHO.VAR }; foo MY 19:05
camelia PseudoStash.new((!UNIT_MARKER => (!UNIT_MARKER), $! => Nil, $/ => Nil, $=finish => (Mu), $=pod => [], $?PACKAGE => (GLOBAL), $_ => (Any), $¢ => Nil, &foo => &foo, ::?PACKAGE => (GLOBAL), EXPORT => (EXPORT), GLOBALish => (GLOBAL)))
Kaiepi m: sub foo($p) { say CALLER.WHO.VAR =:= $p.WHO.VAR }; foo MY
camelia False
Kaiepi m: sub foo($p) { say nqp::hllizefor(nqp::getattr(CALLER::MY.WHO, Map, '$!storage'), 'perl6') === nqp::hllizefor(nqp::getattr($p.VAR.WHO, Map, '$!storage'), 'perl6') }; foo MY 19:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::getattr, did you forget 'use nqp;' ?
at <tmp>:1
------> 3etattr(CALLER::MY.WHO, Map, '$!storage')7⏏5, 'perl6') === nqp::hllizefor(nqp::getat
Kaiepi m: use nqp; sub foo($p) { say nqp::hllizefor(nqp::getattr(CALLER::MY.WHO, Map, '$!storage'), 'perl6') === nqp::hllizefor(nqp::getattr($p.VAR.WHO, Map, '$!storage'), 'perl6') }; foo MY
camelia Type check failed in binding to parameter '<anon>'; expected Any but got BOOTContext (?)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: use nqp; sub foo($p) { say nqp::hllizefor(nqp::getattr(CALLER::MY.WHO, Map, '$!storage'), 'perl6') ~~ nqp::hllizefor(nqp::getattr($p.VAR.WHO, Map, '$!storage'), 'perl6') }; foo MY 19:08
camelia Type check failed in binding to parameter '<anon>'; expected Any but got BOOTContext (?)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
19:09 mhasch left
Kaiepi m: sub foo($p) { say $p.VAR.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY 19:10
camelia False
Kaiepi m: sub foo($p) { say $p.VAR.WHO.Map }; foo MY
camelia Map.new(())
Kaiepi m: sub foo($p) { say $p.WHO.Map }; foo MY
camelia PseudoStash.new((!UNIT_MARKER => (!UNIT_MARKER), $! => Nil, $/ => Nil, $=finish => (Mu), $=pod => [], $?PACKAGE => (GLOBAL), $_ => (Any), $¢ => Nil, &foo => &foo, ::?PACKAGE => (GLOBAL), EXPORT => (EXPORT), GLOBALish => (GLOBAL)))
Kaiepi m: sub foo($p) { say $p.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY
camelia Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub foo(PseudoStash:U $p) { say $p.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY 19:11
camelia Type check failed in binding to parameter '$p'; expected PseudoStash but got MY (MY)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub foo(PseudoStash $p) { say $p.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY
camelia Type check failed in binding to parameter '$p'; expected PseudoStash but got MY (MY)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub foo(Map $p) { say $p.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY 19:12
camelia Type check failed in binding to parameter '$p'; expected Map but got MY (MY)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub foo(Mu $p) { say $p.WHO.Map eqv CALLER::MY.WHO.Map }; foo MY 19:13
camelia Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi ffs
m: sub foo(Mu $p) { my Map $my = CALLER::MY.WHO.Map; my Map $other = $p.WHO.Map; say $my eqv $other }; foo MY 19:14
camelia Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub foo(Mu $p) { my Map $my = CALLER::MY.WHO.Map; my Map $other = $p.Map; say $my eqv $other }; foo MY.WHO 19:15
camelia Type check failed in binding to parameter '<anon>'; expected Any but got Mu (Mu)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi ok it must be because there's something of type Mu in $!storage of CALLER::MY.WHO.Map or something 19:16
m: sub foo(Mu $p) { my Map $my = CALLER::MY.WHO.Map; my Map $other = $p.WHO.Map; say $my ~~ $other }; foo MY
camelia False
Kaiepi m: sub foo(Mu $p) { my Map $my = CALLER::MY.WHO.Map; my Map $other = $p.WHO.Map; say $other ~~ $my }; foo MY
camelia False
AlexDaniel Kaiepi: I mean… you can pm camelia :) 19:18
19:19 Sgeo left
Kaiepi lol yeah, that'd probably help 19:19
19:22 Sgeo joined 19:31 zakharyas left 19:40 mowcat left, adu left
Kaiepi m: use nqp; sub compare-package(Mu $p) { my $other := nqp::getattr($p.WHO, Map, '$!storage'); my $my := nqp::getattr(CALLER::MY.WHO, Map, '$!storage'); my $iter := nqp::iterator($my); my int $elems = nqp::elems($my); while --$elems { my $pair := nqp::shift($iter); return False unless nqp::existskey($other, nqp::iterkey_s($pair)) && nqp::eqaddr(nqp::atkey($other, nqp::iterkey_s($pair)), nqp::iterval($pair)) }; return True; }; say compare-package MY 19:44
camelia True
Kaiepi m: use nqp; sub compare-package(Mu $p) { my $other := nqp::getattr($p.WHO, Map, '$!storage'); my $my := nqp::getattr(CALLER::MY.WHO, Map, '$!storage'); my $iter := nqp::iterator($my); my int $elems = nqp::elems($my); while --$elems { my $pair := nqp::shift($iter); return False unless nqp::existskey($other, nqp::iterkey_s($pair)) && nqp::eqaddr(nqp::atkey($other, nqp::iterkey_s($pair)), nqp::iterval($pair)) }; return True; }; say compare-package OUR
camelia False
Geth problem-solving/path-to-raku: c5cb2c97fe | (Elizabeth Mattijsen)++ | solutions/language/PATH-TO-RAKU.md
Add mention of $*PERL and Perl class
Kaiepi this is really ugly, but since i'm already forced to use nqp for what i'm doing... 19:45
aearnus[m] <Kaiepi "this is really ugly, but since i"> what are you even trying to do there Kaiepi ?
I've read those snippets like 5 times and all I've gleaned is dark magic haha 19:46
Kaiepi i'm trying to compare MY from another context to CALLER::MY for an update to Type::EnumHOW 19:47
aearnus[m] huh
Kaiepi it does something hacky where it installs symbols for enums you create with it on composition, but it can only install lexical symbols if MY is passed as the package since it's not a slang and isn't aware of any other lexpads besides the current one 19:49
CALLER::MY, UNIT::MY, etc. won't work
but it doesn't have a very good way to check what package was actually passed
aearnus[m] ahh 19:50
This would mean a lot more if I knew what `::MY` was
Kaiepi MY is where lexical symbols end up
stuff you declare with my
aearnus[m] So I see! 19:51
Kaiepi m: use nqp; say nqp::hllizefor((1,2,3), 'nqp').^name 19:52
camelia List
Kaiepi damn
19:57 Sgeo_ joined
kawaii Hello Perl friends, I hope everyone is well. :) 19:59
AlexDaniel: my laptop arrives tomorrow so I think it's only fair we burn it in with a Blin run!
Put those 6 cores and 12 threads to good use 20:00
Kaiepi what do blin runs do?
lizmat roast the ecosystem
Kaiepi ahh
handy
kawaii Kaiepi: they test the module ecosystem against two different perl versions
i.e. a release vs HEAD
to tell us what we broke
20:01 Sgeo left
kawaii I'm also super excited to see how quickly my new laptop can comple Star 20:01
compile*
20:02 lichtkind__ left
MasterDuke kawaii: what cpu? 20:03
kawaii MasterDuke: 4.5 GHz i7-9750H 20:04
6 cores, 12 threads and a 12 MB cache
MasterDuke nice. i'm curious what parse time is for rakudo on it
Kaiepi i'm still pissed the usable cores on my laptop's cpu got cut in half because of spectre/meltdown 20:05
aearnus[m] ooh, that's a sweet cpu. got an SSD?
Kaiepi used to be able to use 8, now can only use 4
kawaii aearnus[m]: 512 GB NVMe :) 20:07
aearnus[m] Nice!!
kawaii Going to compile perl at hyperspeeds
aearnus[m] Kaiepi: twitter.com/whitequark/status/1162...81825?s=19
Kaiepi lmao 20:08
20:10 jcallen joined
Kaiepi m: use nqp; say nqp::ctxlexpad(nqp::getattr(MY.WHO, PseudoStash, '$!ctx')).^name 20:10
camelia BOOTContext
Kaiepi oh
i never needed to compare packages at all, i can just do that
m: use nqp; sub commit-a-sin { $*W.install_lexical_symbol: nqp::ctxlexpad(nqp::getattr(CALLER::MY.WHO, PseudoStash, '$!ctx')), 'ayy', 'lmao' }; sub bar { BEGIN foo; say ayy }; bar 20:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
Kaiepi m: use nqp; sub commit-a-sin { $*W.install_lexical_symbol: nqp::ctxlexpad(nqp::getattr(CALLER::MY.WHO, PseudoStash, '$!ctx')), 'ayy', 'lmao' }; sub ayy-lmao { BEGIN commit-a-sin; say ayy }; ayy-lmao
camelia BEGIN TIME EXCEPTION IS AT <tmp> at 1
EXCEPTION: Cannot find method 'symbol' on 'BOOTContext': no method cache and no .^find_method
5===SORRY!5=== Error while compiling <tmp>
An exception occurred while evaluating a BEGIN
at <tmp>:1
Exce…
Kaiepi damn it wants the QAST for the lexpad 20:14
20:15 ufobat left
aearnus[m] `sub commit-a-sin` ahahaha 20:16
Kaiepi this is by far the nastiest perl i've ever had to write 20:17
20:20 woolfy joined, woolfy left 20:21 woolfy joined
SmokeMachine Im trying to write a blog schema to use as a Red example... could someone take a look and comment how could it be better, please? github.com/FCO/BlogSchema 20:21
aearnus[m] not a comment on code quality or anything, just piping in to say that Red is really pretty 20:22
SmokeMachine aearnus[m]: thanks! :) 20:23
aearnus[m] what kind of magic do you have to do to get Rakudo to recognize `model` as a keyword? like in `unit module ...`
SmokeMachine aearnus[m]: it's just this: github.com/FCO/Red/blob/master/lib/Red.pm6#L34 20:26
20:27 huf left 20:28 woolfy left
aearnus[m] Just makes me realize how I really need to learn how the HOW works 20:28
kawaii Oh Red is first on the list of modules for me to try when I get my laptop and environment set up again but it looks scary and amazing at the same time :(
I have an old app using DBIish, maybe I'll try and convert it to Red as my first project 20:29
20:29 woolfy joined
SmokeMachine kawaii: why is it scary? 20:33
kawaii looks complicated :( 20:35
but I'll try figure it out!
SmokeMachine kawaii: really? It should be simple... :(
aearnus[m] The documentation just looked spotty that's what's stopped me
kawaii I'm not as smart as people think I am, it's probably a lot easier than I anticipate! 20:36
SmokeMachine aearnus[m]: yes, the documentation is terrible... (as my english...)
aearnus[m]: I really need some help to write the documentation...
kawaii: have you took a look on this blog example? 20:37
kawaii Yes! I somewhat understand it :)
aearnus[m] SmokeMachine: your English is really good though, I would have never noticed
And I'd be happy to contribute some documentation when I get around to trying it
SmokeMachine aearnus[m]: thank you! I'm looking forward your help! :) 20:38
kawaii: great! 20:39
20:40 Kaiepi left
MasterDuke SmokeMachine: going to the london perl workshop? 20:40
SmokeMachine MasterDuke: yes˜
MasterDuke cool
SmokeMachine MasterDuke: are you? 20:41
MasterDuke yep
SmokeMachine \o/ 20:42
El_Che it's before 31th october
so no need to take guns and antibiotics and a mad max outfit it seems
SmokeMachine MasterDuke: I was thinking of sending a talk propose... but I think I'll do a lightning one... 20:43
MasterDuke no *need*...but if you could why wouldn't you?
i would like to see a Red talk
SmokeMachine the last english one wasn't very good...
MasterDuke: I have to find out to talk about Red without showing so many code... 20:44
MasterDuke heh
SmokeMachine MasterDuke: have you seen the last one? 20:45
MasterDuke no. is it available somewhere?
SmokeMachine MasterDuke: yes, it is... I'm searching... 20:46
MasterDuke: www.youtube.com/watch?time_continu...iGz_9dvPeA 20:47
20:47 Kaiepi joined
aearnus[m] When's the next Perl meetup in the US? 20:47
20:47 ravenous_ left
kawaii I'll be at LPW too 20:47
aearnus[m] (or, perl6 specifically) 20:48
SmokeMachine kawaii: \o/
20:48 Kaypie joined
MasterDuke SmokeMachine: cool, i'll give it a watch 20:50
SmokeMachine MasterDuke: please, forgive my english... 20:51
After the talk I realised the way I wrote `Red ORM` on my slides looks something different... 20:55
any comment about the blog schema? 21:00
aearnus[m] As someone who doesn't know anything about Red, I found it really readable 21:02
I like how in the `model` you can do things like `is column .= now` to set it in one line automatically 21:03
SmokeMachine :) 21:05
21:10 sena_kun joined, pamplemousse left 21:11 stux|RC-only joined 21:12 sena_kun left
Kaiepi i think i'll need to make a slang for my Type::EnumHOW module and make it a v1.0.0 release 21:17
21:17 nepugia left
Kaiepi for a module that just makes it easier to make custom enums it has way too much hacky code that really belongs in the grammar 21:18
MasterDuke SmokeMachine: are everything in a map/grep on a result sequence converted into sql? 21:23
SmokeMachine Yes... everything it knows how to translate...
MasterDuke: for example: 21:25
MasterDuke: www.irccloud.com/pastebin/HvqUZ7K8/
21:26 huf joined
SmokeMachine MasterDuke: that SQL was generated by this: github.com/FCO/BlogSchema/blob/mas...log.p6#L92 21:26
MasterDuke what about stuff it doesn't know how to translate?
21:27 netrino left
SmokeMachine it should run the query it knows and than map/grep it... but it's not doing that yet... 21:27
MasterDuke: other thing is: you should never add side-effects on your map/grep... and that should be pure... 21:29
MasterDuke: what do you think about it? 21:47
22:03 fake_space_whale left
MasterDuke SmokeMachine: i find it intriguing. i actually really like writing sql, but i also like writing perl 6... 22:09
kawaii I like writing SQL too, or well, designing database schemas 22:11
Geth whateverable: 23c2ebbe23 | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Coverable.p6
Move misplaced `is copy` (oops)
22:13 epony left 22:14 nadim_ left
SmokeMachine I like SQL... but not have to think in SQL and use simple perl Seqs is better, IMO... 22:17
22:19 coverable6 left 22:22 coverable6 joined 22:23 Cabanossi left 22:28 Sgeo joined 22:29 Sgeo_ left 22:36 Sgeo_ joined 22:37 rindolf left, Cabanossi joined 22:39 epony joined, Sgeo left 22:48 coverable6 left 22:55 coverable6 joined, ChanServ sets mode: +v coverable6 22:57 coverable6 left 22:59 coverable6 joined 23:00 coverable6 left 23:03 leont left 23:06 coverable6 joined 23:08 coverable6 left 23:12 coverable6 joined, ChanServ sets mode: +v coverable6, coverable6 left, [particle] joined, [particle]1 left 23:13 coverable6 joined, ChanServ sets mode: +v coverable6
Geth whateverable: 31472879aa | (Aleks-Daniel Jakimenko-Aleksejev)++ | services/whateverable@.service
Start bots using a local path

This should “fix” gisted error messages.
23:15
23:15 coverable6 left 23:17 coverable6 joined, ChanServ sets mode: +v coverable6 23:19 [particle] left, [particle]1 joined
Geth whateverable: 4d8d9e7924 | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Coverable.p6
Fix coverable gists by removing bitrot

As suggested by the comments.
23:26
whateverable: 0900ceaf8d | (Aleks-Daniel Jakimenko-Aleksejev)++ | xbin/Coverable.p6
Remove accidental characters (oops)
23:27
23:27 coverable6 left 23:28 coverable6 joined 23:44 [particle] joined 23:45 vike left 23:46 [particle]1 left