»ö« 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 sorear on 25 June 2013.
00:05 stevan_ joined, ajr_ left, markov joined 00:12 Psyche^_ joined 00:22 stevan_ left, stevan_ joined 00:25 fridim_ joined 00:29 araujo joined 00:40 skids left 00:41 skids joined 00:42 jnap joined 00:57 clkao left, clkao joined 01:12 clkao left, clkao joined 01:25 skids left 01:28 zakame joined 01:33 dayangkun_ joined 01:37 dayangkun left 01:56 dayangkun_ left 01:57 pernatiy joined 01:59 skids joined 02:02 kbaker left
diakopter [OT] based on the idiocy parrotted in the Congress today... clearly the US wants to invade/bomb Syria for some other reason they won't admit, such as wanting to destroy/capture underground Iranian weapons labs in Syria 02:08
colomon rn: say sprintf("%G", Inf) 02:16
camelia niecza v24-94-g1042054: OUTPUT«INFINITY␤»
..rakudo a25616: OUTPUT«NaNE+Inf␤»
colomon ugh
rn: say sprintf("%g", Inf) 02:17
camelia niecza v24-94-g1042054: OUTPUT«Infinity␤»
..rakudo a25616: OUTPUT«NaNe+Inf␤»
diakopter haha NaN * 10**Inf
colomon Wynne:spec colomon$ perl -e 'printf("%g\n", Inf)' 02:18
inf 02:19
Wynne:spec colomon$ perl -e 'printf("%G\n", Inf)'
INF
02:20 locsmif left
Mouq rn: say Inf.new 02:28
camelia rakudo a25616, niecza v24-94-g1042054: OUTPUT«0␤»
Mouq rn: 1.new.say # oh
camelia rakudo a25616, niecza v24-94-g1042054: OUTPUT«0␤»
dalek ast: 93e2173 | (Solomon Foster)++ | S32-str/sprintf.t:
Add more tests for Inf and -Inf.

