»ö« 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 moritz on 22 December 2015.
00:02 sue left 00:04 alx741 joined 00:07 tardisx joined 00:08 tardisx left, hotel_california left, tardisx joined 00:09 AlexDaniel left 00:18 mr-foobar left 00:19 mr-foobar joined 00:23 _nadim left, tardisx left, mr-foobar left, tardisx joined 00:24 mr-foobar joined 00:28 zeki joined 00:29 zeki left 00:30 sue joined, spider-mario left 00:34 hotel joined 00:35 mr-foobar left 00:37 mr-foobar joined 00:41 TEttinger joined 00:43 mr-foobar left 00:45 mr-foobar joined 00:46 espadrine left 00:49 sue left 00:55 n0xff left 01:04 wamba left 01:08 alx741 left 01:11 TEttinger left 01:15 itcharlie left 01:19 sue joined 01:24 sue left
MadcapJake ugexe++ # zef's new upgrade command 01:29
01:36 mr-foobar left 01:37 mr-foobar joined 01:39 huggable left, huggable joined 01:44 mr-foobar left 01:46 mr-foobar joined 01:48 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
sortiz tbrowder++ # Revived perl6-examples's travis-ci build \o/ 01:54
01:56 Khisanth left
diakopter psch: pong 02:06
02:11 Herby_ left 02:19 kid511 left 02:20 noganex_ joined
zacts hi #perl6 02:22
02:23 Khisanth joined, noganex left
sortiz \o zacts 02:26
02:33 pierre_ joined 02:34 mr-foobar left 02:35 mr-foobar joined
zacts :-) 02:39
I wonder if there is a lojban module for Perl6 yet? (/me searches)
02:40 mr-foobar left 02:41 mr-foobar joined 02:55 yqt left 02:56 mr-foobar left 02:57 mr-foobar joined 03:16 TEttinger joined 03:26 TreyHarris left, molaf joined 03:28 mrsolo joined 03:30 pierre_ left 03:32 cibs joined
dalek Iish: ca68436 | (Salvador Ortiz)++ | lib/DBDish/Pg (3 files):
Pg: Add a few connection status methods to $dbh

