Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-06-23

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:10 yinyin joined #perl6
00:17 alester joined #perl6
00:20 TimToady sorear: um, the parser's main time is before the user program's main time; it's a different "run" in that sense
00:25 BinGOs joined #perl6
00:34 justatheory joined #perl6
00:34 sorear TimToady: I'm having some difficulties with that model
00:35 sorear Mainly, along the lines of my &x := {}; BEGIN { augment class Block { ... }; $x.foo }
00:35 sorear The parser has to use the user code's instantiations of Block, Str, ClassHOW, etc in order for BEGIN-time metaprograms to work
00:35 sorear But those are precisely the ones that cannot be sealed early
00:35 sorear er, closed
00:36 TimToady that's why we use derivation instead of MONKEY_TYPING
00:37 sorear ?
00:38 TimToady final is not the same as closed
00:40 sorear yes, but AFAICT Block cannot be finalized *or* closed until CHECK time
00:41 eternaleye joined #perl6
00:45 TimToady but that's the definition of Block for the user's program, not for the compiler, which has already been compiled
00:49 sorear my &x := {}; BEGIN { &x.WHAT !=== Block } y/n?
00:51 tedv joined #perl6
00:51 tylerni7 joined #perl6
00:53 TimToady correct, since &x is bound at run time, and BEGIN happens at compile time
00:54 sorear um.  right.  oops.
00:54 sorear BEGIN { {}.WHAT !=== Block } ?
00:55 TimToady ===
00:57 sorear Why?  {} is constucted by the compiler.
00:59 TimToady sure, and it's an object of type Block
00:59 sorear Is it of the user's Block type?  Or are the two Blocks ===?
00:59 TimToady (more precisely, it becomes one when {} is run)
01:00 sorear so the runtime type of closures binds to the user's instantiation of classes. ok.
01:01 sorear that leaves ClassHOW
01:03 sorear I suppose this is a strong argument for doing as little as possible at compile time
01:03 diakopter hee
01:04 * diakopter feels vindicated in arguing for an interpreter
01:04 diakopter well, more of an interpreter.
01:06 TimToady the interesting boundary is how much we can optimize at YOU_ARE_HERE in the setting
01:09 diakopter SAW_THE_CIRCULARITY_BLADE_IN_HALF_HERE
01:09 TimToady it might well be worth assuming that most of the setting is not monkey-typed until proven otherwise, and then re-pessimize it :)
01:10 diakopter that was how I imagined it [in sprixelCLR], at one point
01:12 TimToady optimizers are "cheaters", so sometimes cheaters get caught, and have to pay :)
01:12 ash_ joined #perl6
01:21 sorear unfortunately, there doesn't appear to be any way in the CLR to swap the implementation of a subprogram
01:21 sorear so before absolute finality, we need to rely on indirecting every call
01:21 diakopter well
01:21 diakopter what do you mean by 'subprogram'
01:21 sorear System.Reflection.Method
01:22 diakopter ?
01:22 diakopter ... to privmsg
01:23 rurban joined #perl6
01:28 diakopter rurban: hi; ltns
01:33 redicaps joined #perl6
01:55 plobsing joined #perl6
01:57 jaldhar joined #perl6
01:58 dalek csmeta: r339 | stefa...@cox.net++ | trunk/vicil/ (2 files):
01:58 dalek csmeta: [vicil] Start hashing out the kernel
01:58 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=339
02:00 agentzh joined #perl6
02:01 sorear who runs dalek, again?
02:01 diakopter me
02:02 diakopter ish
02:02 sorear could you hack it to treat ... as a wildcard when running the email->nick reverse mapping?
02:04 diakopter maybe
02:05 diakopter I think it just uses what's in the RSS/ATOM feed
02:10 diakopter yeah: http://code.google.com/feed​s/p/csmeta/svnchanges/basic
02:10 diakopter took forever to find it
02:10 diakopter Infinoid's code is highly abstracted :)
02:11 sorear dalek also has an email to nickname mangler
02:11 diakopter oh
02:11 sorear when I commit to nqp-rx, dalek uses E:stefanor@cox.net as a key into the Parrot CREDITS file
02:11 sorear then it gets sorear from the U: line and puts that in the channel
02:12 diakopter k; I'll see about making it wildcard
02:12 sorear (yes, the Parrot credits file.  No matter what project you're comitting to.)
02:14 pmichaud good evening, #perl6
02:15 ash_ greetings pmichaud, did any of your talks happen to make it online? Or anyone elses?
02:16 pmichaud if you mean videos, my experience is that the videos take weeks to show up, if ever.
02:16 pmichaud I don't think any of the videos from YAPC's that I've spoken at have ever made it online.
02:17 ash_ okay, just curious
02:18 [mark] joined #perl6
02:19 sorear Has anyone ever looked into what's wrong with YAPC?
02:20 diakopter what are the symptoms?
02:20 sorear Videos never get posted
02:34 pmichaud it's put together by volunteers.  transcoding videos is time consuming.
02:34 pmichaud thus it often doesn't get done.
02:35 sorear ah
02:40 [mark] joined #perl6
02:40 ashleydev joined #perl6
02:43 jaldhar joined #perl6
02:45 cognominal joined #perl6
02:58 ash_ joined #perl6
02:59 [mark] joined #perl6
03:10 mtve joined #perl6
03:12 lue ohai
03:16 sorear hi
03:19 christine joined #perl6
04:09 dalek joined #perl6
04:11 eiro joined #perl6
04:14 sorear hey cool dalek rebooted
04:34 sorear TimToady: What does a repr have to do to be called "P6opaque"?
04:35 s1n joined #perl6
04:55 sorear pmichaud: here?
04:56 sorear I'm wondering how parcel arguments interact with invocant arguments
04:57 sorear (method (|\$parcel) { $parcel.perl.say })(1, (2,3), 4)
04:57 sorear rakudo: (method (\|$parcel) { $parcel.perl.say })(1, (2,3), 4)
04:57 p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Malformed parameter at line 11, near "\\|$parcel)"␤»
04:57 sorear no parcel parameters yet in rakudo I guess
04:57 sorear but I'm interested in that case & the converse one
05:03 Guest23195 joined #perl6
05:15 dalek csmeta: r340 | stefa...@cox.net++ | trunk/vicil/Kernel.cs:
05:15 dalek csmeta: [vicil] A sketch of our P6opaque
05:15 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=340
05:16 sorear Oh well.
05:18 diakopter no I didn't do that..
05:28 [Coke] in lieu of LTM in rakudo, how can I specify which proto is tested first?
05:32 sorear [Coke]: textual order
05:33 [Coke] sorear: by name of the rule?
05:33 [Coke] that didn't seem to matter. "scalar" matched before "array"
05:33 [Coke] trying to combine the rules into a single rule now.
05:34 sorear [Coke]: no, by byte offset in the source file
05:35 dalek csmeta: r341 | stefa...@cox.net++ | trunk/vicil/Sprixel/Compiler (2 files):
05:35 dalek csmeta: [vicil] Make the nature of the P1 polymorph a bit more explicit
05:35 dalek csmeta: review: http://code.google.com/p/c​smeta/source/detail?r=341
05:35 sorear (actually I think it's counting code units, but still)
05:36 [Coke] sorear: ah. will try to remember that for next time. thanks.
05:37 orafu joined #perl6
05:44 Cyg07 joined #perl6
05:46 Cyg07 clean
05:46 Cyg07 left #perl6
05:47 Mowah joined #perl6
05:53 sorear I am thinking Parcel needs to be VERY primitive.
05:55 agentzh joined #perl6
06:03 sorear Parcels aren't lazy !?
06:04 Zapelius joined #perl6
06:15 sorear Who besides pmichaud understands the new list model?
06:15 sorear +here
06:20 mberends hi sorear, probably noone. The backlogs partially reveal a series of gradually mutating concepts, so you would become the second or third person to really understand it.
06:20 mberends it's the whirlpool model running at 0.01Hz
06:21 mberends 0.0001Hz
06:22 sorear 0.0001Hz is once every three hours...
06:22 mberends er, add a few more zeroes then ;)
06:26 Zapelius joined #perl6
06:40 Ross^ joined #perl6
06:41 skids joined #perl6
06:43 Su-Shee joined #perl6
06:54 mberends hi Su-Shee, are you up for some DBD writing today? I have tuits :) The http://www.perlworkshop.be/bpw2010/ decided not to schedule the FakeDBD talk...
07:00 nadim joined #perl6
07:09 sorear In light of the existance of the \|$foo parameter form, is a Perl 6 implementation obliged to handle $*foo(:a, :b) differently from $*foo(:b, :a)  ?
07:11 sorear rakudo: \(1, 2).WHAT.perl
07:11 p6eval rakudo 7b089e:  ( no output )
07:11 sorear rakudo: \(1, 2).WHAT.perl.say
07:11 p6eval rakudo 7b089e: OUTPUT«Capture␤»
07:13 Su-Shee mberends: no, I'm trying to keep a deadline today. ;)
07:18 mberends okey dokey :)
07:23 ejs joined #perl6
07:27 Su-Shee_ joined #perl6
07:34 _kaare mberends: Interesting. I'm considering moritz_ ' challenge here: http://use.perl.org/~pmichaud/journal/40407
07:35 ejs joined #perl6
07:36 _kaare If it can be done w/o Parrot knowledge. Don't have tuits for starting that.
07:45 mathw Good morning
07:45 mberends good morning mathw
07:46 mberends _kaare: that link was to Patrick's Rakudo * update. Which of the challenges do you mean?
07:47 cxreg in the comments, there's a thing about postgres and fakedbi
07:48 mberends oh right :) it looks like we'll have postgresql and CSV drivers by end of July
07:49 * cxreg reads FakeDBD/mysql.pm6
07:49 _kaare mberends: The postgresql one. But if you already fixed it, OK :-)
07:49 cxreg oh, that looks like NCI
07:49 mberends anyone interested in testing a FakeDBD::FreeTDS ?
07:49 cxreg looks easy, too
07:50 Su-Shee cxreg: it is. I have no clue at all about NCI and managed three methods.
07:50 Su-Shee and I really mean _no_ clue.
07:50 _kaare + sorry about the nit so precise link. But you can't link to a comment there.
07:50 mberends :-) got it in 2
07:51 cosimo joined #perl6
07:53 _kaare It looks esay to do a Pg version if NativeCall does the magic Parrot gluing.
07:54 cxreg yeah, exactly
07:54 cxreg NCI++
07:54 tadzik joined #perl6
07:55 redicaps left #perl6
07:56 clintongormley joined #perl6
07:57 cxreg git-heads, git.git master just merged a branch which adds "git cherry-pick <range>"
07:57 mberends there's also a GSoc project to make Parrot NCI more flexible, so if it succeeds we get access to almost any native library instead of just a lucky few. Today, for example, it's not possible to use Zavolaj to access SQLite afaics.
07:57 * cxreg compiles
08:00 skids joined #perl6
08:01 mathw yeah I'm looking forward to that one, because I want to look at binding GObject libraries via GIR
08:01 mathw but I want to wait until the new NCI stuff lands
08:01 cxreg mberends: what defines "lucky few" ?
08:01 mathw at the moment I suspect it would be far too much hassle
08:02 Su-Shee mathw: when is it supposed to land?
08:03 mathw Whenever it's ready, I guess
08:04 mathw I'm not exactly waiting on the doorstep
08:04 mberends cxreg: Parrot's current NCI can use any library, but can only call functions whose signatures (ie parameter and return types) are in a list that is hardcoded. Zavolaj docs mention the source files involved. Any arbitrary signature would be so much nicer.
08:04 mathw Lots of other things to do first, only one of them being Perl 6-y
08:04 cxreg mberends: ah.  sounds like preprocessor issues.
08:05 * cxreg reads about libffi
08:09 cxreg looks like it's a spinoff from gcc
08:09 mberends zavolaj cannot cope with NCI calls that pass or receive pointers to native structs, for example. Pointers to native arrays are ok, for arrays of some native type such as int32 or pointers to C strings.
08:10 plobsing mberends: that is not strictly true. Parrot currently provides a utility to create support for more predefined signatures ahead of time. So any arbitrary signature is possible now, if a little inconvenient.
08:11 mberends plobsing: thanks:) then we need to expose that in zavolaj soon.
08:13 mberends plobsing: I was aware of your NCI project outside of the Parrot core. Will you merge that in?
08:14 plobsing Why bother? libjit only supports a subset of platforms that libffi supports (ash_++'s gsoc project)
08:14 plobsing notably it sucks on OSX
08:15 plobsing if you want it bad enough it is there. otherwise wait a bit longer for a better solution in core.
08:15 mberends ahh, right. better to wait for the GSoC work to land in core. It may not be in time for Rakudo *, so we'll have to discuss bundling dependencies with the distribution.
08:17 plobsing mberends: if you are creating library bindings, 95% of the time you know the signatures in advance, in which case you can create a parrot dynlib with extra signature support using parrot_nci_thunk_gen.
08:18 plobsing the just in time stuff is only really more useful for exploratory programming.
08:18 sorear plobsing: Entirely out of curiousity, why did you decide to prototype on libjit instead of libffi?
08:18 mberends plobsing: I never thought about creating a dynlib. good idea!
08:18 plobsing more convenient API.
08:19 kensanata joined #perl6
08:20 plobsing as I've said multiple times, if I knew about the poor platform support, I would have chosen something else.
08:21 sorear ah
08:28 mathw It's always a pain when you find out about something like that after you've done a load of work on it
08:29 * mathw goes back to contemplating websites written in Haskell
08:29 plobsing true, but the convenient API meant that most of the work was parrot-side, so no big loss
08:29 dakkar joined #perl6
08:30 arnsholt mathw: You scare me =p
08:32 mathw arnsholt: my work here is done :D
08:33 * sorear -> sleep
08:33 mathw It's really just that my Haskell skils have rotted for far too long
08:33 mathw and I happen to need to write a couple of fairly straightforward websites
08:33 mathw Very simple things maybe with an sqlite backend
08:34 mathw and unfortunately Web.pm with Rakudo just isn't fast enough
08:34 mathw (yet)
08:36 mberends if we can get a P6 version of Dancer (expected around end of July) you'd have an in-process webserver with response times under 1 second
08:37 stepnem joined #perl6
08:39 mathw awesome
08:42 mberends those are my Rakudo * goals: P6 Dancer, some async I/O (implementing select), and expanding FakeDBI.
08:42 moritz_ good morning
08:43 mberends good moritz_
08:45 moritz_ mberends: if you do async IO, _sri++ might start porting mojo to p6 :-)
08:48 moritz_ _kaare: there are actually two possible routes to implement FakeDBD::pg
08:48 moritz_ _kaare: one is to use the NCI stuff, just like the mysql driver
08:49 moritz_ _kaare: and the ohter is to try to use the bindings that parrot already has, but that likely requires parrot knowledge (though not too much)
08:50 moritz_ https://svn.parrot.org/parrot/trunk/t/library/pg.t that's the PIR code that tests the postgres bindings
08:52 _kaare moritz_:  Yeah, I saw that already. And it works. I just have no idea how to use that from rakudo.
08:53 moritz_ rakudo: say pir::split__pss('a', 'foobar')
08:53 p6eval rakudo 7b089e: OUTPUT«[ "foob", "r" ]␤»
08:53 moritz_ _kaare: that's a possibilty to use PIR opcodes in rakudo
08:53 moritz_ the thing after the __ is the signature
08:53 moritz_ returns a PMC (p) and receives two strings (ss)
08:54 moritz_ another is Q:PIR { ... } blocks, where you can assign to %r to set the return value
08:54 moritz_ but if you don't want to explore the parrot route, using NCI directly is fine too
08:57 skids joined #perl6
08:57 skangas joined #perl6
09:00 masak joined #perl6
09:00 masak oh hai, #perl6!
09:01 mberends hai masak!
09:01 masak mberends: how are things?
09:02 mberends masak: lovely day up here in Sweden :) going to UK after $work today, and plenty of &hacking time now :)
09:02 masak oh, still in Sweden? where?
09:03 mberends www.sundsgarden.se near Helsingborg
09:03 masak sounds wonderful. must be warmish.
09:04 mberends it certainly is
09:04 mberends it's an old college by the sea, very tranquil.
09:05 mberends we look across the sound to Denmark only a few km away
09:05 masak aye.
09:06 masak a couple of months ago, we were almost on the other side in a car. :)
09:06 mberends yes. Lund and jnthn++ are only 30 mins south by train
09:07 azert0x joined #perl6
09:07 _kaare moritz_: Can I ask you about it next week where I hope to have a _little_ spare time to look at it?
09:07 masak szabgab: kudos on the training course! http://blogs.perl.org/users/gabor_​szabo/2010/06/perl-6-training-cour​se-after-yapceu-on-7th-august.html
09:07 moritz_ _kaare: sure
09:07 masak szabgab: holler if you want assistance updating the course notes.
09:11 moritz_ what should happen when I import the same routine name from two modules into the same lexical scope?
09:12 masak an error is issued?
09:13 arnsholt It should definitely be possible to get an error in that case
09:13 arnsholt Might be something that shuold be adjustable via a pragma or something
09:15 * moritz_ tries to find the right location to patch
09:16 moritz_ _sri: http://www.perlmonks.org/?node_id=846021
09:18 moritz_ but using the same module twice shouldn't result in an error, right?
09:19 arnsholt Hmm. True
09:19 masak good point.
09:19 moritz_ I'm asking because cognominal++ submitted a ticket
09:19 moritz_ rakudo: use Test; use Test;
09:19 p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&plan'␤␤»
09:20 masak feels like the second use should just be a no-op.
09:20 moritz_ my first step is to make the error message more awesom (or at least try to :-)
09:20 moritz_ the second step is to see of $existing === $imported, and do nothing if that's the case
09:21 masak can a module re-export a sub that it imported with a use statement? in that case, this issue can have other, less trivial manifestations.
09:21 moritz_ hugme: add qiuhw to book
09:21 * hugme hugs qiuhw. Welcome to book!
09:21 masak but the above fix sounds sane, and it'd fix that case as well.
09:24 moritz_ I just don't know if it works the way I envision
09:24 moritz_ because rakudo currently doesn't really import at compile time
09:24 moritz_ it sets up the stubs at compile time
09:24 moritz_ but does the actual loading too late
09:25 moritz_ rakudo: use Test; BEGIN { plan 1 }
09:25 p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
09:25 moritz_ rakudo: sub plan { }; BEGIN { plan }
09:25 p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
09:26 masak rakudo: our sub plan { }; BEGIN { plan }
09:26 p6eval rakudo 7b089e: OUTPUT«===SORRY!===␤Could not find sub &plan␤»
09:26 masak afk &
09:30 moritz_ I have a patch for the more awesome error message, spectesting now
09:32 moritz_ hugme: add qiuhw to svg-plot
09:32 * hugme hugs qiuhw. Welcome to svg-plot!
09:35 jedai_ joined #perl6
09:35 moritz_ Hongwen Qiu took up a weekly challenge (closures for .subst, iirc) and has since then submitted patches to the book, and now SVG::Plot too \o/
09:39 muixirt joined #perl6
09:41 muixirt hi
09:41 moritz_ hi muixirt
09:42 muixirt moritz_: why does the make spectest take twice as long as some weeks ago?
09:42 moritz_ muixirt: it now defaults to only one test job at once
09:42 moritz_ muixirt: you can controll that via the TEST_JOBS env variable
09:43 muixirt start up times for perl6 got a lot bigger too
09:44 moritz_ :(
09:44 redicaps joined #perl6
09:46 moritz_ rakudo: say pir::null
09:46 p6eval rakudo 7b089e: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 24655632␤===SORRY!===␤syntax error ... somewhere␤»
09:46 moritz_ rakudo: say pir::null__p
09:46 p6eval rakudo 7b089e: OUTPUT«Null PMC access in type()␤  in main program body at line 11:/tmp/rz1eGewvDA␤»
09:48 masak ouch :)
09:48 masak perhaps the only Null PMC access for which I react, "well, you asked for it" :)
09:48 moritz_ well, you pass a null, you get a null PMC access :-)
09:50 moritz_ it might be pretty simple to prevent any null PMC access in assignment (by auto-promoting to Mu), but that might hide some bugs rather than expose them
09:50 masak aye.
09:53 masak wow. this RFC, almost 10 years old now, contains the seeds of placeholder parameters. http://dev.perl.org/perl6/rfc/23.pod -- with all due respect to TheDamian, what we ended up with looks *so* much better. :)
09:53 TiMBuS joined #perl6
09:53 masak of course, the RFC predates twigils, so it wasn't really possible to arrive at a nice syntax. :P
09:57 redicaps joined #perl6
09:59 dalek rakudo: b043847 | moritz++ | src/Perl6/Module/Loader.pm:
09:59 dalek rakudo: emit more awesome error message when importing a symbol would override an
09:59 dalek rakudo: existing lexical
09:59 dalek rakudo: Previously that died with "Multiple declarations of lexical $symbol".
09:59 dalek rakudo: Next step: don't die when using the same module twice (don't know if that's
09:59 dalek rakudo: going to be quite as easy...)
09:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b​043847aa7a2db4a360efc3da375163844504549
10:02 mathw masak: actually I think the best improvement we got over that RFC in the end was generating anonymous functions using *
10:03 mathw Which is kind of something completely different yet not
10:03 masak aye, that's also homologous to that RFC.
10:03 x19290 joined #perl6
10:03 mathw Although we didn't get implicit currying
10:04 x19290 left #perl6
10:04 masak I initially greeted the `* + *` syntax with a bit of silent skepticism.
10:04 masak but I definitely see its use in restricted situations now.
10:04 masak much like junctions.
10:04 moritz_ masak: and then you saw my starry obfu :-)
10:04 masak well, much like junctions, it's possible to over-use them and create obfu code :P
10:05 masak there will always be people who freak out over that. I'm not one of them.
10:05 x19290 joined #perl6
10:05 masak moritz_++ on the starry obfu. :)
10:06 mathw I don't care if it allows the creation of obfuscated code
10:06 moritz_ mathw: implicit currying can be quite harmful if you don't have static type checking
10:06 mathw It's up to programmers to write clear code, not the language to enforce it, because enforcing it usually removes expressiveness
10:06 mathw moritz_: yeah, I'm not saying we should have it. Haskell does it elegantly, but that's because it's completely static and can check everything.
10:07 moritz_ because you get very bad error messages when you accidentally supply too few arguments
10:07 moritz_ I see we're in violent agreement :-)
10:07 mathw yes
10:07 x19290 left #perl6
10:07 moritz_ I'm sure there'll be an ACME module which implements that, by hijacking the dispatcher
10:09 mathw if people want to do that, that's fine
10:09 mathw in fact it's great
10:09 mathw that's what Perl 6 is about!
10:09 mathw Give you a good language, but let you muck about with it if it's not right
10:09 mathw At least, that's what I see it as
10:09 mathw When I can see over the wall of awesome :)
10:11 masak mathw: [backlog - web sites in Haskell] there's a static web page generator for Haskell, called Hakyll. I'm thinking of porting it to Perl 6, if only to see if it's possible to translate arrows sensibly from Haskell to something else. :) http://jaspervdj.be/hakyll/
10:18 mathw that looks really impressive
10:19 masak yes, I'm drawn to well-designed apps like this one.
10:19 mathw I'm more needing dynamic stuff (probably using Yesod for that), but Pandoc could certainly solve a problem for me if I 'borrow' it
10:25 masak having toyed a little with dynamic stuff in Perl 6, I feel I would probably be much happer right now with a static solution. :)
10:25 masak I might make myself a Perl 6 blog with a static webpage, for example.
10:25 mathw mmm
10:25 mathw yes I think I'll definitely be using Pandoc
10:25 * moritz_ ponders porting mowyw to Perl 6
10:26 mathw my current project is a simple website thingy for a friend
10:26 mathw I want to give her an interface to edit pages
10:26 mathw so I was going to power it with Yesod, and if I plug the Pandoc library into it I can let her write them in Markdown, which she should find much easier to deal with than HTML
10:31 masak lunch &
10:36 colomon joined #perl6
10:38 x19290 joined #perl6
10:38 redicaps joined #perl6
10:40 x19290 not native English speaker
10:41 x19290 with current Rakudo, my Int $i = '123' is
10:41 x19290 runtime error, not compile time.
10:41 x19290 How about future Perl6?
10:43 x19290 Thank you.
10:43 x19290 left #perl6
10:44 x19290_ joined #perl6
10:44 x19290_ left #perl6
11:01 mberends de-commute to
11:01 mberends -> London
11:01 mjk joined #perl6
11:23 colomon loliblogged!  http://justrakudoit.wordpress​.com/2010/06/23/yapcna-day-2/
11:24 moritz_ colomon++
11:24 colomon moritz_++
11:25 colomon I must have told the story about how quickly that bug was fixed at least five times yesterday, and I'm pretty sure Patrick was talking it up as well.
11:30 TiMBuS big question: how would feed operators be implemented in rakudo? i think they are the coolest thing about perl6 and would love to have them in rakudo *
11:30 TiMBuS but after trying to grok all this laziness im beginning to see why they arent implemented yet :/
11:32 moritz_ afaict <<== is supposed to be like push, but lazily evaluates its arguments
11:32 moritz_ but I'm not sure how scoping is supposed to work with the feeds
11:32 colomon I suspect they will be pretty easy to implement now that lazy lists are sensible.
11:36 moritz_ colomon: reading your blog reminded me that I had forgotten to close the ticket in RT :-)
11:36 moritz_ done now
11:36 colomon :)
11:36 x19290 joined #perl6
11:36 colomon what happens if you call prefix:<+> on a Match object?
11:37 moritz_ The Right Thing :-)
11:37 moritz_ it numifies the string part
11:38 moritz_ (we have tests for them, and pass them :-)
11:38 colomon \o/
11:38 TiMBuS since they are sensible, would say, $a := map {...} 1..5; achieve the same result as @a <== map {..} <== 1..5; or is there some kind of additional wizardry going on in the second case
11:38 moritz_ I think it's sensible for them to be the same
11:41 colomon rakudo: my @a = <a b c d>; say @a[101 % *]
11:42 p6eval rakudo b04384: OUTPUT«b␤»
11:42 colomon rakudo: my @a = <a b c d>; say @a[102 % *]
11:42 p6eval rakudo b04384: OUTPUT«c␤»
11:42 moritz_ that was an old rakudobug for which I put a workaround in SVG::Plot
11:43 colomon lolibloggedagain: http://justrakudoit.wordpres​s.com/2010/06/23/trig-tests/
11:43 colomon afk
11:45 ciphertext joined #perl6
11:45 skangas joined #perl6
11:49 envi^home joined #perl6
11:50 arnsholt Have any of you guys read Jeffrey Kegler's posts about Marpa on blogs.perl.org?
11:51 masak x19290: that is a good question.
11:51 masak x19290: it certainly is a thing which *can* be caught at compile time.
11:52 Util joined #perl6
11:52 masak x19290: whether a Perl 6 compiler actually *will* catch it is, I believe, up to that compiler (and its authors).
11:52 avar arnsholt: Yeah, but I understand like 2% of it >:)
11:52 moritz_ arnsholt: URL?
11:52 dukeleto joined #perl6
11:52 masak x19290: TimToady has hinted now and then that it's preferable that errors be caught early if they can. but I don't think the spec mandates it.
11:54 takadonet morning all
11:54 moritz_ actually this particular instance could be caught with moderate effort
11:54 moritz_ because string literals have :returns('Str') in the PAST node
11:55 masak takadonet: \o
11:56 arnsholt moritz_: http://blogs.perl.org/users/jeffrey_kegler/
11:56 arnsholt "Parsing with Ruby Slippers" is very interesting
11:57 arnsholt avar: Heh. The more I read about it, the more I feel the need to try to write a Perl 6 implementation
11:58 masak arnsholt: does it have any relation to the work being done in/around STD.pm6?
11:59 dalek joined #perl6
12:00 arnsholt masak: Not really. Marpa is, as far as I've understood, an Earley parser on steroids
12:00 * masak googles "Early parser"
12:00 arnsholt Which means that it can find all the parse trees in an ambiguous CFG
12:01 masak ah, seems to be connected to linguistics.
12:01 arnsholt The (very) short version: it's a dynamic programming CFG parser algorithm that finds all possible parses for a sentence
12:01 masak nice.
12:01 masak I can see why you're interested!
12:02 moritz_ wow, that post is awesome
12:03 arnsholt Isn't it?
12:03 arnsholt masak: Yeah. I'm trying to use what I know to pick LHF that are a bit uncommon
12:04 masak "Einstieg in Perl 6: So entwickeln Sie robusten, wartbaren und effizienten Code: Alvar Freude[Sep 28, 2010]" -- this Amazon title keeps popping up on Twitter. I'm considering buying the book.
12:05 masak mainly because I can't imagine what it contains. :)
12:05 moritz_ I found alvar to be a nice guy to irc/talk to - that's nearly all I know about it :-)
12:06 masak is he on freenode?
12:06 moritz_ nick alvar on irc.perl.org - no idea about freenode
12:07 moritz_ currently not online though
12:07 masak neither am I. :)
12:08 x19290 masak: Thanks a lot.
12:08 masak glad to help.
12:09 moritz_ actually that compile time detection could be done with tcurtis' PAST optimization framework
12:09 moritz_ it's a bit of an abuse, but it should work ;-)
12:13 moritz_ rakudo: '3.14' ~~ /.*/ and say $/.sin
12:13 p6eval rakudo b04384: OUTPUT«0.00159265291648683␤»
12:13 arnsholt Hmm. Marpa is big though. wc -l on all the .pm files in the distrib is 10905
12:13 x19290 joined #perl6
12:14 x19290 Thanks moritz_ and bye.
12:14 moritz_ I think that's a nice idea for a fun project to try out
12:15 moritz_ look for infix:<=> nodes whose second argument has a :returns defined
12:16 moritz_ see if you can get the type information of the LHS at compile time
12:16 moritz_ and carp if the types don't agree
12:17 masak yeah, sounds like fun.
12:18 moritz_ I don't know if I'll get any hacking done today, but I might try it tomorrow
12:18 moritz_ or on Monday, where I don't work
12:18 masak ++moritz_
12:18 bbkr rakudo: for <inhale exhale> xx * {sleep .say;} # xx op combined with * is awesome :P
12:18 p6eval rakudo b04384: OUTPUT«inhale␤exhale␤inhale␤exhale␤inhale␤exha​le␤inhale␤exhale␤inhale␤exhale␤inhale␤exhale␤»
12:18 masak :)
12:19 masak nice trick on using the return value of .say to mean "1 second", too :)
12:21 huf why isnt this an infinite loop? what does xx * do? :)
12:21 moritz_ huf: it is an infinite loop
12:21 moritz_ huf: but p6eval runs into a resource limit at some point
12:21 huf ah. then i guess i understand that code
12:21 moritz_ and returns what it has got so far
12:22 mathw oh
12:22 mathw that's nice
12:22 huf moritz_: yeah, the lack of some kind of errormessage pointing that out was what confused me
12:23 cono masak: but if .say will return an error 0, program will sleep forever :D
12:23 masak huf: like "the program was still running, but we cut it off here"?
12:23 moritz_ rakudo: sleep(0); say "alive"
12:23 masak rakudo: sleep 0; say "awake"
12:23 p6eval rakudo b04384: OUTPUT«alive␤»
12:23 p6eval rakudo b04384: OUTPUT«awake␤»
12:23 moritz_ lol
12:23 huf masak: yeah, something like that
12:23 masak moritz_: you're a bit faster today :P
12:23 masak cono: no, it won't. see above :P
12:24 masak cono: what made you think 0 means "forever"? that's not very intuitive.
12:24 moritz_ that's what Inf is for :-)
12:24 masak rakudo: sleep; say "awake"
12:24 p6eval rakudo b04384:  ( no output )
12:25 masak now THAT would sleep forever. :P
12:25 masak just like in Perl 5.
12:25 bbkr Inf sleep by default does "pbc::sleep(1e16) while 1" (or something like that as far as i remember)
12:25 cono masak: or forever if no EXPR.
12:25 cono miss understandnig :)
12:25 masak cono: still. 0 !=== no EXPR.
12:25 cono I know
12:25 moritz_ bbkr: right; that's a workaround for parrot not supporting infinite sleep
12:25 cono my mistake :d
12:26 mathw Shouldn't sleep with no EXPR be an error?
12:26 masak mathw: it isn't in Perl 5.
12:26 masak mathw: I guess the parameter has Inf as the default.
12:26 bbkr mathw: indeed, its "sleep ($seconds = Inf) {}"
12:26 cono rakudo: sleep Inf; say "awake"
12:27 p6eval rakudo b04384:  ( no output )
12:27 mathw Can anybody demonstrate why I might want to sleep forever?
12:27 masak rakudo: sleep NaN; say "awake"
12:27 cono mathw: daemons
12:27 p6eval rakudo b04384:  ( no output )
12:27 cono mathw: they awakes only on signals
12:27 masak mathw: out of spite.
12:28 masak :)
12:28 mathw cono: I don't think we get to program the Great Old Ones in Perl 6 somehow.
12:28 mathw masak: hah
12:28 masak rakudo: sleep 4 + 2i; say "awake"
12:28 p6eval rakudo b04384: OUTPUT«You can only coerce a Complex to Real if the imaginary part is zero␤  in 'Num' at line 1␤  in 'sleep' at line 5125:CORE.setting␤  in main program body at line 11:/tmp/loCIf19iS4␤»
12:29 masak bah :)
12:29 mathw cono: also, every daemon I ever wrote tends to sit around blocking on something I/O-ish, like a poll() call
12:29 cono mathw: I wrote daemons for offline work, and break it's sleep only on work
12:30 mathw ah right
12:30 cono e.g. $s->insert_job->awake
12:30 mathw I've only done network ones
12:31 mathw Never got to use signals as they don't carry enough data :)
12:31 cono mathw: heh, w8, I will show you how to send more data by signals :D
12:31 cono mathw: http://search.cpan.org/~vpit/IPC-Mors​eSignals-0.15/lib/IPC/MorseSignals.pm
12:31 cono :D
12:31 bbkr infinite sleep may also be useful for forked child processes - in P5 they go to infinite sleep unless you set "$SIG{'CHLD'} = 'IGNORE';"
12:32 mathw cono: that... umm... err...........
12:33 colomon afk # driving back to YAPC
12:33 * mathw wishes he was at YAPC it sounds awesome
12:34 bluescreen joined #perl6
12:34 cono I bought tickets and book hotel, but still nervous about visa to Italy (fvcking Ukraine) :(
12:35 masak Italy does *what* to Ukraine, you say? o.O
12:36 cono You have not problem to come to Ukraine. But you have so difficult to trip to another country if you are citizen of Ukraine
12:36 masak sorry to hear that.
12:37 cono For Lisbon trip I went to Praha (coz visas to Chezch republic simpler) and after that went to Portugal. Kinda freak
12:38 cono Now, wanna try to direct fly to Italy
12:38 cono will have embassy meeting at 5 of July, need some luck for taking visa :D
12:38 mathw And I thought it was a hassle going from the UK, at least I just need a passport...
12:39 cono mathw: are you from UK ?
12:40 mathw yes
12:40 cono My dream is to visit: UK and Switzerland
12:40 cono and Fiji :D
12:41 cono Fiji are opposite to Ukraine on the earth
12:42 mathw Probably quite hard for you to visit here as well. And unlikely to get any better. The gutter press have been quite successful in generating hysteria about immigrants
12:42 masak cono: you were in Lisbon? did we meet?
12:42 cono masak: yeah, I remember you :)
12:43 masak :)
12:43 cono masak: it's me and Conway: http://home.cono.org.ua/_mg_4422.jpg
12:43 masak you do look familiar :)
12:43 cono maybe :)
12:44 redicaps joined #perl6
12:45 masak cono: when did you start paying attention to Perl 6?
12:46 cono masak: http://home.cono.org.ua/_mg_4405.jpg p6 team ? :D
12:46 masak parts of it, yes :)
12:46 cono masak: you and pmichaud talking, am I right?
12:46 masak aye. and frettled next to me, and jnthn a bit further away.
12:46 cono yup :D
12:47 moritz_ any p6/parrot hackathon plans for pisa?
12:47 masak hm, need to find where I put those sandals...
12:47 masak moritz_: I'm just assuming there'll be one :D
12:47 frettled masak: hmm?  :D
12:48 cono masak: I payed attention long time ago. But have very big language bar :(
12:48 masak frettled: it's you, isn't it?
12:48 masak cono: how long ago? before or after Pugs got going?
12:49 frettled Yup, that's me with the backpack.
12:50 cono masak: from pugs time. But had big problems with haskell. Learn a little haskell :D
12:50 cono but not so much leterature in russian about haskell
12:50 azawawi joined #perl6
12:50 mathw Haskell can be difficult enough even if you speak English natively
12:50 azawawi hi
12:50 masak azawawi: \o
12:50 azawawi sorear: ping
12:50 cono mathw: yeah, It's explode your brain :D
12:51 mathw There's an unfortunate tendency for the documentation to be very academic, and to talk about applicative functors using mathematical symbols and expect you to know the translations into Haskell code
12:51 cono masak: it's Wall and my face: http://home.cono.org.ua/_mg_4414.jpg
12:51 mathw oh hai azawawi
12:51 masak cono: so it is :)
12:51 cono was really fun, Wanna to yapsi again :(
12:51 mathw http://www.flickr.com/phot​os/mattofwalton/4724266617 <- it's my cat! (sorry, couldn't resist)
12:52 mathw (unfortunately not at YAPC)
12:52 cono mathw: nice :)
12:52 mathw although if he did go, you'd all get nothing done
12:52 cono But I like toyger cats
12:52 masak cono: you keep writing it "yapsi" -- that's flattering :)
12:53 cono masak: I was copy this spelling from you :D
12:53 masak cono: YAPC is a conference. Yapsi is a Perl 6 implementation. :)
12:53 masak actually, YAPC is several conferences.
12:53 mathw oh of course
12:53 cono ah, sorry, didn't know :)
12:54 masak cono: no worries :)
12:54 * arnsholt really wants to go to YAPC
12:54 arnsholt (::EU)
12:54 arnsholt Maybe next year
12:54 mathw Mi komprenas. Yapsi = Yet Another Perl Six Implementation
12:54 cono ah
12:54 mathw I just spent all the money for YAPC::EU on something else
12:54 cono mi ne paroli :)
12:54 mathw So maybe next year, with arnsholt :)
12:55 masak mathw: yes, that's the idea.
12:55 mathw I do have a silly habit of only wanting to go places where I speak the local language, which does cut me back a lot since I don't speak anything other than English and German
12:55 arnsholt Speaking of conferences, has anyone heard anything about an NPW for 2011?
12:56 masak arnsholt: I haven't heard a lot about NPW for 2010.
12:56 arnsholt mathw: Understandable. But you can get quite far with pointing and waving
12:56 mathw :)
12:56 arnsholt (It can even be quite fun =)
12:56 mathw I survived in Sweden,b ut everyone there seems to speak perfect English
12:56 mathw It's quite disturbing
12:56 masak ...hardly perfect...
12:56 arnsholt masak: Oh yeah, did anything happen with that? I heard something about postponing due to volcanoes, but since I wasn't going I never paid much attention
12:57 masak arnsholt: so, there might be an NPW on Iceland later this summer.
12:57 mathw masak: compared to the average Brit's any-other-language...
12:57 masak arnsholt: last I heard, they wanted suggestions for suitable dates.
12:57 arnsholt Oh, nifty
12:57 pmurias joined #perl6
12:58 masak mathw: Swedes:Brits::errors:shortcuts
12:58 masak man, I love that syntax.
12:59 mathw it's neat syntax
12:59 mathw but I believe your statement is false
12:59 aesop joined #perl6
12:59 mathw Allow me to reply as a Prolog interpreter:
12:59 mathw No.
12:59 masak :)
12:59 masak "Where's the official Perl 6..." "No."
13:00 arnsholt masak: My SWI prolog actually says "false"
13:00 arnsholt But that does ruin the joke a bit ^^
13:00 mathw Maybe pmichaud is more of a Prolog guy than I thought
13:00 arnsholt Prolog is awesome! =D
13:00 mathw Not that it matters, he's still awesome :)
13:00 mathw yeah it is
13:00 mathw I love writing predicates that you can use backwards
13:01 arnsholt Yeah, that's one of the niftier parts
13:01 arnsholt The whole unification and backtracking thing is really cool
13:01 broquaint joined #perl6
13:01 mathw I always enjoy spending a while working in something that makes me think completely differently. Hence: Haskell.
13:02 arnsholt Yeah, I really should get around to learning Haskell
13:02 mathw What I love about Perl 6 is that I'll be able to do more Haskelly things alongside more normal things, all together
13:02 masak maybe we should arrange a Haskell study circle here on #perl6?
13:02 arnsholt That might be cool
13:02 masak we go off to a side channel and discuss weekly some online tutorial or other...
13:03 arnsholt A friend of mine and me have talked about a Haskell study circle when the fall semester starts up again
13:03 masak seems there's a few of us already who'd join such a thing.
13:03 mathw I'd be happy to join in
13:03 mathw I doubt it'd be long before we depart from the areas I understand
13:04 arnsholt (In my more hubristic moments I've considered having a look at pugs =)
13:05 mathw I never understood Pugs
13:05 mathw although at the time I had other rather nastier concerns
13:07 moritz_ .u umlaut
13:07 phenny moritz_: Sorry, no results for 'umlaut'.
13:07 moritz_ .u diare
13:07 phenny moritz_: Sorry, no results for 'diare'.
13:07 moritz_ .u diaresis
13:07 phenny moritz_: Sorry, no results for 'diaresis'.
13:07 masak .u ümlaüt
13:07 phenny masak: U+00FC U+006D U+006C U+0061 U+00FC U+0074
13:07 masak :)
13:09 JimmyZ joined #perl6
13:11 l2trace99 joined #perl6
13:16 kolibrie I'm getting what I believe is an extra '+' on my pattern when I run: viv -5 -e "token { 'hello' \s \S+ }"
13:16 kolibrie $self->_MATCHIFYr($S, "hello", $C->_PATTERN(qr/\Ghello\s\S++/));
13:18 moritz_ kolibrie: in perl 5.10 and above, ++ is the 'greedy + without backgracking'
13:19 moritz_ *backtracking
13:19 moritz_ so that's fine
13:20 moritz_ if you say 'regex' instead of 'token', the + should be gone
13:20 proller joined #perl6
13:21 kolibrie moritz_: ah, so my Perl 5 knowledge is lacking.  Thank you for pointing out that new syntax
13:25 moritz_ you're welcome
13:33 vdrab joined #perl6
13:35 colomon joined #perl6
13:37 sunnavy joined #perl6
13:42 ejs joined #perl6
13:43 sunnavy joined #perl6
13:48 sunnavy joined #perl6
14:06 gbacon joined #perl6
14:14 redicaps left #perl6
14:16 pugssvn r31414 | Kodi++ | [t/spec/S03-operators/series*.t] Deleted redundant tests, reorganized and updated remaining tests, and added new ones.
14:16 pugssvn r31414 | [t/spec/S03-metaops/zip.t, t/spec/S03-metaops/hyper.t] Added tests mistakenly included in series.t.
14:16 pugssvn r31414 | [t/spec/TODO] The series tests should now be complete.
14:19 bphillips joined #perl6
14:19 kolibrie my slides are online (not sure how much better I can make them before I present): http://graystudios.org/talks/viv/viv.xul
14:19 kolibrie (half hour from now)
14:20 masak \o/
14:21 bbkr rakudo: Seq.new.^methods>>.say # a bug? maybe Perl6MultiSub.Str() should list all prototypes?
14:22 p6eval rakudo b04384: OUTPUT«new␤elems␤Str␤Method 'say' not found for invocant of class 'Perl6MultiSub'␤  in main program body at line 11:/tmp/oMSbzSnuwZ␤»
14:23 moritz_ bbkr: or the name, just like the only-subs do
14:23 justatheory joined #perl6
14:24 bbkr moritz_: or name. should I report or already known?
14:24 moritz_ bbkr: don't think it's been reported so far
14:25 moritz_ kolibrie: slides look nice, if a bit technical
14:27 masak kolibrie: nice slides. did a double take at slides 16..17, but you probably have some plan with that.
14:27 masak bbkr: yeah, that one looks new.
14:28 bbkr reported then
14:28 moritz_ my firefox only displays them in a rather small window, but I guess it's a local problem here
14:28 masak bbkr: in general (i.e. outside of bug-finding mode), it's a slight unpattern to do >>.say -- but you know that, I guess.
14:29 masak moritz_: looks OK here.
14:29 bbkr masak: why?
14:29 moritz_ >>. doesn't guarantuee order of execution
14:29 masak bbkr: because >>. doesn't work well with side effects, and .say is only side effect.
14:30 moritz_ so it's not so nice for methods that cause side effects
14:30 bbkr makes sense, thanks :)
14:31 masak Perl generally doesn't mind if you use things for "what they weren't meant". but in this case, it's best not to, and to spread the meme not to. :)
14:31 estrabd joined #perl6
14:33 bbkr if I add tests to pugs repo that i'm sure Rakudo will pass and Pugs will fail do I have to fudge them somehow for Pugs?
14:33 moritz_ bbkr: don't bother
14:34 moritz_ as long as nobody maintains pugs, we don't maintain stuff for pugs
14:35 bbkr thanks. i'll browse through RT queue soon and try to add tests and close some bugs already fixed
14:35 arnsholt If pugs is reanimated, there's probably going to be all kinds of madness going on with what passes and what doesn't anyways
14:36 moritz_ bbkr: that's great. Many tickets that are fixed but no tests yet are assigned to me - don't hesitate to work on those
14:44 patspam joined #perl6
14:45 masak if we run a Haskell study circle for a semester, one goal of it could be "fix some LHF stuff in Pugs".
14:46 kolibrie moritz_: I'm a little worried about how technical it is - maybe the way I present it can make it more comprehensible
14:47 kolibrie masak: I believe that was all refactoring work, and it finally got back to working again after a year
14:47 masak kolibrie: ah, that explains it.
14:49 arnsholt masak: That would be cool, yeah
14:49 redicaps joined #perl6
14:49 redicaps left #perl6
14:50 kolibrie moritz_, masak: thank you for looking over my slides
14:50 moritz_ kolibrie: you're welcome
14:50 masak a pleasure. have a good talk!
14:55 ajs moritz_: loved your Math::Model blog. I plugged it all over the interwebs: http://bit.ly/dDmx9J
14:56 moritz_ ajs: glad you liked it, and thanks for sharing
14:58 kolibrie masak: thanks
14:59 ajs I think we have a new marketing phrase for Perl 6: "Use Perl 6, the power of SVG compels you!"
14:59 masak yes, SVG examples make people happy.
15:00 masak I found that out with http://use.perl.org/~masak/journal/39152
15:00 moritz_ any kind of visual output really
15:00 colomon joined #perl6
15:00 moritz_ masak: does druid work on rakudo master?
15:01 masak moritz_: not quite yet.
15:01 masak it runs, but there are still errors.
15:01 arnsholt Hmm. Do you happen to know if any of Graphviz's algorithms are documented somewhere? =)
15:01 masak moritz_: I'd look at it right away, but I was just going to set my teeth into pls again :)
15:02 moritz_ masak: I think pls has priority. Don't let me distract you :-)
15:03 masak I made good progress with pls yesterday. might have something to show later today.
15:04 pugssvn r31415 | bbkr++ | # RT #75636
15:04 skids http://www.abrij.org/~bri/camelia_ifs.svg <-- will now soak your CPU on chrome as well as opera with 1fps flying camelias.
15:06 moritz_ phenny: tell bkkr to please mention [t/spec] at the start of commit messages to the test suite, so that people know which part of the pugs repo was modified. Thanks, and thanks for the tests!
15:06 phenny moritz_: I'll pass that on when bkkr is around.
15:06 skids ( http://www.abrij.org/~bri/ifs.svg runs a bit smoother, but no camelias.)
15:07 * colomon thinks he will be able to eliminate more than half of the trig tests when all is said and done.
15:07 moritz_ \o/
15:12 bbkr moritz_: i'll include t/spec info next time, thanks
15:12 bbkr rakudo: Inf.Int/Inf.Int # whooops !
15:12 p6eval rakudo b04384: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in 'Rat::new' at line 3608:CORE.setting␤  in 'infix:</>' at line 3697:CORE.setting␤  in main program body at line 11:/tmp/Ta59dSzlNU␤»
15:13 bbkr rakudo: Inf.Int/(Inf.Int) # whooops !
15:13 p6eval rakudo b04384: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in 'Rat::new' at line 3608:CORE.setting␤  in 'infix:</>' at line 3697:CORE.setting␤  in main program body at line 11:/tmp/RwYG4QngDp␤»
15:13 bbkr bug?
15:14 * masak thinks so
15:14 masak Inf.Int should be Inf, no?
15:14 masak rakudo: say Inf/Inf; say Inf.WHAT
15:14 p6eval rakudo b04384: OUTPUT«NaN␤Num()␤»
15:14 masak oh, right. Inf works across a number of types.
15:15 bbkr rakudo: Inf.Int.WHAT.say
15:15 p6eval rakudo b04384: OUTPUT«Int()␤»
15:15 bbkr so Rat should create, because it's Int / int
15:16 PacoLinux joined #perl6
15:17 colomon Inf.Int doesn't work yet
15:17 colomon rakudo: Inf.Int.say
15:18 p6eval rakudo b04384: OUTPUT«-9223372036854775808␤»
15:23 masak actually, that's the saddest attempt at a positive infinity I've ever seen. :/
15:24 colomon we could make it maxint pretty easily, but that's still pretty sorry as these things go.
15:25 masak moritz_: to-json makes \uXXXX escapes out of *every* character, printable or no.
15:26 arnsholt Whoops =)
15:26 masak I guess I could post-process it...
15:27 masak huh, scratch that. it seems to preserve capital letters.
15:27 pugssvn r31416 | bbkr++ | [t/spec/S32-num/rat.t] RT #75636 Inf.Int/1 fails to create Rat
15:28 masak moritz_: I guess it's the \c0 and \c127 sequences which don't match properly at http://github.com/moritz/json/b​lob/master/lib/JSON/Tiny.pm#L29
15:28 * masak tests this hypothesis
15:29 masak rakudo: say "ABC123abc oh hai".subst(/<-[\c0..\c127]>/, { ord(~$_).fmt('\u%04x') }, :g)
15:30 p6eval rakudo b04384: OUTPUT«ABC123\u0061\u0062c\u0020\u0​06f\u0068\u0020\u0068\u0061\u0069␤»
15:30 masak right.
15:30 colomon huh.  range bug?
15:30 masak I think the range is fine.
15:30 masak but nqp-rx doesn't understand \c
15:30 masak or sump'n.
15:31 masak so the range is from 0 to c, perhaps.
15:31 masak or from 0 to \
15:31 masak rakudo: say .ord for "0", "\"
15:31 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Confused at line 11, near "say .ord f"␤»
15:32 masak rakudo: say ord($_) for "0", "\\"
15:32 p6eval rakudo b04384: OUTPUT«48␤92␤»
15:32 masak aye, that matches the evidence.
15:34 bbkr rakudo: say '(foo' ~~ / '(' ~ ')' [foo] /
15:34 p6eval rakudo b04384: OUTPUT«Unable to parse _block48, couldn't find final ')' at line 1␤  in <anon> at line 11:/tmp/TyfqaGBfMz␤  in 'Cool::match' at line 2227:CORE.setting␤  in 'Regex::ACCEPTS' at line 5026:CORE.setting␤  in 'infix:<~~>' at line 326:CORE.setting␤  in main program body at line
15:34 p6eval ..11:/tmp/TyfqaGBf…
15:34 moritz_ masak: yes, I know that's the bug. Just was too lazy and hopeful to work around it
15:35 masak moritz_: working around it now. OK if I send you a patch?
15:35 moritz_ masak: you can also commit directly
15:35 masak oh, so I can.
15:35 masak :)
15:35 masak will do that instead.
15:35 moritz_ hugme: add masak to json
15:35 * hugme hugs masak. Welcome to json!
15:36 masak I already had a commitbit, I think. but thanks :)
15:36 masak moritz_: what's the rationale for excluding the range 0..127 from escaping, by the way?
15:36 masak moritz_: the 0..31 characters aren't very printable.
15:37 masak and the 127 generally isn't either.
15:38 bbkr rakudo: class A { class B {}; B.new }
15:38 p6eval rakudo b04384:  ( no output )
15:41 plainhao joined #perl6
15:42 moritz_ masak: I just took something that worked, more or less
15:42 moritz_ and passed the tests
15:42 moritz_ refinements are welcome
15:42 sorear kolibrie: You probably know this already, but I haven't managed to get DEEP to completely underlie viv yet.  Right now for -5 it's only used in regex compilation
15:44 masak moritz_: http://github.com/moritz/json/commit/5d​a3d1b5cd3493a9c3417ad148450f19d862b931
15:44 colomon sorear: just came out of kolibrie's talk on viv / gimme5
15:46 masak moritz_: it doesn't pass any more tests as far as I can see, but it makes ordinary output much nicer.
15:47 moritz_ masak++
15:47 * sorear feels slightly embarrased to be mentioned at YAPC
15:47 masak sorear: if I were you, I'd be proud. :)
15:49 masak rakudo: my Bool $a; ++$a
15:49 p6eval rakudo b04384: OUTPUT«Type check failed for assignment␤  in '&infix:<=>' at line 1␤  in main program body at line 11:/tmp/7GlVXymAk8␤»
15:49 * masak submits rakudobug
15:52 masak rakudo: class Parent { has $!priv }; class Child is Parent { method foo { say $!priv } }; Child.new(:priv(42)).foo
15:52 p6eval rakudo b04384: OUTPUT«42␤»
15:52 masak someone remind me... is this correct, by spec, etc?
15:52 moritz_ it's not
15:52 masak thank you.
15:53 masak and there's not really a method for a parent class to share things with its descendents, except for making them public?
15:54 sorear Does the existance of the \|$parcel binding form oblige Perl 6 implementations to treat $*foo(:a, :b) and $*foo(:b, :a) differently?
15:54 moritz_ masak: except but 'trusts', iirc
15:54 masak moritz_: right. ...which isn't implemented in Rakudo.
15:54 moritz_ rakudo implements universal trust
15:56 sorear Is prefix:<|> a real operator or just part of the call syntax?  If the former, what does it return?
15:56 ash_ wait... so there is only public and private in rakudo? no protected? (i feel like i have noticed this before...)
15:56 moritz_ in rakudo it's implemented as an operator
15:56 moritz_ ash_: you're correct
15:57 moritz_ not only rakudo, but also perl 6 in general
15:58 bbkr rakudo: A { class B {}; A::B.new } # is this allowed syntax?
15:58 p6eval rakudo b04384: OUTPUT«Could not find sub &A␤  in main program body at line 11:/tmp/P4_4g5y3Yl␤»
15:59 sorear &GLOBAL::prefix:<|> just coerces to Capture in rakudo
15:59 sorear the actual flattening happens in src/Perl6/Actions.pm +1964
16:00 ash_ but trusts lets another trusted class look at private variables, correct?
16:00 Ross^ joined #perl6
16:00 ash_ I see in S12, trusts used with a class type, but can it be used with an instance? (just curious)
16:01 Tene rakudo: class A { class B {}; A::B.new }
16:01 p6eval rakudo b04384: OUTPUT«Can not find sub A::B␤  in main program body at line 1␤»
16:02 dual joined #perl6
16:02 ash_ rakudo: class A::B { };  say A::B.new.WHAT
16:02 p6eval rakudo b04384: OUTPUT«A::B()␤»
16:04 bbkr ash_: http://rt.perl.org/rt3/Tic​ket/Display.html?id=62878 I wrote tests but I'm not sure which of those calls are Spec-comaptible. A { class B {}; A::B.new } looks like valid call because A::B is defined when .new is called.
16:05 macdaddy joined #perl6
16:05 bbkr so it doesn't look like fully resolved yet
16:05 ashleydev joined #perl6
16:05 ash_ well, you have a bare A, do you mean like module A? or class A?
16:06 ashleydev_ joined #perl6
16:07 ash_ oh, i see in your bug report
16:08 ash_ yeah that seems to not be working right now, the last case of A::B
16:08 cotto joined #perl6
16:08 bbkr left as open (unchanged) then
16:09 Su-Shee joined #perl6
16:09 ash_ std: class A { class B { }; }; A::B.new
16:09 p6eval std 31416: OUTPUT«ok 00:01 107m␤»
16:09 ash_ hmm
16:09 ash_ std: class A { class B { }; }; B.new
16:09 p6eval std 31416: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'B' used at line 1␤Check failed␤FAILED 00:01 107m␤»
16:09 ash_ std: class A { class B { }; B.new };
16:09 p6eval std 31416: OUTPUT«ok 00:01 107m␤»
16:10 ash_ according to std you shouldn't be able to do class A { class B { }; }; B.new # one of your tests is like that
16:16 bbkr ash_: thanks, I've just pasted this info to ticket
16:17 sorear perl6: say |(a => 2).WHAT
16:17 p6eval pugs: OUTPUT«Pair␤»
16:17 p6eval ..elf 31416: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 124) line 3.␤ at ./elf_h line 5881␤»
16:17 p6eval ..rakudo b04384: OUTPUT«Pair()␤»
16:17 sorear perl6: say (|(a => 2)).WHAT
16:17 p6eval rakudo b04384: OUTPUT«Capture()␤»
16:17 p6eval ..pugs: OUTPUT«Pair␤»
16:17 p6eval ..elf 31416: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 124) line 3.␤ at ./elf_h line 5881␤»
16:18 eiro joined #perl6
16:19 sorear 2 + 2   # Does this call &infix:<,> ?
16:19 stepnem joined #perl6
16:19 bbkr rakudo: use Test; plan 1; isa_ok(1|2, Junction);
16:20 p6eval rakudo b04384: OUTPUT«1..1␤Null PMC access in get_iter()␤  in main program body at line 1␤»
16:20 bbkr rakudo: use Test; plan 1; isa_ok any(1,2), Junction;
16:20 p6eval rakudo b04384: OUTPUT«1..1␤Null PMC access in get_iter()␤  in main program body at line 1␤»
16:21 ash_ rakudo: say any(1,2) ~~ Junction
16:21 p6eval rakudo b04384: OUTPUT«1␤»
16:21 masak sorear: why would it?
16:22 ash_ masak: what if it gets translated into &infix:<+>(2, 2); ?
16:22 masak ash_: it'd have to be re-parsed for that to call &infix:<,>, wouldn't it?
16:22 mjk joined #perl6
16:22 ash_ good point
16:23 ash_ this is single pass parsing
16:23 sorear does foo(2, 2) call &infix:<,>?  S06 suggests that argument lists are syntactic, but doesn't clearly say it
16:25 christine joined #perl6
16:25 ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo(2, 2)
16:25 p6eval rakudo b04384:  ( no output )
16:25 masak sorear: this all sounds like a circularity-saw question...
16:26 ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo(2, 2); 2 , 4;
16:26 p6eval rakudo b04384: OUTPUT«yup␤»
16:26 ash_ ltm is probably at work here
16:27 ash_ (.*,.*) seems to be a signature before an infix ,
16:27 masak I don't think this has to do with LTM.
16:27 masak LTM is for separating between things like 'sub' and a sub called 'subtract'.
16:28 masak this is more a question of how the parse tree and the AST map to actual calls at runtime.
16:29 cognominal joined #perl6
16:30 bbkr rakudo: class D is ::C {};
16:30 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
16:31 ash_ rakudo: sub infix:<,> ($a, $b) { say "yup" }; sub foo($a, $b) { }; foo((2, 2));
16:31 p6eval rakudo b04384: OUTPUT«yup␤Not enough positional parameters passed; got 1 but expected 2␤  in 'foo' at line 11:/tmp/zVID3ldpt4␤  in main program body at line 11:/tmp/zVID3ldpt4␤»
16:32 ash_ what is looking for &chars? bbkr do you know?
16:32 ash_ rakudo: ::C
16:32 p6eval rakudo b04384:  ( no output )
16:32 ash_ std: ::C
16:32 p6eval std 31416: OUTPUT«ok 00:01 106m␤»
16:33 masak ash_: I suspect bbkr is going through existing RT tickets.
16:33 bbkr ash: I have no idea. I'm just checking RT queue for bugs that can be closed.
16:34 bbkr ash: I know Rakudo code not enough to answer what is causing this bug. some parts of codebase, like glue modules and dispatching, are still "black magic" for me
16:35 stepnem joined #perl6
16:36 masak a good guess is that either the thing binding D to parent classes, or the thing reporting an error in that first thing, uses &chars somewhere.
16:36 FardadJalili joined #perl6
16:40 davidfetter joined #perl6
16:41 bbkr rt.perl.org/rt3/ gives "Internal Server Error" ?
16:41 * bbkr runs away
16:42 davidfetter hello
16:42 davidfetter any rakudo developers in the house?
16:42 davidfetter i'm looking for a way to detect the rakudo version
16:43 masak davidfetter: I'm a rakudo developer some days of the week. :)
16:44 |mjk| joined #perl6
16:44 bbkr i'm afraid is not available yet (in fact Rakudo has "releases" not versions). you can only get parrot version through -v console switch.
16:44 masak davidfetter: I know there is a patch in RT somewhere for a better --version flag for Rakudo.
16:44 davidfetter masak, got any idea how i find a version now?
16:44 PerlJam yeah, current output of --version is LTA
16:45 davidfetter this is for PL/Parrot, which will host PL/Rakudo, btw
16:45 masak davidfetter: do you have a git repository checked out somewhere?
16:45 masak davidfetter: then you can probably do 'git log' and check the date at the top.
16:45 * davidfetter unfamiliar with the TLA, LTA
16:46 PerlJam davidfetter: Less Than Aweseom
16:46 PerlJam er, Awesome
16:46 masak davidfetter: "LTA" stands for "Less Than Awesome", i.e. bad in some way.
16:46 davidfetter k
16:46 masak davidfetter: it's this group's way of saying something can be improved further or made slightly better.
16:47 davidfetter perl6 --version
16:47 davidfetter This compiler is built with the Parrot Compiler Toolkit, parrot version 2.5.0.
16:47 davidfetter ugh
16:47 masak aye. LTA. :/
16:47 pyrimidine joined #perl6
16:48 masak pyrimidine: \o
16:48 pyrimidine o/
16:48 * davidfetter gets awful flashbacks of organic chem lab
16:49 pyrimidine sorry :)
16:49 masak :)
16:49 meppl joined #perl6
16:49 pyrimidine If it helps, I'm a biologist, not a chemist
16:49 davidfetter do tell :)
16:50 pyrimidine bioperl
16:50 * davidfetter hopes to get the bio interested in pl/parrot, as they're already (well, a lot of them) heavy users of postgresql
16:50 davidfetter the bio community*
16:50 davidfetter yes, i get that's an incredibly diverse group
16:50 pyrimidine yep.  the chado crew from GMOD are the heavy users.
16:52 pyrimidine *heavy Pg users
16:52 davidfetter yeah, i figured that was what you meant
16:52 pyrimidine not implying they're heavy users of anything else (though they might be :)
16:52 PerlJam Are you saying they're obese?  ;)
16:52 * davidfetter 's serum caffeine levels are probably outside optimal range
16:53 davidfetter so back to rakudo versions
16:54 davidfetter "built with PCT, parrot 2.5.0" doesn't actually tell me about the rakudo version
16:54 masak davidfetter: that is correct.
16:54 masak davidfetter: it's been addressed.
16:54 davidfetter what, if anything, does?
16:54 masak davidfetter: the fix is in a patch in an RT ticket.
16:54 masak davidfetter: it's pending pmichaud's review.
16:55 davidfetter is there a git branch or something that has the patch applied?
16:56 masak not that I know.
16:56 masak here's the patch, it seems: http://rt.perl.org/rt3/Tic​ket/Display.html?id=73148
16:57 masak I also seem to recall some discussion on these very issues on IRC, in which pmichaud expressed hesitation over some proposed solutions. I'll try to find it in the logs.
16:58 bbkr What is the difference between Any and Mu objects (or where can I find inheritance diagram) ?
16:58 davidfetter speaking of branches, what's rakudo using for SCM?
16:58 colomon joined #perl6
16:58 masak bbkr: Any ~~ Mu, Mu !~~ Any. probably S02 outlines this.
16:58 masak davidfetter: git.
16:59 masak davidfetter: http://github.com/rakudo/rakudo
16:59 davidfetter excellent!
16:59 Su-Shee I thought Any indicated anythingness and Mu indicates any form of nothingsness?
16:59 * davidfetter doesn't know git super-well, but has had pretty uniformly good experiences with it so far
16:59 * colomon is hoping for a live report from pmichaud's cool perl 6 lecture, as he is in the Perl on Android lecture.
17:00 davidfetter this is in sharp contrast to the other SCMs i've tried
17:00 bbkr masak: thanks, found it
17:01 masak davidfetter: seems there is some discussion here: http://irclog.perlgeek.de/​perl6/2010-03-02#i_2054444
17:01 * davidfetter hopes colomon will pipe up and ask pmichaud about the version issue, or cause someone else at YAPC::NA to do so
17:01 colomon version issue?
17:01 davidfetter masak, thanks. reading
17:01 davidfetter rakudo --version doesn't spit out anything helpful
17:02 masak it's not an issue, it's a patch on RT pending review :P
17:02 rlb3 joined #perl6
17:02 masak and I also think it really should be improved. I list it as one of the things that Rakudo Star should have in my list at http://use.perl.org/~masak/journal/39597
17:03 masak "perl6 --version doesn't actually give version info" -- http://rt.perl.org/rt3/Tic​ket/Display.html?id=68752 -- that ticket is from 2009-08-23.
17:04 ash_ how would the version number be calculated? the year/month it was released?
17:04 masak that said, I don't consider it as critical, or as worthy of pmichaud's attention, as the closures bug or the backtracking bug or the charclass-escapes bug.
17:04 masak it's relatively low-priority.
17:05 davidfetter depends what you're doing with it ;)
17:05 masak ash_: releases have release numbers, such as #30; version numbers, such as 2010.06; and code names, such as "Kiev".
17:05 masak probably all three could be in the --version information.
17:06 bbkr rakudo: class Q {}; Q.new; # bug or expected behavior (interpreted as Q{} quoting) ?
17:06 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Confused at line 11, near "Q.new; # b"␤»
17:06 masak bbkr: yeah, that one :(
17:06 masak that desperately needs fixing too.
17:07 bbkr then I assume it's already known :)
17:07 masak bbkr: oh, you didn't find it in RT? :)
17:07 masak yes, it's known.
17:07 masak and yes, that's why.
17:08 kolibrie sorear: yes, I explained things somewhat where things are going rather than the exact state right now (especially with the speed at which you have been working on viv)
17:08 kolibrie sorear: we only said nice things about you
17:09 kolibrie colomon: you did not introduce yourself, so I will not recognize you irl
17:10 bbkr masak: RT is down so I cannot check :( I just stepped into it while hacking oneliners.
17:10 colomon kolibrie: sorry about that.
17:11 kolibrie colomon: np.  just say hi if you happen to run into me.  I don't leave till tomorrow
17:13 colomon will do.
17:13 masak bbkr: it's in there. for when RT comes back up, you'll find it as #74338.
17:13 bbkr masak: thanks
17:14 masak nom &
17:15 ejs joined #perl6
17:17 ingy greetings!
17:17 ingy patch and I are porting TestML to p6
17:18 ingy we had a q
17:18 ingy stupid one
17:18 ingy is there a use lib for p6
17:18 ingy ?
17:18 ash_ ingy: yea, @*INC is the include path
17:19 ash_ rakudo: say @*INC;
17:19 p6eval rakudo b04384: OUTPUT«lib/home/p6eval/.perl6/lib/home/p6eval//p​1/lib/parrot/2.5.0-devel/languages/perl6/lib.␤»
17:19 bbkr ingy: and you can modify it in BEGIN block like here: http://cpansearch.perl.org/src/MOR​ITZ/JSON-Tiny-0.1.2_1/t/01-parse.t
17:20 ingy bbkr: that's what we need
17:20 ingy thanks
17:20 ash_ rakudo: use lib('./lib');
17:20 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Unable to find module 'lib' in the @*INC directories.␤(@*INC contains:␤  lib␤  /home/p6eval/.perl6/lib␤  /home/p6eval//p1/lib/parrot/2.​5.0-devel/languages/perl6/lib␤  .)␤»
17:21 ash_ rakudo: use lib '.';
17:21 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Unable to find module 'lib' in the @*INC directories.␤(@*INC contains:␤  lib␤  /home/p6eval/.perl6/lib␤  /home/p6eval//p1/lib/parrot/2.​5.0-devel/languages/perl6/lib␤  .)␤»
17:22 ash_ alpha: use lib '.';
17:22 p6eval alpha 30e0ed:  ( no output )
17:23 ash_ "use lib" works in alpha, it should work again in rakudo master eventually...
17:23 bbkr alpha: use lib '/etc'; # checking jailing :P
17:23 p6eval alpha 30e0ed:  ( no output )
17:23 ash_ alpha: use lib '/etc'; say @*INC;
17:23 p6eval alpha 30e0ed: OUTPUT«/home/p6eval/.perl6/lib/home/p6​eval/rakudo-alpha/parrot_install/lib/2​.0.0-devel/languages/perl6/liblib.␤»
17:24 bbkr damn :)
17:24 ash_ hmmm odd, i thought it would of showed up in there
17:24 ash_ alpha: BEGIN { use lib '/etc'; }; say ~@*INC;
17:24 p6eval alpha 30e0ed: OUTPUT«/home/p6eval/.perl6/lib /home/p6eval/rakudo-alpha/parrot_insta​ll/lib/2.0.0-devel/languages/perl6/lib lib .␤»
17:24 gbacon joined #perl6
17:25 ash_ weird
17:25 tadzik joined #perl6
17:26 bbkr i remember tath trere is already RT for that
17:26 bbkr that*
17:29 Chillance joined #perl6
17:34 bbkr rakudo: BEGIN {@*INC.push("/dev/null")}; use Test;
17:34 p6eval rakudo b04384:  ( no output )
17:47 sorear { } creates a new dynamic scope
17:48 sorear @*INC doesn't leave that
17:50 diakopter I thought only assignment was reverted
17:50 diakopter otherwise it's impossible to detect whether a clone occured
17:53 colomon joined #perl6
17:55 ash_ BEGIN phases are just executed first, i thought
17:55 rlb3 joined #perl6
18:05 sorear oh, right
18:06 ash_ rakudo: BEGIN {@*INC.push("/etc"); say ~@*INC; }; say ~@*INC;
18:06 p6eval rakudo b04384: OUTPUT«lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.​5.0-devel/languages/perl6/lib . /etc␤lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.​5.0-devel/languages/perl6/lib . /etc␤»
18:15 patspam joined #perl6
18:19 leedo joined #perl6
18:28 macdaddy joined #perl6
18:36 l2trace99 left #perl6
18:47 jnthn o/ from England
18:51 patspam joined #perl6
18:52 macdaddy joined #perl6
18:53 patspam joined #perl6
18:56 Wolfman2000 joined #perl6
18:57 stepnem joined #perl6
19:05 cono joined #perl6
19:11 Ross joined #perl6
19:18 masonkramer joined #perl6
19:24 [Coke] joined #perl6
19:29 ejs joined #perl6
19:31 moritz_ \o
19:32 colomon o/
19:32 drbean_ joined #perl6
19:35 lichtkind joined #perl6
19:36 moritz_ when are people going to YAPC::EU? Any plans yet?
19:37 dalek rakudo: f3d8af8 | moritz++ | src/Perl6/Compiler.pir:
19:37 dalek rakudo: make @*INC writable, by popular request (RT #75956)
19:37 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f​3d8af806a52c0d8935ee99f89b8703c91263fec
19:40 frettled jnthn: Are ye in excile?
19:41 kensanata joined #perl6
19:42 s1n joined #perl6
19:44 stepnem joined #perl6
19:50 pugssvn r31417 | moritz++ | [t/spec] infix:<eqv> with Rats
19:52 * [Coke] needs regexp hepl.
19:52 TimToady we don't have any regexps here, only regexes :)
19:54 masak joined #perl6
19:54 [Coke] You'll notice my typing isn't right on other words there. :P
19:54 masak ahoy!
19:54 moritz_ [Coke]: go ahead and ask
19:54 [Coke] so, if I have:
19:54 Su-Shee he wants a repl. not hepl. ;)
19:54 [Coke] token variable:sym<normal>  { '$' <identifier> [ '(' $<key>='3'  ')' ]? }
19:55 [Coke] then it parses OK. (this is for tcl's hash-like var indexing, so I get $a(3) working there. (key is hardcoded to "3", but that's fine for now.)
19:55 frettled TimToady: any current regs, then?
19:56 [Coke] if I change the key to <key=.foo> where foo is is other rule that I expect to cover valid keys (that is already defined elsewhere in the grammar), then the parse fails. I am assuming that my syntax is ok, and that it is the rule I'm including that's the problem?
19:57 moritz_ yes, <key=.foo> is correct syntax, and supported by nqp-rx
19:58 masak ingy: TestML! woot!
19:59 masak though why people are so eager to manipulate @*INC in BEGIN blocks, I'll probably never understand... :)
19:59 frettled masak: Old die-hard habits, now featuring in Die Hard 6.
19:59 moritz_ masak: in tests there is a very simple answer
20:00 moritz_ masak: you can't make assumptions about @*INC of a particular compiler, and can't influence it in any other way
20:01 masak moritz_: oh, I meant in applications. in tests, even application's tests, it's perfectly OK and normal.
20:01 masak in applications, I'd think twice before using it.
20:02 uniejo joined #perl6
20:03 masak moritz_: re your email about pre-YAPC::EU hackathon plans, I'm prepared to arrove a few days early to convene over a Perl 6 hackathon. I haven't made any reservations yet.
20:04 moritz_ masak: if everything works fine, I'll book for Aug 1st to 6th
20:04 moritz_ masak: and good to hear there's someone coming early too :-)
20:04 [Coke] joined #perl6
20:05 colomon joined #perl6
20:05 masak that should work for me too. might bend it to Aug 2nd rather than 1st, we'll see.
20:05 Psyche^ joined #perl6
20:05 frettled masak: back in the good ole' days of horribly bad Perl, we modified @INC all the time for reasons I've happily forgotten.  I just remember that it was a horror.
20:06 * colomon wonders how many years he programmed in Perl without ever using a module...
20:07 masak frettled: it just naturally strikes me as slightly anti-social. which is why it's OK for tests, because tests are standalone scripts.
20:07 frettled Good $deity, have I inspired the telling of Perl war stories now?
20:07 frettled masak: Yes.
20:07 Wolfman2000 frettled: There are Perl war stories?
20:07 moritz_ sure there are
20:07 Wolfman2000 I'm curious about them
20:08 [Coke] joined #perl6
20:09 wolverian do we have command line argument parsing yet?
20:10 tadzik in MAIN? Yes
20:10 pugssvn r31418 | lwall++ | [STD] allow null parameter before ;;
20:10 moritz_ rakudo: sub MAIN() { say "run automatically" }
20:10 p6eval rakudo b04384: OUTPUT«run automatically␤»
20:11 moritz_ rakudo: sub MAIN($missing_argument) { }
20:11 p6eval rakudo b04384: OUTPUT«Usage:␤/tmp/sTfWLOFNRE missing_argument␤»
20:11 * wolverian swoons
20:11 wolverian seriously, that is so great.
20:11 moritz_ patrickas++ for implementing most of the logic
20:12 masak can a role refer to private attributes of a class it's being mixed into?
20:12 wolverian moritz_: can I has defaults for them?
20:12 masak (in Perl 6, not Rakudo)
20:12 tadzik you can, even in rakudo
20:12 moritz_ wolverian: I think so
20:12 moritz_ $ ./perl6 -e 'sub MAIN($x = 30) { say $x }'
20:12 moritz_ 30
20:13 moritz_ $ ./perl6 -e 'sub MAIN($x = 30) { say $x }' 50
20:13 moritz_ 50
20:13 moritz_ also supported: named arguments, which can be passed with --optionname=value
20:13 moritz_ s/passed/populated/
20:13 wolverian how about short names? :)
20:13 moritz_ NYI
20:14 moritz_ wolverian: but the logic for parsing is all in Perl 6
20:14 tadzik hmm, I sense a bug
20:14 tadzik http://wklej.org/id/355490/
20:14 moritz_ wolverian: so if you want to patch it, you don't need to learn any scary PIR stuff
20:14 wolverian moritz_: I'll take a look at it after I have this script done.
20:15 moritz_ tadzik: bug indeed. Mandatory parameters need to come before optional ones
20:15 moritz_ rakudo: sub MAIN($v = 0, $arg, $bark = 'default bark') { }
20:15 p6eval rakudo b04384: OUTPUT«Usage:␤/tmp/laJdSS86Ki [v] arg [bark]␤»
20:15 moritz_ it should die at compile time
20:15 moritz_ rakudo: sub x($v = 0, $arg, $bark = 'default bark') { }
20:15 p6eval rakudo b04384:  ( no output )
20:15 moritz_ $arg after $v = 0 should be forbidden
20:15 moritz_ tadzik: care to submit?
20:15 tadzik sure
20:16 tadzik what should the note look like then?
20:16 moritz_ tadzik++ # breaking stuff
20:16 tadzik "Raduko should cry about bad order of optional and obligatory parameters?"
20:16 moritz_ rakudo doesn't complain about mandatory parameters after parameters with default values
20:16 tadzik a'right
20:16 moritz_ yeah, something like that
20:16 tadzik well, O
20:16 masak rakudo: our &s = &say; role R { method foo { s $!x } }; class A does R { has $!x }; A.new(:x("OH HAI")).foo # TimToady: is this allowed?
20:16 p6eval rakudo b04384: OUTPUT«OH HAI␤»
20:17 tadzik whoops. Well, I'm not so big to fix stuff in Rakudo, so I can try breaking :)
20:17 wolverian holy crap safari is slow with the perlcabal.org/syn files
20:17 frettled If you think Safari is slow, don't try Firefox.
20:17 masak tadzik: the note should replicate the problem, and be clear about what's wrong and what's expected.
20:17 TimToady std: sub MAIN($v = 0, $arg, $bark = 'default bark') { }
20:17 p6eval std 31417: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/cqKyqwJwH9 line 1:␤------> [32msub MAIN($v = 0, $arg[33m⏏[31m, $bark = 'default bark') { }[0m␤Check failed␤FAILED 00:01 114m␤»
20:18 tadzik I'll try to minimize the test case
20:18 quietfanatic joined #perl6
20:18 moritz_ rakudo: sub a($x = 0, $y)
20:18 moritz_ rakudo: sub a($x = 0, $y) { }
20:18 p6eval rakudo b04384: OUTPUT«===SORRY!===␤Symbol '$ss_SS_S_S__S_S_s' not predeclared in <anonymous> (/tmp/ei0fZ2gHqZ:1)␤»
20:18 p6eval rakudo b04384:  ( no output )
20:18 moritz_ there you go :-)
20:18 tadzik std: sub MAIN($v = 0, $arg) { }
20:19 p6eval std 31417: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/VY35KleGJr line 1:␤------> [32msub MAIN($v = 0, $arg[33m⏏[31m) { }[0m␤Check failed␤FAILED 00:01 111m␤»
20:19 tadzik great :)
20:19 moritz_ doesn't need to be MAIN at all
20:19 tadzik ah, not only in main then?
20:19 tadzik Even better
20:19 frettled moritz_: Where did that $ss_SS_S_S__S_S_s come from?  :)
20:19 moritz_ frettled: from p6eval
20:19 masak tadzik: also, if you prefix the message subject with [BUG], the RT ticket will be automatically labeled as a bug. :)
20:19 frettled moritz_: Magic ternary notation?
20:20 tadzik Wow, didn't even finish my email and alredy 2 patches for the subject :)
20:20 moritz_ frettled: it tries to add something to remove unsafe symbols
20:20 tadzik hrm
20:20 tadzik rakudo: sub foo ($v = 0, $arg) { }
20:20 p6eval rakudo b04384:  ( no output )
20:20 tadzik std sub foo ($v = 0, $arg) { }
20:20 frettled moritz_: it sure generates an interesting read
20:20 tadzik std: sub foo ($v = 0, $arg) { }
20:20 p6eval std 31417: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/JdwlPShJsd line 1:␤------> [32msub foo ($v = 0, $arg[33m⏏[31m) { }[0m␤Check failed␤FAILED 00:01 111m␤»
20:20 tadzik good
20:21 tadzik sent
20:21 frettled Hmm, how will things like Getopt end up working, I wonder ...
20:21 moritz_ tadzik++
20:21 masak TimToady: I'm running up against interesting new questions of encapsulation and visibility. is it kosher for a role to speak of attrs it doesn't have?
20:21 tadzik \p/
20:22 masak \q/
20:22 tadzik erm
20:22 moritz_ frettled: MAIN makes that mostly superfluous
20:22 tadzik \o/
20:22 masak \σ/
20:23 frettled \π/
20:23 TimToady masak: it can certainly speak of them in $.foo form; $!foo without declaration could be viewed as a requirement from the class
20:23 TimToady std: $!foo
20:23 p6eval std 31417: OUTPUT«ok 00:01 107m␤»
20:23 Ross joined #perl6
20:24 colomon ufo++
20:24 masak TimToady: I hardly even see $.foo as attributes any more...
20:24 masak TimToady: but I didn't hear you say "no", so I'll keep going in the direction I'm headed with this code... :)
20:24 TimToady they are still abstract attributes, but viewed from the outside; a class may sometimes wish to view even its own attributes that way
20:25 stepnem joined #perl6
20:25 masak colomon: pls will probably come with ufo integrated.
20:26 colomon masak++
20:27 colomon I've just started a new quick project on github, btw.
20:27 masak TimToady: a class speaking of a private attribute it doesn't have makes no sense. a role doing same makes sorta-kinda sense, because it can still be mixed into something that has the attribute.
20:28 ash_ std: class A { class B { }; }; B.new; # this is wrong, correct?
20:28 frettled moritz_: Ah, I'd forgotten that part of S06, and definitely feel to dense to redigest it right now.  :)
20:28 p6eval std 31417: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared name:␤ 'B' used at line 1␤Check failed␤FAILED 00:01 107m␤»
20:28 colomon http://github.com/colomon/str2num
20:28 TimToady ash_: if std says something to do with namespaces is wrong, it's almost always correct
20:29 colomon just starting on tests for the first function
20:29 masak colomon++
20:30 moritz_ I'd love to see that in C at some point, for speed
20:30 ash_ colomon: couldn't you define it as a grammar? (just curious)
20:31 colomon ash_: it's already defined (and better) as a grammar.
20:31 colomon moritz_: yeah, first goal is to get it correct.
20:31 masak today I'm really missing Java's protected access level in Perl 6, for some reason. I have to make attributes public and 'is rw' when they'd really be better off private and/or readonly.
20:32 colomon right now numbers are totally messed up in Rakudo.
20:34 ash_ masak: would 'trusts' help your design some if it was functional?
20:34 ash_ (it might be, i haven't tried)
20:34 estrabd joined #perl6
20:34 masak ash_: if it could glob over yet-unknown descendents, it would.
20:35 moritz_ what kind of data do you want to share with child classes, but not publicly?
20:35 masak rakudo: our &s = &say; class A { method foo { say "OH HAI" } }; role B { method foo { s "before"; callsame; s "after" } }; class C is A does B {}; C.new.foo # I'm surprised the role takes precedence here
20:35 p6eval rakudo b04384: OUTPUT«before␤OH HAI␤after␤»
20:35 ash_ ah, then it probably wouldn't help since 'trusts' doesn't get inherited, i don't think
20:36 moritz_ masak: that's because class C doesn't define a method with the same name
20:36 estrabd joined #perl6
20:37 masak moritz_: ah, true.
20:38 wolverian can you "trust" a module/package?
20:38 masak moritz_: I have a class which encapsulates a hash. in a child class, I want to add load/save serialization, so I need access to the hash.
20:38 masak ash_: I don't need 'trusts' to get inherited. I only need the parent class to trust a child class when it sees one.
20:39 wolverian masak: stupid q: why inheritance and not composition?
20:39 masak can you trust a Bool? half of them are false.
20:39 masak wolverian: I don't immediately see how composition would help me here, if the data in the parent class is private.
20:39 wolverian additionally, it seems that if the child class wants to munge with a parent class's internals, the parent class should provide specific (public) hooks for that
20:40 masak nod.
20:40 wolverian but that's kind of hand-wavey, I know.
20:40 masak that's the design I'm reluctantly landing at.
20:41 masak I need to make the encapsulated hash public and rw, so that the load method can load into it.
20:41 masak I could do it via a specially-written method, but it'd amount to the same thing.
20:41 wolverian it'd be safeer.
20:41 wolverian s/ee/e/
20:42 ash_ protected would be nice in this situation, so the children have a way of manipulating the parts of the parent that were designed for it, but not the rest of the world
20:42 masak wolverian: I don't see how.
20:42 wolverian masak: the hash wouldn't be arbitrarily mungable, only in that particular fashion.
20:43 masak wolverian: by... overwriting the whole thing? :)
20:43 masak wolverian: it's not like I'm restricting its use here.
20:44 wolverian why not? ;)
20:45 masak because 'load from file' implies that the whole hash becomes overwritten by the contents from the file.
20:45 masak there's no less restricted operation you could do to a hash.
20:46 ash_ are private methods inherited?
20:46 moritz_ no
20:46 ash_ why not?
20:46 ash_ if you didn't want it to be inherited you could call it a submethod
20:47 moritz_ why would a private method be inherited, if a child doesn't have access to privates anyway?
20:48 wolverian masak: $self.remove_all; $self.add_all(load_file); ?
20:48 wolverian masak: I'm sure there's always some way to make it convoluted :)
20:48 * wolverian has been coding java
20:49 ash_ moritz_: if you made methods private methods inherit to children, you could have protected methods via that, (for a given definition of 'private' anyway), then if you didnt' want them to be inherited you could make them submethods
20:49 moritz_ if we wanted protected methods, we'd introduce them
20:52 dalek rakudo: 11cbd4f | util++ |  (3 files):
20:52 dalek rakudo: Change dynops build from deprecated ops2c.pl to new NQP-based ops2c
20:52 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​1cbd4f3ccb80703af2059088852413928132150
20:58 Sarten-X joined #perl6
20:59 quietfanatic Has anyone noticed that the Parrot SDL library included in Rakudo has a random "say 'Hu'" in it?
20:59 TimToady yes
20:59 TimToady you noticed it :)
21:00 quietfanatic True.  It was kind of noticable when I ran it.
21:00 sorear TimToady: What stops "my int @foo; @foo[0] := @foo[12];' from working?
21:00 _kaare left #perl6
21:00 wolverian lisppaste doesn't know #perl6 anymore apparently
21:01 Tene it was being used for spam
21:01 wolverian it doesn't know perl6, either. :)
21:01 wolverian s/perl6/Perl 6/
21:01 TimToady whatever asks @foo for the 0th bvalue fails
21:03 TimToady and probably the compiler notices := to a non-bvalue
21:03 pugssvn r31419 | Kodi++ | [S03] Capitalo.
21:04 wolverian I can't add boolean flags to MAIN either
21:04 whiteknight joined #perl6
21:06 quietfanatic rakudo: class A is B {}
21:06 p6eval rakudo f3d8af: OUTPUT«===SORRY!===␤Could not find sub &chars␤»
21:06 [Coke] quietfanatic: I just removed that line from the parrot sdl library. thanks.
21:06 quietfanatic [Coke] You'
21:06 quietfanatic re quite welcome
21:07 [Coke] Hu.
21:07 [Coke] (I have no idea what it was doing there. =-)
21:10 wolverian my first perl6 script: sub MAIN ($pattern = ':', $separator = "\n") { say $*IN.lines.map: { .split($pattern).join($separator) } }
21:10 wolverian it _is_ a bit slow to start up though... :)
21:11 wolverian I called it 'splat', because split is already taken. if anyone knows of a ready made unix tool for that, though, please tell.
21:11 [Coke] ISTR that a rakudo slowdown was recently noticed in re: extra "isa" calls.
21:13 pyrimidine left #perl6
21:24 mjk joined #perl6
21:30 Tene wolverian: there's already a command to do that; paste.
21:30 Tene wolverian: paste -s -d:
21:32 wolverian Tene: thanks!
21:32 sorear perl6: my $x; $x ::= 1; $x := 2;
21:32 p6eval pugs:  ( no output )
21:32 p6eval ..elf 31419: OUTPUT«Undefined subroutine &GLOBAL::infix_::_61 called at (eval 124) line 4.␤ at ./elf_h line 5881␤»
21:32 p6eval ..rakudo f3d8af: OUTPUT«===SORRY!===␤::= binding not yet implemented at line 11, near " 1; $x := "␤»
21:32 sorear mildew: my $x; $x ::= 1; $x := 2;
21:32 p6eval mildew: OUTPUT«Can't open perl script "mildew": No such file or directory␤»
21:33 sorear perl6: (-> $x { $x := 2 })(1);
21:33 p6eval elf 31419: OUTPUT«AST handler circumfix:pblock partially unimplemented at ./elf_h line 3549␤»
21:33 p6eval ..rakudo f3d8af: OUTPUT«:= binding of variables not yet implemented␤  in 'infix:<:=>' at line 601:CORE.setting␤  in <anon> at line 11:/tmp/j8MnYhFif7␤  in main program body at line 11:/tmp/j8MnYhFif7␤»
21:33 wolverian Tene: I think paste does the reverse of my script, actually.
21:33 p6eval ..pugs:  ( no output )
21:33 tedv joined #perl6
21:33 wolverian Tene: I split the input on : and print each element on its own line. I certainly can't get paste to do that.
21:33 Tene ah
21:34 Tene yes, I misread the order.
21:34 sorear tr : '\012'
21:34 sorear < input > output
21:35 wolverian sorear: doesn't replace strings, I think.
21:36 wolverian time to go. good night, all.
21:40 tylerni7 joined #perl6
21:41 Tene yeah, tr can only replace one char with another
21:43 TimToady hmm, 5.14 is going to have package Foo {...}
21:44 TimToady if modules get written that way, we can't rely on the semicolon form to recognize P5...
21:48 ash_ what does package mean in perl6? (i thought you needed to use module/role/class)
21:49 TimToady package is the bare namespace, up till now; module implies exportatation via 'is export'
21:49 TimToady but really there's little difference
21:50 TimToady dinner &
21:52 sorear 5.14 is going to have package Foo { ... } ?  WHYYY
21:53 ash_ because they wana be cool like perl6
21:53 ash_ (i don't see that as a bad thing, despite my sarcasm)
21:54 sorear True or false: Every value in Perl 6 is logically containerized.  1 refers to an anonymous, read-only, unbindable container which contains 1; since return statements perform a read-only bind, all function calls return read-only container aliases too.
21:57 Ross joined #perl6
22:02 FardadJalili joined #perl6
22:09 tylercurtis joined #perl6
22:13 s1n joined #perl6
22:28 colomon joined #perl6
22:31 colomon rakudo: say (1 + 0/10).WHAT
22:31 p6eval rakudo f3d8af: OUTPUT«Rat()␤»
22:40 sorear What happens if a method call invocant is rw?
22:41 kensanata joined #perl6
22:42 lue ohai
22:46 colomon pmichaud: ping?
23:00 lichtkind joined #perl6
23:11 araujo joined #perl6
23:14 colomon joined #perl6
23:15 colomon pmichaud: now in dorm lobby, eating tamales.  :)
23:17 Limbic_Region joined #perl6
23:23 colomon str2num("100000000.1000000​00000000000000000000000") now works!
23:30 sorear Would it be semantically valid for A := B to be a macro for VAR(A).BIND(B)?
23:30 * sorear wants infix:<:=> and VAR to both be macros or neither be macros in Sprixel/VICIL
23:31 athomason joined #perl6
23:32 skids joined #perl6
23:36 colomon rakudo: say 10 ** 20
23:36 p6eval rakudo 11cbd4: OUTPUT«1e+20␤»
23:38 patspam joined #perl6
23:39 pnate joined #perl6
23:42 sorear Who broke the Rakudo build?
23:43 sorear It's back to using so much memory as to average 2.0% CPU utilization
23:50 [Coke] joined #perl6
23:50 pnate joined #perl6
23:54 colomon log10(str2num(".000000000000000000000000​000000000000000000000000000000000001")) now equals -60
23:55 ash_ is that right
23:55 colomon yes
23:55 ash_ cool
23:55 colomon rakudo: say .000000000000000000000000000000​000000000000000000000000000001
23:55 p6eval rakudo 11cbd4: OUTPUT«8.67361737988404e-19␤»
23:55 colomon yup, that's why I'm working on this.  :)
23:56 ash_ isn't that floating point error?
23:57 colomon it's *a* floating point error, if that's what you mean.
23:57 colomon but it's not precision or anything.
23:57 colomon rakudo: say 1e-60
23:57 p6eval rakudo 11cbd4: OUTPUT«1e-60␤»
23:57 colomon rakudo: say log10(1e-60)
23:58 p6eval rakudo 11cbd4: OUTPUT«-60␤»
23:59 colomon ash_: what's happening is Rakudo currently tries to express 1e60 as an integer, leading to massive overflow.

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

Perl 6 | Reference Documentation | Rakudo