»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by moritz on 3 May 2013.
00:14 nyuszika7h left, markov left, hoelzro left, Util left, rhr left, daniel-s_ left, sneilan left, Ulti left, leprevost_ left, autumn left, BinGOs left, Kelder left, bbkr left, Celelibi_ left, tokuhirom_ left, genehack left, clkao_ left, _jaldhar left, integral left, gfldex left, silug___ left, cognominal left, geekosaur left, lestrrat left, drbean left, bloonix left, cosimo left, patspam left, groky left, berekuk left, breinbaas left, krunen left, djanatyn left, stevan__ left, Khisanth left, nebuchadnezzar left, lizmat_ left, rom1504 left, ruoso left, fgomez_ left, FROGGS left, kshannon_ left, japhb left, xenoterracide_ left, pnu_ left, PerlJam left, gabriel_ left, arnsholt left, mathw_ left, dbr left, simcop2387 left, grondilu left, PacoAir left, Kharec left, jlaire_ left, awwaiid left, scottp left, ivan`` left, araujo left, bruges_ left, sergot left, dalek left 00:15 hypolin left, vaelxon left, TimToady left, [Coke]_ left, bakedb left, pmichaud left, smash left, Yappo_________ left, Chillance_ left, mattp___ left, BooK left, anocelot left, jercos left, camelia left, avarab left, [particle] left, mj41_ left, cxreg left, baest left, ehouse_ left, Maddingu1 left, betterwo1ld left, masak_ left, PZt left, wtw left, felipe left, tomaw left, mtk left, s1n1 left, jerome__ left, nwc10 left, szbalint left, bonsaikitten left, prammer_ left, mangala left, hugme left, sjohnson left, __sri left, jfried left, sdgvf_ left, takesako___ left, frdmn left, Gothmog_ left, MrMeek left, GlitchMr left, sjn left, preflex left, mikemol_ left, labster left, atrodo left, rjbs left, ggoebel left, espent left, `patch` left, flussence left, revdiablo left, SHODAN left, swarley left, ponbiki left, tadzik left, DarthGandalf left, mst left, sorear left, Exodist left, sunnavy left, sivoais left, lue left, ingyfoo left, apejens left, colomon left, thou left, raiph left, kst left, risou_ left, zamolxes left, Woodi left, Pleiades` left, xilo left, Juerd left, LoRe_ left, cotto left, felher left, p5eval_ left, telex left, crazedpsyc left, charsbar_______1 left, lee_ left, timotimo left, robinsmidsrod left, shachaf left, Grrrr left, Rix left, pecastro left, moritz left, jtpalmer_ left, Bucciarati left, Nom- left, LordVorp left, yoleaux left, dpk left, ironcamel left, yves_ left, larks left, xinming left, mls_ left, salv0 left, cooper left, skids left, huf left, sciurius1 left, odoacre_ left, rafl left, _ilbot left, diakopter left, pjcj left, jnthn left, sitaktif1 left, broquaint left, perigrin left, jferrero left, snuffles left, yeltzooo left, Tene left, Patterner left, dagurval left, itz left, yx left, Hor|zon left 00:22 Moukeddar_ left 01:02 jqui joined, Ayiko joined, leprevost__ joined, bbkr_ joined, jaldhar_ joined, cognominal__ joined, genehack_ joined, silug____ joined, clkao joined, eternaleye joined, sftp joined, bloonix joined, BooK joined, Patterner joined, Pleiades` joined, xilo joined, cosimo joined, dagurval joined, anocelot joined, patspam joined, itz joined, Ulti joined, Juerd joined, nyuszika7h joined, leprevost_ joined, yx joined, groky joined, autumn joined, LoRe_ joined, Hor|zon joined, BinGOs joined, Kelder joined, jercos joined, bbkr joined, rhr joined, Util joined, hoelzro joined, markov joined, camelia joined, cotto joined, tokuhirom_ joined, mikemol_ joined, Celelibi_ joined, avarab joined, [particle] joined, genehack joined, mj41_ joined, calvino.freenode.net sets mode: +v camelia, felher joined, clkao_ joined, p5eval_ joined, jlaire_ joined, berekuk joined, awwaiid joined, cxreg joined, daniel-s_ joined, telex joined, scottp joined, breinbaas joined, krunen joined, djanatyn joined, crazedpsyc joined, stevan__ joined, _jaldhar joined, charsbar_______1 joined, integral joined, ivan`` joined, gfldex joined, baest joined, araujo joined, labster joined, Khisanth joined, tadzik joined, drbean joined, DarthGandalf joined, mst joined, sorear joined, silug___ joined, lee_ joined, timotimo joined, nebuchadnezzar joined, cognominal joined, lizmat_ joined, lestrrat joined, geekosaur joined, rom1504 joined, Exodist joined, ruoso joined, bruges_ joined, fgomez_ joined, FROGGS joined, Gothmog_ joined, frdmn joined, takesako___ joined, sergot joined, kshannon_ joined, sivoais joined, sunnavy joined, lue joined, ingyfoo joined, ehouse_ joined, apejens joined, colomon joined, thou joined, MrMeek joined, preflex joined, sjn joined, GlitchMr joined, ponbiki joined, swarley joined, SHODAN joined, revdiablo joined, flussence joined, `patch` joined, espent joined, ggoebel joined, rjbs joined, atrodo joined, sdgvf_ joined, jfried joined, __sri joined, sjohnson joined, hugme joined, prammer_ joined, mangala joined, bonsaikitten joined, szbalint joined, nwc10 joined, jerome__ joined, s1n1 joined, mtk joined, dalek joined, japhb joined, hypolin joined, vaelxon joined, xenoterracide_ joined, TimToady joined, Maddingu1 joined, [Coke]_ joined, pnu_ joined, bakedb joined, PerlJam joined, calvino.freenode.net sets mode: +v hugme, gabriel_ joined, arnsholt joined, raiph joined, betterwo1ld joined, mathw_ joined, kst joined, dbr joined, masak_ joined, pmichaud joined, smash joined, Yappo_________ joined, Chillance_ joined, risou_ joined, mattp___ joined, simcop2387 joined, zamolxes joined, grondilu joined, Kharec joined, PZt joined, larks joined, robinsmidsrod joined, xinming joined, mls_ joined, salv0 joined, cooper joined, shachaf joined, Woodi joined, skids joined, Grrrr joined, huf joined, sciurius1 joined, Rix joined, odoacre_ joined, pecastro joined, rafl joined, tomaw joined, yves_ joined, felipe joined, wtw joined, ironcamel joined, dpk joined, yoleaux joined, LordVorp joined, Bucciarati joined, Nom- joined, jtpalmer_ joined, moritz joined, _ilbot joined, diakopter joined, pjcj joined, jnthn joined, sitaktif1 joined, broquaint joined, perigrin joined, jferrero joined, snuffles joined, yeltzooo joined, Tene joined, Ulti_ joined, gfldex_ joined, berekuk left, integral_ joined, integral_ left, integral_ joined 01:04 clkao_ left, genehack left, silug___ left, lestrrat left, tokuhirom_ left, leprevost_ left, Celelibi_ left, Kelder left, _jaldhar left, cognominal left, Ulti left, BinGOs left, bbkr left, integral left, gfldex left, geekosaur left, autumn left, BinGOs joined, BinGOs left, BinGOs joined, autumn joined, geekosaur joined
diakopter nwc10: when was Java/Perl Lingo removed from perl? I want to find the most recent release with it 01:04
colomon so many netsplits I've lost all but the last two hours of backlog. :( 01:05
diakopter nm found it
01:06 Celelibi joined, jqui left, lestrrat joined 01:07 tokuhirom joined 01:09 Targen joined 01:10 FROGGS_ joined
labster flussence: I had given some thought to support path names like ~/.perl6 or ~labster/foo. Not sure what the interface should be, exactly, but I would like to see a working File::Homedir. 01:12
01:12 ifim joined
labster In the absence of functions like getpwnam being available, I guess we could just parse /etc/passwd. 01:13
01:14 FROGGS left
labster But I probably will at least look into adding it to IO::Path. 01:14
diakopter labster: has anyone given you the thumbs-up to use NativeCall? 01:19
in IO::Path, I mean 01:20
01:22 skids left 01:24 rking1 joined 01:28 japhb left, japhb joined 01:31 ingyfoo is now known as ingy 01:39 btyler joined
labster Nope. The bigger problem is me not knowing how to use NativeCall, or really C at all. 01:40
01:55 leprevost__ left
lue You could maybe use the $HOME variable, at least on linux (esp. if someone decides to make ~ equal /dev/secretlair/ or somesuch) 02:20
sorear getpwnam is not the same as HOME 02:23
getpwnam gives you the initial value of $HOME (and several other fields) for *any* user
$HOME does not help you to expand ~bob/foo 02:24
and you can't just parse /etc/passwd in general. NIS...
TimToady sure, just go to $HOME/../$otherguy :D 02:26
lue Huh. I don't actually *have* getpwnam, it seems
sorear doesn't help if you have /home/l/larry or something like that
TimToady was a joke 02:27
lue like I said, $HOME env-var would be a better bet (unless that's not reliably available either)
flussence I wrote some code for a few p5 Buf formats, if anyone else wants them (I did): gist.github.com/flussence/5562165
colomon sorear: is there anything more involved in prepping the boot/run/Niecza.exe file other than just copying a working run/Niecza.exe there? 02:29
02:29 DreamingInCode joined
sorear colomon: yes, it's much more complicated than that 02:29
colomon: read the makefile rule "reboot" for the details. :)
oh right I changed this a bit 02:30
run make mknext
I usually do make mknext; cd next; make mknext; cd next; make spectest because I'm paranoid like that 02:31
colomon paranoid is good in this case, I think.
sorear after then make mkpackage, cd package, zip -9r ../niecza.zip *, upload to github, and change FETCH_URL
hi DreamingInCode. 02:32
colomon sorear++ 02:33
dalek c: ce25ff4 | (Ben Tyler)++ | lib/ (30 files):
Typo/spelling fixes, a few small wording changes.
02:36
sorear btyler++ 02:37
btyler glad to help :) 02:39
02:47 census joined, adu joined 02:51 adu left 02:56 gfldex_ is now known as gfldex
DreamingInCode Hi sorear ^_^ 02:56
03:00 colomon left 03:08 drbean_ joined 03:09 drbean left 03:10 lustlife joined 03:11 colomon joined 03:14 frd|afk joined 03:19 Gothmog__ joined 03:20 takesako____ joined 03:23 takesako___ left, frdmn left, Gothmog_ left, Gothmog__ is now known as Gothmog_ 03:27 census left 03:35 dalek left, dalek joined, hugme left 03:38 hugme joined 03:39 preflex_ joined 03:41 btyler left, drbean_ is now known as drbean, preflex left 03:54 woosley joined 04:12 gdey joined 04:13 gdey left 04:25 Psyche^ joined 04:27 woosley left 04:29 Patterner left, Psyche^ is now known as Patterner
shachaf sorear: If you're doing INTERCAL things maybe you should be in #esoteric! 04:37
Oh, you've been there before. Never mind. 04:44
04:48 amodell joined 04:50 amodell left
moritz good morning 05:06
05:09 trexy joined 05:12 trexy left
sorear good mornign moritz 05:12
moritz \o sorear 05:13
05:22 Chillance_ left 05:44 jaldhar_ left 05:45 jaldhar_ joined 05:46 kaare_ joined
grondilu rn: say { foo => 'bar' }.classify: *.value 05:48
camelia niecza v24-49-gfa3b5ca: OUTPUT«Unhandled exception: Unable to resolve method classify in type Hash␤ at /tmp/C7AmREazZz line 1 (mainline @ 9) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4327 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4328 (module-CORE @ 582) ␤ at /h…
..rakudo 06eddc: OUTPUT«("bar" => ["foo" => "bar"]).hash␤»
06:18 DreamingInCode left 06:36 stevan__ left 06:58 dmol joined 07:01 jaldhar_ left 07:02 jaldhar_ joined 07:05 domidumont joined 07:06 domidumont left 07:07 domidumont joined, domidumont left 07:08 domidumont joined 07:11 domidumont left 07:12 domidumont joined 07:26 cotto left, cotto joined 07:32 jaldhar_ left 07:34 FROGGS_ is now known as FROGGS
FROGGS flussence++ # unpack 07:36
flussence: do you have a pack sub too? 07:40
dalek kudo/nom: 738531a | (Brent Laabs)++ | src/core/IO/Spec/Unix.pm:
fix jnthn++'s report of infinite recursion in IO::Spec::Unix.rel2abs
07:46
kudo/nom: 2a04f23 | (Brent Laabs)++ | src/core/IO/Spec/Unix.pm:
Merge pull request #137 from labster/nom

