Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-09-07

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:18 a-jing joined #perl6
00:18 a-jing left #perl6
00:21 Jedai joined #perl6
00:24 cognominal joined #perl6
01:52 jfredett_ joined #perl6
02:06 alester joined #perl6
02:11 jfredett joined #perl6
02:17 [particle]1 joined #perl6
02:41 jfredett_ joined #perl6
02:48 jfredett_ joined #perl6
02:49 sail0r joined #perl6
02:53 sail0r left #perl6
02:59 sail0r_ joined #perl6
03:01 sail0r_ wtf
03:01 sail0r_ left #perl6
03:01 elmex_ joined #perl6
03:03 simcop2387 joined #perl6
03:04 sail0r_ joined #perl6
03:05 sail0r_ left #perl6
03:16 jfredett joined #perl6
03:21 alanhaggai joined #Perl6
03:24 pugs_svn r22175 | lwall++ | [rx.t] previous change left unbalanced parens, oops, TimToady-- TimToady--
03:25 Auzon TimToady: You're going to talk at the ACM conference at U of I, aren't you?
03:29 TimToady yes
03:30 Auzon I don't know what your talk is about yet, but I thought it was cool that you were coming to campus :)
03:37 TimToady well, they keep asking me what my talk is about, and I haven't told 'em yet.  :)
03:38 Auzon I'm one of "them" (ACM, not conference organizers), but I won't bother you.
03:38 TimToady at the moment I'm distracted by trying to figure out if there should be a "where" infix
03:39 TimToady I've got some tests that look like eval() ~~ Failure where /some message/
03:39 TimToady currently STD parses it as merely a refinement of the type name
03:39 justatheory joined #perl6
03:40 TimToady maybe that's good enough
03:40 TimToady the problem is that I need a version of & that short circuits
03:40 TimToady I can say something like eval() ~~ Failure & /some message/
03:41 TimToady but that doesn't guarantee that the Failure is tested first
03:41 TimToady otoh, eval() ~~ Failure && /some message/ doesn't have the right semantics
03:42 TimToady (or even the right precedence)
03:42 TimToady but eval() ~~ (Failure && /some message/) doesn't work either
03:42 Auzon So infix:<where> would add more conditions to the smartmatch?
03:42 TimToady no
03:43 TimToady it would add more conditions to the pattern
03:43 TimToady has to bind tigher than ~~
03:43 TimToady *tighter
03:43 TimToady but it has uses that don't involve ~~ directly
03:43 TimToady pattern arguments to functions that will use smartmatch internally for instance
03:44 TimToady context(Label where 'FOO') for instance, or whatever the syntax is
03:44 TimToady maybe that's a bad example, since contexts aren't labels
03:47 TimToady but also maybe things like grep Int where 0..10, @list
03:47 TimToady and maybe things like grep 0..10 where .odd, @list
03:47 TimToady where the left of the where is not a traditional typename
03:48 TimToady which is why I think a general &&-ish infix "where" is more useful than just refining typenames
03:48 TimToady otherwise you'd have to say
03:49 TimToady grep Int where 0..10 where .odd, @list
03:49 TimToady which isn't that bad, but maybe is not conducive to duck typing
03:50 Auzon It sounds pretty useful in the generic case.
03:50 TimToady but then I can't come up with a good precedence for it, because it'd want to be tighter than ~~, so I can't make it the same as &&
03:51 TimToady maybe same as &, though that's a bit counterintuitive with | which would be looser
03:52 apeiron joined #perl6
03:52 TimToady other the other hand, pretty easy to explain as an ordered junction, perhaps
03:53 TimToady and I'd like to get rid of the special case on typenames that I just kludged in
03:55 TimToady I guess I'll try that and see how things parse
03:56 Auzon You just made me think of another area for testing, oddly enough
03:58 eternaleye joined #perl6
03:59 pugs_svn r22176 | Auzon++ | [TASKS] added some tasks for bitwise operations. I'll get to this this week unless someone snatches them up first.
04:21 pugs_svn r22177 | lwall++ | [STD] trying "where" as Junctional infix resembling "&", but with order guaranteed
04:22 speckbot r14580 | larry++ | "where" as Junctional infix resembling "&", but with order guaranteed
04:24 TimToady note to pugs/parrot implementors, should be easy to clone & into a where operator, at least syntactically
04:53 apeiron_ joined #perl6
05:16 Maghnus joined #perl6
05:19 sail0r joined #perl6
05:20 sail0r left #perl6
05:25 Psyche^ joined #perl6
06:11 smtms_ joined #perl6
06:26 pmichaud TimToady: I don't see a problem with 'where' as a Junctional infix in rakudo.  :-)
06:29 sri_work joined #perl6
06:41 Ehtyar joined #perl6
07:09 sail0r_ joined #perl6
07:18 clkao_ joined #perl6
07:23 clkao_ joined #perl6
07:24 clkao_ joined #perl6
07:24 sail0r_ left #perl6
07:35 charsbar_ joined #perl6
07:48 a-jing joined #perl6
07:48 a-jing left #perl6
07:53 charsbar joined #perl6
08:03 tmwnn joined #perl6
08:06 charsba__ joined #perl6
08:15 Myoma joined #PERL6
08:20 iblechbot joined #perl6
08:33 charsbar joined #perl6
08:46 barney joined #perl6
09:13 zamolxes joined #perl6
09:20 PZt joined #perl6
09:55 pmurias joined #perl6
10:13 pugs_svn r22178 | moritz++ | [t/spec] unfudged a test for rakudo
10:24 meppl joined #perl6
10:26 pmurias joined #perl6
10:26 pmurias ruoso: hi
10:40 larsen joined #perl6
11:34 pmurias audreyt: is more pugs development planned once ghc 6.10.1 is released?
11:53 smk_ joined #perl6
11:53 DJ-DONGDOT joined #perl6
12:05 pugs_svn r22179 | pmurias++ | [pugs-m0ld] basic functions calls with only positionals and integer literals
12:09 smk_ left #perl6
12:19 wknight8111 joined #perl6
12:28 elmex_ joined #perl6
12:29 jan_ joined #perl6
12:30 pmurias ruoso: is ::Code really Code in the lexical pad/global namespace?
12:52 a-jing joined #perl6
12:53 a-jing left #perl6
13:09 rakudo_svn r30856 | moritz++ | [rakudo] implement Str.rindex, bacek++. Closes RT #58308
13:09 rakudo_svn r30856 | moritz++ | Patch courtesy by Vasily Chekalkin <bacek at bacek.com>
13:16 audreyt pmurias: yes.
13:18 Myoma joined #PERL6
13:28 pmurias audreyt: good ;)
13:33 DJ-DONGDOT I think Perl6 should use : than ::  , so we can write something like `use Win32::Exe, strict, CGI;`
13:33 pmurias audreyt: how do you think should context be specified in mold? as part of the method call opcode or as another method call eq. $foo.bar(42).List for list context?
13:36 pmurias DJ-DONGDOT: could you rephrase your suggestion, how does using : instead of :: allow you to use several modules in 1 line?
13:36 pmurias DJ-DONGDOT: use strict is a default in Perl 6 by the way
13:38 DJ-DONGDOT pmurias: like in Pascal, Delphi. So we can write `uses windows, etc1, etc2`
13:38 DJ-DONGDOT I think Perl6 should steal that cool stuff from Delphi
13:40 DJ-DONGDOT pmurias: so in Perl6 we can write like `use Win32:exe, PAR:Packer, etc;`
13:40 pmurias and if the modules take arguments
13:41 pmurias use Win32::Exe <>,strict <>?
13:42 DJ-DONGDOT no problem, `use CGI 'fatalsToBrowser', Win32:Exe;` should works. (but maybe we Perl6 should add new keyword: `uses`)
13:43 pmurias adding a new keyword for a minor syntactic convenience dosn't seem worth it
13:44 DJ-DONGDOT or maybe we should just existing `use` keyword
13:44 pmurias and using : instead of :: would confilict with use CGI:from<perl5>
13:44 audreyt pmurias: either as part of the opcode or as an implicit interpreter state
13:45 audreyt also $foo.bar(42).List does not give "want" in &bar a hint abot listness -- rather it expects an item to come out of it
13:46 pmurias ruoso wants to do it the Contextual::Return way
13:47 DJ-DONGDOT or maybe we should just existing `use` keyword, with additional features taken from Delphi & Pascal like `uses`
13:49 audreyt pmurias: you mean constructing many many closures?
13:49 audreyt that is valid
13:49 audreyt just expensive
13:49 audreyt if ruoso thinks it can be made nonexpensive, that's excellent
13:50 pmurias how does context work with multis?
13:50 audreyt they don't, at least iirc. digging
13:51 audreyt S12:1027
13:51 audreyt Therefore return-type tiebreaking need not be supported
13:51 audreyt in 6.0.0 unless some enterprising soul decides to make it work.
13:52 audreyt so multi tiebreaking happens first using incoming params
13:52 audreyt and then context is applied to the winner
13:52 audreyt and if ambiguous (two or mo candidates with equal validity), no context match is done, it's simply anerror
13:52 audreyt =cut
13:53 ruoso audreyt, the thing is that few objects actually implement contextual return
13:54 ruoso and this objects can have low-level implementations
13:54 ruoso and thus not requiring new closures all the time...
13:54 ruoso most objects use the contextual properties of other types
13:56 ruoso hi pmurias
13:56 audreyt ruoso: that is correct
13:56 pmurias ruoso: hi
13:56 ruoso pmurias, I don't know if code is being registered in the namespace
13:56 ruoso but feel free to add it
13:57 pmurias it is, but i was wondering if it is registered as Code or as ::Code
13:57 ruoso oh..
13:57 ruoso that was something I've been wondering
13:57 ruoso maybe the Class should be registered as Code
13:57 ruoso and the package as Code::
13:58 ruoso since you need to have a way to access both the package and the class
14:00 pmurias swimming&
14:00 * ruoso . o O ( the use of low-level objects interchangeably with high-level objects is indeed the most important aspect of SMOP )
14:10 rhr_ joined #perl6
14:20 jferrero joined #perl6
14:28 ruoso audreyt, about using context as part of the multi dispatch, I've been thinking that the context could be set in the capture... that should be enough to implement it...
14:29 wknight8111 joined #perl6
14:37 jferrero joined #perl6
14:47 pugs_svn r22180 | ruoso++ | [smop] specific test for array iterator...
15:03 pugs_svn r22181 | ruoso++ | [smop] starting the code for the array iterator...
15:12 [particle] joined #perl6
16:09 jan_ joined #perl6
16:36 sail0r joined #perl6
16:44 pugs_svn r22182 | moritz++ | [t/spec] tests for rindex on non-strings (Int, in this case)
16:54 pmurias joined #perl6
16:54 pmurias re
17:02 ruoso pmurias, re?
17:03 pmurias i always assumed re is something like rehi, but i might be wrong ;)
17:04 ruoso heh...
17:04 pmurias http://irclog.perlgeek.de/​perl6/2008-08-01#i_419120
17:04 lambdabot Title: IRC log for #perl6, 2008-08-01
17:05 ruoso geez... my memory sux... I can't really remember that conversation...
17:05 ruoso heh
17:06 pmurias ruoso,audreyt: what sort of context do multi's enforce?
17:06 ruoso pmurias, that's the point where the context is not really determined...
17:07 pmurias like multi foo($a is rw) {...};multi foo($a is ro) {...};foo(bar());
17:07 ruoso it's only determined after the signature .ACCEPTS the capture
17:07 pmurias but it can't choose the right variant before determining the right context
17:08 ruoso it only happens as late as possible
17:08 pmurias if bar has a want check at top
17:08 ruoso that's why forward context propagation is not always possible
17:08 pmurias you have a big problem
17:09 ruoso and that's why I'm using late context propagation in SMOP
17:09 pmurias context *could* be junctions
17:09 * ruoso afraid...
17:12 pmurias or we could throw an ambiguous use of context exception
17:13 pmurias or use a context general enough to cover all variants (assuming contexts form a hierarchy)
17:13 meppl joined #perl6
17:14 * ruoso really would like to see "want" dropped...
17:14 ruoso or "want" could cause the code to be suspended and only continued after the context is effectively defined
17:15 rakudo_svn r30860 | pmichaud++ | [rakudo]: spectest-progress.csv update: 158 files, 3287 passing tests
17:15 pmurias you mean create a deadlock...
17:15 ruoso heh...
17:15 Auzon the spectest graph on rakudo.de is highly amusing.
17:16 moritz_ indeed ;)
17:17 moritz_ that was the back-and-forth with the regex tests
17:17 Auzon heh, even more amusing with the latest update. I only saw the first spike on my first pageload
17:18 ruoso pmurias, but the fact is that sometimes you simply doesn't have a way to predict the context...
17:18 ruoso like in...
17:18 ruoso my $a = \foo()
17:18 moritz_ Auzon: well, TimToady rewrote the +700 regex tests inline into a file, and deleted the old one that read them line by line...
17:19 moritz_ Auzon: and due to the change in the file name the tests were run on friday, but not saturday
17:19 pmurias ruoso: yes, captures have to create thunks
17:19 moritz_ then I fudged the new tests and included them in spectest_regression, so here we are again ;)
17:20 Auzon I see. I heard something about that, but I was randomly adding tests for .trans on Friday
17:20 pmurias food&
17:21 moritz_ Auzon: did you already submit your code to google? (I think I've asked that before, not sure...)
17:21 Auzon No, I plan on doing that today
17:21 moritz_ good
17:21 rakudo_svn r30861 | pmichaud++ | [rakudo]:  Add 'fail' function.
17:22 Auzon I'm going to have to look back and see how we decided to send in my code.
17:23 moritz_ bbl
17:23 Auzon ok
17:29 jferrero joined #perl6
17:31 larsen joined #perl6
17:31 moritz_ back, faster than thought
17:32 moritz_ Auzon: Google wants both runnable code and know what *you* did
17:32 moritz_ Auzon: so I suggest you send in a copy of t/ before and after your project, and a series of patches that you extract from svn
17:33 Auzon OK.
17:33 moritz_ maybe also check with [particle], but I think that should be fine
17:34 moritz_ (and if not the google folks will surely tell you what else they want)
17:34 Auzon Yeah, sounds good.
18:02 eternaleye_ joined #perl6
18:02 pugs_svn r22183 | ruoso++ | [smop] implementing the array iterator... some weirdness is still happening, the test is still failing... but it is mostly working
18:10 ruoso pmurias, how do I compile with debug information using cmake?
18:11 pugs_svn r22184 | ruoso++ | [smop] implementing destroyall on the array iterator
18:15 pmurias i used set(CMAKE_C_FLAGS "-fprofile-arcs -ftest-coverage -O0") to have gcov
18:16 eyu joined #perl6
18:22 moritz_ std: "abc"
18:23 p6eval std 22184: OUTPUT[syntax error at tryfile line 13, near "print"␤Execution of tryfile aborted due to compilation errors.␤]
18:24 p6eval joined #perl6
18:24 moritz_ std: "abc"
18:24 p6eval std 22184: OUTPUT[parsed␤]
18:24 moritz_ std: "abc" "cde"
18:24 p6eval std 22184: OUTPUT[parse failure␤]
18:24 eternaleye_ joined #perl6
18:28 abra joined #perl6
18:29 xuser joined #perl6
18:42 eyu std: "abc"
18:43 p6eval std 22184: OUTPUT[parsed␤]
18:43 eyu std: "abc" "cde"
18:43 p6eval std 22184: OUTPUT[parse failure␤]
18:46 eternaleye_ joined #perl6
19:01 jferrero joined #perl6
19:03 eyu100 joined #perl6
19:04 eyu100 ?eval say "hello!"
19:04 eyu100 eval say "hello!"
19:04 moritz_ pugs: say "hello!"
19:04 p6eval pugs: OUTPUT[hello!␤]
19:04 eyu100 pugs: say "hello!"
19:04 p6eval pugs: OUTPUT[hello!␤]
19:04 eyu100 pugs: say 5 + 5
19:04 p6eval pugs: OUTPUT[10␤]
19:05 eyu100 pugs: use v6;
19:05 p6eval pugs: RESULT[undef]
19:11 eternaleye joined #perl6
19:22 alester joined #perl6
19:56 rlb3 joined #perl6
20:00 pmurias pugs: say((1,2,3),(4,5,6))
20:00 p6eval pugs: OUTPUT[123456␤]
20:00 pmurias pugs: say([1,2,3],(4,5,6))
20:00 p6eval pugs: OUTPUT[1 2 3456␤]
20:01 pmurias pugs: sub f {(1,2,3};say(f(),(4,5,6))
20:01 p6eval pugs: OUTPUT[*** ␤    Unexpected "};"␤    expecting "_", fraction, exponent, term postfix, operator or ")"␤    at /tmp/E8oi5HJmCl line 1, column 14␤]
20:01 pmurias pugs: sub f {(1,2,3)};say(f(),(4,5,6))
20:01 p6eval pugs: OUTPUT[123456␤]
20:01 * pmurias should use his own copy of pugs instead of abusing evalbot
20:08 wknight8111 joined #perl6
20:17 pugs_svn r22185 | pmurias++ | [smop]
20:17 pugs_svn r22185 | pmurias++ | unbroke m0ld
20:17 pugs_svn r22185 | pmurias++ | changed the example s1p code to take an iterpreter and a scope
20:17 justatheory joined #perl6
20:18 eternaleye joined #perl6
20:26 pugs_svn r22186 | pmurias++ | [pugs-m0ld] pugs -Cm0ld compiles 'say 42', it needs runtime support
20:29 pmurias ruoso: we now need runtime support to have "say 42" working ;)
20:35 wknight8111 joined #perl6
21:40 meppl joined #perl6
21:44 moritz_ std: m bab
21:44 p6eval std 22186: OUTPUT[parsed␤]
21:50 wolverian TimToady, S09 Parallelized parameters and autothreading could show the tensor multiplication written out in concrete form (as motivation?)
21:55 rakudo_svn r30864 | moritz++ | [rakudo] parse m/.../ and similar regex forms. Closes RT #57346
22:24 ruoso @tell pmurias, we do have runtime support to have "say 42" working, don't we?
22:24 lambdabot Consider it noted.
22:26 wknight8111 joined #perl6
22:37 rakudo_svn r30867 | moritz++ | [rakudo] tools/autounfudge.pl: add --exclude options and exclude long running
22:37 rakudo_svn r30867 | moritz++ | and looping tests by default
22:47 Choco-ail joined #perl6
22:59 Auzon rakudo: say 1 if "foo" ~~ m/oo/
22:59 p6eval rakudo 30867: OUTPUT[1␤]
22:59 Auzon rakudo: say 1 if "foo" ~~ m[oo]
22:59 p6eval rakudo 30867: OUTPUT[1␤]
23:00 moritz_ rakudo: say 1 if "foo" ~~ m boob
23:00 p6eval rakudo 30869: OUTPUT[1␤]
23:00 moritz_ that's the weird side of perl ;)
23:01 Auzon and that's allowed now?
23:01 moritz_ seems so, yes
23:01 moritz_ STD.pm parses it
23:02 moritz_ and I couldn't find a restriction in S02 on what is allowed as a quote delimiter
23:02 moritz_ std: say 1 if "foo" ~~ m boob
23:02 Auzon well, # isn't allowed
23:02 moritz_ right
23:02 p6eval std 22186: OUTPUT[parsed␤]
23:02 moritz_ and : isn't either, iirc
23:02 moritz_ but no other restriction, afaict
23:03 moritz_ (I fixed the std: evalbot target with some small hacks and black permission magic
23:03 moritz_ )
23:03 Auzon :)
23:03 Auzon I saw that
23:04 Auzon Whenever I tried it, it seemed to work ok for a bit then permissions got reset :-/
23:04 moritz_ basically it sets lex/* to be 0775, and to a common group of evalenv and evalbot
23:04 moritz_ the trick is to use umask in the tryfile
23:04 Auzon If you say so :)
23:04 moritz_ so that newly generated files also have the right permission
23:05 moritz_ well, let's see if it still works in two weeks
23:05 moritz_ if yes, I claim success ;)
23:05 Auzon Will it break if tryfile is updated?
23:05 moritz_ perhaps
23:06 moritz_ maybe I should take a copy with a different name
23:06 moritz_ my local copy doesn't even print a parse tree;
23:06 moritz_ it just does 'my $result = eval { # parse here; 1 }'
23:06 Auzon Yeah, a copy would be good, to prevent accidental overwrites
23:07 moritz_ anyway, it's 1 am here and I need to go to bed :/
23:07 moritz_ I can fix that tomorrow....
23:07 Auzon See you :)
23:07 moritz_ bed&
23:14 eternaleye joined #perl6
23:45 ruoso joined #perl6
23:57 sri_work_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo