| 2018-06-29 |
|
geekosaur
| Juerd, if you do reproduce it at some point, what does "locale" report in the shell at that point? | 00:00 |
|
| tjhat shell, not a different one | 00:00 |
|
Juerd
| https://juerd.nl/i/4e15b239d6b33c973af964745ad712ac.png but still haven't been able to reproduce | 00:01 |
|
geekosaur
| in fact… stay in p6 when it happens and run: shell 'locale' | 00:01 |
|
Juerd
| I still have the same perl6 running but it hasn't happened again | 00:01 |
|
| shell 'locale' gives the same output | 00:02 |
|
geekosaur
| probably only happens when something is initted the first time | 00:02 |
|
| doesn't look like that should be a problem. I think | 00:03 |
|
Juerd
| Even if I replay the entire session it doesn't reproduce the internal error | 00:03 |
|
geekosaur
| lovely. thta sounds like some kind if memory corruption and it landed somewhere else | 00:08 |
| → lizmat joined | 00:11 |
| ← lizmat left | 00:16 |
| ← zachk left | 00:21 |
| ← MilkmanDan left | 01:03 |
| → vike1 joined | 01:11 |
| ← kurahaupo_ left | 01:13 |
| → kurahaupo joined | 01:13 |
| ← markoong left | 01:26 |
| → markoong joined | 01:26 |
| ← markoong left | 01:27 |
| → markoong joined | 01:28 |
| → jeromelanteri joined | 01:32 |
| ← markoong left | 01:33 |
| ← espadrine left | 01:38 |
| ← molaf left | 01:38 |
| → mcmillhj joined | 01:41 |
| → molaf joined | 01:51 |
| → perlpilot joined | 01:54 |
| → kalkin--- joined | 01:54 |
| ← mcmillhj left | 01:55 |
|
perlpilot
| Here's something crazy that happened today ... my youngest children (twins, boy + girl) asked me about programming. Since they use Windows, I downloaded notepad++ and the windows version of rakudo and showed them a few things. | 01:55 |
|
raschipi
| How old are they? | 01:56 |
|
perlpilot
| Just now (about 6 hours after I first showed them stuff), I go to see what my son is doing and he a a Perl 6 file in notepad++ with a grammar that he had typed in from someone's P6 talk | 01:56 |
|
| raschipi, 12 | 01:56 |
|
raschipi
| And it's not crazy, it's natural for children to ask about what their parents work on, I think. | 01:57 |
|
perlpilot
| that last sentence was the crazy part :) | 01:57 |
|
geekosaur
| still not very | 01:57 |
|
| pop onto the web, look for interesting examples | 01:57 |
|
perlpilot
| Since I first showed them stuff, he's been on google and youtube and whatever he can find to learn more perl 6. | 01:57 |
|
geekosaur
| …bite off more than you can chew, most of the time >.> | 01:57 |
| ← kalkin-- left | 01:58 |
|
perlpilot
| I only showed them about scalars, arrays, outputting stuff, if statements, simple looping, etc. and he's taken off with all the things he wants to figure out. | 01:59 |
|
| It still seems crazy to me. | 01:59 |
|
| Quite unexpected. | 01:59 |
|
raschipi
| jmerelo will wanna hear about them having p6 as their first language. | 02:01 |
|
perlpilot
| I was thinking about getting his book for them to learn from | 02:01 |
|
geekosaur
| sounds entirely expected to be, tbh | 02:01 |
|
| to me | 02:01 |
| → fake_space_whale joined | 02:02 |
|
geekosaur
| at least, if it piques their interest | 02:02 |
|
perlpilot
| yeah, you're right ... I'm probably just comparing their learning programming to my learning programming ... 35 years ago from a book about BASIC. They've got way more resources at their disposal | 02:03 |
|
| But also, I have another data point to compare at well. Their older brother was 15 and taking a class in school that used python, so i tried teaching him programming with python (it was the first time he showed any interest). It didn't exactly "stick" with him. | 02:07 |
|
geekosaur
| different strokes | 02:08 |
| ← jeromelanteri left | 02:08 |
|
raschipi
| I think it's due to ludic learning. | 02:12 |
| → MilkmanDan joined | 02:17 |
|
raschipi
| perlpilot: awesome history though, even if we don't find it surprising. | 02:23 |
|
AlexDaniel
| perlpilot: what about syntax highlighting? According to https://github.com/perl6/user-experience/issues/19 notepad++ does no syntax highlighting for perl6 files, is that correct? | 02:24 |
|
perlpilot
| It does appear to do some simple highlighting for perl6 files | 02:25 |
|
| Well ... files that end in .p6 (I didn't try .pm6 yet) | 02:26 |
|
AlexDaniel
| huh | 02:26 |
|
perlpilot
| perl6 doesn't show up in their list of file types though | 02:27 |
|
AlexDaniel
| perlpilot: btw, I have a bunch of stuff done for sake :) | 02:33 |
|
| was a bit distracted by things in the last two days so didn't even manage to push anything :( | 02:34 |
|
| perlpilot: but otherwise it is looking great :) | 02:34 |
|
perlpilot
| cool | 02:34 |
| ← fake_space_whale left | 02:36 |
| → kurahaupo_ joined | 02:41 |
| ← kurahaupo left | 02:44 |
| ← kurahaupo_ left | 02:47 |
| ← perlpilot left | 02:48 |
| → kurahaupo joined | 02:48 |
| → ufobat_ joined | 02:52 |
| ← kybr left | 02:54 |
| ← ufobat left | 02:55 |
| ← raschipi left | 03:02 |
| → Sgeo_ joined | 03:04 |
| → lookatme_q joined | 03:26 |
| ← lookatme left | 03:27 |
| ← molaf left | 03:32 |
| ← kurahaupo left | 03:32 |
| ← eliasr left | 03:39 |
|
buggable
| New CPAN upload: IP-Random-0.0.7.tar.gz by JMASLAK http://modules.perl6.org/dist/IP::Random:cpan:JMASLAK | 03:44 |
| ← BenGoldberg left | 03:56 |
| → nopl joined | 03:57 |
| → Popov_ joined | 03:58 |
| → gabiruh joined | 04:05 |
| → mcmillhj joined | 04:07 |
| ← benjikun left | 04:09 |
| ← mcmillhj left | 04:12 |
| → skids joined | 04:25 |
| → psychoslave joined | 04:33 |
| → alpha6 joined | 04:48 |
| → curan joined | 04:50 |
| ← skids left | 05:04 |
| ← kaare_ left | 05:11 |
| → kurahaupo joined | 05:20 |
| → sauvin joined | 05:21 |
| → jmerelo joined | 05:29 |
| ← [Sno] left | 05:34 |
|
jmerelo
| o/ | 05:34 |
| → wamba joined | 05:36 |
| → benjikun joined | 05:38 |
|
benjikun
| Does anyone know if there are there any modules built for sending emails w/ Perl6 | 05:39 |
|
yoleaux
| 28 Jun 2018 11:25Z <Zoffix> benjikun: Suggestions for next iterations of the survey: (1) For most wanted feature, invite people to be as specific as possible. 50 people saying "performance" is a lot less useful than a single person saying "performance of custom ops". (2) Add a comment field at the end "Suggestions to improve future versions of this survey"... ATM I don't even know if you're the right person to send this suggestion | 05:39 |
|
| 28 Jun 2018 11:25Z <Zoffix> benjikun: to. Like who's the author of the survey? | 05:39 |
| ← kurahaupo left | 05:41 |
| → xtreak joined | 05:42 |
|
benjikun
| .tell Zoffix I'll keep those in mind for next time, me and several others from this IRC channel thought up the questions in the June 2018 survey (AlexDaniel and jjmerelo being some I remember). | 05:43 |
|
yoleaux
| benjikun: I'll pass your message to Zoffix. | 05:43 |
|
jmerelo
| benjikun: I really didn't have much to think but thanks for the reference :-) | 05:55 |
|
| benjikun: it's going very well, BTW. More than 200 answers... | 05:55 |
|
benjikun
| Mhm, can't wait to get the next one to be able to see how many new users we get in how much time | 05:58 |
|
jmerelo
| benjikun: you want to do it monthly? | 06:00 |
|
| BTW, here's the chart for files created per user in the Perl 6 repository https://www.google.com/fusiontables/DataSource?docid=16Gz5bSq2ARdPNLkXGY3bW_GKBdonoSW4__ygnKTC | 06:00 |
|
benjikun
| jmerelo: Not sure yet, it would be nice for sure | 06:00 |
|
| Do you think everyone would do it every month? | 06:00 |
|
jmerelo
| benjikun: probably quarterly would be less tiresome | 06:01 |
| → kurahaupo joined | 06:01 |
|
jmerelo
| Here's another view: https://www.google.com/fusiontables/DataSource?docid=16Gz5bSq2ARdPNLkXGY3bW_GKBdonoSW4__ygnKTC, including a pie chart. 64% of the files were created by [Coke] | 06:02 |
| → kaare_ joined | 06:02 |
| → hami joined | 06:03 |
|
jmerelo
| Average score for the documentation is not at 6.87. That's a B- | 06:11 |
| ← hami left | 06:12 |
|
benjikun
| jmerelo: I don't have permission to view that page | 06:13 |
|
jmerelo
| benjikun: try now https://www.google.com/fusiontables/DataSource?docid=16Gz5bSq2ARdPNLkXGY3bW_GKBdonoSW4__ygnKTC | 06:23 |
|
benjikun
| works now :) | 06:23 |
|
buggable
| New CPAN upload: Text-BorderedBlock-0.1.0.tar.gz by TYIL https://cpan.metacpan.org/authors/id/T/TY/TYIL/Perl6/Text-BorderedBlock-0.1.0.tar.gz | 06:24 |
| → diegok joined | 06:26 |
|
jmerelo
| Hey, diegok ! | 06:26 |
| ← diegok left | 06:31 |
| → domidumont joined | 06:43 |
| → darutoko joined | 06:44 |
| → sno joined | 06:47 |
| ← kurahaupo left | 06:47 |
| ← domidumont left | 06:49 |
| → domidumont joined | 06:49 |
|
jmerelo
| Another illustration on the Perl 6 repo: days needed for 100 commits https://github.com/JJ/TPF-Grant/blob/master/illos/days-100-commits-log.png | 06:51 |
|
| Lately it hovers around ~ 10 days, but a few commits ago was the second best ever: 3 odd days. Best ever, you see the dip, 2 days and change. | 06:52 |
| → diegok joined | 06:52 |
| ← diegok left | 06:59 |
| → diegok joined | 07:01 |
| → robertle joined | 07:02 |
|
jmerelo
| benjikun: did you close the survey? Do you intend to write some report? | 07:06 |
|
benjikun
| jmerelo: Yeah, I made a GitHub repo under perl6/p6survey with the final results. | 07:06 |
|
jmerelo
| benjikun: great! | 07:07 |
|
benjikun
| :) | 07:07 |
| → lizmat joined | 07:15 |
| ← sno left | 07:23 |
| ← ufobat_ left | 07:26 |
| → pmurias joined | 07:34 |
| → sno joined | 07:35 |
| ← lookatme_q left | 07:39 |
| ← pmurias left | 07:42 |
| → pmurias joined | 07:46 |
| ← jmerelo left | 07:46 |
| → Tison joined | 07:49 |
| ← xtreak left | 07:51 |
| → xtreak joined | 07:52 |
| ← perigrin left | 07:59 |
|
cog
| benjikun, the page "what platforms..." does not display the platform names (as displayed on chrome/ubuntu) | 08:00 |
|
benjikun
| cog: Put your mouse over the bars | 08:00 |
| → perigrin joined | 08:02 |
| ← wamba left | 08:03 |
|
cog
| thx | 08:04 |
|
benjikun
| np :) | 08:05 |
|
Tison
| nqp: my $y := 42; $y.defined() | 08:07 |
|
camelia
| nqp-moarvm: OUTPUT: «Cannot find method 'defined': no method cache and no .^find_method at <tmp>:1 (<ephemeral file>:<mainline>) from gen/moar/stage2/NQPHLL.nqp:1566 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:eval) from gen/moar/stage2/NQPHLL.nqp:1805 (…» | 08:07 |
|
Tison
| https://github.com/perl6/nqp/blob/9eda6a020886220cb297909f7ea5330a9568f034/src/core/NQPMu.nqp#L82-L84 | 08:07 |
|
| We do have a `defined` method in NQPMu, why NQP complains that there is no? | 08:08 |
|
| or $y is not a NQPMu? which is more strange | 08:08 |
| → zakharyas joined | 08:13 |
| → rindolf joined | 08:15 |
| ← xtreak left | 08:17 |
| ← Tison left | 08:17 |
| → Tison joined | 08:20 |
|
Tison
| It blocks this fix and I'll appreciate it for any help (https://github.com/perl6/nqp/commit/255b8dd7e7dd8b5316ab203958352ec8de0d9a76) | 08:21 |
|
| Tison have to logout | 08:22 |
| ← Tison left | 08:22 |
| → wamba joined | 08:24 |
| ← wamba left | 08:26 |
| ← benjikun left | 08:27 |
| → wamba joined | 08:27 |
| → wamba1 joined | 08:27 |
| ← wamba1 left | 08:28 |
| ← wamba left | 08:28 |
| → wamba joined | 08:28 |
| ← g- left | 08:29 |
| → g- joined | 08:39 |
|
tyil
| is there a tool to convert all texas ops in a perl 6 file to their unicode equivalents (if possible) | 08:44 |
|
lizmat
| not afaik (module opportunity!!) | 08:49 |
|
pmurias
| shouldn't it be a Perl6::Tidy feature? | 08:50 |
|
El_Che
| (I would prefer the other way around, if you're writing a modules anyway :) ) | 08:51 |
| → xtreak joined | 08:51 |
|
tyil
| I'm writing plenty of modules, nothing for this (yet) tho | 08:51 |
|
| I'm testing out comma, but it doesnt automatically convert texas to unicode (yet?), which I had in vim | 08:52 |
|
| and everyone agrees that unicode ops are awesome | 08:52 |
|
| so I'm looking for an alternative that's easily used to convert texas to unicode ops now | 08:53 |
|
buggable
| New CPAN upload: Object-Trampoline-0.0.2.tar.gz by ELIZABETH http://modules.perl6.org/dist/Object::Trampoline:cpan:ELIZABETH | 09:04 |
|
El_Che
| tyil: ** - 1 | 09:05 |
|
| :) | 09:05 |
|
tyil
| that would be so much prettier with superscript - 1 and leaving out the ** | 09:05 |
| → parv joined | 09:24 |
| ← xtreak left | 09:32 |
| → HaraldJoerg joined | 09:34 |
| ← curan left | 09:37 |
| → sena_kun joined | 09:37 |
|
jkramer
| What's a texas op? | 09:37 |
| → curan joined | 09:38 |
| ← domidumont left | 09:39 |
|
robertle
| an ascii variant of a unicode op | 09:39 |
|
jkramer
| Is that the official term? I've never heard that before :) | 09:40 |
|
robertle
| so eg 'atomic-inc-fetch', for which there is also a neat unicode one | 09:40 |
|
| I can't type the unicode one however, since I'm from texas (apparently) | 09:40 |
|
jkramer
| I don't get it, must be some inside joke I guess? :) | 09:45 |
|
robertle
| perhaps not a joke, but just lack of a better name | 09:49 |
| → jmerelo joined | 09:50 |
|
robertle
| but many operators have two ways to write them: one using unicode and one using a narrow character set that you can easily type on a US keyboard | 09:50 |
| ← aindilis left | 09:51 |
|
jmerelo
| robertle: all of them, in fact. | 09:52 |
|
lizmat
| jkramer: texas op is the old name of ascii op | 09:53 |
|
| jkramer: it *was* an inside joke, deemed to be too inside so it was removed as a reference: instead "ascii op" is used now | 09:54 |
| ← sno left | 09:54 |
|
jkramer
| Thanks for the clarification :) | 09:55 |
| ← wamba left | 10:00 |
| → aindilis joined | 10:00 |
| → wamba joined | 10:00 |
| ← Popov_ left | 10:17 |
| → sarna joined | 10:20 |
| ← sarna left | 10:25 |
| → xtreak joined | 10:25 |
| → sarna joined | 10:27 |
| → Tison joined | 10:28 |
| ← robertle left | 10:30 |
| → sno joined | 10:30 |
| ← wamba left | 10:36 |
|
sarna
| hey, I have a list of things and want to call a function that would take things from this list as arguments. is there an easy way of doing this? | 10:40 |
|
tadzik
| |@args should do what you want, iirc | 10:41 |
|
sarna
| foo(bar, @a) -> bar(@a[0], @a[1]..) | 10:41 |
|
| oh thanks, I'll look into it :) | 10:41 |
|
moritz
| correct | 10:41 |
|
tadzik
| m: sub a($a, $b, $c) { $a + $b + $c }; my @args = 4, 5, 6; say a(|@args) | 10:41 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «15» | 10:41 |
|
sarna
| where can I find docs on this? | 10:42 |
|
jmerelo
| sarna: in the docs :-) https://docs.perl6.or6 | 10:43 |
|
| sarna: look up "Signatures" | 10:43 |
|
tadzik
| https://docs.perl6.org/routine/| | 10:43 |
|
| tadzik is mildly amused that this is a valid URL | 10:43 |
|
sarna
| jmerelo: ah thanks, I forgot how these things were called :) | 10:44 |
|
| tadzik: nice | 10:44 |
|
tadzik
| I like your nickname, are you aware of its polish meaning? :) | 10:45 |
|
sarna
| tadzik: yeah, as you can see I'm half-polish myself | 10:45 |
|
tadzik
| ah, that explains it :) | 10:45 |
|
jmerelo
| tadzik: It would mean "itch" in Spanish. What does it mean in Polish? | 10:45 |
|
sarna
| (the other half is polish too) | 10:45 |
|
tadzik
| jmerelo: it's "roe", the animal | 10:45 |
|
sarna
| jmerelo: roe deer | 10:45 |
|
tadzik
| I didn't actually know the english word until I checked it just now | 10:46 |
|
jmerelo
| tadzik: definitely more beautiful than itch. | 10:46 |
|
sarna
| same, I kept saying "deer" until I realised it's a different anumal | 10:46 |
|
tadzik
| quite :P | 10:46 |
|
sarna
| jmerelo: well, I prefer to link its spanish meaning with a Bukowski's poem | 10:47 |
|
| "excuses" | 10:47 |
|
| "burning itch from hell" that pushes artists to be creative sounds way better than rabies | 10:49 |
|
El_Che
| jmerelo: it's not "itch", it "scabies" | 10:50 |
|
sarna
| scabies! | 10:50 |
|
| not rabies. heck, haven't woken up yet | 10:50 |
|
El_Che
| I would post a link to the little guy, but I won't :) | 10:50 |
|
| thank me later :) | 10:50 |
|
jmerelo
| sarna: actually, that's one of the drivers of free software. Scratch one's itch. | 10:50 |
|
sarna
| El_Che: little guy? | 10:51 |
|
jmerelo
| El_Che: OK, technically it's scabies, but it's more generically used meaning "itch" | 10:51 |
|
El_Che
| jmerelo: you sound like microsoft: the GPL is like scabies | 10:51 |
|
| :) | 10:51 |
|
jmerelo
| El_Che: Like "Sarna con gusto no pica". You can't get scabies _and_ like it. | 10:51 |
|
sarna
| jmerelo: :D | 10:51 |
|
El_Che
| jmerelo: in Spain, a smallish far-away country in the hipanic worl community | 10:51 |
|
| :) | 10:51 |
|
| world | 10:51 |
|
jmerelo
| El_Che: :-) | 10:52 |
|
| El_Che: which has proceeded, against all previews, to the next phase in the World Cup | 10:52 |
|
El_Che
| I must close the google images page now | 10:52 |
|
| jmerelo: yes, Spain can do so much better | 10:52 |
|
jmerelo
| El_Che: and much worse... But congrats, Belgium has gone ahead too :-) | 10:53 |
| → Zoffix joined | 10:53 |
|
El_Che
| nowadays is better than Germany good enough | 10:53 |
|
sarna
| El_Che: where are you from? if you don't mind me asking | 10:53 |
|
El_Che
| sarna: .be, with hispanic roots | 10:54 |
|
| jmerelo: I watched the Chile-Spain match in Lond 4 years ago | 10:55 |
|
sarna
| El_Che: I see :) | 10:55 |
| → dustinm` joined | 10:55 |
| ← aindilis left | 10:55 |
|
El_Che
| sarna: I went back to uni (without attending classes) in order to write spanish, because my education was in dutch | 10:56 |
|
jmerelo
| El_Che: Hey, I was in London too! On my way from the airport, actually :-) | 10:56 |
|
El_Che
| lol | 10:56 |
|
| I was ther for work | 10:56 |
|
| but we found a South-American place full with Spanish people :) | 10:57 |
|
| it was nice | 10:57 |
|
| I almost mixed a plane to Australia from London | 10:57 |
|
Zoffix
| .tell Tison don't know much about it, but I'd assume 42 is an unboxed int and not an object, which is why it ain't got that method and I'd presume there's no auto-boxing in nqp, like we got in Perl 6. For example, nqp::objprimspec($y) returns 1 (for objects it's 0). You can just write nqp::isconcrete($y) instead of .defined (in nqp at least, in Perl 6 .defined is different). Or if you have to use .defined then | 10:57 |
|
yoleaux
| 05:43Z <benjikun> Zoffix: I'll keep those in mind for next time, me and several others from this IRC channel thought up the questions in the June 2018 survey (AlexDaniel and jjmerelo being some I remember). | 10:57 |
|
Zoffix
| say(nqp::objprimspec($y) || $y.defined) | 10:57 |
|
El_Che
| we were watching the penalies | 10:57 |
|
yoleaux
| Zoffix: I'll pass your message to Tison. | 10:58 |
|
El_Che
| finale | 10:58 |
|
Zoffix
| .tell Tison say(nqp::objprimspec($y) || $y.defined) | 10:58 |
|
yoleaux
| Zoffix: I'll pass your message to Tison. | 10:58 |
|
El_Che
| it takes some time to your brain to recognize they are calling your names through the speakers | 10:58 |
|
jmerelo
| El_Che: He. Also, pronunciation might not help | 10:58 |
| → aindilis joined | 10:58 |
|
sarna
| El_Che: in poland I was stuck with german :( | 10:59 |
|
Tison
| yes | 10:59 |
|
yoleaux
| 10:57Z <Zoffix> Tison: don't know much about it, but I'd assume 42 is an unboxed int and not an object, which is why it ain't got that method and I'd presume there's no auto-boxing in nqp, like we got in Perl 6. For example, nqp::objprimspec($y) returns 1 (for objects it's 0). You can just write nqp::isconcrete($y) instead of .defined (in nqp at least, in Perl 6 .defined is different). Or if you have to use .defined then | 10:59 |
|
| 10:58Z <Zoffix> Tison: say(nqp::objprimspec($y) || $y.defined) | 10:59 |
| ← aindilis left | 10:59 |
|
sarna
| El_Che: maybe I should learn spanish/portuguese though, now after I've moved I've been mistaken for a spaniard/portuguese a couple of times | 10:59 |
|
Tison
| I use nqp::isconcrete instead in the recent commit | 10:59 |
|
El_Che
| sarna: I remember getting a lot of beers from Israeli people when I was in Brasil | 11:01 |
| → [Sno] joined | 11:01 |
|
El_Che
| sarna: it was their independence day and I learnt a few words | 11:01 |
|
| good for when you travel on low budget :) | 11:01 |
|
sarna
| El_Che: woo! | 11:01 |
| ← sno left | 11:01 |
|
El_Che
| sarna: spent a little short of 2 years backpacking | 11:02 |
|
| not a lot of budget | 11:02 |
|
sarna
| El_Che: I'm really digging the multinational community here, it's so different from poland | 11:02 |
|
| (I've moved to denmark for uni) | 11:02 |
|
El_Che
| I learnt some good card tricks that gets you free beer :) | 11:02 |
|
jmerelo
| El_Che: quite an experience, I'm sure... | 11:02 |
|
El_Che
| sarna: I can imagine | 11:02 |
|
| jmerelo: very formative, specially for understanding Latin America (and also South-East Asia was interesting) | 11:03 |
|
| jmerelo: being in a village in Latin America where no one speaks spanish is interesting (education and culture is very eurocentric on most places) | 11:04 |
|
| sarna: where in .dk are you? | 11:04 |
|
sarna
| El_Che: northern jutland | 11:05 |
|
El_Che
| nice | 11:05 |
|
| you can take the boat to Sweden :) | 11:06 |
|
sarna
| oslo is pretty close too :) | 11:06 |
|
El_Che
| I have family in Århus | 11:06 |
|
sarna
| I'm in another double A city | 11:07 |
| → robertle joined | 11:07 |
|
El_Che
| Ålborg? | 11:07 |
|
sarna
| yeah. don't write it with an Å though, the locals don't like it :D | 11:08 |
|
El_Che
| really? | 11:08 |
|
| I learnt something today :) | 11:08 |
|
| Swedish spelling or something? | 11:08 |
|
sarna
| no, Danish. there was a spelling reform though, a lot of cities retained their old names | 11:09 |
|
| (in anything other than city names Aa transformed into Å) | 11:09 |
| ← xtreak left | 11:10 |
|
El_Che
| so AA is older than Å? | 11:10 |
|
| (linguistically I would have expected the other direction) | 11:10 |
|
| (no always though) | 11:10 |
|
sarna
| yeah, in old danish everything's spelled with 'aa' | 11:11 |
| → wamba joined | 11:11 |
|
El_Che
| dutch when from aa to a pronounce as aa on some situations | 11:11 |
|
sarna
| Aabenraa is my favorite city name here :D | 11:12 |
|
jmerelo
| El_Che: not really. pairs of letters precede letters with stuff on them ij → y, nn → ñ... | 11:12 |
|
El_Che
| os -> ô | 11:12 |
| → xtreak joined | 11:15 |
| ← psychoslave left | 11:15 |
| ← zakharyas left | 11:16 |
| ← [Sno] left | 11:18 |
|
sarna
| m: my $apply = sub(&func, @args) {&func |@args}; say $apply(&[+], <1 2>); | 11:18 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «=== SORRY!=== Error while compiling <tmp>Variable '@args' is not declaredat <tmp>:1------> my $apply = sub(&func, ⏏ @args) {&func |@args}; say $apply(&[+], » | 11:18 |
|
sarna
| it compiled on my machine D: | 11:19 |
|
| hmm, it works as two separate lines | 11:19 |
|
| m: my $apply = sub (&func, @args) {&func |@args}; say $apply(&[+], <1 2>); | 11:20 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «any(sub infix:<+> ($?, $?, *%) { #`(Sub+{is-pure}+{Precedence}|31100208) ... }, (1 2))» | 11:20 |
|
sarna
| now! why isn't + applied to 1 and 2? | 11:20 |
|
jmerelo
| sarna: [+] is actually two functions, the [ ] and the +. I'm not sure & would be a pointer to that composition. | 11:21 |
|
ilmari
| my $apply = sub (&func, @args) { func(|@args) }; say $apply(&[+], <1 2>); | 11:21 |
|
evalable6
| ilmari, rakudo-moar 587cd4f9e: OUTPUT: «3» | 11:21 |
|
ilmari
| my $apply = sub (&func, @args) { func(|@args) }; say $apply(&[+], <1 2 3 4>); | 11:21 |
|
| m: my $apply = sub (&func, @args) { func(|@args) }; say $apply(&[+], <1 2 3 4>); | 11:22 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «Too many positionals passed; expected 0 to 2 arguments but got 4 in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | 11:22 |
|
jmerelo
| m: my $apply = sub (&func, *@args) { func(|@args) }; say $apply(&[+], <1 2 3 4>); | 11:22 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «Too many positionals passed; expected 0 to 2 arguments but got 4 in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | 11:22 |
|
sarna
| jmerelo: don't I need to wrap infix functions in []? | 11:22 |
|
| ilmari: thanks! | 11:23 |
|
jmerelo
| sarna: yep, right. It might work. | 11:23 |
| → markoong joined | 11:29 |
|
Zoffix
| sarna: `sub(…)` makes it think you're trying to call a routine named `sub` you need a space there. `&func` refers to `&func` as a noun, if you want to call it (i.e. use it as a verb), omit the `&`. And then parentheses are optional (unless you're using other sigils). Also, a Capture is better suited for passing arbitrary args to routines | 11:29 |
| ← jmerelo left | 11:30 |
|
Zoffix
| m: my &apply = sub (&func, |c) { func |c }; say apply &[+], <1 2 3 4>; | 11:30 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «4» | 11:30 |
|
Zoffix
| m: my \apply = sub (&func, |c) { func |c }; say apply.(&[+], <1 2 3 4>); | 11:30 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «4» | 11:30 |
|
sarna
| Zoffix: verbs and nouns in a programming language? :D | 11:30 |
|
Zoffix
| sarna: its creator is a linguist by trade :) | 11:30 |
|
masak
| m: &[+](<1 2 3 4>) | 11:30 |
|
camelia
| rakudo-moar 587cd4f9e: ( no output ) | 11:30 |
|
masak
| m: say &[+](<1 2 3 4>) | 11:30 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «4» | 11:30 |
|
masak
| guessing it takes .elems | 11:31 |
|
| m: say <1 2 3 4>.reduce(&[+]) | 11:31 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «10» | 11:31 |
|
Zoffix
| s: &[+], \(<1 2 3 4>) | 11:31 |
|
SourceBaby
| Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/587cd4f9e/src/core/Numeric.pm6#L205 | 11:31 |
|
timotimo
| sarna: the problem with &func |@args was that it was parsed as &func | @args, which gave you a junction | 11:31 |
|
Zoffix
| just a .Numeric | 11:31 |
|
masak
| yes, but .Numeric on a list-y thing... :) | 11:32 |
|
Zoffix
| m: my \apply = sub (&func, *@a) { func |@a }; say apply.(&[+], <1 2 3 4>); | 11:32 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «Too many positionals passed; expected 0 to 2 arguments but got 4 in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | 11:32 |
|
Zoffix
| m: my \apply = sub (&func, |c) { [[&func]] |c }; say apply.(&[+], <1 2 3 4>); | 11:33 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «4» | 11:33 |
|
sarna
| timotimo: ohh | 11:33 |
|
Zoffix
| m: my \apply = sub (&func, *@a) { [[&func]] |@a }; say apply.(&[+], <1 2 3 4>); | 11:34 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «10» | 11:34 |
|
Zoffix
| \o/ | 11:34 |
|
| sarna: OK, never mind my comment about Captures. Evidently it's not the best thing in this situation :) | 11:34 |
|
| Zoffix & | 11:34 |
| ← Zoffix left | 11:34 |
|
sarna
| also, calling apply with a dot isn't ideal | 11:35 |
| ← n1ge left | 11:36 |
|
timotimo
| you have to put a . there because apply(...) would look for something named &apply, but what my \apply gives you is called just "apply" | 11:36 |
|
| any reason you don't just have "sub apply(...) {...}"? | 11:37 |
|
Ulti
| whoa big speed improvement suddenly, like 10% | 11:40 |
| ← xtreak left | 11:45 |
| → raschipi joined | 11:49 |
| → xtreak joined | 11:51 |
|
sarna
| timotimo: it's a hashmap, mapping strings to functions | 11:51 |
|
timotimo
| then you probably won't need the . | 11:52 |
|
| like, if your code looks like %functions{$funcname}(1, 2, 3) there doesn't have to be a . | 11:52 |
|
sarna
| oh, good to know :) | 11:53 |
| → mcmillhj joined | 11:56 |
|
sarna
| is there something like `is-int` but for lists? | 11:57 |
|
El_Che
| whut | 11:58 |
|
sarna
| something like is-list | 11:58 |
|
El_Che
| to know is something is a list? | 11:58 |
|
sarna
| precisely | 11:58 |
| ← Tison left | 11:59 |
|
sarna
| I know I can .WHAT but how to compare it to anything? | 11:59 |
|
El_Che
| smartmatching? | 12:00 |
|
sena_kun
| m: say 3.WHAT =:= Int; | 12:00 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «True» | 12:00 |
|
moritz
| m: say 3.WHAT === Int | 12:00 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «True» | 12:00 |
| → psychoslave joined | 12:00 |
|
raschipi
| m: say 3 ~~ Int | 12:01 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «True» | 12:01 |
|
moritz
| m: my @a = (1, 2, 3); say so all(@a) ~~ Int | 12:01 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «True» | 12:01 |
|
moritz
| m: my @a = (1, 2, 'x'); say so all(@a) ~~ Int | 12:01 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «False» | 12:01 |
| ← mcmillhj left | 12:01 |
| → tobs joined | 12:02 |
| ← sarna left | 12:02 |
| → sarna joined | 12:02 |
|
raschipi
| m: my $y = 3 but False; say $y.WHAT =:= Int; say $y.WHAT === Int; | 12:03 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «FalseFalse» | 12:03 |
| ← erdic left | 12:03 |
|
sarna
| sorry, my internet borked :( | 12:03 |
| → erdic joined | 12:04 |
|
raschipi
| sena_kun: ↑ === and =:= are too strict. | 12:04 |
| → sno joined | 12:07 |
|
sena_kun
| raschipi, thanks, will keep it in mind. Should admit that I've never encountered usage of `but Foo` trick in the wild nor do understand why anyone would have to use it despite being involved in writing of some black-magic-like code. :) | 12:07 |
|
| m: my $a = 3 but False; say $a ~~ Int; | 12:08 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «True» | 12:08 |
|
sena_kun
| Nice. | 12:09 |
| → Zoffix joined | 12:09 |
|
raschipi
| It's used to send in-band extra data, expecially for DBMs. | 12:10 |
|
Zoffix
| AlexDaniel benjikun jmerelo are survey results public already or when is it over? I know you shared a URL, but I wanna tweet the results and it's bad science to publish survey results before it's finished. | 12:11 |
|
El_Che
| Zoffix: publishing raw data is weird | 12:11 |
|
rindolf
| Zoffix: hi | 12:13 |
|
Zoffix
| Right, it needs to be accompanied with prose explaining the results in a way that supports your agenda :P | 12:13 |
|
El_Che
| Zoffix: that's how the cookie crumbles :) | 12:13 |
|
sarna
| do we have a head propagandist? | 12:13 |
|
rindolf
| Zoffix: if rakudobrew sucks so much, then there should be a usable alternative for it | 12:13 |
|
raschipi
| sarna: Zoffix works in marketing. | 12:14 |
|
sarna
| raschipi: oh :^) | 12:14 |
|
El_Che
| rindolf: ./Configure.pl --prefix=foo && make && make test && make install | 12:14 |
|
Zoffix
| rindolf: there is. The bash alias I gave you. It creates a single command instead of rakudobrew's two. If you don't like it, you can give https://rakudup.github.io/ a spin or tyil's thing whose name I forget | 12:14 |
|
tyil
| Zoffix: LoneStar | 12:15 |
|
| :> | 12:15 |
|
Zoffix
| What's the link? | 12:15 |
| ← psychoslave left | 12:15 |
|
tyil
| https://gitlab.com/tyil/lonestar | 12:15 |
|
| its also on github if you prefer that | 12:16 |
| → psychoslave joined | 12:16 |
|
tyil
| it's also in the AUR and in my gentoo overlay | 12:16 |
|
El_Che
| I created packages as an alternative to local compiling. I am not fond of running bash scripts from the internet either | 12:16 |
| → thundergnat joined | 12:16 |
|
tyil
| I oftentimes use the docker images as well | 12:16 |
|
| for testing purposes | 12:16 |
|
El_Che
| I never use docker images I didn't create myself, besides official OS base images | 12:17 |
|
tyil
| I'm using the rakudo-star image with gitlab-ci | 12:17 |
|
| saves me all the effort of setting up perl 6 manually in images all the time | 12:17 |
|
Zoffix
| huggable: build :is: Alternatives to rakudobrew: 3rd party installers: https://gitlab.com/tyil/lonestar#readme and https://rakudup.github.io/ | 3rd party distro packages: https://rakudo.org/files/rakudo/third-party | Bash alias: https://github.com/zoffixznet/r#table-of-contents | 12:17 |
|
huggable
| Zoffix, Added build as Alternatives to rakudobrew: 3rd party installers: https://gitlab.com/tyil/lonestar#readme and https://rakudup.github.io/ | 3rd party distro packages: https://rakudo.org/files/rakudo/third-party | Bash alias: https://github.com/zoffixznet/r#table-of-contents | 12:17 |
|
thundergnat
| sena_kun: using but to apply a role comes in handy sometimes: See http://rosettacode.org/wiki/Hilbert_curve#Perl_6 for example. | 12:17 |
| ← ExtraCrispy left | 12:17 |
|
tyil
| anyway, lunchtime~ | 12:17 |
|
Zoffix
| sarna: I think lizmat++ is our head propagandist, being at the helm of The Perl 6 Weekly as well as at the Perl table of many confs. | 12:18 |
| → mikejw joined | 12:19 |
| ← thundergnat left | 12:19 |
|
lizmat
| the Perl table is done by Wendy, and as such if we would need to call anybody "head propagandist", it would be her, I think | 12:20 |
| → ExtraCrispy joined | 12:20 |
|
lizmat
| but don't tell her that :-) | 12:20 |
|
mikejw
| if I want to pass a binary file as string to https://github.com/bduggan/aws-s3-perl6 do I need to open and slurp the conents with raw/bin encoding? | 12:20 |
|
sarna
| if you told her she'd point at another person :^) | 12:20 |
|
mikejw
| *contents | 12:20 |
|
jkramer
| I was looking at the tasks at rosettacode that don't have a p6 implementation yet and started working on this one: http://rosettacode.org/wiki/Checkpoint_synchronization | 12:21 |
|
| Do you think this is an adequate solution or is there anything to be improved? https://gist.github.com/jkramer/7e04b7c93ac905f179b9d33651e70de6 | 12:21 |
|
Zoffix
| mikejw: doing that would pass it as a Blob. I think you want `"file".IO.slurp: :enc<latin1>` or `:enc<utf8-c8>`. The latter tries to decode it as utf8 and keeps any invalid bytes as is, the former just keeps all the bytes as is | 12:22 |
|
lizmat
| await (1..$total-workers).map: -> $id { and lose the my $id = $_ ? | 12:22 |
|
| jkramer: ^^ | 12:22 |
|
El_Che
| lizmat: I think Zoffix, Wendy and you all cover different parts of the propaganda | 12:22 |
|
rindolf
| tyil: must lonestar be installed under /usr ? | 12:23 |
|
mikejw
| ah cool, thanks :) | 12:23 |
|
Zoffix
| jkramer: FWIW there's Supply.throttle that does all the throttling for you | 12:24 |
| ← sarna left | 12:26 |
|
Zoffix
| m: my $workers = 4; my $units-to-build = 42; await ^$units-to-build .Supply.throttle: $workers, { say "Doing work on $^u"; sleep 3.rand; say "$^u is done" } | 12:26 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «Doing work on 0Doing work on 1Doing work on 2Doing work on 33 is doneDoing work on 41 is doneDoing work on 52 is doneDoing work on 66 is doneDoing work on 74 is doneDoing work on 80 is doneDoing work on 9…» | 12:26 |
|
AlexDaniel
| .seen benjikun | 12:27 |
|
yoleaux
| I saw benjikun 08:05Z in #perl6: <benjikun> np :) | 12:27 |
|
raschipi
| Perl 6 marketing is a hot potato | 12:27 |
|
Zoffix
| m: my $workers = 4; my $units-to-build = 12; react whenever ^$units-to-build .Supply.throttle: $workers, { say "Doing work on $^u"; sleep my \ans := 3.rand; [$u, ans] } { say .result.head ~ " is done. Result is " ~ .result.tail } | 12:27 |
|
camelia
| rakudo-moar 587cd4f9e: OUTPUT: «Doing work on 0Doing work on 1Doing work on 2Doing work on 32 is done. Result is 0.08417798391732845Doing work on 44 is done. Result is 0.35950064073938093Doing work on 50 is done. Result is 0.5759448195478509Doing work on 6…» | 12:27 |
|
AlexDaniel
| Zoffix: yeah, but I think it's not over yet | 12:28 |
| ← psychoslave left | 12:28 |
|
AlexDaniel
| (re survey) | 12:28 |
|
| ah, it says that it *is* over… | 12:29 |
| → psychoslave joined | 12:29 |
| ← parv left | 12:29 |
|
Zoffix
| jkramer: ok, nm, I just now read that wiki that describes the problem | 12:29 |
|
| And another suggestion for the survey is a friendlier URL :) | 12:30 |
|
| Not only I don't remember what it was, even if I saw it right now, I wouldn't know if it's the same or not. | 12:30 |
|
| perl6.org/survey/2018.06 now that's a URL and you can publish the results right at the same URL once it's over | 12:30 |
|
jkramer
| lizmat: Ah yeah, don't know why I did it that way :) | 12:32 |
|
rindolf
| Zoffix: please add a licence to https://github.com/zoffixznet/rd#linux | 12:33 |
|
Zoffix
| meh | 12:34 |
|
jkramer
| Zoffix: That's pretty cool but I think it's not what they want there :) | 12:34 |
|
Zoffix
| jkramer: yeah, it isn't :) | 12:34 |
| → zakharyas joined | 12:36 |
|
rindolf
| Zoffix: i cannot find anything better than rakudobrew and i looked at all three alternatives | 12:36 |
|
Zoffix
| rindolf: which feature of rakudobrew are those alternatives missing? | 12:38 |
|
rindolf
| Zoffix: well, lonestar has to be installed under /usr | 12:38 |
|
mikejw
| Zoffix: now things seem to freeze when I try and access the slurped contents | 12:39 |
|
| btw it's a zip file | 12:39 |
|
Zoffix
| mikejw: is it a super huge file? | 12:39 |
|
mikejw
| 23megs I think | 12:39 |
|
rindolf
| Zoffix: and rakudoup requires an ugly curl | bash command | 12:40 |
|
| Zoffix: and your alias clutters the home dir | 12:40 |
|
Zoffix
| rindolf: but... rakudobrew does the same. It installs into .rakudobrew, my alias installs into .rakudo | 12:41 |
|
rindolf
| Zoffix: it also has ~/rakudo | 12:41 |
|
Zoffix
| rindolf: and rakudobrew is an ugly command that you clone from git rather than curl|bash command | 12:41 |
|
tyil
| tbh, all solutions are ugly | 12:41 |
|
Zoffix
| rindolf: that's what I meant. You can change it to any dir you want. Just adjust the path | 12:41 |
|
tyil
| the only good solution would be inclusion in the distro repos | 12:41 |
|
| all we're doing now are workarounds | 12:42 |
|
| none of them are particularly "nice" | 12:42 |
|
rindolf
| Zoffix: ok, fine | 12:42 |
|
tyil
| also rindolf, if I didnt break it yet, lonestar doesn't need to be installed at all | 12:43 |
|
rindolf
| tyil: ok | 12:43 |
|
tyil
| just clone and ./bin/lonestar, it will intall in ~/.rakudo-star by default | 12:43 |
| → domidumont joined | 12:46 |
| ← curan left | 12:48 |
|
Zoffix
| mikejw: well, I've just killed my box by trying to .slurp.say a 23MB sparse file :P | 12:48 |
| → mcmillhj joined | 12:49 |
| ← robertle left | 12:49 |
|
rindolf
| tyil: thanks | 12:49 |
|
tyil
| no probs :> | 12:50 |
|
rindolf
| Zoffix: heh | 12:50 |
|
Zoffix
| Oh, it's 23*GB*... I guess `dd`'s seek takes kilobytes not bytes... | 12:51 |
|
rindolf
| Zoffix: ah | 12:51 |
|
Zoffix
| oh, "seek=N skip N obs-sized blocks at start of output" | 12:52 |
| → robertle joined | 12:52 |
|
timotimo
| :D :D | 12:52 |
|
Zoffix
| and default obs is 512 | 12:52 |
|
timotimo
| yeah, 23 gig may not fit into the ram with rakudo's overhead | 12:53 |
| ← robertle left | 12:53 |
|
Zoffix
| Challenge accepted!! :) | 12:53 |
|
timotimo
| i don't have enough ram to get that to fit %) | 12:53 |
|
| if it's all zeroes, zram might help here | 12:53 |
|
Zoffix
| Well, I'm too lazy for it, but I think GCE has a VM with half a terrabyte | 12:53 |
|
timotimo
| having loads and loads of objects on the heap in moarvm is problematic because the GC walks all of them, but if you read a gigantic file into memory, you just have a buffer that won't get walked through regularly | 12:55 |
| → molaf joined | 12:55 |
|
jnthn
| The GC only walks all of them in a full collection :) | 13:00 |
|
Zoffix
| mikejw: what version of perl6 do you have? | 13:00 |
|
| $ perl6 -e '$*SPEC.devnull.&open(:w).spurt: "z.zip".IO.slurp: :enc<latin1>; say "z.zip".IO.s/1024/1024, " ", now - ENTER now' | 13:01 |
|
| 26.0959663 1.5011168 | 13:01 |
| ← Khisanth left | 13:01 |
|
Zoffix
| mikejw: ^ that's on 2018.03. 26MB zip file takes 1.5s. And printing to STDOUT takes ~5s | 13:01 |
|
| On 2018.05-54-g148d7c5 on a different box takes ~1.6s | 13:01 |
|
| (to /dev/null) | 13:02 |
|
| And utf8-c8 to devnull takes ~7.6s | 13:02 |
|
| So I wonder if maybe your perl6 is super ancient that it appears to freeze up on this operation | 13:03 |
| ← xtreak left | 13:09 |
| ← Zoffix left | 13:10 |
|
rindolf
| tyil: with lonestar, the perl6 bench looks better | 13:13 |
|
| only 87 secs | 13:13 |
|
tyil
| it shouldnt differ from any other form of self compiled installation | 13:14 |
|
| tyil shrugs | 13:14 |
|
tyil
| I'm glad it works for you though :p | 13:14 |
|
rindolf
| tyil: i had an old one | 13:14 |
| → Khisanth joined | 13:14 |
| → Zoffix joined | 13:16 |
|
Zoffix
| rindolf: what's your perl6 -v? | 13:16 |
|
mikejw
| Zoffix: "This is Rakudo version 2018.04 built on MoarVM version 2018.04" | 13:17 |
|
Zoffix
| mikejw: hm, no idea then :/ | 13:17 |
|
mikejw
| no worries | 13:17 |
|
Zoffix
| rindolf: because lonestar installs latest Star, which would be 2018.04, so it's surprising it's faster (unless your earlier install was even older than that). | 13:18 |
|
rindolf
| Zoffix: This is Rakudo Star version 2018.04.1 built on MoarVM version 2018.04.1 | 13:18 |
|
| Zoffix: it may have been | 13:18 |
|
Zoffix
| hm, OK. | 13:18 |
|
rindolf
| Zoffix: bye . walk | 13:19 |
| ← rindolf left | 13:19 |
|
Zoffix
| c: 2018.04.1 https://temp.perl6.party/z.txt | 13:20 |
|
committable6
| Zoffix, Successfully fetched the code from the provided URL | 13:20 |
|
| Zoffix, ¦2018.04.1: «1.1276149» | 13:20 |
|
Zoffix
| c: HEAD https://temp.perl6.party/z.txt | 13:20 |
|
committable6
| Zoffix, Successfully fetched the code from the provided URL | 13:20 |
|
| Zoffix, ¦HEAD(ea16138): «0.80886579» | 13:20 |
|
Zoffix
| :) | 13:20 |
|
mikejw
| it seems like I need to use enc:<latin1> on the open function and on slurp other wise I get a "Malformed UTF-8" error | 13:21 |
|
Zoffix
| mikejw: oh yeah, sorry. If you're using a file handle instead of IO::Path, the :enc goes into open modes, not into .slurp | 13:21 |
|
| m: say 1.1276149/0.80886579 | 13:22 |
|
camelia
| rakudo-moar ea161384d: OUTPUT: «1.394069219» | 13:22 |
|
Zoffix
| .tell rindolf looks like when the next Star comes out in about a month, you should see another ~39% speed boost: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-06-29#l607 | 13:22 |
|
yoleaux
| Zoffix: I'll pass your message to rindolf. | 13:22 |
|
mikejw
| ok makes sense. still getting the hanging.. probably something I'm not doing right with promises again | 13:23 |
| ← Zoffix left | 13:25 |
|
mikejw
| ok it's because I was trying to output the file contents through Data::Dump. probably not a great idea :D | 13:36 |
| ← domidumont left | 13:36 |
| ← MilkmanDan left | 13:42 |
|
mikejw
| I guess this aws library isn't built for handling large-ish file because I think it must be doing something simliar. get the same max cpu hang when trying to pass it the file for uplading | 13:44 |
| → scimon joined | 13:44 |
|
mikejw
| *similar *uploading | 13:44 |
| → MilkmanDan joined | 13:46 |
| → Tison joined | 13:52 |
| ← zakharyas left | 13:54 |
|
SmokeMachine
| m: say set() =:= set(); say set(1) =:= set(1) | 13:58 |
|
camelia
| rakudo-moar 5a4c95e7b: OUTPUT: «TrueFalse» | 13:58 |
|
SmokeMachine
| if `set()` always return the same object, wouldnt make sense that `set()` passing immutable values to return the same object too? | 14:00 |
|
raschipi
| SmokeMachine: Yes it does. | 14:00 |
|
| m: say "1" =:= "1" | 14:01 |
|
camelia
| rakudo-moar 5a4c95e7b: OUTPUT: «True» | 14:01 |
|
raschipi
| Same as the above. | 14:01 |
|
jnthn
| It'd be a possible constant folding opt, yes | 14:01 |
| → rindolf joined | 14:01 |
|
raschipi
| m: say 1 =:= 1 | 14:02 |
|
camelia
| rakudo-moar 5a4c95e7b: OUTPUT: «True» | 14:02 |
| ← psychoslave left | 14:04 |
|
SmokeMachine
| how could it be done? making a cache of immutable objects? | 14:04 |
|
raschipi
| It's caller 'interning'. | 14:05 |
|
| called* | 14:05 |
|
jnthn
| SmokeMachine: It's a compiler optimization. We already do it for 1 + 1 for examle. | 14:06 |
| → domidumont joined | 14:06 |
|
jnthn
| We shouldn't do such a thing at runtime, the memory use can get really out of hand :) | 14:06 |
|
raschipi
| m: say 1 + 1 =:= 2 | 14:06 |
|
camelia
| rakudo-moar 5a4c95e7b: OUTPUT: «True» | 14:06 |
|
SmokeMachine
| jnthn: should it be done on https://github.com/rakudo/rakudo/blob/master/src/Perl6/Optimizer.nqp ? | 14:07 |
| ← kaare_ left | 14:07 |
|
jnthn
| SmokeMachine: Yes, though in theory marking `set` with `is PURE` in CORE.setting would opt it in to constant folding | 14:08 |
| → zakharyas joined | 14:09 |
|
SmokeMachine
| jnthn: make it `PURE` wouldnt make it return the same object even with mutable parameters? or `PURE` looks for the `.WHERE`? | 14:13 |
|
| jnthn: sorry, even if it looks for the `.WHERE`... | 14:13 |
|
timotimo
| pure really just signals to the optimizer that it can evaluate it at compile time and replace the call with the result | 14:14 |
|
| all it cares about is that the values you call it with are compile-time-known or not | 14:14 |
|
jnthn
| SmokeMachine: It will only apply if all the arguments to it are fixed at compile time | 14:14 |
|
| ah, timotimo beat me to it :) | 14:14 |
|
SmokeMachine
| :) | 14:15 |
|
lizmat
| fwiw: multi sub set() { BEGIN nqp::create(Set) } | 14:15 |
|
| so the way I see it, set() is already interned by being a WVal ? | 14:16 |
| → Zoffix joined | 14:16 |
|
jnthn
| lizmat: Yes, but we're talking about set(1,2,3) | 14:16 |
|
SmokeMachine
| it should be true to `set()`, `bag()` and `mix()` right? | 14:16 |
|
lizmat
| ah, that! | 14:16 |
|
| will add "is pure" and see if that makes a difference for static sets | 14:17 |
|
Zoffix
| SmokeMachine: are you gonna be working on static optimizing those subs? | 14:17 |
|
lizmat
| m: dd Set.new | 14:17 |
|
camelia
| rakudo-moar 84f60adad: OUTPUT: «().Set» | 14:17 |
|
SmokeMachine
| Id like to try... | 14:17 |
|
lizmat
| m: dd ().Set | 14:17 |
|
camelia
| rakudo-moar 84f60adad: OUTPUT: «set()» | 14:17 |
|
lizmat
| working on fixing that ^^^ | 14:17 |
|
Zoffix
| lizmat: `is pure` has to be on the proto for it to take effect and I guess the candidates that take args aren't pure? | 14:17 |
|
SmokeMachine
| Zoffix: Ill try it at night... | 14:18 |
|
lizmat
| doesn't "is pure" means to always create the same .WHICH for a given set of parameters ? | 14:18 |
|
timotimo
| not necessarily | 14:18 |
|
jnthn
| I thought it really meant "you can constant fold this", e.g. if the arguments are themselves constant or the result of a constant folding | 14:19 |
|
lizmat
| yeah, so in that sense set() bag() and mix() can be marked "is pure" | 14:20 |
|
Zoffix
| SmokeMachine: OK :) I started something, but it's not that good. Here's the diff if there's anything you want to salvage: https://gist.github.com/zoffixznet/f5db2e3a7f197ce556faa630fb5bd680 As jnthn++ said, we can actually try to constant-fold even versions with the args and that's done for other stuff in this branch, so you'll be trying to use some of that code or stick the conditional for sets into that | 14:21 |
|
| branch: https://github.com/rakudo/rakudo/blob/master/src/Perl6/Optimizer.nqp#L1589-L1694 | 14:21 |
|
| Ah | 14:21 |
|
| SmokeMachine: ok, nm, looks like we can just mark those subs as pure :D | 14:21 |
|
raschipi
| Am I the only one that likes the indirect invocation syntax? | 14:22 |
|
Zoffix
| I like it, but it sucks for nesting | 14:22 |
|
| Would be nice to write: say perl Foo.new: <a b c> : | 14:22 |
|
| or say perl Foo.new: <a b c> : : to also call `.say` instead of `&say` | 14:22 |
|
hobbs
| it should mean that the result is only dependent on the parameters and nothing else. It doesn't *have* to memoize or anything like that, but it wouldn't be wrong for it to :) | 14:22 |
|
Zoffix
| Ah right, that's indeed what it means :) | 14:23 |
| → squashable6 joined | 14:23 |
|
Zoffix
| wonder if there's more that can be marked | 14:24 |
|
SmokeMachine
| Zoffix: Yes... the `PURE` will make it easier... | 14:24 |
|
| Zoffix is reminded of R#1566 | 14:25 |
|
synopsebot
| R#1566 [open] : https://github.com/rakudo/rakudo/issues/1566 [regression] multi built-ins are not assignable to Callable | 14:25 |
|
Zoffix
| jnthn: reminder that you wanted to see if a good solution exists for https://github.com/rakudo/rakudo/issues/1566 :) | 14:26 |
|
SmokeMachine
| Zoffix: but if you want to finish it, thats ok... I can try to study something else... (I was thinking of trying making the return type check compile time) | 14:26 |
|
Zoffix
| (something that's less hackish than https://github.com/rakudo/rakudo/issues/1566#issuecomment-370995418 ) | 14:26 |
|
| SmokeMachine: nah, you finish it :) | 14:26 |
| ← zakharyas left | 14:27 |
|
jnthn
| Zoffix: ah, thanks, maybe next week when I'm feeling for brainy :) | 14:29 |
|
Zoffix
| :) | 14:29 |
| ← Zoffix left | 14:31 |
| ← ExtraCrispy left | 14:32 |
|
jnthn
| *more :) | 14:32 |
|
| heh, can't even type | 14:32 |
|
timotimo
| cool, they let you pick up your fixed brain on the weekend? ;) | 14:33 |
| → ExtraCrispy joined | 14:34 |
| ← raschipi left | 14:35 |
| → Zoffix joined | 14:36 |
|
Zoffix
| SmokeMachine: to clarify: ignore my diff. It's wrong. You can just apply `is pure` trait on the set/bag/mix ops | 14:36 |
|
hobbs
| Zoffix: or any other kind of eliminating multiple evaluation, so an optimizer could decide to hoist a pure call out of a loop or do CSE or that kind of fanciness :) | 14:37 |
|
| (to continue previous thought) | 14:37 |
| → zakharyas joined | 14:38 |
|
Altreus
| wha gwannin with bailador? It's not been updated for 2 months :s | 14:38 |
|
Zoffix
| :) | 14:38 |
|
Altreus
| does it work | 14:38 |
|
Zoffix
| Altreus: probably. I guess Cro stole its thunder in some way. | 14:38 |
|
El_Che
| Zoffix: I don't think it's true | 14:38 |
|
| Zoffix: it didn't look too active before Cro appeared | 14:39 |
|
Zoffix
| What happened to the Bailador book BTW? | 14:39 |
| → turdmonkey joined | 14:40 |
| turdmonkey → Bowlslaw | 14:40 |
|
Bowlslaw
| Helllooo | 14:40 |
|
Altreus
| Cro is it | 14:40 |
|
SmokeMachine
| Zoffix: ok, thanks! | 14:40 |
|
| Altreus loosk | 14:40 |
|
hobbs
| shot down by Enrique Iglesias's legal team | 14:40 |
|
Zoffix
| Altreus: it got a website: http://mi.cro.services | 14:41 |
|
Altreus
| lols | 14:41 |
|
| found it already :) | 14:41 |
|
Zoffix
| :) | 14:41 |
|
| Then I have a second question: what happened to people who kicked money for Bailador book? Is that money lost? | 14:42 |
|
| m: { for ^700_000 { my $ = set(1, 2, 3, 4) }; say now - ENTER now } | 14:43 |
|
camelia
| rakudo-moar 84f60adad: OUTPUT: «5.07368704» | 14:43 |
|
Zoffix
| m: BEGIN &set.^mixin: role { method is-pure { True } }; { for ^700_000 { my $ = set(1, 2, 3, 4) }; say now - ENTER now } | 14:43 |
|
camelia
| rakudo-moar 84f60adad: OUTPUT: «0.057662» | 14:43 |
|
Zoffix
| is-pure is OP :P | 14:43 |
| → fake_space_whale joined | 14:49 |
| → natrys joined | 14:51 |
|
Zoffix
| Filed R#1992 | 14:52 |
|
synopsebot
| R#1992 [open] : https://github.com/rakudo/rakudo/issues/1992 [perf] Examine codebase for subs that can be `is pure`d | 14:52 |
|
Zoffix
| m: say .?is-pure for &list, &hash, &slip, &so, &substr | 14:52 |
|
camelia
| rakudo-moar 84f60adad: OUTPUT: «NilNilNilNilNil» | 14:52 |
|
Zoffix
| 'cause all this stuff can be pure, eh? | 14:52 |
|
lizmat
| Zoffix: am testing set/bag/mix atm | 14:52 |
|
timotimo
| i have a cautionary tale for you | 14:53 |
|
| we made x "is pure" at some point, and that caused performance to drastically worsen for very long resulting strings | 14:53 |
|
Zoffix
| lizmat: ok, let SmokeMachine know :) I think they were working on that too | 14:53 |
|
| timotimo: because it flattened the ropes? | 14:54 |
|
timotimo
| because the object it was creating had been serialized before the execution started, so we ende up turning the string that was "this short thing repeated 1000 times" in memory (i.e. implemented with a strand) into actually many kilobytes (or megabytes in this case) of string data | 14:54 |
|
| yes | 14:54 |
|
lizmat
| SmokeMachine: are you still looking at adding "is pure" to set/bag/max ? | 14:54 |
|
timotimo
| so make sure handling the constant object isn't more costly than evaluating it on the spot | 14:54 |
|
SmokeMachine
| I was planning to do that at night... | 14:55 |
|
| lizmat: ^^ | 14:55 |
|
lizmat
| ok, I'm about to commit that change myself | 14:55 |
|
SmokeMachine
| lizmat: ok! | 14:55 |
| ← domidumont left | 14:56 |
|
lizmat
| it makes set(1,2,3) 65x faster if you do it 100000 times | 14:57 |
|
Zoffix
| nice :) | 14:57 |
|
timotimo
| it'll be even more faster if you do it 10000000000 times :P | 14:57 |
| → skids joined | 14:57 |
|
SmokeMachine
| \o/ | 14:57 |
|
timotimo
| hm, or maybe not | 14:57 |
|
Zoffix
| Yeah | 14:57 |
|
lizmat
| yeah, from O1 I guess now | 14:58 |
|
Zoffix
| "Changelog: made set() 1000000000000x faster" :) | 14:58 |
| ← wamba left | 14:58 |
|
lizmat
| .oO( ∞ x faster ) | 14:59 |
|
Zoffix
| :) | 14:59 |
|
Bowlslaw
| regarding the web crawler: do you think it is good design to store the links in an array, and then pass the array to a function that processes them? | 15:00 |
| ← Zoffix left | 15:00 |
| ← erdic left | 15:04 |
| → reu joined | 15:04 |
| → erdic_ joined | 15:04 |
| erdic_ → erdic | 15:04 |
|
rindolf
| i added a new benchmark - https://github.com/shlomif/perl6-benchmarks/commit/87c71ce69953c33bbfe5025c1ef60466fe33f5f4 | 15:07 |
|
yoleaux
| 13:22Z <Zoffix> rindolf: looks like when the next Star comes out in about a month, you should see another ~39% speed boost: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-06-29#l607 | 15:07 |
|
sena_kun
| Bowlslaw, my only tip to writing crawlers is to keep sure you have a fixed-size(or at least sane number of) batch of workers. | 15:08 |
|
Bowlslaw
| yes | 15:08 |
|
sena_kun
| And never try to parse HTML with regexps. :) | 15:09 |
|
El_Che
| rindolf++ | 15:10 |
|
rindolf
| El_Che: thanks | 15:10 |
| ← scimon left | 15:11 |
|
Bowlslaw
| hm, I just discovered XML::Parser... | 15:11 |
|
| looks better than DOM::Tiny for this job | 15:11 |
|
sena_kun
| I used Gumbo, maybe somewhat long ago. | 15:12 |
|
| Not sure if better than XML::Parser though. | 15:13 |
|
jnthn
| fwiw, https://gist.github.com/jnthn/b358ebfb6ea6c366834896b9f62ba92b is my total hack of a crawler, and yes, it does both things sena_kun mentioned wrong :) | 15:15 |
| → jmerelo joined | 15:15 |
|
sena_kun
| : ) | 15:16 |
|
jnthn
| It does, however, do concurrent requsets right, and URL concat right, and is a nice example of using a react block to keep an async operation alive so long as there is work to be done. :) | 15:16 |
|
El_Che
| jnthn: never meet your heroes, they say ;) | 15:16 |
|
Bowlslaw
| Cro ? | 15:16 |
|
El_Che
| Bowlslaw: you pronounce it by saying it repeatedly and dancing like a chicken | 15:17 |
|
| Bowlslaw: https://cro.services/ | 15:17 |
|
jnthn
| Bowlslaw: Docs at https://cro.services/docs/reference/cro-http-client and https://cro.services/docs/reference/cro-uri for the bits of Cro the example uses | 15:18 |
|
Bowlslaw
| lol | 15:18 |
|
| cool, thanks | 15:18 |
|
| i dont' want to copy anyone's crawler though | 15:18 |
|
El_Che
| Something jnthn does when he's not hacking on rakudo or on comma :) | 15:18 |
|
jnthn
| El_Che: I thought that was MoarVM :P | 15:18 |
|
El_Che
| jnthn: let's keep the internals contained | 15:19 |
|
| :) | 15:19 |
|
jnthn
| Bowlslaw: Sure, wasn't giving you it to copy so much as to point out its overall design, which may be interesting :) | 15:19 |
|
Bowlslaw
| I just got banned from r/perl on reddit because a politically motivated mod hates me... | 15:20 |
|
| perhaps here isn't the right place to state that. i'll deal with it | 15:20 |
|
| anyway, thanks jnthn | 15:20 |
|
rindolf
| .tell Zoffix thanks! Note that https://www.reddit.com/r/programming/comments/7vfvct/90_faster_usually_doesnt_mean_what_you_think_it/ | 15:20 |
|
yoleaux
| rindolf: I'll pass your message to Zoffix. | 15:20 |
|
jnthn
| I guess if Cro::HTTP::Client had a "maximum outstanding requests allowed per client" option then my example *would* do throttling with a tiny change. :) | 15:21 |
|
AlexDaniel
| rindolf: this actually bothered me a lot :) | 15:22 |
|
| randomascii++ | 15:22 |
| → domidumont joined | 15:22 |
|
jnthn
| The regex would still be a bit naughty though :) | 15:23 |
|
AlexDaniel
| rindolf: so TL;DR newspeed ÷ oldspeed and “5.5x as fast”, right? | 15:26 |
| → diakopter joined | 15:26 |
|
Bowlslaw
| yess | 15:27 |
|
| jnthn: i've been having trouble with concurrency | 15:28 |
|
| that really helps clarify it | 15:28 |
| → Sgeo__ joined | 15:29 |
| ← mikejw left | 15:29 |
|
rindolf
| AlexDaniel: yes | 15:30 |
| ← Sgeo_ left | 15:31 |
|
diakopter
| has anyone tried compiling MoarVM to wasm? | 15:35 |
| ← zakharyas left | 15:36 |
| → b2gills joined | 15:39 |
| → ChoHag joined | 15:40 |
|
Geth
| ¦ doc: db0f520a2d | (JJ Merelo)++ | doc/Language/objects.pod6 | 15:43 |
|
| ¦ doc: Changes slightly the object invocation example | 15:43 |
|
| ¦ doc: | 15:43 |
|
| ¦ doc: To introduce in a natural way the indirect invocant syntax, closing #2131. | 15:43 |
|
| ¦ doc: | 15:43 |
|
synopsebot
| Link: https://doc.perl6.org/language/objects | 15:43 |
|
Geth
| ¦ doc: As usual, please reopen and/or edit subject if it is not addressed | 15:43 |
|
| ¦ doc: satisfactorily. | 15:43 |
|
| ¦ doc: review: https://github.com/perl6/doc/commit/db0f520a2d | 15:43 |
|
jmerelo
| diakopter: no one, AFAIK, but it would be cool if someone tried... | 15:44 |
| ← domidumont left | 15:44 |
| → Zoffix joined | 15:49 |
|
Zoffix
| rindolf: err.... yes, 90% faster means different than .9x faster, but 3.9x faster means 390% faster | 15:50 |
|
yoleaux
| 15:20Z <rindolf> Zoffix: thanks! Note that https://www.reddit.com/r/programming/comments/7vfvct/90_faster_usually_doesnt_mean_what_you_think_it/ | 15:50 |
|
Zoffix
| AlexDaniel: the *times* in "2 times faster" refers to multiplication operator, also called "times". Thus, it's 200% faster, i.e. the ratio is 2:1, not 3:1 | 15:51 |
|
jkramer
| Zoffix: Isn't "2 times faster" = "the original speed plus 2 times the original speed"? | 15:52 |
|
| For 200% of the original speed I'd say "twice as fast" | 15:52 |
|
moritz
| natural language sucks, let's just all speak Perl 6, ja? | 15:52 |
|
AlexDaniel
| moritz: True | 15:52 |
|
Zoffix
| No, 2 times faster means 2 x original speed | 15:52 |
|
rindolf
| Zoffix: actually 2:1 is 100% faster | 15:52 |
|
Zoffix
| Where are you getting the "plus" there? | 15:52 |
|
| rindolf: right, but it's also 2x faster | 15:53 |
|
rindolf
| Zoffix: yes | 15:53 |
|
AlexDaniel
| fast*er* | 15:53 |
|
jkramer
| The fastER is a plus for me. :) | 15:53 |
|
Zoffix
| rindolf: so then why did you "note that" to me? My commit message read 3.9x faster, didn' tit? | 15:53 |
|
jkramer
| Something is X something'ER than Y than it's Y + X | 15:54 |
|
Zoffix
| https://xkcd.com/309/ | 15:54 |
|
| rindolf: oh, you were talking about the 39%, not the commit message. Never mind | 15:55 |
|
rindolf
| Zoffix: <Zoffix> rindolf: looks like when the next Star comes out in about a month, you should see another ~39% speed boost: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-06-29#l607 | 15:55 |
|
| Zoffix: yes | 15:55 |
|
jmerelo
| What was the bot that said when some new feature was working? I need it for this https://github.com/perl6/doc/issues/2132 | 15:56 |
|
Zoffix
| jmerelo: bisect: | 15:56 |
|
| rindolf: what does 39% speed boost mean? | 15:56 |
|
AlexDaniel
| jmerelo: actually try 6c: … first | 15:57 |
|
Zoffix
| rindolf: to me it means original speed + 39% of original speed; is that what old-time / new-time give? | 15:57 |
|
| m: 1.1276149/0.80886579 | 15:57 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «WARNINGS for <tmp>:Useless use of "/" in expression "1.1276149/0.80886579" in sink context (line 1)» | 15:57 |
|
Zoffix
| m: say 1.1276149/0.80886579 | 15:57 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «1.394069219» | 15:57 |
|
jmerelo
| 6c: use NativeCall; my $number_of_ints = 10; my $ints = CArray[int32].allocate($number_of_ints); | 15:57 |
|
committable6
| jmerelo, https://gist.github.com/31d1e3b6933e9fd9bbd9b09c0a5baa38 | 15:58 |
|
Zoffix
| Like, I'd describe it as 39% faster. | 15:58 |
| ← diakopter left | 15:58 |
|
Zoffix
| m: say 1.1276149/0.080886579 | 15:58 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «13.940692188» | 15:58 |
|
Zoffix
| I'd describe that as 13.9x faster... | 15:58 |
|
| Is that right? | 15:58 |
|
AlexDaniel
| Zoffix: 13.9x as fast | 15:59 |
|
rindolf
| Zoffix: https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/home-bin-executables/bin/improvement-percent | 16:00 |
|
Zoffix
| AlexDaniel: for both? | 16:00 |
|
AlexDaniel
| Zoffix: 1.39x as fast, 13.9x as fast | 16:01 |
| → eaterof joined | 16:01 |
|
Zoffix
| AlexDaniel: how would you write "twice faster" in ${n}x notation? | 16:02 |
| ← reu left | 16:02 |
|
AlexDaniel
| Zoffix: 3x as fast, I think? Depending on what you mean by twice faster | 16:03 |
| → bwisti joined | 16:03 |
| → reu joined | 16:03 |
| → SHODAN joined | 16:03 |
|
Zoffix
| AlexDaniel: "two times faster" | 16:03 |
| → Altreus_ joined | 16:04 |
|
Zoffix
| how do you get 3x—which is pronounced as "three times"—from "two times"? | 16:04 |
|
| rindolf: I don't understand what that is or how to run it | 16:06 |
|
| rindolf: that formula is for the time, while the "faster" is the speed. | 16:06 |
|
hobbs
| Zoffix: 50% faster is 1.5 times as fast. 2 times faster is 3 times as fast. | 16:06 |
|
AlexDaniel
| well, if there's no speedup or slowdown, it's 0 times faster, right? And that's also 1x as fast? | 16:06 |
| → breinbaas joined | 16:07 |
|
rindolf
| Zoffix: yes | 16:07 |
|
Zoffix
| OK, I get it now | 16:07 |
|
AlexDaniel
| Zoffix: but generally, the point I personally want to make is that our changelog and commit messages are confusing. It's not so much about who's right and who's wrong, but that the numbers are somewhat meaningless and inconsistent | 16:08 |
|
jmerelo
| Geth: status | 16:08 |
|
AlexDaniel
| releasable6: status | 16:08 |
|
releasable6
| AlexDaniel, Next release in ≈22 days and ≈2 hours. 1 blocker. 0 out of 41 commits logged | 16:08 |
|
| AlexDaniel, Details: https://gist.github.com/713c521c146db66bdb48c4b1fec2a9a5 | 16:08 |
|
rindolf
| Zoffix: shlomif@telaviv1:~$ improvement-percent from 1.1276149 to 0.8088657939.4069218825536% | 16:08 |
|
Zoffix
| AlexDaniel: make a bot that takes old run time and new run time and gives the right wording for speed | 16:09 |
|
rindolf
| Zoffix: shlomif@telaviv1:~$ improvement-percent from 1.1276149 to 0.80886579 => 39.4069218825536% | 16:09 |
|
AlexDaniel
| Zoffix: alright | 16:09 |
|
| AlexDaniel does that | 16:09 |
|
Zoffix
| \o/ | 16:09 |
| ← skids left | 16:09 |
| ← thowe left | 16:09 |
|
AlexDaniel
| I was about to suggest creating a tool, but got ninja'd | 16:09 |
|
Geth
| ¦ doc: bfd3f57503 | (JJ Merelo)++ | doc/Language/nativecall.pod6 | 16:09 |
|
| ¦ doc: Clarifies when allocate was introduced closes #2132 | 16:09 |
|
| ¦ doc: review: https://github.com/perl6/doc/commit/bfd3f57503 | 16:09 |
| eaterof → eater | 16:09 |
|
synopsebot
| Link: https://doc.perl6.org/language/nativecall | 16:09 |
|
Zoffix
| AlexDaniel: hm, maybe a tool would be better even? Somewhere in rakudo's tools/ ? | 16:10 |
|
| That way one can run it without being on IRC when making a commit | 16:10 |
|
AlexDaniel
| let's start with that, yeah | 16:10 |
|
| can wrap a bot around it later | 16:10 |
| → domidumont joined | 16:11 |
|
Zoffix
| I think it's a language barrier thing :) both "twice faster" and "twice as fast" translate the same in Russian :) | 16:12 |
| ← squashable6 left | 16:12 |
|
Zoffix
| ... and in French. | 16:13 |
| → skids joined | 16:14 |
| → thowe joined | 16:14 |
| → labster joined | 16:14 |
| → AlexDaniel`` joined | 16:14 |
| → undersightable6 joined | 16:14 |
| → Matthew[m] joined | 16:14 |
| → mempko joined | 16:14 |
| kornbluth.freenode.net set mode: +v | 16:14 |
|
Zoffix
| Makes me think I'm being trolled :P | 16:14 |
|
lizmat
| Zoffix: as in Dutch, fwiw | 16:14 |
|
jmerelo
| Zoffix: dvi davai | 16:14 |
|
moritz
| both exist in German | 16:15 |
|
lizmat
| moritz: but with the same meaning, or different meaning? | 16:15 |
|
moritz
| "doppelt so schnell" == twice as fast, "zweimal schneller" == "two times faster" | 16:17 |
|
hobbs
| Zoffix: for what it's worth, I generally try to use "<decimal> times as fast", without using percent, and without using "x times faster", to be as clear as possible. | 16:17 |
|
moritz
| with the same possible interpretations and ambiguities as in English | 16:17 |
| ← benchable6 left | 16:17 |
|
hobbs
| but for a small change I'll still probably say a 10% speedup or whatever | 16:17 |
|
| to mean 1.1x as fast | 16:17 |
| ← lance_w[m] left | 16:17 |
| ← Matthew[m] left | 16:17 |
| ← AlexDaniel`` left | 16:17 |
| ← sno left | 16:18 |
| ← mienaikage left | 16:18 |
| ← ilmari[m] left | 16:18 |
|
AlexDaniel
| what's up with freenode again… | 16:18 |
| ← jmerelo left | 16:18 |
|
hobbs
| le network is le split | 16:18 |
| → sftp joined | 16:19 |
|
Zoffix
| hobbs: and do you compute the number as `old-time / new-time` ? | 16:19 |
|
AlexDaniel
| alright, don't worry everyone, I have the tool coming… :) | 16:21 |
|
SmokeMachine
| m: say set(1) =:= set(1) | 16:21 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «False» | 16:21 |
|
Zoffix
| :) | 16:21 |
|
hobbs
| Zoffix: yes, that works | 16:21 |
|
Zoffix
| SmokeMachine: that now constant-folds, but the object would still be different (unless it's set(), without args). Basically it now calls that routine at compile time instead of runtime | 16:22 |
|
| And it's the same object for set() because there's a special candidate for it that makes one object at begin time | 16:22 |
|
timotimo
| don't we still clone the object on the way out? | 16:22 |
|
Zoffix
| m: dd set() =:= set() | 16:23 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «Bool::True» | 16:23 |
|
Zoffix
| nope | 16:23 |
|
timotimo
| oh, also, every call to set() will be compile-time-evaluated separately, there is no cache or something | 16:23 |
| ← kalkin--- left | 16:23 |
|
timotimo
| so set(1) =:= set(1) won't be true | 16:23 |
|
Zoffix
| right | 16:23 |
|
| m: multi foo { BEGIN rand }; multi foo(|) { rand }; [foo(), foo(), foo(), foo(42), foo(42), foo(42)] | 16:24 |
|
camelia
| rakudo-moar c37c3b596: ( no output ) | 16:24 |
|
Zoffix
| m: multi foo { BEGIN rand }; multi foo(|) { rand }; say [foo(), foo(), foo(), foo(42), foo(42), foo(42)] | 16:24 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «[0.4724516930069058 0.4724516930069058 0.4724516930069058 0.4151627299452856 0.9904360721265346 0.4774319163671893]» | 16:24 |
|
buggable
| New CPAN upload: Amazon-DynamoDB-0.1.tar.gz by HANENKAMP http://modules.perl6.org/dist/Amazon::DynamoDB:cpan:HANENKAMP | 16:24 |
|
SmokeMachine
| yes, but its only called once and the original calls are changed to the response of that single call (isnt it what constant fold means?) so, it shoud "return" the same object every time, shouldnt? | 16:24 |
|
Zoffix
| m: multi foo { BEGIN rand }; multi foo(|) { rand }; say [(BEGIN foo), (BEGIN foo), (BEGIN foo), (BEGIN foo 42), (BEGIN foo 42), (BEGIN foo 42)] | 16:25 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «[0.6006040438087445 0.6006040438087445 0.6006040438087445 0.21298813403474615 0.8253930471542793 0.7956978070765766]» | 16:25 |
|
hobbs
| speed is 1/time, so if the time multiplier is new-time/old-time, the speed multiplier is new-time/old-time :) | 16:26 |
|
| argh | 16:26 |
|
| speed is 1/time, so if the time multiplier is new-time/old-time, the speed multiplier is old-time/new-time :) | 16:26 |
|
Zoffix
| SmokeMachine: ^ this is what's it like now. The `is pure` thing just added those `BEGIN`s in `(BEGIN foo)`. But if you look at the candidates, only the argless one has *another* BEGIN, which makes that candidate always return the same thing, while the other candidates return a new one | 16:26 |
|
hobbs
| ignore the screwup | 16:26 |
|
SmokeMachine
| m: sub foo is pure {rand}; say foo, foo, foo | 16:26 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «0.55048195659059060.37231769571267890.8481266995271738» | 16:26 |
|
AlexDaniel
| hobbs: right | 16:27 |
|
SmokeMachine
| m: sub foo is pure {say "here"; 42}; say foo, foo, foo | 16:27 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «hereherehere424242» | 16:27 |
|
Zoffix
| m: sub foo is pure {say "here"; 42}; for ^3 { say foo } | 16:28 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «here424242» | 16:28 |
|
Zoffix
| m: sub foo {say "here"; 42}; for ^3 { say foo } | 16:28 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «here42here42here42» | 16:28 |
|
Zoffix
| SmokeMachine: ^ that's what `is pure` did. It called it once at compile time and the returned value was then used 3 times at runtime. Without pure, at runtime you're genning the value each time | 16:28 |
|
Bowlslaw
| ok, Cro is really cool | 16:29 |
|
Zoffix
| m: sub foo is pure {BEGIN say "here"; 42}; say foo, foo, foo | 16:29 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «here424242» | 16:29 |
|
Zoffix
| SmokeMachine: ^ and this is what that `BEGIN` in argless `set()` candidate does. So it results in there being just one object for all argless `set()` calls | 16:30 |
| ← bwisti left | 16:30 |
|
SmokeMachine
| m: sub foo is pure {say "here"; 42}; my $last; for ^3 { my $a = foo; say $a =:= $last; $last = $a } | 16:30 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «hereFalseFalseFalse» | 16:30 |
| ← rouking left | 16:30 |
| ← fake_space_whale left | 16:30 |
|
Zoffix
| That's not a good test, because 42 is interned and also `=:=` cares about container, but you're storing it in a different container in your code | 16:31 |
|
SmokeMachine
| m: sub foo is pure {say "here"; 42}; my $last; for ^3 { my $a = foo; say $a<> =:= $last<>; $last = $a } | 16:32 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «hereFalseTrueTrue» | 16:32 |
|
SmokeMachine
| Zoffix: I didnt get it... | 16:32 |
|
| m: sub foo is pure {say "here"; class :: {}.new}; my $last; for ^3 { my $a = foo; say $a<> =:= $last<>; $last = $a } | 16:32 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «hereFalseTrueTrue» | 16:32 |
|
SmokeMachine
| Zoffix: if it runs only once, it will always "return" the same object... (in my head) | 16:34 |
|
Zoffix
| SmokeMachine: that's why you get `True True` there | 16:34 |
|
| SmokeMachine: and in there, it *is* the same object. | 16:34 |
|
SmokeMachine
| m: sub foo(|) is pure {say "here"; class :: {}.new}; my $last; for ^3 { my $a = foo 1; say $a<> =:= $last<>; $last = $a } | 16:35 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «hereFalseTrueTrue» | 16:35 |
|
SmokeMachine
| Zoffix: yes, but why isnt `set(1)` doing the same? | 16:35 |
|
Zoffix
| SmokeMachine: yes | 16:35 |
|
SmokeMachine
| m: set(1) =:= set(1) | 16:36 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «WARNINGS for <tmp>:Useless use of "=:=" in expression "set(1) =:= set(1)" in sink context (line 1)» | 16:36 |
|
Zoffix
| m: my $last; for ^3 { my $a = set 1; say $a<> =:= $last<>; $last = $a } | 16:36 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «FalseTrueTrue» | 16:36 |
|
SmokeMachine
| m: say set(1) =:= set(1) | 16:36 |
|
camelia
| rakudo-moar c37c3b596: OUTPUT: «False» | 16:36 |
|
Zoffix
| SmokeMachine: but in `say set(1) =:= set(1)` that's no longer a single call | 16:36 |
|
| SmokeMachine: there are two calls at compile time | 16:36 |
|
SmokeMachine
| Zoffix: hum! now I got it!!! | 16:36 |
|
Zoffix
| :) | 16:36 |
|
SmokeMachine
| Zoffix: sorry, I think I did missread you earlier | 16:37 |
| → aindilis joined | 16:37 |
|
Zoffix
| SmokeMachine: each time it appears in the sauce, at compile time it gets executed and replaced by the result, so `for ^100 { say foo; say foo }` will call it twice at compile time, replace the calls with results, and at run time with print each one 100 times | 16:37 |
|
SmokeMachine
| woundnt be possible/better to make only once to every call with the same parameters? | 16:38 |
|
Zoffix
| And without `is pure` that would've been "at compile time call nothing, and then at run time **call** and then print each one 100 times" | 16:38 |
|
| SmokeMachine: you'd gain speed, but you'd spend a lot of RAM storing all those results from every call | 16:38 |
|
SmokeMachine
| but only at compile time, right? | 16:39 |
|
timotimo
| given that we rely on constant folding to do negative numbers, we'd be keeping every negative number around, for example | 16:39 |
|
Zoffix
| SmokeMachine: no, at runtime too | 16:39 |
|
SmokeMachine
| Zoffix: the constant fold isnt changing the ast? | 16:40 |
|
| sorry, at ast there are no functions yet... right? | 16:40 |
|
| Zoffix ran out of brain | 16:41 |
|
timotimo
| yeah, i'd expect the cache to be discarded when compilation is over | 16:42 |
|
Zoffix
| Ah, ok :) | 16:42 |
|
timotimo
| well, at the end of optimization already | 16:42 |
|
SmokeMachine
| I was thinking that once the `is pure` is found it would create a constant with the result of that call and change every call with that parameter to use that constant instead | 16:42 |
|
timotimo
| no, that's not how it's implemented | 16:47 |
|
Zoffix
| SmokeMachine: how do you figure out if a call has the same parameter as another call had? | 16:48 |
|
SmokeMachine
| I mean only if its known at compile time | 16:48 |
|
timotimo
| then you still have the troublesome task of deciding what objects count as "the same" | 16:49 |
|
Zoffix
| SmokeMachine: yeah, but how do you figure out that in `set(1, Foo); set(1, Foo)` both are using the same parameters? I imagine the cost of figuring that out, together with storing the results during optimization stage, might overall end up without a good boost | 16:50 |
|
| And that it's cheaper to just assume they're different. | 16:50 |
|
SmokeMachine
| Zoffix: that makes sense... | 16:50 |
|
| but would be faesable it Foo were Immutable too... (but I got it, thanks!) | 16:51 |
|
Zoffix
| SmokeMachine: it is, 'cause it's just a type object, but you're gonna be calling .WHICH or eqaddr or something, which is what Set.new probably does under the hood, so your optimization to figure out if you can save calling Set.new would run in about the same time as actually calling Set.new and you'd still have to call Set.new most of the time, is what I mean it might look like at the end | 16:55 |
|
| Not that I'm an optimizatinon expert or anything. | 16:55 |
|
SmokeMachine
| Zoffix: that makes sense... thanks! | 16:56 |
|
Zoffix
| Though on the topic of more expensive static optimizations: we could have an extra level optimizations for [installed] modules or something. This way, the scripts don't take ages to compile, but when you can spend some time to squeeze every last bit out of it, you'd set a higher optimization level and optimize a module to the max when installing it. | 16:57 |
|
| We already have the level controls | 16:57 |
|
| Like here: https://github.com/rakudo/rakudo/blob/master/src/Perl6/Optimizer.nqp#L1695-L1698 | 16:57 |
|
| Those ops won't get optimized if you drop the level lower | 16:57 |
|
hobbs
| set the controls for the heart of the sun | 16:57 |
| → dogbert17 joined | 16:58 |
|
lizmat
| I could imagine an extra level that would look of the .WHICHes of pure objects that got WValled | 16:58 |
|
| keep those .WHICHes in a hash, and use the one from the hash if there's a match | 17:00 |
| → mirlur[m] joined | 17:00 |
| → p6noob joined | 17:02 |
|
Zoffix
| \o/ | 17:02 |
|
p6noob
| Hi :-) | 17:03 |
|
Zoffix
| \o | 17:04 |
|
p6noob
| use NativeCall; class B is repr('CStruct') { has uint32 $.b is required } ; B.new(:1b) give error "CStruct representation attribute not yet fully implemented..." but the same thing without "is repr('CStruct')" works just fine. | 17:05 |
|
| expected behavior maybe? | 17:05 |
|
| sorry that "use NativeCall" is irrelevant to the example. | 17:06 |
|
Zoffix
| p6noob: I think it's complaining about `is required` flag | 17:07 |
|
p6noob
| yes, it is for sure.. but all that changed was adding repr('CStruct') | 17:07 |
|
| isn't it okay to still require a field be initialized by the .new caller for a CStruct? | 17:08 |
|
| (using the implicit .new) | 17:08 |
| → hankache joined | 17:08 |
| → committable6 joined | 17:09 |
| ChanServ set mode: +v | 17:09 |
| → bisectable6 joined | 17:09 |
| → releasable6 joined | 17:09 |
| → squashable6 joined | 17:09 |
|
Zoffix
| p6noob: no idea how the `repr()` stuff does things, but I filed a bug report: R#1993 | 17:10 |
|
synopsebot
| R#1993 [open] : https://github.com/rakudo/rakudo/issues/1993 Bogus(?) Error when `is required` an attribute of CStruct repr | 17:10 |
|
p6noob
| Thank you Zoffix, I wasn't sure where to file the bug | 17:10 |
|
Zoffix
| p6noob: https://github.com/rakudo/rakudo/issues is a good place | 17:11 |
|
| There are some more places listed on https://rakudo.org/bugs but if you're unsure where to go, just file in https://github.com/rakudo/rakudo/issues | 17:12 |
|
Geth
| ¦ rakudo.org: 200adf0015 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/bugs.html.ep | 17:14 |
|
| ¦ rakudo.org: [REAPP] Add our User Experience Repo to list of bug trackers | 17:14 |
|
| ¦ rakudo.org: review: https://github.com/perl6/rakudo.org/commit/200adf0015 | 17:14 |
| → benchable6 joined | 17:14 |
| → greppable6 joined | 17:14 |
| → eliasr joined | 17:15 |
| ← Zoffix left | 17:17 |
|
Bowlslaw
| failedis `zed upgrade` safe to run? | 17:19 |
| → zaale joined | 17:20 |
|
Bowlslaw
| i mean, "zef upgrade" | 17:20 |
|
AlexDaniel
| rindolf, Zoffix, jkramer, moritz, lizmat: can you try https://github.com/rakudo/rakudo/commit/e23e2f6808d7967562a8d05441b4fbd3e8779ee0 ? | 17:28 |
|
| and let me know what you think | 17:28 |
| ← zaale left | 17:33 |
| → michael_s joined | 17:39 |
|
Tison
| in nqp, how can I test if a file exist? | 17:41 |
|
| emmm, it seems like `try` | 17:42 |
| ← lizmat left | 17:43 |
|
AlexDaniel
| e: use nqp; say nqp::stat('Sakefile', nqp::const::STAT_EXISTS) | 17:45 |
|
evalable6
| AlexDaniel, rakudo-moar 0721bfa75: OUTPUT: «1» | 17:45 |
|
AlexDaniel
| e: use nqp; say nqp::stat(onetuhoneuhoanduasoiseoa', nqp::const::STAT_EXISTS) | 17:45 |
|
evalable6
| AlexDaniel, rakudo-moar 0721bfa75: OUTPUT: «(exit code 1) === SORRY!=== Error while compiling /tmp/eZuZcvtqxhUnable …» | 17:45 |
|
| AlexDaniel, Full output: https://gist.github.com/985534a181b8dc37d026b7d5a0456639 | 17:45 |
|
AlexDaniel
| e: use nqp; say nqp::stat('onetuhoneuhoanduasoiseoa', nqp::const::STAT_EXISTS) | 17:45 |
|
evalable6
| AlexDaniel, rakudo-moar 0721bfa75: OUTPUT: «0» | 17:45 |
|
AlexDaniel
| Tison: maybe this? I don't know really | 17:45 |
|
Tison
| I'm reminded that there is a test file 019-file-ops.t | 17:46 |
|
| let me take a look at that | 17:46 |
|
AlexDaniel
| Tison: https://github.com/rakudo/rakudo/blob/e9351cbaa961c4d1e4ef8b4cb52418d55766a8d6/src/core/Rakudo/Internals.pm6#L1244 | 17:46 |
|
Tison
| ok( nqp::stat('CREDITS', nqp::const::STAT_EXISTS) == 1, 'nqp::stat exists'); | 17:46 |
| → AlexDaniel` joined | 17:52 |
| → Matthew[m] joined | 17:52 |
| → unclechu joined | 17:52 |
| → AlexDaniel`` joined | 17:52 |
| → wictory[m] joined | 17:52 |
| → lance_w[m] joined | 17:52 |
| → ilmari[m] joined | 17:52 |
| → EuAndreh[m] joined | 17:52 |
| → CIAvash[m] joined | 17:52 |
| → Garland_g[m] joined | 17:52 |
| → mienaikage joined | 17:52 |
| → sno joined | 17:54 |
| → rouking joined | 18:04 |
| ← hankache left | 18:10 |
| → yoleaux joined | 18:11 |
| ChanServ set mode: +v | 18:11 |
| ← ChoHag left | 18:18 |
| → zachk joined | 18:19 |
| ← zachk left | 18:19 |
| → zachk joined | 18:19 |
| ← sauvin left | 18:26 |
| → ChoHag joined | 18:26 |
| → empT joined | 18:29 |
| ← empT left | 18:29 |
| → Olorig joined | 18:33 |
|
Olorig
| Hello Perl 6 people. Where can I find documentation about the next version of the language? Perl 6.d I suppose? | 18:34 |
|
El_Che
| Olorig: https://github.com/perl6/6.d-prep/blob/master/TODO/FEATURES.md | 18:42 |
|
| Olorig: read the remarks in https://github.com/perl6/6.d-prep | 18:43 |
|
| (the readme) | 18:43 |
| ← domidumont left | 18:45 |
| → wamba joined | 18:47 |
| → murilo joined | 18:47 |
| ← darutoko left | 18:48 |
| ← murilo left | 18:50 |
|
Olorig
| Thanks! Looks quite cosmetic | 18:50 |
| ← ChoHag left | 18:51 |
| ← wamba left | 18:51 |
| → wamba joined | 18:52 |
| → samebchase joined | 18:53 |
| ← diegok left | 18:59 |
| ← Olorig left | 19:07 |
| → Zoffix joined | 19:08 |
|
Zoffix
| missed by that much :P | 19:08 |
|
| But wanted to say, those are just the TODOs. There's a huge number of features in 6.d, but a lot of them are available now, without the use of `use v6.d.PREVIEW`, because they don't conflict with the 6.c spec and don't have any adverse effects that would make us want to push them to 6.d | 19:09 |
|
| So when 6.d is released, stuff like Str.uniparse will become officially part of the language., | 19:10 |
|
Bowlslaw
| cool! | 19:12 |
|
| I wonder what kinda stuff you guys have... | 19:12 |
|
| Perl 6 seems absolutely huge already. | 19:12 |
|
Zoffix
| It's all on the map :) https://map.perl6.party/ | 19:13 |
|
| man, there's a bunch of stuff that says "will issue deprecation warnings in 6.d" but we won't actually be able to do it :| | 19:14 |
|
| *in the docs it says | 19:14 |
|
jdv79
| p6 has virtually no complexity limit;) | 19:15 |
|
Zoffix
| meh, people keep saying how Perl 6 is huge... Yesterday, I was watching lizmat's talk and a bunch of Perl 5's routines she mentioned I never even heard of. | 19:15 |
|
jdv79
| keeps it interesting | 19:15 |
|
| those are just historical oddities | 19:16 |
|
Zoffix
| and in p6 they're just alternative syntaxes ;) | 19:16 |
|
jdv79
| ha | 19:16 |
|
Zoffix
| AlexDaniel: looks good. Now I just need to remember to use it :) | 19:17 |
|
Bowlslaw
| Perl 5 is also huge | 19:19 |
| ← molaf left | 19:19 |
| → ChoHag joined | 19:19 |
|
Zoffix
| Not according to Perl 5 people who keep trashing my p6 articles :P | 19:20 |
|
Bowlslaw
| wut?? | 19:20 |
|
| btw, it's really cool that "my $client = Cro::HTTP::Client.new;" returns a promise | 19:20 |
|
Zoffix
| Bowlslaw: "quite a few times now I thought it was time to start learning Perl 6 […] And every time some blog post like this one comes around and I think: no. There's so much utterly unreadable syntax in here." | 19:21 |
|
| :) | 19:21 |
|
Bowlslaw
| lolwut | 19:21 |
|
| it's unreadable for me | 19:21 |
|
| then, i learn how to read it, and then it's readable | 19:22 |
|
| mind = blown | 19:22 |
|
sena_kun
| s/unreadable/I am too lazy to learn/ | 19:22 |
|
Bowlslaw
| hm, I like Cro, and I'm probably going to start using it more, but I am worried that I don't understand react { whenever { } } yet | 19:23 |
|
Zoffix
| I don't understand it either, but that never stopped me :D | 19:25 |
|
Bowlslaw
| LOL | 19:25 |
|
| I'm putting something on pastebin so I can ask for some clarification | 19:25 |
| → |oLa| joined | 19:26 |
|
Bowlslaw
| https://pastebin.com/G0jrt99j | 19:27 |
|
| i don't understand the difference between reactwhenever and race | 19:27 |
|
| if I want to use HTTP::UserAgent in a reach/whenever block, I can't just pass the result, because it's not a Promise | 19:27 |
|
| whereas Cro::HTTP:Client IS a Promise | 19:27 |
|
Zoffix
| `react` is an event loop basically, it sits and waits for the stuff in side of it to all be done. And the stuff is specified with `whenever`s and they can accept a bunch of things like Supplies and Promises. The .race thing is just an under-the-hood parallelizer. | 19:29 |
|
| m: react { whenever Supply.interval: ½ { say 10-$++; $++ ≥ 10 and done } }; say "Take off" | 19:31 |
|
camelia
| rakudo-moar 0721bfa75: OUTPUT: «109876543210Take off» | 19:31 |
|
Zoffix
| it's like an "event loop" | 19:32 |
|
| "whenever $event-happens { do things }" | 19:32 |
|
Bowlslaw
| $event-happens must be a Promise? | 19:34 |
|
Zoffix
| Bowlslaw: above it's a Supply | 19:34 |
|
| m: react { whenever 42 {} } | 19:35 |
|
camelia
| rakudo-moar 0721bfa75: ( no output ) | 19:35 |
|
Zoffix
| hm | 19:35 |
|
| m: react { whenever class {} {} } | 19:35 |
|
camelia
| rakudo-moar 0721bfa75: ( no output ) | 19:35 |
|
Zoffix
| I was expecting it to complain and tell me what sort of things it likes | 19:35 |
|
Bowlslaw
| so, can I do something like... | 19:35 |
|
Zoffix
| But it *can* be a Promise | 19:35 |
| → diegok joined | 19:36 |
|
Bowlslaw
| react { whenever $ua..get($url) -> $response { get-link() } } | 19:36 |
|
Zoffix
| yeah | 19:36 |
|
Bowlslaw
| is that concurrent? | 19:36 |
|
| it is an HTTP::UerAgent object i believe | 19:37 |
|
Zoffix
| No, just asynchronous | 19:37 |
|
| You could do `react { whenever $ua..get($url) -> $response { start get-link() } }` | 19:38 |
|
| like shove the get-link stuff into a promise | 19:38 |
|
Bowlslaw
| ooh | 19:38 |
|
| that would spawn a new thread for each new link? | 19:38 |
|
Zoffix
| That would stick into the work queu | 19:38 |
|
| e | 19:38 |
|
Bowlslaw
| hmm | 19:41 |
|
| so I could make an on-demand Supply.. | 19:41 |
|
| which fetches links... | 19:41 |
|
| and whenever it fetches a link | 19:41 |
|
| it processes it? | 19:41 |
|
Zoffix
| ¯\_(ツ)_/¯ | 19:42 |
|
Bowlslaw
| lol | 19:42 |
|
Zoffix
| I think I made something for you for that a couple days ago? | 19:42 |
|
| With Supply.throttle | 19:42 |
|
Bowlslaw
| i think so... | 19:43 |
|
Zoffix
| $ RAKUDO_SCHEDULER_DEBUG=1 perl6 -e 'await ^100 .map: { start sleep 0 }' 2>&1 | grep 'Added a general worker thread' | wc -l | 19:44 |
|
| 0 | 19:44 |
|
| $ RAKUDO_SCHEDULER_DEBUG=1 perl6 -e 'await ^100 .map: { start sleep .05 }' 2>&1 | grep 'Added a general worker thread' | wc -l | 19:44 |
|
| 9 | 19:44 |
|
| $ RAKUDO_SCHEDULER_DEBUG=1 perl6 -e 'await ^100 .map: { start sleep ½ }' 2>&1 | grep 'Added a general worker thread' | wc -l | 19:44 |
|
| 57 | 19:44 |
|
| Bowlslaw: ^ that's the answer to "would that spawn a new thread" | 19:44 |
|
| The numbers are spawned threads | 19:44 |
|
Bowlslaw
| i've been using $*THREAD | 19:45 |
|
Zoffix
| And that's the general queue, there's also affinity queue that's used in stuff like Proc::Async | 19:45 |
|
| Where it tries to keep number of workers smaller or something | 19:45 |
|
| oh and timer queue | 19:46 |
|
masak
| why is the name "affinity queue"? because the tasks have an affinity to something? | 19:46 |
|
Zoffix
| "General worker threads all pull from the main queue. If they have no work, they may steal from timer threads. Timer worker threads are intended to handle time-based events. They pull events from the time-sensitive queue, and they will not do any work stealing so as to be ready and available for timer events. Affinity worker threads each have their own queue. These are useful where events will be processed | 19:48 |
|
| using a Supply, which is serial, and so there's no point at all in contending over the data. Work will not be stolen from anaffinity worker thread." | 19:48 |
|
| No idea. Ask jnthn :) | 19:48 |
|
| affinity to their queue? :) | 19:49 |
|
masak
| yeah, reads like | 19:49 |
|
| my first association was "affine logic", which is not 100% unrelated, since it's also about resource usage | 19:49 |
|
| but "the tasks have an affinity to this queue" sounds like the real reason for the name | 19:50 |
|
SmokeMachine
| is there any way to use grammar to parse stream/supply of strings? | 19:50 |
|
masak
| SmokeMachine: I think at some point there was supposed to be a Cat type, which is also Stringy like Str, but more lazy/unbounded | 19:51 |
|
| m: say Cat | 19:51 |
|
camelia
| rakudo-moar 0721bfa75: OUTPUT: «=== SORRY!=== Error while compiling <tmp>Undeclared name: Cat used at line 1. Did you mean 'Rat'?» | 19:51 |
|
masak
| haha | 19:51 |
|
Zoffix
| :) | 19:51 |
|
masak
| no, I did not mean Rat, camelia | 19:51 |
|
Zoffix
| Nah, Cat is not yet implemented | 19:51 |
|
| masak .oO( we just Ca't do that yet ) | 19:51 |
|
Zoffix
| It'll need some regex diving | 19:51 |
|
SmokeMachine
| masak: thanks | 19:51 |
|
Zoffix
| And mad hax0r skills. | 19:51 |
|
SmokeMachine
| is there any documentation showing how should it look like? | 19:52 |
|
masak
| almost certainly not | 19:52 |
|
Zoffix
| SmokeMachine: I think there's brief mention of Cat in the speculations ( design.perl6.org ) | 19:52 |
|
| SmokeMachine: basically a Cat to Str is what a Seq is to a List | 19:53 |
|
| So it could be infinite, really | 19:53 |
|
masak
| it's mentioned a total of 20 times in the spec | 19:53 |
|
SmokeMachine
| got it! | 19:53 |
|
Zoffix
| SmokeMachine: here's my failed attempt at implementing it: https://github.com/zoffixznet/perl6-Kitten#synopsis | 19:54 |
|
Bowlslaw
| Zoffix: I think I have something here, but I want to verify that it does that I think it does | 19:54 |
|
masak
| which means it's entirely untested in practice | 19:54 |
|
| oh, Zoffix++ has attempted it, cool :) | 19:54 |
|
SmokeMachine
| and `Grammar.parse` should work on it | 19:54 |
|
Zoffix
| Yeah, it's needed for some IO::Handle stuff | 19:54 |
|
Bowlslaw
| Zoffix: What do you think of this? https://pastebin.com/auJt8Dyx | 19:54 |
|
SmokeMachine
| how should it work with regexes? | 19:55 |
|
Bowlslaw
| jnthn helped me earlier with Cro, but I want to use HTTP::UserAgent and DOM::Tiny instead, for now anyway | 19:55 |
|
Zoffix
| SmokeMachine: yeah, I think so. I know regexes are meant to work on them, so I think there'd be defined semantics on what would happen if you do `/^ ... $/` on a Cat. Would it die, like .elems dies on lazy lists? | 19:55 |
|
Bowlslaw
| so I tried to transfer the idea of his code to mine | 19:55 |
|
Zoffix
| Bowlslaw: you're probably better use Cro's user agent. It's possible HTTP::UserAgent is not thread safe (or rather the IO::Socket::SSL it uses or something) | 19:56 |
|
Bowlslaw
| hmmm | 19:56 |
|
SmokeMachine
| Zoffix: why Kitten failed? | 19:57 |
|
Zoffix
| SmokeMachine: because you need to teach regexes/grammars to handle Cat type and my character is too low-level to hack on that yet :) | 19:58 |
|
Bowlslaw
| alright, thanks for the help | 19:58 |
|
| I suppose Cro is the useragent stuff of Perl 6 now | 19:58 |
|
Zoffix
| Bowlslaw: FWIW, your current setup is fine, but it's not gonna be fine if you move that inner sub out of react | 19:59 |
|
| m: use v6.d.PREVIEW; react { foo }; sub foo { whenever 42 {} } | 19:59 |
|
camelia
| rakudo-moar 0721bfa75: OUTPUT: «=== SORRY!=== Error while compiling <tmp>Cannot have a 'whenever' block outside the scope of a 'supply' or 'react' blockat <tmp>:1------> EVIEW; react { foo }; sub foo { whenever ⏏ 42 {} } » | 19:59 |
|
masak
| I sometimes dream also of being able to do grammars on byte streams | 19:59 |
|
| to do complex deserialization, essentially | 19:59 |
|
Bowlslaw
| Zoffix: thanks | 19:59 |
|
Zoffix
| It's forbidden in 6.d, because in 6.c it was allowed by accident, but it robs us of a lot of optimization opportunities | 19:59 |
| ← Bowlslaw left | 19:59 |
|
| Zoffix & | 20:00 |
| ← Zoffix left | 20:00 |
| ← |oLa| left | 20:09 |
| → kybr joined | 20:10 |
| → |oLa| joined | 20:22 |
| → espadrine joined | 20:23 |
| → bartolin joined | 20:24 |
|
tbrowder_
| m: my $s=“#comment”; my $idx=rindex $s, ‘#’; say $idx | 20:25 |
|
camelia
| rakudo-moar 0721bfa75: OUTPUT: «0» | 20:25 |
| ← |oLa| left | 20:27 |
|
tbrowder_
| hm, i’m getting a failure on that ^^^ on rakudo 2018.06-25-ge9351cb built on moar 2018.06 | 20:34 |
|
| testing master branch... | 20:35 |
| ← Tison left | 20:37 |
|
AlexDaniel
| 6c: my $s=“#comment”; my $idx=rindex $s, ‘#’; say $idx | 20:37 |
|
committable6
| AlexDaniel, ¦6c (31 commits): «0» | 20:37 |
|
AlexDaniel
| tbrowder_: ↑ looks correct? | 20:37 |
|
tbrowder_
| yes | 20:40 |
|
SmokeMachine
| 6c: my $s=“#comment#”; say rindex $s, ‘#’; say index $s, ‘#’ | 20:41 |
|
tbrowder_
| i got my 2018.06 not as a download but as a tag from upstream | 20:41 |
|
committable6
| SmokeMachine, ¦6c (31 commits): «80» | 20:41 |
| → kaare_ joined | 20:54 |
| ← wamba left | 20:55 |
| → wamba joined | 20:58 |
| ← mcmillhj left | 21:02 |
|
tbrowder_
| where are rakudo public keys located? | 21:04 |
|
| that info needs to be on rakudo website somewhere, maybe on the download page? | 21:05 |
| → mcmillhj joined | 21:08 |
|
tbrowder_
| AlexDaniel: am i missing info on rakudo website for public keys used to sign releases? otherwise, i'll file an issue. | 21:13 |
| → turdmonkey joined | 21:14 |
| turdmonkey → Bowlslaw | 21:14 |
|
Bowlslaw
| Hello again | 21:14 |
|
AlexDaniel
| tbrowder_: https://github.com/perl6/nqp/issues/426 | 21:14 |
| ← mcmillhj left | 21:18 |
| ← skids left | 21:19 |
|
tbrowder_
| i could make entries on the rakudo website, or a pr if i could find the source of it. | 21:19 |
|
AlexDaniel
| tbrowder_: honestly I don't know where most people would expect to find a public key | 21:23 |
|
| if they download the tarball from the website, then IMO a public key located on that same website is of no use | 21:23 |
|
| but 🤷 | 21:23 |
| ← pmurias left | 21:24 |
| → pmurias joined | 21:25 |
|
AlexDaniel
| u: ∞ꝏꚙ | 21:26 |
|
unicodable6
| AlexDaniel, U+221E INFINITY [Sm] (∞) | 21:26 |
|
| AlexDaniel, U+A74F LATIN SMALL LETTER OO [Ll] (ꝏ) | 21:26 |
|
| AlexDaniel, U+A699 CYRILLIC SMALL LETTER DOUBLE O [Ll] (ꚙ) | 21:26 |
|
tbrowder_
| not so, i think somehow magically when you sign you use your private key, so the public key from a key server (not on the website) then is used to check that you signed it | 21:26 |
| → Xliff joined | 21:28 |
|
Xliff
| \o | 21:30 |
|
| Can you set a constant on an object? | 21:30 |
|
| Or is that something you can do in the Unit? | 21:30 |
|
tbrowder_
| oh, and your key should be signed by someone else, etc., to establish a chain of trust. debian or the perl foundation may have some better info on established key trust chains | 21:30 |
| → mcmillhj joined | 21:31 |
|
AlexDaniel
| tbrowder_: that's an interesting idea | 21:33 |
|
tbrowder_
| what we need to do at perl gatherings is to have prearranged key signing sessions, everyone checks ids and signs keys, can be loads of fun! lots of info on how to go about that. | 21:33 |
|
AlexDaniel
| tbrowder_: I think debian maintainers simply use the same key to check new releases | 21:33 |
|
| tbrowder_: so if someone else cuts the release (with a different key obviously), then we'd have to notify them | 21:33 |
|
| or maybe we should even multi sign them? I don't know | 21:34 |
|
| that's a wonderful question and I'd love to know what's the proper way to do it | 21:34 |
|
tbrowder_
| the guys at edument (jnthn, masak, etc.) could start, and someone like lizmat and drforr and jmerelo who go to lots of perl places could establish a pretty good trust chain in a short while | 21:34 |
|
AlexDaniel
| fwiw I've never been to any conference… :) | 21:35 |
|
tbrowder_
| the details for that i've seen. i'll find it and put it somewhere easy to find. | 21:35 |
| ← Bowlslaw left | 21:36 |
| ← kaare_ left | 21:36 |
|
tbrowder_
| and that's a good excuse for you to go to one or more conferences, or at least meet some of the gang in a small, informal gathering somewhere! | 21:36 |
| ← mcmillhj left | 21:37 |
|
tbrowder_
| here's the debian howto: https://wiki.debian.org/Keysigning | 21:38 |
|
| pretty straight forward | 21:39 |
|
AlexDaniel
| so rust tars are signed with this key: https://keybase.io/rust | 21:42 |
|
| and I wonder who has access to the private key then | 21:42 |
| → benjikun joined | 21:47 |
|
AlexDaniel
| yeah I should look more into this stuff | 21:48 |
| → Xliff_ joined | 21:50 |
| → turdmonkey joined | 21:50 |
| ← Xliff left | 21:51 |
| → mcmillhj joined | 21:51 |
| turdmonkey → Bowlslaw | 21:52 |
| ← mcmillhj left | 21:56 |
| ← pmurias left | 21:58 |
| → pmurias joined | 21:59 |
| ← pmurias left | 21:59 |
| ← rindolf left | 22:00 |
| → lizmat joined | 22:01 |
|
benjikun
| Bowlslaw: how are you? | 22:02 |
|
Bowlslaw
| benjikun: Pretty good. jnthn and some others showed me Cro. I had been looking at it for a bit, but I just started using it today. | 22:06 |
|
| How about you? | 22:06 |
|
benjikun
| Bowlslaw: sweet, I'm writing a forum in cro and my personal website uses it now too | 22:06 |
|
| doing pretty good | 22:06 |
|
| all things considered | 22:06 |
|
Bowlslaw
| Haha, I am planning on writing my website in Cro and hosting it on my RPi | 22:07 |
| → _Xliff_ joined | 22:07 |
|
benjikun
| It's pretty comfy if you've used libraries like it before in other languages | 22:09 |
| ← Xliff_ left | 22:10 |
|
xi-
| Cro looks pretty great | 22:15 |
|
AlexDaniel
| yeah | 22:20 |
| ← MasterDuke left | 22:23 |
| → MasterDuke joined | 22:24 |
| → perlpilot joined | 22:27 |
| → xq joined | 22:30 |
| ← HaraldJoerg left | 22:44 |
|
buggable
| New CPAN upload: FindBin-0.1.7.tar.gz by LEMBARK http://modules.perl6.org/dist/FindBin:cpan:LEMBARK | 22:44 |
| ← natrys left | 22:48 |
| ← michael_s left | 22:53 |
| ← sena_kun left | 23:00 |
| → nativecallable6 joined | 23:06 |
| → statisfiable6 joined | 23:06 |
| → mcmillhj joined | 23:07 |
|
tbrowder_
| ref: cro does anyone know of a website using it that has all or most of the code in public view? i would love to see an example cookbook solution with either nginx or apache. | 23:09 |
| ← girst left | 23:10 |
|
timotimo
| you'd do it the same way you'd do any web app; mod_proxy to the port your endpoint runs at | 23:11 |
| ← mcmillhj left | 23:11 |
|
_Xliff_
| I am actually thinking about moving some in-dev projects to Cro. | 23:19 |
|
| Was actually curious if some aspects of HTTP::UserAgent were used in the design of Cro. Now it looks like the similarities are due to the protocol more than anything else. | 23:20 |
|
| Still, I think some of the documentation could use some work. :) | 23:20 |
| → girst joined | 23:20 |
| → mcmillhj joined | 23:26 |
|
_Xliff_
| Who works on the edument.se pages? | 23:26 |
|
| "Jonathan's work with Comma shows once again our skills in Per, but also our ability to build development tools, especially on the IDEA platform." - Acke Salem / CEO | 23:26 |
|
| ^^ s/Per/Perl/ | 23:26 |
|
| tell jnthn https://edument.se/en/news/now-we-launch-comma <- This page has a mispelling of Perl in the quote from the CEO. | 23:27 |
|
| .tell jnthn https://edument.se/en/news/now-we-launch-comma <- This page has a mispelling of Perl in the quote from the CEO. | 23:27 |
|
yoleaux
| _Xliff_: I'll pass your message to jnthn. | 23:27 |
| ← mcmillhj left | 23:31 |
| → mcmillhj joined | 23:40 |
| → benjikun2 joined | 23:42 |
| ← mcmillhj left | 23:45 |
| ← benjikun left | 23:46 |
| ← wamba left | 23:47 |
| → mcmillhj joined | 23:54 |