fix jnthn++'s report of infinite recursion in IO::Spec::Unix.rel2abs
labster well, I hope it fixes it anyway, since it's only a bug on Windows, and I'm not running it. 07:48
ah, well, morning #perl6 o/ 07:50
sorear o/
FROGGS hi labster, sorear 07:58
labster: have you seen this? github.com/perlpilot/p6-File-Temp/...les#diff-0
labster nope, haven't seen it. 07:59
If they're on rakudo, they should just use $*TMPDIR 08:00
Yeah, I think I'll add that to the spec.
08:01 nebuchadnezzar left
labster actually, sorear, how hard would it be for me to add the filespec code to niecza? It's all Perl 6 code, with only one tiny parrot call (to get the $*OS). 08:01
08:02 SamuraiJack joined
sorear labster: you might want to look at the stuff that's already there, in particular IO.combine 08:11
n: say IO.combine("foo","bar")
camelia niecza v24-49-gfa3b5ca: OUTPUT«"foo/bar".IO␤»
labster Oh, neat!
sorear does p6 have official filespecs now?
niecza's filespec stuff was added for the compiler's own path-searching benefit, it's surely prespec 08:12
labster Well, it's not entirely official, since I wrote most of it, but I think it's somewhat fairly sane. 08:13
sorear also the niecza stuff is a wrapper over the .NET filespec code
labster The main approach for me was just to import File::Spec because something needed to the do the underlying operations for IO::Path, and it so it got added as IO::Spec. 08:14
Sounds like you're using the .NET stuff. Which might be good and fairly fast. I'd still like to expose the underlying operations, because someone will want them. 08:15
The other inspiration was Path::Class, so I tried to replicate as much of that as possible. Anyway, the basic idea is in S32::IO, if you want to take a look, sorear. It might be useful to have the perspective from another VM. 08:18
08:48 ifim left 09:32 integral_ is now known as integral 09:46 spider-mario joined 10:07 lizmat_ is now known as lizmat
lizmat hello #perl6! 10:07
FROGGS hi lizmat 10:08
10:08 rindolf joined
FROGGS lizmat: btw, if you want to make the adverbs for statement_control:use work, have a look at that: github.com/rakudo-p5/v5/blob/maste...kudo.patch 10:09
most of these changes are for the adverbs in general 10:10
but only :file and :from are handled
:name should be pretty easy though
lizmat hmmm… do you have plans to merge this into nom any time soon? 10:11
jnthn Good afty o/ 10:23
lizmat jnthn!
10:23 dmol left 10:24 dmol1 joined
dagurval r: sub a { return "a", "b"; }; my $c = a(); $c.perl.say; 10:27
camelia rakudo 2a04f2: OUTPUT«$("a", "b")␤»
dagurval I want $c to contain only "a", is this possible?
lizmat r: sub a { return "a", "b"; }; my $c = a.key; $c.perl.say;
camelia rakudo 2a04f2: OUTPUT«No such method 'key' for invocant of type 'Parcel'␤ in block at /tmp/KlAmV0aQoY:1␤␤»
lizmat r: sub a { return "a", "b"; }; my $c = a[0]; $c.perl.say; 10:28
camelia rakudo 2a04f2: OUTPUT«"a"␤»
lizmat r: sub a { return "a", "b"; }; say a.WHAT;
camelia rakudo 2a04f2: OUTPUT«(Parcel)␤»
lizmat dagurval: is that an answer?
dagurval lizmat: not really, I was looking for something more like p5 wantarray 10:29
r: sub a { return "a", "b"; }; my ($c) = a(); $c.perl.say;
camelia rakudo 2a04f2: OUTPUT«"a"␤»
lizmat S08:212 states: "Context deferral is actually the reason why Perl 6 no longer supports the "wantarray" operator, nor does it provide any substitute. The way 10:31
you should implement wantarray-like behavior is by properly overriding the coercion for each context. The Contextual::Return module is an implementation of that concept in Perl 5."
hence, no wantarray in Perl 6
FROGGS: it appears dissect_longname is indeed extracting pairs from "Foo:name<Bar>:auth<cpan:JRANDOM>:ver<1.0>", but not from the shorthand notatation "Foo:<Bar cpan:JRANDOM 1.0>" 10:36
dalek kudo/jvm-support: 37c7620 | (Tobias Leich)++ | src/core/Cursor.pm:
dont't treat array references as arrays in regexes

They will be stringified instead, and must be dereferenced to be arrayish.
10:36 dalek left
jnthn Merge heuristic fail... :) 10:36
10:37 dalek joined, ChanServ sets mode: +v dalek
tadzik :) 10:37
dalek p/rak-jvm-support: 48e5dfa | (Brent Laabs)++ | src/vm/parrot/QAST/Operations.nqp:
add missing constants STAT_UID, STAT_GID, STAT_ISLNK
10:40
p/rak-jvm-support: cb2aa86 | jonathan++ | src/vm/parrot/QAST/Operations.nqp:
Merge pull request #98 from labster/master

