Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 kanru joined #perl6
00:19 wknight8111 joined #perl6
01:13 pugs_svn r22289 | ruoso++ | [smop] Array.unshift implemented.
01:56 BinGOs joined #perl6
01:59 Pnz joined #perl6
02:12 wknight8111 joined #perl6
02:19 xinming joined #perl6
02:20 cognominal joined #perl6
02:36 hercynium joined #perl6
02:39 BinGOs joined #perl6
02:56 pugs_svn r22290 | bacek++ | [spec] Replace many 'skip' with 'todo' for rakud. moritz++ for autounfudge
03:02 elmex_ joined #perl6
03:17 [particle] joined #perl6
03:25 eternaleye joined #perl6
03:40 [particle]1 joined #perl6
03:45 [particle]2 joined #perl6
04:14 Ontolog what the hell IS smop?
04:15 PerlJam simple meta object protocol  (I think)
04:23 Ontolog what is the point of that mop stuff
04:24 Ontolog what does it make easier?
04:27 epoch joined #perl6
04:44 justatheory joined #perl6
04:47 Ontolog I hope someone can take a look at the latest of my bitching and moaning on perl6-compiler
04:53 hercynium purl, smop?
04:54 hercynium hmm, she's not here
05:01 PerlJam Ontolog: see http://search.cpan.org/~drolsky/Class-MOP-0.65/lib/Class/MOP.pm
05:01 lambdabot Title: Class::MOP - A Meta Object Protocol for Perl 5 - search.cpan.org
05:02 xinming_ joined #perl6
05:04 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:05 PerlJam er, ... instead of split(_,Sub,Int)
05:06 PerlJam or something
05:09 Ontolog I sent split(String,Sub,Int) and split(String) got invoked instead of split(_,Sub)
05:09 Ontolog but
05:09 Ontolog when I sent split(String,Sub), split(_,Sub) gets invoked
05:09 Ontolog spooky? yes
05:12 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:15 PerlJam well, maybe it's not the sorter but the matcher that's faulty
05:16 PerlJam (yes, I'm clinging to the not-so-rational belief that the dispatcher is the problem and not something else :-)
05:21 Ontolog well parrot hasn't reached a 1.0 yet so it could very well be the dispatcher...
05:21 Ontolog i'm not so familiar with it all to know
05:23 PerlJam Hmm. pdd27 says that those parameters that participate in multiple dispatch are marked with :invocant
05:24 PerlJam I don't recall seeing that at all in the split() multis
05:24 xinming joined #perl6
05:24 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:26 PerlJam of course ... the only place :invocant is mentioned is pdd27 and pirc and imcc.
05:26 PerlJam (i.e. no other pir files use it)
05:31 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:37 xinming_ joined #perl6
05:50 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 PerlJam enough random musing for me, it's time for bed.
05:51 * PerlJam &
05:55 Psyche^ joined #perl6
06:12 Bzek joined #perl6
06:40 aindilis joined #perl6
06:55 eternaleye joined #perl6
07:02 kanru joined #perl6
07:14 Tene joined #perl6
07:26 Tene joined #perl6
07:35 sri_work joined #perl6
07:38 pugs_svn r22291 | moritz++ | [t/spec] unfudged a passing TODO test
07:40 pugs_svn r22292 | moritz++ | [t/spec] more fudge fiddling
07:46 BinGOs joined #perl6
07:55 pugs_svn r22293 | moritz++ | [t/spec] some fudge fiddling
08:06 rakudo_svn r31285 | moritz++ | [rakudo] make tools/autounfudge.pl work in parallel, bacek++
08:06 rakudo_svn r31285 | moritz++ | Patch courtesy by Vasily Chekalkin
08:13 kanru joined #perl6
08:21 drbean joined #perl6
08:36 pugs_svn r22294 | moritz++ | [t/spec] simple split tests
08:36 pugs_svn r22295 | moritz++ | [t/spec] svn props for split-simple.t
08:40 jan_ joined #perl6
08:45 pugs_svn r22296 | moritz++ | [t/spec] more simple split tests
08:46 rakudo_svn r31286 | moritz++ | [rakudo] add split test to spectest_regression
08:53 Ontolog joined #perl6
08:57 pugs_svn r22297 | moritz++ | [t/spec] more split tests
09:23 iblechbot joined #perl6
09:47 masak joined #perl6
09:54 smg joined #perl6
10:04 zamolxes joined #perl6
10:47 Lichtkind joined #perl6
10:49 Lichtkind are there ideas how to write optional named parameters ?:name or :?name ?
10:53 ruoso Ontolog, http://www.perlfoundation.org/perl6/index.cgi?smop
10:53 lambdabot Title: SMOP / Perl 6
11:02 rindolf joined #perl6
11:02 rindolf Hi all.
11:04 cotto_w0rk joined #perl6
11:05 rindolf I'm trying to run http://svn.openfoundry.org/pugs/examples/qotw/008e/graham.pl using Rakudo - {{ ../../parrot perl6.pbc ./graham.p6 }} but I'm getting {{ Statement not terminated properly at line 7, near "(@$n,@$m)." }}
11:07 masak rindolf: hi
11:07 rindolf Hi masak
11:07 masak rindolf: seems @$foo conversion is not implemented in Rakudo yet.
11:07 rindolf masak: ah.
11:08 rindolf Hmmmm....
11:08 masak patches welcome :)
11:08 rindolf masak: OK.
11:09 rindolf 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:28 Psyche^ joined #perl6
11:48 kanru joined #perl6
12:23 slavik joined #perl6
12:24 wknight8111 joined #perl6
12:38 alanhaggai joined #Perl6
12:39 abra joined #perl6
12:46 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:55 slavik 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
13:11 * ruoso is assuming that there is no slice view of a grep...
13:12 Lichtkind_ joined #perl6
13:12 Lichtkind_ joined #perl6
13:17 pugs_svn r22298 | ruoso++ | [smop] starting grep implementation... almost working...
13:30 Lichtkind_ TimToady: how to spell optional named  parameters?
13:31 agentzh left #perl6
13:31 ruoso Lichtkind_, named parameters are optional by default
13:32 Lichtkind_ thanks ruoso++
13:32 ruoso :)
13:32 Lichtkind_ ruoso: and when there ar erequired put an ! at the end?
13:32 ruoso iirc, yes
13:32 ruoso but consider taking a look at s06
13:33 Lichtkind_ ruoso: i did bit if i write about it i want to get shure
13:33 Lichtkind_ what means iirc?
13:35 ruoso if i recall correctly
13:36 slavik are there gtk binding for perl6?
13:36 Lichtkind_ i dont know of any
13:36 Lichtkind_ also no wx
13:36 pugs_svn r22299 | ruoso++ | [smop] YAY! YAY! we do have map and grep now!
13:36 pugs_svn r22299 | ruoso++ | test/35 is the m0ld version of the following code
13:36 pugs_svn r22299 | ruoso++ | map { $_ > 3 ?? print "not ok - item > 3\n" !! print "ok - item < 3\n" },
13:36 pugs_svn r22299 | ruoso++ |  grep { print "ok - grep iteration"; $_ < 3 } 2..5;
13:36 slavik what is the accepted extension for perl6 code?
13:37 Lichtkind_ slavik: you extend parrot not in perl 6
13:37 slavik is it pl or something else?
13:37 slavik ?
13:37 Lichtkind_ there is an OGL binding in Parrot
13:37 slavik ahh
13:37 slavik ok
13:37 Lichtkind_ just look how they done it
13:37 * ruoso later &
13:38 Lichtkind_ bye
13:42 jiing joined #perl6
13:47 ruoso pugs: say map { $_ ==  3; fail } 1..5;
13:47 p6eval pugs: OUTPUT[*** ␤    Unexpected "1"␤    expecting ",", ":" or operator␤    at /tmp/CwvXZYl6BH line 1, column 28␤]
13:47 ruoso pugs: say map { $_ ==  3; fail }, 1..5;
13:47 p6eval pugs: No output (you need to produce output to STDOUT)
13:47 Ontolog what's up with nobody responding to my perl6-compiler mails! waaaaaah!
13:48 Ontolog i'm not sure what to work on while i'm blocked with my issue
13:48 agentzh joined #perl6
13:48 ruoso Ontolog, maybe your questions are too hard ;)
13:49 jferrero joined #perl6
13:50 masak Ontolog: better learn to handle not being replied to _now_, before the phenomenon disappoints you even more.
13:50 masak this is a volunteer-driven project. people respond if they have time, and feel that they can add anything
13:56 * ruoso very happy! SMOP is the first implementation to have lazy map and grep :)
13:57 * ruoso starting to think about how to implement gather/take now...
13:58 ruoso pugs: map { say $_ }, map { $_ ==  3; fail }, 1..5;
13:58 p6eval pugs: No output (you need to produce output to STDOUT)
14:07 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:10 slavik what should I use for source code though?
14:11 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:11 slavik in case I put it all in the same directory with shell scripts and such
14:11 ruoso that's not the role of the file name...
14:12 ruoso but you *can* use .pl in the end
14:12 ruoso if that helps you...
14:12 ruoso but in the unix world that is completely unnecessary...
14:12 slavik ruoso: I know
14:13 slavik ruoso: people put .sh at the end of shell script filenames though :)
14:13 ruoso mostly they don't
14:13 ruoso just take a look of how many shell scripts you have in your /usr/bin without .sh in the name
14:13 ruoso the same for perl scripts
14:14 ruoso and for any other language, actually
14:14 slavik true, but we are people :)
14:14 ruoso I'm not sure I see your point...
14:23 slavik well, I got pugs installed, but no cool things to try out :(
14:25 slavik ooh, does perl6 use bignum by default?
14:26 ruoso slavik, it uses something that can be extended to the size it needs...
14:26 slavik I see, cool
14:28 slavik I almost peed my pants just now ...
14:29 [particle] joined #perl6
14:29 pasteling "slavik" at 67.100.227.140 pasted "factorial code" (19 lines, 2.7K) at http://sial.org/pbot/32226
14:30 slavik ^^
14:30 slavik 0.3 seconds for 1000!
14:37 z80ASM joined #perl6
14:38 z80ASM timtowtdi
14:39 rindolf pugs: [2..5].product
14:39 p6eval pugs: OUTPUT[*** No such method in class Array: "&product"␤    at /tmp/MahsFFJZ81 line 1, column 1 - line 2, column 1␤]
14:39 rindolf pugs: [2..5].reduce(*)
14:39 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 slavik hmm, how do I append things to an array?
14:44 slavik is it @array.push?
14:44 ruoso tits
14:46 slavik ?
14:46 slavik looks like perl5 style works :)
14:48 ruoso slavik, you probably want to take a look at the synopsis...
14:48 rindolf pugs: [*] 1 .. 4
14:48 p6eval pugs: RESULT[24]
14:48 ruoso slavik, http://feather.perl6.nl/syn/
14:48 slavik ruoso: I couldn't find push there :(
14:49 ruoso slavik, and also moritz_'s 5-to-6 series http://perlgeek.de/blog-en/perl-5-to-6/
14:49 slavik but I think I got it ... except I am getting a weird result
14:49 slavik pugs takes a while to calculate 100,000th fibonacci term ...
14:49 slavik or maybe it should take long
14:52 rindolf pugs: [*] 1 .. 10
14:52 p6eval pugs: RESULT[3628800]
14:54 lambdabot Title: Official Perl 6 Documentation
14:54 lambdabot Title: blog | Perlgeek.de Blog :: Category Perl-5-to-6
14:54 ruoso lambdabot seems a little delayed...
14:55 slavik hmm, looks like push @array is slower in perl6 :(
14:56 slavik much slower
14:56 ruoso slavik, pugs is a prototype perl 6, it is supposed to be slower
14:56 slavik :(
14:56 slavik but it's awesomer :)
14:56 slavik no, it's not a word :)
14:58 PerlJam slavik: you mean slower in pugs.  How fast is it in rakudo?
14:58 slavik I haven't tried rakudo
14:58 PerlJam (or any of the other perl6 implementations for that matter)
14:58 slavik isn't rakudo the parrot based one?
14:58 slavik hmm, pugs does use less memory than perl5 in my case
15:00 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:00 slavik for comparison's sake
15:01 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 :)
15:03 PerlJam If you compare all of the perl 6 implementations, it might be useful in a gross sort of way.
15:03 * slavik doesn't have rakudo installed ... yet
15:09 slavik going to install parrot
15:20 slavik ok, so I have the latest parrot installed (0.7.1) but not rakudo?
15:29 slavik hmm, how do I compile perl6 code for parrot?
15:30 larsen_ joined #perl6
15:31 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:33 xinming joined #perl6
15:35 pmurias joined #perl6
15:36 ruoso hi pmurias
15:36 ruoso :P
15:38 pmurias ruoso: hi
15:38 ruoso have you seen the latest evolutions ;)?
15:43 pmurias ruoso: we could implment gather/take with continuations
15:43 pmurias ruoso: btw. if you want to point someone at the smop wiki you can use www.p3rl.org/smop
15:44 ruoso cool
15:44 pmurias joined #perl6
15:45 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:45 ruoso :)
15:45 ruoso pmurias, take a look at test/35
15:45 ruoso it's beautiful :)
15:46 ruoso it shows that the evaluation of map and grep is streamlined from the input iterator
15:46 pmurias i'll look just got back home
15:46 ruoso which means "guaranteed lazyness" ;)
15:48 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:49 ruoso but how do take find the gather?
15:49 ruoso do we just $interpreter.continuation.back.back.back untill we get to the gather?
15:51 pmurias maybe a stack of some sort?
15:54 pmurias it would have to be thread local
15:55 ruoso a global stack doesn't seem very likely...
15:56 ruoso but if you think that way, $interpreter.continuation.back.back.back is a stack
15:56 ruoso 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)
16:01 ruoso pmurias, well... the "continuation API" is supposed to provide that kind of information
16:02 pmurias ruoso: isn't "local @Something::GATHER" enough
16:02 ruoso that's not very concurrency friendly
16:03 alanhaggai joined #Perl6
16:07 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
16:08 ruoso well
16:08 ruoso a context var simply means $continuation.back.back.back...
16:08 pmurias food&
16:09 ruoso then we still need to find out when that back is the gather
16:10 ruoso that problem is actually very similar to the problem on how "return" should work
16:10 ruoso since take is like a special kind of return
16:16 pmurias return throws a control exception
16:17 epoch joined #perl6
16:20 epoch witchcraft says I
16:20 epoch left #perl6
16:21 alc joined #perl6
16:22 alc /join #haskell
16:25 pmurias ruoso: take could throw a control exception and gather could catch and resume it but it would require implementing exceptions in smop
16:28 ruoso pmurias, maybe it's time to do it
16:29 Front_slash joined #perl6
16:40 pmurias ruoso: could be, we workaround the lack of exceptions already in some places
16:40 pmurias (in the unknown method at least)
16:43 ruoso but I mean... if "return" should be implemented in terms of exceptions... it's probably the time to implement it
16:45 pmurias yes
16:46 pmurias return and warn are implemented are meant to be implemented in terms of exceptions, but the compiler if free to optimise
16:46 ruoso alright then... let's start designing the exception model ...
16:47 ruoso 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:50 pmurias maybe CATCH or catch instead of jail?
16:51 pmurias ruoso: will we have a mold frame for every block?
17:01 ruoso maybe...
17:01 ruoso but we can't count on that...
17:01 ruoso but we almost certainly will have more than one frame for a routine
17:01 pmurias ruoso: Perl 6 has both a CONTROL and CATCH S04:788
17:02 pmurias ruoso: context() and exceptions seem to work at per block glanularity
17:04 pmurias inlined subroutines might not have a frame
17:18 pugs_svn r22300 | pmurias++ | [smop] fixed warnings
17:19 pmurias ruoso: what are the main problems with the ri DSL?
17:19 alanhaggai_ joined #Perl6
17:20 pmurias (as you don't use it for new stuff)
17:43 pmurias ruoso: are you implementing exceptions now, or can i work on them?
18:02 ruoso pmurias, please take it
18:10 dennis101010_ joined #perl6
18:10 dennis101010_ http://www.pennergame.de/change_please/7880287/
18:10 lambdabot Title: Pennergame
18:11 smtms joined #perl6
18:16 Maghnus joined #perl6
18:22 kanru joined #perl6
18:26 rindolf joined #perl6
18:34 BinGOs_ joined #perl6
18:54 eternaleye joined #perl6
18:55 pmurias joined #perl6
18:58 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
19:01 BinGOs joined #perl6
19:01 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:10 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:12 ruoso 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:23 pmurias what do you think for having GET(foo) and SET(foo,...) for locked setting and getting the fields in RI's
19:23 pmurias seems a bit too smart for me so i hesitate a bit
19:30 pmurias would need GET(type,foo) to be portable to none-gcc compilers
19:34 pmurias S
19:39 pmurias joined #perl6
19:39 * pmurias confused ips and halt'ed his computer accidently
19:43 Maghnus joined #perl6
19:44 smtms pmurias, you ssh'ed to your own computer? :-)
19:46 wknight8111 extra super security
19:52 pmurias smtms: yes
19:52 smtms some people use names instead of IP's :-)
19:53 * pmurias is too lazy
20:02 yahooooo joined #perl6
20:03 smtms w/in 7
20:07 sri_work joined #perl6
20:09 Limbic_Region joined #perl6
20:23 mncharity joined #perl6
20:32 pmurias joined #perl6
20:42 eternaleye joined #perl6
20:52 slavik I have parrot installed, where do I get rakudo?
20:52 wknight8111 it comes with parrot
20:52 slavik hmm ...
20:52 wknight8111 /languages/perl6
20:53 pugs_svn r22301 | Whiteknight++ | [Book] A few small changes for readability and flow. Remove some trailing whitespace
20:55 slavik hmm, I guess rakudo wasn't compiled and installed in my path when I did make reallyinstall
21:17 slavik I need help getting rakudo installed/compiled/etc ...
21:17 slavik I ran make on parrot and I have it installed systemwide ... but no rakudo :(
21:19 larsen_ joined #perl6
21:21 wknight8111 you can build rakudo with "make perl6"
21:21 wknight8111 that should create a perl6 executable file, which you should be able to install manually
21:22 slavik ty
21:23 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 ...
21:24 slavik 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:25 slavik oops, my fault
21:25 slavik it's wrong in parrot
21:26 slavik pugs is correct
21:26 slavik hmm, I think parrot might not be doing bigint stuff when needed
21:27 wknight8111 yeah, Parrot doesn't have a working bigint implementation, I don't think
21:27 wknight8111 or maybe they do but it's immature
21:28 slavik I don't think it's there
21:28 slavik I am doing 100! and it outputs way more numbers than it should
21:28 jfredett_ joined #perl6
21:29 slavik on my system, it happens at 22!
21:30 slavik looks like pugs is more complete at this point ...
21:32 moritz_ yes, pugs is more feature complete
21:33 slavik is there like a checklist of what is (not)availabe in pugs?
21:36 moritz_ not really
21:37 slavik now I just wish pugs was faster ^^
21:39 moritz_ did you build a recent version?
21:40 slavik I used the cabal install system
21:40 slavik 6.2.13.11
21:40 moritz_ that should be fairly up-to-date
21:41 slavik when i say slow, i am comparing it to perl5
21:42 slavik 1000! in perl5 is 0.15sec, in pugs, it's 0.3sec
21:42 moritz_ ah well, I'd expect the difference to be much larger, actually
21:43 slavik and generating a fibonacci sequence is eve slower
21:45 moritz_ it's hardly fair to compare pre-release software with mature, 14 year old software ;)
21:47 slavik I know
21:47 slavik but I was curious
21:47 moritz_ aye
21:51 slavik although I dislike =$*IN for STDIN
21:51 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 wknight8111 plus, Parrot and Rakudo are being developed at a very fast pace
21:54 slavik as compared to?
21:54 slavik k
21:54 slavik I guess I'll wait some more :)
21:58 BinGOs joined #perl6
22:07 yahooooo joined #perl6
22:08 BinGOs joined #perl6
22:16 BinGOs joined #perl6
22:33 ab5tract joined #perl6
23:14 eternaleye_ joined #perl6
23:53 calin joined #perl6

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

Perl 6 | Reference Documentation | Rakudo