pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:03 kanru joined 00:07 justatheory left 00:19 wknight8111 joined 00:27 tcliouAway is now known as tcliou 00:33 Chillance left 00:56 wknight8111 left, ispy_ left 00:57 alanhaggai_ is now known as alanhaggai
pugs_svn r22289 | ruoso++ | [smop] Array.unshift implemented. 01:13
01:51 BinGOs left 01:57 BinGOs joined 02:00 Pnz joined, PZt left 02:01 Pnz is now known as PZt 02:11 cognominal left, scrottie left 02:12 wknight8111 joined 02:19 xinming joined 02:21 cognominal joined 02:22 xinming_ left 02:36 hercynium joined 02:39 [particle] left, BinGOs left 02:40 BinGOs joined 02:47 BinGOs left
pugs_svn r22290 | bacek++ | [spec] Replace many 'skip' with 'todo' for rakud. moritz++ for autounfudge 02:57
03:03 elmex_ joined 03:12 wknight8111 left 03:18 [particle] joined, elmex left, elmex_ is now known as elmex 03:21 eternaleye left 03:25 eternaleye joined 03:29 sri_work left 03:40 [particle]1 joined 03:45 [particle]2 joined 03:58 [particle] left 04:02 [particle]1 left
Ontolog what the hell IS smop? 04:15
PerlJam simple meta object protocol (I think) 04:16
Ontolog what is the point of that mop stuff 04:24
what does it make easier?
04:28 epoch joined 04:31 kanru left 04:44 justatheory joined
Ontolog I hope someone can take a look at the latest of my bitching and moaning on perl6-compiler 04:47
hercynium purl, smop? 04:54
hmm, she's not here
PerlJam Ontolog: see search.cpan.org/~drolsky/Class-MOP-...ass/MOP.pm 05:02
lambdabot Title: Class::MOP - A Meta Object Protocol for Perl 5 - search.cpan.org
05:03 xinming_ joined
PerlJam Ontolog: wrt p6c bitching and moaning ... So it appears the MMD is dispatching based on type first, then number of args? (i.e., you sent split(Str,Sub,Int) and it got dispatched to split(_,Str) instead of split(_,Str,Int) ) 05:04
er, ... instead of split(_,Sub,Int) 05:06
or something 05:07
Ontolog I sent split(String,Sub,Int) and split(String) got invoked instead of split(_,Sub) 05:10
but
when I sent split(String,Sub), split(_,Sub) gets invoked
spooky? yes
05:12 hercynium left
PerlJam right. It looks like the sorting algorithm for multiple dispatch puts entries with matching types first before those with matching parameter count (if it even looks at the number of parameters. I'm just assuming that it does) 05:13
Ontolog if that was the case, then split(String,Sub) should invoke split(String) and produce the error then, but it doesn't 05:14
05:15 xinming left
PerlJam well, maybe it's not the sorter but the matcher that's faulty 05:16
(yes, I'm clinging to the not-so-rational belief that the dispatcher is the problem and not something else :-) 05:17
Ontolog well parrot hasn't reached a 1.0 yet so it could very well be the dispatcher... 05:22
i'm not so familiar with it all to know
PerlJam Hmm. pdd27 says that those parameters that participate in multiple dispatch are marked with :invocant 05:24
I don't recall seeing that at all in the split() multis
05:24 xinming joined
PerlJam so, maybe they are all equally likely as far as the dispatcher is concerned wrt number of parameters, so it's only matching based on type. 05:25
of course ... the only place :invocant is mentioned is pdd27 and pirc and imcc. 05:26
(i.e. no other pir files use it)
05:29 justatheory left
PerlJam Ontolog: the haskeller in me wonders what happens if you move the split(String) multi to be defined after the split(_,Sub) multi 05:31
05:33 eternaleye left 05:37 xinming_ left 05:38 xinming_ joined 05:50 xinming left
PerlJam Ontolog: why is the multi for split(String) not really declared as split(String,String) I wonder? Seems like that would be best and may actually solve your problem. 05:51
enough random musing for me, it's time for bed.
PerlJam &
05:55 Psyche^ joined 06:11 Patterner left, Psyche^ is now known as Patterner 06:12 Bzek joined 06:40 aindilis left 06:41 aindilis joined 06:55 eternaleye joined 07:01 Tene left 07:02 kanru joined 07:15 Tene joined 07:26 Tene left 07:27 Tene joined 07:28 Ontolog left 07:35 sri_work joined
pugs_svn r22291 | moritz++ | [t/spec] unfudged a passing TODO test 07:39
r22292 | moritz++ | [t/spec] more fudge fiddling 07:41
07:47 BinGOs joined
pugs_svn r22293 | moritz++ | [t/spec] some fudge fiddling 07:55
07:57 kanru left
rakudo_svn r31285 | moritz++ | [rakudo] make tools/autounfudge.pl work in parallel, bacek++ 08:07
r31285 | moritz++ | Patch courtesy by Vasily Chekalkin
08:14 kanru joined 08:21 drbean_ left, drbean joined 08:25 smg left 08:29 sri_work left 08:34 jan_ left
pugs_svn r22294 | moritz++ | [t/spec] simple split tests 08:36
r22295 | moritz++ | [t/spec] svn props for split-simple.t 08:37
08:41 jan_ joined
pugs_svn r22296 | moritz++ | [t/spec] more simple split tests 08:45
rakudo_svn r31286 | moritz++ | [rakudo] add split test to spectest_regression 08:46
08:54 Ontolog joined
pugs_svn r22297 | moritz++ | [t/spec] more split tests 08:57
09:11 smtms left 09:24 iblechbot joined 09:25 kanru left 09:47 masak joined 09:55 smg joined 10:04 zamolxes joined 10:48 Lichtkind joined
Lichtkind are there ideas how to write optional named parameters ?:name or :?name ? 10:50
ruoso Ontolog, www.perlfoundation.org/perl6/index.cgi?smop 10:54
lambdabot Title: SMOP / Perl 6
11:03 rindolf joined
rindolf Hi all. 11:03
11:04 cotto_w0rk joined
rindolf I'm trying to run svn.openfoundry.org/pugs/examples/q.../graham.pl using Rakudo - {{ ../../parrot perl6.pbc ./graham.p6 }} but I'm getting {{ Statement not terminated properly at line 7, near "(@$n,@$m)." }} 11:06
masak rindolf: hi 11:08
rindolf Hi masak
masak rindolf: seems @$foo conversion is not implemented in Rakudo yet.
rindolf masak: ah.
Hmmmm....
masak patches welcome :)
rindolf masak: OK.
masak: I recall when I converted that program from Perl 5 to Perl 6 and pugs. I uncovered a few Pugs bugs this way. 11:09
masak trying to run actual code tends to do that 11:10
11:21 cotto_work left 11:29 Psyche^ joined 11:30 zamolxes left 11:42 Patterner left, Psyche^ is now known as Patterner 11:49 kanru joined 12:04 alanhaggai left 12:24 slavik joined 12:25 wknight8111 joined 12:38 alanhaggai joined 12:39 abra joined
slavik I have a system wide install of cabal and I am having trouble installing Pugs, the error is: Could not find module `Pugs.Compat' 12:47
hmm, Pugs depends on haskeline which depends on terminfo, I get an error when installing haskeline saying that cabal could not find terminfo, but it is actually installed 12:56
13:05 demq left
ruoso is assuming that there is no slice view of a grep... 13:12
13:12 Lichtkind_ joined, Lichtkind_ left 13:13 Lichtkind_ joined
pugs_svn r22298 | ruoso++ | [smop] starting grep implementation... almost working... 13:18
13:30 Lichtkind left
Lichtkind_ TimToady: how to spell optional named parameters? 13:31
13:32 agentzh left
ruoso Lichtkind_, named parameters are optional by default 13:32
Lichtkind_ thanks ruoso++
ruoso :)
Lichtkind_ ruoso: and when there ar erequired put an ! at the end?
ruoso iirc, yes 13:33
but consider taking a look at s06
Lichtkind_ ruoso: i did bit if i write about it i want to get shure
what means iirc? 13:34
ruoso if i recall correctly 13:35
slavik are there gtk binding for perl6? 13:36
Lichtkind_ i dont know of any
also no wx
pugs_svn r22299 | ruoso++ | [smop] YAY! YAY! we do have map and grep now! 13:37
r22299 | ruoso++ | test/35 is the m0ld version of the following code
r22299 | ruoso++ | map { $_ > 3 ?? print "not ok - item > 3\n" !! print "ok - item < 3\n" },
r22299 | ruoso++ | grep { print "ok - grep iteration"; $_ < 3 } 2..5;
slavik what is the accepted extension for perl6 code?
Lichtkind_ slavik: you extend parrot not in perl 6
slavik is it pl or something else?
? 13:38
Lichtkind_ there is an OGL binding in Parrot
slavik ahh
ok
Lichtkind_ just look how they done it
ruoso later &
Lichtkind_ bye 13:39
13:39 Lichtkind_ left 13:42 jiing joined
ruoso pugs: say map { $_ == 3; fail } 1..5; 13:48
p6eval pugs: OUTPUT[*** ā¤ Unexpected "1"ā¤ expecting ",", ":" or operatorā¤ at /tmp/CwvXZYl6BH line 1, column 28ā¤]
ruoso pugs: say map { $_ == 3; fail }, 1..5;
p6eval pugs: No output (you need to produce output to STDOUT)
Ontolog what's up with nobody responding to my perl6-compiler mails! waaaaaah!
i'm not sure what to work on while i'm blocked with my issue
13:48 agentzh joined
ruoso Ontolog, maybe your questions are too hard ;) 13:49
13:49 jferrero joined
masak Ontolog: better learn to handle not being replied to _now_, before the phenomenon disappoints you even more. 13:50
this is a volunteer-driven project. people respond if they have time, and feel that they can add anything 13:51
ruoso very happy! SMOP is the first implementation to have lazy map and grep :) 13:56
ruoso starting to think about how to implement gather/take now... 13:58
pugs: map { say $_ }, map { $_ == 3; fail }, 1..5; 13:59
p6eval pugs: No output (you need to produce output to STDOUT)
14:04 masak left
slavik what is the accepted extension for perl6 code? is it pl? 14:08
ruoso slavik, file extension has no meaning most of the time... perl 6 modules will keep the extension .pm 14:09
slavik what should I use for source code though? 14:10
ruoso for perl modules, .pm for perl scripts usually no extension in the unix world.. but in the windows world you probably need to put .pl 14:11
slavik ruoso: I just want to be able to separate perl6 code from other code ... 14:12
in case I put it all in the same directory with shell scripts and such
ruoso that's not the role of the file name...
but you *can* use .pl in the end
if that helps you... 14:13
but in the unix world that is completely unnecessary...
slavik ruoso: I know
ruoso: people put .sh at the end of shell script filenames though :)
ruoso mostly they don't
just take a look of how many shell scripts you have in your /usr/bin without .sh in the name 14:14
the same for perl scripts
and for any other language, actually
slavik true, but we are people :) 14:15
ruoso I'm not sure I see your point...
slavik well, I got pugs installed, but no cool things to try out :( 14:23
ooh, does perl6 use bignum by default? 14:26
ruoso slavik, it uses something that can be extended to the size it needs... 14:27
slavik I see, cool
I almost peed my pants just now ... 14:28
14:30 [particle] joined
pasteling "slavik" at 67.100.227.140 pasted "factorial code" (19 lines, 2.7K) at sial.org/pbot/32226 14:30
slavik ^^
0.3 seconds for 1000!
14:38 z80ASM joined
z80ASM timtowtdi 14:38
rindolf pugs: [2..5].product 14:40
p6eval pugs: OUTPUT[*** No such method in class Array: "&product"ā¤ at /tmp/MahsFFJZ81 line 1, column 1 - line 2, column 1ā¤]
rindolf pugs: [2..5].reduce(*)
p6eval pugs: OUTPUT[*** Cannot cast from VList [VNum Infinity] to Pugs.AST.Types.VCode (VCode)ā¤ at /tmp/fnU47fha1d line 1, column 1 - line 2, column 1ā¤]
14:44 [particle]2 left
slavik hmm, how do I append things to an array? 14:45
is it @array.push?
ruoso tits
slavik ? 14:47
looks like perl5 style works :)
14:47 alanhaggai left
ruoso slavik, you probably want to take a look at the synopsis... 14:49
rindolf pugs: [*] 1 .. 4
p6eval pugs: RESULT[24]
ruoso slavik, feather.perl6.nl/syn/
slavik ruoso: I couldn't find push there :(
ruoso slavik, and also moritz_'s 5-to-6 series perlgeek.de/blog-en/perl-5-to-6/
slavik but I think I got it ... except I am getting a weird result
pugs takes a while to calculate 100,000th fibonacci term ... 14:50
or maybe it should take long
rindolf pugs: [*] 1 .. 10 14:53
p6eval pugs: RESULT[3628800]
lambdabot Title: Official Perl 6 Documentation 14:54
Title: blog | Perlgeek.de Blog :: Category Perl-5-to-6
ruoso lambdabot seems a little delayed...
slavik hmm, looks like push @array is slower in perl6 :( 14:55
much slower 14:56
ruoso slavik, pugs is a prototype perl 6, it is supposed to be slower 14:57
slavik :(
but it's awesomer :)
no, it's not a word :)
PerlJam slavik: you mean slower in pugs. How fast is it in rakudo? 14:58
slavik I haven't tried rakudo
PerlJam (or any of the other perl6 implementations for that matter)
slavik isn't rakudo the parrot based one?
hmm, pugs does use less memory than perl5 in my case 14:59
PerlJam It seems a tad premature to be measuring memory consumption and execution speed (unless you're doing so explicitly to improve a particular implementation) 15:00
slavik I am just looking at it 15:01
for comparison's sake
15:01 rindolf left
PerlJam if an implementation is in flux (granted, pugs isn't very fluxy) then whatever numbers you get will be close to meaningless. 15:02
slavik PerlJam: it satisfies my curiosity :)
PerlJam If you compare all of the perl 6 implementations, it might be useful in a gross sort of way. 15:04
slavik doesn't have rakudo installed ... yet
going to install parrot 15:10
15:18 z80ASM left
slavik ok, so I have the latest parrot installed (0.7.1) but not rakudo? 15:20
15:27 xinming_ left 15:29 jferrero left
slavik hmm, how do I compile perl6 code for parrot? 15:30
15:30 larsen_ joined
ruoso [particle], if you haven't yet seen test/30 I should recommend you looking at test/35 which is a much more complex example and now uses map and grep... 15:32
15:34 xinming joined 15:35 epoch left 15:36 pmurias joined
ruoso hi pmurias 15:36
:P
pmurias ruoso: hi 15:38
ruoso have you seen the latest evolutions ;)? 15:39
pmurias ruoso: we could implment gather/take with continuations 15:44
ruoso: btw. if you want to point someone at the smop wiki you can use www.p3rl.org/smop
ruoso cool
15:44 pmurias left 15:45 pmurias joined
pmurias All tests successfull in smop withough ugly warnnings ;) 15:45
ruoso pmurias, yes... gather/take will be implemented using continuations... my doubt is how to implement the "take" part, not the "gather" part 15:46
:)
pmurias, take a look at test/35
it's beautiful :)
it shows that the evaluation of map and grep is streamlined from the input iterator
pmurias i'll look just got back home
ruoso which means "guaranteed lazyness" ;) 15:47
pmurias every time a gather needs to fetch an element it has to save to continuation somewhere, invoke the continuation used for generating the results and take will invoke the orginal continuation 15:48
ruoso but how do take find the gather? 15:49
do we just $interpreter.continuation.back.back.back untill we get to the gather? 15:50
pmurias maybe a stack of some sort? 15:51
it would have to be thread local 15:54
ruoso a global stack doesn't seem very likely... 15:56
but if you think that way, $interpreter.continuation.back.back.back is a stack
we just need a way to find out when we reached the gather 15:57
pmurias we need also some way to attach info to frames (we could also read a register... but it's a bit hackish) 15:58
ruoso pmurias, well... the "continuation API" is supposed to provide that kind of information 16:02
pmurias ruoso: isn't "local @Something::GATHER" enough
ruoso that's not very concurrency friendly 16:03
16:03 alanhaggai joined 16:07 eternaleye left
ruoso pmurias, it's important to realize that each thread will have its own interpreter instance, but the global namespace is still the same, and lexical scopes might point to the same outer... 16:07
pmurias ruoso: found it ;) we could use a contextual variable 16:08
ruoso heh... we
well
a context var simply means $continuation.back.back.back...
pmurias food& 16:09
ruoso then we still need to find out when that back is the gather
that problem is actually very similar to the problem on how "return" should work 16:11
since take is like a special kind of return
pmurias return throws a control exception 16:17
16:17 epoch joined
epoch witchcraft says I 16:20
16:20 epoch left 16:22 alc joined
alc /join #haskell 16:22
16:23 alc left
pmurias ruoso: take could throw a control exception and gather could catch and resume it but it would require implementing exceptions in smop 16:25
ruoso pmurias, maybe it's time to do it 16:29
16:29 Front_slash joined
pmurias ruoso: could be, we workaround the lack of exceptions already in some places 16:40
(in the unknown method at least)
ruoso but I mean... if "return" should be implemented in terms of exceptions... it's probably the time to implement it 16:43
pmurias yes 16:46
return and warn are implemented are meant to be implemented in terms of exceptions, but the compiler if free to optimise
ruoso alright then... let's start designing the exception model ... 16:47
what I have thought so far is having a "jail" property in the continuation, which, if defined, should decide if and how to handle the exception... 16:48
pmurias maybe CATCH or catch instead of jail? 16:51
ruoso: will we have a mold frame for every block? 16:52
ruoso maybe... 17:01
but we can't count on that...
but we almost certainly will have more than one frame for a routine
pmurias ruoso: Perl 6 has both a CONTROL and CATCH S04:788 17:02
ruoso: context() and exceptions seem to work at per block glanularity 17:03
inlined subroutines might not have a frame 17:04
17:09 larsen_ left 17:15 Bzek left
pugs_svn r22300 | pmurias++ | [smop] fixed warnings 17:19
pmurias ruoso: what are the main problems with the ri DSL? 17:20
17:20 alanhaggai_ joined
pmurias (as you don't use it for new stuff) 17:21
17:21 alanhaggai left 17:23 alanhaggai_ is now known as alanhaggai
pmurias ruoso: are you implementing exceptions now, or can i work on them? 17:44
18:02 Maghnus left
ruoso pmurias, please take it 18:02
18:06 pmurias left 18:10 dennis101010_ joined
dennis101010_ www.pennergame.de/change_please/7880287/ 18:10
lambdabot Title: Pennergame
18:12 smtms joined 18:13 dennis101010_ left 18:16 Maghnus joined 18:22 kanru left 18:23 kanru joined 18:26 rindolf joined 18:32 abra left 18:35 BinGOs_ joined 18:36 BinGOs left, BinGOs_ is now known as BinGOs 18:54 eternaleye joined, BinGOs left 18:56 pmurias joined
pmurias ruoso: why do we set to NULL stuff that will be free()d? we can run valgrind at it will warn about the use of free'd memory 18:59
19:02 BinGOs joined
pmurias ruoso: i think i'll just to some cleaning up/mild refactoring/conversion to RI DSL today, as some things are getting nasty 19:02
19:03 Maghnus left
ruoso pmurias, about the ri rsl, there's nothing specially bad about it, it's just because two of the types I created are not really conventional (they never have instances), and the other was a copy of another (grep was a copy of map) 19:10
pmurias, for some reason I think that setting NULL in pointers after the region it is pointing was freed is a good practice... but I don't have any concrete information to support that idea... 19:13
pmurias what do you think for having GET(foo) and SET(foo,...) for locked setting and getting the fields in RI's 19:24
seems a bit too smart for me so i hesitate a bit
would need GET(type,foo) to be portable to none-gcc compilers 19:30
S 19:34
19:35 pmurias left 19:39 pmurias joined
pmurias confused ips and halt'ed his computer accidently 19:40
19:44 Maghnus joined
smtms pmurias, you ssh'ed to your own computer? :-) 19:45
wknight8111 extra super security 19:46
19:47 ruoso left
pmurias smtms: yes 19:52
smtms some people use names instead of IP's :-) 19:53
pmurias is too lazy
20:03 yahooooo joined
smtms w/in 7 20:03
20:07 sri_work joined 20:10 Limbic_Region joined 20:12 pmurias left 20:24 mncharity joined 20:33 pmurias joined 20:34 pmurias left 20:38 eternaleye left 20:43 eternaleye joined 20:50 rindolf left
slavik I have parrot installed, where do I get rakudo? 20:52
wknight8111 it comes with parrot
slavik hmm ... 20:53
wknight8111 /languages/perl6
pugs_svn r22301 | Whiteknight++ | [Book] A few small changes for readability and flow. Remove some trailing whitespace 20:54
slavik hmm, I guess rakudo wasn't compiled and installed in my path when I did make reallyinstall 20:55
20:57 yahooooo left
slavik I need help getting rakudo installed/compiled/etc ... 21:17
I ran make on parrot and I have it installed systemwide ... but no rakudo :( 21:18
21:19 larsen_ joined
wknight8111 you can build rakudo with "make perl6" 21:22
that should create a perl6 executable file, which you should be able to install manually
slavik ty
wknight8111 if you have the time, you could ask around in irc.perl.org/#parrot, they might know more about the installation process 21:24
slavik wknight8111: that worked, thanks ...
although my perl6 code gives a wrong result with pugs :( 21:25
moritz_ the usual way to write bug reports for pugs is to submit failing test cases 21:26
slavik oops, my fault
it's wrong in parrot
pugs is correct
hmm, I think parrot might not be doing bigint stuff when needed 21:27
21:28 sri_work left
wknight8111 yeah, Parrot doesn't have a working bigint implementation, I don't think 21:28
or maybe they do but it's immature
slavik I don't think it's there
I am doing 100! and it outputs way more numbers than it should 21:29
21:29 jfredett_ joined
slavik on my system, it happens at 22! 21:30
looks like pugs is more complete at this point ...
moritz_ yes, pugs is more feature complete 21:33
slavik is there like a checklist of what is (not)availabe in pugs? 21:34
moritz_ not really 21:37
slavik now I just wish pugs was faster ^^ 21:38
moritz_ did you build a recent version? 21:39
21:40 mncharity left
slavik I used the cabal install system 21:40
6.2.13.11
21:40 jfredett left
moritz_ that should be fairly up-to-date 21:41
slavik when i say slow, i am comparing it to perl5 21:42
1000! in perl5 is 0.15sec, in pugs, it's 0.3sec
moritz_ ah well, I'd expect the difference to be much larger, actually
slavik and generating a fibonacci sequence is eve slower 21:43
moritz_ it's hardly fair to compare pre-release software with mature, 14 year old software ;) 21:46
slavik I know 21:47
but I was curious
moritz_ aye 21:48
slavik although I dislike =$*IN for STDIN 21:52
21:52 BinGOs left
slavik <> was much nicer ... 21:52
pugs_svn r22302 | Whiteknight++ | [Book] Add some clarificaitons about named parameters. Make some other small fixes here and there. 21:53
wknight8111 Pugs is more feature complete, but it's not maintained as actively anymore 21:54
plus, Parrot and Rakudo are being developed at a very fast pace
slavik as compared to?
k 21:55
I guess I'll wait some more :)
21:59 BinGOs joined 22:04 BinGOs left 22:07 yahooooo joined 22:09 BinGOs joined 22:14 BinGOs left 22:17 BinGOs joined 22:34 ab5tract joined 22:39 larsen_ left 22:49 BinGOs left 23:15 eternaleye_ joined 23:28 eternaleye left 23:54 calin joined