add missing constants STAT_UID, STAT_GID, STAT_ISLNK
p/rak-jvm-support: ba3cdf2 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
Merge branch 'master' into rak-jvm-support
jnthn There's both of my branches caught up :)
10:41 preflex_ left 10:42 preflex joined
lizmat I guess the shorthand notation can be NYI while the rest gets implemented :-) 10:47
11:00 nebuchadnezzar joined
lizmat r: class Foo:auth<JRANDOM> {}; class Foo {} 11:03
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Redeclaration of symbol Foo␤at /tmp/dMz7pitoX4:1␤------> class Foo:auth<JRANDOM> {}; class Foo ⏏{}␤ expecting any of:␤ statement list␤ horizontal whitespace␤ postfix␤ statement end␤ …
lizmat I'm assuming that this should *not* cause a redeclaration error, or should it?
because "class Foo {}" is equivalent to "class Foo:auth<(Any)>", right? 11:05
jnthn I think it may be a re-decl error in so far as declaring Foo:auth<JRANDOM> installs an alias Foo so you can talk about it conveniently. 11:06
lizmat but if these classes would be in 2 different files, loaded with "use", they wouldn't clash? 11:07
or would you really have to say "use Bar:name<Foo>" ?
jnthn Good question :) 11:08
jnthn didn't read The Specs recently enough on this stuff. 11:09
Provided they actually have an answer...
lizmat I'm not sure the specs are clear enough on that… will check again
11:18 kaare_ left
lizmat I guess S11:355 contains the spec 11:22
"Modules posted to CPAN or entered into any standard Perl 6 library are required to declare their full name so that installations can know where to keep them, such that multiple versions by different authors can coexist, all of them available to any installed version of Perl." 11:23
I guess this is not true for current modules in core or in panda 11:24
FROGGS lizmat: about the shorthand version: you are right, one would have to parse that properly, but I think this can wait until the normal pair-syntax works 11:25
the major problem with :auth and :name is how to actually do the ax-/importing 11:26
ex*
lizmat indeed 11:27
:-)
FROGGS if you have an A.pm, which contains class A::B too, then use A:name('A::B') might work well (and would actually make sense)
11:28 SamuraiJack_ joined, SamuraiJack left
lizmat well that would be a redeclaration error, I would think 11:28
FROGGS jnthn: (v5) btw, subroutine runtime check seems to work, as well as giving subs an implicit 'is export' trait when a script gets require-d 11:29
now I just have to do the import :/
lizmat: why?
lizmat because I assume A.pm also contains a "class A {}" 11:30
FROGGS use A just locales the file, and will then try to import the symbol A
lizmat right
FROGGS but if you give it another name, it will locale file A.pm and will import the symbols by the given name (A::B)
lizmat and then when you're trying to do the same with class A::B inside A.pm, to be aliased to A, it will class with the A already imported 11:31
FROGGS why aliased to A? 11:32
r: need Test;
camelia rakudo 2a04f2: ( no output )
lizmat that's what "use Foo:name<Bar>" does, alias class Bar to Foo in the current lexical context
FROGGS r: need Test; import Test
camelia rakudo 2a04f2: ( no output )
FROGGS r: need Test; import Test::Something
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Could not find module Test::Something to import symbols from␤at /tmp/rYYbyr1HFO:1␤------> need Test; import Test::Something⏏<EOL>␤ expecting any of:␤ statement list␤»
FROGGS hmmm, okay 11:33
looks like I missed that part :o)
11:33 thou left
FROGGS then I think it is the other way around, it will do 'need Bar' instead of Foo, right? 11:34
but still making the alias...
lizmat checks up on "need"
FROGGS loading without importing 11:35
lizmat indeed: oddly enough no mention of :auth etc. there
I assume that would be needed there as well
r: need Test:auth<cpan:Perl> 11:37
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Could not find Test:auth<cpan:Perl> in any of: /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/…
FROGGS maybe we should parts of my patch within the next days if you wanna go ahead 11:38
lizmat *merge I assume? 11:39
perhaps….
FROGGS apply*
lizmat I want to prevent merge conflicts later, I hate merge conflicts
FROGGS I'll prepare a patch today and ask jnthn for his ok then 11:40
nwc10 jnthn++ # parsing 100% of the setting (even if there is some cheating currently) 11:42
lizmat did I miss the 100% announcement? 11:43
jnthn It's not quite 100% parse yet 11:44
The IO bits are missing
I'm gonna #?if parrot ... a bunch of that though
So we get the subs/type declarations so the parser doesn't explode at the end over unexplained mysteries.
nwc10 I saw a number that looked suspiciously like 13000 lines. 11:48
jnthn Well, the real total is a bit over 13,000. But yeah, we parse 12500 or so by now. 11:55
nwc10 blog.headius.com/2013/05/on-languag...d-way.html -- curious that he says "Python has similar structural complexities to Ruby and adds in the additional complexity of an introspectable call stack." ... "PyPy does an admirable job of attacking this problem by rewriting currently-running code and lifting on-stack state to the heap when it is accessed, but this approach prevents dropping unused local state (since you can't predict 11:56
I had thought that Ruby was the most crazy of the lot, but he seems to think that at the limit Python is harder than Ruby.
(he's Charles Nutter, the JRuby guy. So I assume that he has some idea what he's talking about) 11:57
jnthn Yeah, it's an interesting post. 12:01
We are both lucky and unlucky in Perl 6 terms. We may often have the chance to statically know something about the representation an object has (good). However, if it's a P6opaque, it can be mixed in to. 12:02
nwc10 one is also lucky that Larry has at least been designing the language with "how does this compile" in mind 12:07
jnthn Yes, true too :)
masak_ ahoj, #perl6
12:08 masak_ is now known as masak
nwc10 even if he is often "having a laugh" by answering that question with "with difficulty" 12:08
and still putting it in the spec, to see whether anyone can do it :-)
FROGGS hi masak
moritz \o * 12:09
FROGGS hi moritz
I like the "actual lesson", I dont know why everybody thinks you get all these nice features perl 6 has for free... 12:10
masak backlogs
lizmat afk for a few hours 12:19
12:24 stevan_ joined, stevan_ left, stevan_ joined
masak oh btw, people who want to join the next #masakism workshop/party, please sign up early here: github.com/perl6/mu/wiki/perl6-wor...-june-2013 12:28
FROGGS done
masak (datetimes are still provisional, but they get more and more set in stone the more time passes without people complaining about them.) :)
FROGGS :P
masak FR:P
er, FROGGS* 12:29
FROGGS :o)
masak wow, it actually made an actual tab character there.
impressive.
FROGGS hmm, not visible here
masak is on a train, and can apparently type faster than the software can react
FROGGS wow, you should talk about that with einstein if you get the chance 12:30
moritz just write the software in Perl 6, then it's easy to type faster :-)
FROGGS *g*
dalek kudo/jvm-support: 2b041d6 | jnthn++ | src/vm/parrot/guts/container.c:
Remove dead code.
12:34
kudo/jvm-support: 1ff3ec2 | jnthn++ | src/core/ (4 files):
Eliminate on Q:PIR, mark out rest for Parrot only.

For the Range one, it's an optimization, so can fall back on slow path until we implement the fast path again on JVM. The rest just throw an NYI for now.
kudo/jvm-support: c2f2ebb | jnthn++ | src/ (16 files):
Dozens of pir:: -> nqp:: in CORE.

