»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 May 2018.
00:04 rindolf left 00:36 zachk left 01:06 perlawhirl joined 01:07 giraffe joined, giraffe is now known as Guest33711 01:16 markoong left 01:22 molaf left 01:34 molaf joined 01:45 ryn1x joined
ryn1x Just learned about Comma IDE. This is great! Became a supporter today and already wrote some code and pushed an update with it at work! 01:54
02:08 lizmat joined 02:14 woolfy joined
woolfy I apologize for making fun of you not wanting to be touched. I had too much to drink and I was fooling around too much. And I indeed have a problem with being physical. I should not do that. Sorry. 02:14
02:16 woolfy left 02:23 woolfy joined
woolfy My text was written in the wrong window. I am really stupid today. Sorry. 02:23
02:24 ChoHag_ joined
lizmat hugs woolfy 02:25
02:26 woolfy left 02:27 ChoHag left 02:38 [particle]1 joined 02:40 [particle] left 02:44 [particle] joined 02:46 [particle]1 left, [particle]1 joined 02:48 [particle] left 02:50 [particle] joined 02:52 [particle]1 left 02:56 [particle] left 02:57 [particle] joined 03:04 [particle] left 03:05 [particle] joined 03:10 [particle] left 03:26 sauvin joined 03:43 Xliff left 03:45 cowens joined, mrsolo joined 03:46 ZzZombo joined 03:48 jhill__ left 03:49 pnu__ left, cowens left 03:50 tbrowder_ left, BuildTheRobots left, Spot_ left, mrsolo left
ZzZombo m: print 'asd'.succ 03:50
camelia ase
03:50 ZzZombo left 03:51 caasih left, chansen_ left, skaji left, SmokeMachine left
lizmat m: say "HAL".comb.map(*.succ).join 04:10
camelia IBM
04:16 [particle] joined 04:19 molaf left 04:21 [particle] left
lizmat m: say "HAL".comb>>.succ.join # golfed 04:22
camelia IBM
04:29 molaf joined 04:37 [particle] joined 04:48 curan joined 04:51 Schepeers joined 04:57 HaraldJoerg joined 05:03 Schepeers left 05:04 Schepeers joined
El_Che morning 05:06
releasable6: status 05:07
releasable6 El_Che, Next release will happen when it's ready. R6 is down, GitHub is down. At least 0 blockers. Changelog for this release was not started yet
El_Che github is down? Bad Microsoft :) 05:08
(false alarm)
05:11 ufobat_ joined 05:24 zostay joined 05:25 Spot_ joined, mithaldu_ joined 05:26 timeless joined 05:27 olinkl joined 05:29 molaf left 05:30 kipd joined 05:31 BuildTheRobots joined 05:32 u-ou joined 05:33 chansen_ joined 05:36 SmokeMachine joined 05:44 xtreak joined 05:53 rodarmor joined 05:56 timeless left 05:57 kipd left, Spot_ left, chansen_ left, zostay left 05:58 BuildTheRobots left, rodarmor left, SmokeMachine left, u-ou left 05:59 olinkl left, mithaldu_ left 06:12 Xliff joined, Xliff left, Xliff joined 06:15 domidumont joined, cowens joined 06:17 espadrine left 06:19 mrsolo joined, rodarmor joined, zostay joined, iviv joined 06:20 mithaldu_ joined, wamba joined, rodarmor left, pnu__ joined 06:21 timeless joined, domidumont left, rodarmor joined, caasih joined, tbrowder_ joined, domidumont joined, PotatoGim joined, Spot_ joined, chansen_ joined, olinkl joined, SmokeMachine joined, BuildTheRobots joined, skaji joined, Spot_ left, Spot_ joined, chansen_ left, chansen_ joined, BuildTheRobots left, BuildTheRobots joined, olinkl left, olinkl joined 06:22 SmokeMachine left, SmokeMachine joined, skaji left, skaji joined, timeless left, rodarmor left, BuildTheRobots left 06:23 peteretep joined, xtreak_ joined, rodarmor joined, u-ou joined 06:24 nine joined, kipd joined, BuildTheRobots joined, timeless joined 06:25 girst joined, BuildTheRobots left 06:26 xtreak left, BuildTheRobots joined 06:33 skids left 06:47 sno left 06:50 robertle joined 06:55 jhill__ joined, scott joined, Actualeyes joined
masak m: class C { has $.foo; }; my $c = C.new(:foo("OH HAI")); my $attr = "foo"; say $c."$attr"() 06:56
camelia OH HAI
06:58 |oLa| joined 06:59 domidumont left 07:08 xtreak joined 07:11 xtreak_ left 07:15 sena_kun joined 07:16 domidumont joined
masak I should learn to pick `token` by default in my grammars, not `regex`; `token` is usually what i want 07:19
El_Che masak: you know you want token... 07:28
masak I think it was quietfanatic who said that "token" is a bit of a misnomer here. in Perl 6 it means "regex but without the implicit backtracking". everywhere else it means "smallest lexical unit above individual characters" 07:30
but I guess there is a fair amount of overlap, and I'm not sure what else I would call "token" :) 07:31
07:33 jmerelo joined 07:34 sno joined
jmerelo Hi 07:38
07:39 hami joined 07:41 wamba left
El_Che sregex ? 07:41
straight-regex, simple regex
jmerelo El_Che: no idea. Where did you see that? 07:43
El_Che jmerelo: is an answer/proposal for masak's remark:
misnomer here. in Perl 6 it means "regex but without the
implicit backtracking". everywhere else it means "smallest
lexical unit above individual characters"
09:31 < masak> but I guess there is a fair amount of overlap, and I'm not sure
what else I would call "token" :)
he has a good point
ok, the pasting was worst than I expected. Sorry for that 07:45
07:46 hami left 07:47 w_richard_w joined 07:51 w_richard_w left
jast I'd call it a "forward regex" but that's too long for making a decent keyword out of 07:53
I think 'token' is Good Enough(tm)
masak yes, not proposing a change here
jast yeah
masak just noting that we have sort of hijacked the word for a different concept
partly, I guess, because the alternative would've been something like "sregex" :P 07:54
jast well, not *entirely*. this is what lexers/tokenizers usually work with...
07:54 scimon joined
masak it's true that a tokenizer also wouldn't do backtracking, at least not in all but the rarest of cases 07:54
but tokenizers don't have a monopoly on not doing backtracking 07:55
which is my point. the connection between "ratcheting semantics" and "token" is very tenuous
jast sure... I mean it's named by its primary intended use, I guess, which seems fairt
especially since it's part of the whole grammar/parser thing in perl6
07:56 darutoko joined
masak oh, that's the second thing. I'm using `token` for *far* more things than just what a tokenizer would do 07:56
since it's (supposed to be) my default
07:56 zakharyas joined
jast your fault, then, for not using it the way its name suggests ;-) 07:56
07:57 damnlie left
masak I would argue it's the *name's* fault, for not meaning what it means in the rest of the parser world 07:57
jast it's such a shame we do everything in python here at work. I'd love to be able to use more perl6 things...
I'm quite sure I have a lot of use cases for ratcheting, too 07:58
masak as long as one recognizes that it's not *really* about tokenization, the term `token` seems quite appropriate :P
avalenn I look for an easy way to get information from Link HTTP Headers as specified in RFC5988.
masak jast: guess we'll have to implement Perl 6 grammars in Python :)
jast guess we'll have to implement Perl 6 in Python :)
avalenn Is there any existing module to do that ? I tried to build a new grammar based on IETF::RFC_Grammars::URI but I have not enough fluidity and time to do it correctly. 07:59
08:00 damnlie joined 08:02 sno left 08:07 wamba joined 08:09 dakkar joined 08:11 zakharyas left 08:12 zakharyas joined 08:13 xtreak left 08:14 cedbdn joined
cedbdn morning folks 08:14
jmerelo cedbdn: hi 08:15
cedbdn I do get a Segmentationfault when playing around with DB::Pg
jmerelo avalenn: not as far as I know.
cedbdn: that's bad... I guess it's the last version of everything, right? 08:16
cedbdn I did get run it with perl6-valgrind-m but I do get stuck not using it regurarly 08:17
Ah versions I have a look
08:18 Xliff left
cedbdn perl6 -v This is Rakudo Star version 2018.01 built on MoarVM version 2018.01 implementing Perl 6.c. 08:19
and DB::Pg instaled it yesterday
jmerelo cedbdn: you might be better off with 2018.04, which is also a "star" release. However, the problem might be somewhere else. 08:21
cedbdn: I have seen reports of segfaults when there's some problem with a socket, but I don't know if that's the case.
cedbdn ok i'll switch to 2018.04 and tell you what is happening till then have a nice time 08:22
jmerelo cedbdn: segfaults are tricky things, and if you get it consistently, it might be better to create an issue in the module you are using (if after isolating the problem that's the case)
cedbdn: good luck :-)
08:23 yoleaux joined, ChanServ sets mode: +v yoleaux
jmerelo .tell yoleaux hi 08:24
yoleaux jmerelo: Thanks for the message.
08:46 xtreak joined 08:49 rindolf joined 08:59 sno joined 09:03 Xliff joined, zakharyas left 09:04 zakharyas joined 09:48 ChoHag joined 09:50 ChoHag_ left 09:56 sno left 10:00 rindolf left 10:03 domidumont left, rindolf joined 10:04 Hor|zon_ joined, zakharyas left 10:10 zakharyas joined
cedbdn <jmerelo> 10:12
<jmerelo> Thanks for the tip upgraded everything works now thks 10:13
10:13 sarna joined 10:19 [particle] left 10:21 sarna left, sarna joined 10:24 [particle] joined 10:27 sarna left 10:29 sarna joined 10:30 xtreak left 10:47 sno joined 10:48 releasable6 left 10:49 releasable6 joined 10:53 markoong joined, sarna left 10:59 zakharyas left
jmerelo cedbdn: great to hear that :-) 11:04
releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. 0 blockers. 87 out of 122 commits logged
jmerelo, Details: gist.github.com/b496752da884adf88c...2fc7299da8
11:11 cedbdn left 11:16 sno left 11:18 xtreak joined 11:30 sno joined, AlexDaniel joined 11:40 xtreak left
Geth doc: 264a20ae3a | (JJ Merelo)++ | lib/Pod/Htmlify.pm6
Adds .html to URLs that include .

