Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-06-24

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:00 ash_ oh, yah, i can understand that
00:00 ash_ 1e60  is big
00:01 colomon I've got it working in my project by simply skipping all the initial 0s, and expressing 1e60 as 10 ** 60, so that it gracefully switches to floating point.
00:12 sorear There must be a cleverer algorithm out there somewhere
00:14 colomon sorear: probably in general, but I dunno about with the Perl 6 specific characteristics.  (like 0.000001 should be a Rat, but 0.000000000000000000000000000001 a Num)
00:14 colomon rakudo: say 3.14159265358979323846264338327950288
00:14 p6eval rakudo 11cbd4: OUTPUT«===SORRY!===␤PAST::Compiler can't compile node of type BigInt␤»
00:16 sorear even just str2num conversion is a bit interesting
00:16 sorear at one point the GHC parser converted strings to Num-equivalent through a FatRat-equivalent
00:17 sorear leading to much hilarity a few years later when some smartalec tried to use 1e-999999 in a program
00:18 [Coke] joined #perl6
00:19 sorear rakudo: foo(1,2,3; 4,5,6)
00:19 p6eval rakudo 11cbd4: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤»
00:20 sorear std: foo(1,2,3; 4,5,6)
00:20 p6eval std 31419: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'foo' used at line 1␤Check failed␤FAILED 00:01 112m␤»
00:20 sorear alpha: foo(1,2,3; 4,5,6)
00:20 p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "(1,2,3; 4,"␤in Main (file <unknown>, line <unknown>)␤»
00:20 sorear pugs: foo(1,2,3; 4,5,6)
00:20 p6eval pugs: OUTPUT«*** No such subroutine: "&foo"␤    at /tmp/qbSAxXLWNk line 1, column 1 - line 2, column 1␤»
00:22 colomon sorear... huh.  Actually, it occurs to me that a smart version of a naive conversion routine might automatically Do The Right Thing wrt Rat versus Num.
00:32 colomon okay, I'm not sure whether to be proud or ashamed of this code:
00:32 colomon $int-part.Int + [+] $frac-part.comb.kv.map(-> $i, $d { $d eq '0' ?? 0 !! $d.Int / (10 ** ($i + 1) });
00:33 colomon well, certainly mildly ashamed for the missing paren.
00:35 micahjohnston joined #perl6
00:36 colomon rakudo: say ~("14159265358979323846264338327950288".comb(/. ** 1..4/))
00:36 p6eval rakudo 11cbd4: OUTPUT«1415 9265 3589 7932 3846 2643 3832 7950 288␤»
00:36 micahjohnston left #perl6
00:40 masonkramer_ joined #perl6
00:52 shade_ joined #perl6
00:59 colomon if a few people could pound on http://github.com/colomon/str2num, I'd appreciate it.  I think I've got it basically working now.  Not the most efficient algorithm for sure, but as far as I can tell (tired as I am) this version works pretty well.
01:00 colomon writing more tests would be good.
01:00 colomon :)
01:01 colomon off to my in-laws' to get some sleep now....
01:07 uniejo joined #perl6
01:17 uniejo perl6: role A { method a { say "a" } }; class B does A {}; B.new().a()
01:17 p6eval rakudo 11cbd4: OUTPUT«Could not find sub &say␤  in 'a' at line 11:/tmp/w7XZWIStA8␤  in main program body at line 11:/tmp/w7XZWIStA8␤»
01:17 p6eval ..elf 31419, pugs: OUTPUT«a␤»
01:26 sorear pugs: \(1,2,3; 4,5,6).WHAT.say
01:26 p6eval pugs: OUTPUT«*** ␤    Unexpected "\\("␤    expecting program␤    at /tmp/I4zvlSCKzd line 1, column 1␤»
01:26 sorear pugs: say WHAT \(1,2,3; 4,5,6)
01:26 p6eval pugs: OUTPUT«*** ␤    Unexpected "\\("␤    at /tmp/4EbqdDPmI5 line 1, column 10␤»
01:27 diakopter pugs: (\.(1,2,3; 4,5,6)).WHAT.say
01:27 p6eval pugs: OUTPUT«*** Cannot cast from VUndef to Pugs.AST.Types.VCode (VCode)␤    at /tmp/XHf5g0iSDN line 1, column 2-18␤»
01:27 diakopter O.o
01:28 redicaps joined #perl6
01:33 felliott joined #perl6
01:37 plobsing joined #perl6
01:40 shade_ joined #perl6
01:50 japhb joined #perl6
01:52 snarkyboojum joined #perl6
01:57 jaldhar joined #perl6
02:00 zorgnax joined #perl6
02:10 Grrrr joined #perl6
02:10 meppl joined #perl6
02:10 christine joined #perl6
02:10 nadim joined #perl6
02:10 tomaw joined #perl6
02:10 Gothmog_ joined #perl6
02:10 ingy joined #perl6
02:10 opx^away joined #perl6
02:14 shade_ joined #perl6
02:16 x19290 joined #perl6
02:17 x19290 Question about Rakudo/Parrot:
02:17 x19290 When I
02:17 x19290 $ perl6 --target=pir -o 123.pir -e 123.say
02:17 x19290 and
02:17 x19290 $ parrot 123.pir
02:17 x19290 I get syntax errors. What's wrong?
02:18 sorear 1. using --target with -e is not working properly last I heard
02:19 x19290 echo 123.say > 123.p6
02:19 sorear 2. you just tried to load 123.pir in a clean Parrot enviroment - Rakudo installs custom opcodes, which changes the assembly syntax
02:20 x19290 How to install the 'custom' opcode?
02:21 sorear by running 'perl6' instead of 'parrot'
02:21 sorear 123.pir can only be loaded from inside a rakudo process
02:22 x19290 is there no easy way to run 123.pir?
02:23 sorear I don't think there's /any/ way to run 123.pir
02:23 sorear precompilation is not suitable for general use at this time
02:23 sorear it's only useful for bootstrapping
02:24 x19290 I think perl6 will have a compiler mode like javac
02:24 x19290 Is it wrong?
02:24 sorear our build system uses perl6 --target=pir to compile the standard library, then pastes the output into the compiler
02:24 sorear oh yes, it *will*
02:24 plobsing sorear: have you tried using PBC instead? dynops work in that medium (modulo load order issues)
02:25 x19290 you mean --target=pbc?
02:26 sorear plobsing: 1. it's not possible to generate PBC from PCT-based compilers 2. even if it did work, it wouldn't, because rakudo needs to control its own initialization
02:26 sorear getting AOT compilation to work in the general case is a GSoC-sized project
02:26 sorear you're welcome to take it on now, but I'd wait till 2011
02:27 * sorear is having trouble with slicels
02:27 colomon joined #perl6
02:27 pmichaud good evening, #perl6
02:28 sorear good evening, pmichaud
02:28 sorear pmichaud: can you briefly explain how foo(1,2,3; 4,5,6) is expected to work?
02:31 pmichaud sorear: that's still a bit of speculation (more)
02:31 pmichaud sorear: my plan at this point is that multiple statements in an arglist results in a slicel instead of a parcel
02:32 frew pmichaud: where do you keep your slides again?
02:32 pmichaud and converting a slice to a Capture causes things to not collapse
02:32 pmichaud s/collapse/flatten
02:32 * frew is making links etc in blog post
02:32 pmichaud frew:  http://pmichaud.com/2010/pres/
02:32 colomon o/
02:32 frew perfect
02:32 frew thanks
02:33 ciphertext joined #perl6
02:34 frew pmichaud: what are the keys for this?  I see that space and enter go forward, what about backwards?
02:34 pmichaud N and P work
02:34 pmichaud so should pgup and pgdn
02:34 pmichaud and there are links at the bottom, if you can make the window tall enough
02:34 frew ahhh
02:34 frew I was wondering why I couldn't see those
02:35 frew my laptop must be too short
02:35 x19290 sorear: I've learned that in somedayperl6 will have
02:35 pmichaud yeah, they're done with floating blocks in the HTML
02:35 x19290 a compiler mode like javac. Thank you.
02:35 pmichaud Spork has been really good for generating slides for my presentations; I have lots of things I'd like to do differently with it, but ENOTUITS
02:36 pmichaud (fixing the layout and navigation is one of them)
02:36 frew pmichaud: eh, that's how it goes.
02:36 frew mine are using javascript etc and that has other issues
02:37 pmichaud one of my first significant Perl 6 projects (besides the compiler itself) is likely to be a WikiCreole to HTML translator, followed shortly by a slideshow presenter based on that :)
02:37 pmichaud I sure wish those Perl 6 folks would hurry up and release something so that I can do that.  :) :)
02:37 frew hahahaha
02:37 frew shouldn't you be able to do that now?
02:38 frew that's just a matter of tuits right?
02:38 x19290 left #perl6
02:38 pmichaud yes, it's still ENOTUITS on that :)
02:38 frew of course
02:39 sorear What day was -perl6?
02:39 pmichaud although maybe I'll work on it during my plane trip in July.
02:39 * sorear wonders what good a hyperlink in a slide does
02:39 pmichaud It would be *really* cool if I could give a presentation that was labeled "powered by Rakudo Perl"  :)
02:39 frew sorear: so you can follow doc at home?
02:40 pmichaud sorear: while giving a presentation, I can click on the link to jump to the site directly
02:40 pmichaud and yes, what frew++ said
02:40 frew pmichaud: I'm actually pretty amazed at how easy it is to work on a plane, maybe because of the lack of distractions?
02:40 frew I got 3 things that I'd been planning on doing for a couple months done on the flight up and down
02:40 pmichaud Sometimes working on a plane works for me, sometimes not.  Often I'm just glad to have some time to rest :)
02:41 frew sure
02:41 pmichaud but I've also been known to do some pretty significant branch work on a plane :)
02:41 pmichaud (much easier now that we have git)
02:41 frew indeed
02:42 colomon I've never had a seat / laptop combination I could comfortable open on a plane.  :(
02:42 colomon but I don't fly much.
02:42 colomon otoh, I get good work done when we're driving somewhere on vacation.
02:42 frew colomon: I find it interesting that just shaving a couple inches off my 13 inch laptop made it comfortable
02:43 pmichaud plane work is one of the (many) reasons I went for an ultra-small notebook.
02:43 sorear Frighteningly, I don't think I've ever been on an airplane
02:43 pugssvn r31420 | lwall++ | [STD] differentiate dup prefix message from bad infix for bbkr++
02:43 pmichaud afk for a moment, running up to my room to grab a dr pepper.  They seem to be hard to find around here.
02:44 * TimToady never flew till he was 19
02:46 colomon TimToady: don't know if you saw, I came up with a beautiful, terrible way to handle the decimal number issue:
02:46 * sorear has a few months yet, then
02:47 colomon [+] $int-part.comb.reverse.kv.map(-> $i, $d { $d.Int * (10 ** $i) }) + [+] $frac-part.comb.kv.map(-> $i, $d { $d.Int / (10 ** ($i + 1)) })
02:47 * TimToady wonders if colomon has Tourette's...
02:47 colomon It works properly because **, *, /, and + do the Right Thing wrt to types.
02:49 TimToady yay (I think)
02:49 colomon it's good news, but for sure we'll have to find a more efficient approach in the long run.
02:49 colomon possibly even the middle run.  :)
02:49 pmichaud ...and maybe even in the short run.  :)
02:50 pmichaud I'm not a fan of those **'s, though.
02:50 colomon ;)
02:50 pmichaud Seems like we should be able to do things incrementally.
02:50 colomon yeah, I'm sure we can.  just lose the beautiful functional programming style of it if we do it the sensible way.
02:50 colomon *we just
02:51 sorear just as long as 1e-99999999 doesn't attempt to allocate a 12 megabyte integer
02:51 TimToady well, the compiler should spot it and do strength reduction for us :)
02:51 colomon actually, there is a functional way to do it in p6:
02:52 colomon $int-part.comb.reverse Z 1, 10, 100 ... * -> $d, $pot { $d.Int *$pot }
02:53 TimToady \o/
02:53 colomon (that's untested, but it ought to work)
02:54 pmichaud I do like that form much better :)
02:54 TimToady .comb(/\d/) unless you've removed _
02:54 colomon TimToady: nice.  that is a good way to remove it all right.
02:54 colomon does \d only match '0' .. '9'?
02:54 pmichaud matches any unicode digit
02:54 colomon (ie do we have to worry about funky unicode digits)
02:55 pmichaud we eventually have to worry about funky unicode digits
02:55 pmichaud (iirc)
02:55 sorear Is there a simple, exact algorithm to parse C numbers?
02:55 TimToady but what do .Int do with it, is the Q
02:55 sorear Emphasis on the exact
02:55 sorear 0.1 cannot be represented exactly as a Num; have fun parsing 0.123456789
02:55 colomon well, I'm thinking once this works it should probably be used for .Int, too.
02:56 colomon sorear: 0.1 is a Rat in p6
02:56 colomon TimToady: which is why I was wondering how to write a "single-digit to Int" algorithm.  Easy enough for ascii digits...
02:57 TimToady should be in the unicode tables
02:57 sorear it's the NumericValue property
02:57 colomon do we have an easy way of getting at that?
02:58 TimToady blizkost to Perl 5? :)
02:58 pmichaud colomon: no, not presently.
02:58 pmichaud colomon: I suspect ICU provides that property somewhere, but Parrot doesn't expose it yet.
02:58 sorear ICU?
02:58 TimToady you could borrow the tables that sorear++ came up with for STD
02:59 colomon oh, interesting.  sorear++
02:59 pmichaud colomon: this is a place where I'd not have perfect become the enemy of good enough (for now)  :-)
02:59 colomon :)
03:00 TimToady and if you grab those tables you can probably dump ICU, for the most part...
03:00 pmichaud ...at the startup cost of initializing the tables
03:00 pmichaud unless they're in C...?
03:00 TimToady or implementing mmap
03:01 pmichaud or mmap might work
03:01 pmichaud if they're in C we could make something work.
03:01 colomon rakudo: (1, 10, 100 ... *).munch(20).map({ .WHAT.say }).eager
03:01 sorear the STD tables are designed to be processed using a minimum number of PerlIO traps
03:01 p6eval rakudo 11cbd4: OUTPUT«Int()␤Int()␤Int()␤Rat()␤Rat()␤Rat()␤Rat()␤Rat()␤Rat()␤Rat()␤Num()␤Num()␤Num()␤Num()␤Num()␤Num()␤Num()␤Num()␤Num()␤Num()␤»
03:01 sorear they aren't quite properly aligned for mmap()
03:01 TimToady yet
03:01 colomon hmmm, not quite right yet.
03:01 pnate joined #perl6
03:01 pmichaud well, they're static, so we could certainly make a static C data structure for them, and some opcodes to do what we want.
03:02 sorear also, they currently only contain Blank and GeneralCategory
03:02 pmichaud That might in fact be a Big Win, rather than waiting for Parrot to figure out how it's going to handle things.
03:03 meppel joined #perl6
03:04 sorear ok, I'll do that soon
03:04 * sorear loves designing data structures and has already worked out a nice format for this
03:06 colomon sorear++
03:17 snarkyboojum joined #perl6
03:18 agentzh joined #perl6
03:22 colomon 'night, all.
03:22 pmichaud 'night, colomon++
03:22 colomon pmichaud, TimToady: hope to see you in the morning for a bit.
03:23 pmichaud colomon: same here.  I think we'll be in the union, either downstairs in the lobby area or in the BOF room
03:23 pmichaud (but perhaps check on irc first, or if you're unable to find us)
03:23 pmichaud (cell # sent in /msg)
03:35 molaf joined #perl6
03:46 skangas joined #perl6
03:51 ashleydev joined #perl6
03:56 ciphertext joined #perl6
04:04 snarkyboojum joined #perl6
04:11 sorear Maybe we should just use ICU... I don't feel very good about stealing my STD data source hack for Rakudo
04:12 sorear It involves die unless $] == 5.012001; and lots of scraping of files in @INC/unicore/lib
04:13 JimmyZ joined #perl6
04:21 dalek csmeta: r342 | stefa...@cox.net++ | trunk/vicil/ (2 files):
04:21 dalek csmeta: [vicil] Adopt Parrotish arguments model - native array + native hash.  It's
04:21 dalek csmeta: wrong, but I don't understand the spec and pmichaud says the spec isn't finished
04:21 dalek csmeta: anyway.  Also, it cuts the circularity issues involved in Parcel having methods
04:21 dalek csmeta: which take arguments.
04:21 dalek csmeta: review: http://code.google.com/p/csmeta/source/detail?r=342
04:25 mjk joined #perl6
04:36 skids joined #perl6
04:38 mjk left #perl6
05:16 kaare joined #perl6
05:32 dalek nqp-rx: 9157c78 | pmichaud++ |  (2 files):
05:32 dalek nqp-rx: Allow hyphens and single-quotes in subrule calls.
05:32 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/9157c78be99aa186f8fdf54d81e8f46d45fc677c
05:32 dalek nqp-rx: f0bed9b | pmichaud++ |  (2 files):
05:32 dalek nqp-rx: Allow hyphen and single-quotes in NQP identifiers.
05:32 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/f0bed9b2b89dd8ddf8c66de11f1128fcb42b75ad
05:32 dalek nqp-rx: a3d5c5b | pmichaud++ | build/PARROT_REVISION:
05:32 dalek nqp-rx: Bump PARROT_REVISION to get debugging fix.
05:32 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a3d5c5bf525959fba3db3442870de269a706b09f
05:32 dalek nqp-rx: ebaf06c | pmichaud++ |  (2 files):
05:32 dalek nqp-rx: Add ResizablePMCArray .delete and .exists .
05:32 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/ebaf06c26e76302a25047f9ff5865802c4781b15
05:32 dalek nqp-rx: 4ee17c4 | pmichaud++ | src/stage0/ (4 files):
05:32 dalek nqp-rx: Update bootstrap.
05:32 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/4ee17c43ffd3a7cbd378918c7d700fcb25649d69
05:42 orafu joined #perl6
05:59 Su-Shee joined #perl6
06:07 cjk101010 joined #perl6
06:09 jakk joined #perl6
06:12 nadim joined #perl6
06:17 Su-Shee_ joined #perl6
06:29 nadim joined #perl6
06:33 quietfanatic rakudo: class A {our $.x = 4}; say A.new.x
06:33 p6eval rakudo 11cbd4: OUTPUT«Method 'x' not found for invocant of class 'A'␤  in main program body at line 11:/tmp/HfotnSJZki␤»
06:33 quietfanatic I'm gonna submit that as a bug.
06:43 gfx joined #perl6
07:02 mberends joined #perl6
07:16 TiMBuS joined #perl6
07:28 Trashlord joined #perl6
07:42 mberends joined #perl6
07:55 kensanata joined #perl6
07:58 fridim joined #perl6
07:59 thepler joined #perl6
08:02 ejs joined #perl6
08:05 [particle] joined #perl6
08:06 tadzik joined #perl6
08:08 ejs joined #perl6
08:13 thebird joined #perl6
08:20 skids joined #perl6
08:29 stepnem joined #perl6
08:30 Su-Shee joined #perl6
09:27 mjk joined #perl6
09:31 redicaps left #perl6
09:40 agentzh joined #perl6
09:46 masak joined #perl6
09:48 mberends new directions to the Belgian Perl Workshop: http://brussels.the-hub.net/public/contact.html
09:49 masak o/
09:49 mberends o/
09:50 masak I made moderate progress with the pls proof-of-concept yesterday.
09:51 masak found two bugs which I promptly saved away and ignored.
09:51 pmurias joined #perl6
09:53 mberends at least the TDD finds the bugs, instead of the end user :)
09:53 masak :)
09:54 ciphertext_ joined #perl6
09:56 nsh_ joined #perl6
09:57 pmurias sorear: re vicil is intended to be used together with perlesque or a standalone thing?
10:01 sorear I don't know yet
10:01 sorear it's more an exercise in clarifying the future than anything else
10:03 ciphertext joined #perl6
10:04 azert0x joined #perl6
10:12 jnthn morning o/
10:13 moritz_ \o
10:13 moritz_ "morning"
10:13 * masak grins
10:13 jnthn It is still in my current timezone. :P
10:13 jnthn 11:23 or so here in England
10:14 moritz_ wow, England is UTC + 1:10 now! :-)
10:14 masak moritz_: don't tease jnthn, he's just woken up... :P
10:15 jnthn :P
10:16 jnthn True. :P
10:17 masak jnthn: it's OK, I didn't wake up long ago either. :)
10:17 jnthn :-)
10:18 jnthn Yes, I seem to recall our preferred waking up times worked out very well last hackathon. :-)
10:19 masak not to mention our preferred going-to-bed times!
10:20 jnthn :-)
10:20 masak if I do `run("something that works") or otherwise()`, when is &otherwise called?
10:21 jnthn I forget what run returns...
10:21 jnthn rakudo: say &run.perl.signature
10:21 p6eval rakudo 11cbd4: OUTPUT«Method 'signature' not found for invocant of class 'String'␤  in main program body at line 11:/tmp/gcljS5uMUl␤»
10:21 jnthn oh ffs
10:21 jnthn I forget what run returns...!
10:21 masak coffee for jnthn!
10:21 jnthn rakudo: say &run.signature.perl
10:21 p6eval rakudo 11cbd4: OUTPUT«:(Any $commandline)␤»
10:21 jnthn That's not going to answer what I wanted anyway.
10:21 masak jnthn: it returns an Int but a Bool.
10:22 jnthn oh
10:22 jnthn Well, I guess or cares about truth?
10:22 masak I hope so.
10:22 masak otherwise, what would be the point?
10:22 jnthn I'd imagine it does, in which case the answer is "when it's but True"
10:22 jnthn However, but True only started working very recenlty in Rakudo.
10:23 jnthn So run may be out of date with respect to that.
10:23 * masak submits rakudobug
10:23 jnthn oh huh, the Belgian Perl Workshop has moved?!
10:24 mberends o/ jnthn. yes, http://brussels.the-hub.net/public/contact.html
10:24 jnthn moritz_: I plan to be at YAPC::EU before the conf
10:25 jnthn moritz_: Some of the Monday, all of the Tuesday.
10:27 jnthn mberends: Cool
10:27 jnthn mberends: Don't suppose you have heard anything about any pre-conference meetup?
10:28 mberends jnthn: no, we probably all received the same email
10:28 mberends jnthn: but I'd be happy to meet up near there quite early
10:29 jnthn mberends: I more meant, night before the conference, for pivo ;-)
10:30 mberends heh, jnthn is not and early-morning person :)
10:30 jnthn omg cake van?!
10:30 jnthn brb
10:34 [Coke] joined #perl6
10:34 jnthn wow
10:34 jnthn The village my family lives in now has a van that drives around the village selling cake. :-)
10:35 jnthn When I was a kid we only got ice-cream that way. :-)
10:37 colomon jnthn: when I was a kid, we lived far enough away from town that the ice-cream truck only came by a couple of times a summer.  :)
10:37 jnthn wow :-)
10:37 colomon so, I went to a quick talk on functional programming in Perl 5 yesterday.
10:38 colomon most everything they talked about is built-in / easier in p6.
10:38 colomon except, we don't have memoize yet!
10:38 JimmyZ joined #perl6
10:38 arnsholt colomon: I'm sure that can be arranged =)
10:39 colomon arnsholt: me too, I'm just trying to make sure that the Right People are thinking about it.
10:39 jnthn colomon: I'm sur ethere's an is remembered or similar trait
10:39 jnthn That you can put on a sub to get that effect
10:39 jnthn I think it's in spec somewhere.
10:39 colomon seriously?!
10:39 colomon TimToady++
10:39 jnthn Unless it was a bit of the spec I read in a dream. ;-)
10:39 * jnthn tries to find it
10:39 colomon hmmm, it's not "remembered"
10:39 arnsholt If it was in a dream we can always update reality to reflect that =D
10:40 colomon it seems like memoize should be easy to do in p6, whether it's a module or a trait we need to implement
10:41 jnthn Found
10:41 jnthn is cached
10:41 colomon and given Rakudo's current speed, it seems like it would be very useful.  ;)
10:41 jnthn In S06
10:43 jnthn If only we had .wrap working again, we could probably implement it already. :-)_
10:44 colomon .wrap?
10:45 jnthn colomon: aye
10:45 jnthn colomon: The thing that lets you wrap things around a routine
10:46 jnthn Then it's just
10:46 tadzik rakudo: my @arr = (1, 2, 3, 4, 5); @arr ~~ 5
10:46 p6eval rakudo 11cbd4:  ( no output )
10:46 tadzik rakudo: my @arr = (1, 2, 3, 4, 5); say 'ok' if 5 ~~ @arr
10:46 p6eval rakudo 11cbd4:  ( no output )
10:46 tadzik hrm, repl is more verbose
10:47 tadzik rakudo: my @arr = (1, 2, 3, 4, 5); say 'ok' if @arr ~~ 5
10:47 p6eval rakudo 11cbd4: OUTPUT«ok␤»
10:47 jnthn multi trait_mod:<is>(Routine $r, :$cached!) { $r.wrap(sub (|$c) { if is_cached($c) { ...retrun cached... } else { run and cache } }); }
10:47 tadzik what's the difference between this two?
10:47 colomon @arr ~~ 5 converts @a to a scalar, the number of elements, ie 5
10:48 jnthn If you want to grep through an array for values, you want
10:48 jnthn @arry ~~ *,$value,*
10:49 tadzik looks weird, but I think I get it
10:49 jnthn * menas "match anything"
10:49 tadzik how about 5 ~~ @arr, how does it work?
10:49 jnthn Puts 5 in list context, rendering a one-item list
10:49 jnthn So it's true if @arr only contains one element and it's 5
10:49 jnthn Smart-match is not symmetric.
10:50 tadzik mhm
10:50 jnthn The type of the thing on the right hand side always decides.
10:56 cognominal joined #perl6
11:00 redicaps joined #perl6
11:01 cognominal joined #perl6
11:06 pugssvn r31421 | pmurias++ | [smop] much faster handling of .ri files
11:09 colomon loliblogged: http://justrakudoit.wordpress.com/2010/06/24/euler-2/
11:11 stepnem joined #perl6
11:17 * jnthn afk for a bit
11:23 tadzik ~(1, 1, *+* ... 4000000)
11:23 tadzik I don't get it, the *+* part
11:23 tadzik looks a bit like Camelia, but what does it do?
11:24 colomon tadzik: if * is used as a term in for an operator, it generates a closure.
11:25 colomon so *+* is the same as { $^a + $^b }
11:25 tadzik hmm
11:25 colomon the same trick is used there with * !% 2
11:26 colomon the only difference is the * + * closure takes two arguments, and the * !% 2 takes only one
11:26 colomon that's based on the number of *s in the expression.
11:26 tadzik alright, I get that one. But this *+*. In the closure you wrote, it gets the first one from the left and first from the right?
11:26 redicaps rakudo: grammar word {token TOP{\w+}}; word.parse("foo");
11:26 p6eval rakudo 11cbd4:  ( no output )
11:26 tadzik no, that makes no sense
11:26 redicaps rakudo: grammar word {token TOP{\w+}}; word.parse("foo");
11:26 tadzik how does it know to take the last two?
11:27 p6eval rakudo 11cbd4:  ( no output )
11:27 colomon tadzik: the closure just takes two
11:27 tadzik hmm
11:27 colomon the series operator, if it has a closure with N arguments, takes the last N arguments that were generated
11:27 tadzik ah
11:27 tadzik what is the series operator here?
11:27 colomon ...
11:28 tadzik mhm
11:28 tadzik at the first glance it looks more magical than Haskell to me
11:29 masak rakudo: grammar word {token TOP{\w+}}; say word.parse("foo");
11:29 p6eval rakudo 11cbd4: OUTPUT«foo␤»
11:29 colomon it's actually built out of very simple ideas, but it does take a while to get used to them.
11:30 tadzik it's magic anyway ;)
11:31 tadzik like bogosort. It's easy to understand, but it's magic
11:32 masak bogosort is magic? :)
11:32 tadzik well, the wikipedia implementation is, at the first glance
11:32 masak rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick until [<=] @a; say @a.perl
11:32 p6eval rakudo 11cbd4: OUTPUT«[3]␤»
11:32 masak uhm :)
11:32 tadzik especially when you see the Java solution below
11:32 masak rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick(*) until [<=] @a; say @a.perl
11:33 p6eval rakudo 11cbd4: OUTPUT«[1, 2, 3, 4, 5]␤»
11:33 masak \o/
11:33 tadzik hmm
11:33 arnsholt masak: Bogowin! =D
11:33 tadzik rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick * until [<=] @a; say @a.perl
11:33 p6eval rakudo 11cbd4: OUTPUT«Could not find sub &until␤  in main program body at line 11:/tmp/FdJZ19PMQl␤»
11:33 tadzik there has to be () around *, hm?
11:33 masak tadzik: that's two-terms-in-a-row.
11:33 tadzik mhm
11:33 masak tadzik: and that's not allowed :)
11:33 masak tadzik: so yes, method calls must have either the colon or parens.
11:33 moritz_ pick: *
11:34 moritz_ tadzik: either .pick(*) or .pick: *
11:34 tadzik hmm
11:34 tadzik what kind of syntax is 'pick: *'?
11:34 tadzik rakudo: my @a = 3, 2, 1, 5, 4; @a.=pick: * until [<=] @a; say @a.perl
11:34 moritz_ method call syntax
11:34 p6eval rakudo 11cbd4: OUTPUT«[1, 2, 3, 4, 5]␤»
11:34 tadzik yeah, but how it works?
11:35 arnsholt You put a colon after the method name instead of parens around the arglist
11:35 moritz_ it takes the rest of the statement as argument list
11:35 arnsholt $obj.method: $a, $b, $c
11:35 tadzik nice
11:35 moritz_ with the exception of statement modifiers, which are not part of the argument list
11:35 tadzik even more TIMTOWDY
11:36 tadzik *towtdy
11:36 masak "Yt"?
11:36 masak :)
11:36 moritz_ y.
11:37 moritz_ wow, just read about a wimbledon match
11:37 moritz_ that was aborted after ten hours because it got too dark
11:37 moritz_ score: 59:59 in the 5th set, not yet decided :-)
11:37 masak crazy.
11:38 moritz_ that's something I really admire, that none of the players gave up
11:38 moritz_ after all even a standard 3 hours game of tennis is hard work
11:40 masak how can I do a MAIN sub which optionally accepts a --foo flag with no value, the presence of which translates into a Bool?
11:40 tadzik (1..*).list.reverse.shift
11:40 tadzik is reverse what breaks everything?
11:41 moritz_ masak: (Bool :$foo)
11:41 moritz_ in the signature
11:41 colomon tadzil: yes
11:41 colomon *tadzik
11:41 masak tadzik: what do you expect that to return? :)
11:41 moritz_ reversing an infinite list is bound to cause problems
11:41 colomon you can't revers... what moritz_ said.
11:41 ejs left #perl6
11:41 tadzik masak: and what do you think? :) pop didn't work either, so I tried shift :)
11:42 masak tadzik: I'm asking because I don't know. :)
11:42 moritz_ what's the last item of an infinite list anyway?
11:42 masak moritz_: that didn't work for me. Nominal type check failed for parameter '$foo'; expected Bool but got Any instead
11:42 masak moritz_: that's when it's not supplied.
11:42 masak I think there's an RT ticket for that.
11:42 moritz_ oh.
11:43 moritz_ I think there was a patch that was supposed to fix the case of --/value
11:43 moritz_ maybe that broke it
11:43 moritz_ rakudo: sub MAIN(Bool :$foo) { }
11:43 p6eval rakudo 11cbd4:  ( no output )
11:43 moritz_ works here when not present
11:43 masak hm.
11:44 moritz_ are you sure you didn't forget the : ?
11:44 masak seems I get that error, but not there.
11:44 masak rakudo: sub MAIN(Bool :$foo) { say $foo.WHAT }
11:44 p6eval rakudo 11cbd4: OUTPUT«Any()␤»
11:44 masak right. I tried to use it as a Bool() later, and it blew up.
11:45 masak and that's what the RT ticket was about, too.
11:45 masak so, nevermind. this is all workaroundable.
11:45 moritz_ urks
11:45 moritz_ is this specific to MAIN?
11:45 masak nope.
11:45 moritz_ ah
11:45 masak all non-supplied tyoed nameds.
11:45 moritz_ that explains why I wasn't aware of it
11:47 [Coke] joined #perl6
11:51 envi^home joined #perl6
11:58 takadonet morning all
11:59 masak takadonet: mroing!
12:00 takadonet masak: how are u?
12:00 moritz_ who is that mr. oing?
12:00 masak :)
12:01 masak takadonet: I'm good. thankful for the relative efficiency of the climate control inside. :)
12:01 masak takadonet: how are u?
12:02 takadonet masak: doing good, extremely busy lately
12:03 masak takadonet: aye, same here.
12:05 felipe joined #perl6
12:07 dalek nqp-rx: a915b78 | bacek++ |  (2 files):
12:07 dalek nqp-rx: Add bitwise operators
12:07 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a915b7814fcb9c913ac0eb2b1c95c4487bcc7c2d
12:08 masak rakudo: say ~(1, 1 ... &[+])[^10]
12:09 p6eval rakudo 11cbd4: OUTPUT«1 1 1 1 1 1 1 1 1 1␤»
12:09 moritz_ huh.
12:09 masak closures bug?
12:09 moritz_ wait
12:09 masak or am I doing something wrong?
12:09 moritz_ that's old series syntax
12:09 masak rakudo: say ~(1, 1, &[+] ... *)[^10]
12:09 p6eval rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in 'infix:<...>' at line 1␤  in main program body at line 11:/tmp/x5Trgy3XKZ␤»
12:09 * masak submits rakuodbug
12:10 masak moritz_: if that's the old syntax, then I like the new syntax better.
12:10 colomon rakudo: say ~(1, 1, &[+] ... 50)
12:10 p6eval rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in 'infix:<...>' at line 1␤  in main program body at line 11:/tmp/9OU1aHEom6␤»
12:10 colomon rakudo: say ~(1, 1, *+* ... 50)
12:11 p6eval rakudo 11cbd4: OUTPUT«1 1 2 3 5 8 13 21 34␤»
12:11 moritz_ I guess it's related to &[+] referring to a multi
12:11 colomon moritz_: yes
12:11 colomon I'm not sure the &[+] can actually work here.
12:11 masak why not?
12:11 colomon ... needs to know how many arguments the closure takes.
12:11 masak ah.
12:11 colomon how many does &[+] take?
12:11 masak two.
12:11 colomon or zero
12:12 masak zero!?
12:12 colomon rakudo: say infix:<+>()
12:12 moritz_ for [+] to return 0
12:12 p6eval rakudo 11cbd4: OUTPUT«0␤»
12:12 moritz_ and for [*] to return 1 etc.
12:12 moritz_ the default values
12:12 colomon rakudo: say infix:<*>()
12:12 masak huh.
12:12 p6eval rakudo 11cbd4: OUTPUT«1␤»
12:13 masak well, the ... operator clearly chooses the two-args one here, no?
12:13 moritz_ where?
12:13 moritz_ or for [~] to return an empty string, for that matter
12:13 masak moritz_: in the case of the ... series above.
12:13 moritz_ in which case?
12:14 masak 1, 1, &[+] ... *
12:14 colomon looks to me like it doesn't know what one to choose
12:14 masak I mean, ideally.
12:14 moritz_ why?
12:14 colomon what's your rule for that?
12:14 masak that this isn't a zero-args case.
12:14 moritz_ what if there's another infix:<+> with three arguments?
12:15 colomon rakudo: say (1, 1, { rand } ... *).munch(10)
12:15 moritz_ the general solution is probably known, and neither specced nor implemented
12:15 p6eval rakudo 11cbd4: OUTPUT«110.03712539919385450.5533102571881830.2906026487207280.5188719889966540.7733171349245680.4927070330798780.3392575986627760.39404857995979␤»
12:15 masak then choose that for all but the third element.
12:15 masak this sounds a lot like ruoso++'s thinking around the reduce sub.
12:15 moritz_ and that is to do a partial binding, taking off as many elements of a list as can possibly used by the dispatch
12:15 colomon (ie, zero-arg closures are legal in series op)
12:15 TimToady &[+] is specced to choose the 2-arg case
12:16 colomon TimToady++
12:16 masak that settles it. thanks.
12:16 colomon there's the bug, then.  :)
12:17 TimToady S03:4686
12:18 TimToady shower &
12:19 moritz_ rakudo: multi sub a($a, $b) { $a + $b }; multi sub a(Int $a, Int $b) { $a + $b }; say ~(1, 1, &a ... *)[^10]
12:20 p6eval rakudo 11cbd4: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in 'infix:<...>' at line 1␤  in main program body at line 11:/tmp/UHpiQT8yte␤»
12:20 moritz_ so it's not only the arity
12:21 * masak includes that in the ticket
12:21 masak moritz_: $makefile.say("\tinstall -D $file ~/.perl6/$file");
12:21 masak that -D option is -d on Mac OS X.
12:22 moritz_ and -d means something completely different on linux
12:22 moritz_ -d, --directory
12:22 moritz_ treat all arguments as directory names; create all components of
12:22 moritz_ the specified directories
12:22 moritz_ hilarity ensured
12:23 masak I see two options:
12:23 masak (1) mkdir -p
12:23 masak (2) detect OS or, more specifically, the way `install` works.
12:23 moritz_ (1) is probably more straight forward
12:23 masak any objections to (1)?
12:24 ciphertext colomon: speaking of series, i had a few comments and questions the other day, because I had been working on a new patch (to replace the one i submitted that used a special 'scmp' operator)
12:24 phenny ciphertext: 18 Jun 10:28Z <colomon> tell ciphertext I've paused for the moment (on series), but I still have a list of things that need doing  and a notion that this is a pretty good time to be doing them.
12:26 bluescreen joined #perl6
12:28 colomon ciphertext: yes?
12:28 masak rakudo: say "abcdefabc".rindex("b")
12:28 p6eval rakudo 11cbd4: OUTPUT«Method 'rindex' not found for invocant of class 'Str'␤  in main program body at line 11:/tmp/bKU9XHf9bg␤»
12:28 masak alpha: say "abcdefabc".rindex("b")
12:28 p6eval alpha 30e0ed: OUTPUT«7␤»
12:28 * masak submits rakudobug
12:32 ciphertext colomon: ok, first, i had a question about character series.   Namely,  how should something like 'A'...'DD' behave?  should it be the same as 'A'...'D' or 'A'...'Z','AA'...'DD'?
12:32 colomon it's almost the same as 'A'...'D'
12:32 ciphertext colomon: 'almost'?
12:32 colomon well, is the same, I suppose.
12:32 ciphertext ok
12:33 colomon it's 'A'...^'DD' that would be different from 'A'...^'D'
12:34 colomon rakudo: say 'A' ... 'DD'
12:34 p6eval rakudo 11cbd4: OUTPUT«ABCD␤»
12:34 bphillips joined #perl6
12:35 ciphertext second, i was going to point out that the current version doesn't support closures on the rhs (to determine endpoint).  I actually have this done in my version (http://github.com/ciphertext/rakudo/blob/master/src/core/operators.pm#L310), but there are a lot of other differences too.
12:36 colomon there is a difference internally ... 'A'...'D' ends because the series hits 'D', while 'A'...'DD' ends because the next element ('E') is on the opposite side of 'DD' than 'D' is.
12:38 masak \o/ first installed project with pls!
12:39 colomon \o/
12:39 slavik o/
12:40 aCiD2 joined #perl6
12:40 masonkramer joined #perl6
12:41 TimToady colomon: I suspect that for strings, anything other than exact match is going to be un-dwimmy
12:42 TimToady rakudo: say 'a' ... 'zzz'
12:42 p6eval rakudo 11cbd4:
12:42 p6eval ..OUTPUT«abcdefghijklmnopqrstuvwxyzaaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazbabbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzcacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczdadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzeaebecedeeefegeheiejekelemeneoepeqereseteuevewex…
12:42 moritz_ rakudo: say 26**3
12:42 p6eval rakudo 11cbd4: OUTPUT«17576␤»
12:42 slavik perl6: say 2**64
12:42 p6eval pugs: OUTPUT«18446744073709551616␤»
12:42 p6eval ..elf 31421, rakudo 11cbd4: OUTPUT«1.84467440737096e+19␤»
12:43 slavik grr
12:43 TimToady commuting &
12:44 slavik TimToady: perfect person to ask :)
12:44 moritz_ slavik: at least two implementations agree (though they are both wrong)
12:45 slavik moritz_: they are not 'wrong' but I would expect automatic bignum
12:45 slavik moritz_: or do you mean wrong in the sense of the 'not following spec'
12:45 moritz_ right
12:45 moritz_ wrong == different answer than specced
12:45 moritz_ rakudo: say (2**64).WHAT
12:45 p6eval rakudo 11cbd4: OUTPUT«Num()␤»
12:45 slavik moritz_: in rakudo's case, this has to do with parrot?
12:46 moritz_ slavik: that's one way to look at it. If parrot supported native bigints, rakudo would support it too
12:46 slavik http://docs.parrot.org/parrot/1.9.0/html/src/pmc/bignum.pmc.html
12:47 moritz_ there are at least two caveats with this
12:47 moritz_ three, I think
12:47 slavik do tell
12:47 slavik :)
12:47 moritz_ 1) bignum != bigint
12:48 slavik agreed
12:48 colomon ciphertext: my quick impression looking at your version is that you've implemented some nice new stuff and broken some stuff at the same time.  Is yours passing all the tests?  (afk for a bit, getting ready to commute)
12:48 moritz_ 2) it's not "native" in the sense that an integer register can hold a bignum (or bigint, if it exists) PMC
12:48 moritz_ 3) it's only available when people have GMP installed, and parrot's configure.pl detects it
12:49 ciphertext colomon: i don't think it passes everything, no... i haven't had a chance to work on it much in the last few days.
12:49 redicaps left #perl6
12:49 slavik moritz_: gmp?
12:50 slavik ahh
12:50 slavik gnu bignum?
12:50 moritz_ slavik: the math library that parrot uses under the hood
12:50 slavik so if I have libgmp-dev installed, I should get bignum in perl6 and 2**64 in rakudo will output '18446744073709551616' ?
12:51 moritz_ nope; because of caveat 2)
12:51 moritz_ parrot has this model of 'vtables'
12:51 moritz_ and there's one to coerce to integer
12:52 moritz_ called get_integer, iirc
12:52 moritz_ and it *has* to return a native parrot int
12:52 moritz_ which is broken design, if you consider bigints
12:52 moritz_ because "12244(many digits more)234234".Int boils down to a vtable call
12:53 moritz_ (it doesn't have to for Perl 6 objects, but if it doesn't, HLL interop is in danger)
12:53 slavik parrotbug?
12:53 moritz_ so coercions to int or num prevent us from just using big numbers
12:54 moritz_ slavik: parrot design bug, if you want
12:54 slavik ouch :(
12:54 slavik moritz_: any idea if they are working on a fix?
12:54 redicaps joined #perl6
12:54 moritz_ I don't think it's high priorty for most parrot hackers
12:54 slavik :(
13:02 colomon ciphertext: will you have some availability for a long-distance hackathon over the weekend?
13:02 colomon I think we can finish ... if we put our heads together.
13:02 moritz_ masak: I've tried to play with tcurtis' optimization framework, and promptly hit two show-stopper bugs (first one is already fixed)
13:02 ciphertext probably... what time(s)?
13:02 moritz_ it seems every project needs a user to keep 'em honest
13:03 JimmyZ joined #perl6
13:03 masak moritz_: aye.
13:05 colomon ciphertext: what timezone are you in?
13:07 ciphertext colomon: u.s. central (GMT-6)
13:08 colomon I'm eastern.
13:08 colomon maybe late morning or early afternoon?
13:09 colomon may have to play it by ear around my son's napping schedule.  :)
13:09 stepnem joined #perl6
13:09 ciphertext that should work.
13:10 colomon in the meantime, we should try to think of test cases.  :)
13:10 moritz_ speaking of test cases
13:10 colomon remember that series doesn't have to work on just Strs and numbers.  ;)
13:10 moritz_ I noticed that somebody re-vamped some of the series tests
13:10 moritz_ and changed file names
13:11 moritz_ somebody needs to adapt t/spectest.data accordingly at some point
13:11 moritz_ I'll try to do that tonight if nobody beats me to it
13:12 colomon looks like files were actually added?
13:12 moritz_ added, and series-simple is gone it seems
13:12 colomon oh, right, that's just the .rakudo ghost in my ls
13:13 pmichaud good morning, #perl6
13:13 colomon I've gotta get a move on here, and my rakudo is out-of-date and dirty, anyway.  but maybe later today....
13:13 colomon o/
13:13 colomon pmichaud: heading your way...
13:13 pmichaud colomon: we're in the hospitality suite, 2nd floor
13:14 colomon be there in about 30
13:15 colomon afk
13:15 moritz_ pmichaud: did you have a parrot BOF/metting/whatever? if yes, how did it go?
13:16 cjk101011 joined #perl6
13:17 masak morning, pm.
13:18 masak ok, I have now pushed a pls proof-of-concept. http://github.com/masak/proto/tree/pls
13:18 moritz_ and morning, right :-)
13:18 masak I'd be very happy to hear if people get the same results using it as I do.
13:19 pmichaud moritz_: there was a room reserved for parrot bof, and we had a couple of meetings there
13:20 pmichaud mainly it was a meeting to brainstorm suggestions for parrot based on rakudo's experiences
13:20 masak to help me test it (1) check out/update the 'pls' branch from the 'proto' repo. (2) optionally run 'make' on it (3) run './proof-of-concept' and see JSON::Tiny fetch, build and test. the tests fail. (4) run './proof-of-concept --force'; the tests should run again, and then JSON::Tiny should install into ~/.perl6/lib.
13:21 moritz_ so you fetch it even though it's bundled?
13:21 masak "it"?
13:21 masak I don't understand the question.
13:21 moritz_ JSON::Tiny
13:21 masak ah, yes. sure.
13:22 masak because pls makes no guarantees as to having the latest JSON::Tiny.
13:22 masak it has the one it has.
13:22 moritz_ I'll try as soon as my rakudo buid finishes
13:23 masak cool. thanks.
13:23 kolibrie TimToady: I found out that I do not have to leave for the airport until 11:00.  Do you have time if I stop by for fifteen minutes some time before then to discuss the flow diagram from my talk?
13:23 masak the output is very verbose and confused right now. but that's because it's a proof-of-concept, not a finished product :)
13:25 moritz_ env PERL6LIB='/Users/masak/gwork/proto/lib' perl6 --target=pir --output=lib/JSON/Tiny.pir lib/JSON/Tiny.pm
13:25 moritz_ ===SORRY!===
13:25 moritz_ Unable to find module 'JSON::Tiny::Actions' in the @*INC directories.
13:25 * masak shouldn't have committed Makefile
13:25 moritz_ does the Makefile properly declare dependencies?
13:25 masak remove it, ufo, and make again :)
13:26 mathw o/
13:26 moritz_ masak: ./proof-of-concept has a hardcoded perl6 path
13:26 masak no, Makefiles don't need to consider deps, because deps are already installed when the project tries to build.
13:26 dalek rakudo: 18682c8 | pmichaud++ | build/PARROT_REVISION:
13:26 dalek rakudo: Bump PARROT_REVISION.
13:26 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/18682c8c0208dc21ce9c864e1e03ef37b323810c
13:26 masak moritz_: oh!
13:26 * masak checks
13:26 moritz_ masak: I mean dependencies inside the makefile, so that parallel make works
13:26 masak moritz_: the sheband one?
13:27 masak moritz_: I couldn't get 'env' to work here.
13:27 masak moritz_: I wouldn't know how to "declare dependencies" within a Makefile.
13:27 moritz_ what did you try?  #!/usr/bin/envperl6 ?
13:27 moritz_ masak: foo: bar
13:27 moritz_ masak: only builds foo if bar is already built
13:27 mathw masak: When you can spare a moment, it's time for Form.pm to be abducted
13:28 masak mathw: sure. I can spare a moment. are there any questions?
13:28 masak moritz_: hm.
13:29 masak moritz_: that would complicate the ufo script a bit, but otherwise it'd work.
13:29 moritz_ masak: proof-of-concept reports that json is already installed ... which it is not
13:29 masak moritz_: sounds like a bug.
13:29 moritz_ though I have an old project.state lying around
13:29 masak moritz_: did it create a poc-projects.state file for you?
13:29 masak that shouldn't matter.
13:29 moritz_ yes
13:29 moritz_ $ cat poc-projects.state
13:29 moritz_ { "json" : { "state" : "installed" } }
13:29 masak huh.
13:30 masak moritz_: did the proof-of-concept script at least appear to install JSON::Tiny?
13:30 mathw masak: actually no, it seems to have worked perfectly
13:30 moritz_ masak: nope
13:30 masak mathw: \o/
13:30 masak moritz_: /o\
13:30 masak moritz_: what went wrong?
13:30 mathw \o/
13:31 * mathw goes back to Haskell
13:31 moritz_ masak: http://nopaste.snit.ch/21536
13:31 masak moritz_: rm poc-projects.state
13:31 masak try again.
13:31 * moritz_ rms, and tries again
13:32 masak that's another file I shouldn't have pushed...
13:32 moritz_ masak: http://nopaste.snit.ch/21537
13:33 masak I got that too at one point.
13:33 masak didn't investigate, but it seemed a "cd" in qx[] persisted to the next &run or something...
13:33 masak moritz_: does cache/json/Makefile look OK?
13:34 Intensity joined #perl6
13:34 moritz_ masak: yes, looks like a typical ufo generated Makefile
13:34 masak moritz_: and cd-ing into cache/json and doing 'make' works, too?
13:35 moritz_ yes
13:36 masak if you enter a debug line `say "cd $cwd && make" above line 234 in proof-of-concept, what does it say?
13:36 masak er, s:2nd/"/";`/
13:36 moritz_ should I first remove poc-projects.state again?
13:36 masak not necessary.
13:37 masak it should be at 'fetched' now, which only saves some time.
13:38 moritz_ cd /home/moritz/src/proto/cache/json && make
13:38 moritz_ now it gets to the failing test
13:38 masak huh.
13:38 masak so it didn't work the time it created the Makefile, but it worked the time after?
13:38 masak ay ay ay.
13:39 masak then there is indeed some cwd interference which I haven't patched.
13:39 moritz_ got to the test failure, reported status "built"
13:39 plobsing joined #perl6
13:39 masak that's correct.
13:39 masak now try ./proof-of-concept --force
13:39 moritz_ and installed it with --force
13:39 masak \o/
13:39 masak thanks.
13:39 moritz_ how do I uninstall now?
13:39 moritz_ :-)
13:39 moritz_ \o/ indeed
13:40 masak not sure uninstall is even theoretically possible.
13:40 masak because of dependencies.
13:40 masak and because what constitutes 'install' is up to the Makefile of the project.
13:40 moritz_ right
13:40 masak I'll be happy if I get 'update' working :)
13:40 masak the semantics of 'update' are only strange, not impossible.
13:41 moritz_ that's why linux distribution package managers install into local dirs first, built archives from that and install them under the control of the package manager
13:41 masak they're "pretend for a moment that the project is absent, try to install it, and then reset the state to "installed" regardless of what happened'.
13:42 moritz_ e.g. dpkg-buildpackage installs into debian/$somewhere/ first, and creates a .deb from the contents of debian/$somewhere
13:43 masak moritz_: I guess one could simply 'rm' all modules from ~/.perl6/lib that occur in the project's lib dir, and then remove the project from the cache, too.
13:43 TimToady kolibrie: I'm just sitting here in the hostility room.
13:43 masak that could work.
13:43 kolibrie TimToady: okay, I'll be over in a bit
13:44 TimToady it's back on the 2nd floor
13:44 moritz_ hostility?
13:44 moritz_ nice name for a room
13:44 moritz_ like, 101 in 1984
13:44 masak "Hostility is Friendliness"
13:45 moritz_ :-)
13:45 TimToady *hospitality
13:47 Su-Shee "hostility is fiendliness". easily corrected. ;)
13:47 * moritz_ finds in funny that in English "host" can both mean somebody who lets you stay in your hous, and "army" (which sometimes drives you out of your hous)
13:48 [Coke] joined #perl6
13:57 sbp "cleave" is another autoantonym
13:57 sbp I think there are some others too. oh, "sanction"
13:57 masak it's a wonder we manage to communicate at all.
13:57 sbp most of the time we don't
13:58 masak :)
13:58 PerlJam shared human experience does wonders for communication
13:58 Guest23195 joined #perl6
13:58 PerlJam (we're really going to have problems when the aliens show up though)
13:59 * moritz_ finds that he uses .pairs much more often that .kv to loop over hashes (and arrays, for that matter)
13:59 moritz_ s/that/than/
14:00 masak make: *** No targets.  Stop.
14:00 masak g'ah! I wish I knew why it says that.
14:00 masak and then the next time, it works.
14:00 masak OH!
14:00 moritz_ try to add a call to pwd before make
14:00 * masak tries closing the file handle
14:01 colomon joined #perl6
14:01 masak moritz_: I had tried that already. it showed the proto dir.
14:01 masak now it works!
14:01 moritz_ \o\
14:02 masak /o/
14:02 pmichaud .oO(those look an awful lot like TIE fighters to me...)
14:02 TimToady >ö<   <-- X-wing
14:02 moritz_ pmichaud: don't know if you had your "Cool Perl 6" talk yet... comb instead of split would be more idiomatic
14:03 moritz_ wouldn't that be |o| for the TIE fighters? :-)
14:03 pmichaud moritz_: I couldn't figure out how to do it with comb at the time (and was in a rush)
14:03 PerlJam (o) for Vader's
14:03 rv2733 joined #perl6
14:03 moritz_ pmichaud: ok
14:03 pmichaud sure, |o|  is the TIE fighter when it's coming straight at you.  \o\  looks like a tie-fighter as it's making a swooping pass at you.
14:04 masak :)
14:04 moritz_ relatvisticly distorted TIE figher :-)
14:04 colomon |o|
14:05 pmichaud .oO( touchdown? )
14:05 PerlJam Next thing you know we're got ascii animation of the entire star wars end-of-movie fight scene
14:05 PerlJam s/we're/we've/
14:06 TimToady )O(   # TIE fighter in a convex mirror
14:06 PerlJam http://www.asciimation.co.nz/
14:06 masak :)
14:07 rlb3 joined #perl6
14:07 moritz_ )O(  |O| (O) |O|  resonance!
14:08 rlb3_ joined #perl6
14:11 rlb3 joined #perl6
14:12 ajs joined #perl6
14:14 masak now that the proof of concept works, it would be fun to see if Emmentaler can finally be built.
14:15 rlb3_ left #perl6
14:15 dalek rakudo: bf5bbd4 | pmichaud++ | src/core/ (2 files):
14:15 dalek rakudo: Turn Array.exists into List.exists, write it a bit cleaner.
14:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/bf5bbd4ec5cf399878b786797b4cf1ca98250c0b
14:15 dalek rakudo: 7e3ddca | pmichaud++ | src/core/EnumMap.pm:
14:15 dalek rakudo: Redo EnumMap.exists .
14:15 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7e3ddca4adbe14f3a55fd9912b09e2ca1f151981
14:17 colomon rakudo: my @a = 'a'...'f'; say (@a[2..*]).munch(20)
14:17 p6eval rakudo 11cbd4:  ( no output )
14:18 moritz_ that looks rakudobuggy
14:18 colomon it is, I was trying to do it as an example for pmichaud++
14:18 colomon (I talked in person for the other bits of the conversation... freaky!)
14:19 moritz_ woah there. Don't get used to it!
14:19 felliott joined #perl6
14:20 colomon moritz_: don't worry, I've got a few hours more.  :)
14:20 moritz_ :-)
14:20 cono munch == batch ?
14:20 colomon cono: yes
14:21 moritz_ munch = destructive batch
14:21 colomon batch is going to be history.
14:21 colomon I think?
14:21 moritz_ yes
14:22 cono it's destruct aray?
14:22 moritz_ yes, just like ship
14:22 moritz_ erm
14:22 moritz_ shift
14:22 cono @a[2..3].munch(2) - like splice in perl5 ?
14:23 moritz_ don't know if it works on array slices
14:23 moritz_ splice exists too
14:23 moritz_ .munch(5) is calling .shift 5 times
14:23 cono ah, I got it, thanks :)
14:24 cono batch - just copy?
14:25 moritz_ yes
14:25 moritz_ .batch($x) was the same as .[^$x]
14:25 pugssvn r31422 | colomon++ | Intial version of new trig test support code.
14:26 cono "batch is going to be history" it means that it will be removed in next versions?
14:26 colomon that was my understanding.  but I could be wrong.
14:26 moritz_ and remoed from the spec
14:26 cono :(
14:28 colomon cono: as far as I know, .batch(N) is exactly the same as .[^N]
14:29 cono ah, that's why
14:29 cono understand
14:30 colomon batch was defined on iterators, and we try not to expose iterators to the user now.
14:31 spinclad joined #perl6
14:31 masak both my talks were accepted for YAPC::EU. I didn't expect that :) http://conferences.yapceurope.org/ye2010/talk/2896 http://conferences.yapceurope.org/ye2010/talk/2898
14:31 colomon rakudo: my @a = 'a' ... 'z'; say @a[*/2]
14:31 p6eval rakudo 11cbd4: OUTPUT«n␤»
14:32 masak maybe I'll even have to finish one of them before the conference this time.
14:33 arnsholt Congrats. Wish I could attend them
14:33 * moritz_ should try to sneak in a lightning talk at least
14:33 arnsholt Especially the parsing one sounds cool
14:33 thebird joined #perl6
14:33 masak arnsholt: :)
14:33 pmichaud masak: looks like you got more talks accepted than I did.  :)
14:33 masak arnsholt: still need to implement some of the things for that talk.
14:33 arnsholt =D
14:34 arnsholt Now you have incentive ;)
14:34 masak pmichaud: huh. :)
14:34 masak arnsholt: exactly!
14:34 pmichaud gee, it lookslike one of my talk submissions got lost
14:34 pmichaud hmmmmm
14:35 pmichaud oh well, I'm happy enough with just one.  :)
14:39 thebird joined #perl6
14:39 * pmichaud confirms his talk.
14:43 ash_ joined #perl6
14:44 masak std: my (@xxx, @yyy, @zzz); for @xxx; @yyy; @zzz -> $x; $y; $z { ... }
14:44 p6eval std 31422: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing block at /tmp/0Ied7MayNn line 1:␤------> [32mmy (@xxx, @yyy, @zzz); for @xxx[33m⏏[31m; @yyy; @zzz -> $x; $y; $z { ... }[0m␤    expecting any of:␤   desigilname␤      twigil␤Parse failed␤FAILED 00:01 114m␤»
14:45 * masak thought so
14:45 alester joined #perl6
14:52 TimToady masak: that is very ancient p6
14:52 cygx joined #perl6
14:52 masak TimToady: it's from A04. :)
14:53 masak just checking that STD is saner than that nowadays.
14:53 moritz_ where A stands for Ancient :-)
14:53 * pmichaud worries about the notion of "ancient p6".
14:53 masak and S stands for "Sane" :P
14:53 moritz_ pmichaud: why?
14:53 pmichaud it's been around long enough that we can have things that are "ancient?
14:53 pmichaud "
14:54 [particle] joined #perl6
14:54 moritz_ pmichaud: "ancient" is always relative. Talking about human history has a different notion of "ancient" than talking about creation of the universe
14:55 masak pmichaud: I don't think there's something negative in the fact that Perl 6 has evolved during the past 10 years.
14:55 colomon btw, try one at integrating the new str2num code into Rakudo:
14:55 pmichaud I forgot my smiley again.
14:55 colomon > say 3.14159_26535_89793_23846_26433_83279_50288 3.925520848
14:55 colomon ooo, that paste doesn't work right here.
14:55 colomon > say 3.14159_26535_89793_23846_26433_83279_50288
14:55 colomon 3.925520848
14:55 colomon rakudo: say 3.14159_26535_89793_23846_26433_83279_50288
14:55 p6eval rakudo 7e3ddc: OUTPUT«===SORRY!===␤PAST::Compiler can't compile node of type BigInt␤»
14:56 moritz_ rakudo: say (3.92 - 3.14) / 3.14
14:56 p6eval rakudo 7e3ddc: OUTPUT«0.248407643312102␤»
14:56 moritz_ well, 25% error...
14:56 masak moritz_: if you arrive to Pisa on the 1st, make sure to see "Gioco del Ponte"! http://wikitravel.org/en/Pisa#Do
14:57 Woody2143 joined #perl6
14:57 colomon take 2:
14:57 colomon > say 3.14159_26535_89793_23846_26433_83279_5028 3.14159265358979
14:57 pmichaud rather than get a bigger slice, colomon++ is trying to make a bigger pie.  :-)
14:57 colomon 3.14159265358979
14:57 masak moritz_: oh wait. "last sunday of June". nvm.
14:57 masak would have been fun to see, though. :)
14:57 moritz_ masak: pity. But thanks for the link anyway
14:58 cygx hi
14:58 moritz_ hi cygx
14:58 masak moritz_: it's the first link I find that says that there's more than the tower to see :P
14:58 cygx moritz_: any thoughts on http://github.com/moritz/try.rakudo.org/raw/master/DESIGN
14:58 masak cygx! \o/
14:59 moritz_ cygx: I've only glanced over it; looks sane so far
15:00 moritz_ cygx: I'll have to defer detailed reading for a few hours due to external constraints
15:00 cygx moritz_: ;)
15:02 cygx moritz_: that's ok, as I had to defer implementing anything of that due to my lacking knowledge of perl5
15:02 charsbar joined #perl6
15:02 jnthn pmichaud: Only one of mine got accepted to, fwiw.
15:02 jnthn *TOO
15:03 cygx moritz_: I'll push what I did so far to the repository; would be nice if someone could look at it and tell me if I did something completely retarded
15:03 moritz_ cygx: if you have any Perl 5 questions, don't hesitate to ask in private message, or in #perlde on irc.perl.org if you speak German
15:03 moritz_ cygx: sure, will look at it (but also deferred to later tonight)
15:05 cygx moritz_: will do; nothing urgent comes to mind, though - I'm good so far
15:05 [particle] joined #perl6
15:06 meppl joined #perl6
15:07 rtward joined #perl6
15:07 ash_ you could cheat save yourself the db if you just keep the connection to the browser open
15:08 * ash_ see comet, server push, long polling, hidden iframe
15:08 cygx ash_: there are a lot of things that can go wrong with that approach: timeouts, proxies,...
15:08 moritz_ accidentally closed browser windows
15:08 moritz_ etc.
15:08 moritz_ I'm find with a db
15:09 moritz_ it makes for a more traditional and easier to understand design
15:09 ash_ i'd image a closed browser would result in a new session anyway, unless your doing the sessions on remote ip's
15:09 cygx ash_: actually, long polls are used in case of blocking on rakudo output
15:09 ash_ (which can be bad for people behind a router)
15:09 moritz_ cygx: any preference for a db?
15:10 moritz_ (so that I can know what to set up)
15:10 moritz_ mysql, postgres, sqlite should all be fine
15:10 moritz_ and easy to install
15:10 cygx moritz_: not really - Postgres would most likely be the most robust solution
15:10 moritz_ ok
15:12 skids joined #perl6
15:13 colomon started spectest, now have a bit of time to work on $work.  :)
15:14 ash_ if you need any help cygx i have a bit of experience with the web, i'd be more than happy to help out if you want help
15:15 colomon [particle]: o/
15:15 [particle] hola, colomon
15:15 pmichaud \o/ particle++
15:15 moritz_ so much for $work, he? :-)
15:16 colomon ;)
15:16 [particle] howdy, pmichaud
15:16 [particle] glad we had that chat yesterday
15:16 pmichaud same here :)
15:16 [particle] i'm downloading kubuntu 10.04 now, i'm gonna try developing there
15:17 colomon moritz_: it's so weird actually knowing people on the channel IRL.  :)
15:17 colomon guess I'm going to have to try to make it to Europe one of these days.
15:17 pmichaud colomon: who are you calling weird?!?  ;-)
15:18 moritz_ colomon: right, i fealt the same after the Copenhagen Perl 6 hackathon with jnthn, masak, arnsholt, baest and others
15:18 masak it's good for morale to meet at least once a year :)
15:18 moritz_ indeed
15:18 masak makes it so much real.
15:19 cygx ash_: I did some web-development as well, but not for several years and not in perl, so your help is appreciated
15:19 moritz_ also for the climate
15:19 pmichaud looks like we'll have a Pisa hackathon on Aug 3.
15:19 masak and for the in-jokes :)
15:19 moritz_ it feels so much easier to yell at somebody you've never seen
15:19 moritz_ pmichaud: that's great
15:19 colomon moritz_: :)
15:19 cygx ash_: I'd like to give developing the frontend a shot, but I'll need some time to familiarize myself with perl; I'll remember to start bugging you when think start going wrong ,)
15:19 masak moritz_: or, flip-wise, it's harder to be empathic with someone you haven't.
15:20 moritz_ masak: right
15:20 masak s/\./seen./
15:20 cygx *think --> things ups ;)
15:20 * [particle] has to make a yapc::eu some day
15:21 moritz_ [particle]: where some day == Aug 2nd 2010 :-)
15:21 [particle] ah, if only....
15:22 pmichaud we should probably plan for a Rakudo Star BOF on Aug 4, too.
15:22 ash_ cygx: alright, if your going to do the front end with javascript, for an interactive terminal, i'd suggest jquery, it will make your life a lot easier
15:22 moritz_ pmichaud: +1
15:23 moritz_ http://www.perlmonks.org/?node_id=846326 I wonder how much of that is YAPC::NA inspired :-)
15:23 colomon I was just explaining to pmichaud and TimToady that I'm taking one more vacation on my own next month, and then I figure I don't get to go anywhere without my family for at least 11 months.
15:24 * masak likes that pmichaud++'s talk "Rakudo Star -- A usable Perl 6 release" is filed under the "Core Perl" track
15:25 patch joined #perl6
15:26 * cxreg was poking around trying to make FakeDBD::Pg.  even if someone else does it first it's fun
15:26 kensanata joined #perl6
15:27 moritz_ cxreg: which route are you going? direct NCI, or use parrot's existing bindings?
15:28 moritz_ cxreg: if you have a github account (or create one), I'm sure we can arrange commit access to FakeDBI for you
15:29 moritz_ hugme: list projects
15:29 hugme moritz_: I know about Math-Model, Math-RungeKutta, book, fakedbi, gge, hugme, ilbot, json, november, nqp-rx, nqpbook, perl6-examples, perl6-wtop, process-cmd-args, proto, pugs, rmp, star, svg-matchdumper, svg-plot, tardis, temporal-flux-perl6syn, try.rakudo.org, tufte, web, yapsi
15:29 moritz_ yes, fakedbi is in there
15:33 cygx ash_: I'll do the server-side part of the frontend first; until that's done, the client-side code currently in the repository should be sufficient
15:34 cygx ash_: once the client-server communication has be worked out, switching to a Jquery solution might be a good idea to add some 'polish'
15:34 cxreg moritz_: NCI for now, i havent looked at parrot's bindings
15:35 moritz_ cxreg: if you're interested, here are the tests for them: https://svn.parrot.org/parrot/trunk/t/library/pg.t
15:38 ash_ cygx: have you thought about doing it in perl6? (just curious)
15:42 cygx ash_: I have, but I think the first iteration should stay in perl5
15:43 mberends that epic tennis match has resumed at Wimbledon
15:43 moritz_ mberends: continuation based tennis match :-)
15:43 moritz_ I guess it'll be over rather quickly
15:43 mberends lol
15:44 mberends 11 hours, 68-68 in the final set
15:44 masak wow.
15:44 ash_ an 11 hour tennis match? o.0 thats crazy...
15:45 cygx ash_: the codebase shouldn't become too large and is fairly modular, so migrattion to p6 is definitely an option
15:45 moritz_ my experience from table tennis is that if long-time tied games are interrupted for longer, they are usually decided pretty quickly after the interruption
15:45 * jnthn is watching Slovakia trying to hold on to a lead over Italy
15:45 jnthn That'd be a lovely upset. :-)
15:46 moritz_ indeed
15:46 moritz_ beating the world champion
15:46 ash_ cygx: i was thinking it might nice to see if rakudo was up to the task more to find out where its not up to the task so we can fix it :P
15:46 ash_ real world examples of rakudo are always good test cases
15:46 colomon the problem with work is        std::cout << "got here" << endl;   instead of say "got here";
15:46 colomon examples++
15:46 colomon $work, I mean.
15:47 moritz_ ash_: It's pretty obvious to me that rakudo has many weaknesses in the areas of IO and IPC
15:47 moritz_ ash_: I don't know if a real-life example is really needed to prove that
15:47 moritz_ jnthn: your time to say \o/ :-)
15:48 moritz_ *turn
15:49 ash_ yeah, but you could do most of the interactive console without IPC (i think) and the IO issues don't seem like a show stopper, it would have to have a slightly different design that doesn't involve threads, but i think it could work
15:49 moritz_ I don't think the current design involves threads... or does it? if so, where?
15:50 ash_ blocking io causes a second thread in the strategy cygx described
15:51 cygx moritz_: the controller has to listen to both the frontent and rakudo
15:51 cygx *frontend
15:51 moritz_ cygx: I'd prefer async IO over threads there, but in the end it's the implementor's choice
15:52 TimToady std: #`〝 comment 〞
15:52 p6eval std 31422: OUTPUT«Use of uninitialized value in vec at CursorBase.pm line 548.␤ok 00:01 108m␤»
15:52 TimToady sorear: ^^
15:52 cygx moritz_: async io is fine with me; the current design still has some 'issues' anyway
15:52 colomon TDD works much better if your tests are correct...
15:52 colomon wait!  I need tests for the tests!
15:52 moritz_ colomon: :-)
15:52 TimToady sorear: I'll let you fix that one, since it's in the guts of the DFA
15:53 * moritz_ calls it a day
15:54 colomon oh wait, the test was correct, it's the code that's wrong.
15:55 pugssvn r31423 | lwall++ | [tryfile] find uniprops in .
15:55 ash_ who tests the tests?
15:55 ash_ :P
15:55 moritz_ and who tests the tests that test the tests?
15:55 colomon who tests the testman?
15:56 * moritz_ proposes a meta-circular testing scheme where the tests test themselves
15:56 colomon "1 of 1 tests succeeded"
15:56 colomon \o
15:56 colomon \o/
15:56 colomon see moritz_ -- $work!
15:56 pugssvn r31424 | lwall++ | [STDeco] remember $?LONGNAME of module; use that to form name of .syml file
15:56 pugssvn r31424 | (this fixes the bug where it puts Test::Util's .syml in the wrong dir)
16:01 justatheory joined #perl6
16:02 TimToady rakudo: say '␍'.ord
16:02 p6eval rakudo 7e3ddc: OUTPUT«9229␤»
16:02 TimToady darn
16:02 TimToady rakudo: say '␤'.ord
16:02 p6eval rakudo 7e3ddc: OUTPUT«10␤»
16:02 ash_ is that right?
16:03 colomon ash_: yes
16:03 ash_ i thought ␤ was a unicode newline
16:03 TimToady I was hoping p6eval would also translate ␍
16:03 colomon oh, I dunno.
16:03 ash_
16:04 ash_ oh is its p6eval thats translating it?
16:04 cdarroch joined #perl6
16:04 cdarroch joined #perl6
16:04 masak yes.
16:05 TimToady rakudo: say '
16:05 p6eval rakudo 7e3ddc: OUTPUT«===SORRY!===␤Confused at line 11, near "say '\x{16}"␤»
16:05 TimToady
16:05 jnthn moritz_: Yes, \o/ indeed! Not so sure that Sunday will give me anything to \o/ about though. ;-)
16:06 pugssvn r31425 | colomon++ | [t/spec] Fudge hyper.t to work in Rakudo again.
16:07 pmichaud jnthn: ping
16:07 ashleydev joined #perl6
16:07 jnthn pmichaud: pong
16:07 pmichaud are you aware of anything that is currently using WHENCE in master?
16:08 jnthn pmichaud: Some of the BUILD code may be (more)
16:08 jnthn pmichaud: However, we don't have a way to make WHENCEs yet
16:08 jnthn pmichaud: So we're not relying it even if it's there
16:08 pmichaud so I suspect it's not presently using it.
16:08 pmichaud okay, that's what I wanted to know.
16:08 jnthn *on it
16:08 jnthn Yeah, afaik you can just rip out whatever's there and do it how you like
16:08 pugssvn r31426 | colomon++ | [t/spec] Fudge zip.t to work in Rakudo again.
16:08 jnthn Without any adverse effects
16:09 pmichaud I may (temporarily) remove the BUILD code (that's the piece I was looking at)
16:09 jnthn pmichaud: Well, if you leave in the non-WHENCE bits, then yes
16:09 jnthn Should be fine.
16:09 pmichaud right, that's what I meant.
16:09 jnthn OK :-)
16:11 Ross joined #perl6
16:12 colomon rakudo: say ~(42, 24, * % * ... 0)
16:12 p6eval rakudo 7e3ddc: OUTPUT«42 24 18 6 0␤»
16:13 * cognominal go for a movie not taxing my brain before switching to full masak mode.
16:13 cognominal *goes
16:13 masak cognominal: enjoy!
16:14 colomon rakudo: say ~(42, 24, * % * ... 0)[*-2]
16:14 p6eval rakudo 7e3ddc: OUTPUT«6␤»
16:14 cognominal A-Team abeilt dubbed. French suburbia... :(    As it mattered for that kind of movie.
16:15 colomon rakudo: say ~(42, 23, * % * ... 0)[*-2]
16:15 p6eval rakudo 7e3ddc: OUTPUT«1␤»
16:15 colomon rakudo: say ~(42, 23, * % * ... 0)
16:15 p6eval rakudo 7e3ddc: OUTPUT«42 23 19 4 3 1 0␤»
16:15 colomon rakudo: say ~(42, 1, * % * ... 0)
16:15 p6eval rakudo 7e3ddc: OUTPUT«42 1 0␤»
16:15 colomon I like.
16:16 kst joined #perl6
16:16 colomon http://www.perlmonks.org/?node_id=772778
16:17 cognominal Anyway I think I have found my problem
16:18 cognominal > my $tree = $_=["01"]; my @path=[0,1];  for  @path.kv -> $i, $offset { when Array { die "offset $offset at position $i in path {@path.perl} for tree {$tree.perl} too large" if $offset >= +@($_); $_ =  $_[$offset] ;  }}
16:18 pugssvn r31427 | colomon++ | [t/spec] Refudge for Rakudo, and add a couple of tests which are variants on failing tests.
16:18 cognominal offset 0 1 at position 0 in path [[0, 1]] for tree ["01"] too large
16:18 TimToady sorear: also, the lexer doesn't seem to count ^M as whitespace
16:18 cognominal it seems that rakudo does not like $_ changed in a when. Needs to golf it further.
16:19 colomon rakudo: say ~(24, 42, * % * ... 0)
16:19 p6eval rakudo 7e3ddc: OUTPUT«24 42 24 18 6 0␤»
16:19 cognominal don't know it is a bug or a misuse.
16:19 cognominal afk&
16:19 colomon rakudo: say ~(1, 42, * % * ... 0)
16:19 p6eval rakudo 7e3ddc: OUTPUT«1 42 1 0␤»
16:20 colomon moritz_++
16:23 masak swimming &
16:26 colomon rakudo: (1, 1/2, 1/4, ... 0).[^5].map({.perl}).join(', ').say
16:26 p6eval rakudo 7e3ddc:  ( no output )
16:27 Ross joined #perl6
16:28 colomon rakudo: (1, 1/2, 1/4, ... 0).[^5].say
16:28 p6eval rakudo 7e3ddc:  ( no output )
16:28 colomon rakudo: (1, 1/2, 1/4 ... 0).[^5].say
16:28 p6eval rakudo 7e3ddc: OUTPUT«10.50.250.1250.0625␤»
16:29 pmichaud jnthn: ping
16:30 colomon std: (1, 1/2, 1/4, ... 0)
16:30 p6eval std 31422: OUTPUT«ok 00:01 110m␤»
16:33 colomon rakudo: (1, { 1 / ((1 / $_) + 1) } ... 0).[^5]
16:33 p6eval rakudo 7e3ddc:  ( no output )
16:33 * moritz_ doesn't know how he deserved colomon's last ++
16:34 colomon perlmonks link above.
16:35 colomon appears you came up with (42, 24, * % * ... 0)[-2] for finding the GCD
16:35 colomon TimToady just impressed Damian with it.  :)
16:36 colomon [*-2], I mean.
16:36 PerlJam colomon++  that's cool
16:37 moritz_ colomon: ah, very old stuff
16:37 colomon but still very worth a ++ for you.  :)
16:38 gbacon joined #perl6
16:40 ash_ std: my @a = 1; say @a[-1];
16:40 p6eval std 31427: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of [-1] subscript to access final element; in Perl 6 please use [*-1] at /tmp/cwFRpYMiJz line 1:␤------> [32mmy @a = 1; say @a[-1][33m⏏[31m;[0m␤Parse failed␤FAILED 00:01 114m␤»
16:42 jnthn pmichaud: pong
16:43 pmichaud jnthn: I have some questions about 'is copy'
16:43 pmichaud jnthn: when doing something like   sub abc(@foo is copy) { ... }
16:44 pmichaud currently we create an ObjectRef to point to the cloned array.  Any particular need/reason for the ObjectRef, as opposed to binding the array directly?
16:46 jnthn pmichaud: It may well date back to a pervious model of doing things.
16:46 jnthn er, previous
16:47 jnthn pmichaud: oh
16:47 jnthn Maybe constraints
16:47 jnthn But...no probably not.
16:47 jnthn pmichaud: I'd say make it look how things in the lexpad normally look for arrays.
16:48 jnthn So if that involves getting rid of the ObjectRef that's probably fine.
16:48 TimToady rakudo: say ~(1,3,5...3)
16:48 p6eval rakudo 7e3ddc:  ( no output )
16:50 TimToady S03:1937
16:51 Chillance joined #perl6
16:53 pmichaud jnthn: okay, and it's okay if I make the scalar "is copy" look like a scalar would?  ;-)
16:53 jnthn erm
16:53 jnthn Probably
16:53 jnthn The test suite will call you on it if not. ;-)
16:54 jnthn Or masak. ;-)
16:54 pugssvn r31428 | lwall++ | [STD] worry about extra comma before series operator
16:54 moritz_ TimToady++ # that's something I often got wrong
16:55 jnthn pmichaud: I think there's some ticket about is copy and hashes also.
16:55 pmichaud jnthn: okay.
16:55 jnthn Or something along those lines
16:55 pmichaud I'm likely to refactor that a bit (nothing huge)
16:55 jnthn I suspect the whole is copy thing is out of date with regard to current state.
16:56 pmichaud right
16:56 jnthn I haven't updated it at all
16:56 jnthn So unless you did, it'll be out of date.
16:56 pmichaud and since I'm cleaning up variables, whence, etc.
16:56 pmichaud it seems like a good time to address
16:56 jnthn Aye, go for it.
16:56 jnthn Should be easy enough.
16:57 colomon rakudo: say ~(1, 1, -> *@a { [+] @a } ... 20000)
16:57 p6eval rakudo 7e3ddc: OUTPUT«1 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384␤»
16:58 tomdbs98 joined #perl6
16:58 colomon TimToady: see?  ;)
17:00 macdaddy joined #perl6
17:00 moritz_ now that's evil stuff!
17:03 Ross joined #perl6
17:05 colomon rakudo: say ~(1, -1/2, 1/4 ... 0).[^5]
17:05 p6eval rakudo 7e3ddc: OUTPUT«1 -0.5 0.25 Any() Any()␤»
17:06 TimToady rakudo: say ~(2,3,5 ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100)
17:06 p6eval rakudo 7e3ddc: OUTPUT«===SORRY!===␤Confused at line 11, near "say ~(2,3,"␤»
17:06 [Coke] joined #perl6
17:06 colomon rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100)
17:06 TimToady : say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n } } ... 100)
17:06 p6eval rakudo 7e3ddc: OUTPUT«Divide by zero␤  in 'infix:</>' at line 3580:CORE.setting␤  in 'infix:</>' at line 3245:CORE.setting␤  in 'infix:<%>' at line 3250:CORE.setting␤  in 'negate' at line 1␤  in <anon> at line 1␤  in 'Any::join' at line 718:CORE.setting␤  in 'List::Str' at line 2373:CORE.setting␤
17:06 p6eval ..in ma…
17:09 TimToady : say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 100)
17:09 pugssvn r31429 | colomon++ | [t/spec] Fix typos, refudge for Rakudo.
17:10 TimToady rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 100)
17:10 p6eval rakudo 7e3ddc:  ( no output )
17:10 TimToady rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n !% any(@a) { ++$n }; $n } ... 50)
17:10 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50␤»
17:11 TimToady rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1]; repeat while $n % any(@a) { ++$n }; $n } ... 50)
17:11 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 30␤»
17:12 xuser joined #perl6
17:12 PerlJam TimToady: don't you want an $n++ before the while loop?
17:12 TimToady rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while $n !% any(@a); $n } ... 50)
17:12 PerlJam or that.
17:12 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49␤»
17:13 TimToady PerlJam: it's a repeat, so it's supposed to do the ++$n first
17:15 colomon rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while [||] ($n <<!%<< @a); $n } ... 50)
17:15 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:15 colomon rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while [||] ($n <<!%<< @a); $n } ... 100)
17:15 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97␤»
17:16 colomon rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n += 2 while [||] ($n <<!%<< @a); $n } ... 100)
17:16 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97␤»
17:16 TimToady rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n++ while $n !% all(@a); $n } ... 50)
17:17 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:19 moritz_ rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a); $n } ... 50)
17:19 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:19 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a); $n } ... 50)
17:19 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:19 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt(@a)); $n } ... 50)
17:19 pyrimidine joined #perl6
17:20 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 23 25 29 31 35 37 41 43 47 49␤»
17:20 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt(@a[*-1])); $n } ... 50)
17:20 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 17 19 23 25 29 31 37 41 43 47 49␤»
17:21 moritz_ sqrt(@) is probably a dangerous assumptioin
17:21 pmichaud moritz_: yes
17:21 moritz_ but I don't know enough number theory to prove it :-)
17:21 pmichaud it is dangerous :)
17:21 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * < sqrt($n)); $n } ... 50)
17:21 p6eval rakudo 7e3ddc: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤»
17:22 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * < sqrt($n))); $n } ... 50)
17:22 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 17 19 23 25 29 31 37 41 43 47 49␤»
17:22 pmichaud rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(@a.grep( * <= sqrt($n))); $n } ... 50)
17:23 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:23 * jnthn afk for a while, noms and beers
17:25 moritz_ who did the md5 implementation via parrot recently? cosimo? or cognominal? (just remember it was a ^co guy :-)
17:25 moritz_ ah, cosimo++
17:26 moritz_ just found it on github
17:26 stepnem joined #perl6
17:30 xuser left #perl6
17:35 patrickas joined #perl6
17:37 perlygatekeeper joined #perl6
17:39 sorear good morning #perl6
17:40 moritz_ oh hai sorear
17:41 patrickas good evening #perl6
17:41 patrickas :-)
17:41 moritz_ hi patrickas
17:43 pugssvn r31430 | moritz++ | [docs/feather] remove some outdated links
17:43 patrickas hello moritz_ what's new in perl6land ?
17:43 moritz_ patrickas: lots of people have fun at YAPC::NA
17:44 patrickas so I heard :-) and YAPC::EU is getting close too !
17:44 moritz_ patrickas: I've tried to play with the new PAST optimization framework - but no luck so far :/
17:45 moritz_ found two bugs in a row
17:45 patrickas :-)
17:45 patrickas speaking of optimizations
17:45 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2..sqrt($n)); $n } ... 50);
17:45 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
17:46 pugssvn r31431 | moritz++ | [docs/feather] remove another broken link
17:46 patrickas seems to be strangly faster than pmichaud's (using @a.grep( * <= sqrt($n)) ) ... I suppose grep is really not optimized for such tasks
17:47 patrickas maybe for big enough numbers the grepped version may be faster again
17:47 moritz_ yes, might be different
17:50 PerlJam patrickas: pm's version does O(N) sub calls per iteration, whereas 2..sqrt($n) does not
17:50 patrickas PerlJam I don't think so ...
17:50 moritz_ PerlJam: define N :-)
17:51 PerlJam N==+@a
17:51 patrickas pmichaud's version is cleaning all items form @a that are bigger than sqrt($n) before working on them
17:52 patrickas so effectively it is O(sqrt(n)) too ... it is just the grep that is adding a small constant tot he time
17:55 PerlJam patrickas: The only difference between the two is one has 2..sqrt($n) and the other has @a.grep(* <= sqrt($n)), right?
17:55 patrickas right
17:57 moritz_ the real interesting question is how big  sqrt($n) is in comparison to @a
17:57 moritz_ and how that changes for later values in the sequence
17:57 TimToady you could use 2,(3,5...sqrt($n)) to at least avoid dividing all the even numbers
17:59 PerlJam moritz_: yeah, at some point the calls to the anonymous sub (and possibly the recomputation of sqrt($n)) in the grep version will no longer swamp the time it takes to generate 2..sqrt($n)
18:02 patrickas TimToady: I must me missing something :-(
18:02 patrickas raudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 50); #Is that what you mean ?
18:02 TimToady yes
18:02 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 50);
18:03 p6eval rakudo 7e3ddc:  ( no output )
18:03 patrickas it is taking so much time I have not been able to calculate it for n = 10 yet :-)
18:03 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 5);
18:03 p6eval rakudo 7e3ddc: OUTPUT«2 3 5␤»
18:03 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 10);
18:04 p6eval rakudo 7e3ddc:  ( no output )
18:04 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...sqrt($n))); $n } ... 7);
18:04 p6eval rakudo 7e3ddc:  ( no output )
18:04 PerlJam throw in a little memoization and it should get much quicker :)
18:05 TimToady only if hashing two arguments and looking them up is faster than a simple modulus
18:07 patrickas It's shocking that the ... operator is so slow! or is it something else I am not getting ?
18:08 pmichaud it's not ... that is slow here, it's  all() and *@a  and stuff like that.
18:08 moritz_ patrickas: I guess it's because ... has to handle so many different cases
18:09 patrickas pmichaud: but the only difference bwteen TimToady's version and mine is that his uses ... to get the odd numbers while mine uses .. to get them all
18:09 patrickas moritz_: Yes of course it should be slower but I would have expected some kind of a constant factor
18:10 patrickas it times out while coputing the primes less smaller than  7 ... I would say there is a bug
18:10 PerlJam patrickas: you don't know that it's not a constant  :)
18:10 patrickas maybe the ... is never termination ? because the end of the range is a real ?
18:10 PerlJam (a really big constant)
18:12 PerlJam I presume that all(2,3,5...sqrt($n)) forces the complete evaluation of the sequence?
18:12 PerlJam er, with the proper syntax
18:13 pugssvn r31432 | sorear++ | [Cursor] Re-special-case \r in \h; Perl/Blank doesn't cover it after all
18:13 TimToady rakudo: say ~(2,3,5...50)
18:13 p6eval rakudo 7e3ddc: OUTPUT«Unable to figure out pattern of series␤  in main program body at line 1␤»
18:13 TimToady rakudo: say ~(2,(3,5...50))
18:13 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49␤»
18:13 TimToady that why the extra parens
18:14 patrickas hehhe got it
18:14 patrickas rakudo: say (2,(3,5...sqrt(5)));
18:14 p6eval rakudo 7e3ddc:
18:14 p6eval ..OUTPUT«235791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591611631651671691711731751771791811831851871891911931951971992012032052072092112132152172192212232…
18:14 PerlJam patrickas: nice
18:14 patrickas it is never terminating :-)
18:15 colomon known bug.
18:15 patrickas colomon now you tell me :-)
18:15 TimToady we were discussing it earlier :)
18:15 colomon :)
18:15 colomon I was hacking rather than IRCing.  :)
18:17 patrickas hehe colomon++ someone's gotta do the work
18:17 slavik wait ...
18:17 slavik rakudo: say 2**64
18:17 p6eval rakudo 7e3ddc: OUTPUT«1.84467440737096e+19␤»
18:17 slavik aww :(
18:17 patrickas and TimToady-- for suggesting an "optimization" using a known bug being discussed earlier and confusing me :-)
18:17 pugssvn r31433 | sorear++ | [Cursor] Unused Unicode blocks should be initialized to "", not undef
18:17 colomon slavik: I'm figuring on taking a stab at proper bigints after R*
18:17 sorear TimToady: both bugs you told me in scrollback are now fixed.
18:17 slavik colomon: I will buy you a beer
18:18 colomon sorear++
18:18 slavik or vodka
18:18 slavik vodka is better imo
18:18 rindolf joined #perl6
18:18 rindolf Hi all.
18:18 colomon I prefer scotch
18:18 colomon or cider
18:18 slavik eww
18:19 PerlJam patrickas: you can always do  3,5...sqrt($n).Int
18:20 sorear Hello rindolf
18:21 rindolf sorear: hi.
18:21 TimToady or .ceiling
18:21 colomon patrickas: 2, 3, 5 ... sqrt(50) should work fine, but if the end point is less than the last LHS value, you'll have trouble.
18:21 patrickas PerlJam TimToady nope :(
18:21 patrickas colomon you are right
18:22 PerlJam I guess .Int truncates
18:22 patrickas it's the fact that it is smaller than 5 not that it's a real
18:22 PerlJam ah
18:24 colomon sure, all Reals are well-ordered.  ;)
18:24 patrickas rakudo: say max(4,6);
18:24 PerlJam yeah, but that doesn't mean it wasn't the source of a bug  :)
18:24 p6eval rakudo 7e3ddc: OUTPUT«Unable to handle non-closure Ordering yet␤  in 'Any::max' at line 1362:CORE.setting␤  in 'max' at line 1560:CORE.setting␤  in main program body at line 11:/tmp/j0xtf8Q_mV␤»
18:25 colomon patrickas: you want
18:25 colomon rakudo: say [max] 4, 6;
18:25 colomon or
18:25 p6eval rakudo 7e3ddc: OUTPUT«6␤»
18:25 colomon rakudo: say 4 max 6
18:25 p6eval rakudo 7e3ddc: OUTPUT«6␤»
18:25 patrickas oh it's an operator!
18:25 TimToady $x max= $y
18:25 patrickas i wouldn't have guessed from the error message!
18:26 colomon the sub version of max wants a closure
18:26 sorear I think I'm going to add to Sprixel/VICIL something like FORTH's CODE
18:26 colomon FORTH!
18:27 sorear a routine declarator, with lower-than-Perl6-level code in it
18:27 colomon rakudo: say ([minmax] 2, 4, 5, 2, 3).perl
18:27 p6eval rakudo 7e3ddc: OUTPUT«2..5␤»
18:28 sorear this will make it possible to define the Scalar, Parcel, and Capture classes - they can't be defined in Perl 6 because the binder needs them
18:28 colomon rakudo: say ([minmax] 2, 4, 5, 2, 3).bounds.perl
18:28 p6eval rakudo 7e3ddc: OUTPUT«(2, 5)␤»
18:29 sorear thoughts?
18:30 patrickas rakudo: say ~(2,3,5, ->*@a { my $n = @a[*-1] + 2; $n+=2 while $n !% all(2,(3,5...(5 max sqrt($n)))); $n } ... 50); #So this seems to be fastest
18:30 p6eval rakudo 7e3ddc: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤»
18:30 patrickas BTW is there a Benchmark.pm6 yet ?
18:31 justatheory joined #perl6
18:31 PerlJam patrickas: I started http://github.com/perlpilot/benchmark
18:31 PerlJam patrickas: there may be others.
18:33 PerlJam It looks like the spec says to return Nil in the 3,5...4 case, but for the prime problem, it looks like returning 3,5 would be more useful.
18:35 colomon I think it's supposed to return just 3 for 3, 5 ... 4
18:35 colomon ?
18:35 colomon I'm sure I understand how 3, 5 would be more useful.  so you don't have to say 5 max sqrt?
18:36 PerlJam yes, I was just thinking that.
18:38 PerlJam rakudo: say 3,5...5 max sqrt(100);
18:38 p6eval rakudo 7e3ddc: OUTPUT«3579␤»
18:38 PerlJam interesting
18:39 colomon I think making the left hand the pattern and the right hand the limit works better.  so that 3, 5 ... 4 would be 3
18:39 PerlJam colomon: S03:1937ish says ''if a supplied limit value is on the "wrong" side of the first of those values, Nil is returned''
18:40 colomon "first"
18:40 colomon this is the second.
18:40 PerlJam ah, yes.
18:40 PerlJam I'm a little slow today
18:40 colomon no worries.
18:41 colomon and I just spent an hour discussing this stuff with pmichaud and TimToady, because the tests had changed and I was trying to figure out if they were still correct.
18:42 PerlJam if the LHS is a list, the series op only cares about the last 2 values in the list right?
18:46 PerlJam colomon: I mean ...  if 3,5...4 returns 3,  what should this do?  1,3,5,7,9...4
18:46 * PerlJam reads the spec
18:47 PerlJam oh, yes.  1,3 is what I would expect and that's what the spec says
18:48 PerlJam TimToady++
18:48 [particle] joined #perl6
18:48 colomon dunno if that works yet, mind you.
18:49 colomon rakudo: say 1, 3, 5, 7, 9 ... 4
18:49 p6eval rakudo 7e3ddc:
18:49 p6eval ..OUTPUT«135791113151719212325272931333537394143454749515355575961636567697173757779818385878991939597991011031051071091111131151171191211231251271291311331351371391411431451471491511531551571591611631651671691711731751771791811831851871891911931951971992012032052072092112132152172192212232…
18:49 patspam joined #perl6
18:49 PerlJam looks like not :)
18:49 colomon so my new decimal number code is 8x slower than the old code.
18:49 colomon guess it's still too slow to incorporate.
18:49 colomon must optimize....
18:50 slavik colomon: run it on top of ghc :P
18:51 PerlJam rakudo:  my @a = 13;  1,3...@a
18:52 p6eval rakudo 7e3ddc:  ( no output )
18:52 PerlJam rakudo:  my @a = 13;  say 1,3...@a
18:52 p6eval rakudo 7e3ddc: OUTPUT«135791113␤»
18:52 gbacon joined #perl6
18:52 moritz_ it runs up to 13?
18:52 moritz_ that's... kinda weird
18:57 PerlJam rakudo:  my @a = 1,3,5,7; my @b = 25..35;  say ~(@a..@b);
18:57 rtward_ joined #perl6
18:57 p6eval rakudo 7e3ddc:  ( no output )
18:58 PerlJam rakudo:  my @a = 1,3,5,7; my @b = 25..35;  say ~(@a...@b);
18:58 p6eval rakudo 7e3ddc: OUTPUT«1 3 5 7 9 11 13 15 17 19 21 23 25 26 27 28 29 30 31 32 33 34 35␤»
19:06 cono joined #perl6
19:07 diakopter shell out to perl
19:11 patrickas is 1,1...2 supposed to return Nil?
19:11 rtward joined #perl6
19:12 pmichaud patrickas: what would the increment be in that case?  I'm guessing it acts like an increment of zero.
19:12 colomon increment of zero, yes
19:12 moritz_ so infinite number of 1s?
19:13 patrickas currently it returns an infinite lis of 1
19:13 patrickas but
19:13 colomon moritz_: that's my understanding.
19:13 patrickas I could argue that 2 is on the wrong side :-)
19:13 patrickas "if a supplied limit value is on the "wrong" side of the first of those values, Nil is returned"
19:14 patrickas since both sides .succ and .prec are the wrong sides :-)
19:15 patrickas 1,1...1  would be an infinite list though
19:15 patrickas not a theoretical question .... I am asking to see if I should fix it or not :-)
19:15 colomon no, it would be just 1
19:16 araujo joined #perl6
19:16 Fozo joined #perl6
19:17 Ross joined #perl6
19:18 moritz_ does anybody want to do next week's challenge?
19:18 moritz_ I'm running out of ideas
19:18 pmichaud question:
19:18 pmichaud my $b = [1,2,3];  sub abc($x is copy) { $x[0] = 4; };   abc($b);
19:18 pmichaud does $b change?
19:18 moritz_ I fear it does
19:18 pmichaud my $b = [1,2,3];  sub abc($x is copy) { $x[0] = 4; };   abc($b);   say $b.perl;
19:19 pmichaud (I'm asking what the spec says should happen, not what rakudo currently implements)
19:19 moritz_ my answer was about what the spec says
19:19 moritz_ or how I think I understand the spec
19:20 meppl joined #perl6
19:20 patrickas colomon: which part of the spec is that? 1,1...1 is 1?
19:22 pmichaud (colomon just left)
19:23 PerlJam patrickas: "If any value in the series is C<eqv> to the limit value, the series terminates, including that final limit value."
19:24 PerlJam patrickas: S03:1812
19:24 patrickas PerlJam: Thanks
19:24 lue joined #perl6
19:24 lue Hello!
19:33 Fozo hmmmm
19:34 pugssvn r31434 | moritz++ | [feather/sccript] be more specific about where to find t/
19:34 Fozo HeLlO
19:34 moritz_ hi
19:39 tylerni6 joined #perl6
19:39 justatheory joined #perl6
19:43 pugssvn r31435 | moritz++ | [util] remove now unneeded logic from version_h.pl; replace it by somthing rather simple
19:58 pugssvn r31436 | moritz++ | [util] be more consistent with argument passing
20:00 moritz_ I'm currently trying to run the generation of syn documents under a different user name
20:00 moritz_ it's... not amusing
20:00 moritz_ info: 990 smartlinks found and 990 broken in 820 test files (227 test files had no links).
20:01 moritz_ so it seems to find not a single test file. Urks.
20:04 lue That's odd.
20:05 Psyche^ joined #perl6
20:08 whiteknight joined #perl6
20:08 pugssvn r31437 | moritz++ | [Text::SmartLinks] do not die when one file cannot be parsed
20:08 pugssvn r31437 |
20:08 pugssvn r31437 | Since the default is to recursively find all .pod and .pm files, it kinda
20:08 pugssvn r31437 | makes sense to only warn if one of them is invalid, instead of dying horribly
20:08 pugssvn r31437 | and dragging everything else down.
20:09 pugssvn r31438 | moritz++ | [Text::SmartLinks] moritz-- cannot write Perl 5 code anymore
20:10 moritz_ of course that doesn't fix the generation at all :(
20:13 TimToady std: 1,2,3, ... 10
20:13 p6eval std 31436: OUTPUT«Potential difficulties:␤  Comma found before apparent series operator; please remove comma (or put parens␤    around the ... listop, or use 'fail' instead of ...) at /tmp/sWXCl1l3VJ line 1:␤------> [32m1,2,3,[33m⏏[31m ... 10[0m␤ok 00:01 113m␤»
20:14 PerlJam TimToady++
20:15 nimiezko joined #perl6
20:16 moritz_ hum, the problem seems to be elsewhere
20:17 moritz_ it includes the .t files inline in the specs
20:17 moritz_ but still reports the smartlinks as broken
20:21 ashleydev joined #perl6
20:25 pugssvn r31439 | moritz++ | [feather/script] synopsis htmls are now generated by the perlcabal user
20:27 moritz_ if anybody notices some rendering errors, 404s or so on http://perlcabal.org/syn/, please ping me
20:34 pmichaud afk for a while # commuting
20:35 arnsholt moritz_: The most important one for me (S05) works at least, so I'm not complaining =)
20:37 patspam joined #perl6
20:37 sorear moritz_: I wonder how hard it would be to get all the perlcabal .pm6 files and fragments run through STD_hilite
20:37 sorear I debitrotted that with that in mind...
20:44 pugssvn r31440 | lwall++ | [STD] also collect $?LONGNAME on module Foo {} form, if first declaration
20:47 gbacon joined #perl6
20:49 pugssvn r31441 | lwall++ | [t/spec] fix CR on two test files, add svn props
20:55 pugssvn r31442 | lwall++ | [S03] qualify misleading assertion re 1,2,3...$n when $n < 3
20:56 spinclad joined #perl6
20:57 sorear TimToady: What are we up to on snaptests?
20:58 TimToady just running one right; should know in about 15 minutes, but I'm hoping for ~96%
20:58 TimToady *right now
21:08 pyrimidine left #perl6
21:09 sorear After my A $x; my B $y; $x := $y; what values can I legally assign to $x?  $y?
21:11 Guest23195 left #perl6
21:14 TimToady we're at 95.76% now
21:25 macdaddy joined #perl6
21:36 kensanata joined #perl6
21:44 Sanitoeter joined #perl6
21:45 lichtkind joined #perl6
21:45 lue afk
21:46 lichtkind greetings
21:53 lichtkind is  end of june still the rakudo target?
21:55 tylerni7 joined #perl6
21:56 ash_ which raukudo target?
21:57 lichtkind target date
21:57 lichtkind for star
21:59 ash_ to be released "by july 29"
21:59 ash_ http://rakudo.org/node/73
22:00 lichtkind thank you very much
22:06 cj joined #perl6
22:08 d4l3k_ joined #perl6
22:35 quietfanatic joined #perl6
22:35 TimToady quietfanatic: o/
22:35 quietfanatic hey
22:35 quietfanatic so I was wondering
22:35 quietfanatic rakudo: class A {has $.x = rand}; say A.new.x
22:35 p6eval rakudo 7e3ddc: OUTPUT«Could not find sub &rand␤  in <anon> at line 11:/tmp/rlUBmjp7Ec␤  in main program body at line 11:/tmp/rlUBmjp7Ec␤»
22:35 quietfanatic Why don't we have rand during build time?
22:35 Sanitoeter joined #perl6
22:36 TimToady beats me
22:36 TimToady rakudo: say rand
22:36 p6eval rakudo 7e3ddc: OUTPUT«0.692584724255966␤»
22:37 TimToady perhaps it's the same lexical scope problem in class blocks we've always had
22:37 TimToady if rand is in CORE
22:37 TimToady rakudo: my $a = 42; class A { has $.x = $a; }; say A.new.x
22:37 p6eval rakudo 7e3ddc: OUTPUT«Lexical '$a' not found␤  in <anon> at line 11:/tmp/XIEFY1zH5p␤  in main program body at line 11:/tmp/XIEFY1zH5p␤»
22:37 TimToady that one
22:37 quietfanatic ah, I see
22:38 quietfanatic There doesn't seem to be any workaround save for making a custom BUILD
22:38 TimToady rakudo: class A { has $.x = CORE::rand; }; say A.new.x
22:38 p6eval rakudo 7e3ddc: OUTPUT«Can not find sub CORE::rand␤  in <anon> at line 1␤  in main program body at line 11:/tmp/ZIawOLSCLn␤»
22:39 quietfanatic Or passing a parameter to new instead
22:40 TimToady rakudo: our sub foo { rand }; class A { has $.x = foo; }; say A.new.x
22:40 p6eval rakudo 7e3ddc: OUTPUT«0.70248685786234␤»
22:40 TimToady there's a workaround
22:40 pmichaud dhmmmmm
22:40 pmichaud I'm a little surprised that plain rand didn't work.
22:40 pmichaud yes, it's likely the same bug.  But this one is also more easily fixable.
22:40 quietfanatic I thought I tried that but I guess I didn't
22:53 Psyche^ joined #perl6
23:10 cxreg http://en.wikipedia.org/wiki/Guillemets#Programming_Languages
23:10 cxreg that's either wrong or outdated, right?
23:12 TimToady «» is more like shell quoting, but their example isn't exactly incorrrect
23:14 rv2733 joined #perl6
23:15 saaki joined #perl6
23:29 ash_ joined #perl6
23:50 rgrau_ joined #perl6
23:53 justatheory joined #perl6
23:55 Psyche^ joined #perl6
23:59 jrtayloriv joined #perl6

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

Perl 6 | Reference Documentation | Rakudo