Also, mark a few other pir:: out in #?if parrot sections and die NYI for JVM.
12:38 jaldhar_ joined 12:40 d4l3k_ joined, dalek left, d4l3k_ is now known as dalek
jnthn afk for a bit 12:40
12:44 LylePerl joined
FROGGS r: sub plan(*@t) { }; plan( tests => 7 ) 12:45
camelia rakudo 2a04f2: OUTPUT«Unexpected named parameter 'tests' passed␤ in sub plan at /tmp/0CEa0gFx8_:1␤ in block at /tmp/0CEa0gFx8_:1␤␤»
FROGGS r: sub plan(*%t) { }; plan( tests => 7 ) 12:46
camelia rakudo 2a04f2: ( no output )
FROGGS r: sub plan(*%t) { }; plan( tests, 7 )
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Undeclared routine:␤ tests used at line 1␤␤»
FROGGS r: sub plan(*%t) { }; plan( 'tests', 7 )
camelia rakudo 2a04f2: OUTPUT«Too many positional parameters passed; got 2 but expected 0␤ in sub plan at /tmp/U8AyHq427K:1␤ in block at /tmp/U8AyHq427K:1␤␤»
12:51 nyuszika7h left 12:54 nyuszika7h joined 12:57 silug____ left 13:00 silug____ joined 13:03 Moukeddar joined 13:09 fhelmberger joined 13:12 nyuszika7h left 13:14 nyuszika7h joined 13:16 fhelmberger left 13:20 kaare_ joined
masak kboga++ # pack, unpack 13:46
I wish to get back to that code at some point.
in my copious spare time. 13:47
there's a gist somewhere with a run-thought of all the flags in Perl 5, and how they would (or wouldn't) translate.
FROGGS masak: where is that code?
masak it used to be just in ng. kboga ported it to nom. 13:48
see 7d33ee1c50d9552b0802ebca5f06cc83fc660c8b
FROGGS cool! thanks 13:49
13:49 guru joined
FROGGS (pack/unpack has about 16k tests in the perl5 spectest suite) 13:49
13:49 guru is now known as Guest26375
masak yes, I know. 13:49
13:50 Guest26375 is now known as ajr_
masak I once started trying to port that code, too. didn't get very far... 13:50
FROGGS masak: how is the sprintf going? :P 13:52
.fmt I mean 13:53
13:53 jaldhar_ left
masak no, it's actually sprintf. it's in a public repo: github.com/masak/sprintf 13:54
I can make you a deal: if you write tests, I'll implement them ;)
FROGGS well, I have tests basically... it is just the wrong language
masak sounds like that could simplify things. 13:55
but srsly. pull-request a bunch of tests, and I'll see about providing an implementation.
FROGGS cool, will do (some day)
masak \o/
FROGGS dunno when I come to sprintf
masak gets off the train & 13:56
13:56 Chillance joined
FROGGS o/ 13:56
nwc10 IIRC sprintf should be more easily initially, as a whole chunk of tests are table driven
dalek : 1d133e9 | (Tobias Leich)++ | lib/Perl5/ (2 files):
handle fatarrow just like comma
14:05
: 3d76de2 | (Tobias Leich)++ | t/test.pl:
provide plan( tests => 1 ) sub for testsuite
14:06
14:08 Moukeddar left, leprevost joined
dalek p/rak-jvm-support: e295778 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
Add nqp::const::CONTROL_*.
14:09
14:13 xinming left
dalek : 1eb2172 | (Tobias Leich)++ | t/test.pl:
remove debug out
14:13
14:15 xinming joined
flussence good morni...^Wwhatever 14:15
FROGGS: I guess I could look at pack for those, hadn't thought about that at all. 14:16
nwc10 labster: does the JVM have getpwuid and getpwnam? If not, put in a feature request to Oracle at the same time as you put on in to Parrot :-) 14:22
ie, I think that such features would be better implemented in NQP or Perl 6, using a native call to C 14:23
14:31 spider-mario left
grondilu rn: sub f($x where $x > $y, $y) { $x - $y }; say f 1, 0 14:49
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Variable '$y' is not declared␤at /tmp/WxDUy0f3gr:1␤------> sub f($x where $x > $y⏏, $y) { $x - $y }; say f 1, 0␤ expecting any of:␤ postfix␤»
..niecza v24-49-gfa3b5ca: OUTPUT«===SORRY!===␤␤Variable $y is not predeclared at /tmp/D8io380oBv line 1:␤------> sub f($x where $x > ⏏$y, $y) { $x - $y }; say f 1, 0␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting lin…
grondilu any chance in the future we could put parameter conditions in any order? 14:50
14:50 eternaleye left
jnthn Very unlikely to happen. 14:51
Breaks the usual "declare before usage" rule for variables.
14:52 jaldhar joined 14:53 eternaleye joined
dalek kudo/jvm-support: 1eea478 | jnthn++ | src/core/Exception.pm:
Remove a currently dead code-path.

We don't use the exception system for return.
14:55
kudo/jvm-support: 6f98f42 | jnthn++ | src/core/ (2 files):
Replace some pir::const with nqp::const.
kudo/jvm-support: b911004 | jnthn++ | src/core/Exception.pm:
Start updating some exception related code.
FROGGS flussence: I'd like to supply these within Perl5::Terms or maybe another submodule 15:00
it feels good to revert workarounds and run the original tests more and more unmodified 15:03
15:04 dmol1 left 15:05 dmol joined
dalek : a28f2d0 | (Tobias Leich)++ | / (2 files):
treating things before fatarrow as strings
15:07
15:08 census joined 15:10 cognominal__ left 15:15 skids joined 15:17 SamuraiJack__ joined
dalek p/rak-jvm-support: 68aa9b0 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
Map some math-related ops.
15:17
p/rak-jvm-support: 299d223 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
nqp::[get|set]extype ops.

