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