This closes #2109 but in fact fixes all other .(.+) URLs that didn't work either. In fact this issue was known for some time, but was afraid to get into it because #1823. Anyway, this is a patch and there might be a better way of doing it, but that's how it's been addressed so far.
Please test it extensively, might break something else somewhere...
11:42
doc: fb3988b6e4 | (JJ Merelo)++ | lib/Pod/Htmlify.pm6
Eliminates debug code
11:42 jmerelo left 11:43 wamba left 11:46 xtreak joined 11:49 HaraldJoerg left 11:51 domidumont joined 11:52 HaraldJoerg joined 11:56 sno left 11:57 sno joined 12:09 zakharyas joined 12:12 kjk left 12:14 sno left 12:17 sno joined 12:33 raschipi joined 12:46 Xliff_ joined 12:48 n1ge left 12:56 markoong left 12:57 n1ge joined 12:58 markoong joined 12:59 xtreak left 13:10 benjikun left 13:12 zakharyas left 13:14 zakharyas joined 13:24 curan left 13:27 gabiruh joined 13:28 gabiruh left 13:30 gabiruh joined 13:32 Hor|zon_ left, Hor|zon_ joined
Geth doc: dmaestro++ created pull request #2110:
Fix links to NativeCall
13:32
13:33 Schepeers left 13:36 Hor|zon_ is now known as Hor|zon 13:39 zakharyas left 13:40 zakharyas joined 13:42 gabiruh left 13:43 gabiruh joined 13:52 skids joined 13:54 sno left 13:56 sno joined 14:09 wamba joined 14:18 sno left 14:21 sno joined 14:25 Luneburg joined
Luneburg I'm still having trouble with project euler problem 11 14:25
raschipi Luneburg: link? 14:26
This one: projecteuler.net/problem=11 ? 14:27
Luneburg raschipi: Yup, that's the one :p 14:28
raschipi What problem do you have?
Luneburg raschipi: I get the wrong solution for it, but my approach seems correct
timotimo did you output what position and direction it takes the result from? 14:29
that should allow you to debug easier
Luneburg timotimo: No, but I could do something where the programs records the four values it multiplied to make the product. Would that help? 14:31
raschipi Luneburg: That's what he suggested. 14:34
14:34 domidumont1 joined 14:37 domidumont left
timotimo that won't make it very easy to find where that was, though. but it'd be a start 14:38
raschipi I see, it should record the positions, not just the values. But having the values you'll have to look up on the table where they came from. 14:39
timotimo yeah 14:40
that can be difficult to spot in that big grid
14:44 lucasb joined, webstrand left 14:45 webstrand joined 14:47 webstrand left
lucasb I solved it this way: make a big list of all rows, cols and diagonals. Grep those with more than 4 elems. Map each list to lists of consecutive 4-elems and reduce this list with "*" to get the product, then get the max from the final list :) 14:53
14:53 Zoffix joined
lucasb no need to keep track of the original position (unless you want to debug) 14:54
Geth doc: 7725e2ee55 | dmaestro++ (committed using GitHub Web editor) | doc/Language/nativetypes.pod6
Fix links to NativeCall