Already have nqp::getextype on the JVM.
kudo/jvm-support: 16d96a7 | jnthn++ | src/ (4 files):
Some more pir:: -> nqp::.
15:18
kudo/jvm-support: 8b8aa51 | jnthn++ | src/core/ (2 files):
Update a bit more of the exception code.
15:18 hoelzro_ joined 15:19 nebuchad` joined, xinming_ joined, rhr_ joined, markov1 joined, bbkr__ joined 15:20 Util_ joined 15:24 sftp_ joined, genehack joined, xinming left, SamuraiJack_ left, nebuchadnezzar left, japhb left, rking1 left, bbkr_ left, genehack_ left, markov left, hoelzro left, Util left, rhr left 15:26 jnthn_ joined, broquain1 joined, Tene_ joined, Tene_ left, Tene_ joined, jferrero_ joined, diakopte1 joined, huf_ joined, mls joined, pjcj_ joined, sciurius joined 15:27 japhb joined 15:29 odoacre_ left, snuffles left, jferrero left, sciurius1 left, mls_ left, jnthn left, diakopter left, pjcj left, clkao left, perigrin left, huf left, odoacre_ joined, Tene left, broquaint left, hoelzro_ left 15:30 sftp left 15:31 pjcj_ is now known as pjcj, snuffles joined, _ilbot left, larks left 15:32 clkao joined, _ilbot joined, hoelzro joined 15:35 larks joined 15:37 jnthn_ is now known as jnthn 15:43 adu joined 15:47 adu left
grondilu rn: my @a = ^4; say (state@ = @a) xx 2; say @a 15:47
camelia rakudo 2a04f2: OUTPUT«␤0 1 2 3␤»
..niecza v24-49-gfa3b5ca: OUTPUT«0 1 2 3 0 1 2 3␤0 1 2 3␤»
15:47 adu joined
grondilu rn: my @a = ^4; say (state@ = @a).pop xx 2; say @a 15:47
camelia rakudo 2a04f2: OUTPUT«Element popped from empty list␤ in method Str at src/gen/CORE.setting:10021␤ in method Str at src/gen/CORE.setting:876␤ in method Stringy at src/gen/CORE.setting:885␤ in method join at src/gen/CORE.setting:1375␤ in method Str at src/gen/CORE.setting:5969␤ in …
..niecza v24-49-gfa3b5ca: OUTPUT«3 2␤0 1 2 3␤»
masak a lot of things look wrong there. 15:48
adu hi all 15:49
masak hi adu
grondilu niecza is right, though
isn't it?
15:49 ajr_ left
jnthn The left hand side of xx is thunked iirc 15:50
adu can I use "also" for everything?
15:50 guru joined, guru is now known as Guest37891
adu like class A { also is B; also is C; }? 15:51
jnthn But that still doesn't explain it
15:51 Guest37891 is now known as ajr_
jnthn Given it should only run twice... 15:51
grondilu rn: my @a = ^4; say (state@ = @a).pop() xx 2; say @a
masak adu: yes, I think so.
camelia rakudo 2a04f2: OUTPUT«Element popped from empty list␤ in method Str at src/gen/CORE.setting:10021␤ in method Str at src/gen/CORE.setting:876␤ in method Stringy at src/gen/CORE.setting:885␤ in method join at src/gen/CORE.setting:1375␤ in method Str at src/gen/CORE.setting:5969␤ in …
..niecza v24-49-gfa3b5ca: OUTPUT«3 2␤0 1 2 3␤»
jnthn adu: Yeah, it parses any trait_mod after it, iirc 15:52
also does SomeRole; # should also be fine
git diff
oops
adu jnthn: oh, how goes nap?
nqp
jnthn adu: Well, fine, though I'm mostly focused on Rakudo at the moment... :)
adu I guess that's a good sign
grondilu n: my @a = ^3; say (state@ = @a).pop() xx 2; say @a 15:53
camelia niecza v24-49-gfa3b5ca: OUTPUT«2 1␤0 1 2␤»
adu I feel like helping 15:54
jnthn adu: Well, the IO stuff seems to be one place things are weak
grondilu submits rakudobug
adu is that done with nqp opcodes? or a class? 15:56
dalek p/rak-jvm-support: 73e7810 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
Fix a code-gen thinko in setpayload.
15:57
adu jnthn: are you talking about jvm-specific IO stuff? or IO stuff in general?
jnthn adu: Well, at present we do various method calls on some Parrot IO object.
adu: In many places in Rakudo, anyway.
adu: In NQP those things typically got replaced with op-y things. 15:58
adu: So part of it is updating Rakudo to use those that exist. And another is identifying missing things and maybe adding nqp:: ops for them and doing the JVM implementation. 15:59
adu and so we need to replace pir::whut with nqp::whut if it exists
and implementing in java those things that don't exist 16:00
jnthn adu: Yeah, but sometimes it's not so simple 16:01
Like, nqp::getstderr().print(...) works fine on Parrot but should be nqp::printfh(nqp::getstderr(), ...) to work portably
So it's a bit more involved than a simple pir:: -> nqp::. 16:02
adu got it, I'll take a look
dalek p/rak-jvm-support: a937cc6 | jnthn++ | src/vm/parrot/QAST/Operations.nqp:
Add an nqp::replace op.

Guess we can implement it better than just some substr/concat ops on most platforms, so it's worth an op.
16:40
16:40 cognominal joined
dalek kudo/jvm-support: 4c3cf33 | jnthn++ | src/core/ (2 files):
More exception stuff; elimiante Q:PIR in THROW.
16:41
kudo/jvm-support: 4aa838a | jnthn++ | src/ (4 files):
Make junction auto-threader setup portable.
kudo/jvm-support: 90b955b | jnthn++ | src/core/ (2 files):
Eliminate pir::replace usages.
kudo/jvm-support: 79531c9 | jnthn++ | src/Perl6/World.nqp:
Eliminate another QAST::VM usage.
lizmat r: use Pod::To::Text 16:45
camelia rakudo 2a04f2: ( no output )
lizmat r: need Test:name<Pod::To::Text> 16:47
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Could not find Test:name<Pod::To::Text> in any of: /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/5.2.0-devel/languages/pe…
lizmat is looking at S11:243, specifically wrt "import Factorial 'fact'" 16:49
I'm wondering whether the module specified there is the shortname alias (the Foo in "need Foo:name<Some::Very::Long::Module>") 16:50
or indeed the "Some::Very::Long::Module" name.
FROGGS I guess the alias
lizmat if the latter, we will need :name:auth:ver: semantics for import as well
I would also guess the alias 16:51
but the spec is not too clear about it
FROGGS well, it is bad and good at the same time 16:52
good because you just need to implement/propose sane things and this will become spec
bad because we might introduce crap 16:53
lizmat hehe... 16:54
I'm not afraid I might introduce crap
I'm certain I will
:-)
FROGGS *g* 16:56
lizmat during my bike ride I also realized that most likely, that the key with which a module's namespace need to be anchored, will also need to include "from" 16:57
so the key would consist of (from,name,auth,ver) 16:58
so, saying: "class Foo {}"
should create a namespace for the module keyed to "perl6,Foo,(Any),(Any)" 16:59
I guess inslead of "perl6", one should say "current slang"
$*LANG I believe?
17:02 ajr_ left
jnthn It's %?LANG (or %*LANG inside the compiler), and it's a braid rather than a single value. 17:02
That's a lexical concern, however. 17:03
17:03 gdey joined
jnthn Rather than an import/export one. 17:03
At least, that's my first gut feeling on it.
lizmat r: say %?LANG 17:07
camelia rakudo 2a04f2: OUTPUT«===SORRY!===␤Variable '%?LANG' is not declared␤at /tmp/oFgyR0tgtJ:1␤------> say %?LANG⏏<EOL>␤ expecting any of:␤ postfix␤»
jnthn Not sure it's exposed to user-land yet. 17:09
lizmat I guess not :-)
but do you agree that "from" needs to be part of the key of the namespace of the module? 17:10
17:10 pecastro_ joined
jnthn Well, what does "namespace" really mean? 17:11
Any kind of package (be it a class, module, whatever) is just an object, and it can be installed somewhere.
FROGGS it is an identifier which lets you distinguish between two modules... like: use Test:from<perl5>; use Test:from<perl6> 17:12
jnthn We could install it under a long name for sure.
It's not an inherent property of the thing itself, though. It's just a matter of where it gets put.
lizmat well, we need to be able to look it up later
to be able to spot collissions
jnthn You'll get the collision at symbol installation time, no? 17:13
lizmat FROGGS example above should give a redeclaration error
jnthn "We can't install this, there's already something wiht that name"
lizmat as they would both alias into Test
jnthn Yes, makes sense.
17:13 pecastro left
FROGGS lizmat: yeah, one needs to be installed under a different name 17:14
17:14 mangala left
lizmat assume we have a Foo.pm and a Foo2.pm 17:14
Foo2.pm however contains "class Foo;" 17:15
17:15 mangala joined
lizmat saying "use Foo" and "use Foo2" in the same process should give a redeclaration error 17:16
jnthn It'll probably be reported as GLOBAL merging having failed, but yes, that already should be an error today.
lizmat which comes to another thing: according to spec, "auth", "ver" and "from" are inherited 17:17
jnthn "inherited"?
lizmat class Foo:auth<Me> { class Bar { } } # Bar is also :auth<Me> 17:18
jnthn Oh...for for things lexically nested...
OK, I can buy that. :)
I was worried you mean inheritance in the OO since, in which case it woulda felt odd :) 17:19
*meant
*sense
meh, typing
lizmat I wonder whether we shouldn't have something that externally specifies what the default "from", "auth" and "ver" are when doing a load_module()
I mean, if someone has a module on CPAN, do we really want to force them to say "class Foo:auth<cpan:ME>" for all classes? 17:20
or do we want that information to be used as a default from the META.info ?
17:20 rking1 joined, mangala left 17:21 mangala joined
lizmat is trying to find the gist with labster?s proposal for file storage of modules 17:22
anyway, assuming I have a module Foo 1.0 on CPAN
FROGGS I believe it was tadziks proposal 17:23
lizmat that would e.g. be installed under */perl6/Foo/ELIZABETH/1.0/*
jnthn We've tended to lean towards the source code being the authoritative source of everything.
17:23 thou joined
jnthn With any pre-compilation in the end really being seen as a kind of cache. 17:24
lizmat hmmm...
FROGGS lizmat: I still believe that filesystem storage is not enough, thinking of unicode module names and since the installer (panda) should care about dists, not modules itself 17:26
... even after dists are installed
lizmat so, in that case, */perl6/Foo/ELIZABETH/1.0/Foo.pm" should contain "class Foo:auth<cpan:ELIZABETH>:ver<1.0>"
FROGGS IMO the distribution has a version/auth/... 17:27
lizmat well, how it is installed in the file system, doesn't really matter, as long as we can find stuff
FROGGS true
lizmat the thing is that you would need to force developers to change potentially each "class" statement with each update of a distribution 17:28
17:28 rindolf left
FROGGS hmmm, depends 17:29
lizmat I can see people making errors with this quite easily
well, let me put it this way: I can see it work for :ver (as developers are already doing something like that, e.g. with specifying $VERSION) 17:30
FROGGS if you say 'use Foo:auth<github.com/FROGGS>' you want a specific distribution, so after looking up where the files of that dist are installed, you dont need to care about the auth of class definitions
so I'd say these fields are at least optional for the modules of a dist 17:31
but one can argue that if a submodule version is given, it should override the dists version 17:32
lizmat ah, but that's where I think you forget that there is no hard link between "use Foo" and "class Foo"
use Foo only gives you a way to find a file in the installed modules space on disk
but if that file only contains "class Bar", there is nothing that will prevent that 17:33
FROGGS no, 'use Foo' should search for all dists that provide Foo
lizmat aha, so installing a distribution will parse the code to find out which classes it provides?
and store that info in a database to be used by "use" ? 17:34
FROGGS either that or you have to put that in META.info when doing a release
lizmat so, in my above example: if I would say "use Bar", it would load "Foo.pm" ?
FROGGS right
lizmat because it knows that Foo.pm provides class Bar
FROGGS that 'right' was for: <lizmat> and store that info in a database to be used by "use" ? 17:35
lizmat yes, got that :-)
flussence would like a "provides" key in META.info, mainly because I keep typing `panda install URI::Escape` by mistake...
FROGGS but yeah, if the Foo dist provides class Bar somehow (via META.info), it would find it
lizmat from S11:600 : class Dog:<cpan:JRANDOM 1.2.1> 17:36
emulates Dog:auth(DCONWAY|JCONWAY|TCONWAY):ver<1.0+>
excludes Fox:<oreillymedia.com 3.14159>
emulates Wolf:from<C# 0.8..^1.0>;
FROGGS that is a bit extreeme 17:37
lizmat I assume all of that information would then need to live either in META.info, or in the modules database of an installation
FROGGS in both places I'd say
lizmat I know it is, but it wouldn't be strange for this to happen (says the original author of "forks.pm" which emulates "threads.pm") :-)
FROGGS *g* 17:38
dalek kudo/jvm-support: 18e87c7 | jnthn++ | src/core/ (10 files):
Try to mark out remaining Parrot-specific bits.
17:40
kudo/jvm-support: c72613f | jnthn++ | tools/build/Makefile-JVM.in:
Add remaining setting files to JVM build.
17:47 MayDaniel joined
masak flussence: that "provides" idea sounds worthwhile. 17:52
flussence: maybe open a panda issue?
17:52 Chillance_ joined
FROGGS should be "provides" : { "Foo::Bar" : "Foo/Bar.pm" } IMO 17:53
in case the module name is unicode and the filename is 8.3 or so 17:54
17:55 Chillance left 17:59 berekuk joined
flussence the whole idea doesn't feel very DRY, I was thinking something like «"provides": ["Foo::*"]» as a sort of indexing hint while all the authoratitive stuff stays in the module itself. 17:59
lizmat FROGGS: how the file gets installed, is an installation issue: I don't think the developer needs to know or care about that 18:02
the distribution provides a logical file name, the installer will make sure that the files will get installed somewhere on the local filesystem 18:03
and can be found later
so the META.info need not care whether the filename is 8.3 or not
18:03 nebuchad` is now known as nebuchadnezzar 18:04 diakopte1 is now known as diakopter
lizmat tadzik: is there any kind of hackathon / other activities planned after the PLPW ? 18:09
18:19 guru joined 18:20 guru is now known as Guest4935, lizmat left 18:22 lizmat joined 18:27 SamuraiJack__ left 18:30 rindolf joined
tadzik lizmat: I don't know. Is there interest :) 18:38
?
there was a plan to do hackathon time after the last talk
'til the evening
til night do us part
lizmat that sounds like a plan then
tadzik ok, I'll schedule it
lue hello world o/
lizmat I would want to pick your brains about quite a few things by then, I think
:-) 18:39
tadzik okay :)
lizmat we will travel back on Monday, so that we can prepare our travel to YAPC::NA
I assume this goes for jnthn and masak as well :-) 18:40
masak will travel back on Sunday. 18:41
teaching on the Monday :/
tadzik officially scheduled now
sergot hi ! o/
lizmat argh, and jnthn?
hi sergot!
tadzik jnthn leaves with masak iirc 18:42
masak aye.
lizmat so what time will you be leaving, masak?
masak Sunday afternoon.
think plane leaves at 18:00, but will have to leave for airport some hours before that... 18:43
18:43 Rix left, domidumont left
lizmat ok, then I would suggest moving tadzik's last presentation *before* the lunch break 18:44
18:44 domidumont joined
lizmat and have the lunch break ease into hackathon for those interested 18:45
tadzik masak: it's about 0.5 hours from the venue to the airport
lizmat: we can do that
lizmat keeping people's attention after a long lunch break is difficult as it is :-) 18:46
masak sounds good.
tadzik we'll do some more thinking on the Board Meeting this tue
lizmat cool! 18:47
18:48 broquain1 is now known as broquaint 18:52 Rix joined
masak .oO( attention all: thinking has been postponed until Tuesday ) :P 18:53
moritz good idea
and when I stop thinking, I can proceed straight to bed :-) 18:54
lizmat unthinks 18:57
masak unthinkable! 19:04
lizmat om
flussence nom? 19:05
lizmat om
masak .oO( sorry to disturb you; we were unsure whether that was meditating or masticating ) 19:06
lizmat om 19:07
masak ;)
lizmat en.wikipedia.org/wiki/Om for the uninitiated 19:08
I guess it's a bit like Mu 19:09
flussence
.oO( we're still unsure )
masak ooh, Tamil script is so adorable! 19:11
hoelzro looks
sorear good * #perl6 19:17
lizmat sorear!
masak sorear! \o/
sorear: I now (sorta kinda) understand functors, natural transformations, and universality. 19:18
sorear hey, how did you know I read 'category theory for scientists' last night
FROGGS lizmat: but since you can have more than one to-provide module within a file, it is n:1, so still: "provides" : { "Foo::Bar" : "Foo/Bar.pm" } 19:19
dalek kudo/jvm-support: 4e7e52b | jnthn++ | src/vm/jvm/ (2 files):
Implement nqp::p6argvmarray.
kudo/jvm-support: 276ace8 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java:
nqp::p6list, nqp::p6listiter.
masak sorear: all of it? I'm only just starting in on chapter 4, the juicy parts.
19:19 domidumont left
masak sorear: but I'm also reading Saunders Mac Lane (slowly). 19:20
sorear: I've never smoked pot, but my distinct impression is that category theory would go very well with it.
lizmat FROGGS: indeed, and that's another can of worms :-( 19:21
jnthn That's be great. "What led you to start smoking weed?" "Category theory, man..." 19:22
masak (note to irony-impaired: do not try this at home. category theory is strong stuff, and has been known to ruin people's lives.) 19:24
19:24 btyler joined 19:27 Chillance_ left
dagurval r: (1, (2, 3))[0][1].say 19:28
camelia rakudo 2a04f2: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in method gist at src/gen/CORE.setting:10022␤ in method gist at src/gen/CORE.setting:893␤ in sub say at src/gen/CORE.setting:10920␤ in method say at src/gen/CORE.setting:890␤ in method say at src/gen/CORE.setting:8…
dagurval is this incorrect?
oh, it is. should be [1][1] :). 19:29
jnthn No, that thing flattens.
dagurval r: (1, (2, 3))[1;1].say
camelia rakudo 2a04f2: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤2␤» 19:30
dagurval n: (1, (2, 3))[1][1].say
camelia niecza v24-49-gfa3b5ca: OUTPUT«3␤»
dalek kudo/jvm-support: 2f43abc | jnthn++ | src/ (2 files):
An op stub and tweak to survive optimizer.
19:31
dagurval how do I make it not flatten?
jnthn Writing it (1, [2, 3]) is the easy way :) 19:32
19:32 lizmat left
dagurval r: (1, [2, 3])[1;1].say 19:32
camelia rakudo 2a04f2: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤2 3␤»
sorear masak: I did haskell back in the day so I've got a bit of a head start, especially with functors 19:33
jnthn And we don't do the ; thing yet, so [1][1] was right
dagurval r: (1, [2, 3])[1][1].say
camelia rakudo 2a04f2: OUTPUT«3␤»
dagurval ah, there we go :)
19:34 gtodd joined
gtodd in perl6 how does one do the python equivalent of .dir or dir() to show the methods associated with a class? 19:34
jnthn r: say Int.^methods 19:35
camelia rakudo 2a04f2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base expmod is-prime floor round ceiling sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh unpolar cis Complex log exp …
19:35 lizmat joined
gtodd right .^methods ... so there is no equivalent in perl5 19:36
or none that is as succinct
masak sorear: ah, yes. I've understood FP's definition of it for a few years, even if I haven't been doing that much Haskell. 19:37
lizmat and there is no way to generate that, as it is really hard to see whether a sub is a public method, a private method or just a sub
or any combination of the above :)
I think I got warnocked on this, or lost responses in a net split 19:38
does this make sense as a short-term goal for me: gist.github.com/lizmat/5557120
masak sorear: when I understood CT's definition of functor, I just filed it away in my brain as "morphism-preserving mapping between categories". 19:39
gtodd jnthn: in Int..^methods is the "^" there a prefix operator? 19:40
masak gtodd: no, it's 'Int.^methods' with one dot 19:41
gtodd: and '.^' is syntactic sugar for a methodcall on Int's metaclass.
method call* 19:42
shachaf masak: "morphism-preserving"? 19:43
gtodd ok looking ta the operators docs it says: TODO: .= .^ .:: .() .[] .{} .<> 19:44
masak: so there's a long way to do it too
masak shachaf: a morphism is an arrow between two objects in a category. 'morphism-preserving' means that if two objects mapped *from* have an arrow between them, then the two objects mapped *to* must have an arrow as well. 19:46
flussence p5eval: say unpack("H*", pack("CCcccc", -0x01, 0x130, -0x02, -0x99, 0x50, 0xFF))
p5eval_ flussence: ff30fe6750ff1
lizmat jnthn: I see in a lot of "if +@foo {}" in e.g. World.nqp. Is there a reason not to just say "if @foo {}" ? (without the "+" ?
masak gtodd: yes.
flussence p5eval: say unpack("H*", pack("CCcccc", -0x01, 0x130, -0x02, -0x99, 0x50, 0xFF)) . "#"
p5eval_ flussence: ff30fe6750ff#1
masak r: say Int.HOW
camelia rakudo 2a04f2: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
masak r: say Int.HOW.methods(Int)
camelia rakudo 2a04f2: OUTPUT«Int Num Rat FatRat abs Bridge chr sqrt base expmod is-prime floor round ceiling sign conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh unpolar cis Complex log exp …
masak gtodd: like so. 19:47
flussence perldoc isn't all that clear on how pack clamps values to a type's range
19:47 spider-mario joined
shachaf masak: That's the "type" of the functor, not the "law" part, isn't it? 19:47
shachaf 's words are a bit Haskell-influenced.
jnthn lizmat: No. In fact, if @foo { } is most likely faster
masak shachaf: I'm not sure I understand your question. 19:48
shachaf I.e. you're saying that if k : A -> B, Then F_a(k) : F_o(A) -> F_o(b)?
lizmat jnthn: so should I replace any "if +@foo" with "if @foo" ?
gtodd masak: interesting
flussence p5eval: join(q{}, unpack("H*", pack("CCcccc", -0x01, 0x130, -0x02, -0x99, 0x50, 0xFF)));
p5eval_ flussence: ff30fe6750ff
flussence er
masak sciurius: yeah.
flussence p5eval: join(q{ }, unpack("H*", pack("CCcccc", -0x01, 0x130, -0x02, -0x99, 0x50, 0xFF)));
p5eval_ flussence: ff30fe6750ff
sorear masak: shachaf's "law" refers to the fact that functors preserve composition relationships
masak er, shachaf: yeah.
flussence p5eval: join(q{ }, unpack("(H2)*", pack("CCcccc", -0x01, 0x130, -0x02, -0x99, 0x50, 0xFF))); 19:49
p5eval_ flussence: ff 30 fe 67 50 ff
masak sorear: well, they must, don't they, with that definition? :)
sorear fmap (f . g) = fmap f . fmap g; fmap id = id
lizmat sciurius usually just lurks here :-)
shachaf masak: No.
masak hm.
shachaf masak: The "preserving" part is two laws: 19:50
F_a(id_X) = id_{F_o(X)}
sorear They must in the programming language usage due to parametricity
jnthn lizmat: Yes, it if breaks nothing, which I don't think it will
sorear But in general mathematics it needs to be stated explicitly
shachaf sorear: No, you can write invalid fmap instances with the correct type. :-)
(Or did I misunderstand?)
lizmat starts the +axe
masak shachaf: this is all highly interesting.
flussence r: my int32 $bar = 99999999999999999999; say $bar 19:51
camelia rakudo 2a04f2: OUTPUT«1661992959␤»
shachaf The other law is that if S : X -> Y and T : Y -> Z (and so T . S : X -> Z) then F_a(T . S) = F_a(T) . F_a(S) 19:52
flussence that gives me a completely different result locally and definitely not a 32-bit one.
sorear The "graphs as functors from a fixed small category to Set" thing was very surprising and interesting
shachaf Graphs as in diagrams?
19:53 spider-mario left
lizmat jnthn: I assume the same applies to "+@($node)", right? 19:53
sorear shachaf: no
masak shachaf: right, identity and associativity. you're basically saying that functors need to preserve them both.
sorear shachaf: let C be the category with two objects E and V, and two nonidentity functors src: E -> V, dst: E -> V 19:54
shachaf sorear: Er, wait. I misread.
sorear shachaf: the category Fun(C,Set) is similar to the category Graph
masak sorear: yes, that bit was cute :)
shachaf sorear: Ah. 19:56
jnthn lizmat: Only in boolean context.
19:56 dmol left, dmol joined
lizmat jnthn: ok, as @foo does not return the number of elements in scalar context? 19:57
19:58 dmol1 joined
jnthn lizmat: Well, there's not a scalar context per se, but that thing in item context itemizes...at least in real Perl 6. In NQP, it doesn't really care about context at all :) 19:59
19:59 dmol left
lizmat well, we're talking about .nqp files here 19:59
anyways, I'm building and do a spectest with Actions.nqp having all its +@ changed to @ :-) 20:00
we'll see what happens :-)
jnthn OK. In boolean context should be fine :)
lizmat jnthn: && +@*MODULES == 0 && 20:01
sorear is still having some conceptual difficulties with sheaves 20:02
lizmat wouldn't && @*MODULES && be better?
20:02 spider-mario joined
lizmat && !@*MODULES && 20:02
jnthn lizmat: Yes, would also be fine, though sometimes == 0 tells the story better. If you're doing == you probably don't need the + 20:03
20:04 dmol1 left, dmol joined
lue jnthn: wouldn't you need the + to count up number of elements though? 20:04
lizmat with my Perl 5 goggles on, the + seems superfluous in any situation :-)
dagurval r: (1, [2])[3].say 20:05
camelia rakudo 2a04f2: OUTPUT«Nil␤»
dagurval should this not be "out of range" error?
r: (1, 2)[3].say
camelia rakudo 2a04f2: OUTPUT«Nil␤»
dagurval r: (1)[1].say
camelia rakudo 2a04f2: OUTPUT«Index out of range. Is: 1, should be in 0..0␤ in method gist at src/gen/CORE.setting:10022␤ in method gist at src/gen/CORE.setting:893␤ in sub say at src/gen/CORE.setting:10920␤ in method say at src/gen/CORE.setting:890␤ in method say at src/gen/CORE.setting:8…
lue r: say (1).WHAT; say (1,2).WHAT; 20:06
camelia rakudo 2a04f2: OUTPUT«(Int)␤(Parcel)␤»
jnthn lue: == implies numeric context
lue right. 20:07
20:08 dmol left 20:11 dmol joined
labster lizmat: I don't think that was my gist you were looking for... I haven't worked on importing at all. Though your gist looks like a nice goal. 20:16
dalek p/rak-jvm-support: 4ba5aa1 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Add STAT_ constants on JVM.
20:17
p/rak-jvm-support: 4658100 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Stub in some missing ops.

Lots of LHF here to implement these.
p/rak-jvm-support: 7f641eb | jnthn++ | src/vm/jvm/ (2 files):
Control exception constants.
lizmat it was more about how to manage installed distributions / modules
Perl 5's packlist as it were, but better 20:18
and supporting all of the Perl 6 features
pmichaud 20:02 <lizmat> && !@*MODULES && 20:25
that form is generally better.
@array == 0 makes @array non-lazy
!@array doesn't.
lizmat does nqp do lazy arrays?
pmichaud oh, in nqp it doesn't matter 20:26
lizmat this was about nqp
pmichaud well, !@array is still probably better, though :)
lizmat and why I saw a lot of +@array in boolean contexts
and jnthn mentioned that without the +, it would be faster probably
testing that now
pmichaud I agree with him.
20:26 kivutar joined
pmichaud I don't know that it'll be noticeably faster, but it should be at least incrementally faster 20:27
and ?@array or !@array is more Perl6-idiomatic than +@array
20:28 dmol left
jnthn o/ pmichaud 20:31
20:32 adu left
lizmat $ time nqp -e 'my $times := 1000000; my @array := (1,2,3); while $times-- { my $b:= +@array }' 20:32
shows it is 10..20% faster (as in less CPU usage)
without the + 20:33
20:35 dmol joined
dalek p/rak-jvm-support: 029e3ad | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
A couple more op stubbings.
20:37
p/rak-jvm-support: 7a8142f | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Make error betterer.
pmichaud without the + and with a ? 20:38
my $b := @array doesn't impose boolean context.
lizmat eh, no with/without +
with ?, it actually seems slower than without + 20:39
pmichaud right, that's possible.
perhaps shouldn't be that way, but it's possible.
jnthn Well, the real question is between if @foo { } and if +@foo { } 20:40
On the JVM the first will almost certainly be faster.
lizmat indeed… that was what I was after
jnthn swears lots at exceptions...
pmichaud I suspect it can be made to be faster on Parrot, depending on how the boolean circularity saw cuts there
jnthn I can't tell what of this code is doing important stuff and what is working around Parrot.. :/
lizmat hehe… let's not worry about that 20:41
pmichaud I get 1.812s versus 1.644s for + versus ? on nqp-parrot
lizmat thats's user CPU ? 20:42
pmichaud real
user CPU is 1.580s versus 1.528s
so ? is faster on my system.
lizmat well, this is very finiccky, you need to run this quite a few times before you see a trend
pmichaud I did.
(I've done a lot of timings w/rakudo and nqp :) 20:43
lizmat I've actually reduced the body to { @array }, to not have the overhead of the binding to $b
would that fudge the benchmarks? 20:44
pmichaud you're still not testing "boolean context" with that
lizmat so: $ time nqp -e 'my $times := 1000000; my @array := (1,2,3); while $times-- { @array }'
pmichaud use 1 if @array and 1 if +@array
{ @array } just tests the cost of a lexical lookup
gtodd lizmat: so re . perl5 non-equivalent of perl6's .^methods ... in the perl5 debugger if one does "use Mojo;" and then x \%{Mojo} you get a hash of a bunch of things and m \%{Mojo) just gives you object methods like ... UNIVERSAL: isa ... etc. which is nowhere near perl6 introspection 20:45
and never can be ...
lizmat pmichaud: ok
20:45 Guest4935 is now known as ajr_
lizmat gtodd: indeed 20:45
gtodd which is why perldoc is so good :-) 20:46
lizmat fwiw, all spectests pass with all s/+@/@/ in Actions.nqp 20:47
pmichaud \o/ 20:50
if nqp-parrot ends up being faster at +@array versus @array in boolean context, I think we'll just fix nqp-parrot :)
lizmat++ # excellent optimization
lizmat will run spectest again to make sure there is a difference viewable in the spectest as well 20:51
20:53 ajr_ left
lizmat pmichaud: a question that came up earlier today, and was already answered by jnthn (provisionally) 20:54
with "import Foo", I assume that the "Foo" refers to an aliased module 20:56
assuming we did "use Foo:name<Bar>"
if not, then import would also need the whole :from:auth:ver specification 20:57
pmichaud That sounds reasonable to me. 20:59
I'm still fuzzy on the import / use semantics at times. I'll brush up on them before yapc::na, though :)
21:05 kaare_ left
grondilu what's @a[1..*-1] in P5? 21:07
lizmat @a[ 1… $#a ] ? 21:08
grondilu really?
lizmat @a[ 1… @a ] ?
grondilu I know it works but I thought there was simpler
lizmat @a[ 1 @a ] ?
grrrrr
@a[ 1 .. @a ] ?
do you want all elements except the first ? 21:09
grondilu yeah
@a[ 1 .. @a ] will do I guess
lizmat @a[ 1 .. $#a ] ?
diakopter clone then unshift? 21:10
er shift
lizmat @a will give you the element past the array
dalek kudo/jvm-support: 8297b3d | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java:
Implement p6setautothreader.
kudo/jvm-support: 1b21172 | jnthn++ | src/ (2 files):
Attempt to start getting exception code updated.
lizmat or not even clone, but shift, then unshoft
unshift
jnthn
.oO( I unshoft it :D )
21:11
lizmat shift/unshift are highly optimized in p5, afaik
jnthn
.oO( now how do I unshaft this code... )
diakopter lizmat: you're right, esp if you call the nqp:: ops directly
[to suggest that method]
well, shift, clone, unshift anyway 21:12
grondilu ah @a[ 1 .. @a ] is wrong (it goes too far). I'll go with @a[ 1 .. $#a ] 21:15
masak er. 21:17
lizmat om? 21:18
masak sorry, I had to backlog to get enough context.
I think if I were doing that more than once in my code, I'd define a 'sub tail' or something. 21:19
dalek kudo/jvm-support: 3b34521 | jnthn++ | src/ (2 files):
Yet more exceptiony stuff.

Heck knows if this'll work. But it probably will; the exception stuff in the NQP on JVM runtime runs handlers in the dynamic scope of the throw by default and already takes care not to let active handlers catch exceptions thrown within them, which it seems is what the dynops we avoid using here do. Caveat: this isn't a solution for LEAVE.
lizmat not sure about the context now
jnthn ah darn, next thing ix xor...
*is 21:20
masak jnthn: why is that "darn"? it's not even short-circuiting! :P 21:21
lizmat: the context of "how to extract all but the first element of an array?" 21:22
jnthn Hm...guess it's not so fiddly to port
masak mmm, port...
jnthn :P
Yeah, I drunk some of that recently...
lizmat from a performance point of view, creating a sub for that would probably not be so wise
depends on how often you would call that sub of course 21:23
(the question was for Perl 5, afaik)
21:23 Swarley__ joined
jnthn Well, if you're lucky your compiler will inline the sub... :) 21:23
masak lizmat: yes, sure. 21:24
lizmat: I think I would create the sub if it gained me any advantage from an API/readability perspective.
lizmat: and then maybe inline it again if it showed up as a pain point in profiling.
21:24 LylePerl left
lizmat fair enough :-) 21:25
ehouse_ ff
masak ehouse_: well, I'd sure like to see a solution that uses infix:<ff>, but surely that can't be the easiest way... 21:28
masak .oO( &second_element ff &end_of_list )
21:31 Swarley__ left 21:43 census left 21:44 spider-mario left
dalek p/rak-jvm-support: d05794c | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Add missing handler types.
21:48
p/rak-jvm-support: 7b11022 | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
xor
21:49 rindolf left
masak 'night, #perl6 21:49
tadzik get_attr_str() not implemented in class 'Coroutine' 21:50
current instr.: 'print_exception' pc 111625 (src/gen/CORE.setting.pir:50165) (src/gen/CORE.setting:9744)
dafuq :|
lizmat night masak!
sorear night masak. dream of cogent natural transformations
FROGGS tadzik: what are you doing? 21:52
tadzik FROGGS: panda install Farabi6 on panda2
FROGGS :/
tadzik I bet that if I comment out some CATCH {} I'll get a sensemaking error message 21:53
jnthn tadzik: There's also --ll-exception 21:54
tadzik ah, true
jnthn: otoh, I think I'd prefer --hl-exception ;) 21:58
jnthn ;)
22:00 btyler left 22:01 Skillex joined, btyler joined 22:02 MayDaniel left 22:04 lustlife left 22:05 adu joined
jnthn ooh...think le porting effort just discovered a minor optimizer bug... 22:06
22:07 kivutar left
lizmat which will benefit rakudo-parrot as well? 22:07
jnthn Yeah, the optimizer is shared. 22:09
I'm a bit too tired to think of an example to demonstrate the failure it coulda caused...
Hm...actually I'm not sure you can construct an example that fails 'cus it woudln't attempt the opt. 22:10
It's just that it copied a piece of code it didn't need to when inlining blocks.
22:10 kivutar joined
jnthn Which turned out harmless on Parrot, but the JVM's takedispatcher compilation is a bunch stricter. 22:10
dalek : fa1ff4a | (Tobias Leich)++ | t/test.pl:
added all test subs from p6-Test.pm
22:13
: 895f9f8 | (Tobias Leich)++ | STATUS.md:
today's status udpate
jnthn nqp: say(nqp::const::CCLASS_PRINTING) 22:14
camelia nqp: OUTPUT«64␤»
22:14 Skillex left
dalek nda/panda2: 9b8e854 | tadzik++ | lib/Panda/Builder.pm:
Don't read non-perl files when determining the build order

