Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-03-05

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:01 am0c joined #perl6
00:04 pugssvn r29937 | lwall++ | [S09] kill masak++'s @array[%100_000] in favor of a mapping closure
00:04 pugssvn r29937 | (The fact that % vars can't use _ is a different bug.)
00:04 lue \o/ to death (er, wait...)
00:05 eternaleye joined #perl6
00:06 pugssvn r29938 | lwall++ | [STD] allow _ in numeric variable names for masak++
00:06 lue (ooh, STD.pm got an update today)
00:12 * lue *chirp*
00:14 athenot joined #perl6
00:16 nihiliad joined #perl6
00:20 colomon lue: where are you on the file test operators?
00:20 lue haven't gotten to more of them yet (I should, shouldn't I?)
00:20 lue I need to learn a bunch of PIR for a lot of the file tests.
00:20 colomon Hey, it's -Ofun, do what you'd like.  :)
00:21 colomon don't forget that a lot of that might be a good candidate to rewrite in Perl 6 now.
00:21 lue yes. Should I use the unimplemented stat() ? :)
00:22 lue rakudo: say stat('/etc/passwd')
00:22 p6eval rakudo 37e574: OUTPUT«Could not find non-existent sub &stat␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
00:22 colomon Hmmm... what's the Perl 6 spec for stat look like?
00:22 lue I might rewrite it to P6 during the Jerry Lewis (er, Larry Wall) Hackathon.
00:23 colomon (or to put it a different way -- maybe the first thing to do is code up a stat as a Perl 6 function, then write the rest of the tests in terms of that.)
00:23 lue yes. Ideally, it returns all file test returns, but in a not-so-quick-to-discern-information way.
00:24 colomon hmmm... looks to me like stat might be under-specified.
00:25 colomon at least, you've got to wonder what a "stat buffer" looks like in p6.
00:25 colomon afk # need to get good night bottle ready for the boy
00:25 lue as most of the semi-fun stuff in P6 (suppose that's why it's NYI)
00:29 colomon Well, there's lots of fun stuff implemented.  But yeah, that seems like a big hole in the I/O spec.
00:29 colomon I mean, I can imagine what the stat structure looks like in C, but it really isn't obvious to me how to translate that to p6.
00:30 colomon The intent might really be a Buf object, and they're not well-spec'ed yet.
00:32 lue I don't feel like getting in the uncharted backwaters of the unfashionable end of the western spiral arm of the galaxy (er, P6) right now. :)
00:32 lue I'd rather work on something that's specced. :D
00:32 colomon makes sense to me.
00:35 athenot joined #perl6
00:36 colomon Did you do tests for the functions you already implemented?
00:37 ash_ joined #perl6
00:37 lue uploaded them last night.
00:38 colomon what files are they?
00:38 colomon test files, I mean?
00:38 colomon never mind. :)
00:38 colomon file-tests.t I take it.
00:39 TimToady the one I fixed the parsefail in.  :)
00:40 lue ...parse fail!? (I didn't test the test file, amazingly)
00:40 TimToady I can hear MJD getting revved up in the back of my head...
00:40 colomon you used ' in a ' ' string, I'm guessing.
00:40 TimToady got it in one
00:40 colomon (I just looked at which lines changed.  :)
00:40 colomon MJD?
00:41 TimToady http://cpansearch.perl.org/src/PODMASTER/Acme-MJD-0.02/lib/Acme/MJD.pm
00:42 colomon He was my first guess, but...
00:42 colomon that's quite the module.
00:43 TimToady in particular, the DATA section :)
00:43 colomon Bad programmer!  No cookie!
00:43 TimToady though, interestingly, the word "test" does not occur
00:44 colomon If you have `some weird error', the problem is probably with your frobnitzer.
00:44 colomon I think Rakudo may have a hyper-frobnitzer.
00:47 colomon do {eval deflect $thought; exit} unless opaque $thought and not deep $thought;
00:50 colomon rakudo: say '/etc/passwd'.e
00:50 p6eval rakudo 37e574: OUTPUT«1␤»
00:50 colomon rakudo
00:50 colomon rakudo: say '/etc/passwd' ~~ :e
00:50 p6eval rakudo 37e574: OUTPUT«1␤»
00:51 lue when does the hackathon start? Is there a specific date/time, or is it whosever Saturday comes first?
00:51 lue rakudo: say '/etc/xyzzy' ~~ :e
00:51 p6eval rakudo 37e574: OUTPUT«0␤»
00:51 colomon lue: it's actually at a physical location in Copenhagen.
00:51 colomon Of course, I don't know the schedule.  :)
00:51 lue I can't come then :(
00:52 colomon with any luck, they will be on IRC too.
00:52 colomon I can't go either...
00:52 japhb Tene: any luck restoring 'use OpenGL:from<parrot>;' ?
00:52 Tene japhb: I haven't worked on it yet.
00:53 japhb Darn.
00:53 colomon rakudo: say '/etc/passwd'.e.WHAT
00:53 p6eval rakudo 37e574: OUTPUT«Bool()␤»
00:53 TimToady -Ofunyet
00:54 payload joined #perl6
00:55 TimToady I think the most appropriate quote this time is: You know, this sort of thing is amenable to experimental observation.
00:56 colomon :)
00:56 colomon lue: we need to work on your tests some.  :D
00:56 lue "If it ain't broke, it will be"
00:56 lisppaste3 colomon pasted "file-test.t results" at http://paste.lisp.org/display/95944
00:57 lue colomon: what are you saying? Are you saying Bool is wrong? (that's fine. I got * :P )
00:57 colomon No, I'm cool with Bool.  I was going to suggest we add tests to make sure it returns Bool, actually.
00:57 colomon but then I discovered the current tests still fail hard, so we probably ought to fix that first.
00:58 colomon :)
00:58 lue (I looked at alpha code for help, that may be the / of it all...)
00:58 colomon Oh, I think maybe it's looking the root directory for the files rather than the t/spec/S32-io directory.
00:59 colomon give me a moment, I think I saw something like that in another test file...
00:59 lue ah, so prefix a ./ then :)
00:59 lue (not a /. like slashdot would have you believe :) )
01:00 colomon no, what I'm saying is when you run the test suite, it runs from the rakudo directory, so ./ won't help.
01:00 yinyin joined #perl6
01:01 TimToady .oO(/ fiction)
01:01 colomon well, hmmm.... slurp.t specifically uses t/spec/S16-unfiled/slurp.t for its test.  That seems reasonable.
01:01 colomon I mean, just adding a full path.
01:02 lue ...relative to the location of rakudo :)
01:02 colomon right.
01:02 colomon maybe something like $path = 't/spec/S32-io/'
01:02 colomon and then $existing-file = $path ~ "pi.txt"
01:02 colomon etc.
01:02 TimToady something bothers me about these kinda-absolute paths
01:02 colomon that would make it easy to change the tests if the filenames need to change.
01:03 TimToady you'd think tests should be self-contained
01:03 colomon well, that's the other way to do it -- write out the files and then delete them when the test is done.
01:05 lue but then you'd be dependant on equally low-specced P6 coding :)
01:05 colomon Ah, I think S16-filehandles/io_in_for_loops.t was the example I was thinking of.
01:06 colomon It first writes the file, then does a bunch of tests on it, then deletes it.
01:08 * colomon is having a hard time resisting giving an inspirational speed about how important the test suite is.
01:09 * lue is going to install Infocom IF games (hey, you talked about the frobnitzer)
01:09 colomon *speech
01:11 TimToady MJD: I think you are asking the wrong question here.
01:11 colomon lue: if you're not careful, I'll start reworking your test file while you are not around.  ;)
01:11 lue ah well, I don't care (too much) it's only 20 lines :)
01:13 TimToady MJD: A good approach to that problem would be to hire a computer programmer.
01:14 lue rakudo: say..3i:`180."hello"@! #MJD told me this was OK
01:14 p6eval rakudo 37e574: OUTPUT«Confused at line 11, near "say..3i:`1"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
01:14 lue #or maybe he said it wasnt...
01:14 TimToady MJD: So you threw in some random punctuation for no particular reason, and then you didn't get the result you expected.  Hmmmm.
01:17 TimToady afk & # done channeling MJD for now
01:18 lue where is my floppy device again?
01:20 payload left #perl6
01:21 lue It was in /dev, but ever since the move, I can't find it (not even in /usr/include :) )
01:23 colomon wait, you actually still have a floppy device?
01:23 lue a portable USB floppy drive, mind you.
01:23 * colomon isn't going to mention the Commodore 64 floppy drives he currently has in the storage unit...
01:24 lue Although, considering this is a PowerBook G3 Pismo, I could swap my CD drive for a floppy drive if I found one for the Pismo :)
01:25 lue I can also have two batteries, two CD drives, a battery + zip drive, etc. Look up the PowerBook G3 Pismo for details.
01:32 athenot joined #perl6
01:35 * lue ought to join #KDE
01:35 * lue to ask about floppies :D
01:39 lue me &
01:57 colomon http://justrakudoit.wordpress.com/2010/03/05/further-thoughts-on-real/
02:07 pugssvn r29939 | colomon++ | [t/spec] Rewrite to create test files on the file rather than picking them from the spectest directory tree.
02:12 colomon http://chadaustin.me/2010/03/your-version-control-and-build-systems-dont-scale-introducing-ibb/
02:12 colomon (the last mentions masak++!)
02:13 jaldhar_ joined #perl6
02:14 Apocal joined #perl6
02:16 Lorn joined #perl6
02:29 dalek rakudo: 2d9808d | (Solomon Foster)++ | t/spectest.data:
02:29 kfo joined #perl6
02:29 dalek rakudo: Turn on S32-io/file-tests.t.
02:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2d9808d19ba45c09f61a4c6fc4b4b7159ea760cc
02:29 colomon rakudo: my %h = {}; say %h.WHAT
02:29 p6eval rakudo 37e574: OUTPUT«Hash()␤»
02:30 colomon rakudo: my %h = {}; say PARROT(%h)
02:30 p6eval rakudo 37e574: OUTPUT«␤»
02:30 colomon rakudo: my $h = {}; say $h.WHAT
02:30 p6eval rakudo 37e574: OUTPUT«Hash()␤»
02:31 colomon rakudo: class Foo { has %.bar; }; my $f = Foo.new; say $f.bar.WHAT
02:31 p6eval rakudo 37e574: OUTPUT«Method 'WHAT' not found for invocant of class 'Hash'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
02:31 colomon where's masak++ when you need him?
02:33 colomon Hmmm, looks like maybe hash attributes do not get properly initialized?  If I skip that test the next test blows up as well...
02:39 snarkyboojum colomon: that ibb post looks pretty kick arse
02:39 colomon snarkyboojum: I couldn't decide if it was brilliant or insane.  But it certainly is interesting.  :)
02:39 snarkyboojum the end result seems great :)
02:41 alester joined #perl6
02:41 jaldhar_ joined #perl6
02:41 snarkyboojum and masak++'s addictive tdd harness certainly is that
02:42 colomon snarkyboojum: my worry is that my common case here doesn't match what he's talking about at all.
02:42 snarkyboojum yeah
02:42 snarkyboojum colomon: he's interested in super massive builds
02:42 snarkyboojum colomon: optimising for a rare use case?
02:43 colomon Sure, but it seems like his common case is the real compile doesn't take very long, but looking over the tree takes forever.
02:43 colomon yeah, exactly.  at least from my perspective that looks rare.
02:43 colomon I mean, everything I build, a no-op build takes a second or two.
02:43 colomon a real build generally takes one to ten minutes.
02:43 snarkyboojum yeah
02:44 colomon seems like his system would be firing off slow builds all the time for me, in the name of saving me a second or two on the fast build.  :)
02:45 snarkyboojum colomon: slow builds, as in "normal build time"?
02:45 colomon but maybe I just need to get involved with much larger projects to properly approach it.  :)
02:45 colomon snarkyboojum: yes.
02:45 snarkyboojum colomon: aye
02:46 colomon from the comments at hacker news, it seems like the author might be trying to use a fairly slow computer to do huge builds.
02:47 colomon still, it's a cool idea, no doubt.
02:47 athenot joined #perl6
02:58 test joined #perl6
03:00 Guest50393 left #perl6
03:00 diakopter hi from droid
03:01 diakopter oo fun
03:01 diakopter stressfuzz rakudo while driving on gthe 101
03:03 lue hello!
03:04 TimToady .oO(Q: What's worse than texting while driving?  A: Texting while diakoptering.)
03:05 lue Ooh! Almost died (was I diakoptering? Huh.)
03:07 lue .oO(Q: What's worse than texting while driving? A: Texting while coding)
03:07 TimToady .oO(Q: What's worse than texting while driving?  A: Testing while driving.)
03:08 lue .oO(Q: What's worse than testing while driving? A: Driving while testing)
03:09 nihiliad joined #perl6
03:11 lue .oO(I'm going to be alluding the Jerry Lewis MDA telethon throughout the entire hackathon...\o/ )
03:17 diakopter hi from ER
03:17 diakopter kidding
03:18 lue how did you get to be a guest star? The show's over!
03:24 diakopter usually I use Esc-windownumber but I don't know how to type Esc on droid
03:26 lue You hold [Shift], press [E], release [Shift], press [s], and press [c] :D
03:39 * lue --homework &
03:40 snarkyboojum joined #perl6
03:42 cotto joined #perl6
03:51 Tene diakopter: I know that on both the phones I do ssh on, pressing some modifier button twice does it.
03:51 Tene once for ctrl, second time makes it into esc
04:15 tuxdna joined #perl6
04:32 akl joined #perl6
04:32 akl joined #perl6
04:57 gfx joined #perl6
05:02 athenot joined #perl6
05:14 sjohnson joined #perl6
05:28 kfo joined #perl6
05:33 lue hello! for the third time!
05:35 dns joined #perl6
05:41 eternaleye joined #perl6
05:55 hercynium joined #perl6
06:03 petdance joined #perl6
06:05 diakopter Tene: thanks! worked.
06:06 diakopter now, if only tab-completion worked ;)
06:06 diakopter o wait!
06:07 lue hello o/
06:17 ihrd joined #perl6
06:17 ihrd left #perl6
06:24 cotto joined #perl6
06:54 kaare joined #perl6
06:56 vamped joined #perl6
06:57 vamped hallo hallo Perl6
07:12 colomon_ joined #perl6
07:13 colomon_ joined #perl6
07:21 a1 joined #perl6
07:22 a1 Hello.
07:22 a1 I have a progblem with perl6 I downloaded
07:22 a1 from here
07:22 a1 http://sourceforge.net/projects/parrotwin32/files/
07:23 a1 It dies with "load_bytecode" couldn't find file 'P6Regex.pbc' if running from other derive than C:
07:23 a1 drive*
07:32 Sarten-X joined #perl6
07:35 Trashlord hey Sarten-X
07:36 Sarten-X g'morning
07:47 Su-Shee joined #perl6
07:48 Su-Shee good morning
07:48 Trashlord good morning
07:50 a1 left #perl6
08:09 iblechbot joined #perl6
08:22 spinclad masak (, lichtkind): drive-by comment:  s/we human/us humans/ ?!  as in 'us can optimize ...'?  one might use that for humor, or someone's actual spoken usage, but as -Ogrammar... no.
08:26 riffraff joined #perl6
08:31 Toony joined #perl6
08:37 stepnem joined #perl6
08:54 moritz_ good morning
08:54 phenny moritz_: 04 Mar 09:56Z <jnthn_and_mberen> tell moritz_ take a look at http://gist.github.com/321596
08:55 moritz_ curious nick :-)
08:55 m-locks :)
08:55 m-locks moritz_: i like your little perl6 tutorial, i'm about to do a little translation
08:55 m-locks i guess the german one is more comprehensive
09:01 uniejo joined #perl6
09:03 moritz_ m-locks: which one are you talking about? I've written several :-)
09:03 m-locks oh
09:03 m-locks the one in a wiki that's in german
09:04 * moritz_ confused
09:04 m-locks http://wiki.perl-community.de/Wissensbasis/Perl6TafelVorwort
09:05 m-locks i've also read your perl5 to perl6 collection of blogposts, it was really nice
09:05 moritz_ m-locks: the wiki one is from lichtkind, not from me
09:05 m-locks oh sorry
09:05 moritz_ no problem :-)
09:06 m-locks well anyway i would like to get all those references
09:06 m-locks links and such
09:06 m-locks for newbies, cos i'm a newbie myself
09:08 dakkar joined #perl6
09:12 payload joined #perl6
09:22 jnthn o/
09:22 phenny jnthn: 04 Mar 23:41Z <pmichaud> tell jnthn  panel session sounds awesome.  Between today and tomorrow I'll put together a list of bullet points of things I wanted to get across/accomplish with my talk; I suspect you all can work those in (or use them as starting items for the talk) on Saturday
09:24 kfo joined #perl6
09:26 k23z__ joined #perl6
09:28 mikehh joined #perl6
09:38 baest I'm a bit curious about rt #54804, it basically says that calling rt54804( 1, , 3, ) would die of parse error. If I use eval_dies_ok the test passes, but putting in the sub and calling it manually I don't get an exception and it returns a string
09:38 baest otherwise it seems that ticket is closable
09:39 jnthn The eval maybe lies.
09:41 mikehh joined #perl6
09:41 baest jnthn: say eval 'rt54804( 1, , 3, )'; also returns a string and putting it into a try doesn't get anything. Is that something in Test.pm which acts up or current eval implementation?
09:47 mikehh joined #perl6
09:53 xinming joined #perl6
09:55 mikehh joined #perl6
10:02 mikehh joined #perl6
10:07 xinming joined #perl6
10:07 colomon o/
10:13 colomon rakudo: say '/etc/passwd'.e.WHAT
10:13 p6eval rakudo 2d9808: OUTPUT«Bool()␤»
10:13 colomon rakudo: say ('/etc/passwd' ~~ :e).WHAT
10:13 p6eval rakudo 2d9808: OUTPUT«Int()␤»
10:14 jnthn Curious.
10:15 xabbu42 joined #perl6
10:15 colomon BTW, I'm reckoning all the true/false file tests should return Bool, even though the spec is quiet on the question.  (well, or even slightly negative.)
10:16 jnthn I would think ~Bool too.
10:16 colomon It looks to me like the spec for file tests just hasn't kept up with the times.
10:18 * colomon always forgets he can change the spec, too....
10:18 colomon and then on the other hand...
10:18 jnthn You can alwAYS...YES, THAT. :-)
10:19 jnthn oops, caps fail
10:19 colomon rakudo: say '/etc/passwd'.s
10:19 p6eval rakudo 2d9808: OUTPUT«813␤»
10:19 colomon rakudo: say '/etc/passwd' ~~ :s
10:19 p6eval rakudo 2d9808: OUTPUT«1␤»
10:19 colomon bad ~~, bad!
10:20 jnthn d'oh!
10:22 pugssvn r29940 | colomon++ | [t/spec] Expand the file test tests to check for returned type and the ~~ forms of the tests as well, fudging as needed.
10:24 colomon speaking of strange bugs...
10:24 colomon rakudo: my $h = {}; say $h.WHAT
10:24 p6eval rakudo 2d9808: OUTPUT«Hash()␤»
10:24 colomon rakudo: class Foo { has %.bar; }; my $f = Foo.new; say $f.bar.WHAT
10:24 p6eval rakudo 2d9808: OUTPUT«Method 'WHAT' not found for invocant of class 'Hash'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
10:24 hejki :D
10:24 jnthn Epic Fail.
10:24 jnthn I know why.
10:24 colomon jnthn: I thought you might.  :)
10:24 jnthn CREATE musta not caught up with hash changes.
10:25 jnthn My Rakudo build on my Win7  alptop segfaults when starting the stage 1 compiler :-/
10:26 colomon :\
10:27 orafu joined #perl6
10:29 mathw :(
10:29 jnthn std: say for 1..10;
10:29 p6eval std 29940: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/TfXUg5qq69 line 1:␤------> [32msay[33m⏏[31m for 1..10;[0m␤ok 00:01 107m␤»
10:36 colomon jnthn: do you have any idea where the
10:36 colomon '/etc/passwd' ~~ :s
10:36 colomon is actually handled in the code?  I've just ack'd over it and I couldn't find a trace.
10:37 hejki in some of the builtins
10:37 jnthn colomon: Maybe see Pair.ACCEPTS
10:37 hejki colomon: in rakudo any-str.pir iirc
10:37 hejki depending which you mean :>
10:38 hejki the :s should be there at least :>
10:38 jnthn colomon: Or Enum.ACCEPTS (since Enum is immutable Pair)
10:38 hejki unless rakudo == ng nowadays
10:38 jnthn hejki: Yes, rakudo == ng :-)
10:38 hejki ahh
10:38 hejki then i have no clue :>
10:38 hejki i made the :s for the rakudo before ng
10:39 hejki but clearly things have changed drastically :>
10:39 colomon multi method ACCEPTS($topic) {
10:39 colomon my $meth_name = $.key;
10:39 colomon return (?$topic."$meth_name"()) === (?$.value);
10:39 colomon }
10:39 colomon is what you're talking about, jnthn ?
10:40 colomon oh, because :s is a pair, yes?
10:41 colomon If that's actually what's being called, then it seems like the === bit is the trouble.
10:41 colomon rakudo: say (:s).perl
10:41 p6eval rakudo 2d9808: OUTPUT«"s" => Bool::True␤»
10:43 colomon Hmmm, so 2 problems here:
10:43 colomon 1) === appears to be returning 0 / 1 rather than False / True
10:43 colomon 2) === Bool::True is completely inappropriate for the :s form.
10:44 jnthn colomon: Yes, I think you've hit the nail on the hed.
10:44 jnthn Ned to handle :!e
10:44 jnthn Thus why the code is a bit funky
10:44 jnthn But yes, won't work for :s :-/
10:45 colomon .sub '&infix:<===>' :multi(Integer,Integer)
10:45 colomon .param int a
10:45 colomon .param int b
10:45 colomon $I0 = iseq a, b
10:45 colomon .return ($I0)
10:45 colomon # .tailcall 'prefix:?'($I0)
10:45 colomon .end
10:46 colomon should I just ditch the return and uncomment the tailcall?
10:46 colomon or should I rewrite the whole thing as a pir::  ?
10:47 colomon rakudo: say pir::iseq__III(10,10)
10:47 p6eval rakudo 2d9808: OUTPUT«1␤»
10:48 colomon rakudo: say pir::iseq__III(10,9)
10:48 p6eval rakudo 2d9808: OUTPUT«0␤»
10:48 meppl joined #perl6
10:49 baest colomon: Str.pir is doing the tailcall, whereas Num and Int isn't
10:50 colomon I've just rewritten the entire function using the pir:: form, testing it now.  :)
10:53 jnthn Really odd...the segfault I get is only in producing or reading a PBC.
10:53 colomon yow!
10:53 colomon Method 'set_candidates' not found for invocant of class 'MultiSub'
10:53 colomon that's test.pm blowing up...
10:53 jnthn If you're going to move one === to the setting, you gotta move them all.
10:53 jnthn You can't mix Parrot multi subs and Perl 6 multis.
10:53 jnthn (for the same name)
10:54 colomon ah.
10:54 colomon maybe I'll just try turning on the tailcall first, then.
10:55 jnthn Change to &prefix:<?> too :-)
10:55 jnthn We mangle differently now.
10:56 colomon danke
11:00 colomon make test passes
11:00 colomon file tests return bool now.
11:00 colomon including ~~ :s, unfortunately.
11:04 pmurias joined #perl6
11:07 snarkyboojum joined #perl6
11:07 pmurias are there any practical benefits of learning the coq theorem prover? (i'm not sure if i should take a course)
11:09 uniejo joined #perl6
11:14 jnthn $P0[$I1] = 1 inc $I1
11:14 jnthn oops
11:14 jnthn fail
11:21 payload joined #perl6
11:27 colomon rakudo: say Bool ~~ Int
11:27 p6eval rakudo 2d9808: OUTPUT«0␤»
11:28 pugssvn r29941 | colomon++ | [t/spec] Refudge after infix:<===>(Int, Int) change.
11:29 dalek rakudo: d4be43d | (Solomon Foster)++ | src/builtins/Int.pir:
11:29 dalek rakudo: Change infix:<===>(Int, Int) to return Bool.
11:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d4be43d97daabbeebed3f261b5ca4855845517e5
11:40 colomon jnthn: so that change makes ~~ :e return a Bool, like you'd hope.  Any notion on how to get ~~ :s returning an actual Int?  All my ideas for it seem very very hacky...
11:42 bbkr rakudo: my $filename = q:p{/etc/services};
11:42 p6eval rakudo 2d9808: OUTPUT«Colons may not be used to delimit quoting constructs at line 11, near ":p{/etc/se"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
11:42 bbkr ooops, won't work :(
11:43 bbkr rakudo: my $filename = qp{/etc/services};
11:43 p6eval rakudo 2d9808: OUTPUT«Confused at line 11, near "my $filena"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
11:51 ruz is there something I can help with to make grammars work again?
11:52 snarkyboojum joined #perl6
11:53 colomon ruz: someone's been working on it, I believe.
11:57 quester joined #perl6
12:02 ruz colomon: anything casual I can do?
12:02 colomon ruz: with grammars?  I don't have a clue.  :)
12:02 ruz with anything :)
12:02 arnsholt colomon: You're in Copenhagen, no?
12:03 colomon nope.
12:03 colomon I'm still on my couch at home in Michigan.
12:03 arnsholt Ah, my bad memory strikes again. Sorry =)
12:03 colomon no worries.
12:04 colomon I certainly wish I were there.  :)
12:04 colomon I'm very much looking forward to meeting people at YAPC:NA in June.
12:05 xiaoyafeng joined #perl6
12:05 colomon ruz: let me think on that for a moment...
12:06 charsbar joined #perl6
12:07 arnsholt colomon: Indeed. I hope I can attend YAPC:EU this year
12:09 colomon ruz: well, working on tests is casual and extremely useful.
12:13 ruz :)
12:17 colomon I've just been grabbing commented out tests from t/spectest.data and trying them.
12:17 colomon (sorry, got distracted in mid sentence there.)
12:17 ruz yep, just found Array.rotate  :)
12:18 ruz going to test ground in imlementing a method, sounds fun
12:19 colomon anyway, sometimes the tests can be pretty easily fudged to work.
12:19 colomon which is good, then they can be added back to the test suite.
12:19 colomon and if you can't, you frequently find interesting bugs to work on.
12:19 colomon :)
12:26 iblechbot joined #perl6
12:29 quester left #perl6
12:51 _ilbot2 joined #perl6
12:51 Topic for #perl6is now »ö« | http://perl6.org/ | nopaste: http://paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
12:51 colomon rakudo: <a b c d>.pick(*).sort.perl.say
12:51 p6eval rakudo d4be43: OUTPUT«("a", "b", "c", "d")␤»
12:51 payload joined #perl6
12:51 Infinoid joined #perl6
12:51 colomon rakudo: say ~(<a b c d>.pick(*).sort)
12:51 p6eval rakudo d4be43: OUTPUT«4␤»
12:53 colomon rakudo: say ~(<a b c d>.pick(*))
12:53 p6eval rakudo d4be43: OUTPUT«a d b c␤»
12:54 colomon rakudo: say <a b c d>.pick(*).sort.WHAT
12:54 p6eval rakudo d4be43: OUTPUT«Parcel()␤»
12:54 krunen joined #perl6
12:54 colomon rakudo: say ~(1, 2, 3)
12:54 p6eval rakudo d4be43: OUTPUT«3␤»
12:54 colomon I call bug...
12:57 colomon rakudo: say (1, 2, 3).Str
12:57 p6eval rakudo d4be43: OUTPUT«1 2 3␤»
12:57 nacho joined #perl6
12:57 colomon oh bother
12:59 colomon rakudo: my @a = (1, 2, 3); say ~@a
12:59 p6eval rakudo d4be43: OUTPUT«1 2 3␤»
12:59 colomon rakudo: my @a = (1, 2, 3); say @a.WHAT
12:59 p6eval rakudo d4be43: OUTPUT«Array()␤»
12:59 uniejo joined #perl6
13:01 ruz rakudo: my $n = -4; $n%=3; say $n
13:01 p6eval rakudo d4be43: OUTPUT«2␤»
13:05 ruz rakudo: my @a = <a b c>; @b := @a; @b[0] = 'x'; say ~@a
13:05 p6eval rakudo d4be43: OUTPUT«Symbol '@b' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
13:05 ruz rakudo: my @a = <a b c>; my @b := @a; @b[0] = 'x'; say ~@a
13:05 p6eval rakudo d4be43: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16803 (src/builtins/Junction.pir:347)␤»
13:08 snarkyboojum joined #perl6
13:09 pugssvn r29942 | colomon++ | [t/spec] Additional fudging for pick.t.
13:11 betterworld joined #perl6
13:12 mjk joined #perl6
13:26 rv2733 joined #perl6
13:32 jnthn colomon: Not sure how to make :s work.
13:32 jnthn It feels...odd.
13:32 colomon yup.
13:32 jnthn Maybe the answer is to soss :s
13:32 jnthn *toss
13:33 jnthn And define some other way to find the file size.
13:33 colomon Well, you can always just call .s directly.
13:33 colomon though that feels kind of weird.
13:33 jnthn I was thinking of something less cryptic.
13:33 jnthn :-)
13:33 jnthn .filesize or something sane.
13:34 jnthn Smart-matching to get a file size feels a little...weird.
13:34 jnthn Granted you may want to use it to check the file ain't empty.
13:34 colomon ~~ :z does that
13:34 jnthn oh
13:34 jnthn My vote is that :s and .s go away.
13:35 jnthn (From the spec and Rakudo.)
13:35 colomon forgiveness or permission?  ;)
13:35 jnthn hehe
13:35 jnthn It just doesn't fit the boolean pattern of the rest.
13:35 jnthn I think we'll get away with it. ;-)
13:36 lisppaste3 ruz pasted "Test.pir missing" at http://paste.lisp.org/display/95960
13:36 ruz no idea what to do :(
13:37 ruz stashed all changes, make distclean; make; didn't help :(
13:37 jnthn ruz: Try a make test before running any individual test.
13:37 ruz ah
13:37 jnthn ruz: Rakudo master ain't smart enough to make the .pm into a .pir yet :-(
13:38 colomon jnthn++
13:38 ruz may be t/harnes can compile Test.pir if it's missing?
13:38 colomon jnthn: on :s -- I'll fix the code, you fix the spec?
13:38 jnthn No, we need to fix Rakudo to do it.
13:39 jnthn colomon: Hmm...if I have a spec checkout on this laptop I can...checking.
13:39 ruz jnthn: was that for me or colomon?
13:40 jnthn ruz: For you :-)
13:40 jnthn ruz: The .pir version should just be a cache of the .pir
13:40 Haiming joined #perl6
13:40 jnthn We need to work some more stuff out to be a be to do that yet.
13:41 jnthn colomon: ah, didn't have, but just checked out
13:41 jnthn colomon: Forgot I could pull just one directory with svn (and we've low bandwidth and the workshop, so checking out whole pugs repo woulda been cruel :-))
13:41 jnthn s/and/at/
13:43 takadonet joined #perl6
13:43 takadonet morning all
13:43 colomon \o
13:48 masak joined #perl6
13:48 jnthn masak!
13:48 masak jnthn!
13:48 masak moritz__: when in the afternoon will you be arriving?
13:48 masak moritz__: could we, for example exchange pmichaud's slot with yours?
13:48 pencilk joined #perl6
13:48 masak s/ple/ple,/
13:49 * masak wonders what unfortunate planning details caused moritz__ to be arriving after his talk is scheduled
13:51 Toony joined #perl6
13:52 masak I'm on a train, by the way. revising my talk slides at 120 km/h.
13:52 colomon masak++
13:52 jnthn masak: Yay :-)
13:53 * jnthn looks forward to masak's talk
13:53 ruz rakudo: my @a = 1..5; say ~@a.push( @a.splice(0,3) )
13:53 p6eval rakudo d4be43: OUTPUT«4 5 1 2 3␤»
13:54 masak too bad that moritz__'s talk seems to have gotten canceled. I could really have used his talk as a prerequisite/introduction to my abstracty/up-in-the-cloud rambling.
13:55 pugssvn r29943 | jnthn++ | [t/spec] Kill :s - it does not fit with the boolean pattern of the rest of the test operators, and the overall pair syntax (e.g. what would :!s do?) Note for just non-empty, :!z works. Add a tentative filebytes function for getting file size in bytes.
13:55 jnthn masak: Yes. :-(
13:55 mathw masak: you'll have to do his talk as well
13:55 masak TimToady: it's strange -- I both hail the new 4:map(*%4) notation as more orthogonal/versatile/general, and miss the old, strangely consistent %4 notation...
13:55 jnthn ...huh...4:map(*%4) ?
13:55 masak I could do that.
13:55 * jnthn can't even guess that that does.
13:56 masak would probably take the pressure off my own talk :P
13:56 masak jnthn: the *%4 is a closure.
13:56 jnthn OK
13:56 masak jnthn: ...which maps the indexes to 0..3
13:56 jnthn And the 4:
13:56 jnthn ?
13:56 masak jnthn: is the actual length.
13:56 mathw whaaa?
13:56 jnthn Where do we write this?
13:56 masak jnthn: inside @a[...]
13:56 * jnthn is epicly confused...
13:56 jnthn oh, S09 stuff?
13:57 masak my @a[ 4:map(*%4) ]
13:57 masak yes, S09 stuff.
13:57 jnthn oh, I don't care then :-)
13:57 masak the Next Big Thing.
13:57 masak I care.
13:57 jnthn Yes. I'll care lots after Rakudo *.
13:57 * takadonet cannot wait for Rakudo *
13:57 masak the new syntax is both better (more power) and worse (less intuitive).
13:58 jnthn I need to re-read S09 in detail at some point.
13:58 mathw Okay
13:58 mathw that's simultaneously awesome and incredibly scary
13:58 masak I re-read S09 the other week.
13:59 mathw I do like the idea that it can give you lists which can only be 4 elements long
13:59 mathw that could be quite useful
13:59 masak not so scary, I think. S09 talks a lot about re-writing indices. that's basically what S09 is about. :)
13:59 ruz rakudo: sub foo(@a is copy) { splice @a, 0, 3 }; my @a = 1..5; my @b = foo(@a);
13:59 p6eval rakudo d4be43: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'␤current instr.: '!postcircumfix:<[ ]>' pc 10568 (src/builtins/Role.pir:90)␤»
13:59 mathw I think, like jnthn, I need to read S09 in great detail
13:59 ruz :(
13:59 masak providing convenience by letting you write what you want instead of what the compiler would prefer.
14:00 masak alpha: sub foo(@a is copy) { splice @a, 0, 3 }; my @a = 1..5; my @b = foo(@a);
14:00 mathw masak: 1-based arrays! just what I always... oh wait, no, I never liked those.
14:00 p6eval alpha 30e0ed:  ( no output )
14:00 masak mathw: that's a possibility by S09. but it's "done right", because it's still 0-based underneath.
14:01 mathw my @horrible[:map(*+1)]; or something?
14:01 mathw well maybe it's -1 there actually
14:01 masak mathw: you make it 1-based by explicitly using 'fake incdices'.
14:01 masak no.
14:01 * masak prepares example
14:01 mathw I have to go think aobut work anyway
14:01 masak std: my @a{ 1..* }; @a{1}; #`[works] @a{0} # error
14:01 mathw I'll read S09 and then we can discuss it properly
14:01 p6eval std 29942: OUTPUT«ok 00:01 108m␤»
14:02 masak mathw: like that.
14:02 masak (I think.)
14:02 masak fake indices are arrays with .{} on them.
14:02 masak which is YET ANOTHER good reason for the sigils to be constant, and not based on indexing context.
14:05 ruz what is alpha?
14:05 masak ruz: it's the old generation of Rakudo.
14:05 ruz ah
14:05 masak ruz: up until the January release.
14:06 ruz what should I do if alpha pass a test and master doesn't?
14:06 ruz report? write a test? or?
14:06 masak file a bug! :)
14:06 masak the test has to be already written for it to fail...
14:07 masak but submitting a bug is often the right thing to do.
14:07 masak and helping the devs by pointing out things that don't work is also good.
14:07 colomon btw, masak:
14:07 colomon rakudo: say ~(1, 2, 3)
14:07 p6eval rakudo d4be43: OUTPUT«3␤»
14:07 colomon already reported?
14:08 masak o.O
14:08 masak no.
14:08 * masak submits rakudobug
14:09 masak rakudo: say (1, 2, 3)
14:09 colomon I tried fixing it, and it was a mini-disaster
14:09 p6eval rakudo d4be43: OUTPUT«123␤»
14:09 colomon rakudo: say (1, 2, 3).Str
14:09 p6eval rakudo d4be43: OUTPUT«1 2 3␤»
14:09 masak strange that only prefix:<~> is broken.
14:10 colomon agreed.
14:10 colomon So strange, in fact, that I initially didn't even bother to test .Str, assuming that writing Parcel.Str would fix the problem.
14:11 lisppaste3 ruz annotated #95960 "spectest patch" at http://paste.lisp.org/display/95960#1
14:12 colomon ruz: looks great to me.
14:12 masak rakudo: say ~(4,5,6)
14:12 p6eval rakudo d4be43: OUTPUT«3␤»
14:13 masak ok, so it's length, not last element.
14:13 masak probably stringifies the numification or something.
14:14 colomon masak++ # I just assumed that was what it was doing without actually testing it.
14:15 colomon filebytes?  Oh noes!  I made it filesize!
14:16 * ruz 's commit bit to pugs repo either was dropped or he doesn't remember password
14:16 jnthn colomon: size has no units.
14:16 jnthn colomon: I figured it's probably as evil as length.
14:16 jnthn ;-)
14:16 colomon are.... you saying.... our code.... shouldn't be evil?
14:16 masak jnthn: so :s should now be written :!z ?
14:17 colomon if you meant :s to test whether or not the file has something in it (rather than getting the length), yes.
14:18 jnthn masak: yes
14:18 SmokeMachine joined #perl6
14:18 masak jnthn: that feels... slightly arbitrary.
14:19 masak jnthn: I'm reading it as "has non-zero size".
14:19 masak jnthn: whereas with :s, it was just "has size".
14:19 jnthn masak: Well, maybe the whole thing wanted re-visiting
14:19 masak jnthn: heh. that's how I feel with 4:map(*%4) too :)
14:19 colomon if you think :s has non-zero size is worthwhile, it's easily done.
14:19 masak the last edit made it better, but now it's in an unbearable transition state instead :)
14:19 colomon it's just ~~ :s returns that size which is an issue.
14:20 masak colomon: yes. maybe :s and :z should just be pure Bool values.
14:20 dalek rakudo: 0126a16 | (Solomon Foster)++ | t/spectest.data:
14:20 dalek rakudo: Turn on S32-list/pick.t.
14:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0126a16c7d91aad4bbdee6335595e257421e7ef2
14:20 dalek rakudo: 0728931 | (Solomon Foster)++ | src/builtins/Str.pir:
14:20 dalek rakudo: Switch .s to .filesize.
14:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0728931ad5338356256039d211757aff6de41e8e
14:20 dalek rakudo: b348b3e | (Solomon Foster)++ | src/builtins/Str.pir:
14:20 dalek rakudo: .filesize became .filebytes before I could get it pushed.
14:20 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b348b3ed0464c504b80b159075e5a3773f3ef464
14:20 pugssvn r29944 | colomon++ | [t/spec] Track the ~~ :s to .filebytes shift in the spec.
14:21 colomon masak, jnthn: if you guys think that is worthwhile, it is easily done.
14:21 takadonet !!! new commits
14:21 takadonet git pull time!
14:24 colomon masak: :z is a pure Bool value right now.  :s is non-existent, but could easily be revived as a pure Bool value.
14:24 masak colomon: oh, right.
14:24 masak colomon: well, it's a trade-off, I guess.
14:25 masak colomon: do we confuse old Perl 5 users by changing the behaviour, or do we rattle them awake by leaving out :s ?
14:28 jonasbn joined #perl6
14:29 colomon well, it's not clear to me there's a reasonable way to keep Perl 5 users happy here.
14:29 uniejo joined #perl6
14:29 * jonasbn is at open source days
14:29 colomon the thing is, the ~~ :whatever mechanism is set up to only ever return Bool.
14:29 colomon jonasbn: \o
14:29 [particle] why make :s === :!z and :z === :!s ?
14:29 jnthn I just killed :S
14:29 jnthn *:s
14:30 [particle] yes, i know
14:30 colomon [particle]: see what I just said.
14:30 jonasbn you guys better come soon, I am bored
14:30 jnthn do what you like.
14:30 jnthn I've too many other things to worry about. :-)
14:30 [particle] perl 5 users...
14:30 masak jonasbn: I'm on my way! :)
14:30 jonasbn masak: where are you at?
14:30 [particle] my question is with .filebytes
14:30 masak jonasbn: somewhere between Stockholm and Norrköping, I believe.
14:31 [particle] is it possible to specify that the length be returned by some other measure?
14:31 jonasbn okay
14:31 masak haven't really been paying attention.
14:31 [particle] bits? blocks?
14:31 [particle] i think .filesize is a better name, defaulting to bytes
14:31 colomon [particle]: right, but the key point here is that (short of massive hackery) $filename ~~ :s cannot return the length of the file in bytes.
14:31 jnthn [particle]: rong, we avoid length and went for units with strings.
14:31 [particle] colomon: i agree, :s must be bool, if at all
14:31 [particle] jnthn: files aren't strings, though
14:32 jnthn I was making an analogy.
14:32 [particle] yes, i think that falls down here.
14:32 [particle] we're looking at the physical file system
14:32 colomon It seems to me if we're taking Perl 5 users into account, taking away :s makes more sense than turning it to a Bool result.
14:33 masak jonasbn: yep, Norrköping just rolling by.
14:33 jnthn [particle]: Do what you like. I don't care about IO. Everyone just bikesheds it  anyway.
14:33 colomon because Bool::True == 1, and that will lead to confusion.
14:33 [particle] i think :s should be made into something that warns "you mean :!z or .filebytes"
14:33 [particle] s/warns/errs/
14:34 jnthn That sounds sane.
14:34 masak I/O, Temporal, Pod. the trinity of bikeshed topics.
14:34 [particle] i can't believe you didn't just mention regex there
14:34 jonasbn masak: I will propably have gone when you make it here, do you have my phonenumber if you run into... issues?
14:34 [particle] how amazing is that!
14:35 masak [particle]: I don't see regexes as a bikeshed topic.
14:35 masak [particle]: S05 has been very stable in the past few years.
14:35 [particle] that's what i'm saying. it's no longer a bikeshed topic
14:36 [particle] it was, for years.
14:36 masak right.
14:36 [particle] we're past it.
14:36 masak and it's really good nowadays.
14:36 [particle] that's visible progress.
14:36 masak aye.
14:36 [particle] yay us! :)
14:36 masak that's what Perl 6 is all about.
14:36 masak yabbing, nattering and bickering, until the spec shines :)
14:37 masak jonasbn: no, I don't believe I have your phone number. feel free to privmsg it to me.
14:37 masak or email it.
14:44 colomon jnthn: any luck with fixing the member hash issue?  :)
14:46 * ruz thinks that t/spec/S06-traits/is-copy.t is wrong about arrays
14:47 ruz rakudo: sub foo(@a is copy) { pop @a; @a[0]++; }; my @a = 1..5; foo(@a); say ~@a
14:47 p6eval rakudo b348b3: OUTPUT«1 2 3 4 5␤»
14:47 colomon ruz: do you want me to commit your changes to the rotate test?
14:47 ruz sure
14:47 Su-Shee joined #perl6
14:48 masak ruz++ colomon++
14:48 colomon ruz: did you also add rotate to Rakudo?  ;)
14:48 ruz I read spec and it suggests that is copy only copies container, not contained object
14:49 colomon Method 'rotate' not found for invocant of class 'Array'
14:49 ruz colomon: yes, but faced problems, it's local commit
14:49 colomon what's the problems?  can you post the patch?
14:49 colomon *what're
14:50 lisppaste3 ruz annotated #95960 "first stab at Array.rotate" at http://paste.lisp.org/display/95960#2
14:51 ruz 1) rakudo fails in splice
14:51 colomon ye gads
14:51 colomon can you say "@array is copy:"  ?
14:51 jql joined #perl6
14:52 ruz why not?
14:53 colomon It just strikes me as very odd OO-wise.
14:53 ruz sounds good, clone our invocant
14:54 ruz however 'is copy' trait is implemented in not expected way
14:54 ruz it also clones contained scalars :(
14:54 * masak tries to wrap his head around that
14:54 masak so... the invocant is a copy of the object that we called the method on...
14:54 masak I think that ought to work. except for the little detail of it sort of going against the definition of 'invocant'.
14:54 masak tosh. that's an issue with reality, not theory. :P
14:55 snarkyboojum joined #perl6
14:55 ruz you always has self if you need invocant
14:55 masak snarkyboojum: hi!
14:56 masak ruz: that's actually an excellent point.
14:56 ruz and also I see this construct very common, a lot of math libs will use it
14:57 masak ruz: but what makes you so sure that 'self' isn't also the cloned thing?
14:57 masak ruz: I mean, 'self' is equal to the invocant parameter in all other respects.
14:57 masak why in the case of cloning should it differ?
14:58 ruz I find it natural to assume that :)
14:59 ruz it's not main issue with 'is copy' trait
14:59 colomon I have two other issues with this code:
14:59 colomon 1. won't  push(@array, splice(@array, 0, $n)); end up with @array having more elements than it did originally?
15:00 colomon 2. why not use slices instead of splice?
15:00 nacho joined #perl6
15:00 colomon (admitting, mind you, that if I knew how to write this routine I would have done it a couple of weeks ago!  ruz++)
15:02 colomon oh noes, netsplit!
15:07 pencilk joined #perl6
15:07 betterworld joined #perl6
15:07 ruz joined #perl6
15:07 riffraff joined #perl6
15:07 zostay joined #perl6
15:12 Toony joined #perl6
15:13 pugssvn r29945 | colomon++ | [t/spec] Enhanced rotate tests, ruz++.
15:14 gfldex joined #perl6
15:14 masak watching commits roll in here on the channel strengthens me in my slidescrafting.
15:14 colomon masak: I'd love to keep it up, but I need to go exercise and then $work.
15:14 athenot joined #perl6
15:15 malvinsu joined #perl6
15:15 masak colomon: it's OK. exercise is important, and $work allegedly also. :)
15:15 malvinsu any wond?
15:15 masak malvinsu: only us chickens.
15:16 malvinsu how to chat?
15:16 masak malvinsu: just keep going.
15:16 masak malvinsu: you're doing it right already.
15:17 malvinsu let me try on
15:21 jaldhar_ joined #perl6
15:21 malvinsu left #perl6
15:22 ruz rakudo: sub foo(@a is copy) { @a[0][0]++; }; my @a = [1..5]; foo(@a); say ~@a
15:22 p6eval rakudo b348b3: OUTPUT«2 2 3 4 5␤»
15:23 ruz rakudo: sub foo(@a is copy) { @a[0]++; }; my @a = 1..5] foo(@a); say ~@a
15:23 p6eval rakudo b348b3: OUTPUT«Confused at line 11, near "] foo(@a);"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:23 ruz rakudo: sub foo(@a is copy) { @a[0]++; }; my @a = 1..5; foo(@a); say ~@a
15:23 p6eval rakudo b348b3: OUTPUT«1 2 3 4 5␤»
15:23 ruz should be equal
15:24 masak when people come into a channel wondering how to chat, I'm not sure there's much we can do.
15:24 lisppaste3 ruz annotated #95960 "change tests for 'is copy' parameter trait" at http://paste.lisp.org/display/95960#3
15:25 masak joined #perl6
15:25 [particle] ...i guess you can leave...
15:25 alester joined #perl6
15:25 am0c joined #perl6
15:30 ruz masak: was that phrase for me?
15:30 masak [particle]: bad connection. :)
15:30 masak still rushing along across a wintry Swedish landscape at neck-breaking speeds.
15:30 masak ruz: the one about not knowing how to chat? no.
15:30 [particle] ;)
15:30 masak ruz: it was for malvinsu, who entered a few minutes ago wondering how to chat.
15:30 [particle] yes, i saw
15:31 masak ruz: but we had a netsplit just now, so things got a bit confuzzling.
15:31 [particle] i thought the coincidence was funny
15:31 [particle] oh, i didn't see those comments were for ruz
15:31 [particle] sigh, time for breakfast.  FEED YOUR HEAD!
15:32 masak [particle]: thanks for contributing to the confuzzion :)
15:33 nihiliad joined #perl6
15:35 ruz who wants to discuss spec of 'is copy' trait? either prove that I'm wrong or agree, so I can change tests
15:36 * masak wants
15:36 masak we're talking about 'is copy' on the invocant parameter, right?
15:36 ruz right
15:37 ruz no
15:37 masak "right, no"? :)
15:37 Psyche^ joined #perl6
15:37 ruz actually we talking about is copy just on argument
15:37 masak I have no problem with that.
15:37 ruz not invocant, invocant is an edge case
15:37 masak I might have a problem with it on the invocant parameter.
15:37 masak yes. I thought that's why you wanted to talk about it.
15:38 ruz more precisely we are talking about containers like array
15:38 masak if it's not an edge case, may I please refer you to the spec? :)
15:38 masak ruz: ok.
15:38 ruz sub foo (@a is copy)
15:38 masak so we copy the array.
15:38 ruz yes
15:38 masak problem solved.
15:38 ruz and I think we shouldn't copy scalars in it
15:38 PerlJam ruz: why?
15:39 ruz but tests test that and rakudo does
15:39 masak ruz: could you give a concrete example?
15:39 clintongormley joined #perl6
15:39 masak preferably by running it on 'rakudo:' or 'alpha:'.
15:39 ruz PerlJam: that's how I read the spec
15:40 ruz masak: sure, wait a sec
15:40 ruz rakudo: sub foo(@a is copy) { @a[0]++; }; my @a = 1..5; foo(@a); say ~@a
15:40 p6eval rakudo b348b3: OUTPUT«1 2 3 4 5␤»
15:40 PerlJam ruz: also, cite the part of the spec that leads you to believe this (so we can fix it or clarify)
15:40 masak ruz: looks dandy to me.
15:41 masak ruz: that's how I *expect* it to work.
15:41 justatheory joined #perl6
15:41 ruz rakudo: sub foo(@a is copy) { @a[0][0]++; }; my @a = [1..5]; foo(@a); say ~@a
15:41 p6eval rakudo b348b3: OUTPUT«2 2 3 4 5␤»
15:41 ruz masak: then how do you extect this to work?
15:41 * PerlJam waits for the magical words ...
15:42 masak no magic, sorry.
15:42 * sjohnson waves his magic wand
15:42 ruz http://perlcabal.org/syn/S06.html#Parameters_and_arguments
15:42 masak what's wrong?
15:43 masak the fact that we do @a[0][0] ?
15:43 ruz only one level is copied
15:43 masak ruz: I think the spec says somewhere that cloning only goes one level down into arrays and hashes.
15:43 masak ruz: so the above is actually correct.
15:43 PerlJam ruz: you want deep copy?
15:43 masak I'm slightly distracted by making slides, though, so my analysis might be off.
15:43 masak as might my memory.
15:43 ruz actually it's two levels
15:44 PerlJam ruz: eh?
15:44 ruz container @a and contained elemented
15:44 Trashlord joined #perl6
15:44 ruz s/elemented/elements/
15:44 PerlJam "However, the default forces any container argument to also be treated as an immutable value. This extends down only one level; an immutable container may always return an element that is mutable if it so chooses."
15:45 ruz yes
15:45 PerlJam @a is the container, @a[0] is a mutable thing in the contianer
15:45 ruz and every trait is described in context of container
15:46 ruz i need copied container and not its content
15:46 ruz and I expect 'is copy' to work in this way
15:47 PerlJam ruz: I'm confused.  what do you mean by "copied container and not its content" ?
15:47 ruz sub foo (@a) {pop @a} - should faile
15:47 ruz right?
15:47 PerlJam right
15:48 ruz sub foo (@a) {@a[0] = 1}
15:48 ruz changes argument, right?
15:49 riffraff joined #perl6
15:49 PerlJam I don't know what you mean by "changes argument"
15:51 ruz ufff, it's not first time when I try to say that something is not consistent, but people don't see it and say I'm wrong :(
15:52 PerlJam ruz: I don't know what exactly you're trying to say.  I have no idea if you're right or wrong.
15:52 PerlJam rakudo: sub foo (@a) { say pop @a; };  my @x= "a".."z"; foo(@x);
15:52 p6eval rakudo b348b3: OUTPUT«z␤»
15:53 PerlJam that looks like a bug to me (probably already noticed)
15:53 masak rakudo: sub foo (@a) {@a[0] = 1}; my @a = 10, 11, 12; foo(@a); say @a.perl
15:53 p6eval rakudo b348b3: OUTPUT«[1, 11, 12]␤»
15:54 ruz I'm trying to say that in 'sub foo (@a is copy) {}' @a should be a copy of array argument with elements just aliases to elements of that argument array
15:54 PerlJam and that does not look like a bug to me.
15:54 athenot joined #perl6
15:54 masak me neither.
15:54 masak PerlJam: but I'm trying to apply what you quoted above to it, and failing.
15:54 masak PerlJam: it sounds like the spec is saying that the elements of the array should be immutable too.
15:55 PerlJam oh, that's not how I read it .
15:55 PerlJam sub foo (@a) { ... }  in side the sub we can't modify @a, but we can modify its contents.  i.e., we can't shrink or grow the array, but we can change the values that each element may have.
15:55 PerlJam (that's how I interpret it)
15:56 ruz cool
15:56 PerlJam assuming @a is composed of mutable values that is
15:56 uniejo joined #perl6
15:56 ruz for example you want to return copy of that array with aliased elements but sorted differently
15:56 PerlJam the "one level" I quoted above is the container, not what it contains as I read it.
15:57 masak interesting reading.
15:57 ruz how will you do that?
15:57 PerlJam so ... looks like the spec needs some clarification  :)
15:57 masak I think it's a bit nonsensical for the array to only be immutable in the sense that its size doesn't grow or shrink...
15:58 anonymous_ joined #perl6
15:58 new_perl6_hacker joined #perl6
15:58 TimToady the intent is to make the elements immutable as well; the one-level is in P5 ref-think
15:59 masak \o/
15:59 masak TimToady: can an invocant parameter be 'is copy'?
16:00 new_perl6_hacker Is perl 6/Rakudo available for Win32 platforms?
16:00 PerlJam new_perl6_hacker: yep, see http://rakudo.org/how-to-get-rakudo
16:00 TimToady depends on whether you think the parameter is a reference to the object
16:00 PerlJam new_perl6_hacker: dunno how up to date it is though.
16:01 TimToady you can always copy references :)
16:01 PerlJam TimToady: what's a "reference"?  :)
16:01 TimToady beats me :)
16:02 TimToady but we hid them in p6 by making everything a reference, not nothing
16:02 masak TimToady: so you're saying that whether or not 'is clone' is allowed, it will have no effect?
16:02 supernovus joined #perl6
16:02 ruz TimToady: so spec should be changed and 'sub foo(@a is ro) { @a[0] = 1 }' will fail?
16:02 masak so 'is copy' on objects is always pretty much nonsensical?
16:02 masak even on arrays?
16:03 TimToady nah, it makes sense
16:03 masak ruz: 'is ro' is the default.
16:03 TimToady we probably just disallow it on invocants, maybe
16:03 masak aye.
16:03 TimToady ruz: we don't want to fall into the C++ trap of marking everything with const
16:03 new_perl6_hacker I am completely new so if I am asking things very obvious please a bit kind
16:03 TimToady the default should be immutable/value semantics
16:03 masak Java trap too, nowadays. but with 'final'.
16:04 [particle] PerlJam: parrot-win32 is quite new... parrot 2.1.1 / rakudo 26
16:04 masak new_perl6_hacker: we're notoriously kind :)
16:04 TimToady we might have to end up differentiating the levels of constness in arrays and hashes though
16:04 TimToady but I still think the default should be "I'm not changing my inputs"
16:05 ruz TimToady: oof, I thoght that at this point the spec is pretty solid on these topics
16:06 TimToady as with all of Perl from the beginning, it tends to be solider in the linguistic areas than the deep semantic areas
16:07 TimToady but I try to bias those towards an FP view of immutability these days
16:07 new_perl6_hacker There is a TBD tag to continuations in the spec. Will later versions of rakudo have support for continuations?
16:07 TimToady while holding onto the opposing OO view at the same time
16:07 masak only one level deep, in this case. :)
16:07 TimToady makes me go cross-eyed some days
16:08 TimToady well, at some point it's the data type that should be enforcing immutability, not the parameter
16:08 TimToady but we're trying to give the optimizer something to work with
16:08 masak new_perl6_hacker: the way I understand it, Perl 6 won't support 'naked' continuations.
16:08 masak new_perl6_hacker: because those are too implementation-dependent.
16:09 masak new_perl6_hacker: however, sufficiently fine-grained continuation control is provided through the gather construct. I think the spec mentions that as well.
16:10 new_perl6_hacker yeah I read it in some mailing list, Larry clarified it will be something like 'use continuations'
16:10 TimToady well, gather isn't really continuations
16:10 masak maybe more like coroutines.
16:10 masak I guess that's a special case of delimited continuations or something.
16:11 TimToady we try to concentrate more on giving the users many natural ways of expressing parallelism/threading, and leave the exact underlying semantics to the engine
16:12 TimToady again, more of a linguistic solution than a deep semantic solution
16:12 Su-Shee joined #perl6
16:12 * ruz listens, head gets big :)
16:12 TimToady and in some ways a more declarative solution, were continuations are more operational/procedural
16:12 TimToady *where
16:13 TimToady "Build me a Hoover Dam." says what to do, and implies a great deal of parallelism, but doesn't say how.
16:14 m-locks will there be a way of doing things procedurally too?
16:14 TimToady of course
16:14 m-locks aye
16:14 supernovus Hi, don't mean to interupt, but I have a implementation related question. Is there some hidden magic to get Grammar actions working in Rakudo? I have a   rule ifTag { \<if <ifStat>\> {*} }  in the grammar, and a   method ifTag ($/) { say "matched if"; }  in the actions class. And while the results of grammar.parse() are correct, the actions are never called. :-(
16:14 cognominal necessitates a Gant-scheduler?
16:14 TimToady though if your engine doesn't support naked continuations, we don't currently feel obligated to supply them
16:15 masak supernovus: did you explicitly tie the actions in the .parse call?
16:15 masak supernovus: my general advise is for you to start from an example that obviously works, and then change it step by step into what you want.
16:15 masak s/advise/advice/
16:17 supernovus masak, yeah, the call I'm using (module name changed for brevity):  My::Grammar.parse($line, :actions($parser));   ... I was about to say I based it off of JSON::Tiny, but then I noticed that's using :action() instead of :actions()... changing now.
16:18 TimToady I'd say gather is really more like "fork a thread with its standard output hooked to my standard input"
16:19 diakopter ruz: do you still need a commitbit password reset link?
16:20 supernovus masak: Thanks, it was :actions() versus :action() that was messing me up. The spec says :actions(), but if I'd read the JSON::Tiny source better I'd have seen it was :action() ... so, my own mistake! Thanks again for the sage advice!
16:20 masak supernovus: there was a recent spec clarification in that area. so reality might have changed around you.
16:20 masak supernovus: the 'sage advice' is kind of a last resort behaviour... but on the other hand, it tends to wash out the problem. :)
16:21 TimToady I thought rakudo changed that already; version skew?
16:23 cotto_work joined #perl6
16:24 supernovus TimToady: I'm using the January release. I'm trying each week to see if the new master will parse my libraries. Will try SCGI under a fresh copy of master in a few mins.
16:24 diakopter rakudo: say ~\(1;2;3) # masakbot
16:24 p6eval rakudo b348b3: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6protoobject;VTABLE_name' pc 1296 (runtime/parrot/library/P6object.pir:764)␤»
16:25 masak std: say ~\(1;2;3)
16:25 p6eval std 29945: OUTPUT«ok 00:01 107m␤»
16:26 masak unspace after a prefix. well I never.
16:26 * masak submits rakudobug
16:26 masak this one gets a [WEIRD] tag.
16:26 rgrau joined #perl6
16:26 diakopter I don't think it's [WEIRD]
16:26 diakopter it's not unspace, is it?
16:26 masak oh, it's a... whatsitcalled.
16:26 masak capture.
16:27 masak well, that makes it less [WEIRD].
16:27 diakopter rakudo: say ~\() # masakbot
16:27 p6eval rakudo b348b3: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6protoobject;VTABLE_name' pc 1296 (runtime/parrot/library/P6object.pir:764)␤»
16:27 masak same one.
16:27 diakopter rakudo: say ~\4
16:27 p6eval rakudo b348b3: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6protoobject;VTABLE_name' pc 1296 (runtime/parrot/library/P6object.pir:764)␤»
16:28 diakopter heh
16:28 masak rakudo: say \4
16:28 p6eval rakudo b348b3:  ( no output )
16:28 masak o.O
16:28 TimToady rakudo: say (\4).perl
16:28 diakopter stringification fail is caught by say's implicit "try"
16:28 p6eval rakudo b348b3: OUTPUT«Capture.new()␤»
16:29 masak diakopter: say has a try?
16:29 diakopter I'm guessing.
16:29 TimToady "Do, or do not..."
16:29 masak :)
16:29 diakopter I'm speaking of Rakudo, not Perl 6
16:30 masak me too.
16:33 Tene rakudo's say checks for definedness before actually using its value, which means that printing Failure objects doesn't fail.
16:34 masak still, it should output a newline.
16:35 diakopter masak: only 800 more open bug reports to go b4 perl6 has more open RT tickets than perl5 on rt.perl.org
16:36 TimToady does that mean it will be finished then? :)
16:37 diakopter but what returns a Failure object
16:37 TimToady Tene: I suspect this is another spot where we distinguish low-level .Str from high-level .Stringy
16:38 TimToady .Str should always try to give some appropriate string, but .Stringy (aka ~) means you're trying to use it as a value downstream
16:38 masak diakopter: not at all an impossible goal.
16:38 TimToady hence .Str doesn't autothread, while ~ does
16:38 diakopter masak: maybe after the hackathon ..
16:38 masak diakopter: :)
16:40 diakopter Tene: but it seems it's the stringification itself that is returning a Failure object
16:40 mberends joined #perl6
16:41 diakopter instead of a Str
16:41 masak mberends: \o
16:41 masak mberends: I hear the talks went well.
16:41 TimToady .Str must always return a Str
16:41 diakopter mberends&jnthn no longer unified?
16:41 new_perl6_hacker Is semilcolon a compulsory or a optional line ending character in perl 6?
16:42 TimToady yes
16:42 jnthn diakopter: We can have a net connection *each* today.
16:42 diakopter compulsory statement-ending character
16:42 masak new_perl6_hacker: it doesn't have much to do with lines, actually.
16:42 TimToady not always
16:42 masak new_perl6_hacker: you need it between statements.
16:42 jnthn new_perl6_hacker: yes, apart from if your line ends in }
16:42 TimToady not always
16:42 masak new_perl6_hacker: but not after your last statement in the program or a block, for example.
16:43 mberends masak: o/ yes the group was very positive about all the talks we gave, we may manage to recruit a few more contributors :-)
16:43 masak new_perl6_hacker: if you close a block and want a statement on the same line, you also need a semicolon between the block and the statement.
16:43 TimToady and it is mandatory after } on the same line
16:43 masak new_perl6_hacker: (unlike in Perl 5)
16:43 new_perl6_hacker http://www.perlcabal.org/~fglock/perlito.html , hello world world example doesnt have a ; at the end of say statement
16:43 diakopter it's the last statement in a block
16:43 masak new_perl6_hacker: maybe because the example only has one statement?
16:44 TimToady anyway, the rules are consistent regardless of whether the construct is a built-in or user-defined, is the point
16:44 new_perl6_hacker Ok, I got this ... If something is ending why indicate explicitly by putting a semicolon right?
16:45 TimToady ; is really a separator, not a terminator
16:45 TimToady we just allow a null statement after the last ; too
16:45 TimToady since it's good form to allow that another statement might be added after this one
16:46 TimToady std: ;;;;;;;;;;;;;;;;;;;
16:46 p6eval std 29945: OUTPUT«ok 00:01 106m␤»
16:46 TimToady in fact, we don't care how many null statements you put :)
16:46 TimToady but we don't want to go as far as some langauges and assume ; on the ends of all lines
16:47 masak heavens, no.
16:47 TimToady it's good linguistics to have the explicit end marker.
16:48 TimToady in this case, the redundant newline contributes to readability and clarity
16:48 Tene I've somewhere developed a habit of omitting the ; in Perl 6.  No idea where I got this, and I don't seem to do it in Perl 5, even.
16:48 TimToady the final ; you mean?
16:48 Tene no, I don't mean.
16:49 Tene I mean that I get a lot of parsefails.
16:49 TimToady well, you can't omit it between normal statmeents
16:49 * diakopter at first read "emitting"
16:49 TimToady ah
16:49 masak Tene: maybe you subconsciously think that Perl 6 feels a lot like Ruby? :)
16:49 diakopter or JS
16:49 Tene masak: no, not really.  The only ruby I've ever done was writing a compiler for Parrot.  I've never actually used it for anything.
16:50 masak Tene: maybe some other cute language then.
16:50 diakopter JS can infer statement separators in all but a couple exceptional cases
16:50 * masak shudders
16:51 diakopter from newlines, I mean
16:51 Chillance joined #perl6
16:51 new_perl6_hacker Will it be right to think it this way. The last statement that makes a change in the block(null will not anyway) will not have a semicolon at the end. Because if you know thats its ending you dont need to explicitly write it there
16:52 TimToady the semi isn't required there, just as it isn't in P5
16:52 TimToady but it's still a good idea
16:52 TimToady (if followed by a newline)
16:52 masak new_perl6_hacker: you need semicolons between statements. not necessarily after the last statement in a block or program.
16:52 TimToady I omit the semi when the } is on the same line
16:52 TimToady and put the semi when it's a separate line
16:52 TimToady (generally)
16:53 masak what's the noun form of 'cohesive'?
16:53 TimToady cohesion
16:53 diakopter std: my $a = { hi => 4 }␤$a
16:53 p6eval std 29945: OUTPUT«ok 00:01 106m␤»
16:53 masak and that can be both the action and the thing?
16:53 diakopter coherence?
16:53 Salada345 joined #perl6
16:54 Tene masak: give a sentance omitting the word you want?
16:54 masak I'm looking for a word essentially meaning 'cohesion agent'.
16:54 TimToady hmm, glue is adhesion
16:54 TimToady melting :)
16:54 masak Tene: 'Terms are lexical units, whereas operators work more like lexical [...]'
16:55 masak maybe just write 'glue'. :)
16:55 Tene adhesive would be the word, I think
16:55 Tene but glue works fine too
16:55 TimToady adhesives
16:56 TimToady but you're really only talking about infix operators there
16:56 masak I'll put 'adhesive' in the slide, and say 'glue' in meatspace :)
16:56 masak TimToady: that's a fair point... I think.
16:56 TimToady unary operators are more like wrappers
16:56 diakopter cohesive
16:56 Tene meatspace glue, eh?  Maybe I *should* have gone to this conference.
16:57 masak diakopter: but dictionary.com says that's not a noun, but an adjective only.
16:57 TimToady we don't do cohesion in Perl
16:57 TimToady std: "a" "string"
16:57 p6eval std 29945: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/KtmUhnbj2a line 1:␤------> [32m"a" [33m⏏[31m"string"[0m␤    expecting any of:␤   bracketed infix␤  infix or meta-infix␤      statement modifier loop␤FAILED 00:01 107m␤»
16:57 Tene cohesive 3) Physics. of or pertaining to the molecular force within a body or substance acting to unite its parts.
16:57 diakopter masak: so noun it :P
16:57 TimToady cohesionalization
16:58 masak heh.
16:58 TimToady ism
16:58 TimToady or istically
16:58 masak discohesionalizationism.
16:58 Tene masak: 'Terms are lexical units, whereas operators act cohesively.'
16:58 diakopter mentarian
16:58 masak Tene: well, in the static world of parsing, operators don't act, really.
16:58 masak Tene: they just hang there.
16:59 Tene Sure.
16:59 TimToady Tene: that's not cohesion, that's adhesion.
16:59 masak is there 'abhesion' :)
16:59 masak ?
16:59 Tene Yes.
16:59 masak good grief.
16:59 TimToady never heard of abhesion, though I suppose it would be repulsion
17:00 diakopter masak did you submit ~\4
17:00 new_perl6_hacker Sorry to be asking questions so randomly, Actually Im asking sum total of doubts accumulated over time
17:00 diakopter oh
17:00 TimToady np
17:00 Tene new_perl6_hacker: no reason to apologize.  we're glad to answer questions.
17:01 TimToady and we like batching
17:01 TimToady sometimes
17:01 masak diakopter: no, because we already have 'say behaving oddly' tickets in RT.
17:01 TimToady rakudo: (1...*).batch(10).say
17:01 p6eval rakudo b348b3: OUTPUT«12345678910␤»
17:01 new_perl6_hacker If everything is a reference then willnt everything be pass by reference,
17:01 new_perl6_hacker in case we pass the parameters to subroutines
17:01 diakopter std: my $a = 4{}␤$a
17:01 p6eval std 29945: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/IZCzwCY5tJ line 2:␤------> [32m<BOL>[33m⏏[31m$a[0m␤    expecting any of:␤        POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier loop␤FAILED
17:01 p6eval ..00:01 106m␤»
17:02 TimToady that's why we default to value semantics unless declared rw, so we don't turn into Fortran
17:02 masak diakopter: that's because the {} in 4{} isn't a real block, I guess.
17:02 diakopter poo
17:02 masak diakopter: I agree, it's a bit inconsistent.
17:02 TimToady hmm
17:03 masak STD.pm-bug :)
17:03 jnthn 15:42 <jnthn> Unless you want to?
17:04 diakopter std: my $a = .{ return 4; }␤$a
17:04 p6eval std 29945: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/cYAttJECRu line 2:␤------> [32m<BOL>[33m⏏[31m$a[0m␤    expecting any of:␤        POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier loop␤FAILED
17:04 p6eval ..00:01 106m␤»
17:05 jnthn ...gah, irc fail.
17:05 lichtkind joined #perl6
17:06 diakopter rakudo: my $a = class { return 4; }␤$a
17:06 p6eval rakudo b348b3: OUTPUT«Invalid namespace key in set_pmc_keyed␤current instr.: 'perl6;ClassHOW;new' pc 3706 (src/metamodel/ClassHOW.pir:27)␤»
17:06 lichtkind mberends: jou was geht ab
17:07 diakopter alpha: my $a = class { return 4; }␤$a #  timeout??
17:07 p6eval alpha 30e0ed:  ( no output )
17:07 diakopter oh, maybe whoever set up alpha didn't make the use Safe change I made to master
17:08 lichtkind diakopter: what is alpha for an interpreter rakudo alpha?
17:08 diakopter too many terms in a row
17:08 mberends lichtkind: just unwinding in the Dutch Perl Workshop after the talks :-)
17:08 masak jnthn: it was a very thought-provoking fail. I was trying to think of a situation where one might want to provide that context :P
17:08 new_perl6_hacker So pass by value is, pass by reference with a lock on write
17:08 * masak submits return-in-class rakudobug
17:08 lichtkind mberends: did you held your p6 talk?
17:09 * lichtkind already submitted talk to YAPC::EU
17:09 diakopter rakudo: class { }
17:09 p6eval rakudo b348b3: OUTPUT«Invalid namespace key in set_pmc_keyed␤current instr.: 'perl6;ClassHOW;new' pc 3706 (src/metamodel/ClassHOW.pir:27)␤»
17:09 jnthn known.
17:09 simcop2387 joined #perl6
17:09 diakopter masak: sry; it was just the anonymous class one
17:09 lichtkind can anybody tell me please what is alpha?
17:10 masak diakopter: we already reported that one?
17:10 diakopter yeah
17:10 mberends lichtkind: yes, and jnthn++ gave 2 talks.  It all went nicely :-)
17:10 masak rakudo: class { return 4 }
17:10 diakopter I think
17:10 p6eval rakudo b348b3: OUTPUT«Invalid namespace key in set_pmc_keyed␤current instr.: 'perl6;ClassHOW;new' pc 3706 (src/metamodel/ClassHOW.pir:27)␤»
17:10 masak diakopter: ok.
17:10 masak rakudo: class {}
17:10 p6eval rakudo b348b3: OUTPUT«Invalid namespace key in set_pmc_keyed␤current instr.: 'perl6;ClassHOW;new' pc 3706 (src/metamodel/ClassHOW.pir:27)␤»
17:10 masak diakopter: yeah, that looks familiar.
17:11 frodwith joined #perl6
17:11 kfo joined #perl6
17:11 lichtkind alpha: say $a
17:11 p6eval alpha 30e0ed: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/P0yixCVxOJ:10)␤in Main (file <unknown>, line <unknown>)␤»
17:13 lichtkind can i get an op?
17:13 jnthn lichtkind: alpha is what used to be Rakudo master
17:13 jnthn lichtkind: +
17:13 lichtkind jnthn: thanks i assumed that  but didn't know
17:13 TimToady new_perl6_hacker: yes, where it can be optimized away when you already have an immutable type
17:15 diakopter rakudo: package foo { our package bar; say bar; }
17:15 p6eval rakudo b348b3: OUTPUT«bar␤»
17:15 diakopter std: package foo { our package bar; say bar; }
17:15 p6eval std 29945: OUTPUT«[31m===[0mSORRY![31m===[0m␤Too late for semicolon form of package definition at /tmp/MujSj5FXXK line 1:␤------> [32mpackage foo { our package bar[33m⏏[31m; say bar; }[0m␤    expecting any of:␤       name␤   trait␤FAILED 00:01 105m␤»
17:16 masak diakopter: that's correct.
17:16 diakopter which?  rakudo?
17:16 masak oh, rakudo does it wrong...
17:16 masak STD is correct.
17:16 * masak submits rakudobug
17:17 masak alpha: package foo { our package bar; say bar; }
17:17 p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "package ba"␤in Main (file <unknown>, line <unknown>)␤»
17:17 diakopter sorta a regression, maybe
17:17 masak even alpha has a LTA error message.
17:17 masak yes.
17:18 dual joined #perl6
17:20 uniejo joined #perl6
17:20 new_perl6_hacker Will I be able to do a 'use lib $some_folder;' ... where $somelocation is subject to change somewhere in the program.
17:21 masak new_perl6_hacker: I believe the answer to that depends on things which haven't happened yet.
17:22 masak new_perl6_hacker: I don't think a 'lib.pm' module would be possible in today's Rakudo.
17:23 new_perl6_hacker Sure, I dont mean as of now. But will it be possible in the future?
17:23 masak new_perl6_hacker: I believe the answer to that depends on things which haven't happened yet.
17:24 masak new_perl6_hacker: by which I mean, it might become possible, or it might become unnecessary for some reason.
17:24 TimToady it will certainly be possible to do something like that, but not necessarily with that syntax
17:24 masak new_perl6_hacker: one thing which might possibly cause the latter is that the module system as of S11 mandates a kind of database storage.
17:24 TimToady all the module stuff desugars to calls that happen at BEGIN time, and you can always do them yourself
17:25 TimToady but we'll be discouraging such shenanigans in the official library, which is not directory based
17:26 TimToady your local stuff can be in directories, but as soon as something becomes "official", it's supposed to become immutable
17:26 new_perl6_hacker I asked this question as, If perl 6 supports metaprogramming. Then I would like to generate a piece of code .. put it in some folder and then call it from there
17:26 TimToady (for that version of it)
17:26 diakopter rakudo: class bar { has $a; our class foo { has $b }; say foo; }; say foo;
17:26 p6eval rakudo b348b3: OUTPUT«foo()␤Could not find non-existent sub &foo␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
17:26 TimToady sure
17:26 TimToady anything is still fair locally
17:27 diakopter 'our class' doesn't make it global?
17:27 TimToady but we don't want to rely on that for the official library, which has lead to grief in the p5 world, with name collisions and modules that aren't guaranteed to mean the same thing everywhere
17:27 TimToady by "local" I mean on your machine
17:28 TimToady in that sense 'our' is still very local :)
17:28 TimToady we'll still support PERL6LIB and such, but only for non-official modules
17:29 TimToady but that's fine for user-defined and even site-wide
17:29 TimToady but the official modules are really about API stability
17:29 TimToady and identity
17:30 TimToady that's what S11 is trying to say
17:31 colomon TimToady: you mean two of the developers can't just get uppity one morning and rename a function that's been there (more or less) since the early 90s?
17:31 colomon ;)
17:32 pugssvn r29946 | lwall++ | [STD] factor out curlycheck so we can use it on any trailing curly
17:32 pugssvn r29946 | and then use it on postcircumfix:<{ }> for diakopter++
17:32 TimToady colomon: sure, as long as they give it a new version number
17:32 TimToady or change the auth
17:33 masak TimToady++ # curlycheck
17:33 [particle] is there an auth reserved for local modules?
17:33 diakopter it appears no one has replied to the two PATCHes sent to perl6-compiler in the past 2 days
17:33 [particle] something like, say, PERL6LIB?
17:33 masak diakopter: I believe that the core devs have been tied up in meatspace.
17:33 [particle] seems like a good auth name for that purpose :)
17:33 TimToady you mean, something that would specifically be disallowed as an offical auth?
17:34 TimToady seems like USER or SITE would be more meaningful
17:34 [particle] yes, something reserved.
17:34 TimToady and hope nobody ever registers those as CPAN ids :)
17:34 [particle] :)
17:35 TimToady well, it's be cpan:NAME in any case, I suspect
17:35 TimToady *it'd
17:35 jmarti joined #perl6
17:35 [particle] the reserved auths could perhaps have a sigil to identify them as reserved
17:35 [particle] or, be all upper?
17:36 [particle] that's the traditional marker for reserved syntax, innit?
17:36 [particle] *reserved values
17:37 TimToady or local:USER local:SITE
17:37 TimToady then it's extensible
17:37 TimToady and fits the usual http: form
17:38 TimToady local:fred
17:38 [particle] i suppose that leaves room for lofat:FOOD and locarb:MEAL
17:38 TimToady local:see-me-in-my-office-right-now
17:38 TimToady or loco: in your case
17:39 [particle] that's a pound of sixes.
17:39 clintongormley joined #perl6
17:40 [particle] anyhoo, local:++
17:41 iblechbot joined #perl6
17:41 lichtkind jnthn: can i get a n op?
17:42 masak whoz op?
17:42 colomon diakopter: you mean the grammar and the parse_name patches?
17:42 diakopter yeah
17:42 colomon Yeah, I fear those are way over my head...
17:45 new_perl6_hacker If I have to find the lenght of an array I would do @array.elems ... Is there something like @array.list_methods to get all methods callable w.r.t @array?
17:46 new_perl6_hacker In general I want to ask, Is there a method which I can invoke to find all methods callable inside an object?
17:46 masak alpha: my @a; say @a.^methods.perl
17:46 p6eval alpha 30e0ed: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }]␤»
17:46 masak alpha: my @a; say @a.^methods>>.name..perl
17:46 p6eval alpha 30e0ed: OUTPUT«Could not find non-existent sub perl␤in Main (file src/gen_setting.pm, line 324)␤»
17:46 masak alpha: my @a; say @a.^methods>>.name.perl
17:46 p6eval alpha 30e0ed: OUTPUT«["unshift", "item", "pop", "values", "delete", "Scalar", "", "shift", "Array", "push", "splice", "exists"]␤»
17:47 masak new_perl6_hacker: does that answer your question?
17:47 TimToady so where's elems :)
17:47 colomon that's just the methods on array, isn't it?
17:47 colomon Array, I mean.
17:47 colomon where's the methods on Seq, etc.
17:47 colomon ?
17:47 diakopter rakudo: say @_.^methods>>.name.perl
17:47 p6eval rakudo b348b3: OUTPUT«Method 'HOW' not found for invocant of class 'ResizablePMCArray'␤current instr.: '!dispatch_.^' pc 410 (src/glue/dispatch.pir:100)␤»
17:48 diakopter alpha: say @_.^methods>>.name.perl
17:48 p6eval alpha 30e0ed: OUTPUT«["item", "pop", "values", "delete", "Scalar", "", "shift", "Array", "exists", "splice", "push", "unshift"]␤»
17:48 colomon rakudo: say @_.WHICH.^methods>>.name.perl
17:48 p6eval rakudo b348b3: OUTPUT«Method 'WHICH' not found for invocant of class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
17:48 new_perl6_hacker But where is the method elems as larry pointed out?
17:49 colomon alpha: say @_.WHICH.^methods>>.name.
17:49 p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "."␤in Main (file <unknown>, line <unknown>)␤»
17:49 colomon new_perl6_hacker: as I tried to say, you're only getting the methods defined on Array, not the ones defined on its base classes.
17:49 colomon which includes .elems.
17:50 colomon Unfortunately, I don't remember the syntax to get the full list.  :(
17:51 masak alpha: my @a; say @a.^methods(:tree)>>.name.perl
17:51 p6eval alpha 30e0ed: OUTPUT«["item", "pop", "values", "delete", "Scalar", "", "shift", "Array", "exists", "splice", "push", "unshift"]␤»
17:51 masak hm...
17:52 masak alpha: say Array.^methods(:tree).perl
17:52 p6eval alpha 30e0ed: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }]␤»
17:53 masak according to t/spec/S12-introspection/methods.t, that's the way to do it.
17:53 masak and I'm pretty sure it worked at some point. not sure what I'm missing.
17:54 m-locks lol @ { ... } x 12
17:54 Tene I've been rather interested several times in using annotations to attach the source of a sub as a property of it, to get .perl() to give back the source.
17:54 masak m-locks: that's the way Code objects are currently stringified.
17:55 masak rakudo: Code.new.perl.say
17:55 p6eval rakudo b348b3: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤current instr.: 'perl6;Code;new' pc 12688 (src/builtins/Num.pir:58)␤»
17:55 new_perl6_hacker Well in that case is it something like ruby, where there is a parent of all objects? BasicObject? If yes what is the Perl 6 equivalent of it?
17:55 masak new_perl6_hacker: Mu.
17:55 lichtkind joined #perl6
17:56 masak new_perl6_hacker: formerly known as 'Object'.
17:56 m-locks rakudo: my $a = Mu.new; say $a.WHAT
17:56 p6eval rakudo b348b3: OUTPUT«Mu()␤»
17:56 lichtkind uaaah
17:57 lichtkind shit mberends is gone
17:57 m-locks rakudo: my $a = Mu.new; say $a.^methods(:tree)>>.name.perl
17:57 p6eval rakudo b348b3: OUTPUT«get_attr_str() not implemented in class 'Sub'␤current instr.: 'perl6;Code;name' pc 12871 (src/builtins/Str.pir:114)␤»
17:57 masak that's why I didn't dare use master for my examples :)
17:57 m-locks ;P
17:57 new_perl6_hacker In one the spec I read it , It means 'whatever', right? ... that is whatever data types supported by Perl 6
17:57 lichtkind jnthn: can i still get an op
17:58 masak new_perl6_hacker: no, Whatever is another type.
17:58 masak new_perl6_hacker: both Mu and Whatever imply a kind of not-caring, but they're different kinds :)
17:58 lichtkind masak:
17:58 Tene lichtkind: there you go
17:58 lichtkind Tene: thanks i wanted update the topic
17:59 [particle] that context would have made your request more clear
17:59 [particle] there are many ops in perl6 and #perl6
17:59 Tene lichtkind: I'd add you to the channel access list so you can do it yourself, if we could sort out permissions and ownership of the channel
17:59 new_perl6_hacker There is more than a way to say whatever?
17:59 masak new_perl6_hacker: here's the etymology of Mu: http://en.wiktionary.org/wiki/
17:59 Topic for #perl6is now »ö« | http://perl6.org/ | nopaste: http://paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, /alpha, / pugs: / std: , or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
18:00 masak new_perl6_hacker: well, Mu means 'a very nondescript type, of which all the other types are descendants'.
18:00 [particle] in the topic, evalbot usage should not have slashes in it, just commas
18:00 masak new_perl6_hacker: Whatever means 'I match everything, and often supply a DWIMish context too'.
18:01 lichtkind yes im currently fixing that
18:01 Topic for #perl6is now »ö« | http://perl6.org/ | nopaste: http://paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha, pugs:, std: , or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
18:01 [particle] lichtkind++
18:01 Topic for #perl6is now »ö« | http://perl6.org/ | nopaste: http://paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha, pugs:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
18:01 lichtkind thanks
18:02 [particle] gracias, Tene
18:02 new_perl6_hacker Thanks for all the info, I'l rejoin later tommorrow.
18:02 Tene new_perl6_hacker: glad to have you here. :)
18:02 masak new_perl6_hacker: see you tomorrow!
18:04 lichtkind masak: the thing i wanted change on ther p6book was to but the idea behind p6 on wirst pace that reader understands why it hs such long suggestion period and also why were excited
18:04 [particle] i wonder if new_perl6_hacker will be 'less_new_perl6_hacker' tomorrow...
18:04 mikehh joined #perl6
18:04 Tene epsilon_closer_to_lwall_perl6_hacker
18:05 masak lichtkind: looking forward to a patch, then.
18:06 REPLeffect joined #perl6
18:09 lichtkind masak: dont wait still have to figure out how to use git :)
18:11 lichtkind or can i submit textfileß
18:12 masak a .patch file works just fine.
18:13 cdarroch joined #perl6
18:13 cdarroch joined #perl6
18:13 masak lichtkind: don't wait to long figuring out how to use git. :) I see many people around me whose lives have been significantly improved by the comfort and convenience git provides.
18:14 ShaneC joined #perl6
18:16 lichtkind masak: but i couldnt even load my cloned git repo of p6book
18:17 lichtkind git error that i didnt understand
18:17 masak If you have `some weird error', the problem is probably with your frobnitzer.
18:19 ShaneC left #perl6
18:19 TimToady colomon: okay you bright guys, what method *does* return a file's size now?
18:20 colomon .filebytes
18:20 TimToady BLECH
18:20 lichtkind masak: what are frobnitzer?
18:21 masak lichtkind: it's an Infocom term.
18:21 colomon TimToady: If you'll suggest a better name, I'm happy to change the source.  :)
18:21 diakopter .octets
18:21 TimToady rakudo: say '/etc/passwd' ~~ :filebytes
18:21 p6eval rakudo b348b3: OUTPUT«1␤»
18:21 TimToady good :)
18:21 uniejo joined #perl6
18:21 colomon ack!  The whole point of the change was _not_ to call it that way!
18:22 TimToady you lose
18:22 TimToady and I wouldn't mind if you put .s back :)
18:22 TimToady Pair.ACCEPTS is required to return Bool by current spec
18:22 colomon Do you have a suggestion for how to fix ~~ :s so it returns an Int?
18:22 TimToady call the method if you want the size...
18:22 * masak also wants :s back
18:22 TimToady my suggesting is *don't*
18:23 TimToady ion
18:23 colomon I dunno, that seems like a huge pitfall for Perl 5 programmers.
18:23 TimToady ~ :s always returns Bool, use .s if you want the size
18:23 colomon alpha: say '/etc/passwd' ~~ :s
18:23 p6eval alpha 30e0ed: OUTPUT«813␤»
18:24 colomon or even Perl 6 programmers from two months ago.
18:24 TimToady tough nuggies for them
18:24 krr joined #perl6
18:24 colomon and surely .s is a wretched name for a size method?
18:24 TimToady .size would be fine by me
18:25 TimToady and ~~ :size means "has size"
18:25 masak maybe we need long forms for all of the :e-like filetests?
18:25 colomon Hmmm... only problem with that is Str.size will be extremely non-intuitive.
18:25 masak aye.
18:25 TimToady well, we were thinking of making it Str.IO.size
18:25 masak it's the old problem again, with files not really being strings.
18:25 masak that would solve it.
18:26 diakopter .size8
18:26 colomon so casting to .IO (or something) switches it to being treated like a filename?
18:26 masak it's a tough corner in which to balance brevity and orthogonality.
18:26 TimToady where IO is an ingyesque object that can open lazily but represents the current status of the file
18:26 * masak needs to detrain
18:26 * TimToady needs to shower &
18:27 TimToady and commute &
18:27 REPLeffect joined #perl6
18:28 jaldhar joined #perl6
18:30 arnsholt Any of the Copenhageners around ATM?
18:33 uniejo Yup.
18:33 diakopter I never tried the stuff
18:34 arnsholt uniejo: Are there any plans for the evening?
18:34 arnsholt I've just arrived, so I'm not up to speed
18:35 hicx174 joined #perl6
18:35 uniejo As far as I know. Nothing for today. I am currently at the venue, where there is a Nokia eent with beer and food for registered users.
18:35 uniejo s/eent/event/
18:35 diakopter it was disgusting to be around my (many) schoolmates who used Copenhagen dipping tobacco
18:35 colomon oh, funny, I read eent as "tent".
18:36 arnsholt diakopter: Would that be what we Northerners call "snus" perhaps?
18:36 * uniejo seems to have somthing stuck in the "v" on his keyboard.
18:37 arnsholt uniejo: Thanks. In that case I'll just hang around the hotel, gearing up for tomorrow
18:37 diakopter arnsholt: yeah I think
18:38 arnsholt And yes, it really is quite horrid (and I'm used to people using the stuff =)
18:38 uniejo arnsholt: Ok. See you there, tomorrow.
18:38 REPLeffect joined #perl6
18:39 REPLeffect joined #perl6
18:39 arnsholt uniejo: Definitely. Although I'm might defect for the first two lectures. There's one one machine translation I'd like to see
18:40 arnsholt Seeing how computational linguistics is what I do, I'm really interested =)
18:49 hicx174 joined #perl6
18:54 IllvilJa joined #perl6
18:55 Topic for #perl6is now »ö« | http://perl6.org/ | nopaste: http://paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend!
18:57 krakan joined #perl6
18:59 colomon joined #perl6
19:01 REPLeffect joined #perl6
19:03 uniejo arnsholt: Looks like beers on Sunday (Cafe Bizarro) http://conferences.yapceurope.org/hack2010dk/event/663
19:08 szabgabx joined #perl6
19:16 SmokeMachine joined #perl6
19:18 diakopter hrm; googlecode down
19:21 arnsholt uniejo: Ah, excellent
19:22 * arnsholt just bumped into masak in the lobby ^^
19:22 REPLeffect joined #perl6
19:23 rgrau joined #perl6
19:29 REPLeffect joined #perl6
19:36 root___ joined #perl6
19:41 jaldhar joined #perl6
20:04 darkelite joined #perl6
20:10 jaldhar joined #perl6
20:10 kgish joined #perl6
20:11 darkelite left #perl6
20:12 xabbu42 joined #perl6
20:13 krakan joined #perl6
20:14 masak joined #perl6
20:14 * masak bumped into arnsholt++ in the lobby :)
20:22 kgish hi folks, i'd like to learn more about perl6 so where's the best place to start?
20:23 TimToady depends on your background
20:23 TimToady are you familiar with Perl 5, for instance
20:24 TimToady as general advice, the various links mentioned on perl6.org
20:25 TimToady http://perlgeek.de/en/article/5-to-6 if you're familiar with Perl 5
20:25 TimToady http://perl6advent.wordpress.com/2009/12/01/perl-6-advent-calendar/ is a more general intro
20:26 TimToady if you like reading unsimplified spec stuff, then the synopses at http://perlcabal.org/syn/
20:26 kgish TimToady, I've got many years experience developing Perl 5
20:27 masak kgish: also depends on your goals. what can Perl 6 do for you?
20:27 TimToady then you probably want to read all of those :)
20:27 kgish at today's dutch perl workshop saw some great presentations by martin berends and jnthn
20:27 masak ah! they told us people might stop by :)
20:28 masak mberends++ jnthn++
20:28 kgish yeah that's me, i'm supposed to say something in the lines of 'how babiform' for somereason ;)
20:28 masak 'how is babby formed?'
20:28 kgish oh yeah, that's it.
20:28 masak http://knowyourmeme.com/memes/how-is-babby-formed
20:29 * Su-Shee waits for the secret perl 6 handshake.
20:29 masak :)
20:30 TimToady if you're really into pain, read all the original 361 RFCs, and then picture how to fix all of them at once. :)
20:30 masak I don't believe anyone in his right mind would want to do that... :)
20:31 kgish and the book in the docs directory?
20:31 masak kgish: it's a work in progress.
20:31 kgish book-2009-10.pdf
20:31 masak kgish: as long as you know that, it's probably informative enough.
20:32 kgish am interested in meta objects stuff, done some moose and catalyst, and goty into lua for awhile
20:33 masak kgish: I like you already :)
20:33 kgish lua does some clever stuff with metatables and metamethods
20:34 TimToady strictly speaking, the MOP stuff is all hidden from Perl 6 behind the .HOW barrier
20:34 TimToady but the various implementations are converging on common solutions there
20:34 TimToady the p6 view is in S12
20:34 kgish the synopses look like heavey going ...
20:35 TimToady it's okay to skip the parts where your eyes glaze over :)
20:35 TimToady s/skip/skim/
20:35 TimToady interesting typo
20:35 masak what are the repercussions of using a copyrighted image in one's presentation? http://www.superiorpics.com/event/Gridiron_Gang_Film_Promotion/Xzibit_AG022.html
20:35 lichtkind joined #perl6
20:36 cj has there been any work done on making an interface to host VM feature?  For instance, with the CLR, C# code can load VB.NET libraries.  Are there any plans to make Perl6 capable of doing the same thing?
20:36 masak kgish: I approached Perl 6 through the Apocalypses, and only after that hit the synopses. the Apocalypses are a bit dated by now, but they contain a lot of rationale which might be good to have.
20:37 kgish where are the 361 RFCs?
20:38 masak http://dev.perl.org/perl6/rfc/
20:38 masak don't do it, man! :)
20:39 kgish i can get into that ;)
20:39 colomon cj: Rakudo Perl 6 is supposed to be able to do that sort of thing with the Parrot VM.
20:40 colomon cj: Though I think that functionality is broken at the moment.
20:41 kgish and the Apocalypses is where?
20:42 Su-Shee kgish: just write perl 5, exchange all -> with a . and code "what you think should work" and the rest you can look up.
20:42 masak kgish: http://perlcabal.org/syn/
20:42 cj colomon: alrighty... is there anything codified in the specification that standardizes the way that such things are done?
20:42 kgish very biblical sounding names
20:43 cj kgish: I think that was the point ;)
20:43 colomon cj: I dunno, it's not something I've tried to do.
20:43 cj colomon: ah.  TimToady, can I pick your brain for an answer? :)
20:43 TimToady kinda distracted at the moment--in a meeting
20:43 kgish okay, I'll start with the general high-level stuff and work from there, download and play
20:43 masak kgish: you'll find different kinds of hubris in the Perl 6 culture. biblical-sounding names of the defining documents are one such kind. :)
20:43 cj TimToady: alrighty.  I'll ping you in an hour or something if I remember ;)
20:44 kgish recommend that last stable or github?
20:44 masak kgish: I'd recomment Rakudo January.
20:44 masak Minneapolis.
20:44 masak the second from the top on http://github.com/rakudo/rakudo/downloads
20:44 kgish http://github.com/downloads/rakudo/rakudo/rakudo-2010-01.tar.gz
20:44 masak s/recomment/recommend/
20:44 masak aye, that one.
20:45 TimToady cj: meanwhile, S11 discusses the foreign interface from p6's point of view
20:45 kgish feb was a bad month?
20:45 colomon Though the head version in github is getting back in shape rapidly.
20:45 masak kgish: we're in a post-merge transition period.
20:45 colomon And "merge" is putting it lightly.  It was a major rewrite.
20:45 kgish yeah, working for an important release in april i understand
20:45 masak kgish: quite big refactor, haven't really brought everything back up yet.
20:45 kgish ah so the truth comes out ... ;)
20:46 masak we seem to be on schedule, at least :)
20:46 colomon It does a lot of cool stuff it couldn't do before now.
20:46 masak the new architecture will take us further, but right now we're not as far as we used to be.
20:46 colomon There's just a lot of cool stuff it could do before that hasn't been put back yet.  :)
20:46 kgish that's the usual pace, quality should be preserved at all costs
20:50 krakan joined #perl6
20:54 k23z__ joined #perl6
20:54 k23z__ joined #perl6
20:55 lichtkind masak: i had a request to build a page on what lang influenced perl 6 in what
20:55 lichtkind masak: could you help me on that?
20:55 masak lichtkind: possibly.
20:55 cj is pugscode still the canonical repository for the documentation?
20:55 masak lichtkind: until tomorrow at 11 o'clock, I'll be more or less busy fretting about my presentation, though.
20:55 cj (/me found a typo)
20:56 masak lichtkind: and between 11 and 12 tomorrow I'll be busy presenting my presentation. :)
20:56 masak cj: yes.
20:56 * m-locks is keen on hearing about them presentations
20:57 colomon O
20:57 colomon I'm with m-locks.
20:58 colomon gotta experience the conference vicariously through those of you there...
20:59 m-locks aye, hope they will be on video soon
20:59 masak I'm still on the fence on whether to include a yo-dawg slide with a copyrighted image. :/ any lawyerish types in here to give advice?
20:59 gbacon joined #perl6
21:00 masak what's fair use, etc/
21:00 masak s[/][.]
21:01 lichtkind masak: you on same conf as mberends?
21:01 masak lichtkind: not today, no.
21:01 masak we will be tomorrow :)
21:01 m-locks ain't those internet meme pics public domain? unless you can read the authors name from the header data
21:02 * masak checks
21:02 masak the page with the original picture on it had a (C) and no licence.
21:02 m-locks oh ok, somebody's claiming copyright then
21:04 masak here's what the header contains: http://gist.github.com/323148
21:04 cj http://pastebin.com/raw.php?i=W316KHfr
21:05 cj That looks righter to me
21:05 cj sokay to commit?
21:06 pugssvn r29947 | masak++ | [S11] typo found be cj++
21:06 masak cj: oops, I didn't know you wanted to commit it yourself. :/ sorry, next time I'll let you do it.
21:06 lichtkind pmichaud: could you tell me when developement on NQP or PCT started?
21:06 masak lichtkind: why not just go back through the svn logs?
21:06 masak lichtkind: 2005 or 2006, I believe.
21:07 masak hm, that's for PGE at least.
21:07 masak NQP was probably 2006 or maybe 2007.
21:07 lichtkind masak: i have an parrot svn local but  comment doesnt reveal anything
21:07 cj masak: ohnoes :)
21:07 cj I'll find more!
21:07 masak cj++
21:07 masak lichtkind: svn logs.
21:08 masak lichtkind: the entries have timestamps on them.
21:10 m-locks masak: whoa that's some real xzibit pic you took, it might have some copyright issues, with Retna, not sure though how it would change if you just used parts of the picture and not as is
21:11 masak m-locks: it's extra sensitive because I'm releasing my presentation under a cc lincence.
21:11 m-locks aye
21:11 masak right now I feel I'd better abstain from using that image. but it's a shame. :/
21:11 m-locks better not risk it, although i'd have loved to see y0 dawg
21:13 masak this text seems to indicate I'm in the clear: http://plagiarism.umf.maine.edu/copyright/fair_use.html
21:13 masak I do intend to have an attribution slide at the end.
21:14 m-locks well, there you go, i guess your presentation would qualify as "teaching" or "research"
21:14 masak yeah.
21:14 cj hurm... it's been so long since I've made a commit to the pugscode svn repo that I've forgotten my credentials.. could someone look up the username for me?  I think I can figure out the password.
21:16 TimToady cjcollier
21:16 k23z__ do you guys use gdb while writing p6 ?
21:16 TimToady but there's also cj there, not sure which is which
21:16 masak k23z__: the Parrot people do, I know. jnthn does sometimes, too.
21:17 cj thanks, TimToady.  Hurm... I'll use cjcollier just to be sure ;)
21:17 cj it says (cj) in the AUTHORS file... I'll switch that so it matches my CPAN id
21:17 k23z__ yes, because I thought it might be useful for you guys to use gdb-python , you can script the debugger with Python :)
21:18 pugssvn r29948 | cjcollier++ | changed name from 'cj' to 'cjcollier'
21:18 cj I guess that worked ;)
21:19 kgish within REPL ./perl6 how to configure up-arrow to do history?
21:19 arnsholt Whee. Speaking of gdb, my Rakudo copy segfaults in sinh.t
21:19 kgish not ^[[A^[[A
21:20 k23z__ arnsholt: yes I'm trying to get this gdb Python thing checkout from some git repo , then compile and use it
21:22 masak kgish: you need to have some readline package installed, I believe.
21:22 masak kgish: when you do Configure.pl in Parrot, it detects if you have it.
21:22 kgish i already do (CPAN works fine) but it's not finding it.
21:24 k23z__ kgish: tried using rlwrap ?
21:24 k23z__ :)
21:25 k23z__ kgish: if you install rlwrap(which is in most repositories for debian/ubuntu) , then you get to write     rlwrap ./perl6
21:25 k23z__ and you have readline support instantly
21:26 lichtkind masak: http://www.perlfoundation.org/perl6/index.cgi?action=revision_compare&amp;page_name=timeline&amp;mode=source&amp;Button=Compare+Revisions&amp;new_revision_id=20100305212305&amp;old_revision_id=20100304233218
21:26 masak 2004, no less.
21:27 masak so the lifespan of PGE was 5 years, give or take.
21:28 stephenlb joined #perl6
21:29 masak I currently have 131 slides.
21:29 masak it takes 36 seconds to build the presentation :)
21:29 arnsholt Impressive =)
21:30 * arnsholt debates getting a drink before bedtime
21:30 cj http://pastebin.com/3SDBr8r1 # <- look okay?
21:30 masak cj: aye.
21:32 pugssvn r29949 | cjcollier++ | removed extra "that is"
21:35 masak cj++
21:35 lichtkind masak: 2004 November 18 - first public release of PGE (p6ge at this time) by Patrick Michaud, an important step to bootstrap
21:35 masak lichtkind: aye, I saw it.
21:35 lichtkind masak: 2007 June 23 - Initial creation of Parrot Compiler Toolkit (PCT) as a branch of PAST
21:36 masak 'a branch of PAST'?
21:36 lichtkind masak: 2002 July 22 - Dan made the initial revision of Perl 6 compiler for Parrot
21:36 masak that does not make sense to me.
21:36 masak PAST is a type of AST.
21:36 masak PCT is a toolkit.
21:36 masak how can one be a branch of the other?
21:36 lichtkind yes but the libs that developed out of PAST tools became PCT
21:37 lichtkind i read the svn comments
21:37 masak lichtkind: it would be instructive to know how much of what Dan committed actually remained in what became Rakudo.
21:37 masak lichtkind: my guess is, not much, since PGE/PCT didn't even exist back then.
21:38 lichtkind masak: yes but IMO anybody with brain can excerpt that from timeline, my point is when developement began
21:38 takadonet left #perl6
21:38 masak I'm not critizicing or even suggesting a change.
21:39 masak I'm just curious about the percentage that remains from that time.
21:39 lichtkind masak: hard to tell and beside thats more info for the articles
21:39 masak pmichaud++ would know, I think.
21:41 lichtkind masak: critique is good, i just have hard discussion tone :)
21:41 masak perhaps the timeline could include all major releases of Pugs, along with the approximate time that development slowed.
21:41 masak lichtkind: well, for once I wasn't criticizing. :)
21:41 lichtkind :(
21:44 lichtkind pmichaud: did NQP used PCT from the start?
21:45 masak to what extent is it a lie to call the listop reduce operators 'precircumfix operators'?
21:46 arnsholt Rawr. Looks like the segfault bug is wither transient or a heisenbug
21:46 lichtkind masak: its a circumfix meta :)
21:46 PerlJam greets
21:47 Tene masak: *no* space is allowed between something and a postcircumfix operator, or postfix, or prefix... but you *can* put space between a reduce and something
21:47 masak PerlJam: \o
21:47 masak std: my $a; ++ $a
21:47 Tene masak: so, no, I don't think that precircumfix makes sense.
21:47 p6eval std 29948: OUTPUT«ok 00:01 107m␤»
21:47 Tene Hmm.  Misremembering, I guess.
21:47 arnsholt There we go. Three's the charm
21:47 lichtkind masak: but yes its no infix .. difficul
21:47 PerlJam std: my $a; ++.$a;
21:47 lichtkind t
21:47 p6eval std 29948: OUTPUT«ok 00:01 105m␤»
21:47 masak o.O
21:48 masak what does *that* mean?
21:48 PerlJam std: my $x; asdf.$x;
21:48 p6eval std 29948: OUTPUT«Undeclared routine:␤   'asdf' used at line 1␤ok 00:01 105m␤»
21:48 lichtkind masak: that you are ok :)
21:48 PerlJam std: my $x; **.$x;
21:48 p6eval std 29948: OUTPUT«ok 00:01 105m␤»
21:48 PerlJam std: my $x; **++-+.$x;
21:49 p6eval std 29948: OUTPUT«ok 00:01 106m␤»
21:49 * PerlJam goes with STD bug
21:49 masak scary.
21:50 PerlJam no, I think we've been over this before.  It's a series of prefix ops
21:50 masak TimToady should go all Knuth and give out $2.56 rewards for each STD.pm bugs found. :)
21:50 PerlJam Is there a deparse for STD?
21:50 snarkyboojum joined #perl6
21:50 masak PerlJam: yes.
21:51 masak well, there's something that generates ASTs.
21:51 PerlJam something that I can get via p6eval?
21:51 masak no.
21:51 masak it's in the Pugs repo, in src/perl6
21:51 masak I'm trying it now.
21:51 masak just need to rebuild first.
21:53 masak ++.$a seems to parse as prefix:<++> with a .$a call on it.
21:54 masak oh!
21:54 masak it's ++$_.$a, of course!
21:54 PerlJam yes
21:54 diakopter ++($_.$a)
21:54 masak right.
21:54 PerlJam and **++-+.$a does the same thing
21:54 masak methodop binds tighter than prefix:<++> :)
21:55 diakopter PerlJam: I think it's correct
21:55 PerlJam yes; just surprising
21:55 diakopter std: my $x; (* * (++(-(+(*_.$x))))));
21:55 p6eval std 29949: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/DfNLMiSmJy line 1:␤------> [32mmy $x; (* * (++(-(+(*[33m⏏[31m_.$x))))));[0m␤    expecting any of:␤       POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤
21:55 p6eval ..statement modifier loop␤FAILED 00:01 1…
21:56 diakopter std: my $x; (* * (++(-(+($_.$x))))));
21:56 p6eval std 29949: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/sltN4SI2y4 line 1:␤------> [32mmy $x; (* * (++(-(+($_.$x)))))[33m⏏[31m);[0m␤    expecting any of:␤ method arguments␤ statement modifier loop␤FAILED 00:01 107m␤»
21:56 diakopter std: my $x; (* * (++(-(+($_.$x)))));
21:56 p6eval std 29949: OUTPUT«ok 00:01 107m␤»
21:56 masak diakopter: I think it's **, as in hyperslurp.
21:56 diakopter oh
21:57 masak at least that's what viv seems to imply.
21:57 * PerlJam still thinks it's a bug of surprise  :)
21:58 masak PerlJam: then you should increase your tolerance for surprises :)
21:58 diakopter hm, I could add a viv: command to p6eval
21:59 diakopter .. that sends the ast
21:59 diakopter well, the yaml output anyway
21:59 masak it'd need to put back a nopaste URL with the AST, because even trivial programs have huge ASTs.
21:59 PerlJam yeah
21:59 PerlJam But that would be awesome.
21:59 masak yeah.
21:59 masak diakopter: if you manage the nopaste thang, you have my blessing, and my deep admiration.
22:00 lichtkind masak: audrey is a forecaster http://www.mail-archive.com/perl6-compiler@perl.org/msg00684.html
22:01 masak lichtkind: :)
22:01 lichtkind :)
22:01 masak lichtkind: it was a good exercise.
22:01 diakopter we'll need a pastebin that's amenable to bots
22:01 lichtkind masak: your done with GGE?
22:02 masak lichtkind: minus epsilon :)
22:02 Tene masak: Hey, wasn't *somebody* planning to write a Perl 6 paste server that understood the Perl 6 AST?  Someone?  What was his name... basak?  nasak?
22:03 PerlJam heh
22:03 masak lichtkind: http://github.com/masak/gge/blob/master/STATUS
22:03 diakopter wolfman
22:03 masak Tene: :P
22:03 masak Tene: the whole Web.pm grant has stalled now. we might pick it up sometime.
22:03 masak Tene: I could use some encouragement, I think.
22:04 colomon oh, hey, that's a good excuse: http://news.perlfoundation.org/2010/03/hague_grant_application_numeri.html
22:04 PerlJam masak: go for it!
22:04 colomon :)
22:04 PerlJam masak: hooray for masak!
22:04 PerlJam masak is the man!
22:04 masak PerlJam: :)
22:04 PerlJam masak: :)
22:04 masak PerlJam: not *now*, I'm making slides...
22:04 colomon masak++!  masak++! masak++!
22:04 masak people... :)
22:07 Tene masak: I'm moving shortly (hopefully), and things might change for me then.
22:07 Tene So, I hope to be more active soon.
22:07 masak hopeably.
22:09 masak Tene: I'm now making a slide out of your DEBUG( expensive_but_unnecessary_computation() ) example.
22:09 masak how might the macro definition for DEBUG look?
22:10 masak macro DEBUG($x) { ... } # plz fill in the '...' :)
22:10 masak it doesn't need to be 100% correct, just correct enough to convince the audience.
22:11 Tene Depends on whether you're checking for $DEBUG at compile-time or runtime.  I'll give both, I guess.
22:11 Tene macro debug($ast) { quasi { if ($*DEBUG) { log({{{$ast}}}) } } }
22:12 masak I like that one.
22:12 Tene macro c-debug($ast) { $DEBUG ?? $ast !! Nil }
22:12 Tene then you'd have to like:
22:12 Tene BEGIN { our $DEBUG = True }
22:12 Tene erm...
22:13 Tene macro c-debug($ast) { $DEBUG ?? quasi { log {{{ $ast }}} } !! Nil }
22:13 masak nod.
22:13 arnsholt There we go
22:14 arnsholt I found the segfault bug and the proximate cause (which pointer is null)
22:14 Tene you *could* do it with subs, but that's uglier...
22:14 masak from that, I think I can create a my-if and whenn't example, too :)
22:14 arnsholt Should I just report it on the Parrot bugtracker?
22:14 masak arnsholt: yes, please.
22:14 masak arnsholt++
22:15 Tene sub debug(&closure) { log &closure() }; debug( { calculate-ponies() } )
22:15 Tene masak: Looks like I've got an hour or two right now.  Any requests?
22:16 masak Tene: ask colomon, he has a much clearer view of the Rakudo status.
22:16 diakopter @_ to be something other than ResizablePMCArray
22:16 colomon Requests for bug fixes?
22:16 masak yes.
22:17 colomon pondering....
22:17 colomon there's the repeated gather thing, but I imagine that's nigh impossible
22:17 quietfanatic joined #perl6
22:17 PerlJam colomon: why would you think that?
22:18 TimToady constant $DEBUG = True;
22:18 masak TimToady: even in the macro case?
22:18 TimToady yes
22:18 TimToady constants are compile-time
22:19 TimToady supposed to be, anyhoo
22:19 colomon Well, I know pmichaud's looked at it, and I think Tene has too, and as far as I know there's been no progress made so far.
22:19 arnsholt Is there a quick and easy way to find out which hash code my current branch of a git repository has?
22:19 colomon And I sure as heck don't know how to deal with it.
22:19 masak constant $DEBUG = True; macro debug($ast) { quasi { if $*DEBUG { warn( {{{$ast}}} ) } } }; debug( ponies() )
22:19 masak er, 'if $DEBUG'.
22:19 iblechbot joined #perl6
22:19 TimToady yes, should optimize away entirely if $DEBUG is false
22:19 colomon jnthn was looking at my hash bug this morning....
22:20 PerlJam adding macros to rakudo would be tres cool
22:20 PerlJam :)
22:20 masak whoa, constant folding of macros...
22:20 TimToady could even say constant $?DEBUG = True to emphasize it
22:20 TimToady well, macros were the *last* thing on pugs list of todos
22:21 colomon Tene: sub version of sort?
22:21 Tene colomon: eh?
22:21 masak TimToady: I thought Perl 6 self-hosting was the last thing.
22:21 colomon Could not find non-existent sub &sort
22:22 masak that said, I've been waiting for macros for ages now... :)
22:22 colomon that's from t/spec/S32-hash/keys_values.t
22:22 colomon might be too easy for you...
22:22 Tene heh
22:23 colomon exists for Array
22:23 masak no, I think I need help with defining a my-if macro.
22:23 masak I got stuck at how to make the custom parsing.
22:23 masak do I use 'is parsed'?
22:24 Tene masak: yes
22:24 Tene and put a regex in there
22:24 Tene macro my-if($ast) is parsed(/.../) {...}
22:24 masak right.
22:25 colomon Tene: $*CWD
22:25 masak ...I have a hard time imagining what goes inside that regex. :/
22:25 masak I presume the 'my-if' keyword doesn't need to be in there.
22:25 masak does the $ast thing have to?
22:25 PerlJam Aren't there some examples in the pugs repo?
22:26 masak is parsed( /<EXPR> <xblock>/ )
22:26 masak is that right-ish?
22:26 * masak is in deep waters
22:26 Tene masak: you could add an optional 'else'
22:27 masak oh, right.
22:27 masak stylish.
22:27 Tene masak: perhaps look at --target=parse output of a simple if statement
22:27 lisppaste3 joined #perl6
22:27 * Tene rebuilds perl6 to see
22:27 masak is parsed( /<EXPR> <xblock> ['elsif' <xblock>]* ['else' <xblock>]?/ )
22:27 masak that's enough to look credible, methinks.
22:28 Tene no, wouldn't be xblock.
22:28 TimToady else doesn't take an xblock, just a pblock
22:29 TimToady and if you have xblock you don't need EXPR
22:30 Tene xblock is expr + block
22:30 PerlJam else takes a pblock?
22:30 PerlJam that seems weird
22:30 masak oh!
22:30 masak excellent.
22:31 Tene you probably want: macro my-if($/) is parsed(/<cond=EXPR> <iftrue=block> ['else' <iffalse=block>]/) { ... }
22:31 TimToady S04:287
22:32 Tene macro my-if($/) is parsed(/<cond=EXPR> <iftrue=block> ['else' <iffalse=block>]/) { quasi { given {{{ $/<cond>.ast }}} { ... } } }
22:32 masak cool. thanks.
22:33 PerlJam TimToady: still seems weird  :)
22:33 masak if {{{ $<code>.ast }}} would work as well, no?
22:33 * PerlJam wonders if there are any tests for that.
22:33 TimToady that's because it is weird
22:33 Tene masak: not if you're implementing if without using if
22:33 masak Tene: I'm not :)
22:33 masak I could use the trinary operator instead... :)
22:33 Tene masak: just translating it into 'if' isn't as fun.
22:34 masak hm, I should have :s in the regex too, no?
22:34 Tene Yeah.
22:35 Tene or just say: is parsed( rule { ... } )
22:35 TimToady that's :size now  :P
22:35 Tene if you like
22:35 Tene ITYM :filebytes
22:35 TimToady BLETCH
22:35 Tene :filebits/8
22:36 TimToady if we limit to IO then .bytes is sufficient
22:36 masak hm, both iftrue and iffalse are pblock...
22:36 Tene masak: I'd probably say use <block> instead
22:37 masak why?
22:37 TimToady to avoid confusion
22:37 Tene TimToady: if we're limiting it to serious suggestions, I'd agree with you.
22:37 masak ok.
22:37 Tene masak: because "block" is a regonizable word, and you want recognizable stuff in your demos.
22:37 Tene so, what TT said
22:38 TimToady you could always switch to a different window and say "Here's what it really looks like..."
22:38 TimToady when someone asks, "What about elsif?"
22:38 masak :)
22:39 masak I'd field that till the 10 minutes after the talk...
22:39 Tene include statement_control:sym<if> from rakudo or STD
22:39 TimToady STD's is only 11 lines
22:40 Tene rakudo's is 4 line
22:40 TimToady and shows an un-LTA message on "else if"
22:40 masak how does Perl 6 know that my-if can't be statically evaluated?
22:40 TimToady who says it can't?
22:40 Tene masak: I don't understand the question.
22:40 TimToady it's a macro
22:40 masak hm...
22:40 TimToady that runs it at BEGIN time
22:41 TimToady whatever it returns is still compile time
22:41 masak oh, never mind. I'm just mixing up levels here.
22:41 * masak brane asplode
22:44 TimToady is the panel still on for 2:00 tomorrow?
22:44 masak think so.
22:44 TimToady aka 5am PST, I think
22:45 Tene TimToady: given any thought to "each syntactic category has a default parsing rule"?
22:46 arnsholt masak: BTW, do you know the way from the hotel to the conference tomorrow? =)
22:46 TimToady not lately, but it still needs thinking about
22:47 masak arnsholt: not in any useful sense, I think. but lets try to synch up at breakfast and plan our route :)
22:47 colomon "Method 'defined' not found for invocant of class 'Undef'" is a great error message, considering Undef no longer exists in Rakudo....
22:48 TimToady .oO(non-existent class found)
22:48 TimToady .oO(existent class not found)
22:48 arnsholt masak: Sounds like a plan. Meet up at the breakfast hall at 8?
22:48 masak arnsholt: oki.
22:49 arnsholt Excellent
22:49 TimToady I still think non-existent sub not found is kinda ridiculous
22:50 masak TimToady: I think everyone does. but the Parrot people seem to hold that message hostage or something.
22:51 TimToady bbl & # sleep-thinking about default parsing rules
22:53 masak my my-if slide: http://gist.github.com/323269
22:55 Tene masak: I find the following hard to follow: "} ) {"
22:55 masak Tene: nod. any suggestions?
22:55 Tene masak: I recommend moving the { to the next line down, and maybe the " } )" to the end of the previous line
22:56 masak so a blank line in between?
22:56 Tene 'sec, lemme try variants
22:57 * masak does the same
22:57 masak I've now arrived at this: http://gist.github.com/323269
22:57 masak the '{' looks lonely on its own line :(
22:57 Tene I like that a lot better
22:57 masak me too.
22:58 masak let's go with that for now.
23:00 Tene personally, I'd include the parse tree of the example
23:00 quietfanatic I woulda had 'is parsed (' on the first line, then 'rule {' on the second, then the content of the rule, then '}' then ') {'
23:01 quietfanatic but that's more lines.
23:01 quietfanatic wait actually it's not more lines.
23:01 Tene quietfanatic: you can click 'fork' in the gist page to show us
23:02 masak quietfanatic: like this? http://gist.github.com/323269
23:02 quietfanatic I mean it is more lines
23:02 masak I think I like that better.
23:03 quietfanatic masak: yeah, except with 'is parsed (' on the same line as the macro definition
23:03 masak oh, good idea.
23:03 quietfanatic and with the ') {' unindented
23:03 masak right. the whole thing gets outdented one step.
23:04 masak like this: http://gist.github.com/323269
23:04 Tene Yes, that works for me
23:04 masak evolving macro code conventions... \o.
23:04 quietfanatic Yeah. I think it's one line longer than #2.
23:04 masak er, \o/
23:04 masak I like a lot of things about this last iteration.
23:05 masak I'll go with that.
23:05 arnsholt I sense macros growing to be one of Perl 6's more maligned features =)
23:05 Tene arnsholt: better than source filters, at least
23:05 arnsholt Oh, definitely
23:05 arnsholt But the more interesting ones will probably be quite hard to read/understand
23:06 quietfanatic I'd completely buy into macros if it weren't for that weird {{{ }}} syntax.
23:06 masak the meme 'better than source filters' is in my talk :)
23:06 arnsholt But then again, metaprogramming -is- kind of hard in itself
23:06 Tene quietfanatic: you can specify your own rule for that
23:06 masak quietfanatic: do you have a nicer syntax in store?
23:06 masak quietfanatic: maybe prefix:<,> like in LISP? :P
23:06 quietfanatic Tene: masak: ...no, I don't :)
23:07 arnsholt masak: Mmmm. Toenails ;p
23:07 masak I like the {{{ }}} *because* they hurt the eyes a bit.
23:07 Tene quietfanatic: quasi :unquote<⦃ ⦄> { ... ⦃ $foo ⦄ };
23:07 quietfanatic Well that's cool.
23:07 masak it's like the capital letters of BEGIN and WHAT, which indicate that something behind-the-scenes is going on.
23:08 quietfanatic So is quasi {} just a string then?
23:08 Tene quietfanatic: No.
23:08 masak it's an AST.
23:08 Tene quasi returns the AST of what's in the {}s
23:08 masak it's the homoiconicity feature of Perl 6.
23:08 quietfanatic because if it's not a regular string, then why couldn't you just have $<iftrue>.ast interpolate correctly without anything around it?
23:09 Tene you *can* returns strings from macros, but I'm not going to look at that until normal macros work quite well.
23:09 quietfanatic asts interpolating into asts just as strings interpolate into strings
23:10 masak quietfanatic: the difference between $<cond>.ast and {{{$<cond>.ast}}} is one of levels.
23:10 Tene quietfanatic: because that would return an ast for "look for the variable $/ in the local scope, and fetch the 'iftrue' attribute from it, and call .ast on that"
23:10 cj wow... ⦃ ... ⦄ - I think those are my new favorite braces...
23:10 masak quietfanatic: am I specifying on the level of the code I'm returning, or on the level of the macro I'm defining?
23:10 quietfanatic hmm...no I guess you're right
23:11 quietfanatic No yeah, if you wanted it to interpolate, you'd have to begin backslashing all your literal '$'s
23:11 Tene oh, no, I lied.
23:11 Tene I got the scope wrong.
23:11 quietfanatic which is even uglier than {{{ }}}
23:12 Tene it's actually any tripled grouping symbol
23:12 masak quietfanatic: sounds as if you're still thinking strings, not ASTs.
23:12 Tene iirc
23:12 masak yep.
23:13 quietfanatic masak: I know what's going on with it now.
23:14 nacho joined #perl6
23:17 Tene "Within a quasiquote, variable and function names resolve according to the lexical scope of the macro definition." -- I'm not entirely sure how this works.
23:18 Tene macro my-x { my $x = "foo"; return quasi { $x } };
23:18 Tene my $n = my-x;
23:19 Tene That compiles an AST to refer to the lexically-scoped $x used at the time of macro invocation.
23:19 Tene Not quite sure how to do that.  I'll need to think about it.
23:27 quietfanatic joined #perl6
23:33 nacho joined #perl6
23:36 snarkyboojum joined #perl6
23:38 lichtkind masak: if your come back would you please just write the november page?
23:39 masak lichtkind: though I greatly admire your verve, it doesn't alter the fact that my presentation, for which I still have slides to craft, is tomorrow at 11.
23:39 lichtkind masak: i mean after that
23:40 masak I might. though I'd prefer if someone else did it. I'm not exactly an unbiased author.
23:42 lichtkind masak: godd than i have to interview you :)
23:42 * lichtkind added * 2007 October 8 - [Daniel Ruoso] started [SMOP] (yap6 back then) as "another prospective Perl 6 implementation, but now, a simple C runtime, hopefully a target for "kp6"[KindaPerl6]
23:45 masak nice.
23:49 lichtkind masak: yes timeline has 26 entries now :)
23:50 masak lichtkind++
23:53 snarkyboojum joined #perl6
23:57 snarkyboojum_ joined #perl6
23:58 k23z__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo