Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-04-13

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | full mode

All times shown according to UTC.

Time Nick Message
00:10 dalek roast: f57331b | (David Warring david.warring@gmail.com)++ | integration/advent2012-day06.t:
00:10 dalek roast: adding advent 2013 day 06
00:46 dalek roast: 7b9c4db | Mouq++ | S32-list/uniq.t:
00:46 dalek roast: Add test for RT #121434
01:12 Mouq method samespace(Str:D: Str:D $pat) { my @self-chunks = self.split(rx/\s+/, :all);
01:13 Mouq Is that correct?
01:14 Mouq Actually.. how does that work in the first place? it returns @self-chunks.join
01:14 Mouq m: say "a b c".samespace("a b c")
01:14 camelia rakudo-moar 11a693: OUTPUT«ab  b c␤»
01:14 Mouq O_o
01:15 Mouq roast $ ack samespace
01:15 Mouq roast $
01:15 Mouq :(
01:16 lue At least it's Consistent across backends, and Strangely so ;) .
01:22 lue r: my $a = "a b c"; $a ~~ s:ss/[<.alpha> <.ws>?]+/d    e  f /; say $a;
01:22 camelia rakudo-parrot 11a693, rakudo-jvm 11a693, rakudo-moar 11a693: OUTPUT«db  e  f ␤»
01:22 lue Mouq: Looks like the first space substitution is messed up, and seemingly the rest are fine.
01:24 Mouq m: say "a b c".split(/\s+/, :all)[0]
01:24 camelia rakudo-parrot 11a693, rakudo-jvm 11a693, rakudo-moar 11a693: OUTPUT«δβ  ε  ζ ␤»
01:24 camelia rakudo-moar 11a693: OUTPUT«a 「 」␤␤»
01:25 Mouq ^^ *that's* what's causing the regression
01:26 lue (me using greek characters was to make sure that the extraneous "b" was coming from the string, and not possibly some internal process)
01:27 * Mouq tries a fix
01:28 Mouq :) timotimo++, jnthn++, people++
01:28 * Mouq hasn't been online much but has been excitedly watching the work being done recently
01:32 * Mouq abandons trying to fix .split, and just calls .flat on it in .samespace instead
01:36 dalek rakudo/nom: e13671e | Mouq++ | src/core/Str.pm:
01:36 dalek rakudo/nom: Fix Str.samespace (and with it ss///)
01:43 dalek roast: 5004da4 | Mouq++ | S05-substitution/subst.t:
01:44 dalek roast: Unfudge ss/// test on Rakudo
01:47 lue r: say "a b c".split(/\s+/, :all).map: {"({$_.gist})"}; say "[" ~ "a b c".split(/\s+/, :all)[0].gist ~ "]"
01:47 camelia rakudo-parrot 11a693, rakudo-jvm 11a693, rakudo-moar 11a693: OUTPUT«(a) (「 」␤) (b) (「 」␤) (c)␤[a 「 」␤]␤»
01:47 lue Mouq: apparently, storing the split in a variable fixes @thing[0] (?)
01:48 Mouq lue: I think the problem may have been the binding
01:58 Mouq TimToady: Opinion wrt RT #71544
01:59 TimToady looking
02:02 TimToady well, I could also argue for about 3 other behaviors...
02:03 Mouq Lurkers: LHF: https://rt.perl.org/Search/Results.html?Q​uery=Queue%20%3D%20%27perl6%27%20AND%20%2​8%20%20Status%20%3D%20%27open%27%20OR%20S​tatus%20%3D%20%27new%27%20OR%20Status%20%​3D%20%27stalled%27%20%29%20AND%20%27CF.{Tag}%27%20%3D%20%27testneeded%27&RowsPerPage=0
02:03 Mouq http://yo.io/c2a
02:03 Mouq ^^ less godawful link
02:06 lue Please tell me I'm not wrong for thinking @b = @a[0] should DWIM ? (It used to work, in any case :/)
02:06 TimToady if the original was saved with a [], it's an item
02:07 lue TimToady: The array ultimately is a return'd (@old, @new).lol
02:08 lue (using := makes it DWIM, by the way)
02:10 lue TimToady: I assume this newfangled behavior is the right one, correct?
02:12 lue @b := @a[0] does the trick
02:13 Mouq @b = |@a[0] should do it as ^^ above I think shows, but NYI :(
02:20 dalek roast: 1119261 | Mouq++ | S02-lexical-conventions/one-pass-parsing.t:
02:20 dalek roast: Copy Brent Laabs' tests for RT #76988
02:42 dalek roast: 27d6be5 | Mouq++ | S02-literals/adverbs.t:
02:42 dalek roast: Add adverbs tests
02:42 dalek roast: Add test for RT #74492
03:15 Mouq r: say [foo => (1,2,3).map: {$_}].perl; say {foo => (1,2,3).map: {$_}}.perl # RT #120620
03:16 Mouq Looks like JVM gets it right too, locally
03:17 Mouq So, MoarVM bug :(
03:17 Mouq Though if that bug was reported in November, it had to be failing on the other backends originally… hm
04:40 masak Mouq: re expected behavior of https://rt.perl.org//Public​/Bug/Display.html?id=71544 -- .map can work with n-ary blocks; it just slurps n elements per invocation. seems to me there's no reason .grep couldn't/shouldn't do the same.
08:22 adu I'm having trouble building rakudo
08:25 adu http://pastie.org/9076678
08:26 adu I'm not sure, but nqp-[mpj] build fine
08:27 adu but I'm trying to build perl6-[mpj] and that's not working so well
08:31 adu macosx
08:31 adu 10.9
11:26 itz_ I'm getting a MoarVM link error on NetBSD linking moar
11:26 itz_ ./libmoar.so: undefined reference to `pthread_yield'
11:26 itz_ I think that should be sched_yield on that platform
11:31 jnthn itz_: There's a #elif on line 3 that likely wants a netbsd or other appropriate entry too
11:35 itz_ adding defined(__NetBSD__) to that line fixes it .. will run tests too
11:37 jnthn m: Thread.start({ sleep 1; say 'kthxbai' }); say 'oh hai';
11:37 camelia rakudo-moar 25c75c: OUTPUT«oh hai␤kthxbai␤»
11:37 jnthn That also now works
11:37 jnthn m: Thread.start({ sleep 1; say 'kthxbai' }, :app_lifetime); say 'oh hai';
11:37 camelia rakudo-moar 25c75c: OUTPUT«oh hai␤»
11:47 tadzik took 6 minutes here, but failed some tests :(
11:47 tadzik https://gist.github.com/tadzik/10580661
11:47 tadzik damn, I remember when it was close to an hour :D
11:51 lizmat tadzik: same here
11:52 lizmat concurrency/lock is mine, I guess I will fudge / remove them
11:52 lizmat main-usage I have no idea
11:52 lizmat phasers/first apparently only happens on OSX
11:52 lizmat not been able to golf it yet
11:53 jnthn lizmat: And it was only failing sometimes, yes?
11:53 lizmat it seems to fail more often now
11:53 tadzik when I run that individual test, it consistently passes
11:53 lizmat indeed, it only fails if part of a parallel spectest
11:53 lizmat so it appears to be CPU load-related
11:54 lizmat which is strange for a non-threaded feature
11:55 jnthn lizmat: nwc10++ gave me an ASAN backtrace and mentioned some things are giving those in spectest.
11:55 jnthn lizmat: I didn't managed to figure it out yet, but memory randomization is enough if we're reading stuff we shouldn't be.
11:57 jnthn Sadly, MSVC's heap analysis doesn't trigger it.
12:05 dalek star: de33c20 | jnthn++ | / (2 files):
12:05 dalek star: Switch over to FROGGS MIME::Base64 module.
12:05 dalek star: Has fixes for running on Moar/JVM.
12:11 tadzik uh, Digest::MD5 :)
12:12 dalek star: e0657f2 | jnthn++ | modules/ (3 files):
12:12 dalek star: Bump various modules.
12:12 dalek star: With this, we can now build a Rakudo Star that passes module tests on
12:12 dalek star: MoarVM.
12:12 timotimo ooooh yay :)
12:12 tadzik aww yiss
12:12 timotimo then you can get even more optimizations into the star before it lands :D
12:13 jnthn Well, or we may want to look at the state of r-j :)
12:13 jnthn In Star.
12:13 timotimo oh, of course
12:13 timotimo so, what's our stance on 32bit moarvm?
12:13 timotimo linux, intel
12:13 jnthn timotimo: I'd hope it'd work out on x86.
12:14 timotimo the array tests are like "hey, you wanted a 5, but this is a 324985724309857, what gives?"
12:14 timotimo so kinda looks like two pieces of the puzzle have a different opinion on what an int is?
12:15 jnthn Ah, it's probably "long"...
12:15 jnthn Guess I'll need to try and get myself a 32-bit VM
12:15 jnthn And I'm heading away from home soon anyway for teaching trip. So will look on that while I'm away.
12:16 dalek rakudo/nom: 80171d8 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
12:16 dalek rakudo/nom: Some Changelog additions
12:22 * lizmat just spectested the 2014.03 release: 220 wallclock (vs 173 now), 1589.9 CPU versus 1238.75 now.
12:22 lizmat We've come a long way in this month!
12:23 jnthn Well, especially if you remember that 2014.03 wasn't running the threads tests, or unival tests... :)
12:27 jnthn I don't think we'll do anything too risky opt wise ahead of release.
12:28 jnthn I've decided I'm going to focus on async stuff in the next week: getting timers working on Moar, then adding I/O event notification supplies and async socket I/O.
12:28 jnthn (Not saying I'll manage it all in a week. otoh, stranger things have happened...)
12:29 jnthn I should actually have some non-"oh look a contrived demo" things to show off related to reactive programming in Perl 6 for my nlpw talk... :)
12:30 jnthn Later this month...
12:30 timotimo and that'll be on HEAD?
12:31 jnthn All my live demos ever done on Rakudo I think have run on HEAD
12:31 timotimo sounds wise
12:31 jnthn Well, no, it's dangerous, you never know what mighta sneaked in :P
12:34 masak release day is on Thursday, by masak, jetlagged. :>
12:47 timotimo are we going to bump parrot revision this month?
12:47 jnthn timotimo: Are there things there to make it worth it, and are we willing to do the testing?
12:47 timotimo did it get the environment fix?
12:48 FROGGS[mobile] timotimo: no
12:49 timotimo who tried to fix it? it was rurban_, wasn't it?
12:49 timotimo and then pmichaud voted against the inclusion of more parrot-specific code to the core setting
12:50 jnthn Ah, I recall now. I think there were multiple issues with that fix...
12:50 timotimo nobody, not even me, came up with a proper fix yet, though
12:50 jnthn "use moar"? :P
12:50 timotimo yeah, i've been doing that for now
12:50 nwc10 it's not actually a state secret
12:50 nwc10 rn: class A{}; A::boom(:foo)
12:51 nwc10 that's a read 1 beyond a malloc'd area, as reported by valgrind and ASAN on MoarVM
12:51 nwc10 yes, it's a Perl 6 runtime error
12:52 masak nwc10: looks fine above, though.
12:52 nwc10 same error with MVM_SPESH_DISABLE=1
12:53 nwc10 timotimo: yes. Here's one from ASAN: http://paste.scsys.co.uk/346819
12:53 nwc10 it's trying to copy subroutine argument flags
12:55 dalek rakudo/nom: f9c9487 | (Elizabeth Mattijsen)++ | src/core/Bag (2 files):
12:55 dalek rakudo/nom: Introduce direct .min/.max on Bags/BagHashes
12:55 dalek rakudo/nom: Actually inspired by a code example of TheDamian that looked hacky, since one
12:57 timotimo the callsite stuff has a potential source of confusion where the amount of flags is one less per named than the arg count
13:00 jnthn yeah, and I think that's exactly what's happening
13:01 jnthn MVM_args_proc_to_callsite does the calc correctly.
13:02 jnthn find_invokee_internal does it wrong
13:06 jnthn nwc10: https://gist.github.com/jnthn/10583405
13:24 dalek rakudo/nom: 4f3553d | (Elizabeth Mattijsen)++ | src/core/Set (2 files):
13:24 dalek rakudo/nom: Add .min/.max to Sets/SetHashes for consistency
13:24 dalek rakudo/nom: Add .min/.max to Mixes/MixHashes for consistency
13:25 moritz m-spectest summary (2 test failures): http://perlpunks.de/paste/show/534a9046.1568.2cb
13:30 lizmat moritz: again, the concurrency/lock.t, I have tests 6 or 8 fail, randomly
13:30 lizmat unfamiliar with S29-os/system: that's a new one to me
13:30 moritz same here
13:31 moritz it's fixed by 'make install'
13:32 moritz seems that something prefers the installed libs over the local ones
13:32 lizmat ah, I always do "make install" before "make spectest"
13:33 FROGGS[mobile] moritz: I merged a PR about the order of home and site or so
13:35 moritz FROGGS[mobile]: I have no ~/.perl6/, so home shouldn't matter
13:36 jnthn I've got a new failure in t\spec\S05-substitution\subst.rakudo.moar
13:37 * moritz runs p-spectest now, and is amazed how long it takes (compared to m-spectest) :_)
13:38 dalek rakudo/nom: fe27557 | (Elizabeth Mattijsen)++ | t/spectest.data:
13:38 dalek rakudo/nom: Add advent2012 tests that were sitting in roast
13:47 vendethiel r: class A { method ary { <a b c> } handles push; }; my $a = A.new; $a.push 1; say $a.ary;
13:47 camelia ..rakudo-parrot f9c948, rakudo-moar f9c948: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mclass A { method ary { <a b c> } [33mâ��[31mhandles push; }; my $a = A.new; $a.push [0mâ�¤    expecting any o…»
13:48 vendethiel look at the error message :). The two terms is `} handles`
13:48 vendethiel not related to `.push` vs `.push:`
13:49 lizmat well, that was wrong too:
13:49 lizmat r: my @a; @a.push 1
13:49 lizmat you need the : there or parens
14:02 dalek rakudo/nom: dca5394 | (Elizabeth Mattijsen)++ | src/core/ (4 files):
14:02 dalek rakudo/nom: Inf/-Inf are not Int's but Num's
14:05 masak lizmat: why do .min and .max on a Set return a Num? isn't the type of Set elements more or less arbitrary? (including non-orderable things)
14:08 lizmat an empty set returns Inf on .min
14:08 lizmat and -Inf on .max
14:09 lizmat the *number* of elements is always an integer
14:09 moritz shouldn't the return value be Real then?
14:09 masak right, something is weird. Int !~~ Num.
14:11 masak 'sides, I'm pretty sure that the spec still is of the opinion that Inf *is* an Int. as well as a Num. and a Str, when it feels so inclined.
14:11 masak now, I'm not saying that that's sane. but that's what it says currently.
14:16 dalek rakudo/nom: 2a30681 | (Elizabeth Mattijsen)++ | src/core/ (4 files):
14:16 dalek rakudo/nom: We need Real to support Inf/-Inf right now
14:34 jnthn lizmat: Yes, Real seems like a righter choice there.
14:39 jnthn Sptsh: There's things to read if you're a Perl 5 programmer coming to Perl 6. There's things to read if you're coming to Perl 6 with knowledge of other languages. There's not really tutorials for those coming to Perl 6 who never programmed before.
14:45 dalek rakudo/nom: 36e316d | (Elizabeth Mattijsen)++ | src/core/Set.pm:
14:45 dalek rakudo/nom: Fix two Num stragglers to Real
15:04 dalek roast: 02346c6 | (Elizabeth Mattijsen)++ | S02-types/ (6 files):
15:04 dalek roast: Add tests for .min/.max on (Set|Bag|Mix)Hash
15:20 dalek specs: 9213b13 | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
15:20 dalek specs: Spec .min/.max on Bags
15:42 dalek roast: 64d2ee6 | moritz++ | S04-statements/try.t:
15:42 dalek roast: refudge test for rakudo
15:42 dalek roast: passes on parrot, so only needs TODOing on JVM and Moar
15:46 dalek roast: remove some outdated rakudo.parrot fudges
15:47 dalek rakudo/nom: 3e1f329 | moritz++ | t/spectest.data:
15:47 dalek rakudo/nom: advent2013-day19.t is a concurrency test
15:57 dalek roast: caeebea | (Elizabeth Mattijsen)++ | S17-concurrency/lock.t:
15:57 dalek roast: Fudge Thread stress test for now
16:12 lizmat r: my $r = sub ($x) {}; say $r.signature.returns
16:12 camelia rakudo-parrot 7d2e55, rakudo-jvm 7d2e55, rakudo-moar 7d2e55: OUTPUT«(Mu)␤»
16:12 lizmat shouldn't that be (Any) ?
16:13 moritz lizmat: no
16:13 moritz lizmat: that'd mean you can't return junctions without explicit declaration
16:15 lizmat I'm trying to implement a production grade "is cached"  :-)
16:16 moritz t/spec/S02-types/mixhash.rakudo.jvm .......................... Failed 1/199 subtests  (less 26 skipped subtests: 172 okay)
16:20 moritz ugh, the j-spectest takes 2.5GB RAM
16:21 moritz (single process)
16:26 lizmat r: sub foo ($x) { say &?ROUTINE.Capture.list }; foo("bar")  # moritz: should this work then?
16:26 moritz lizmat: no
16:27 lizmat so how would I get at the values in the capture then?
16:29 moritz lizmat: just write a multi method WHICH (for :D invocant) in class Capture
16:30 lizmat yup, that far I was conceptually
16:30 lizmat now to turn the ... into something useful  :-)
16:30 jnthn To a first approximation, just taking the WHICH of each of the things in list and hash togehter with the names for the hashes is the key
16:30 moritz and of course sort the hash keys
16:31 lizmat yup, similar to Set.WHICH  :-)
16:32 jnthn With that done, then the rest is sub trait_mod:<is>(Routine:D $r, :$cached!) { my %cache{Capture}; $r.wrap(-> |c { %cache{c} //= callsame }) } or so.
16:32 lizmat yeah, I already copy pasted that from moritz++ blogpost a few years ago
16:35 timotimo jnthn: do you have ideas for making rakudo-debugger useful for multi-threaded things?
16:35 jnthn timotimo: I need to spend a good chunk of time thinking that through.
16:36 jnthn I mean, what I really want is not the "just work" solution, but something useful and awesome.
16:37 jnthn Well, the other thing I want to look at is how you can understand what things are in flight at a given point in time too
16:40 jnthn Right, but if we can provide a really good debugging experience there then we get a strong offering.
16:41 jnthn One of the things .Net devs tell me is they find Rx queries hard to debug, because you can't trace an items progress through it. I'm wondering if we can do better with our supplies.
16:42 timotimo hmpf. i really have to spend some time trying to grok Rx, i haven't done anything in that style so far
16:43 jnthn I'll have some Perl 6 sample programs in a couple of weeks, but if you're impatient I've some C# ones you can see now :)
16:43 timotimo it'd certainly help to figure out where applying Rx is a good idea :)
16:44 jnthn Where you have things happening asynchronously and there's a stream of them.
16:47 vendethiel m: my $last = False; my @foo = [loop { if $last { last } else { $last = True; 1 } }]; say @foo;
16:47 camelia rakudo-moar 3e1f32: OUTPUT«True␤»
16:47 timotimo o_O
16:48 vendethiel brane hurts. Somebody mind explaining ?
16:48 jnthn vendethiel: Putting any loop other than a for loop in r-value context at present doens't make a huge amount of sense to Rakudo.
16:49 timotimo nobody commented on my number guessing game one-liner :(
16:51 lizmat jnthn: just got a spurious error in spectest:
16:51 lizmat t/spec/S17-concurrency/thread.rakudo.moar                   (Wstat: 0 Tests: 25 Failed: 1)
16:51 lizmat Failed test:  6
16:51 lizmat which is "Thread 1 got non-zero ID"
16:51 lizmat can't reproduce
17:00 moritz http://perlpunks.de/paste/show/534ac2bb.6b06.15d # j-spectest output, 2 fails
17:01 vendethiel And what's the difference of `UNDO { stuff; }` vs `CATCH { stuff; }` ?
17:01 jnthn CATCH catches an exception. UNDO runs when you leave a block unsuccessfully.
17:03 jnthn timotimo: If you write a when or a default, then you succeed out of the CATCH block.
17:05 jnthn vendethiel: UNDO is different; fail out of a block will trigger it also
17:06 vendethiel jnthn: that's very, very confuse in my mind, when you say, "fail out of a block", you mean using `fail` itself ?
17:06 timotimo http://perlcabal.org/syn/S04​.html#Definition_of_Success
17:08 timotimo i don't think i understand the piece about list context in "Definition of Success"
17:09 jnthn UNDO is nothing to do with catching
17:09 jnthn It's all about how you leave the block
17:09 jnthn KEEP/UNDO are about transactionality.
17:10 jnthn fail is a kind of return.
17:10 jnthn It's like return Failure.new(...) or so
17:11 vendethiel Hmm-mmh. I'm having a bit of a hard time trying for it to make sense, but this helps :D.
17:15 japhb So ... thoughts on debugging concurrent perl6.  I have a mental image of having notional panels that can be filled with different things.  Depending on the smarts of the UI driver class, this could be multiplexed screens, split screens, just plain scrolling panels into view as needed (for a dumb terminal), tabs in a tabbed UI, whatever.  The point is panels can contain a debugging view of a particular task, similar to rakudo-debugger's current interface, but also
17:27 japhb I *think* this can be separated into layers relatively easily, but probably one more than we have now, where there is the debug binary and then a UI class.  Perhaps something like this: the debug binary providing API and hooks, several panel-generation classes that can output a rectangular panel of a particular type (debug, task map, channels/supplies, etc.) to a particular backend (ANSI text, HTML, and so on), and a panel management and UI interaction class per
17:28 jnthn Hm, lots of good ideas :)
17:28 jnthn It needs some more sophisciated UI-building mechanism than we hav enow :)
17:30 japhb True.  And I recognize it's a lot more work to do.  I'm just trying to think from the point of view of A) a hopefully quite useful UI and interaction model for the poor bastard doing concurrent debugging, and B) not *horribly* painful to write
17:34 timotimo mhhh ... libcatui
17:34 timotimo i should get started on the actual design of that bloody thing at some point
17:34 jnthn timotimo: I...don't think we need to put cat pictures all over it :P
17:35 timotimo with all due respect
17:35 timotimo we totally do.
17:54 timotimo https://twitter.com/selenamar​ie/status/455345018711326722 - not sure i understand correctly
17:56 Mouq .tell adu FWIW I use osx 10.9 and am not having issues (just built [rakudo|nqp|moarvm]-HEAD). Usually if the build segfaults, it's because I needed to reconfigure something, so you may want to doublecheck that
17:59 Mouq lizmat++: While you're adding things to Bag, would you consider a method that replicates the keys by their values? Right now you have to do .pick(*).sort, which is kinda silly IMO
18:01 Mouq It came up writing this: http://codegolf.stackexchange.com/a/25716/15012 (note that the sort is necessary anyway here, but the .pick(*) doesn't feel right)
18:01 vendethiel timotimo: some ppl are answering (to the 2.7 => 2020 extention) "Python 2.7 is the Perl 5 of Python"
18:02 geekosaur but it's probably true. and like perl 5, it's gonna stick around whether the cool kids want it to or not, because somehow cool has yet to trump operational
18:09 geekosaur so you might see python3 as their rakudo-star
18:11 _sri problem is that all the good stuff has been backported to python2
18:14 _sri if p5p was in a better state perl6 would be in trouble too
18:17 vendethiel tbh, from an outsider point of view, perl is dead. I did a lot of web before coming here (~ 6 months ago), php, then mostly ruby and js, and nobody even considers perl (in its global state) a threat or anything. It just doesnt exist anymore
18:25 btyler vendethiel: there's actually a lot of super awesome web stuff in perl5. mojo is like node.js done right
18:26 vendethiel btyler: I believe it ! But nobody knows about it ! that's my point :).
18:26 vendethiel perl has no "visibility" these days
18:27 vendethiel for most people, perl is a relic from ancient time; hard to understand and to work with, with few people still using it (*for web*). That's the way it felt to me, at least.
18:30 _sri python3 changed too little, perl6 changed too much... ruby2 got it just right
18:33 * _sri doesn't get how pypy and rubinius have not surpassed cpython and mri yet though
18:34 dalek roast: 9906142 | moritz++ | S (4 files):
18:34 dalek roast: JVM unfudges
18:40 * _sri has high hopes for mojolicious on perl6 btw. (poor parallelism in perl5 is holding us back atm.)
18:40 dalek roast: 67a7d45 | moritz++ | S04-blocks-and-statements/let.t:
18:40 dalek roast: JVM-fudge a failing test (with ticket number)
18:42 vendethiel (would love to see mojo-perl6 with perl6-to-js :-).)
18:43 timotimo watch out, though, !before will not consume any characters
18:43 timotimo <-[ … ]> on the other hand will
18:43 moritz that's the nature of assertions
18:44 timotimo to be fair, it's kind of hard to express both non-matching and consuming characters
18:45 timotimo without going insane
18:45 moritz well, you can do stuff like   [ <!before ...> . ]*
18:46 moritz which is "match any characters up to ...
18:47 dalek roast: 2053bb2 | moritz++ | S02-types/mixhash.t:
18:47 dalek roast: make MixHash.kv test more robust
18:50 japhb What are the prereqs for ipython support?  ZeroMQ?
18:50 japhb Anything else?
18:51 timotimo basic threading
18:52 timotimo there needs to be a heartbeat service
18:55 japhb OK, fair enough.  So given that r-m and r-j both have basic threading, we just need a NativeCall ZeroMQ binding and then it's just a plain old module??
18:56 timotimo it would appear to be the case, yeah
18:58 moritz in m-spectest run, t/spec/S04-phasers/first.t aborts with exit code 139 after test 1; it runs fine on its own
18:58 jnthn moritz: Does it work out with MVM_SPESH_DISABLE=1 ?
19:13 moritz jnthn: MVM_SPESH_DISABLE=1 helped, updating to a new moar didn't
19:55 dalek roast: 6b23c08 | moritz++ | S29-os/system.t:
19:55 dalek roast: refude test for rakudo-m that depends on rakudo being installed
19:55 dalek roast: better to get a passing TODO than to get test failures
20:54 lizmat Mouq: re "While you're adding things to Bag, would you consider a method that replicates the keys by their values? "
20:54 lizmat I'm not sure what you're getting at
20:57 jnthn .keyses )
20:58 lizmat maybe we need an adverb on .keys ?
20:58 jnthn No, that feels a bit smelly
20:58 Mouq It only really makes sense on Bags, not so much Sets and really not Mixes
21:16 lizmat .kxxv it will be (for now)
21:19 jnthn timotimo: .k xx .v
21:19 jnthn timotimo: Where the keys are the things in the bag and the values are the number of times they are in there
21:25 dalek rakudo/nom: 91f41bd | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
21:25 dalek rakudo/nom: Add Bag.kxxv (preliminary name)
21:30 vendethiel jnthn: wrt that ruby stuff, I think I actually need to macro `class A` to `reset_decorators(); "class A"` then I'd want to parse stuff like
21:31 jnthn yeah, that's ew
21:32 jnthn but the way to do that is to write a module exporting a different ClassHOW
21:32 jnthn And then method foo is decorated(...) { } or so
21:32 vendethiel is decorated looks much better ! if I'm able to chain them, definitely go with that !
21:33 dalek specs: 89cc32d | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
21:36 lizmat if captures are to be by value, then:
21:36 lizmat r: my @a = (1,2,3); my @b = (1,2,3); say \@a === \@b  # should be True ?
21:36 camelia rakudo-parrot 3e1f32, rakudo-jvm 3e1f32, rakudo-moar 3e1f32: OUTPUT«False␤»
21:37 jnthn lizmat: No, though @a.Capture === @b.Capture probably should.
21:38 jnthn lizmat: \@a is, iirc, like \(@a), which is a capture with one positional arg @a, and arrays are not value types
21:40 lizmat but that would mean that when the .WHICH of the Capture is to be used as a key for caching
21:41 lizmat that (@a) and (@b) would give different results ?
21:41 jnthn Yes
21:45 * lizmat is confused
21:48 jnthn You agree @foo.WHICH, where @foo is Array, has a WHICH basd on its identity, not its contents?
21:49 lizmat so: you're saying they are different, but the .perl doesn't see any difference
21:49 jnthn No, .perl won't
21:49 jnthn But
21:50 jnthn r: class Person { has $.name }; say Person.new(name => 'Dave').perl; say Person.new(name => 'Dave').perl;
21:50 camelia rakudo-parrot 3e1f32, rakudo-jvm 3e1f32, rakudo-moar 3e1f32: OUTPUT«Person.new(name => "Dave")␤Person.new(name => "Dave")␤»
21:50 jnthn the .perl of those two is the same, but there's more than one Dave in the world. :)
21:51 lizmat so this basically means I can *not* use .WHICH as the key for "is cached"
21:52 jnthn lizmat: No, if you pass in two different arrays *even if they have the same contents* I'd expect them to calculate things anew, because I passed in a different reference type.
21:53 jnthn lizmat: I don't think you can use "is cached" in ignorance of the incoming argument types.
21:53 lizmat even then, if I change the array from one invocation to the next, I would get the same result when I probably shouldn't
21:53 jnthn lizmat: Well, it depends what you want. :)
21:54 lizmat eh, no what the spec wants  :-)
21:54 jnthn Well, I'd hope the spec wants to keep value types and reference types straight.
21:54 lizmat S06:2122
21:55 jnthn lizmat: Nothing in there seems to contradict what I'm saying.
22:04 jnthn I think that our \@a behavior may be wrong
22:07 jnthn And it should be made consistent with \(@a)
22:07 Mouq my \a = (1,2,3); my \b = (1,2,3); say a === b; # shouldn't this be True, though?
22:08 jnthn Mouq: Yes, I think that one probably should
22:09 Mouq m: say LoL.^mro # should probably be more like (LoL) (Parcel) (Cool) (Any) (Mu)
22:10 jnthn Mouq: tbh, LoL is not clearly enough defined in my mind to be sure where it falls :)
22:16 jnthn lizmat: On unrelated matters: I'm planning to make .cue on scheduler return a Cancellation object of some kind.
22:17 jnthn lizmat: Especially useful for timer based things; you can stop them. But will support it for the non-timer caes too
22:17 lizmat that feels good
22:19 BenGoldberg m: Thread.start(-> { }) for 1..99;
22:19 camelia rakudo-moar 3e1f32: ( no output )
22:20 BenGoldberg m: Thread.start(-> { }) for 1..999;
22:20 camelia rakudo-moar 3e1f32: OUTPUT«(signal )»
22:20 * BenGoldberg wonders if it's worthwhile to debug that, though
22:20 jnthn Probably, yes. :)
22:20 jnthn m: Thread.start(-> { }).finish while 1; # wonder if this is OKer :)
22:20 camelia rakudo-moar 3e1f32: OUTPUT«(signal )»
22:21 jnthn Hmm...that one certainly wants debugging.
22:22 jnthn On my (Windows) box the "Thread.start(-> { }).finish while 1" is not segv-ing at all
22:23 jnthn However, it is using plenty of memory :)
22:23 jnthn (not growing, mind)
22:24 jnthn The non-.finish case also doesn't segv for me, it just keeps on trucking.
22:27 lizmat r: my $a = \3; my $b = \3; say $a === $b  # shouldn't this be True ?
22:27 camelia rakudo-parrot 3e1f32, rakudo-jvm 3e1f32, rakudo-moar 3e1f32: OUTPUT«False␤»
22:28 jnthn lizmat: Yes.
22:28 lizmat ok, then the test for that is wrong
22:28 jnthn Does your work on Capture.WHICH make it so?
22:29 lizmat that makes it return True
22:29 jnthn yeah, sounds right to me.
22:29 lizmat $ perl6 -e 'my $a = \3; my $b = \3; say $a === $b'
22:29 lizmat True
22:29 jnthn \o/
22:39 dalek rakudo/nom: c855a0f | (Elizabeth Mattijsen)++ | src/core/ (2 files):
22:39 dalek rakudo/nom: Implement Capture.WHICH
22:39 dalek roast: Unfudge TODO's passing / fudge test for \@a
22:46 dalek rakudo/nom: 442cdf8 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
22:46 dalek rakudo/nom: Naively implement "is cached" on Routines
22:57 dalek roast: 840d421 | (Elizabeth Mattijsen)++ | S02-names/is_cached.t:
22:57 dalek roast: Add tests for "is_cached"
23:07 dalek rakudo/nom: 3aa101a | (Elizabeth Mattijsen)++ | t/spectest.data:
23:07 dalek rakudo/nom: Add "is_cached" tests to roast
23:09 dalek rakudo/nom: Some more Changelog updates
23:11 cognominal lizmat, how come %cache is lexical _into_ the trait_mod sub? /me suspects he should go to sleep too
23:11 cognominal it should be outside to cache anything?
23:54 cognominal r: sub a(|a) {  say a.WHICH  }; a 1; a 1
23:54 camelia rakudo-parrot 3aa101, rakudo-jvm 3aa101, rakudo-moar 3aa101: OUTPUT«Capture|(Int|1)␤Capture|(Int|1)␤»

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | full mode

Perl 6 | Reference Documentation | Rakudo