Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-04-25

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

All times shown according to UTC.

Time Nick Message
00:11 BenGoldberg joined #perl6-dev
02:40 geekosaur joined #perl6-dev
05:34 brrt joined #perl6-dev
06:26 TimToady joined #perl6-dev
06:31 stmuk timotimo: I can build moar again on OpenBSD 6.1 using --no-telemeh on your branch
06:34 timotimo can you also tell me if the code i wrote for it looks okay?
06:39 stmuk the Perl 5 looks fine to me
06:42 brrt joined #perl6-dev
06:43 stmuk is the probe intended to set --no-telemeh automatically?
06:51 stmuk I mean the effect of doing that rather than literally
06:55 astj_ joined #perl6-dev
07:03 [Tux] This is Rakudo version 2017.04.3-47-gf0414c468 built on MoarVM version 2017.04-44-gf0db8822
07:03 [Tux] csv-ip5xs        3.175
07:03 [Tux] test            13.343
07:03 [Tux] test-t           5.173 - 5.232
07:03 [Tux] csv-parser      13.022
07:07 timotimo telemeh is strictly saying still more or less functional without rdtscp
07:07 timotimo it just doesn't give any timestamps :P
07:07 timotimo though i should investigate how much overhead the uv high res timer function has
07:15 astj joined #perl6-dev
07:38 vendethiel- joined #perl6-dev
07:41 geekosaur joined #perl6-dev
07:51 lizmat Files=1191, Tests=56840, 203 wallclock secs (12.11 usr  4.73 sys + 1200.25 cusr 119.02 csys = 1336.11 CPU)
08:11 astj joined #perl6-dev
09:09 brrt joined #perl6-dev
09:31 pmurias joined #perl6-dev
09:32 Geth ¦ roast: ea1aa67217 | (Pawel Murias)++ | S02-literals/radix.t
09:32 Geth ¦ roast: Test 0xffffffff which was broken on 32bit rakudos
09:32 Geth ¦ roast: review: https://github.com/perl6/roast/commit/ea1aa67217
09:32 Geth ¦ roast: 250e144e15 | (Pawel Murias)++ | S02-literals/numeric.t
09:32 Geth ¦ roast: Add some unicode fudges for rakudo.js
09:32 Geth ¦ roast: review: https://github.com/perl6/roast/commit/250e144e15
10:17 brrt joined #perl6-dev
11:22 Zoffix Wonder how different IO stuff in Perl 6 was 5 years ago. File::Temp's interface is quite mind boggling
11:24 Zoffix .tell perlpilot I hope you have thick skin, 'cause File::Temp might feature in a blog post :p
11:24 yoleaux Zoffix: I'll pass your message to perlpilot.
11:43 * dogbert17_ thought Zoffix was resting ...
11:43 dogbert17_ timotimo: are you around?
11:44 Zoffix I am :)
11:44 dogbert17_ Zoffix: playing any cool games?
11:46 pmurias Zoffix: File::Temp seems to be a port of the Perl 5 File::Temp from 2000
11:49 Zoffix dogbert17_: not really. Was playing Mass Effect Andromeda, but it's incompetent crap so I dropped it. Was Playing Far Cry Primal last night, but it's not very deep and I completed it before. Downloaded Shadow Warrior II last night and will play it tonight, but the trailer tells me its target audience are people who chuckle at one of the characters being named "Lo Wang"....
11:58 dogbert17_ and I guess that you've already played Doom
11:59 Zoffix Yes.
12:02 dogbert17_ I made a PR to the nqp repo yesterday, i.e. https://github.com/perl6/nqp/pull/355. According to Travis the PR failed one check 'NQP_OPTIONS'="--backends=jvm". Is that check really supposed to run?
12:02 moritz why not? I thought NQP on the JVM should work
12:03 Zoffix dogbert17_: it's failed one test, right? Something about exception handling.
12:03 dogbert17_ moritz: thing is I cloned the project and tried it there and the same tests fails on the master branch
12:03 Zoffix It's a new test that was added and is failing on JVM
12:03 dogbert17_ Zoffix: two tests actually
12:04 Zoffix Then I guess more new tests were added
12:04 moritz then it shouldn't stop us from merging the PR
12:04 Zoffix How come we have JVM in the first place? Is there a big demand for people to use JVM instead of MoarVM?
12:05 dogbert17_ moritz: it is a fix for a problem you reported :)
12:05 dogbert17_ failing tests are t/nqp/044-try-catch.t and t/nqp/101-lexpad-stuff.t
12:06 pmurias Zoffix: you mean why we have a JVM release?
12:06 Zoffix Yeah, the try-catch is the one I'm talking about. No idea about lexpad one
12:06 pmurias dogbert17_: I'll look into those tests after grabbing some food
12:06 Zoffix pmurias: I mean why do we support JVM in the first place?
12:06 pmurias wasn't the JVM backend done before MoarVM?
12:07 Zoffix Is that the only reason for its existence?
12:07 dogbert17_ pmurias++
12:07 pmurias there is a huge ecosystem on the JVM
12:07 Zoffix I'm pretty new to Perl 6 and so far I only ever hear the mention of JVM when code that works fine on MoarVM is broken on JVM
12:08 brrt well, the historical benefit of the JVM is that it 'decoupled' rakudo from parrot
12:08 brrt also, the JVM is a pretty good VM, all things considered
12:08 masak aye
12:08 masak I don't have recent figures, but the JVM is *fast* once it gets going
12:08 moritz and there was always hopes for better Java integration, which afaict works only quite clumsily at the moment
12:09 masak there's an insane amount of person-time spent on JVM JIT optimizations
12:09 Zoffix And yet it's still ridiculously slow.... Is there any hope for it to be reasonably performant?
12:09 pmurias yes, we need to use Graal
12:11 pmurias on the new JVM they have a toolkit for building your own fast JIT for your dynamic language
12:11 pmurias JVM is turning into a parrot done right nowdays
12:20 brrt yes, graal is pretty cool
12:20 timotimo Zoffix: rakudo on jvm was where we first worked out async and multithreaded stuff
12:21 timotimo because it's easier to work on multithreaded high-level stuff when you don't have to look for multithreading bugs in the VM, too
12:23 Zoffix I guess my original question can be rephrased to be more precise: how come we spend all this time patching issues in JVM that work fine on MoarVM
12:23 timotimo and there's lots of places where you won't be allowed to put perl6 in if it's moarvm, but just putting anoter .jar into the project is just fine
12:24 timotimo you think we're spending too much dev time on the jvm?
12:24 timotimo i think we're hardly spending any time on it
12:24 brrt i think it's mostly people that want JVM fixed that spend any time on it
12:24 brrt MoarVM has been declared the 'official' VM for some time now
12:25 timotimo i can't deliver :(
12:25 Zoffix timotimo: that's only because it's broken and a lot of the time we spend is adding fudges or #ifjvm conditionals
12:25 Zoffix And any amount of time spent on something useless is too much dev time
12:26 timotimo AFK for now, but jvm was the only way to have multithreading without crashing every few seconds for a while
12:27 brrt well, the point is that 'useless' is your assesement, not a universal fact
12:27 Zoffix To play the Devil's advocate: that's still the reason for its past extence, not the current.
12:27 Zoffix brrt: and my question was about its current usefuleness
12:27 brrt well, frankly; i don't use it.
12:27 Zoffix "we used to use it X years ago to do Y" isn't it.
12:27 brrt but i'm sure we can find people who do
12:29 brrt may i suggest putting up a poll
12:29 brrt and circulating it somewhere on the internets
12:30 * Zoffix is about to send 383 PRs to the ecosystem
12:30 Zoffix ZofBot: Death to META.info!
12:30 ZofBot Zoffix, Array,*) # Turn all sublists into item recursively When bound to a slice parameter (indicated with "**"), a capture reforms the rest of its positional arguments with one level of "treeness", equivalent to "@args
12:34 masak ...383 PRs?
12:35 Zoffix 383 Pull Requests
12:35 masak oh, I wasn't asking about the meaning of "PR" ;)
12:36 masak more like, what are those 383 about?
12:36 Zoffix "Zoffix │ ZofBot: Death to META.info!"
12:36 masak so... 383 PRs to kill META.info?
12:37 Zoffix Yes.
12:37 masak that's interesting. I just closed an issue yesterday in 007 fixing something in its META.info
12:37 masak now I can expect a PR about its death?
12:38 moritz just rename it to META6.json?
12:38 masak I guess what I'm fishing for is something that makes what you're saying seem a bit less drastic
12:38 masak also, giving reasons and stuff
12:38 Zoffix masak: what's dramatic about renaming a filke?
12:38 masak for one, the word "death"
12:39 masak but yeah, "renaming" sounds relatively more OK
12:39 Zoffix :/
12:40 masak as a module author, I'd be happy to learn about the underlying reasons for it. but I guess that'll be clearly explained in the 383 PRs :)
12:40 perlpilot joined #perl6-dev
12:41 Zoffix Wonder how many years it'll take for "I'm about to do X to all modules in the ecosystem" will be undoable.
12:42 geekosaur joined #perl6-dev
12:43 masak yeah, it's nice to still be small in some ways
12:48 pmurias Zoffix: in terms of reasons for future existance of the JVM backend, it would likely help in creating a Truffle/Graal backend (which would likely be super awesome)
12:49 Zoffix cool
12:54 pmurias Zoffix: other JVM benefit for me is that it prevents Rakudo internals from fully assumming MoarVM and that helps a bit with the js backend
12:57 Zoffix 39 done. ~350 to go :| maybe I should automate this stuff....
13:00 nine Zoffix: I've heard about a nice language for automating mundane tasks...now what was it called? I think it's "Perl 6" ;)
13:03 Zoffix nine: I'm more worried about https://xkcd.com/1319/
13:03 Zoffix :)
13:04 Zoffix Especially considering I have out-of-date forks of at least half the modules in the ecosystem, the automation would need to figure something out about that...
13:06 nine Zoffix: oh yes, been there far too often :)
13:06 nine I wonder how GitHub would react if a newly registered user would fork and PR ~350 repos within minutes ;)
13:07 Zoffix You're allowed to have 1 human and 1 bot account.
13:07 Zoffix So presumably they would be OK with it :)
13:08 timotimo cool, all my dists - at least those on my github account - are already META6.info
13:18 MasterDuke_ pmurias: i believe i added `my int $?BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32;` to figure out if we're on a 32 or 64 bit machine. an optimization later in the file changes depending
13:21 nine I just fixed it in CompUnit-Repository-Panda and Grammar-Highlighter
13:22 pmurias MasterDuke_: how is that checked supposed to work?
13:22 pmurias s/checked/check/
13:22 MasterDuke_ pmurias: right, to decide when parsing a constant whether to use string_to_int or string_to_bigint
13:23 MasterDuke_ i think it overflows on 32-bit?
13:23 pmurias MasterDuke_: what I mean is that you are comparing the same number writen down in different ways to itself
13:26 MasterDuke_ hm. i'm going to shift the blame and say i think i got the code from lizmat. but maybe the hex num is read/parses/converted differently than the decimal num?
13:26 Zoffix Sweet. A tiny greasemonkey script + bash script to open the URLs with META file automated 90% of the things
13:27 MasterDuke_ dogbert17_: are you around? what does `my int $?BITS := nqp::iseq_i(0x1ffffffff,8589934591) ?? 64 !! 32; say($?BITS)` print on your 32-bit machine?
13:27 Zoffix MasterDuke_: 64
13:28 Zoffix $ uname -a
13:28 Zoffix Linux b-webdev-dt 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux
13:28 pmurias MasterDuke_: the check is fixed in the js branch
13:29 MasterDuke_ pmurias: can you fix master also?
13:29 MasterDuke_ Zoffix: thanks
13:31 pmurias I should just cherry-pick the commits?
13:31 * dogbert17_ agrees with Zoffix :)
13:32 MasterDuke_ oh
13:33 MasterDuke_ what about `my int $a = 0x1ffffffff; say(nqp::iseq_i($a,8589934591) ?? 64 !! 32)`?
13:33 MasterDuke_ dogbert17_, Zoffix: what does that show?
13:34 MasterDuke_ that's from src/core/Rakudo/Internals.pm
13:34 Geth ¦ rakudo/nom: 6c824902ce | (Pawel Murias)++ | src/Perl6/Actions.nqp
13:34 Geth ¦ rakudo/nom: 32bit detection that works on the js backend too
13:34 Geth ¦ rakudo/nom:
13:34 Geth ¦ rakudo/nom: Do simple arithmetic rather then depending on weird NQP implementation details.
13:34 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c824902ce
13:34 Geth ¦ rakudo/nom: 01dd213844 | (Pawel Murias)++ | src/Perl6/Actions.nqp
13:34 Geth ¦ rakudo/nom: Fix handling of 8 digit hex literals in 32bit rakudos
13:34 Geth ¦ rakudo/nom:
13:34 Geth ¦ rakudo/nom: They don't always fit into 31bits.
13:34 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01dd213844
13:35 dogbert17_ 64
13:35 Zoffix 64 too
13:36 MasterDuke_ then https://github.com/rakudo/rakudo/blob/nom/src/core/Rakudo/Internals.pm#L1550-L1554 should be fixed also
13:36 MasterDuke_ pmurias++
13:37 Geth ¦ nqp: 593135bc8a | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/ContextRefInstance.java
13:37 Geth ¦ nqp: [jvm] Make nqp::elems on a ctx work
13:37 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/593135bc8a
13:54 [Coke] (JVM) I suspect the people working on JVM are, in general, not going to be working on the non-jvm guts.
13:55 [Coke] I used to want the JVM version because I had a java-only prod environment here. With things like docker, I don't have that need anymore. Can't speak to other devs' needs.
13:57 Zoffix P.S.: yes, I know I need to update META.list due to my META.info->META6.json changes; I'll do that right after finishing sending PRs and will keep an eye on it. So if you get any of my PRs, no need to worry abouty ecosystem's META.list
13:59 Zoffix heh Spotted a dist with BOTH META.info and META6.json :)
14:02 Zoffix :S make it two dists :/ people seem to be really confused about this stuff
14:03 MasterDuke_ i don't understand what you're saying, it's two meta for me
14:11 Geth ¦ rakudo/nom: d057efdbc4 | (Pawel Murias)++ | src/core/Rakudo/Internals.pm
14:11 Geth ¦ rakudo/nom: Fix $?BITS
14:11 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d057efdbc4
14:13 [Coke] MasterDuke_: *groan*
14:17 Geth ¦ nqp: 2527b36847 | (Pawel Murias)++ | t/nqp/044-try-catch.t
14:17 Geth ¦ nqp: [jvm] Skip a failing test on the JVM
14:17 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/2527b36847
14:18 dogbert17_ FWIW: the code in d057efdbc4 returns 64 on my system (32 bit)
14:19 dogbert17_ SRY, disregard that
14:19 * dogbert17_ pulls the latest fixes /o\
14:36 perlpilot joined #perl6-dev
14:40 Zoffix crazy. My 30-line script to check META.info/META6.json URLs in ecosystem and update the changed ones and commit the changed ones run the first time and (appears to have) worked correctly :O
14:41 Zoffix ZofBot: it's almost as if I knew what I was doing!
14:41 ZofBot Zoffix, any}:exists Set Set subset relation
14:48 Geth ¦ tap-harness6: 3152c68e92 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
14:48 Geth ¦ tap-harness6: Use modern META filename
14:48 Geth ¦ tap-harness6: review: https://github.com/perl6/tap-harness6/commit/3152c68e92
14:51 Zoffix Alright. Seems to work well-enough
14:51 * Zoffix shoves it into a 30-minute loop
14:59 Zoffix :O
14:59 Zoffix Agent Smith got his way, I guess
15:00 Zoffix lol! This distro has THREE different META files :) https://github.com/skids/perl6sum
15:05 mst joined #perl6-dev
15:12 tadzik joined #perl6-dev
15:19 Zoffix Aaaaaand. Done \o/ ~380 PRs shipped :)
15:19 Zoffix GreaseMonkey++ Stylish++ (Perl 6)++
15:22 ilmari[m] joined #perl6-dev
15:23 MasterDuke_ m: sub foo(@a?) { say @a ?? "@a[]" !! "no arg" }; foo(my Int @ = (1, 2));
15:23 camelia rakudo-moar d057ef: OUTPUT: «1 2␤»
15:23 MasterDuke_ m: sub foo(@a?) { say @a ?? "@a[]" !! "no arg" }; foo();
15:23 camelia rakudo-moar d057ef: OUTPUT: «no arg␤»
15:23 MasterDuke_ m: sub foo(Int @a?) { say @a ?? "@a[]" !! "no arg" }; foo(my Int @ = (1, 2));
15:23 camelia rakudo-moar d057ef: OUTPUT: «1 2␤»
15:23 MasterDuke_ m: sub foo(Int @a?) { say @a ?? "@a[]" !! "no arg" }; foo();
15:23 camelia rakudo-moar d057ef: OUTPUT: «Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[])␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:24 MasterDuke_ ^^^ RT #118555
15:24 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=118555
15:24 MasterDuke_ valid bug?
15:25 MasterDuke_ m: sub foo(Int $a?) { say $a ?? $a !! "no arg" }; foo();
15:25 camelia rakudo-moar d057ef: OUTPUT: «no arg␤»
15:25 MasterDuke_ m: sub foo(Int $a?) { say $a ?? $a !! "no arg" }; foo(1);
15:25 camelia rakudo-moar d057ef: OUTPUT: «1␤»
15:25 MasterDuke_ a type constraint on an optional Scalar works
15:34 Zoffix Yeah, I'd say it should work, though the author of the ticket seems a bit confused about what "Int @array" really means.
15:36 MasterDuke_ yeah, though i don't know how those were expected to work 4 years ago
15:37 MasterDuke_ but i agree that the behavior i showed above is wrong
15:53 Zoffix gah, channel logs down when I need 'em :(
15:53 Zoffix Can anyone give me El_Che's URL to Ubuntu-on-Windows packages?
15:53 Zoffix It should be somewhere among the last lines said
15:54 timotimo https://github.com/nxadm/rakudo-pkg/releases/tag/2017.03_03
15:54 Zoffix timotimo++ thanks
15:55 timotimo yw
15:59 stmuk do you get adverts in cmd.exe now?
16:01 * Zoffix never seen any
16:01 Zoffix I think there is an option where you can disable ads
16:05 stmuk I'm fond of selective use of https://github.com/Nummer/Destroy-Windows-10-Spying
16:06 * Zoffix just followed some guide during install
16:07 brrt joined #perl6-dev
16:07 Zoffix It's pretty ridiculous just how much it sends. If you only use the available controls, the lowest setting still sends all of your computer's info and all of the info for "contected devices"
16:07 Zoffix If only there were a better gaming console! :)
16:07 timotimo i'm connected to about a gajillion devices on the public internet :) :)
16:08 stmuk it seemed to reset privacy settings with updates which I found annoying
16:17 robertle joined #perl6-dev
16:38 geekosaur joined #perl6-dev
16:47 Geth joined #perl6-dev
16:50 Geth joined #perl6-dev
16:52 Geth ¦ geth: 96ac635a6b | (Zoffix Znet)++ | 3 files
16:52 Geth ¦ geth: Implement Commit Filters / Add META.info filter
16:52 Geth ¦ geth:
16:52 Geth ¦ geth: - Lets generate custom-tailored IRC responses based
16:52 Geth ¦ geth:     on the WebHook event
16:52 Geth ¦ geth: - Add a .pm6 file into `commit-filters/` with one sub that
16:52 Geth ¦ geth:     takes a GitHub even object.
16:52 Geth ¦ geth: - Return False if filter did not match
16:53 Geth ¦ geth: - Return the IRC response text string if filter did match
16:53 Geth ¦ geth: - Implement filter for META.info -> META6.json swap messages
16:53 Geth ¦ geth: review: https://github.com/perl6/geth/commit/96ac635a6b
17:01 Geth joined #perl6-dev
17:03 Geth ¦ geth: f03b3a31b8 | (Zoffix Znet)++ | 2 files
17:03 Geth ¦ geth: Make it possible to make silencing filters
17:03 Geth ¦ geth:
17:03 Geth ¦ geth: - Return undefined value to signal no match
17:03 Geth ¦ geth: - Return false value to signal no response should
17:03 Geth ¦ geth:     be sent to IRC
17:03 Geth ¦ geth: review: https://github.com/perl6/geth/commit/f03b3a31b8
17:05 Geth ¦ geth: ab477e6aaf | (Zoffix Znet)++ | lib/Geth/Plugin/GitHub.pm6
17:05 Geth ¦ geth: Remove useless method call
17:05 Geth ¦ geth: review: https://github.com/perl6/geth/commit/ab477e6aaf
17:11 Ven joined #perl6-dev
17:28 japhb Zoffix: What is 'Stylish'?  That's a low-SNR search word
17:31 Zoffix japhb: https://addons.mozilla.org/en-US/firefox/addon/stylish/
17:33 japhb "For you technical types out there, think of it this way: Stylish and userstyles.org are to CSS as Greasemonkey and userscripts.org are to JavaScript."  OK, makes total sense now.
17:34 japhb Huh, one of the top reviews claims it will start selling your data.
17:35 Zoffix Yeah, just saw that too :)
17:35 Zoffix https://www.ghacks.net/2017/01/04/major-stylish-add-on-changes-in-regards-to-privacy/
18:02 Ven joined #perl6-dev
18:03 Geth joined #perl6-dev
18:03 Zoffix Geth: uptime
18:03 Geth Zoffix, 10 seconds
18:03 Geth ¦ geth: 4c0328898e | (Zoffix Znet)++ | bin/geth.p6
18:03 Geth ¦ geth: Add Uptime plugin
18:03 Geth ¦ geth: review: https://github.com/perl6/geth/commit/4c0328898e
18:03 Zoffix <3 Phasers
18:03 timotimo neato.
18:10 perlpilot joined #perl6-dev
18:21 Zoffix .
18:21 yoleaux 18:18Z <[Coke]> Zoffix: off by one error on your message in 538ddf2174
18:21 Zoffix what repo is that for?
18:21 [Coke] 18:16 <+Geth> Swapped META.info → META6.json in 1 dists in https://github.com/perl6/ecosystem/commit/538ddf2174
18:22 [Coke] guessing maybe requiring a \n to end the line?
18:22 * Zoffix sees no off by ones
18:23 Zoffix Previous commit stripped new line at end of file; I fixed the script to include it as well
18:24 MasterDuke_ m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; say nqp::getattr($p, Parameter, q|$!nominal_type|) }
18:24 camelia rakudo-moar d057ef: OUTPUT: «(Positional[Array[Int]])␤P6opaque: no such attribute '$!nominal_type' in type Parameter when trying to get a value␤  in block <unit> at <tmp> line 1␤␤»
18:24 MasterDuke_ but in Parameter.pm: `method type() { $!nominal_type }`
18:25 MasterDuke_ why doesn't the `nqp::getattr()` work?
18:25 Zoffix decont
18:28 MasterDuke_ m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; say nqp::getattr(nqp::decont($p), Parameter, q|$!nominal_type|) }
18:28 camelia rakudo-moar d057ef: OUTPUT: «(Positional[Array[Int]])␤(Positional[Array[Int]])␤»
18:28 MasterDuke_ Zoffix++ ...but will that work in BOOTSTRAP.nqp...?
18:29 Zoffix No idea. Only one way to find out.
18:31 MasterDuke_ it's building right now
18:37 Ven_ joined #perl6-dev
18:52 Zoffix Geth: uptime
18:52 Geth Zoffix, 49 minutes and 43 seconds
18:52 Zoffix \o/
18:52 Zoffix <3 Number::Denominate
19:12 [Coke] (not-off-by-one) ah, misread the change on the last line.
20:03 pmurias nqp-m: my str $foo := 'Infinity stone'; say(+$foo)
20:03 camelia nqp-moarvm: OUTPUT: «Inf␤»
20:03 pmurias ^^ is this really desired
20:05 Zoffix m: my str $foo = 'Infin'; say +$foo
20:05 camelia rakudo-moar d057ef: OUTPUT: «Cannot convert string to number: Imaginary component of 'NaN' or 'Inf' must be followed by \i in '3Inf⏏5in' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:06 Zoffix pmurias: IMO no. I'm pretty sure there are places in P6 grammar we conver strings (or matches) to numbers and that bug probabpy affects it
20:07 [Coke] nqp-m: my str $foo := '234box'; say(+$foo)
20:07 camelia nqp-moarvm: OUTPUT: «234␤»
20:07 Zoffix wow
20:07 [Coke] nqp-m: my str $foo := 'Inf check'; say(+$foo)
20:07 camelia nqp-moarvm: OUTPUT: «Inf␤»
20:08 Zoffix maybe it *is* by design. I think Perl5 does it the same way, doesn't it
20:15 pmurias Zoffix: the code that does the conversion looks broken
20:15 [Coke] in general or just with Inf?
20:16 pmurias it first does a strcmp with 'NaN' etc and when it doesn't match it just passes "Inf_trash_here" to atof
20:16 pmurias and atof turns that into Inf
20:17 geekosaur NaNcy typing, anyone? >.>
20:18 pmurias ahh, that was added because atof behaves differently on Windows
20:21 pmurias m: my str $foo = 'Infinity on Linux but not on windows'; my num $n = $foo;say $n
20:21 camelia rakudo-moar d057ef: OUTPUT: «Inf␤»
20:29 Zoffix bah... so much for my writing all the tests for nums!
20:29 Zoffix m: my num $ = 'Infwtf'
20:29 camelia rakudo-moar d057ef: OUTPUT: «This type cannot unbox to a native number: P6opaque, Str␤  in block <unit> at <tmp> line 1␤␤»
20:30 Zoffix Well, at least that explodes :)
20:30 Geth ¦ rakudo/nom: ff4a034dd2 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm
20:30 Geth ¦ rakudo/nom: Fix time stamp check interfering with packaging modules
20:30 Geth ¦ rakudo/nom:
20:30 Geth ¦ rakudo/nom: Replace the last modification time stamp check in loading precompiled modules
20:30 Geth ¦ rakudo/nom: by a full checksum comparison. This helps with Debian's packaging process as
20:30 Geth ¦ rakudo/nom: they cap modification time stamps to provide reproducible builds.
20:30 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ff4a034dd2
20:31 nine We now no longer check any modification time stamps when loading precompilation files. We now fully rely on checksums.
20:32 pmurias seem much saner
20:32 pmurias * seems
20:53 * japhb looks at https://github.com/zoffixznet/perl6-Number-Denominate#volume-imperial and suddenly realizes why a story written by a Canadian author depended on a gallon weighing 10 pounds, which made no sense to me ....
20:53 Ven joined #perl6-dev
21:00 geekosaur :)
21:01 geekosaur although metric's not *so* different in that regard; the original definitions of length, mass/weight, volume were related much the same way
21:02 geekosaur (1cc water = 1g)
21:03 geekosaur (or 1 cm^3 if you prefer)
21:08 perlpilot but a gallon weighs about 8 pounds
21:08 yoleaux 11:24Z <Zoffix> perlpilot: I hope you have thick skin, 'cause File::Temp might feature in a blog post :p
21:13 Zoffix I don't know if I wanna write a blog post anymore, but I might make Temp::Path that's File::Temp but with Perl 6-ish interface
21:14 Zoffix like... so you don't have to close all the damn handles all the time :P
21:23 japhb perlpilot: Not outside the U.S. apparently.
21:24 geekosaur yes, there's a commonwealth/us difference there, I ran into it with respect to discussion of pints of beer once but don't recall details
21:25 japhb I always wondered why a pint of beer was so large in an actual British pub, thinking it was some drinking-establishment-specific thing.  Oh no, it really is a larger pint than the one I'm used to.  Which at least was based on binary, which made sense to me.
21:36 stmuk UK pint is 20 UK Fluid Oz or 568ml
21:37 stmuk US is 473ml
21:42 geekosaur yes, 16 US fluid oz
21:43 Zoffix ZofBot: The Wizard of Fluid Oz
21:43 ZofBot Zoffix, EXPORTALL(MY, <Ness>) Without an import list, "import" imports the ":DEFAULT" imports
22:11 AlexDaniel joined #perl6-dev
22:57 MasterDuke_ i've been beating my head against this for a while, time to ask the hivemind
22:57 MasterDuke_ `my $type := nqp::getattr($param, Parameter, '$!nominal_type');`
22:58 MasterDuke_ the `$type.HOW.name($type)` is 'Positional[Int]'
22:59 MasterDuke_ $type is not defined, not null, not concrete, not a container, and is false
23:00 MasterDuke_ if i `nqp::create($type)`, i get `You cannot create an instance of this type ((null))`
23:00 MasterDuke_ m: sub foo(Int @a?) { say @a ?? "@a[]" !! "no arg" }; foo(); # this is what this is all about
23:00 camelia rakudo-moar ff4a03: OUTPUT: «Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[])␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
23:01 MasterDuke_ and this is where i'm working: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/BOOTSTRAP.nqp#L626-L628
23:02 MasterDuke_ anybody have a suggestion of what to try?
23:21 mst alcoholism?
23:22 Zoffix m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; say nqp::create(nqp::getattr(nqp::decont($p), Parameter, q|$!nominal_type|))
23:22 camelia rakudo-moar ff4a03: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3cont($p), Parameter, q|$!nominal_type|))7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier␤        stateme…»
23:22 Zoffix m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; say nqp::create(nqp::getattr(nqp::decont($p), Parameter, q|$!nominal_type|)) }
23:22 camelia rakudo-moar ff4a03: OUTPUT: «(Positional[Array[Int]])␤You cannot create an instance of this type ((null))␤  in block <unit> at <tmp> line 1␤␤»
23:22 MasterDuke_ heh, i'll probably wait an hour or so for that
23:22 Zoffix m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; dd nqp::getattr(nqp::decont($p), Parameter, q|$!nominal_type|).new }
23:22 camelia rakudo-moar ff4a03: OUTPUT: «(Positional[Array[Int]])␤Positional[Array[Int]].new␤»
23:23 Zoffix m: use nqp; sub foo(Array[Int] @a?) { }; my @params = nqp::getattr(&foo.signature, Signature, q|@!params|); for @params -> $p { say $p.type; dd nqp::getattr(nqp::decont($p), Parameter, q|$!nominal_type|) }
23:23 camelia rakudo-moar ff4a03: OUTPUT: «(Positional[Array[Int]])␤Positional[Array[Int]]␤»
23:23 Zoffix MasterDuke_: something along those lines? Don't nqp::create it
23:24 * Zoffix is just guessing
23:24 MasterDuke_ i just tried `nqp::index($type.HOW.name($type), '[') > 0 ?? $type !! nqp::create(Array);` and get `Internal error: inconsistent bind result`
23:26 Zoffix m: my $val; multi foo($ where {$val++ %% 2 ?? 1 !! 0}) { say "here" }; multi foo($) { say "♥" }; foo(42) for ^20
23:26 camelia rakudo-moar ff4a03: OUTPUT: «Internal error: inconsistent bind result␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
23:26 MasterDuke_ and the decont() is unnecessary in BOOTSTRAP.nqp
23:26 * Zoffix has no idea
23:46 MasterDuke_ oh, and same thing without the ternary and just return $type
23:55 geekosaur joined #perl6-dev

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