Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-09-08

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

All times shown according to UTC.

Time Nick Message
00:33 BenGoldberg joined #perl6-dev
01:55 ilbot3 joined #perl6-dev
01:55 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
01:59 geekosaur joined #perl6-dev
02:39 llfourn joined #perl6-dev
02:44 geekosaur joined #perl6-dev
04:43 masak [Coke]: I confess the bot completely slipped my mind. I'll be happy to learn (again) how to interact with it.
04:43 masak bisectable6: help
04:43 bisectable6 masak, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Bisectable
04:43 * masak approves of this reply
04:48 masak bisect: my $n = " ".indent(0); $n.indent(1) for ^1000
04:48 bisectable6 masak, Bisecting by exit signal (old=2015.12 new=347da8e). Old exit signal: 0 (None)
04:49 bisectable6 masak, bisect log: https://gist.github.com/8278100f4bb4642713c5be6d9c5eea5a
04:49 bisectable6 masak, (2017-09-06) https://github.com/rakudo/rakudo/commit/cbce672126a9c1dd2497c121c3c7c767e75f0dad
05:13 * masak is glad to see his bisect agrees with bisectable6's
05:13 lizmat Files=1223, Tests=67402, 292 wallclock secs (11.07 usr  4.65 sys + 1977.90 cusr 206.27 csys = 2199.89 CPU)
05:13 masak though I guess it's only so informative when the commit identified is an NQP bump
05:14 masak if I were slightly more savvy with Rakudo's build system, I might be able to bisect locally with different commits of NQP built
05:14 masak ...which would no doubt flag up a MoarVM bump... :P
05:15 masak actually, out of the four NQP commits in the bump, one is indeed a MoarVM bump: d016ffd
05:16 masak which then brings in 25 commits, most of which seem to consist of a MoarVM branch.
06:09 [Tux] This is Rakudo version 2017.08-95-g347da8e5b built on MoarVM version 2017.08.1-128-gde6dceda
06:09 [Tux] csv-ip5xs        1.304 -  1.352
06:09 [Tux] test             9.665 - 10.005
06:09 [Tux] test-t           3.486 -  3.492
06:09 [Tux] csv-parser      10.644 - 10.780
07:48 pmurias joined #perl6-dev
08:18 dogbert2 joined #perl6-dev
08:59 pmurias passing a native int when a native str is expected should fail?
09:00 jnthn Yes
09:00 jnthn Well, die
09:00 jnthn m: sub foo(str) { }; my int $i = 42; foo($i)
09:00 camelia rakudo-moar 347da8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Calling foo(int) will never work with declared signature (str)␤at <tmp>:1␤------> 3sub foo(str) { }; my int $i = 42; 7⏏5foo($i)␤»
09:00 jnthn Heh, it's even caught at compile time :)
09:01 pmurias ok, the jvm backend needs that fixed then (was checking if maybe the nqp tests are wrong and the JVM backend is correct ;) )
09:06 [TuxCM] joined #perl6-dev
09:07 AlexDaniel joined #perl6-dev
09:42 ggoebel joined #perl6-dev
09:51 Skarsnik joined #perl6-dev
10:05 dogbert2 .seen samcv
10:05 yoleaux I saw samcv 00:24Z in #moarvm: <samcv> neat
10:11 dogbert17_ joined #perl6-dev
10:14 dogbert2 jnthn: shouldn't we close https://github.com/MoarVM/MoarVM/issues/653
10:17 jnthn Ah, I thought it had been :)
11:15 cog_ joined #perl6-dev
12:26 pmurias bartolin: if you get stuck with anything while unbitrotting the jvm backend I can try to help
12:31 Geth ¦ nqp: 0e78e6b603 | pmurias++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java
12:31 Geth ¦ nqp: [jvm] When getting a wrong kind of native argument throw an exception instead of trying to coerce
12:31 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/0e78e6b603
12:31 Geth ¦ nqp: 91d6538e0b | pmurias++ | t/nqp/112-call.t
12:31 Geth ¦ nqp: Test passing wrongly typed required native named arguments
12:31 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/91d6538e0b
12:31 Geth ¦ rakudo/nom: e5a600997c | (Will "Coke" Coleda)++ | docs/windows.md
12:31 Geth ¦ rakudo/nom: Note how to build on windows
12:31 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e5a600997c
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: dad3f3c68b | (Timo Paulssen)++ | src/core/ThreadPoolScheduler.pm
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: spawn threads only if not enough idle threads exist
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler:
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: the magic trick is to mark a thread "claimed" for the duration
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: of its startup. This allows a bunch of "start"s in a row to
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: spawn equally many threads rather than seeing "one's already
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: starting, so we're fine". Now we can start threads only if
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: there are no free threads available (but we want one idle
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: thread in there anyway for a safety margin).
12:36 Geth ¦ rakudo/economic_thread_pool_scheduler: review: https://github.com/rakudo/rakudo/commit/dad3f3c68b
12:51 astj joined #perl6-dev
13:00 travis-ci joined #perl6-dev
13:00 travis-ci NQP build passed. pmurias 'Test passing wrongly typed required native named arguments'
13:00 travis-ci https://travis-ci.org/perl6/nqp/builds/273280091 https://github.com/perl6/nqp/compare/ad8355850e0b...91d6538e0b1c
13:00 travis-ci left #perl6-dev
13:02 astj joined #perl6-dev
13:12 AlexDaniel joined #perl6-dev
14:45 Geth ¦ roast: 638ad9b2ed | skids++ (committed by Moritz Lenz) | S32-str/sprintf-b.t
14:45 Geth ¦ roast: Alter tests to avoid unintended/irrelevant interpolation
14:45 Geth ¦ roast:
14:45 Geth ¦ roast: Allows us to change some skips to todos
14:45 Geth ¦ roast:   New RT#132040 added to deal separately with the "%+ " issue
14:45 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132040
14:45 Geth ¦ roast:   Alters tests... will need cherry-pick into 6.c-errata as well
14:45 Geth ¦ roast: review: https://github.com/perl6/roast/commit/638ad9b2ed
15:05 donaldh joined #perl6-dev
15:20 scovit joined #perl6-dev
15:21 scovit I suspect I found a bug:
15:21 scovit https://gist.github.com/anonymous/a07655f21354d9e4d07d1773a7c221dc
15:21 scovit is it intended behaviour? should I RT?
15:22 scovit (I found it in unrelated code)
15:23 timotimo what behavior are you seeing?
15:24 scovit the 0 byte in the second input is ignored
15:24 scovit if the second input is shorter then the first
15:25 scovit I suspect a .decode bug
15:25 timotimo utf8 is allowed to have null bytes, isn't it?
15:25 timotimo m: say "hello\0how\0are\0you?".encode("utf8")
15:25 camelia rakudo-moar e5a600: OUTPUT: «utf8:0x<68 65 6c 6c 6f 00 68 6f 77 00 61 72 65 00 79 6f 75 3f>␤»
15:25 timotimo m: say "hello\0how\0are\0you?".encode("utf8").decode("utf8")..perl
15:25 camelia rakudo-moar e5a600: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    perl used at line 1␤␤»
15:25 timotimo m: say "hello\0how\0are\0you?".encode("utf8").decode("utf8").perl
15:25 camelia rakudo-moar e5a600: OUTPUT: «"hello\0how\0are\0you?"␤»
15:26 jnthn yeah, the decoder isn't intended to consider the 0 byte as a string terminator
15:26 scovit putting ASCII there is the same
15:26 timotimo if you're interfacing with C you'll want to use either CString or functions that give you the intended length of a string
15:26 scovit timotimo I think it is a bug
15:26 timotimo i think it's intended behavior
15:26 jnthn scovit: Why do you think it's a bug?
15:27 geekosaur joined #perl6-dev
15:28 scovit because it forces me to change the interface for an obscure reason.. ok lets try with CString
15:28 jnthn What input are you giving the gets?
15:28 timotimo a long thing and then a short thing
15:29 scovit I am not using gets of course, this it an error string retrieval function from a C library
15:29 ilmari so the buffer will be 'short\0endoflongthing\0\0\0\0\0'
15:29 geekosaur joined #perl6-dev
15:29 jnthn Right, that's exactly what i see
15:29 scovit when shorter error message come out, there is a problem
15:29 ilmari if you want to stop at the first null, you need to do that yourself
15:29 ilmari perl6 string are not null-terminated
15:29 ilmari *strings
15:30 timotimo how does this function work?
15:30 jnthn scovit: do .perl on the first string and you'll see there's actually a bunch of null bytes at the end of it
15:30 timotimo do you pass it a size, or do you get a size back or what?
15:30 scovit jnthn I noticed that; timotimo: the size is just the size of the buffer, this is the C api
15:30 timotimo the function can't know the size of the buffer
15:30 scovit (probably originally was a fortran api. otherwise i dont undertand the terribility)
15:30 timotimo because such a thing doesn't exist in C
15:31 jnthn Anyway, Buf.decode is defined as deocding the full content of the buffer
15:31 scovit timotimo: I puss the size as an argument
15:31 timotimo OK
15:31 timotimo m: say "hello".split("\0").perl
15:31 camelia rakudo-moar e5a600: OUTPUT: «("hello",).Seq␤»
15:31 timotimo you can decode it, split by \0 and just take the head
15:32 timotimo oh, unless the 0 byte makes the utf8 invalid
15:32 timotimo which it can, i suppose
15:32 timotimo so maybe more like
15:33 scovit I can use the ASCII encoder, this is a library made in the '80s
15:33 timotimo m: say "hello\0oldstring".encode("utf8").list.grep({ 0 ff False }).decode("utf8")
15:33 camelia rakudo-moar e5a600: OUTPUT: «No such method 'decode' for invocant of type 'Seq'␤  in block <unit> at <tmp> line 1␤␤»
15:33 timotimo m: say "hello\0oldstring".encode("utf8").list.grep({ 0 ff False }).Buf.decode("utf8")
15:33 camelia rakudo-moar e5a600: OUTPUT: «No such method 'Buf' for invocant of type 'Seq'␤  in block <unit> at <tmp> line 1␤␤»
15:33 timotimo m: say "hello\0oldstring".encode("utf8").list.grep({ 0 ff False }).list.Buf.decode("utf8")
15:33 camelia rakudo-moar e5a600: OUTPUT: «No such method 'Buf' for invocant of type 'List'␤  in block <unit> at <tmp> line 1␤␤»
15:34 timotimo we don't have that, eh
15:34 timotimo m: say Buf.new("hello\0oldstring".encode("utf8").list.grep({ 0 ff False })).decode("utf8")
15:34 camelia rakudo-moar e5a600: OUTPUT: «␀oldstring␤»
15:34 timotimo wrong way around %)
15:34 jnthn You can just .index("\0")
15:34 jnthn On the decoded string
15:34 timotimo yeah, but then you have to [ ] on that number
15:34 timotimo i was hoping i could only mention the buffer once
15:35 jnthn .substr(0, .index("\0")) given .decode('ascii') or some such mebbe?
15:35 timotimo heh. yeah
15:35 scovit Ok, I can do this. the problem is that users will use the library interface. And it going to become very clumpsy
15:35 scovit for them
15:36 timotimo why do you give them the clunky interface, then? :)
15:36 scovit timotimo: peraphs because I do not know how to do that properly :)
15:37 jnthn Often modules doing native bindings will go to a bit of effort beyond exposing the native calls themselves, to present a more Perl 6-y interface
15:37 jnthn Or provide both: the guts and then a convenience API on top
15:37 scovit that was my plan
15:38 jnthn So I guess you'd only have to do this bit in fiddling in your wrapper, and then it's nice for users
15:39 timotimo you can use "is symbol" to have your sub with a different name from the native symbol
15:39 timotimo sub lolwhatisthis() is native('foo') is symbol("actual_function_name") { * }
15:40 scovit thanks, ok, not a bug
15:55 pyrimidine joined #perl6-dev
16:07 skids joined #perl6-dev
16:26 [TuxCM] joined #perl6-dev
16:27 astj joined #perl6-dev
17:04 ugexe [Coke]: as a heads up I do my windows build with Strawberry/VS (so does travis) re https://github.com/rakudo/rakudo/commit/e5a600997c30513404775242cf005bf2a26a5177#diff-6c1959d7a48f03c0a7bfd3e6a13fb3c4R59
17:05 pyrimidine joined #perl6-dev
17:07 TimToady joined #perl6-dev
17:18 [Coke] ugexe: ... ok. feel free to update any mistakes in there; was just trying to document it because at some point a few weeks ago there was a rash of windows issues, and I went through the steps of getting a compile together. (and after that several people mentioned that they too had windows builds)
17:33 ugexe yeah i was mentioning it more because i was curious if that setup didnt work for you, and if the difference could be the `git` package (+ utils)
17:34 [Coke] ... that's the setup I'm using?
17:34 [Coke] strawberry & VS2016
17:34 [Coke] er, 17
17:35 ugexe ah sorry i misunderstood. those two alternatives were... alternatives to exactly that
17:46 [Coke] (though we could easily add a gcc variant to that doc if we've already got strawberry)
17:46 scovit What would it take to implement CArray[Buf] ?
17:46 [Coke] going to update doc's t/valid-pod.t to also die if there is a pod *warning*, not just an error.
17:46 [Coke] right now, for example, "C<" is valid
17:48 timotimo scovit: in what way is it currently not possible to have that?
17:48 timotimo you can have CArray[CArray], can you not?
17:49 timotimo probably will have to have CArray[Pointer] instead and nativecast all the time
17:49 scovit A C array can only hold: not Buf.. Are you suggesting to replace all Buf with CArray?
17:49 scovit ^ this is the error message
17:49 timotimo yeah, a buf has to know its size
17:50 timotimo you can't do that within a CArray because we would have to create a Buf for every slot in the CArray (which we have no idea how big it is)
17:50 timotimo also, Buf really wants to manage its own memory, because it can grow, i.e. realloc
17:50 scovit ok, understood the problem
17:51 timotimo have you looked at NativeHelpers::Blob?
17:51 scovit I will check it out
17:52 scovit yes, I look'd at that already, basically it is a way to get the pointer out of the Buf object
17:52 timotimo hm, isn't it the other way around?
17:53 timotimo not sure
17:53 scovit both
17:53 timotimo oh wait, isn't that the thing that grabs the WHERE of the buf and takes a fixed offset to find the pointer to the data storage?
17:55 pyrimidine joined #perl6-dev
17:59 pyrimidi_ joined #perl6-dev
18:04 pyrimidine joined #perl6-dev
18:12 pyrimidine joined #perl6-dev
18:12 astj joined #perl6-dev
18:20 pyrimidine joined #perl6-dev
18:31 scovit joined #perl6-dev
18:33 scovit timotimo, what about a Blob ? there would not be problems with reallocs, but is it ok to break the immutability of the content (not the one of the memory area)?
18:33 scovit CArray[Blob] I mean
18:34 scovit or would it realloc due to GC?
18:56 Skarsnik CArray[Type, size] could solve some issue already I think?
19:04 astj joined #perl6-dev
19:11 skids joined #perl6-dev
19:13 Geth ¦ roast: 37a6bb9bfd | pmurias++ | S02-types/capture.t
19:13 Geth ¦ roast: Stop test from depending on implementation specific hash element ordering
19:13 Geth ¦ roast: review: https://github.com/perl6/roast/commit/37a6bb9bfd
19:19 Geth ¦ rakudo/nom: fb140b89ac | usev6++ | src/core/Kernel.pm
19:19 Geth ¦ rakudo/nom: Make attribute visible for all backends
19:19 Geth ¦ rakudo/nom:
19:19 Geth ¦ rakudo/nom: (part of unbusting the jvm build)
19:19 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb140b89ac
19:19 Geth ¦ rakudo/nom: dd52b07b71 | usev6++ | src/core/Match.pm
19:19 Geth ¦ rakudo/nom: Use nqp::eqaticim on MoarVM only
19:19 Geth ¦ rakudo/nom:
19:19 Geth ¦ rakudo/nom: Fall back to old behaviour (pre 215a5fa731) on other backends.
19:19 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd52b07b71
19:22 bartolin pmurias: thanks for the offer (helping to unbust the jvm build)! indeed I'm clueless how to fix the NullPointerException during happening here: https://github.com/rakudo/rakudo/blob/1adacc72cb7b123b716e89f6eb2c9fecc615a756/src/Perl6/Grammar.nqp#L256
19:23 bartolin that code was changed recently (ed4f6cc998). using '#?if jvm' to restore the old behaviour for jvm seems to have no effect there
19:23 bartolin ^^skids do you have a clue, maybe?
19:24 bartolin with that NPE gone, it would be possible to build rakudo-j again. (but then precompilation seems to be busted, too)
19:31 skids bartolin: hard to imagine that an #?if would not put the code back exactly...
19:31 pyrimidine joined #perl6-dev
19:31 pmurias bartolin: I'll look into that tommorow
19:33 bartolin pmurias++
19:36 bartolin skids: that's what I thought, too. on the other hand the NPE happened when the following command is executed: bin/rakudo.jvm/bin/nqp-j --module-path=blib --target=jar --javaclass=perl6 --output=perl6.jar  gen/jvm/main.nqp
19:37 bartolin however, I'll probably wait for pmurias++ ;-)
19:39 pyrimidine joined #perl6-dev
19:45 travis-ci joined #perl6-dev
19:45 travis-ci Rakudo build errored. Will "Coke" Coleda 'Note how to build on windows'
19:45 travis-ci https://travis-ci.org/rakudo/rakudo/builds/273280313 https://github.com/rakudo/rakudo/compare/347da8e5b1f1...e5a600997c30
19:45 travis-ci left #perl6-dev
19:45 buggable [travis build above] ✓ All failures are due to timeout (0), missing build log (3), GitHub connectivity (0), or failed make test (0).
19:53 skids bartolin: well, that code is a failure path so even getting there in the first place is not a good thing.  Or, the line number is wrong...
19:55 astj joined #perl6-dev
19:56 bartolin skids: the strange thing is, that the build continues if I comment out lines 256 and 257. masking them with '#?if moar .. #?endif' does not help, though.
20:01 skids Hrm... well the first thing I might try is introducing two extra variables to be more SSA-like.  Failing that maybe hand-coding nqp ops to do the whitespace chomp.
20:13 perlpilot joined #perl6-dev
20:24 Geth ¦ roast: fd78ffd3b3 | (Moritz Lenz)++ | S05-grammar/action-stubs.t
20:24 Geth ¦ roast: Test for Match.actions
20:24 Geth ¦ roast: review: https://github.com/perl6/roast/commit/fd78ffd3b3
20:42 pmurias bartolin: #?if moar #?endif are just comments in Perl6/Grammar.nqp because that file is not run through the preprocessor
20:46 astj joined #perl6-dev
21:11 Geth ¦ rakudo/nom: 591b93eaf8 | pmurias++ | src/Perl6/Grammar.nqp
21:11 Geth ¦ rakudo/nom: Refactor a regex in a way that avoids a JVM backend bug and is cleaner
21:11 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/591b93eaf8
21:12 pmurias bartolin: ^^ that commit avoids the NPE, the bug in nqp-j needs to be fixed (but that can be dealt with later)
21:43 AlexDaniel joined #perl6-dev
21:46 pmurias at least Hello World now works on the JVM backend, precompilation needs fixing
21:47 MasterDuke pmurias++ bartolin++
22:06 pyrimidine joined #perl6-dev
22:22 dogbert2 joined #perl6-dev
22:44 astj joined #perl6-dev
23:15 BenGoldberg joined #perl6-dev
23:18 scovit joined #perl6-dev
23:20 scovit Skarsnik, timotimo, of course CArray[Type, size] could solve the issue. Possibly also with a method called .decode, or .Blob
23:23 scovit is it a safe workaround to allocate a CArray[Type] with a native call to malloc and then NativeHelper::Blob to do the .decode ?
23:37 scovit no, CArray will also get moved :(

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