Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-04

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:41 GitHub23 joined #perl6
00:41 GitHub23 perl6-examples: 3David Romano master0 SHA1-9327c00
00:41 GitHub23 fixed Spoonerism
00:41 GitHub23 http://is.gd/evnC
00:41 GitHub23 left #perl6
00:45 buubot joined #perl6
01:08 fridim_ joined #perl6
01:18 Limbic_Region joined #perl6
01:26 sri_kraih joined #perl6
01:38 cyocum joined #perl6
01:57 kisu joined #perl6
02:02 kisu_ joined #perl6
02:09 maerzhase joined #perl6
02:26 pugs_svn r24752 | particle++ | [S19] get rid of illustration grammar, it's in the revision history if i need it later.
02:27 alc joined #perl6
02:36 lichtkind joined #perl6
02:48 r0bby joined #perl6
02:48 lichtkind azawawi: did you look at the translation?
02:59 s1n does splice still only operate on indices?
02:59 s1n that is, is there an easier way than the perl5 method of doing splice to remove an element in the middle of an array?
03:00 s1n (and assigning the result back to itself, that always seemed like a pain in the butt)
03:00 meppl joined #perl6
03:23 GitHub16 joined #perl6
03:23 GitHub16 perl6-examples: 3Eric Hodges master0 SHA1-25368a7
03:23 GitHub16 Adding solution for WSG Begginer 2007 #3
03:23 GitHub16 http://is.gd/evJb
03:23 GitHub16 perl6-examples: 3Eric Hodges master0 SHA1-d35112e
03:23 GitHub16 Merge branch 'master' of git@github.com:eric256/perl6-examples
03:23 GitHub16 http://is.gd/evJc
03:23 GitHub16 left #perl6
03:38 meppuru joined #perl6
04:02 elmex_ joined #perl6
04:04 s1n rakudo: my @t = <1 2 3>; push @t, 3 if !@t.exists(3);
04:04 p6eval rakudo 34906: RESULT«4»
04:04 s1n rakudo: my @t = <1 2 3>; push @t, 3 if !@t.exists(3); say @t.perl
04:04 p6eval rakudo 34906: OUTPUT«["1", "2", "3", 3]␤»
04:04 s1n uh oh, looks like a bug
04:04 s1n is this something that's being worked on already?
05:50 eric256 joined #perl6
05:50 eric256 s1n: from the comments in the code @array.exists($index) is how it is called
05:50 eric256 not a $value.. not sure about the spec though
05:51 eric256 buubot: spack exists
05:51 buubot eric256: S02-bits.pod:2 S03-operators.pod:4 S09-data.pod:2 S16-io.pod:1 S29-functions.pod:5
05:53 eric256 and S29 backs up that definition of exists
05:53 alester joined #perl6
05:55 eric256 hehe just realize i'm an hour later on that conversation ;)
05:57 eric256 rakudo: my @t = <1 2 3>; @.pairs.first({.value eq 1}).perl.say
05:57 p6eval rakudo 34911: OUTPUT«Lexical 'self' not found␤current instr.: '_block14' pc 91 (EVAL_13:46)␤»
05:57 eric256 rakudo: my @t = <1 2 3>; @t.pairs.first({.value eq 1}).perl.say
05:57 p6eval rakudo 34911: OUTPUT«0 => "1"␤»
05:57 eric256 rakudo: my @t = <1 2 3>; @t.pairs.first({.value eq 3}).perl.say
05:57 p6eval rakudo 34911: OUTPUT«2 => "3"␤»
05:58 eric256 rakudo: my @t = <1 2 3>; @t.push(3) unless @t.pairs.first({.value eq 3}); @t.perl.say;
05:58 p6eval rakudo 34911: OUTPUT«["1", "2", "3"]␤»
05:58 eric256 rakudo: my @t = <1 2 3>; @t.push(4) unless @t.pairs.first({.value eq 4}); @t.perl.say;
05:58 p6eval rakudo 34911: OUTPUT«["1", "2", "3", 4]␤»
05:58 eric256 rakudo: my @t = <1 2 3>; @t.push<4> unless @t.pairs.first({.value eq 4}); @t.perl.say;
05:58 p6eval rakudo 34911: OUTPUT«get_pmc_keyed() not implemented in class 'Integer'␤current instr.: 'parrot;Associative;postcircumfix:{ }' pc 1774 (src/classes/Associative.pir:40)␤»
06:08 eric256 oddly the spec for first and grep claim to support a Matcher object...but a Matcher is speced as a Item | Junction
06:08 eric256 not a sub at all
06:08 eric256 in fact the definition for matcher specifies that it should act like its on the RHS of a ~~
06:09 * eric256 wonders what a block does on the RHS of ~~  and goes to find out
06:22 phil joined #perl6
06:26 meteorjay joined #perl6
06:29 azawawi left #perl6
06:30 buu Hrm.
06:30 buu Is there a large collection of perl6 documents somewhere
06:32 avar t/
06:33 xinming joined #perl6
06:50 ejs joined #perl6
07:00 alc joined #perl6
07:00 literal buu: http://svn.pugscode.org/pugs/t/
07:01 buu Isn't that mostly code?
07:02 literal oh, you want the specification? http://svn.pugscode.org/pugs/t/
07:02 literal oops
07:02 literal damn paste
07:02 literal http://perlcabal.org/syn/
07:11 ejs joined #perl6
07:27 buu literal: Can I check that out from something?
07:27 literal yeah, they're in docs/Perl6/Spec in the pugs repo
07:31 eric256 making .first( ) dispatch to .'ACCEPTS' seems to make it work perfectly ;)
07:31 eric256 now i can do ('a..'z').first(any('a','b','c'));
07:31 eric256 and it works
07:32 * eric256 starts a make spectest to see what happens to everything else ;)
07:39 buu literal: Oh, I have those =[
07:39 buu buubot: spack continuation
07:39 buubot buu: S04-control.pod:4 S17-concurrency.pod:1
07:39 literal spack?
07:40 literal synopsis pod ack?
07:40 eternaleye joined #perl6
07:40 buu Essentially.
07:55 kisu_ joined #perl6
08:01 ejs joined #perl6
08:02 charsbar joined #perl6
08:21 charsbar joined #perl6
08:23 DemoFreak joined #perl6
09:23 tyrelle joined #perl6
09:23 tyrelle hi
09:24 tyrelle anyone here worked on genetic algorithms to optimise NP hard problems?
09:45 literal with Perl 6? I doubt it
09:51 tyrelle yes
09:51 tyrelle or perl5
09:52 tyrelle im doing this in c++ now
09:52 tyrelle but the results are depressing frankly
09:55 Gothmog_ may be because of genetic algorithms ;-)
09:56 Gothmog_ which problems are you trying to solve?
09:58 tyrelle NP
09:59 tyrelle i'm looking lisp and perl to optimize
09:59 tyrelle but i haven't a darn clue in perl, just tad bit
10:01 SubStack look on cpan
10:01 Gothmog_ I suppose you're speaking of NP-complete problems, and that is a class of problems, and I suppose you're not trying to solve them all at once.
10:01 SubStack also D: @ c++ for anything
10:02 Gothmog_ Nah. Anyhow, C++ can be pretty fast, which is very important if you want to solve hard problems.
10:03 SubStack fast algorithms are more important that fast implementation details
10:04 SubStack compilers are getting better all the time too
10:04 SubStack computers are much better at optimising code than people are
10:05 SubStack and they complain much less if you write your programs properly
10:05 Gothmog_ If you're speaking of assembly vs. C, you're usually right.
10:05 SubStack but possibly much more if you're using perl critic
10:06 Gothmog_ But if you speak of higher level languages, you will usually gain a huge factor of speed improvement without doing fancy things in C/C++.
10:06 Gothmog_ s/without/even without/
10:07 SubStack or you could just throw more cores at the problem and whip up something in erlang or haskell
10:08 SubStack or perl6 with any luck
10:08 Gothmog_ That would be really interesting. But with really hard, huge problems, I suppose you would either run out of time or memory.
10:08 SubStack hah
10:09 SubStack computer-wise or programmer-wise?
10:09 Gothmog_ Programmer-wise first. :) But that's not what I meant.
10:09 SubStack dynamic languages definately have the advantage there
10:09 pmurias joined #perl6
10:10 SubStack it's mostly a constant factor speedup anyways
10:10 Gothmog_ anyways?
10:10 SubStack not worth it until you've isolated the bottlenecks and are pretty sure you can make decent improvements in something like c
10:10 Gothmog_ You don't want to dispose a factor of 2 if you're program is running several days nonetheless.
10:11 SubStack not if it takes you four days to write it
10:12 Gothmog_ No, it takes years to write it, with several programmers, and is run regularly by many people all over the world.
10:12 SubStack those sorts of problems are almost always I/O bound anyways
10:12 Gothmog_ They're not.
10:13 Gothmog_ Please don't try to explain me the basics of optimization, as I have some experience with that.
10:13 SubStack the computer is there to do the work, the less work the programmer needs to do the better
10:14 Gothmog_ There are other people that want to work, and they can't when they have to wait. And additionally, with hard problems it's usually another trade-off, as you can always decide to let it run longer to achieve better results.
10:15 SubStack sounds pretty tedious
10:15 Gothmog_ Don't get me wrong, I would agree with you with most programming problems out there in the wild.
10:15 Gothmog_ But not with (NP-)hard ones.
10:16 Gothmog_ Yeah, it's somewhat tedious sometimes, but also very challenging.
10:17 tyrelle Gothmog_: yes
10:18 Gothmog_ Uh. That was the answer to which question? :-)
10:18 Gothmog_ I lost track. ;-)
10:18 tyrelle NP hard problems
10:18 tyrelle trying to optimize that
10:18 Gothmog_ *nods*
10:19 Gothmog_ And which ones?
10:19 tyrelle just a min
10:19 tyrelle brb
10:20 Gothmog_ SubStack: But as I don't have experience with languages like erlang or haskell, I would be really interested in an implementation of a heuristic for some hard problem.
10:21 Gothmog_ Do you think you can do that?
10:21 SubStack it's all been done
10:21 SubStack I'd look to see what other people have come up with first
10:21 Gothmog_ Right.
10:27 Gothmog_ I just found a probably interesting master thesis about implementing algorithms for hard problems in haskell: http://www.bth.se/fou/cuppsats.nsf/a​ll/36a305f7044fe452c12574d10058bc6d/​$file/FinalThesisImranMuhammad.pdf
10:28 Gothmog_ reading &
10:44 cognominal joined #perl6
10:59 iblechbot joined #perl6
11:00 pmurias tyrelle: it's highly unlikely that your algorithms/heuristics will run faster in perl than in C++
11:04 xinming_ joined #perl6
11:08 buu Sure, if you use the *exact* same algorithm.
11:10 pugs_svn r24753 | pmurias++ | [smop] overloaded .,ne,eq for SMOP::Object
11:10 pugs_svn r24753 | pmurias++ | we don't destroy the p5 interpreter so we get memory leaks but not a segfault
11:10 pugs_svn r24753 | pmurias++ | [mildew] add example/cgi.pl
11:11 pmurias buu: there might better (XS using) one on CPAN ;)
11:13 kisu__ joined #perl6
11:13 buu pmurias: I just recall an interesting example I saw in some perl tutorial book I read quite a while ago that made the quite accurate point that its easy for perl to be a lot faster than C when your perl is full of stuff like hash look ups and regex operations and the C isn't.
11:16 Gothmog_ But if it's a real problem, you would use a hashtable in C.
11:16 SubStack *really*?
11:16 SubStack who does that, in c no less
11:17 Gothmog_ I've done that several times in C or C++.
11:17 pmurias there is a hash_map in STL
11:17 pmurias and writing your own hash isn't that hard ;)
11:17 Gothmog_ But often, there are simpler (and faster) ways than using a hashtable.
11:18 Gothmog_ Not simpler as using hashes in Perl, of course.
11:18 Gothmog_ Yeah.
11:19 SubStack everything in /c(?:\+\+)?/ is too much work
11:20 buu Gothmog_: Sure, you could. That also reminds me of all the people who expect to some how translate perl in to C and magically speed thing sup.
11:20 buu Automatically translate that is.
11:21 Gothmog_ Often, you're right, but sometimes it's worth the effort. Plus, if you already have a library with useful data structures and algorithms, it's not that much more work.
11:22 Gothmog_ buu: JIT compilers are working quite well. ;-)
11:22 pmurias buu: the perl version being magically slower is annoying tho
11:22 Gothmog_ At least where they exist. :)
11:23 Gothmog_ And translating to C might be useful to reduce runtime overhead and use the optimization facilities of existing C compilers.
11:23 Gothmog_ Not that I think that it would be a good idea to try to do it.
11:24 Gothmog_ But it would probably be faster nevertheless.
11:24 buu Gothmog_: Not terribly, perl has *already* been compiled by the optimization facilities of C compilers.
11:25 buu You still have to execute the same machine operations.
11:25 buu Of course, last time I had this conversation JIT compilers didn't really exist.
11:25 buu But those are totally cheating.
11:25 Gothmog_ Nah, but the Perl code you're running wasn't optimized.
11:26 Gothmog_ JIT compilers don't exist? In general, or for perl?
11:26 Gothmog_ What do you mean, that is.
11:30 masak joined #perl6
11:33 pugs_svn r24754 | pmurias++ | [smop] fixed .postcircumfix:<( )> on wrapped SV*
11:53 alexn_org joined #perl6
11:54 pmurias ruoso: hi
11:54 buu Gothmog_: I said *last time I had this conversation*
11:55 Gothmog_ Ah.
11:57 pugs_svn r24755 | pmurias++ | [mildew] fixed test count in t/p5_fetch_store.t
11:59 pdcawley joined #perl6
12:14 xinming joined #perl6
12:23 pugs_svn r24756 | pmurias++ | [smop] [smop/perl5 integration]
12:23 pugs_svn r24756 | pmurias++ | fixed the source of the segfault
12:23 pugs_svn r24756 | pmurias++ | $coro->cancel is called after they are not needed anymore
12:24 ruoso pmurias, hi.. I'm just taking a quick look here... need to leave in a bit
12:25 ruoso pmurias, I'm working on implementing "$has $.a"... but it is just the same as "has $!a; method a { $!a }"
12:25 ruoso that was why I was wishing it was a macro
12:27 araujo joined #perl6
12:27 ruoso pmurias, have you thought about implementing "use CGI:from<perl5>"?
12:27 pmurias yes planning do it right now
12:28 ruoso cool...
12:28 pmurias i'm thinking what would we need to have stuff as infix:<~>
12:28 ruoso Multi
12:29 ruoso all this operators are multi
12:29 pmurias and the prelude right?
12:29 pmurias s/the/a/
12:29 ruoso yeah... it will be easier
12:30 ruoso I'm working on "has $.a" in the way to compile Multi.pm
12:30 pmurias got to go to grandparents for lunch&
12:30 ruoso because once we have multi, we can implement the multi "trait_auxiliary:is"
12:30 ruoso and that means we can then compile Return.pm
12:31 ruoso and the bootstrap slowly begins
12:31 * ruoso later &
14:09 ruoso masak++ # very nice use case for the "use deadlock"
14:09 masak ruoso: it bites us in November right now.
14:09 masak feels a bit silly.
14:10 ruoso the problem is that, after all, compile-time-run-time-barrier is very blurred
14:11 masak sure. that's the point of, say, eval.
14:11 ruoso it works very well for modules that doesn't perform anything at INIT time
14:11 ruoso but makes it very much fuzzy for modules that have code to be run at INIT
14:11 * masak JIT-relearns what "INIT" time means
14:11 masak right.
14:14 ruoso maybe it becomes a requirement that modules with odd initialization code should be "require"d instead of "use"d
14:14 masak hm.
14:15 masak I don't feel I have a broad enough overview of the problem to have an opinion.
14:15 ruoso maybe that is the "dynamic linking" I was talking about in the other mail
14:15 masak but I do consider it a bit strange that I can precompile B but not A
14:15 ruoso the problem is that "use" is "static-link"
14:15 masak ok.
14:16 ruoso and in order to A import B, B needs to be INITialized
14:16 masak sounds a bit un-Perlish
14:16 duke_leto joined #perl6
14:20 rakudo_svn r34917 | masak++ | [rakudo] added S29-str/unpack.t to spectest.data
14:35 pmurias joined #perl6
14:38 pmurias ruoso: doesn't INIT happen after all the "use" statments, as it's done at run time and use statements happend at compile time
14:39 masak good point.
14:53 vixey joined #Perl6
15:10 kisu_ joined #perl6
15:12 ruoso joined #perl6
15:34 c9s_ joined #perl6
15:35 masak joined #perl6
15:45 mtnviewmark joined #perl6
15:46 meppl joined #perl6
15:50 alanhaggai joined #perl6
15:54 mtnviewmark pugs: (1..20) Z ('a' ff 'd')
15:54 p6eval pugs: OUTPUT«*** No such subroutine: "&infix:ff"␤    at /tmp/AtVXXChEwR line 1, column 12-22␤»
15:54 masak mtnviewmark: ff and fff not implemented yet in Pugs.
15:54 mtnviewmark hey - I just sent you an e-mail
15:54 masak actually, I think they might have been added after Pugs stopped being in active development.
15:55 masak mtnviewmark: it's you!
15:55 mtnviewmark indeed
15:55 masak :)
15:55 mtnviewmark which might explain why I'm poking at obscure operators!
15:55 masak welcome to #perl6.
15:55 mtnviewmark thanks!
15:55 mtnviewmark er - pugs isn't under active development?!?!?
15:55 masak mtnviewmark: well, poking at obscure operators isn't exactly uncommon in here.
15:56 masak mtnviewmark: you've been gone a long time, mister.
15:56 mtnviewmark sorry - the docs seem to indicate pugs is alive ....
15:56 masak mtnviewmark: I'd start my lines with 'rakudo: ' nowadays if I were you.
15:56 masak mtnviewmark: depends on what you mean by 'alive' I guess. it isn't dead.
15:57 masak it still runs on GHC 6.10.
15:57 jhorwitz joined #perl6
15:57 masak but it runs in more or less the same way as two years ago.
15:57 mtnviewmark :-)
15:57 mtnviewmark rakudo: (1..20) Z ('a' ff 'd')
15:57 p6eval rakudo 34921: OUTPUT«Statement not terminated properly at line 1, near "ff 'd')"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:58 masak ff anf fff not implemented yet in Rakudo.
15:58 mtnviewmark heh!
15:58 mtnviewmark well then!
15:58 mtnviewmark so much for investigating the subtlties of ff vs. fff
15:59 masak mtnviewmark: they're a bit under-specced, I know.
15:59 mtnviewmark tell me about it!
15:59 masak it's the community's fault.
15:59 masak :)
16:00 mtnviewmark yeah, some guy hasn't kept his operator chart up-to-date ....
16:00 mtnviewmark ;-)
16:00 masak yeah, tell me about it.
16:00 masak but it's not just that.
16:01 masak we're understaffed: not enough spec writers/reviewers, not enough testers, not enough implementers...
16:03 mtnviewmark while you're here -- do you know the difference between $foo.{} and $foo.<>
16:03 mtnviewmark ?
16:04 maerzhase joined #perl6
16:04 masak yes.
16:04 masak {} doesn't autoquote.
16:04 masak <> does.
16:04 mtnviewmark my understanding is the $foo.{} is the same as %foo....
16:05 mtnviewmark or have I got this totally wrong?
16:05 masak think of <> as a variant of qw() that also does indexing.
16:05 masak mtnviewmark: I think you've got that totally wrong, yes.
16:05 masak Perl 6 doesn't do any funny stuff with sigils anymore.
16:05 mtnviewmark hmmm.... right but with a . they are called "method like postcircumfixes"  isn't that different than pare {} and <>
16:06 masak yes, sure.
16:06 masak let's go through it systematically, shall we?
16:06 mtnviewmark I'm all ears!
16:06 masak bare {} does hashes and blocks.
16:07 masak bare <> does an autoquoted list of stuff. so <a b c> in Perl 6 corresponds to qw<a b c> in Perl 5.
16:07 mtnviewmark right: { 1 => 100, 2 => 42 }
16:07 masak right.
16:07 mtnviewmark okay
16:07 mtnviewmark but with the .?
16:07 literal mtnviewmark: %foo.{} is the same as %foo{} :)
16:07 masak %h.{$foo} indexes a key in %h
16:07 masak so does %h.<$foo>.
16:07 masak but the keys are different.
16:07 mtnviewmark AH so it is the method of quoting the keys for the hash
16:08 masak the key indexed by %h.{$foo} is whatever the contents of $foo is.
16:08 masak the key indexed by %h.<$foo> is '$foo'
16:08 masak mtnviewmark: aye.
16:08 mtnviewmark and «»?  or (for the unicode impared) <<>>?
16:09 masak mtnviewmark: that's autoquoting with interpolation.
16:10 mtnviewmark got it
16:10 masak so in this case, %h.{$foo} and %h.<<$foo>> are equivalent.
16:10 mtnviewmark right but %h.{x$foo} is a syntax error by %h.<<x$foo>> works
16:11 mtnviewmark *but
16:11 masak uhm.
16:11 masak I guess.
16:11 masak std: my %h; my $foo; say %h.<<x$foo>>
16:12 Matt-W yes that seems correct
16:12 p6eval std 24756: OUTPUT«00:07 87m␤»
16:12 masak yes, it's correct.
16:12 masak :)
16:12 mtnviewmark what does std: do?
16:12 masak mtnviewmark: it takes your piece of code... and pronounces it correct or incorrect :)
16:12 masak very convenient.
16:12 masak std: 2 ff 5
16:13 p6eval std 24756: OUTPUT«00:05 85m␤»
16:13 masak also correct.
16:13 mtnviewmark ah! Oracle at Delphi?
16:13 masak ...even if it's not yet implemented anywhere.
16:13 Matt-W is it feeding it through STD.pm or something?
16:13 masak mtnviewmark: in a manner of speaking.
16:13 masak Matt-W: aye.
16:13 Matt-W cool
16:13 masak Matt-W: extremely.
16:14 * mtnviewmark glances over his chart to see what else he needs help understanding....
16:15 masak mtnviewmark: good thing that you stopped by here. I would have suggested that by email, but you got here on your own.
16:15 Matt-W everyone here has been very helpful to me
16:15 masak (we pay him to say that)
16:16 Matt-W masak: I believe you owe me an implementation of infix:>>.
16:16 Matt-W :P
16:16 masak Matt-W: I do? I'll have to check my records.
16:16 masak :P
16:17 Matt-W Payment to be made in Rakudo features
16:17 mtnviewmark glances at Syn03 and doesn't see infix:>>
16:17 masak Matt-W: but I'm having so much fun implementing C<unpack> right now!
16:17 Matt-W What I need is some sort of understanding of where all the code in Rakudo is
16:17 Matt-W I keep trying to find things and thinking it just appears magically during compilation
16:17 masak Matt-W: have you found languages/perl6/docs/ ?
16:18 mtnviewmark oh wait, the period was not a sentence terminerator there   you meant the meta operator >> applied to the operator .
16:18 mtnviewmark I think IRC for language development needs two fonts
16:18 Matt-W mtnviewmark: yes I did indeed mean that
16:18 Matt-W gargh! no gvim!
16:18 * Matt-W panics
16:18 masak or just say C<<< >>. >>>
16:20 mtnviewmark on the topic of meta-operators -- how general is the ! meta-operator?  Can it only apply to the pre-defined comparison infix ops?
16:20 masak mtnviewmark: there's a note on that in S03, methinks.
16:21 mtnviewmark uhm, wasn't clear - to me
16:21 masak I'll see if I can find it.
16:21 mtnviewmark "Any infix relational operator may be transformed into its negative by prefixing with !"
16:21 masak mtnviewmark++ # coming here and posing all these interesting questions
16:22 masak mtnviewmark: there you go.
16:22 mtnviewmark but, well, I'd say "infix relational operator" isn't well defined
16:22 masak mtnviewmark: how so?
16:22 mtnviewmark well - that is the only occurrence of that phrase in that document!
16:23 mtnviewmark and "relational operator" appears 5 times, but all in reference to the ! meta-operator
16:23 masak heh.
16:24 masak I think a 'relational operator' is one that returns Bool.
16:24 mtnviewmark So I think  it is meant to apply to only the chaining binary precedence
16:24 moritz_ probably "infix operators that returns Boolean... what masak said ;)
16:24 masak as opposed to things like '+' and 'max'
16:24 masak moritz_: OH HAI
16:24 cspencer joined #perl6
16:25 masak mtnviewmark: sounds reasonable.
16:25 mtnviewmark what about ?^  can I say !?^  ?
16:25 mtnviewmark that is infix and returns Bool, but isn't relational in the English sense
16:25 masak good question.
16:25 moritz_ mtnviewmark: you'd use !xor for that, probably
16:25 * mtnviewmark hopes folks doesn't mind him being a programing language pedant!
16:25 masak mtnviewmark: no, 's cool.
16:26 masak we do that all the time here.
16:26 Matt-W It's compulsory
16:26 mtnviewmark well - see, !xor doesn't really flow from "infix relational operators"....
16:26 masak perl6: say (True !xor False)
16:26 p6eval pugs: OUTPUT«*** ␤    Unexpected "!"␤    expecting "=", "(", ":", operator or ")"␤    at /tmp/iUOHamZG6t line 1, column 11␤»
16:26 p6eval ..rakudo 34925: OUTPUT«Statement not terminated properly at line 1, near "!xor False"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:26 p6eval ..elf 24756: OUTPUT«Parse error in: /tmp/jTG1nBD8RO␤panic at line 1 column 14 (pos 14): Only boolean infix operators may be negated␤WHERE: say (True !xor False)␤WHERE:              /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  (eval):8:in `__infix_prefix_meta_operator_3862535'␤
16:26 p6eval ..STD_red/prelude.rb...
16:26 masak the support for !xor isn't overwhelming.
16:26 moritz_ perl6: say 1 xor 0
16:27 p6eval elf 24756, pugs, rakudo 34925: OUTPUT«1␤»
16:27 mtnviewmark std:  my $a; my $b; $a !xor $b;
16:27 p6eval std 24756: OUTPUT«############# PARSE FAILED #############␤Only boolean infix operators may be negated at /tmp/V2RBAaQAIl line 1:␤------> [32mmy $a; my $b; $a !xor[31m $b;[0m␤00:05 86m␤»
16:27 masak mwhahaha.
16:27 mtnviewmark aha!
16:27 moritz_ uhm, xor *is* a boolean infix operator
16:27 mtnviewmark std:  my $a; my $b; $a !?^ $b;
16:27 p6eval std 24756: OUTPUT«############# PARSE FAILED #############␤Only boolean infix operators may be negated at /tmp/HYbpHzgVbq line 1:␤------> [32mmy $a; my $b; $a !?^[31m $b;[0m␤00:05 86m␤»
16:28 mtnviewmark so - I think the intention is only the relationals can be negated
16:28 moritz_ TimToady: is missing STD.pm support for !xor intentional?
16:28 masak someone should @tell TimToady.
16:28 moritz_ he usually backlogs
16:28 masak ah, right.
16:29 masak TimToady: ditto !?^
16:29 mtnviewmark TimToady: also !<=> and !xor
16:29 masak mtnviewmark: um, <=> doesn't return Bool.
16:30 moritz_ std: 1 X!=:=X 2
16:30 p6eval std 24756: OUTPUT«00:05 85m␤»
16:30 masak moritz_: :D
16:30 moritz_ rakudo: my ($a, $b, $c); say ($a, $b, $c) X!=:=X ($a, $b, $c)
16:30 p6eval rakudo 34925: OUTPUT«011101110␤»
16:30 masak nice!
16:31 moritz_ rakudo: my ($a, $b, $c); say [&&] ($a, $b) X!=:=X $c
16:31 p6eval rakudo 34925: OUTPUT«Statement not terminated properly at line 1, near "[&&] ($a, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:31 moritz_ rakudo: my ($a, $b, $c); say [and] ($a, $b) X!=:=X $c
16:31 p6eval rakudo 34925: OUTPUT«Statement not terminated properly at line 1, near "($a, $b) X"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
16:31 moritz_ rakudo: my ($a, $b, $c); say all ($a, $b) X!=:=X $c
16:31 masak moritz_: could you do me a favour and see if you can run 'make test' to successful completion in November's p6w?
16:31 mtnviewmark masak - true - but if you thought of the ! hyper operator as inverting the relational test, then !<=> (and !cmp and !leg) should all make sense
16:31 p6eval rakudo 34925: OUTPUT«Junction<0xb5fbb61c>␤»
16:32 moritz_ rakudo: my ($a, $b, $c); say ?all ($a, $b) X!=:=X $c
16:32 p6eval rakudo 34925: OUTPUT«1␤»
16:32 masak mtnviewmark: I don't. I think of it as inverting a Bool.
16:32 mtnviewmark (realizes that that is totally absurd!)
16:32 moritz_ rakudo: my ($a, $b, $c); say ?all ($a, $b) X!=:=X $b
16:32 p6eval rakudo 34925: OUTPUT«0␤»
16:32 moritz_ masak: I can, but only with ~2week old versions of rakudo + November
16:33 moritz_ the test above is "are all containers on the right distinct from all containers on the left"
16:33 masak moritz_: hm, I'm not able to say if that'd lead to an interesting result or not.
16:33 masak moritz_: but one more data point cannot hurt.
16:33 mtnviewmark moritz_ is showing off!  (or at least, showing rakudo off!)
16:34 masak Rakudo rocks.
16:34 masak rakudo: my $a = 5; my $b; $b := $a; say $a =:= $b
16:34 p6eval rakudo 34925: OUTPUT«1␤»
16:35 masak rakudo: my $a = 5; my $b := $a; say $a =:= $b
16:35 p6eval rakudo 34925: OUTPUT«1␤»
16:35 masak nice.
16:35 mtnviewmark so, on the topic of obscure relationals.... is but the opposite of does?  as in $x does
16:35 masak rakudo: my @a = 1,2,3; @a[0] := @a; say @a.perl
16:35 moritz_ mtnviewmark: sometimes it just itches :-)
16:35 p6eval rakudo 34925: OUTPUT«rtype not set␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
16:36 masak mtnviewmark: no, I think 'does' is compile-time and 'but' is runtime
16:36 masak or something like that.
16:36 moritz_ masak: lots of errors (about not being able to call Failure.apply; Novemeber is from 2008-12-17, rakudo from 2008-12-26 or so)
16:36 eric256 hey, i patched rakudo to allow .first( ) to take anything that goes on the right hand side of ~~ which seems to match specs
16:36 masak moritz_: thank you.
16:36 masak moritz_: that's what I'm getting as well.
16:36 mtnviewmark $foo does Mixin   xor   $foo but Mixin
16:36 eric256 and it passes all spec tests still...now to see if it passes any new tests
16:36 mtnviewmark this should always be true  .... ?
16:36 masak eric256++
16:37 masak mtnviewmark: they're not tests.
16:37 eric256 masak: it was like a two line fix so i'm skeptical.
16:37 masak eric256: no, anyone who adds a feature deserves a karma point.
16:37 moritz_ eric256: you can run 'perl tools/autounfudge.pl -a' ....
16:37 eric256 and want to apply it to grep as well since the specs say first should behave like grep but return only the first item
16:37 mtnviewmark er, okay - I'll have to find them in a different Syn then, as Syn03 is pretty thin on the point
16:37 mtnviewmark and they are grouped with non-chaining conditionals
16:37 moritz_ eric256: if new tests pass, there might be a patch in autunfudge.patch after the run
16:37 masak mtnviewmark: try S12.
16:38 eric256 moritz_:  whats the ... there? test file name?
16:38 eric256 oh nm
16:39 moritz_ eric256: in the long run that won't work, because ~~ also has some macro semantics, so a bare method can't always get the same behaviour
16:39 mtnviewmark thanks
16:39 masak np
16:39 mtnviewmark that also means I have to move them in the chart then.. .:-)
16:40 masak I'll be heading home soon, to get a bit of peace of mind with my C<unpack> implementation and my Chinese novel.
16:40 mtnviewmark okay - I'm being called away to make pancakes for the family
16:40 eric256 mortiz the specs say it should behave as if its on the RHS of a ~~ so i had first dispatch to " block_res = test.'ACCEPTS'(block_arg) "
16:40 masak mtnviewmark++ # updating chart
16:40 eric256 might not be right, but its what i could figure out on my own last night
16:40 mtnviewmark masak - I hope I can find you here later
16:40 mtnviewmark thanks all for answering my questions
16:40 mtnviewmark I'll be back.....  ;-)
16:40 masak mtnviewmark: I'm usually here.
16:41 masak and if I'm not, many others are.
16:44 eric256 rakudo: pair('a',1) ~~ 'a'
16:44 p6eval rakudo 34925: OUTPUT«Could not find non-existent sub pair␤current instr.: '_block14' pc 62 (EVAL_13:40)␤»
16:45 eric256 ohhh i thought there was an explicit function for building pairs...
16:46 eric256 rakudo: say ('a' => 1) ~~ ('a' => 1)
16:46 p6eval rakudo 34925: OUTPUT«Method ':a' not found for invocant of class 'Perl6Pair'␤current instr.: 'parrot;Perl6Pair;ACCEPTS' pc 8140 (src/classes/Pair.pir:38)␤»
16:56 brunoV joined #perl6
17:00 kisu__ joined #perl6
17:06 eric256 wow auto unfudge takes a long time
17:14 moritz_ eric256: it does a lot of (mostly stupid) work
17:14 moritz_ it reomoves each single fudge line, runs the test again, and check if the tests still pass
17:14 moritz_ if yes, it writes a patch that removes this line
17:20 moritz_ gone again &
17:27 Takadonet joined #perl6
17:32 pmichaud infix:<cmp> isn't a infix relational op.
17:32 pmichaud neither is infix:<xor>.
17:33 pmichaud oh, maybe infix:<cmp>  is... I'm still confusing it with C<leg>
17:34 pmichaud but infix:<xor> isn't negatable with a meta-prefix !
17:34 mtnviewmark joined #perl6
17:46 cognominal joined #perl6
18:01 araujo joined #perl6
18:02 Matt-W Brain explodey
18:02 Matt-W [matthew@asymptote parrot]$ ./perl6 -e "say ('bac' ~~ /a/).WHAT"
18:02 Matt-W Match
18:02 Matt-W [matthew@asymptote parrot]$ ./perl6 -e "('bac' ~~ /a/).WHAT"
18:02 Matt-W Null PMC access in get_integer()
18:07 awwaiid joined #perl6
18:07 azawawi joined #perl6
18:07 azawawi hi
18:09 duke_leto left #perl6
18:11 Takadonet joined #perl6
18:11 mtnviewmark joined #perl6
18:15 Whiteknight joined #perl6
18:16 azawawi moritz_: ping
18:22 ruoso joined #perl6
18:24 alanhaggai_ joined #perl6
18:24 Psyche^ joined #perl6
18:40 maerzhase joined #perl6
18:47 yahooooo joined #perl6
18:48 ruoso @tell pmurias but in order to call EXPORTALL on the package, it needs to be INITialized
18:48 lambdabot Consider it noted.
18:59 nirc joined #perl6
19:09 duke_leto joined #perl6
19:12 maerzhase joined #perl6
19:30 azawawi masak: ping
19:43 cspencer joined #perl6
19:54 TimToady joined #perl6
19:54 maerzhase joined #perl6
19:54 ruoso joined #perl6
19:54 Takadonet joined #perl6
19:54 azawawi joined #perl6
19:54 cognominal joined #perl6
19:54 kisu__ joined #perl6
19:54 brunoV joined #perl6
19:54 pdcawley joined #perl6
19:54 eternaleye joined #perl6
19:54 eric256 joined #perl6
19:54 r0bby joined #perl6
19:54 Khisanth joined #perl6
19:54 bsdperl joined #perl6
19:54 ilogger2 joined #perl6
19:54 bloonix joined #perl6
19:54 Ehtyar joined #perl6
19:54 integral joined #perl6
19:54 Guest16015 joined #perl6
19:54 japhb_ joined #perl6
19:54 s1n joined #perl6
19:54 wolverian joined #perl6
19:54 zostay joined #perl6
19:54 yves joined #perl6
19:54 jiing_ joined #perl6
19:54 BinGOs joined #perl6
19:54 Helios- joined #perl6
19:54 felipe joined #perl6
19:54 PerlJam joined #perl6
19:54 rakudo_svn joined #perl6
19:54 pugs_svn joined #perl6
19:54 jiing joined #perl6
19:54 clkao joined #perl6
19:54 LCamel_ joined #perl6
19:54 tcliou|A1ay joined #perl6
19:54 diakopter joined #perl6
19:54 Gothmog_ joined #perl6
19:54 pmichaud joined #perl6
19:54 perlbot joined #perl6
19:54 Maddingue joined #perl6
19:54 avar joined #perl6
20:05 jan_ joined #perl6
20:12 dwhipp joined #perl6
20:14 sri_kraih joined #perl6
20:22 jferrero joined #perl6
20:24 pugs_svn r24757 | ruoso++ | [smop] small fix in Attribute.
20:24 pugs_svn r24757 | ruoso++ | [smop] Add the lowlevel attribute to the lexical scope
20:24 pugs_svn r24757 | ruoso++ | [mildew] implements "has $!a", but PurePrototypeHOW still doesnt support it
20:35 s1n moritz_: pmichaud said you could use some help sifting through your tickets
20:36 s1n moritz_: but it doesn't look like you have many that are unresolved, that is, they're all mostly marked resolved (i checked last night anyways)
20:56 donaldh joined #perl6
21:02 hudnix joined #perl6
21:16 aindilis joined #perl6
21:18 cspencer joined #perl6
22:00 alanhaggai__ joined #perl6
22:14 mberends joined #perl6
22:38 pugs_svn r24758 | ruoso++ | [smop] PurePrototypeHOW implements add_attribute
23:10 cspencer joined #perl6
23:39 kisu_ joined #perl6
23:41 km2 joined #perl6
23:44 Khisanth joined #perl6
23:44 meppl joined #perl6
23:52 Jedai joined #perl6
23:58 duke_leto left #perl6

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

Perl 6 | Reference Documentation | Rakudo