This fixes Farabi6 installation.
22:14
22:17 kurahaupo joined
lizmat gnight #perl6! 22:23
22:24 kivutar left
tadzik maybe it would be nice to have something like gcc -M for rakudo. At least it will be nice for panda :) 22:26
jnthn What's -M do?
We already have a -M ;)
tadzik Instead of outputting the result of preprocessing, output a rule suitable for make describing the dependencies of the main source file.
so, all the modules loaded with use or require 22:27
jnthn There's an env var you can set which tells you what other modules are loaded.
tadzik "what needs to be precompiled before"
22:28 kivutar joined 22:30 gdey left
dalek p/rak-jvm-support: 08b9fff | jnthn++ | src/vm/jvm/QAST/Compiler.nqp:
Stub several more missing ops.
22:32
p/rak-jvm-support: 1cd19ce | jnthn++ | src/vm/jvm/ (2 files):
Stub missing cclass (needs implementing).
p/rak-jvm-support: 7ce3641 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6bigint.java:
P6bigint serialization/deserialization.
kudo/jvm-support: 7f612cf | jnthn++ | src/Perl6/Optimizer.nqp:
Don't copy takedispatcher on block inlines.
22:33
22:41 kivutar left
dalek p/rak-jvm-support: b9b52e3 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/ (3 files):
A few small serialization related fixes.

With these, serialization of CORE.setting works out.
22:43
22:52 dmol left
adu oo you can! 23:07
r: class A { method hello { say "hello" } }; class B is A {}; class C is A {}; class D is B is C {}; D.new.hello
camelia rakudo 2a04f2: OUTPUT«hello␤»
adu good news
wait, when there is a conflict in the method resolution, whichever class is declared first gets precedence? 23:12
23:14 Khisanth left
jnthn No, it uses C3 ordering 23:15
23:16 Khisanth joined
adu "C3 superclass linearization"? 23:16
23:16 xenoterracide_ left
jnthn yes 23:18
23:19 xenoterracide joined
jnthn Time for some rest...didn't get the blog post I meant to done today, but will get to it tomorrow... 23:21
'night
colomon o/ 23:24
adu good night jnthn 23:27
23:31 cognominal left, sivoais left 23:32 cognominal joined, sivoais joined 23:34 lue left 23:35 adu left 23:39 sivoais left 23:40 sivoais joined, sivoais left 23:41 sivoais joined 23:47 lue joined 23:51 frd|afk left, frdmn joined 23:59 berekuk left