Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-05-12

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 timotimo "now"?
00:05 andreoss how do i overload .gist method properly?
00:06 andreoss or whatever method needed to stringify class
00:06 timotimo what problem are you encountering? it should be enough to define a "method gist"
00:06 timotimo well, we have .Str, .gist and .perl
00:06 timotimo they differ in which thing will choose which
00:06 timotimo m: class Foo { method gist() { say "gist" }; method Str() { say "Str" }; method perl() { say "perl" } }; say Foo.new; print Foo.new;
00:06 camelia rakudo-moar 536c26: OUTPUT«gist␤True␤Str␤This type cannot unbox to a native string␤  in block <unit> at /tmp/LWoT1QxY8e:1␤␤»
00:07 timotimo oh my
00:07 timotimo m: print True
00:07 camelia rakudo-moar 536c26: OUTPUT«True»
00:07 timotimo m: print say "test"
00:07 camelia rakudo-moar 536c26: OUTPUT«test␤True»
00:07 timotimo that's ... weird
00:08 raydiak it's weird that say returns true?
00:08 timotimo no
00:08 andreoss may be my class needs to do Stringy?
00:08 timotimo the "cannot unbox to a native string" thing
00:08 andreoss or it would be overkill?
00:08 * raydiak really ought to start pressing pageup more often or chatting in a taller window
00:08 timotimo probably not, but you can implement a method "Stringy"
00:08 zengargoyle is it weird that you're say ing instead of returning a string from the methods?
00:08 andreoss timotimo: when such method will be used?
00:08 timotimo good question :S
00:09 timotimo in coercing stuff, i suppose
00:11 laouji joined #perl6
00:13 raydiak I'd bet, like zengargoyle said, something internal expects/requires .Str to return a string
00:14 timotimo some internal things expect .Stringy returns something that does .Stringy
00:14 Sysaxed` so, I've heard that perl6 will have some unicode operators by default, any reason why ≤ and ≥ are not supported?
00:14 timotimo good question
00:14 timotimo m: say 1 ≤ 5
00:14 camelia rakudo-moar 536c26: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7HnrEmEOMB␤Two terms in a row␤at /tmp/7HnrEmEOMB:1␤------> 3say 17⏏5 ≤ 5␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        stateme…»
00:15 timotimo m: my &infix:<≤> := &infix:«<»; say 4 ≤ 5
00:15 Sysaxed` timotimo: :)
00:15 camelia rakudo-moar 536c26: OUTPUT«True␤»
00:15 Sysaxed` yea, sure, I can define it myself if I really want
00:15 timotimo right
00:15 timotimo that'd be something to put into the speculations :)
00:15 TimToady well, where to draw the line...
00:15 Sysaxed` but why not default?
00:15 timotimo —————
00:16 dalek ecosystem: 6e72fb5 | cygx++ | META.list:
00:16 dalek ecosystem: Add DEBUG to the ecosystem
00:16 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/6e72fb5242
00:17 BenGoldberg m: class Foo { method Str() { True } }; say Foo.new;
00:17 camelia rakudo-moar 536c26: OUTPUT«Foo.new␤»
00:17 BenGoldberg m: class Foo { method Str() { True } }; print Foo.new;
00:17 camelia rakudo-moar 536c26: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/M9MpgZFVFi:1␤␤»
00:17 TimToady that's several lines, you really want ───── instead
00:17 timotimo right
00:18 raydiak why is there a line here?  it's not like we've made any attempt to avoid using up too many different characters :)
00:19 raydiak the grammar changes would be pretty simple, no?
00:19 laouji joined #perl6
00:19 timotimo yes
00:19 geekosaur doesn't even need a grammar change, just a setting change, I think? the question is basically how many things qualify as belonging in the core
00:19 BenGoldberg m: my &infix:<≤> := &infix:«<»; say 4 ≤ 4;
00:19 camelia rakudo-moar 536c26: OUTPUT«False␤»
00:20 TimToady yes, it's really just a decision about where to shout "bloat!"
00:20 BenGoldberg m: my &infix:<≤> := &infix:«<=»; say 4 ≤ 4;
00:20 camelia rakudo-moar 536c26: OUTPUT«True␤»
00:20 timotimo BenGoldberg: yeah, a somewhat important detail
00:21 BenGoldberg Would it slow things down too much have some sort of autoloading operators?
00:21 TimToady we added the quotes because people were starting to get interference from their clients smart-quoting things
00:22 TimToady in this case lazy loading wouldn't buy you much, since the symbol is about the only new thing, and you have to remember that to autoload it...
00:22 TimToady unless we had a general I-see-strange-Unicode lazy loader
00:22 Sysaxed` also I don't really see any obvious reason for begginers to understand why >= must be written this way rather than =>, and some people might type => when trying to reverse <=, hehe! Why not just create a possibility to throw it all away by allowing ≤ and ≥
00:23 TimToady well, they *do* have to learn what => means...
00:23 Sysaxed` who knows
00:24 TimToady unless you also give 'em ⇒ of course :)
00:24 Sysaxed` TimToady: if you're a guy who wants to crunch some numbers quickly, possibly without significant background...
00:25 Sysaxed` I don't know, maybe I'm exaggerating
00:25 Sysaxed` but when thinking "unicode operators" ≤ is the first thing that comes to my mind
00:25 geekosaur the flip side is most people still don't have fancy editors that will let them easily type ≥
00:25 Sysaxed` and ≥ is the second...
00:26 geekosaur and if you say "it should recognize >=" then all you've done is push your question into the editor instead of the language --- and the editor is probably worse equipped
00:26 Sysaxed` geekosaur: it is possible that some editors will attempt to replace stuff with unicode equivalents, giving instant feedback
00:27 Sysaxed` geekosaur: so are you saying that we should have no unicode operators at all?
00:27 geekosaur (the language has better understanding of syntax and has semantic knowledge the editor cannot)
00:27 TimToady well, arguably ≠ is the 0th one
00:27 Sysaxed` geekosaur: not by default, at least
00:27 geekosaur you seem to be arguing that we should prioritize the unicode operators
00:28 Sysaxed` geekosaur: not at all
00:28 geekosaur i.e. it's ">=" that should be the alien
00:28 geekosaur [11 20:22:48]  <Sysaxed`> also I don't really see any obvious reason for begginers to understand why >= must be written this way rather than =>, and some people might type => when trying to reverse <=, hehe! Why not just create a possibility to throw it all away by allowing ≤ and ≥
00:28 geekosaur this seems to imply that these operators are problematic and should not be considered primary
00:28 Sysaxed` hm
00:29 TimToady well, for sure C and math have a profound difference over the meaning of =
00:29 Sysaxed` no, I'm saying that an alternative could be there by default
00:29 Sysaxed` well, it could be there, I'm not sure
00:29 geekosaur use UnicodeSyntax;
00:30 geekosaur then it can also grow without requiring a perl6 release
00:31 timotimo the opposite of "use english"
00:31 dalek rakudo/nom: a5496e0 | TimToady++ | src/core/Failure.pm:
00:31 dalek rakudo/nom: plug a major leak of unhandled Failures
00:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a5496e0f10
00:32 TimToady that fixes the part of forest-fire that reports unhandled Failures
00:32 timotimo oh, neat
00:32 geekosaur once it stabilizes, it can be considered for inclusion in the core
00:32 timotimo did you check with rc-forest-fire from the perl6-bench repo?
00:32 timotimo because i recall that failing during my benchmark
00:32 TimToady no, I have my own copy
00:33 TimToady but that also has the (), problem in the middle, last I looked
00:33 timotimo OK
00:33 zengargoyle TimToady: speaking of funny characters, I saw a presentation where you were playing with a keyword -> kanji sort of thing.  is that code that can be seen online somewhere or a personal toy?
00:33 raydiak I'm still thinking whether those specific operators are dubbed worthy of inclusion or not, if this is a language for the "next 100 years" or whatever it was, we will sooner or later *need* to be able to grow CORE without this level of restraint and consideration required for even the tiniest, most un-bloated of additions
00:34 timotimo in 100 years, ram will be cheaper still that it is right now :P
00:34 dalek perl6-bench: 2f432a8 | TimToady++ | perl6/rc-forest-fire:
00:34 dalek perl6-bench: suppress Use of Nil in numeric context
00:34 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/2f432a8a6e
00:34 geekosaur I think it's entirely sensible to handle it by "starting" stuff in the ecosystem and transplanting into the core
00:35 geekosaur it works for plants...
00:35 TimToady zengargoyle: still a toy, alas, but I should maybe productize it for YAPC::Asia or so...
00:35 raydiak yeah that's fine, it's the problems that need to be considered when including in core that I'm worried about
00:36 TimToady raydiak: well, the whole point of making the core an outer lexical scope is that inner scopes can define things without worrying about core overriding them later
00:36 zengargoyle i'm thinking of making a similar thing in p5 for myself.
00:36 TimToady zengargoyle: well, it's written in p5 currently
00:36 TimToady but it's a bit of a mess
00:37 zengargoyle guessing kanjidic + kradfile + radkfile based?
00:38 zengargoyle maybe i'll just wait and let laziness provide. :)
00:38 TimToady well, the CJK database I typed in all by myself, though there are some auxilliary definitions from elsewhere for Japanese and Chaines
00:38 TimToady Chinese
00:38 raydiak TimToady: yes that's a perfectly valid solution to many instances of this problem, but you don't think CORE growth won't eventually be a problem if we don't do some sort of lazy loading or whatever?
00:39 TimToady as I said, laziness doesn't really help if you want to parse the symbols in order merely to install an alias
00:39 TimToady aliases don't really cost anything
00:40 TimToady it helps a lot more when there's a body that can be lazily loaded
00:40 TimToady if we could get the whole thing down to 512MB, then maybe we could run on a CHIP processor :)
00:42 timotimo TimToady: is there (or will there be) easily accessible recordings/data/whatever for the weekly blog readers to ingest from your appearance at collision?
00:43 pmichaud timotimo: I suspect that depends on the collision folks.
00:43 timotimo i know there's that thing with the app, but i don't really know how to talk to the readers about that
00:44 timotimo at osdc.no there was the hands-on perl6 with jnthn, iiuc
00:44 TimToady they certainly had a very impressive camera pointing at the stage, and great gobs of equipment off to the side
00:44 pmichaud yes, it went VERY well
00:44 pmichaud (hands-on perl6 with jnthn)
00:44 timotimo mhm
00:44 raydiak TimToady: not so worried about the semantics of the solution ("lazy *or whatever*")...was more wondering if you see the same problem in the distant future that I do, or if I'm just inventing problems :)
00:44 timotimo ah, i found the "perl6" tag on tha tpage
00:44 timotimo that'll be a good link target
00:44 pmichaud I've started inquiring with the yapc::na folks if there would be a way to squeeze in a reprise of that session in SLC
00:45 pmichaud (I'd be glad to run it.)
00:46 geekosaur remember that hardware advances pretty rapidly
00:46 pmichaud hmmm... my laptop computer has advanced hardly at all since I bought it.  :-P
00:47 pmichaud (surprisingly, I bought this laptop one day before my first trip to Oslo... which is where I am now.  I wonder if Oslo will be this laptop's last trip as well.)
00:49 laouji joined #perl6
00:49 timotimo TimToady: so was it you gave a talk at collision conf and then did a q&a with that twitter-related app?
00:49 TimToady yes, though that turned out kinda silly
00:50 timotimo were there many people who tried to make fun of the perl6 project? :)
00:50 TimToady nope
00:50 pmichaud most of what I've encountered since FOSDEM is people with growing respect for it.
00:51 Sysaxed` pmichaud: I'm not sure that it is the effect of FOSDEM. Perl6 has advanced significantly during the last year, at least that's how it feels
00:51 TimToady the most "make fun" was from a well-known Perl 5er, who asked if it really coming out this Christmas, to which the only appropriate response was, "Yep, this Christmas.  Ho, ho, ho!"
00:52 muraiki joined #perl6
00:52 pmichaud it was fun this last Friday to be able to challenge Simon Phipps' claim about Hurd being released before Perl 6.  :)
00:52 geekosaur I do know that one, for years my travel laptop was an iBook. its hard drive died a couple years ago
00:52 pmichaud (during our panel session at OSDC.no)
00:52 geekosaur (iBooks were infamous for needing to be torn down completely to replace the HD)
00:53 pmichaud it's very much time for me to get a new traveling computer.  I've been considering a hybrid laptop/tablet.
00:53 TimToady well, hopefully, even though DNF beat us out the door, we'll do better long term than they did
00:53 tony-o pmichaud: i use a surface pro 3 with debian/windows dual booted
00:54 zengargoyle how is the surface pro 3 with debian?
00:54 pmichaud tony-o: that's excellent to know!  I like the surface pro 3 but wanted to make sure I'd be able to get Linux working on it
00:54 timotimo at the GPW, perl6ers helped people who wanted to get started with perl6, too, right?
00:54 tony-o i actually love the sp3 with debian on it
00:55 tony-o i use it when i travel for work, it's compact and plenty powerful for work stuff (i do data warehouse consulting)
00:56 raydiak geekosaur: I dunno, not as impressed with raw performance hardware advancements these days, especially compared to perl 6's growth (I hope)...but hopefully my estimation is wrong, or it'll speed back up, or we'll slow down on features or something; guess I'll get back to more immediate concerns since nobody else seems worried :)
00:56 geekosaur I don't expect perl6's core to grow so fast that it will be a short term issue
00:56 geekosaur in general, you want the core to be small
00:56 tony-o pmichaud: you can definitely get linux on there, it needs to be a flavor that can do secure boot uefi
00:57 pmichaud I typically do kubuntu
00:57 tony-o so your '98 version of mandrake is probably not going to work :-)  - i have debian jessie + xfce
00:57 pmichaud (kubuntu is debian based, of course)
00:58 tony-o kubuntu is just ubuntu with kde as the default DE ?
00:58 zengargoyle did jessie install support uefi without pain?
00:59 pmichaud tony-o: yes.
01:00 BenGoldberg joined #perl6
01:00 spider-mario joined #perl6
01:00 tony-o yea - i originally tried stable but had to recompile the kernel with a bunch of drivers, jessie installed well the first time - the wifi drivers had to be installed separately but it was pretty painless
01:01 BenGoldberg joined #perl6
01:01 raydiak I just worry when we're talking about whether or not to include something so small and simple, makes me wonder if there isn't an unreasonable amount of resistance from whatever the performance issue is...but I guess since you want a small core, that resistance is probably good anyway
01:03 aborazmeh joined #perl6
01:03 aborazmeh joined #perl6
01:05 pmichaud adopting things into the core should have some amount of resistance and reflection, yes.
01:07 geekosaur raydiak, in this case it's more a matter of figuring out what we want and then doing it all at once instead of one-line additions every 3 days, I think
01:07 colomon joined #perl6
01:07 raydiak that makes sense, that'd make a mess in short order, I do that all the time :)
01:09 raydiak in case it wasn't obvious since nobody here actually knows me, when I go on these tangents, I'm just trying to understand, and to reconcile what I'm learning with what I thought I knew before...sometimes people think I like to argue or something which is absolutely not my intent (except when it is)
01:12 timotimo were jnthn's talks updated a lot from the last time he gave them?
01:12 pmichaud timotimo: not that I noticed.
01:13 timotimo OK
01:13 timotimo sadly, the pages don't have slides links ;(
01:13 pmichaud I think he just hasn't uploaded/linked them yet.
01:13 jdv79 is there a way to introspect applied roles?
01:14 jdv79 on a class or instance for example
01:14 pmichaud jdv79: do you mean as in "give me a list of roles applied to this class/instance?"
01:14 jdv79 yes
01:14 pmichaud one can certainly do    $foo ~~ Role     :)
01:15 pmichaud (that doesn't give a list, but it lets you know if Role has been applied somewhere.)
01:16 raydiak m: Str.^roles
01:16 camelia rakudo-moar a5496e: ( no output )
01:16 raydiak m: say Str.^roles
01:16 camelia rakudo-moar a5496e: OUTPUT«(Stringy)␤»
01:16 pmichaud m: say List.^roles
01:16 camelia rakudo-moar a5496e: OUTPUT«(Positional)␤»
01:16 pmichaud m: say Hash.^roles
01:16 camelia rakudo-moar a5496e: OUTPUT«(Associative)␤»
01:16 timotimo m: say (Hash but Str).^roles
01:16 camelia rakudo-moar a5496e: OUTPUT«Cannot mix in non-composable type Str into object of type Hash␤  in block <unit> at /tmp/68hm4YY_xv:1␤␤»
01:16 jdv79 oh, duh.  should have just tried that.  i was searching docs instead:(
01:17 timotimo m: say (Hash but IO::Socket::INET).^roles
01:17 camelia rakudo-moar a5496e: OUTPUT«Cannot mix in non-composable type IO::Socket::INET into object of type Hash␤  in block <unit> at /tmp/VOPbnZJ08C:1␤␤»
01:17 timotimo oh
01:17 timotimo those are not roles m)
01:17 raydiak m: say Buf.^roles
01:17 camelia rakudo-moar a5496e: OUTPUT«Method 'roles' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/uvtM0AI4rI:1␤␤»
01:17 timotimo it seems my brain is trying to fall asleep already
01:17 raydiak heh, sure, you can get the list as long as it's only one item :P
01:17 pmichaud say FlatSupply.^roles
01:18 pmichaud m: say FlatSupply.^roles
01:18 camelia rakudo-moar a5496e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0Son8xVEGd␤Undeclared name:␤    FlatSupply used at line 1␤␤»
01:18 oetiker joined #perl6
01:21 araujo joined #perl6
01:23 rba_ joined #perl6
01:30 andreoss joined #perl6
01:31 andreoss http://fpaste.org/220855/14313942/
01:31 andreoss what's wrong with this code?
01:31 andreoss it segfaults for me
01:32 TimToady try changing to 'has Block $.code;'
01:33 TimToady by default you can't initialize private attributes through the public interface
01:33 geekosaur probably shouldn't segfault in any case
01:33 TimToady you can still call it with $!code
01:34 TimToady though that should probably be $!code(|@a)
01:35 TimToady or method exec(|a) { $!code(|a) } for the most generality
01:36 TimToady 'course if it's a public attribute, you can just say $f.code()(1,2,3) too
01:36 TimToady I agree it shouldn't segfault
01:38 dayangkun joined #perl6
01:39 TimToady we also need to find a better way of warning that the code arg isn't used
01:42 andreoss i also receive errors about &!code, even if &.code is used
01:45 andreoss http://fpaste.org/220861/39513014/
01:46 andreoss why the dereferencing is needed here?
01:48 andreoss probably wrong choice of sigil
01:49 andreoss m: my &x = -> $a {$a.perl}; say &(&x)(1);
01:49 camelia rakudo-moar a5496e: OUTPUT«1␤»
01:49 tony-o https://gist.github.com/to​ny-o/2b309e70ed16867e0849
01:49 tony-o andreoss: ^
01:51 tony-o m: $x = -> $a { $a.say; }; $x(5);
01:51 camelia rakudo-moar a5496e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cBaEeaxX2D␤Variable '$x' is not declared␤at /tmp/cBaEeaxX2D:1␤------> 3<BOL>7⏏5$x = -> $a { $a.say; }; $x(5);␤»
01:51 tony-o m: my $x = -> $a { $a.say; }; $x(5);
01:51 camelia rakudo-moar a5496e: OUTPUT«5␤»
01:51 dalek roast: e476c69 | (Justin DeVuyst)++ | S06-currying/assuming-and-mmd.t:
01:51 dalek roast: Tests for RT #77520 & RT #125155.
01:51 dalek roast: review: https://github.com/perl6/roast/commit/e476c69542
01:51 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=77520
01:51 TimToady you can say &!code()(1,2,3) as well
01:52 TimToady the first one is just because &!code and &.code are really method syntax, so the first () is passing zero args to that
01:52 TimToady (&!code)(1,2,3) would also work
01:52 timotimo "ignoremark" support is in branches right now, right?
01:53 tony-o m: class A { has $.a; method go(*@a) { &$.a(@); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:53 camelia rakudo-moar a5496e: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method go at /tmp/1mmGqQugIm:1␤  in block <unit> at /tmp/1mmGqQugIm:1␤␤»
01:53 andreoss $.code.(...)  what does the second dot do?
01:53 tony-o m: class A { has $.a; method go(*@a) { $.a.(@); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:53 camelia rakudo-moar a5496e: OUTPUT«[]<>␤»
01:53 tony-o m: class A { has $.a; method go(*@a) { $.a.(@a); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:53 camelia rakudo-moar a5496e: OUTPUT«[1, 2, 3]<>␤»
01:53 TimToady oh, that's just another way to defeat the $.foo() syntax
01:53 tony-o yea
01:54 andreoss m: my $x = -> $a {$a.perl}; say $x(1); #no dot here
01:54 camelia rakudo-moar a5496e: OUTPUT«1␤»
01:54 andreoss m: my $x = -> $a {$a.perl}; say $x.(1); #
01:54 camelia rakudo-moar a5496e: OUTPUT«1␤»
01:54 tony-o it's telling it that $.a() isn't a call to a self.method() and it's basically a nicer looking &($.code)(args)
01:54 TimToady $.foo() is a special form, but $foo() isn't
01:55 tony-o m: class A { has $.a; method go(*@a) { &($.a)(@a); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:55 camelia rakudo-moar a5496e: OUTPUT«[1, 2, 3]<>␤»
01:55 TimToady most of the time people just want a virtual $.foo and don't really think about the fact that it's calling an accessor
01:55 TimToady but you've found the WAT corresponding to the DWIM :)
01:56 andreoss $.foo.bar() ~~ self.bar($.foo) ?
01:56 jdv79 isn't #105848 a dup of #77350?
01:56 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=105848
01:57 jdv79 only one link?  :(
01:58 * timotimo heads home
01:58 tony-o $.foo() means call self.foo() so doing $.code(<something>) is trying to call this.code(<something>) where code is a method of the class instead of the callable you stored in code
01:58 andreoss ok, now i get it
01:58 andreoss thanks
01:59 tony-o m: class A { has $.a; method go(*@a) { $.a(@a); }; method a(*@a) { "here".say; $.a.(@a); }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:59 camelia rakudo-moar a5496e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZmJrK_vPeF␤Missing block␤at /tmp/ZmJrK_vPeF:1␤------> 3(:a(-> *@R { @R.perl.say; })).go(1,2,3);7⏏5<EOL>␤»
01:59 tony-o m: class A { has $.a; method go(*@a) { $.a(@a); }; method a(*@a) { "here".say; $.a.(@a); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
01:59 camelia rakudo-moar a5496e: OUTPUT«(timeout)here␤here␤here␤here␤here␤here␤her​e␤here␤here␤here␤here␤here␤here␤here␤here␤here␤he​re␤here␤here␤here␤here␤here␤here␤here␤here␤here␤h​ere␤here␤here␤here␤here␤here␤here␤here␤here␤he…»
01:59 andreoss it explains why it complained about extra arguments
02:00 laouji_ joined #perl6
02:00 tony-o m: class A { has $!a; method go(*@a) { $!a(@a); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
02:00 camelia rakudo-moar a5496e: OUTPUT«Cannot find method 'Any'␤  in method go at /tmp/PSOmB_z98f:1␤  in block <unit> at /tmp/PSOmB_z98f:1␤␤»
02:08 noganex_ joined #perl6
02:30 rmgk joined #perl6
02:40 * timotimo published the weekly before he went home
02:43 raydiak look forward to reading it the next time I take a break :) timotimo++
02:46 timotimo bah. i've had it with gnome3
02:46 timotimo i wanted to give it a chance. i really did. but it's doing some things that are just unacceptable
02:50 BenGoldberg joined #perl6
02:55 tony-o i used fluxbox up until trying xfce a couple of months ago
02:56 raydiak used to love fluxbox, should give it another go, haven't in over half a decade...what are your deal-breakers with gnome 3 timotimo?
02:56 timotimo i have xfce4 on my laptop and used to have xfce4 on my desktop before i re-installed fedora
02:56 timotimo sometimes it will not let any mouse clicks or keyboard events through to applications unless i alt-tab around a bit
02:56 raydiak ew
02:56 timotimo the first thing i thought was that i OOM'd somehow
02:57 timotimo which would be consistent with the way perl6-bench is behaving right now in that terminal i had just sent a command to
02:57 timotimo .tell japhb i'm experiencing an extreme delay in both the compare and history subcommands of perl6-bench right now
02:57 yoleaux timotimo: I'll pass your message to japhb.
02:57 raydiak your input devices run on mana? :)
02:58 raydiak heh sorry couldn't help it, talking about fluxbox reminded me of my WoW days too
02:58 timotimo .tell japhb perl with the analyze command is now using 720 mb res, which i gather is more than usual? it's at 6 minutes cpu time now for 10 checkouts of nqp-moar
02:58 yoleaux timotimo: I'll pass your message to japhb.
02:59 timotimo ah, "out of mana", now i get it :)
03:00 kyclark joined #perl6
03:01 raydiak fits better than I realized...when it occurs, you can keep clicking but nothing happens
03:01 timotimo .tell japhb on the other hand, it may have something to do with the fact that all those timing files are about 140 megabytes in size each
03:01 yoleaux timotimo: I'll pass your message to japhb.
03:01 timotimo hehehe
03:01 timotimo spawn more overlords!
03:02 raydiak but my hive will have bled to death by the time another overlord spawns!
03:03 timotimo that doesn't seem plausible to me
03:03 timotimo buildings bleed to death if they're off creep, but hive generate their own creep
03:03 raydiak my starcraft days are longer ago than my WoW days
03:04 timotimo OK :)
03:04 timotimo i've played starcraft 2 on ranked 2v2 ladder with a friend for a while
03:04 raydiak I can be forgiven if the last time I played nobody had heard of SC2 yet? :)
03:04 timotimo but i never played the original
03:04 timotimo of course
03:05 raydiak didn't play against people much, I was kinda terrible at strategy games, didn't understand anything about balance until the last few years
03:06 timotimo i didn't play very well, either
03:06 timotimo but i do have a steady interest in Zero-K
03:07 raydiak I've seen you mention it a few times, thought I might try it out the next time I get a random inclination to be a gamer for a few days
03:08 timotimo it's not necessarily very easy to get into. there's a youtuber by the username of "shadowfury333" who casts matches regularly and he's got a few tutorial videos up as well
03:08 timotimo incidentally, he also casts achron matches, which is a thing i expect perl6 people to appreciate - at least the concept
03:09 raydiak what is it?
03:09 timotimo "meta-time strategy game"
03:10 timotimo basically you're a time-traveling AI and you can give your units orders in the future, past or present
03:10 raydiak oh that is awesome
03:10 timotimo but so's the enemy - at least in player-vs-player matches and a part of the story missions
03:10 timotimo it has its problems, though
03:10 raydiak time travel always does
03:11 timotimo no, in this case it's unit stupidity
03:11 timotimo the time traveling is pulled off pretty much flawlessly
03:12 timotimo there's a campaign mission that involves narrow corridors and the units i had were so ridiculously stupid ... they stepped on each others toes and through each "incarnation" of the time between me telling them to go somewhere and them reaching it, the order in which the units arrived was completely different, if they arrived at nearly the same time at all
03:12 timotimo incidentally, rakudo-moar's historical scores show that it went from 100 points at 2014-08-22 to 184.8 at 2015-05-11
03:12 timotimo that seems nice
03:13 timotimo but it was at 184.3 already at 2015-03-20
03:13 raydiak link?
03:14 timotimo it'll take some time to generate an html report
03:14 raydiak ah, n/m
03:15 timotimo i want the html report anyway
03:17 danstoner joined #perl6
03:18 * raydiak has thought we really need some kind of perl 6 programming game, like one of those ones where you write an AI to run in a VM against other programs, or control battling robots, or something
03:18 tadzik joined #perl6
03:20 timotimo http://t.h8.lv/p6bench/2015​-05-12-rakudo_history.html
03:21 timotimo may i suggest "rocket, paper, spacegoo"?
03:21 laouji joined #perl6
03:21 b2gills joined #perl6
03:21 timotimo https://bitbucket.org/divid​uum/rocket-scissor-spacegoo
03:24 raydiak interesting
03:24 timotimo there's a nice web frontend that animates fights between AIs
03:25 timotimo this is basically what i wrote JSON::Fast for :P
03:25 raydiak hehe
03:26 timotimo seriously, the speed of my bot was ridiculously bad
03:26 timotimo and json parsing was indeed the biggest chunk of run-time by far
03:27 timotimo i really wonder what made string-escape take such a drastic penalty
03:27 timotimo and rat_harmonic ...?!
03:27 timotimo .o( and for_push ?? )
03:27 timotimo .o( and while_int2str_native? )
03:28 timotimo er
03:28 timotimo .o( and while_int2str_concat_native? )
03:29 raydiak insertion-sort is the cute one, if you ask me
03:30 timotimo yeah, well ...
03:30 timotimo http://t.h8.lv/p6bench/2015-​05-12-rakudo_comparison.html
03:30 timotimo if you can make out any details in there, congratulations :P
03:31 timotimo i shall activate my swap partition for the next steps ...
03:33 * raydiak wonders if we could change the palette so newer perls are progressively brighter or something
03:33 timotimo go ahead :)
03:33 timotimo javascript basically means "source code included"
03:33 raydiak though what I'd really like to see is a 3D surface so we have an actual extra exis to play with :)
03:33 timotimo it'd even be possible to put a palette selector in
03:34 timotimo but metadata about versions may be missing that'd let you sort them by date reliably
03:34 raydiak yeah that JS especially, I already had to tear into the guts of the plotting lib to get done some of the work I did before
03:34 raydiak s/exis/axis/
03:34 timotimo okay, another 8gb of swap should be enough for this task :P
03:34 timotimo and i'm very thankful for your work, don't forget about that :)
03:35 raydiak thanks :)  I don't forget, but it's always nice to hear :)
03:35 timotimo are you aware of a library that'd give us 3d surface rendering?
03:35 timotimo or should we consider using gnuplot?
03:35 timotimo is there already some kind of "gnuplot killer" out there?
03:36 timotimo matplotlib doesn't really fit the exact same niche
03:36 timotimo D3 is allegedly really awesome, but also not 100% the same kind of thing
03:37 timotimo oh, i really ought to get some shuteye
03:37 timotimo talk to you again soon :)
03:37 raydiak nah tbh I don't know much about what's going on these days
03:37 raydiak g'night, sleep well, thanks again for the weekly :)
03:38 timotimo that's why we need the 24-year-old javascript hipster demographic on our side ;)
03:38 timotimo you're welcome :)
03:39 agentzh_ joined #perl6
03:43 raydiak heh I'm often mistaken for a 24-year-old, maybe I should study up and see if I can pass enough as a hipster to bring the light of Perl 6 to a few local college guys :)
03:44 ugexe .tell lizmat https://github.com/rakudo/rakudo/b​lob/nom/src/core/CompUnit.pm#L138 If you don't pass in $out, this will always be true. If you do pass in $out and $out !~~ $?FILE.moarvm (like somewhere in blib/lib), then has-precomp will always be false (even if it precompiled) and .precomp-path will give you the wrong result. Should method precomp-path be an attribute instead and then have a $.precomp-path = $
03:44 yoleaux ugexe: I'll pass your message to lizmat.
03:44 ugexe out somewhere in there?
04:00 agentzh_ joined #perl6
04:16 davido_ joined #perl6
04:26 laouji joined #perl6
04:28 Alina-malina joined #perl6
04:40 berekuk_ joined #perl6
04:49 laouji_ joined #perl6
04:50 kaare__ joined #perl6
04:55 thou joined #perl6
04:56 quester joined #perl6
05:03 agentzh_ joined #perl6
05:14 fhelmberger joined #perl6
05:16 telex joined #perl6
05:22 silug joined #perl6
05:24 rindolf joined #perl6
05:27 andreoss joined #perl6
05:34 FROGGS[mobile] joined #perl6
05:35 FROGGS[mobile] timotimo: ignoremark is in master/nom
05:37 laouji joined #perl6
05:42 [Sno] joined #perl6
05:43 domidumont joined #perl6
05:48 domidumont joined #perl6
05:49 andreoss` joined #perl6
06:04 domidumont joined #perl6
06:06 [Tux] tony-o, au contraire. it slowed down :(
06:07 [Tux] wild guess: about 5%
06:07 18VAAC108 joined #perl6
06:09 espadrine_ joined #perl6
06:30 bjz joined #perl6
06:33 _mg_ joined #perl6
06:33 davido__ joined #perl6
06:38 laouji_ joined #perl6
06:40 grondilu I rewrote http://rosettacode.org/wiki/Mandelbrot_set#Perl_6 to be parallel (taking inspiration from https://github.com/colomon/mandelbrot/b​lob/master/bin/mandelbrot-parallel.pl).  It works but it's unconsistant from one run to an other (sometimes one line is missing).
06:49 g4 joined #perl6
06:49 g4 joined #perl6
06:54 abraxxa joined #perl6
07:00 jnthn morning, #perl6
07:01 moritz \o jnthn, *
07:06 FROGGS joined #perl6
07:06 FROGGS morning o/
07:07 jnthn grondilu: It's not going to fix the inconsistency, but here:
07:08 jnthn for @lines -> $promise {
07:08 jnthn say $promise.result;
07:08 jnthn }
07:08 jnthn could we
07:08 jnthn .say for await @lines;
07:08 grondilu I've tried await my @lines = ...  but that did not help.
07:08 rurban joined #perl6
07:09 zakharyas joined #perl6
07:09 grondilu for some reason sometimes a line keeps missing.
07:09 jnthn OK, I'll have to give it a try and see if I can figure it out.
07:09 jnthn But gotta teach in a moment
07:09 jnthn Poke me about it later this week if I forget :)
07:10 FROGGS ... or RT it Justin Case
07:11 grondilu it's a bit tricky to RT since it's not deterministic.
07:12 Ven joined #perl6
07:14 raydiak golf it and stick it in a loop that runs enough times to trigger it, maybe a while loop that checks for the failure or gives up after N seconds?
07:14 jnthn When you say miss a line do you mean it loses a whole line?
07:14 jnthn Or a line break?
07:15 grondilu a whole line apparently.
07:15 jnthn l'odd...
07:16 masak yes, please RT it. even if it's not deterministic.
07:16 grondilu when I pipe it to |display -, display complains about an unexpected EOF, and the picture shown clearly shows a black line at the bottom.
07:16 grondilu but sometimes it does not complain at all and the picture looks fine.
07:17 grondilu (with the same parameters)
07:17 jnthn *nod*
07:17 jnthn I don't see anything wrong with the program.
07:29 bjz joined #perl6
07:30 Ven joined #perl6
07:31 domidumont joined #perl6
07:32 grondilu joined #perl6
07:35 * grondilu is trying yaaic and likes it :-)
07:36 FROGGS grondilu: yeah, it got quite better recently
07:39 FROGGS jnthn: when we want to support 'use Unicode:ver<6.3>', could we re-register the nqp ops and perhaps provide the v6.3 database in an extops like way?
07:40 FROGGS jnthn: I mean, we have graphemeiters and other things that are hard wired to the built-in unicode database... I wonder how we could lexically hook in
07:45 fhelmberger joined #perl6
07:47 andreoss joined #perl6
07:50 darutoko joined #perl6
07:50 lizmat joined #perl6
08:05 RabidGravy joined #perl6
08:06 RabidGravy marning
08:08 FROGGS mornang
08:08 Isp-sec joined #perl6
08:11 masak murnong
08:12 masak m: my @vowels = <a e i u o>.pick(2); say sprintf "m%srn%sng", |@vowels;
08:12 camelia rakudo-moar a5496e: OUTPUT«murnang␤»
08:14 quester left #perl6
08:16 larion joined #perl6
08:19 xinming joined #perl6
08:20 ab5tract joined #perl6
08:23 lizmat good *, #perl6!
08:23 yoleaux 03:44Z <ugexe> lizmat: https://github.com/rakudo/rakudo/b​lob/nom/src/core/CompUnit.pm#L138 If you don't pass in $out, this will always be true. If you do pass in $out and $out !~~ $?FILE.moarvm (like somewhere in blib/lib), then has-precomp will always be false (even if it precompiled) and .precomp-path will give you the wrong result. Should method precomp-path be an attribute instead and then have a $.precomp-path = $
08:23 lizmat timotimo++ for the P6W
08:24 Ven joined #perl6
08:27 moritz timotimo++ indeed
08:28 masak timotimo++ # https://p6weekly.wordpress.com/2015​/05/12/2015-19-events-conferences/
08:28 masak URLs to the URL god!
08:31 inokenty joined #perl6
08:38 poul joined #perl6
08:48 Ven joined #perl6
08:50 espadrine_ joined #perl6
08:51 agentzh_ joined #perl6
08:59 diegok joined #perl6
09:01 dalek perl6-examples: f914072 | paultcochrane++ | categories/cookbook/05hashes/05-05traversing.pl:
09:01 dalek perl6-examples: [cookbook] sorting output for consistency between runs
09:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/f914072cb9
09:01 dalek perl6-examples: 69df9f3 | paultcochrane++ | t/categories/cookbook/05hashes.t:
09:01 dalek perl6-examples: [cookbook] add tests of 05hashes
09:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/69df9f3b8e
09:01 dalek perl6-examples: 29e89b2 | paultcochrane++ | categories/cookbook/07file-a​ccess/07-01opening_file.pl:
09:01 grondilu joined #perl6
09:01 dalek perl6-examples: [cookbook] specify input path independent of run location
09:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/29e89b2406
09:01 dalek perl6-examples: 9c379ca | paultcochrane++ | categories/cookbook/07file-a​ccess/07-01opening_file.pl:
09:01 dalek perl6-examples: [cookbook] remove commented-out code
09:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/9c379caac6
09:01 dalek perl6-examples: 0171709 | paultcochrane++ | t/categories/cookbook/07file-access.t:
09:01 dalek perl6-examples: [cookbook] add tests for 07file-access
09:01 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/01717098b9
09:02 grondilu found an interesting way of doing stuff in parallel and putting the results in an array:
09:03 grondilu .=result for my @jobs = do for ^100 { start {...} } }
09:04 FROGGS nice and short :o)
09:04 masak feels like using @jobs for two completely different purposes.
09:05 masak one of which should be called "@job", and the other maybe @results or something? :P
09:05 moritz my @results = (^100).map({ start {... }})>>.result
09:05 masak er, @jobs
09:05 masak moritz++
09:05 moritz should also work
09:05 grondilu we can assimilate both
09:06 bjz joined #perl6
09:07 grondilu arguably a job is both the action of working and the result.
09:07 FROGGS hmmm, in my understanding of 'job' it is not the result
09:08 moritz right
09:08 masak either way, you're doing yourself a disservice by ignoring the distinction.
09:09 moritz especially since .=result can die if one of the jobs failed
09:09 grondilu the thing is I don't really care about the Promises once they are kept, so I don't want to waste varnames for the.
09:09 moritz and aftewards, @jobs is a mixture of promises and results
09:09 grondilu *them.
09:09 masak moritz: good point.
09:09 moritz grondilu: then make it anonymous
09:10 masak architecturally, distinctions should be ignored only when doing so provides some neat unification, or abstracting helps see the bigger picture better.
09:10 FROGGS damn, just made a stupid thinko:
09:10 FROGGS is '"foo" ~~ /<$var>/', 'foo', 'string with metachars in assertion matches';
09:10 FROGGS # expected: 'foo'
09:10 FROGGS #      got: '"foo" ~~ /<$var>/'
09:10 FROGGS -.-
09:10 moritz FROGGS: :-)
09:10 rindolf joined #perl6
09:10 FROGGS it was in an eval before because the test I copied it from was a throws_like
09:11 FROGGS and I just stripped the EVAL :o)
09:11 * FROGGS .oO( Life is too short to loose five minutes )
09:13 masak they'll be the loosest five minutes of your life, though.
09:15 FROGGS hmmm, seems like I used it wrong all the time :S
09:19 Ven joined #perl6
09:22 masak FROGGS: it's a tricky one. just have to find a working mnemonic of some kind.
09:23 * masak .oO( you will lose the game 'cus of your loose-fitting shirts )
09:23 sergot_ hi #perl6 o/
09:23 sue_ joined #perl6
09:25 masak sergocie! \o/
09:29 FROGGS hi sergot
09:29 lizmat sightseesing&
09:30 dalek rakudo/nom: a7cf7ce | FROGGS++ | src/ (2 files):
09:30 dalek rakudo/nom: pass :ignoremark along in interpolations in regexes
09:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a7cf7cec10
09:31 dalek roast: c8d654c | FROGGS++ | S05-metasyntax/litvar.t:
09:31 dalek roast: add more tests for regex interpolation
09:31 dalek roast: review: https://github.com/perl6/roast/commit/c8d654c9c8
09:33 silug joined #perl6
09:42 Akagi201 joined #perl6
09:49 Ven joined #perl6
09:50 bjz joined #perl6
09:52 cschwenz joined #perl6
09:56 Ven https://twitter.com/meitham​/status/598028060546465792 Sooo, about that composition operator *g*
09:58 jnthn my @results = await (^100).map({ start {... }}); # why make it harder? :)
10:04 cygx joined #perl6
10:05 cygx o/
10:06 cygx is there a proper way for EXPORT subs of different modules to communicate with each other?
10:06 cygx I tried to use our-scoped variables, but failed
10:06 cygx in the end, I went with %*ENV, which, in this particular case, might even have been the Right Thing to Do
10:09 jnthn cygx: I think you'd better start with what you want to do.
10:09 jnthn cygx: Remember in Perl 6 we rely on separate compilation
10:10 jnthn cygx: It sounds like you're doing something that will make it impossible to pre-comp your module.
10:10 cygx jnthn: https://github.com/cygx/p6-debug
10:10 cygx assert from userspace with NDEBUG support
10:10 jnthn will look in a bit; gotta teach again
10:11 cygx jnthn: thanks, and have fun
10:16 _mg_ joined #perl6
10:41 [ptc] hrm, pod2html is chewing on RAM and CPU.  Is anyone else seen this?
10:42 [ptc] I've managed to track an example of the problem down to the pod2html call in t/02-code.t in Pod::To::HTML
10:42 [ptc] no idea what should have caused the problem though...
10:45 Ven joined #perl6
10:58 timotimo http://t.h8.lv/p6bench/2015-0​5-12-rakudo_nqp_history.html  http://t.h8.lv/p6bench/2015​-05-12-nqp_comparison.html  http://t.h8.lv/p6bench/2015-05-12-nqp_history.html
10:58 Ven joined #perl6
10:58 laouji joined #perl6
11:00 aborazmeh joined #perl6
11:00 aborazmeh joined #perl6
11:04 timotimo [ptc]: i stumbled upon it when my laptop OOM'd multiple times in a row while a panda was quietly sitting in the background rebootstrapping
11:05 sergot hi masak, hi FROGGS ! :)
11:05 yoleaux 6 May 2015 02:10Z <raydiak> sergot: https://github.com/sergot/io-socket-ssl/pull/11
11:06 sergot raydiak++
11:14 timotimo maybe someone wants to give http://perl6.guide/ a quick look-over and perhaps update one of these days
11:14 timotimo i wonder what those unicode features are that perl6 is missing that perl5 has
11:14 timotimo especially now that we have ignoremark
11:15 timotimo but adding examples.perl6.org would be a good thing
11:23 brrt joined #perl6
11:28 [ptc] timotimo: thanks for the links :-)
11:28 [ptc] timotimo: as soon as I get some time I'm going to do a git bisect to find out where the problem first turned up
11:29 timotimo sure :)
11:29 timotimo that'd be nice
11:29 timotimo it could very well be that there's some loop that turned into an infiniloop accidentally perhaps?
11:30 silug joined #perl6
11:33 domidumont joined #perl6
11:44 timotimo jnthn: http://t.h8.lv/p6bench/2015​-05-12-rakudo_history.html shows a few strange drops; maybe of interest to you?
11:46 timotimo jnthn: the last two dots are 2015.04 and Vladivostok-218-gf9c9822 for rakudo
11:46 timotimo jnthn: and here's more detailed spam^Wdata
11:46 timotimo http://t.h8.lv/p6bench/2015-​05-12-rakudo_comparison.html
11:46 agentzh_ joined #perl6
11:50 Ven hey
11:50 timotimo hi ven :)
11:52 * FROGGS is relieved that charrange_ignorecase is not slower but faster
11:53 FROGGS at some point I'm going to bench our regex engine and tune it a little
11:55 FROGGS jnthn: btw, what are the implications when I forgot to release a register in e.g. QASATRegexCompilerMAST?
11:56 FROGGS jnthn: there are a bunch where we Just Don't Do It™
11:56 FROGGS of places*
11:56 Humbedooh joined #perl6
11:57 timotimo FROGGS: i'd be interested to have a look at the code we generate in "the big picture"
11:57 timotimo i'm sure the individual blocks we "assemble" to build our regex code are pretty good, but maybe they could be stuck together more efficiently
11:57 timotimo (a job spesh should be able to do)
11:57 FROGGS hmmm
11:58 FROGGS good point
11:58 FROGGS no idea how to tackle that though
12:01 colomon joined #perl6
12:03 timotimo i suppose i could try to tackle it, i perhaps need someone/something to rubber-duck :P
12:03 jnthn FROGGS: Then we end up with more registers in the call frame than we need, 'cus we miss re-use opportunities.
12:07 laouji joined #perl6
12:08 pauluu joined #perl6
12:12 Hor|zon joined #perl6
12:19 domidumont joined #perl6
12:23 Ven joined #perl6
12:25 cognominal joined #perl6
12:27 cognominal timotimo++ for all the p6weekly
12:31 * timotimo will spend most of today demonstrating against "pegida"
12:31 Ven timotimo++
12:33 Sqirrel joined #perl6
12:33 timotimo thanks, cognominal :)
12:38 domidumont joined #perl6
12:39 cognominal timotimo, strange world where hate calls itself the right to blasphem but all sort of censorship get unnoticed.
12:43 masak people turn to xenophobia in times of hardship.
12:43 masak couple very stark examples in the past century.
12:44 masak a bit sad to see it happening now, in real time, with Islamophobia.
12:45 * brrt agrees and adds only one thing
12:46 brrt what is even stranger is that at one time people became xenophobic against jews, of all people not exactly the most warlike
12:46 brrt that i find even stranger to understand, in comparison to current forms of islamophobia
12:48 agentzh_ joined #perl6
12:49 grondilu still trying to debug the mandelbrot parallel thing, I wrote a version that behaves very weirdly.  Varius different errors and sometimes none at all.  All with @*ARGV == 20.
12:49 grondilu https://gist.github.com/gro​ndilu/3e4614619c0a1266079f
12:49 cygx masak: on the flip side, totalitarian ideologies shouldn't get a pass just because they are religious in nature
12:50 cygx accoring to the often cited 2013 Pew poll, support for the death penalty for apostasy can get as high as 88% (Egypt)
12:50 cygx *according
12:51 timotimo grondilu: in #perl6, i advise against writing something like @*ARGV == 20, unless you actually mean "there are 20 arguments on the commandline"
12:51 cygx they don't provide a global average, but if I did the calculations correctly, it works out to 40% of that ~1 billion muslims that are theoretically represented by that poll
12:51 cygx that's a worryingly high number
12:52 timotimo even then, it's not like muslims come to $central_european_country and suddenly use democracy to instate sharia law
12:52 grondilu timotimo: oh yeah
12:52 timotimo :)
12:53 rarara joined #perl6
12:53 timotimo i find the explanation quite plausible that pegida just attracted a bunch of people who were just dissatisfied with the doings of our politicians in general, who were just happy they had some big movement to hang onto to take to the streets
12:54 rarara this code: perl -MQuantum::Superpositions -e '$c = any([1,2],[3,4]); print eigenstates($c),"\n"; $c = $c->[0] < 3; print eigenstates($c),"\n"' print me nothing at the second line, while I would have expected it to print the first reference.. Is my expectation wrong? How is it in perl 6?
12:54 timotimo https://en.wikipedia.org/wiki/Pe​gida#Participants_and_supporters - check the third paragraph here to see what i mean
12:55 Ven timotimo: hey, just wanted to ask you if that "When EXPORT works, code like this will be possible:" part in adt.p6 is outdated now?
12:55 timotimo rarara: what does "the first reference" mean?
12:55 [ptc] timotimo: the problem with pod2html OOM-ing starts in Rakudo, commit 0fe9416 (Distinguish Nil from Empty)
12:55 timotimo Ven: probably is! just needs someone to implement the missing bits :)
12:55 rarara print eigenstates($c) the first time print me ARRAY(0xc4e148)ARRAY(0xc62c70), the second time nothing
12:56 rarara I would have expected ARRAY(0xc4e148)
12:56 Ven timotimo: aren't those bits implemented? https://github.com/timo/ADT/​blob/master/t/02-EXPORT.t#L4
12:56 timotimo rarara: i'd expect any(False, True)
12:57 timotimo Ven: that part works, but not the "using the exported things as typenames in parameter lists"
12:57 Ven oh, I thought this was about it.
12:57 timotimo m: my $c = any([1, 2], [3, 4]); say $c; $c = $c[0] < 3; say $c
12:57 camelia rakudo-moar a7cf7c: OUTPUT«any(1 2, 3 4)␤any(True, False)␤»
12:57 Ven because the example code doesn't "use adt"
12:57 rarara timotimo I don't understand: any should be a scalar assuming the values of the lists (which is a list of references)
12:57 rarara maybe perl6 is very different in this regards to perl 5
12:58 Ven timotimo: https://github.com/timo/ADT/​blob/master/lib/ADT.pm6#L192 sure it doesn't work? :v
12:58 timotimo a junction is all of "its values" "at the same time"
12:58 FROGGS rarara: any in perl 6 returns a junction containing the values
12:58 rarara timotimo exactly
12:58 timotimo so you execute $the_value[0] for each of the values the junction represents and get a junction of the results back
12:58 FROGGS m: say 1 == 1|2
12:58 camelia rakudo-moar a7cf7c: OUTPUT«any(True, False)␤»
12:58 FROGGS m: say so 1 == 1|2
12:58 camelia rakudo-moar a7cf7c: OUTPUT«True␤»
12:59 timotimo you seem to expect "$c = $c->0 < 3" to work more like "$c.grep(*.[0] < 3)"
12:59 rarara perl -MQuantum::Superpositions -e '$c = any(1,2); print $c,"\n"; print $c == 1, "\n"'
12:59 rarara totally differente
13:00 rarara prints any(2,1) and 1
13:00 timotimo can you please use any(5, 10) and $c == 10 instead, please?
13:00 timotimo i want to know if that "1" comes from == returning "true" or if it's the same 1 as in the any
13:00 rarara any(10,5) and 10
13:00 rarara no it comes from the fact that it returns you the subset which match
13:01 rarara the junction
13:01 timotimo wat
13:01 timotimo that's completely different from junctions in perl6
13:01 timotimo what does any(1,2) + 4 give?
13:01 FROGGS timotimo: that's the only way to proper boolify the fresult
13:01 FROGGS result*
13:02 FROGGS in Perl 5*
13:02 timotimo damn, you poor perl5 people
13:02 rarara any(6,5)
13:02 timotimo OK, so at least that part works like in perl6
13:02 FROGGS ohh, + is overloaded
13:02 Ven can a module re-export itself in p6?
13:02 FROGGS itself?
13:02 timotimo Ven: what'd that mean?
13:02 Ven I mean... re-export another module. duh
13:03 rarara FROGGS I like the perl 5 behaviour
13:03 timotimo so anything that's a comparison operator just has the added effect of boolifying the junction itself?
13:03 rarara "Each of these operators takes a list of values (states) and superimposes them into a single scalar value (a superposition), which can then be stored in a standard scalar variable."
13:03 rarara yes
13:03 FROGGS rarara: well, I like P6's... might just be about trained expectation
13:03 FROGGS Ven: no, not easily at least
13:03 rarara but in perl 5 you can basically do "as if" they were scalar
13:04 rarara also in perl 6?
13:04 Ven override EXPORT and return said module?
13:04 FROGGS Ven: yes, but you probably want to re-export the exported symbols... that's what you need to de explicitly
13:04 timotimo Ven: i think you can do something like "use OtherModule :EXPORT" or something
13:04 skids joined #perl6
13:04 Ven nice one :-)
13:04 FROGGS is that implemented?
13:05 timotimo i don't know
13:05 timotimo never had to do this
13:05 FROGGS I don't remember implementing it :o)
13:05 timotimo Ven: https://github.com/timo/ADT/b​lob/EXPORT_sub/t/02-EXPORT.t
13:05 Ven ooh.
13:05 timotimo these extra tests used to fail
13:05 chenryn joined #perl6
13:06 timotimo if they don't any more, i ought to merge that branch and fix up the readme
13:06 timotimo could be they got fixed when roles got properly interned and/or puns were deduplicated
13:06 timotimo but last time i tried it, i got "expected Branch but got Branch" and similar errors
13:06 rarara so we end up with a broken perl 5 implementation and an incompatible implementation in perl 6
13:06 kthakore joined #perl6
13:07 Ven timotimo: # Error: Unsupported serialization format version 13 (current version is 15)
13:07 Ven whoops.
13:08 kthakore hello folks! hi @FROGGS. Guess what I am in amsterdam till saturday. Anyone in town?
13:08 timotimo basically, the perl5 version of junctions seems to want people to use them as if they were lists or sets
13:08 timotimo in perl6's junctions we explicitly tell people "you want to use sets instead if you're trying to do *that*"
13:09 timotimo at least that's what the "using a comparison operator on a junction gives you the values that matched"
13:09 timotimo makes me think
13:10 FROGGS kthakore: hi :o)
13:10 * kthakore glomps on @FROGGS
13:10 kthakore Hellloooo!
13:10 FROGGS kthakore: amsterdam is nothing I can walk to though :/
13:10 kthakore damn it
13:10 FROGGS it is like, another country, you know
13:10 kthakore Could I train to where you are and be back for flight?
13:11 FROGGS kthakore: this might take 4+ hours on way
13:11 FROGGS one*
13:11 kthakore hmmmm
13:12 kthakore oh! @Sqirrel is here tooo
13:12 * Ven rebuilds rakduo to test ADT
13:12 kthakore it has been a long time friends
13:12 FROGGS kthakore: aye, it has :o)
13:13 rarara well you could do things like this in perl 5: sub min { eigenstates( any(@_) <= all(@_) ) }
13:13 timotimo why would you use a junction for that at all?
13:14 rarara I think it was an exercise of the author; I wouldn't use a junction
13:14 dayangkun joined #perl6
13:14 timotimo m: my @values = (^50).pick(10); say [min] @values
13:14 camelia rakudo-moar a7cf7c: OUTPUT«6␤»
13:14 rarara I was using a junction like a set
13:14 |Tux| kthakore, there is an Amsterdam.pm meeting *tonight* (but there will be a lot of us missing)
13:14 timotimo m: my @values = (^50).pick(10); say min @values
13:14 camelia rakudo-moar a7cf7c: OUTPUT«1␤»
13:14 timotimo m: my @values = (^50).pick(10); say min |@values
13:14 camelia rakudo-moar a7cf7c: OUTPUT«4␤»
13:14 kthakore @|Tux| I would show!
13:14 [Coke] I see a note that froggs added all the files to the spectest run. but there are still dozens that aren't being run. I think I missed something.
13:14 kthakore |Tux| where are you guys? I am at WOWAmsterdam
13:15 timotimo [Coke]: could be those you're still seeing have been removed at some point, but didn't properly get cleaned out?
13:15 Sqirrel Hi kthakore
13:15 |Tux| http://perl.nl/amsterdam/
13:15 kthakore Hi @Sqirrel
13:15 rarara I think the original idea (from the name of the package) was to implement the quantum logical rules as a superslow quantum computer simulator
13:15 |Tux| Dinsdag 12 mei 2015. In Ling Hong: Ouddiemerlaan 15 1111GS Diemen.
13:15 kthakore :| ... i can't read .... that :(
13:15 * kthakore glomps on @Sqirrel
13:15 |Tux| They'll have diner there starting at 18:15
13:16 FROGGS [Coke]: the files that are commented need either to be fixed/fudged or removed from spectest.data+roast
13:16 timotimo rarara: what confuses me is this: any(0, 1) == 0 would give 0, right?
13:17 rarara right
13:17 Alina-malina joined #perl6
13:17 timotimo but 0 == 0 or 1 == 0 should give 1
13:17 timotimo so if you use that superposition just like a scalar for all its values, you'll end up with a nasty surprise
13:18 moritz sounds like the any() you want confuses data with operations
13:18 rarara somehow not
13:18 timotimo and you can't just write it like (any(0, 1) == 0) == 0 because if that isn't a superposition in there, but the value 0 instead, you'll end up getting the exact wrong result
13:18 rarara perl -MQuantum::Superpositions -e 'print "ciao" if (any(0, 1) == 0);' prints ciao
13:18 timotimo and what does any(0, 1) == 0 print?
13:19 Ven timotimo: "# Error: Type check failed in assignment to '$a'; expected 'Tree' but got 'Tree'" aw :(
13:19 rarara timotimo it prints 0
13:19 timotimo yeah, sorry about that, Ven
13:19 rarara but I think theere is an eighenstates fuinction called automagically in between
13:19 timotimo rarara: so it's using perl5's notion of context to figure out if it's inside an if?
13:19 Ven guess I'll be writing a few classes then :)
13:19 [Coke] FROGGS: what was the point of adding them, commented out ?
13:19 rarara timotimo I think there is special bahaviour with the print function
13:19 [Coke] (given we have a tool that gives you the list of all the not-yet-run files and whether or not they need fudging, etc.)
13:20 FROGGS [Coke]: to have a list at hand to review, and fix one by one
13:20 timotimo rarara: and that differs if you put $c = any(0, 1) == 0 and then if($c)?
13:20 [Coke] FROGGS: ok. we already had that list.
13:20 Ven m: class A { ...; class B is A { submethod BUILD{say 'hi';}}; }; A::B.new
13:20 camelia rakudo-moar a7cf7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/247pbdKWSC␤'B' cannot inherit from 'A' because 'A' isn't compose yet (maybe it is stubbed)␤at /tmp/247pbdKWSC:1␤»
13:20 rarara timotimo it doesn't because $c is a function
13:20 rarara and if check if there is something inside
13:20 FROGGS [Coke]: where?
13:20 FROGGS I didnt know that
13:20 rarara I think the special case is for print
13:21 [Coke] perl tools/update-passing-test-data.pl
13:21 rarara $c is a function
13:21 Ven m: class A { }; class A::B is A { submethod BUILD{say 'hi';}}; A::B.new
13:21 camelia rakudo-moar a7cf7c: OUTPUT«hi␤»
13:21 rarara s/function/junction/
13:21 timotimo oh
13:21 hoelzro o/ #perl6
13:21 Ven well, seems like there's no way to make that class "abstract" or so
13:22 timotimo you can make it uninstantiable by giving it a BUILDALL that explodes
13:22 timotimo er, except that would be inherited
13:22 timotimo so it'd be a submethod BUILDALL
13:22 timotimo m: class Explodes { submethod BUILDALL { die "nope!" } }; Explodes.new()
13:22 camelia rakudo-moar a7cf7c: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤  in submethod BUILDALL at /tmp/waiHYIF5MZ:1␤  in block <unit> at /tmp/waiHYIF5MZ:1␤␤»
13:22 timotimo m: class Explodes { submethod BUILDALL(*@) { die "nope!" } }; Explodes.new()
13:22 camelia rakudo-moar a7cf7c: OUTPUT«nope!␤  in submethod BUILDALL at /tmp/xur8Bc2uJW:1␤  in block <unit> at /tmp/xur8Bc2uJW:1␤␤»
13:23 timotimo m: class Explodes { submethod BUILDALL(*@) { die "nope!" } }; class Doesn't is Explodes { }; Doesn't.new()
13:23 camelia rakudo-moar a7cf7c: ( no output )
13:23 timotimo cool.
13:23 timotimo what do you say? :)
13:23 timotimo anyway, i'll be off very soon
13:23 geekosaur looks very C++. all it needs is "is virtual" in the explosion
13:23 timotimo and only have phone irc for a bit
13:23 [Coke] the weekly says "Those are all fudged properly". whoops.
13:23 tadzik ding ding dinging dinginging
13:24 tadzik ding ding dinging dinginging
13:24 raiph joined #perl6
13:24 timotimo [Coke]: that's no true? oops!
13:24 tadzik what does the fox say?
13:24 tadzik pa-pa-pa-pa-pa-pa-paw
13:24 tadzik I'm sorry
13:24 tadzik this phrase is broken for me
13:24 [Coke] timotimo: no. they're not being run. they're just comments.
13:25 timotimo damn
13:25 timotimo tadzik: PLEASE JUST TAKE THESE FUCKING FLOWERRRRSS
13:26 tadzik WHEN THERE'S WAR AND ALL IS HELL. BRING IN JAN EEEEEGELAND
13:26 Celelibi joined #perl6
13:27 * timotimo quickly posted a little correction
13:27 timotimo tadzik: forget about the yoghurt, the new thing now is djogurt!
13:29 FROGGS timotimo: can you also state that ignoremark is already in? :o)
13:30 timotimo done.
13:30 domidumont joined #perl6
13:30 FROGGS timotimo++
13:31 masak m: use MONKEY_TYPING; class C { method !foo { 2 } }; use Test; is 1, 1, "1 eq 1"; my $c = C.new; augment class C { is $c!foo, 2, "C!foo eq 2" }; done
13:31 camelia rakudo-moar a7cf7c: OUTPUT«ok 1 - 1 eq 1␤ok 2 - C!foo eq 2␤1..2␤»
13:31 masak wow, I'm surprised that worked.
13:31 masak my assumption was that the body of an `augment class` block runs at BEGIN time.
13:31 rba_ joined #perl6
13:32 masak but the above seems to indicate that it runs at runtime.
13:32 bjz joined #perl6
13:32 masak (code based on a recent email on p6u)
13:33 agentzh_ joined #perl6
13:35 [Coke] https://github.com/perl6/roast/blob/master/integ​ration/class-name-and-attribute-conflict.t#L102 - this test looks wrong. it expects Ac to have an update method, but nothing is implementing it on this class.
13:35 cygx masak: it was you who did most of the work on macros?
13:36 Sysaxed` joined #perl6
13:36 [Coke] moritz: your name is all over the git blame on that file. can you take a look?
13:37 [Coke] In fact, the whole file looks dodgy.
13:37 FROGGS [Coke]: looks like Ac.new returns an Ab which in fact returned an Aa
13:37 rarara is Pegida a Nazi party?
13:37 [Coke] That doesn't make Ac have an update method.
13:37 timotimo rarara: not officially nazi, and not a party
13:37 timotimo o/
13:38 moritz rarara: to the extend that every xenophobic movement is a nazi thing
13:38 jnthn m: class A is repr('Uninstantiable') { }; A.new # better way to make it uninstantiable
13:38 camelia rakudo-moar a7cf7c: OUTPUT«You cannot create an instance of this type␤  in block <unit> at /tmp/0LSXfXydlP:1␤␤»
13:38 [Coke] if you do an Ac.new, and it's returning an Ab, the .WHAT of the return there is still Ac
13:38 FROGGS [Coke]: if Ac.new would return what the author wanted, you would end up calling .update on Aa
13:39 jnthn (that was from backlog, but I'll actually catch up properly in a couple of horus :))
13:39 [Coke] And I'm saying that's not a valid expectation.
13:39 rarara I have impression that they mix xenophoby with nationalism and populism
13:40 hoelzro cygx: are you having issues with macros?
13:40 moritz [Coke]: I didn't write those tests, just move them. But I agree they are wrong
13:40 [Coke] (if there isn't concensus on that, I'll fudge it instead of killing it.)
13:40 [Coke] moritz:  all of 'em? should I kill the file?
13:40 FROGGS and even if it would work it would not test for class name or attribute conflicts
13:41 moritz [Coke]: I'm not sure if all are wrong, but those that I looked at are wrong
13:41 moritz [Coke]: but the stuff that it does test is tested elswhere too
13:41 cygx hoelzro: no, just wanted to know who to thank and/or blame
13:41 moritz so +1 to nuking it
13:41 hoelzro cygx: ah, ok =)
13:42 FROGGS +1 to kill it, aye
13:42 hoelzro I saw your assert impl on reddit, nice work!
13:43 cygx hoelzro: just doing my part to do some public relations
13:43 cygx that code actually does contain a workaround for a macro-related bug, though
13:43 hoelzro cygx: I saw that, too
13:44 hoelzro did you rakudobug it?
13:44 cygx hoelzro: not yet
13:44 dalek roast: 1f54a37 | coke++ | integration/class-name-and-attribute-conflict.t:
13:44 dalek roast: Remove dodgy test.
13:44 dalek roast:
13:44 dalek roast: It expects that the build returns an object of the returned type,
13:44 dalek roast: but it's returning the type of the class (Ac in this case). Since
13:44 dalek roast: Ac doesn't have an update method, the test fails at compile time.
13:44 dalek roast:
13:44 dalek roast: This is an old test which doesn't match our current MOP.
13:44 dalek roast: review: https://github.com/perl6/roast/commit/1f54a371dc
13:45 cygx assuming its not known, I can do that
13:45 hoelzro cygx: just do a quick search for macro related bugs, see if it's there
13:47 Akagi201 joined #perl6
13:48 dalek roast: 1fbd7fb | coke++ | integration/class-name-and-attribute-conflict.t:
13:48 dalek roast: Remove dodgy test file
13:48 dalek roast:
13:48 dalek roast: The original issue this test tried to cover are handled elsewhere
13:48 dalek roast: in roast, and the tests as written here are problematic.
13:48 dalek roast: review: https://github.com/perl6/roast/commit/1fbd7fb2d9
13:48 masak r: say "hi"
13:48 camelia rakudo-{moar,jvm} a7cf7c: OUTPUT«hi␤»
13:48 dalek rakudo/nom: f0267b8 | coke++ | t/spectest.data:
13:48 dalek rakudo/nom: remove non-existant test file.
13:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f0267b8f60
13:48 masak p: say "Parrot, are you there?"
13:48 masak ...no.
13:49 masak I was thinking of #77520, which was closed just now.
13:49 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=77520
13:49 FROGGS masak: are you going to update /topic ?
13:50 masak FROGGS: I can. what did you have in mind?
13:50 masak (Parrot is not mentioned in /topic, so I don't immediately know what you're referring to)
13:51 masak I mainly wanted to check whether there was an easy way to confirm that #77520 is indeed fixed.
13:51 FROGGS perhaps the note about feather
13:51 synbot6 Link:  https://rt.perl.org/rt3/Publ​ic/Bug/Display.html?id=77520
13:51 FROGGS masak: I guess it is just moved to the list of "parrot tickets that will be reopened when parrot comes back"
13:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
13:52 moritz m: say { $^x }.assuming(1).signature
13:52 camelia rakudo-moar a7cf7c: OUTPUT«Method 'assuming' not found for invocant of class 'Block'␤  in block <unit> at /tmp/GhlzspxFgJ:1␤␤»
13:52 moritz no internal error
13:52 moritz (and no parrot anymore)
13:52 dalek rakudo/nom: 1efb42f | FROGGS++ | t/spectest.data:
13:52 dalek rakudo/nom: run slang variable test that passes for a while
13:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1efb42f95b
13:52 moritz => fixed
13:52 masak :( that's not how you fix things
13:52 moritz and https://rt.perl.org/Public/​Bug/Display.html?id=125155 open for the new error
13:53 dalek roast: 95e4bdc | FROGGS++ | S28-named-variables/slangs.t:
13:53 dalek roast: unfudge now passing slang variable test
13:53 dalek roast: review: https://github.com/perl6/roast/commit/95e4bdc017
13:53 masak by resolving that ticket, we're losing information about a genuine problem with Rakudo on Parrot.
13:53 moritz there is no rakudo on parrot.
13:53 FROGGS masak: that was not the case here, sorry
13:54 FROGGS masak: though there is a list of parrot specific RT tickets in Mu or so...
13:54 Ven if that ticket is indeed closed, it should probably be moved to parrot
13:54 moritz masak: also, there's a comment from [Coke]++ from 2012 stating that the internal errror was gone
13:54 moritz so, no information lost, afaict
13:54 [Coke] there's a list of tickets in Mu that were closed because they were only parrot-specific failures.
13:54 masak yes, you're right.
13:55 [Coke] to give whoever restarts rakudo on parrot a working list to go through... except they're going to have all of roast and have to re-fudge it anyway.
13:55 aborazmeh joined #perl6
13:55 aborazmeh joined #perl6
13:55 FROGGS masak: that's what I (errornously) was talking about: https://github.com/perl6/mu/blob/master/misc​/rt.perl.org/tickets_closed_parrot_only.txt
13:55 masak ok.
13:56 masak forgive my ignorance about the current political stance. I had missed where it switched over from "we're suspending rakudo releases on parrot" to "there is no rakudo on parrot".
13:56 masak this must be due to my incomplete backlogging of late.
13:57 cygx m: BEGIN my $foo = 42; macro bar { quasi { $foo } }; macro baz { $foo; quasi { $foo } }; macro quux { my $ = $foo; quasi { $foo } }; say bar, baz, quux;
13:57 camelia rakudo-moar a7cf7c: OUTPUT«(Mu)(Mu)42␤»
13:57 cygx there you go
13:57 Akagi201 joined #perl6
13:58 masak cygx: wow, that's messed up.
13:58 masak I'm fairly sure that used to work at one point (`424242`)
13:58 thou joined #perl6
13:58 cygx masak: could it be the optimizer at work?
13:59 masak cygx: can I ask you to try running it with the optimizer turned off?
13:59 FROGGS wow, hold your breath:
13:59 FROGGS m: constant $foo = 42; macro bar { quasi { $foo } }; macro baz { $foo; quasi { $foo } }; macro quux { my $ = $foo; quasi { $foo } }; say bar, baz, quux;
13:59 camelia rakudo-moar a7cf7c: OUTPUT«Bytecode validation error at offset 12, instruction 3:␤lexical operand index 8 out of range 0.. 2␤  in block <unit> at /tmp/FYe5fR1qhL:1␤␤»
13:59 masak because that is an excellent question.
13:59 masak FROGGS: whoa whoa
13:59 FROGGS jackpot :o)
14:00 FROGGS or jnthnpot for that matter
14:00 telex joined #perl6
14:01 cygx masak: MVM_SPESH_DISABLE=1 doesn't seem to help
14:01 cygx masak: or is there some different spell I need to chant?
14:01 FROGGS cygx: also: perl6 --optimize=off ...
14:02 cygx doesn't help
14:05 masak ok, then unrelated to optimizations.
14:05 masak cygx++
14:05 [Coke] masak: it started out as "suspending" but the implementation shortly after that was "rip it out because we know we're going to break it badly."
14:05 masak plz file rakudobugs at will. I'm otherwise occupied just now.
14:06 cygx masak: will do
14:07 nbrown04 joined #perl6
14:07 cygx it might be related to #120928 and #122769 , but I think it's sufficiently different to warrant its own ticket
14:07 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=120928
14:08 masak aye.
14:08 masak haven't seen exactly this before.
14:17 FROGGS http://design.perl6.org/S05.html#line_1813 is outdated I think
14:17 FROGGS this implies that NFG is not the default
14:17 cygx bug reported as #125160
14:17 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125160
14:17 FROGGS cygx++
14:18 rarara m: $c = set([1,2],[3,4]); $r = $c (cont) set([1,2]); say $r;
14:18 camelia rakudo-moar a7cf7c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XOp1mKhAqu␤Variable '$c' is not declared␤at /tmp/XOp1mKhAqu:1␤------> 3<BOL>7⏏5$c = set([1,2],[3,4]); $r = $c (cont) se␤»
14:19 cygx complete with spelling mistake :(
14:19 rarara m: my $c = set([1,2],[3,4]); my $r = $c (cont) set([1,2]); say $r;
14:19 camelia rakudo-moar 1efb42: OUTPUT«False␤»
14:19 rarara what is wrong with this?
14:20 TimToady dunno, looks buggy offhand
14:20 TimToady m: my $c = set([1,2],[3,4]); say $c.elems
14:20 camelia rakudo-moar 1efb42: OUTPUT«2␤»
14:20 TimToady m: my $c = set([1,2]); say $c.elems
14:20 camelia rakudo-moar 1efb42: OUTPUT«1␤»
14:20 jnthn Prolly that arrays are reference types, not value types, so .WHICH differently.
14:20 moritz
14:20 FROGGS m: my $o = [1,2]; my $c = set($o,[3,4]); say $c (cont) set($o)
14:20 camelia rakudo-moar 1efb42: OUTPUT«False␤»
14:21 TimToady ah, yes
14:21 grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^100; for @p { die "oops" unless .result }
14:21 camelia rakudo-moar 1efb42: OUTPUT«Memory allocation failed; could not allocate 656 bytesMemory allocation failed; could not allocate 656 bytes␤Memory allocation failed; could not allocate 4194304 bytes␤Memory allocation failed; could not allocate 656 bytes»
14:21 TimToady rarara: what jnthn means is that mutable structures take their identity from the structure, not from the contents
14:21 grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { die "oops" unless .result }
14:21 camelia rakudo-moar 1efb42: OUTPUT«===SORRY!===␤Cannot call prefix:<-->(Int); none of these signatures match:␤    (Mu:D \a is rw)␤    (Mu:U \a is rw)␤    (Bool:U \a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num $a is rw)␤»
14:21 rarara Ok understood
14:22 FROGGS TimToady: do you agree that http://design.perl6.org/S05.html#line_1813 is bogus?
14:22 [Coke] m: my $a = [1,2]; my $c = set($a,[3,4]); say $c (cont) $a;
14:22 camelia rakudo-moar 1efb42: OUTPUT«True␤»
14:22 jnthn FROGGS: There are places in S02 and S05 that needs updating; that's just one of them.
14:22 jnthn FROGGS: Also to kill off .graphs
14:22 grondilu m: await my @p = map { start { [ rand xx 1_000 ] } }, ^10;
14:22 camelia rakudo-moar 1efb42: ( no output )
14:22 FROGGS jnthn: k
14:22 jnthn FROGGS: But as Pm says, implementation leading spec tends to work out better
14:22 grondilu m: await my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { say "oops" unless .result }
14:22 camelia rakudo-moar 1efb42: ( no output )
14:22 grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { say "oops" unless .result }
14:22 camelia rakudo-moar 1efb42: ( no output )
14:23 jnthn Now I've got more of NFG implemented, I can look at the spec :P
14:23 FROGGS that'd mean that <.> is free to be used for other weirdness :o)
14:23 FROGGS jnthn: hehe
14:23 FROGGS jnthn++
14:23 grondilu m: my @p = map { start { my @a = [ rand xx 1_000 ]; @a } }, ^10; for @p { say "oops" unless .result }
14:23 camelia rakudo-moar 1efb42: OUTPUT«Unhandled exception in code scheduled on thread 3␤Cannot assign to an immutable value␤  in any  at /home/camelia/rakudo-inst-1/share/perl6/run​time/CORE.setting.moarvm:1␤␤===SORRY!===␤»
14:23 jnthn grondilu: I...think something is ratehr broken interally there.
14:23 FROGGS "jnthn - ahead of our <four letter word>"
14:23 jnthn oops :P
14:23 TimToady FROGGS: it would only make sense when the regex was assuming that . matches something smaller then graphemes, which we might or might not support pragmatically
14:23 grondilu I think that's the kind of things that makes mandelbrot fail
14:23 jnthn I can't even channel pmichaud correctly :P
14:24 jnthn grondilu: Yeah, thanks for a nice small exaple though. That will help me a lot.
14:24 grondilu you're welcome
14:24 FROGGS ohh dear... another pragma that influences :m /o\
14:24 jnthn grondilu: Please can you RT it so I can easily find it again?
14:24 grondilu jnthn: ok
14:24 jnthn grondilu++
14:25 FROGGS I'll remove <.> and its test file
14:25 TimToady FROGGS: only if it becomes obvious both how to do it and that there is a need for it
14:25 FROGGS yeah
14:26 TimToady I think by and large people would rather have the opposite dwimmery, where we're matching against codepoints but the regex is NFG; that also is not something we're aiming for this year
14:27 FROGGS I'd like to see the mentioned :bytes though
14:28 TimToady well, but if you support :bytes, then :codes is kinda the same thing, only writ larger
14:28 FROGGS yeah
14:28 TimToady and then <.> makes sense as how P5 uses \X
14:29 jnthn the whole byte/grapheme level stuff is probably polymorphic in similar places to Cat
14:30 TimToady 'course P5 is already natively :utf8 or so
14:31 TimToady yes, once you have the abstraction level there, it can serve multiple purposes, and slow everyone down :)
14:32 grondilu jnthn: #125161
14:32 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125161
14:33 grondilu oops, I doubled the 'perl6 -e '
14:34 * moritz hopes that an embedded :bytes match in regex will fail if the match doesn't terminate at a codepoint boundary
14:34 dalek specs: 12b74d8 | FROGGS++ | S05-regex.pod:
14:34 dalek specs: remove special assertion <.> which implied "no NFG by default"
14:34 dalek specs:
14:34 dalek specs: The dot itself matches a combining character sequences already, and
14:34 dalek specs: with :bytes, :codes and :graphs implemented we can easily get other
14:34 dalek specs: meanings for dot in future. A <.> on its own does not compose well.
14:34 dalek specs: review: https://github.com/perl6/specs/commit/12b74d8306
14:35 moritz that is, "aäu" ~~ /a [ :bytes . ] u/ should fail (assuming :bytes implies UTF-8)
14:35 moritz or even "aäu" ~~ /a [ :bytes . ] ./
14:36 moritz because the final . should match a codepoint or grapheme, but the cursor is on the continuation byte of the second codepoint/grapheme
14:36 Ven joined #perl6
14:38 dalek roast: 2baaabc | FROGGS++ | S05-metasyntax/combchar.t:
14:38 dalek roast: remove un-design-doc'd functionality '<.>'
14:38 dalek roast: review: https://github.com/perl6/roast/commit/2baaabc575
14:39 cygx_ joined #perl6
14:40 dalek rakudo/nom: bdf07f3 | FROGGS++ | t/spectest.data:
14:40 dalek rakudo/nom: remove non-existing test file
14:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bdf07f3e32
14:41 FROGGS I could imagine that <.> could do what ~~ is meant to do inside regexes
14:41 FROGGS and then ~~ could be an extended version of ~
14:42 FROGGS ahh, I was talking about <~~>
14:42 cygx_ should you even be able to match strings with :bytes regexes?
14:43 FROGGS perhaps :bytes<utf8> would make sense instead
14:43 FROGGS if the left hand side is a Str
14:44 TimToady .oO( :utf(8) )
14:44 FROGGS :8utf :P
14:44 FROGGS if the left hand side is a buffer type we are fine-ish
14:44 Ven joined #perl6
14:45 TimToady maybe it should just be :buf
14:45 TimToady and based on the type of the buf
14:45 FROGGS m: say 'bär'.encode
14:45 camelia rakudo-moar 1efb42: OUTPUT«utf8:0x<62 c3 a4 72>␤»
14:46 FROGGS :bytes reads nice
14:46 TimToady otoh, if a buf contains mixed stuff, then the regex maybe wants to be able to parse it with different policies in different places
14:47 cygx_ also, one might want to have the option to match utf16 code units
14:47 TimToady as in, half a surrogate?
14:47 FROGGS I wonder if we want to implement <*foo> this year
14:47 TimToady *pair
14:48 TimToady FROGGS: I'd like to get that one done, but it's really something that has to be done down in the NFA matcher
14:48 cygx_ TimToady: for example, yes
14:49 FROGGS TimToady: but don't we just turn on the NFA when there is more than one... ahh!
14:49 TimToady and it might interact badly with longest literal, which might also interact badly with DFA matching, and with the transitive fate optimizations I'm planning, so it's kinda all of a piece
14:50 TimToady it's natural to do it in the NFA because it's just a matter of succeeding instead of failing
14:50 cygx_ left #perl6
14:51 cygx joined #perl6
14:51 cognominal joined #perl6
14:52 TimToady and yes, currently we only search the NFA when there are alternatives, but in a sense, <*foo> is a set of alternatives
14:52 FROGGS right
14:52 TimToady and if I can avoid rerunning the NFA for subrules most of the time, then it becomes more economical to use the NFA all the time
14:53 TimToady currently when we incorporate subrules transitively into the higher rule, we throw away the lower rule's fate info
14:54 TimToady and recalculate it later
14:54 TimToady STD had a way of passing that extra info down to avoid rerunning the NFA
14:54 TimToady and trying that approach is on my todo list for speeding up the parser
14:55 achauvin joined #perl6
14:57 TimToady but I've kinda been putting it off till we can profile the parser a little better
14:58 FROGGS yeah
14:59 TimToady the main problem from a what-is-6.0-really point of view is not knowing whether longlit will survive the various optimizations
14:59 TimToady if push comes to shove, we want the parser to be fast
15:00 TimToady and both longlit and fates have the potential to mess with DFAability
15:02 TimToady another possible transitional optimization is to just do the DFA transform on the first character of the token, since that's the one with the greatest fanout, much like P5's tokener does a switch on the first character
15:02 FROGGS ahh, things are things I don't understand well enough (when at all) :/
15:02 FROGGS but I'll learn
15:03 airdisa joined #perl6
15:03 TimToady well...I don't understand them well enough either :)
15:03 FROGGS *g*
15:06 rba_ joined #perl6
15:06 [Sno] joined #perl6
15:10 RabidGravy joined #perl6
15:11 Ven m: <a b c>.pick x 5 # is `[~] <a b c>.pick xx 5` the way to do what I want?
15:11 camelia rakudo-moar 1efb42: ( no output )
15:11 jnthn m: <a b c>.roll(5).join.say
15:11 camelia rakudo-moar 1efb42: OUTPUT«acbcc␤»
15:12 Ven m: ([~] <qu_rk w_rt r_t t_r ...>.pick xx (5..10).pick).subst('_', { 'aeiouy'.split('').pick }, :g)
15:12 camelia rakudo-moar 1efb42: ( no output )
15:13 Ven m: say ([~] <qu_rk w_rt r_t t_r ...>.pick xx (5..10).pick).subst('_', { 'aeiouy'.split('').pick }, :g)
15:13 camelia rakudo-moar 1efb42: OUTPUT«wort......tirwert␤»
15:13 FROGGS that's.... german
15:13 Ven *g*
15:14 TimToady you could run the syllable openers adn the syllable closers independently...
15:14 jnthn hotel &
15:20 agentzh_ joined #perl6
15:22 * timotimo considers adding string interning for json keys into json::fast
15:29 timotimo tadzik: is "panda install ." known to be broken?
15:32 timotimo tadzik: apparently @revdeps ends up being Any
15:33 timotimo i suppose that's the "return unless +@ret;" line in Ecosystem.pm in the revdeps method?
15:34 timotimo ah, we probably want to return () in that case
15:39 tadzik timotimo: news to me
15:39 timotimo argh
15:39 timotimo Bytecode validation error at offset 2, instruction 1:
15:39 timotimo register operand index 7 out of range 0..6
15:39 tadzik :(
15:39 timotimo how did i do dis
15:44 arnsholt Broked the codegen, presumably?
15:44 arnsholt What kind of files have you touched?
15:45 timotimo seems like i just had to ./rebootstrap.pl
15:46 timotimo tadzik: at least changing that to "return ()" in Ecosystem.pl made things work for me
15:46 tadzik ok, awesome
15:46 tadzik so () is Empty now?
15:46 TimToady no
15:46 tadzik r: my $a = (); say $a ~~ Empty
15:46 camelia rakudo-{moar,jvm} bdf07f: OUTPUT«False␤»
15:47 timotimo Empty is going to go away at some point
15:47 TimToady probably not
15:47 timotimo that's why i recommend ()
15:47 timotimo oh?
15:47 TimToady Empty goes away in any list, even in places where () stays
15:48 TimToady () only goes away under flattening
15:48 TimToady it becomes more important to distinguish Empty from () under the new rules, since () will tend to hang out in list comprehensions in places we don't want ()
15:51 TimToady m: say (1 xx 3.rand for 1..10).perl
15:51 camelia rakudo-moar bdf07f: OUTPUT«((), (), (1, 1), (1,), (1, 1), (1, 1), (1, 1), (1, 1), (), ())␤»
15:51 timotimo oh?
15:51 timotimo i see now
15:51 timotimo so that may want to become return Empty instead
15:52 timotimo do we still want bare "return" to return Nil?
15:52 TimToady m: say (Bool.pick ?? (1,2) !! () for 1..10).perl
15:52 camelia rakudo-moar bdf07f: OUTPUT«((), (), (), (), (1, 2), (1, 2), (), (), (), (1, 2))␤»
15:52 TimToady m: say ((1,2) if Bool.pick for 1..10).perl
15:52 camelia rakudo-moar bdf07f: OUTPUT«((1, 2), (1, 2), (1, 2), (1, 2), (1, 2), (1, 2))␤»
15:52 TimToady the ()s go away
15:52 TimToady well, the Emptys
15:53 TimToady timotimo: that was asked a day or two ago, at which point I said that may depend on the return type
15:53 TimToady otoh, even with a listy return type, we might want to return () instead of Empty, by default
15:54 TimToady or not, haven't decided which is the more reasonable default for bare return
15:55 TimToady () is the natural degenerate case of (1,2,3), so I'm biased against defaulting to Empty there, I suppose
15:55 timotimo OK
15:56 TimToady people are going to be tempted to equate Empty with (), which is why the warning in the comments on the definition of Empty in Nil.pm
15:56 TimToady Empty should really just be thought of as a form of Nil that happens to listify to nothing
15:58 TimToady it's the identity element for infix:<,>, unlike (), which is really only the identity element for flattening lists
15:59 laouji joined #perl6
15:59 TimToady also, Empty is officially undefined, while () is defined
16:00 TimToady so there's really a number of reasons Empty might stick aroudn
16:00 TimToady *round
16:00 timotimo understood
16:02 timotimo Cannot take a reference to a non-native lexical  ... :\
16:02 timotimo oh, i get it
16:03 mst bloody foreign lexicals, coming here, taking our scopes
16:03 mst (sorry)
16:03 gfldex joined #perl6
16:03 TimToady another thing I'm having some doubts about is combining Parcel with List, having now attempted it naïvely and failing, due to the basic need for a tuple-like type
16:04 noganex joined #perl6
16:04 TimToady so maybe as a first step we really need to rename Parcel to Tuple, and then decide to what extent we can bring tuples and lists closer together
16:04 jnthn .oO( xenoscope )
16:05 * grondilu thinks a Tuple would be nice because it's quite a famous concept in programming.
16:05 grondilu s/a Tuple/a Tuple type/
16:05 TimToady m: say (1,2,3).WHICH
16:05 camelia rakudo-moar bdf07f: OUTPUT«Parcel|(Int|1)(Int|2)(Int|3)␤»
16:06 grondilu whereas "Parcel" is not well known and thus potentially confusing
16:06 TimToady we currently force parcels to behave as tuples when the components are value types
16:06 jnthn TimToady: We may want to constrain where Empty might show up. One of the slow things today is having to scan through lists looking for things that need to flatten. We were about to be rid of that. I fear Empty might be at risk of undoing that win...
16:06 * timotimo tries - and fails - to make JSON::Fast noticably faster
16:07 TimToady m: say (1,(2 if 0),3).elems
16:07 camelia rakudo-moar bdf07f: OUTPUT«3␤»
16:07 TimToady m: say (1,(2 if 0),3).list.elems
16:07 camelia rakudo-moar bdf07f: OUTPUT«2␤»
16:07 TimToady there's a difference between parcels and lists currently
16:10 TimToady hard to know where to place such a constraint though
16:12 TimToady but yeah, I've had the feeling for a year or so that .list is badly overloaded in some respects
16:12 moritz m: say (1, (), Nil, Empty, Empty.new).elems
16:12 camelia rakudo-moar bdf07f: OUTPUT«5␤»
16:12 TimToady that's a parcel
16:13 moritz m: say List.new(1, (), Nil, Empty, Empty.new).elems
16:13 camelia rakudo-moar bdf07f: OUTPUT«3␤»
16:13 moritz m: say List.new(1, (), Nil, Empty, Empty.new).perl
16:13 camelia rakudo-moar bdf07f: OUTPUT«(1, (), Nil)␤»
16:17 TimToady to the first approximation, parcels *are* tuples, it's just that we consider containers to be strange value types that just happen to contain something mutable at that spot
16:17 profan joined #perl6
16:18 TimToady well, and lists are also mutable in the sense that they may not be fully evaluated, leaving aside the fact that they're currently implemented using Array semantics
16:19 TimToady and all that rigamarole in lists to allow for laziness really works against just a "simple" List as a parcel/tuple
16:20 hoelzro so I spent yesterday and this morning working on RT #125154, which involves some weird issues with $*DISPATCHER.  In the working case, I've found p6finddispatcher finds $*DISPATCHER 1 frame up the stack; in the broken case, it finds it 3 frames up.  Can anyone give me some pointers on how/why $*DISPATCHER one frame up might be getting cleared in the parent frame?
16:20 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125154
16:21 * TimToady thinks we should look at the use of every dynamic variable and ask ourselves whether it should really oughta be done that way...
16:21 TimToady $*ACTIONS also comes to mind
16:22 TimToady you might be running into some kind of caching issue, I suppose
16:22 hoelzro that would make sense
16:22 timotimo hm. putting in the string interning actually makes it run the gc more often ... perhaps because it uses %intern{$string} //= $string and that creates a container with a whence?
16:22 TimToady the current caching scheme can overwrite entries in frames with a different dynvar
16:23 FROGGS[mobile] joined #perl6
16:24 TimToady I'd like to rework the dynvar caching scheme at some point too
16:24 FROGGS[mobile] did somebody think about allowing to declare local variables directly?
16:24 timotimo hmm.
16:24 timotimo heyo froggs
16:24 hoelzro TimToady: is there a way I could turn off caching for testing this? or any other systems I could tweak that could shed some light on this?
16:24 timotimo you mean variables that are not available in inner scopes, ever?
16:24 FROGGS[mobile] aye
16:24 TimToady .oO(register $foo)
16:25 eli-se joined #perl6
16:25 timotimo well, *ideally* our optimizer will do it in every case :)
16:26 eli-se hi
16:28 raydiak m: sub foo () { say CALLER::<$_> }; foo for <a b c>; multi sub bar () { say CALLER::<$_> }; bar for <a b c>;
16:28 camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤(Any)␤b␤c␤»
16:28 TimToady hoelzro: you could fiddle with try_cache_dynlex in moar
16:28 raydiak ^^ should protos be excluded from CALLER?
16:29 hoelzro TimToady: thanks, I'll try that!
16:29 TimToady m: temp %*ENV; say %*ENV<HOME>
16:29 camelia rakudo-moar bdf07f: OUTPUT«/home/camelia␤»
16:30 TimToady m: { temp %*ENV; %*ENV<HOME> = "/home/sweet/home"; }; say %*ENV<HOME>
16:30 camelia rakudo-moar bdf07f: OUTPUT«/home/camelia␤»
16:30 TimToady you can also "disable" the cache by making a real temp copy of a dynvar
16:30 TimToady hoelzro:
16:31 zostay is perl6 nativecall able to read data from a union structure? i'm getting a segfault while trying to do that atm
16:31 raydiak m: multi sub foo () { say CALLER::<$_> // CALLER::CALLER::<$_> }; foo for <a b c>   # and a workaround for my issue, in case anyone else runs in to it
16:31 camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤»
16:32 FROGGS[mobile] zostay: only in a developement branch
16:33 TimToady raydiak: note that CALLER is the proto
16:34 TimToady so officially CALLER::CALLER should always work, even if inlined...
16:34 raydiak TimToady: 16:28:46    raydiak | ^^ should protos be excluded from CALLER?
16:34 zostay FROGGS: which branch? i'd like to try it out
16:34 TimToady ah
16:34 raydiak it's weird that the behavior is different on the first iteration, though I understand why
16:34 * TimToady should learn to read one of these years
16:35 FROGGS[mobile] zostay: cunion in MoarVM and rakudo I believe
16:35 * raydiak feels ever so slightly better that he misses so much, now :)
16:35 zostay cool, thx
16:35 raydiak m: multi sub foo () { say CALLER::CALLER::<$_> }; foo for <a b c>
16:35 camelia rakudo-moar bdf07f: OUTPUT«a␤(Any)␤(Any)␤»
16:35 agentzh_ joined #perl6
16:35 TimToady I did that on purpose, just so's you'd feel better :)
16:36 raydiak such a generous benefactor :)
16:36 FROGGS[mobile] zostay: I can get it into master/nom until the weekend...
16:36 TimToady we could make CALLER bypass proto, I suppose, and have a PROTO if you explicitly want the proto...
16:36 FROGGS[mobile] +1
16:37 TimToady since the proto isn't so much a caller as a dispatcher...
16:37 raydiak yes that sounds like a great solution to me, leaves a far more obscure corner case
16:37 zostay FROGGS: that'd be sweet... trying my hand at adding a Perl6 wrapper around google's gumbo parser, i think i can get everything or almost everything working with union support
16:37 zostay can i help with anything?
16:38 FROGGS[mobile] zostay: testing when I give you the go... what os/arch are you on?
16:39 zostay os x
16:39 dalek rakudo-star-daily: efa295e | coke++ | log/ (2 files):
16:39 dalek rakudo-star-daily: today (automated commit)
16:39 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/efa295e2f1
16:39 dalek perl6-roast-data: c4a94b3 | coke++ | / (9 files):
16:39 dalek perl6-roast-data: today (automated commit)
16:39 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/c4a94b354b
16:39 * raydiak doesn't remember *ever* caring about the vars in scope of the dispatcher
16:40 FROGGS[mobile] zostay: ohh, perfect :o)
16:40 FROGGS[mobile] as I have linux and Windows
16:40 abraxxa joined #perl6
16:46 zostay okie dokie... my life is about to go insane, but since part of that includes time off, i will make my best effort to spare some odd hours for testing
16:47 FROGGS[mobile] jnthn: I think I want to provide a role Inlining for cstructs and cunions... what'ya think?
16:47 FROGGS[mobile] zostay: awesome :o)
16:48 [Coke] bartolin: would you agree that now that you merged his PR, we don't need to keep the file of hackathon tickets we've touched updated?
16:49 [Coke] my first thought was maybe we do, but I'm now thinking it's one more thing to keep up to date.
16:50 TimToady m: multi sub foo () { say CALLERS::<$_> }; foo for <a b c>
16:50 camelia rakudo-moar bdf07f: OUTPUT«(Any)␤b␤c␤»
16:53 larion joined #perl6
16:55 dalek roast: 936ff0b | coke++ | S02-types/compact.t:
16:55 dalek roast: reduce fudge scope; follow merge of RTs
16:55 dalek roast: review: https://github.com/perl6/roast/commit/936ff0b993
16:56 dalek rakudo/nom: b74cda4 | coke++ | t/spectest.data:
16:56 dalek rakudo/nom: Run fudged test
16:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b74cda4d50
16:57 TimToady m: proto sub foo () {*}; multi sub foo () { say CALLERS::<$_> }; foo for <a b c>
16:57 camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤»
16:57 TimToady raydiak: ^^ but note this
16:57 TimToady m: proto sub foo () {*}; multi sub foo () { say CALLER::<$_> }; foo for <a b c>
16:57 camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤»
16:58 TimToady m: proto sub foo () {$_ = 42; {*}}; multi sub foo () { say CALLER::<$_> }; foo for <a b c>
16:58 camelia rakudo-moar bdf07f: OUTPUT«42␤42␤42␤»
16:58 andreoss joined #perl6
16:59 [Coke] m: my %h is Bag;
16:59 camelia rakudo-moar bdf07f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Xc6LkZKb87␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/Xc6LkZKb87:1␤------> 3my %h is Bag7⏏5;␤    expecting any of:␤        constraint␤»
16:59 TimToady m: proto sub foo () {my $x = 42; {*}}; multi sub foo () { say CALLER::<$_> }; foo for <a b c>
16:59 camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
16:59 TimToady kinda hit or miss whether it skips the proto currently
16:59 TimToady so we should probably just make it alway skip the proto
17:00 TimToady [Coke]: currently solved with binding
17:02 ab5tract joined #perl6
17:02 TimToady m: sub foo () { say CALLER::<$_> }; my &bar = &foo.wrap({callsame}); bar for <a b c>
17:02 danstone1 joined #perl6
17:02 camelia rakudo-moar bdf07f: OUTPUT«Type check failed in assignment to '&bar'; expected 'Callable' but got 'WrapHandle'␤  in block <unit> at /tmp/51kyvUMg9t:1␤␤»
17:02 El_Che joined #perl6
17:02 dalek roast: c486c00 | coke++ | S02-types/ (3 files):
17:02 dalek roast: track RT merge and fix error message typo
17:02 dalek roast: review: https://github.com/perl6/roast/commit/c486c002c2
17:02 breinbaas joined #perl6
17:02 rjbs joined #perl6
17:02 zoosha joined #perl6
17:02 ugexe m: class A { method talk { say "talking" } }; role B { method talk { say "talking differently" } }; class C does B { method talk { say "why not talking differently?" } }; my $talker-A = A.new does B; $talker-A.talk; my $talker-C = C.new; $talker-C.talk
17:02 camelia rakudo-moar bdf07f: OUTPUT«talking differently␤why not talking differently?␤»
17:02 TimToady m: sub foo () { say CALLER::<$_> }; &foo.wrap({callsame}); foo for <a b c>
17:02 ugexe can someone explain why if I apply the role after I create a new instance of the class I want to apply it the class will use the role's method talk, but if I apply the role in the class decleration (class C does B) it does not use the role's method talk?
17:02 camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
17:02 [Coke] TimToady: there are a bunch of tests that expect that syntax to work. Look for RT #124490
17:02 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124490
17:02 mattp_ joined #perl6
17:03 andreoss m: die; CATCH { say "hi; $_"}
17:03 camelia rakudo-moar bdf07f: OUTPUT«hi; Died␤Died␤  in block <unit> at /tmp/cBjxphV9xv:1␤␤»
17:03 davido__ joined #perl6
17:03 go|dfish joined #perl6
17:03 TimToady m: sub foo () { say CALLERS::<$_> }; &foo.wrap({callsame}); foo for <a b c>
17:03 camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
17:03 TimToady m: sub foo () { say CALLER::CALLER::<$_> }; &foo.wrap({callsame}); foo for <a b c>
17:03 camelia rakudo-moar bdf07f: OUTPUT«Cannot access '$_' through CALLER, because it is not declared as dynamic␤  in sub foo at /tmp/c0TxBsBlZS:1␤  in any call_with_capture at src/gen/m-Metamodel.nqp:3470␤  in block <unit> at /tmp/c0TxBsBlZS:1␤␤»
17:03 skids joined #perl6
17:03 TimToady say what?
17:04 TimToady CALLER should probably skip .wraps too...
17:05 [Sno] joined #perl6
17:07 TimToady I note, however, that in Cool.pm, we have this: proto method subst(|) { $/ := nqp::getlexdyn('$/'); {*} }
17:07 dalek rakudo/nom: a8c9e11 | coke++ | t/spectest.data:
17:07 dalek rakudo/nom: run fudged test
17:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8c9e116f2
17:08 TimToady this would probably break if we made CALLER bypass a proto
17:08 TimToady since it's specifically using the proto to hide the caller's $/ from the multi
17:08 TimToady well, to alias, not to hide
17:08 dalek roast: bd155fa | coke++ | S02-types/keyhash.t:
17:08 dalek roast: re-fudge test
17:08 dalek roast:
17:08 dalek roast: * remove workarounds that didn't work anyway - we didn't notice
17:08 dalek roast:   because this test wasn't getting run in rakudo
17:08 dalek roast: * refer to merged ticket ID.
17:08 dalek roast: review: https://github.com/perl6/roast/commit/bd155fa6ca
17:09 TimToady otoh, if it's an alias, it wouldn't be needed if CALLER bypasses the proto, so I guess that's okay
17:09 [Coke] m: FatRat;
17:09 camelia rakudo-moar bdf07f: ( no output )
17:09 [Coke] m: KeyWeight;
17:09 camelia rakudo-moar bdf07f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lRWWl2veiF␤Undeclared name:␤    KeyWeight used at line 1␤␤»
17:10 [Coke] is KeyWeight still a thing? it's not in the syn.
17:10 TimToady that's Mix and MixHash now, I think
17:10 [Coke] yay, killing tests.
17:12 dalek roast: bc6e3c8 | coke++ | S02-types/keyweight.t:
17:12 dalek roast: KeyWeight is no longer a thing.
17:12 dalek roast: review: https://github.com/perl6/roast/commit/bc6e3c8ea9
17:13 dalek rakudo/nom: 68c432e | coke++ | t/spectest.data:
17:13 dalek rakudo/nom: remove reference to non-existant test file
17:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68c432e71b
17:13 FROGGS joined #perl6
17:14 [Coke] crap. "nonexistent". :P
17:14 [Coke] need spell check in my git commit editor window. :P
17:16 spider-mario joined #perl6
17:16 molaf joined #perl6
17:17 moritz echo 'set spell' >> ~/.vimrc
17:17 dalek perl6-examples: 6b648f1 | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
17:17 dalek perl6-examples: [interpreters] simple lisp interpreter
17:17 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/6b648f1fe8
17:17 dalek perl6-examples: 6e86abf | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
17:17 dalek perl6-examples: better repl
17:17 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/6e86abfc96
17:17 dalek perl6-examples: b51078e | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
17:17 dalek perl6-examples: [interpreters] fixed repl
17:17 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/b51078ee10
17:18 berekuk_ joined #perl6
17:19 andreoss probably an overkill to use class for wrapping a functions, the code ended up almost two times bigger python version
17:19 andreoss *than the python version
17:21 [Coke] what about sameaccent? we have tests but nothing in Syn.
17:22 [Coke] https://github.com/perl6/roast/b​lob/master/S32-str/sameaccent.t
17:24 FROGGS [Coke]: it is called samemark in the synopsis it seems
17:24 [Coke] m: samemark
17:24 camelia rakudo-moar a8c9e1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uMFS5bdNve␤Undeclared routine:␤    samemark used at line 1. Did you mean 'samecase'?␤␤»
17:25 FROGGS NYI
17:25 FROGGS because that needs character decomposition, and we just got that recently
17:29 dalek roast: 77dbc77 | coke++ | S32-str/same (2 files):
17:29 dalek roast: Track change of sameaccent -> samemark
17:29 dalek roast: review: https://github.com/perl6/roast/commit/77dbc771c8
17:29 dalek roast: f6f218b | coke++ | S32-str/samemark.t:
17:29 dalek roast: fudge for rakudo
17:29 dalek roast: review: https://github.com/perl6/roast/commit/f6f218b2c0
17:31 [TuxCM] joined #perl6
17:34 diana_olhovik_ joined #perl6
17:36 domidumont joined #perl6
17:39 chenryn joined #perl6
17:40 cschwenz joined #perl6
17:48 [ptc] strange...  whenever I try to use perl6-debug-m (and after I've installed Debugger::UI::CommandLine), I always get "Unhandled exception: ctxlexpad needs an MVMContext" when starting a program
17:48 [ptc] does anyone know what I'm doing wrong?
17:51 pauluu left #perl6
17:56 vendethiel joined #perl6
18:02 grondilu m: my @a = 0, .01 ... 1; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
18:02 camelia rakudo-moar 68c432: OUTPUT«101 0 101 101 101 101 101 101 101 101␤»
18:02 vendethiel .oO( we should have an alias to sleep called nap )
18:02 [Tux] joined #perl6
18:02 liztormato joined #perl6
18:03 jnthn FROGGS[mobile]: (Inlining) hmm, not sure...lemme ponder it while I go for dinner (now) :)
18:03 jnthn &
18:03 FROGGS :o)
18:03 * liztormato waves from a  ferry
18:03 FROGGS jnthn: my idea to allow: MyStruct but Inlining
18:03 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
18:03 camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:04 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
18:04 camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:04 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
18:04 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
18:04 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
18:04 camelia rakudo-moar 68c432: OUTPUT«100 0 100 100 100 100 100 100 100 100␤»
18:04 FROGGS dunno that'll work at all
18:04 FROGGS o/ liztormato
18:04 vendethiel \o liz!
18:05 liztormato About to lose connectivity
18:05 TimToady o/
18:06 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
18:06 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100␤»
18:06 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
18:06 camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:06 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
18:06 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100␤»
18:06 grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
18:06 liztormato Catch you all in Denmark or further south&
18:06 camelia rakudo-moar 68c432: OUTPUT«100 0 100 100 100␤»
18:06 liztormato left #perl6
18:06 grondilu so weird
18:06 TimToady seems to drop the .[1] element
18:07 Gauravsharma joined #perl6
18:08 grondilu not always, which is even weirder
18:08 TimToady sometimes I get 100 100 200 200 200 200 200 200 200 200
18:09 Gauravsharma left #perl6
18:12 grondilu m: my @p = map { start { [ ^100 ] } }, ^5; say @p».result».elems  # this always works fine?
18:12 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100␤»
18:12 FROGGS so it is about lexical lookup
18:13 grondilu seems so
18:14 TimToady seems even more unstable if you change [ @a ] to @a
18:15 PerlJam perl6
18:15 PerlJam oops
18:15 TimToady not that we exactly guarantee that lexicals outside your block are threadsafe, but if nothing is changing, you'd think it'd work anyway
18:15 TimToady it's not like ^100 is lazy after being assigned to @a, since that's eager
18:16 grondilu m: my @a = rand xx 100; my @p = (start { [ @a ] }) xx 10; say @p».result».elems
18:16 camelia rakudo-moar 68c432: OUTPUT«100 0 100 100 100 100 100 100 100 100␤»
18:17 TimToady seems more stable with my $a = ^100 and then [ @$a ], though not entirely so
18:17 TimToady never puts 0 in the second spot, seems
18:18 grondilu yeah the sigil seems to matter
18:18 TimToady still gets an occasional Cannot invoke this object (REPR: Null)
18:18 grondilu m: my $a = [ rand xx 100 ]; my @p = (start { $a }) xx 10; say @p».result».elems
18:18 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
18:18 grondilu ^this seems to always work
18:18 Sysaxed` joined #perl6
18:22 TimToady heh, I got 0 0 0 0 0 0 0 0 0 0 once...
18:22 TimToady on the original
18:22 Akagi201 joined #perl6
18:24 TimToady I wonder if there's something in .flat or in binding to *@
18:25 coffee` joined #perl6
18:26 bartolin [Coke]: I'm fine with no longer updating the list of hackathon tickets. (I wasn't sure how useful it would be, so I held it up to date for a while.)
18:26 bartolin and: hi, #perl6
18:26 PerlJam m: my @a = ^100; my @p = map { start { [ $_, @a ] } }, ^10; say @p».result».elems
18:26 camelia rakudo-moar 68c432: OUTPUT«101 101 101 101 101 101 101 101 101 101␤»
18:26 PerlJam m: my @a = ^100; my @p = map { start { [ $_, @a ] } }, ^10; say @p».result».elems
18:26 camelia rakudo-moar 68c432: OUTPUT«101 101 101 101 101 101 101 101 101 101␤»
18:27 PerlJam locally, I get 1 instead of 101 on one of those
18:28 grondilu m: my @a = rand xx 100; my @p = (start { [ @a ] }) xx 10; say @p».result».elems
18:28 camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
18:28 grondilu m: my @a = rand xx 100; my @p = (start { [ @a ] }) xx 10; say @p».result».elems
18:28 camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:28 grondilu m: my @a = rand xx 100; my @p = (start { [ @$@a ] }) xx 10; say @p».result».elems
18:28 camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:29 cognominal joined #perl6
18:29 TimToady yeah, the .flat implied by [@a] is messing up, though that mostly only explains the misplaced elements, not the Cannot invokes
18:29 cygx left #perl6
18:29 rba_ joined #perl6
18:29 TimToady but replacing [@a] with $(@a) doesn't misplace the 100s
18:30 TimToady it only fails with Cannot invoke
18:30 TimToady so something ain't threadsafe in [@a]
18:30 [Coke] bartolin++
18:33 eli-se joined #perl6
18:35 grondilu meanwhile I suppose I can use $im instead of @im in http://rosettacode.org/wiki/Mandelbrot_set#Perl_6
18:35 grondilu (as a workaround that is)
18:38 noganex joined #perl6
18:39 [Coke] grondilu: I just tried to run that and my mac claims the output isn't a ppm file.
18:39 grondilu It very much is, though.
18:40 grondilu maybe your run included error messages or something?
18:40 grondilu s/run/output/
18:41 grondilu also, I've just edited to $im intead of @im.  Should fail less.
18:42 meisl joined #perl6
18:42 FROGGS domidumont: hi, what's the state of moar/nqp/rakudo for debian? is there something blocking?
18:42 meisl m: say 'hello'
18:42 camelia rakudo-moar 68c432: OUTPUT«hello␤»
18:43 FROGGS domidumont: I see that there is this [^1], does that need to go through some test procedure? [^1] https://ftp-master.debian.or​g/new/moarvm_2015.04-1.html
18:43 FROGGS hi meisl
18:43 meisl hi FROGGS
18:44 rindolf joined #perl6
18:45 meisl I'm still after QAST::Block / QAST::Stmt(s)
18:46 meisl jnthn: I was directed to you re QAST, are you there?
18:46 airdisa joined #perl6
18:47 FROGGS[mobile] joined #perl6
18:48 spider-mario joined #perl6
18:48 airdisa_ joined #perl6
18:50 meisl sorry for the newby q: how do I make a status msg here à la "* meisl is doing this or that"?
18:50 vendethiel /me
18:50 * meisl watches FCB vs FCB
18:50 meisl thx, vendethiel
18:51 * meisl
18:52 meisl vendethiel: and how did you say literal "/me"?
18:52 vendethiel /say :P
18:52 raiph joined #perl6
18:52 meisl /me
18:52 jercos /you
18:52 meisl /say /me
18:52 jercos for some clients, that has a short form with just a slash
18:53 meisl i c
18:53 jercos / /me
18:53 jercos /me
18:53 jercos :D
18:53 meisl wooow, gooool for FCB!
18:53 meisl only three left...
18:55 meisl jercos: mine eats all my typing without notice and sends nothing if I use only /
18:55 jercos heh
18:55 jercos now you can send your future self secret messages, only readable with the up arrow.
18:56 meisl yes, and in case I forget - I'll just ask NSA
18:56 japhb .botsnack
18:56 yoleaux 02:57Z <timotimo> japhb: i'm experiencing an extreme delay in both the compare and history subcommands of perl6-bench right now
18:56 synbot6 om nom nom
18:56 yoleaux :D
18:56 yoleaux 02:58Z <timotimo> japhb: perl with the analyze command is now using 720 mb res, which i gather is more than usual? it's at 6 minutes cpu time now for 10 checkouts of nqp-moar
18:56 yoleaux 03:01Z <timotimo> japhb: on the other hand, it may have something to do with the fact that all those timing files are about 140 megabytes in size each
18:57 timotimo ohai
18:58 japhb timotimo: analyze was never intended to be optimal, just "good enough".  Also, I assume if you analyze a bunch of large timing files, you've got the RAM to avoid swapping.  I've made very little attempt to reduce data structure size or complexity, just because it hasn't mattered much before this.
18:59 * meisl sees Munich's man with the mask (Lewandowski) embarass Barca's defense
18:59 japhb But clearly, laziness has met its match.  How much RAM do you have, and what's the peak virtual memory used by the analyze process?
19:00 * japhb wonders if we have to start thinking about real optimization
19:01 meisl aargh, Neymar to level, 1:1 (will stop it now)
19:02 telex joined #perl6
19:07 muraiki joined #perl6
19:10 FROGGS jnthn: ahh, I just remember that my last version of inlined unions was using a trait 'is inlined' on an attribute... would that also get your +1?
19:11 FROGGS jnthn: because that might even work very well for fixed sized inlined native arrays
19:12 cognominal joined #perl6
19:16 dalek rakudo/cunion: 513b1b6 | FROGGS++ | / (4 files):
19:16 dalek rakudo/cunion: add support for unions in NativeCall using CUnion repr
19:16 dalek rakudo/cunion: review: https://github.com/rakudo/rakudo/commit/513b1b6855
19:16 [Sno] joined #perl6
19:18 dalek rakudo/cunion: 7fbabfc | FROGGS++ | t/04-nativecall/13-union. (2 files):
19:18 dalek rakudo/cunion: add tests for C union support for NativeCall
19:18 dalek rakudo/cunion: review: https://github.com/rakudo/rakudo/commit/7fbabfcf61
19:18 FROGGS zostay: if you want you can test now MoarVM/cunion, nqp/master, rakudo/cunion... just pushed t/04-nativecall/13-union.t
19:22 meisl FROGGS: I'd appreciate to hear your opinion on 2 thoughts re QAST I had since yesterday (sorry to bother you again)
19:24 FROGGS[mobile]2 joined #perl6
19:25 brrt joined #perl6
19:25 meisl FROGGS: may I both you again with 2 thoughts of mine re QAST?
19:25 FROGGS[mobile]2 meisl: yes?
19:26 jnthn TimToady: The CALLER thing with protos isn't random as far as I remember. It's that onlystar protos are invisible.
19:26 meisl FROGGS: thx; re the difference Block vs Stmt(s): theres *2* aspects
19:26 jnthn TimToady: Because we totally avoid calling the onlystar ones in many cases. :)
19:27 jnthn TimToady: So it was getting confusing that only the first invocation showed up in CALLER
19:27 TimToady might be easier to teach that it just skips protos
19:27 meisl FROGGS: 1st: make a new lex scope (ie: so that I can hide eg "x" from an outer scope with my inner "x")
19:28 TimToady and it should be consistent
19:28 jnthn Well, differently consistent, but yes :)
19:28 meisl FROGGS: still there?
19:29 FROGGS[mobile]2 yes, I am
19:29 * TimToady prefers consistent from the user's POV :P
19:29 jnthn TimToady: What frames *should* appear in CALLER:: ?
19:29 FROGGS[mobile]2 meisl: I am waiting for the question
19:30 meisl FROGGS: sorry; 2nd aspect, *orthogonal* to 1st: define a sequence of things to do
19:31 meisl FROGGS: my thesis now is this: Block is for doing both, "make new scope" and "hold seq of things to do"
19:31 meisl FROGGS: whereas Stmt(s) is only for 2nd, "hold seq of things to do"
19:32 jnthn meisl: It's primary purpose is the first, the second is simply convenient.
19:32 timotimo m: my str $hashres = (my %foo){"hello"};
19:32 camelia rakudo-moar 68c432: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/R_82q5ou7I:1␤␤»
19:32 meisl jnthn: "It['s purpose]" referring to ... Block?
19:32 jnthn meisl: Yes.
19:32 Sysaxed` joined #perl6
19:33 jnthn meisl: I typed my line before I saw your QAST::Stmts one :)
19:33 zostay FROGGS: do you mean MoarVM/union? looks like cunion is just rakudo
19:33 * meisl confused
19:34 TimToady m: (say "STMT 1"; say "STMT 2")
19:34 camelia rakudo-moar 68c432: OUTPUT«STMT 1␤STMT 2␤»
19:34 jnthn QAST::Block = lexical scope, QAST::Stmts = list of things to do, QAST::Stmt = list of things to do and assume any locals generated while compiling it will go away at the end of it (in order to improve code-gen)
19:35 dalek perl6-examples: b648562 | (Steve Mynott)++ | categories/cookbook/14database-access/ (2 files):
19:35 dalek perl6-examples: simple DBIish example
19:35 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/b648562481
19:35 jnthn Since a QAST::Block always needs to contain what the block does, then it may as well just have a predictable API matching QAST::Stmts in terms of how you put stuff inside of it.
19:35 TimToady how...traditional... :)
19:35 TimToady but I agree
19:35 dolmen joined #perl6
19:36 jnthn We take advantage of it all over NQP/Rakudo. :)
19:36 TimToady the concepts are indeed orthogonal, as shown by my blockless sequence of statements above
19:37 meisl jnthn: sorry, I don't understand "*may* [..] have a predictable API matching [..]" - does it have it or not?
19:37 jnthn Yes, it has.
19:37 jnthn The current design is deliberate and useful.
19:37 laouji joined #perl6
19:38 meisl jnthn: sure. ok, so Block does include the "def things to do in seq"?
19:38 TimToady in a sense { S1; S2 } is shorthand for { (S1; S2) }
19:38 timotimo it's time we get the boxing/unboxing tracking thing in place ...
19:38 dalek perl6-examples: c043d5e | (Steve Mynott)++ | categories/cookbook/14database-access/video.db:
19:38 dalek perl6-examples: oops
19:38 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/c043d5e652
19:38 TimToady it's just one of the places that allows a sequence of statements
19:38 jnthn meisl: Yes.
19:39 TimToady it's just not the only way to do it, hence, not its primary purpose
19:39 jnthn Exactly.
19:39 meisl hmm, ok
19:40 TimToady this does diverge slightly from the definition of "block" used in some other languages
19:41 meisl the one point that made me kinda "get it", was the `if` example - there you want to bundle a seq of things to do without making a new scope
19:41 meisl right?
19:42 TimToady you mean, as in 'if $cond { "nothing declared here"; "or here either" }'?
19:42 _mg_ joined #perl6
19:42 airdisa joined #perl6
19:43 TimToady it's certainly the case that we use the block form there in a way that you can't just say 'if $cond (<statements>)"
19:44 TimToady so we force you to use a block for sequences in that particular case
19:44 meisl TimToday: quite so; maybe better ex would be 'if $cond { my $x := 42; }'  would err if $x is declared in the if's outer scope
19:44 TimToady unless you're willing to use a slightly different syntax...
19:44 TimToady no, it's still a declarative scope, so no error
19:45 meisl huh?
19:45 TimToady m: my $x = 42; if True { my $x = 43; say $x }; say $x
19:45 camelia rakudo-moar 68c432: OUTPUT«43␤42␤»
19:45 meisl now I'm really confused
19:46 TimToady it's just shadowing it as any lexical scope would
19:46 TimToady curlies always do that
19:46 mohij joined #perl6
19:46 TimToady (unless used as quote chars)
19:46 jnthn meisl: In Perl 6, every block is (conceptually) a differnet lexical scope. We tend to generate those as QAST::Block, though the optimizer is free to tweak 'em to QAST::Stmts if it can prove there are no declarations there.
19:47 TimToady m: my $x = 42; my %hash = :a(1); say %hash{ my $x = 43; say $x; 'a' }; say $x
19:47 camelia rakudo-moar 68c432: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $x␤    at /tmp/Th9L9eRM5U:1␤    ------> 3= 42; my %hash = :a(1); say %hash{ my $x7⏏5 = 43; say $x; 'a' }; say $x␤43␤(Any)␤43␤»
19:47 TimToady that one is not being a lexical scope, I guess
19:47 TimToady std: my $x = 42; my %hash = :a(1); say %hash{ my $x = 43; say $x; 'a' }; say $x
19:47 camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
19:47 meisl well, I think I must stress that my main focus is *not* on P6 syntax but rather on how to properly use QAST::Node s
19:47 TimToady it is a separate lexical scope in STD, so possibly a buglet
19:47 TimToady well, STD doesn't have very many QAST nodes, I'll admit :)
19:48 TimToady std: my $x = 42; my %hash = :a(1); say %hash{ $x = 43; say $x; 'a' }; say $x
19:48 camelia std 28329a7: OUTPUT«ok 00:00 142m␤»
19:48 jnthn meisl: Differnet languages behave in different ways.
19:48 TimToady m: my $x = 42; my %hash = :a(1); say %hash{ $x = 43; say $x; 'a' }; say $x
19:48 camelia rakudo-moar 68c432: OUTPUT«43␤(Any)␤43␤»
19:48 TimToady not clear why that doesn't print 1 in the middle
19:49 noganex_ joined #perl6
19:49 meisl ooh, you're loosing me...
19:49 TimToady that looks kinda like a bug
19:49 TimToady %hash{'a'} should be 1
19:49 domidumont FROGGS: moar is pending  a  manual review done by a small team. 600+ packages are currently waiting in this queue.. :-/
19:50 jnthn meisl: If I was writing a JavaScript compiler, for example, I'd use QAST::Stmts for the blocks in the if statement.
19:50 TimToady m: my $x = 42; my %hash = :a(1); say %hash{ 'a' }; say $x
19:50 camelia rakudo-moar 68c432: OUTPUT«1␤42␤»
19:50 TimToady it's 1 there
19:50 TimToady but adding statements appears to break that
19:50 meisl jnthn: and no Block at all?
19:50 jnthn meisl: Only for functions.
19:50 TimToady oh ; is multidimensional there, duh
19:50 jnthn At least, as far as I understand JavaScript semantics :)
19:51 TimToady m: my $x = 42; my %hash = :a(1); say %hash{ SEQ($x = 43; say $x; 'a') }; say $x
19:51 camelia rakudo-moar 68c432: OUTPUT«43␤1␤43␤»
19:51 TimToady there we go
19:52 meisl jnthn: sure, JS details aside. for functions you'd make a Block - and inside that, do you really need a Stmt(s) right under it as the only child, or can you just put your stuff under the Block?
19:52 TimToady (subscripts steal semicolon for multidimensionality)
19:52 jnthn meisl: You can put it directly in block.
19:53 vendethiel do only "Blocks" introduce new lexical scopes?
19:53 jnthn vendethiel: Yes
19:53 vendethiel or is the scoping COMPLETLY unrelated?
19:53 jnthn QAST::Block = lexical scope
19:53 vendethiel it's a bit different in JS, as the "var" scope is different than the "let" scope
19:53 vendethiel "let" is block-scoped (inside "if", "for", etc), but function-scoped for "var"
19:53 vendethiel (with all the variables declarations hoisted, and the duplicate ones removed (think parameter ones))
19:54 PerlJam Everybody knows about https://github.com/perl6/nqp/b​lob/master/docs/qast.markdown right?
19:54 meisl vendethiel: JS scoping is horrible (-y broken), so maybe not the best of exs
19:54 vendethiel ;-)
19:54 jnthn meisl: However, in the Perl 6 and NQP compilers, we tend to put two QAST::Stmts in our QAST::Blocks: the first one holding declarationy things and the second holding the actual things the user wrote
19:54 TimToady it's a really good example :P
19:54 meisl PerlJam: that's my main source
19:54 jnthn meisl: But that's not anything QAST specific, it's just how we chose to do it.
19:55 jnthn meisl: If you choose to put all your stuff directly in the QAST::Block then it'll be fine too.
19:55 masak meisl: I find that as horribly broken as JS scoping is, it somehow works very well for JS. :) in particular, if you write every thing as small cute functions calling each other, you practically have block == function anyway... and the problem of hoisting largely goes away. :)
19:56 TimToady that's also the python excuse :)
19:56 meisl jnthn: so that's just for kinda having things "nicely sorted", in a way. rather "QAST-cosmetics"?
19:57 masak TimToady: Python is worse. mostly because assigning = declaring. ugh.
19:57 TimToady same excuse though
19:57 meisl masak, TimToday: I didn't actually intend to criticize JS or python, just that, as an example, too intricate for the discussion here
19:57 masak at least JS allows you to write to closed-over variables :/
19:58 TimToady there are lots of languages that are willing to torment the user on behalf of of the implementors...
19:58 jnthn meisl: Yes, it makes a few things easier for us.
19:58 arnsholt Wrapping closed over variables in an array works though
19:58 arnsholt But yeah, it's not a very pretty hack =)
19:59 masak arnsholt: wrapping the hammer in cotton makes hitting yourself with it hurt less.
19:59 meisl jnthn: you mean it (== Stmt right under Block) gives the later stages hints on optimization?
19:59 arnsholt masak: *giggle* Yeah =D
20:00 TimToady if you use cotton candy, it even tastes good, if you happen to hit yourself in the mouth
20:01 masak arnsholt: the pattern you mention is somewhat useful, though. I've seen it in Java too, to emulate writable parameters.
20:01 jnthn meisl: More that it eases some of the transforms/analysis we need to do there.
20:01 arnsholt Yeah, Python and Java are basically equivalent in that department
20:01 meisl jnthn: I'm asking because there is the Stmt variant, which is said to enable some optimization re locals
20:02 masak that wasn't my point. the patterns are used for wildly different things. I'd say that Java's hangup is of a different type than Python's, though the symptoms kind of look the same.
20:02 meisl ...and which is said to be abusable - could you give an ex where it is used wrongly
20:03 arnsholt Yeah, that's true. Different cause but same symptom
20:04 jnthn meisl: QAST::Stmt.new( QAST::Var.new( :name('foo'), :scope('local'), :decl('var') ), QAST::Stmt.new( QAST::Var.new( :name('foo'), :scope('local') ) )
20:04 masak the Java implementors have convinced themselves that true closures are too hard. they are the only language implementors who believe this.
20:05 jnthn The local decl'd in one QAST::Stmt will not be available in the second.
20:05 jnthn Whereas if they were QAST::Stmts it would be fine
20:05 meisl jnthn: yes, got that
20:06 mohij joined #perl6
20:06 jnthn It allows the QAST -> backend code-gen to re-use a register (or VM-level local) that it otherwise could not.
20:06 meisl i c
20:06 jnthn In terms of "abusing" it, it's just that you generate code like the above.
20:06 jnthn I think we catch it and give a sane enough error.
20:06 meisl nothing else?
20:07 meisl I mean, no other cave-ats?
20:07 jnthn Not as far as I can remember.
20:07 jnthn I've only been bitten when I used it, then realized I'd created the above situation by accident.
20:08 meisl ok, thx. I think the docs should be more clear about it
20:08 vendethiel masak: I'm sure guido thinks the same ;-)
20:08 * masak .oO( we all caved at the problem ) :P
20:08 arnsholt masak: IIRC the official reasoning for that being outlawed is "something something optimisation"
20:09 masak bleh.
20:09 jnthn meisl: If so, plesae either (a) submit an improvemnet, or (b) file a github issue on the repo containing the docs you read and referencing this chat, so one of us here can fix it.
20:10 meisl jnthn: yep, I'll try to come up with something
20:10 * masak .oO( it's like a million `final` declarations cried out in pain, and were then silenced )
20:10 meisl jnthn: but before I should make sure I know what I'm talking about, shouldn't I? ;)
20:11 PerlJam meisl: not always :)
20:11 meisl PerlJam: ?
20:11 Akagi201 joined #perl6
20:12 rurban joined #perl6
20:12 jnthn meisl: Well, you can run it by somebody here :)
20:12 PerlJam meisl: you can give patches based on your incomplete understanding and the interplay between you and others can converge on the "right thing"
20:13 meisl ah, ok. part of my converging is asking annoying qs here :)
20:15 andreoss joined #perl6
20:15 meisl well ok, let's try again to isolate the basic concepts involved in here
20:17 meisl right now it seems to me there are there 3: a) new lex scope, b) def things to eval in order given, c) local vars vs lex vars (to give later stages hints about optimization)
20:18 meisl at first: do you agree these three are completely independent (as concepts, I mean)
20:18 meisl ?
20:18 FROGGS c depends on a, no?
20:19 raiph joined #perl6
20:19 FROGGS zostay: I created MoarVM/cunion an hour ago, so you might need ti git fetch
20:19 FROGGS to*
20:19 itz_ this takes an old joke one step further
20:20 itz_ http://www.amazon.co.uk/V-096TT-Ultrixx​-Cylinder-Vacuum-Cleaner/dp/B000JJ4GRA
20:20 meisl FROGGS: as c) mentions "lex", you're right on a surface level - but the stress is on optimization
20:20 FROGGS meisl: I mean that there can't be locals without different lexical scopes
20:21 raiph joined #perl6
20:22 meisl FROGGS: so, in order to *talk* or *understand* concept c) you sure need concept a) - but on the level of implementation, they may well be separated
20:22 jnthn I'd probably explain it as somehting like: QAST::Stmts holds a sequence of statements. QAST::Stmt is a special form of it that bounds the scope of local decls. QAST::Blcok is a special form of it that also denotes a lexical scope and an callable thing.
20:22 jnthn But with less typos. :)
20:23 FROGGS meisl: sure
20:23 meisl jnthn: maybe instead of "that also denotes..." you'd have "that in addition denotes..."?
20:24 TimToady well, that can also be misconstrued if you try hard enough :)
20:25 TimToady .oO("What addition got to do with it?")
20:25 masak semantics is hard.
20:25 meisl jnthn: "...and it (Block) *lacks* the possibility to mark a "locals" boundary", right?
20:25 TimToady so's typing 's
20:27 meisl TimToday: I'm not talking about adding numbers, guess you're joking. Are you?
20:28 TimToady you should generally assume I'm joking, except when I'm not...
20:28 FROGGS TimToady is never joking
20:28 jnthn meisl: A local is only visible inside the QAST::Block it's immediately declared in. That's the difference between local and lexical.
20:28 FROGGS ... unless when he is
20:28 PerlJam TimToady is always joking.
20:28 PerlJam (except when he's not)
20:28 FROGGS :D
20:29 meisl I know TimToday is always right, even when joking.
20:29 TimToady there's an echo in here, except when there isn't...isn't...isnt...
20:29 PerlJam ... and then he invokes rule #2.
20:30 meisl I also know that he's right, even when not.
20:30 meisl price question: Am I joking?
20:30 TimToady you gotta be kidding me...
20:30 masak m: say "is meisl joking?"; say Bool.pick
20:30 camelia rakudo-moar 68c432: OUTPUT«is meisl joking?␤True␤»
20:30 meisl I never would...
20:30 masak meisl: you're joking, according to camelia.
20:31 FROGGS isnt...isnt...ᵢₛₙₜ...
20:31 jercos m: say Nose.pick
20:31 camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UYXvoWe0oZ␤Undeclared name:␤    Nose used at line 1␤␤»
20:31 meisl well, camelia isnt TimToday isnt meisl (chaining)
20:31 japhb m: say (my class Nose).pick
20:31 camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8HrPRlg81b␤Unable to parse class definition␤at /tmp/8HrPRlg81b:1␤------> 3say (my class Nose7⏏5).pick␤    expecting any of:␤        generic role␤»
20:31 japhb m: say (my class Nose {...}).pick
20:31 camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WGeUt_nSm5␤The following packages were stubbed but not defined:␤    Nose␤at /tmp/WGeUt_nSm5:1␤------> 3say (my class Nose {...}).pick7⏏5<EOL>␤    expecting any of:␤        postfix␤        st…»
20:32 japhb m: say (my class Nose {}).pick
20:32 camelia rakudo-moar 68c432: OUTPUT«Nil␤»
20:32 masak m: say (my enum <poke scratch>).pick
20:32 camelia rakudo-moar 68c432: OUTPUT«scratch => 1␤»
20:32 jercos Tell me Mr. Anderson, what good is a pick method... if you have no Nose?
20:32 masak jercos: The Nosetrix
20:32 TimToady if I did have a nose, it'd be Empty
20:32 japhb Neo's Nose
20:32 meisl you can always mixin Nose
20:33 masak much better than Noses Reloaded and Nose Revolutions.
20:33 japhb m: 'Nose'.comb.pick(*).say;
20:33 camelia rakudo-moar 68c432: OUTPUT«N o s e␤»
20:34 meisl japhb: given a Nose, and something returned from pick, would choose the red one or the blue one?
20:34 meisl (would you)
20:34 jnthn If it's blue, I'd mebbe go to the doctor :P
20:34 meisl well, red doesn't seem any better...
20:34 japhb jnthn: That assumes you haven't been around blue dust (e.g. surveyor's chalk)
20:35 masak if it's red, then at least you can guide the other reindeer home...
20:35 * TimToady sneezes violetly
20:36 meisl ...and looses an "n" in the course
20:37 FROGGS TimToady: brass you
20:37 japhb .oO( "Her you go small fry.  Blow it." ... "Boy, he blew it!" )
20:37 meisl masak: I didn't know about the *insides* of Rudolf's nose
20:38 masak the insides are an implementation detail.
20:38 meisl :D
20:38 TimToady red or blue encapsulation?
20:38 meisl oh gosh, you're picking capsules out of your noses already?
20:39 * moritz prefers read/blue trees
20:39 moritz *red/blue
20:39 meisl moritz: guess blue or black - is just an impl detail?
20:41 moritz meisl: yes, blue/black trees might also work, though the contrast isn't very good :-)
20:41 masak to me, the tree looks gold and white.
20:41 * TimToady beats masak black or blue.
20:41 masak :P
20:41 japhb I was composing just such a response
20:41 masak also, ow.
20:42 japhb Along the lines of "/me smacks masak with a Dali clock"
20:42 * masak bends accordingly
20:42 * TimToady beats japhb *to* black or blue.
20:42 japhb :-D
20:42 masak beat that, black or blue!
20:42 brrt joined #perl6
20:42 TimToady the Dali clock is...unevenly distributed...
20:42 japhb Damn it, now I have "Beat It" running through my head
20:43 meisl masak: just curious: where do you see the root, top or bottom?
20:43 masak meisl: just pretend that a wizard is levitating the tree.
20:43 moritz in space, all tree roots point... somewhere.
20:44 masak in topology, we can have pointless trees.
20:44 moritz .oO( "there's no gravity in my RAM" )
20:44 masak er, point-free. I meant point-free.
20:44 PerlJam ... assume a spheircal tree of uniform density ...
20:44 meisl in irc, we can have pointlessness - for free :)
20:44 japhb .oO( Remember, the enemy's tree is DOWN! )
20:44 * masak .oO( what is this, Friday? )
20:45 FROGGS meisl: we got past that point already :o)
20:45 TimToady it's a dress rehearsal
20:45 FROGGS YEARS ago
20:45 japhb True
20:45 meisl FROGGS: what point?
20:45 jnthn masak: Friday is only Black... :P
20:45 FROGGS meisl: talking pointless stuff
20:46 * jnthn gets some rest
20:46 FROGGS sleep well jnthn
20:46 jnthn Will be doing Perl 6 hacking on Thu/Fri \o/
20:46 FROGGS \o\
20:46 brrt \o/
20:46 TimToady /o/
20:46 jnthn o/ &
20:46 masak /o/
20:46 masak jnthn: ⅋ /o
20:46 vendethiel \o/o\o/o\o/
20:47 * meisl lost the point but got quite some o's
20:47 geekosaur ooo
20:47 vendethiel roll them 'round
20:47 TimToady /o\  <-- australian celebrating
20:47 masak vendethiel: are you actually five people? this explains a lot.
20:47 meisl jnthn: thx for your help
20:47 vendethiel masak: or I might be drunk! *g*
20:48 * TimToady looks for a ven diagram
20:48 masak wait, how drunk do you have to be to see five copies of things?
20:48 vendethiel I can't remember. *g*
20:48 masak :D
20:48 meisl TimToday: again, one "n" left ;) but thx for your help, too
20:48 vendethiel TimToady: I have a friend that sends me a new one every day already...
20:48 TimToady masak: drunk enough to induce cataracts might do it
20:49 masak sounds ungood.
20:49 geekosaur .oO { there! are! four! o-s! }
20:49 masak geekosaur: is that TNG?
20:50 geekosaur yep
20:50 * masak has no idea how he knows that
20:50 meisl TimToday: oh, I now get your joke re "ven". sorry, master.
20:51 TimToady o problem
20:54 meisl TimToday: thx, but seriously: Venn diagrams quite nicely remind me of my trying to understand the QAST nodes and concepts involved
20:54 vendethiel .oO( the NP problem is a non-problem problem )
20:55 meisl TimToday: with up to 3 sets, a Venn diag can be drawn on a paper
20:55 FROGGS .tell jnthn if there is no veto I'd like to merge the cunion branches of moar and rakudo this week
20:55 yoleaux FROGGS: I'll pass your message to jnthn.
20:56 meisl TimToday: can you imagine to depict the scope/seq of things to do/locals vs lexicals thing in such a Venn diag?
20:56 TimToady meisl: maybe you can do more on a Möbius strip
20:57 masak probably not; but a torus should open up some possibilities.
20:57 vendethiel m: class A{has $.a;}; say A.new(:5a).hash
20:57 camelia rakudo-moar 68c432: OUTPUT«Odd number of elements found where hash initializer expected␤  in block <unit> at /tmp/E_Bbyo3a55:1␤␤»
20:57 TimToady troo
20:57 * TimToady thinks about Klein bottles...
20:57 vendethiel so, I want to write a "is serializable" (hashable?) and add a method "hash" or "values" or something along those lines
20:58 vendethiel I think I should have enough example material.
20:58 * TimToady wonders what a Klein torus would look like...
20:58 * FROGGS .oO( There are no Klein bottles in Texas surely... )
20:58 andreoss joined #perl6
20:59 TimToady I think they're all outside Texas, mostly
21:00 * masak .oO( you can put the Klein bottle outside Texas, but you can't put Texas outside the Klein bottle )
21:01 Peter_R joined #perl6
21:01 meisl TimToday: so you agree that those 3 *concepts* are independent and only in the QAST::Node realization we see some particular choice/combination of  regions of the V-diag?
21:01 * meisl is trying to be serious, really
21:04 TimToady I think c mixes up some lexical and dynamic ideas, and the lexical ones are intertwined with a
21:04 TimToady s/up/together/
21:04 TimToady don't mean "mixes up" in a pejorative sense
21:05 TimToady (except if I do...ba dump bump)
21:05 TimToady but I'm not the QAST expert here
21:05 timotimo i wonder if we can have an opposite of punning ... so p-un?
21:05 timotimo p-un a class into a role
21:06 meisl I'm not about to judge the design, either. Just trying to get my head around it.
21:08 meisl TimToday: "and the lexical ones are intertwined with a" - as I said to FROGGS, I think we there's a meta-level involved there
21:10 zostay FROGGS: your tests pass for me, but it does not try to handle a union of structs, which seems not to work
21:10 FROGGS zostay: ohh, that might be NYI...
21:11 meisl TimToday: that is, when I said "independent" I meant the *object* level (= apart from the fact that *concept* c) is understandable only in terms of *concept* a))
21:11 FROGGS a union of pointers to structs might be pretty easy to do btw
21:13 zostay sadly, that's not how the gumbo library works, i need union { GumboDocument; GumboElement; GumboText } v; or i have to write a shim in C, which is doable, but not quite as nice
21:13 FROGGS zostay: that's also not hard to implement, just a little harder than pointers :o)
21:14 FROGGS let me add a test first
21:16 zostay cool
21:22 meisl TimToday: concepts and meta-levels aside, but what did you mean by "c mixes up some lexical and dynamic ideas" - I can't see any dynamic aspect in local vars?
21:24 Peter_R joined #perl6
21:25 yqt joined #perl6
21:26 Vlavv joined #perl6
21:30 H2O1 joined #perl6
21:30 H2O1 left #perl6
21:31 Peter_R joined #perl6
21:32 FROGGS zostay: I have something to push tomorrow
21:32 FROGGS gnight #perl6
21:35 masak 'night, #perl6
21:37 zacts joined #perl6
21:41 raiph joined #perl6
22:00 eli-se joined #perl6
22:01 larion joined #perl6
22:07 Zoffix joined #perl6
22:10 yqt joined #perl6
22:26 laouji joined #perl6
22:29 rjbs Is there something to be done to get ^P/Up to go through repl history?
22:32 timotimo install "Linenoise" via panda
22:32 rjbs m: (65..75).map({ .chr }).perl.say
22:32 camelia rakudo-moar 68c432: OUTPUT«("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K")␤»
22:33 rjbs m: (65..75).map({ .chr => .chr }).perl.say
22:33 timotimo m: say "A".."K"
22:33 camelia rakudo-moar 68c432: OUTPUT«Method 'chr' not found for invocant of class 'Any'␤  in block <unit> at /tmp/t7UF5oWXi5:1␤␤»
22:33 camelia rakudo-moar 68c432: OUTPUT«"A".."K"␤»
22:33 rjbs What's going on in that second one?
22:33 timotimo you're constructing a pair
22:33 rjbs timotimo: Yeah, getting the range wasn't actually the point, sadly.
22:33 timotimo while you're calling $_.chr on whatever $_ is outside
22:34 timotimo m: (65..75).map({ 10 => 20 }).perl.say
22:34 camelia rakudo-moar 68c432: OUTPUT«Method 'count' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/yNMXxKua0H:1␤␤»
22:34 timotimo m: (65..75).map({ a => 20 }).perl.say
22:34 camelia rakudo-moar 68c432: OUTPUT«Method 'count' not found for invocant of class 'Hash'␤  in block <unit> at /tmp/1PR0wKioyo:1␤␤»
22:34 timotimo ah, it won't accept a Pair or hash to be passed there
22:34 rjbs Does it think that { .chr => .chr }is a hash?
22:34 timotimo m: (65..75).map( *.chr => *.chr ).perl.say
22:34 camelia rakudo-moar 68c432: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/kOH47PhlwJ:1␤␤»
22:34 rjbs I have to say, I am baffled that the ambiguity of {} remains in p6. :(
22:35 timotimo m: (65..75).map({ $^a.chr => $^a.chr ).perl.say
22:35 camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/usUfMxb1aN␤Missing block␤at /tmp/usUfMxb1aN:1␤------> 3(65..75).map({ $^a.chr => $^a.chr 7⏏5).perl.say␤    expecting any of:␤        statement end␤        statement modifier␤        statemen…»
22:35 timotimo m: (65..75).map({ $^a.chr => $^a.chr }).perl.say
22:35 camelia rakudo-moar 68c432: OUTPUT«(:A("A"), :B("B"), :C("C"), :D("D"), :E("E"), :F("F"), :G("G"), :H("H"), :I("I"), :J("J"), :K("K"))␤»
22:35 rjbs m: (65..75).map(-> { .chr => .chr }).perl.say
22:35 camelia rakudo-moar 68c432: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at /tmp/l7SO2kUlHW:1␤␤»
22:35 rjbs m: (65..75).map(-> $_ { .chr => .chr }).perl.say
22:35 camelia rakudo-moar 68c432: OUTPUT«(:A("A"), :B("B"), :C("C"), :D("D"), :E("E"), :F("F"), :G("G"), :H("H"), :I("I"), :J("J"), :K("K"))␤»
22:35 timotimo that's the empty signature
22:35 rjbs Fine.
22:35 timotimo there's no ambiguity, it's all defined crystal clear in the speculations :)
22:35 timotimo gotta go now
22:35 timotimo have a good one :)
22:35 rjbs timotimo: It's ambiguous to casual readers.
22:35 timotimo fair enough
22:36 eli-se goodbye friends
22:44 rjbs Err.  So, I did panda install Linenoise.  Now when I run perl6 it bails out because it can't find liblinenoise.
22:45 rjbs It's looking for liblinenoise.so, but liblinenoise.dylib was installed.
22:46 hoelzro I thought NativeCall looked for .dylib on OS X?
22:47 rjbs Hm.  And there's no uninstall.
22:49 rjbs Fortunately, I am mighty.
22:52 larion joined #perl6
22:56 skids joined #perl6
23:01 Akagi201 joined #perl6
23:02 rjbs Woah, so: https://gist.github.com/9e716296aeef57e65068
23:02 rjbs I get a syntax error from line 151!  A comment!
23:05 TimToady runaway, probably from << ' >> or so
23:05 rjbs It works if I delete the my $DEFAULT_ALPHABET
23:05 rjbs Yeah.
23:05 TimToady rakudo does not yet have the nice runaway detection of p5
23:06 rjbs I didn't realize that <<...>> could contain quoted strings.  I thought it was just space-delimited tokens.
23:06 TimToady that's < >
23:06 TimToady << >> is more like shell quoting
23:06 rjbs TimToady++ # Okay, thanks!
23:06 TimToady m: say << a 'b c' d >>.elems
23:06 camelia rakudo-moar 68c432: OUTPUT«3␤»
23:07 rjbs Maybe don't look at the rest of that code, which is half-rote-translated, half untranslated, and half greenfield. :)
23:07 TimToady I have worse :)
23:07 rjbs I translated this p5:
23:07 rjbs map { chr hex } qw( FF FE a8 )
23:08 rjbs to <FF FE a8>.map({ "0x{$_}".chr})
23:09 TimToady say <FF FE a8>.chrs
23:09 rjbs which just seems perverse
23:09 TimToady m: say <FF FE a8>.chrs
23:09 camelia rakudo-moar 68c432: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a8' (indicated by ⏏)␤  in block <unit> at /tmp/VG_RZt0QJ9:1␤␤»
23:10 rjbs Whoops, back.  Hit a dead zone there.  (I'm on PA Route 309!)
23:11 TimToady m: say <FF FE a8>.map({:16($_)}).chrs
23:11 camelia rakudo-moar 68c432: OUTPUT«ÿþ¨␤»
23:11 rjbs woah
23:13 rjbs Okay, so I see how this works.  Thanks!  But what's going on here? :)  What's the colon *doing*?
23:13 TimToady say :7<333>
23:13 TimToady m: say :7<333>
23:13 camelia rakudo-moar 68c432: OUTPUT«171␤»
23:13 rjbs Right, I played with things in that form fo a while.
23:13 rjbs I did base 3. :)
23:13 TimToady m: say :7('333')
23:13 camelia rakudo-moar 68c432: OUTPUT«171␤»
23:14 TimToady that's the form that takes an argument
23:14 TimToady (non-literal)
23:14 TimToady it's admittedly a bit klunky
23:14 rjbs I had only seen :x(...) used in compact hashes or captures, I think.
23:14 TimToady m: say :16[<FF FE a8>]
23:14 camelia rakudo-moar 68c432: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏FF' (indicated by ⏏)␤  in block <unit> at /tmp/ijs7HuPa_w:1␤␤»
23:14 rjbs I don't know what that form *is* here.  Is it a manifestation of one of those, or something else?
23:15 TimToady m: say :16[FF FE a8]
23:15 camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3S543H1z1G␤Undeclared names:␤    FE used at line 1␤    FF used at line 1␤Undeclared routine:␤    a8 used at line 1␤␤»
23:15 rjbs (Does it have a name?)
23:15 TimToady radix literals, I suppose, but :16() isn't exactly a literal
23:16 TimToady we took a dislike to oct() and hex() because most functions talk about the result type, not the source type
23:16 rjbs So are :foo<1> and :16<1> related beyond appearance?
23:16 TimToady not really
23:16 rjbs Yeah, oct and hex were always problematically named.
23:16 rjbs Okay, thanks, that's all helpful.
23:16 TimToady we just reused the special form 'cause it was available and kinda like things we already had
23:17 * rjbs will go with <...>.map({ :16($_).chr }) for now.
23:17 * rjbs had to delete out a "sub" from his first attempt to type that! :)
23:18 TimToady we actually have a generic radcalc() routine in Actions.pm, but nobody's bother to make it generally available
23:18 TimToady *ed
23:20 rjbs Nice error message on :16(1), btw.
23:20 * TimToady bows
23:23 TimToady (was my idea, though someone else implemented it, I think)
23:23 rjbs (65..70).chrs.chars <-- I don't know whether I have feelings about that yet. :)
23:24 TimToady well, you can do ».chr.join if .chrs bothers you :)
23:24 * rjbs now wants to sneak an .elms method onto something.
23:25 rjbs (Is there a Tree class?)
23:25 TimToady but yeah, there aren't enough plural forms in English :)
23:25 TimToady nor enough brackets in ASCII
23:25 TimToady there's a .tree method
23:26 rjbs Great, we can add .elms and .firs.
23:26 rjbs What's firs do?  / Why, gives you the firs child, of course!
23:28 TimToady makes more sense than .car
23:28 rjbs Time to get off the bus and go home.  Thanks for the help.  One last question that I may read the answer to once home:
23:28 rjbs Is the simplest way to get character X out of a string: $str.substr(X, 1) ?
23:29 TimToady depends on what you want to do with it
23:29 TimToady nqp actually has an ordat, and we have an substr-eq that will compare at a location
23:30 TimToady but if you actually want the char, .substr is what there is
23:30 TimToady the rules are a bit different for a buffer though, where you can use .[]
23:39 rjbs I'm porting this from p5 and I haven't yet quite determined where I need a buffer/array/string boundary, but I know this bit is string.  I'll use substr!  Thanks.  (I made it home. (And there was a sandwich waiting for me!))
23:41 Vlavv joined #perl6
23:41 timotimo home is where a sandwich is waiting for you
23:42 rjbs I guess this isn't home anymore. :(  <burp>
23:43 timotimo d'aaw
23:43 rjbs Wow, lots of Method+{<anon>}.new in the results for [1,2,3].^methods.  I don't think those used to be there.
23:43 gfldex joined #perl6
23:43 timotimo right, you'll have to >>.name there to get something more proper
23:43 timotimo and i don't really know why those started appearing
23:44 TimToady those are the nodal methods
23:44 * rjbs would guess they're related to native type arrays or something.  But don't listen to rjbs, he knows nothing.
23:45 TimToady m: say [1,2,3].^methods
23:45 camelia rakudo-moar 68c432: OUTPUT«new BIND-POS DELETE-POS flattens name of default dynamic REIFY STORE Method+{<anon>}.new Method+{<anon>}.new perl ACCEPTS elems iterator pick plan sort uniq unique Method+{<anon>}.new infinite fmt list flattens gimme sink STORE_AT_POS Method+{<anon>}.new M…»
23:45 timotimo oh, they are?
23:45 rjbs I find myself doing this kind of thing *all the time* on the repl:  $X.^methods.map({ .name }).sort
23:45 rjbs I need to make shorthand for it.  Soemhow.
23:45 TimToady m: say [1,2,3].^methods».name.sort
23:45 camelia rakudo-moar 68c432: OUTPUT«ACCEPTS ACCEPTS ASSIGN-POS AT-POS AT-POS BIND-POS Bool CALL-ME Capture DELETE-POS DUMP EXISTS-POS FLATTENABLE_HASH FLATTENABLE_LIST Int Int Num Numeric Numeric Parcel REIFY REIFY STORE STORE_AT_POS Str Str Supply antipairs combinations default dynamic eage…»
23:47 rjbs Now that's nice: if any($alphabet.ords) > 0xFF;
23:47 TimToady nice, but probably slow
23:48 TimToady fine for outer code
23:48 rjbs $alphabet is never more than 78 codes.
23:49 rjbs This is in a constructor of a rare object, so I'm not worried -- but I assume the faster way is some form of grep?
23:49 TimToady you still don't want to do that in a tight loop
23:49 BenGoldberg joined #perl6
23:49 TimToady or /<-[\0..\xff]>/ or so
23:49 japhb rjbs: Use max() instead of any().  :-)
23:50 TimToady any could at least theoretically short-circuit
23:50 TimToady max can't
23:50 japhb TimToady: Yeahbut: any()'
23:50 japhb s implementation is almost certainly slower
23:50 japhb DEK
23:50 TimToady currently
23:50 rjbs In p5, I'd probably use any(&@) if I didn't use a regex.  But that's a different any. :)
23:50 rjbs What's the <- in that pattern above?
23:51 japhb Inverted character class
23:51 TimToady same as [^a..z] in p5 regex
23:51 japhb <-[...]>
23:51 TimToady er, a-z, but yeah
23:51 rjbs Huh. Okay!
23:51 TimToady we put the negation on the character class outside, to avoid semipredicate issues
23:52 rjbs Oh, I see, with a trailing >
23:52 TimToady and changed - to .. which you'd never want in a character class anyway
23:52 rjbs Excellent.
23:52 TimToady we demoted char classes, and stole [] for simple grouping
23:52 japhb rjbs: Yeah, character class is normally <[...]> in Perl 6, instead of [...] in Perl 5 (wanted the shorter syntax elsewhere)
23:52 TimToady but then the <-[]+[]-[]> form becomes available for sets of chars
23:53 rjbs <3 regex sets
23:53 rjbs We just got those! :)  khw++
23:53 TimToady m: say ('a'...'z').grep: /<+alpha-[aeiou]>/
23:53 camelia rakudo-moar 68c432: OUTPUT«b c d f g h j k l m n p q r s t v w x y z␤»
23:53 japhb (?:...) used to always annoy me just a little bit, I was glad to see that go.  :-)
23:53 rjbs Oh, right!  The colon!
23:53 kurahaupo1 joined #perl6
23:54 rjbs I wanted to:  $x.map { ... } but couldn't, so used parens.  I needed a colon.
23:54 TimToady yes, we're not quite Ruby there
23:54 japhb .oO( Everyone wants the colon.  Even your code. )
23:54 TimToady two terms in a row, and all that
23:55 rjbs a little funny to think back on when the "ruby-o-meter" was a lot more relevant than it is now
23:55 TimToady the colon + block form also works out very nicely given that } is smart about not needing ; at the end
23:57 inokenty joined #perl6
23:59 japhb TimToady: Have you settled on a relatively fixed coding style for your personal Perl 6 code, or is it still fluid?  In other words, could you write a style guide similar to Programming Perl's but for Perl 6 and feel like it would stay roughly the same a few years hence?

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo