»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
timotimo "now"? 00:03
00:04 koo6 left
andreoss how do i overload .gist method properly? 00:05
or whatever method needed to stringify class 00:06
timotimo what problem are you encountering? it should be enough to define a "method gist"
well, we have .Str, .gist and .perl
they differ in which thing will choose which
m: class Foo { method gist() { say "gist" }; method Str() { say "Str" }; method perl() { say "perl" } }; say Foo.new; print Foo.new;
camelia rakudo-moar 536c26: OUTPUT«gist␤True␤Str␤This type cannot unbox to a native string␤ in block <unit> at /tmp/LWoT1QxY8e:1␤␤»
timotimo oh my 00:07
m: print True
camelia rakudo-moar 536c26: OUTPUT«True»
timotimo m: print say "test"
camelia rakudo-moar 536c26: OUTPUT«test␤True»
timotimo that's ... weird
raydiak it's weird that say returns true? 00:08
timotimo no
andreoss may be my class needs to do Stringy?
timotimo the "cannot unbox to a native string" thing
andreoss or it would be overkill?
raydiak really ought to start pressing pageup more often or chatting in a taller window
timotimo probably not, but you can implement a method "Stringy"
zengargoyle is it weird that you're say ing instead of returning a string from the methods?
andreoss timotimo: when such method will be used?
timotimo good question :S
in coercing stuff, i suppose 00:09
00:11 laouji joined
raydiak I'd bet, like zengargoyle said, something internal expects/requires .Str to return a string 00:13
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?
timotimo good question
m: say 1 ≤ 5
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…»
timotimo m: my &infix:<≤> := &infix:«<»; say 4 ≤ 5 00:15
Sysaxed` timotimo: :)
camelia rakudo-moar 536c26: OUTPUT«True␤»
00:15 laouji left
Sysaxed` yea, sure, I can define it myself if I really want 00:15
timotimo right
that'd be something to put into the speculations :)
TimToady well, where to draw the line...
Sysaxed` but why not default?
00:15 spookah left
timotimo ————— 00:15
dalek osystem: 6e72fb5 | cygx++ | META.list:
Add DEBUG to the ecosystem
00:17
BenGoldberg m: class Foo { method Str() { True } }; say Foo.new;
camelia rakudo-moar 536c26: OUTPUT«Foo.new␤»
BenGoldberg m: class Foo { method Str() { True } }; print Foo.new;
camelia rakudo-moar 536c26: OUTPUT«This type cannot unbox to a native string␤ in block <unit> at /tmp/M9MpgZFVFi:1␤␤»
TimToady that's several lines, you really want ───── instead
timotimo right
00:18 agentzh_ left
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:18
00:18 meisl left
raydiak the grammar changes would be pretty simple, no? 00:19
00:19 laouji joined
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 thou left
BenGoldberg m: my &infix:<≤> := &infix:«<»; say 4 ≤ 4; 00:19
camelia rakudo-moar 536c26: OUTPUT«False␤»
TimToady yes, it's really just a decision about where to shout "bloat!" 00:20
BenGoldberg m: my &infix:<≤> := &infix:«<=»; say 4 ≤ 4;
camelia rakudo-moar 536c26: OUTPUT«True␤»
timotimo BenGoldberg: yeah, a somewhat important detail
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
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
unless we had a general I-see-strange-Unicode lazy loader
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 ≥
TimToady well, they *do* have to learn what => means... 00:23
Sysaxed` who knows
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...
I don't know, maybe I'm exaggerating 00:25
but when thinking "unicode operators" ≤ is the first thing that comes to my mind
geekosaur the flip side is most people still don't have fancy editors that will let them easily type ≥
Sysaxed` and ≥ is the second...
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
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)
TimToady well, arguably ≠ is the 0th one
Sysaxed` geekosaur: not by default, at least
geekosaur you seem to be arguing that we should prioritize the unicode operators
Sysaxed` geekosaur: not at all 00:28
geekosaur i.e. it's ">=" that should be the alien
[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 ≥
this seems to imply that these operators are problematic and should not be considered primary
Sysaxed` hm
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
well, it could be there, I'm not sure
geekosaur use UnicodeSyntax;
then it can also grow without requiring a perl6 release 00:30
timotimo the opposite of "use english" 00:31
dalek kudo/nom: a5496e0 | TimToady++ | src/core/Failure.pm:
plug a major leak of unhandled Failures
TimToady that fixes the part of forest-fire that reports unhandled Failures 00:32
timotimo oh, neat
geekosaur once it stabilizes, it can be considered for inclusion in the core
timotimo did you check with rc-forest-fire from the perl6-bench repo?
because i recall that failing during my benchmark
TimToady no, I have my own copy
but that also has the (), problem in the middle, last I looked 00:33
timotimo OK
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?
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
timotimo in 100 years, ram will be cheaper still that it is right now :P 00:34
dalek rl6-bench: 2f432a8 | TimToady++ | perl6/rc-forest-fire:
suppress Use of Nil in numeric context
geekosaur I think it's entirely sensible to handle it by "starting" stuff in the ecosystem and transplanting into the core 00:35
it works for plants...
TimToady zengargoyle: still a toy, alas, but I should maybe productize it for YAPC::Asia or so...
raydiak yeah that's fine, it's the problems that need to be considered when including in core that I'm worried about
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.
TimToady zengargoyle: well, it's written in p5 currently
but it's a bit of a mess
zengargoyle guessing kanjidic + kradfile + radkfile based? 00:37
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
Chinese
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
00:39 laouji left
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
aliases don't really cost anything
it helps a lot more when there's a body that can be lazily loaded 00:40
if we could get the whole thing down to 512MB, then maybe we could run on a CHIP processor :) 00:41
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:42
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
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
pmichaud yes, it went VERY well
(hands-on perl6 with jnthn)
timotimo mhm
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 :)
timotimo ah, i found the "perl6" tag on tha tpage
that'll be a good link target
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
(I'd be glad to run it.) 00:45
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:46 spider-mario left
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:47
00:49 laouji joined
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
timotimo were there many people who tried to make fun of the perl6 project? :) 00:50
TimToady nope
pmichaud most of what I've encountered since FOSDEM is people with growing respect for it.
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
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
pmichaud (during our panel session at OSDC.no)
geekosaur (iBooks were infamous for needing to be torn down completely to replace the HD)
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
tony-o pmichaud: i use a surface pro 3 with debian/windows dual booted
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
timotimo at the GPW, perl6ers helped people who wanted to get started with perl6, too, right?
tony-o i actually love the sp3 with debian on it
i use it when i travel for work, it's compact and plenty powerful for work stuff (i do data warehouse consulting) 00:55
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
in general, you want the core to be small
tony-o pmichaud: you can definitely get linux on there, it needs to be a flavor that can do secure boot uefi
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
pmichaud (kubuntu is debian based, of course)
tony-o kubuntu is just ubuntu with kde as the default DE ? 00:58
zengargoyle did jessie install support uefi without pain?
pmichaud tony-o: yes. 00:59
00:59 BenGoldberg left 01:00 BenGoldberg joined, spider-mario joined
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:00
01:00 BenGoldberg left 01:01 BenGoldberg joined
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:01
01:03 aborazmeh joined, aborazmeh left, aborazmeh joined 01:04 b2gills left, colomon left
pmichaud adopting things into the core should have some amount of resistance and reflection, yes. 01:05
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
01:07 colomon joined
raydiak that makes sense, that'd make a mess in short order, I do that all the time :) 01:07
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:09
01:11 Sysaxed` left
timotimo were jnthn's talks updated a lot from the last time he gave them? 01:12
pmichaud timotimo: not that I noticed.
timotimo OK 01:13
sadly, the pages don't have slides links ;(
pmichaud I think he just hasn't uploaded/linked them yet.
jdv79 is there a way to introspect applied roles?
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?"
jdv79 yes
pmichaud one can certainly do $foo ~~ Role :)
(that doesn't give a list, but it lets you know if Role has been applied somewhere.) 01:15
raydiak m: Str.^roles 01:16
camelia ( no output )
raydiak m: say Str.^roles
camelia rakudo-moar a5496e: OUTPUT«(Stringy)␤»
pmichaud m: say List.^roles
camelia rakudo-moar a5496e: OUTPUT«(Positional)␤»
pmichaud m: say Hash.^roles
camelia rakudo-moar a5496e: OUTPUT«(Associative)␤»
timotimo m: say (Hash but Str).^roles
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␤␤»
jdv79 oh, duh. should have just tried that. i was searching docs instead:(
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␤␤»
timotimo oh
those are not roles m)
raydiak m: say Buf.^roles
camelia rakudo-moar a5496e: OUTPUT«Method 'roles' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤ in block <unit> at /tmp/uvtM0AI4rI:1␤␤»
timotimo it seems my brain is trying to fall asleep already
raydiak heh, sure, you can get the list as long as it's only one item :P
pmichaud say FlatSupply.^roles 01:18
m: say FlatSupply.^roles
camelia rakudo-moar a5496e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0Son8xVEGd␤Undeclared name:␤ FlatSupply used at line 1␤␤»
01:18 andreoss left, araujo left, oetiker joined 01:21 araujo joined, araujo left, araujo joined, yqt left 01:23 rba_ left, rba_ joined 01:25 airdisa left 01:30 andreoss joined
andreoss fpaste.org/220855/14313942/ 01:31
what's wrong with this code?
it segfaults for me
TimToady try changing to 'has Block $.code;' 01:32
by default you can't initialize private attributes through the public interface 01:33
geekosaur probably shouldn't segfault in any case
TimToady you can still call it with $!code
though that should probably be $!code(|@a) 01:34
or method exec(|a) { $!code(|a) } for the most generality 01:35
'course if it's a public attribute, you can just say $f.code()(1,2,3) too 01:36
I agree it shouldn't segfault
01:38 dayangkun joined 01:39 aborazmeh left
TimToady we also need to find a better way of warning that the code arg isn't used 01:40
andreoss i also receive errors about &!code, even if &.code is used 01:42
fpaste.org/220861/39513014/ 01:45
why the dereferencing is needed here? 01:46
probably wrong choice of sigil 01:48
m: my &x = -> $a {$a.perl}; say &(&x)(1); 01:49
camelia rakudo-moar a5496e: OUTPUT«1␤»
tony-o gist.github.com/tony-o/2b309e70ed16867e0849
andreoss: ^
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);␤»
tony-o m: my $x = -> $a { $a.say; }; $x(5);
camelia rakudo-moar a5496e: OUTPUT«5␤»
dalek ast: e476c69 | (Justin DeVuyst)++ | S06-currying/assuming-and-mmd.t:
Tests for RT #77520 & RT #125155.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=77520
TimToady you can say &!code()(1,2,3) as well
the first one is just because &!code and &.code are really method syntax, so the first () is passing zero args to that 01:52
(&!code)(1,2,3) would also work
timotimo "ignoremark" support is in branches right now, right?
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␤␤»
andreoss $.code.(...) what does the second dot do?
tony-o m: class A { has $.a; method go(*@a) { $.a.(@); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
camelia rakudo-moar a5496e: OUTPUT«[]<>␤»
tony-o m: class A { has $.a; method go(*@a) { $.a.(@a); }; }; A.new(:a(-> *@R { @R.perl.say; })).go(1,2,3);
camelia rakudo-moar a5496e: OUTPUT«[1, 2, 3]<>␤»
TimToady oh, that's just another way to defeat the $.foo() syntax
tony-o yea
andreoss m: my $x = -> $a {$a.perl}; say $x(1); #no dot here 01:54
camelia rakudo-moar a5496e: OUTPUT«1␤»
andreoss m: my $x = -> $a {$a.perl}; say $x.(1); #
camelia rakudo-moar a5496e: OUTPUT«1␤»
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)
TimToady $.foo() is a special form, but $foo() isn't
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]<>␤»
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
but you've found the WAT corresponding to the DWIM :)
andreoss $.foo.bar() ~~ self.bar($.foo) ? 01:56
jdv79 isn't #105848 a dup of #77350?
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=105848
jdv79 only one link? :( 01:57
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
andreoss ok, now i get it
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);
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>␤»
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);
camelia rakudo-moar a5496e: OUTPUT«(timeout)here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤here␤he…»
andreoss it explains why it complained about extra arguments
02:00 laouji_ joined
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:04 laouji_ left 02:08 noganex_ joined 02:29 rmgk left 02:30 rmgk joined 02:33 muraiki left
timotimo published the weekly before he went home 02:40
raydiak look forward to reading it the next time I take a break :) timotimo++ 02:43
timotimo bah. i've had it with gnome3 02:46
02:46 BenGoldberg left
timotimo i wanted to give it a chance. i really did. but it's doing some things that are just unacceptable 02:46
02:50 BenGoldberg joined
tony-o i used fluxbox up until trying xfce a couple of months ago 02:55
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
sometimes it will not let any mouse clicks or keyboard events through to applications unless i alt-tab around a bit
raydiak ew
timotimo the first thing i thought was that i OOM'd somehow
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
.tell japhb i'm experiencing an extreme delay in both the compare and history subcommands of perl6-bench right now
yoleaux timotimo: I'll pass your message to japhb.
raydiak your input devices run on mana? :)
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
yoleaux timotimo: I'll pass your message to japhb.
timotimo ah, "out of mana", now i get it :) 02:59
03:00 kyclark joined
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
yoleaux timotimo: I'll pass your message to japhb.
timotimo hehehe
spawn more overlords!
raydiak but my hive will have bled to death by the time another overlord spawns! 03:02
timotimo that doesn't seem plausible to me 03:03
buildings bleed to death if they're off creep, but hive generate their own creep
raydiak my starcraft days are longer ago than my WoW days
timotimo OK :) 03:04
i've played starcraft 2 on ranked 2v2 ladder with a friend for a while
raydiak I can be forgiven if the last time I played nobody had heard of SC2 yet? :)
timotimo but i never played the original
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
timotimo i didn't play very well, either 03:06
but i do have a steady interest in Zero-K
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:07
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
incidentally, he also casts achron matches, which is a thing i expect perl6 people to appreciate - at least the concept
raydiak what is it? 03:09
timotimo "meta-time strategy game"
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
timotimo but so's the enemy - at least in player-vs-player matches and a part of the story missions
it has its problems, though
raydiak time travel always does 03:11
timotimo no, in this case it's unit stupidity
the time traveling is pulled off pretty much flawlessly
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
incidentally, rakudo-moar's historical scores show that it went from 100 points at 2014-08-22 to 184.8 at 2015-05-11
that seems nice 03:13
but it was at 184.3 already at 2015-03-20
raydiak link?
03:14 laouji left
timotimo it'll take some time to generate an html report 03:14
raydiak ah, n/m
timotimo i want the html report anyway 03:15
03:17 Humbedooh left, danstoner left, profan left, danstoner joined
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
03:18 tadzik joined
timotimo t.h8.lv/p6bench/2015-05-12-rakudo_history.html 03:20
may i suggest "rocket, paper, spacegoo"? 03:21
03:21 laouji joined, b2gills joined
timotimo bitbucket.org/dividuum/rocket-scissor-spacegoo 03:21
raydiak interesting 03:24
timotimo there's a nice web frontend that animates fights between AIs
this is basically what i wrote JSON::Fast for :P 03:25
raydiak hehe
timotimo seriously, the speed of my bot was ridiculously bad 03:26
and json parsing was indeed the biggest chunk of run-time by far
i really wonder what made string-escape take such a drastic penalty 03:27
and rat_harmonic ...?!
.o( and for_push ?? )
.o( and while_int2str_native? )
er 03:28
.o( and while_int2str_concat_native? )
raydiak insertion-sort is the cute one, if you ask me 03:29
timotimo yeah, well ... 03:30
t.h8.lv/p6bench/2015-05-12-rakudo_c...rison.html
if you can make out any details in there, congratulations :P
03:30 kyclark left
timotimo i shall activate my swap partition for the next steps ... 03:31
raydiak wonders if we could change the palette so newer perls are progressively brighter or something 03:33
timotimo go ahead :)
javascript basically means "source code included"
raydiak though what I'd really like to see is a 3D surface so we have an actual extra exis to play with :)
timotimo it'd even be possible to put a palette selector in
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
s/exis/axis/
timotimo okay, another 8gb of swap should be enough for this task :P
and i'm very thankful for your work, don't forget about that :)
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?
or should we consider using gnuplot?
is there already some kind of "gnuplot killer" out there?
matplotlib doesn't really fit the exact same niche 03:36
D3 is allegedly really awesome, but also not 100% the same kind of thing
oh, i really ought to get some shuteye 03:37
talk to you again soon :)
raydiak nah tbh I don't know much about what's going on these days
g'night, sleep well, thanks again for the weekly :)
timotimo that's why we need the 24-year-old javascript hipster demographic on our side ;) 03:38
you're welcome :)
03:39 agentzh_ joined
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 github.com/rakudo/rakudo/blob/nom/...it.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 = $
yoleaux ugexe: I'll pass your message to lizmat.
ugexe out somewhere in there?
03:45 BenGoldberg left, agentzh_ left 03:46 laouji left 04:01 agentzh_ joined 04:10 agentzh_ left 04:11 skids left 04:16 davido_ joined 04:25 Alina-malina left 04:26 laouji joined 04:28 Alina-malina joined 04:40 berekuk_ joined 04:49 laouji_ joined 04:50 kaare__ joined 04:54 laouji_ left 04:55 thou joined 04:56 quester joined 05:00 ][Sno][ left 05:03 agentzh_ joined 05:09 silug left 05:14 fhelmberger joined 05:15 telex left 05:16 telex joined 05:19 fhelmberger left 05:22 silug joined 05:23 andreoss left 05:24 laouji left, rindolf joined 05:27 andreoss joined 05:32 raiph left 05:34 FROGGS[mobile] joined
FROGGS[mobile] timotimo: ignoremark is in master/nom 05:35
05:35 rba_ left 05:37 laouji joined 05:39 lolisa left 05:42 [Sno] joined 05:43 domidumont joined 05:47 domidumont left 05:48 domidumont joined 05:49 andreoss` joined 05:51 andreoss left 05:55 domidumont left, andreoss` left 06:04 domidumont joined
[Tux] tony-o, au contraire. it slowed down :( 06:06
wild guess: about 5% 06:07
06:07 VAAC108 joined 06:09 espadrine_ joined 06:25 thou left 06:30 bjz joined 06:33 _mg_ joined, davido__ joined 06:34 rindolf left 06:36 berekuk_ left 06:37 davido_ left 06:38 laouji_ joined
grondilu I rewrote rosettacode.org/wiki/Mandelbrot_set#Perl_6 to be parallel (taking inspiration from github.com/colomon/mandelbrot/blob...allel.pl). It works but it's unconsistant from one run to an other (sometimes one line is missing). 06:40
06:43 laouji_ left 06:49 g4 joined, g4 left, g4 joined 06:54 abraxxa joined
jnthn morning, #perl6 07:00
moritz \o jnthn, * 07:01
07:02 domidumont left 07:04 pdcawley left 07:06 FROGGS joined, FROGGS[mobile] left
FROGGS morning o/ 07:06
07:07 larion left
jnthn grondilu: It's not going to fix the inconsistency, but here: 07:07
for @lines -> $promise { 07:08
say $promise.result;
}
could we
.say for await @lines;
grondilu I've tried await my @lines = ... but that did not help.
07:08 rurban joined 07:09 zakharyas joined
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.
But gotta teach in a moment
Poke me about it later this week if I forget :)
FROGGS ... or RT it Justin Case 07:10
grondilu it's a bit tricky to RT since it's not deterministic. 07:11
07:12 Ven joined
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?
Or a line break?
grondilu a whole line apparently. 07:15
jnthn l'odd...
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.
but sometimes it does not complain at all and the picture looks fine.
(with the same parameters) 07:17
jnthn *nod*
I don't see anything wrong with the program.
07:18 Ven left 07:24 spider-mario left 07:28 bjz left 07:29 bjz joined 07:30 Ven joined 07:31 domidumont joined, grondilu left 07:32 grondilu joined
grondilu is trying yaaic and likes it :-) 07:35
FROGGS grondilu: yeah, it got quite better recently 07:36
07:36 lizmat left
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:39
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:40
07:43 espadrine_ left 07:45 fhelmberger joined 07:47 andreoss joined 07:50 darutoko joined, lizmat joined 07:51 Ven left 08:05 RabidGravy joined
RabidGravy marning 08:06
FROGGS mornang 08:08
08:08 Isp-sec joined
masak murnong 08:11
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 08:16 larion joined 08:19 xinming joined 08:20 ab5tract joined
lizmat good *, #perl6! 08:23
yoleaux 03:44Z <ugexe> lizmat: github.com/rakudo/rakudo/blob/nom/...it.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 agentzh_ left
lizmat timotimo++ for the P6W 08:23
08:24 Ven joined
moritz timotimo++ indeed 08:27
masak timotimo++ # p6weekly.wordpress.com/2015/05/12/...nferences/ 08:28
URLs to the URL god!
08:29 bjz left 08:31 inokenty joined 08:34 rurban left 08:37 Ven left 08:38 poul joined 08:48 Ven joined 08:50 espadrine_ joined 08:51 agentzh_ joined 08:58 diegok left 08:59 agentzh_ left, diegok joined 09:01 grondilu left
dalek pan style="color: #395be5">perl6-examples: f914072 | paultcochrane++ | categories/cookbook/05hashes/05-05traversing.pl:
[cookbook] sorting output for consistency between runs
09:01
pan style="color: #395be5">perl6-examples: 69df9f3 | paultcochrane++ | t/categories/cookbook/05hashes.t:
[cookbook] add tests of 05hashes
pan style="color: #395be5">perl6-examples: 29e89b2 | paultcochrane++ | categories/cookbook/07file-access/07-01opening_file.pl:
[cookbook] specify input path independent of run location
09:01 grondilu joined
pan style="color: #395be5">perl6-examples: 9c379ca | paultcochrane++ | categories/cookbook/07file-access/07-01opening_file.pl:
[cookbook] remove commented-out code
pan style="color: #395be5">perl6-examples: 0171709 | paultcochrane++ | t/categories/cookbook/07file-access.t:
[cookbook] add tests for 07file-access
grondilu found an interesting way of doing stuff in parallel and putting the results in an array: 09:02
.=result for my @jobs = do for ^100 { start {...} } } 09:03
FROGGS nice and short :o) 09:04
masak feels like using @jobs for two completely different purposes.
one of which should be called "@job", and the other maybe @results or something? :P 09:05
moritz my @results = (^100).map({ start {... }})>>.result
masak er, @jobs
moritz++
moritz should also work
grondilu we can assimilate both
09:06 bjz joined
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
moritz right 09:08
masak either way, you're doing yourself a disservice by ignoring the distinction.
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.
moritz and aftewards, @jobs is a mixture of promises and results
grondilu *them.
masak moritz: good point.
moritz grondilu: then make it anonymous
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:
is '"foo" ~~ /<$var>/', 'foo', 'string with metachars in assertion matches';
# expected: 'foo'
# got: '"foo" ~~ /<$var>/'
-.-
moritz FROGGS: :-)
09:10 rindolf joined
FROGGS it was in an eval before because the test I copied it from was a throws_like 09:10
and I just stripped the EVAL :o) 09:11
FROGGS .oO( Life is too short to loose five minutes )
masak they'll be the loosest five minutes of your life, though. 09:13
FROGGS hmmm, seems like I used it wrong all the time :S 09:16
09:16 Ven left 09:19 Ven joined, silug left 09:20 bjz left
masak FROGGS: it's a tricky one. just have to find a working mnemonic of some kind. 09:22
masak .oO( you will lose the game 'cus of your loose-fitting shirts ) 09:23
sergot_ hi #perl6 o/
09:23 sue_ joined
masak sergocie! \o/ 09:25
FROGGS hi sergot 09:29
lizmat sightseesing&
09:29 lizmat left 09:30 Isp-sec left
dalek kudo/nom: a7cf7ce | FROGGS++ | src/ (2 files):
pass :ignoremark along in interpolations in regexes
09:30
ast: c8d654c | FROGGS++ | S05-metasyntax/litvar.t:
add more tests for regex interpolation
09:31
09:33 silug joined 09:37 Ven left 09:38 laouji left 09:40 _mg_ left 09:42 Akagi201 joined 09:49 Ven joined 09:50 bjz joined 09:52 cschwenz joined
Ven twitter.com/meitham/status/598028060546465792 Sooo, about that composition operator *g* 09:56
jnthn my @results = await (^100).map({ start {... }}); # why make it harder? :) 09:58
10:04 cygx joined
cygx o/ 10:05
is there a proper way for EXPORT subs of different modules to communicate with each other? 10:06
I tried to use our-scoped variables, but failed
in the end, I went with %*ENV, which, in this particular case, might even have been the Right Thing to Do
10:07 rarara left
jnthn cygx: I think you'd better start with what you want to do. 10:09
cygx: Remember in Perl 6 we rely on separate compilation
cygx: It sounds like you're doing something that will make it impossible to pre-comp your module. 10:10
cygx jnthn: github.com/cygx/p6-debug
assert from userspace with NDEBUG support
jnthn will look in a bit; gotta teach again 10:11
cygx jnthn: thanks, and have fun
10:16 _mg_ joined 10:24 domidumont left 10:32 RabidGravy left
[ptc] hrm, pod2html is chewing on RAM and CPU. Is anyone else seen this? 10:41
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
no idea what should have caused the problem though...
10:44 Ven left 10:45 Ven joined 10:50 dayangkun left 10:51 Ven left
timotimo t.h8.lv/p6bench/2015-05-12-rakudo_n...story.html t.h8.lv/p6bench/2015-05-12-nqp_comparison.html t.h8.lv/p6bench/2015-05-12-nqp_history.html 10:58
10:58 Ven joined, laouji joined 11:00 aborazmeh joined, aborazmeh left, aborazmeh joined 11:03 laouji left
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:04
sergot hi masak, hi FROGGS ! :) 11:05
yoleaux 6 May 2015 02:10Z <raydiak> sergot: github.com/sergot/io-socket-ssl/pull/11
sergot raydiak++ 11:06
timotimo maybe someone wants to give perl6.guide/ a quick look-over and perhaps update one of these days 11:14
i wonder what those unicode features are that perl6 is missing that perl5 has
especially now that we have ignoremark
11:15 espadrine_ is now known as espadrine
timotimo but adding examples.perl6.org would be a good thing 11:15
11:17 silug left 11:19 Akagi201 left 11:23 brrt joined
[ptc] timotimo: thanks for the links :-) 11:28
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
timotimo sure :) 11:29
that'd be nice
it could very well be that there's some loop that turned into an infiniloop accidentally perhaps?
11:30 cschwenz left, silug joined 11:33 domidumont joined
timotimo jnthn: t.h8.lv/p6bench/2015-05-12-rakudo_history.html shows a few strange drops; maybe of interest to you? 11:44
jnthn: the last two dots are 2015.04 and Vladivostok-218-gf9c9822 for rakudo 11:46
jnthn: and here's more detailed spam^Wdata
t.h8.lv/p6bench/2015-05-12-rakudo_c...rison.html
11:46 agentzh_ joined 11:47 colomon left
Ven hey 11:50
timotimo hi ven :)
11:51 agentzh_ left
FROGGS is relieved that charrange_ignorecase is not slower but faster 11:52
at some point I'm going to bench our regex engine and tune it a little 11:53
jnthn: btw, what are the implications when I forgot to release a register in e.g. QASATRegexCompilerMAST? 11:55
jnthn: there are a bunch where we Just Don't Do It™ 11:56
of places*
11:56 Humbedooh joined
timotimo FROGGS: i'd be interested to have a look at the code we generate in "the big picture" 11:57
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
(a job spesh should be able to do)
FROGGS hmmm 11:58
good point
no idea how to tackle that though
12:01 colomon joined
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 12:08 pauluu joined 12:12 Hor|zon_ left, Hor|zon joined 12:15 domidumont left 12:17 aborazmeh left 12:19 Ven left, domidumont joined 12:23 Ven joined 12:25 cognominal joined
cognominal timotimo++ for all the p6weekly 12:27
timotimo will spend most of today demonstrating against "pegida" 12:31
Ven timotimo++
12:33 Sqirrel joined
timotimo thanks, cognominal :) 12:33
12:36 domidumont left 12:38 domidumont joined
cognominal timotimo, strange world where hate calls itself the right to blasphem but all sort of censorship get unnoticed. 12:39
12:40 poul left
masak people turn to xenophobia in times of hardship. 12:43
couple very stark examples in the past century.
a bit sad to see it happening now, in real time, with Islamophobia. 12:44
brrt agrees and adds only one thing 12:45
what is even stranger is that at one time people became xenophobic against jews, of all people not exactly the most warlike 12:46
that i find even stranger to understand, in comparison to current forms of islamophobia
12:47 brrt left 12:48 agentzh_ joined
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
gist.github.com/grondilu/3e4614619c0a1266079f
cygx masak: on the flip side, totalitarian ideologies shouldn't get a pass just because they are religious in nature 12:50
accoring to the often cited 2013 Pew poll, support for the death penalty for apostasy can get as high as 88% (Egypt)
*according
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
that's a worryingly high number
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
timotimo :)
12:53 rarara joined
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?
timotimo en.wikipedia.org/wiki/Pegida#Parti...supporters - check the third paragraph here to see what i mean
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?
[ptc] timotimo: the problem with pod2html OOM-ing starts in Rakudo, commit 0fe9416 (Distinguish Nil from Empty)
timotimo Ven: probably is! just needs someone to implement the missing bits :)
rarara print eigenstates($c) the first time print me ARRAY(0xc4e148)ARRAY(0xc62c70), the second time nothing
I would have expected ARRAY(0xc4e148) 12:56
Ven timotimo: aren't those bits implemented? github.com/timo/ADT/blob/master/t/...XPORT.t#L4
timotimo rarara: i'd expect any(False, True)
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.
timotimo m: my $c = any([1, 2], [3, 4]); say $c; $c = $c[0] < 3; say $c
camelia rakudo-moar a7cf7c: OUTPUT«any(1 2, 3 4)␤any(True, False)␤»
Ven because the example code doesn't "use adt"
rarara timotimo I don't understand: any should be a scalar assuming the values of the lists (which is a list of references)
maybe perl6 is very different in this regards to perl 5
Ven timotimo: github.com/timo/ADT/blob/master/li...T.pm6#L192 sure it doesn't work? :v 12:58
timotimo a junction is all of "its values" "at the same time"
FROGGS rarara: any in perl 6 returns a junction containing the values
rarara timotimo exactly
timotimo so you execute $the_value[0] for each of the values the junction represents and get a junction of the results back
FROGGS m: say 1 == 1|2
camelia rakudo-moar a7cf7c: OUTPUT«any(True, False)␤»
FROGGS m: say so 1 == 1|2
camelia rakudo-moar a7cf7c: OUTPUT«True␤»
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"'
totally differente
prints any(2,1) and 1 13:00
timotimo can you please use any(5, 10) and $c == 10 instead, please?
i want to know if that "1" comes from == returning "true" or if it's the same 1 as in the any
rarara any(10,5) and 10
no it comes from the fact that it returns you the subset which match
the junction 13:01
timotimo wat
that's completely different from junctions in perl6
what does any(1,2) + 4 give?
FROGGS timotimo: that's the only way to proper boolify the fresult
result*
in Perl 5* 13:02
timotimo damn, you poor perl5 people
rarara any(6,5)
timotimo OK, so at least that part works like in perl6
FROGGS ohh, + is overloaded
Ven can a module re-export itself in p6?
FROGGS itself?
timotimo Ven: what'd that mean?
Ven I mean... re-export another module. duh
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?
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."
yes
FROGGS rarara: well, I like P6's... might just be about trained expectation
Ven: no, not easily at least
rarara but in perl 5 you can basically do "as if" they were scalar
also in perl 6? 13:04
Ven override EXPORT and return said module?
FROGGS Ven: yes, but you probably want to re-export the exported symbols... that's what you need to de explicitly
timotimo Ven: i think you can do something like "use OtherModule :EXPORT" or something
13:04 skids joined
Ven nice one :-) 13:04
FROGGS is that implemented? 13:05
timotimo i don't know
never had to do this
FROGGS I don't remember implementing it :o)
timotimo Ven: github.com/timo/ADT/blob/EXPORT_su...2-EXPORT.t
Ven ooh.
timotimo these extra tests used to fail
13:05 chenryn joined
timotimo if they don't any more, i ought to merge that branch and fix up the readme 13:06
could be they got fixed when roles got properly interned and/or puns were deduplicated
but last time i tried it, i got "expected Branch but got Branch" and similar errors
rarara so we end up with a broken perl 5 implementation and an incompatible implementation in perl 6
13:06 kthakore joined
Ven timotimo: # Error: Unsupported serialization format version 13 (current version is 15) 13:07
whoops.
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
in perl6's junctions we explicitly tell people "you want to use sets instead if you're trying to do *that*"
at least that's what the "using a comparison operator on a junction gives you the values that matched" 13:09
makes me think
FROGGS kthakore: hi :o) 13:10
kthakore glomps on @FROGGS
Hellloooo!
FROGGS kthakore: amsterdam is nothing I can walk to though :/
kthakore damn it
FROGGS it is like, another country, you know
kthakore Could I train to where you are and be back for flight?
FROGGS kthakore: this might take 4+ hours on way 13:11
one*
kthakore hmmmm
oh! @Sqirrel is here tooo 13:12
Ven rebuilds rakduo to test ADT
kthakore it has been a long time friends
FROGGS kthakore: aye, it has :o)
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?
rarara I think it was an exercise of the author; I wouldn't use a junction 13:14
13:14 dayangkun joined
timotimo m: my @values = (^50).pick(10); say [min] @values 13:14
camelia rakudo-moar a7cf7c: OUTPUT«6␤»
rarara I was using a junction like a set
|Tux| kthakore, there is an Amsterdam.pm meeting *tonight* (but there will be a lot of us missing)
timotimo m: my @values = (^50).pick(10); say min @values
camelia rakudo-moar a7cf7c: OUTPUT«1␤»
timotimo m: my @values = (^50).pick(10); say min |@values
camelia rakudo-moar a7cf7c: OUTPUT«4␤»
kthakore @|Tux| I would show!
13:14 Alina-malina left
[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?
Sqirrel Hi kthakore
|Tux| perl.nl/amsterdam/
kthakore Hi @Sqirrel
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
|Tux| Dinsdag 12 mei 2015. In Ling Hong: Ouddiemerlaan 15 1111GS Diemen.
kthakore :| ... i can't read .... that :(
kthakore glomps on @Sqirrel 13:16
|Tux| They'll have diner there starting at 18:15
FROGGS [Coke]: the files that are commented need either to be fixed/fudged or removed from spectest.data+roast
timotimo rarara: what confuses me is this: any(0, 1) == 0 would give 0, right?
rarara right 13:17
13:17 Alina-malina joined
timotimo but 0 == 0 or 1 == 0 should give 1 13:17
so if you use that superposition just like a scalar for all its values, you'll end up with a nasty surprise
moritz sounds like the any() you want confuses data with operations 13:18
rarara somehow not
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
rarara perl -MQuantum::Superpositions -e 'print "ciao" if (any(0, 1) == 0);' prints ciao
timotimo and what does any(0, 1) == 0 print?
Ven timotimo: "# Error: Type check failed in assignment to '$a'; expected 'Tree' but got 'Tree'" aw :( 13:19
rarara timotimo it prints 0
timotimo yeah, sorry about that, Ven
rarara but I think theere is an eighenstates fuinction called automagically in between
timotimo rarara: so it's using perl5's notion of context to figure out if it's inside an if?
Ven guess I'll be writing a few classes then :)
[Coke] FROGGS: what was the point of adding them, commented out ?
rarara timotimo I think there is special bahaviour with the print function
[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.)
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 domidumont left
[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
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␤»
rarara timotimo it doesn't because $c is a function
and if check if there is something inside
FROGGS [Coke]: where?
I didnt know that
rarara I think the special case is for print 13:21
[Coke] perl tools/update-passing-test-data.pl
rarara $c is a function
Ven m: class A { }; class A::B is A { submethod BUILD{say 'hi';}}; A::B.new
camelia rakudo-moar a7cf7c: OUTPUT«hi␤»
rarara s/function/junction/
timotimo oh
hoelzro o/ #perl6
Ven well, seems like there's no way to make that class "abstract" or so
timotimo you can make it uninstantiable by giving it a BUILDALL that explodes 13:22
er, except that would be inherited
so it'd be a submethod BUILDALL
m: class Explodes { submethod BUILDALL { die "nope!" } }; Explodes.new()
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␤␤»
timotimo m: class Explodes { submethod BUILDALL(*@) { die "nope!" } }; Explodes.new() 13:23
camelia rakudo-moar a7cf7c: OUTPUT«nope!␤ in submethod BUILDALL at /tmp/xur8Bc2uJW:1␤ in block <unit> at /tmp/xur8Bc2uJW:1␤␤»
timotimo m: class Explodes { submethod BUILDALL(*@) { die "nope!" } }; class Doesn't is Explodes { }; Doesn't.new()
camelia ( no output )
timotimo cool.
what do you say? :)
13:23 dayangkun left
timotimo anyway, i'll be off very soon 13:23
geekosaur looks very C++. all it needs is "is virtual" in the explosion
timotimo and only have phone irc for a bit
[Coke] the weekly says "Those are all fudged properly". whoops.
tadzik ding ding dinging dinginging
ding ding dinging dinginging 13:24
13:24 raiph joined
timotimo [Coke]: that's no true? oops! 13:24
tadzik what does the fox say?
pa-pa-pa-pa-pa-pa-paw
I'm sorry
this phrase is broken for me
[Coke] timotimo: no. they're not being run. they're just comments.
timotimo damn 13:25
tadzik: PLEASE JUST TAKE THESE FUCKING FLOWERRRRSS
tadzik WHEN THERE'S WAR AND ALL IS HELL. BRING IN JAN EEEEEGELAND 13:26
13:26 Celelibi joined 13:27 agentzh_ left
timotimo quickly posted a little correction 13:27
tadzik: forget about the yoghurt, the new thing now is djogurt!
FROGGS timotimo: can you also state that ignoremark is already in? :o) 13:29
timotimo done. 13:30
13:30 domidumont joined
FROGGS timotimo++ 13:30
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␤»
masak wow, I'm surprised that worked.
13:31 bjz left
masak my assumption was that the body of an `augment class` block runs at BEGIN time. 13:31
13:31 rba_ joined
masak but the above seems to indicate that it runs at runtime. 13:32
13:32 bjz joined
masak (code based on a recent email on p6u) 13:32
13:34 agentzh_ joined
[Coke] github.com/perl6/roast/blob/master...ict.t#L102 - this test looks wrong. it expects Ac to have an update method, but nothing is implementing it on this class. 13:35
13:35 kthakore left
cygx masak: it was you who did most of the work on macros? 13:35
13:36 Sysaxed` joined
[Coke] moritz: your name is all over the git blame on that file. can you take a look? 13:36
In fact, the whole file looks dodgy. 13:37
FROGGS [Coke]: looks like Ac.new returns an Ab which in fact returned an Aa
rarara is Pegida a Nazi party?
[Coke] That doesn't make Ac have an update method.
timotimo rarara: not officially nazi, and not a party
o/
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
camelia rakudo-moar a7cf7c: OUTPUT«You cannot create an instance of this type␤ in block <unit> at /tmp/0LSXfXydlP:1␤␤»
[Coke] if you do an Ac.new, and it's returning an Ab, the .WHAT of the return there is still Ac
FROGGS [Coke]: if Ac.new would return what the author wanted, you would end up calling .update on Aa
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.
rarara I have impression that they mix xenophoby with nationalism and populism
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
[Coke] (if there isn't concensus on that, I'll fudge it instead of killing it.)
moritz: all of 'em? should I kill the file?
FROGGS and even if it would work it would not test for class name or attribute conflicts
moritz [Coke]: I'm not sure if all are wrong, but those that I looked at are wrong 13:41
[Coke]: but the stuff that it does test is tested elswhere too
cygx hoelzro: no, just wanted to know who to thank and/or blame
moritz so +1 to nuking it
hoelzro cygx: ah, ok =)
FROGGS +1 to kill it, aye 13:42
hoelzro I saw your assert impl on reddit, nice work!
cygx hoelzro: just doing my part to do some public relations 13:43
that code actually does contain a workaround for a macro-related bug, though
hoelzro cygx: I saw that, too
did you rakudobug it? 13:44
cygx hoelzro: not yet
dalek ast: 1f54a37 | coke++ | integration/class-name-and-attribute-conflict.t:
Remove dodgy test.

It expects that the build returns an object of the returned type, but it's returning the type of the class (Ac in this case). Since Ac doesn't have an update method, the test fails at compile time.
This is an old test which doesn't match our current MOP.
cygx assuming its not known, I can do that
hoelzro cygx: just do a quick search for macro related bugs, see if it's there
13:47 Akagi201 joined
dalek ast: 1fbd7fb | coke++ | integration/class-name-and-attribute-conflict.t:
Remove dodgy test file

The original issue this test tried to cover are handled elsewhere in roast, and the tests as written here are problematic.
13:48
masak r: say "hi"
camelia rakudo-{moar,jvm} a7cf7c: OUTPUT«hi␤»
dalek kudo/nom: f0267b8 | coke++ | t/spectest.data:
remove non-existant test file.
masak p: say "Parrot, are you there?"
...no.
13:49 rba_ left
masak I was thinking of #77520, which was closed just now. 13:49
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=77520
FROGGS masak: are you going to update /topic ?
masak FROGGS: I can. what did you have in mind? 13:50
(Parrot is not mentioned in /topic, so I don't immediately know what you're referring to)
I mainly wanted to check whether there was an easy way to confirm that #77520 is indeed fixed. 13:51
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=77520
FROGGS perhaps the note about feather
13:51 ChanServ sets mode: +o masak
FROGGS masak: I guess it is just moved to the list of "parrot tickets that will be reopened when parrot comes back" 13:51
masak »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! 13:51
13:52 ChanServ sets mode: -o masak
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␤␤»
moritz no internal error
(and no parrot anymore)
dalek kudo/nom: 1efb42f | FROGGS++ | t/spectest.data:
run slang variable test that passes for a while
moritz => fixed
masak :( that's not how you fix things
moritz and rt.perl.org/Public/Bug/Display.html?id=125155 open for the new error
dalek ast: 95e4bdc | FROGGS++ | S28-named-variables/slangs.t:
unfudge now passing slang variable test
13:53
masak by resolving that ticket, we're losing information about a genuine problem with Rakudo on Parrot.
moritz there is no rakudo on parrot.
FROGGS masak: that was not the case here, sorry
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
moritz masak: also, there's a comment from [Coke]++ from 2012 stating that the internal errror was gone
so, no information lost, afaict
[Coke] there's a list of tickets in Mu that were closed because they were only parrot-specific failures.
masak yes, you're right.
[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
13:55 aborazmeh joined, aborazmeh left, aborazmeh joined
FROGGS masak: that's what I (errornously) was talking about: github.com/perl6/mu/blob/master/mi...t_only.txt 13:55
masak ok.
13:56 Akagi201 left
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
this must be due to my incomplete backlogging of late.
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␤»
cygx there you go
13:57 laouji left, Akagi201 joined
masak cygx: wow, that's messed up. 13:58
I'm fairly sure that used to work at one point (`424242`)
13:58 thou joined, abraxxa left
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?
FROGGS wow, hold your breath:
m: constant $foo = 42; macro bar { quasi { $foo } }; macro baz { $foo; quasi { $foo } }; macro quux { my $ = $foo; quasi { $foo } }; say bar, baz, quux;
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␤␤»
masak because that is an excellent question.
FROGGS: whoa whoa
FROGGS jackpot :o)
13:59 telex left
FROGGS or jnthnpot for that matter 14:00
14:00 aborazmeh left, telex joined
cygx masak: MVM_SPESH_DISABLE=1 doesn't seem to help 14:01
masak: or is there some different spell I need to chant?
FROGGS cygx: also: perl6 --optimize=off ...
cygx doesn't help 14:02
masak ok, then unrelated to optimizations. 14:05
cygx++
[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."
masak plz file rakudobugs at will. I'm otherwise occupied just now.
14:06 agentzh_ left
cygx masak: will do 14:06
14:07 nbrown04 joined
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: rt.perl.org/rt3/Public/Bug/Display...?id=120928
masak aye. 14:08
haven't seen exactly this before.
14:10 ab5tract left
FROGGS design.perl6.org/S05.html#line_1813 is outdated I think 14:17
this implies that NFG is not the default
cygx bug reported as #125160
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125160
FROGGS cygx++
rarara m: $c = set([1,2],[3,4]); $r = $c (cont) set([1,2]); say $r; 14:19
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␤»
cygx complete with spelling mistake :(
rarara m: my $c = set([1,2],[3,4]); my $r = $c (cont) set([1,2]); say $r;
camelia rakudo-moar 1efb42: OUTPUT«False␤»
rarara what is wrong with this?
14:20 Ven left
TimToady dunno, looks buggy offhand 14:20
m: my $c = set([1,2],[3,4]); say $c.elems
camelia rakudo-moar 1efb42: OUTPUT«2␤»
TimToady m: my $c = set([1,2]); say $c.elems
camelia rakudo-moar 1efb42: OUTPUT«1␤»
jnthn Prolly that arrays are reference types, not value types, so .WHICH differently.
moritz
FROGGS m: my $o = [1,2]; my $c = set($o,[3,4]); say $c (cont) set($o) 14:21
camelia rakudo-moar 1efb42: OUTPUT«False␤»
TimToady ah, yes
grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^100; for @p { die "oops" unless .result }
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»
TimToady rarara: what jnthn means is that mutable structures take their identity from the structure, not from the contents
grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { die "oops" unless .result }
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)␤»
rarara Ok understood
FROGGS TimToady: do you agree that 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;
camelia rakudo-moar 1efb42: OUTPUT«True␤»
jnthn FROGGS: There are places in S02 and S05 that needs updating; that's just one of them.
FROGGS: Also to kill off .graphs
grondilu m: await my @p = map { start { [ rand xx 1_000 ] } }, ^10;
camelia ( no output )
FROGGS jnthn: k
jnthn FROGGS: But as Pm says, implementation leading spec tends to work out better
grondilu m: await my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { say "oops" unless .result }
camelia ( no output )
grondilu m: my @p = map { start { [ rand xx 1_000 ] } }, ^10; for @p { say "oops" unless .result } 14:23
camelia ( no output )
jnthn Now I've got more of NFG implemented, I can look at the spec :P
FROGGS that'd mean that <.> is free to be used for other weirdness :o)
jnthn: hehe
jnthn++
grondilu m: my @p = map { start { my @a = [ rand xx 1_000 ]; @a } }, ^10; for @p { say "oops" unless .result }
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/runtime/CORE.setting.moarvm:1␤␤===SORRY!===␤»
jnthn grondilu: I...think something is ratehr broken interally there.
FROGGS "jnthn - ahead of our <four letter word>"
jnthn oops :P
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
grondilu I think that's the kind of things that makes mandelbrot fail
jnthn I can't even channel pmichaud correctly :P
grondilu: Yeah, thanks for a nice small exaple though. That will help me a lot. 14:24
grondilu you're welcome
FROGGS ohh dear... another pragma that influences :m /o\
jnthn grondilu: Please can you RT it so I can easily find it again?
14:24 cognominal left
grondilu jnthn: ok 14:24
jnthn grondilu++
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
FROGGS yeah
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:26
FROGGS I'd like to see the mentioned :bytes though 14:27
TimToady well, but if you support :bytes, then :codes is kinda the same thing, only writ larger 14:28
FROGGS yeah
TimToady and then <.> makes sense as how P5 uses \X
jnthn the whole byte/grapheme level stuff is probably polymorphic in similar places to Cat 14:29
TimToady 'course P5 is already natively :utf8 or so 14:30
yes, once you have the abstraction level there, it can serve multiple purposes, and slow everyone down :) 14:31
grondilu jnthn: #125161 14:32
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=125161
grondilu oops, I doubled the 'perl6 -e ' 14:33
moritz hopes that an embedded :bytes match in regex will fail if the match doesn't terminate at a codepoint boundary 14:34
dalek ecs: 12b74d8 | FROGGS++ | S05-regex.pod:
remove special assertion <.> which implied "no NFG by default"

The dot itself matches a combining character sequences already, and with :bytes, :codes and :graphs implemented we can easily get other meanings for dot in future. A <.> on its own does not compose well.
moritz that is, "aäu" ~~ /a [ :bytes . ] u/ should fail (assuming :bytes implies UTF-8) 14:35
or even "aäu" ~~ /a [ :bytes . ] ./
because the final . should match a codepoint or grapheme, but the cursor is on the continuation byte of the second codepoint/grapheme 14:36
14:36 Ven joined 14:37 Ven left
dalek ast: 2baaabc | FROGGS++ | S05-metasyntax/combchar.t:
remove un-design-doc'd functionality '<.>'
14:38
14:39 cygx_ joined
dalek kudo/nom: bdf07f3 | FROGGS++ | t/spectest.data:
remove non-existing test file
14:40
FROGGS I could imagine that <.> could do what ~~ is meant to do inside regexes 14:41
and then ~~ could be an extended version of ~
ahh, I was talking about <~~> 14:42
14:42 cygx left
cygx_ should you even be able to match strings with :bytes regexes? 14:42
FROGGS perhaps :bytes<utf8> would make sense instead 14:43
if the left hand side is a Str 14:44
TimToady
.oO( :utf(8) )
FROGGS :8utf :P
if the left hand side is a buffer type we are fine-ish
14:44 Ven joined
TimToady maybe it should just be :buf 14:45
and based on the type of the buf
FROGGS m: say 'bär'.encode
camelia rakudo-moar 1efb42: OUTPUT«utf8:0x<62 c3 a4 72>␤»
FROGGS :bytes reads nice 14:46
14:46 _mg_ left
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:46
cygx_ also, one might want to have the option to match utf16 code units 14:47
TimToady as in, half a surrogate?
FROGGS I wonder if we want to implement <*foo> this year
TimToady *pair
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
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
it's natural to do it in the NFA because it's just a matter of succeeding instead of failing 14:50
14:50 cygx_ left 14:51 cygx joined, cognominal joined
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
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
currently when we incorporate subrules transitively into the higher rule, we throw away the lower rule's fate info 14:53
and recalculate it later 14:54
STD had a way of passing that extra info down to avoid rerunning the NFA
and trying that approach is on my todo list for speeding up the parser
14:55 achauvin joined
TimToady but I've kinda been putting it off till we can profile the parser a little better 14:57
FROGGS yeah 14:58
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
if push comes to shove, we want the parser to be fast
and both longlit and fates have the potential to mess with DFAability 15:00
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) :/
but I'll learn
15:03 airdisa joined
TimToady well...I don't understand them well enough either :) 15:03
FROGGS *g*
15:05 [Sno] left 15:06 rba_ joined, [Sno] joined 15:10 RabidGravy joined, domidumont left, rba_ left
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 ( no output )
jnthn m: <a b c>.roll(5).join.say
camelia rakudo-moar 1efb42: OUTPUT«acbcc␤»
Ven m: ([~] <qu_rk w_rt r_t t_r ...>.pick xx (5..10).pick).subst('_', { 'aeiouy'.split('').pick }, :g) 15:12
camelia ( no output )
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␤»
FROGGS that's.... german
Ven *g*
TimToady you could run the syllable openers adn the syllable closers independently... 15:14
jnthn hotel &
15:20 agentzh_ joined
timotimo considers adding string interning for json keys into json::fast 15:22
15:27 zakharyas left, fhelmberger left
timotimo tadzik: is "panda install ." known to be broken? 15:29
15:30 agentzh_ left, larion left
timotimo tadzik: apparently @revdeps ends up being Any 15:32
i suppose that's the "return unless +@ret;" line in Ecosystem.pm in the revdeps method? 15:33
ah, we probably want to return () in that case 15:34
15:37 Sysaxed` left, FROGGS left
tadzik timotimo: news to me 15:39
timotimo argh
Bytecode validation error at offset 2, instruction 1:
register operand index 7 out of range 0..6
tadzik :(
timotimo how did i do dis
arnsholt Broked the codegen, presumably? 15:44
What kind of files have you touched?
timotimo seems like i just had to ./rebootstrap.pl 15:45
tadzik: at least changing that to "return ()" in Ecosystem.pl made things work for me 15:46
tadzik ok, awesome
so () is Empty now?
TimToady no
tadzik r: my $a = (); say $a ~~ Empty
camelia rakudo-{moar,jvm} bdf07f: OUTPUT«False␤»
timotimo Empty is going to go away at some point 15:47
TimToady probably not
timotimo that's why i recommend ()
oh?
TimToady Empty goes away in any list, even in places where () stays
() only goes away under flattening 15:48
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 ()
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), (), ())␤»
timotimo oh?
i see now
so that may want to become return Empty instead
do we still want bare "return" to return Nil? 15:52
TimToady m: say (Bool.pick ?? (1,2) !! () for 1..10).perl
camelia rakudo-moar bdf07f: OUTPUT«((), (), (), (), (1, 2), (1, 2), (), (), (), (1, 2))␤»
TimToady m: say ((1,2) if Bool.pick for 1..10).perl
camelia rakudo-moar bdf07f: OUTPUT«((1, 2), (1, 2), (1, 2), (1, 2), (1, 2), (1, 2))␤»
TimToady the ()s go away
well, the Emptys
timotimo: that was asked a day or two ago, at which point I said that may depend on the return type 15:53
otoh, even with a listy return type, we might want to return () instead of Empty, by default
or not, haven't decided which is the more reasonable default for bare return 15:54
15:54 [Sno] left
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
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
Empty should really just be thought of as a form of Nil that happens to listify to nothing
it's the identity element for infix:<,>, unlike (), which is really only the identity element for flattening lists 15:58
15:59 Ven left, laouji joined
TimToady also, Empty is officially undefined, while () is defined 15:59
16:00 andreoss left
TimToady so there's really a number of reasons Empty might stick aroudn 16:00
*round
timotimo understood
Cannot take a reference to a non-native lexical ... :\ 16:02
16:02 noganex_ left
timotimo oh, i get it 16:02
mst bloody foreign lexicals, coming here, taking our scopes 16:03
(sorry)
16:03 gfldex joined
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:03
16:04 noganex joined
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:04 laouji left
grondilu thinks a Tuple would be nice because it's quite a famous concept in programming. 16:05
s/a Tuple/a Tuple type/
TimToady m: say (1,2,3).WHICH
camelia rakudo-moar bdf07f: OUTPUT«Parcel|(Int|1)(Int|2)(Int|3)␤»
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
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...
timotimo tries - and fails - to make JSON::Fast noticably faster
TimToady m: say (1,(2 if 0),3).elems 16:07
camelia rakudo-moar bdf07f: OUTPUT«3␤»
TimToady m: say (1,(2 if 0),3).list.elems
camelia rakudo-moar bdf07f: OUTPUT«2␤»
TimToady there's a difference between parcels and lists currently
hard to know where to place such a constraint though 16:10
16:10 nbrown04 left
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
camelia rakudo-moar bdf07f: OUTPUT«5␤»
TimToady that's a parcel
moritz m: say List.new(1, (), Nil, Empty, Empty.new).elems 16:13
camelia rakudo-moar bdf07f: OUTPUT«3␤»
moritz m: say List.new(1, (), Nil, Empty, Empty.new).perl
camelia rakudo-moar bdf07f: OUTPUT«(1, (), Nil)␤»
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
16:17 profan joined
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:18
and all that rigamarole in lists to allow for laziness really works against just a "simple" List as a parcel/tuple 16:19
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: rt.perl.org/rt3/Public/Bug/Display...?id=125154
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
$*ACTIONS also comes to mind
you might be running into some kind of caching issue, I suppose 16:22
hoelzro that would make sense
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?
TimToady the current caching scheme can overwrite entries in frames with a different dynvar
16:23 FROGGS[mobile] joined
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?
timotimo hmm.
heyo froggs
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?
timotimo you mean variables that are not available in inner scopes, ever?
FROGGS[mobile] aye
TimToady
.oO(register $foo)
16:25
16:25 eli-se joined
timotimo well, *ideally* our optimizer will do it in every case :) 16:25
eli-se hi 16:26
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␤»
TimToady hoelzro: you could fiddle with try_cache_dynlex in moar
raydiak ^^ should protos be excluded from CALLER?
hoelzro TimToady: thanks, I'll try that! 16:29
TimToady m: temp %*ENV; say %*ENV<HOME>
camelia rakudo-moar bdf07f: OUTPUT«/home/camelia␤»
TimToady m: { temp %*ENV; %*ENV<HOME> = "/home/sweet/home"; }; say %*ENV<HOME> 16:30
camelia rakudo-moar bdf07f: OUTPUT«/home/camelia␤»
TimToady you can also "disable" the cache by making a real temp copy of a dynvar
hoelzro:
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
camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤»
FROGGS[mobile] zostay: only in a developement branch 16:32
TimToady raydiak: note that CALLER is the proto 16:33
so officially CALLER::CALLER should always work, even if inlined... 16:34
raydiak TimToady: 16:28:46 raydiak | ^^ should protos be excluded from CALLER?
zostay FROGGS: which branch? i'd like to try it out
TimToady ah
raydiak it's weird that the behavior is different on the first iteration, though I understand why
TimToady should learn to read one of these years
FROGGS[mobile] zostay: cunion in MoarVM and rakudo I believe 16:35
raydiak feels ever so slightly better that he misses so much, now :)
zostay cool, thx
raydiak m: multi sub foo () { say CALLER::CALLER::<$_> }; foo for <a b c>
camelia rakudo-moar bdf07f: OUTPUT«a␤(Any)␤(Any)␤»
16:35 agentzh_ joined
TimToady I did that on purpose, just so's you'd feel better :) 16:35
raydiak such a generous benefactor :) 16:36
FROGGS[mobile] zostay: I can get it into master/nom until the weekend...
TimToady we could make CALLER bypass proto, I suppose, and have a PROTO if you explicitly want the proto...
FROGGS[mobile] +1
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
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
can i help with anything?
16:38 chenryn left
FROGGS[mobile] zostay: testing when I give you the go... what os/arch are you on? 16:38
zostay os x 16:39
dalek kudo-star-daily: efa295e | coke++ | log/ (2 files):
today (automated commit)
rl6-roast-data: c4a94b3 | coke++ | / (9 files):
today (automated commit)
raydiak doesn't remember *ever* caring about the vars in scope of the dispatcher
FROGGS[mobile] zostay: ohh, perfect :o) 16:40
as I have linux and Windows
16:40 abraxxa joined 16:41 abraxxa left
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:46
FROGGS[mobile] jnthn: I think I want to provide a role Inlining for cstructs and cunions... what'ya think? 16:47
zostay: awesome :o)
[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:48
my first thought was maybe we do, but I'm now thinking it's one more thing to keep up to date. 16:49
TimToady m: multi sub foo () { say CALLERS::<$_> }; foo for <a b c> 16:50
camelia rakudo-moar bdf07f: OUTPUT«(Any)␤b␤c␤»
16:51 Akagi201 left 16:53 larion joined
dalek ast: 936ff0b | coke++ | S02-types/compact.t:
reduce fudge scope; follow merge of RTs
16:55
16:55 agentzh_ left
dalek kudo/nom: b74cda4 | coke++ | t/spectest.data:
Run fudged test
16:56
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␤»
TimToady raydiak: ^^ but note this
m: proto sub foo () {*}; multi sub foo () { say CALLER::<$_> }; foo for <a b c>
camelia rakudo-moar bdf07f: OUTPUT«a␤b␤c␤»
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
[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␤»
TimToady m: proto sub foo () {my $x = 42; {*}}; multi sub foo () { say CALLER::<$_> }; foo for <a b c>
camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
TimToady kinda hit or miss whether it skips the proto currently
so we should probably just make it alway skip the proto
[Coke]: currently solved with binding 17:00
17:01 espadrine left 17:02 skids left, davido__ left, danstoner left, ab5tract joined
TimToady m: sub foo () { say CALLER::<$_> }; my &bar = &foo.wrap({callsame}); bar for <a b c> 17:02
17:02 danstone1 joined
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
17:02 El_Che joined
dalek ast: c486c00 | coke++ | S02-types/ (3 files):
track RT merge and fix error message typo
17:02
17:02 breinbaas joined, rjbs joined, zoosha joined
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?␤»
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?
TimToady m: sub foo () { say CALLER::<$_> }; &foo.wrap({callsame}); foo for <a b c>
camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
[Coke] TimToady: there are a bunch of tests that expect that syntax to work. Look for RT #124490
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124490
17:02 mattp_ joined
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, go|dfish joined
TimToady m: sub foo () { say CALLERS::<$_> }; &foo.wrap({callsame}); foo for <a b c> 17:03
camelia rakudo-moar bdf07f: OUTPUT«(Any)␤(Any)␤(Any)␤»
TimToady m: sub foo () { say CALLER::CALLER::<$_> }; &foo.wrap({callsame}); foo for <a b c>
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
TimToady say what? 17:03
CALLER should probably skip .wraps too... 17:04
17:05 [Sno] joined
TimToady I note, however, that in Cool.pm, we have this: proto method subst(|) { $/ := nqp::getlexdyn('$/'); {*} } 17:07
dalek kudo/nom: a8c9e11 | coke++ | t/spectest.data:
run fudged test
TimToady this would probably break if we made CALLER bypass a proto 17:08
since it's specifically using the proto to hide the caller's $/ from the multi
well, to alias, not to hide
dalek ast: bd155fa | coke++ | S02-types/keyhash.t:
re-fudge test

  * remove workarounds that didn't work anyway - we didn't notice
   because this test wasn't getting run in rakudo
  * refer to merged ticket ID.
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
17:09 larion left
[Coke] m: FatRat; 17:09
camelia ( no output )
[Coke] m: KeyWeight;
camelia rakudo-moar bdf07f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lRWWl2veiF␤Undeclared name:␤ KeyWeight used at line 1␤␤»
[Coke] is KeyWeight still a thing? it's not in the syn. 17:10
TimToady that's Mix and MixHash now, I think
[Coke] yay, killing tests.
dalek ast: bc6e3c8 | coke++ | S02-types/keyweight.t:
KeyWeight is no longer a thing.
17:12
kudo/nom: 68c432e | coke++ | t/spectest.data:
remove reference to non-existant test file
17:13
17:13 FROGGS joined
[Coke] crap. "nonexistent". :P 17:14
need spell check in my git commit editor window. :P
17:16 spider-mario joined, molaf joined
moritz echo 'set spell' >> ~/.vimrc 17:17
dalek pan style="color: #395be5">perl6-examples: 6b648f1 | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
[interpreters] simple lisp interpreter
pan style="color: #395be5">perl6-examples: 6e86abf | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
better repl
pan style="color: #395be5">perl6-examples: b51078e | (Andrei Osipov)++ | categories/interpreters/lisp.pl:
[interpreters] fixed repl
17:18 berekuk_ joined
andreoss probably an overkill to use class for wrapping a functions, the code ended up almost two times bigger python version 17:19
*than the python version
[Coke] what about sameaccent? we have tests but nothing in Syn. 17:21
github.com/perl6/roast/blob/master...meaccent.t 17:22
17:22 andreoss left 17:24 eli-se left
FROGGS [Coke]: it is called samemark in the synopsis it seems 17:24
[Coke] m: samemark
camelia rakudo-moar a8c9e1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uMFS5bdNve␤Undeclared routine:␤ samemark used at line 1. Did you mean 'samecase'?␤␤»
FROGGS NYI 17:25
because that needs character decomposition, and we just got that recently
dalek ast: 77dbc77 | coke++ | S32-str/same (2 files):
Track change of sameaccent -> samemark
17:29
ast: f6f218b | coke++ | S32-str/samemark.t:
fudge for rakudo
17:31 [TuxCM] joined 17:34 diana_olhovik_ joined 17:36 domidumont joined 17:39 chenryn joined 17:40 cschwenz joined 17:43 chenryn left 17:46 cschwenz left
[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
does anyone know what I'm doing wrong?
17:50 cognominal left 17:51 pauluu left 17:54 [Tux] left 17:56 vendethiel joined 18:01 [TuxCM] left
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␤»
vendethiel
.oO( we should have an alias to sleep called nap )
18:02 [Tux] joined, liztormato joined
jnthn FROGGS[mobile]: (Inlining) hmm, not sure...lemme ponder it while I go for dinner (now) :) 18:03
&
FROGGS :o)
liztormato waves from a ferry
FROGGS jnthn: my idea to allow: MyStruct but Inlining
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
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)␤»
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«100 0 100 100 100 100 100 100 100 100␤»
FROGGS dunno that'll work at all
o/ liztormato
vendethiel \o liz!
liztormato About to lose connectivity 18:05
TimToady o/
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␤»
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100␤»
grondilu m: my @a = ^100; my @p = map { start { [ @a ] } }, ^5; say @p».result».elems
liztormato Catch you all in Denmark or further south&
camelia rakudo-moar 68c432: OUTPUT«100 0 100 100 100␤»
18:06 liztormato left
grondilu so weird 18:06
TimToady seems to drop the .[1] element
18:07 Gauravsharma joined
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
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␤»
FROGGS so it is about lexical lookup
grondilu seems so 18:13
18:13 gfldex left
TimToady seems even more unstable if you change [ @a ] to @a 18:14
PerlJam perl6 18:15
oops
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
it's not like ^100 is lazy after being assigned to @a, since that's eager
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␤»
TimToady seems more stable with my $a = ^100 and then [ @$a ], though not entirely so 18:17
never puts 0 in the second spot, seems
grondilu yeah the sigil seems to matter 18:18
TimToady still gets an occasional Cannot invoke this object (REPR: Null)
grondilu m: my $a = [ rand xx 100 ]; my @p = (start { $a }) xx 10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«100 100 100 100 100 100 100 100 100 100␤»
grondilu ^this seems to always work
18:18 Sysaxed` joined
TimToady heh, I got 0 0 0 0 0 0 0 0 0 0 once... 18:22
on the original
18:22 Akagi201 joined
TimToady I wonder if there's something in .flat or in binding to *@ 18:24
18:25 coffee` joined
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
and: hi, #perl6
PerlJam m: my @a = ^100; my @p = map { start { [ $_, @a ] } }, ^10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«101 101 101 101 101 101 101 101 101 101␤»
PerlJam m: my @a = ^100; my @p = map { start { [ $_, @a ] } }, ^10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«101 101 101 101 101 101 101 101 101 101␤»
PerlJam locally, I get 1 instead of 101 on one of those 18:27
18:27 Akagi201 left
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␤»
grondilu m: my @a = rand xx 100; my @p = (start { [ @a ] }) xx 10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
grondilu m: my @a = rand xx 100; my @p = (start { [ @$@a ] }) xx 10; say @p».result».elems
camelia rakudo-moar 68c432: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null)␤»
18:29 cognominal joined
TimToady yeah, the .flat implied by [@a] is messing up, though that mostly only explains the misplaced elements, not the Cannot invokes 18:29
18:29 cygx left, rba_ joined, rba_ left
TimToady but replacing [@a] with $(@a) doesn't misplace the 100s 18:29
it only fails with Cannot invoke 18:30
so something ain't threadsafe in [@a]
[Coke] bartolin++
18:33 eli-se joined
grondilu meanwhile I suppose I can use $im instead of @im in rosettacode.org/wiki/Mandelbrot_set#Perl_6 18:35
18:35 cognominal left
grondilu (as a workaround that is) 18:35
18:38 noganex left, noganex joined
[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.
maybe your run included error messages or something? 18:40
s/run/output/
also, I've just edited to $im intead of @im. Should fail less. 18:41
18:42 meisl joined
FROGGS domidumont: hi, what's the state of moar/nqp/rakudo for debian? is there something blocking? 18:42
meisl m: say 'hello'
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] ftp-master.debian.org/new/moarvm_2015.04-1.html
hi meisl
meisl hi FROGGS
18:44 rindolf left, rindolf joined, airdisa left, rindolf left
meisl I'm still after QAST::Block / QAST::Stmt(s) 18:45
jnthn: I was directed to you re QAST, are you there? 18:46
18:46 FROGGS[mobile] left, airdisa joined 18:47 FROGGS[mobile] joined, spider-mario left 18:48 spider-mario joined, airdisa_ joined 18:49 raiph left
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
meisl watches FCB vs FCB
thx, vendethiel
meisl 18:51
18:52 airdisa left
meisl vendethiel: and how did you say literal "/me"? 18:52
vendethiel /say :P
18:52 raiph joined
meisl /me 18:52
jercos /you
meisl /say /me
jercos for some clients, that has a short form with just a slash
meisl i c 18:53
jercos / /me
/me
:D
meisl wooow, gooool for FCB!
only three left...
jercos: mine eats all my typing without notice and sends nothing if I use only / 18:55
jercos heh
now you can send your future self secret messages, only readable with the up arrow.
meisl yes, and in case I forget - I'll just ask NSA 18:56
18:56 danstone1 is now known as danstoner
japhb .botsnack 18:56
synbot6 om nom nom
yoleaux 02:57Z <timotimo> japhb: i'm experiencing an extreme delay in both the compare and history subcommands of perl6-bench right now
:D
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
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
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:58
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 telex left
japhb wonders if we have to start thinking about real optimization 19:00
meisl aargh, Neymar to level, 1:1 (will stop it now) 19:01
19:02 telex joined 19:07 muraiki joined
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:10
jnthn: because that might even work very well for fixed sized inlined native arrays 19:11
19:12 cognominal joined 19:16 [Sno] left
dalek kudo/cunion: 513b1b6 | FROGGS++ | / (4 files):
add support for unions in NativeCall using CUnion repr
19:16
19:16 Sysaxed` left, [Sno] joined
dalek kudo/cunion: 7fbabfc | FROGGS++ | t/04-nativecall/13-union. (2 files):
add tests for C union support for NativeCall
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
meisl FROGGS: I'd appreciate to hear your opinion on 2 thoughts re QAST I had since yesterday (sorry to bother you again) 19:22
19:24 FROGGS[mobile]2 joined 19:25 brrt joined
meisl FROGGS: may I both you again with 2 thoughts of mine re QAST? 19:25
FROGGS[mobile]2 meisl: yes?
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
jnthn TimToady: Because we totally avoid calling the onlystar ones in many cases. :)
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
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:27 FROGGS[mobile] left
TimToady and it should be consistent 19:28
jnthn Well, differently consistent, but yes :)
meisl FROGGS: still there?
FROGGS[mobile]2 yes, I am 19:29
TimToady prefers consistent from the user's POV :P
jnthn TimToady: What frames *should* appear in CALLER:: ?
FROGGS[mobile]2 meisl: I am waiting for the question
meisl FROGGS: sorry; 2nd aspect, *orthogonal* to 1st: define a sequence of things to do 19:30
FROGGS: my thesis now is this: Block is for doing both, "make new scope" and "hold seq of things to do" 19:31
FROGGS: whereas Stmt(s) is only for 2nd, "hold seq of things to do"
jnthn meisl: It's primary purpose is the first, the second is simply convenient. 19:32
timotimo m: my str $hashres = (my %foo){"hello"};
camelia rakudo-moar 68c432: OUTPUT«Cannot unbox a type object␤ in block <unit> at /tmp/R_82q5ou7I:1␤␤»
meisl jnthn: "It['s purpose]" referring to ... Block?
jnthn meisl: Yes.
19:32 Sysaxed` joined
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
meisl confused
TimToady m: (say "STMT 1"; say "STMT 2") 19:34
camelia rakudo-moar 68c432: OUTPUT«STMT 1␤STMT 2␤»
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)
dalek pan style="color: #395be5">perl6-examples: b648562 | (Steve Mynott)++ | categories/cookbook/14database-access/ (2 files):
simple DBIish example
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.
TimToady how...traditional... :)
but I agree
19:35 dolmen joined
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
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.
The current design is deliberate and useful.
19:37 laouji joined
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) }
timotimo it's time we get the boxing/unboxing tracking thing in place ...
dalek pan style="color: #395be5">perl6-examples: c043d5e | (Steve Mynott)++ | categories/cookbook/14database-access/video.db:
oops
TimToady it's just one of the places that allows a sequence of statements
19:38 airdisa_ left
jnthn meisl: Yes. 19:38
19:39 brrt left
TimToady it's just not the only way to do it, hence, not its primary purpose 19:39
jnthn Exactly.
meisl hmm, ok
TimToady this does diverge slightly from the definition of "block" used in some other languages 19:40
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
right?
19:41 mohij left 19:42 laouji left
TimToady you mean, as in 'if $cond { "nothing declared here"; "or here either" }'? 19:42
19:42 _mg_ joined, airdisa joined
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:43
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
TimToady unless you're willing to use a slightly different syntax...
no, it's still a declarative scope, so no error
meisl huh? 19:45
TimToady m: my $x = 42; if True { my $x = 43; say $x }; say $x
camelia rakudo-moar 68c432: OUTPUT«43␤42␤»
meisl now I'm really confused
TimToady it's just shadowing it as any lexical scope would 19:46
curlies always do that
19:46 mohij joined
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.
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␤»
TimToady that one is not being a lexical scope, I guess
std: my $x = 42; my %hash = :a(1); say %hash{ my $x = 43; say $x; 'a' }; say $x
camelia std 28329a7: OUTPUT«ok 00:00 141m␤»
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
TimToady it is a separate lexical scope in STD, so possibly a buglet
well, STD doesn't have very many QAST nodes, I'll admit :)
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␤»
jnthn meisl: Differnet languages behave in different ways.
TimToady m: my $x = 42; my %hash = :a(1); say %hash{ $x = 43; say $x; 'a' }; say $x
camelia rakudo-moar 68c432: OUTPUT«43␤(Any)␤43␤»
TimToady not clear why that doesn't print 1 in the middle
19:49 noganex_ joined
meisl ooh, you're loosing me... 19:49
TimToady that looks kinda like a bug
%hash{'a'} should be 1
domidumont FROGGS: moar is pending a manual review done by a small team. 600+ packages are currently waiting in this queue.. :-/
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
camelia rakudo-moar 68c432: OUTPUT«1␤42␤»
TimToady it's 1 there
but adding statements appears to break that
meisl jnthn: and no Block at all?
jnthn meisl: Only for functions.
TimToady oh ; is multidimensional there, duh
jnthn At least, as far as I understand JavaScript semantics :)
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␤»
TimToady there we go
19:52 noganex left
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)
jnthn meisl: You can put it directly in block.
vendethiel do only "Blocks" introduce new lexical scopes? 19:53
jnthn vendethiel: Yes
vendethiel or is the scoping COMPLETLY unrelated?
jnthn QAST::Block = lexical scope
vendethiel it's a bit different in JS, as the "var" scope is different than the "let" scope
"let" is block-scoped (inside "if", "for", etc), but function-scoped for "var"
(with all the variables declarations hoisted, and the duplicate ones removed (think parameter ones))
PerlJam Everybody knows about github.com/perl6/nqp/blob/master/d...t.markdown right? 19:54
meisl vendethiel: JS scoping is horrible (-y broken), so maybe not the best of exs
vendethiel ;-)
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
TimToady it's a really good example :P
meisl PerlJam: that's my main source
19:54 domidumont left
jnthn meisl: But that's not anything QAST specific, it's just how we chose to do it. 19:54
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. :)
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:56 raiph left
masak TimToady: Python is worse. mostly because assigning = declaring. ugh. 19:57
TimToady same excuse though
meisl masak, TimToday: I didn't actually intend to criticize JS or python, just that, as an example, too intricate for the discussion here
masak at least JS allows you to write to closed-over variables :/
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.
arnsholt Wrapping closed over variables in an array works though
But yeah, it's not a very pretty hack =)
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?
arnsholt masak: *giggle* Yeah =D
20:00 mohij left
TimToady if you use cotton candy, it even tastes good, if you happen to hit yourself in the mouth 20:00
20:00 _mg_ left
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.
arnsholt Yeah, Python and Java are basically equivalent in that department
meisl jnthn: I'm asking because there is the Stmt variant, which is said to enable some optimization re locals
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
arnsholt Yeah, that's true. Different cause but same symptom 20:03
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.
jnthn The local decl'd in one QAST::Stmt will not be available in the second. 20:05
Whereas if they were QAST::Stmts it would be fine
meisl jnthn: yes, got that
20:06 mohij joined
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
jnthn In terms of "abusing" it, it's just that you generate code like the above.
I think we catch it and give a sane enough error.
meisl nothing else?
I mean, no other cave-ats? 20:07
jnthn Not as far as I can remember.
I've only been bitten when I used it, then realized I'd created the above situation by accident.
meisl ok, thx. I think the docs should be more clear about it 20:08
vendethiel masak: I'm sure guido thinks the same ;-)
masak .oO( we all caved at the problem ) :P
arnsholt masak: IIRC the official reasoning for that being outlawed is "something something optimisation"
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.
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 )
meisl jnthn: but before I should make sure I know what I'm talking about, shouldn't I? ;)
PerlJam meisl: not always :) 20:11
meisl PerlJam: ?
20:11 Akagi201 joined 20:12 rurban joined
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"
meisl ah, ok. part of my converging is asking annoying qs here :) 20:13
20:15 andreoss joined
meisl well ok, let's try again to isolate the basic concepts involved in here 20:15
20:16 Akagi201 left
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:17
at first: do you agree these three are completely independent (as concepts, I mean) 20:18
?
FROGGS c depends on a, no?
20:19 raiph joined
FROGGS zostay: I created MoarVM/cunion an hour ago, so you might need ti git fetch 20:19
to*
itz_ this takes an old joke one step further
20:19 atweiden left
itz_ www.amazon.co.uk/V-096TT-Ultrixx-Cy...B000JJ4GRA 20:20
meisl FROGGS: as c) mentions "lex", you're right on a surface level - but the stress is on optimization
FROGGS meisl: I mean that there can't be locals without different lexical scopes
20:21 raiph left, raiph joined
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.
But with less typos. :)
20:23 darutoko left
FROGGS meisl: sure 20:23
meisl jnthn: maybe instead of "that also denotes..." you'd have "that in addition denotes..."?
TimToady well, that can also be misconstrued if you try hard enough :) 20:24
.oO("What addition got to do with it?")
20:25
masak semantics is hard.
meisl jnthn: "...and it (Block) *lacks* the possibility to mark a "locals" boundary", right?
TimToady so's typing 's
meisl TimToday: I'm not talking about adding numbers, guess you're joking. Are you? 20:27
TimToady you should generally assume I'm joking, except when I'm not... 20:28
FROGGS TimToady is never joking
jnthn meisl: A local is only visible inside the QAST::Block it's immediately declared in. That's the difference between local and lexical.
FROGGS ... unless when he is
PerlJam TimToady is always joking.
(except when he's not)
FROGGS :D
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...
PerlJam ... and then he invokes rule #2.
meisl I also know that he's right, even when not. 20:30
price question: Am I joking?
TimToady you gotta be kidding me...
masak m: say "is meisl joking?"; say Bool.pick
camelia rakudo-moar 68c432: OUTPUT«is meisl joking?␤True␤»
meisl I never would...
masak meisl: you're joking, according to camelia.
FROGGS isnt...isnt...ᵢₛₙₜ... 20:31
jercos m: say Nose.pick
camelia rakudo-moar 68c432: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UYXvoWe0oZ␤Undeclared name:␤ Nose used at line 1␤␤»
meisl well, camelia isnt TimToday isnt meisl (chaining)
japhb m: say (my class Nose).pick
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␤»
japhb m: say (my class Nose {...}).pick
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…»
japhb m: say (my class Nose {}).pick 20:32
camelia rakudo-moar 68c432: OUTPUT«Nil␤»
masak m: say (my enum <poke scratch>).pick
camelia rakudo-moar 68c432: OUTPUT«scratch => 1␤»
jercos Tell me Mr. Anderson, what good is a pick method... if you have no Nose?
masak jercos: The Nosetrix
TimToady if I did have a nose, it'd be Empty
japhb Neo's Nose
meisl you can always mixin Nose
masak much better than Noses Reloaded and Nose Revolutions. 20:33
japhb m: 'Nose'.comb.pick(*).say;
camelia rakudo-moar 68c432: OUTPUT«N o s e␤»
meisl japhb: given a Nose, and something returned from pick, would choose the red one or the blue one? 20:34
(would you)
jnthn If it's blue, I'd mebbe go to the doctor :P
20:34 silug left
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)
masak if it's red, then at least you can guide the other reindeer home... 20:35
TimToady sneezes violetly
meisl ...and looses an "n" in the course 20:36
FROGGS TimToady: brass you 20:37
japhb
.oO( "Her you go small fry. Blow it." ... "Boy, he blew it!" )
meisl masak: I didn't know about the *insides* of Rudolf's nose
masak the insides are an implementation detail. 20:38
meisl :D
TimToady red or blue encapsulation?
meisl oh gosh, you're picking capsules out of your noses already?
moritz prefers read/blue trees 20:39
*red/blue
meisl moritz: guess blue or black - is just an impl detail?
20:40 berekuk_ left
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.
TimToady beats masak black or blue.
masak :P
japhb I was composing just such a response
masak also, ow.
japhb Along the lines of "/me smacks masak with a Dali clock" 20:42
masak bends accordingly
TimToady beats japhb *to* black or blue.
japhb :-D
masak beat that, black or blue!
20:42 brrt joined
TimToady the Dali clock is...unevenly distributed... 20:42
japhb Damn it, now I have "Beat It" running through my head
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.
moritz in space, all tree roots point... somewhere.
masak in topology, we can have pointless trees. 20:44
moritz
.oO( "there's no gravity in my RAM" )
masak er, point-free. I meant point-free.
PerlJam ... assume a spheircal tree of uniform density ...
20:44 raiph left
meisl in irc, we can have pointlessness - for free :) 20:44
japhb
.oO( Remember, the enemy's tree is DOWN! )
masak .oO( what is this, Friday? )
FROGGS meisl: we got past that point already :o) 20:45
TimToady it's a dress rehearsal
FROGGS YEARS ago
japhb True
meisl FROGGS: what point?
jnthn masak: Friday is only Black... :P
FROGGS meisl: talking pointless stuff
jnthn gets some rest 20:46
FROGGS sleep well jnthn
jnthn Will be doing Perl 6 hacking on Thu/Fri \o/
FROGGS \o\
brrt \o/
TimToady /o/
jnthn o/ &
masak /o/
jnthn: ⅋ /o
vendethiel \o/o\o/o\o/
meisl lost the point but got quite some o's 20:47
geekosaur ooo
vendethiel roll them 'round
TimToady /o\ <-- australian celebrating
masak vendethiel: are you actually five people? this explains a lot.
meisl jnthn: thx for your help
vendethiel masak: or I might be drunk! *g*
TimToady looks for a ven diagram 20:48
masak wait, how drunk do you have to be to see five copies of things?
vendethiel I can't remember. *g*
masak :D
meisl TimToday: again, one "n" left ;) but thx for your help, too
vendethiel TimToady: I have a friend that sends me a new one every day already...
TimToady masak: drunk enough to induce cataracts might do it
masak sounds ungood. 20:49
geekosaur .oO { there! are! four! o-s! }
masak geekosaur: is that TNG?
geekosaur yep 20:50
masak has no idea how he knows that
meisl TimToday: oh, I now get your joke re "ven". sorry, master.
TimToady o problem 20:51
20:53 andreoss left
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 )
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
yoleaux FROGGS: I'll pass your message to jnthn.
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
masak probably not; but a torus should open up some possibilities. 20:57
vendethiel m: class A{has $.a;}; say A.new(:5a).hash
camelia rakudo-moar 68c432: OUTPUT«Odd number of elements found where hash initializer expected␤ in block <unit> at /tmp/E_Bbyo3a55:1␤␤»
TimToady troo
TimToady thinks about Klein bottles...
vendethiel so, I want to write a "is serializable" (hashable?) and add a method "hash" or "values" or something along those lines
I think I should have enough example material. 20:58
TimToady wonders what a Klein torus would look like...
FROGGS .oO( There are no Klein bottles in Texas surely... )
20:58 andreoss joined
TimToady I think they're all outside Texas, mostly 20:59
masak .oO( you can put the Klein bottle outside Texas, but you can't put Texas outside the Klein bottle ) 21:00
21:01 Peter_R joined
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
TimToady I think c mixes up some lexical and dynamic ideas, and the lexical ones are intertwined with a 21:04
s/up/together/
don't mean "mixes up" in a pejorative sense
(except if I do...ba dump bump) 21:05
but I'm not the QAST expert here
timotimo i wonder if we can have an opposite of punning ... so p-un?
p-un a class into a role
meisl I'm not about to judge the design, either. Just trying to get my head around it. 21:06
21:06 skids left
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:08
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...
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
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 vendethiel left, andreoss left
FROGGS let me add a test first 21:14
21:15 brrt left
zostay cool 21:16
21:16 eli-se left 21:18 muraiki left 21:19 Peter_R left, rurban left
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:22
21:24 Peter_R joined 21:25 yqt joined 21:26 Vlavv joined 21:28 Peter_R left 21:30 H2O1 joined, H2O1 left 21:31 Peter_R joined
FROGGS zostay: I have something to push tomorrow 21:32
gnight #perl6
21:32 FROGGS left
masak 'night, #perl6 21:35
21:37 zacts joined 21:41 raiph joined 21:50 yqt left 22:00 eli-se joined 22:01 larion joined 22:07 Zoffix joined 22:10 yqt joined 22:14 kaare__ left 22:26 laouji joined 22:28 inokenty left
rjbs Is there something to be done to get ^P/Up to go through repl history? 22:29
22:31 laouji left
timotimo install "Linenoise" via panda 22:32
rjbs m: (65..75).map({ .chr }).perl.say
camelia rakudo-moar 68c432: OUTPUT«("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K")␤»
rjbs m: (65..75).map({ .chr => .chr }).perl.say 22:33
timotimo m: say "A".."K"
camelia rakudo-moar 68c432: OUTPUT«Method 'chr' not found for invocant of class 'Any'␤ in block <unit> at /tmp/t7UF5oWXi5:1␤␤»
rakudo-moar 68c432: OUTPUT«"A".."K"␤»
rjbs What's going on in that second one?
timotimo you're constructing a pair
rjbs timotimo: Yeah, getting the range wasn't actually the point, sadly.
timotimo while you're calling $_.chr on whatever $_ is outside
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␤␤»
timotimo m: (65..75).map({ a => 20 }).perl.say
camelia rakudo-moar 68c432: OUTPUT«Method 'count' not found for invocant of class 'Hash'␤ in block <unit> at /tmp/1PR0wKioyo:1␤␤»
timotimo ah, it won't accept a Pair or hash to be passed there
rjbs Does it think that { .chr => .chr }is a hash?
timotimo m: (65..75).map( *.chr => *.chr ).perl.say
camelia rakudo-moar 68c432: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at /tmp/kOH47PhlwJ:1␤␤»
rjbs I have to say, I am baffled that the ambiguity of {} remains in p6. :(
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…»
timotimo m: (65..75).map({ $^a.chr => $^a.chr }).perl.say
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"))␤»
rjbs m: (65..75).map(-> { .chr => .chr }).perl.say
camelia rakudo-moar 68c432: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at /tmp/l7SO2kUlHW:1␤␤»
rjbs m: (65..75).map(-> $_ { .chr => .chr }).perl.say
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"))␤»
timotimo that's the empty signature
rjbs Fine.
timotimo there's no ambiguity, it's all defined crystal clear in the speculations :)
gotta go now
have a good one :)
rjbs timotimo: It's ambiguous to casual readers.
timotimo fair enough
eli-se goodbye friends 22:36
22:38 dolmen left 22:40 airdisa left 22:41 eli-se left
rjbs Err. So, I did panda install Linenoise. Now when I run perl6 it bails out because it can't find liblinenoise. 22:44
22:45 Zoffix left
rjbs It's looking for liblinenoise.so, but liblinenoise.dylib was installed. 22:45
hoelzro I thought NativeCall looked for .dylib on OS X? 22:46
rjbs Hm. And there's no uninstall. 22:47
22:47 RabidGravy left
rjbs Fortunately, I am mighty. 22:49
22:51 larion left 22:52 larion joined 22:55 diana_olhovik_ left 22:56 skids joined 23:01 Akagi201 joined
rjbs Woah, so: gist.github.com/9e716296aeef57e65068 23:02
I get a syntax error from line 151! A comment!
TimToady runaway, probably from << ' >> or so 23:05
rjbs It works if I delete the my $DEFAULT_ALPHABET
Yeah.
TimToady rakudo does not yet have the nice runaway detection of p5
23:06 bjz left
rjbs I didn't realize that <<...>> could contain quoted strings. I thought it was just space-delimited tokens. 23:06
23:06 Akagi201 left
TimToady that's < > 23:06
<< >> is more like shell quoting
rjbs TimToady++ # Okay, thanks!
TimToady m: say << a 'b c' d >>.elems
camelia rakudo-moar 68c432: OUTPUT«3␤»
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 :)
rjbs I translated this p5:
map { chr hex } qw( FF FE a8 )
to <FF FE a8>.map({ "0x{$_}".chr}) 23:08
TimToady say <FF FE a8>.chrs 23:09
rjbs which just seems perverse
TimToady m: say <FF FE a8>.chrs
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␤␤»
rjbs Whoops, back. Hit a dead zone there. (I'm on PA Route 309!) 23:10
TimToady m: say <FF FE a8>.map({:16($_)}).chrs 23:11
camelia rakudo-moar 68c432: OUTPUT«ÿþ¨␤»
rjbs woah
23:13 Peter_R left
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>
m: say :7<333>
camelia rakudo-moar 68c432: OUTPUT«171␤»
rjbs Right, I played with things in that form fo a while.
I did base 3. :)
TimToady m: say :7('333')
camelia rakudo-moar 68c432: OUTPUT«171␤»
TimToady that's the form that takes an argument 23:14
(non-literal)
it's admittedly a bit klunky
rjbs I had only seen :x(...) used in compact hashes or captures, I think.
23:14 mohij left
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␤␤»
rjbs I don't know what that form *is* here. Is it a manifestation of one of those, or something else?
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␤␤»
rjbs (Does it have a name?)
TimToady radix literals, I suppose, but :16() isn't exactly a literal
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?
TimToady not really
rjbs Yeah, oct and hex were always problematically named.
Okay, thanks, that's all helpful.
TimToady we just reused the special form 'cause it was available and kinda like things we already had
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! :)
TimToady we actually have a generic radcalc() routine in Actions.pm, but nobody's bother to make it generally available 23:18
*ed
rjbs Nice error message on :16(1), btw. 23:20
TimToady bows
(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. :)
TimToady well, you can do ».chr.join if .chrs bothers you :) 23:24
rjbs now wants to sneak an .elms method onto something.
(Is there a Tree class?) 23:25
TimToady but yeah, there aren't enough plural forms in English :)
nor enough brackets in ASCII
there's a .tree method
rjbs Great, we can add .elms and .firs. 23:26
What's firs do? / Why, gives you the firs child, of course!
TimToady makes more sense than .car 23:28
23:28 Vlavv left
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
Is the simplest way to get character X out of a string: $str.substr(X, 1) ?
TimToady depends on what you want to do with it 23:29
nqp actually has an ordat, and we have an substr-eq that will compare at a location
but if you actually want the char, .substr is what there is 23:30
the rules are a bit different for a buffer though, where you can use .[]
23:38 thou left, yqt left, larion left
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:39
23:41 Vlavv joined
timotimo home is where a sandwich is waiting for you 23:41
rjbs I guess this isn't home anymore. :( <burp> 23:42
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
timotimo right, you'll have to >>.name there to get something more proper 23:43
and i don't really know why those started appearing
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.
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…»
timotimo oh, they are?
rjbs I find myself doing this kind of thing *all the time* on the repl: $X.^methods.map({ .name }).sort
I need to make shorthand for it. Soemhow.
TimToady m: say [1,2,3].^methods».name.sort
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…»
rjbs Now that's nice: if any($alphabet.ords) > 0xFF; 23:47
TimToady nice, but probably slow
fine for outer code 23:48
rjbs $alphabet is never more than 78 codes.
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
TimToady or /<-[\0..\xff]>/ or so 23:49
japhb rjbs: Use max() instead of any(). :-)
TimToady any could at least theoretically short-circuit 23:50
max can't
japhb TimToady: Yeahbut: any()'
s implementation is almost certainly slower
DEK
TimToady currently
rjbs In p5, I'd probably use any(&@) if I didn't use a regex. But that's a different any. :)
23:50 skids left
rjbs What's the <- in that pattern above? 23:50
japhb Inverted character class 23:51
TimToady same as [^a..z] in p5 regex
japhb <-[...]>
TimToady er, a-z, but yeah
rjbs Huh. Okay!
TimToady we put the negation on the character class outside, to avoid semipredicate issues
rjbs Oh, I see, with a trailing > 23:52
TimToady and changed - to .. which you'd never want in a character class anyway
rjbs Excellent.
TimToady we demoted char classes, and stole [] for simple grouping
japhb rjbs: Yeah, character class is normally <[...]> in Perl 6, instead of [...] in Perl 5 (wanted the shorter syntax elsewhere)
TimToady but then the <-[]+[]-[]> form becomes available for sets of chars
rjbs <3 regex sets 23:53
We just got those! :) khw++
TimToady m: say ('a'...'z').grep: /<+alpha-[aeiou]>/
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␤»
japhb (?:...) used to always annoy me just a little bit, I was glad to see that go. :-)
rjbs Oh, right! The colon!
23:53 kurahaupo1 joined
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
japhb
.oO( Everyone wants the colon. Even your code. )
TimToady two terms in a row, and all that
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
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? 23:59