Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-09-21

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

All times shown according to UTC.

Time Nick Message
00:47 dalek roast: 27ca133 | (Zoffix Znet)++ | S06-signature/slurpy-params.t:
00:47 dalek roast: Refudge todo to skip for doesn't-hang test
00:47 dalek roast:
00:47 dalek roast: As described in #158, under some conditions this test seems to leave
00:47 dalek roast: hung processes still running, causing them to consume all resources.
00:47 dalek roast: Fudge it as `skip` instead of `todo`, to prevent this.
00:47 dalek roast:
00:47 dalek roast: https://github.com/perl6/roast/issues/158
00:47 dalek roast: review: https://github.com/perl6/roast/commit/27ca133d0f
01:10 ugexe TimToady: that version sorting bug is fixed in zef. the local cache was short circuiting out of its search before considering all candidates
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
03:32 MasterDuke joined #perl6-dev
05:08 dalek roast: fc0fe43 | usev6++ | S32-str/comb.t:
05:08 dalek roast: Skip failing test on JVM
05:08 dalek roast: review: https://github.com/perl6/roast/commit/fc0fe43b78
06:45 brrt joined #perl6-dev
08:45 RabidGravy joined #perl6-dev
09:00 lizmat joined #perl6-dev
09:09 jnthn morning, #perl6-dev
09:09 nine Good morning!
09:10 * jnthn has Perl 6/MoarVM tuits today :)
09:13 brrt good morning jnthn
09:15 psch m: my @a = (1...*).grep(* < 20); say @a[20] # is that right..?
09:16 psch also, g'morning o/
09:16 camelia rakudo-moar 8be36b: OUTPUT«(timeout)»
09:18 psch i suppose it's somewhere in the halting problem area, isn't it?  as in, we cannot know that the lazy & infinite list is turned finite somehow..?
09:19 jnthn Right :)
09:19 jnthn It's not the sequence operator; it doesn't know that once it stops matching it'll not maybe match again later
09:19 jnthn So goes on searching
09:23 psch okay, thanks
09:23 psch good to know it's just a bad test case for what i'm doing :)
09:24 lizmat jnthn: sometimes I wonder whether the default implementation of pull-at-least should have a counter built in
09:25 jnthn Why?
09:25 lizmat *push-at-least
09:26 [TuxCM] joined #perl6-dev
09:31 jnthn I mean, in this case even it it terminated as soon as it had hit 1 element (which is the point it's allowed to return) then it'd still never hit that goal
10:05 brrt joined #perl6-dev
10:11 lizmat hmmm... perhaps the grep iterator should check for >1 M pulls without anything, and then issue a warning ?
10:11 dalek nqp: 0eff02d | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/jast2bc/JASTCompiler.java:
10:11 dalek nqp: Emit type name for unknown instructions in JASTCompiler.
10:11 dalek nqp: review: https://github.com/perl6/nqp/commit/0eff02d95a
10:11 lizmat or perhaps a :maxtries parameter set to 1M by default?
10:14 pmurias joined #perl6-dev
10:17 dalek rakudo/nom: b87a27b | peschwa++ | / (3 files):
10:17 dalek rakudo/nom: Fix List/Array marshalling for jvminterop, add tests.
10:17 dalek rakudo/nom:
10:17 dalek rakudo/nom: As commented inside the actual patch there might be a smarter or faster way to
10:17 dalek rakudo/nom: do this, by reimplementing the bits that are currently called via Perl 6
10:17 dalek rakudo/nom: functions with the minimal necessary nqp backend calls, but I'd rather have it
10:17 dalek rakudo/nom: working first.
10:17 dalek rakudo/nom:
10:17 dalek rakudo/nom: More tests probably wouldn't hurt either, Object[] isn't that demanding of a
10:17 dalek rakudo/nom: type after all.
10:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b87a27bfb8
10:20 jnthn lizmat: IMO, "let it hang". If the problem is that it's hard to understand where a program is hanging, we should improve our debugging tools, not put in arbitrary limits.
10:21 lizmat ok, fair enough, being able to generate an exception in a thread from another thread would already be great, yes  :-)
10:32 gfldex lizmat: this may be a good place to start thinking about a few better concurrency buildins. Namely `timeout(Callable &c, Num $max-seconds)`
10:33 TimToady joined #perl6-dev
10:34 lizmat trivail to make with supply.interval, nice ecosystem module ?
10:34 lizmat actually: Promise.at
10:34 lizmat or betterder: Promise.in
10:35 jnthn The problem with that is people will have some expectation that it will terminate the work taking place in &c
10:35 jnthn I agree we want some kind of cancellation stuff but code that wants to be cancellable needs to be co-operative in that.
10:38 jnthn But yes, not waiting forever is easily done with Promise.any(start { c }, Promise.in(5))
10:40 jnthn A timeout built-in would be nice, but we should probably keep that name free until we have our cancellation story worked out.
10:41 tadzik joined #perl6-dev
10:43 brrt jnthn: can we hijack (or rather, generalize) the gc-thread flag for interrupting running threads?
10:46 gfldex jnthn: my threading woes persist but seam to trigger a lot less frequent then about 1 month ago
10:50 jnthn brrt: Yes, that'd be the way to do something like "throw an exception in another thread"
10:50 jnthn Or "Capture the stack trace of another thread"
10:51 brrt how hard and/or fragile would it be to do this?
10:51 brrt also
10:51 brrt or, more importantly
10:52 brrt how does that not race with threads that can be blocked
10:53 jnthn That flag can also be popped into a "stolen" state, in which case the thread will wait until it gets unstolen when it returns from blocking
10:53 jnthn So it shouldn't be fragile in that sense
10:53 brrt okay, i'm not sure i follow 100%
10:54 jnthn At the moment, the flag can have 4 values: running, interrupted for GC, blocked, and stolen
10:54 brrt uhuh
10:56 brrt so suppose the thread is blocked, and we try to throw an exception to it… what happens then?
10:57 jnthn Well, there's a few ways to handle that
10:57 jnthn We could mark it stolen
10:58 jnthn Then set a "you need to do this on un-block"
10:58 jnthn And then mark it unstolen again
10:58 jnthn And when it unblocks it will check its todo list
10:58 jnthn In that sense the blocked/stolen transition and vice versa serves as a lock acquire/release
10:59 brrt uhuh
10:59 brrt on the other hand, that means you can't actually interrupt a blocked thread
11:00 jnthn .tell FROGGS I *think* you worked on process code long ago. I just fixed https://rt.perl.org/Ticket/Display.html?id=129291 by doing https://github.com/MoarVM/MoarVM/commit/debb859d8df52f9a44c94dc7760b2fe30170e8d3 which I *think* makes sense, but if you have a moment to glance it and comment it'd be great. Thanks! :-)
11:00 yoleaux2 jnthn: I'll pass your message to FROGGS.
11:02 brrt unless you can get help from the blocking agent (i.e. the operating system)
11:02 jnthn brrt: Indeed.
11:02 brrt and… can we?
11:03 jnthn I don't know. The JVM seems to manage to interupt various things.
11:03 jnthn Like lock acquisitions
11:03 jnthn I'm not sure about I/O
11:03 jnthn OpenJDK is open source so we can always look at how they do it :P
11:03 brrt true
11:04 brrt i think the standard way of interrupting I/O on unix is to set a alarm signal before you start IO
11:04 brrt but, that relies on signals obviously
11:04 brrt and is not of much use for different threads
11:09 jnthn .tell AlexDaniel MoarVM HEAD has a hopeful fix for RT #129291 (didn't bump MOAR/NQP_REVISION files yet); if you get chance, please give it a go. :)
11:09 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129291
11:09 yoleaux2 jnthn: I'll pass your message to AlexDaniel.
11:09 jnthn Lunch time for me :)
11:33 pmurias nqp::say(nqp::iscclass(nqp::const::CCLASS_ALPHABETIC, "\x16ef", 0)) gives a different result on the jvm and moar backends
11:37 psch r: use nqp; nqp::say(nqp::iscclass(nqp::const::CCLASS_ALPHABETIC, "\x16ef", 0))
11:37 camelia rakudo-jvm cd19db: OUTPUT«1␤»
11:37 camelia ..rakudo-moar b87a27: OUTPUT«0␤»
11:37 pmurias psch: Number, Letter characters work differently
11:38 psch r: use nqp; nqp::say(nqp::iscclass(nqp::const::CCLASS_NUMERIC, "\x16ef", 0))
11:38 camelia rakudo-moar b87a27, rakudo-jvm cd19db: OUTPUT«0␤»
11:38 psch r: use nqp; nqp::say(nqp::iscclass(nqp::const::CCLASS_ALPHANUMERIC, "\x16ef", 0))
11:38 camelia rakudo-moar b87a27, rakudo-jvm cd19db: OUTPUT«0␤»
11:38 psch so that's what? Ln?
11:39 pmurias psch: Nl
11:39 psch ah
11:39 psch well, nqp-j just asks the JVM
11:43 * ilmari was going to ask if the JVM had an old unicode version, but even perl 5.8.1 (with unicode 4.0) considers it w
11:44 psch i suppose trying on jdk8 is an idea
11:44 pmurias it's not a problem with a  JVM bug or old unicode version
11:45 pmurias it's just that the method we call checks for different unicode categories
11:47 psch j: use java::lang::Character:from<JavaRuntime>; say Character.isAlphabetic(0x16ef)
11:47 camelia rakudo-jvm cd19db: OUTPUT«1␤»
11:47 psch uhhm
11:48 psch that is exactly what we should be doing with that nqp::iscclass call up there
11:48 psch ohh
11:48 psch mixed up the backends
11:48 psch so the JVM is wrongly saying it *is* CCLASS_ALPHABETIC..?
11:49 pmurias JVM considers Nl characters alphabetic
11:49 pmurias Moar doesn't consider them alphabetic
11:50 psch oh, so no definite judgement, just "there's a difference"
11:50 pmurias there might be a definite judgement, I just don't know how to make one myself
11:51 psch right, that's what i understood now :)
11:52 psch j: use java::lang::Character:from<JavaRuntime>; say Character.isAlphabetic(0x0f33)
11:52 camelia rakudo-jvm cd19db: OUTPUT«0␤»
11:53 MasterDuke joined #perl6-dev
11:55 ilmari[m] joined #perl6-dev
11:57 MasterDuke jnthn: your MoarVM fix for RT #129291 seems to work for me. reliable segfaults before, none so far after
11:57 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129291
12:07 jnthn MasterDuke: And correct behavior for your use-case too?
12:09 MasterDuke haven't been able to test that yet
12:10 jnthn ok :)
12:10 MasterDuke btw, RT #129248 seems to have a MoarVM component
12:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129248
12:21 cognominal joined #perl6-dev
12:32 dalek rakudo/nom: 3ed51de | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
12:32 dalek rakudo/nom: Don't try and concatenate with closure.
12:32 dalek rakudo/nom:
12:32 dalek rakudo/nom: Exceptions thrown by the binder come in two forms: strings (thrown
12:32 dalek rakudo/nom: as adhoc exceptions) or closures that will be invoked to throw a typed
12:32 dalek rakudo/nom: exception. Don't try and concatenate "in subsignature of parameter X"
12:32 dalek rakudo/nom: style messages on to that closure.
12:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ed51de397
12:33 dalek roast: 0dddcd3 | jnthn++ | S32-exceptions/misc.t:
12:33 dalek roast: Test to cover RT #129306.
12:33 dalek roast: review: https://github.com/perl6/roast/commit/0dddcd3033
12:33 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129306
12:41 ZoffixW joined #perl6-dev
12:45 MasterDuke jnthn: i tested with some code that is almost identical to the original code that spawned 129291 and it's working fine
12:46 jnthn \o/
12:46 jnthn OK, then I guess I'll tag it testneeded
12:49 MasterDuke how are tests like that done? i could get it to reliably segfault, but the code (sometimes) took a while to run
12:49 jnthn We could add it as a stress test and just do a bunch of iterations.
12:50 jnthn If the test SEGVs that is considered a fail
12:50 MasterDuke ahh, stresstest, i haven't looked at those
12:50 jnthn You just mark it #stress in spectset.data iirc
12:52 MasterDuke oh, easy enough
12:59 ZoffixW :/ Inline::Perl5 tests failing on new install for me
12:59 ZoffixW https://gist.github.com/zoffixznet/3a9f2952a6d8b287b472ab11c8e50d4d
13:01 timotimo status 11, is that a segfault?
13:03 arnsholt Think so
13:05 ZoffixW It may be jnthn++'s today's changes
13:05 ZoffixW 'cause I built it using this, by merging latest MoarVM stuff in: https://gist.github.com/zoffixznet/a3a79105df12355e9f559ce6221d27d5
13:05 jnthn Are the tests using Proc/run/shell?
13:06 jnthn The only commit in MoarVM since the last release was a fix for that
13:06 ZoffixW doesn't seem to be. This is the one that fails consistently: https://github.com/niner/Inline-Perl5/blob/master/t/from.t
13:06 * ZoffixW nukes everything and tries from the start
13:07 jnthn m: class C { has int $!n = 0; method x (int $!n) {}; method y() { say $!n } }; my $o = C.new; $o.x: 42; $o.y
13:07 camelia rakudo-moar 3ed51d: OUTPUT«Cannot modify an immutable int␤  in method x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:07 jnthn That now says 42 locally
13:07 jnthn (This is the good news. :))
13:07 arnsholt That last comment sort of implies there are bad news too? =)
13:08 jnthn I suspect I can come up with some similar cases that will fail
13:09 timotimo awesome \o/
13:09 jnthn Yeah...same in a role blows up
13:10 [TuxCM] This is Rakudo version 2016.09-21-g3ed51de built on MoarVM version 2016.09
13:10 [TuxCM] csv-ip5xs        9.280
13:10 [TuxCM] test            15.854
13:10 [TuxCM] test-t           6.839
13:10 [TuxCM] csv-parser      16.763
13:11 jnthn And in a sub-sig
13:11 jnthn Works with named parameters though
13:11 jnthn So it's an improvement, but not a full solution
13:18 ZoffixW Well, builds fine on my google VM, so if anything it's something with my server.
13:18 jnthn Could be a SEGV you get lucky enough to avoid on the VM
13:19 jnthn If you've change to run the test under perl6-gdb-m or perl6-valgrind-m I can glance the output
13:21 ZoffixW Nah, don't want to take up your time :)
13:22 ZoffixW (plus, I don't even know how to run that test at all)
13:26 dalek rakudo/nom: 77a2ff1 | jnthn++ | src/Perl6/Actions.nqp:
13:26 dalek rakudo/nom: Fix basic native attributive parameter binding.
13:26 dalek rakudo/nom:
13:26 dalek rakudo/nom: This handles the case where the native attribute appears as either a
13:26 dalek rakudo/nom: named or positional parameter inside of a signature of a method in a
13:26 dalek rakudo/nom: class, where the signature is simple enough to be lowered (so, does
13:26 dalek rakudo/nom: not contain a sub-signature). Complex signatures and methods in roles
13:26 dalek rakudo/nom: will need additional, likely more involved, fixes.
13:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/77a2ff13d2
13:27 travis-ci joined #perl6-dev
13:27 travis-ci Rakudo build errored. Jonathan Worthington 'Don't try and concatenate with closure.
13:27 travis-ci https://travis-ci.org/rakudo/rakudo/builds/161611092 https://github.com/rakudo/rakudo/compare/b87a27bfb843...3ed51de3973d
13:27 travis-ci left #perl6-dev
13:27 dalek roast: ab9a035 | jnthn++ | S12-methods/attribute-params.t:
13:27 dalek roast: Some basic native attributive param binding tests.
13:27 dalek roast: review: https://github.com/perl6/roast/commit/ab9a035918
13:28 jnthn buggable: No comments? :)
13:28 timotimo timeout
13:28 timotimo wonder why buggable didn't jump on it
13:28 psch oh, we're ignoring jvm again
13:29 psch i guess it timed out too often..?
13:29 ZoffixW psch, no, due to failing `make test`
13:29 ZoffixW We fixed the harness, so now all the failures get caught by travis
13:29 psch oh, yeah, nativecall is borked, missed that ZoffixW++
13:30 ZoffixW As for buggable.. "Method 'new' not found for invocant of class 'IO::Socket::SSL'  in method get-connection at"... I think I forgot to install some modules during perl6 update :)
13:30 timotimo whoops :)
13:31 jnthn lizmat: I've probably fixed RT #129278 enough for the common cases that occur in CORE.setting
13:31 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129278
13:31 [Coke] http://stackoverflow.com/questions/39603451/why-does-ords-not-agree-with-chars
13:32 jnthn "Returns a list of codepoint numbers, one for the base character of each grapheme in the string."
13:32 jnthn That's wrong, no?
13:32 buggable joined #perl6-dev
13:32 ZoffixW https://travis-ci.org/rakudo/rakudo/builds/161611092
13:32 jnthn ords returns the codepoints of combiners forming a synthetic too
13:32 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), or GitHub connectivity (0)
13:32 psch https://docs.perl6.org/routine/ords
13:32 psch doc bug i guess?
13:33 psch 'cause the line in the SO question is a direct quote
13:33 jnthn Doc bug
13:33 jnthn Yeah, it even linkd to its source
13:33 jnthn *linked
13:34 jnthn I don't have an SO account
13:34 jnthn But I can patch the documentation :)
13:35 [Coke] I can comment on SO once the docs are fixed.
13:36 lizmat ack&
13:36 lizmat afk&
13:38 jnthn Working on it :)
13:47 [Coke] jnthn++ danke
13:47 jnthn Done, hopefully that helps
13:48 jnthn I suspect the docs were describing how a previous (and buggy) implementation of .ords worked
13:49 jnthn So may have been accurate at the time they were written.
13:55 Undercover joined #perl6-dev
14:03 ZoffixW c: &pairs, \(@ = ^10)
14:03 Undercover ZoffixW, The code is NOT hit during stresstest See http://perl6.WTF/src_core_Any.pm.coverage.html#L464 for details
14:03 ZoffixW timotimo, ^ seems there are still false negatives even with optimization off. Because the above *is* hit in https://github.com/perl6/roast/blob/master/S32-hash/pairs.t#L94
14:04 gfldex i just found myself wanting a subroutine form for .perl
14:04 gfldex m: say perl <a b c>;
14:04 camelia rakudo-moar 77a2ff: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤    perl used at line 1␤␤»
14:04 ZoffixW m: sub perl { $^v.perl }; say perl <a b c>;
14:04 camelia rakudo-moar 77a2ff: OUTPUT«$("a", "b", "c")␤»
14:05 ZoffixW Done :)
14:07 gfldex also, is there a reason why Mu got .take but not .take-rw ?
14:18 ZoffixW m: say perl <a b c>:
14:18 camelia rakudo-moar 77a2ff: OUTPUT«("a", "b", "c")␤»
14:19 jnthn Curious...after pulling in the Unicode 9 database, 4 tests start failing in grapheme-break.t
14:19 jnthn (Yes, the NFG algo needs updates that may compensate for this)
14:26 jnthn m: say uniprop("\c[ZERO WIDTH JOINER]", "Grapheme_Extend")
14:26 camelia rakudo-moar 77a2ff: OUTPUT«1␤»
14:27 jnthn $ ./perl6-m -e 'say uniprop("\c[ZERO WIDTH JOINER]", "Grapheme_Extend")'
14:27 jnthn 0
14:27 jnthn That'd be why :)
14:29 arnsholt I guess that having the zero-width joiner not extend graphemes makes sense =)
14:31 jnthn Well, they've maintained compact by dropping the grapheme_extend property on it but by making a rule that was previously just Extend be Extend|ZWJ
14:31 jnthn Seems they did it so they can talk about the two separately when it comes to emoji
14:32 arnsholt Aha
14:32 jnthn Oh my.
14:33 jnthn Previously you could determine "should be break" by looking at just the previous codepoint and the current one
14:33 jnthn In 9 they've added an emoji rule
14:33 jnthn "Do not break within emoji flag sequences. That is, do not break between regional indicator (RI) symbols if there is an odd number of RI characters before the break point."
14:46 timotimo there now exists a file that tells us "is emoji" basically
14:46 timotimo but it's informative, not normative
15:00 brrt joined #perl6-dev
15:03 brrt joined #perl6-dev
15:03 jnthn Also
15:03 jnthn $ ./perl6-m -e 'say ‘🦋’.uniname'
15:03 jnthn BUTTERFLY
15:03 jnthn \o/
15:04 |Tux| joined #perl6-dev
15:12 jnthn Darn, though got a new failure now :S
15:14 jnthn m: say uniprop(" ", "space")
15:14 camelia rakudo-moar 77a2ff: OUTPUT«SP␤»
15:15 ilmari hum, no butterfly in symbola yet :(
15:16 timotimo i don't see it either :\
15:16 jnthn ./perl6-m -e 'say uniprop(" ", "space")'
15:16 jnthn 1
15:16 jnthn Hmmm
15:17 ilmari ooh, the latest one on http://users.teilar.gr/~g1951d/ has it
15:17 ilmari dropped Symbola_hint.ttf in ~/.fonts, and voila
15:17 ilmari just not in debian yet
15:36 gfldex lolibloggedalittle: https://gfldex.wordpress.com/2016/09/21/are-these-your-keys/
15:37 ilmari for a moment I was wondering why loli blogging was relevant here
15:37 gfldex sorry, wrong channel
15:39 AlexDaniel joined #perl6-dev
15:53 jnthn m: say uniprop(" ", "Space")
15:53 camelia rakudo-moar 77a2ff: OUTPUT«SP␤»
15:55 timotimo m: say uniprop(" ", "Satan")
15:55 camelia rakudo-moar 77a2ff: OUTPUT«0␤»
15:59 MetaZoffix joined #perl6-dev
16:01 MetaZoffix m: sub ave {my int $n = 100_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}; await ^2 .map: { start ave }; say now - INIT now
16:01 MetaZoffix Hangs for some reason.
16:02 camelia rakudo-moar 77a2ff: OUTPUT«(timeout)»
16:03 MetaZoffix m: my @cores = ^1 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say @cores.sum / @cores;
16:03 camelia rakudo-moar 77a2ff: OUTPUT«0.500256106089017␤»
16:03 MetaZoffix m: my @cores = ^2 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say @cores.sum / @cores;
16:03 camelia rakudo-moar 77a2ff: OUTPUT«0.500343516183882␤»
16:03 MetaZoffix m: my @cores = ^4 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say @cores.sum / @cores;
16:03 camelia rakudo-moar 77a2ff: OUTPUT«0.500091965871348␤»
16:03 MetaZoffix hm,  interesting. On  my 2016.08.1-143-gc9b18c6 those appear to run as single-core
16:04 MetaZoffix committable6: c9b18c6 my @cores = ^4 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say @cores.sum / @cores;
16:04 committable6 MetaZoffix, ¦«c9b18c6»: 0.499774061391611
16:04 MetaZoffix committable6: c9b18c6 my @cores = ^1 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say @cores.sum / @cores;
16:04 committable6 MetaZoffix, ¦«c9b18c6»: 0.499908298599251
16:04 MetaZoffix Oh, I'm printing wrong thing >_<
16:04 timotimo yeah, that's the calculated value
16:04 MetaZoffix m: my @cores = ^1 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say now - INIT now
16:04 camelia rakudo-moar 77a2ff: OUTPUT«1.9262441␤»
16:04 MetaZoffix m: my @cores = ^4 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say now - INIT now
16:04 camelia rakudo-moar 77a2ff: OUTPUT«3.3750978␤»
16:04 MetaZoffix m: my @cores = ^2 .map: { start {my int $n = 1_000_000; my num $sum = 0e0; repeat { $sum += rand; } until ++$ == $n; $sum/$n}}; @cores = await @cores; say now - INIT now
16:05 camelia rakudo-moar 77a2ff: OUTPUT«2.76104950␤»
16:05 timotimo you do know that you're using a state variable in there, right?
16:05 timotimo and that's shared for all the cores?
16:05 MetaZoffix Oh, I didn't know that they're shared
16:05 timotimo that's what state vars do
16:05 timotimo they hang on to the sub or block they live in
16:05 timotimo i bet one of the cores hits the number exactly and all others count up until infinity
16:05 MetaZoffix Probably
16:06 timotimo that'd explain the hang
16:06 timotimo also, it'd scale ... rather well :)
16:06 MetaZoffix m: sub ave {my int $n = 100_000; my num $sum = 0e0; repeat { $sum += rand; } until $n-- == 0; $sum/$n}; await ^2 .map: { start ave }; say now - INIT now
16:06 camelia rakudo-moar 77a2ff: OUTPUT«0.1089755␤»
16:06 MetaZoffix timotimo++
16:06 timotimo yay
16:10 Ven_ joined #perl6-dev
16:28 Ven_ joined #perl6-dev
16:41 psch jnthn: did you see http://irclog.perlgeek.de/perl6-dev/2016-09-21#i_13248341 btw?
16:41 psch jnthn: seems that's at least somewhat in the vicinity of your latest moar commits
16:47 jnthn m: say uniname "\x16ef"
16:47 camelia rakudo-moar 77a2ff: OUTPUT«RUNIC TVIMADUR SYMBOL␤»
16:51 jnthn m: say uniprop "\x16ef"
16:51 camelia rakudo-moar 77a2ff: OUTPUT«Nl␤»
16:52 jnthn m: say uniprop 0x16ef
16:52 camelia rakudo-moar 77a2ff: OUTPUT«Nl␤»
16:54 timotimo New line? :P
16:54 jnthn Nl is Number, letter
16:55 jnthn We consider stuff alaphabetic in Moar if they're in L*
16:56 jnthn Nl is described as "Numerals composed of letters or letterlike symbols (e.g., Roman numerals)"
16:56 jnthn Not sure that makes them alphabetic. TimToady may have a useful opinion. :)
17:03 AlexDaniel timotimo: this one was funny as well: http://irclog.perlgeek.de/perl6/2016-08-07#i_12979613
17:03 yoleaux2 19 Sep 2016 10:36Z <Zoffix> AlexDaniel: no Test.pm? For committable6, 2016.04 m: "ac" ~~ /(.)(.)?(.)/;  use Test; is-deeply $/.perl.EVAL, $/   https://gist.github.com/de1adfd58e8b2fb2925e8d5d85b356fd
17:03 yoleaux2 11:09Z <jnthn> AlexDaniel: MoarVM HEAD has a hopeful fix for RT #129291 (didn't bump MOAR/NQP_REVISION files yet); if you get chance, please give it a go. :)
17:03 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129291
17:03 AlexDaniel oh wow
17:04 timotimo AlexDaniel: no means no?
17:04 AlexDaniel jnthn: these are some great news. *Of course* this is going to be tested, as it affects whateverables badly :)
17:04 AlexDaniel timotimo: no. It's “number, other”. :PP
17:05 AlexDaniel but yeah
17:05 AlexDaniel committable6: releases use Test
17:05 committable6 AlexDaniel, https://gist.github.com/111fbd7cb02b4ce4101f34f02a290c37
17:06 AlexDaniel committable6: 2016.04 use Test; say ‘hello world’
17:06 committable6 AlexDaniel, ¦«2016.04»: hello world
17:06 AlexDaniel committable6: 2016.04 use TestFoo; say ‘hello world’
17:06 committable6 AlexDaniel, https://gist.github.com/3f5bf962241669547ca9bc273f452748
17:07 AlexDaniel committable6, 2016.04 m: "ac" ~~ /(.)(.)?(.)/;  use Test; is-deeply $/.perl.EVAL, $/
17:07 committable6 AlexDaniel, https://gist.github.com/b75ba7f354b1629286cea9e67362f578
17:08 jnthn AlexDaniel: OK, going for dinner now, but I may bump MOAR/NQP revisions later so we get it available in Rakudo HEAD and can test it out.
17:08 jnthn Was going to bump it after getting basic Unicode 9 support in place, but ran into a weird issue :/
17:08 * jnthn bbl
17:08 AlexDaniel jnthn: ah, it's not bumped yet. Did not understand that.
17:08 AlexDaniel (dammit, should've read the message fully. Was so excited to see it)
17:14 AlexDaniel .tell Zoffix See this: http://irclog.perlgeek.de/perl6-dev/2016-09-21#i_13250357 – it is possible that when you tried it, the archive did not get extracted fully, this happens pretty often with perl6 whateverables (there is also a chance that recent moarvm fix affects this in a good way, see same log). Right now you can try running the same thing twice. Hopefully this issue will go away one day.
17:14 yoleaux2 AlexDaniel: I'll pass your message to Zoffix.
17:54 Ven_ joined #perl6-dev
18:17 edehont joined #perl6-dev
18:22 MetaZoffix joined #perl6-dev
18:49 dalek roast: 50e7fb2 | (Zoffix Znet)++ | S32-array/splice.t:
18:49 dalek roast: [coverage] test .splice(Whatever, Whatever, <list>)
18:49 dalek roast: review: https://github.com/perl6/roast/commit/50e7fb2105
19:08 Ven_ joined #perl6-dev
19:08 Ven_ joined #perl6-dev
19:23 dalek roast: 72c8e95 | (Zoffix Znet)++ | S32-array/splice.t:
19:23 dalek roast: [coverage] cover all uncovered .splice candidates
19:23 dalek roast: review: https://github.com/perl6/roast/commit/72c8e95a24
19:25 Ven__ joined #perl6-dev
19:42 lizmat good *, #perl6-dev
19:43 lizmat suppose someone wants to build a "spurt" in module space that takes a :gzip named parameter
19:43 lizmat which would automatically gzip the file and add the .gz extension to the file name
19:44 lizmat afaics, that's not really possible now because "spurt" is an only sub, not a multi
19:46 [TuxCM] joined #perl6-dev
19:48 Ven_ joined #perl6-dev
19:50 timotimo you can still override it and call back into SETTING::spurt if you like
19:51 lizmat well, I guess my question is: is there a reason why spurt() doesn't start out as a multi ?
19:53 timotimo i think it could become a multi. at least in 6.d that ought to be very possible
19:54 lizmat why in 6.d ?
19:57 timotimo well, going from an only to a multi seems like a big change
19:57 timotimo okay, it's not really a breaking change; the other direction would be
19:58 ZoffixMobile joined #perl6-dev
19:59 lizmat indeed, my point :-)
19:59 ZoffixMobile Would that break the ability to override the default spurt and break any code that currently does so?
19:59 timotimo no
19:59 timotimo oh wait
20:00 ZoffixMobile ah no, 'cause you can define your own + for example and those are multies
20:00 lizmat ZoffixMobile: you can always override if you provide your own proto
20:00 ZoffixMobile ah
20:02 timotimo m: sub spurt() { }
20:02 camelia rakudo-moar 77a2ff: ( no output )
20:03 timotimo m: multi sub spurt() { }
20:03 camelia rakudo-moar 77a2ff: ( no output )
20:03 timotimo currently if you define your own "multi sub", you currently wouldn't have the stuff from the core setting in it
20:06 lizmat indeed
20:07 lizmat so I made spurt a multi, and made my own with a :$gzip! (aka required named param)
20:07 lizmat but it still selects the setting one  :-(
20:08 moritz does the setting one have a *% or so?
20:08 lizmat moritz: the setting has a |c
20:08 timotimo ooooh
20:08 timotimo that's very slurpery
20:09 mst and if you \ it you get a slurpery slope
20:09 moritz lizmat: eeks. Then you need to compete on the types of the positionals
20:11 pmurias how fast are multis compared to only subs?
20:11 lizmat if the lookup is cached, just as fast
20:11 lizmat aka no where constraints in the signature
20:13 lizmat m: multi a($a,:$enc,|c) { "A" }; multi a($a,:$gzip!,|c) { "B" }; say a("foo",:gzip)  # expected B
20:13 camelia rakudo-moar 77a2ff: OUTPUT«A␤»
20:13 lizmat m: multi a($a,|c) { "A" }; multi a($a,:$gzip!,|c) { "B" }; say a("foo",:gzip)  # expected B
20:13 camelia rakudo-moar 77a2ff: OUTPUT«B␤»
20:14 lizmat I guess this is a bug, as the required named is narrower than the optional named
20:17 * moritz very unsure about the role of named tied-breaking
20:17 moritz does the spurt in the setting actually needs |c?
20:18 moritz if not, changing it to a narrower signature might be the best way to allow enhancements through multi dispatch
20:20 lizmat moritz: I just found out (I think) that it just needs the |c, as the default for :enc is taken care or by IO::Path.spurt correctly
20:20 lizmat so it would solve it for this case
20:20 Ven_ joined #perl6-dev
20:25 Ven_ joined #perl6-dev
20:31 dalek rakudo/nom: 3789a07 | lizmat++ | src/core/io_operators.pm:
20:31 dalek rakudo/nom: Make spurt a multi
20:31 dalek rakudo/nom:
20:31 dalek rakudo/nom: Also make the signature narrower, because IO::Path takes care of
20:31 dalek rakudo/nom: defaulting the :enc parameter correctly.
20:31 dalek rakudo/nom:
20:31 dalek rakudo/nom: This should allow the ecosystem to make a spurt() with a :gzip or
20:31 dalek rakudo/nom: :bzip2 named parameter.  (hint hint :-)
20:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3789a07635
20:32 lizmat spectest clean, fwiw  :-)
20:33 timotimo OK ... not covered by tests == some freedom for us devs
20:56 Ven_ joined #perl6-dev
21:00 hoelzro joined #perl6-dev
21:10 lizmat re the spurt discussion: #129329
21:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=129329
21:10 lizmat good night, #perl6!
21:11 timotimo maybe it only works if you turn |c into *% ?
21:11 bartolin joined #perl6-dev
21:18 ZoffixMobile joined #perl6-dev
21:19 ZoffixMobile .tell mst exactly 1 year ago you told me in magnet #perl to poke you in a year about binary package installer for CPAN :)
21:19 yoleaux2 ZoffixMobile: I'll pass your message to mst.
21:19 ZoffixMobile So I'm... poking you, as I promised
21:45 camelia joined #perl6-dev
22:01 gfldex .tell lizmat if enums would implement the role Enumeration (as the spec asked) the where-clause would not be needed
22:01 yoleaux2 gfldex: I'll pass your message to lizmat.
22:22 Zoffix joined #perl6-dev
22:30 Zoffix c: Array, 'flat', \()
22:30 yoleaux2 17:14Z <AlexDaniel> Zoffix: See this: http://irclog.perlgeek.de/perl6-dev/2016-09-21#i_13250357 – it is possible that when you tried it, the archive did not get extracted fully, this happens pretty often with perl6 whateverables (there is also a chance that recent moarvm fix affects this in a good way, see same log). Right now you can try running the same thing twice. Hopefully this issue will go away one day.
22:30 Undercover Zoffix, The code is NOT hit during stresstest See http://perl6.WTF/src_core_Array.pm.coverage.html#L490 for details
22:30 Zoffix m: Array.flat()
22:30 camelia rakudo-moar 3789a0: ( no output )
22:30 Zoffix m: dd Array.flat()
22:30 camelia rakudo-moar 3789a0: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at <tmp> line 1␤␤»
22:30 Zoffix (attributes?)
22:30 Zoffix s: &dd
22:30 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/3789a07/src/core/Any.pm#L533
22:32 timotimo well, how else is Array.flat supposed to do its job? :P
22:32 Zoffix m: Array.is-lazy()
22:32 camelia rakudo-moar 3789a0: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at <tmp> line 1␤␤»
22:32 timotimo oh
22:32 Zoffix timotimo, it's identity
22:32 timotimo i see now
22:33 timotimo m: say Array.flat()
22:33 camelia rakudo-moar 3789a0: OUTPUT«(Array)␤»
22:33 timotimo it's dd that did it, i see.
22:33 Zoffix Threw me off for a second,.
22:44 dalek roast: 0a49fcb | (Zoffix Znet)++ | S02-types/array.t:
22:44 dalek roast: [coverage]  Array:U.flat is identity
22:44 dalek roast: review: https://github.com/perl6/roast/commit/0a49fcbe0d
23:49 dalek roast: d6fff7c | (Zoffix Znet)++ | S32-array/splice.t:
23:49 dalek roast: [cover] Cover .splice(Whatever, Whatever)
23:49 dalek roast: review: https://github.com/perl6/roast/commit/d6fff7cf7f
23:53 dalek roast: dbb376e | (Zoffix Znet)++ | S32-array/create.t:
23:53 dalek roast: [coverage] circumfix:<[ ]>() creates an Array
23:53 dalek roast: review: https://github.com/perl6/roast/commit/dbb376e500

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