Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-11-01

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

All times shown according to UTC.

Time Nick Message
00:18 AlexDani` joined #perl6-dev
00:19 nebuchad` joined #perl6-dev
00:19 dalek joined #perl6-dev
00:52 MasterDuke interesting. if i remove $!filename and $!lineno from here https://github.com/perl6/nqp/blob/master/src/vm/moar/QAST/QASTOperationsMAST.nqp#L34-L51, everything builds and passes spectest. are they actually meant for something NYI?
01:08 MasterDuke jnthn: git blames you for ^^^ almost exactly 3 years ago (6c1c6f3e). any reason not to get rid of them now?
01:22 vendethiel joined #perl6-dev
02:48 ilbot3 joined #perl6-dev
02:48 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
05:51 moritz MasterDuke: do you still get line numbers in error messages? :-)
06:48 RabidGravy joined #perl6-dev
07:51 lizmat Files=1150, Tests=53706, 210 wallclock secs (12.58 usr  3.61 sys + 1281.51 cusr 120.77 csys = 1418.47 CPU)
09:01 lizmat jnthn: is there a way to "flatten" a n-dimmed shaped array at the nqp level?
09:02 lizmat jnthn: reason I'm asking is that it would make a .values iterator on such a beast so much easier   :-)
09:19 jnthn lizmat: No
09:19 jnthn And values should work lazily anyway :)
09:19 jnthn Rather than producing a duplicated view
09:20 jnthn We may be able to do some other smart thing though
09:20 jnthn Once we implement the partially dimensioned views thingy we could hijack it for quick values iteration
09:20 jnthn By "lying" about the dimensionality
09:21 jnthn morning, #perl6-dev
09:22 lizmat morning jnthn   :-)
09:23 lizmat jnthn: but it feels like such a waste to have to generate n-dimensional AT-POS values to be able to get to the next value?
09:24 jnthn We can live with it for now, I think.
09:24 lizmat ok
09:24 jnthn And solve it when we solve the partial dimensions problem
09:24 lizmat anyway, partially dimensioned slices is on my menu
09:24 jnthn OH
09:24 jnthn OK
09:24 jnthn Well, ready to write some C? :)
09:25 jnthn (It wants doing at VM level.)
09:25 lizmat ok, then it is *not* on my menu  :-)
09:25 lizmat at least not yet
09:25 jnthn My overall plan is to have a REPR that offers a "view" into some other one.
09:25 jnthn That is, another array one
09:26 lizmat I see.... ok
09:26 jnthn So you can curry dimensions, for example
09:26 lizmat cool
09:27 jnthn But if it's flexible enough to let you pretend a 3*3 array is actually a 1*9 then yeah, we can use it to much more efficiently write an iterator :)
09:27 jnthn (The memory layout of MultiDimArray should already be right for that)
09:27 lizmat right  :-)
09:28 jnthn My other thought on it was that it could offer, for example, a way to view bytes of a int32 array or vice versa
09:29 lizmat nibbles?
09:29 jnthn MasterDuke: I think the file and lineno there are fossils
09:29 jnthn MasterDuke: It's done using an explicit MAST::Annotated
09:29 jnthn MasterDuke: Probably they are leftovers from early development
09:30 jnthn lizmat: Hm? :)
09:31 jnthn Oh, the computing meaning, not the food one :P
09:31 jnthn Yeah, potentially that :)
09:31 lizmat yeah, 1, 2 4 bit ?
09:32 jnthn Yeah, though we don't support those at all yet
09:33 lizmat I guess my Apple ][ heritage is showing  :-)
09:33 nine jnthn: I wonder what your thoughts are on how to move forward with lexical_module_loading?
09:34 jnthn nine: Is there a write-up of it somewhere for me to look at?
09:34 jnthn (What it changes, estimated fallout, etc.)
09:35 nine Not yet.
09:36 nine Though it's probably short and simple: it no longer merges the globals of a loaded module into the current comp unit's globals but into the lexpad. That means that you need to explicitly use or need the modules you depend on instead of expecting your dependencies to take care of it.
09:37 nine Task::Star needed fixes in 2 or 3 modules. Fixes were adding use statements and fixing overly clever (but almost useless) tests in DBIish.
09:37 lizmat jnthn: it is a pre-requisite to allowing multi-version modules to be loaded at the same time
09:38 lizmat fitness&
09:38 nine Fixed modules are fully backwards compatible with older rakudos.
09:42 nine Reverting back to the old behavior could be done by replacing a single line in Perl6::World. So we could for example merge the branch now, deal with the fallout and revert the behavior before doing a release if we deem the ecosystem not ready yet.
09:52 gfldex is prefix & a real operator or a macroy-thing like .WHAT?
09:53 jnthn gfldex: Example of its usage?
09:53 jnthn nine: Got a $other-job distraction, will read carefully in a moment :)
09:54 nine jnthn: take your time :0
09:54 gfldex m: sub f {}; say &f.WHAT
09:54 camelia rakudo-moar 839e52: OUTPUT«(Sub)␤»
09:54 nine :)
09:54 jnthn Oh
09:54 jnthn That's a sigil
09:54 jnthn Not an operator
09:54 jnthn It's parsed by the variable rule :)
09:59 gfldex sigils feel macroish. Maybe a good way to explain them to new disciples.
10:00 nine They are really part of the name though
10:05 jnthn nine: If it's a case of a single line, what are our changes of making code that declares itself as needing 6.c get the current semantics?
10:05 jnthn *chances
10:08 nine I now realize the single line message is not actually true. We'd need to change the 3 callers of load_module back to pass $*GLOBALish instead of the lexpad. If we need easy switching, we could make them pass both easily.
10:08 nine jnthn: then a switch on Perl 6 version should be trivial.
10:09 jnthn OK, it is one option
10:09 jnthn To ease the pain. Depending on if people have actually been good about declaring version dependencies.
10:10 nine That would however mean that we'd have to wait almost a year for a potentially very useful feature :/ It's for example blocking Inline::Perl5 from allowing access to all loaded Perl 5 modules instead of the explicitly use'd one. Hurts especially when a module file contains several packages.
10:10 jnthn Which...I'm not sure is the case :P
10:10 nine breakfast&
10:18 jnthn Oh, wow. It turns out that LEAVE handlers already do get scoping stuff right on Moar through a...slightly interesting...mechanism.
10:19 jnthn Which may mean I have a solution to the nasty Lock.protect + control exceptions bug
10:19 jnthn Without having to do a ton of work
10:22 masak what's the slightly interesting mechanism? :)
10:24 jnthn masak: Essentially a "invoke this as if its outer is the nearest callee on the callstack that matches what it wants"
10:24 jnthn Which is...somewhat deplorable
10:24 jnthn It's actually the mechanism we use to get where clauses right too
10:25 jnthn Passes spectest and solves the problem I found, anyways :)
10:26 jnthn Sadly, I higher numbers of iterations seem to hit a JIT bug, of all things
10:26 masak messing with outers, eh?
10:26 masak well, that's something I'm familiar with in dealing with macros :)
10:26 masak (although I've since realized it's not enough)
10:26 masak it doesn't sound so deplorable to me, fwiw
10:27 masak since LEAVE, just like exception handlers, do things without unwinding the call stack
10:28 dalek rakudo/nom: 48c2af6 | jnthn++ | src/core/Lock.pm:
10:28 dalek rakudo/nom: Use LEAVE to unlock a lock in `protect`.
10:28 dalek rakudo/nom:
10:28 dalek rakudo/nom: This means we do the right thing when we unwind the stack due to a
10:28 dalek rakudo/nom: control exception.
10:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48c2af6d05
10:32 nine jnthn: thought some more. Making it dependant on Perl 6 version won't buy us much, since you're usually not hurting yourself by merging globally, but hurting your users.
10:32 dalek roast: c074558 | jnthn++ | S17-supply/return-in-tap.t:
10:32 dalek roast: Add test for returning from Supply quit handler.
10:32 dalek roast: review: https://github.com/perl6/roast/commit/c07455874c
10:33 dalek rakudo/nom: b5780f0 | jnthn++ | t/spectest.data:
10:33 dalek rakudo/nom: Run S17-supply/return-in-tap.t.
10:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5780f010a
10:51 tadzik joined #perl6-dev
10:53 ilmari[m] joined #perl6-dev
11:16 jnthn nine: Yes, true.
11:16 jnthn nine: One other question: have you been able to actually have two versions of a module loaded using this work?
11:16 jnthn nine: It'd be bad to cause two sets of upheavel because we didn't think the first one through enough.
11:20 tadzik joined #perl6-dev
11:20 nine jnthn: indeed I have :)
11:23 ilmari[m] joined #perl6-dev
11:29 nine jnthn: https://gist.github.com/niner/02f1d23a928c201b6ba328b9e6388df8
11:45 dalek rakudo/nom: b623210 | lizmat++ | src/core/Lock.pm:
11:45 dalek rakudo/nom: No need for intermediary now we have LEAVE
11:45 dalek rakudo/nom:
11:45 dalek rakudo/nom: Also, we don't need a block for LEAVE either.
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b623210d67
11:45 lizmat jnthn:  ^^^  :-)
12:02 jnthn Phew, think I found/fixed the JIT bug I was hunting
12:02 jnthn lunch; will read stuff here afterwards :)
12:11 AlexDaniel joined #perl6-dev
12:41 dalek nqp: f0b8e81 | jnthn++ | tools/build/MOAR_REVISION:
12:41 dalek nqp: Bump MOAR_REVISION for JIT fix, other fixes.
12:41 dalek nqp: review: https://github.com/perl6/nqp/commit/f0b8e810be
12:42 jnthn lizmat: It's thunked anyway so the block made no difference :)
12:43 jnthn lizmat: Other tweak is nice though
12:43 dalek rakudo/nom: b4dfed2 | jnthn++ | tools/build/NQP_REVISION:
12:43 dalek rakudo/nom: Bump for various MoarVM fixes.
12:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b4dfed2a86
12:44 dalek roast: 6265575 | jnthn++ | S17-supply/return-in-tap.t:
12:44 dalek roast: Bump number of iterations in test.
12:44 dalek roast:
12:44 dalek roast: This means it also will nicely cover a JIT bug we had.
12:44 dalek roast: review: https://github.com/perl6/roast/commit/6265575783
12:47 jnthn nine: I assume missing in https://gist.github.com/niner/02f1d23a928c201b6ba328b9e6388df8 is where you installed the two versions of A?
12:47 jnthn (Into an installation repo)?
12:52 vendethiel joined #perl6-dev
13:02 |Tux| This is Rakudo version 2016.10-132-gb4dfed2 built on MoarVM version 2016.10-33-ga4c0a84
13:02 |Tux| csv-ip5xs        3.151
13:02 |Tux| test            14.199
13:02 |Tux| test-t           6.826
13:02 |Tux| csv-parser      14.777
13:32 vendethiel- joined #perl6-dev
13:33 lizmat m: my int @a = ^10; dd @a.rotate   # strange omission ?
13:33 camelia rakudo-moar b4dfed: OUTPUT«No such method 'rotate' for invocant of type 'array[int]'␤  in block <unit> at <tmp> line 1␤␤»
13:47 dalek roast: 12ccb11 | jnthn++ | S17-channel/stress.t:
13:47 dalek roast: Add a test covering RT #129949.
13:47 dalek roast: review: https://github.com/perl6/roast/commit/12ccb11674
13:56 lizmat commute to Amsterdam.PM meeting&
14:30 lizmat joined #perl6-dev
14:38 dalek nqp: c1b2cb9 | jnthn++ | tools/build/MOAR_REVISION:
14:38 dalek nqp: Get MoarVM channel GC fix.
14:38 dalek nqp: review: https://github.com/perl6/nqp/commit/c1b2cb94e4
14:39 dalek rakudo/nom: 6dc5074 | jnthn++ | tools/build/NQP_REVISION:
14:39 dalek rakudo/nom: Get MoarVM with channel GC fix.
14:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6dc5074c7d
14:39 dalek rakudo/nom: 7b4a55d | jnthn++ | t/spectest.data:
14:39 dalek rakudo/nom: Run S17-channel/stress.t as a stress test.
14:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7b4a55d237
14:53 [Coke] jnthn++
14:54 synopsebot6 joined #perl6-dev
15:03 japhb star: use LWP::Simple; my @recent = LWP::Simple.get('http://tux.nl/Talks/CSV6/speed.log').lines[(*-30)..Inf].map(*.words[*-1]); my ($min, $max) = @recent.min, @recent.max; my $range = max($max - $min, .1 * $min, .25); my @bar = (^8 + 0x2581)>>.chr; my $spark = @recent.map({ @bar[(($_ - $min) / $range * (@bar - 1)).round] }).join; say $spark;
15:03 camelia star-m 2016.04: OUTPUT«▆▃▂▂▃▃▂▂▃▃▆▂▂▇▂█▃▂▃▂▁▁▁▂▃▄▄▃▄▁␤»
15:03 japhb Looks like it got slow for a week and then sped up again today
15:03 japhb Well, slow*er*
15:06 dalek rakudo/nom: 41a9804 | lizmat++ | src/core/Rakudo/Internals.pm:
15:06 dalek rakudo/nom: Introduce R:I:RotateListToList(from,n,to)
15:06 dalek rakudo/nom:
15:06 dalek rakudo/nom: Rotate objects with $!reified for given number of positions.  This is
15:06 dalek rakudo/nom: basically the functionality of List.rotate abstracted away, but without
15:06 dalek rakudo/nom: using push/pop, so that we can also use it on shaped arrays.
15:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/41a9804d1f
15:06 dalek rakudo/nom: bd62142 | lizmat++ | src/core/List.pm:
15:06 dalek rakudo/nom: Let List.rotate use R:I:RotateListToList
15:06 dalek rakudo/nom:
15:06 dalek rakudo/nom: Also fix rotating an empty list without $!reified
15:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd62142a7e
15:07 lizmat sorry dalek
15:07 lizmat Use R:I:RotateListToList for 1dimmed shaped arrays
15:07 lizmat
15:07 lizmat All other shapes will now just throw an exception.
15:08 lizmat https://github.com/rakudo/rakudo/commit/e28b136954dc576a29
15:08 lizmat and one more unimportant sig fix
15:37 dalek rakudo/nom: 052bc01 | lizmat++ | src/core/Rakudo/Internals.pm:
15:37 dalek rakudo/nom: Introduce R:I:ReverseListToList
15:37 dalek rakudo/nom:
15:37 dalek rakudo/nom: Basically abstracted the functionality of List.reverse, so that we
15:37 dalek rakudo/nom: can also use it for 1dimmed shaped arrays.
15:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/052bc010ec
15:38 jnthn lizmat: Think we might need to audit CORE.setting for once usages
15:38 jnthn And look out for those that lead to race conditions
15:38 lizmat ok, yes, I've used it a few times
15:38 lizmat so what should I look for specifically?  I mean, is once not threadsafe ?
15:38 jnthn (Or decide we're going to fix "once" in that regard by making it be more than just a state var)
15:38 jnthn No
15:38 jnthn Because it's just a state var
15:39 jnthn method EmptyIterator() {
15:39 jnthn -        once class :: does Iterator {
15:39 jnthn +        BEGIN class :: does Iterator {
15:40 jnthn Is the patch I've got here that fixes things
15:40 seatek joined #perl6-dev
15:40 jnthn The problem I was getting was that .iterator occasionally returned Mu on an empty List
15:40 jnthn When two threads both tried to iterate an empty list at the same time
15:41 jnthn And it was a race in setting up the once
15:41 jnthn The first invocation of a frame sets a "this was already invoked" flag
15:41 jnthn So the second invocation doesn't run the once (which is fine)
15:42 jnthn (We only want it once)
15:42 jnthn But since the first call is still in the once computing the value, then it reads Mu
15:42 dalek rakudo/nom: ddfcaa7 | lizmat++ | src/core/List.pm:
15:42 dalek rakudo/nom: List.reverse now uses R:I:ReverseListToList
15:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ddfcaa7a3b
15:42 dalek rakudo/nom: a6eeaa0 | lizmat++ | src/core/Shaped (2 files):
15:42 dalek rakudo/nom: @a[10].reverse now uses R:I:ReverseListToList
15:42 dalek rakudo/nom:
15:43 dalek rakudo/nom: Also, other dimmed arrays now always fail for .reverse
15:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a6eeaa0415
15:43 lizmat ok, will try that
15:44 jnthn Well, I'm spectesting that particular patch now
15:44 lizmat fwiw, I'm still not used to BEGIN really being reliable in the setting
15:44 jnthn *nod*
15:45 jnthn Yeah, it needs care, but in this case - just making an instance of a simple class - it seems fine
15:46 jnthn I'm wondering a bit if we can do anything about this...
15:46 jnthn We can't really about state vars in general, I don't think
15:47 jnthn otoh, maybe "once per closure" *and* "threadsafe" isn't such a common combination to want
15:47 jnthn INIT would also work fine
15:48 jnthn If BEGIN doesn't
15:48 lizmat ok
15:49 * jnthn can do the once audit; there's not loads of them
15:51 dalek rakudo/nom: ed2631c | lizmat++ | src/core/Rakudo/Internals.pm:
15:51 dalek rakudo/nom: Prevent race condition for the EmptyIterator
15:51 dalek rakudo/nom:
15:51 dalek rakudo/nom: jnthn++ for pointing out
15:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed2631ccd9
15:52 lizmat jnthn: arriving in Amsterdam, will be offline for the next couple of hours
15:52 jnthn OK
15:52 jnthn Oh, I'd committed that locally :P
15:52 lizmat oops, sorry  :-)
15:52 jnthn np :)
15:53 lizmat it tested ok here
15:53 lizmat later&
16:03 vendethiel joined #perl6-dev
16:04 nine jnthn: yes, installed both versions of A
16:31 jnthn .tell literal Seems that various occurences of once in Version, Process, Kernel, and Backtrace are vulnerable.
16:31 yoleaux2 jnthn: I'll pass your message to literal.
16:31 jnthn oops
16:31 jnthn .tell lizmat Seems that various occurences of once in Version, Process, Kernel, and Backtrace are vulnerable.
16:31 yoleaux2 jnthn: I'll pass your message to lizmat.
16:32 jnthn .tell literal disregard that, tab-o :)
16:32 yoleaux2 jnthn: I'll pass your message to literal.
16:39 FROGGS joined #perl6-dev
16:44 FROGGS o/
18:22 hankache joined #perl6-dev
18:43 lizmat joined #perl6-dev
18:54 lizmat m: class A { method a() { INIT dd self } }; A.a   # I sorta expected "self" to be (A) here
18:54 yoleaux2 16:31Z <jnthn> lizmat: Seems that various occurences of once in Version, Process, Kernel, and Backtrace are vulnerable.
18:54 camelia rakudo-moar ed2631: OUTPUT«Mu␤»
18:54 lizmat .tell jnthn looking at it, but INIT doesn't work :-(
18:54 yoleaux2 lizmat: I'll pass your message to jnthn.
18:56 lizmat m: class A { method a(\SELF:) { INIT dd SELF } }; A.a  # making it specific doesn't help  :-(
18:56 camelia rakudo-moar ed2631: OUTPUT«Mu␤»
19:00 viki m: class A { method a(\SELF:) { INIT "dd SELF".EVAL } }; A.a
19:00 camelia rakudo-moar ed2631: OUTPUT«No such method 'dispatch:<.?>' for invocant of type 'NQPMu'␤  in block <unit> at EVAL_0 line 1␤  in block <unit> at <tmp> line 1␤␤»
19:01 viki 0.o
19:01 jnthn Surely that won't work; SELF isn't bound until a method is called
19:01 yoleaux2 18:54Z <lizmat> jnthn: looking at it, but INIT doesn't work :-(
19:01 jnthn Or self, for that matter
19:01 viki ah
19:01 lizmat ah, duh
19:02 jnthn Can the type not be used?
19:02 viki :)
19:02 jnthn Only thing with INIT is we do the work even if it's not used...
19:02 lizmat jnthn: checking
19:02 lizmat fg
19:02 hankache_ joined #perl6-dev
19:03 lizmat jnthn: looks like that will work
19:03 jnthn When I was pondering how to get the "initialized on first use" + "threadsafe" behavior, I realized it's not trivial to do it right, and that it's also fairly common to want it.
19:03 jnthn Which suggests we should torture ourselves rather than everyone :)
19:04 jnthn The question is whether to try and find a way to fold it into once
19:04 jnthn Or if it should be something else
19:04 jnthn (Like a "deferred" - a kind of Promise-y thing that triggers the work on first await)
19:05 lizmat feels to me it should be folded into "once", whatever the underlying mechanism
19:06 lizmat I mean, that's how I (and probably other people) expected it to work anyway
19:08 jnthn *nod*
19:09 jnthn Let's leave things as once for now then
19:09 jnthn And I'll look into if we can do that
19:10 lizmat ok, I'll make sure we don't use once in the core in the meantime
19:12 jnthn Well, I'll have tuits for it tomorrow
19:13 jnthn So maybe wait until then, and do it if I don't find an easy way :)
19:15 lizmat it's already mostly done...
19:15 dalek rakudo/nom: 94d19e9 | lizmat++ | src/core/Version.pm:
19:15 dalek rakudo/nom: Change once to INIT until we fix once
19:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/94d19e9ff5
19:19 lizmat hmmm... the once's in Kernel are harder to fix  :-(
19:20 jnthn Yeah, those are what made me think it might be better to fix once or something :)
19:22 viki .oO( fix once once and for all )
19:37 RabidGravy joined #perl6-dev
20:17 lizmat m: my $x₁ = 42   # what was the reason again why we don't allow this?
20:17 camelia rakudo-moar 94d19e: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> my $x⏏₁ = 42   # what was the reason again why␤    expecting any of:␤        constraint␤        infix␤        infix stopper␤        postfix␤       …»
20:17 lizmat m: my $x1 = 42
20:17 camelia rakudo-moar 94d19e: ( no output )
20:18 viki 'cause subscript isn't an accepted uniprop
20:18 viki Isn't it No or somethinm
20:18 viki Wound be nifty to have it allowed though :)
20:19 lizmat .u \x2081
20:19 yoleaux2 U+0030 DIGIT ZERO [Nd] (0)
20:19 yoleaux2 U+0031 DIGIT ONE [Nd] (1)
20:19 yoleaux2 U+0032 DIGIT TWO [Nd] (2)
20:19 lizmat m: say "\x2081".uniprop
20:19 camelia rakudo-moar 94d19e: OUTPUT«No␤»
20:19 lizmat it *is* No
20:19 viki \o/ I guessed right
20:19 lizmat it's not Nd
20:34 RabidGravy joined #perl6-dev
20:54 dalek rakudo/nom: a1347ca | lizmat++ | src/core/Shaped (3 files):
20:54 dalek rakudo/nom: Put the containerizing in a private sub
20:54 dalek rakudo/nom:
20:54 dalek rakudo/nom: This at least makes the 1dim AT-POS just as fast as List.AT-POS
20:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a1347ca39c
21:13 ugjka joined #perl6-dev
21:27 lizmat decommute&
21:34 ggoebel joined #perl6-dev
23:55 lizmat joined #perl6-dev

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