These tests follow the Perl 5 convention. I'm not convinced of its correctness. I also changed two existing tests to conform.
02:29
Mouq r: q{("a" ~~ /a/).perl}.eval 02:33
camelia rakudo a25616: ( no output )
Mouq but
r: ("a" ~~ /a/).perl.eval
camelia rakudo a25616: OUTPUT«Cannot modify an immutable value␤ in block at src/gen/CORE.setting:863␤ in method BUILDALL at src/gen/CORE.setting:846␤ in method bless at src/gen/CORE.setting:835␤ in method new at src/gen/CORE.setting:820␤ in method new at src/gen/CORE.setting:818␤ in bloc…
Mouq Having trouble figuring out what that's about, since 02:36
r: (Int).perl.eval 02:37
camelia rakudo a25616: ( no output )
Mouq r: Int.new.perl.eval
camelia rakudo a25616: ( no output )
Mouq r: Match.new.perl.eval
camelia rakudo a25616: OUTPUT«Cannot modify an immutable value␤ in block at src/gen/CORE.setting:863␤ in method BUILDALL at src/gen/CORE.setting:846␤ in method bless at src/gen/CORE.setting:835␤ in method new at src/gen/CORE.setting:820␤ in method new at src/gen/CORE.setting:818␤ in bloc…
dalek ecza: a6d4c5f | (Solomon Foster)++ | lib/Printf.cs:
Special case Inf in sprintf.
02:38
Mouq colomon: It looks like sprintf is defined in src/core/Cool.pm:256 in rakudo. (sprintf in nqp appears to delegate to parrot/java) 02:45
colomon will give #perl6 a day or two to think on that before tackling fixing it in nqp
02:57 xenoterracide joined 03:23 jnap left 03:29 cognominal__ joined, preflex_ joined, ChanServ sets mode: +v preflex_, cognominal__ left, cognominal left 03:30 cognominal joined, preflex_ is now known as preflex 03:54 fridim_ left 04:25 colomon left 04:40 EvanTeitelman left 04:44 Rotwang joined 04:56 SamuraiJack__ joined 04:57 abnorman left 05:08 hummeleBop joined 05:09 iSlug left, yannickberthoud joined, hummeleBop left 05:22 ssutch left 05:23 abnorman joined 05:30 domidumont joined 05:34 domidumont left 05:35 domidumont joined 06:00 FROGGS joined
FROGGS nr: printf "%d", Inf 06:01
camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Cannot unbox a BigInteger from an object of repr P6box[Double]␤ at /home/p6eval/niecza/lib/CORE.setting line 1403 (sprintf @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1404 (printf @ 5) ␤ at /tmp/zmPCBE_mkq line 1 (mainline @…
..rakudo a25616: OUTPUT«get_boxed_ref could not unbox for the given representation␤␤»
FROGGS nr: say Inf.fmt("%d")
camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Cannot unbox a BigInteger from an object of repr P6box[Double]␤ at /home/p6eval/niecza/lib/CORE.setting line 1403 (sprintf @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 750 (Cool.fmt @ 4) ␤ at /tmp/UCXOJiCd1p line 1 (mainline …
..rakudo a25616: OUTPUT«get_boxed_ref could not unbox for the given representation␤␤»
FROGGS nr: say Inf.fmt("%s")
camelia rakudo a25616, niecza v24-95-ga6d4c5f: OUTPUT«Inf␤» 06:02
FROGGS morning
06:02 dayangkun joined 06:13 dayangkun left 06:18 Rotwang left 06:27 agre joined 06:29 denisboyun joined 06:32 salv0 joined 06:42 colomon joined 06:45 domidumont left 06:48 daniel-s left 06:49 daniel-s joined 06:51 woosley joined 06:59 domidumont joined, domidumont left 07:00 dmol joined 07:01 domidumont joined 07:02 sqirrel joined 07:06 haruka joined 07:07 haruka left 07:13 zakharyas joined
moritz \o 07:16
timotimo: what's wrong with calling subroutines before they are defined?
07:19 xenoterracide_ joined, xenoterracide left 07:20 zakharyas left
dalek p: e57bb75 | (Arne Skjærholt)++ | src/vm/parrot/QAST/Operations.nqp:
Expose pir::nqp_native_call_init as nqp::op.
07:28
p: 8cd38ba | (Arne Skjærholt)++ | t/nativecall/01-basic.t:
Add basic test file for native call functionality.
p: fe8cb95 | (Arne Skjærholt)++ | tools/build/Makefile-Parrot.in:
Run native call tests as part of Parrot test suite.
07:29 yannickberthoud is now known as iSlug 07:31 FROGGS left 07:35 kaleem joined 07:44 zakharyas joined 07:53 sqirrel left 07:54 denisboyun left 07:57 go|dfish joined 08:15 xenoterracide_ left 08:20 sqirrel joined 08:23 xinming joined 08:25 rindolf joined 08:29 pmurias joined
pmurias jnthn: what is stored in $P11 (in grammar code on parrot)? 08:30
08:32 ivan`` joined
diakopter pmurias: mwahaha 08:34
pmurias: more seriously, take a look at github.com/MoarVM/MoarVM/blob/mast...erMAST.nqp 08:35
where I directly transliterated much of that
for moar's regex compiler
even to the name of the variables/registers
so, search P11 and you'll find it
it may be easier to read/grok there
pmurias I think the JVM backend calls P11 subcur 08:36
diakopter see line 742 in that file 08:37
(above)
08:40 daniel-s left 08:41 donaldh joined 08:42 agre left
nwc10 is there a clear list of blockers between "now" and "what's needed for a JVM Star release"? 08:42
donaldh nwc10: I'm working on completing a sockets impl for JVM, plus the pipe and qqx features that are used in the socket tests. 08:44
08:44 yoleaux left
diakopter donaldh is the blocker! :) 08:44
08:44 daniel-s joined
donaldh nwc10: once that lands, there are some bugs to be chased in panda. 08:44
well, not panda, but exposed by panda 08:45
nwc10 ah OK.
diakopter also, nativecall is kinda important
nwc10 so pipes and qqx unblock the socket tests, the socket tests unblock sockets, sockets unblock people working on panda-related things
and nativecall unblocks other things
?
donaldh last week I had panda bootstrap.sh working, with a couple of tweaks to panda to support jar as well as pir. 08:46
moritz I don't think panda needs sockets directly
"just" parts of the ecosystem
same with nativecall
nwc10 OK
08:46 cibs joined 08:47 dakkar joined
donaldh panda uses INET sockets to fetch the package list, and presumably to download packages 08:47
diakopter it's just that it's still squarely in the "toy" realm .. I guess I'm opposed to the idea of "releases" right now.. we always just tell people to use the latest from the repo anyway when they ask why stuff doesn't work
moritz I'm pretty sure it shells out to download the packages, because that's done via git
but the package list would be problematic though 08:48
donaldh moritz, yes, you're right.
the package list is what I hit, which is why I'm working on sockets ;-)
nwc10 diakopter: I'm not sure how many people (if any) install from releases. But they seem to be useful (or even "necessary") as marketing
but dead releases are awful
eg, I feel that it's counterproductive that (*currently*) distributions are shipping packages of Rakudo, as they are all months or years out of date 08:49
arnsholt I finally got the native call tests figured out, so I hope I'll be able to make some real progress on JVM NativeCall Real Soon Now (tm)
nwc10 (this will change)
diakopter RSN++
nwc10 current build packages - that's a different matter.
08:49 fhelmberger joined
nwc10 gah, built 08:49
donaldh This is where I am at with sockets on JVM: Failed 9/41 subtests 08:50
arnsholt One problem with Rakudo in distros is that Rakudo is such a moving target ATM
08:50 iSlug left
arnsholt Pretty much too fast for all but the rolling-release ones, I think 08:50
nwc10 yes, agree 08:51
there was one approach that I saw that I liked. IIRC it was chromium in Ubunutu.
hoelzro I have a nice package built for Arch
and I update the Homebrew package for each release
nwc10 The "package" in the official repository installed keys and other steup for a "nightly" repository
hoelzro one of my goals is to have RPMs/DEBs, though 08:52
nwc10 and from that you could get a regularly updated .deb
diakopter nwc10: yep, that's the way to do it
bonsaikitten I find updating once a month quite convenient
nwc10 and I'm sort of surprised/disappointed that that hasn't happened.
bonsaikitten <-- gentoo maintainer
hoelzro as well as to split the rakudo-star package into separate packages, and rakudo-star becoming a "meta package"
08:53 xinming left 08:55 xinming joined 08:56 rindolf left 08:57 rindolf joined
jnthn pmurias: $P11 is, iirc, set to the cursor we want to backtrack into, while backtracking the cursor stack. 08:58
diakopter that's the use of it at the topmost level, yes
(as that comment I pointed out earlier explains) 08:59
pmurias jnthn: why are a lot of the registers used by number vs used as %*REG<foo>? 09:02
jnthn: just avoiding changing stuff with no big benefit? 09:03
jnthn pmurias: I think it conveys temporary-ness vs. whole-regex-lifetime... 09:04
pmurias: Thjough $P11 clearly breaks that rule. I gave it a better name in the JVM port :)
09:04 daxim joined
pmurias subcur? 09:05
jnthn yes, I think so 09:06
Which is quite descriptive of what it is :) 09:07
pmurias much more than $P11 for sure ;) 09:08
jnthn yes, the darn $P11 thing took me a few hours to figure out too :P
diakopter too 09:09
09:17 abnorman left 09:34 agre joined 09:51 daxim left 09:52 daxim joined
donaldh Can anyone help with golfing gist.github.com/donaldh/48a7427077c1db9795f8 09:54
tadzik org.perl6.nqp.runtime.LexoticException 09:55
doesn't sound good :|
donaldh++ # excellent progress
any idea about builder.t failure, may that be just a hardcoded check for .pir? 09:56
and maybe same for installer
donaldh I replaced pir with jar in my code. Not got a patch for that yet. 09:57
my copy
tadzik in tests too?
hoelzro initially parsed that as org.perl6.nqp.runtime.ExoticException 09:58
moritz EroticException 09:59
donaldh tadzik, yep, could just be explicit pir checks in tests.
hoelzro "EroticException: too hot for Perl" 10:00
donaldh tadzik: does that mean that testmodules needs a pir and a jar variant, or rethought ?
tadzik donaldh: they can have a VM-dependent part somewhere, like 'my $postfix-for-precompiled-files = %expected_postfixes{$*VM}' 10:02
I'd be fine with that, unless you have a diffent idea
donaldh tadzik: agreed 10:05
tadzik donaldh: how is that done in the code? 10:06
donaldh sorry, brain is afk 10:08
10:09 sqirrel left
lizmat r: say KeyBag.new<a>-- # shouldn't decrement of a non-existing bag element be silent, or die ? 10:18
camelia rakudo a25616: OUTPUT«0␤»
donaldh darned conference calls. I was expected to think and everything
lizmat *should
S02:1646 Should return a Failure 10:20
synopsebot Link: perlcabal.org/syn/S02.html#line_1646
lizmat goes and fixes that
dalek kudo/nom: 105d588 | (Elizabeth Mattijsen)++ | src/core/Bag.pm:
Slight optimization in pick/roll, much more is needed
10:22
kudo/nom: 3feb92e | (Elizabeth Mattijsen)++ | src/core/Bag.pm:
Fail on invalid values, rather than die
tadzik ooooh. That feeling when you accidentally remove an uncommited file, and then hysterically look for a vim session that still has it open... 10:26
lizmat hopes tadzik will get that euphorious feeling when he has found that vim session 10:33
tadzik I did :)
finally, having 10 virtual desktop with unmaintainable amount of backgrounded vims pays off 10:34
10:37 Mouq left 10:40 yoleaux joined, ChanServ sets mode: +v yoleaux
lizmat r: say "a" ~~ KeyBag.new(<a b c>) # this is intended behaviour, is it not? 10:53
camelia rakudo a25616: OUTPUT«True␤»
lizmat wonders why there is a spectest expecting this to give False
10:58 iSlug joined 10:59 dmol left 11:00 FROGGS joined 11:12 iSlug left 11:20 iSlug joined
jnthn donaldh: LexoticException can happen when you do a return in a pointy and there's no enclosing sub or method, perhaps... 11:22
nqp-jvm: (-> { return 1; })() 11:23
camelia nqp-jvm: OUTPUT«(timeout)»
jnthn aww
nqp-jvm: (-> { return 1; })()
camelia nqp-jvm: OUTPUT«Lexical 'RETURN' not found␤ in <anon>␤ in <anon>␤ in <anon>␤ in eval␤ in evalfiles␤ in command_eval␤ in command_line␤ in MAIN␤ in <anon>␤ in <anon>»
jnthn tries again
ah,
well, or it could do that :)
moritz r: sub f { -> { return 1 }}; my $x = f(); $x()
camelia rakudo 3feb92: OUTPUT«Attempt to return outside of any Routine␤ in block at src/gen/CORE.setting:550␤ in block at /tmp/aGewOPXLGo:1␤␤» 11:24
jnthn Yeah...Rakudo should do that.
LexoticException is the exception used to unwind in a return, anyways...
But it sure shouldn't leek
moritz nqp-jvm: sub f { -> { return 1 }}; my $x := f(); $x()
camelia nqp-jvm: OUTPUT«Routine declaration requires a signature at line 2, near "{ -> { ret"␤ in panic␤ in routine_def␤ in routine_declarator:sym<sub>␤ in !protoregex␤ in routine_declarator␤ in term:sym<routine_declarator>␤ in !protoregex␤ in term␤ in termish␤ in EXPR␤ in statement␤… 11:25
moritz nqp-jvm: sub f() { -> { return 1 }}; my $x := f(); $x()
camelia nqp-jvm: OUTPUT«Exception in thread "main" org.perl6.nqp.runtime.LexoticException␤ at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:86)␤ at org.perl6.nqp.runtime.GlobalContext.<init>(GlobalContext.java:129)␤ at org.perl6.nqp.runtime.CompilationUnit.enterFromMain(Compilat…
jnthn aha
moritz++
colomon lizmat: "a" ~~ KeyBag.new(<a b c>) should be False. ~~ tests whether Sets are equivalent, NOT set membership. If you want to test set membership, use ∈ 11:26
lizmat colomon o/ 11:27
but, is the ACCEPTS then correct ?
colomon has no idea what Rakudo's set ACCEPTS looks like, bringing up github... 11:29
as far as I know, that should be correct 11:30
lizmat (<+)
colomon $other (<+) self && self (<+) $other
lizmat so all $a.keys.map({ $a{$_} <= $b{$_} })
that doesn't seem right, then ?
shouldn't that be == ? 11:31
moritz == is sfor numbers
eqv maybe
colomon it does it both directions
moritz didn't really pay attention enough
colomon if A (<+) B and B (<+) A, then A and B have the same members and counts
moritz sounds like eqv, yes 11:32
lizmat hmmm… feels there should be a faster way to do the ACCEPTS
colomon err … or is there a catch there?
colomon thinks not, on second thought 11:33
lizmat ok, will search further :-)
colomon: is there a reason not to make new a multi, with an optional :p for pairs ?
11:33 donaldh left
colomon lizmat: yes 11:34
lizmat ah, no named parameters after a slurpy
colomon "p" => True is a valid thing to put into a Bag 11:35
moritz r: sub f(*@a, :$a) {}
camelia rakudo 3feb92: ( no output )
colomon afk # garbage collection
moritz r: sub f(*@a, :$a!) {}
camelia rakudo 3feb92: ( no output )
11:36 pernatiy left 11:39 sqirrel joined
moritz seems my feeling about rakudo setting compilation times were inaccurate 11:44
moritz does some measurements 11:45
11:57 skids left 12:01 dmol joined 12:11 kbaker joined
dalek kudo-js: fc41b4d | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
Implement altseq.
12:27
kudo-js: c3db051 | (Pawel Murias)++ | / (4 files):
Pass rx_captures.