Add pg-db, pg-user, pq-host, pq-port, pq-options methods. These methods can be used to interrogate the status of an existing database connection object.
03:41 TreyHarris joined 03:43 pierre_ joined 03:54 pierre_ left 04:00 mr-foobar left 04:01 mr-foobar joined 04:03 Cabanossi left 04:04 TreyHarris left 04:05 tardisx left 04:06 Cabanossi joined 04:07 BenGoldberg left 04:11 TreyHarris joined 04:13 tardisx joined 04:22 molaf_ joined 04:24 molaf left 04:30 TreyHarris left 04:31 molaf_ left 04:33 TreyHarris joined 04:38 molaf joined 04:39 mr-foobar left 04:40 mr-foobar joined 04:47 javan joined 04:48 mr-foobar left, mr-foobar joined 04:49 sno left 04:54 skids left 05:01 Cabanossi left 05:03 molaf left 05:05 Cabanossi joined
grondilu is there a way to know how much memory a given object consumes? 05:07
05:11 mr-foobar left, khw left 05:13 TreyHarris left 05:24 javan left 05:27 cpage_ left 05:32 javan joined 05:36 pierrot joined 05:37 tardisx left, tardisx joined 05:39 huggable left, huggable joined, TreyHarris joined 05:53 domidumont joined 05:56 rindolf joined 05:57 domidumont left 05:58 domidumont joined
masak morning, #perl6 :) 06:05
06:05 sno joined
masak going to teach Python 3 today. always interesting from a Perl 6 perspective ;) 06:05
06:05 domidumont left 06:06 domidumont joined 06:08 _nadim joined 06:13 domidumont left, tardisx left 06:14 rurban joined 06:21 tardisx joined 06:22 CIAvash joined 06:24 tardisx left 06:29 _mg_ joined 06:30 TreyHarris left, tardisx joined 06:33 xinming_ left 06:34 xinming joined
grondilu m: my enum <foo bar>; say foo 06:35
camelia rakudo-moar a16f0a: OUTPUT«foo␤»
06:36 domidumont joined, firstdayonthejob joined
grondilu m: my enum <foo bar>; my $x = foo; say class { method foo { "hi" } }.new.$x() 06:36
camelia rakudo-moar a16f0a: OUTPUT«()␤»
grondilu m: my enum <foo bar>; my $x = foo; say class { method foo { "hi" } }.new."$x"()
camelia rakudo-moar a16f0a: OUTPUT«hi␤»
06:38 jjido joined 06:48 javan left 07:09 jjido left 07:12 wamba joined 07:16 TreyHarris joined 07:21 tardisx left 07:22 tardisx joined 07:27 rindolf left
Ulti timotimo: you asked about spreading colours to not be confusing the answer is to use HSV colour space not RGB blog.mattoates.co.uk/2012/01/genera...tinct.html 07:30
07:30 espadrine joined, TreyHarris left
Ulti I have a nicer version since that post, I can probably add it to one of the colour Perl 6 modules if they dont already have something 07:30
07:31 dwarring left
TEttinger also martin.ankerl.com/2009/12/09/how-to...matically/ may be handy 07:34
07:36 rindolf joined
psch .tell diakopter 'twas about dalek, but moritz++ took care off that 07:41
yoleaux psch: I'll pass your message to diakopter.
07:43 abraxxa joined 07:44 daniel-s joined 07:48 tardisx left 07:59 nutshell joined 08:00 domidumont left, nutshell left, domidumont joined 08:01 RabidGravy joined
psch hah, i just noticed Zoffix++ "Canon in D" example for A::M::N is actually in C :P 08:07
jnthn C makes a good foot-canon... 08:08
psch .oO( "fugue this!" ) 08:09
08:11 darutoko joined 08:15 CIAvash left 08:16 TreyHarris joined
sortiz I got another "Internal error: zeroed target thread ID in work pass", this time "frozen" by "panda install". 08:16
08:17 daniel-s left 08:19 tardisx joined 08:20 tardisx left 08:24 diakopter left 08:29 rindolf left 08:30 jdv79 left 08:31 jdv79 joined
RabidGravy MARNIN! 08:31
08:32 TreyHarris left, rindolf joined 08:35 domidumont left 08:36 domidumont joined 08:40 g4 joined, g4 left, g4 joined 08:46 daniel-s joined
BooK given github.com/rakudo/rakudo/blob/nom/...#L155-L161 if I have a subclass of Version with none of those defined, will these get called? 08:54
08:55 brrt joined 08:58 pierre_ joined
RabidGravy yes 08:58
08:58 CIAvash joined
RabidGravy the type constraints are essentially smart matched against the actual parameter 09:00
09:05 domidumont left 09:07 Relsak joined, Timbus left 09:13 loren joined 09:15 TEttinger left 09:21 TreyHarris joined 09:25 rurban left 09:27 espadrine left 09:28 TreyHarris left
brrt .ask jnthn i'd like some new ideas where to look with the reframe-jit branch 09:28
yoleaux brrt: I'll pass your message to jnthn.
09:39 huggable left, huggable joined 09:40 wamba left 09:41 wamba joined
sortiz A simple test case for "Cannot invoke this object" error: gist.github.com/salortiz/3ca2276bd...3b3810362c 09:42
brrt sortiz: probably not on reframe-jit? 09:43
09:43 jjido joined
brrt no, that is unlikely to be jitcompiled 09:44
09:44 CIAvash left
lizmat sortiz: can you call $C2 inside the module ? 09:45
sortiz lizmat, yes.
09:46 ufobat joined
ufobat zostay++ :) 09:47
sortiz lizmat, ups, seems no.
RabidGravy sounds related to the category of "closures in pre-compiled things not working" which afflicts .wrap as well
lizmat yeah, adding "no precompilation' to the module, fixes the issue :-( 09:50
well, bypasses, I guess
sortiz lizmat, $C1 can be called, $C2 no. 09:51
lizmat yeah, so it's not the export doing stuff
it's precomp doing stuff
RabidGravy rt.perl.org/Ticket/Display.html?id=127860 and others
lizmat and it doesn't depend on order
sortiz -ll-exception results in a long diagnose... 09:52
RabidGravy I think it boils down to "closures not surviving precomp under some circumstances" 09:53
in the wrap case it appears that the .candidates attribute winds up empty when precomped 09:54
sortiz RabidGravy, Yes, the interesting thing is that the 'say' method call survive, the 'say0 sub no.
09:57 TreyHarris joined, loren left
jnthn Well, method calls don't require any kind of lexical lookup to resolve, whereas the &say sub does, and only the latter would be affected by any closure serialization issues. 09:58
yoleaux 09:28Z <brrt> jnthn: i'd like some new ideas where to look with the reframe-jit branch
10:00 jjido left
brrt oh, i'm off for lunch anyway :-) 10:01
lizmat hmm... it also doesn't seem to catch that I changed the source file sometimes :-(
jnthn brrt: Yeah, I'm stuck in meetings for a bit at the moment 10:02
brrt: So will have to catch up on where you got to / got stuck after that :)
10:05 _notbenh joined 10:06 TreyHarris left, nowan_ left 10:08 nowan joined
sortiz Well, at least is enough golfed. 10:09
10:10 Timbus joined
lizmat sortiz: did you take out the "is export" ? 10:14
did you try without "our" but with "my"
sortiz In my latest test, yes.
lizmat and only with $C2 in there ? 10:15
ok :-)
10:16 brrt left
sortiz lizmat, My latest version is only: "BEGIN { -> { say "In closure2" } }();" :-) 10:16
lizmat could you try with just "note" in the block ? :-) 10:17
also: without the outer curlies ?
10:18 espadrine joined
sortiz without the outer curlies pass: Noted 10:20
(BEGIN -> { note })();
BEGIN {-> { note }}(); # This fails 10:21
lizmat well, that's an interesting metric :-) 10:24
10:24 dalek left, dalek joined, ChanServ sets mode: +v dalek 10:26 bazzaar joined, TreyHarris joined 10:27 d4l3k_ joined, tokomer joined, JimmyZ left
bazzaar \o 10:29
10:29 JimmyZ joined, dalek left, lucs joined
bazzaar m: token feline { <ctype=.'TOP'||'BOB'> \s+ 'CAT' } 10:30
camelia rakudo-moar a16f0a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ruDKhrMyNL␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/ruDKhrMyNL:1␤------> 3token feline { <ctype=.7⏏5'TOP'||'BOB'> \s+ 'CAT' }␤»
10:30 ZoffixWin joined, ZoffixWin left, ZoffixWin joined
jnthn $<ctype>=[<.TOP>||<.BOB>] 10:31
Or did you want to match those as literal strings rather than subrules?
$<ctype>=< TOP BOB > if literals 10:32
(Which is short for $<ctype>=[TOP|BOB])
10:32 Timbus_ joined, nightfro` joined
bazzaar jnthn: many thanks, have been trying for last 30mins without luck :-) 10:33
ZoffixWin psch++ Good eye. The original actually was in D, but then I realized it was too big so I found another version :) 10:34
10:34 zhmylove_ joined
ZoffixWin m: BEGIN {-> { note }}(); 10:35
camelia rakudo-moar a16f0a: OUTPUT«Noted␤»
10:36 araujo_ joined
ZoffixWin Seems online log isn't loggin/... 10:36
10:36 TreyHarris left 10:37 d4l3k_ is now known as dalek, sftp left, Timbus left, zhmylove left, dalek left, dalek joined, nightfro` is now known as nightfrog, ChanServ sets mode: +v dalek, sortiz left 10:38 sortiz joined, lichtkind joined, araujo_ left, sftp joined
lichtkind does anybody know how much influence tim had on Perl 5 posftix-deref design? 10:38
thanks in advance 10:39
10:39 xiaomiao joined
.oO( who's tim :P )
moritz lichtkind: do you mean Tim Bunce?
ZoffixWin And how do you measure the amount of influence :P
moritz lichtkind: and why don't you ask in #p5p, where this would be on topic?
lichtkind moritz: no timtowdi 10:40
sure but i dont get to ask larr< in #pwel5 and besides my article is also a bit about perl 6
moritz lichtkind: well, postfix dereference is very much timtowtdi, because prefix derefence already exists :-)
ZoffixWin I think lich is asking how much influence Larry Wall had on the design. 10:41
lichtkind yes
ZoffixWin I don't think he's involved with P5 any more, is he? 10:42
Which is why it's probably best to ask in #p5p :P
lichtkind as far as i know he at lesat ok's such decision so ther eis still some influence
10:43 araujo_ joined
llfourn does anyone know what the purpose of empty '{}' in the Perl6::Grammar is? 10:43
like | {} <.panic: "Bogus statement">
moritz llfourn: to terminate LTM
lizmat lichtkind: I don't think TimToady's opinion was asked about postfix deref syntax
llfourn moritz: thanks!
lichtkind lizmat thank you
psch llfourn: {} serves as a sequence point, which prevents backtracking over itself 10:44
moritz psch: {} does not prevent backtracking, I think
jnthn You can backtrack over a {} 10:45
psch ...did that change? o.O
moritz no
jnthn Though of course only if you're in a backtracking context.
psch oh, then i completely misremembered or misunderstood it
it does terminate LTM, though, doesn't it? 10:46
jnthn As moritz said, it makes anything after it invisible to LTM.
moritz and much of the Perl 6 grammar is made of token {}s, which don't backtrack
psch ohh, i didn't even see moritz++ reply
psch goes back to grmbling at MIDI :S
llfourn so why would you want to terminate LTM before a panic? # still understanding regex concepts 10:47
I assume so the panic doesn't too eagerly happen
moritz right 10:48
llfourn there could be a zero width match elsewhere that could avoid... thanks I get it now
10:51 kaare_ joined 10:53 rindolf left 10:59 TreyHarris joined 11:00 brrt joined, pierre_ left 11:01 rindolf joined 11:02 araujo_ left 11:04 tokomer left
dalek ecs: e094a61 | RabidGravy++ | S22-package-format.pod:
Bring META format closer to reality

   * resource has been implemented differently
   * version literals should omit "v"
   * use proper JSON bool