There is currently no /type/NativeCall page, everything seems to be in /language/nativecall
15:01
synopsebot_ Link: doc.perl6.org/language/nativetypes
Geth doc: cffe50e3db | dmaestro++ (committed using GitHub Web editor) | doc/Language/nativetypes.pod6
Merge pull request #2110 from dmaestro/dmaestro-fix-nativecall-links

Fix links to NativeCall
15:05 zakharyas left 15:06 zakharyas joined 15:08 zakharyas left, gregf_ left 15:09 xtreak joined 15:10 zakharyas joined 15:11 zakharyas left 15:12 zakharyas joined, benjikun joined, zakharyas left 15:13 zakharyas joined, webstrand joined, zakharyas left 15:14 kurahaupo joined, sno left
Zoffix Luneburg: what's the right answer? 15:16
15:17 robertle left
Zoffix I got 70600674 with diagonally right-up, at x 12 and y 6 15:17
15:17 domidumont1 left
Luneburg Zoffix: That's the right answer 15:18
Zoffix \o/
Luneburg Zoffix: ;)
I also realized where I went wrong
Zoffix Here's my version: gist.github.com/zoffixznet/b9b7a2e...ac71e6be14 15:19
Luneburg I was checking to the side, down, and right-diagonal, but not left-diagonal
15:19 wamba left
Luneburg Zoffix: Interesting way of doing it, by the way 15:19
Zoffix: Can you explain how your solution works, please? 15:26
15:30 sno joined
Zoffix Luneburg: the .sums-at method takes an X and Y location on the grid and makes a Map where keys are locations and values are the products (just now noticed the method is mis-named). The locations are `gather`/`take`n conditionally, where the condition checks if this direction is possible. For example, you can't have a `left` direction if `x` is less than 3, because then there ain't 4 available numbers in that 15:30
direction. The rest of the conditionals work the same way: checking whether that particular direction has 4 numbers available for this particular X and Y. Then `largest-sum` (which should be `largest-product`) loops through all available cells asking for a list of products for each direction and the inner-most loop in that method loops through all directions, marking the cell/direction as having the largest 15:31
product, if its product is larger than the largest seen so far
@!cells is a 2-dimentional shaped array with first dimention being X and second dimention being Y
`[*] map {@!cells[.head; .tail]}, ((x…x-3) Z (y…y-3)))` <-- in this construct, I'm using meta reduce product `[*]` that's like putting `*` between each element in the list and the list is produced from mapping a list of locations into values in @!cells and list of locations is made by zippin (`Z`, which is same as `Z,`), the list of X locations with list of Y locations, so that result is a list of lists 15:33
with each inner list being a 2-element list with X and Y location, which I get with .head (x) and .tail (y) methods inside the map's Callable.
I think that covers everything. Is there anything else I should explain?
Luneburg Zoffix: I might need a moment to digest that :) 15:34
15:36 Schepeers joined
geekosaur sometimes the mailing list and cargo-cult shell "knowledge" hurts my brain. "piping to a file"? 15:40
15:43 zakharyas joined
El_Che cargo cult is fun and they have cookies 15:43
(at least if you give consent) 15:44
Luneburg El_Che: ( ͡° ͜ʖ ͡°) 15:45
15:54 robertle joined 15:55 perlpilot joined 16:00 gabiruh left 16:01 zakharyas left 16:03 molaf joined 16:04 domidumont joined 16:08 [Sno] joined 16:10 sno left 16:12 Luneburg left 16:14 Zoffix left
stmuk www.youtube.com/user/yapcna/videos 16:17
perl 6 content already up!
16:18 [Sno] left, zakharyas joined, hami joined 16:29 scimon left 16:30 xtreak left 16:31 dakkar left 16:33 hami left 16:35 [particle]1 joined 16:36 jmerelo_ joined 16:37 [particle] left 16:48 jmerelo_ left 16:50 gabiruh joined 16:56 jmerelo joined 17:01 zakharyas left, zakharyas joined
tony-o_ almost have libexpat parsing xml with nativecall 17:04
oops, meant for pm
17:06 domidumont left 17:10 zakharyas left 17:11 zakharyas joined 17:13 zakharyas left
jkramer Any suggestions for golfing this further? :) www.reddit.com/r/dailyprogrammer/c...i/e0zx8qp/ 17:16
17:18 zakharyas joined
jkramer I'm not entirely sure if the none(@all) can be used like that by itself or if I should add ? to make it a bool or even none(@all) == 0 17:21
Err, @tup not @all
timotimo the or will booleanify it
jkramer The solution works though :)
Yeah that was my guess 17:22
But I thought there was a tiny chance it would turn into none(@tup[0] or ..., @tip[1] or ... and so on :)
timotimo that anonymous hash state variable is neat 17:23
jkramer Yup, I'm actually quite satisfied that I found a place to use it :)
Read about it in the docs recently and couldn't think of a good use, but turns out it's perfect for places where you'd use a %seen hash usually 17:24
17:27 jmerelo left
tony-o_ m: gist.github.com/tony-o/f074064e9f0...3414e807fc 17:31
camelia ( no output )
tony-o_ oops, jkramer ^
17:32 lucasb left
tony-o_ doesn't have fancy gather/take but seems to work 17:32
17:33 domidumont joined
raschipi tony-o_: How are you testing for repeating sequences? 17:33
tony-o_ it doesn't, i just condensed what jkramer had 17:34
(without the (%){~@tup}++ bit because i missed that)
jkramer It's also not printing the initial tuple 17:36
tony-o_ distracted trying to track down a problem between nativecall and moarvm parsing utf8
jkramer :)
raschipi It's a good golf, though. 17:37
jkramer True :)
tony-o_ this is much harder now that rakudo cleans up after itself :-p
jkramer I like the challenges in that sub, yesterday's was similarly fun for golfing
www.reddit.com/r/dailyprogrammer/c...ce_roller/ 17:38
17:38 espadrine joined
jkramer Managed to bring that down to one line: www.reddit.com/r/dailyprogrammer/c...r/e0vji2c/ 17:39
tony-o_ you seem to be one of the few that worries about code size 17:40
jkramer I just love P6 for being so golfable while still remaining very readable (IMO) <3
tony-o_ one guy wrote JS classes
raschipi I like the C ones where they have to implement their own hashes. 17:41
jkramer Ha, yeah. I think some people there just do the opposite and try to make it as complicated as possible, just for fun. Like the guy who wrote a yacc parser for that challenge. There's also one guy who does the challenges on some texas instruments calculator
17:42 sena_kun left
jkramer Calling it a day, say y'all tomorrow o/ 17:45
18:00 comborico1611 joined 18:01 zakharyas left 18:02 Xliff left 18:07 webstrand left 18:09 webstrand joined
[Coke] So, if I fire off 300 Proc::Async jobs, how likely is it that I'm going to make the scheduler unhappy? Should I try to throttle the jobs instead of starting them ASAP? 18:10
lizmat [Coke]: start them asap: you will never start more than the maximum number of thhreads 18:11
(aka 32 by default I recall)
all of the other jobs will be queued until there's a thread ready to handle them
tony-o_ m: $*SCHEDULER.max_threads.say; 18:12
camelia 64
18:13 benjikun2 joined
timotimo it also depends on how much is coming in and how expensive your processing is 18:14
if you're not handling stdout and stderr at all, you can easily handle 100_000 Proc::Async on just one thread 18:15
tony-o_ lizmat: it used to happen that if you filled all of the threads on the scheduler with work that it'd hang MAIN and stop processing - does that no longer happen?
timotimo (your OS might not be as happy, though)
MAIN should never hang because of what the Thread Pool Scheduler does 18:16
lizmat tony-o_: that got fixed by the work jnthn did on types of jobs
timotimo only when you're "await"ing something in MAIN that isn't being processed should that be possible
lizmat tony-o_: now that we have a scheduler thread running, I don't think you can kill it tyhat way anymore 18:17
*that
timotimo by kill you mean hang?
18:17 benjikun left
lizmat yes, sorry 18:17
tony-o_ my man!
lizmat *make it hang
timotimo just making sure
El_Che d ruth had to leave I see in twitter? :( 18:18
timotimo you may want to also "use v6.d.PREVIEW" so that using "await" may throw your task back into the queue so that perhaps another thread may pick it up
lizmat El_Che: yeah, having a 10x as large conference going on at the same time in SLC, makes it extra difficult to get a proper room for her
timotimo i.e. you can't rely on being on the same thread after await as before, but you don't have to care often. mostly just with nativecall situations, but then you can build your own $*AWAITER to not switch threads any more
tony-o_ trying to track down a flapping `Malformed UTF-8 at line %u col %u` for libexpat
lizmat and when then you find out the hotel lied about accessibility of the room, you simply cannot stay anywhere else :-( 18:19
tony-o_ that's pretty rad
that comment was meant for timotimo, not for inaccessible rooms
timotimo what the heck was the hotel thinking? :\ 18:20
El_Che lizmat: wow. Sad
[Coke] Wonder if there's any way we can get that sorted out ahead of time: have the conference organizers have a temp old on an accessible room on site. 18:21
18:24 sauvin left
tony-o_ is that at yapc? 18:26
[Coke] tpc, aye
AlexDaniel WHY PAGINATE EVERY 30 ROWS DAMMIT 18:27
github, why… github.com/rakudo/rakudo/labels
I was ctrl+f-ing for something in frustration only to realize it's on page 2
would have never expected that something simple like a list of labels would even need pagination 18:28
Geth doc/coke/manifesto: 32b51f7a78 | (Will "Coke" Coleda)++ | xt/duplicates.t
Go all in on Promises.

  "Don't worry about it" - let the scheduler handle overscheduling.
Also thread the non-proc version.
tony-o_ i can ask some ziprecruiter people if they can swap rooms, what specifically should i ask? 18:30
[Coke] I think it might be too late for her at this point. 18:31
18:33 jrra left
lizmat tony-o_: Ruth has already returned home :-( 18:34
18:34 jrra joined
El_Che yesterday's tweet: twitter.com/GeekRuthie/status/1008...7510513664 18:35
she says she's heading home
tony-o_ boogie. 18:36
El_Che [Coke]: your talk is online! 18:40
raschipi gimme link 18:44
El_Che www.youtube.com/watch?v=moaGidO3eA...p;index=23
I see lizmat's back :)
raschipi El_Che++ [Coke]++ 18:46
El_Che [Coke]: [Coke] I know where you work now :) 18:47
(I hate managed laptops)
tony-o_ excellent product placement
18:48 zachk joined, zachk left, zachk joined 19:03 raynold joined
El_Che lizmat: are you giving a talk about your p5 project? 19:04
raschipi [Coke]: MAIN doesn't run first, it runs last :-p 19:07
m: say 'a'; sub MAIN {say 'b'} 19:08
camelia a
b
raschipi m: say 'a'; sub MAIN {say 'b'}; say 'c';
camelia a
c
b
19:10 domidumont left 19:14 lizmat left 19:23 wamba joined, lizmat joined
lizmat El_Che: in about an hour: the state of the CPAN Butterfly Plan 19:24
El_Che looking forward to it (with some delay :) )
19:25 darutoko left
lizmat there is a live feed I believe 19:33
www.youtube.com/channel/UC7y4qaRSb...8cCHOsKZDw 19:34
19:35 benjikun2 is now known as benjikun 19:36 Zoffix joined
El_Che doesn't look like a life feed 19:38
[Coke] raschipi: fair. Thanks! 19:39
lizmat El_Che: I guess you're right, but it looks like it already has this morning's presentations 19:42
so you won't have to wait long
tony-o_ anyone have some clues to where to start looking for the Str <-> utf8 marshalling happens in nativecall/moarvm? i have a test that fails randomly, i know what's happening in moarvm but can't seem to find where that transition happens in NC..
[Coke] jnthn++ 19:43
Zoffix How can I tell whether a routine has been inlined or not?
timotimo Zoffix: either in the profiler or in the spesh log
which shall i explain first? ;)
Zoffix timotimo: where in the profiler?
timotimo you need to explore to the spot you're interested in in the call graph
Zoffix It just shows me NaN 19:44
timotimo d'oh, yes, it does that sometimes
then maybe we'll try the spesh log
you'll be looking for a line "Inlining graph" followed by "Spesh of 'your-routine-name' .*" 19:45
then scroll up to "Before:" to see what it's being inlined into
Zoffix timotimo: will it be "Spesh of 'your-routine-name' .*" right *after* line with Inlining graph? Or is Inlining graph more like a header for a bunch of stuff? 19:47
There's only one occurence of Inlining graph and there ain't my routine under it 19:48
timotimo it'll print Inlining graph for each one
oh, only a single one in the whole log? ok, maybe it's a microbenchmark?
the basic structure of that particular part is "Before:" with a full dump of the before bytecode, then for everything that gets inlined a "Inlining graph" with another dump, and an "After:" with a full dump of the result 19:49
[Coke] p5 has detection of version control conflict markers, we should steal that. :)
timotimo m: <<<<<<<<<<<
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in shell-quote words; couldn't find final '>>' (corresponding starter was at line 1)
at <tmp>:1
------> 3<<<<<<<<<<<7⏏5<EOL>
expecting any of:
shell-…
timotimo heh.
Zoffix this is the speshlog temp.perl6.party/foo.txt and this is the profile temp.perl6.party/foo.html trying to see if DYNAMIC is being inlined
and the code is perl6 -e 'class Foo { method a() { self.d }; method b() { self.c }; method c() { self.d }; method d() { my int $x; my $z; my $y := $*Y; while $x++ < 3_000_00 { $z := $*Y + $*Y } } }; { my $*Y = 42; Foo.new.a }' 19:50
timotimo i see that it's logging DYNAMIC successfully a couple of times, so it should be at least trying, but perhaps DYNAMIC is too big to be inlined 19:51
Zoffix it's this big: github.com/rakudo/rakudo/blob/a167...m6#L33-L58
timotimo the size in bytecode is the interesting part, and i see it's 704 bytes big 19:52
Zoffix And what started this hunt is noticing that caching dynamic lookup in nqp gives a 25% win, while in rakudo it gives a 4x win: github.com/rakudo/rakudo/commit/1d...t-29438749
And in QAST I see DYNAMIC is a callstatic call, so I was wondering if it's being inlined by spesh
timotimo the max inline size is 384 bytes
so spesh would leave this one alone 19:54
Zoffix timotimo: how did you find the size?
timotimo after the "Facts" section
Zoffix timotimo: are you using anything special to view that file? Some viewer or something?
timotimo no, just vim and less 19:55
i wanted to build a viewer a few times
the files tend to be multiple tens of megabytes, though, so maybe not yet in perl6.
19:55 rindolf left
Zoffix wonder if shoving this branch into a separate sub would help anything: github.com/rakudo/rakudo/blob/a167...m6#L36-L58 19:57
19:57 rindolf joined
timotimo buh, i need to set up that thing that lets me have private shortlinks for urls from irc ... 19:57
hm, we generate calls to DYNAMIC already when we see $*FOO, right? 19:58
Zoffix |84h try to opt DYNAMIC colabti.org/irclogger/irclogger_log...06-20#l614
ZofBot Zoffix, Will remind you on 2018-06-24T03:58:50.538536-04:00 about try to opt DYNAMIC colabti.org/irclogger/irclogger_log...06-20#l614
timotimo are you proposing to generate an ifnull(getlexdyn(name), DYNAMIC(name)) instead?
19:59 dha joined
timotimo that sounds like a good idea to me 19:59
Zoffix timotimo: yeah $*FOO gens as Op (callstatic &DYNAMIC)
19:59 ufobat_ left
Zoffix timotimo: oh, that's even better 19:59
timotimo i wonder how often relatively that would trigger
Zoffix gonna try that next time I got a few minutes of time
Zoffix & 20:00
20:00 Zoffix left
[Coke] do we have a file lock? 20:01
timotimo i believe we do
[Coke] (want to be able to safely do a thing to a file in multiple running scripts) 20:02
timotimo IO::Handle seems to have a lock method
Util: can you explain the nazi ghost tank slide to me? 20:06
20:07 stee joined 20:24 wamba left 20:25 wamba joined
[Coke] liz just shared a slide showing she's the #2 committer to rakudo.... I'm number 10? That's not possible, is it? 20:33
tony-o_ commit count wise it certainly appears that way 20:34
[Coke] O_o; 20:35
Must be from my time as RM.
moritz ... and from old parrot times, imported into the rakudo repo
[Coke] AlexDaniel++ and Zoffix++ for making that not my problem! :)
20:35 sno joined
tony-o_ moritz is last if you go by the line ++s less the --s 20:36
[Coke] moritz++ ahh
moritz wat, I have around 3.2k commits in that repo...
AlexDaniel [Coke]: is there a video of these slides btw?
I mean, of that talk
tony-o_ he's at -13k (which really only speaks to him making others' code more efficient)
moritz well, I deleted the parrot backend code :-) 20:37
tony-o_ moritz: just going by your contrib (++ 32k -- 46k)
ah, ugexe niner and i were all laughing at zef's commit base at PTS
20:37 robertle left
timotimo why was that? 20:38
tony-o_ when we started zef i contributed some 6k lines to the original path and ugexe slowly perl-ized my code so he built up a deficit of thousands of lines 20:39
timotimo :D
AlexDaniel: is the whole recording just coke rather than the slides? :( 20:40
tony-o_ nativecall: 1, me: 0 for today
nativecallable6 tony-o_, gist.github.com/f6eb1c97e33fc8422e...c469358554
timotimo :D
tony-o_ insult on top of injury nativecallable6 20:41
timotimo ok, phew, they zoom out at some point
raschipi timotimo: Coke isn't that ugly.
timotimo yes, you are absolutely right 20:42
i'd even say coke is good-looking
AlexDaniel that's true
timotimo it would just have been a waste of perfectly good slides to not show them at all 20:43
20:52 comborico1611 left 21:00 lizmat left
[Coke] I skimmed the talk. there were a LOT of close ups! 21:01
I have a google doc of the slides. need to PDF it and cram it somewhere.
21:04 dha left, skids left 21:11 subroot joined, subr joined 21:12 subr left 21:14 dha joined 21:15 wamba left, wamba joined 21:16 raschipi left 21:29 lizmat joined, [particle]1 left, [particle] joined 21:32 [particle] left, [particle]1 joined, dha left 21:33 benjikun2 joined 21:35 benjikun left 21:43 dha joined
El_Che [Coke], lizmat: so, hopefully no civil war was started today ;) 21:43
lizmat no :-)
El_Che \o/ 21:44
[Coke] she was very diplomatic!
perlpilot [Coke], Watching your promises talk right now. The last 10 minutes of could have used some microphones in the audience. :) 21:57
22:00 rindolf left
El_Che [Coke]: your computer admins sucks. Glad you could continue with the talk 22:02
[Coke] sorry. :|
El_Che: didn't help that there was a puddle on the podium when I started.
guessing that was part of it.
El_Che oh 22:03
[Coke] perlpilot; I'll try to go through and add a comment there describing the questions.
m: fail "very interesting"
camelia very interesting
in block <unit> at <tmp> line 1
22:07 HaraldJoerg left 22:09 MasterDuke joined 22:15 gabiruh left 22:16 espadrine left 22:22 Kaiepi joined 22:24 skids joined 22:26 MasterDuke left 22:27 xtreak joined
Kaiepi m: grammar Foo { token TOP { <bar> }; proto token bar {*}; token bar:baz<qux> { <baz> } }; say Foo.parse('qux') 22:34
camelia No such method 'baz' for invocant of type 'Foo'. Did you mean 'bar'?
in regex bar:baz<qux> at <tmp> line 1
in regex bar at <tmp> line 1
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi are there any other tags besides :sym you can use with tokens? 22:35
22:39 xtreak left 22:46 Zoffix joined
Zoffix Kaiepi: it's not just tokents, it's all the symbols and other than a few reserved names, you can go nuts with what names you make 22:46
m: my $var:super<awesome>:and<totally amazing> = 42; say $var:super<awesome>:and<totally amazing> 22:47
camelia 42
Zoffix m: grammar Foo { token TOP { <bar> }; proto token bar {*}; token bar:baz<qux> { 'qux' } }; say Foo.parse('qux') 22:48
camelia 「qux」
bar => 「qux」
Zoffix Ah, yeah, for special token `<sym>` you mean. Yeah, only sym works there
22:52 perlpilot left 22:56 gabiruh joined
Kaiepi ah 22:57
what reserved names are there?
Zoffix Trying the DYNAMIC opt right now. This alone makes it 17% faster for normal lookup and 13% faster for in-promise lookup: gist.github.com/zoffixznet/bbc4158...3d95fcbfce 22:58
And I got the one that gens the getlexdyn portion directly without a sub and preliminary measurement showed that to be 45% faster
it's kinda spaghettified tho, especially since a few things in grammar/actions expect special structure of the &DYNAMIC call to get to the name... 22:59
Kaiepi: the empty name and the "sym" 23:00
"<TimToady> and the whole mechanism is not something we want to encourage abuse of, until we know what other keys we might want to reserve in the future" 23:01
colabti.org/irclogger/irclogger_log...1-25#l1076
23:04 gabiruh left, wamba left 23:07 MasterDuke joined
MasterDuke Zoffix: notice any speed difference building rakudo? 23:08
[Coke] what is the difference between IO.modified and IO.changed? 23:09
Zoffix didn't look at the numbers. Also my in-promise measurement is wrong. I accidentally had the var inside the promise. The real difference is it made 25% **slower** 23:10
MasterDuke whoops
Zoffix Which at least now makes sense :)
But I have the second method and there the promise one should stay the same spee
Kaiepi m: enum TelnetCommand ( 'IAC' => 0xFF.chr ); say IAC ~~ my token { <-[ <{IAC}> ]> } 23:13
camelia 「ÿ」
Kaiepi how do i write this so it doesn't match IAC? 23:14
MasterDuke El_Che: anything more to do for github.com/nxadm/rakudo-pkg/pull/40 ? 23:15
jnthn <!before "{IAC}">
Kaiepi i want it to match the character as long as it isn't IAC though 23:16
jnthn Stick a . after it
Kaiepi m: constant IAC = 0xFF.chr; say IAC ~~ my token { <!<{IAC}>> . } 23:17
camelia 5===SORRY!5===
Unrecognized regex metacharacter < (must be quoted to match literally)
at <tmp>:1
------> 3IAC = 0xFF.chr; say IAC ~~ my token { <!7⏏5<{IAC}>> . }
Unrecognized regex metacharacter ! (must be quoted to match literally)…
Kaiepi m: constant IAC = 0xFF.chr; say IAC ~~ my token { <!{IAC}> . }
camelia Nil
Geth doc: 587aa2ad0a | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Path.pod6
Clarify difference between changed and modified

