Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-03

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:08 evalable6 joined #perl6
00:16 jdv79 what does "Unexplained error" actually mean?
00:17 jdv79 guess i'll upgrade
00:18 jdv79 i had a program that was working and then it seemed to just stop
00:20 jdv79 https://gist.github.com/anonymous/23d027a86d4d257ec109f220cafd2458
00:23 ACTPic joined #perl6
00:26 APic joined #perl6
00:28 leah2 joined #perl6
00:30 MasterDuke jdv79: lizmat did some stuff with exceptions today i think, how new/old is your rakudo?
00:31 jdv79 it was a few days old and now its latest
00:31 jdv79 both error the same
00:32 jdv79 very strange.  one minute it was fine and then seemingly inexplicably that odd error
00:40 timotimo m: die X::AdHoc.new
00:40 camelia rakudo-moar fcbd8a: OUTPUT: «Unexplained error␤  in block <unit> at <tmp> line 1␤␤»
00:41 timotimo the awaiter stuff is deep, deep magic
00:42 * timotimo goes to bed
00:43 timotimo in the gist i'm kind of surprised it doesn't have the "original" stack trace
00:43 timotimo i don't think the stack trace should point at the rethrow method?
00:45 Cabanossi joined #perl6
00:56 jdv79 so it appears i can't get a proc::async or a qqx ot complete
00:56 jdv79 they jut hang
00:56 jdv79 *just
01:00 timotimo you're not fork()ing, right?
01:00 jdv79 truly bizarre
01:01 timotimo no, i really should go sleep
01:01 jdv79 if i strace the program with the block proc async or qqx then i get the Unexplained error
01:01 timotimo good luck!
01:01 jdv79 until i reboot
01:01 jdv79 wth!
01:01 jdv79 ok, thanks
01:02 jdv79 some resource getting depleted or put into a bad state. dmesg doesn' treport anything
01:02 timotimo you could perhaps try if use v6.d.PREVIEW does anything, but i don't have high hopes
01:02 jdv79 i am not forking afaik
01:02 jdv79 that's what i am using
01:02 timotimo OK
01:03 jdv79 nite
01:03 timotimo compiling moarvm with its configure.pl having --telemeh passed and then setting MVM_TELEMETRY_LOG to some filename will result in a file that has a bit of extra info about threads and locks and such
01:03 timotimo there's not yet a tool that makes it more easily digestible, though
01:03 jdv79 ok.  i'll try to golf it tomorrow i guess
01:03 timotimo that would be helpful
01:04 timotimo 'nite
01:05 evalable6 joined #perl6
01:15 Cabanossi joined #perl6
01:17 dj_goku joined #perl6
01:17 dj_goku joined #perl6
01:24 leah2 joined #perl6
01:36 mcmillhj joined #perl6
01:54 Cabanossi joined #perl6
01:56 ilbot3 joined #perl6
01:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:03 lexinad joined #perl6
02:10 mcmillhj joined #perl6
02:17 lexinad left #perl6
02:19 zakharyas joined #perl6
02:36 leah2 joined #perl6
02:42 kurahaupo joined #perl6
02:45 noganex joined #perl6
03:00 Cabanossi joined #perl6
03:07 xinming joined #perl6
03:13 lexinad joined #perl6
03:14 lexinad left #perl6
03:19 lexinad joined #perl6
03:32 mr-foobar joined #perl6
03:37 lexinad left #perl6
03:43 leah2 joined #perl6
03:45 Cabanossi joined #perl6
03:47 pilne joined #perl6
03:59 Cabanossi joined #perl6
04:04 mr-foobar joined #perl6
04:16 leah2 joined #perl6
04:27 wamba joined #perl6
04:44 leah2 joined #perl6
04:46 aborazmeh joined #perl6
04:46 aborazmeh joined #perl6
04:59 Cabanossi joined #perl6
05:10 hoffentlichja m: subset MyStr of Str where 4 < *.chars < 10; my MyStr $s = 's';
05:10 camelia rakudo-moar fcbd8a: OUTPUT: «===SORRY!===␤QAST::Block with cuid 1 has not appeared␤»
05:11 hoffentlichja what's happening here, how can I set that constraint?
05:15 hoffentlichja the error message is a bit cryptic
05:15 geekosaur it's an internal error that shouldn't happen
05:16 hoffentlichja geekosaur: but the syntax is correct? it happens on my system as well
05:16 hoffentlichja I thought it's because of incorrect syntax
05:16 geekosaur happens on mine as well. I'm not sure if it's supposed to work or not
05:16 geekosaur 'where' is known to be a bit finicky
05:17 HoboWithAShotgun joined #perl6
05:17 geekosaur but not this kind of finicky; that error means the compiler got confused about what it's parsing
05:18 hoffentlichja so how do I set that constraint then?
05:19 geekosaur have to do it with normal parameter syntax, looks like
05:19 geekosaur m: my &s = 4 < *.chars < 10; say &s("sssss")
05:19 camelia rakudo-moar fcbd8a: OUTPUT: «===SORRY!===␤QAST::Block with cuid 1 has not appeared␤»
05:19 geekosaur looks like WhateverCode parsing doesn't mix well with chained comparisons
05:20 geekosaur m: subset MyStr of Str where {4 < $_.chars < 10}; my MyStr $s = "s";
05:20 camelia rakudo-moar fcbd8a: OUTPUT: «Type check failed in assignment to $s; expected MyStr but got Str ("s")␤  in block <unit> at <tmp> line 1␤␤»
05:20 hoffentlichja yea but isn't what type constraints are for? it gives the same error anyway
05:22 hoffentlichja geekosaur: that's what I was looking for, it was because of the syntax after all
05:22 geekosaur it's not incorrect syntax; it's a bug in the compiler
05:22 geekosaur I'm composing a ticket
05:23 hoffentlichja so it should work the way I wrote it initially as well?
05:23 geekosaur it should, yes.
05:23 hoffentlichja alright, good to know
05:23 geekosaur but it's not handling the combination of chained comparisons (4 < ... < 10) and WhateverCode (*.chars)
05:23 geekosaur which is what I was testing with the &s thing, to make sure it wasn;t somehow related to it being in a 'where'
05:24 hoffentlichja I see
05:24 geekosaur RT #132206
05:25 synopsebot RT#132206 [new]: https://rt.perl.org/Ticket/Display.html?id=132206 Compiler error on WhateverCode and chained comparisons
05:27 mempko joined #perl6
05:28 hoffentlichja I didn't think it was a bug because I thought someone would have surely noticed this way before me
05:31 FiendKing04 joined #perl6
05:38 nadim joined #perl6
05:43 kurahaupo_ joined #perl6
05:50 kurahaupo joined #perl6
05:52 yht joined #perl6
06:05 cgfbee joined #perl6
06:15 yht joined #perl6
06:16 leah2 joined #perl6
06:21 domidumont joined #perl6
06:23 salva joined #perl6
06:23 darutoko joined #perl6
06:24 domidumont joined #perl6
06:31 domidumont joined #perl6
06:41 leah2 joined #perl6
06:44 Cabanossi joined #perl6
06:55 shadoxx joined #perl6
07:17 someuser joined #perl6
07:19 * lizmat clickbaits https://p6weekly.wordpress.com/2017/10/02/2017-40-unicode-granted/
07:28 leah2 joined #perl6
07:30 kurahaupo_ joined #perl6
07:30 kurahaupo_ joined #perl6
07:33 kurahaupo joined #perl6
07:33 tyilanmenyn joined #perl6
07:34 kurahaupo joined #perl6
07:35 kurahaupo joined #perl6
07:42 dakkar joined #perl6
07:48 rba_ joined #perl6
07:50 rba_ Curious if there is any news from the Solaris build side. Would be interessted in Sparc and x86 build. Would assist if appreciated...
07:52 TEttinger solaris is still a thing?
07:52 TEttinger I thought opensolaris was closed down at least
07:53 TEttinger also that Oracle was trying to EOL solaris
07:53 TEttinger maybe I'm thinking of new SPARC chips
07:53 rba_ Banks in CH still have plenty of Solaris system. Yet new projects run on Linux.
07:53 TEttinger I can't remember which country is CH. switzerland?
07:54 rba_ yes
07:54 TEttinger I should have guessed from "banks" :)
07:55 TEttinger "do one thing, do it wel, then have really good chocolate for doing it so well. also make the chocolate"
07:56 TEttinger what time is it in central europe right now... early-to-mid morning?
07:56 rba_ Having a build ready to install would make it more easy to convince people to try to use it...
07:56 eliasr joined #perl6
07:56 rba_ yes, mid morning
07:57 TEttinger I think the channel should be more active soon, it's the middle of the night here on the pacific coast of US
07:57 TEttinger I think there's a decent-sized amount of european developers
07:58 rba_ Saw in irc backlog that El_Che is pushing in this area...
08:06 leah2 joined #perl6
08:10 kurahaupo_ joined #perl6
08:10 kurahaupo__ joined #perl6
08:12 kurahaupo__ joined #perl6
08:12 leont joined #perl6
08:12 rba__ joined #perl6
08:13 mspo rba_: joyent will be bulk building moarvm, nqp, and rakudo now
08:13 mspo rba_: since they're all in pkgsrc
08:13 mspo which also works on solaris, btw
08:15 mspo but it failed to build :)
08:15 mspo http://us-east.manta.joyent.com/pkgsrc/public/reports/upstream-trunk64/20171003.0210/MoarVM-2017.09.1nb1/build.log
08:16 mspo that's SmartOS x86_64
08:21 rba_ joined #perl6
08:29 rindolf joined #perl6
08:29 robertle_ joined #perl6
08:30 lowbro joined #perl6
08:30 lowbro joined #perl6
08:33 rba_ thanks mspo.
08:36 mspo rba_: not sure if there's sparc support at all?
08:43 yht joined #perl6
08:44 sproctor joined #perl6
08:44 Cabanossi joined #perl6
08:45 shadoxx joined #perl6
08:46 dj_goku_ joined #perl6
08:48 El_Che rba_: libuv was the blocking factor last time I tried
08:56 rba_ joined #perl6
08:58 rba__ joined #perl6
09:02 wamba joined #perl6
09:02 rba_ joined #perl6
09:03 mr-foobar joined #perl6
09:11 nowan joined #perl6
09:19 Cabanossi joined #perl6
09:23 ilbot3 joined #perl6
09:23 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
09:24 piojo Actually, how do I run rakudo with debugging symbols?
09:25 piojo Okay, looks like it should be perl6-debug-m
09:26 Zoffix hoffentlichja: the language is just 2 years old and compiler is pretty big. It's not super rare to discover a bug no one has seen before :) Also, any error that mentions QAST stuff is not something a user should see and is a bug that should be filed. In your case it was already known and can be worked around by rewriting the chained WhateverCode to be just a block: subset MyStr of Str where { 4 < .chars < 10
09:26 Zoffix }; my MyStr $s = 's';
09:26 Zoffix piojo: I'm not sure, but I think you also need a debug-enabled moar for it to spit out useful stuff
09:28 ilbot3 joined #perl6
09:28 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
09:29 hoffentlichja Zoffix: yes, now I know better
09:30 epony joined #perl6
09:34 rba__ joined #perl6
09:35 Zoffix Actually in this case a thunk is sufficient:
09:35 Zoffix m: subset MyStr of Str where 4 < .chars < 10; say "s" ~~ MyStr; say "foobar" ~~ MyStr
09:35 camelia rakudo-moar 21788c: OUTPUT: «False␤True␤»
09:35 pmurias joined #perl6
09:38 hoffentlichja Zoffix: so that * made all the difference, I thught I have to use it if it's not in a block
09:42 rba_ joined #perl6
09:46 mcmillhj joined #perl6
09:50 Zoffix hoffentlichja: yeah, the WhateverCode maker can't figure out that `4 < *.chars` is not the complete chunk and it to go further to get the `< 10` part too, hence the QAST error. Some places, like the `where` clause "thunk" (make a chunk of code that's executed later). The `where` clause smartmatches against the RHS stuff to figure out if the type constraint passes. The { 4 < .chars < 10 } or (the 4 < *.chars <
09:50 Zoffix 10 if it worked) cause the smartmatch to happen against Code, and if its return value is truthy, then the type constraint passes. The thunk in where clause, on the other hand, results in whatever value it returns to be smartmatched against (the value to be checked is also aliased to $_). So for example, `subset SimilarList of List where (1, **, 5, *, 9);` would make `(1, 5, 7, 9)` pass type constraint, but
09:50 Zoffix `(1, 5, 7, 42, 9)` not. In the case of `4 < .chars < 10`, the value to be checked is alised to $_, .chars returns its length, and the `<` chain returns either True or False, and smartmatch with True is always True and with False always False, so this works out fine as type constaint. But in some cases there's a difference between a thunk and a block (or whatevercode). E.g. here: subset Broken where .chars; say
09:51 Zoffix "" ~~ Broken; say " 3 " ~~ Broken; say "foo" ~~ Broken. The check was intended to subset strings that have some chars, but the chunk returns a number and smartmatch with a number does a numeric comparison, so the first two cases give True, because the number in the string matches the number of chars, but last one doesn't. To fix it you need to either use a block (`where {.chars}`) or whatevercode (`where
09:51 Zoffix *.chars`) or to ensure the thunk returns a True/False value (`where .so`)
09:57 rba__ joined #perl6
09:59 Cabanossi joined #perl6
10:05 hoffentlichja Zoffix: thanks for the long explanation.
10:10 abraxxa joined #perl6
10:10 lizmat joined #perl6
10:14 araujo joined #perl6
10:14 araujo joined #perl6
10:17 Geth ¦ modules.perl6.org/cpan-support: 9ff343d23a | (Zoffix Znet)++ | 4 files
10:17 Geth ¦ modules.perl6.org/cpan-support: Make CPAN dist tree navigable
10:17 Geth ¦ modules.perl6.org/cpan-support:
10:17 Geth ¦ modules.perl6.org/cpan-support: - Serve files as static content; for now
10:17 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/9ff343d23a
10:17 ufobat joined #perl6
10:17 Zoffix \o/
10:18 Zoffix Light at the end of CPAN tunnel :) Can see content of CPAN dists already.
10:18 * Zoffix &
10:21 lowbro joined #perl6
10:21 lowbro joined #perl6
10:25 lichtkind joined #perl6
10:28 margeas joined #perl6
10:30 ufobat nhi :)
10:44 Cabanossi joined #perl6
10:49 leah2 joined #perl6
10:50 yht joined #perl6
10:55 araujo joined #perl6
10:55 araujo joined #perl6
11:08 ufobat is there a way to quote inside a regex, i am looking for \Q \E from perl5
11:09 ufobat between \Q and \E anything is ment literaly
11:10 W4RL0RD joined #perl6
11:11 Juerd https://twitter.com/zoffix/status/912990653742747649  if the ↑↑ are supposed to indicate higher peaks, I'd suggest using ↑↑ instead (reverse video)
11:12 jnthn ufobat: Just use quotes ;)
11:12 ufobat mhm thats to easy ;-)
11:12 ufobat too
11:13 ufobat thanks
11:13 Juerd From a Perl 6 perspective, using \Q...\E instead of '...' looks kinda weird. :D
11:13 Juerd Most of my dayjob work is Perl 5, and I keep running into these weird looking things.
11:14 Juerd Haven't encountered the horrendous ->$#* yet :)
11:14 Cabanossi joined #perl6
11:14 ufobat i was googling for it and i found the \Q thingy in the design documents (https://perl6.org/archive/doc/design/exe/E05.html) somewhere a note that it is removed but.. yeah :)
11:21 domidumont joined #perl6
11:21 Zoffix Juerd: would you submit a PR? https://github.com/zoffixznet/perl6-buggable/blob/master/lib/Buggable/Plugin/Speed.pm6#L64
11:22 Juerd Sorry, I have no time to clone and test the suggestion
11:23 Juerd Basically it would mean changing '↑' to "\cV↑\cO"
11:23 Zoffix Oh, it's an ANSI thing. I thought it were a different Unicode char
11:23 Juerd Not ANSI, but IRC
11:24 Juerd IRC has its own color codes
11:24 Zoffix Wonder if it'd show up broken in channel logs
11:24 Juerd Depends on whether those logs support IRC color codes :D
11:32 Zoffix Looks duplucated: https://irclog.perlgeek.de/perl6/2017-10-03#i_15249840
11:33 Zoffix Unless it's my IRC client showing a single one where two were supposed to be...
11:33 mr-foobar joined #perl6
11:43 AlexDaniel joined #perl6
11:43 AlexDaniel squashable6: next
11:43 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈22 hours (2017-10-07 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
11:43 AlexDaniel \o/
11:44 AlexDaniel moritz++
11:44 Cabanossi joined #perl6
11:50 zakharyas joined #perl6
11:51 ShalokShalom joined #perl6
11:58 rba_ joined #perl6
12:01 hoffentlichja I'm envisioning a world in which we have something like node's johnny-five for IoT written in perl6
12:02 timotimo rakudo's still a bit memory hungry for embedded situations
12:02 timotimo well, a step up from embedded
12:02 timotimo but still
12:02 hoffentlichja timotimo: teoretically node is not the best fit for that either
12:04 hoffentlichja I think raspberry pi and the likes will be able to run rakudo without any problem
12:05 Zoffix 😺🌈😋😀📦
12:05 timotimo a raspi 3 definitely
12:05 Zoffix yey, Unicode's back in logs (whoever fixed it)++
12:06 timotimo are there multicore raspis?
12:06 hoffentlichja timotimo: yes, they are quad cores
12:07 timotimo even raspi 2?
12:07 hoffentlichja yes, I have one
12:07 timotimo that's nice
12:07 timotimo since one of rakudo's strengths is parallel stuff
12:07 Zoffix "In October, Hacktoberfest and SQUASHathon happen at the same time, so people participating in SQUASHathon are also hacktoberfesting." ... does that work if you make a PR to one of the repos you have a commit bit to tho?
12:08 timotimo hm, we'll just give a commit bit after the fourth merged pr or something?
12:08 hoffentlichja Zoffix: github says no
12:08 harrison joined #perl6
12:09 Zoffix .tell AlexDaniel looks like squashathon PRs won't count towards Hacktoberfest for many people: https://irclog.perlgeek.de/perl6/2017-10-03#i_15250088
12:09 yoleaux Zoffix: I'll pass your message to AlexDaniel.
12:09 Zoffix hoffentlichja: thanks.
12:10 Zoffix buggable: tag lhf
12:10 buggable Zoffix, There are 3 tickets tagged with LHF; See http://fail.rakudo.party/t/LHF for details
12:10 abraxxa tyil: regarding https://tyil.nl/tutorials/6lang-creating-a-background-service.html if you use systemd your daemon doesn't have to fork to go into the background because systemd monitors the processes without a pidfile or any other old, obscure workaround
12:10 AlexDaniel joined #perl6
12:11 tony-o joined #perl6
12:12 tyil abraxxa: but I dont use systemd, and I wouldn't recommend systemd because I think its a pile of exploitable, breaking shit
12:12 abraxxa hm, modules.perl6.org shows a 4 besides DATABASE but lists 7 modules when I click it
12:12 tyil also, systemd is made to be incompatible with everything so it cant even work on bsd
12:12 abraxxa tyil: I like the service file concept and don't care about the rest very much as long as its stable
12:13 tyil if just the init part, its ok, but the entire systemd package is all but stable
12:13 abraxxa i don't like that it tries to replace everything but as init system i like it much more than sysv with the per-distro incompatible init scripts
12:13 tyil you can get the service file concept with runit as well anyway
12:14 abraxxa i guess the number difference comes from core modules
12:14 tyil someone worked on a perl 6 module to make that possible
12:14 abraxxa tyil: i don't know runit, which distro is using it by default?
12:14 tyil voidlinux
12:14 abraxxa never heared of that
12:14 tyil now you have :>
12:15 Geth ¦ ecosystem: patzim++ created pull request #370: Add RPi::Device::ST7036 to ecosystem
12:15 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/370
12:15 tyil anyway, I dont like systemd, I dont intend to go out of my way to support it, if you feel something should be added to that article, you can make a PR on https://github.com/Tyil/website
12:17 scovit joined #perl6
12:19 scovit Hello, does somebody know how would you do this: sub await (blabla:D $s) is export { react { whenever $s.events { done; } }; };
12:19 Geth ¦ ecosystem: dec40c113c | (Patrick Zimmermann)++ (committed using GitHub Web editor) | META.list
12:19 Geth ¦ ecosystem: Add RPi::Device::ST7036 to ecosystem
12:19 Geth ¦ ecosystem:
12:19 Geth ¦ ecosystem: See https://github.com/patzim/RPi-Device-ST7036
12:19 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/dec40c113c
12:19 Geth ¦ ecosystem: dd943f5b2a | (Zak B. Elep)++ (committed using GitHub Web editor) | META.list
12:19 Geth ¦ ecosystem: Merge pull request #370 from patzim/patch-1
12:19 Geth ¦ ecosystem:
12:19 Geth ¦ ecosystem: Add RPi::Device::ST7036 to ecosystem, thanks @patzim!
12:19 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/dd943f5b2a
12:19 scovit in v6.d? Using Awaitable role? I know that it is still not finished buy I have checked the source code and it seems very complex
12:20 scovit s/buy/but/
12:21 scovit I just worry that things which now seems simple are going to become overwhelming in v6.d
12:22 scovit or maybe I can just keep that code and things will just work out
12:24 timotimo scovit: your code up there looks like the equivalent of implementing blabla's get-await-handle by just calling self.events.get-await-handle
12:24 timotimo though actually ...
12:25 timotimo yeah i'm not sure about that
12:25 Geth ¦ modules.perl6.org: 3343674a40 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Root.pm
12:25 Geth ¦ modules.perl6.org: Don't show core dists in tag view
12:25 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/3343674a40
12:26 Zoffix abraxxa: thanks. Fixed.
12:27 abraxxa Zoffix++ # thanks!
12:28 abraxxa can we also unify serialiSation and serialiZation?
12:28 AlexDaniel joined #perl6
12:29 scovit timotimo events is a Supply, not a Promise, I am done at the first emit
12:30 timotimo ah
12:30 scovit it's awaiting for things for happening, opposed to being done
12:30 Geth ¦ modules.perl6.org: 03c4743e3f | (Zoffix Znet)++ | tag-aliases.json
12:30 Geth ¦ modules.perl6.org: [REBUILD] Normalize "serialization" tag
12:30 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/03c4743e3f
12:31 Zoffix abraxxa: done (will update on next db rebuild)
12:31 abraxxa Zoffix: awesome!
12:31 timotimo hm, so return the await-handle of a promise you'll keep when a message comes through the $s.events i guess
12:32 * Zoffix &
12:33 scovit timotimo: ok, that seems not so complex, more understandable than creating my own await-handle at least
12:33 scovit good idea :)
12:34 scovit s/await-handle/Awaitable::Handle/
12:35 timotimo oh yes
12:36 timotimo no reason to try that for something that can more or less already be awaited
12:36 timotimo hm, probably can also $s.events.head(1).Promise.get-await-handle
12:37 timotimo m: my Supplier $s .= new; my $p = $s.Supply.head(1).Promise; $s.then({ say "oh yeah!" }); $s.emit("hi"); sleep 1;
12:37 camelia rakudo-moar 0dd6af: OUTPUT: «No such method 'then' for invocant of type 'Supplier'. Did you mean 'tree'?␤  in block <unit> at <tmp> line 1␤␤»
12:37 timotimo m: my Supplier $s .= new; my $p = $s.Supply.head(1).Promise; $p.then({ say "oh yeah!" }); $s.emit("hi"); sleep 1;
12:37 camelia rakudo-moar 0dd6af: OUTPUT: «oh yeah!␤»
12:37 timotimo kind of like this?
12:37 scovit very clear!
12:39 timotimo that'll also give you an exception in the await if the supply quits rather than done-ing
12:47 ShalokShalom_ joined #perl6
12:52 mcmillhj joined #perl6
12:55 rba__ joined #perl6
12:56 Ulti just checking out this post https://www.reddit.com/r/perl/comments/73y7di/201740_unicode_granted/ and found that collation example given in the docs doesn't appear to work as expected for me locally https://docs.perl6.org/language/experimental#Collation_Levels
12:56 Ulti 'a' coll 'A' in that situation reports More
12:57 Ulti this is with rakudo built about half an hour ago
13:01 lizmat m: dd 'a' coll 'A'
13:01 camelia rakudo-moar 0dd6af: OUTPUT: «Order::Less␤»
13:01 lizmat Ulti: what situation do you mean?
13:01 jonas1 joined #perl6
13:01 lizmat ah, I see:
13:02 lizmat m: $*COLLATION.set(:quaternary(False), :tertiary(False)); dd 'a' coll 'A'
13:02 camelia rakudo-moar 0dd6af: OUTPUT: «Use of the $*COLLATION dynamic variable is experimental; please 'use experimental :collation'␤  in block <unit> at <tmp> line 1␤␤»
13:02 lizmat m: use experimental :collation; $*COLLATION.set(:quaternary(False), :tertiary(False)); dd 'a' coll 'A'
13:02 camelia rakudo-moar 0dd6af: OUTPUT: «Order::More␤»
13:02 Ulti sorry, yeah you got it
13:03 lizmat m: use experimental :collation; $*COLLATION.set(:!tertiary); dd 'a' coll 'A'
13:03 camelia rakudo-moar 0dd6af: OUTPUT: «Order::More␤»
13:03 lizmat looks like a rakudobug to me  :-)
13:04 lizmat must be afk for a while, commute to Amsterdam&
13:04 Ulti safe journey
13:04 cdg joined #perl6
13:14 Cabanossi joined #perl6
13:17 mr-fooba_ joined #perl6
13:23 leah2 joined #perl6
13:37 epony joined #perl6
13:41 skids joined #perl6
13:44 cdg joined #perl6
14:00 kurahaupo joined #perl6
14:00 kurahaupo_ joined #perl6
14:04 atroxaper joined #perl6
14:05 atroxaper o/ #perl6
14:05 atroxaper m: sub s(&funk:(:$param)!) { &funk(:param(works)) }; s( {say $:param} );
14:05 camelia rakudo-moar f946bd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    works used at line 1. Did you mean 'words', 'ords'?␤␤»
14:05 atroxaper sub s(&funk:(:$param)!) { &funk(:param('works')) }; s( {say $:param} );
14:05 atroxaper m: sub s(&funk:(:$param)!) { &funk(:param('sorry')) }; s( {say $:param} );
14:05 camelia rakudo-moar f946bd: OUTPUT: «sorry␤»
14:06 atroxaper m: sub c(:&funk:(:$param)!) { &funk(:param('not work')) }; c( funk => {say $:param} );
14:06 camelia rakudo-moar f946bd: OUTPUT: «Required named parameter 'funk:(:$param)' not passed␤  in sub c at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:06 atroxaper Can't crack named subroutine as parameter of sub
14:06 HoboWithAShotgun so as it turns out, clone does not call BUILD on the cloned object
14:07 HoboWithAShotgun is there a proper copy constructor=
14:07 HoboWithAShotgun ?
14:08 mr-foobar joined #perl6
14:08 Zoffix nope
14:10 HoboWithAShotgun that sucks because the class in question is immutable and private to some other namespace
14:11 jnthn clone is just a method
14:11 Zoffix m: sub c (:&funk (:(:$param))) { funk :42param }; c(funk => {say $:param})
14:11 camelia rakudo-moar f946bd: OUTPUT: «42␤»
14:11 Zoffix atroxaper: ^
14:11 jnthn method clone() { callsame().CLONE() }; method CLONE() { ...copy logic here... }
14:12 Zoffix atroxaper: looks like there's a parsing bug when `!` or `is required` is used as well.
14:12 HoboWithAShotgun sec
14:13 Zoffix m: sub c (:&funk:(:$param)) { funk :42param }; c(funk => {say $:param})
14:13 camelia rakudo-moar f946bd: OUTPUT: «No such method 'signature' for invocant of type 'Callable'␤  in sub c at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:13 Zoffix the plot moistens
14:14 Zoffix atroxaper: oh, nevermind. That method isn't constraining by signature :(
14:14 atroxaper Zoffix: :))
14:14 piojo joined #perl6
14:18 Zoffix Filed the "no signature method" as https://rt.perl.org/Ticket/Display.html?id=132209
14:19 atroxaper m: sub c(:&funk is required (:(:$param))) { &funk(:param('finally. Zoffix++')) }; c( funk => {say $:param} );
14:19 camelia rakudo-moar f946bd: OUTPUT: «finally. Zoffix++␤»
14:20 atroxaper m: sub c(:&funk! (:(:$param))) { &funk(:param('finally. Zoffix++')) }; c( funk => {say $:param} );
14:20 camelia rakudo-moar f946bd: OUTPUT: «finally. Zoffix++␤»
14:20 Zoffix And thge RT for `is required`: https://rt.perl.org/Ticket/Display.html?id=132210
14:21 Zoffix m: say {say $:param}.Capture
14:21 camelia rakudo-moar f946bd: OUTPUT: «\()␤»
14:21 atroxaper I think signature of parameter have to be in 'where' part. After ! of 'is required'
14:21 Zoffix m: sub c(:&funk! (:(:$param))) { &funk(::parrrrrrrrrrrrrrrrrrrrrrrrrrrrram('finally. Zoffix++')) }; c( funk => {say $:parrrrrrrrrrrrrrrrrrrrrrrrrrrrram} );
14:21 camelia rakudo-moar f946bd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤No such symbol 'parrrrrrrrrrrrrrrrrrrrrrrrrrrrram'␤at <tmp>:1␤------> 3funk(::parrrrrrrrrrrrrrrrrrrrrrrrrrrrram7⏏5('finally. Zoffix++')) }; c( funk => {sa␤»
14:21 Zoffix m: sub c(:&funk! (:(:$param))) { &funk(:parrrrrrrrrrrrrrrrrrrrrrrrrrrrram('finally. Zoffix++')) }; c( funk => {say $:parrrrrrrrrrrrrrrrrrrrrrrrrrrrram} );
14:21 camelia rakudo-moar f946bd: OUTPUT: «finally. Zoffix++␤»
14:22 Zoffix atroxaper: it doesn't actually constrain it. You're unpacking the param, but .Capture returns an empty capture
14:22 Zoffix m: sub c(:&funk! where .signature ~~ :(:$param)) { &funk(:param('finally. Zoffix++')) }; c( funk => {say $:param} );
14:22 camelia rakudo-moar f946bd: OUTPUT: «finally. Zoffix++␤»
14:22 Zoffix m: sub c(:&funk! where .signature ~~ :(:$param)) { &funk(:parram('finally. Zoffix++')) }; c( funk => {say $:parram} );
14:22 camelia rakudo-moar f946bd: OUTPUT: «Constraint type check failed in binding to parameter '&funk'; expected anonymous constraint to be met but got -> :$parram! { #`(Blo...␤  in sub c at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:23 Zoffix That works, but requires a `where`
14:23 atroxaper Best!
14:24 atroxaper 'where' would in 'library' code. I worry about users :)
14:24 atroxaper That is ok then.
14:26 zakharyas joined #perl6
14:26 atroxaper Who knows, is that way a good way to constraint such 'callback'?
14:27 Zoffix Yeah. You could also use subset helpers to give a meaningful error
14:27 Zoffix buggable: eco Subset::Helper
14:27 buggable Zoffix, Subset::Helper 'create awesome subsets': https://github.com/zoffixznet/perl6-Subset-Helper
14:27 Zoffix .in 5d add `where-is` to subset helper, bruh
14:27 yoleaux Zoffix: I'll remind you on 8 Oct 2017 14:27Z
14:28 HoboWithAShotgun ok here's the thing: https://hastebin.com/binuwiheji.rb
14:28 HoboWithAShotgun i don't have access to the bar class, have i?
14:29 Zoffix HoboWithAShotgun: that submethod BUILD looks useless to me
14:29 HoboWithAShotgun this is a smalles self contained example
14:29 Zoffix m: class Foo { has $.x; has $.y = $!x + 1 }.new(:42x).y.say
14:29 camelia rakudo-moar f946bd: OUTPUT: «43␤»
14:29 atroxaper Nice subset!
14:29 Zoffix Ah, ok, then
14:30 atroxaper And one more question. when I call &come-code(|%all-possible-args) then is will crash if &come-code do not expect one or more possible-args. Now I grep %all-poosible-args for entries of signature. Is it a good way&
14:32 Zoffix atroxaper: an anon capture
14:32 Zoffix m: sub foo (:$a, :$b, |) { say "$a and $b and the rest is ignored" }; my %meow = :42a, :72b, :50c; foo |%meow
14:32 camelia rakudo-moar f946bd: OUTPUT: «42 and 72 and the rest is ignored␤»
14:33 Zoffix m: sub foo (:$a, :$b, |c) { say "$a and $b and the rest was {c.perl}" }; my %meow = :42a, :72b, :50c; foo |%meow
14:33 camelia rakudo-moar f946bd: OUTPUT: «42 and 72 and the rest was \(:c(50))␤»
14:33 rba_ joined #perl6
14:34 Zoffix HoboWithAShotgun: I'm not quite following that code. The two tests the same item for two different values...
14:35 atroxaper But is works only when I control the foo method. But I expect that it will be written by user of lib...
14:36 Zoffix Ahj
14:38 atroxaper Ok then. It is not hard to grep, Just wanted to ensure that I found a good way. Thank you.
14:41 Zoffix Yeah, don't really see a short way
14:43 AlexDaniel joined #perl6
14:44 Zoffix m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; foo |(%meow{&foo.signature.params.grep(*.named)».usage-name}:p)
14:44 camelia rakudo-moar f946bd: OUTPUT: «Too many positionals passed; expected 0 arguments but got 2␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:44 Zoffix Wonder why it doesn't wanna slip in those pairs :/
14:49 Zoffix m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; foo |((%meow{&foo.signature.params.grep(*.named)».usage-name}:p).Hash)
14:49 camelia rakudo-moar f946bd: OUTPUT: «42 and 72␤»
14:49 Zoffix m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; foo |%(%meow{&foo.signature.params.grep(*.named)».usage-name}:p)
14:49 camelia rakudo-moar f946bd: OUTPUT: «42 and 72␤»
14:50 Zoffix I guess I confused slipping and capturing... List.Capture shoves Pairs in it into named args...
14:52 Zoffix (also, `.usage-name` is unspecced; don't use it :P)
14:53 atroxaper What is '.usage-name'?!
14:53 Zoffix It's used when generating the name for default USAGE message for sub MAIN
14:53 Zoffix m: sub MAIN($x, $y, $x) {}
14:53 camelia rakudo-moar f946bd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol '$x'␤at <tmp>:1␤------> 3sub MAIN($x, $y, $x7⏏5) {}␤    expecting any of:␤        shape declaration␤»
14:53 Zoffix m: sub MAIN($x, $y, $z) {}
14:53 camelia rakudo-moar f946bd: OUTPUT: «Usage:␤  <tmp> <x> <y> <z> ␤»
14:53 Zoffix ^ like her
14:53 Zoffix *here
14:54 mcmillhj joined #perl6
14:54 atroxaper lol :)
14:55 Zoffix m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; say &foo.cando: \(:42a)
14:55 camelia rakudo-moar f946bd: OUTPUT: «(sub foo (:$a, :$b) { #`(Sub|76304600) ... })␤»
14:56 Zoffix I'd say that's a bug in `cando`. The sub won't work if I call it with those args
14:56 Zoffix Oh nevermind
14:56 Zoffix it will :D
14:57 Zoffix One day, I'll learn this language :)
14:57 atroxaper m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; foo |%(%meow{&foo.signature.params.grep(*.named).map: *.name.substr(1)}:p)
14:57 camelia rakudo-moar f946bd: OUTPUT: «42 and 72␤»
14:59 Zoffix m: sub foo (:$a, :$b) { say "$a and $b" }; my %meow = :42a, :72b, :50c; foo |(%(%meow{%meow.keys.combinations.grep({&foo.cando: \(|%(%meow{$_}:p))}).sort(-*).head}:p))
14:59 camelia rakudo-moar f946bd: OUTPUT: «42 and 72␤»
14:59 Zoffix ehehehe
15:01 atroxaper Scary...
15:03 HoboWithAShotgun zofffix: the last line of that should of course read: ok $foo.bar[0].y == 7, "fails";
15:04 HoboWithAShotgun https://hastebin.com/ikosabupuj.rb
15:04 Zoffix Well, that was embarassing... my quip on https://www.reddit.com/r/perl/comments/73y7di/201740_unicode_granted/ exposed a bug in rakudo and it took me like an hour to notice the output was wrong :P
15:05 Zoffix m: for <a b c> { $^v.uc andthen say $v orelse .say
15:05 camelia rakudo-moar f946bd: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3b c> { $^v.uc andthen say $v orelse .say7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
15:05 Zoffix m: for <a b c> { $^v.uc andthen say $v orelse .say }
15:05 camelia rakudo-moar f946bd: OUTPUT: «a␤a␤a␤»
15:05 Zoffix ^ that bug :)
15:06 Zoffix m: for <a b c> { $^v.uc andthen say $v }
15:06 camelia rakudo-moar f946bd: OUTPUT: «a␤b␤c␤»
15:08 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=132211
15:08 wamba joined #perl6
15:08 Zoffix daxim++ # made me find 1 rakudobug and 3 Inline::Perl5 bugs :D
15:09 daxim inline::* is cheating
15:10 Zoffix Why?
15:10 Zoffix Unicode::Collate is cheating
15:10 daxim nope, that's a core module
15:11 daxim inline is cheating because I could embed libperl into language Foo, but no one would say running that program is a Foo program
15:11 Zoffix daxim: but we have the spec mandating Inline::Perl5 support.
15:11 daxim that's orthogonal to what I just said
15:12 Zoffix It's part of the language that I can load up Unicode::Collate and use its features.
15:20 mcsnolte joined #perl6
15:29 Cabanossi joined #perl6
15:34 cdg joined #perl6
15:34 cdg joined #perl6
15:35 cdg_ joined #perl6
15:37 brrt joined #perl6
15:39 brrt left #perl6
15:50 zostay m: my %s = <x a y b>; if <x y> ~~ %s { say 'found' }
15:50 camelia rakudo-moar f946bd: OUTPUT: «Type check failed in binding to parameter '&call'; expected Callable but got Method+{<anon|50258432>} (Method+{<anon|5025843...)␤  in block <unit> at <tmp> line 1␤␤»
15:50 zostay i feel like that should work
15:51 Zoffix zostay: yeah, it's this annoying bug: https://rt.perl.org/Ticket/Display.html?id=128905#ticket-history
15:53 Zoffix zostay: also, that smartmatch would look for a List key, not for either x or y keys
15:54 Zoffix Actually bypasses the first bug if you write it properly
15:54 Zoffix m: my %s = <x a y b>; if <x y>.any ~~ %s { say 'found' }
15:54 camelia rakudo-moar f946bd: ( no output )
15:54 Zoffix oh :(
15:56 Zoffix Yeah, it's hitting the Mu candidate that takes a Mu topic :\
15:56 Zoffix s: {}, 'ACCEPTS'
15:56 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/f946bd35d/src/core/Mu.pm#L13
15:56 zakharyas joined #perl6
15:57 Zoffix s: {}, 'ACCEPTS', \(<x y>.any)
15:57 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/f946bd35d/src/core/Any.pm#L18
15:57 Zoffix Ah that. OK.
15:57 zostay Sounds like this needs an update then, https://docs.perl6.org/type/Hash#(Map)_method_ACCEPTS
15:57 * Zoffix hackety hacks
15:57 Zoffix zostay: update for which part?
15:58 Zoffix Oh "If the topic is list-like (Positional), returns True if any of the list elements exist as a key in the Map."
15:58 Zoffix zostay: ah, OK, I misread the code then
15:59 Zoffix Sounds like I could be more productive if I don't continually give wrong answers on this channel :D
16:00 Zoffix \o
16:00 Zoffix left #perl6
16:03 W4RL0RD joined #perl6
16:05 cdg joined #perl6
16:07 cdg_ joined #perl6
16:14 Cabanossi joined #perl6
16:18 mempko joined #perl6
16:27 piojo joined #perl6
16:30 Geth ¦ modules.perl6.org/cpan-support: a631a303e0 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder.pm
16:30 Geth ¦ modules.perl6.org/cpan-support: Exclude PSIXDISTS user from CPAN downloads
16:30 Geth ¦ modules.perl6.org/cpan-support:
16:30 Geth ¦ modules.perl6.org/cpan-support: - Lots of experimental uploads and it takes some time to download
16:30 Geth ¦ modules.perl6.org/cpan-support:   'em all on slow networks
16:30 Geth ¦ modules.perl6.org/cpan-support: - We filtered their METAs anyway
16:30 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/a631a303e0
16:33 cdg joined #perl6
16:34 Geth ¦ modules.perl6.org/cpan-support: 24cc6f7efe | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Root.pm
16:34 Geth ¦ modules.perl6.org/cpan-support: Don't show core dists in tag view
16:34 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/24cc6f7efe
16:34 Geth ¦ modules.perl6.org/cpan-support: 2d9e73c851 | (Zoffix Znet)++ | tag-aliases.json
16:34 Geth ¦ modules.perl6.org/cpan-support: [REBUILD] Normalize "serialization" tag
16:34 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/2d9e73c851
16:43 troys joined #perl6
16:46 Pilu joined #perl6
16:49 mempko joined #perl6
16:54 tbrowder ugexe: why does zef show ":auth" for some modules but not others?  does it look both in META6 and on the module definition line?
16:54 tbrowder i should have said "when zef installs a module and its dependencies"
16:55 lizmat joined #perl6
17:15 [Coke] do you have a specific example of one with an :auth and one without?
17:17 shadoxx joined #perl6
17:20 domidumont joined #perl6
17:22 ken joined #perl6
17:31 leah2 joined #perl6
17:32 cdg joined #perl6
17:33 cdg joined #perl6
17:37 shadoxx joined #perl6
17:58 cdg joined #perl6
18:03 setty1 joined #perl6
18:03 epony joined #perl6
18:14 leah2 joined #perl6
18:15 Rawriful joined #perl6
18:20 AlexDaniel joined #perl6
18:27 Geth ¦ modules.perl6.org/cpan-support: 50e9dbf5cb | (Zoffix Znet)++ | 2 files
18:27 Geth ¦ modules.perl6.org/cpan-support: Add /raw/ route to cater raw files
18:27 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/50e9dbf5cb
18:29 Cabanossi joined #perl6
18:39 mcmillhj joined #perl6
18:39 |oLa| joined #perl6
18:41 |oLa| left #perl6
18:43 Geth ¦ modules.perl6.org/cpan-support: dd986c6d0f | (Zoffix Znet)++ | 2 files
18:43 Geth ¦ modules.perl6.org/cpan-support: Implement rudimentary in-page file viewer
18:43 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/dd986c6d0f
18:50 Morfent joined #perl6
18:51 mcmillhj joined #perl6
18:56 HoboWithAShotgun joined #perl6
18:56 leah2 joined #perl6
18:59 Cabanossi joined #perl6
19:03 mcmillhj joined #perl6
19:06 tbrowder [Coke]: after looking more closely, I see the listed modules have an "auth" key in their META6.json file!  I hadn't seen that key listed before in other META6.json examples.  As I've commented before, I think there is a disconnect between the very few required META6 keys and those that we need to enforce for a good ecosystem/CPAN.
19:07 Xliff m: my %s = <x a y b>; if <x y>.any ~~ %s.keys { say 'found' }
19:07 camelia rakudo-moar 2724a8: ( no output )
19:07 Xliff m: my %s = <x a y b>; dd %s
19:07 camelia rakudo-moar 2724a8: OUTPUT: «Hash %s = {:x("a"), :y("b")}␤»
19:08 Xliff m: my %s = <x a y b>; if %s ~~ <x y>.any { say 'found' }
19:08 camelia rakudo-moar 2724a8: ( no output )
19:08 Xliff m: my %s = <x a y b>; if %s eq <x y>.any { say 'found' }
19:08 camelia rakudo-moar 2724a8: ( no output )
19:08 Xliff m: my %s = <x a y b>; if %s.keys eq <x y>.any { say 'found' }
19:08 camelia rakudo-moar 2724a8: ( no output )
19:09 brrt joined #perl6
19:12 timotimo interesting
19:12 timotimo bisectable6: if 3 * (1 + 2){ say "haha" }
19:12 bisectable6 timotimo, Bisecting by output (old=2015.12 new=2724a85) because on both starting points the exit code is 1
19:12 bisectable6 timotimo, bisect log: https://gist.github.com/08639d1baf78934c618773855d6f57ab
19:12 bisectable6 timotimo, (2016-08-03) https://github.com/rakudo/rakudo/commit/7ec824e52ab5b285cda47179e6f41e452d870762
19:18 Guest54426 joined #perl6
19:20 mcmillhj joined #perl6
19:21 zakharyas joined #perl6
19:26 Geth ¦ modules.perl6.org/cpan-support: d5fb0e0674 | (Zoffix Znet)++ | 8 files
19:26 Geth ¦ modules.perl6.org/cpan-support: Add Perl 6 code highligher
19:26 Geth ¦ modules.perl6.org/cpan-support:
19:26 Geth ¦ modules.perl6.org/cpan-support: It's a lot less than ideal and breaks on some constructs. Will
19:26 Geth ¦ modules.perl6.org/cpan-support: need to figure out how to use atom-language-perl6 highligher
19:26 Geth ¦ modules.perl6.org/cpan-support: on web eventually.
19:26 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/d5fb0e0674
19:29 Cabanossi joined #perl6
19:35 Geth ¦ modules.perl6.org/cpan-support: 059d02a759 | (Zoffix Znet)++ | assets/js/main.js
19:35 Geth ¦ modules.perl6.org/cpan-support: Make line numbers clickable
19:35 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/059d02a759
19:37 ChoHag joined #perl6
19:40 * AlexDaniel clickbaits https://code-golf.io/
19:59 mdef joined #perl6
19:59 Cabanossi joined #perl6
19:59 mdef hay??
20:00 mdef bagaimana cara kerja perl untuk web ?
20:03 Guest54426 joined #perl6
20:04 leont_ joined #perl6
20:05 cdg joined #perl6
20:08 Zoffix joined #perl6
20:09 Zoffix marcusramberg:
20:09 Zoffix oops... sorry, fat fingers ':)
20:10 Zoffix And Indenesian person's left already; was gonna say http://mi.cro.services/
20:12 rba_ joined #perl6
20:15 Xliff Hmm.... parsing a 1.9meg hash definition takes ~135 to parse in current rakudo. Takes ~14 seconds to load once parsed.
20:16 Xliff s/to parse/seconds to parse/
20:16 * masak likes to perl untuk web
20:17 El_Che you little cara kerja!
20:17 Rawriful joined #perl6
20:20 AlexDaniel Xliff: so put it into a pm6 file and let it get precompiled?
20:26 masak El_Che: I think you might have just called me a workflow.
20:31 El_Che masak: you're a piece of workflow, they say
20:32 kyan joined #perl6
20:40 lizmat joined #perl6
20:41 Xliff AlexDaniel: My apologies. Those tests were done in a pm6 file.
20:41 niceperl joined #perl6
20:41 AlexDaniel Xliff: ah, so it's 135s before precompilation and 14s after?
20:41 Xliff Yes.
20:42 AlexDaniel Xliff: I'm curious, have you tried to achieve the same with JSON::Fast?
20:42 Xliff So if there can be some serialization done to get those times down, it would be nice. However, I think this is one of the areas where the nature of rakudo actually prevents much in the way of speed increases.
20:42 mempko joined #perl6
20:42 Xliff AlexDaniel: I'd have to look into it. So, the answer is "no".
20:43 Xliff But my experiments with JSON::Fast say it should be faster.
20:43 AlexDaniel Xliff: I recall a ticket somewhere with thousands of “say” statements or something like that, and it was really slow
20:44 AlexDaniel so maybe keeping that data as perl 6 code is the slowest approach, but maybe not
20:44 Xliff Yes.
20:44 Xliff That was the conclusion I had come up with, as well.
20:45 Xliff So the other way I am managing that is taking the relatively static data out of the text files, and putting them into an .sqlite3
20:45 Xliff And then just querying that.
20:46 * AlexDaniel would first try dumping all that data into text files :D  Current filesystems handle thousands of files in the same directory pretty well
20:47 * AlexDaniel is not saying that it's the right solution :)
20:47 AlexDaniel squashable6: next
20:47 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈13 hours (2017-10-07 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
20:50 timotimo Xliff: what syntax were you using for the hash definition? do you have something to reproduce? i'd like to run it through a c-level profiler
20:53 Xliff timotimo: Standard Hash declaration.
20:53 Xliff For perl6
20:53 Xliff I can gist it if you want.
20:53 timotimo you mean like my %foo = a => 2, b => 3, c => 4?
20:53 timotimo that'd be nice
20:53 timotimo i don't want to come up with an example of my own %)
20:53 Xliff our %foo = { a=>1, b=>2, c=>3 }
20:53 Xliff OK. One sec.
20:54 timotimo that's not how you do that d)
20:54 timotimo :)
20:54 timotimo it used to give an error if you do it like that
20:54 timotimo bisectable6: my %foo = { a => 1, b => 2 }
20:54 bisectable6 timotimo, On both starting points (old=2015.12 new=fa8fe84) the exit code is 0 and the output is identical as well
20:54 bisectable6 timotimo, Output on both points: «Potential difficulties:␤    Useless use of hash composer on right side of hash assignment; did you mean := instead?␤    at /tmp/nhB0ZJLaoo:1␤    ------> my %foo = { a => 1, b => 2 }⏏<EOL>»
20:54 timotimo oh, it still does
20:55 Xliff Oh. Perens, not curly braces. LOL
20:55 Xliff m: our %foo = ( a=>1, b=>2, c=>3 )
20:55 camelia rakudo-moar fa8fe8: ( no output )
20:55 timotimo OK
20:55 Xliff except it was more like
20:55 timotimo now i know using our variables is excruciatingly slow, but i don't think it matters for the initializer a tall
20:56 Xliff m: our %foo = ( record_id => { a=>1, b=>2, c=>3 } )
20:56 camelia rakudo-moar fa8fe8: ( no output )
20:56 timotimo OK, multi-level, that's more interesting
20:58 Aaronepower joined #perl6
20:59 Cabanossi joined #perl6
21:03 tyil is there any step-by-step tutorial for contributing perl 6 modules to CPAN?
21:04 Xliff timotimo: Here, but this was not what I intended. :/
21:04 Xliff https://gist.github.com/Xliff/795c8dbef036a8027bf6cc11a3877799'
21:05 Xliff https://gist.github.com/Xliff/795c8dbef036a8027bf6cc11a3877799 <-- no quote at end
21:05 mcmillhj joined #perl6
21:06 timotimo that's only one file, right?
21:06 TEttinger joined #perl6
21:06 Xliff Yes.
21:09 timotimo k, because my browser didn't like it :)
21:09 Xliff Yeah. It's a large file.
21:09 timotimo takes like a gig of ram to compile, too
21:09 Xliff Yeppers.
21:10 Xliff So FWIW - File was autogenerated from a mysql database.
21:10 Xliff This was over a year ago when I was still new to rakudo.
21:10 timotimo okay, 93% time spent in a single function
21:10 Xliff Wow!
21:11 timotimo oh, that's spesh
21:11 timotimo without perf it finishes in under a second - loading the precompiled file, that is
21:12 timotimo i'll proflie the precomp process now
21:15 timotimo this time it's only 15% of time spent in that same function
21:16 timotimo looks like spesh is running into an extreme slowdown situation from the gigantic frame and keeps the compiling thread from doing GC for a long time
21:17 mcmillhj joined #perl6
21:21 AlexDaniel Zoffix: CPAN question? ↑
21:22 AlexDaniel !
21:22 AlexDaniel :)
21:22 timotimo incidentally the speshlog for loading the precomped thing is 85 megs big
21:25 Xliff timotimo: So 85 meg vs a gig?
21:26 Xliff I can see that.
21:26 MasterDuke left #perl6
21:26 Xliff Incidentally, that 132 second parse is 50% larger than what it takes to parse Perl6's core.
21:26 MasterDuke joined #perl6
21:27 timotimo hm?
21:27 mcmillhj joined #perl6
21:27 Xliff Takes me 95-96 for nqp to parse the perl6 core.
21:27 Xliff 95-96 seconds
21:27 timotimo the 85 megs is the size of the text file that spesh spits out when you ask it
21:27 Xliff Oh!
21:28 Xliff OK, that's mostly human readable bloat.
21:28 timotimo well, yeah :)
21:28 timotimo i can give you a taste of the interesting bits, hold on
21:28 Xliff And the frame for parsing the large file would mean that it would output a lot more than a 1 gig logfile.
21:28 timotimo http://t.h8.lv/stats_for_mainline.txt
21:29 timotimo i'm not sure what you mean by that?
21:29 timotimo the "logged at offset" bit is the interesting bit here
21:30 timotimo not only because it makes up 99% of the whole file
21:30 timotimo you see, every time a frame that's being logged hits something interesting like an invocation, it'll take note of that in the log
21:30 timotimo it wants to share entries, of course
21:31 timotimo that's why it takes the bytecode offset of the interesting instruction, and searches for an already existing entry
21:31 timotimo sadly, that's implemented as a linear search
21:31 timotimo because that's fast enough for normal cases
21:31 Xliff ahhhh
21:33 timotimo the entry i copied into that text file is from very early on
21:33 Xliff OK. Off for a quick nap. Stomach isn't feeling right.
21:33 timotimo when not nearly all of the frame has been run
21:33 timotimo oh, hope you'll feel better soon
21:33 Xliff thx
21:33 zakharyas joined #perl6
21:34 MasterDuke timotimo: can it easily be made a binary search or something smarter than linear?
21:34 timotimo 16% into the log file and this stats entry goes up to bytecode index 1 million
21:34 timotimo yeah, it should be easy
21:34 timotimo hm, or maybe not, though
21:35 timotimo you think 1 million, that's already huge?
21:35 timotimo well, the last entry the file has lists offsets up to 6 million
21:36 MasterDuke bigger indeed
21:36 timotimo actually, no, it can't. it's not sorted
21:36 Zoffix tyil: check back in a week
21:36 tyil Zoffix: I can do that :>
21:37 tyil if someone had a mediocre guide I was planning to make an easy one myself
21:37 Zoffix .in 5d link tyil to CPAN guide
21:37 yoleaux Zoffix: I'll remind you on 8 Oct 2017 21:37Z
21:37 tyil but if you do it its even less work :p
21:37 MasterDuke timotimo: ugh. second time that's been a problem
21:37 Zoffix tyil: Don't have anything ATM, but was planning to make a writeup after launching CPAN support on modules.perl6.org.
21:37 timotimo oh
21:38 tyil Zoffix: nice
21:38 timotimo it's probably totally feasible to just cache the last position in the array and the corresponding bytecode offset
21:38 tyil the cpan support on module.perl6.org made me interested in adding cpan support for my modules
21:38 Zoffix \o/
21:38 tyil but I couldnt find a lot of info on contributing p6 modules to cpan
21:38 timotimo let me see what the "access pattern" is like
21:38 timotimo by putting loads of printf in :D
21:38 tyil say is shorter
21:39 Zoffix put is shorter
21:40 Zoffix tyil: the nutshell is the process is the same as for Perl 5 modules, except on PAUSE you select "Perl6" as the directory on the uploads page—or use App::Mi6 and its `mi6 upload` feature (though check the archive it makes is file by running `mi6 dist` first)
21:40 * Zoffix &
21:41 Zoffix (say => prints gist; put => prints string with a newline; so `put` is closer to `printf`)
21:42 jdv79 https://gist.github.com/anonymous/17e152e8a259ca492034ee836df9cbb5
21:42 timotimo C doesn't have say or put :)
21:42 jdv79 that's a gist that seems related.  my case that i haven't been able to golf is very similar but the qqx call blocks.
21:42 timotimo it does have puts, but i don't want to do my own formatting
21:43 geekosaur printf has shortcomings in any language with a richer type system than C's. I kinda prefer Python's % operator (not that we could call it that)
21:44 mcmillhj joined #perl6
21:44 timotimo MasterDuke: okay, so, the MVM_spesh_stats_update function goes through all log entries and scatters the individual pieces into the right places
21:45 timotimo MasterDuke: there's nothing preventing us from keeping those lists sorted by doing binary search and inserting into the middle or heck even keeping a heap or other sorted datastructure
21:47 timotimo MasterDuke: even having a "highest bytecode position so far" check could be a good improvement
21:47 timotimo so we can instantly just append to the end in that case
21:49 timotimo thing is, usually these "by offset" entries don't reach anywhere past 100
21:50 jdv79 swapping in proc::async for the qqx yields hte same results
21:51 timotimo MasterDuke: so perhaps once a "spesh by type" thing has more than 1k entries we just stop caring about that frame
21:52 timotimo actually, we already have an upper limit for bytecode size where we'll not spesh a frame at all. we should definitely copy that check into the logging perhaps
21:52 MasterDuke was wondering about that
21:52 timotimo could even skip putting data into the log if the bytecode offset is too high, but that'd probably make logging have more overhead, which we don't want
21:52 jnthn jdv79: Platform?
21:53 MasterDuke both things actually, might be nice to have some sorted array functions in moar, but also is it even worth it for something that large (in that particular case)
21:53 jnthn jdv79: hmm, though I can reproduce it.
21:54 jnthn jdv79: But wait, nothing awaits that start block?
21:54 jdv79 linux
21:55 jnthn So no wonder it exits :)
21:55 MasterDuke (the sorted data structure functionality would also be nice for that sc id situation)
21:55 jnthn Stick an await before the `start` and all is good
21:55 jdv79 i think its a golf failure
21:55 jnthn Ah
21:56 jdv79 i guess i'll just post the whole thing.  the actual thing blocks on the proc call
21:56 jnthn Yeah, I'm not seeing anything surprising in it only doing "before" there
21:56 jdv79 ok, sorry.  i'll get it in a bit.
21:57 jnthn Reason I asked about platform is I'm sure there was an RT about some interaction of run and...something...
21:57 jnthn I forget what
21:57 jnthn And it was only on OSX
21:57 timotimo good, with that skip in place loading that module is as fast as if i had disabled spesh
21:57 jnthn But that predated the re-working of run in terms of Proc::Async
21:58 * lizmat calls it a night
21:59 MasterDuke timotimo: nice
21:59 timotimo pushed the fix
22:00 timotimo Xliff: now loading the precomped file is like a hundred times faster
22:03 mcmillhj joined #perl6
22:04 timotimo Xliff: but parsing and compiling the file still takes 1:13m
22:04 timotimo not sure how long it took before, but the difference is probably small
22:06 timotimo okay, could be about 10 seconds faster
22:11 timotimo Xliff: and if you have "constant %systems = %( ... )" it'll load in under a third of a second on my machine
22:11 timotimo you have jnthn to thank for that one
22:20 mcmillhj joined #perl6
22:25 jdv79 jnthn: its too big.  i'll try to golf again tomorrow.
22:28 Geth ¦ modules.perl6.org/cpan-support: 05fd06a5c6 | (Zoffix Znet)++ | 3 files
22:28 Geth ¦ modules.perl6.org/cpan-support: Add back button to files browser
22:28 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/05fd06a5c6
22:29 jnthn jdv79: Alrighty. I'm heading for sleep soon anyways.
22:29 tyil no lizmat :(
22:29 Cabanossi joined #perl6
22:29 tyil .tell lizmat was this your doing? :p https://ghostbin.com/paste/t9opu
22:29 yoleaux tyil: I'll pass your message to lizmat.
22:29 timotimo nite jnthn :)
22:32 Geth ¦ modules.perl6.org/cpan-support: 38709db18e | (Zoffix Znet)++ | 3 files
22:32 Geth ¦ modules.perl6.org/cpan-support: Improve file browser's look
22:32 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/38709db18e
22:33 Zoffix tyil: you can view who committed by appending commit sha to https://github.com/rakudo/rakudo/commit/   so: https://github.com/rakudo/rakudo/commit/98fae3d
22:33 mcmillhj joined #perl6
22:33 tyil Zoffix: it was intended as a joke (hence the :p), since I saw her working with stuff that looked like that at the perl monger meetup
22:34 Zoffix tyil: tho "doing"… doing what? There's no error in that output
22:34 Zoffix Ah. OK.
22:34 geekosaur ther eis, and it looks t o me like rakudobrew has horled itself yetagaian
22:34 geekosaur *horked itself yet again
22:34 tyil sh: 1: /home/tyil/.local/var/rakudobrew/moar-nom/install/bin/nqp-m: not found looks wrong to me
22:34 Zoffix geekosaur: what is it? I see only four lines of standard output. Cuts off at "cloning nqp
22:35 tyil that said, it seems to compile Just Fine(tm)
22:35 Zoffix tyil: that's normal. It checks if you already have built nqp and if not it builds it for you (hence the "cloning" bit)
22:35 tyil hmm
22:35 Zoffix Maybe it shouldn't output it :)
22:35 tyil could be made prettier in that case
22:36 Zoffix tyil: you should join us during SQUASHathon this weekend and make it prettier. I think that stuff is controlled by the first two files here: https://github.com/rakudo/rakudo/tree/nom/tools/build
22:36 Zoffix squashable6: status
22:36 squashable6 Zoffix, ⚠🍕 Next SQUASHathon in 2 days and ≈11 hours (2017-10-07 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
22:37 Xliff timotimo++ && jnthn++
22:37 tyil Zoffix: if I have time, I will, I'm still not entirely done moving into this new place and have something planned for sunday already
22:37 Zoffix \o/
22:37 tyil it shouldnt take too much time to fix
22:40 timotimo Xliff: if it's autogenerated from mysql anyway, you can probably have a constant %systems = do { use DBIish; ... }; in your file and it'd probably be faster than parsing perl6 code
22:40 Zoffix :O :O :O searched for a Perl module to guess if a file is binary or or text; turns out it supports it out of the box with -B/-T file tests.
22:40 * Zoffix gets jealous
22:40 Zoffix (we do have Data::TextOrBinary in ecosystem tho)
22:40 bloatable6 joined #perl6
22:41 jnthn Hm, that module sounds familiar...did I wrote it?
22:41 jnthn eco: Data::TextOrBinary
22:41 jnthn bah, how's that thing work
22:41 jnthn eco Data::TextOrBinary
22:41 jnthn Not like that :)
22:41 Zoffix Bucciarati: eco Data::TextOrBinary
22:41 Zoffix oops
22:41 Zoffix buggable: eco Data::TextOrBinary
22:41 buggable Zoffix, Data::TextOrBinary 'Heuristic detection of text vs. binary data.': https://github.com/jnthn/p6-data-textorbinary
22:41 jnthn yup :P
22:41 jnthn oh, right, now I remember :)
22:41 Zoffix :)
22:42 jnthn It uses a fairly simple heuristic, which I nabbed from git :P
22:43 pilne joined #perl6
22:44 Xliff jnthn: If more than 30% of the text is not a printable character, it's binary?
22:44 mcmillhj joined #perl6
22:44 Xliff Or 30% of a suitably large enough sample, even.
22:45 jnthn I can't remember, but it's something along those lines
22:45 jnthn Though I think there's some other twist
22:45 buggable joined #perl6
22:45 Zoffix eco: Meow
22:45 buggable Zoffix, Acme::Meow 'The kitty you always wanted, now in Perl 6': https://github.com/tadzik/perl6-Acme-Meow
22:45 Zoffix trigger works now
22:46 Xliff jnthn: Of course there's always a twist.
22:46 jnthn Yeah, it's got some extra smarts. Null byte always means binary, \r not followed by \n also
22:46 jnthn Line \n's don't count either way
22:46 Xliff Ah. NULL byte will shortcut everything.
22:47 jnthn Yeah, the lone \r too
22:47 Xliff And no computer uses just \r's
22:47 Xliff LOL! Jinx
22:47 Geth ¦ modules.perl6.org/cpan-support: 4076ead17e | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
22:47 Geth ¦ modules.perl6.org/cpan-support: Do not attempt to render binary files in-page
22:47 Geth ¦ modules.perl6.org/cpan-support: review: https://github.com/perl6/modules.perl6.org/commit/4076ead17e
22:47 kurahaupo_ joined #perl6
22:48 kurahaupo_ joined #perl6
22:48 jnthn Other than that it's just a table lookup to see if it's printable or not
22:57 arnsholt joined #perl6
22:59 mcmillhj joined #perl6
23:02 dpk joined #perl6
23:14 mcmillhj joined #perl6
23:29 Cabanossi joined #perl6
23:41 cdg joined #perl6
23:42 epony joined #perl6
23:55 skids joined #perl6

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

Perl 6 | Reference Documentation | Rakudo