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