Handle cstack properly. Implement negate cclass matching. Implement nqp::findcclass,nqp::findnotclass, support more cclasses.
12:29 spider-mario joined 12:33 xinming left 12:34 xinming joined 12:36 xinming left
dalek ast: d32875f | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
(Un)fudges for work on Bag/KeyBag
12:40
12:40 xinming joined 12:41 dayangkun joined, woolfy left 12:43 woolfy joined 12:46 dmol left
dalek kudo/nom: fb7c07c | (Elizabeth Mattijsen)++ | src/core/ (4 files):
Make KeyBag work according to spec (mostly) + additional fixes/tweaks
12:50
12:57 colomon left 13:01 benabik left 13:05 dakkar left 13:07 dakkar joined 13:11 sqirrel left, donaldh joined
JimmyZ donaldh: Did you see the backlog for LexoticException? 13:12
donaldh JimmyZ: from jnthn - oh yep. 13:13
13:16 PacoAir joined
moritz moritz.faui2k3.org/tmp/times.log # setting compilation times for different rakudo revisions 13:17
Fatalnix okay, I gotta do some research on Perl6 for the JVM so I can make some MC mods. 13:19
today
only thing I hate about the Java API is that everything is camel case.. ew. 13:20
jnthn It's funny, you'd think Perl programmers would like CamelCase, what with The Camel... :) 13:21
Fatalnix loool
I think its so hard to read
like wth, functionThatDoesSomethingCoolAndAwesome is hard to follow compared to function_that_does_something_cool_and_awesome.. both of which are retarded function names but hey 13:22
lizmat moritz++ 13:23
would it be possible to add #lines in CORE.setting as well ?
Fatalnix but what I am curious about, is that if I use Rakudo on the JVM- can I generate JVM class code? 13:24
13:24 denis_boyun joined, FROGGS left
timotimo moritz: er, nothing. just my brain having a little fart 13:24
lizmat moritz: checked the oldest, CORE.setting had 14207 lines then 13:27
13:29 dalek left
lizmat so yes, it has gotten slower than the size of the CORE.setting would indicate 13:29
13:29 dalek joined, ChanServ sets mode: +v dalek
lizmat 20% slower or so, against 14% increase in size 13:29
jnthn Lines is not a very good measure of much, though. 13:30
I mean, a one-line that does a BEGIN is a lot mroe work than 10 lines of comments :)
13:30 denis_boyun_ joined
Fatalnix jnthn: haha 13:30
testing rakudo on jvm now 13:31
lizmat jnthn: what would be a better metric then: number of subs/methods/classes/ops
13:31 denis_boyun left
Fatalnix gotta compile it 13:31
dalek kudo-js: 7e871f1 | (Pawel Murias)++ | / (3 files):
Pass nqp/t/qcaps.

