Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-02-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 masak 'night, #perl6
00:01 FROGGS gnight all
00:03 not_gerd night
00:03 not_gerd left #perl6
00:03 uvtc
00:13 uvtc left #perl6
00:13 [Coke] is rakudo using any of the runtime modules provided by parrot?
00:30 thou joined #perl6
00:37 lue joined #perl6
00:44 dalek rakudo-js: 96b8ae7 | (Paweł Murias)++ | src/QAST/Compiler/JavaScript.nqp:
00:44 dalek rakudo-js: mangle the new identifier
00:44 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/96b8ae7f17
00:47 dalek perl6-most-wanted: ee48cf8 | (Geoffrey Broadwell)++ | most-wanted/ (2 files):
00:47 dalek perl6-most-wanted: Start filling out most-wanted files based on Perl 6 Ecosystem Most Wanted Modules list
00:47 dalek perl6-most-wanted: review: https://github.com/japhb/perl6-most-wanted/commit/ee48cf80ea
00:50 PacoAir joined #perl6
01:24 PacoAir left #perl6
01:26 dalek rakudo-js: b3325bc | (Paweł Murias)++ | run (2 files):
01:26 dalek rakudo-js: Pass qast_stat.t.
01:26 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/b3325bc51a
01:27 PacoAir joined #perl6
01:36 dalek roast: 3972c4d | (Solomon Foster)++ | S02-types/set.t:
01:36 dalek roast: Some basic tests for .set method.
01:36 dalek roast: review: https://github.com/perl6/roast/commit/3972c4df78
01:36 dalek niecza: 81d9dca | (Solomon Foster)++ | lib/CORE.setting:
01:36 dalek niecza: Add Hash.set and Hash.bag.
01:36 dalek niecza: review: https://github.com/sorear/niecza/commit/81d9dca7c9
01:37 jeffreykegler joined #perl6
01:43 TimToady Yes, set should not flatten in list context, even though hash does
01:44 TimToady otherwise it's nearly impossible to make a set of sets
01:49 colomon rn: say 42.set
01:49 p6eval rakudo a3869a, niecza v24-21-g4c8f264: OUTPUT«set(42)␤»
01:50 dalek specs: 13a275e | larry++ | S32-setting-library/Containers.pod:
01:50 dalek specs: sets and bags don't flatten in list context
01:50 dalek specs: review: https://github.com/perl6/specs/commit/13a275ea39
01:50 TimToady rn: say <a b c>.set
01:50 p6eval rakudo a3869a, niecza v24-21-g4c8f264: OUTPUT«set(a, b, c)␤»
01:50 colomon ?"
01:50 colomon sorry, was sorting socks on my keyboard.
01:51 TimToady that's a new one
01:51 * colomon hopes set(a, b, c) was the answer TimToady hoped to get.
01:51 TimToady yes
01:51 colomon \o/
01:51 TimToady rn: (1,2,3).set
01:51 p6eval rakudo a3869a, niecza v24-21-g4c8f264:  ( no output )
01:51 TimToady rn: say (1,2,3).set
01:51 p6eval rakudo a3869a, niecza v24-21-g4c8f264: OUTPUT«set(1, 2, 3)␤»
01:51 colomon I haven't added it to the spec yet, but I added it to both rakudo and niecza and roast.  :)
01:51 TimToady \o/
01:52 TimToady thanks
01:53 colomon I'd written a piece of code that looked like (set @hashes).map(*.Str).sort.join(",") || "<none>"; and it just seemed really stupid that I couldn't say @hashes.set.map(*.Str).sort.join(",") || "<none>";  And I remembered thinking that for something before, too.
01:56 TimToady rn: say (1,2,3).Set
01:56 p6eval niecza v24-21-g4c8f264: OUTPUT«Unhandled exception: Unable to resolve method Set in type Parcel␤  at /tmp/9cIkREXo2w line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4230 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4231 (module-CORE @ 580) ␤  at /home…
01:56 p6eval ..rakudo a3869a: OUTPUT«No such method 'Set' for invocant of type 'Parcel'␤  in block  at /tmp/ryQh_CEK28:1␤␤»
01:57 TimToady me wonders if it should be capitalized
01:57 TimToady especially since there's another meaning to the word "set"
01:57 benabik +1
01:57 benabik One of these things are not like the others:  *.Int, *.Str, *.set
01:58 TimToady well, there's .list
01:58 benabik Does it return a List?
01:58 TimToady though taking the .set method will discourage people from writing getters/setters :)
01:59 pmurias TimToady: so what's the decision on Array.delete only exposing it on implementations which use sparse array internaly doesn't seem to portable
01:59 pmurias s/Array.delete/Array.delete?
02:00 TimToady the semantics should stay the same regardless of how it's implemented underneath
02:00 TimToady if an implementation can't support NULL poking, then it should probably support it via a real sparse array instead
02:01 TimToady otoh an argument could be made that this may negatively affect performance on non-sparse arrays
02:04 diakopter what's a heuristic one could use to detect when to switch to a sparse backing array
02:04 TimToady well, the first delete is a big clue :)
02:05 diakopter ok, sounds good to me
02:05 benabik @a[$x] = $y, when $x >> +@a
02:05 TimToady but merely tracking how much wasted space there is would be a kloo
02:06 benabik (Well, when $x >> @a.allocated_size)
02:08 FROGGS_ joined #perl6
02:09 pmurias TimToady: on the other hand we could have a sparse array which just avoids storing Mu, and exposes a regular interface
02:11 TimToady we could, but non-sparse arrays would tend to go all n-log-n-y on access
02:12 TimToady they might do that anyway if you're using a lockless structure, but it's really a choice of the implementor
02:12 TimToady we just need to make sure the API is consistent, and hopefully provides sufficient info to optimize where that's important
02:13 TimToady these are the sorts of implementation decisions that we should try to keep from leaking into our abstractions
02:14 pmurias TimToady: n-log-n-y?
02:14 benabik Non-sparse arrays go n-log-n on access?  Shouldn't non-sparse element access be O(1)?
02:14 diakopter benabik: (that's what I would imagine)
02:14 diakopter (based on my naive first guess at imagined implementation)
02:15 TimToady yes, they *should* be O(1), that's my point :)
02:15 TimToady but merely swapping in a sparse implementation might not do that
02:15 TimToady I mean instead of having a flat implementation
02:16 TimToady I was talking about an implementation that always uses a tree for arrays, which would be suboptimalish in that way
02:17 TimToady P5 has done very well with a bias towards flat arrays, and emulating a bit of sparseness by null poking
02:17 diakopter null poking?
02:18 TimToady what P5 does on delete from array
02:18 TimToady and exists just says whether there's a pointer at that index
02:20 TimToady arrays and hashes are conceptually different, but in practice they mush into each other a bit, depending on the underlying container's semantics
02:21 TimToady however, in P6, it's an absolute that .[] is always 0 based, and we use .{} aliasing (according to S09) if we want negative indices
02:41 timotimo i think tomorrow i shall play around with zmq :)
02:42 timotimo see if i can get a simple connection working with ipython
02:42 timotimo did not notice anything missing so far
02:42 timotimo what are the deciding factors for what gets put into rakudo star?
03:03 benabik Actually, ideally a sparse array is no worse than log n on access.  (Not that it really matters, just occurred to me.)
03:05 timotimo right, because that would be a tree, right?
03:11 alec__ joined #perl6
03:20 stevan__ joined #perl6
03:24 stevan_ joined #perl6
03:53 dalek niecza: 0520c7c | (Solomon Foster)++ | lib/CORE.setting:
03:53 dalek niecza: Add another to-set multi to resolve conflict.
03:53 dalek niecza: review: https://github.com/sorear/niecza/commit/0520c7c7a6
04:00 dalek roast: 38dd58f | (Solomon Foster)++ | S02-types/bag.t:
04:00 dalek roast: Some tests for .bag.
04:00 dalek roast: review: https://github.com/perl6/roast/commit/38dd58fedf
04:15 happydude joined #perl6
04:57 preflex joined #perl6
05:32 xinming joined #perl6
05:35 daniel-s joined #perl6
06:04 preflex joined #perl6
06:57 dalek specs: 3b88fdf | larry++ | S02-bits.pod:
06:57 dalek specs: autopriming doesn't look inside metaops
06:57 dalek specs: review: https://github.com/perl6/specs/commit/3b88fdfa31
07:10 GlitchMr joined #perl6
07:12 quester joined #perl6
07:22 proller joined #perl6
08:06 pupoque joined #perl6
08:28 bluescreen100 joined #perl6
08:33 domidumont joined #perl6
08:50 domidumont joined #perl6
09:14 erkan joined #perl6
09:18 immortal joined #perl6
09:22 shevy joined #perl6
09:23 shevy left #perl6
09:25 moritz jnthn: rakudo/nom segfaults while compiling BOOTSTRAP
09:25 moritz (on 64bit)
09:27 quester left #perl6
09:32 erkan joined #perl6
09:32 wk_ joined #perl6
09:33 FROGGS "morning"
09:35 rindolf joined #perl6
09:36 FROGGS moritz: I get a $past that has $past.isa(QAST::Op) && $past.op eq 'callmethod' && $past.name eq 'list', then I could wrap it in an QAST::Op that calls map, right?
09:43 kaare_ joined #perl6
09:44 Psyche^ joined #perl6
09:52 moritz FROGGS: you could, yes
09:54 FROGGS k, thanks
09:58 snearch joined #perl6
10:29 nwc10 is Array.at_pos() part of the spec, or an implementation detail?
10:31 sorear I think it's intended to be spec once there's consensus it's solid
10:31 nwc10 OK. It accepts negative indices. [] doesn't
10:31 sorear ISTR jnthn talking about at_pos as being the preferred point for module authors to hook into indexing
10:32 arnsholt Yep. There're some complicated bits like slicing that [] implements in terms of at_pos, so that other people don't have to
10:37 nwc10 next stupid question - is there a way to monkey-patch methods into Array, so that I can test them without recompiling the setting?
10:37 arnsholt I think the usual way is to subclass it and test your implementation that way, before moving it into the setting
10:38 moritz nwc10: sure, you can write   use MONKEY_TYPING; augment class Array { your methods here }
10:38 moritz nwc10: and then run your tests with it from the same file
10:39 nwc10 thanks
10:39 moritz that's how I developed many built-ins that ended up in the setting
10:39 nwc10 works on my machine
10:39 moritz you just can't replace existing methods that way
10:39 moritz (if the method isn't used for bootstrappy purposes, you can delete it once from the setting, recompile and them monkey-patch it in again)
10:46 nwc10 r: my @a = "Q"; my $b := @a.at_pos(-1); say @a; $b = "Pi"; say @a
10:46 p6eval rakudo a3869a: OUTPUT«Q␤Pi␤»
10:46 nwc10 so, binding to -1 works, and can be assigned to. But direct assignement:
10:46 nwc10 r: my @a = "Q"; @a.at_pos(-1) = "Pi"; say @a;
10:46 p6eval rakudo a3869a: OUTPUT«ResizablePMCArray: index out of bounds!␤  in block  at src/gen/CORE.setting:6312␤  in block  at /tmp/pVWoo4iDNp:1␤␤»
10:47 moritz I think at_pos supporting negative arguments is a misfeature
10:47 nwc10 it's easier to reimplement if it doesn't
10:48 nwc10 and I'm out of my depth to explain why I can bind then assign, but can't assign directly
10:49 moritz IMHO it's the job of postcircumfix:<[ ]> to make sure that sane arguments are passed to at_pos
10:49 nwc10 that, I think, already throws an exception for negative arguments
11:05 jnthn morning o/
11:05 jnthn Well, not quite, but...
11:06 jnthn moritz: Odd about the SEGV...did you (or could you try) make realclean in NQP and Rakudo just in case?
11:06 jnthn moritz: I note that p6eval seems to have managed to build it...
11:13 geekosaur joined #perl6
11:17 masak afty, #perl6
11:19 sorear o/ masak
11:25 wk_ joined #perl6
11:29 not_gerd joined #perl6
11:30 not_gerd o/
11:30 masak \o
11:31 not_gerd Is this correct: Rakudo depends on PCT via PAST/POST, but not on PGE and TGE
11:32 masak Rakudo used to depend on PCT via PAST/POST.
11:32 jnthn Not, it doesn't use PAST or POST any more.
11:32 masak now nqp handles those bits, using QAST.
11:32 not_gerd good
11:32 jnthn Right, and POST was replaced with PIRT
11:32 jnthn Which saved a good bit of memory :)
11:32 masak it's correct that Rakudo doesn't use PGE anymore. nqp handles that, too.
11:33 masak I'm not aware that Rakudo ever used TGE.
11:33 jnthn Maybe it did before it was Rakudo.
11:33 jnthn :)
11:33 masak maybe.
11:33 masak I've never seen TGE being used anywhere. my impression is that it was something XSLT-like. but I may be wildly wrong about that.
11:34 jnthn Attribute grammar based, iirc
11:35 * not_gerd is trying to rip out stuff from parrot
11:35 jnthn moritz: Just done a fresh build of everything here and it worked. If it is still segfaulting for you, a bt would help.
11:37 nwc10 oh yes, worked on a complete clean fresh build for me on x86_64 Linux
11:37 nwc10 forgot to say
11:38 masak jnthn: oh, right. attribute grammar rings a bell.
11:39 masak which means, again IIUC, that values are calculated based on fairly fluid dependency relations up and down the tree.
11:51 nwc10 jnthn: if at_pos didn't accept negative indices, life would be easier
11:51 dalek nqp: 6b358a3 | jnthn++ | src/core/NQPRoutine.pm:
11:51 dalek nqp: Toss now-unrequired clone callback legacy code.
11:51 dalek nqp: review: https://github.com/perl6/nqp/commit/6b358a3dcc
11:51 dalek nqp: f92cd68 | jnthn++ | src/QAST/Operations.nqp:
11:51 dalek nqp: Add an nqp::escape that maps to pir::escape.
11:51 dalek nqp: review: https://github.com/perl6/nqp/commit/f92cd68130
11:51 dalek nqp: 3f27005 | jnthn++ | src/stage0/ (9 files):
11:51 dalek nqp: Update bootstrap.
11:51 dalek nqp: review: https://github.com/perl6/nqp/commit/3f27005e4c
11:51 dalek nqp: 26d0d0f | jnthn++ | src/QAST/ (2 files):
11:51 dalek nqp: Get QASTNodes free of pir::.
11:51 dalek nqp: review: https://github.com/perl6/nqp/commit/26d0d0f9b7
11:51 jnthn nwc10: I...wasn't terribly aware it did
11:52 nwc10 well, it passes them all through unchecked to Parrot
11:52 jnthn nwc10: Oh, does it work because the underlying nqp::atpos call it makes will make it work?
11:52 nwc10 which does the Perl 5 thing
11:52 jnthn Yeah
11:52 nwc10 there is no spec for at_pos, is there?
11:52 jnthn r: my @a; @a[-1] = 42
11:52 p6eval rakudo a3869a: OUTPUT«Cannot use negative index -1 on Array␤  in method <anon> at src/gen/CORE.setting:10518␤  in  at src/gen/Metamodel.pm:2488␤  in any find_method_fallback at src/gen/Metamodel.pm:2476␤  in any find_method at src/gen/Metamodel.pm:925␤  in block  at /tmp/WQ5CfdWT6J:1␤␤»…
11:52 nwc10 jnthn: this one seems a bit special:
11:53 nwc10 rn: my @a = "Q"; my $b := @a.at_pos(-1); say @a; $b = "Pi"; say @a
11:53 p6eval niecza v24-23-g0520c7c: OUTPUT«Q␤Unhandled exception: Writing to readonly scalar␤  at /tmp/5VIpPlG9bW line 1 (mainline @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤  at /home/p6eval/niecza/…
11:53 p6eval ..rakudo a3869a: OUTPUT«Q␤Pi␤»
11:53 nwc10 but if I assign directly:
11:53 nwc10 rn: my @a = "Q"; my $b := @a.at_pos(-2); say @a; $b = "Pi"; say @a
11:53 p6eval niecza v24-23-g0520c7c: OUTPUT«Q␤Unhandled exception: Writing to readonly scalar␤  at /tmp/R97BJDqmX7 line 1 (mainline @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤  at /home/p6eval/niecza/…
11:53 p6eval ..rakudo a3869a: OUTPUT«Q␤ResizablePMCArray: index out of bounds!␤  in block  at src/gen/CORE.setting:6312␤  in block  at /tmp/hf6AmK3vH1:1␤␤»
11:53 nwc10 oops
11:53 jnthn at_pos ain't meant to be called directly really
11:53 nwc10 this one:
11:53 nwc10 rn: my @a = "Q"; @a.at_pos(-1) = "Pi"; say @a;
11:53 p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Writing to readonly scalar␤  at /tmp/iUM6cmaxiq line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤  at /home/p6eval/niecza/li…
11:53 p6eval ..rakudo a3869a: OUTPUT«ResizablePMCArray: index out of bounds!␤  in block  at src/gen/CORE.setting:6312␤  in block  at /tmp/ZaPQ0bu_mB:1␤␤»
11:54 jnthn @foo[...] calls postcircumfix:<[ ]>
11:54 nwc10 so, direct assignment is a bounds failure, but I can bind to it and then assign without error
11:54 nwc10 I'd figured out that @foo[...] called that, by using ack to find the error message :-)
11:55 jnthn Anyway, I suspect that the oddness is 'cus at_pos (the method) was written expecting to never be passed anything negative.
11:55 nwc10 ah OK.
11:55 jnthn Which it never is in normal use thanks to postcircumfix:<[ ]>
11:55 nwc10 I shall try refactoring it to treat anything negative as, um, wrong-in-some-fashion
11:56 jnthn Yeah, but if you do that let's consider moving the check out of postcircumfix maybe?
11:56 jnthn Doing it twice over is wasteful.
11:56 nwc10 good point
11:57 nwc10 I might be abducted by the requirement to go out with the toboggan
11:57 jnthn ;)
11:57 jnthn The other thing is that we can easily make the JVM impl of nqp::atpos etc just reject negative indices rather than trying to make sense of them, and declare that as the expected behavior.
11:58 jnthn (Then find a way to make it happen on Parrot.)
11:58 nwc10 My gut feeling is that negative indices (and sparseness, if desired) belong in the layer that implements the Perl 6 compiler
11:58 nwc10 and the NQP level should be non-negative non-sparse only
11:58 nwc10 but this is a gut feeling
11:59 jnthn Well, you aren't allowed negative indices in Perl 6 really.
11:59 jnthn @a[-1] is an error, you're meant to write @a[*-1]
11:59 nwc10 I sort of inferred that from Any.pm's grumpiness :-)
12:05 not_gerd joined #perl6
12:12 * moritz idly ponders an ORM where you have roles instead of result classes, and when you do a join, it mixes in the roles that correspond to each table
12:13 * jnthn idly ponders than "ORM" is Swedish for "SNAKE" :)
12:14 jnthn *that
12:14 moritz .oO( pyhton ORM )
12:17 moritz though I guess when most of your tables have a last_changed timestamp, you'd get either a silent overwrite or a coposition conflict
12:17 nwc10 OK, is this a rakudobug
12:17 nwc10 r: my @a = "Q"; @a.at_pos(-1) = "Pi"; say @a;
12:17 p6eval rakudo a3869a: OUTPUT«ResizablePMCArray: index out of bounds!␤  in block  at src/gen/CORE.setting:6312␤  in block  at /tmp/pAjocXUetQ:1␤␤»
12:17 nwc10 r: my @a = "Q"; say @a; @a.at_pos(-1) = "Pi"; say @a;
12:17 p6eval rakudo a3869a: OUTPUT«Q␤Pi␤»
12:17 nwc10 ie, adding say @a; makes everything peachy
12:19 jnthn nwc10: It's just a consequence of nothing else downstream of at_pos expecting a -1
12:20 jnthn nwc10: Of note, I suspect it's the "make sure we reified up to n elements" thing
12:21 jnthn And reificiation is memoized, so the say makes it happen so it can output the array and then the data is luckily in the right place when the unexpected -1 indexing happens.
12:21 nwc10 OK. so this is all suggesting that life is simpler if at_pos does the negative index sanity check
12:22 jnthn Anyway, I think the answer to all of this is "passing negative numbers to at_pos is a bad idea" :)
12:22 jnthn Yeah.
12:22 nwc10 doctor doctor, it hurts if I do this
12:22 nwc10 well, don't do that then
12:23 jnthn Right, it's one of those. Everyday use doesn't run into this since @a[-1] already catches it
12:30 jurosz joined #perl6
12:42 arnsholt r: say "ø".bytes
12:42 p6eval rakudo a3869a: OUTPUT«No such method 'bytes' for invocant of type 'Str'␤  in block  at /tmp/soOR_c1cPr:1␤␤»
12:42 arnsholt Oh, durr. Of course there's no .bytes in Str
12:49 arnsholt moritz: I want a DB that is an object store, rather than a relational one =)
12:56 arnsholt timotimo: You're just timo on GitHub right?
12:57 moritz arnsholt: if that DB supports SQL-like queries, schemas and transactions, I'm all for it :-)
12:58 arnsholt Yeah, that's always been the problem IIRC
13:08 moritz I honestly don't understand the "schemaless" approach. For most applications the code has to make assumptions on the structure of the data (and if not, a simple key/value store is likely sufficient)
13:09 moritz I mean, I like duck typing in my code, but in the data it always felt way more dangerous
13:10 moritz if I have made a type error that wasn't caught due to duck typing, I fix it an recompile. Done. But when I made type errors in the data (that weren't caught because of lack of a schema), then recompiling my code isn't enough to rectify the problem
13:12 jnthn I think having a schema *somewhere* is good, the issues arise when you end up with it in two places or zero places. If you're working in a language that guides you to specify types statically, then that serves as a kind of schema and thus keeping it sync'd with a SQL server's view of the schema is the pain point. In a more dynamic language, you don't get that duplication.
13:13 jnthn In other words, if you have yoru schema defined/statically checked in code, then a schemaless store can still be pretty safe.
13:13 moritz well, if your language is statically typed, and you change the types, you must still take care of migrating the data
13:13 jnthn Sure, but you gotta take care of what when changing any schema :)
13:15 jnthn Granted, if the same thing owns the data and the schema then that can make things easier.
13:15 moritz so we'd really need some way that the data store and the application can automatically sync or check their data models
13:18 jnthn One approach (being used fairly well on some $dayjob client I sometimes do stuff with) is to specify the migrations in code. The database is given a version number; if at application startup the version is incorrect, it applies the changes.
13:18 not_gerd left #perl6
13:18 moritz that sounds sane
13:19 moritz which basically means that the application has a model layer which is the only thing ever allowed to write to the database
13:40 pupoque joined #perl6
13:46 fijal joined #perl6
13:50 fijal hi
13:51 arnsholt 'lo fijal
13:51 arnsholt jnthn: I think that's the RoR way (or at least possible to do in RoR)
13:53 fijal jnthn: hi, I think RaceConditions hinted me that you might want to have some questions about PyPy
13:53 jnthn arnsholt: Perhaps so. This was a .Net shop. :)
13:53 fijal but maybe I misunderstood
13:56 jnthn fijal: Don't have anything just yet. At the moment I'm working on a JVM backend for NQP, but at least half the work is actually spotting the leftover places where things were coupled too tightly to Parrot. I'm interested in targeting more things in the future, I'm open to looking at PyPy, but my plate is a bit too full to think about that right now. :)
13:57 arnsholt jnthn: Yeah, I figured they might be =)
13:57 jnthn arnsholt: Yes, there's LOADS of .Net here in Sweden :)
13:57 jnthn So I encounter it a lot.
13:59 fijal jnthn: ok
13:59 fijal jnthn: I can also tell you why JVM is a bad idea, but I'm not sure you're interested in hearing that
13:59 arnsholt Yeah, I suspect there's a fair bit of .Net this side of the border as well, 'cept I don't see a lot of it, being in academia and all
13:59 jnthn fijal: It's not really about good/bad ideas, it's about trade-offs.
14:00 fijal well, JVM is a bad platform for dynamic languages
14:00 fijal compared to e.g. writing an interpreter in C
14:00 jnthn What makes it especially bad?
14:01 fijal it's too tied to java
14:01 fijal RPython is a much better choice (but you would expect me to say that)
14:02 jnthn :)
14:02 fijal but they told you a lot of lies
14:02 fijal of course it always depends
14:03 fijal but building stuff in RPython is both easier and gives you a better result
14:03 geekosaur having been at least on the soutskirts of several projects trying to use the jvm for not-java, I can vouch for that to some extent; if it's not a java feature, it's porly supported and may require a lot of hackery
14:04 geekosaur *poorly
14:04 jnthn OTOH, Java doesn't do much, and as a result the JVM doesn't really do a great deal either. There is something to be said for having a small number of primitves and doing them really fast. OTOH, there are places where the fact the VM doesn't directly provide what's needed makes it hard to do well and/or impossible to get as fast as a VM that did offer the thing natively.
14:05 fijal well
14:05 fijal but I claim we solved this
14:07 fijal and your performance expectations are a bit off probably
14:08 fijal because say jruby puts lots and lots of effort working around java limitations
14:08 fijal or JVM
14:08 jnthn My performance expectations are "better than Parrot". I think we'll get that. :)
14:08 geekosaur there is that...
14:08 fijal hehe
14:08 fijal ok
14:08 fijal but then, why JVM?
14:09 fijal and of course why not PyPy?
14:10 geekosaur I think someone's poking at pypy (inspired by topaz) --- but the jvm is there and widely deployed
14:10 fijal as is posix...
14:11 moritz POSIX doesn't come with a GC and JIT compiler
14:11 PacoAir joined #perl6
14:11 geekosaur from my* pov there's a smallish gap petween parrot and pypy due to deployment issues, and a much larger gap between those and clr/jvm
14:11 fijal moritz: pypy does
14:11 moritz fijal: yes, but POSIX doesn't.
14:11 fijal geekosaur: er, I think you're missing the point
14:11 jnthn Partly familiarity, partly that I think there should be the option to use some kind of Perl on the JVM, partly because it has a real-world-tested threads implementation and we need to get our story straight on those.
14:11 geekosaur and I hink *you* just missed the point
14:11 fijal geekosaur: pypy does compile stuff to native executable
14:11 fijal there is no "deployment problem"
14:12 geekosaur oh, youre stuck on performance
14:12 moritz fijal: parrot is also used on POSIX systems, but it's not widely deployed either
14:12 geekosaur that's not the deployment problem
14:12 geekosaur let me rephrase that:  how many people even know about pypy?
14:12 fijal moritz: you need parrot to run stuff though, right?
14:12 geekosaur vs. how many know about the jvm and use it daily?
14:12 fijal geekosaur: why do you care?
14:12 geekosaur ...
14:12 fijal geekosaur: if you get an executable that's posix-compliant?
14:13 fijal as in it's not the same
14:13 geekosaur hello, perl6 is already seen as being backed into a pointless niche.  rebasing on *another* niche VM is not helpful
14:14 fijal you don't write a compiler to pypy bytecode that requires deployment
14:14 fijal you write an interpreter in RPython that's different
14:15 PacoAir joined #perl6
14:15 geekosaur there is a marketing issue here; I'm going to guess you don't see why that has any significance (and tbh that means you're part of the problem in some sense)
14:15 fijal jnthn: I think perl on JVM is honestly not very helpful, but fair enough
14:15 moritz why shouldn't it be helpful?
14:15 fijal jnthn: as python on JVM for example has ever seen adoption from java programmers and not from python progammers
14:15 moritz what's wrong with that?
14:15 fijal geekosaur: you mean "wrote on JVM" adds you marketing boost?
14:15 jnthn fijal: "only ever"?
14:16 fijal jnthn: ?
14:16 geekosaur perl6 needs any boost it can get.  seriously
14:16 moritz and running on java-only mobile phones is certainly a big plus
14:16 jnthn fijal: "python on JVM for example has ever seen adoption" - did you mean "only ever" or did you typo "never"? :)
14:16 fijal ah
14:16 fijal jnthn: only Java using people ever used python on JVM
14:16 Gwyxx joined #perl6
14:16 fijal as in, noone moved from CPython to Jython
14:17 fijal but there are some users as a way to script JVM
14:17 fijal sure
14:17 fijal geekosaur: I'm not sure JVM is cool enough any more honestly, but well
14:17 geekosaur "vm that everyone knows about and exists everywhere" is kinda necessary to counter the years of "parrot wtf".
14:17 geekosaur cool doesn't really enter into it
14:17 _sri JRuby is a better example for success with the JVM
14:17 geekosaur you're thinking like a geek.  that's not sufficient
14:18 fijal geekosaur: I personally think that building on a technology that's "cool" these days would give you some boost
14:18 fijal but well
14:18 fijal it'\s a matter of opinion
14:18 fijal _sri: yes
14:18 geekosaur again, you're thinking like a geek.  and again, that's not sufficient
14:19 moritz also, scala and clojure
14:19 moritz just to name two more non-java languages on the JVM
14:20 fijal well yeah
14:20 fijal aren't geeks the target audience?
14:21 fijal anyway
14:21 fijal of course I don't have any way to convince you what you should do in the free time
14:21 _sri the JVM is as close to a "you won't get fired for choosing this" option for VMs as it gets
14:21 moritz then please stop doing so
14:22 fijal moritz: ok, goodbye
14:22 fijal left #perl6
14:22 * moritz waves
14:22 fijal joined #perl6
14:22 fijal left #perl6
14:22 jnthn Just to be clear: the way this is being done is *adding* the JVM support as an extra backend, just like we were able to add the debugger as a different frontend. It's not like I'm saying "we'll only run on the JVM forever" or even "we're going to now tie ourselves to the JVM". I'm saying the JVM is where we're going as the first non-Parrot thing.
14:23 jnthn Unless pmurias beats me to it with the JS work ;)
14:23 jnthn ah, he left.
14:23 Psyche^ joined #perl6
14:23 moritz sorry 'bout that. I thought he wanted to discuss technical merits, not just convince us
14:23 stevan_ joined #perl6
14:24 jaldhar joined #perl6
14:25 jnthn Well, I'm mostly convinced by technical merit, so... :)
14:30 rindolf Hi jnthn , moritz
14:30 jnthn o/ rindolf
14:30 nwc10 bother, I missed fijal. I know I can /msg him
14:31 rindolf jnthn: what's up?
14:31 jnthn rindolf: Not much. It's the weekend, I'm trying to remember to relax as well as hack on stuff ;)
14:38 Chillance joined #perl6
14:44 pmurias joined #perl6
14:45 [Coke] (why the jvm) - because then I can run perl6 at a work, since I have to run things inside a j2ee container. :)
14:46 nwc10 it's that sort of thing that makes that JVM a politically useful target, even if it's not the best from a technical perspective
14:48 erkan joined #perl6
15:19 b1rkh0ff joined #perl6
15:20 SunilJoshi joined #perl6
15:20 timotimo arnsholt: i am indeed "timo" on github
15:22 benabik joined #perl6
15:26 arnsholt Excellent. I've added you as a collaborator to the repo =)
15:28 arnsholt Hmm. ufo generates a circular dependency for Net::ZMQ
15:28 moritz arnsholt: that usually happens if there's a "use"-statement in the pod
15:29 moritz in one of the pods, at least
15:29 arnsholt I don't have any POD
15:30 moritz hm
15:36 arnsholt Could be that I've actually put in a circular use chain
15:36 arnsholt Indeed I have =D
15:36 arnsholt Thought I'd tested that before running ufo
15:37 arnsholt Oh, derp. Think I know what I did
15:38 moritz ufo prevails!
15:39 arnsholt Indeed =)
15:45 timotimo so, is there a test suite that we can adapt from somewhere? i suppose a few simple tests can be written that create inproc sockets and send some stuff around?
15:46 arnsholt In-process might work
15:46 arnsholt I was going to see what ZMQ::LibZMQ2 on CPAN did for its testsuite to get inspiration
15:47 arnsholt But I'm also dangerously close to doing some more NQP/dyncall hacking
15:47 arnsholt Our string handling ATM kind of sucks
15:53 moritz r: my int4 $x = 1; for 1..10 { $x = $x * 2; say $x }
15:53 p6eval rakudo a3869a: OUTPUT«2␤4␤8␤16␤32␤64␤128␤256␤512␤1024␤»
15:54 moritz have any of rakudo's small-int types adopted to benefit from the REPR changes?
15:55 marloshouse joined #perl6
15:56 jnthn Well, it's more that the lexical handling ain't updated yet
15:56 moritz so it might work as an attribute?
15:56 jnthn Yeah
15:57 arnsholt It should work as an attribute I think
15:57 arnsholt Or at least, it did work as an attribute at some point during my branch =)
15:58 moritz r: class A { has int8 $.x; method doit { for ^16  { $!x = $!x * 2; say $!x } }; A.new(x => 1).doit
15:58 p6eval rakudo a3869a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in block; couldn't find final '}'â�¤at /tmp/GsjRTgfV_u:1â�¤------> [32m$!x * 2; say $!x } }; A.new(x => 1).doit[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix o…
15:58 moritz r: class A { has int8 $.x; method doit { for ^16  { $!x = $!x * 2; say $!x } } }; A.new(x => 1).doit
15:58 p6eval rakudo a3869a: OUTPUT«Cannot assign to a non-container␤  in block  at src/gen/CORE.setting:769␤  in method BUILDALL at src/gen/CORE.setting:752␤  in method bless at src/gen/CORE.setting:742␤  in method new at src/gen/CORE.setting:727␤  in block  at /tmp/NMlB46N9AC:1␤␤»
15:58 moritz r: class A { has int8 $!x = 2; method doit { for ^16  { $!x = $!x * 2; say $!x } } }; A.new(x => 1).doit
15:58 p6eval rakudo a3869a: OUTPUT«Cannot assign to a non-container␤  in block  at src/gen/CORE.setting:797␤  in method BUILDALL at src/gen/CORE.setting:752␤  in method bless at src/gen/CORE.setting:742␤  in method new at src/gen/CORE.setting:727␤  in block  at /tmp/cAixnkgtbt:1␤␤»
15:58 moritz r: class A { has int8 $!x = 2; method doit { for ^16  { $!x = $!x * 2; say $!x } } }; A.new.doit
15:58 p6eval rakudo a3869a: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
15:59 moritz r: class A { has int8 $!x = 2; method doit { $!x = 1; for ^16  { $!x = $!x * 2; say $!x } } }; A.new.doit
15:59 p6eval rakudo a3869a: OUTPUT«2␤4␤8␤16␤32␤64␤-128␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
15:59 moritz bumpy ride, but got there eventually :-)
16:00 Energy joined #perl6
16:01 arnsholt Yeah, the lack of containers on natives is a bit annoying as well
16:06 stevan_ joined #perl6
16:28 arnsholt timotimo: The API is ZMQ 2.x, BTW (since that's what my Ubuntu had on tap)
16:29 Aka2 joined #perl6
16:30 timotimo ah
16:32 arnsholt Hopefully that's manageable
16:32 arnsholt Or does ipython use ZMQ3?
16:37 timotimo i think it supports both, but i'm not sure. let me have a look.
16:38 arnsholt I want to support ZMQ3 as well, but the ZMQ2 API is smaller, so I'd like to get a handle on that first, and then start looking at ZMQ3
16:38 timotimo mhm
16:41 timotimo apparently they require >= 2
16:41 timotimo 2.1.11 is their minimum version at this time
16:41 arnsholt That's the the exact version Ubuntu ships, so excecllent =)
16:43 timotimo coincidence? :)
16:44 * timotimo builds a fresh rakudo
16:46 timotimo with an nqp from master, hell yeah bleeding edge :))
16:48 jnthn You should see how bleeding my local one is :P
16:48 timotimo :3
16:50 timotimo make: *** [NQPP5QRegex.pbc] Segmentation fault
16:50 timotimo well, that was surprising
16:50 jnthn Try a make clean :)
16:50 timotimo sure
16:52 jnthn I had to do that a couple of times yesterday. I suspect a missing Makefile dep somewhere, but didn't spot it.
16:57 timotimo huh, make clean wasn't clean enough it seems
16:57 timotimo maybe i need a newer parrot, too?
16:57 jnthn No
16:57 moritz rakudo compilation still segfaults for me :(
16:57 * timotimo git clean'd
16:57 jnthn :/
16:57 moritz I've tried to run it under gdb, but it seemed to hang
16:58 moritz I aborted after a few minutes
17:01 uvtc joined #perl6
17:01 timotimo git clean helped it seems
17:01 timotimo er, no
17:02 timotimo three seconds after i said that, it exploded :))
17:05 arnsholt No segfault on NQP HEAD here
17:05 arnsholt But failures in the test suite, it seems
17:06 * timotimo deleted nqp, parrot and install folders
17:07 arnsholt Segfault before first test but after plan in t/nqp/60-bigint.t and segfault after test 71 in t/qast/qast.t, as well as failure of test 19 (which is bigint-related)
17:08 * arnsholt tries HEAD^
17:09 pmichaud good morning, #perl6
17:09 arnsholt 'lo pmichaud
17:10 moritz good am, pm
17:10 jnthn arnsholt: That one I had to kill with a properly clean
17:10 jnthn It's something to do with not getting a proper bigint ops rebuild.
17:10 jnthn s/properly/proper/
17:10 jnthn o/ pmichaud
17:11 arnsholt Aha
17:12 FROGGS hi pmichaud, hi all
17:13 dalek nqp/rx-portability: f5d0a8b | jnthn++ | / (5 files):
17:13 dalek nqp/rx-portability: Stub in an NFA representation.
17:13 dalek nqp/rx-portability:
17:13 dalek nqp/rx-portability: We'll keep it in the current form for construction; this is what we'll
17:13 dalek nqp/rx-portability: feed to the executor and also serialize them as.
17:13 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/f5d0a8bb2c
17:13 dalek nqp/rx-portability: ecc5234 | jnthn++ | src/QAST/Operations.nqp:
17:13 dalek nqp/rx-portability: Sketch in some nqp:: ops for NFA handling.
17:13 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/ecc523421f
17:13 dalek nqp/rx-portability: ce1308b | jnthn++ | src/stage0/ (9 files):
17:13 dalek nqp/rx-portability: Update bootstrap to get nqp::ops.
17:13 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/ce1308b279
17:13 dalek nqp/rx-portability: b027079 | jnthn++ | src/ (3 files):
17:13 dalek nqp/rx-portability: Implement various NFA ops.
17:13 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/b0270790c4
17:13 dalek nqp/rx-portability: 5980aa5 | jnthn++ | src/QRegex/NFA.nqp:
17:13 dalek nqp/rx-portability: Start using new NFA REPR and ops.
17:13 dalek nqp/rx-portability:
17:13 dalek nqp/rx-portability: Avoids doing a lot of v-table calls while evaluating the NFA (can do a
17:13 dalek nqp/rx-portability: bit more improvement yet also). This should also help ease NFA porting,
17:13 dalek nqp/rx-portability: plus it's good to get this cleared up before porting things.
17:13 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/5980aa50aa
17:14 arnsholt jnthn: Cheers. That fixed it
17:14 jnthn moritz: Does make test in NQP look good to you?
17:15 moritz jnthn: I'm rebuilding from scratch now, so will tell you when I get there again :-)
17:15 jnthn ok :)
17:16 timotimo hm, i wonder if i had been running parrot 5 at the time nqp segfaulted when trying to build
17:16 timotimo because now it looks like i've gotten to rakudo, with --gen-parrot
17:21 uvtc Oh, interesting. The Parrot history I was asking about last night was re-asked by cotto on #parrot, and allison had some comments on it.
17:23 pmichaud I guess I should go read the logs.  :-)
17:23 uvtc Oh, hi pmichaud .
17:24 timotimo /home/timo/build/rakudo/install/bin/nqp --target=pir --output=src/gen/perl6-bootstrap.pir --encoding=utf8 \ --vmlibs=perl6_ops src/gen/BOOTSTRAP.pm
17:24 timotimo get_pmc_keyed_str() not implemented in class 'ResizablePMCArray'
17:24 timotimo is this known?
17:25 jnthn No
17:25 jnthn Can you gist me the entire output?
17:25 timotimo sure
17:26 timotimo http://paste.ee/p/kIgEB
17:26 timotimo oh, hold on
17:26 timotimo i think that got corrupted
17:27 pmichaud moritz++ # comments on #parrot and rakudo/parrot merge
17:28 timotimo http://paste.ee/p/Cehwq - there you go
17:30 jnthn timotimo: Whoa
17:30 jnthn timotimo: What Rakudo sha1 and what nqp sha1 are you building?
17:31 timotimo Sonoma-93-g14c9305 - rakudo | nqp - 2013.01-143-g26d0d0f
17:31 jnthn Because that looks exactly like a Rakudo speaking a previous version of the repr compose protocl...
17:31 jnthn 2013.01-113-ga3869a0
17:31 jnthn That is my Rakudo
17:31 timotimo i *thought* i had git pull'd rakudo just before i did that.
17:32 timotimo oh, yeah, i was on the constant-folding branch
17:32 timotimo that was clever
17:32 jnthn oops :)
17:32 jnthn And also, phew. That error could have meant something a lot wrose if it had happened in a difference place.
17:33 timotimo yes, excuse me for causing a state of nationwide panic in johnathantown :)
17:33 jnthn np :)
17:37 jnthn shop, dinner, etc :)
17:39 timotimo rakudo succeeded to build now :)
17:41 13WAAMX10 joined #perl6
17:44 timotimo arnsholt: any way to implement the ipython heartbeat socket? it's supposed to run asynchronous to the program. (except for of course q:x'ing another rakudo...)
17:45 arnsholt Not really, I think
17:45 arnsholt For that we really want threads
17:45 timotimo yes, we do
17:46 arnsholt jnthn: Using the set/get_int REPR hooks to deal with the length of a C string buffer: acceptably eww, or "don't go there" eww?
18:00 jnthn arnsholt: That's...wrong.
18:01 arnsholt Yeah, I know =)
18:01 jnthn Those are for boxing/unboxing only :)
18:01 arnsholt Won't do that, then
18:02 arnsholt Doodling around with the best ways to implement a CStr REPR as outlined in the gist I made a while back
18:06 ponbiki joined #perl6
18:18 moritz jnthn: after git clean -dxf in both rakudo and nqp, nqp's 'make test' and rakudo's build succeeded again
18:22 jnthn moritz: Phew. :) I wouldn't mind trying to figure out what we're missing.
18:33 nwc10 bother - does an "is rw" subroutine have to "fall off the end" to work? (ie, be able to assign to the returned lvalue)
18:34 SunilJoshi joined #perl6
18:34 moritz nwc10: no, you can return-rw
18:35 nwc10 excellent!
18:36 moritz r: my $x = 42; sub f() is rw { return-rw $x };  f() = 23; say $x
18:36 p6eval rakudo a3869a: OUTPUT«23␤»
18:37 moritz it's kind of a design smell, to have both return and return-rw. But normal people(tm) exepct return to decontainerize
18:45 ObseLeTe joined #perl6
18:49 * colomon has never used return-rw
18:49 benabik Why doesn't return just do return-rw inside sub is rw?
18:50 moritz benabik: because return isn't simply lexically scoped
18:50 benabik oy
18:52 benabik ...  Wait
18:53 benabik What kind of scoping does it use then?
18:54 benabik Or is this "mostly lexically scoped, but can be altered because it's all exceptions"?
18:58 moritz yes
19:07 * jnthn back from le dinner :)
19:07 nwc10 was it good?
19:08 jnthn It involved bacon. ;)
19:08 jnthn And white wine.
19:08 jnthn And cream and mushrooms and stuff.
19:08 jnthn So yeah, pretty good ;)
19:09 colomon bacon++
19:09 moritz sounds diverse and tasty :-)
19:27 alec__ spaghetti carbonara?
19:31 uvtc alec__: Is that a pun about the old pre-Cocoa Mac OS interface? :)
19:32 pyrimidine joined #perl6
19:32 jnthn alec__: Not really...no eggs or cheese in what I did :)
19:32 * alec__ has a policy of letting you believe he's clever whenever something he says happens to be funny like that, uvtc
19:32 alec__ i see, jnthn
19:58 jnthn We call the things CONTROL catches control exceptions...do we have a name for the non-control ones (besides non-control :))?
20:01 moritz errors? :-)
20:01 moritz ordinary exceptions?
20:06 nwc10 regular socials?
20:19 brrt joined #perl6
20:20 colomon they'd be more popular if they were ice cream socials.
20:28 masak (by symmetry, they should be called 'catch exceptions'.)
20:28 masak hi, #perl6
20:29 fgomez joined #perl6
20:33 brrt hi masak
20:47 colomon o/
20:48 moritz \o masak
20:51 ggoebel_ joined #perl6
20:52 spider-mario joined #perl6
21:19 pyrimidine joined #perl6
21:25 thou joined #perl6
21:38 * [Coke] starts ripping things out at https://github.com/coke/parrot . only something small so far.
21:39 [Coke] Every PMC I've tried so far is actually used internally somewhere. ;)
21:55 pmurias [Coke]: what would be the benefit of that? easier maintenance?
21:55 [Coke] pmurias: parrot has a lot of stuff rakudo isn't using. Maybe rakudo will go faster on a parrot that doesn't have them.
21:55 [Coke] Or have a smaller footprint, or..
21:56 [Coke] or, at least, build faster.
21:56 dbr joined #perl6
22:01 dbr joined #perl6
22:05 pupoque joined #perl6
22:06 uvtc [Coke]++
22:06 masak (build faster)++
22:29 pyrimidine joined #perl6
22:30 MikeFair_ joined #perl6
23:00 dalek nqp/rx-portability: 5ecc011 | jnthn++ | src/ (3 files):
23:00 dalek nqp/rx-portability: Add nqp::const mechanism.
23:00 dalek nqp/rx-portability:
23:00 dalek nqp/rx-portability: Allows mapping constants in a backend-independent way.
23:00 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/5ecc0110f6
23:00 dalek nqp/rx-portability: b7756b5 | jnthn++ | src/stage0/ (9 files):
23:00 dalek nqp/rx-portability: Update bootstrap.
23:00 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/b7756b57f2
23:00 dalek nqp/rx-portability: 081a30f | jnthn++ | src/QRegex/ (2 files):
23:00 dalek nqp/rx-portability: Lots of pir:: => nqp:: in NFA and Cursor.
23:00 dalek nqp/rx-portability: review: https://github.com/perl6/nqp/commit/081a30fde7
23:07 pjcj joined #perl6
23:11 alester joined #perl6
23:30 masak 'night, #perl6
23:37 pyrimidine joined #perl6
23:47 * jnthn rests also...'night
23:48 colomon o/

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

Perl 6 | Reference Documentation | Rakudo