IRCloggy #perl6 2018-06-29

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

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 one00:00
Juerd https://juerd.nl/i/4e15b239d6b33c973af964745ad712ac.png but still haven't been able to reproduce00: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 again00:01
shell 'locale' gives the same output00:02
geekosaur probably only happens when something is initted the first time00:02
doesn't look like that should be a problem. I think00:03
Juerd Even if I replay the entire session it doesn't reproduce the internal error00:03
geekosaur lovely. thta sounds like some kind if memory corruption and it landed somewhere else00:08
lizmat joined00:11
lizmat left00:16
zachk left00:21
MilkmanDan left01:03
vike1 joined01:11
kurahaupo_ left01:13
kurahaupo joined01:13
markoong left01:26
markoong joined01:26
markoong left01:27
markoong joined01:28
jeromelanteri joined01:32
markoong left01:33
espadrine left01:38
molaf left01:38
mcmillhj joined01:41
molaf joined01:51
perlpilot joined01:54
kalkin--- joined01:54
mcmillhj left01: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 talk01:56
raschipi, 1201: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 very01:57
pop onto the web, look for interesting examples01: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-- left01: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 from02:01
geekosaur sounds entirely expected to be, tbh02:01
to me02:01
fake_space_whale joined02:02
geekosaur at least, if it piques their interest02: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 disposal02: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 strokes02:08
jeromelanteri left02:08
raschipi I think it's due to ludic learning.02:12
MilkmanDan joined02: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 files02:25
Well ... files that end in .p6 (I didn't try .pm6 yet)02:26
AlexDaniel huh02:26
perlpilot perl6 doesn't show up in their list of file types though02: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 cool02:34
fake_space_whale left02:36
kurahaupo_ joined02:41
kurahaupo left02:44
kurahaupo_ left02:47
perlpilot left02:48
kurahaupo joined02:48
ufobat_ joined02:52
kybr left02:54
ufobat left02:55
raschipi left03:02
Sgeo_ joined03:04
lookatme_q joined03:26
lookatme left03:27
molaf left03:32
kurahaupo left03:32
eliasr left03:39
buggable New CPAN upload: IP-Random-0.0.7.tar.gz by JMASLAK http://modules.perl6.org/dist/IP::Random:cpan:JMASLAK03:44
BenGoldberg left03:56
nopl joined03:57
Popov_ joined03:58
gabiruh joined04:05
mcmillhj joined04:07
benjikun left04:09
mcmillhj left04:12
skids joined04:25
psychoslave joined04:33
alpha6 joined04:48
curan joined04:50
skids left05:04
kaare_ left05:11
kurahaupo joined05:20
sauvin joined05:21
jmerelo joined05:29
[Sno] left05:34
jmerelo o/05:34
wamba joined05:36
benjikun joined05:38
benjikun Does anyone know if there are there any modules built for sending emails w/ Perl605: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 suggestion05:39
28 Jun 2018 11:25Z <Zoffix> benjikun: to. Like who's the author of the survey?05:39
kurahaupo left05:41
xtreak joined05: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 time05: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__ygnKTC06:00
benjikun jmerelo: Not sure yet, it would be nice for sure06:00
Do you think everyone would do it every month?06:00
jmerelo benjikun: probably quarterly would be less tiresome06:01
kurahaupo joined06: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_ joined06:02
hami joined06:03
jmerelo Average score for the documentation is not at 6.87. That's a B-06:11
hami left06:12
benjikun jmerelo: I don't have permission to view that page06:13
jmerelo benjikun: try now https://www.google.com/fusiontables/DataSource?docid=16Gz5bSq2ARdPNLkXGY3bW_GKBdonoSW4__ygnKTC06: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.gz06:24
diegok joined06:26
jmerelo Hey, diegok !06:26
diegok left06:31
domidumont joined06:43
darutoko joined06:44
sno joined06:47
kurahaupo left06:47
domidumont left06:49
domidumont joined06: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.png06: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 joined06:52
diegok left06:59
diegok joined07:01
robertle joined07: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 joined07:15
sno left07:23
ufobat_ left07:26
pmurias joined07:34
sno joined07:35
lookatme_q left07:39
pmurias left07:42
pmurias joined07:46
jmerelo left07:46
Tison joined07:49
xtreak left07:51
xtreak joined07:52
perigrin left07: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 bars08:00
perigrin joined08:02
wamba left08:03
cog thx08: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-L8408: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 strange08:08
zakharyas joined08:13
rindolf joined08:15
xtreak left08:17
Tison left08:17
Tison joined08: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 logout08:22
Tison left08:22
wamba joined08:24
wamba left08:26
benjikun left08:27
wamba joined08:27
wamba1 joined08:27
wamba1 left08:28
wamba left08:28
wamba joined08:28
g- left08:29
g- joined08: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 joined08:51
tyil I'm writing plenty of modules, nothing for this (yet) tho08:51
I'm testing out comma, but it doesnt automatically convert texas to unicode (yet?), which I had in vim08:52
and everyone agrees that unicode ops are awesome08:52
so I'm looking for an alternative that's easily used to convert texas to unicode ops now08:53
buggable New CPAN upload: Object-Trampoline-0.0.2.tar.gz by ELIZABETH http://modules.perl6.org/dist/Object::Trampoline:cpan:ELIZABETH09:04
El_Che tyil: ** - 109:05
:)09:05
tyil that would be so much prettier with superscript - 1 and leaving out the **09:05
parv joined09:24
xtreak left09:32
HaraldJoerg joined09:34
curan left09:37
sena_kun joined09:37
jkramer What's a texas op?09:37
curan joined09:38
domidumont left09:39
robertle an ascii variant of a unicode op09: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 one09: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 name09:49
jmerelo joined09: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 keyboard09:50
aindilis left09:51
jmerelo robertle: all of them, in fact.09:52
lizmat jkramer: texas op is the old name of ascii op09:53
jkramer: it *was* an inside joke, deemed to be too inside so it was removed as a reference: instead "ascii op" is used now09:54
sno left09:54
jkramer Thanks for the clarification :)09:55
wamba left10:00
aindilis joined10:00
wamba joined10:00
Popov_ left10:17
sarna joined10:20
sarna left10:25
xtreak joined10:25
sarna joined10:27
Tison joined10:28
robertle left10:30
sno joined10:30
wamba left10: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, iirc10:41
sarna foo(bar, @a) -> bar(@a[0], @a[1]..)10:41
oh thanks, I'll look into it :)10:41
moritz correct10: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.or610:43
sarna: look up "Signatures"10:43
tadzik https://docs.perl6.org/routine/|10:43
tadzik is mildly amused that this is a valid URL10:43
sarna jmerelo: ah thanks, I forgot how these things were called :)10:44
tadzik: nice10: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 myself10: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 animal10:45
sarna jmerelo: roe deer10:45
tadzik I didn't actually know the english word until I checked it just now10:46
jmerelo tadzik: definitely more beautiful than itch.10:46
sarna same, I kept saying "deer" until I realised it's a different anumal10:46
tadzik quite :P10:46
sarna jmerelo: well, I prefer to link its spanish meaning with a Bukowski's poem10:47
"excuses"10:47
"burning itch from hell" that pushes artists to be creative sounds way better than rabies10:49
El_Che jmerelo: it's not "itch", it "scabies"10:50
sarna scabies!10:50
not rabies. heck, haven't woken up yet10: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 scabies10:51
:)10:51
jmerelo El_Che: Like "Sarna con gusto no pica". You can't get scabies _and_ like it.10:51
sarna jmerelo: :D10:51
El_Che jmerelo: in Spain, a smallish far-away country in the hipanic worl community10:51
:)10:51
world10:51
jmerelo El_Che: :-)10:52
El_Che: which has proceeded, against all previews, to the next phase in the World Cup10:52
El_Che I must close the google images page now10:52
jmerelo: yes, Spain can do so much better10:52
jmerelo El_Che: and much worse... But congrats, Belgium has gone ahead too :-)10:53
Zoffix joined10:53
El_Che nowadays is better than Germany good enough10:53
sarna El_Che: where are you from? if you don't mind me asking10:53
El_Che sarna: .be, with hispanic roots10:54
jmerelo: I watched the Chile-Spain match in Lond 4 years ago10:55
sarna El_Che: I see :)10:55
dustinm` joined10:55
aindilis left10:55
El_Che sarna: I went back to uni (without attending classes) in order to write spanish, because my education was in dutch10:56
jmerelo El_Che: Hey, I was in London too! On my way from the airport, actually :-)10:56
El_Che lol10:56
I was ther for work10:56
but we found a South-American place full with Spanish people :)10:57
it was nice10:57
I almost mixed a plane to Australia from London10: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 then10: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 penalies10:57
yoleaux Zoffix: I'll pass your message to Tison.10:58
El_Che finale10: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 speakers10:58
jmerelo El_Che: He. Also, pronunciation might not help10:58
aindilis joined10:58
sarna El_Che: in poland I was stuck with german :(10:59
Tison yes10: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 then10:59
10:58Z <Zoffix> Tison: say(nqp::objprimspec($y) || $y.defined)10:59
aindilis left10: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 times10:59
Tison I use nqp::isconcrete instead in the recent commit10:59
El_Che sarna: I remember getting a lot of beers from Israeli people when I was in Brasil11:01
[Sno] joined11:01
El_Che sarna: it was their independence day and I learnt a few words11:01
good for when you travel on low budget :)11:01
sarna El_Che: woo!11:01
sno left11:01
El_Che sarna: spent a little short of 2 years backpacking11:02
not a lot of budget11:02
sarna El_Che: I'm really digging the multinational community here, it's so different from poland11: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 imagine11: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 jutland11:05
El_Che nice11:05
you can take the boat to Sweden :)11:06
sarna oslo is pretty close too :)11:06
El_Che I have family in Århus11:06
sarna I'm in another double A city11:07
robertle joined11:07
El_Che Ålborg?11:07
sarna yeah. don't write it with an Å though, the locals don't like it :D11: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 names11:09
(in anything other than city names Aa transformed into Å)11:09
xtreak left11: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 joined11:11
El_Che dutch when from aa to a pronounce as aa on some situations11:11
sarna Aabenraa is my favorite city name here :D11: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 joined11:15
psychoslave left11:15
zakharyas left11:16
[Sno] left11: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 declared␤at <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 lines11: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 joined11: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 routines11:29
jmerelo left11: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? :D11: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 .elems11: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#L20511:31
timotimo sarna: the problem with &func |@args was that it was parsed as &func | @args, which gave you a junction11:31
Zoffix just a .Numeric11: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: ohh11: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 left11:34
sarna also, calling apply with a dot isn't ideal11:35
n1ge left11: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 left11:45
raschipi joined11:49
xtreak joined11:51
sarna timotimo: it's a hashmap, mapping strings to functions11: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 joined11:56
sarna is there something like `is-int` but for lists?11:57
El_Che whut11:58
sarna something like is-list11:58
El_Che to know is something is a list?11:58
sarna precisely11:58
Tison left11: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 === Int12:00
camelia rakudo-moar 587cd4f9e: OUTPUT: «True␤»12:00
psychoslave joined12:00
raschipi m: say 3 ~~ Int12:01
camelia rakudo-moar 587cd4f9e: OUTPUT: «True␤»12:01
moritz m: my @a = (1, 2, 3); say so all(@a) ~~ Int12:01
camelia rakudo-moar 587cd4f9e: OUTPUT: «True␤»12:01
moritz m: my @a = (1, 2, 'x'); say so all(@a) ~~ Int12:01
camelia rakudo-moar 587cd4f9e: OUTPUT: «False␤»12:01
mcmillhj left12:01
tobs joined12:02
sarna left12:02
sarna joined12:02
raschipi m: my $y = 3 but False; say $y.WHAT =:= Int; say $y.WHAT === Int;12:03
camelia rakudo-moar 587cd4f9e: OUTPUT: «False␤False␤»12:03
erdic left12:03
sarna sorry, my internet borked :(12:03
erdic joined12:04
raschipi sena_kun: ↑ === and =:= are too strict.12:04
sno joined12: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 joined12: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 weird12:11
rindolf Zoffix: hi12:13
Zoffix Right, it needs to be accompanied with prose explaining the results in a way that supports your agenda :P12: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 it12: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 install12: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 forget12:14
tyil Zoffix: LoneStar12:15
:>12:15
Zoffix What's the link?12:15
psychoslave left12:15
tyil https://gitlab.com/tyil/lonestar12:15
its also on github if you prefer that12:16
psychoslave joined12:16
tyil it's also in the AUR and in my gentoo overlay12:16
El_Che I created packages as an alternative to local compiling. I am not fond of running bash scripts from the internet either12:16
thundergnat joined12:16
tyil I oftentimes use the docker images as well12:16
for testing purposes12:16
El_Che I never use docker images I didn't create myself, besides official OS base images12:17
tyil I'm using the rakudo-star image with gitlab-ci12:17
saves me all the effort of setting up perl 6 manually in images all the time12: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-contents12: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-contents12: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 left12: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 joined12:19
thundergnat left12: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 think12:20
ExtraCrispy joined12: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 *contents12: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_synchronization12:21
Do you think this is an adequate solution or is there anything to be improved? https://gist.github.com/jkramer/7e04b7c93ac905f179b9d33651e70de612: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 is12: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 propaganda12: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 you12:24
sarna left12: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 0␤Doing work on 1␤Doing work on 2␤Doing work on 3␤3 is done␤Doing work on 4␤1 is done␤Doing work on 5␤2 is done␤Doing work on 6␤6 is done␤Doing work on 7␤4 is done␤Doing work on 8␤0 is done␤Doing work on 9…»12:26
AlexDaniel .seen benjikun12:27
yoleaux I saw benjikun 08:05Z in #perl6: <benjikun> np :)12:27
raschipi Perl 6 marketing is a hot potato12: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 0␤Doing work on 1␤Doing work on 2␤Doing work on 3␤2 is done. Result is 0.08417798391732845␤Doing work on 4␤4 is done. Result is 0.35950064073938093␤Doing work on 5␤0 is done. Result is 0.5759448195478509␤Doing work on 6…»12:27
AlexDaniel Zoffix: yeah, but I think it's not over yet12:28
psychoslave left12:28
AlexDaniel (re survey)12:28
ah, it says that it *is* over…12:29
psychoslave joined12:29
parv left12:29
Zoffix jkramer: ok, nm, I just now read that wiki that describes the problem12: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 over12: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#linux12:33
Zoffix meh12: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 joined12:36
rindolf Zoffix: i cannot find anything better than rakudobrew and i looked at all three alternatives12:36
Zoffix rindolf: which feature of rakudobrew are those alternatives missing?12:38
rindolf Zoffix: well, lonestar has to be installed under /usr12:38
mikejw Zoffix: now things seem to freeze when I try and access the slurped contents12:39
btw it's a zip file12:39
Zoffix mikejw: is it a super huge file?12:39
mikejw 23megs I think12:39
rindolf Zoffix: and rakudoup requires an ugly curl | bash command12:40
Zoffix: and your alias clutters the home dir12:40
Zoffix rindolf: but... rakudobrew does the same. It installs into .rakudobrew, my alias installs into .rakudo12:41
rindolf Zoffix: it also has ~/rakudo12:41
Zoffix rindolf: and rakudobrew is an ugly command that you clone from git rather than curl|bash command12:41
tyil tbh, all solutions are ugly12:41
Zoffix rindolf: that's what I meant. You can change it to any dir you want. Just adjust the path12:41
tyil the only good solution would be inclusion in the distro repos12:41
all we're doing now are workarounds12:42
none of them are particularly "nice"12:42
rindolf Zoffix: ok, fine12:42
tyil also rindolf, if I didnt break it yet, lonestar doesn't need to be installed at all12:43
rindolf tyil: ok12:43
tyil just clone and ./bin/lonestar, it will intall in ~/.rakudo-star by default12:43
domidumont joined12:46
curan left12:48
Zoffix mikejw: well, I've just killed my box by trying to .slurp.say a 23MB sparse file :P12:48
mcmillhj joined12:49
robertle left12:49
rindolf tyil: thanks12:49
tyil no probs :>12:50
rindolf Zoffix: heh12:50
Zoffix Oh, it's 23*GB*... I guess `dd`'s seek takes kilobytes not bytes...12:51
rindolf Zoffix: ah12:51
Zoffix oh, "seek=N skip N obs-sized blocks at start of output"12:52
robertle joined12:52
timotimo :D :D12:52
Zoffix and default obs is 51212:52
timotimo yeah, 23 gig may not fit into the ram with rakudo's overhead12:53
robertle left12: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 here12:53
Zoffix Well, I'm too lazy for it, but I think GCE has a VM with half a terrabyte12: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 regularly12:55
molaf joined12: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.501116813:01
Khisanth left13:01
Zoffix mikejw: ^ that's on 2018.03. 26MB zip file takes 1.5s. And printing to STDOUT takes ~5s13:01
On 2018.05-54-g148d7c5 on a different box takes ~1.6s13:01
(to /dev/null)13:02
And utf8-c8 to devnull takes ~7.6s13:02
So I wonder if maybe your perl6 is super ancient that it appears to freeze up on this operation13:03
xtreak left13:09
Zoffix left13:10
rindolf tyil: with lonestar, the perl6 bench looks better13:13
only 87 secs13:13
tyil it shouldnt differ from any other form of self compiled installation13:14
tyil shrugs13:14
tyil I'm glad it works for you though :p13:14
rindolf tyil: i had an old one13:14
Khisanth joined13:14
Zoffix joined13: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 worries13: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.113:18
Zoffix: it may have been13:18
Zoffix hm, OK.13:18
rindolf Zoffix: bye . walk13:19
rindolf left13:19
Zoffix c: 2018.04.1 https://temp.perl6.party/z.txt13:20
committable6 Zoffix, Successfully fetched the code from the provided URL13:20
Zoffix, ¦2018.04.1: «1.1276149␤»13:20
Zoffix c: HEAD https://temp.perl6.party/z.txt13:20
committable6 Zoffix, Successfully fetched the code from the provided URL13: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" error13: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 .slurp13:21
m: say 1.1276149/0.8088657913: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#l60713: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 again13:23
Zoffix left13:25
mikejw ok it's because I was trying to output the file contents through Data::Dump. probably not a great idea :D13:36
domidumont left13:36
MilkmanDan left13: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 uplading13:44
scimon joined13:44
mikejw *similar *uploading13:44
MilkmanDan joined13:46
Tison joined13:52
zakharyas left13:54
SmokeMachine m: say set() =:= set(); say set(1) =:= set(1)13:58
camelia rakudo-moar 5a4c95e7b: OUTPUT: «True␤False␤»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, yes14:01
rindolf joined14:01
raschipi m: say 1 =:= 114:02
camelia rakudo-moar 5a4c95e7b: OUTPUT: «True␤»14:02
psychoslave left14: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 joined14: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 =:= 214: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_ left14:07
jnthn SmokeMachine: Yes, though in theory marking `set` with `is PURE` in CORE.setting would opt it in to constant folding14:08
zakharyas joined14: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 result14:14
all it cares about is that the values you call it with are compile-time-known or not14:14
jnthn SmokeMachine: It will only apply if all the arguments to it are fixed at compile time14: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 joined14: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 sets14:17
Zoffix SmokeMachine: are you gonna be working on static optimizing those subs?14:17
lizmat m: dd Set.new14:17
camelia rakudo-moar 84f60adad: OUTPUT: «().Set␤»14:17
SmokeMachine Id like to try...14:17
lizmat m: dd ().Set14: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 necessarily14: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 folding14: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 that14:21
branch: https://github.com/rakudo/rakudo/blob/master/src/Perl6/Optimizer.nqp#L1589-L169414:21
Ah14:21
SmokeMachine: ok, nm, looks like we can just mark those subs as pure :D14:21
raschipi Am I the only one that likes the indirect invocation syntax?14:22
Zoffix I like it, but it sucks for nesting14: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 joined14:23
Zoffix wonder if there's more that can be marked14:24
SmokeMachine Zoffix: Yes... the `PURE` will make it easier...14:24
Zoffix is reminded of R#156614: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 left14:27
jnthn Zoffix: ah, thanks, maybe next week when I'm feeling for brainy :)14:29
Zoffix :)14:29
Zoffix left14:31
ExtraCrispy left14:32
jnthn *more :)14:32
heh, can't even type14:32
timotimo cool, they let you pick up your fixed brain on the weekend? ;)14:33
ExtraCrispy joined14:34
raschipi left14:35
Zoffix joined14:36
Zoffix SmokeMachine: to clarify: ignore my diff. It's wrong. You can just apply `is pure` trait on the set/bag/mix ops14: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 joined14:38
Altreus wha gwannin with bailador? It's not been updated for 2 months :s14:38
Zoffix :)14:38
Altreus does it work14:38
Zoffix Altreus: probably. I guess Cro stole its thunder in some way.14:38
El_Che Zoffix: I don't think it's true14:38
Zoffix: it didn't look too active before Cro appeared14:39
Zoffix What happened to the Bailador book BTW?14:39
turdmonkey joined14:40
turdmonkeyBowlslaw14:40
Bowlslaw Helllooo14:40
Altreus Cro is it14:40
SmokeMachine Zoffix: ok, thanks!14:40
Altreus loosk14:40
hobbs shot down by Enrique Iglesias's legal team14:40
Zoffix Altreus: it got a website: http://mi.cro.services14:41
Altreus lols14: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 :P14:43
fake_space_whale joined14:49
natrys joined14:51
Zoffix Filed R#199214: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, &substr14:52
camelia rakudo-moar 84f60adad: OUTPUT: «Nil␤Nil␤Nil␤Nil␤Nil␤»14:52
Zoffix 'cause all this stuff can be pure, eh?14:52
lizmat Zoffix: am testing set/bag/mix atm14:52
timotimo i have a cautionary tale for you14:53
we made x "is pure" at some point, and that caused performance to drastically worsen for very long resulting strings14:53
Zoffix lizmat: ok, let SmokeMachine know :) I think they were working on that too14: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 data14:54
yes14: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 spot14:54
SmokeMachine I was planning to do that at night...14:55
lizmat: ^^14:55
lizmat ok, I'm about to commit that change myself14:55
SmokeMachine lizmat: ok!14:55
domidumont left14:56
lizmat it makes set(1,2,3) 65x faster if you do it 100000 times14:57
Zoffix nice :)14:57
timotimo it'll be even more faster if you do it 10000000000 times :P14:57
skids joined14:57
SmokeMachine \o/14:57
timotimo hm, or maybe not14:57
Zoffix Yeah14:57
lizmat yeah, from O1 I guess now14:58
Zoffix "Changelog: made set() 1000000000000x faster" :)14:58
wamba left14: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 left15:00
erdic left15:04
reu joined15:04
erdic_ joined15:04
erdic_erdic15:04
rindolf i added a new benchmark - https://github.com/shlomif/perl6-benchmarks/commit/87c71ce69953c33bbfe5025c1ef60466fe33f5f415: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#l60715: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 yes15:08
sena_kun And never try to parse HTML with regexps. :)15:09
El_Che rindolf++15:10
rindolf El_Che: thanks15:10
scimon left15:11
Bowlslaw hm, I just discovered XML::Parser...15:11
looks better than DOM::Tiny for this job15: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 joined15: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 chicken15: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 uses15:18
Bowlslaw lol15:18
cool, thanks15:18
i dont' want to copy anyone's crawler though15: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 :P15:18
El_Che jnthn: let's keep the internals contained15: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 it15:20
anyway, thanks jnthn15: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 joined15: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 joined15:26
Bowlslaw yess15:27
jnthn: i've been having trouble with concurrency15:28
that really helps clarify it15:28
Sgeo__ joined15:29
mikejw left15:29
rindolf AlexDaniel: yes15:30
Sgeo_ left15:31
diakopter has anyone tried compiling MoarVM to wasm?15:35
zakharyas left15:36
b2gills joined15:39
ChoHag joined15:40
Geth ¦ doc: db0f520a2d | (JJ Merelo)++ | doc/Language/objects.pod615: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/objects15:43
Geth ¦ doc: As usual, please reopen and/or edit subject if it is not addressed15:43
¦ doc: satisfactorily.15:43
¦ doc: review: https://github.com/perl6/doc/commit/db0f520a2d15:43
jmerelo diakopter: no one, AFAIK, but it would be cool if someone tried...15:44
domidumont left15:44
Zoffix joined15:49
Zoffix rindolf: err.... yes, 90% faster means different than .9x faster, but 3.9x faster means 390% faster15: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:115: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: True15:52
Zoffix No, 2 times faster means 2 x original speed15:52
rindolf Zoffix: actually 2:1 is 100% faster15:52
Zoffix Where are you getting the "plus" there?15:52
rindolf: right, but it's also 2x faster15:53
rindolf Zoffix: yes15: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 + X15:54
Zoffix https://xkcd.com/309/15:54
rindolf: oh, you were talking about the 39%, not the commit message. Never mind15: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#l60715:55
Zoffix: yes15: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/213215:56
Zoffix jmerelo: bisect:15:56
rindolf: what does 39% speed boost mean?15:56
AlexDaniel jmerelo: actually try 6c: … first15: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.8088657915: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.8088657915: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/31d1e3b6933e9fd9bbd9b09c0a5baa3815:58
Zoffix Like, I'd describe it as 39% faster.15:58
diakopter left15:58
Zoffix m: say 1.1276149/0.08088657915: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 fast15:59
rindolf Zoffix: https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/home-bin-executables/bin/improvement-percent16:00
Zoffix AlexDaniel: for both?16:00
AlexDaniel Zoffix: 1.39x as fast, 13.9x as fast16:01
eaterof joined16:01
Zoffix AlexDaniel: how would you write "twice faster" in ${n}x notation?16:02
reu left16:02
AlexDaniel Zoffix: 3x as fast, I think? Depending on what you mean by twice faster16:03
bwisti joined16:03
reu joined16:03
SHODAN joined16:03
Zoffix AlexDaniel: "two times faster"16:03
Altreus_ joined16: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 it16: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 joined16:07
rindolf Zoffix: yes16:07
Zoffix OK, I get it now16: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 inconsistent16:08
jmerelo Geth: status16:08
AlexDaniel releasable6: status16:08
releasable6 AlexDaniel, Next release in ≈22 days and ≈2 hours. 1 blocker. 0 out of 41 commits logged16:08
AlexDaniel, Details: https://gist.github.com/713c521c146db66bdb48c4b1fec2a9a516: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 speed16:09
rindolf Zoffix: shlomif@telaviv1:~$ improvement-percent from 1.1276149 to 0.80886579 => 39.4069218825536%16:09
AlexDaniel Zoffix: alright16:09
AlexDaniel does that16:09
Zoffix \o/16:09
skids left16:09
thowe left16:09
AlexDaniel I was about to suggest creating a tool, but got ninja'd16:09
Geth ¦ doc: bfd3f57503 | (JJ Merelo)++ | doc/Language/nativecall.pod616:09
¦ doc: Clarifies when allocate was introduced closes #2132 16:09
¦ doc: review: https://github.com/perl6/doc/commit/bfd3f5750316:09
eaterofeater16:09
synopsebot Link: https://doc.perl6.org/language/nativecall16: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 commit16:10
AlexDaniel let's start with that, yeah16:10
can wrap a bot around it later16:10
domidumont joined16: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 left16:12
Zoffix ... and in French.16:13
skids joined16:14
thowe joined16:14
labster joined16:14
AlexDaniel`` joined16:14
undersightable6 joined16:14
Matthew[m] joined16:14
mempko joined16:14
kornbluth.freenode.net set mode: +v16:14
Zoffix Makes me think I'm being trolled :P16:14
lizmat Zoffix: as in Dutch, fwiw16:14
jmerelo Zoffix: dvi davai16:14
moritz both exist in German16: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 English16:17
benchable6 left16:17
hobbs but for a small change I'll still probably say a 10% speedup or whatever16:17
to mean 1.1x as fast16:17
lance_w[m] left16:17
Matthew[m] left16:17
AlexDaniel`` left16:17
sno left16:18
mienaikage left16:18
ilmari[m] left16:18
AlexDaniel what's up with freenode again…16:18
jmerelo left16:18
hobbs le network is le split16:18
sftp joined16: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 works16: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 runtime16:22
And it's the same object for set() because there's a special candidate for it that makes one object at begin time16: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 nope16:23
timotimo oh, also, every call to set() will be compile-time-evaluated separately, there is no cache or something16:23
kalkin--- left16:23
timotimo so set(1) =:= set(1) won't be true16:23
Zoffix right16: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:HANENKAMP16: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
argh16: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 one16:26
hobbs ignore the screwup16:26
SmokeMachine m: sub foo is pure {rand}; say foo, foo, foo16:26
camelia rakudo-moar c37c3b596: OUTPUT: «0.55048195659059060.37231769571267890.8481266995271738␤»16:26
AlexDaniel hobbs: right16:27
SmokeMachine m: sub foo is pure {say "here"; 42}; say foo, foo, foo16:27
camelia rakudo-moar c37c3b596: OUTPUT: «here␤here␤here␤424242␤»16:27
Zoffix m: sub foo is pure {say "here"; 42}; for ^3 { say foo }16:28
camelia rakudo-moar c37c3b596: OUTPUT: «here␤42␤42␤42␤»16:28
Zoffix m: sub foo {say "here"; 42}; for ^3 { say foo }16:28
camelia rakudo-moar c37c3b596: OUTPUT: «here␤42␤here␤42␤here␤42␤»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 time16:28
Bowlslaw ok, Cro is really cool16:29
Zoffix m: sub foo is pure {BEGIN say "here"; 42}; say foo, foo, foo16:29
camelia rakudo-moar c37c3b596: OUTPUT: «here␤424242␤»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()` calls16:30
bwisti left16: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: «here␤False␤False␤False␤»16:30
rouking left16:30
fake_space_whale left16: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 code16: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: «here␤False␤True␤True␤»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: «here␤False␤True␤True␤»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` there16: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: «here␤False␤True␤True␤»16:35
SmokeMachine Zoffix: yes, but why isnt `set(1)` doing the same?16:35
Zoffix SmokeMachine: yes16: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: «False␤True␤True␤»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 call16:36
SmokeMachine: there are two calls at compile time16:36
SmokeMachine Zoffix: hum! now I got it!!!16:36
Zoffix :)16:36
SmokeMachine Zoffix: sorry, I think I did missread you earlier16:37
aindilis joined16: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 times16: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 call16: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 example16:39
Zoffix SmokeMachine: no, at runtime too16: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 brain16:41
timotimo yeah, i'd expect the cache to be discarded when compilation is over16:42
Zoffix Ah, ok :)16:42
timotimo well, at the end of optimization already16: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 instead16:42
timotimo no, that's not how it's implemented16: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 time16: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 boost16: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 end16: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 controls16:57
Like here: https://github.com/rakudo/rakudo/blob/master/src/Perl6/Optimizer.nqp#L1695-L169816:57
Those ops won't get optimized if you drop the level lower16:57
hobbs set the controls for the heart of the sun16:57
dogbert17 joined16:58
lizmat I could imagine an extra level that would look of the .WHICHes of pure objects that got WValled16:58
keep those .WHICHes in a hash, and use the one from the hash if there's a match17:00
mirlur[m] joined17:00
p6noob joined17:02
Zoffix \o/17:02
p6noob Hi :-)17:03
Zoffix \o17: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` flag17: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 joined17:08
committable6 joined17:09
ChanServ set mode: +v17:09
bisectable6 joined17:09
releasable6 joined17:09
squashable6 joined17:09
Zoffix p6noob: no idea how the `repr()` stuff does things, but I filed a bug report: R#199317: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 bug17:10
Zoffix p6noob: https://github.com/rakudo/rakudo/issues is a good place17: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/issues17:12
Geth ¦ rakudo.org: 200adf0015 | (Zoffix Znet)++ (committed using GitHub Web editor) | templates/bugs.html.ep17: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/200adf001517:14
benchable6 joined17:14
greppable6 joined17:14
eliasr joined17:15
Zoffix left17:17
Bowlslaw failedis `zed upgrade` safe to run?17:19
zaale joined17: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 think17:28
zaale left17:33
michael_s joined17:39
Tison in nqp, how can I test if a file exist?17:41
emmm, it seems like `try`17:42
lizmat left17: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/eZuZcvtqxh␤Unable …»17:45
AlexDaniel, Full output: https://gist.github.com/985534a181b8dc37d026b7d5a045663917: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 really17:45
Tison I'm reminded that there is a test file 019-file-ops.t17:46
let me take a look at that17:46
AlexDaniel Tison: https://github.com/rakudo/rakudo/blob/e9351cbaa961c4d1e4ef8b4cb52418d55766a8d6/src/core/Rakudo/Internals.pm6#L124417:46
Tison ok( nqp::stat('CREDITS', nqp::const::STAT_EXISTS) == 1, 'nqp::stat exists');17:46
AlexDaniel` joined17:52
Matthew[m] joined17:52
unclechu joined17:52
AlexDaniel`` joined17:52
wictory[m] joined17:52
lance_w[m] joined17:52
ilmari[m] joined17:52
EuAndreh[m] joined17:52
CIAvash[m] joined17:52
Garland_g[m] joined17:52
mienaikage joined17:52
sno joined17:54
rouking joined18:04
hankache left18:10
yoleaux joined18:11
ChanServ set mode: +v18:11
ChoHag left18:18
zachk joined18:19
zachk left18:19
zachk joined18:19
sauvin left18:26
ChoHag joined18:26
empT joined18:29
empT left18:29
Olorig joined18: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.md18:42
Olorig: read the remarks in https://github.com/perl6/6.d-prep18:43
(the readme)18:43
domidumont left18:45
wamba joined18:47
murilo joined18:47
darutoko left18:48
murilo left18:50
Olorig Thanks! Looks quite cosmetic18:50
ChoHag left18:51
wamba left18:51
wamba joined18:52
samebchase joined18:53
diegok left18:59
Olorig left19:07
Zoffix joined19:08
Zoffix missed by that much :P19: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.d19: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 says19: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 interesting19:15
those are just historical oddities19:16
Zoffix and in p6 they're just alternative syntaxes ;)19:16
jdv79 ha19:16
Zoffix AlexDaniel: looks good. Now I just need to remember to use it :)19:17
Bowlslaw Perl 5 is also huge19:19
molaf left19:19
ChoHag joined19:19
Zoffix Not according to Perl 5 people who keep trashing my p6 articles :P19:20
Bowlslaw wut??19:20
btw, it's really cool that "my $client = Cro::HTTP::Client.new;" returns a promise19: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 lolwut19:21
it's unreadable for me19:21
then, i learn how to read it, and then it's readable19:22
mind = blown19: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 { } } yet19:23
Zoffix I don't understand it either, but that never stopped me :D19:25
Bowlslaw LOL19:25
I'm putting something on pastebin so I can ask for some clarification19:25
|oLa| joined19:26
Bowlslaw https://pastebin.com/G0jrt99j19:27
i don't understand the difference between reactwhenever and race19: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 Promise19:27
whereas Cro::HTTP:Client IS a Promise19: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: «10␤9␤8␤7␤6␤5␤4␤3␤2␤1␤0␤Take 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 Supply19:34
m: react { whenever 42 {} }19:35
camelia rakudo-moar 0721bfa75: ( no output )19:35
Zoffix hm19: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 likes19:35
Bowlslaw so, can I do something like...19:35
Zoffix But it *can* be a Promise19:35
diegok joined19:36
Bowlslaw react { whenever $ua..get($url) -> $response { get-link() } }19:36
Zoffix yeah19:36
Bowlslaw is that concurrent?19:36
it is an HTTP::UerAgent object i believe19:37
Zoffix No, just asynchronous19:37
You could do `react { whenever $ua..get($url) -> $response { start get-link() } }`19:38
like shove the get-link stuff into a promise19:38
Bowlslaw ooh19:38
that would spawn a new thread for each new link?19:38
Zoffix That would stick into the work queu19:38
e19:38
Bowlslaw hmm19:41
so I could make an on-demand Supply..19:41
which fetches links...19:41
and whenever it fetches a link19:41
it processes it?19:41
Zoffix ¯\_(ツ)_/¯19:42
Bowlslaw lol19:42
Zoffix I think I made something for you for that a couple days ago?19:42
With Supply.throttle19: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 -l19:44
019:44
$ RAKUDO_SCHEDULER_DEBUG=1 perl6 -e 'await ^100 .map: { start sleep .05 }' 2>&1 | grep 'Added a general worker thread' | wc -l19:44
919:44
$ RAKUDO_SCHEDULER_DEBUG=1 perl6 -e 'await ^100 .map: { start sleep ½ }' 2>&1 | grep 'Added a general worker thread' | wc -l19:44
5719:44
Bowlslaw: ^ that's the answer to "would that spawn a new thread"19:44
The numbers are spawned threads19:44
Bowlslaw i've been using $*THREAD19:45
Zoffix And that's the general queue, there's also affinity queue that's used in stuff like Proc::Async19:45
Where it tries to keep number of workers smaller or something19:45
oh and timer queue19: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 processed19: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 like19:49
my first association was "affine logic", which is not 100% unrelated, since it's also about resource usage19:49
but "the tasks have an affinity to this queue" sounds like the real reason for the name19: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/unbounded19:51
m: say Cat19: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 haha19:51
Zoffix :)19:51
masak no, I did not mean Rat, camelia19:51
Zoffix Nah, Cat is not yet implemented19:51
masak .oO( we just Ca't do that yet )19:51
Zoffix It'll need some regex diving19:51
SmokeMachine masak: thanks19:51
Zoffix And mad hax0r skills.19:51
SmokeMachine is there any documentation showing how should it look like?19:52
masak almost certainly not19: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 List19:53
So it could be infinite, really19:53
masak it's mentioned a total of 20 times in the spec19:53
SmokeMachine got it!19:53
Zoffix SmokeMachine: here's my failed attempt at implementing it: https://github.com/zoffixznet/perl6-Kitten#synopsis19:54
Bowlslaw Zoffix: I think I have something here, but I want to verify that it does that I think it does19:54
masak which means it's entirely untested in practice19:54
oh, Zoffix++ has attempted it, cool :)19:54
SmokeMachine and `Grammar.parse` should work on it19:54
Zoffix Yeah, it's needed for some IO::Handle stuff19:54
Bowlslaw Zoffix: What do you think of this? https://pastebin.com/auJt8Dyx19: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 anyway19: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 mine19: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 hmmm19: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 help19:58
I suppose Cro is the useragent stuff of Perl 6 now19:58
Zoffix Bowlslaw: FWIW, your current setup is fine, but it's not gonna be fine if you move that inner sub out of react19: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' block␤at <tmp>:1␤------> EVIEW; react { foo }; sub foo { whenever 42 {} } ␤»19:59
masak I sometimes dream also of being able to do grammars on byte streams19:59
to do complex deserialization, essentially19:59
Bowlslaw Zoffix: thanks19: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 opportunities19:59
Bowlslaw left19:59
Zoffix &20:00
Zoffix left20:00
|oLa| left20:09
kybr joined20:10
|oLa| joined20:22
espadrine joined20:23
bartolin joined20:24
tbrowder_ m: my $s=“#comment”; my $idx=rindex $s, ‘#’; say $idx20:25
camelia rakudo-moar 0721bfa75: OUTPUT: «0␤»20:25
|oLa| left20:27
tbrowder_ hm, i’m getting a failure on that ^^^ on rakudo 2018.06-25-ge9351cb built on moar 2018.0620:34
testing master branch...20:35
Tison left20:37
AlexDaniel 6c: my $s=“#comment”; my $idx=rindex $s, ‘#’; say $idx20:37
committable6 AlexDaniel, ¦6c (31 commits): «0␤»20:37
AlexDaniel tbrowder_: ↑ looks correct?20:37
tbrowder_ yes20: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 upstream20:41
committable6 SmokeMachine, ¦6c (31 commits): «8␤0␤»20:41
kaare_ joined20:54
wamba left20:55
wamba joined20:58
mcmillhj left21: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 joined21: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 joined21:14
turdmonkeyBowlslaw21:14
Bowlslaw Hello again21:14
AlexDaniel tbrowder_: https://github.com/perl6/nqp/issues/42621:14
mcmillhj left21:18
skids left21: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 key21:23
if they download the tarball from the website, then IMO a public key located on that same website is of no use21:23
but 🤷21:23
pmurias left21:24
pmurias joined21: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 it21:26
Xliff joined21:28
Xliff \o21: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 chains21:30
mcmillhj joined21:31
AlexDaniel tbrowder_: that's an interesting idea21: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 releases21:33
tbrowder_: so if someone else cuts the release (with a different key obviously), then we'd have to notify them21:33
or maybe we should even multi sign them? I don't know21:34
that's a wonderful question and I'd love to know what's the proper way to do it21: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 while21: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 left21:36
kaare_ left21: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 left21:37
tbrowder_ here's the debian howto: https://wiki.debian.org/Keysigning21:38
pretty straight forward21:39
AlexDaniel so rust tars are signed with this key: https://keybase.io/rust21:42
and I wonder who has access to the private key then21:42
benjikun joined21:47
AlexDaniel yeah I should look more into this stuff21:48
Xliff_ joined21:50
turdmonkey joined21:50
Xliff left21:51
mcmillhj joined21:51
turdmonkeyBowlslaw21:52
mcmillhj left21:56
pmurias left21:58
pmurias joined21:59
pmurias left21:59
rindolf left22:00
lizmat joined22: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 too22:06
doing pretty good22:06
all things considered22:06
Bowlslaw Haha, I am planning on writing my website in Cro and hosting it on my RPi22:07
_Xliff_ joined22:07
benjikun It's pretty comfy if you've used libraries like it before in other languages22:09
Xliff_ left22:10
xi- Cro looks pretty great22:15
AlexDaniel yeah22:20
MasterDuke left22:23
MasterDuke joined22:24
perlpilot joined22:27
xq joined22:30
HaraldJoerg left22:44
buggable New CPAN upload: FindBin-0.1.7.tar.gz by LEMBARK http://modules.perl6.org/dist/FindBin:cpan:LEMBARK22:44
natrys left22:48
michael_s left22:53
sena_kun left23:00
nativecallable6 joined23:06
statisfiable6 joined23:06
mcmillhj joined23: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 left23:10
timotimo you'd do it the same way you'd do any web app; mod_proxy to the port your endpoint runs at23:11
mcmillhj left23: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 joined23:20
mcmillhj joined23: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 / CEO23: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 left23:31
mcmillhj joined23:40
benjikun2 joined23:42
mcmillhj left23:45
benjikun left23:46
wamba left23:47
mcmillhj joined23:54

Logs Search ←Prev date Next date→ Channels Documentation