Fix non frugal quantifiers.
13:32
jnthn lizmat: Well, the point was more that a 20% time increase for a 14% line count increase isn't automatically unreasonable.
lizmat: Since there are different metrics
lizmat ok, well, if you're not too worried, I'm not :) 13:33
jnthn lizmat: It's hard to come up with a good one because there's so many factors.
lizmat: Well, I worry that dynamic comp is more expensive than we woudl really want it to be.
lizmat: I want to understand why that's slow...
lizmat: that is, how much time we spend in Perl6::World.compile_in_context 13:34
Any stats anybody fancies gathering on that (maybe just with timing code or maybe with --profile) would be interesting.
lizmat does compile_in_context show up in --profile ? 13:35
jnthn Oh, good question...
'cus it's compile time... 13:36
I don't know but maybe not.
In which case we're down to nqp::time_n :)
But that should be good enough resolution.
lizmat is the interface to --profile functionality documented somewhere ? 13:37
jnthn dunno; is there a docs/running.pod?
Fatalnix how long is it going to compile rakudo on a core 2 duo? 13:38
I think she's 2 Ghz
tadzik Fatalnix: about 6 minutes 13:39
oh, JVM may be shorter
jnthn It doesn't have to build a Parrot, just NQP and Rakudo. And the setting compile takes about half the time. But, startup... :) So yeah, probably a bit less on JVM 13:40
Fatalnix been going for like 10 mins heh
jnthn Well, RAM and if you have an SSD can make soem difference too I guess... :) 13:41
timotimo Fatalnix: i fear you'll be disappointed; the machinery to expose perl6 things as java-compatible thingies isn't in place yet AFAICT
hm, at least not completely
Fatalnix ah. Well that's fine
but is it currently possible to at least make a hello world .class file with Perl6? 13:42
timotimo i do think you can assign subs to be called by callbacks for SWT or something?
modules are compiled to .class files, yes
Fatalnix ooooh
13:42 bruges_ joined
timotimo but i don't know if they have a .main right off the bat? no clue how all of that works 13:42
Fatalnix so at least theres hope
13:42 bruges left
timotimo nqp and perl6 "binaries" (actually .jar files) are created by nqp, not by rakudo ... 13:43
Fatalnix yeah when I wrote a small clojure mod I used callbacks as jump from Java to clojure because for some reason I couldn't find out how to bridge the main class
timotimo i'm afraid performance may turn out to be an issue, too. at least if your mod wants to do stuff every tick 13:44
how many ticks per second does minecraft do?
Fatalnix 20
timotimo at any rate, i'm excited for the performance improvements rakudo-jvm is going to get in the future 13:45
Fatalnix yeah I dont expect it all to be spectacular, but I believe that in the future itl be prettyy cool
timotimo it's already faster than rakudo-parrot for most, but rakudo-parrot has seen years of optimization and rakudo-jvm hasn't really seen any.
Fatalnix hmm 13:46
how new is rakudo-jvm though?
timotimo depends on how you measure it 13:47
preparations for "getting rakudo decoupled from just one VM so it can target different VMs in the future" are old
Fatalnix woot that looks cool: perl -MExtUtils::Command -e cp src/stage2/nqpmo.jar .
anything with a jar for a cp in Perl is useful
timotimo that's a perl5 module being used to do a cp ;)
jnthn The JVM porting effort started about November last year. I think we first could run interesting Perl 6 code in July. 13:48
Fatalnix wait wat
jnthn Well, late June maybe... Anyway, the JVM port is rather new :)
Fatalnix okay, so its not like an abandonment
in terms of optimization
jnthn Of course, we'd been designing to be able to do multi-backend for quite a while. 13:49
timotimo what do you mean "abandonment"? abandoning parrot?
Fatalnix I would rather not be forced to use the JVM for my personal perl projects
but for MC mods I don't have an option :D
timotimo right. we're keeping parrot, because it kicks the JVM's ass for very short runs, because its startup time is so good
jnthn Anyway, for now the focus is on tracking down things that don't work more than optimizing. :)
timotimo and we're getting a javascript and MoarVM backend for the future as well
timotimo checks for more yapc talk recordings 13:50
jnthn :)
Fatalnix I was here yesterday thinking about a Xen backend
like erlangonxen.org
for making parallel spawn clusters.
its really useful for projects like that where you need lots of parallel processing power, but don't want the overhead of an operating system 13:51
timotimo hm. perl in my butt^W^Wthe cloud and 25 years of perl in 25 minutes are up, as well as design decisions on p2
lizmat r: bag(bag(<a b c>)).perl.say # expected something like bag(bag()), right? 13:52
camelia rakudo fb7c07: OUTPUT«Bag.new-fp("a" => 1=>1,"b" => 1=>1,"c" => 1=>1)␤»
timotimo Fatalnix: sometimes i get mad at people who suggest that and say: "this has been invented 50 years ago and back then they called it 'processes'!"
Fatalnix timotimo: HAHA
that's a good one :D
lizmat the problem, I think, is caused by the slurpy of bag()
13:53 dalek left
lizmat it causes flattening of the bag on the inside 13:53
but that's not something we want
13:53 btyler joined, dalek joined, ChanServ sets mode: +v dalek
timotimo but seriously: we had processes, then people wanted more separation between the processes so they made virtual machines with operating systems inside, now they are trashing the operating system part and the only thing they've gained is pretty good separation of processes, although other solutions offer that, too (like lxc, or if you want it more lightweight namespacing) 13:53
nwc10 what did dalek want to tell us about?
timotimo nwc10: stuff in #moarvm
lizmat r: my $b=bag(<a b c>); bag($b).perl.say # whereas this works as expected
camelia rakudo fb7c07: OUTPUT«Bag.new-fp(Bag.new-fp("a"=>1,"b"=>1,"c"=>1)=>1)␤»
timotimo "computed goto dispatch" were 'is last words 13:54
Fatalnix for some reason every time I see rakudo I think Rcaputo
lizmat so how can I get the ($b) behaviour for the (bag(…)) case 13:55
or is that just the way it is?
fwiw, several spectests are failing because of this
I also tried to give Bag/Set a "method flat { self }", but that didn't make a difference 13:56
timotimo r: bag(bag(<a b c>).item).perl.say # expected something like bag(bag()), right?
camelia rakudo fb7c07: OUTPUT«Bag.new-fp(Bag.new-fp("a"=>1,"b"=>1,"c"=>1)=>1)␤»
lizmat timotimo: but is the .item really needed ?
timotimo not sure, haven't read the specs and don't really have an opinion 13:57
using the regular flattening/nonflattening mechanisms would be kind of nice, because a perl6 programmer would be used to that already
or do you mean to make bag auto-nonflatten?
lizmat the latter, but no success yet
14:01 bluescreen10 joined 14:07 thou joined, jnap joined 14:25 iSlug left
lizmat adjusts the failing spectests 14:27
14:29 locsmif joined 14:33 pernatiy joined 14:36 colomon joined 14:37 PacoAir left
lizmat r: say bag(bag()) # TimToady: should this give bag(bag()) or bag() ? 14:40
camelia rakudo fb7c07: OUTPUT«bag()␤»
lizmat problem is that with the slurpy sig of bag(), the inner bag() gets flattened before being added to the outer bag
r: say bag(set()) # TimToady: should this give bag(bag()) or bag() ?
camelia rakudo fb7c07: OUTPUT«bag()␤»
lizmat r: say set(bag()) 14:41
camelia rakudo fb7c07: OUTPUT«set()␤»
14:41 daxim left
lizmat r: say set(bag().item) # specifically itemizing works 14:41
camelia rakudo fb7c07: OUTPUT«set(bag())␤»
14:42 PacoAir joined 14:54 benabik joined
colomon lizmat: that's a rakudo bug 14:55
lizmat ok, so not much point me chasing this further right now 14:56
colomon bag is not supposed to flatten 14:59
lizmat you mean, .flat should just return self ? 15:01
bag.flat
or you mean *@args ?
r: bag { a => 1, b=> 2 }.elems.say # should this be 1 or 2 ? 15:05
camelia rakudo fb7c07: OUTPUT«2␤»
lizmat r: bag( { a => 1, b=> 2 }).elems.say # should this be 1 or 2 ? 15:06
camelia rakudo fb7c07: OUTPUT«1␤»
15:07 kaare_ joined
colomon I'm not sure about .flat. 15:07
but sets and bags are not supposed to flatten in a slurpy list. 15:08
that's how you create sets of sets, etc.
15:09 fhelmberger left
TimToady what he says 15:10
colomon apparently had TimToady explain this to him often enough that it finally stuck. ;) 15:12
TimToady++, I should have said 15:13
TimToady: don't know if you've seen it or not, but lizmat++ has made great strides at getting a full Set implementation on Rakudo.
TimToady has been watching :)
colomon r: set("a", 1, True).values.map({ .WHAT.asy }) 15:14
camelia rakudo fb7c07: OUTPUT«Method 'asy' not found for invocant of class 'Bool'␤current instr.: '' pc 162 ((file unknown):237105798) (/tmp/24AfOMYECD:1)␤called from Sub '' pc 315901 (src/gen/CORE.setting.pir:134087) (src/gen/CORE.setting:6869)␤called from Sub 'reify' pc 314890 (src/gen/CORE.s…
colomon r: set("a", 1, True).values.map({ .WHAT.say })
camelia rakudo fb7c07: OUTPUT«(Bool)␤(Bool)␤(Bool)␤»
colomon r: set("a", 1, True).keys.map({ .WHAT.asy })
camelia rakudo fb7c07: OUTPUT«Method 'asy' not found for invocant of class 'Str'␤current instr.: '' pc 162 ((file unknown):94) (/tmp/ndAXUgJ_sX:1)␤called from Sub '' pc 315901 (src/gen/CORE.setting.pir:134087) (src/gen/CORE.setting:6869)␤called from Sub 'reify' pc 314890 (src/gen/CORE.setting.p…
colomon r: set("a", 1, True).keys.map({ .WHAT.say })
camelia rakudo fb7c07: OUTPUT«(Str)␤(Int)␤(Bool)␤»
colomon there we go
TimToady it's possible that set() and bag() should use ** (lol) rather than * (slurpy), though that would WAT on use of parens for grouping inside the list 15:17
lizmat indeed, tried that, has all sorts of effects, like set( <a b c > ) not doing what you expect
TimToady right, so scratch that :) 15:18
either that, or we teach people to use |<a b c> all over the place... :/
lizmat r: set( my $a=set() ).perl.say # so I guess the $a provides an item context 15:20
TimToady but if we can get away with just teaching sets and bags to be a little more $-y in the absence of explicit unpacking, then let's stick with that approach
camelia rakudo fb7c07: OUTPUT«set(set())␤»
lizmat r: set( set().item ).perl.say # so I guess the $a provides an item context
camelia rakudo fb7c07: OUTPUT«set(set())␤»
TimToady sets and bags are more like scalar containers than like list containers, basically 15:21
benabik Perhaps we want set<a b c>? ;-)
lizmat well, I tried to make Set.flat { self }
TimToady std: set<a b c>
camelia std 27326bc: OUTPUT«===SORRY!===␤The 'set' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/m89OitjNpn line 1:␤------> set⏏<a b c>␤Potential difficulties:␤ Use of non-subscript <...> where postfix is expect…
lizmat but the slurpy would still flatten it
maybe *that* is the problem
that the slurpy doesn't call .flat on the parameters ? 15:22
15:22 bluescreen10 left
lizmat r: class A { method flat { say "flat"; self } }; sub a (*@a) { say @a }; a(A.new) # expected to see "flat" 15:25
camelia rakudo fb7c07: OUTPUT«A.new()␤»
lizmat if a slurpy would call .flat on all its parameters, we could have objects for themselves decide how they would want to be flattened 15:26
benabik r: sub a(*@a) { say @a.perl }; my @a =1,2,3; a(@a); a([1,2,3])
camelia rakudo fb7c07: OUTPUT«Array.new(1, 2, 3)␤Array.new([1, 2, 3])␤»
benabik lizmat: I think the A is an item, so it doesn't get flattened.
benabik finds flattening a little overly magical... 15:27
TimToady wonders if the binder is trying to do it by introspection instead
r: class A does Iterable { method flat { say "flat"; self } }; sub a (*@a) { say @a }; a(A.new) 15:30
camelia rakudo fb7c07: OUTPUT«===SORRY!=== Error while compiling /tmp/F7JpqhDSj2␤Iterable is not composable, so A cannot compose it␤at /tmp/F7JpqhDSj2:1␤------> ␤»
lizmat is Iterable ? 15:31
TimToady r: class A is Iterable { method flat { say "flat"; self } }; sub a (*@a) { say @a }; a(A.new)
camelia rakudo fb7c07: OUTPUT«No such method 'iterator' for invocant of type 'A'␤ in method reify at src/gen/CORE.setting:6760␤ in method reify at src/gen/CORE.setting:6764␤ in method reify at src/gen/CORE.setting:6764␤ in method reify at src/gen/CORE.setting:6860␤ in method reify at src/g…
TimToady r: class A is Iterable { method iterator { say "iterated"; self } }; sub a (*@a) { say @a }; a(A.new)
camelia rakudo fb7c07: OUTPUT«iterated␤No such method 'reify' for invocant of type 'A'␤ in method reify at src/gen/CORE.setting:6764␤ in method reify at src/gen/CORE.setting:6764␤ in method reify at src/gen/CORE.setting:6764␤ in method reify at src/gen/CORE.setting:6860␤ in method reify at…
TimToady looks like it's using .iterator, not .flat 15:32
lizmat aha!
15:34 zakharyas left
lizmat builiding without a method "iterator" 15:34
builiding with "method iterator { self } 15:39
15:44 REPLeffect joined, kaleem left
[Coke] nwc10: I would like to get the daily star stuff working again for rakudo.parrot, and also start running it for rakudo.jvm - will make it easier to see which bundled modules (which should be the same for both) break. (rakudo.jvm being slightly more fragile at this point) 15:50
lizmat adapting the iterator, fails because of missing reify 15:51
TimToady is it still declared Iterable?
lizmat adapting eager (which is even lower in the stack) to "eager { self }" doesn't do it either
i'm out of ideas and hungry 15:52
so cycling and dinner&
jnthn evening, #perl6
colomon o/
pmurias jnthn: evening, jnthn 15:57
15:58 SamuraiJack joined
jnthn o/ colomon, p, 15:58
um, pmurias
.oO( keyboards, how do they work... )
16:00 agre left, SamuraiJack__ left
dalek kudo-js: dfe5518 | (Pawel Murias)++ | / (2 files):
Pass nqp/t/rx_modifiers.