Refs:
  [1] unix.stackexchange.com/a/2465
  [2] arstechnica.com/civis/viewtopic.php?t=583045
synopsebot_ Link: doc.perl6.org/type/IO::Path
Kaiepi m: constant IAC = 0xFF.chr; say "\xFE" ~~ my token { <!{IAC}> . }
camelia Nil
Kaiepi m: constant IAC = 0xFF.chr; say "\xFE" ~~ my token { <!before {IAC}> . } 23:18
camelia Nil
Kaiepi m: constant IAC = 0xFF.chr; say "\xFE" ~~ my token { . <!before {IAC}> }
camelia Nil
Zoffix [Coke]: .modified is "st_mtime" and .changed is "st_ctime" in this paragraph: "The field st_mtime is changed by file modifications, e.g. by mknod(2), truncate(2), utime(2) and write(2) (of more than zero bytes). Moreover, st_mtime of a directory is changed by the creation or deletion of files in that directory. The st_mtime field is not changed for changes in owner, group, hard link count, or mode." "The
field st_ctime is changed by writing or by setting inode information (i.e., owner, group, link count, mode, etc.)."
jnthn Missing quotes
Kaiepi oh
jnthn Otherwise it's just a code block that is evaluated for...well, no reason really. We maybe should have a sink context warning on that 23:19
Zoffix adds that as item to R#1571 23:21
synopsebot_ R#1571 [open]: github.com/rakudo/rakudo/issues/1571 Flaws in implied sinkage / `&unwanted` helper
23:23 subroot left 23:31 gabiruh joined
Kaiepi m: constant IAC = 0xFF.chr; say "{IAC}{IAC}abc" ~~ my token { [ <{IAC}> <?{IAC}> | <!before <{IAC}>> . ]+ } 23:31
camelia 「ÿÿabc」
Kaiepi how do i make it so the match is "\xFFabc" instead of "\xFF\xFFabc"?
never mind worked it out 23:34
m: constant IAC = 0xFF.chr; say "{IAC}{IAC}abc" ~~ my token { <( [ <( <{IAC}> )> <?{IAC}> | <!before <{IAC}>> <( . )> ]+ )> }
camelia 「c」
Kaiepi m: constant IAC = 0xFF.chr; say "{IAC}{IAC}abc" ~~ my token { <( [ <( <{IAC}> )> <?{IAC}> | <!before <{IAC}>> . ]+ )> }
camelia 「ÿabc」
Zoffix m: constant IAC = 0xFF.chr; say "{IAC}{IAC}abc" ~~ my token { [ <{IAC}> <?{IAC}> | <!before <{IAC}>> . <!after <{IAC}>> ]+ } 23:35
camelia 「ÿÿabc」
Zoffix nm
oh snap... it's not 45%, it's 5.1x faster and in-promise one is coming out 2%-9% faster, but it should be the same as before, really, based on the understanding of the code 23:46
ZofBot: ready my medal!
m: say $*x; my $*x = 42;
camelia 5===SORRY!5=== Error while compiling <tmp>
Illegal post-declaration of dynamic variable '$*x';
earlier access must be written as CALLERS::<$*x>
if that's what you meant
at <tmp>:1
------> 3say $*x; my $*x7⏏5 = 42;
expecting a…
Zoffix This doesn't error out any more tho. Just need to fix it up :)
timotimo does this make every usage of say a noticable bit faster? 23:50
Zoffix maybe 23:51
timotimo i'd like that, that'd be a good improvement that most people would probably feel
Zoffix just thinking it might get drowned out by the stuff `say` has to do
23:52 lizmat left, raschipi joined
timotimo time perl6 -e '(print ".") xx 1_000_000' > /dev/null → 0:03.18elapsed 23:55
time perl6 -e 'my $o = $*OUT; ($o.print(".")) xx 1_000_000' > /dev/null → 0:01.45elapsed
Zoffix it's... slower :( 23:56
23:56 TimToady joined
timotimo your change made it slower? 23:56
Zoffix yeah
23:56 dha left
timotimo hmm. 23:56
it's possible that making the code for $*foo bigger makes something very important too big to be inlined
Zoffix 0m3.419s before vs. 0m3.930s now 23:57
Is there a better version of nqp::getlexreldyn(nqp::ctx, '$*MEOWS') ? 'cause that's what I had to do because nqp::getlexdyn starts with caller's context
timotimo doesn't look like there's another way 23:58
Zoffix What affects the size of bytecode; do variable names count?
timotimo no 23:59
hm, it could very well be that nqp::ctx forces the frames to go from the stack to the heap, that's less efficient.