brrt jnthn: np, eventually we'll get to the bottom of it :-) 11:06
it seems to only happen in perl6 code, though
which is why i was thinking about the extops, but that doesn't seem to be it 11:07
RabidGravy right, where was I? 11:09
11:09 TreyHarris left, domidumont joined
moritz ask your GPS? :-) 11:10
sortiz Talking about S22, is a ':ver<x.y.z>' part allowed in 'provides'? 11:13
As panda/zef can uses 'provides' to resolve install requests, I hope so. 11:19
_nadim morning all 11:22
11:22 wamba left, daniel-s left
_nadim jnthn: did you have a look at my patch or shall I create another module? 11:22
11:22 daniel-s joined 11:23 CIAvash joined 11:24 wamba joined
moritz PSA: Richard Hainsworth built finanalyst.github.io/ModuleCitation/ which tracks "citation" (reverse dependency) index of Perl 6 modules over time 11:24
jnthn _nadim: Didn't have time to fully look over it. I'm think I'm good with some aspects of it, sad to lose the tree though. 11:25
11:25 TreyHarris joined
jnthn _nadim: So if you feel strongly on that aspect you'll probably need to create your own :) 11:26
_nadim jnthn: I can make that optional when one uses the module.
jnthn People generally seem to like G::T so I'm not inclined to overly change its output.
Yeah, that's another option. 11:27
_nadim I also though about some stats about which part of the grammar fires the most. that could be a little hint for optimization.
brrt what is G::T? 11:28
moritz Grammar::Tracer or so?
_nadim Grammar::Tracer 11:29
jnthn _nadim: I think there's a Grammar::Profiler
_nadim jnthn: they may like it because they haen't seen anything else ;)
I'll check that
there is indeed github.com/perlpilot/Grammar-Profiler-Simple 11:30
11:31 TreyHarris left 11:34 tbrowder left
bazzaar .oO is learning to construct grammars and 'stress testing' Grammar::Debugger :-) 11:36
11:45 sortiz left 11:51 wamba left
ufobat ZoffixWin, have you noticed github.com/ufobat/Bailador/blob/ma...ticFile.pm ? it might be similar to one of your modules you have recently developed 11:52
11:57 _notbenh left, _notbenh joined 11:59 daniel-s left
moritz finanalyst.github.io/ModuleCitation/ it seems that JSON::Fast is eating JSON::Tiny's lunch :-) 12:04
12:05 domidumont left, TreyHarris joined 12:06 domidumont joined
RabidGravy the fact that I switched JSON::Marshal (which is depended on indirectly by about seven modules) to JSON::Fast probably had some of that :) 12:07
moritz ah, cool
12:12 pmurias joined
pmurias is examples/rubyish meant to grow into a full ruby implementation? 12:13
ahh, it seems it was just unbitrotted 12:14
12:15 ZoffixW joined
ZoffixW ufobat, I saw it, but I found no documentation at all. Nor was it `used` anywhere else in Bailador. What is the similarity that you mention? 12:17
ufobat i just think it serves the same purpose 12:18
i updated the documentation yesterday
12:20 TreyHarris left
ZoffixW ufobat, yeah, it's pretty much the same. The only differences I see is mine takes no configuration and will return a 404 if the file is not there. 12:22
12:22 _notbenh left
ufobat mine is not supposed to return a 404 because of my ideas for "nested routes" handling :-) 12:23
ZoffixW It kinda bugs me that Bailador sometimes uses kebob-case and sometimes the underscore_case... sessions-config/content_type, cookie-expiration/add_route 12:24
ufobat, I didn't even know you could return a False until just now :) And I wrote ::Static while drinking at the bar :P
12:24 macsnowball joined
RabidGravy I hate flappy tests 12:24
ZoffixW ufobat, all this tells me is I need to actually sit down and read all the docs :) 12:25
ufobat ZoffixW, yeah! i was quite unhappy that i didnt write documentation nor a good test for it.. i started to write a "playground web app" to get a feeling whats missing in bailador..
to be honest i am just greedy for getting feedback :p 12:26
12:27 _notbenh joined
ZoffixW ufobat, my biggest "concern" is concurrency. I've seen someone comment on PSGI module that, say, when you .slurp a file it's all blocking. 12:27
ufobat yeah
i am not sure, but i think first the webservers have a different understanding of the p6w / p6sgi draft 12:28
and 2nd the content can be a supply
jnthn If you're using IO::Socket::Async and tap that, the incoming requests are automatically processed across multiple threads anyway.
ufobat so in fact the staticfile should return a supply 12:29
RabidGravy well could
12:30 macsnowball left, macsnowball joined
ufobat i shouldn't ever say should again, i know 12:30
but isn't it better if the staticfile thingy would return a supply instead of the Blob? 12:31
RabidGravy If there isn't a module that does async file I/O to a supply, I'd make that separately first
it may have a separate utility 12:32
ufobat i dont know, i was just thinking about the psgi spec so far. i dont know whats easy or available so far :-(
llfourn I think the idea of p6 IO is that you don't have to worry about blocking/non-blocking in situations like this?
(as long as the requests are being handled Async) 12:33
ZoffixW Well, I now mentioned Bailador::Route::StaticFile in Bailador::Plugin::Static. My only reservation against deleting it entirely is that I feel I shouldn't need to configure anything for my app to serve static files. It should come by default (with, say, using `public` dir to look for static files at, if all the routes fail). An app that doesn't use any static files ever is a rare beast.
12:33 sue joined
ZoffixW & # work 12:33
12:33 ZoffixW left
RabidGravy I keep thinking it's Sunday 12:34
[Coke] sadly, nope
ufobat llfourn, i think the idea is that you webapp is slurping the file, responding to the http server, and while asyncronously reading the file the server could respond to the client 12:35
lizmat if it is a static file, why slurp the file in userland at all?
ufobat if you "slurp" the file first, then keep the promise and then the server responds it is not as good as it could be
lizmat isn't there a way to directly pipe a file to a handle ? 12:36
ufobat first you need to check if you use any kind of encoding.. URL encoding or form multipart thingy i think
timotimo there is in posix, yeah
llfourn ufobat: I don't think it matters. Unless you are trying to say that you want to return chunks of the file to client. When .slurp is called the whole webserver is not blocking.
timotimo i forgot what it's called, though 12:37
RabidGravy sendfile isn't it?
timotimo could be 12:38
_nadim Yo, anyone here that would like to share a bigger place in cluj for YAPC?
timotimo yeah, it is
ufobat github.com/zostay/P6SGI fyi
RabidGravy the Supply thing in the p6sgi response is more useful for streaming type thingies where you need to send the start of the response to the client and then carry on sending an unknown amount of data 12:40
pmurias _nadim: you mean share a room? 12:41
12:41 Sgeo_ left
_nadim a room or rather an appartment 12:41
DrForr Oh, where are you staying?
_nadim I'm good for a room if we are not many
I aven't decided anything, there are appartments on rbnb, 3 rooms, and smaller ones too 12:42
ufobat a real world example is maybe when you compute something that takes its time and you'd like to transmit what you've done so far
RabidGravy well a real, real world example is audio streaming where the output doesn't end until the client disconnects, but you need a response for the client to know what it is going to get 12:44
ufobat yes!
RabidGravy the only reason I implemented the streamthing server from scratch was that there is no way to do the reverse in any of the current implementations 12:46
_nadim DrForr: here's an example www.airbnb.com/rooms/12693204?chec...s=N5l-eWp7
RabidGravy i.e. a connected client will keep sending data for ever but needs a response up front to know that it was accepted
brrt when exactly is YAPC in Cluj? 12:48
_nadim 24-26 August. I plan to come the day before and leave the day after 12:49
brrt hmm, hope i'll be able to come this year 12:50
although i've already missed GPW and NLPW, which were closer by
DrForr That's probably just a mile or so from my place. 12:51
brrt DrForr: what is your place
DrForr Uh, my apartment? :) 12:52
brrt fair enough 12:53
12:54 Sgeo_ joined
jnthn var InvalidVersion = props => 12:56
<Alert bsStyle="danger" className="padded-from-header-footer">
<strong>Sorry!</strong> This tutorial format version, {props.version}, is not supported.
<strong>Supported version: </strong>{supportedVersion}
RabidGravy actually it just occurred to me that the "source client" connection for a streaming server could do what Websocket::PSGI does and respond but continue reading from the socket
brrt :-)
do we have a pg client actually? 12:57
RabidGravy the DBIish pg thing works fine 12:58
brrt alpine perl workshop has switched datespace with YAPC this year
pg <3
well, postgresql, anyway
pmurias needs to come up with a name for his rakudo.js YAPC::EU talk 13:03
13:04 sue left
jnthn "Anything that can be compiled to JavaScript will be compiled to JavaScript, Perl 6 edition" :P 13:05
13:07 molaf joined, Sgeo_ left 13:09 sufrostico joined 13:11 sue joined
tadzik _nadim: (yapc) sounds good :) 13:13
13:14 macsnowball left, macsnowball joined
RabidGravy tadzik, just invited you to the perl6-noise-gang "organisation" 13:18
tadzik yay! 13:19
RabidGravy anyone else?
13:22 macsnowball left, macsnowball joined 13:23 macsnowball left
RabidGravy ugh 13:27
everything has suddenly become really really slow 13:28
tadzik yes, I will get to finishing and publishing my music sheet editor:)
RabidGravy do it! 13:29
tadzik I guess I could also port my midi-to-musicsheets thing to perl 6
it may turn out to be a bit computationally heavy 13:30
13:31 daniel-s joined 13:36 daniel-s left, sufrostico left 13:37 sufrostico joined 13:38 TreyHarris joined 13:39 huggable left, huggable joined
[Coke] (sixfix) ... that escalated quickly. 13:43
13:44 sue left 13:48 pierre_ joined 13:49 TreyHarris left
tadzik ...sixfix? :) 13:51
14:01 domidumont1 joined, domidumont left
RabidGravy google says it's some kind of diet/life style fad, I guess that's not what we're taling about here ;-) 14:01
mspo sounds like a mailing list 14:02
14:05 cdg joined 14:14 tharkun left 14:15 skids joined, loren joined, pierre_ left 14:16 tharkun joined, pierre_ joined 14:18 itcharlie joined 14:20 khw joined 14:21 mcsnolte joined 14:25 TreyHarris joined
MadcapJake sixfix.nigelhamilton.com 14:26
RabidGravy ah yes 14:29
14:32 g4 left 14:39 TreyHarris left 14:40 daniel-s joined 14:42 rindolf left 14:50 rindolf joined 14:57 sue joined
brrt slow day today 14:57
14:57 brrt left 15:02 ufobat left 15:11 sergot_ joined 15:12 shmibs_ joined 15:13 remmie2 joined, shlomif joined
RabidGravy what's the canonical form of an IRC URI? 15:13
is it something like irc://server/channel ?
15:13 Tux__ joined 15:14 aindilis` joined, rindolf left, shlomif is now known as rindolf
mspo www.w3.org/Addressing/draft-mirash...irc-01.txt 15:15
15:15 [Coke]_ joined 15:16 _mg__ joined, PotatoGim_ joined 15:17 nowan_ joined 15:18 mrsolo_ joined, lichtkind_ joined, cosarara_ joined 15:19 Brock joined 15:20 hoelzro_ joined, sufrosti1o joined, ambs_ joined 15:21 remmie left, mrsolo left, pierre_ left, JimmyZ left, [Coke] left, nowan left, damnlie left, Juerd left
teatime How does :sym<X> work on regexes... 1) can X be multiple characters, 2) does <sym> have to appear in the regex, 3) can the regex be more than just <sym> 15:21
4) can you arbitrarily-parameterize regexes, and/or are there any other :sym<>-like things
15:21 zacts left, _mg_ left, sufrostico left, _mg__ is now known as _mg_ 15:22 silug joined, lichtkind left, damnlie joined
RabidGravy mspo, so yes 15:22
15:23 TeamBlast joined, Relsak left, mrsolo_ is now known as mrsolo 15:24 JimmyZ joined
psch m: grammar G { proto token foo {*}; token foo:sym<bar> { <?> } }; G.parse("anything", :rule<foo>) 15:24
camelia ( no output )
perlpilot teatime: yes, no, yes, yes-ish :)
psch i think 4 is yes/no..? 15:25
15:25 PotatoGim_ is now known as PotatoGim 15:26 sno left
psch as in, any regexen can take an abritrary amount of parameters, but i at least don't know of anything else but :sym<> that works that way 15:26
perlpilot depends on exactly what is meant by ":sym<> like things"
psch i read it as "adverbs to the declaratee" 15:27
perlpilot but, "no" to that one is a very good approximation anyway.
teatime I think I read earlier that the 'regex foo { }' syntax cannot take a parameter list, or did I not?
jnthn It can take a paraemter list too
15:28 loren left
jnthn The :sym<foo> thing isn't about parameters though 15:28
It's about collecting candidates of a protoregex together 15:29
The choice of foo doesn't matter, unless you use <sym> in which case that is replaced with $<sym>=[foo] by the compiler
mspo RabidGravy: yes I think so too 15:30
RabidGravy: but you can also use ,options it seems
teatime is it really [foo] and not ['foo'] ?
15:30 zacts joined
teatime nm, I don't actually care about that 15:30
RabidGravy it's close enough for jazz and I'm not sure any actual browsers support it without a plugin anyway 15:31
masak m: for ^Inf { .say if ($_ eq .flip given .base(2)) } # binary palindromes
m: for ^Inf { .say if $_ eq .flip given .base(2) } # binary palindromes, in binary
camelia: sorry about the Inf :/
camelia rakudo-moar a16f0a: OUTPUT«(timeout)0␤1␤3␤5␤7␤9␤15␤17␤21␤27␤31␤33␤45␤51␤63␤65␤73␤85␤93␤99␤107␤119␤127␤129␤153␤165␤189␤195␤219␤231␤255␤257␤273␤297␤313␤325␤341␤365␤381␤387␤403␤427␤443␤455␤471␤495…»
rakudo-moar a16f0a: OUTPUT«(timeout)0␤1␤11␤101␤111␤1001␤1111␤10001␤10101␤11011␤11111␤100001␤101101␤110011␤111111␤1000001␤1001001␤1010101␤1011101␤1100011␤1101011␤1110111␤1111111␤10000001␤10011001␤10100101␤10111101␤11000011␤11011…»
masak those parens come out really nice. I hadn't really realized that you could do that, but I tried it, and it worked! \o/ 15:32
psch m: for ^0b111111 { .say if .&[eq] .flip given .base(2) } # away with explicit topics! 15:33
camelia rakudo-moar a16f0a: OUTPUT«0␤1␤10␤11␤100␤101␤110␤111␤1000␤1001␤1010␤1011␤1100␤1101␤1110␤1111␤10000␤10001␤10010␤10011␤10100␤10101␤10110␤10111␤11000␤11001␤11010␤11011␤11100␤11101␤11110␤11111␤100000␤100001␤100010␤100…»
psch and minus the one extra space it's the same length too 15:34
oh, but it doesn't work... :/
masak :P
m: for ^0b111111 { .say if .&[eq]: .flip given .base(2) } 15:35
camelia rakudo-moar a16f0a: OUTPUT«0␤1␤11␤101␤111␤1001␤1111␤10001␤10101␤11011␤11111␤100001␤101101␤110011␤»
masak missing colon
psch yeah, i didn't really parse this right i guess :)
perlpilot nice.
masak very Perlonic :)
perlpilot too bad you can't use "with" instead of "given" ;) 15:36
masak m: (.say if .&[eq]: .flip given .base(2)) for ^0b111111 15:38
camelia rakudo-moar a16f0a: OUTPUT«0␤1␤11␤101␤111␤1001␤1111␤10001␤10101␤11011␤11111␤100001␤101101␤110011␤»
jnthn teatime: $<sym>='foo' would be another way :) 15:40
Those forms all compile into the same thing anyway :)
psch m: grammar G { proto token foo {*}; token foo:sym<$x> { <sym> } }; say G.parse('$x', :rule<foo>) 15:41
camelia rakudo-moar a16f0a: OUTPUT«「$x」␤ sym => 「$x」␤»
psch m: say '$x' ~~ / [$x] /
15:41 _mg_ left
camelia rakudo-moar a16f0a: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8J16GL07DJ␤Variable '$x' is not declared␤at /tmp/8J16GL07DJ:1␤------> 3say '$x' ~~ / [7⏏5$x] /␤» 15:41
jnthn Well, of course you need quotes if the thing contains non-alphanumerics 15:43
teatime jnthn: $<sym>='foo' != $<sym>=[foo] if instead of foo you have something like +
masak m: enum Player (Player1 => +1, Player2 => -1); sub opponent(Player $p --> Player) { Player(-$p) }; say opponent(Player1); say opponent(Player2) 15:44
camelia rakudo-moar a16f0a: OUTPUT«Player2␤Player1␤»
teatime so would you do it as regex foo:sym<'@non-alpha stuff'> ?
jnthn Well yeah, but this is all rather silly given the compiler transforms things using ASTs
Not text.
masak m: enum Player (Player1 => +1, Player2 => -1); sub opponent(Player $p --> Player()) { -$p }; say opponent(Player1); say opponent(Player2)
camelia rakudo-moar a16f0a: OUTPUT«Type check failed for return value; expected Player(Any) but got Int (-1)␤ in sub opponent at /tmp/DznC9f91X6 line 1␤ in block <unit> at /tmp/DznC9f91X6 line 1␤␤»
masak aww :)
teatime jnthn: I'm just trying to figure out how it works and/or what language feature it is an instance of.
nine_ jnthn: do we have atomic file rename support for Windows?
jnthn So it's a non-issue :) It just produces an AST node that literally matches whatever's in the :sym<...> :)
masak wonders if implementing coercing return types would be within his ken
15:44 domm joined
teatime is the < > here the quote-words operator? 15:45
jnthn :sym<foo> is an adverb
The compiler recognizes it and treats it specially on token/rule/regex
nine_: "It's complicated"... stackoverflow.com/questions/167414/...on-windows has some info 15:47
teatime ok, it is quote words.. does that mean maybe you can do :sym「\」 ? 15:48
jnthn Think that'd work out OK
nine_ jnthn: ack turns up 0 results for ReplaceFile in our code base, so I guess the answer is very close to "no" 15:49
jnthn nine_: Oh, I interpreted the question more as "is it even possible on Windows" ;) 15:50
nine_: We use libuv, and *it* may end up calling ReplaceFile
nine_ Somehow search results for "flock() performance" are much more sheepish than I had anticipated...
jnthn: don't we bundle libuv?
teatime heh, :sym("\\") works but :sym「\」 and :sym(「\」) say malformed regex *shrug* 15:51
jnthn nine_: But I'm reading the MSDN docs on ReplaceFile and...it doesn't say anything about atomicity :/ 15:52
15:52 domidumont1 left
jnthn nine_: Yes, MoarVM staticly links in libuv and implements most of its IO using it 15:53
teatime er, nm, :sym(「\」) works.. so that's not *as* weird
jnthn nine_: Reading around a bit, I see various indications that ReplaceFire is indeed not atomic. 15:54
15:56 kurahaupo joined
nine_ jnthn: ok, thanks! I guess I should first sit down and think through how much consistency I'm actually gonna need anyway. 15:57
15:57 sue left 15:58 prammer joined
perlpilot teatime: I wonder why there isn't a postfix 「」 like there is for <> 15:58
masak I thought 「」 was more like '' than like <> 15:59
teatime heh, I thought '' and <> were more alike than different :) 16:00
jnthn Hm...I guess the colonpair parsing is a little less liberal than I remembered :)
(As in, it's not "any opener/close will do"
perlpilot masak: see? even jnthn expected it to work :)
masak heh :) 16:01
jnthn heh
I'm frazzled from having to attend a couple of meetings today, though, so I'd not read too much into that :P
Xliff `<grondilu> is there a way to know how much memory a given object consumes? 16:02
MadcapJake <> is quoteword [post]circumfix and 「」 is raw quote construct (no escaping anything)
Xliff ^^ I would like to know this too.
(Afternoon #perl6) 16:03
perlpilot Xliff: Devel::SizeMe (as soon as someone writes something like that for Rakudo ;)
Xliff LOL! 16:04
Will that work with Inline::Perl5?
16:04 ptolemarch joined
perlpilot try it! That could be interesting 16:04
likely though, you'll get the size of the wrong things 16:05
or not enough of the right things
Xliff I will! Can I dump any SEGVs in your inbox?
16:05 araujo joined
jnthn There's a heap profiler 16:05
That you can use to understand memory use
16:06 Actualeyes left
jnthn Fairly early, but already been good enough for me to hunt/fix leaks :) 16:06
Xliff jnthn, you mean "perl6 --profile" ?
I have used it. And it is nifty. 16:07
jnthn Xliff: That's the instrumenting profiler, which is good for working out what allocates memory etc.
Xliff Oh. My bad.
16:07 TreyHarris joined
perlpilot jnthn: you can't run the heap profiler from within a running program, can you? 16:07
jnthn Xliff: But less good at telling you actual sizes, and how memory is being retained