Implement bos and eos anchors, fix bugs.
16:04
kudo-js: 5c5a89d | (Pawel Murias)++ | / (2 files):
Pass nqp/t/qregex/rx_quantifiers.

Fix quantifiers.
diakopter giggles at parrot register names in PIR making it into both the moarvm and javascript backends of the rakudo regex compiler.. 16:05
16:09 prateeksha joined 16:10 domidumont left
[Coke] will be fun for the archaeologists. 16:10
jnthn We might just rename it in the MoarVM one :P 16:11
diakopter jnthn: yeah but it's there ... hundreds of times 16:12
TimToady is reminded of the longevity of car and cdr... 16:17
16:18 lowpro30 joined
diakopter blame pmichaud++'s ineffable regex compiler 16:20
jnthn
.oO( I think I may have eff'd at it once... :P )
16:21
Probably when working out what P11 does :P
masak oh hai from a train! \o/ 16:25
diakopter as long as your eggs and ham aren't also green
jnthn o/ masak 16:26
dalek kudo-js: e27dd5c | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
Stop using I18 as a variable name.
16:27 dmol joined
diakopter #perl6, where non-sequitors follow at least each other 16:29
16:31 domidumont joined, skids joined 16:35 prateeksha left 16:36 spider-mario left 16:38 PacoAir left, rindolf left 16:39 rindolf joined, dakkar left, PacoAir joined
donaldh is still struggling to golf the LexoticException in the panda tests 16:40
16:43 agre joined 16:44 alester joined
masak diakopter: a chain of non sequiturs is only as strong as its weakest non-link. 16:45
diakopter: you cannot step down into the same non sequitur twice.
diakopter: I'm sorry, I do not follow. 16:46
diakopter masak: you're following too closely; back off
16:46 bbkr joined
masak dresses up as a sad clown, and dives into a barrel of blueberries 16:46
diakopter too bad the barrel is inside out 16:47
masak if I cannot follow, I would like to subscribe to your newsletter.
diakopter (inside out barrel of blueberries means the entire universe is blueberries except inside the barrel) 16:48
masak .oO( this modus totally doesn't ponens )
diakopter: I read that as "except inside the Parrot".
diakopter ah yes, that's what I meant 16:49
masak I follow now, which frightens me a lot.
TimToady inside of a parrot, it's too dark to read a newsletter 16:50
masak TimToady: on the Internet, nobody knows you're a blueberry.
diakopter my god, it's full of blueberries
masak .oO( memier than thou )
diakopter
.oO( but daddy, I want an oompa loompa )
16:52
TimToady has to go smog a car, which is about the same as desmogging a car
and unpeeling a banana is the same as peeling it
masak .oO( better than snogging a car )
unpeeling a banana sounds really unappealing.
diakopter oh, you must've meant annealling a banana 16:53
16:53 cognominal left
TimToady Cation! Chemists at work! 16:53
smog chemists in this case, unless it's desmog chemists... 16:54
16:54 cognominal joined
TimToady afk & 16:54
afkr &
PerlJam I know I can always count on #perl6 for humor or confusion. Sometimes both simultaneously. 16:55
diakopter afkira &
PerlJam Though today it looks like just humor.
masak PerlJam: on the Internet, nobody knows you're a pair of non secateurs. 16:56
PerlJam pair? We're a whole tribe of non-secanteurs! 16:58
masak .oO( the carafe was a total non decantur ) 17:00
PerlJam: I may not be a secanteur, but I'm a devoted sixateur. 17:02
masak .oO( this classical computing machine is so non sequantum ) 17:03
diakopter masak: it's not von sequantum? 17:04
masak LOL
that joke was Neu, man. 17:05
masak .oO( I feel we have reached the capacity of the von annoy-man bottleneck )
diakopter moritz: you should put random pictures of chromatic in the irclogs with postcards "wish you were here" 17:06
PerlJam masak: Not as long as you're turing the channel
masak PerlJam: you mean turing the shannon.
diakopter "I thought you said you wanted me to curette the channel" 17:07
"er.. tourette" 17:08
masak .oO( "Radioactivity?" asked Marie, curiously... )
arnsholt starts his third branch for native call on JVM 17:09
masak diakopter: at least you didn't accidentally misspell "tourette" as "go stick your head inside a pig"
17:11 Rotwang joined
diakopter how would I have done that :( :( :( :( :( :( :( :( at least we're not debating the existing of irony 17:11
*existence
masak jnthn: you have to check this out: en.wikipedia.org/wiki/Tom_Swifty#Examples 17:12
Fatalnix Back!
soooo...
diakopter to life or reality?
masak diakopter: the existence of irony is not under question. people just disagree what it is, exactly :P
Fatalnix I was doing make install with the JVM rokudo:
is this supposed to happen?: make: *** [CORE.setting.jar] Killed
diakopter ...or the here and now?
PerlJam masak: some of my wood working tools are irony, but most are steely 17:13
diakopter masak: right, but if you can't identify it, it doesn't exist to you
PerlJam diakopter: you just have to ferric it out. 17:14
masak PerlJam: irony is going to a ferreteria and being attacked by marmots.
diakopter I read this headline and thought "well that's a job for moritz" www.cnn.com/2013/09/05/world/asia/c...index.html
arnsholt Fatalnix: You happen to be on Linux? 17:15
diakopter or at least marmalade
Fatalnix arnsholt: yep
17:15 pmurias left
Fatalnix Slackware to be precise 17:15
17:15 colomon left
Fatalnix wait, it doesn't have to do with LD_LIBRARY_PATH does it? 17:15
17:15 dmol left
Fatalnix because I have java installed in a strange location 17:16
arnsholt How much RAM do you have? It could be the OOM killer
diakopter
.oO( the moon? )
Fatalnix a gig on this box
jnthn Yeah, Killed implies it hit a resource limit...
Fatalnix I have 16 GB on my home desktop
but this is a work machine heh 17:17
arnsholt A gig might be a bit tight, I think
Fatalnix technically I could install it on my desktop then bring it in? 17:18
arnsholt Probably
diakopter masak: is your local ferreteria all-you-can-eat?
jnthn If the paths are the same, it *should* easily work.
Fatalnix yes
they both should be like, /usr/lib64/java/jre/lib/amd64
or whatever
for the runtime 17:19
and the jdk isnt far
yep
17:20 colomon joined
arnsholt jnthn: When we bundle JNA as a 3rd party lib, do we prefer it to be LGPL2.1 or Apache 2.0? 17:20
Fatalnix however I think my desktops running jdk6, so I'd need to upgrade it
diakopter masak: remind me to not visit twitter
masak diakopter: don't visit twitter.
diakopter masak: remind me to not visit twitter
jnthn arnsholt: Hmm...Apache is perhaps the liberaller 17:21
but, IANAL :)
17:21 locsmif_ joined
masak diakopter: don't visit twitter. 17:21
arnsholt I'll go for Apache for now then. It's dual licenced, so we can always change it over later, but it's always good to get it right the first time 17:24
masak diakopter: the closest local ferreteria from here is probably in Spain.
flussence fwiw I got rakudo-jvm to compile on 1GB, I just had to give it 16GB of swap... 17:25
masak o.O
diakopter did you try 15GB?
flussence I had a spare SD card and didn't feel like being fancy
(it'd probably be fine with 1-2GB swap, considering that's a 32bit CPU...) 17:29
sergot hi ! o/ 17:31
arnsholt sergot! 17:32
diakopter masak: remind me to not visit twitter 17:35
masak sergocie! \o/
diakopter oops, too late
masak diakopter: don't visit twitter.
arnsholt Is test failures due to missing chdir a known problem on NQP/JVM? 17:38
TimToady diakopter: don't forget to visit twitter 17:42
PerlJam jnthn: I've found the perfect residence for you I think: www.quora.com/What-Does-It-Feel-Lik...ans2577515
masak quora-- # obligatory sign-in :( 17:46
flussence the content isn't all that hard to get to for me (with almost everything except the bare html blocked... :) 17:48
arnsholt jnthn: What goes in src/vm/jvm/NQP/Ops.nqp and what in src/vm/jvm/QAST/Compiler.nqp? 17:52
benabik loves "Inspect Element" for the ability to add display:none to annoying things.
masak benabik: ooh 17:53
benabik Although that doesn't help when they don't include anything other than the first answer in the HTML. 17:54
quora--
arnsholt I've given up on Quora
jnthn arnsholt: NQP/Ops.nqp is things that are only relevant to NQP, not to Rakudo. 18:03
arnsholt Right. Cheers! 18:04
18:14 ajr joined
donaldh jnthn: any preference between adding nqp::setinputlinesep and changing nqp::readline to take a linesep ? 18:14
18:14 ajr is now known as Guest23900
donaldh readlinefh, I mean 18:15
18:15 Guest23900 is now known as ajr_
donaldh of course, readlineintfh and others would also need configurable linesep 18:15
jnthn donaldh: Is it sep or seps?
(Thinking \r\n vs \n) 18:16
donaldh string?
colomon rn: my $s = KeySet.new; $s<nothing>--; say $s; 18:17
jnthn Or, I guess it's not chomping, just hunting, so...
camelia rakudo fb7c07: OUTPUT«KeySet.new()␤»
..niecza v24-95-ga6d4c5f: OUTPUT«keyset()␤»
colomon rn: my $s = KeyBag.new; $s<nothing>--; say $s;
Fatalnix sep and rep?
camelia niecza v24-95-ga6d4c5f: OUTPUT«keybag()␤»
..rakudo fb7c07: OUTPUT«Could not find symbol '&Return'␤ in method <anon> at src/gen/CORE.setting:11550␤ in any at src/gen/Metamodel.nqp:2671␤ in any find_method_fallback at src/gen/Metamodel.nqp:2659␤ in any find_method at src/gen/Metamodel.nqp:946␤ in sub EXHAUST at src/gen/CORE.s…
Fatalnix reminds me of the 65c816 cpu
diakopter random-looking words in backtraces? 18:18
DRAGON 18:19
EASTER
TRANSMOGRIFIER
18:20 FROGGS joined
diakopter donaldh: let's make linesep a global 18:20
jnthn I think it needs to be per handle, no?
diakopter I think it should be a global named $/ 18:21
donaldh per handle, at least. possibly per operatioon
diakopter: are you trolling ;-)
diakopter half-heartedly 18:22
donaldh separate op if it is per handle? 18:23
so the setting is consistent across readlinefh calls for a given handle?
18:24 ajr_ left
flussence makes a mental note to use inscrutable all-caps synonyms more often in code to keep it interesting 18:24
18:24 ajr_ joined
donaldh or, is it included in every readline* op so that nqp handle and rakudo handle cannot get out of sync?? 18:24
arnsholt Oh, awesome! Opening random files in the git history was super easy with fugitive 18:26
nwc10 masak: www.quora.com/What-Does-It-Feel-Lik...ans2577515
or even www.quora.com/What-Does-It-Feel-Lik...ans2577515
if your client highlights that better.
benabik ack --cathy
ww 18:27
18:27 locsmif_ left
flussence
.oO( what's the escape sequence for reverse video... )
18:27
18:28 locsmif_ joined
masak nwc10: you rock. as opposed to quora-- 18:29
nwc10 IIRC mst told me that one
no idea how long before they figure out how to block it
masak PerlJam: nice! too bad it was Carlsberg, though :/ 18:30
jnthn donaldh: Hmm....good question. It feels odd to pass something that'll likely not change with every readline op...
masak: Calrsberg is probably the best beer in the world 18:31
18:31 SamuraiJack left 18:32 dmol joined
masak jnthn: there is that. 18:33
jnthn "there are several studies that indicate that being drunk can actually improve your creativity" - tbh, Carlsberg is sufficiently weak you'd need an unlimited supply to achieve drunk :P
18:35 sqirrel joined
alester benabik: ISN'T THAT THE BEST? 18:37
donaldh jnthn: I'll put in a new op.
benabik alester: I always love new ack options.
alester And all I did was add an issue to the GitHub tracker saying "I would like this"
and voila!
18:40 rindolf left
masak :) 18:42
arnsholt jnthn: I <3 how fiddling with the runtime stuff is SO much faster on JVM
jnthn++
18:46 agre_ joined 18:50 agre left
arnsholt JVM segfault! /o\ 18:56
[Coke] whoa. 18:57
dalek rl6-roast-data: 5b9d329 | coke++ | / (5 files):
today (automated commit)
19:02
[Coke] niecza is passing some todo'd tests, but also failing a new keybag test. 19:03
19:03 abnorman joined
[Coke] +S32-str/sprintf.rakudo.jvm aborted 145 test(s) - there's most of rakudo.jvm's backslide from yesterday 19:09
colomon :(
thought I added a skip for the changes I made to that sprintf.t...
[Coke]: my feeling is the new keybag test is wrong. 19:10
[Coke] gist.github.com/coke/6454695 - there's a bunch of passed todos in -all- the impls that should be unfudgable.
colomon I'm also getting niecza failures in S04-phasers/start.t, haven't looked into them yet. 19:11
[Coke] colomon++: I'll let you and lizmat++ duke that out.
colomon: I ran roast as of d32875f - not sure if you have a newer version.
19:12 dalek left
[Coke] has to drop off. l8rs. 19:12
19:13 dalek joined, ChanServ sets mode: +v dalek
donaldh gak. I should have checked parrot. It uses $!PIO.readline($sep) 19:19
do we want consistency with parrot ?
on JVM / nqp op signatures that is.... 19:20
FROGGS the nqp:: ops should have the same signature, yes 19:21
donaldh so that's an additional parameter to each nqp::readline* op rather than nqp::setinputlinesep, agreed?
19:22 domidumont left, zwut00 joined, zwut00 left
FROGGS I'd say so but you might ask jnthn for a decision 19:23
19:25 zwut00 joined 19:27 abnorman left
dalek rlito: 9643c62 | (Flavio S. Glock)++ | TODO-perlito5:
Perlito5 - TODO update
19:28
moritz \o
19:30 abnorman joined
donaldh jnthn: are you if I choose consistency with parrot with nqp::readlinefh(… , $sep) # seel last 10 mins of backlog 19:30
*happy*
donaldh has added setinputlinesep and is oscillating here :-) 19:31
benabik parameters > globals 19:32
jnthn The latter makes a bit more sense to me...
As in, it feels odd to look up and pass something every line we want to read.
benabik: Well, it's not so much global as on the iflehandle...
donaldh yes, nqp::setinputlinesep($iohandle, $sep) 19:33
benabik jnthn: Hm. I'm not sure if parameters and object state are well-ordered.
donaldh the encoding is currently an op
so the linesep as an op is consistent with that. 19:34
jnthn aye
donaldh The rakudo code is oriented around passing it as a parameter to readline though. 19:35
Grr. not consistent on parrot anyway.
dalek rlito: a0beddf | (Flavio S. Glock)++ | t5/01-perlito/080-array.t:
Perlito5 - tests - slice tricks
19:36
donaldh rakudo code does this for parrot: $PIO.encoding($encoding);
my str $line = $PIO.readline($sep);
Util r: class Z { has $.attr1; }; my Z $a .= new: attr1 => "A"; my Z $b .= new: attr1 => "A"; use Test; is_deeply($a, $b, "Have same attribute values"); 19:51
camelia rakudo fb7c07: OUTPUT«not ok 1 - Have same attribute values␤# got: Z.new(attr1 => "A")␤# expected: Z.new(attr1 => "A")␤»
Util "Not ok" ???
What should I be doing different to compare objects with Test?
Something besides is_deeply()?
masak I suspect is_deeply was never made to handle objects. 19:52
only arrays/lists and hashes.
&
moritz is_deeply simply uses eqv 19:54
and eqv uses identity semantis on objects it doesn't know about
Util Is there no known trick to achieving object comparison with the current Test.pm code? 19:55
moritz no 19:56
Util I would start writing such a sub for Test.pm, but I actually need it to also work when the objects are parts of Arrays or Hashes that are compared with is_deeply().
moritz: Thanks! I will give it some thought, as to how to improve Test.pm .
moritz Util: maybe src/core/Mu.pm method perl can serve as inspiration 19:57
Util: it does a walk through the attributes and .perl()s them
Util: comparing them isn't that far away :-)
Util looks... 19:58
moritz: Great idea! Thanks again!
20:03 xenoterracide_ joined
moritz r: gist.github.com/moritz/6455428 20:05
camelia rakudo fb7c07: OUTPUT«False␤True␤»
moritz ^^ for Util
Util moritz: Thanks twice; for the code, and for showing me camelia's URL-reading feature! 20:06
moritz it special-caseses public gist URLs 20:08
diakopter moritz: should add that feature to Perl 6 proper ;) 20:09
20:12 kbaker left
moritz diakopter: ... as soon as we have decided on how to mark value types, and only apply it to value types 20:17
diakopter moritz: ?? 20:19
moritz: oh, I meant the gist-special-casing :)
moritz oh.
:-)
benabik One of the more interesting features of Go is the import statement takes URLs, 20:21
diakopter benabik: I thought Perl 6's "use" had that capability 20:22
moritz it has, for authority. But that doesn't mean the runtime automatically downloads the dependency for you. 20:24
dalek ast: 2b8eda1 | (David Warring)++ | S29-conversions/ord_and_chr.t:
ord/chr tests on high chars > 0xFFF
20:29
20:33 arlinius joined 20:39 kaare_ left
skids takes note never to trust CA software written in Go :-) 20:47
20:47 sqirrel left 20:49 lelf joined 20:57 abnorman left 21:01 benabik left 21:02 REPLeffect left 21:03 skids left, clkao left, clkao joined 21:04 dayangkun left 21:05 skids joined 21:06 cognominal left 21:07 cognominal joined 21:10 skids left 21:17 dayangkun joined 21:19 arlinius left 21:24 itz joined 21:26 alester left 21:28 lowpro30_ joined 21:29 denis_boyun_ left 21:32 lowpro30 left 21:33 donaldh left 21:34 donaldh joined
donaldh .seen tadzik 21:36
yoleaux I saw tadzik 13:40Z in #perl6: <tadzik> oh, JVM may be shorter
lizmat r: my %h = set <a b o p a p o o> # should this work, or fail with odd number of elements ? 21:41
camelia rakudo fb7c07: ( no output )
lizmat r: my %h = set <a b o p a p o o> ; say %h # should this work, or fail with odd number of elements ?
21:41 locsmif_ left
camelia rakudo fb7c07: OUTPUT«("a" => "b", "o" => "p").hash␤» 21:41
21:42 EvanTeitelman joined
TimToady my %h = { :a, :b :o, :p, :a, :p, :o, :o }; say %h 21:48
r: my %h = { :a, :b, :o, :p, :a, :p, :o, :o }; say %h
camelia rakudo fb7c07: OUTPUT«("a" => Bool::True, "b" => Bool::True, "o" => Bool::True, "p" => Bool::True).hash␤»
TimToady it should end up like that, I suspect
21:49 arlinius joined
TimToady unless we decide to completely undo the %h assignment dwimmery on hashes in the list 21:49
which there's an argument for, since it encourages people to expect the wrong thing here:
r: my @a = [ 1,2,3,4,5 ]; say @a.elems 21:50
camelia rakudo fb7c07: OUTPUT«1␤»
TimToady r: my @a = [ 1,2,3,4,5 ][]; say @a.elems
camelia rakudo fb7c07: OUTPUT«5␤»
TimToady r: my @a = [ 1,2,3,4,5 ].list; say @a.elems 21:51
camelia rakudo fb7c07: OUTPUT«5␤»
TimToady r: my @a = |[ 1,2,3,4,5 ]; say @a.elems
camelia rakudo fb7c07: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&prefix:<|>' called (line 1)␤»
TimToady aww
lizmat $ perl6 -e 'set(set()).say' 21:53
set(set())
the trick is really by taking things away
masak \o/
lizmat++
lizmat as in: make Set *not* inherit from Iterable, and get rid of the iterator method altogether
masak yay 21:54
lizmat the consequence of that, is that %h = set() doesn't work
21:54 lowpro30_ left
lizmat %h := set() *does* 21:54
jnthn TimToady: Rakudo only knows what to do with | in the context of an argument list.
masak the what the what what?
lizmat: how does that I don't even
sets are unordered.
lizmat masak: and they still are
jnthn TimToady: Which is largely a result of me not knwing what to do with it in any other context. ;-) 21:55
lizmat well, at least as much as the *underlying* hash is
jnthn lizmat: Can you still iterate a Set?
lizmat as in, asking its .values or .keys ?
yes 21:56
colomon iterating the .values of a Set is Boring. 21:57
lizmat let me put it this way: does it pass the spectest: yes
masak \o/
wfm!
21:57 Rotwang left
jnthn masak: yeah but are the tests sane? :P 21:58
Anyways, lizmat++ 21:59
lizmat the only thing that doesn't work atm is .Str
jnthn hopes to have branes/tuits to catch up soon... :)
Weekend soon \o/
donaldh the socket tests are brutal on JVM. ~30s per test, launching sub-processes. 22:00
jnthn o.O
I wonder if we can somehow make it happen through the evalserver?
donaldh I've been thinking about spawning just the server, via a pipe, then running the client calls directly from the test code. 22:02
still, woohoo, closing in -->| |<-- Failed 3/41 subtests 22:03
jnthn donaldh++ \o/
donaldh Also implemented nqp::openpipe along the way, so will have a shot at IO::Pipe when I get a chance. 22:04
jnthn \o/
Very happy to see all of this happening. 22:05
Heading off for the night... o/
dalek p/donaldh-sockets: f2e5bb8 | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nqp/io/ (3 files):
donaldh first hack on sockets for JVM.
p/donaldh-sockets: bdce26a | (Donald Hunter)++ | src/vm/jvm/ (3 files):
Initial ops for socket IO using NIO.
p/donaldh-sockets: f93c49d | (Donald Hunter)++ | src/vm/jvm/ (6 files):
Added server socket and process pipe to IO.
p/donaldh-sockets: eccf03e | (Donald Hunter)++ | / (4 files):
Add nqp::openpipe tests (JVM only)
p/donaldh-sockets: 2990f78 | (Donald Hunter)++ | src/vm/jvm/ (5 files):
Add nqp::setinputlinesep for JVM.
22:05 jnap left
lizmat gnight jnthn! 22:06
donaldh 'night jnthn
also goodnight from me
lizmat having "multi method Str(Set:D --> Str) { say "Str"; ~ %!elems.values }" in class Set, why would this happen?
$ perl6 -e 'say Set.new.Str' 22:07
Set<8667138321660864054>
aka, the .Str in the Set class is *not* invoked, but the default from Any
22:08 EvanTeitelman left
lizmat hmmm… not sure which one get used now 22:10
22:11 donaldh left 22:15 s00pcan joined
masak lizmat: $ perl6 -e 'say set( set(), set() ).elems' 22:16
lizmat 2 22:17
masak :(
lizmat not good ?
masak I'm not sure.
lizmat the outer set contains 2 inner sets
masak but I think I can make a good case for 1.
sets are value objects.
lizmat why ?
ah, you mean, one empty set is the other 22:18
masak right.
they are isomorphic to their hash value.
in other words, there's really only one empty set.
lizmat $ perl6 -e 'say set().WHICH; say set().WHICH'
Set|-1241934011241020495
Set|-1241934013386517835
masak I'm aware that the case can be argued both ways here, though. 22:19
and it should probably be argued at the highest court, aka TimToady.
lizmat well, my original idea was to use typed hashes 22:20
that uses .WHICH for the keys
I basically re-used that idea for Sets/Bags
if that doesn't work, we need to think of something else, something probably much more expensice
expensive
well, in the case of the empty set, I guess we can work around that 22:21
as soon as we have ∅ for the canonical empty set 22:22
22:22 abnorman joined
lizmat we can have set() return that 22:22
but that wouldn't solve the pb of set( set(<a>), set(<a>) )
I will have to sleep on that one 22:23
22:24 agre_ left
timotimo sets are immutable? 22:24
lizmat yes, but KeySets aren't 22:25
22:25 REPLeffect joined
timotimo k 22:25
so if they are nested and an inner one changes: ouch
masak lizmat: AFAIU, set(<a>) has a hash code (aka .WHICH), so it'd hash the same way twice.
lizmat hash code? you mean .Str ? 22:26
22:27 Mouq joined
timotimo actually, putting mutable things into a set is inherently a problem 22:27
masak when I say "hash" or "hash code" in this situation, I mean "something that could be used as a hash key".
timotimo: correct.
timotimo: it's a bit of a DIHWIDT thing.
timotimo i agree
lizmat masak: ah, ok
masak timotimo: if you have a mutable type with hashes that change as your object mutates, and you put those in a set-like thing, your foot is basically solidly shot at. 22:28
lizmat anyway, with these changes I get ~30 TODO's passing on the set tests
masak timotimo: but we also believe that Perl 6 programmers are grown-ups, who can be told such a thing, and not throw themselves off cliffs.
at least not for reasons other than -Ofun.
diakopter *throw* 22:29
22:29 benabik joined
masak descends, wordlessly 22:31
timotimo indeed
masak.new.throw? 22:32
masak Python strikes a pretty good balance there, fwiw.
tuples are hashable. lists (arrays) are not. hashes are not. sets are.
timotimo right
masak the concept hashable has privileges (you can use the object as a hash key) and responsibilities (it's immutable, so you cannot change it). 22:33
lizmat so: KeySet.new( KeySet.new(), KeySet.new() ).elems, 1 elems or 2 elems ? 22:34
masak I suspect Perl 6 will end up having a social convention there. ("if you want to hash the objects, don't allow them to change in such a way that the hash changes")
lizmat: what I just wrote above.
lizmat: there's a case could be made that it's (socially) not-a-good-idea to even hash KeySets, because they are mutable. 22:35
lizmat right,ok
masak you can use KeySets for lots of things, but hashing them is not one of those things.
it's a bit like pushing a commit and then rebasing it :)
masak has been teaching Advanced Git today
timotimo is sumbodules advanced git or super-advanced git? 22:36
masak it's in that course.
22:39 skids joined 22:41 ajr_ left 22:45 EvanTeitelman joined 22:47 PacoAir left, benabik left 22:53 jnap joined
dalek kudo/nom: d5b47b7 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Code esthetics on set() and bag()
22:53
kudo/nom: a426d5a | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Set/Bag are no longer Iterable, Any (implicitely so)

This solves the problem of sets/bags being flattened at most places
ast: 6825fb0 | (Elizabeth Mattijsen)++ | S0 (6 files):
(Un)Fudges for the latest Set/Bag code
22:54
22:55 fridim_ joined
lizmat will sleep on the issues masak++ and TimToady++ brought up 22:55
gnight #perl6!
23:01 tadzik joined
tadzik I... I disappeared :| 23:01
23:02 EvanTeitelman left
TimToady the identity of a mutable object is just its container .WHICH, same as === treats it 23:04
you can have a mutable object in a set, but it's the set that contains that mutable object, and the set doesn't care whether the mutable object changes, only that the object in the set is the same object 23:05
diakopter is there a method to recalculate the unique set if the object's identity changes? 23:06
TimToady an object's identity must not change
masak TimToady: agree so far, I think.
TimToady: what about the .WHICH of Set objects? does it have reference semantics, or value semantics? 23:07
TimToady if the GC moves an object around, you can't depend on its location as its identity
diakopter there's no such thing as mutable objects?
masak diakopter: it can be mutable without the *identity* changing.
diakopter .WHICH's output can't change on an object? 23:08
TimToady shouldn't
masak that's how I understood it.
which makes sense, since that's the thing we use for hashing.
diakopter at what point in the BUILD/new process can this be enforced? 23:09
TimToady it's exactly the same thing that === uses for comparison of identies, either value or object
diakopter *start being enforced
s/enforced/relied upon/
TimToady hopefully from the time the repr creates the actual scaffolding for the BUILD submethods to fill in 23:11
but I could be argued into the other extreme too, I suppose
diakopter when new returns?
TimToady however, it seems to me that self-caching objects would like to know their identity early 23:12
diakopter it's just that maybe WHICH should know to fail before the identity-determining state is finalized 23:13
TimToady otoh, self-caching objects will probably tend to be value-based rather than ref-based
but if value-based, you have to complete the value first
so maybe it's on return from .bless that we guarantee identity
23:16 dmol left
diakopter "$a.foo" should warn me that I might have meant "$a.foo()" 23:17
23:17 REPLeffect left
tadzik hoelzro++ # very nice blogpost 23:19
23:32 pernatiy left
masak tadzik: url? 23:38
23:44 jnap left
flussence hoelz.ro/blog/perl-5-internals-part-two 23:45
masak 'night, #perl6 23:58