Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-03-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 Lrrr joined #perl6
00:04 cls_bsd_ joined #perl6
00:05 Lrrr pugs compilation is failing badly on Ubuntu Hardy
00:10 wknight8111 joined #perl6
00:10 * jnthn -> sleep
00:10 jnthn night all
00:27 cls_bsd joined #perl6
00:29 s1n frioux: ping?
00:32 frioux s1n: pong
00:32 frioux lemme drive home
00:32 frioux and then we can get started
00:53 frioux joined #perl6
00:54 frioux s1n: here
01:05 OuLouFu joined #perl6
01:13 eternaleye joined #perl6
01:26 alc joined #perl6
01:33 diakopter Lrrr: how did you try to compile it?
01:33 Lrrr diakopter: perl Makefile.PL
01:34 Lrrr major fail
01:34 diakopter take a look at the INSTALL file
01:34 Lrrr Can't find anything in Google.
01:34 diakopter it's intended to be built via hackage
01:34 diakopter well, recommended anyway
01:35 Lrrr Well then the docs might be unclear on that
01:35 diakopter the hackage releases actually aren't distributed/packaged from the svn.pugscode.org anymore
01:35 Lrrr ah... and it is explicitely said so
01:36 diakopter which docs
01:36 Lrrr svn.pugscode.org...
01:36 Lrrr I did not see the "Cut here" line.
01:36 diakopter ahh
01:36 Lrrr Sorry then.
01:37 diakopter yeah, hrm, maybe the rest of that file should be cut up and moved to another file
01:37 diakopter or reserved for posterity in the svn history :)
01:37 Lrrr It's no big deal.  Afterall it installed fine with Cabal.
01:37 diakopter oh, good.
01:38 Lrrr Yeah, whenever I feel like keeping a bit of code or doc I end up saying "fuck it it's under version control"
01:40 diakopter Lrrr: you're trying out pugs?
01:41 Lrrr I'm about to read about Perl6, so I thought I'd try Pugs first.
01:41 diakopter ah, good place to start is http://perl6-projects.org/
01:41 diakopter perhaps starting with the Wikis and blogs section
01:42 Lrrr I've have a lot to read to get up to date.
01:43 diakopter the blogs have good summaries
01:44 diakopter and wikis
01:44 diakopter actually, someone should modify that "mailing lists" link
01:44 Lrrr I'll had Planet Perl 6 to my Google Reader.
01:46 Lrrr Sweet, there is a wikibook, and it has stuff.
01:47 bsb joined #perl6
01:53 diakopter http://feather.perl6.nl/~di​akopter/cameliafav.ico.png
01:54 s1n std: use v5;
01:54 p6eval std 26002: OUTPUT«ok 00:02 34m␤»
01:55 diakopter I must admit, I'm somewhat mesmerized
01:57 s1n std: use v5; { print $ARGV }
01:57 p6eval std 26002: OUTPUT«Potential difficulties:␤  Variable $ARGV is not predeclared at /tmp/abedzAH4vi line 1:␤------> [32muse v5; { print $ARGV[31m }[0m␤ok 00:02 35m␤»
01:57 diakopter TimToady sez 'use v5' is a no-op in STD fttb
01:58 justatheory joined #perl6
01:58 diakopter in theory
01:59 s1n diakopter: is it supposed to do something and he hasn't done it yet?
02:00 kimtaro joined #perl6
02:00 diakopter last I heard it won't do anything... afaict it'd have to hook in libperl5 to itself or something to figure out where is the first } that the p5 parser barfs on
02:01 diakopter by checking syntax against incrementally smaller substrings of the rest of the input
02:01 diakopter I dunno.
02:01 diakopter I guess it could also perl -c the rest of the input using the same method :)
02:02 s1n diakopter: well, but it's still in the spec, and iirc that bit about migration was written a long time ago
02:02 s1n is it still planned that a valid impl will support v5?
02:03 diakopter I questioned that (here) fairly rigorously a few days ago, and the consensus was, "that's what she [the set of synopses] said", so that's how it'll be.  or something.  I think there were some reasons/rationale given as well. ;)
02:04 diakopter er, s/rig/vig/
02:05 s1n well, i'm questioning it's necessity to be included in the language
02:05 s1n honestly, that's the damn kitchen sink, we should avoid becoming the emacs of programming languages
02:06 s1n built in p5 code sounds like an impl feature or a user module
02:06 s1n TimToady: what's your take?
02:06 diakopter s1n: phrase your question as a request for synopsis clarification. :D
02:06 diakopter (hint)
02:08 s1n lemme try: can someone clarify to me if 1) the spec's requirement to support embedded p5 code is still valid and 2) that's not something that can be provided as a user module or implementation feature?
02:10 diakopter well, since 'use ...;" can affect the parsing anyway...   hmm.  I'm leaning to agree.
02:10 s1n with which side?
02:10 diakopter (you)
02:11 s1n the reason why i ask is because it seems to create an undue burden on implementations to support libperl or libperl++ (if ever completed)
02:12 diakopter (cough) ;) undue burden as opposed to the rest of the spec?
02:12 s1n heh true
02:12 s1n as if p6 isn't enough to be able to handle, it also has to handle p5
02:14 diakopter I kinda like my idea of how to (at least check syntax of) 'use v5'
02:14 diakopter 'course, that assumes that the use v5 block is correctly parseable.
02:14 s1n i kinda like the idea of not supporting use v5
02:15 Tene jnthn: do you have a plan for a better way to handle the %*INC pre-compile workaround evil hack in setting.pm?
02:16 diakopter s1n: which implementation are you imagining (most) here
02:17 s1n diakopter: all of them, you're doing ironperl right? you want to support v5 in ironperl? is there even a libperl that works on win32?
02:17 diakopter heh
02:17 diakopter depends on which c runtime...
02:18 s1n here's my opinion:
02:18 eternaleye_ joined #perl6
02:18 s1n if v5 is required, someone can do a grammer like STD.pm and actually connect it to actions
02:18 skids is it ok to feed evalbot stuff that loops?  It'll cut itself off, right?
02:19 diakopter yeah, that's an interesting idea...  making a derivation of STD.pm that tries to be v5
02:19 s1n beyond that, there's no reason to make all perl6 impl support perl5
02:19 diakopter skids: yeah it's ulimited
02:19 diakopter and time limited I think
02:19 skids OK, well here goes...
02:19 szabgab joined #perl6
02:19 skids rakudo: my $a = 4 but False; $a.say
02:20 * diakopter waits
02:20 p6eval rakudo bb22e0: No output (you need to produce output to STDOUT)
02:20 kimtaro joined #perl6
02:26 diakopter s1n: to answer your question, ActiveState's libperl (msvcrt) is called perl510.dll (and its .net bridge is made up of Perl510RT73.dll and Perl510NH73.dll), and strawberry perl's libperl (mingw32) is also called perl510.dll
02:32 msmatsko joined #perl6
02:34 skids seems any literal with "but" anything loops, even just as a standalone statement.
02:35 diakopter rakudo: 3 but 3
02:36 p6eval rakudo bb22e0: No output (you need to produce output to STDOUT)
02:37 diakopter rakudo: 3 but
02:37 p6eval rakudo bb22e0: OUTPUT«Statement not terminated properly at line 1, near "but"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:37 diakopter std: 3 but
02:37 p6eval std 26002: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/TWM4mtfuwH line 0:␤------> [32m[31m[0m␤    expecting prefix or noun␤FAILED 00:02 35m␤»
02:39 diakopter s1n: and on cygwin it's called libperl.dll.a and libperl.a
02:43 diakopter camelia anagrams: I a camel. I am lace. acme ail. I came la. a la mice. a malice.
02:43 diakopter camelia: use v6; say "hi"
02:48 meppl goog night
02:48 s1n diakopter: btw, how's your ironperl going?
02:50 diakopter thanks for asking
02:50 s1n heh that well huh?
02:51 diakopter today tycho got the tycho:runtime:dispatch-method() method
02:51 s1n i'm not sure i know what that means, but great! :)
02:52 diakopter which returns a closure of the method that would be invoked if the method named arg1 would be invoked on the invocant of dispatch-method(arg1, args, ...)
02:52 diakopter my "type" god object progresses
02:52 diakopter types are created and have simple multiple inheritance
02:53 s1n do you have an evalbot for me to play with yet?
02:53 diakopter har no
02:54 diakopter not fer a while, prob
02:54 diakopter OMeta is a really cool parser generator, I must say, though.
02:54 diakopter (tried using NPEG but it was way too slow)
02:55 s1n hmm, never heard of either of those
02:55 diakopter OMeta's are much faster (blindingly).  not sure how much slower it will get when another layer of indirection is added to support local parser method overriding
02:55 diakopter who knows.
02:55 diakopter google: codeplex ometasharp
02:55 diakopter if you're curious
02:55 diakopter the JS implementation was the reference one
02:56 diakopter the OMeta language has success actions, but it sorely needs failure actions and partial failure actions.
02:56 diakopter tried to hack those in last week... stalled...
02:57 diakopter for anyone who's curious, I gave up for the time being on trying to swallow the whole of STD's yaml output and ported my simple yap6 parser thingie to OMeta#
02:59 diakopter currently my overall strategy is one of source translation (from Perl 6 to tycho)
02:59 diakopter but since the parser is theoretically callable from tycho code, it need not be
03:00 diakopter (since all of .net is callable from tycho code)
03:01 s1n what do you mean by "swallow the whole of STD's yaml output"?
03:01 alester joined #perl6
03:01 diakopter like, try to build up actions to handle all the various categories
03:01 alester Does Rakudo install yet?
03:02 diakopter rakudo: 'install' but die
03:02 p6eval rakudo bb22e0: OUTPUT«Null PMC access in isa()␤current instr.: 'infix:but' pc 21472 (src/builtins/op.pir:489)␤»
03:02 alester so no
03:02 diakopter didn't expect that
03:02 alester will it work with an installed Parrot?
03:02 diakopter wait, I'm not sure I intended to answer your 1st question
03:02 alester More importantly, how are people doing development using rakudo?
03:03 diakopter alester: read http://use.perl.org/~Jonath​anWorthington/journal/38701 for today's progress
03:04 diakopter dunno how/if anyone else is using it...
03:04 alester That's not really what I'm looking at.
03:04 alester Well, I see Perl 6 projects on rakudo.org
03:04 alester so somehow people are installing Rakudo
03:05 diakopter what page on rakudo.org?
03:06 diakopter (I don't see a link to the page you created 2 days ago) "Perl 6 projects"
03:06 diakopter )
03:07 alester well, I created it yester
03:07 alester http://rakudo.org/perl-6-projects
03:07 alester brb
03:07 diakopter the log says 2 days 4 hours ago, so that's what I went by
03:09 Alias joined #perl6
03:19 pmichaud I don't know that people are "installing rakudo" yet.
03:20 s1n pmichaud: i could make a Gentoo ebuild for the fakexecutable :)
03:22 pmichaud It would be interesting to see some prebuilt rakudos, yes.
03:22 pmichaud packaging it with parrot is still a bit tricky, I think.
03:24 s1n do we need parrot for the fakexecutable?
03:24 pmichaud yes.
03:24 s1n how does it find parrot?
03:24 s1n from the parrot_config?
03:25 pmichaud it just finds libparrot.so  (on unix systems)
03:25 pmichaud but it also has to be able to find PCT.pbc and PGE.pbc and other libraries.
03:25 s1n it only needs the so?
03:25 s1n how does it find those?
03:25 pmichaud the fakecutable isn't really machine code -- it's just a fancy way of convertinga  .pbc file into an executable.  Internally it's still a .pbc, and wants the Parrot build around in order to run.
03:26 pmichaud (yes, I think it gets the infromation from the parrot config)
03:26 diakopter alester: afaik the two projects (masak's) there on that page have been around for a little while... (since before rakudo left the pnest)
03:26 diakopter alester: but you're not brb
03:27 s1n so if i use --gen-parrot, it will always look under ./parrot/?
03:27 pmichaud yes.
03:27 pmichaud no.
03:27 s1n okay, that won't work then
03:27 s1n oh....
03:27 pmichaud if you use --gen-parrot, it will always look under $PWD/parrot
03:27 pmichaud for example, on my system the fakecutable looks for   /home/pmichaud/rakudo/parrot
03:28 s1n is it looking in that directory for everything, or just the parrot exe?
03:28 s1n i mean, how is that going to work in /usr/bin?
03:28 pmichaud s1n:  I've said for months that parrot's install has issues.
03:28 pmichaud s1n:  the fakecutable isn't intended to be the final solution.
03:28 s1n pmichaud: i realize that, but does it look under $PWD/parrot/?
03:29 pmichaud it looks under whatever directory parrot was built in
03:29 pmichaud no matter where the fakecutable is located, it looks for the parrot build directory.
03:29 s1n oh... that'll be tough
03:29 pmichaud (i.e., the directory where parrot was when the fakecutable was generated)
03:30 s1n you'd have to chroot a fake directory to build...
03:31 s1n ie chroot /home/pmichaud/rakudo/; perl Configure.pl --gen-parrot; make perl6; exit
03:31 s1n that _might_ work
03:32 pmichaud anyway, I think the real solution is to play around with 'make install' from parrot (or perhaps 'make install-dev' and then see what tweaks are needed to rakudo's Makefile to build and run from the installed parrot.
03:34 s1n why not skirt the issue until parrot's install is fixed? if the chroot idea works, sounds like a good stop-gap to me
03:34 pmichaud because I think parrot's install is likely to be fised rsn
03:34 pmichaud *fixed
03:35 s1n if it's about to be fixed, then you might be able to work around it for the mean time
03:35 pmichaud I'm open to considering patches, yes.
03:36 pmichaud it's not something that's a personal priority for me to resolve at the moment.
03:37 s1n well, if there's a semi-working install, i can make a gentoo ebuild for it
03:37 pmichaud Rakudo doesn't even have an 'install' makefile target at the moment.
03:44 Tene pmichaud: got a sec?
03:45 pmichaud sure
03:45 Tene pmichaud: can you tell me which class in the Code hierarchy I should add the .leave() method to?
03:45 pmichaud I would add it directly to Parrot's Sub PMC class.
03:45 pmichaud .namespace ['Sub']
03:45 pmichaud .sub 'leave' :method
03:46 pmichaud ...
03:46 pmichaud .end
03:46 pmichaud at least to get things started.
03:46 Tene src/classes/Sub.pir yes?
03:47 pmichaud yes, it can go there.
03:47 Tene :)
03:47 pmichaud Note that Perl6's Sub isn't the same as Parrot's Sub, though.
03:47 felipe joined #perl6
03:47 Tene :/
03:48 pmichaud it might be more appropriate in Code.pir
03:48 pmichaud but it should go into the ['Sub'] namespace so that it's attached to Parrot's Sub PMC
03:48 Tene If it ends up in ['Sub'], it would be inherited by Perl6's Sub?
03:49 pmichaud sure, since all executable objects are ultimately subclasses of Parrot Sub
03:49 Tene Okay.
03:49 s1n pmichaud: i saw a ticket (frooh's, i can't remember what it was for) where embedded pir was recommended over p6. wouldn't that be somewhat backend dependent?
03:49 pmichaud s1n: yes.
03:49 Tene Also, this adds a handler to every block.  That's not a problem for you?
03:50 pmichaud adding a handler to every block -- I'd prefer to avoid that.
03:50 s1n pmichaud: and it was still recommended for the setting code?
03:50 pmichaud s1n: "setting" simply means "builtins"
03:50 pmichaud s1n:  it doesn't necessarily mean "only written in Perl 6"
03:50 s1n pmichaud: rakudo setting is specific to rakudo's current backend?
03:51 pmichaud s1n:  I suspect that all implementations will have some implementation-specific code in their setting.
03:52 pmichaud Tene: I'm not sure that "leave" should be exception based.
03:52 s1n i was under the impression that setting code was not specific to any particular implementation
03:52 s1n to eliminate the need to reinvent the wheel
03:52 pmichaud s1n: I know a lot of people have been under that impression, but that's not been what I've been saying.
03:52 Tene pmichaud: had a conversation with TimToady and Jonathan a while back about this... lemme try to find it in the logs...
03:53 pmichaud s1n: not every builtin can be written in Perl 6.
03:53 pmichaud s1n:  therefore, by definition, some parts of the setting will be in something other than Perl 6.
03:54 s1n iirc the PIR recommendation was for speed
03:54 pmichaud s1n: speed is part of it, but not the whole story.
03:54 s1n okay, cause i think speed shouldn't be any part of it
03:54 pmichaud my philosophy is that whichever provides the most straightforward implementation is what should be used.
03:55 s1n embedded pir is more straightforward?
03:55 pmichaud in some cases, yes.
03:55 s1n okay, i'll have to take your word for now
03:56 pmichaud If I have to choose between 10-20 lines of Perl 6 code versus 3 lines of inline PIR, I think it's clear that the inline PIR is likely more straightforward.
03:56 Tene pmichaud: approximately here: http://irclog.perlgeek.de/​perl6/2009-03-13#i_983767
03:56 s1n is there no p6 equivalent to xs?
03:57 pmichaud wouldn't xs fall in the category of "implementation dependent"?
03:58 Tene pmichaud: jonathan's plan was to manually walk the call chain (ideally also calling the appropriate LEAVE blocks and such) and then extract the retcont from the appropriate sub and invoke it directly.
03:58 Tene Does that implementation sound more like what you had in mind?
03:58 pmichaud yes.
03:59 pmichaud that also seems to match what TimToady is saying, I think.  (still reading the whole conversation)
04:00 s1n well, by xs equivalent, is there any plan/idea of making a DSL to talk to the backend
04:00 pmichaud s1n: not that I'm aware of.
04:00 s1n or something equally odd
04:00 Tene I haven't heard of any proposals for that.
04:01 mikehh joined #perl6
04:01 alester joined #perl6
04:01 pmichaud s1n:  I suspect that eventually we'll provide a shared "core setting" reference that implementations can borrow from.  But different implementations will want to optimize to different things.
04:01 aindilis joined #perl6
04:01 pmichaud and so each implementation will have parts of its setting that aren't exactly the same as the shared version.
04:01 s1n that's kinda what i was expecting
04:02 pmichaud in Rakudo's case, our parts that aren't the same as the (someday) shared version are the inline PIR sections.
04:03 pmichaud Tene: this is another place where I think that we need some way of representing Contexts as an object
04:04 pmichaud i.e., "leave" is really something we do to a specific invocation of a block/sub
04:04 pmichaud and Parrot doesn't support that very well yet.
04:05 Tene So you'd prefer I don't commit this exception-based leave()?
04:05 pmichaud do we have a strong need for leave() at the moment?
04:06 Tene jonathan was trying to implement it to fix a bug with junctions.
04:06 Tene I never found out the details of the bug, or how serious it is.
04:08 pmichaud the exception-based version of leave puts a control handler in every block?
04:08 Tene Yes.
04:08 pmichaud for routines, is it the same handler that would be handling return ?
04:09 Tene No, at least not currently.
04:09 OuLouFu joined #perl6
04:10 NoirSoldats joined #perl6
04:11 pmichaud Tene: I think it may be worth re-checking with jnthn++ to see if .leave is still needed for handling junction dispatch.
04:11 Tene pmichaud: as of today he still needed it to fix the junctions bug.
04:12 pmichaud okay.
04:13 mberends joined #perl6
04:13 pmichaud thinking.
04:14 Tene I'm working in a branch anyway, so if you need to wait to consult with jonathan, that's fine too.
04:14 pmichaud I think I need to consult with jonathan.
04:14 Tene :)
04:15 pmichaud One of his arguments against doing this in the dispatcher was that blocks would also need a special dispatcher.
04:15 pmichaud But that may no longer be the case since blocks no longer autothread over junctions (iiuc).
04:15 orbii joined #perl6
04:16 pmichaud at least, I _think_ that's what one of the recent synopsis changes indicated.
04:17 kst joined #perl6
04:17 orbii left #perl6
04:17 alester ok back
04:17 alester pmichaud: How are we installing rakudo these days?  Can we yet?
04:17 mberends s1n: hi, currently I'm preparing to wrap Parrot's recently revived (by bacek++ and jnthn++) socket functions in rakudo/src/setting/IO.pm. I cannot imagine doing that without Q:PIR.
04:17 lambdabot mberends: You have 1 new message. '/msg lambdabot @messages' to read it.
04:18 pmichaud alester: rakudo doesn't have a 'make install' target yet.
04:18 Kisu joined #perl6
04:18 alester So how are people developing using it?
04:18 alester Just manually copying to /usr/local/bin
04:18 pmichaud I think they're just using whatever version of perl6 they build.  yes.
04:18 alester but parrot has to be in the path, right?
04:18 pmichaud no.
04:19 alester oh
04:19 pmichaud the fakecutable is tied to the build directory.
04:19 pmichaud so whatever version of parrot was used to build "perl6" has to remain in place.
04:19 alester huh
04:19 alester fakecutable meanin perl6
04:20 Tene executable with embedded parrot
04:20 pmichaud yes, "perl6(.exe)" is a fakecutable.
04:20 mberends not manually copying to /usr/local/bin, symlinking to perl6
04:21 pmichaud which is to say, it's an executable that is linked to the build copy of libparrot.so
04:21 s1n mberends: why not just write it all in PIR?
04:21 mberends I lack the brainz
04:21 pmichaud and contains the perl6.pbc bytecode as a struct (which is then interpreted by the libparrot code)
04:22 pmichaud s1n: getting subroutine signatures correct in PIR is very difficult (especially for MMD).  Using Perl6 for that is much more robust.
04:23 alester I have thrown away my fork
04:23 alester and am starting afresh
04:24 pmichaud also, just because part of the subroutine body is written with Q:PIR doesn't mean the entire body needs to be.
04:26 s1n i just wanted to know why setting mixed code was preferred over plain PIR
04:27 mberends s1n: plain PIR is probably superior in a similar way to assembler being superior to C
04:28 s1n heh yeah i suppose, i wasn't proposing it was superior though
04:28 pmichaud mberends: actually, I suspect that the socket() example you gave earlier can be written in pure Perl 6, though.
04:28 mberends then my efforts are in vain!
04:29 pmichaud no, not in vain.
04:29 pmichaud we still need them to be written.
04:29 pmichaud :-)
04:29 mberends pmichaud, if you give me a short example as style guide, I'll follow that
04:30 pmichaud unfortunately, I don't know the details of Parrot's socket implementation, or of Perl 6's socket design
04:30 pmichaud so it gets a bit nebulous from there
04:30 pmichaud that said...
04:31 pmichaud Parrot's socket opcodes are now specced to be method calls instead
04:31 pmichaud since they're method calls, no PIR is needed -- we can just invoke the methods directly from Perl 6
04:32 pmichaud we still need something to wrap Parrot's idea of sockets into Perl 6's IO objects (or however Perl 6 wants socket io to take place)
04:32 pmichaud it may be that Parrot doesn't ipmlement the method form of socket operations yet.  (I don't know.)
04:32 mberends unless the implementation is procedural, not method calls....yes
04:33 mberends it's the old way, probably
04:33 pmichaud in that case, you'd have to use the socket opcodes in the interim.  However, those are already declared to be incorrect, so I don't know how long they'll survive.
04:33 mberends anything is better than nothing @now, fine to refactor later
04:34 pmichaud at any rate, to use the opcodes -- yes, inline PIR is the way to go.
04:34 mberends phew, not all in vain :)
04:36 mberends pmichaud, some work to date: http://gist.github.com/85885
04:39 pmichaud I'm not sure that "socket sock, domain, type, protocol"  is going to work.
04:39 mberends so after this is completed it's a Parrot job to replace opcodes with methods. That's still foreign territory to me, but interesting :)
04:39 pmichaud "sock" is an IO object, and I'm not sure what parrot's "socket" opcode is expecting.
04:40 mberends parrot/examples/io/httpd.pir:113 has a call like that, and it works
04:41 pmichaud reading that makes me believe that "socket" returns a Socket PMC into sock
04:41 pmichaud i.e., as if someone had written    sock = socket 2, 1, 6
04:42 mberends there are examples like that elsewhere, afair
04:42 pmichaud sure
04:43 pmichaud my point is that it will end up having nothing to do with the $sock parameter
04:43 pmichaud er $socket
04:43 mberends and that would be fatal of course
04:44 pmichaud so I _think_ what the socket opcode is doing is creating a new Socket PMC, and setting the 'sock' register to that PMC
04:44 pmichaud your routine would then need to get it into the IO object represented by $socket
04:45 mberends yes, other code refers to sock as pmc indeed
04:45 kimtaro_ joined #perl6
04:47 mberends currently the bare socket pmc is enough for me. an IO object is a higher level thing that I intend to approach later, if that could work in the interim.
04:48 pmichaud sure, that can work.
04:48 mberends (the current Q:PIR is outside of setting/IO.pm)
04:48 mberends doing this in two stages :)
04:48 pmichaud It's the "IO" constraint on the first parameter that was throwing me off.
04:49 pmichaud s/was/is/
04:49 kimtaro joined #perl6
04:50 s1n joined #perl6
04:50 mberends it could be re-typed to whatever P6 finds convenient. a packed binary string?
04:50 pmichaud it doesn't have to be typed at all.
04:50 mberends ok
04:51 pmichaud or, I should say -- it doesn't have to be constrained at all.
04:51 mberends thanks, this gives me enough food for thought atm
04:53 mberends socket !=== IO, thus
04:54 mberends sub socket( $socket, Int $domain, Int $type, Int $protocol ) { Q:PIR ... }
04:54 drbean_ joined #perl6
04:55 kimtar___ joined #perl6
04:55 kimtaro joined #perl6
05:00 pmichaud afk # battery low
05:15 nww joined #perl6
05:23 alc joined #perl6
05:30 takadonet joined #perl6
05:32 nww left #perl6
05:35 takadonet left #perl6
05:41 masak joined #perl6
05:42 mberends masak: hi!
05:48 masak mberends: hello!
05:48 mberends i could not sleep... head full of pir and sockets
05:49 masak 哈哈
05:49 masak I'm up because I've temporarily managed to get my sleep right. back to 11:30-5:00 sleep.
05:49 masak sorry, s/11/10/.
05:49 mberends sounds good :)
05:49 masak aye.
05:53 masak plans for the day: some gratuitous Druid programming; trying to get the Lobster running.
05:53 mberends good job!
05:53 masak yeah -- looking forward to it.
05:54 masak the fact that I will have to do a $WORK day will probably distract me a bit, though.
05:54 masak hopefully not too much.
05:54 mberends this HTTP::Daemon socket refit is giving this pir n00b quite a few errors :P
05:55 masak tell me about it.
05:56 masak PIR is non-trivial.
05:56 masak luckily, there is often good source material to copy from.
05:56 mberends Method 'HOW' not found for invocant of class 'Sockaddr' WTF?
05:56 masak :)
05:57 masak mberends: do you define Sockaddr in PIR?
05:57 mberends I think bacek++ did, but all in lowercase. that is part of my confusion.
05:58 masak ah.
05:58 masak yes, that's unusual for a class name.
06:01 bacek_ no, it's not.
06:01 bacek_ Sockaddr is parrot's class, not Rakudo's.
06:01 masak ah.
06:01 bacek_ So it doesn't has all fancy stuff
06:01 mberends you should try ./parrot ./examples/io/httpd.pir - it rocks!
06:02 * masak tries
06:02 parduncia joined #perl6
06:06 mberends masak: parrot r37707
06:06 masak aye.
06:06 masak whoa.
06:09 mberends the source in examples/io/httpd.pir is my main guide atm
06:10 masak sounds good.
06:10 masak mberends++
06:39 finanalyst joined #perl6
06:40 eternaleye joined #perl6
07:09 eternaleye joined #perl6
07:20 masak wow, I'm getting spoiled. writing Perl 5 code, thinking "what, I can't loop over three elements at a time? I have to adapt my _data structure_ to the inadequacies of the language?"
07:22 moritz_ masak: List::MoreUtils::natatime
07:22 masak moritz_: thank you. :)
07:22 moritz_ good morning btw ;-)
07:22 masak likewise. :)
07:22 masak I solved it with AoA instead. feels slightly more light-weight in this case.
07:23 cotto joined #perl6
07:30 finanalyst morning all.
07:31 finanalyst I have been playing with junctions some more and have some questions
07:31 finanalyst any body interested in helping?
07:33 disismt joined #perl6
07:34 masak sure.
07:40 masak (and in general, just ask the questions you have, don't necessarily bother asking if it's ok to ask them.)
07:41 kate21de joined #perl6
07:55 araujo joined #perl6
07:59 finanalyst masak: thanx. I am very grateful for the extra understanding. I am trying to be polite to a group of people I have never met in person
07:59 masak finanalyst: no need. :) just ask your questions already.
07:59 masak I'm curious. :)
08:01 finanalyst rakudo: my @x=1|11,2,1|11; my $s=[+] @x; my $p=[+](@x,1); say 's '~$s.perl; say 'p '~$p.perl
08:01 p6eval rakudo bb22e0: OUTPUT«s any(any(4, 14), any(14, 24))␤p any(any(5, 15), any(15, 25))␤»
08:01 finanalyst here we have two series. For the game of 21, I need to get rid of values > 21
08:02 finanalyst then compare the maximum values in each series
08:02 finanalyst How do I filter out the unncessary values?
08:02 moritz_ don't use junctions for that.
08:02 masak grep?
08:02 finanalyst what should be used if not junctions?
08:03 moritz_ arrays
08:03 finanalyst it doesnt seem to me to be a set question
08:03 moritz_ or custom data structures
08:03 finanalyst we are looking at possible permutations, not all of which are needed
08:04 finanalyst grep on what?
08:04 moritz_ rakudo: my @a = 1, 2, 11; my @b = 11, 1; (@a X+ @b).grep({ $_ <= 21 }).perl.say
08:04 p6eval rakudo bb22e0: OUTPUT«[12, 2, 13, 3, 12]␤»
08:05 moritz_ something along these lines
08:05 moritz_ but I don't know from which arrays you want to calculate the permutations
08:06 finanalyst a hand of  cards in which an ace can have a value of 1 or 11 depending on the context.
08:06 moritz_ hm
08:07 moritz_ rakudo: my @a = 1|11, 2, 1|11; (@a X+ @b).grep({ $_ <= 21}).perl.say
08:07 p6eval rakudo bb22e0: OUTPUT«Scope not found for PAST::Var '@b' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
08:07 moritz_ rakudo: my @a = 1|11, 2, 1|11; (@a X+ @a).grep({ $_ <= 21}).perl.say
08:07 p6eval rakudo bb22e0: OUTPUT«[any(any(2, 12), any(12, 22)), any(3, 13), any(any(2, 12), any(12, 22)), any(3, 13), 4, any(3, 13), any(any(2, 12), any(12, 22)), any(3, 13), any(any(2, 12), any(12, 22))]␤»
08:08 finanalyst in the two sets i gave above, both hands (@x, (@x,1)) have two aces and a single card with another value
08:08 finanalyst the winning hand should have value 15 winning over 14
08:08 moritz_ finanalyst: when you use junctions for that, then the results of your calculations will be junctions again, which you probably don't want
08:10 moritz_ and when you find a good collapsing behaviour you might answer the question "which set won" but not by which combination
08:10 finanalyst i am experimenting with junctions to see if they fit this problem area
08:10 PacoLinux joined #perl6
08:10 finanalyst junctions are interesting and I have never used them before
08:10 finanalyst so finding the right collapsing behaviour is what I am trying to understand
08:11 moritz_ probably because no other programming language implements them ;-)
08:11 moritz_ rakudo: say ?(any(3, 14, 4) > all(12, 4))
08:11 p6eval rakudo bb22e0: OUTPUT«1␤»
08:11 finanalyst but it does seem to me that there should be a way to eliminate from the junction values that are wrong
08:11 finanalyst some sort of filter
08:11 moritz_ rakudo: say ?(any(3, 14, 4) > all(15, 4))
08:12 p6eval rakudo bb22e0: OUTPUT«0␤»
08:12 moritz_ finanalyst: you're trying to use them as sets again :)
08:12 alc joined #perl6
08:12 finanalyst possibly. I seem to be SET in my ways :)
08:12 moritz_ ;-)
08:13 moritz_ finanalyst: so do junctioins setisfy you? *g*
08:14 eternaleye joined #perl6
08:14 finanalyst rakudo: my @x=1|11,2,1|11; my $s=[+] @x; my $p=[+](@x,1); say 's '~$s.perl; say 'p '~$p.perl;say ?(any($s) > all($p))
08:14 p6eval rakudo bb22e0: OUTPUT«s any(any(4, 14), any(14, 24))␤p any(any(5, 15), any(15, 25))␤1␤»
08:16 moritz_ you use all() on one element, so it has no effect
08:16 finanalyst this is the wrong result, because the 24 in $s is greater than the 5 in $p. Whereas what we want is the 15 in $p > 14 in $s
08:16 moritz_ you'd have to construct the junction as all() junction all the way first
08:16 WootKit joined #perl6
08:18 finanalyst rakudo: my @x=1&11,2,1&11; @y=1&11,3,1&11;my $s=[+] @x; my $p=[+]@y; say 's '~$s.perl; say 'p '~$p.perl;say ?(any($s) > all($p))
08:18 p6eval rakudo bb22e0: OUTPUT«Scope not found for PAST::Var '@y' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
08:18 finanalyst rakudo: my @x=1&11,2,1&11;my @y=1&11,3,1&11;my $s=[+] @x; my $p=[+]@y; say 's '~$s.perl; say 'p '~$p.perl;say ?(any($s) > all($p))
08:19 p6eval rakudo bb22e0: OUTPUT«s all(all(4, 14), all(14, 24))␤p all(all(5, 15), all(15, 25))␤0␤»
08:19 finanalyst rakudo: my @x=1&11,2,1&11;my @y=1&11,3,1&11;my $s=[+] @x; my $p=[+]@y; say 's '~$s.perl; say 'p '~$p.perl;say ?(any($s) < all($p))
08:19 p6eval rakudo bb22e0: OUTPUT«s all(all(4, 14), all(14, 24))␤p all(all(5, 15), all(15, 25))␤0␤»
08:19 DemoFreak joined #perl6
08:22 moritz_ finanalyst: what you really need is a list of all possible values for each set. And then on lists you can say any(@a) < all(@b)
08:23 finanalyst but i also need to filter out values in any set > 21
08:23 finanalyst if any of @a > 21, they will win over any of @b < 21. Not correct behaviour
08:24 moritz_ that's why you need lists - you can filter them easily with grep
08:25 moritz_ rakudo: my @set = (1, 11) X+ 3 X+ (1, 11); @set.perl.say
08:25 p6eval rakudo bb22e0: OUTPUT«too many arguments passed (3) - 2 params expected␤current instr.: 'infix:X+' pc 197018 (src/gen_metaop.pir:1352)␤»
08:25 moritz_ rakudo: my @set = ((1, 11) X+ 3) X+ (1, 11); @set.perl.say
08:25 p6eval rakudo bb22e0: OUTPUT«[5, 15, 15, 25]␤»
08:25 finanalyst may be this problem should be solved in a different way. But is it wrong to want a filter for junction values?
08:26 moritz_ it's not wrong to want it, but that's not how they are designed
08:26 moritz_ rakudo: my @set = ((1, 11) X+ 3) X+ (1, 11); @set.grep({$_ <= 21 }).perl.say
08:26 p6eval rakudo bb22e0: OUTPUT«[5, 15, 15]␤»
08:26 moritz_ finanalyst: you can create the sets like that
08:26 moritz_ and then use any(@set1) < all(@set2)
08:26 finanalyst i can see that, thanx
08:27 moritz_ rakudo:  [X+] [1, 11], 3, [1, 11]
08:27 p6eval rakudo bb22e0: OUTPUT«Statement not terminated properly at line 1, near "+] [1, 11]"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:28 moritz_ :(
08:28 finanalyst i was just thinking the same!
08:28 moritz_ meta operators are sort of hacked into rakudo right now
08:28 moritz_ std: [X+] [1, 11], 3, [1, 11]
08:28 p6eval std 26002: OUTPUT«##### PARSE FAILED #####␤Can't reduce a additive operator because it's diffy and not chaining at /tmp/01EQmClno4 line 1:␤------> [32m[X+][31m [1, 11], 3, [1, 11][0m␤    expecting prefix_circumfix_meta_operator__S_100reduce␤FAILED 00:02 35m␤»
08:29 finanalyst rakudo: [X+] ([1,11],3,[1,11])
08:29 p6eval rakudo bb22e0: OUTPUT«Statement not terminated properly at line 1, near "+] ([1,11]"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:30 moritz_ rakudo: ([1,11], 3, [1,11]).reduce({$^a [X+] $^b})
08:30 finanalyst rakudo: << X+ << ([1,11],3,[1,11])
08:30 p6eval rakudo bb22e0: OUTPUT«Statement not terminated properly at line 1, near "[X+] $^b})"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:30 p6eval rakudo bb22e0: OUTPUT«Syntax error at line 1, near "<< X+ << ("␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
08:30 moritz_ rakudo: ([1,11], 3, [1,11]).reduce({$^a X+ $^b})
08:30 p6eval rakudo bb22e0: RESULT«[3]»
08:30 moritz_ rakudo: ([1,11], 3, [1,11]).reduce({@($^a) X+ @($^b)})
08:31 p6eval rakudo bb22e0: RESULT«[5, 15, 15, 25]»
08:31 moritz_ scary.
08:31 finanalyst aha
08:31 * moritz_ should blog about it :)
08:32 finanalyst does this mean that [X+] should work and that the .reduce is a workaround?
08:32 moritz_ no, STD.pm says it doesn't work, because of associativity issues (which I don't understand, frankly)
08:33 moritz_ anyway, got to go, bbl
08:33 masak moritz_: o/
08:34 finanalyst thanx.
08:34 masak further insights into SVG bring me one step closer to actually being able to publish that blog post about the Druid refactor.
08:39 kst joined #perl6
09:12 ejs joined #perl6
09:16 WootKit joined #perl6
09:16 WootKit ;@echo off
09:16 WootKit ;goto make
09:16 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:16 WootKit ;
09:17 WootKit ;  beeper - Kernel Mode Drive
09:17 WootKit ;  Makes beep thorough computer speaker
09:17 WootKit ;
09:17 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:17 WootKit .386
09:17 WootKit .model flat, stdcall
09:17 WootKit option casemap:none
09:17 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:17 masak WootKit: stop that, please.
09:17 WootKit ;                              I N C L U D E   F I L E S
09:17 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:17 WootKit include \masm32\include\w2k\ntstatus.inc
09:17 WootKit include \masm32\include\w2k\ntddk.inc
09:17 WootKit include \masm32\include\w2k\hal.inc
09:17 * jnthn lost his op bit :-(
09:17 WootKit includelib \masm32\lib\w2k\hal.lib
09:17 mberends oy! stop trying to beep my speaker!
09:17 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:17 WootKit ;                                     E Q U A T E S
09:17 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:17 WootKit TIMER_FREQUENCY        equ 1193167                   ; 1,193,167 Hz
09:17 WootKit OCTAVE                 equ 2                         ; octave multiplier
09:17 WootKit PITCH_C                equ 523                       ; C        -  523,25 Hz
09:17 * masak doesn't regularly have one, since he logs out regularly :/
09:17 WootKit PITCH_Cs               equ 554                       ; C#       -  554,37 Hz
09:17 WootKit PITCH_D                equ 587                       ; D        -  587,33 Hz
09:18 WootKit PITCH_Ds               equ 622                       ; D#       -  622,25 Hz
09:18 masak any op here?
09:18 WootKit PITCH_E                equ 659                       ; E        -  659,25 Hz
09:18 WootKit PITCH_F                equ 698                       ; F        -  698,46 Hz
09:18 WootKit PITCH_Fs               equ 740                       ; F#       -  739,99 Hz
09:18 jnthn .oO( So this is the earliest I woke up on a week day for ages and already I can see it was a bad idea )
09:18 WootKit PITCH_G                equ 784                       ; G        -  783,99 Hz
09:18 WootKit PITCH_Gs               equ 831                       ; G#       -  830,61 Hz
09:18 WootKit PITCH_A                equ 880                       ; A        -  880,00 Hz
09:18 WootKit PITCH_As               equ 988                       ; B        -  987,77 Hz
09:18 WootKit PITCH_H                equ 1047                      ; H        - 1046,50 Hz
09:18 WootKit ; We are going to play c-major chord
09:18 WootKit TONE_1                 equ TIMER_FREQUENCY/(PITCH_C*OCTAVE)
09:18 masak jnthn: one gets used to it.
09:18 WootKit TONE_2                 equ TIMER_FREQUENCY/(PITCH_E*OCTAVE)
09:18 WootKit TONE_3                 equ (PITCH_G*OCTAVE)           ; for HalMakeBeep
09:18 WootKit DELAY                  equ 1800000h                   ; for my ~800mHz box
09:18 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:18 WootKit ;                                         M A C R O S
09:18 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:18 WootKit DO_DELAY MACRO
09:18 WootKit mov eax, DELAY
09:18 WootKit .while eax
09:18 WootKit dec eax
09:18 WootKit .endw
09:18 WootKit ENDM
09:19 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:19 WootKit ;                                            C O D E
09:19 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:19 * masak ignores #perl6 until the dust settles
09:19 moritz_ WootKit: stop that
09:19 WootKit .code
09:19 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:19 araujo ?
09:19 WootKit ;                                            MakeBeep1
09:19 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:19 masak glad I'm not the idiot this time.
09:19 WootKit MakeBeep1 proc dwPitch:DWORD
09:19 WootKit ; Direct hardware access
09:19 WootKit cli
09:19 * araujo thought for a moment this was a new bot
09:19 WootKit mov al, 10110110y
09:19 WootKit out 43h, al
09:19 moritz_ we need more ops
09:19 WootKit mov eax, dwPitch
09:19 WootKit out 42h, al
09:19 WootKit mov al, ah
09:19 WootKit out 42h, al
09:19 WootKit ; Turn speaker ON
09:19 WootKit in al, 61h
09:19 WootKit or  al, 11y
09:19 masak WootKit--
09:19 WootKit out 61h, al
09:19 WootKit sti
09:19 WootKit DO_DELAY
09:20 WootKit cli
09:20 WootKit ; Turn speaker OFF
09:20 WootKit in al, 61h
09:20 WootKit and al, 11111100y
09:20 WootKit out 61h, al
09:20 WootKit sti
09:20 WootKit ret
09:20 WootKit MakeBeep1 endp
09:20 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:20 WootKit ;                                            MakeBeep2
09:20 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:20 WootKit MakeBeep2 proc dwPitch:DWORD
09:20 WootKit ; Hardware access using WRITE_PORT_UCHAR and READ_PORT_UCHAR
09:20 WootKit ; functions from hal.dll
09:20 WootKit cli
09:20 WootKit invoke WRITE_PORT_UCHAR, 43h, 10110110y
09:20 masak but wait -- there's more!
09:20 WootKit mov eax, dwPitch
09:20 WootKit invoke WRITE_PORT_UCHAR, 42h, al
09:20 WootKit mov eax, dwPitch
09:20 WootKit invoke WRITE_PORT_UCHAR, 42h, ah
09:20 WootKit ; Turn speaker ON
09:20 WootKit invoke READ_PORT_UCHAR, 61h
09:20 WootKit or  al, 11y
09:20 jnthn I wish some of the cdoe I worked on was this weel commented..
09:21 WootKit invoke WRITE_PORT_UCHAR, 61h, al
09:21 WootKit sti
09:21 WootKit DO_DELAY
09:21 WootKit cli
09:21 WootKit ; Turn speaker OFF
09:21 WootKit invoke READ_PORT_UCHAR, 61h
09:21 WootKit and al, 11111100y
09:21 WootKit invoke WRITE_PORT_UCHAR, 61h, al
09:21 WootKit sti
09:21 WootKit ret
09:21 WootKit MakeBeep2 endp
09:21 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:21 WootKit ;                                       DriverEntry
09:21 WootKit ;:::::::::::::::::::::::::::::::::::::::::::::::::​::::::::::::::::::::::::::::::::::::::::::::::::::
09:21 WootKit DriverEntry proc pDriverObject:PDRIVER_OBJECT, pusRegistryPath:PUNICODE_STRING
09:21 WootKit invoke MakeBeep1, TONE_1
09:21 WootKit invoke MakeBeep2, TONE_2
09:21 WootKit ; Hardware access using hal.dll HalMakeBeep function
09:21 WootKit invoke HalMakeBeep, TONE_3
09:21 WootKit DO_DELAY
09:21 WootKit invoke HalMakeBeep, 0
09:21 WootKit mov eax, STATUS_DEVICE_CONFIGURATION_ERROR
09:21 masak it's assembler -- comments are even more important than in HLLs.
09:22 masak thank the gods.
09:22 Matt-W woohoo
09:22 Matt-W we do need someone who's usually around at this time of day to be an op
09:22 mberends joined #perl6
09:22 moritz_ that used to be me and jnthn
09:22 Matt-W oh yes
09:22 moritz_ but we lost our ops some time ago
09:22 Matt-W so it did
09:22 Matt-W hmm
09:22 jnthn Yeah, lost it when feather had its maint.
09:24 amoc wo- what a storm,
09:25 netsquire joined #perl6
09:33 amoc i think it would be better to have ChanServ or the like.
09:33 Maghnus joined #perl6
09:37 donaldh joined #perl6
09:40 masak 2009-03-26 marks the date when I switch a mid-sized task from Perl 5 to Perl 6 for the first time. my Perl 5 regex segfaulted. the Perl 6 regex works, but is slow as tar.
09:41 netsquire left #perl6
09:41 rgs stack overflow ?
09:42 moritz_ or with embedded closures?
09:42 masak might be. I don't know enough about Perl 5 internals to tell.
09:42 masak I don't see an immediate reson why my regex would be a resource hog in any way.
09:42 rgs if there's lots of backtracking, that might be it
09:42 masak there isn't.
09:43 masak it was a very innocent regex.
09:43 rgs no-one is innocent
09:43 moritz_ with nested quantifiers?
09:43 masak but I'm OT now. I'll see if I submit a bug about it.
09:43 masak moritz_: can you give an example?
09:43 rgs (a*)*
09:43 masak hm, yes.
09:43 moritz_ that might explain it
09:44 moritz_ because it can match in many different ways, when forced to backtrack
09:44 moritz_ sometimes (?>...) around the inner group can help
09:44 moritz_ or *+, if you use 5.10
09:45 masak ok.
09:46 masak I still don't see why it backtracks, but what you say makes a great deal of sense.
09:46 moritz_ consider a regex line (a*)*b when matching agaisnt aaaa.....aa (no trailing b)
09:46 moritz_ then it'll first try to match all a's with the inner a*
09:47 moritz_ and one repetition of the (...) group
09:47 moritz_ then fails to match b
09:47 wayland76 joined #perl6
09:47 moritz_ then backtracks, tries to match the a's differently
09:47 masak right.
09:47 moritz_ so it tries all lengths of a's for the inner (a*)
09:47 rgs that's where "cut"ing the match is useful
09:48 masak my inner one was [^)]+, directly followed by a \)
09:48 masak so I suppose a cut there is only reasonable.
09:48 moritz_ (actually in my example it won't, because it'll look for a literal b and detects its absence rather quickly
09:48 rgs :: in P6, no ?
09:48 moritz_ but if you take a char class like [bc] instead of b, that optimization doesn't work)
09:49 moritz_ rgs: in P6, you usually just use a 'token' for the inner group, that prevents backtracking automatically
09:49 masak hm, it still segfaults, even after I add (?> ... )
09:49 moritz_ token inner { a* }; if $str ~~ / <inner>+/ { ... }
09:50 moritz_ yes, we have backtracking control with :, :: and :::, but tokens are so much easier to write :-)
09:50 rgs and to read
09:50 moritz_ :)
09:52 masak hm, my string is one million characters long. that might simply be it.
09:52 moritz_ yes
09:52 masak but Rakudo++ for processing it, albeit slowly.
09:52 moritz_ perl 5 thinks that Inf (in regexes) is 2**15, or so
09:52 masak this is the first instance where Rakudo excels in terms of stability over perl.
09:53 mberends is that a substring of your DNA ;)
09:53 masak moritz_: that sounds bad. :P
09:53 masak mberends: I'm not at liberty to tell.
09:53 masak mberends: but I do work in bioinformatics.
09:53 mberends thought so...
09:53 moritz_ masak: that's back from the auld days, when memory was scarce
09:54 moritz_ but I guess it's harder to upgrade than s/int16/int64/ in a few places
09:54 moritz_ otherwise somebody would have done it by now
09:55 masak ah, the auld days.
09:55 jnthn aulde. :-P
09:56 jnthn (erm. I think.)
09:56 moritz_ (that one Burns Supper seems to have spoiled me)
09:56 moritz_ jnthn: probably depends on how far back you go
09:56 moritz_ it's spelled without e in 'auld lang syne'
09:57 masak indeede.
09:57 mberends maybe it was 'ye olde days'
09:57 jnthn Oh? I always had it as aulde in that sentence. :-) But you're probably right.
09:57 jnthn mberends: Oh, yes!
09:57 jnthn That's probably what I was thinking of....
10:04 amoc wow: All tests successful.
10:05 masak it would sometimes be useful to have something that visualized how much a given regex matched a given string.
10:06 * mberends saw a 'regex explorer' once, but cannot remember where
10:07 mberends http://www.ivysim.com/tools/regex/
10:08 moritz_ masak: $/.perl :-)
10:08 masak :)
10:08 moritz_ that's why I wrote it :-)
10:09 mberends :-) # just add SVG
10:09 moritz_ mberends: that's a very neat idea
10:09 mberends oh
10:13 masak aha -- there was a bug in my set of assumptions.
10:14 masak regexes++
10:16 Tene masak: http://pleasedieinafire.net/cgi-bin/regex-graph
10:16 Tene masak: it's a thin CGI wrapper around GraphViz::Regex
10:16 masak Tene: nice. I think I've seen that one before.
10:16 masak that's probably what I had in mind when I wished a moment ago.
10:17 Tene doesn't show how a specific string matches, though.
10:17 masak ah, no.
10:17 Tene but still useful
10:17 masak but still neat.
10:17 Tene I love using it for teaching regex
10:17 masak I can imagine.
10:18 * masak boggles at how graphviz manages to draw curved arrows
10:19 Tene hm?
10:19 moritz_ why is there no arrow from a to a succeed node?
10:19 amoc is anyone have perl6-mode for emacs ?
10:19 masak Tene: it seems a nontrivial problem to me.
10:19 moritz_ masak: it is.
10:20 moritz_ amoc: there's an old one in the pugs repo, in tools/ or so
10:20 amoc thx!
10:20 moritz_ masak: I used to render my gpg keyring with graphviz, and it just took ages
10:20 Tene moritz_: <repeat> nodes mean "match the solid line as many times as indicated in the label, then follow the dashed line when the solid line can't match anymore
10:20 Tene If that's what you meant
10:20 Tene otherwise, I don't understand the question.
10:21 moritz_ vim users have more luck, literal++ update perl6.vim
10:21 moritz_ Tene: the (foo)+ has a Succeed node after it, the a* not. Why?
10:21 Tene moritz_: unsure
10:22 Tene moritz_: it generates the graph by watching how perl compiles the regex
10:22 Tene so that's how perl itself represents it
10:22 moritz_ Tene: I figured, yes
10:22 Tene I suspect it's related to ()s
10:23 * moritz_ tries with (?:..) instead
10:24 moritz_ doesn't make a difference
10:24 moritz_ weird.
10:34 Tene_ joined #perl6
10:54 disismt joined #perl6
11:03 ruoso joined #perl6
11:03 moritz_ std: 1 X+ 2 X+ 3
11:03 p6eval std 26002: OUTPUT«ok 00:02 35m␤»
11:03 moritz_ std: [X+] 1, 2, 3
11:03 p6eval std 26002: OUTPUT«##### PARSE FAILED #####␤Can't reduce a additive operator because it's diffy and not chaining at /tmp/TDP38P7QsE line 1:␤------> [32m[X+][31m 1, 2, 3[0m␤    expecting prefix_circumfix_meta_operator__S_100reduce␤FAILED 00:02 35m␤»
11:04 moritz_ I don't understand the difference
11:04 moritz_ why is the first form allowed, but not the second form?
11:04 jnthn The error looks dubious too.
11:04 moritz_ and what is 'diffy'? my dictionary doesn't know it
11:05 moritz_ let's hilight TimToady, in the hope that he'll backlog and either explains or fixes :-)
11:08 amoc quote: Any infix operator (except for non-associating operators) can be surrounded by square brackets in term position to ....
11:08 amoc std: [+] 1, 2, 3
11:08 p6eval std 26002: OUTPUT«ok 00:02 37m␤»
11:09 mberends jnthn, do you have time to help me with some pir problems?
11:11 amoc std: [,] 1, 2, 3
11:12 p6eval std 26002: OUTPUT«ok 00:02 37m␤»
11:12 jnthn mberends: ish :-)
11:13 mberends send me away when you've had enough :-) this file has 2 problems: http://gist.github.com/86012
11:14 mberends lines 41 and 108
11:17 amoc o_O........ i think it's just a parse error as it shows,
11:17 mikehh joined #perl6
11:17 kst joined #perl6
11:18 * ruoso was pondering what kinds of magics a Set type would provide...
11:18 jnthn mberends: I think passing around the SockAddr PMC directly may work out to be a bad idea...
11:18 meppl joined #perl6
11:19 jnthn mberends: I'd probably have a Perl 6 address object or something, which encapsulates it as a field.
11:19 moritz_ jnthn: try to assign it to an $Ithing register first
11:19 mberends yes, a better idea would be very welcome
11:19 jnthn mberends: Also a warning
11:19 moritz_ erm, I meant mberends
11:19 jnthn I'd avoid using the opcode versions of the ops and go for the methods on the socket PMC
11:19 moritz_ oh, it's an int already
11:19 jnthn Because the opcodes are endangered.
11:19 * moritz_ should read first
11:20 donaldh joined #perl6
11:21 mberends jnthn, methods as in line 124?
11:21 bacek joined #perl6
11:21 jnthn mberends: Exactly.
11:22 jnthn mberends: Also bacek may have some hints. ;-)
11:22 * ruoso .oO( my @cardvalues = set( set(1,11), 2..13 ); my $sum = [+] @cardvalues[1,8,2]; say $sum.perl; # set(11,21)
11:22 mberends bacek: hi, your breakthrough has given me lots of work :) http://gist.github.com/86012
11:32 bacek good evening :)
11:33 wayland76 evening++ :)
11:33 charsbar joined #perl6
11:36 bacek mberends: you probably shouldn't spend your time wrapping parrot's sockets into Rakudo's functions.
11:40 mberends bacek: right. I don't really know what else to do though. pmichaud++ also mentioned that Parrot sockets are deprecated.
11:40 bacek mberends: and I'm currently getting rid of them :)
11:40 mberends aha! :)
11:41 * bacek implemented too old spec. Like 1 week old...
11:41 mberends heh
11:42 jnthn bacek: You implemented the method versions as well though, I think?
11:42 bacek jnthn: yes. But examples/io/httpd.pir uses opcodes. And there is no method for "sockaddr".
11:43 jnthn bacek: Ah.
11:56 bacek jnthn: got few minutes to apply another patch? :)
11:57 jnthn bacek: Give me a link - I'll do it soonish
11:58 bacek jnthn: http://gist.github.com/86041
11:59 bacek http://gist.github.com/86043 is log for it
12:04 bacek mberends: (about your gist). You can leave "socket" and "sockaddr". "bind" and "connect" should "just works". Even without my latest patches.
12:05 bacek and "socket" and "sockaddr" returns PMCs.
12:06 mberends bacek: I shall try. But, I do not know how to work with the PMCs in Rakudo :/
12:07 bacek mberends: is just objects.
12:08 exodist joined #perl6
12:09 bacek rakudo: my $sock = Q:PIR{ %r = socket 2,1,6 }; my $a = Q:PIR{ %r = sockaddr "www.ibm.com", 80 }; $sock.connect($a); $sock.print("HEAD / HTTP/1.0\r\n\r\n"); for $sock.readline { .say }
12:09 p6eval rakudo bb22e0: OUTPUT«error:imcc:syntax error, unexpected INTC, expecting '(' ('2')␤     in file 'EVAL_17' line 42␤error:imcc:syntax error, unexpected STRINGC, expecting '(' ('"www.ibm.com"')␤     in file 'EVAL_17' line 46␤Could not find non-existent sub socket␤current instr.: '_block14' pc 61
12:09 p6eval ..(EVAL_17:42)␤»
12:10 mberends bacek: $sock nice object :) very nice :)
12:11 bacek mberends: I've got plenty of them. Main problem to find proper pair :)
12:12 mberends plenty sockets here too, all disconnected ;)
12:15 cognominal joined #perl6
12:16 masak rakudo: .say for .split(",") for <a,b,c d,e,f> # should this work?
12:16 p6eval rakudo bb22e0: OUTPUT«Use of uninitialized value␤␤Could not find non-existent sub for␤current instr.: '_block14' pc 186 (EVAL_17:78)␤»
12:16 masak rakudo: (.say for .split(",")) for <a,b,c d,e,f>
12:16 p6eval rakudo bb22e0: OUTPUT«a␤b␤c␤d␤e␤f␤»
12:17 jnthn std:  .say for .split(",") for <a,b,c d,e,f>
12:17 p6eval std 26002: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/oEBV9ZF9XV line 0:␤------> [32m[31m[0m␤    expecting any of:␤    infix or meta-infix␤      infix stopper␤    parameterized block␤      standard stopper␤FAILED 00:04 35m␤»
12:20 mberends bacek: on r37707 sockaddr says get_bool() not implemented in class 'Sockaddr', $sock.print segfaults. I probably need to update with your latest patches :)
12:21 bacek mberends: hmm...
12:23 bacek mberends: give me few minutes to check. It definitely should'n segfault.
12:24 mberends no prob
12:41 alanhaggai joined #perl6
12:42 zamolxes joined #perl6
12:42 dKingston joined #perl6
12:43 mberends bacek: built a separate Rakudo r37744, and sockaddr there seems to work ok. $sock.print still segfaults though.
12:47 DemoFreak joined #perl6
12:50 disismt joined #perl6
12:51 alester joined #perl6
13:18 mikehh rakudo (bb22e02) builds on parrot r37743 - make test/make spectest PASS = Kubuntu Intrepid i386
13:20 ruoso joined #perl6
13:39 masak rakudo: /<[-]>/
13:39 p6eval rakudo bb22e0: OUTPUT«perl6regex parse error: Unescaped '-' in charlist (use '..' or '\-') at offset 3, found '-'␤current instr.: 'parrot;PGE;Perl6Regex;parse_error' pc 10167 (compilers/pge/PGE/Perl6Regex.pir:1219)␤»
13:41 masak pmichaud: I guess it's a conscious decision to make '-' illegal in character enumerations as the one above? have you considered loosening the restriction to only the inside of such an enumeration? if it occurs at the ends, what the programmer means is probably a literal '-'. I see nothing about this in S05.
13:44 donaldh left #perl6
13:47 hercynium joined #perl6
13:47 mberends masak, S05:127 reserves such cases for future use, afaics
13:47 masak ah.
13:47 * masak looks
13:48 moritz_ in character classes?
13:48 masak right.
13:48 masak mberends: no, that does not apply.
13:49 moritz_ character classes have their own syntax
13:50 masak a language within a language within a language.
13:50 PerlJam putting - in a character class is likely a perl5-thinko.  I think Larry wanted to ween people away from that usage by making it illegal for a while.
13:50 masak fair enough.
13:50 masak it's consistent, too.
13:50 mberends are character classes exempt from S05:85 and S05:95?
13:51 masak I just had the natural reaction when being bitten by the error despite knowing what I was doing.
13:52 masak mberends: they are at least exempt from S05:95, AFAICT.
13:52 masak at least most of them.
13:52 moritz_ PerlJam: it could be allowed at start or end of a character class though
13:52 masak notable exceptions being \- and \] and \\
13:53 moritz_ and let's face it, /<[-]>/ is such a nice smiley, it would be a shame to forbid them :-)
13:55 mberends /<['-']>/ has cute eyes :-)
13:56 moritz_ /<[°-°]>/
13:56 moritz_ /<[°+°]>/ # that's even a valid regex
13:56 masak mberends: aye, but /<['-']>/ does not mean a quoted dash.
13:56 mberends gotta invent a purpose for those !
13:57 masak we could use it as a Rakudo logo!
13:57 * masak ducks
13:57 mberends they all look like pokemon faces
13:59 PerlJam mberends: I'd say that <[-]> complaining is because of S05:85 and S05:95.
14:00 masak PerlJam: in that case, it'd be complaining for <[+]> as well.
14:01 PerlJam masak: I agree :)
14:01 PerlJam (Assuming you mean that to be a character class of one character)
14:01 * masak has no energy for arguing with people who agree with him
14:01 masak PerlJam: aye.
14:06 PerlJam I think perhaps (after a quick skim of S05) that meta/non-meta characters in character classes needs to be made explicit.   I would expect that any non-alphanumeric inside a character class to be meta unless it had quotes around it.  So you'd need to use <['!'..'?']>  instead of <[!..?]>  (not to mention how you match a space character as part of the class :)
14:06 PerlJam (quotes or backwhacked with \)
14:06 masak time to email p6l, it seems.
14:07 masak PerlJam: but it's already been established that quotes don't work that way in character classes.
14:08 masak on that point I've had unambiguous information from pmichaud.
14:08 mberends PerlJam: agreed. fewer rules == more consistency. The - was singled out to enforce S05:1368
14:08 PerlJam you're probably right ... that's why someone other than me needs to make things explicit  :)
14:08 masak shall I write a short email to p6l asking the question?
14:08 moritz_ masak: please do
14:09 * masak does
14:09 PerlJam that would be excellent, yes
14:11 PerlJam Given that <[ a .. z ]> only matches, the characters "a" through "z", how would I add a space character to the character class?
14:12 PerlJam I can only think of one way and I don't like it
14:13 moritz_ <[a..z ]> or <[a..z]+[ ]>
14:14 PerlJam moritz_: From S05:1372,  "Whitespace is ignored within square brackets: / <[ a..z _ ]>* /"
14:14 moritz_ hrmpf
14:15 diakopter why not ' '
14:15 PerlJam so, the way I can think of is to make a rule myspace { ' ' }  and use  <[a..z]+myspace>   (I used <myspace> instead of <space> because <space> is already predefined to be the same as \s )
14:16 diakopter <[ a..z ' ' ]>
14:16 PerlJam diakopter: See masak's earlier comments :)
14:22 TimToady joined #perl6
14:22 NoirSoldats joined #perl6
14:22 hcchien joined #perl6
14:22 integral joined #perl6
14:22 Matt-W joined #perl6
14:22 jrockway joined #perl6
14:22 ashizawa joined #perl6
14:22 ascent_ joined #perl6
14:22 ilogger2 joined #perl6
14:22 moritz_ joined #perl6
14:22 cookys joined #perl6
14:22 edenc joined #perl6
14:22 Gothmog_ joined #perl6
14:22 namenlos joined #perl6
14:22 lucs joined #perl6
14:22 krunen joined #perl6
14:22 xuser joined #perl6
14:22 clkao joined #perl6
14:22 frodwith joined #perl6
14:22 gbacon joined #perl6
14:22 rhr joined #perl6
14:22 ewilhelm joined #perl6
14:22 nnunley joined #perl6
14:22 bigpresh joined #perl6
14:22 lumi joined #perl6
14:22 p6eval joined #perl6
14:22 dukeleto joined #perl6
14:22 japhb joined #perl6
14:22 buu joined #perl6
14:22 [particle]2 joined #perl6
14:22 plu_ joined #perl6
14:22 ingy joined #perl6
14:22 miloux joined #perl6
14:22 Caelum joined #perl6
14:22 SamB joined #perl6
14:22 PZt joined #perl6
14:22 rafl joined #perl6
14:22 awwaiid joined #perl6
14:22 samlh joined #perl6
14:22 lambdabot joined #perl6
14:22 dalek joined #perl6
14:22 jnthn joined #perl6
14:22 jan_ joined #perl6
14:22 [particle] joined #perl6
14:22 Woody4286 joined #perl6
14:22 agentzh joined #perl6
14:22 c9s joined #perl6
14:22 viklund`` joined #perl6
14:22 BinGOs joined #perl6
14:22 amoc joined #perl6
14:22 kolibrie joined #perl6
14:22 rgs joined #perl6
14:22 Khisanth joined #perl6
14:22 Patterner joined #perl6
14:22 jedai joined #perl6
14:22 frooh_away joined #perl6
14:22 msmatsko joined #perl6
14:22 felipe joined #perl6
14:22 Kisu joined #perl6
14:22 drbean joined #perl6
14:22 finanalyst joined #perl6
14:22 cotto joined #perl6
14:22 araujo joined #perl6
14:22 mberends joined #perl6
14:22 kst joined #perl6
14:22 meppl joined #perl6
14:22 exodist joined #perl6
14:22 cognominal joined #perl6
14:22 zamolxes joined #perl6
14:22 ruoso joined #perl6
14:22 AzureStone_ joined #perl6
14:22 justatheory joined #perl6
14:22 bacek joined #perl6
14:22 eternaleye joined #perl6
14:22 s1n joined #perl6
14:22 kidd_ joined #perl6
14:22 xinming joined #perl6
14:22 PerlJam joined #perl6
14:22 tarbo2 joined #perl6
14:22 Helios joined #perl6
14:22 zostay joined #perl6
14:22 pasteling joined #perl6
14:22 Aisling joined #perl6
14:22 silug joined #perl6
14:22 zev joined #perl6
14:23 PacoLinux joined #perl6
14:23 lisppaste3 joined #perl6
14:23 sunnavy joined #perl6
14:23 estrabd joined #perl6
14:23 cj joined #perl6
14:23 IRSeekBot joined #perl6
14:23 baest joined #perl6
14:27 kimtaro joined #perl6
14:29 szabgab joined #perl6
14:29 diakopter joined #perl6
14:29 buubot joined #perl6
14:29 sri_kraih_ joined #perl6
14:29 yahooooo joined #perl6
14:29 kcwu joined #perl6
14:29 gfldex joined #perl6
14:29 idemal joined #perl6
14:31 Maghnus joined #perl6
14:35 Southen joined #perl6
14:35 Tene_ joined #perl6
14:35 masak joined #perl6
14:35 Southen_ joined #perl6
14:35 REPLeffect joined #perl6
14:35 kane_ joined #perl6
14:35 Sepheebear joined #perl6
14:35 Grrrr joined #perl6
14:35 broquaint joined #perl6
14:35 meteorjay joined #perl6
14:35 mtve joined #perl6
14:35 dmpk2k joined #perl6
14:35 Maddingue joined #perl6
14:35 Woody2143 joined #perl6
14:35 pjcj joined #perl6
14:35 literal joined #perl6
14:35 avar joined #perl6
14:35 spinclad joined #perl6
14:35 frobnitz joined #perl6
14:41 Southen joined #perl6
14:41 Tene_ joined #perl6
14:41 masak joined #perl6
14:41 Southen_ joined #perl6
14:41 REPLeffect joined #perl6
14:41 kane_ joined #perl6
14:41 Sepheebear joined #perl6
14:41 Grrrr joined #perl6
14:41 broquaint joined #perl6
14:41 meteorjay joined #perl6
14:41 mtve joined #perl6
14:41 dmpk2k joined #perl6
14:41 Maddingue joined #perl6
14:41 Woody2143 joined #perl6
14:41 pjcj joined #perl6
14:41 literal joined #perl6
14:41 avar joined #perl6
14:41 spinclad joined #perl6
14:41 frobnitz joined #perl6
14:42 diakopter ok, that might last a netsplit or two
14:43 Lrrr left #perl6
14:44 diakopter PerlJam: did you see my reply to your last?
14:44 * amoc is greedy for op
14:44 PerlJam diakopter: I did not.
14:44 diakopter ah
14:45 * amoc .oO( the lord of the op... my precious )
14:45 diakopter I must've been splitted
14:45 diakopter I said how about  <[ a..z \  ]>   (on the theory that whitespace wouldn't be ignored if it was escaped, per char)
14:46 diakopter (or is whitespace allowed between the escape backslash and its target)
14:46 PerlJam diakopter: yeah, that might work too, not sure though.
14:46 [particle] as in unspace? hrmm
14:48 nihiliad joined #perl6
14:49 cspencer joined #perl6
14:49 cspencer left #perl6
14:49 cspencer joined #perl6
14:54 frobnitz joined #perl6
14:54 meteorjay joined #perl6
14:54 Maddingue joined #perl6
14:56 literal_ joined #perl6
14:56 Grrrr joined #perl6
14:56 masak` joined #perl6
14:56 Sepheebear joined #perl6
14:57 pmichaud to match a space in a character class, backwhack it.
14:58 pmichaud <[ a .. z \  ]>
14:58 * diakopter wins
14:58 PerlJam still seems "too invisible" to me
14:58 pmichaud I think that   \x20  also works.
14:59 pmichaud (if it doesn't it should be made to work fairly simply)
14:59 moritz_ \c[SPACE]
14:59 PerlJam so ...  <[\!..\?]>  (or the associated hex/octal/whatever version)
14:59 moritz_ std: "\c[SPACE]"
14:59 pmichaud no, I think that's just   <[!..?]>
15:00 p6eval std 26002: OUTPUT«ok 00:04 36m␤»
15:00 moritz_ std: "\d[SPACE]"
15:00 p6eval std 26002: OUTPUT«ok 00:05 40m␤»
15:00 pmichaud I don't think one has to backwhack the ! or ? inside of a character enumeration
15:00 moritz_ I can never remember which one it is
15:00 PerlJam pm: okay, now the question is: why?   Are not the ! and ? meta ?
15:00 moritz_ PerlJam: not in char classes
15:00 pmichaud inside of a character enumeration?  no
15:00 PerlJam okay, why not?
15:00 moritz_ PerlJam: because there's no reason to make them meta
15:01 pmichaud the only metas are backslash and space, I think.
15:01 PerlJam and dot
15:01 PerlJam (as in ..)
15:01 pmichaud even dot isn't meta when used singly
15:01 pmichaud <[a.b]>    # match a, dot, or b
15:01 szabgab joined #perl6
15:01 PerlJam heh, so   <[,...]> is a fine character class?  :)
15:01 pmichaud afaik, yes.
15:02 diakopter std: /<[,...]>/
15:02 p6eval std 26002: OUTPUT«ok 00:03 35m␤»
15:02 hercynium joined #perl6
15:02 diakopter std: /<[...]>/
15:02 p6eval std 26002: OUTPUT«ok 00:02 35m␤»
15:02 diakopter std: /<[..]>/
15:02 p6eval std 26002: OUTPUT«ok 00:02 35m␤»
15:02 diakopter lol
15:02 pmichaud those look wrong to me
15:03 pmichaud rakudo:  "hello, world" ~~ /<[,...]>/
15:03 diakopter std: /<[xxxxx]>/
15:03 p6eval rakudo bb22e0: RESULT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast  => ",",␤ text => ",",␤ from => 5,␤ to   => 6,␤)»
15:03 p6eval std 26002: OUTPUT«ok 00:02 35m␤»
15:03 pmichaud rakudo:  say "hello, world" ~~ /<[..]>/
15:03 p6eval rakudo bb22e0: OUTPUT«␤»
15:03 PerlJam So ... the rule is that you don't have to memorize a list of which characters are meta or not (except in character classes)
15:03 PerlJam and the exception for character classes is because there are so few meta chars?
15:04 moritz_ PerlJam: yes
15:04 pmichaud only two, as I mentioned.
15:04 pmichaud hyphen is meta to prevent p5-thinkos
15:04 diakopter std: /<[................]>/
15:04 PerlJam okay, I can live with that :)
15:04 p6eval std 26002: OUTPUT«ok 00:02 35m␤»
15:05 PerlJam (though I hope that the Perl 6 Camel at least mentions the exception for character classes)
15:06 pmichaud well, there are other situations like that as well.
15:07 pmichaud < . , ? ! >      #  match a dot, comma, query, or bang
15:07 Woody2143 joined #perl6
15:07 pmichaud none of those are "meta" and require escaping
15:08 PerlJam but they're quoted
15:08 PerlJam (and the first space is meta in a way :)
15:08 pmichaud oh yes, I guess the angles are a quote there.
15:08 pmichaud one could say that <[ ... ]>   forms a quote pair too :-)
15:11 dalek rakudo: 7d9cd97 | pmichaud++ | docs/spectest-progress.csv:
15:11 dalek rakudo: spectest-progress.csv update: 332 files, 7424 passing, 0 failing
15:11 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​d9cd97d261106dd5b43f43f99891abffdf09049
15:12 PerlJam Then perhaps they should be mentioned under the section "Simplified lexical parsing of patterns" along with the other quote forms.  :)
15:12 ejs joined #perl6
15:12 aindilis joined #perl6
15:12 skids joined #perl6
15:12 simcop2387 joined #perl6
15:12 Eevee joined #perl6
15:12 c1sung joined #perl6
15:12 pugs_svn joined #perl6
15:14 frioux_away joined #perl6
15:20 donaldh joined #perl6
15:21 Cybera joined #perl6
15:21 Cybera left #perl6
15:21 Cybera joined #perl6
15:27 grwi joined #perl6
15:32 grwi left #perl6
15:33 gravity joined #perl6
15:34 jnthn 7424 passing! :-)
15:35 skids jnthn++
15:35 pmichaud yes, we're almost half-way.  :-)
15:35 [particle] halfway to 14848!
15:35 * [particle] hopes the goalposts get moved again this summer
15:35 pmichaud somehow I suspect the second 7500 tests will be a bit harder than the first 7500 tests.
15:35 pmichaud I also wonder what tests we're not passing.
15:36 [particle] ack -af | grep -vsomething-or-other t/spectest.data
15:36 pmichaud well, there's a detailed list at http://www.pmichaud.com/perl6​/rakudo-tests-2009-03-26.txt
15:37 [particle] i meant the testfiless we're not running
15:37 pmichaud so, in spectest.data, there's 1958 tests we currently skip
15:37 [particle] t/spec - t/spectest.data
15:38 pmichaud 15518-9707
15:38 pmichaud 5811
15:38 pmichaud there's 5811 tests we don't even attempt
15:38 pmichaud that seems like a lot
15:38 jnthn pmichaud: I figure those skips/todos tend to indicate features we didn't finish implementing yet but have some of.
15:38 jnthn Or where we have bugs.
15:38 jnthn And those we don't attempt are mostly featuers that we don't yet implement.
15:38 [particle] many parser bugs lurking
15:39 pmichaud it still feels like a lot.  yeah, parser bugs might be quite a few.
15:39 pmichaud perhaps operator overloading.
15:39 [particle] those two are most of the skips, i think
15:39 jnthn Actually we lose a significant amount in the skips to:
15:39 skids joined #perl6
15:39 jnthn * not having implemented want yet (I think this is a 3-figure number)
15:40 jnthn * not allowing positionals to be passed as nameds
15:40 [particle] ah, right. calling conventions. sigh.
15:41 jnthn I had to work around two Parrot calling conventions issues in the space of an afternoon when doing some Rakudo hacking recently.
15:41 pmichaud what are your guesses as to the likelihood of parrot calling conventions being fixed before July release?
15:41 jnthn pmichaud: You want my blunt answer?
15:41 pmichaud sure.
15:42 jnthn At least 50% chance of it happening, depends if one or both of us gets pissed off with it sufficiently to do it ourselves.
15:42 jnthn (Like lexicals.)
15:42 pmichaud I can pretty much guarantee it won't be me.
15:42 jnthn Right, and you've got more important things to do.
15:42 jnthn I don't *want* to do it.
15:43 jnthn And it's *easily* two solid weeks of effort, I estimate.
15:43 pmichaud before fixing parrot calling conventions I'd likely just get rakudo's dispatch and signature handling to work around them.
15:43 jnthn It's not that easy to work around, I don't think :-(
15:43 disismt joined #perl6
15:43 jnthn Not the named as positional.
15:44 jnthn I think your :lookahead suggestion would give us what we need.
15:44 pmichaud oh, that's not that hard to work around.
15:44 pmichaud we just always grab arguments into slurpy positional and slurpy named, and then do our own binding.
15:44 skids joined #perl6
15:44 ejs joined #perl6
15:44 aindilis joined #perl6
15:44 simcop2387 joined #perl6
15:44 Eevee joined #perl6
15:44 c1sung joined #perl6
15:44 pugs_svn joined #perl6
15:44 jnthn We could do that yeah.
15:44 jnthn We'd just lose even more performance.
15:46 pmichaud also allison and chromatic keep arguing over how the calling conventions should be handled, and that's not a debate I feel like stepping into.
15:46 disismt left #perl6
15:46 jnthn Which is another reason I really don't want to do it either.
15:47 pmichaud so at some point I think we just take the performance hit so we can make progress (if it gets us more passing tests)
15:47 Southen joined #perl6
15:48 jnthn Aye.
15:48 jnthn I say let's watch it for another month or two, see if there's any visible progress on the Parrot side, and if not just go our own way.
15:49 pmichaud sounds fine with me.
15:49 skids So right now substr is staying as PIR because everything uses it... is it supposed to be an lvalue like in Perl5 though?
15:49 Tene joined #perl6
15:49 pmichaud right now substr is staying as PIR because I don't have a good alternate implementation.
15:49 pmichaud if _you_ can write substr in Perl 6, I'd like to see it :-)
15:50 pmichaud and yes, I think it's supposed to be an lvalue.  There's a patch that bacek++ wrote several months ago to do that, but I'm not yet convinced I like the approach he's taken.
15:50 FurnaceBoy joined #perl6
15:50 kst joined #perl6
15:50 skids Well, that's very hard, because A) we don't have type buf and B) unicode.
15:51 jnthn I suspect that Rakudo's substr probably wants to be based at some level on Parrot's substr op.
15:51 pmichaud I agree
15:51 skids But I was working up to suggesting that a working buf would mitigate some of the reliance on it.
15:51 pmichaud what's wrong with relying on it?
15:51 moritz_ the question is, does any part of the compiler use substr before the setting is fully compiled?
15:51 pmichaud Parrot's substr already handles unicode (and a variety of other encodings as well)
15:52 pmichaud the whole point of having a virtual machine is so that it can provide fast implementations of operations like this.
15:52 pmichaud (well, that's not the _whole_ point, but it's one of them)
15:53 jnthn moritz_: I'm coming around to the idea that we are maybe going to have in the first-stage compile a very basic copy in PIR of a few of the types/functions that we will later then drop in favor of compiling the Perl 6 versions.
15:53 jnthn That is, where we include an empty gen_setting.pir in the stage 1, it may actually have some very primitive versions of the types that give us infrastructural stuff that we can't do without.
15:54 jnthn I'd rather put off that until we know we *really* need it though.
15:54 pmichaud agreed
15:54 jnthn Rather than assuming we do.
15:54 pmichaud so far I can't think of places where we need it.
15:54 pmichaud and yes, we have a simple mechanism for it when we do.
15:54 jnthn pmichaud: There's going to be circularities.
15:54 pmichaud jnthn: yes, there will (esp in STD.pm)
15:55 jnthn Just pulling List and Array out of the first stage is being non-trivial.
15:56 jnthn I moved one method recently and half of make test segfaulted under the harness and at the command line then ran find under the debugger. :-|
15:56 jnthn s/find/fine/
15:56 pmichaud I think I might need to take a crack at that (pulling List/Array out of the first stage)
15:57 jnthn I'd love help on that.
15:57 pmichaud although it seems to me that we still end up with List/Array in the first stage
15:57 Southen_ joined #perl6
15:57 masak` rakudo: /<[..b]>/
15:57 p6eval rakudo 7d9cd9: OUTPUT«Cannot get character of empty string␤current instr.: 'parrot;PGE;Perl6Regex;parse_enumcharclass' pc 9104 (compilers/pge/PGE/Perl6Regex.pir:911)␤»
15:57 jnthn In fact, moving those into the setting, and hash too, is basically the big task that remains for me to finish up my grant.
15:57 * masak` submits rakudobug
15:58 masak ouch, that netsplit really hurt.
15:58 skids OK, point taken.  I guess I'm just biased towards buf8 :-)
15:58 pmichaud I'm not sure that List/Array belong in the setting (as perl6 code)
15:58 skids Being that I mostly work with packets.
15:58 jnthn pmichaud: My motivation for moving them there is that they need to become parametric roles.
15:58 jnthn I didn't really want to have to maintain PIR code for that...
15:59 pmichaud I agree that they need to be parametric roles, but they're also fundamental enough that we may need PIR for that.
15:59 masak pmichaud: closing bracket is a metacharacter in character enumerations. and dash, as I point out in my email to p6l.
15:59 r0bby joined #perl6
15:59 pmichaud masak:  closing bracket doesn't need to be a metachar
15:59 masak oh, ok.
15:59 pmichaud oh wait, maybe it does now.
15:59 pmichaud let me re-check.
15:59 jnthn What's the main motivation for needing them in the stage 1?
15:59 jnthn (Not disagreeing, just curious where you feel it's needed.)
16:00 pmichaud jnthn: we'll need them for STD.pm stuff
16:00 Alias_ joined #perl6
16:00 pmichaud can't compile STD.pm without lists/arrays
16:00 jnthn Ah.
16:00 jnthn OK.
16:00 moritz_ things like <[a]+[b]> are allowed, so ] needs to be meta, even if not followed by >
16:00 jnthn Maybe I need to ponder if we can make parametric types writtable more nicely in PIR then.
16:00 jnthn Not to mention attaching Perl 6 signatures afterwards...
16:01 pmichaud moritz_: yes, I think you're right -- ] needs to be meta also now.
16:01 masak here I am! :)
16:03 masak pmichaud: my point is that there are quite a few metachars in character enumerations, it's starting to feel cumbersome, and it's not at all specced by S05 as far as I can see.
16:04 pmichaud masak: I'm open to changes in the spec there.  In some ways I wish we could just get rid of character enumerations altogether -- they're a pain to implement.  especially if/when we start supporting things like \w, \s, etc.
16:04 masak aye.
16:04 Southen_ joined #perl6
16:04 Tene joined #perl6
16:04 Southen joined #perl6
16:05 skids joined #perl6
16:05 ejs joined #perl6
16:05 aindilis joined #perl6
16:05 simcop2387 joined #perl6
16:05 Eevee joined #perl6
16:05 c1sung joined #perl6
16:05 pugs_svn joined #perl6
16:05 PerlJam if <space> and \s are equivalent, can we use <[a..z]+\s> just like we would use <[a..z]+space>  ?  :)
16:05 [particle] pmichaud: but they're extremely convenient and fast
16:05 masak pmichaud: as a Perl 6 user, I'm often surprised by the fact that apostrophes quote things outside of character classes but not inside of them. whereas whitespace, for example, works just the same.
16:05 [particle] i think the user's needs outweigh the implementors there :(
16:05 pmichaud [particle]: they're not fast.
16:06 jnthn pmichaud: How much would you hate a kind of PIR pre-processor, or maybe even looking at using PIR macros, to help us with attaching signatures etc to stuff we can't move into the Perl 6 setting?
16:06 PerlJam and if we can use <[a..z]+\s>, can we not also use <[a..z]+' '>  ?
16:06 pmichaud jnthn: why not just a PIR function to do it?
16:06 NoirSoldats joined #perl6
16:07 pmichaud jnthn: we already have methods for attaching signatures
16:07 jnthn pmichaud: True...just means we have to write another PIR sub to attach a signature to another one.
16:07 jnthn We can do that I guess.
16:07 pmichaud that's effectively what happens now from the output of actions.pm
16:08 jnthn Yes, the point being that's generated and we don't have to worry about maintaining generated code. :-)
16:08 pmichaud agreed.
16:08 jnthn Or if the way we construct signatures for some reason changes.
16:08 pmichaud I'm not sure how much of an issue it will be in the long run (more)
16:08 pmichaud I'd say we should focus on refactoring List/Array first and then see what we have.
16:09 pmichaud and yes, I'll put that on my plate.  I thought about it a bit during my trip and figured it ought to be doable without too much pain
16:09 pugs_svn joined #perl6
16:09 c1sung joined #perl6
16:09 Eevee joined #perl6
16:09 simcop2387 joined #perl6
16:09 aindilis joined #perl6
16:09 ejs joined #perl6
16:09 skids joined #perl6
16:09 Southen_ joined #perl6
16:09 Tene joined #perl6
16:09 Southen joined #perl6
16:09 jnthn pmichaud: Is your refactoring going to try and make us has-a RPA rather than isa RPA?
16:09 pmichaud yes.
16:09 pmichaud I figure that's the first step to resolving the issue.
16:09 jnthn That's not a nice change to have to make, but I think it's needed.
16:10 jnthn OK, good.
16:10 jnthn You may have a much better approach than I at it. But a couple of hours experimenting showed it to be non-trivial.
16:10 jnthn OTOH part of it will be easier now with some methods in the setting
16:10 jnthn And thus poking less into guts.
16:10 pmichaud I think we have to continue to allow push/pop on Lists (vtable) without exposing those as methods to Perl 6
16:11 jnthn I figured if we took the approach of defining push vtable in Object and re-dispatching to .push we'd manage that?
16:11 pmichaud Lists appear immutable to the Perl 6 programmer, but internally we can mutate them all we want.  :-)
16:11 jnthn (e.g. more generally than just one List etc)
16:11 jnthn Ah, yes, true.
16:12 jnthn Though at the same time how vtable methods work determines how Lists behave to other langauges somewhat.
16:12 jnthn Rather than just being our own low-level-ish things.
16:12 pmichaud we may do it with private methods then.
16:12 jnthn Aye, that may be better.
16:13 jnthn Of course, if we have an RPA internally, we can still ahve the private methods do a vtable push on that.
16:13 pmichaud correct.
16:13 jnthn Heck it's an attribute if it's a has-a rel, so we can getattribute it and push vtable it if we really want...
16:13 pugs_svn joined #perl6
16:13 c1sung joined #perl6
16:13 Eevee joined #perl6
16:13 simcop2387 joined #perl6
16:13 aindilis joined #perl6
16:13 ejs joined #perl6
16:13 skids joined #perl6
16:14 jnthn (Which saves us adding methods to RPA, which we maybe shouldn't be doing...)
16:14 pmichaud oh, I know we shouldn't be doing that -- those are workarounds.
16:14 pmichaud it's never been my intent that those remain permanent.
16:15 jnthn OK. :-)
16:16 pmichaud http://nopaste.snit.ch/15967   # list of files in t/spec that we currently skip
16:17 skids joined #perl6
16:17 ejs joined #perl6
16:17 aindilis joined #perl6
16:17 simcop2387 joined #perl6
16:17 Eevee joined #perl6
16:17 c1sung joined #perl6
16:17 pugs_svn joined #perl6
16:21 dukeleto pmichaud: that looks like a good list for a gsoc student to attack
16:22 jnthn pmichaud: Is that skip as in, don't run at all?
16:22 pmichaud yes, don't run at all.
16:22 pmichaud which is where the bulk of our skips are (5k+)
16:22 jnthn Some of them look like things we should be able to do...
16:22 jnthn S02-builtin_data_types/enum.t
16:22 jnthn for example
16:23 pmichaud I'm generating a list of the number of planned tests in each
16:24 pmichaud http://nopaste.snit.ch/15968
16:24 jnthn S06-advanced_subroutine_features/wrap.t
16:24 jnthn I pondered implementing wrapping recently
16:24 jnthn But other stuff was more pressing.
16:24 jnthn Shoudln't be hard, anyways.
16:25 jnthn S06-traits/is-readonly.t - should be easy too
16:25 pmichaud lots of tests depend on adverbs, or options to regexes
16:25 jnthn Hmmm. Maybe I should spend Rakudo day next week going through some of these that I think we should be close to passing some of.
16:26 [particle] what's it cost to get pge's perl5 regexen working?
16:26 jnthn Ah.
16:26 [particle] that'd buy hundreds of unskips
16:26 kst joined #perl6
16:26 pmichaud we'd still need adverbs.
16:27 pmichaud unless we recognized it as a special token/quoter
16:27 dukeleto it looks like t/spec/S32-trig/e.t can be run, it has one test that fails but it is properly skipped
16:27 pmichaud but yes, we'd get a lot of passing tests that way (> 1K).  I'm not sure they're particularly useful ones.
16:28 ejs1 joined #perl6
16:28 pmichaud i.e., handling :P5 regexes doesn't seem that important to me in the larger sense of "what helps people use Rakudo"
16:28 jnthn Aye.
16:29 skids joined #perl6
16:29 ejs joined #perl6
16:29 aindilis joined #perl6
16:29 simcop2387 joined #perl6
16:29 Eevee joined #perl6
16:29 c1sung joined #perl6
16:29 pugs_svn joined #perl6
16:30 pmichaud I haven't quite figured out how we want to handle things like   "\c[NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE]"
16:31 jnthn That's a valid character name?
16:31 pmichaud it's in S02.
16:31 jnthn oh wow
16:31 jnthn :-)
16:31 pmichaud U+22AF
16:31 pmichaud http://www.fileformat.info/inf​o/unicode/char/22af/index.htm
16:32 jnthn wow, that site has a page for every unicode char! :-)
16:32 pmichaud so maybe we just do a web lookup whenever we encounter \c[ ... ]     :-P
16:33 pmichaud afk for a bit
16:33 jnthn Well, we got sockets now ;-)
16:33 jnthn ooh, I should be afk too... .pm group meeting starts in 30 mins.
16:33 skids rest assured I will put them to nefarious use :-)
16:34 pmichaud we still need a name for april rakudo release :-)
16:36 PerlJam pm: are you going to use "pittsburg" for the June release? :)
16:37 pawel_ joined #perl6
16:37 Alias joined #perl6
16:39 DemoFreak joined #perl6
16:41 skids Not for rakudo, but "Willie" might deserve a Parrot naming honor: http://tinyurl.com/dkbgj7
16:41 mncharity joined #perl6
16:47 Psyche^ joined #perl6
16:49 pmichaud Haven't decided on june release.  Might use pittsburgh for May release -- I need to contact them and see what they prefer.
16:52 mncharity joined #perl6
16:52 mncharity >7 people.  yay.
16:53 mncharity rakudo: say "a b" ~~ /:P5 a b/
16:53 p6eval rakudo 7d9cd9: OUTPUT«␤»
16:53 mncharity rakudo: say "a b" ~~ /:P5(?:a b)/
16:53 p6eval rakudo 7d9cd9: OUTPUT«Statement not terminated properly at line 1, near "~~ /:P5(?:"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:53 mncharity rakudo: say "a b" ~~ /:P5::(?:a b)/
16:53 pmichaud I don't think PGE recognizes :P5 yet.
16:53 p6eval rakudo 7d9cd9: OUTPUT«perl6regex parse error: Quantifier follows nothing in regex at offset 21, found ':'␤current instr.: 'parrot;PGE;Perl6Regex;parse_error' pc 10167 (compilers/pge/PGE/Perl6Regex.pir:1219)␤»
16:53 mncharity ah.
16:54 mncharity any thoughts on what is supposed to be correct?
16:55 pmichaud /:Perl5 a b/   is likely the correct form.
16:55 pmichaud at least according to S05
16:55 pmichaud (assuming you're asking for the modifier inside of the expression)
16:55 [particle] that's better huffmanization :)
16:55 mncharity so the space after the :Perl5 gets disappeared.  ok.  I can fudge that, I just wanted to make sure I wasn't confused.
16:56 mncharity my thanks. :)
16:56 pmichaud I think we had decided that trailing spaces after modifiers would get eaten
16:57 mncharity sounds good.
17:01 mncharity TimToady: I note in passing that current viv's parse of /:P5 a b/ doesn't look right.
17:02 mncharity regrettably elfparse's old STD/gimme5 is also not getting it right (differently).
17:03 Tene joined #perl6
17:04 mncharity sigh.  I just want a p6 parser...  ah well.  maybe skip rx_on_re test passing for :P5, and just do p6 rx.
17:05 mncharity then back to std.pm, MEMO and $lang, and then shaking it down towards self-compilation.
17:05 skids joined #perl6
17:05 aindilis joined #perl6
17:05 simcop2387 joined #perl6
17:05 Eevee joined #perl6
17:05 c1sung joined #perl6
17:05 pugs_svn joined #perl6
17:07 mncharity skids: are you in Boston?  there's periodically the concept of doing a "Boston.p6 users group" get together.
17:07 pawel_ I want to use Perl on CGI server. I don't think it would allow me to install perl modules. is there any way to load module without installing it ( I want to make Jabber client using Net::Jabber on CGI server )
17:08 skids mncharity: western MA.  Near UMASS Amherst.
17:08 mncharity then parse speed.  elfparse/emit6.pm.
17:08 mncharity skids: ah, ok.
17:08 skids Though I work in Worcester.
17:10 mncharity then elf_i, getting on_lisp to compile it, finding/creating a fast multiple dispatch implementation for p5, and an multi based elf_j.
17:11 mncharity skids: are there any p5 user groups out there, or is boston the closest?
17:11 skids I dunno I'm not a very active "community" person.
17:11 mncharity :)
17:12 mberends pawel_, only development of Perl 6 is done here. you should try http://www.irc.perl.org/
17:12 mncharity getting list handling right, general signatures/captures (written in p6), ...
17:13 NordQ joined #perl6
17:14 mncharity unboxing and proper operator inlining optimizations, plus uncontainering to permit real containers without prohibitive cost, ...
17:17 mncharity Has anyone started looking at a  STD/viv/???/Moose  p6 implementation?
17:18 kst joined #perl6
17:19 ruoso mncharity, what do you mean>
17:19 ruoso ?
17:19 mncharity End of quarter approaches, and I've been wondering whether to continue elf's slow creep, mothball it, suggest people focus on STD/viv//Moose, or what.
17:19 pugs_svn joined #perl6
17:19 c1sung joined #perl6
17:19 Eevee joined #perl6
17:19 simcop2387 joined #perl6
17:19 aindilis joined #perl6
17:19 skids joined #perl6
17:21 |jedai| joined #perl6
17:24 mncharity ruoso: STD/viv is creeping towards being a p6 to p5 transliterating compiler.  a simple one, but perhaps enough to support development of a real p6 compiler written in p6.  since that's the only reason elf exists at this point, perhaps it would be better to avoid the distraction and focus folks at STD/viv.
17:25 pawel_ left #perl6
17:25 mncharity STD/viv/mildew/smop would be a fine alternative to a STD/viv/???/Moose.
17:25 ruoso I see... TimToady is the one behind that idea, it seems
17:26 mncharity my impression is just that we're a ways from being able to use mildew/smop in elf-scale p6 development.
17:26 ruoso as soon as the refactoring is over... smop should be much easier to deal with
17:26 mncharity nod
17:26 ruoso and we're much close to bootstrapping Multi, which is a very important milestone
17:27 ejs joined #perl6
17:27 ruoso by bootstrap I mean using the Multi.pm written in Perl 6
17:27 mncharity right.  it's just the gap between "working" and...  Multi.pm written in Perl 6?  ears perk.  pointer?
17:28 ruoso v6/mildew/CORE/*.pm
17:28 ruoso mildew got a Perl 6 implementation of the core at the same time as rakudo
17:28 ruoso altough much less complete ;)
17:29 mncharity http://perlcabal.org/svn/p​ugs/browse/v6/mildew/CORE
17:30 mncharity anyone wants to do a bot, it'd be nice to have a  svnfile: /CORE/   command which gives links to source files.
17:31 ruoso mncharity, it starts at CORE.pm
17:31 Southen joined #perl6
17:31 donaldh left #perl6
17:34 dalek rakudo: 0f6354d | pmichaud++ | build/PARROT_REVISION:
17:34 dalek rakudo: Bump PARROT_REVISION to take advantage of PGE changes in r37748.
17:34 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​f6354da31fb74eb553d3896d3aafaf84d5e304e
17:37 * mncharity tries to find signature ACCEPTS
17:39 mncharity drat.  pumpkin.  let's see...
17:40 ruoso mncharity, I think it's in the smartmatch table
17:40 mncharity danke.  cheers. &
17:50 Matt-W Right
17:50 Matt-W I should write some code
18:11 frzntoz joined #perl6
18:11 dKingston_ joined #perl6
18:13 kst joined #perl6
18:14 icwiener joined #perl6
18:16 schmalbe joined #perl6
18:45 ZuLuuuuuu joined #perl6
18:51 cdarroch joined #perl6
19:16 kst joined #perl6
19:34 ZuLuuuuuu left #perl6
19:49 parduncia joined #perl6
19:49 Matt-W I really wish Parrot would tell me which thing that wanted 3 parameters is actually being passed two
19:52 Kisu joined #perl6
19:53 rblasch joined #perl6
20:01 charsbar_ joined #perl6
20:04 eternaleye joined #perl6
20:06 rblasch1 joined #perl6
20:07 dalek rakudo: 00cd1fd | pmichaud++ | src/ (2 files):
20:07 dalek rakudo: Add perl versions of trim() to setting  (RT #64096).
20:07 dalek rakudo: Patch courtesy Cory Spencer <cspencer@sprocket.org>.
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​0cd1fd942b9ddb60d67562e368acff8975f013b
20:07 dalek rakudo: a0c6e3d | pmichaud++ | src/ (2 files):
20:07 dalek rakudo: Add Perl 6 version of p5chop and p5chomp to setting (RT #64092).
20:07 dalek rakudo: Patch courtesy Cory Spencer <cspencer@sprocket.org>.
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​0c6e3d1bc0aa551eec303f0f0e5e2395fdb3f39
20:07 dalek rakudo: 3bbb1c4 | pmichaud++ | src/ (2 files):
20:07 dalek rakudo: Add Perl 6 versions of cis() and rand() to setting (RT #64108).
20:07 dalek rakudo: Patch courtesy Cory Spencer <cspencer@sprocket.org>.
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​bbb1c40262c1e7e8c8b50d1139a2177f153d47b
20:07 dalek rakudo: 8af4574 | pmichaud++ | src/setting/Any-num.pm:
20:07 dalek rakudo: Clean up rand() and cis() from RT #64108 patch.
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​af457433eefb0de167e34db2d6fd3fe2de2815d
20:07 dalek rakudo: 5c07c7b | pmichaud++ | src/setting/Any-str.pm:
20:07 dalek rakudo: Use \x0a instead of \o12 (I find it easier to deal with hex).
20:07 dalek rakudo: This patch may still have a problem in that it chomps only actual
20:07 dalek rakudo: newlines instead of using \n.
20:07 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​c07c7b70ba304464aac869dd7e1eb7b9dfab4b7
20:12 kst joined #perl6
20:17 rblasch2 joined #perl6
20:24 dalek rakudo: c3e5408 | pmichaud++ | t/spectest.data:
20:24 dalek rakudo: Update t/spectest.data with p5chop and p5chomp tests.
20:24 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​3e5408361e054686dee3bd47c064dcb7e0ebbc2
20:33 ZuLuuuuuu joined #perl6
20:37 justatheory joined #perl6
20:43 rblasch joined #perl6
20:47 frioux joined #perl6
20:47 skids joined #perl6
20:51 mberends Matt-W: ping
20:53 sri_kraih joined #perl6
20:53 eternaleye joined #perl6
20:54 Matt-W mberends: pong
20:54 mberends are you working on Form?
20:56 frzntoz left #perl6
20:58 rblasch1 joined #perl6
21:03 kst joined #perl6
21:19 rblasch joined #perl6
21:41 cspencer joined #perl6
21:48 kst joined #perl6
21:50 ZuLuuuuuu left #perl6
22:08 rblasch1 joined #perl6
22:12 betterworld joined #perl6
22:20 rblasch2 joined #perl6
22:25 eternaleye joined #perl6
22:25 cspencer is there a way of determining the return context in rakudo yet?
22:27 cspencer ie) list vs scalar
22:28 eternaleye joined #perl6
22:30 pmurias joined #perl6
22:31 moritz_ no
22:31 rblasch joined #perl6
22:32 cspencer ok, i'll skip implementing things that rely on that then :)
22:37 kst joined #perl6
22:42 FurnaceBoy joined #perl6
22:50 Diederich joined #perl6
22:54 cspencer perl6: say chr(104, 101, 108, 108, 111)
22:54 p6eval rakudo c3e540: OUTPUT«too many arguments passed (5) - 1 params expected␤current instr.: 'parrot;Any;chr' pc 11757 (src/builtins/any-num.pir:49)␤»
22:54 p6eval ..pugs: OUTPUT«*** No compatible multi variant found: "&chr"␤    at /tmp/9Foz5xc8G1 line 1, column 5 - line 2, column 1␤»
22:54 p6eval ..elf 26002: OUTPUT«Undefined subroutine &GLOBAL::chr called at (eval 123) line 3.␤ at ./elf_h line 5863␤»
22:54 pmichaud there shouldn't be many things that rely on list or scalar context.
22:54 cspencer should something like: (104, 101, 108, 108, 111).chr work?
22:55 moritz_ I don't know how it's specced, but I don't see a good reason for it
22:56 pmichaud it might work, but perhaps wouldn't give you what you expect.
22:56 pmichaud rakudo:  say  (5..69).chr
22:56 p6eval rakudo c3e540: OUTPUT«A␤»
22:56 pmichaud :-)
22:56 cspencer rakudo: say 64.chr
22:57 p6eval rakudo c3e540: OUTPUT«@␤»
22:57 pmichaud there's always   @list.«chr    if that's what you want.  (I might have the angles in the wrong place.)
22:57 cspencer rakudo: say 'A'.ord
22:57 p6eval rakudo c3e540: OUTPUT«65␤»
22:57 moritz_ it should be @list».chr I think (but the order of » and . is interchangable, iirc)
22:58 pmichaud anyway, we have a way to vectorize .chr already :-)
22:58 cspencer pmichaud: S29 indicated that chr/ord could be called on lists of values, was just wondering if that extended to methods as well, or just as subs
22:58 cspencer or perhaps that part of the spec is out of date...?
22:59 pmichaud possibly out of date, possibly never "ratified"
23:00 cspencer however, since there's a method for vectorizing, should i just implement it as expecting a single argument?
23:00 cspencer it's currently how the PIR version does it
23:00 moritz_ rakudo: say chr(65, 66)
23:00 p6eval rakudo c3e540: OUTPUT«too many arguments passed (2) - 1 params expected␤current instr.: 'parrot;Any;chr' pc 11757 (src/builtins/any-num.pir:49)␤»
23:01 pmichaud clearly     multi Char sub chr(Int *@grid)  isn't really what we expect
23:01 moritz_ aye
23:01 pmichaud (since we should either be getting back a List or a Str)
23:02 moritz_ I'll just change it to read chr(Int $ord)
23:02 pmichaud Personally, I'd go with the single-argument form until there's agreement that there should be a list form.
23:02 cspencer alright, that's easy enough
23:02 pmichaud I'd get rid of the Int.
23:02 pmichaud (I don't know why we persist in putting false constraints on things.)
23:02 moritz_ habit :(
23:03 cspencer heh
23:03 moritz_ pmichaud: I think TimToady explained in a recent diff that for things that expect an Int, there should really be two multis, one expecting an Int and one expecting an Any
23:04 [particle] that habit didn't come from perl 5, that's for sure.
23:04 pmichaud where the Any version just does       chr(+$x)   ?
23:04 moritz_ right
23:04 moritz_ I'll see if I can find it...
23:04 pmichaud I've seen him say that, yes.
23:04 pmichaud It seems weird to require two subs where one will do.
23:05 moritz_ that's because the user may want to define a multi that's more specific than Any, but less specific than Int
23:05 pmichaud I can't think of an example for that.
23:05 moritz_ for example one that expects a Num, and does special magic[tm]
23:05 moritz_ but at some point it'll re-dispatch to the Int version
23:05 pmichaud multi sub chr(Num $x)    # more specific than Any
23:06 moritz_ that new multi could never re-dispatch to the "core" multi sub chr(Any $x)
23:06 pmichaud why not?
23:06 pmichaud multi sub chr(Num $x) { $x.int.chr }
23:06 pmichaud multi sub chr(Num $x) { chr($x.int); }
23:06 moritz_ because an Int also conforms to Num
23:07 moritz_ and that tighter than Any
23:07 moritz_ in your example chr($x.int) would pick the Num version
23:07 moritz_ not the Any
23:07 pmichaud because Int ~~ Num ?
23:07 moritz_ yes.
23:08 moritz_ (I don't know if it does in the Int ~~ Num case, because the relation between those two types is weird)
23:08 moritz_ but in general it's a problem
23:09 kate21de joined #perl6
23:13 moritz_ pmichaud: S04:660 is the example I meant
23:14 moritz_ it defines infix:<eq> with (Str, Str), and (Any, Any) re-dispatches to that
23:15 moritz_ introduced by r25626
23:18 __felix__ joined #perl6
23:18 * jnthn je tu po pm-om skupine
23:19 jnthn ...
23:19 * jnthn is here after pm group
23:19 pmichaud moritz_: I understand it for infix:<eq>, definitely.  For chr() it's a little less obvious to me.
23:19 jnthn In multi-dispatch, Int is narrower than Num.
23:20 jnthn Because Int ~~ Num
23:20 jnthn (narrowness isn't just about isa, but also doesa)
23:20 jnthn (and weird special cases in this particular example...)
23:21 * pmichaud is nearly finished adding :P5 to rx and m
23:21 moritz_ pmichaud: when you have a builtin(Foo) and Foo doeesn't directly inherit from Any (but with other steps like Num inbetween) then this problem arises
23:21 pmichaud when does Foo not inherit from Any?  you mean when it inherits from Object ?
23:22 moritz_ pmichaud: *directly inherit*
23:22 pmichaud if Foo does Num
23:22 pmichaud then   chr(Num)  would always take precedence over chr(Any)
23:22 moritz_ yes
23:22 pmichaud but yes, I see your point.
23:23 pmichaud actually, I don't.
23:23 moritz_ and chr(Num) would have no way to redispatch to chr(Any)
23:23 kst joined #perl6
23:23 jnthn pmichaud: If you have a multi sub (Any $x) and a multi sub (Int $x) you could insert a multi Num($x) and it would sort between the two.
23:23 jnthn moritz_: chr(Num) could do (currently unspoorted in Rakudo) probably &chr<Any>($foo)
23:24 moritz_ jnthn: it could, but it would be rather ugly (IMHO)
23:24 pmichaud yeah, it just seems weird to me that we end up with two or more versions of every builtin.
23:24 pmichaud overriding builtins in this way probably should be ugly :-)
23:24 pmichaud (IMHO :-)
23:24 jnthn pmichaud: (weird) Should I read backscroll, or can you give me some context on that?
23:24 pmichaud I can give you context.
23:25 moritz_ that's the price we pay for having both fine graded types *and* having the operator (and not the types) determine the operation
23:25 pmichaud take for example, chr()
23:25 jnthn Two versions of every built-in hadn't ever quite occured to me...
23:25 pmichaud according to moritz++, we need both   chr(Int $x)   and chr(Any $x)
23:25 pmichaud the second of which redispatches to the first
23:26 jnthn Why can't we just have chr(Any $x)?
23:26 pmichaud that was my position :-)
23:26 pmichaud was/is
23:26 moritz_ jnthn: because I didn't knew about chr<Any>($x)
23:26 moritz_ ;-)
23:27 moritz_ if we didn't have that form, a user defined chr(Num) could not coerce to Int and have it re-dispatch to chr(Any)
23:27 pmichaud at any rate, for the time being I want Rakudo to just do one, except in places where we explicitly need multiple ones, or until there's a clear declaration that we need multiple.
23:27 pmichaud (the infix:<eq> case being a clear declaration, obviously :-)
23:27 jnthn OK. At this point it occurs to me that we can go two ways on that: (1) we _require_ you have have an Int to call chr or (2) we say it's OK to pass whatever and coerce it to an int.
23:27 bacek_ joined #perl6
23:28 kate21de1 joined #perl6
23:28 pmichaud I know that requiring an Int isn't going to work.
23:28 pmichaud my $a = <65>;   say $a.chr;
23:28 pmichaud (or say chr($a) )
23:28 pmichaud my $a = $*IN; say chr($a);
23:29 jnthn pmichaud: Aye. And for cases where the user having the right type of thingy in the first place is unimportant, I guess Any is the Right Place.
23:29 jnthn It'll probably do a coercion in the sig, once we support as.
23:29 pmichaud right.  That's partially why grep, join, map, and the rest of the builtins tend to be defined in Any and not some other specific class
23:29 jnthn *nod*
23:30 pmichaud I don't even think a coercion is necessary/wanted in many cases
23:30 pmichaud do the coercion lazily inside of the body of the method sounds better to me
23:30 jnthn pmichaud: I suspect it'll end up happenign somewhere whether we do it in the sig or not.
23:30 jnthn I don't think it matters so much where we do it, tbh.
23:31 jnthn I like the sig because it gives publicly introspectable info (and thsu documentation) as to how the value will be treated.
23:31 jnthn *thus
23:31 moritz_ multi chr(Any $x as Int) { ... }
23:31 jnthn I like to hope that some day there won't be an efficiency argument over where we do it, too. :-)
23:32 pmichaud but it might also change the way things get dispatched (e.g., with 'lift')
23:32 jnthn moritz_: Well, Any is the default...
23:32 moritz_ jnthn: yes, it could be written shorter ;-)
23:32 pmichaud I guess if things are being lifted then we wouldn't be doing the coercion, though.
23:32 jnthn pmichaud: I haven't had chance to think through the ramifications, or how we'll implement, lift yet.
23:33 jnthn (Actually I'm not quite at the point of understanding the justification for it.)
23:33 pmichaud I haven't thought of implementation yet.
23:33 pmichaud sometimes we want functions (such as builtins) to execute as though they were in their caller's lexical scope
23:33 moritz_ like most builtin functions, actually
23:33 jnthn Ok, that's a clean explanation. I'll buy that. :-)
23:34 pmichaud for example, if I define a custom infix:<eq>, and then call a function that uses eq to do comparisons, I might want that function to use my lexically scoped <eq> and not the one that was in scope when the called function was compiled
23:34 pmichaud but this example argues against using coercions
23:34 pmichaud because if we coerce an argument to some other type, we lose its original identity when we do a lifted operation.
23:34 jnthn Aye, you're right. :-)
23:35 pmichaud so, if "most builting functions" are intended to be doing lifts, they shouldn't be coercing arguments.
23:35 pmichaud *builtin
23:35 jnthn Right, given lift that follows.
23:35 jnthn pmichaud++
23:35 jnthn But yes, we still need to work out how to implement lift. :-)
23:36 pmichaud I fear we're going to need/want contexts as standard PMCs sooner rather than later.
23:36 pmichaud either that or some better introspection facilities.
23:36 jnthn That means we need non-sucky GC if it's gonna be core. ;-)
23:37 pmichaud agreed; I'm not optimistic though.  Maybe I'm just in a pessimistic mood about Parrot development overall lately.
23:37 jnthn Of course, our own dynPMC that increments the reference count and holds onto a context and gives us what we want is no problem.
23:37 jnthn pmichaud: Unfortunately, I am too.
23:37 [particle] know any students who can implement gc for parrot?
23:38 moritz_ lol
23:38 jnthn (not quite sober comment coming up) Half of me wants to really damm yell at some people...
23:38 pmichaud I hadn't thought about creating a custom PMC for contexts without replacing the existing implementation.
23:38 rachelBROWN joined #perl6
23:38 pmichaud that's a cool idea.
23:38 jnthn pmichaud: In a way, I'd rather contribute to making core Parrot better than hack around core Parrot in Rakudo.
23:38 pmichaud jnthn: feel free to yell at me :-)
23:38 jnthn pmichaud: Yeah, but you're not the person that needs yelling at...
23:39 pmichaud maybe in Oslo we can come up with a list of yells we ought to be making.  While having beer, of course :-)
23:39 jnthn pmichaud: My conflict really is that I _want_ to focus on Rakudo and trust that Parrot is going to happen.
23:40 jnthn As in, is going to go the Right Way.
23:40 pmichaud jnthn: yes, I have a similar conflict.
23:40 jnthn With fairly minimal intervention on my part.
23:40 jnthn Sometimes that happens (example: bacek++ for sockets).
23:40 jnthn Other times it doesn't.
23:40 pmichaud I suspect we need to come up with a clear unambiguous mechanism for indicating to Parrot folks  "RAKUDO NEEDS THIS"
23:41 pmichaud I've thought about adding a "Rakudo critical" tag to Trac
23:41 moritz_ or maybe more genera HLL critical
23:41 jnthn That only matters if we can make it really matter to people.
23:41 pmichaud Well, I did mark a ticket as being critical (in general) and allison moved it back to ordinary priority
23:41 pmichaud (sigh)
23:42 [particle] use the list, the ticketing system, and #parrotsketch.
23:42 pmichaud [particle]: I've been doing that with little success.
23:42 [particle] and use me. hell, i've got to be good for something.
23:42 pmichaud (the list, ticketing system, #parrotsketch)
23:42 [particle] it's my job.
23:42 jnthn We can say calling stuff sucks and write flames about Parrot in comments in the Rakudo source (erm, sorry, I was pissed off...), but frankly it's gone nowhere of late.
23:43 [particle] tell me what you need. point me to it via email, even a short note since i have some of the context, and i'll make it happen.
23:43 jnthn I feel really bloody arrogant saying unless if JFDI it ain't going to change, but it's getting harder and harder not to feel that way. :-(
23:43 jnthn s/if/I/
23:43 [particle] look, parrot has a roadmap, and milestones
23:43 [particle] we've worked successfully off of that for months now
23:43 pmichaud particle:  i disagree.
23:44 [particle] well, with some success
23:44 jnthn [particle]: We've been successful in achieving the things that were chosen as critical on the roadmap, IMO.
23:44 jnthn Which - don't get me wrong - *is* an achievement.
23:44 [particle] yes, it is.
23:44 pmichaud even there I'm not completely in agreement.  'install' was critical but really hasn't come together yet.
23:45 [particle] that's news to me. but i haven't been around much
23:45 jnthn pmichaud: Actually, I think your comment points to a deeper issue.
23:45 jnthn A bunch of refactors and stuff have got done.
23:45 jnthn e.g. MMD
23:45 jnthn But there's done and then there's done as well as I'd like to have seen them done.
23:46 pmichaud I agree, I have that issue as well.
23:46 jnthn And yes, I know it's open source, blah blah.
23:46 pmichaud calling conventions is one - I identified :lookahead as being critical (or at least very important) for rakudo back at PDS and was told it would be done as part of the calling conventions refactor
23:46 jnthn Which, IMO, never even happened.
23:47 pmichaud but it got marked as 'landed'
23:47 jnthn Renaming some functions is I guess one definition of "refactoring"
23:47 jnthn But it's not really what we wanted/needed.
23:47 pmichaud exactly.
23:47 pmichaud many things were listed as "landed" in the roadmap but that didn't address the concerns of the language implementors.
23:48 jnthn And having been at PDS too, I heard exactly the same discussions as you. And I agree completely that saying that what was requested at PDS in terms of calling conventions was achieved is, IMO, a (bad) joke.
23:49 jnthn (erm. not that I'm suggesting that's your opinion...sorry...)
23:49 pmichaud no problem, I'm not adverse to that opinion.
23:49 jnthn It was a snider version of the way you put it. ;-)
23:49 [particle] ok, well, airing gripes in an open channel (even if it's the wrong one) is fine and all, but i'd like to make progress on what you need.
23:50 pmichaud [particle]: alas, I'll have to leave to fetch dinner in a moment. (more)
23:50 pmichaud I'd like to make progress also, but the standard mechanisms (trac tickets, parrotsketch reports, mailing list) doesn't seem to be working.  either I'm using them incorrectly or there's a seriously broken process somewhere.
23:50 jnthn [particle]: This is a channel where Perl 6 implementers can talk about implementing Perl 6.
23:51 [particle] jnthn: sure, and i can point folks to the log
23:52 pmichaud hmmm, my rx:P5 patch results in two spectest failures -- I'll have to fix those when I get back from dinner fetch.
23:52 pmichaud bbiaw
23:52 [particle] they're just not listening for their names as they're not in channel atm
23:55 jnthn pmichaud: enjoy dinner :-)
23:55 allbery_b joined #perl6
23:58 cspencer rakudo: say ${^ENCODING}
23:58 p6eval rakudo c3e540: OUTPUT«say requires an argument at line 1, near " ${^ENCODI"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
23:58 cspencer rakudo: say $*ENC
23:58 p6eval rakudo c3e540: OUTPUT«Use of uninitialized value␤␤»
23:59 wknight8111 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo