Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-02-07

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

All times shown according to UTC.

Time Nick Message
00:04 * TimToady also wonders how many times he's mistyped --ll-exceptions by now...
00:11 samcv m: my Array[Int] $thingy; $thingy.push("string")
00:11 camelia rakudo-moar 4efcc2: OUTPUT«Type check failed in assignment to ; expected Int but got Str ("string")␤  in block <unit> at <tmp> line 1␤␤»
00:11 samcv how do i find out which exception this threw?
00:14 IOninja m: my Array[Int] $thingy; try $thingy.push("string"); say $!.^name
00:14 camelia rakudo-moar 4efcc2: OUTPUT«X::TypeCheck::Assignment␤»
00:14 samcv thx :)
00:23 pyrimidine joined #perl6-dev
00:55 TimToady samcv: there's something slightly "off" about the current $*COLLATION interface, insofar as we should be encouraging people to do "my $*COLLATION = ..." and our current .set method instead encourages people to clobber the PROCESS::<$COLLATION>, which is a bit antisocial
00:56 TimToady especially if we ever get to the point of running separate interpreters, where each has its own GLOBAL for that sort of stuff
00:56 samcv hmm
00:56 samcv so how should I change it?
00:57 TimToady so we should think about putting it into GLOBAL at some point, but more than that, figure out how to do 'my %*FOO' such that it knows the type of an outer %*FOO somehow
00:57 TimToady don't quite know how to do that yet
00:57 samcv ah k
00:58 TimToady otherwise we get "my Collation $*COLLATION .= set()" and such, which is a bit wordy
00:58 TimToady maybe "temp %*FOO" should be more like that
00:59 TimToady STD actually rewrote that to "my %*FOO = CALLERS::<%*FOO>" or so, but rakudo doesn't really support that model of dynvars yet
01:01 TimToady but that form of temporization would automatically pull down the type of the caller's dynvar
01:01 TimToady so we wouldn't have to repeat it everywhere, if it were the same
01:01 samcv ah
01:02 TimToady well, it'd probably have to clone the outer one, so that local mods aren't propagated upstream
01:02 TimToady s/outer/caller/
01:03 TimToady or we could do something like automatically default any untyped my %*FOO to be the same as an ancestor; hafta think about the ramifications of that
01:04 TimToady m: say PROCESS::.pairs
01:04 camelia rakudo-moar 4efcc2: OUTPUT«($ERR => IO::Handle<IO::Special.new(what => "<STDERR>")>(opened, at octet 0) $SPEC => (Unix) $COLLATION => collation-level => 15, Country => International, Language => None, primary => True, secondary => True, tertiary => True, quaternary => True &chdir =>…»
01:06 TimToady m: say $*COLLATION.VAR.^name
01:06 camelia rakudo-moar 4efcc2: OUTPUT«Scalar␤»
01:06 TimToady m: say $*COLLATION.VAR.^of
01:06 camelia rakudo-moar 4efcc2: OUTPUT«No such method 'of' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
01:06 TimToady m: say $*COLLATION.VAR.of
01:06 camelia rakudo-moar 4efcc2: OUTPUT«(Mu)␤»
01:08 TimToady well, if we bind an immutable collation value, the people have to use some kind of constructor to set their own 'my $*COLLATION ='
01:09 TimToady so the current .set method, which implies mutable, was probably a bad idea on my part
01:10 TimToady so at the moment we should probably aim for an interface that looks more like: my $*COLLATION = Collation.new(options)
01:10 TimToady and then maybe think about how we can get a type on the left so we can use .= new instead
01:11 TimToady but that would at least fix the magical-action-at-a-distance problem
01:11 TimToady or render it much less likely, anyway
01:12 TimToady m: say PROCESS::.keys
01:12 camelia rakudo-moar 4efcc2: OUTPUT«($ERR $SPEC $COLLATION &chdir $AWAITER $IN %ENV $OUT)␤»
01:13 TimToady m: PROCESS::<$ERR> = 42
01:13 camelia rakudo-moar 4efcc2: ( no output )
01:13 TimToady m: $*ERR = 42
01:13 camelia rakudo-moar 4efcc2: ( no output )
01:13 TimToady m: say $*PID
01:13 camelia rakudo-moar 4efcc2: OUTPUT«13519␤»
01:14 TimToady m: say PROCESS:<$PID>
01:14 camelia rakudo-moar 4efcc2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    PROCESS:<$PID> used at line 1␤␤»
01:14 Geth ¦ rakudo/nom: 46313fae88 | (Samantha McVey)++ | 2 files
01:14 Geth ¦ rakudo/nom: Add an experimental collate method and a Cool:D multi for `coll`
01:14 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46313fae88
01:15 samcv TimToady, so with my $*COLLATION it would be dynamic but not tied to the process?
01:15 TimToady well, the processes PID shouldn't be modifiable either...
01:15 TimToady *s's
01:16 TimToady your entire mainline can just set my $*COLLATION at the top if it wants
01:16 TimToady and that is effectively global to everything you call
01:16 samcv yeah
01:16 samcv and then do we just have a default $*COLLATION declared in rakudo
01:17 samcv and in case they don't declare it just uses that one
01:17 TimToady we could poke the root of it into GLOBAL, if we decide the default is something that is global to an interpreter rather than to the process
01:18 samcv i think that is reasonable
01:18 TimToady m: say GLOBAL::.keys
01:18 camelia rakudo-moar 4efcc2: OUTPUT«()␤»
01:18 TimToady obviously we haven't thought much about poking things into GLOBAL yet
01:18 TimToady but if we're ever gonna have an apache-alike that runs multiple virual processes, we have to keep those from interfering with each other
01:19 samcv yeah
01:19 * TimToady is a little surprised that $*PID doesn't originate from PROCESS, which kinda "duh"
01:19 TimToady *seems
01:19 samcv heh
01:21 TimToady anyway, .set was twinging my conscience this morning after you went to bed, so I thought I'd say something...
01:22 samcv thanks for letting me know
01:22 TimToady no problem, thanks for putting up with me always juggling way too many balls at once :)
01:26 samcv Ball juggler in chief?
01:26 samcv is that like the court jester ;P
01:26 TimToady I made a fool of myself...
01:27 TimToady (alluding to The Court Jester, of course)
01:32 samcv you may now continue your juggling :)
01:32 samcv for it pleases the court
01:55 * timotimo clickbaits https://p6weekly.wordpress.com/2017/02/07/2017-06-fosdem-after-math/
01:58 pyrimidine joined #perl6-dev
02:16 ggoebel joined #perl6-dev
02:26 pyrimidine joined #perl6-dev
02:30 Geth ¦ rakudo/nom: 192387883e | (Samantha McVey)++ | 2 files
02:30 Geth ¦ rakudo/nom: Hide unicmp coll and .collate behind experimental :collation
02:30 Geth ¦ rakudo/nom:
02:30 Geth ¦ rakudo/nom: Seems to be a better permanent name for these features than unicmp
02:30 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/192387883e
02:56 user_ joined #perl6-dev
03:02 mr_ron joined #perl6-dev
03:29 pyrimidine joined #perl6-dev
04:11 MasterDuke samcv: i think you may have broken the rakudo jvm build. `Stage jast       : Error while compiling op unicmp_s (source text: "nqp::unicmp_s(\n            nqp::unbox_s(a), nqp::unbox_s(b), 15,0,0)"), no registered operation handler`
04:12 samcv hmm i compiled it on jvm
04:12 samcv i will recompile though
04:12 MasterDuke i'm a commit or two behind HEAD, i can try pulling and recompiling
04:13 samcv i will try
04:15 samcv i may have it broken a few commits back tbh tho
04:15 samcv before i put in #?if moar and stuff
04:16 samcv would be nice if we could make travis only check if rakudo compiles and runs some basic tests on jvm or something
04:18 samcv what commit are you on MasterDuke?
04:19 MasterDuke doesn't it already do jvm? or maybe it did and then that got turned off because jvm was broken for a while?
04:20 samcv no it does jvm
04:20 samcv but it doesn't pass all tests so it is always failing
04:20 samcv even when it is compiling
04:20 MasterDuke well, i pulled, so i'm on HEAD now (192387883eb4856d906660978ab1cb64c9dcb650)
04:22 samcv make: *** [CORE.setting.jar] Error 137 is what TravisCI says
04:22 samcv but it will take a while for nqp and rakudo to compile
04:22 samcv and i will investigate
04:22 MasterDuke thanks
04:23 samcv it says Stage jast       : Killed
04:23 samcv is that what you got?
04:25 MasterDuke that's usually the oom killer
04:25 MasterDuke how much free memory do you have?
04:28 samcv no that is travis
04:30 MasterDuke_ joined #perl6-dev
04:30 samcv i'm gonna try this out http://blog.endpoint.com/2012/08/automatically-kill-process-using-too.html
04:30 samcv for when MVM goes mental and uses all my memory forcing me to hard power off
04:31 MasterDuke killed my box, had to hard reset
04:31 samcv hasn't happened recently but. always horrible when it does
04:31 samcv it is very fast at being able to allocate memory lol
04:31 samcv i have a SSD and 32GB of swap, and it still does it to my computer as SOON as it hits the swap point
04:32 samcv i'm sure doesn't help i have full hard drive encryption
04:34 MasterDuke i need more ram, only have 8gb
04:35 samcv uhm i think it compiles fine tbh
04:35 samcv it's not yet done but
04:35 samcv Creating './perl6-j'
04:36 samcv oh wait maybe not. ok it's on stage jast so i guess i'll find out soon
04:37 MasterDuke i don't consider it done until a `make install` completes successfully. i've had some changes compile fine, but fail there
04:45 samcv compiled fine MasterDuke
04:45 MasterDuke ah, excellent
04:46 samcv :D
04:46 MasterDuke now if it fails i know it's my change
04:52 Geth ¦ nqp: 9ecb40703c | MasterDuke17++ | 6 files
04:52 Geth ¦ nqp: Intify things that cause the most MVM_coerce_smart_numify
04:52 Geth ¦ nqp:
04:52 Geth ¦ nqp: These are variable that cause lots of calls to MVM_coerce_smart_numify.
04:52 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/9ecb40703c
04:53 MasterDuke nqp and rakudo both built on the jvm with that PR, so i merged it
05:11 samcv MasterDuke, how do I fix java.nio.file.NoSuchFileException: blib/Perl6/BOOTSTRAP.jar
05:11 samcv MasterDuke, also does that change speed things up?
05:12 MasterDuke did you do `perl Configure.pl ...`?
05:12 MasterDuke and not noticeably
05:12 samcv yes i did
05:12 samcv let's pretend it made it 10x faster
05:13 MasterDuke may just have to `make clean`, the jvm building is just a little more finicky all around
05:13 samcv ^
05:13 MasterDuke i could live with that
05:14 MasterDuke it did remove something like 15 million calls to MVM_coerce_smart_numify
05:15 samcv nice!
05:15 samcv ↑5
05:15 MasterDuke yeah, it seems like a good thing overall, they just weren't terribly expensive
05:16 samcv it's scientifically proven i make 100 1% speed improvements, it will then become instantaneous and require no time at all
05:17 MasterDuke science never lies
05:18 samcv yep! 100 * 1% = 100% so it will take 100% - 100% = 0!
05:35 TimToady wait, I thought 0! was defined as 1...
05:49 samcv m: for ^10 { say $++ }
05:49 camelia rakudo-moar 192387: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
05:50 samcv TimToady, what magic makes $ become 0
05:50 samcv when it's usually just (Any)
05:59 TimToady multi postfix:<++>(Mu:U $a is rw) { $a = 1; 0 }
06:00 samcv heh
06:00 samcv smart
06:01 TimToady it was mandated by the specs
06:02 samcv multi dispatch ftw
06:41 AlexDaniel joined #perl6-dev
06:52 RabidGravy joined #perl6-dev
07:08 Geth ¦ rakudo/nom: 56114251e1 | (Samantha McVey)++ | src/core/Any-iterable-methods.pm
07:08 Geth ¦ rakudo/nom: Add .collate method to Any-iterable-methods.pm
07:08 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/56114251e1
07:08 Geth ¦ rakudo/nom: 9f7e618fc0 | (Samantha McVey)++ | src/core/Any-iterable-methods.pm
07:08 Geth ¦ rakudo/nom: Trim whitespace in Any-iterable-methods.pm
07:08 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9f7e618fc0
07:09 samcv TimToady, .sort for Hashes only sorts the keys right?
07:09 samcv and returns the pairs
07:10 samcv when I add collate to Any-iterable-methods.pm say %hash.collate
07:10 samcv Cannot resolve caller infix:<coll>(Pair, Pair);
07:10 samcv should I just add a multi which collates the keys when given two pairs?
07:14 samcv eventually should be able to make collate only get the value of $*COLLATION.collation-level once and mostly remove the speed decrease from having to call it so many times
07:14 samcv when using coll
07:14 samcv i guess that's sorta an unrelated aside
07:14 samcv but for now the collate methods just call self.sort(&[coll])
07:22 pyrimidi_ joined #perl6-dev
07:24 TimToady m: say :a(1) cmp :a(2)
07:24 camelia rakudo-moar 192387: OUTPUT«Less␤»
07:24 TimToady m: say :a(2) cmp :a(1)
07:24 camelia rakudo-moar 192387: OUTPUT«More␤»
07:24 TimToady pair comparison includes the values
07:25 TimToady of course, if you know you have a hash, the keys can't be identical
07:25 TimToady well, they could be identical from a collation point of view, I suppose
07:26 TimToady so you have to include the keys
07:26 TimToady er, values
07:27 samcv so doing by pair sorts by key and then falls back to value?
07:27 samcv so the answer is i should make a multi, yes?
07:34 TimToady sounds like
07:40 samcv great
08:08 Geth ¦ rakudo/nom: 6990133410 | (Samantha McVey)++ | src/core/Str.pm
08:08 Geth ¦ rakudo/nom: Add multi's for coll and unicmp for (Pair:D, Pair:D)
08:08 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6990133410
10:16 agentzh joined #perl6-dev
11:42 Geth ¦ rakudo/fix-thunks: aec4f5fad9 | (Pawel Murias)++ | 3 files
11:42 Geth ¦ rakudo/fix-thunks: Emit properly nested blocks for the combination of default value to params and subs/->.
11:42 Geth ¦ rakudo/fix-thunks: review: https://github.com/rakudo/rakudo/commit/aec4f5fad9
11:43 pmurias joined #perl6-dev
11:43 jnthn pmurias++
11:43 jnthn Well, I didn't read the patch yet, but... :)
11:48 pmurias jnthn: it's still being spectested so it might have some horrible flow
11:49 nine Patch looks sensible at a first glance
11:53 timotimo patch looks glancible at first sense
12:16 pmurias If the patch looks sane I'll expand it to fix up '$foo where sub {...}' and other thunks
12:59 ggoebel joined #perl6-dev
13:49 cognominal joined #perl6-dev
13:54 pyrimidine joined #perl6-dev
14:13 raiph joined #perl6-dev
14:18 agentzh joined #perl6-dev
14:39 IOninja NeuralAnomaly: status
14:39 NeuralAnomaly IOninja, [✘] Next release will be in 1 week and 4 days. Since last release, there are 30 new still-open tickets (30 unreviewed and 0 blockers) and 173 unreviewed commits. See http://perl6.fail/release/stats for details
14:39 IOninja 1.5 weeks till release :o
14:39 IOninja Time flies
15:18 pyrimidine joined #perl6-dev
16:50 agentzh joined #perl6-dev
16:55 pyrimidine joined #perl6-dev
17:00 buggable joined #perl6-dev
17:01 Geth ¦ rakudo: pmurias++ created pull request #1016: Emit properly nested blocks for the combination of default value to p…
17:01 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1016
17:17 geekosaur joined #perl6-dev
17:20 AlexDaniel joined #perl6-dev
17:29 Geth ¦ nqp: 4e7eee01b7 | (Zoffix Znet)++ | src/HLL/CommandLine.nqp
17:29 Geth ¦ nqp: Fix typos in POD
17:29 Geth ¦ nqp:
17:29 Geth ¦ nqp: Part of fixing #346
17:29 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/4e7eee01b7
17:38 TimToady joined #perl6-dev
18:04 agentzh joined #perl6-dev
18:16 pyrimidine joined #perl6-dev
18:46 IOninja How come this line (and some others) do `my $laze = values.is-lazy; values.map(&code).lazy-if($laze)` instead of just `values.map(&code).lazy-if(values.is-lazy)` ? https://github.com/rakudo/rakudo/blob/nom/src/core/Any-iterable-methods.pm#L1951
18:48 timotimo mapping over the values might reify it completely?
18:48 IOninja Wouldn't values.is-lazy be obtained before that?
18:49 timotimo don't think so
18:49 timotimo well, it depends on whether or not the map immediately does something
18:49 timotimo to be honest, i haven't looked at this part of the code in a long while
18:50 IOninja m: sub x (\values) { values.map({$_}).lazy-if(values.is-lazy) }; say (x lazy 1, 2, 3).is-lazy
18:50 camelia rakudo-moar 699013: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:50 IOninja m: sub x (\values) { my $laze = values.is-lazy; values.map({$_}).lazy-if($laze) }; say (x lazy 1, 2, 3).is-lazy
18:50 camelia rakudo-moar 699013: OUTPUT«True␤»
18:50 IOninja Ahhhh
18:51 IOninja Well, half-an-ahh.
18:52 IOninja m: sub x (\values) { $ = values.is-lazy; $ = values.map({$_}); 42 }; say (x lazy 1, 2, 3)
18:52 camelia rakudo-moar 699013: OUTPUT«42␤»
18:52 IOninja m: sub x (\values) { $ = values.map({$_}); $ = values.is-lazy; 42 }; say (x lazy 1, 2, 3)
18:52 camelia rakudo-moar 699013: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:52 IOninja So it *is* called after it's (started to) mapped
18:59 IOninja m: sub x (\values) { $ = values.map({say "$_"}); $ = values.is-lazy; 42 }; say (x lazy 1, 2, 3)
18:59 camelia rakudo-moar 699013: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:00 IOninja s: (lazy 1, 2, 3), 'map', \({;})
19:00 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/6990133/src/core/Any-iterable-methods.pm#L17
19:16 IOninja ZOFVM: Files=1224, Tests=132853, 145 wallclock secs (21.73 usr  3.16 sys + 2703.73 cusr 215.98 csys = 2944.60 CPU)
19:19 Geth ¦ rakudo/nom: 51b0aba8e8 | (Zoffix Znet)++ | src/core/Iterable.pm
19:19 Geth ¦ rakudo/nom: Make Iterable.flat propagate `is-lazy`
19:19 Geth ¦ rakudo/nom:
19:19 Geth ¦ rakudo/nom: https://irclog.perlgeek.de/perl6/2017-02-07#i_14059136
19:19 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/51b0aba8e8
19:22 * IOninja is failing to find any non-accidental tests for .flat :(
19:24 TimToady I see what you mean
19:25 TimToady I guess all the GLR testing was rather more ad hoc...
19:25 TimToady (of flat)
19:27 pyrimidine joined #perl6-dev
19:34 pyrimidine joined #perl6-dev
19:47 RabidGravy joined #perl6-dev
20:02 Geth ¦ roast: f00494253b | (Zoffix Znet)++ | S02-types/array.t
20:02 Geth ¦ roast: Test Iterable.flat propagates .is-lazy
20:02 Geth ¦ roast:
20:02 Geth ¦ roast: Note that routine &flat does not propagate it and based on the
20:02 Geth ¦ roast: source comments[^1], it appears it wasn't meant to.
20:02 Geth ¦ roast:
20:02 Geth ¦ roast: [1] https://github.com/rakudo/rakudo/blob/51b0aba/src/core/List.pm#L1377-L1382
20:02 Geth ¦ roast: review: https://github.com/perl6/roast/commit/f00494253b
20:04 IOninja or maybe I'm misreading that source comment....
20:05 IOninja m: multi x(Seq $x) { $x.is-lazy.say }; multi x(**@x) { @x.is-lazy.say }; x(lazy 1, 2, 3)
20:05 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
20:05 IOninja hmmmm
20:05 IOninja m: multi x(Seq $x) { $x.is-lazy.say }; multi x(**@x) { @x.is-lazy.say }; x(42, lazy 1, 2, 3)
20:05 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
20:05 IOninja m: multi x(Seq $x) { $x.is-lazy.say }; multi x(**@x) { @x.is-lazy.say }; x(1..*)
20:05 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
20:06 IOninja m: multi x(Iterable $x) { $x.is-lazy.say }; multi x(**@x) { @x.is-lazy.say }; x(1..*)
20:06 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
20:07 IOninja guess that multi can be shoved in there to make it propagate .is-lazy in cases where it can; unsure if that covers all the core things or user subclasses
20:08 IOninja m: sub (*@x) { say @x.is-lazy }(1..*)
20:08 camelia rakudo-moar 51b0ab: OUTPUT«True␤»
20:08 IOninja m: sub (**@x) { say @x.is-lazy }(1..*)
20:08 camelia rakudo-moar 51b0ab: OUTPUT«False␤»
20:09 IOninja or is the slurpy supposed to propagate it?
20:36 pyrimidine joined #perl6-dev
20:48 [Coke] jnthn: if you have time tomorrow, any help on https://github.com/perl6/doc/issues/1175 would be greatly appreciated. Please let me know if you need more golf.
21:58 jnthn [Coke]: Ah, yes, I keep meaning to look at that...
21:59 * jnthn sticks it in a browser tab
22:08 RabidGravy I have stuff that stays in a browser tab for months
22:09 pmurias joined #perl6-dev
22:10 jnthn Me too, but I tend to see the ones at the top of the stack :)
22:16 MasterDuke IOninja: timotimo has a moarvm PR waiting to merge the coverage branch
22:18 timotimo it'll need to be fixed again since new ops were introduced recently
23:00 pyrimidine joined #perl6-dev
23:15 pyrimidine joined #perl6-dev

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