The topic for #perl6 is: pugscode.org/ planetsix.perl.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 TimToady on 25 November 2008.
00:41 GitHub23 joined
GitHub23 perl6-examples: 3David Romano 07master0 SHA1-9327c00 00:41
fixed Spoonerism
is.gd/evnC
00:41 GitHub23 left 00:45 buubot joined 01:04 DemoFreak left 01:08 fridim_ joined 01:18 Limbic_Region joined 01:26 sri_kraih joined 01:38 sri_kraih left, cyocum joined 01:39 cyocum left 01:57 kisu joined 02:01 kisu_ left 02:02 kisu_ joined 02:06 kisu left 02:09 maerzhase joined
pugs_svn r24752 | particle++ | [S19] get rid of illustration grammar, it's in the revision history if i need it later. 02:26
02:27 alc joined 02:36 lichtkind joined, maerzhase left 02:48 r0bby joined
lichtkind azawawi: did you look at the translation? 02:48
s1n does splice still only operate on indices? 02:59
that is, is there an easier way than the perl5 method of doing splice to remove an element in the middle of an array?
(and assigning the result back to itself, that always seemed like a pain in the butt) 03:00
03:00 meppl joined 03:09 lichtkind left 03:16 Limbic_Region left 03:23 GitHub16 joined
GitHub16 perl6-examples: 3Eric Hodges 07master0 SHA1-25368a7 03:23
Adding solution for WSG Begginer 2007 #3
is.gd/evJb
perl6-examples: 3Eric Hodges 07master0 SHA1-d35112e
Merge branch 'master' of [email@hidden.address]
is.gd/evJc
03:23 GitHub16 left 03:38 meppuru joined 03:44 meppl left, meppuru is now known as meppl 03:55 fridim_ left 04:02 elmex_ joined
s1n rakudo: my @t = <1 2 3>; push @t, 3 if !@t.exists(3); 04:04
p6eval rakudo 34906: RESULTĀ«4Ā»
s1n rakudo: my @t = <1 2 3>; push @t, 3 if !@t.exists(3); say @t.perl
p6eval rakudo 34906: OUTPUTĀ«["1", "2", "3", 3]ā¤Ā»
s1n uh oh, looks like a bug
is this something that's being worked on already?
04:17 elmex left, elmex_ is now known as elmex 04:53 alester left 05:21 meppl left 05:50 eric256 joined
eric256 s1n: from the comments in the code @array.exists($index) is how it is called 05:50
not a $value.. not sure about the spec though
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
eric256 and S29 backs up that definition of exists 05:53
05:53 alester joined
eric256 hehe just realize i'm an hour later on that conversation ;) 05:55
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)ā¤Ā»
eric256 rakudo: my @t = <1 2 3>; @t.pairs.first({.value eq 1}).perl.say
p6eval rakudo 34911: OUTPUTĀ«0 => "1"ā¤Ā»
eric256 rakudo: my @t = <1 2 3>; @t.pairs.first({.value eq 3}).perl.say
p6eval rakudo 34911: OUTPUTĀ«2 => "3"ā¤Ā»
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"]ā¤Ā»
eric256 rakudo: my @t = <1 2 3>; @t.push(4) unless @t.pairs.first({.value eq 4}); @t.perl.say;
p6eval rakudo 34911: OUTPUTĀ«["1", "2", "3", 4]ā¤Ā»
eric256 rakudo: my @t = <1 2 3>; @t.push<4> unless @t.pairs.first({.value eq 4}); @t.perl.say;
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:07 alc left
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
not a sub at all
in fact the definition for matcher specifies that it should act like its on the RHS of a ~~
eric256 wonders what a block does on the RHS of ~~ and goes to find out 06:09
06:22 phil joined 06:26 meteorjay joined 06:29 azawawi left
buu Hrm. 06:30
Is there a large collection of perl6 documents somewhere
avar t/ 06:32
06:33 xinming joined 06:37 kisu_ is now known as kisu 06:38 xinming_ left 06:50 ejs joined 07:00 alc joined
literal buu: svn.pugscode.org/pugs/t/ 07:00
07:01 brunoV left
buu Isn't that mostly code? 07:01
literal oh, you want the specification? svn.pugscode.org/pugs/t/ 07:02
oops
damn paste
perlcabal.org/syn/
07:08 ejs left 07:11 ejs joined
buu literal: Can I check that out from something? 07:27
literal yeah, they're in docs/Perl6/Spec in the pugs repo
eric256 making .first( ) dispatch to .'ACCEPTS' seems to make it work perfectly ;) 07:31
now i can do ('a..'z').first(any('a','b','c'));
and it works
eric256 starts a make spectest to see what happens to everything else ;) 07:32
buu literal: Oh, I have those =[ 07:39
buubot: spack continuation
buubot buu: S04-control.pod:4 S17-concurrency.pod:1
literal spack?
synopsis pod ack? 07:40
07:40 eternaleye joined
buu Essentially. 07:40
07:45 ejs left 07:55 kisu_ joined 08:01 ejs joined, kisu left 08:02 charsbar joined 08:21 charsbar left, charsbar joined 08:23 DemoFreak joined 09:07 iblechbot left 09:23 tyrelle joined
tyrelle hi 09:23
anyone here worked on genetic algorithms to optimise NP hard problems? 09:24
literal with Perl 6? I doubt it 09:45
tyrelle yes 09:51
or perl5
im doing this in c++ now 09:52
but the results are depressing frankly
Gothmog_ may be because of genetic algorithms ;-) 09:55
which problems are you trying to solve? 09:56
tyrelle NP 09:58
i'm looking lisp and perl to optimize 09:59
but i haven't a darn clue in perl, just tad bit
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.
SubStack also D: @ c++ for anything
Gothmog_ Nah. Anyhow, C++ can be pretty fast, which is very important if you want to solve hard problems. 10:02
SubStack fast algorithms are more important that fast implementation details 10:03
compilers are getting better all the time too 10:04
computers are much better at optimising code than people are
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.
SubStack but possibly much more if you're using perl critic
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
s/without/even without/
SubStack or you could just throw more cores at the problem and whip up something in erlang or haskell 10:07
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.
SubStack hah
computer-wise or programmer-wise? 10:09
Gothmog_ Programmer-wise first. :) But that's not what I meant.
SubStack dynamic languages definately have the advantage there
10:09 pmurias joined
SubStack it's mostly a constant factor speedup anyways 10:10
Gothmog_ anyways?
You don't want to dispose a factor of 2 if you're program is running several days nonetheless.
SubStack not worth it until you've isolated the bottlenecks and are pretty sure you can make decent improvements in something like c
not if it takes you four days to write it 10:11
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
Gothmog_ They're not.
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
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:14
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.
But not with (NP-)hard ones.
Yeah, it's somewhat tedious sometimes, but also very challenging. 10:16
tyrelle Gothmog_: yes 10:17
Gothmog_ Uh. That was the answer to which question? :-) 10:18
I lost track. ;-)
tyrelle NP hard problems
trying to optimize that
Gothmog_ *nods*
And which ones? 10:19
tyrelle just a min
brb
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:20
Do you think you can do that? 10:21
SubStack it's all been done
I'd look to see what other people have come up with first
Gothmog_ Right.
I just found a probably interesting master thesis about implementing algorithms for hard problems in haskell: www.bth.se/fou/cuppsats.nsf/all/36a...hammad.pdf 10:27
reading & 10:28
10:42 alc left 10:44 cognominal joined 10:59 iblechbot joined
pmurias tyrelle: it's highly unlikely that your algorithms/heuristics will run faster in perl than in C++ 11:00
11:04 xinming_ joined
buu Sure, if you use the *exact* same algorithm. 11:08
pugs_svn r24753 | pmurias++ | [smop] overloaded .,ne,eq for SMOP::Object 11:10
r24753 | pmurias++ | we don't destroy the p5 interpreter so we get memory leaks but not a segfault
r24753 | pmurias++ | [mildew] add example/cgi.pl
pmurias buu: there might better (XS using) one on CPAN ;) 11:11
11:13 kisu__ joined
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:13
Gothmog_ But if it's a real problem, you would use a hashtable in C. 11:16
SubStack *really*?
11:16 xinming left
SubStack who does that, in c no less 11:16
Gothmog_ I've done that several times in C or C++. 11:17
pmurias there is a hash_map in STL
and writing your own hash isn't that hard ;)
Gothmog_ But often, there are simpler (and faster) ways than using a hashtable.
Not simpler as using hashes in Perl, of course. 11:18
Yeah.
11:18 kisu_ left
SubStack everything in /c(?:\+\+)?/ is too much work 11:19
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
Automatically translate that is.
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:21
buu: JIT compilers are working quite well. ;-) 11:22
pmurias buu: the perl version being magically slower is annoying tho
Gothmog_ At least where they exist. :)
And translating to C might be useful to reduce runtime overhead and use the optimization facilities of existing C compilers. 11:23
Not that I think that it would be a good idea to try to do it.
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.
You still have to execute the same machine operations. 11:25
Of course, last time I had this conversation JIT compilers didn't really exist.
But those are totally cheating.
Gothmog_ Nah, but the Perl code you're running wasn't optimized.
JIT compilers don't exist? In general, or for perl? 11:26
What do you mean, that is.
11:30 masak joined
pugs_svn r24754 | pmurias++ | [smop] fixed .postcircumfix:<( )> on wrapped SV* 11:33
11:53 alexn_org joined
pmurias ruoso: hi 11:54
buu Gothmog_: I said *last time I had this conversation*
Gothmog_ Ah. 11:55
pugs_svn r24755 | pmurias++ | [mildew] fixed test count in t/p5_fetch_store.t 11:57
11:59 pdcawley joined 12:14 xinming joined 12:15 alexn_org left 12:23 xinming_ left
pugs_svn r24756 | pmurias++ | [smop] [smop/perl5 integration] 12:23
r24756 | pmurias++ | fixed the source of the segfault
r24756 | pmurias++ | $coro->cancel is called after they are not needed anymore
ruoso pmurias, hi.. I'm just taking a quick look here... need to leave in a bit 12:24
pmurias, I'm working on implementing "$has $.a"... but it is just the same as "has $!a; method a { $!a }" 12:25
that was why I was wishing it was a macro
12:26 araujo left 12:27 araujo joined
ruoso pmurias, have you thought about implementing "use CGI:from<perl5>"? 12:27
pmurias yes planning do it right now
ruoso cool... 12:28
pmurias i'm thinking what would we need to have stuff as infix:<~>
ruoso Multi
all this operators are multi 12:29
pmurias and the prelude right?
s/the/a/
ruoso yeah... it will be easier
I'm working on "has $.a" in the way to compile Multi.pm 12:30
pmurias got to go to grandparents for lunch&
ruoso because once we have multi, we can implement the multi "trait_auxiliary:is"
and that means we can then compile Return.pm
and the bootstrap slowly begins 12:31
ruoso later &
12:35 pmurias left 12:36 smtms left 13:18 araujo left
ruoso masak++ # very nice use case for the "use deadlock" 14:09
masak ruoso: it bites us in November right now.
feels a bit silly.
ruoso the problem is that, after all, compile-time-run-time-barrier is very blurred 14:10
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
but makes it very much fuzzy for modules that have code to be run at INIT
masak JIT-relearns what "INIT" time means
right.
ruoso maybe it becomes a requirement that modules with odd initialization code should be "require"d instead of "use"d 14:14
masak hm.
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
masak but I do consider it a bit strange that I can precompile B but not A
ruoso the problem is that "use" is "static-link"
masak ok.
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
rakudo_svn r34917 | masak++ | [rakudo] added S29-str/unpack.t to spectest.data 14:20
14:23 meteorjay left 14:35 pmurias joined
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:38
masak good point. 14:39
14:53 vixey joined 14:57 ruoso left 15:09 kisu__ is now known as kisu 15:10 kisu_ joined 15:12 ruoso joined 15:13 masak left 15:28 kisu left 15:34 c9s_ joined 15:35 masak joined 15:40 pmurias left 15:45 mtnviewmark joined 15:46 meppl joined 15:50 alanhaggai joined
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ā¤Ā»
masak mtnviewmark: ff and fff not implemented yet in Pugs.
mtnviewmark hey - I just sent you an e-mail
masak actually, I think they might have been added after Pugs stopped being in active development.
mtnviewmark: it's you! 15:55
mtnviewmark indeed
masak :)
mtnviewmark which might explain why I'm poking at obscure operators!
masak welcome to #perl6.
mtnviewmark thanks!
er - pugs isn't under active development?!?!?
masak mtnviewmark: well, poking at obscure operators isn't exactly uncommon in here.
mtnviewmark: you've been gone a long time, mister. 15:56
mtnviewmark sorry - the docs seem to indicate pugs is alive ....
masak mtnviewmark: I'd start my lines with 'rakudo: ' nowadays if I were you.
mtnviewmark: depends on what you mean by 'alive' I guess. it isn't dead.
it still runs on GHC 6.10. 15:57
15:57 jhorwitz joined
masak but it runs in more or less the same way as two years ago. 15:57
mtnviewmark :-)
rakudo: (1..20) Z ('a' ff 'd')
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)ā¤Ā»
masak ff anf fff not implemented yet in Rakudo. 15:58
mtnviewmark heh!
well then!
so much for investigating the subtlties of ff vs. fff
masak mtnviewmark: they're a bit under-specced, I know. 15:59
mtnviewmark tell me about it!
masak it's the community's fault.
:)
mtnviewmark yeah, some guy hasn't kept his operator chart up-to-date .... 16:00
16:00 cognominal left
mtnviewmark ;-) 16:00
masak yeah, tell me about it.
but it's not just that.
we're understaffed: not enough spec writers/reviewers, not enough testers, not enough implementers... 16:01
mtnviewmark while you're here -- do you know the difference between $foo.{} and $foo.<> 16:03
?
16:04 maerzhase joined
masak yes. 16:04
{} doesn't autoquote.
<> does.
mtnviewmark my understanding is the $foo.{} is the same as %foo....
or have I got this totally wrong? 16:05
masak think of <> as a variant of qw() that also does indexing.
mtnviewmark: I think you've got that totally wrong, yes.
Perl 6 doesn't do any funny stuff with sigils anymore.
mtnviewmark hmmm.... right but with a . they are called "method like postcircumfixes" isn't that different than pare {} and <>
masak yes, sure. 16:06
let's go through it systematically, shall we?
mtnviewmark I'm all ears!
masak bare {} does hashes and blocks.
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 }
masak right.
mtnviewmark okay
but with the .?
literal mtnviewmark: %foo.{} is the same as %foo{} :)
masak %h.{$foo} indexes a key in %h
so does %h.<$foo>.
but the keys are different.
mtnviewmark AH so it is the method of quoting the keys for the hash
masak the key indexed by %h.{$foo} is whatever the contents of $foo is. 16:08
the key indexed by %h.<$foo> is '$foo'
mtnviewmark: aye.
mtnviewmark and Ā«Ā»? or (for the unicode impared) <<>>?
masak mtnviewmark: that's autoquoting with interpolation. 16:09
mtnviewmark got it 16:10
masak so in this case, %h.{$foo} and %h.<<$foo>> are equivalent.
mtnviewmark right but %h.{x$foo} is a syntax error by %h.<<x$foo>> works
*but 16:11
masak uhm.
I guess.
std: my %h; my $foo; say %h.<<x$foo>>
Matt-W yes that seems correct 16:12
p6eval std 24756: OUTPUTĀ«00:07 87mā¤Ā»
masak yes, it's correct.
:)
mtnviewmark what does std: do?
masak mtnviewmark: it takes your piece of code... and pronounces it correct or incorrect :)
very convenient.
std: 2 ff 5
p6eval std 24756: OUTPUTĀ«00:05 85mā¤Ā» 16:13
masak also correct.
mtnviewmark ah! Oracle at Delphi?
masak ...even if it's not yet implemented anywhere.
Matt-W is it feeding it through STD.pm or something?
masak mtnviewmark: in a manner of speaking.
Matt-W: aye.
Matt-W cool
masak Matt-W: extremely.
mtnviewmark glances over his chart to see what else he needs help understanding.... 16:14
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
masak (we pay him to say that)
Matt-W masak: I believe you owe me an implementation of infix:>>. 16:16
:P
masak Matt-W: I do? I'll have to check my records.
:P
Matt-W Payment to be made in Rakudo features 16:17
mtnviewmark glances at Syn03 and doesn't see infix:>>
masak Matt-W: but I'm having so much fun implementing C<unpack> right now!
Matt-W What I need is some sort of understanding of where all the code in Rakudo is
I keep trying to find things and thinking it just appears magically during compilation
masak Matt-W: have you found languages/perl6/docs/ ?
mtnviewmark oh wait, the period was not a sentence terminerator there you meant the meta operator >> applied to the operator . 16:18
I think IRC for language development needs two fonts
Matt-W mtnviewmark: yes I did indeed mean that
16:18 phil left
Matt-W gargh! no gvim! 16:18
Matt-W panics
masak or just say C<<< >>. >>>
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.
mtnviewmark uhm, wasn't clear - to me 16:21
masak I'll see if I can find it.
mtnviewmark "Any infix relational operator may be transformed into its negative by prefixing with !" 16:22
masak mtnviewmark++ # coming here and posing all these interesting questions
mtnviewmark: there you go.
mtnviewmark but, well, I'd say "infix relational operator" isn't well defined
masak mtnviewmark: how so?
mtnviewmark well - that is the only occurrence of that phrase in that document!
and "relational operator" appears 5 times, but all in reference to the ! meta-operator 16:23
masak heh.
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
moritz_ probably "infix operators that returns Boolean... what masak said ;)
masak as opposed to things like '+' and 'max'
moritz_: OH HAI
16:24 cspencer joined
masak mtnviewmark: sounds reasonable. 16:25
mtnviewmark what about ?^ can I say !?^ ?
16:25 Jedai left
mtnviewmark that is infix and returns Bool, but isn't relational in the English sense 16:25
masak good question.
moritz_ mtnviewmark: you'd use !xor for that, probably
mtnviewmark hopes folks doesn't mind him being a programing language pedant!
masak mtnviewmark: no, 's cool.
we do that all the time here. 16:26
Matt-W It's compulsory
mtnviewmark well - see, !xor doesn't really flow from "infix relational operators"....
masak perl6: say (True !xor False)
p6eval pugs: OUTPUTĀ«*** ā¤ Unexpected "!"ā¤ expecting "=", "(", ":", operator or ")"ā¤ at /tmp/iUOHamZG6t line 1, column 11ā¤Ā»
..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)ā¤Ā»
..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'ā¤
..STD_red/prelude.rb...
masak the support for !xor isn't overwhelming.
moritz_ perl6: say 1 xor 0
p6eval elf 24756, pugs, rakudo 34925: OUTPUTĀ«1ā¤Ā» 16:27
mtnviewmark std: my $a; my $b; $a !xor $b;
p6eval std 24756: OUTPUTĀ«############# PARSE FAILED #############ā¤Only boolean infix operators may be negated at /tmp/V2RBAaQAIl line 1:ā¤------> my $a; my $b; $a !xor $b;ā¤00:05 86mā¤Ā»
masak mwhahaha.
mtnviewmark aha!
moritz_ uhm, xor *is* a boolean infix operator
mtnviewmark std: my $a; my $b; $a !?^ $b;
p6eval std 24756: OUTPUTĀ«############# PARSE FAILED #############ā¤Only boolean infix operators may be negated at /tmp/HYbpHzgVbq line 1:ā¤------> my $a; my $b; $a !?^ $b;ā¤00:05 86mā¤Ā»
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?
masak someone should @tell TimToady.
moritz_ he usually backlogs
masak ah, right.
TimToady: ditto !?^ 16:29
mtnviewmark TimToady: also !<=> and !xor
masak mtnviewmark: um, <=> doesn't return Bool.
moritz_ std: 1 X!=:=X 2 16:30
p6eval std 24756: OUTPUTĀ«00:05 85mā¤Ā»
masak moritz_: :D
moritz_ rakudo: my ($a, $b, $c); say ($a, $b, $c) X!=:=X ($a, $b, $c)
p6eval rakudo 34925: OUTPUTĀ«011101110ā¤Ā»
masak nice!
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)ā¤Ā»
moritz_ rakudo: my ($a, $b, $c); say [and] ($a, $b) X!=:=X $c
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)ā¤Ā»
moritz_ rakudo: my ($a, $b, $c); say all ($a, $b) X!=:=X $c
masak moritz_: could you do me a favour and see if you can run 'make test' to successful completion in November's p6w?
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
p6eval rakudo 34925: OUTPUTĀ«Junction<0xb5fbb61c>ā¤Ā»
moritz_ rakudo: my ($a, $b, $c); say ?all ($a, $b) X!=:=X $c 16:32
p6eval rakudo 34925: OUTPUTĀ«1ā¤Ā»
masak mtnviewmark: I don't. I think of it as inverting a Bool.
mtnviewmark (realizes that that is totally absurd!)
moritz_ rakudo: my ($a, $b, $c); say ?all ($a, $b) X!=:=X $b
p6eval rakudo 34925: OUTPUTĀ«0ā¤Ā»
moritz_ masak: I can, but only with ~2week old versions of rakudo + November
16:33 alester left
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.
moritz_: but one more data point cannot hurt.
mtnviewmark moritz_ is showing off! (or at least, showing rakudo off!)
masak Rakudo rocks. 16:34
rakudo: my $a = 5; my $b; $b := $a; say $a =:= $b
p6eval rakudo 34925: OUTPUTĀ«1ā¤Ā»
masak rakudo: my $a = 5; my $b := $a; say $a =:= $b 16:35
p6eval rakudo 34925: OUTPUTĀ«1ā¤Ā»
masak nice.
mtnviewmark so, on the topic of obscure relationals.... is but the opposite of does? as in $x does
masak rakudo: my @a = 1,2,3; @a[0] := @a; say @a.perl
moritz_ mtnviewmark: sometimes it just itches :-)
p6eval rakudo 34925: OUTPUTĀ«rtype not setā¤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)ā¤Ā»
masak mtnviewmark: no, I think 'does' is compile-time and 'but' is runtime 16:36
or something like that.
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)
eric256 hey, i patched rakudo to allow .first( ) to take anything that goes on the right hand side of ~~ which seems to match specs
masak moritz_: thank you.
moritz_: that's what I'm getting as well.
mtnviewmark $foo does Mixin xor $foo but Mixin
eric256 and it passes all spec tests still...now to see if it passes any new tests
mtnviewmark this should always be true .... ?
masak eric256++
mtnviewmark: they're not tests. 16:37
eric256 masak: it was like a two line fix so i'm skeptical.
masak eric256: no, anyone who adds a feature deserves a karma point.
moritz_ eric256: you can run 'perl tools/autounfudge.pl -a' ....
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
mtnviewmark er, okay - I'll have to find them in a different Syn then, as Syn03 is pretty thin on the point
and they are grouped with non-chaining conditionals
moritz_ eric256: if new tests pass, there might be a patch in autunfudge.patch after the run
masak mtnviewmark: try S12.
eric256 moritz_: whats the ... there? test file name? 16:38
oh nm
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
masak np
mtnviewmark that also means I have to move them in the chart then.. .:-)
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
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) "
masak mtnviewmark++ # updating chart
eric256 might not be right, but its what i could figure out on my own last night
mtnviewmark masak - I hope I can find you here later
thanks all for answering my questions
I'll be back..... ;-)
masak mtnviewmark: I'm usually here.
and if I'm not, many others are. 16:41
16:42 mtnviewmark left 16:44 masak left
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)ā¤Ā»
eric256 ohhh i thought there was an explicit function for building pairs... 16:45
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 17:00 kisu__ joined 17:04 kisu_ left
eric256 wow auto unfudge takes a long time 17:06
moritz_ eric256: it does a lot of (mostly stupid) work 17:14
it reomoves each single fudge line, runs the test again, and check if the tests still pass
if yes, it writes a patch that removes this line
gone again & 17:20
17:27 Takadonet joined
pmichaud infix:<cmp> isn't a infix relational op. 17:32
neither is infix:<xor>.
oh, maybe infix:<cmp> is... I'm still confusing it with C<leg> 17:33
but infix:<xor> isn't negatable with a meta-prefix ! 17:34
17:34 mtnviewmark joined 17:40 meppl left, ejs left 17:46 cognominal joined 18:01 araujo joined 18:02 mtnviewmark left
Matt-W Brain explodey 18:02
[matthew@asymptote parrot]$ ./perl6 -e "say ('bac' ~~ /a/).WHAT"
Match
[matthew@asymptote parrot]$ ./perl6 -e "('bac' ~~ /a/).WHAT"
Null PMC access in get_integer()
18:07 awwaiid joined, azawawi joined
azawawi hi 18:07
18:09 duke_leto left 18:10 Takadonet left 18:11 Takadonet joined, mtnviewmark joined 18:15 Whiteknight joined
azawawi moritz_: ping 18:16
18:16 ruoso left 18:19 Patterner left 18:22 mtnviewmark left, ruoso joined 18:24 alanhaggai_ joined, Psyche^ joined 18:25 Psyche^ is now known as Patterner 18:28 alanhaggai left 18:32 maerzhase left 18:40 maerzhase joined 18:47 yahooooo joined
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 19:00 nirc left 19:04 maerzhase left 19:08 tyrelle left 19:09 duke_leto joined 19:11 maerzhase joined 19:30 cspencer left
azawawi masak: ping 19:30
19:39 aindilis left 19:43 cspencer joined 19:53 Patterner left, c9s_ left, c9s left, kst left, Aisling left, yahooooo left, Whiteknight left, jhorwitz left, vixey left, duke_leto left, xinming left, DemoFreak left, awwaiid left, buu left, kidd left, araujo left, alanhaggai_ left, iblechbot left, elmex left 19:54 buubot left, [particle]1 left, cspencer left, charsbar left 19:55 moritz_ joined, cspencer joined, duke_leto joined, yahooooo joined, Patterner joined, alanhaggai_ joined, Whiteknight joined, awwaiid joined, araujo joined, jhorwitz joined, c9s_ joined, vixey joined, xinming joined, iblechbot joined, DemoFreak joined, charsbar joined, elmex joined, buubot joined, buu joined, c9s joined, kidd joined, Aisling joined, kst joined, [particle]1 joined, dukeleto joined, Caelum joined, Southen_ joined, mgs` joined, SubStack joined, ryanc joined, simcop2387 joined, revdiablo joined, literal joined, c1sung joined, edenc joined, nothingmuch joined, Eevee joined, drbean_ joined, dmpk2k joined, p6eval joined, Matt-W joined, AzureStone joined, jjore joined, ingy joined, IRSeekBot joined, baest joined, kcwu joined, silug joined, irc.freenode.net sets mode: +o moritz_, jrockway joined, smg joined, shachaf joined, kolibrie joined, rafl joined, cookys joined, jan_ joined, OuLouFu joined, gbacon joined, unobe joined, rhr joined, sunnavy joined, obra joined, lambdabot joined, preflex joined, Grrrr joined, frodwith joined, szbalint joined, nnunley joined, hcchien joined, broquaint joined, SamB joined, dalek joined, jnthn joined, zev joined, pasteling joined, StephenPollei joined, ilbot2 joined, Trey joined, allbery_b joined, mj41 joined, go|dfish joined, cls_bsd joined, Lunchy joined, spinclad joined, Tene joined, szabgab joined, mtve joined, irc.freenode.net sets mode: +oo jnthn Tene 20:03 jan_ left 20:05 jan_ joined 20:12 dwhipp joined 20:14 sri_kraih joined 20:22 jferrero joined
pugs_svn r24757 | ruoso++ | [smop] small fix in Attribute. 20:24
r24757 | ruoso++ | [smop] Add the lowlevel attribute to the lexical scope
r24757 | ruoso++ | [mildew] implements "has $!a", but PurePrototypeHOW still doesnt support it
s1n moritz_: pmichaud said you could use some help sifting through your tickets 20:35
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:36
20:37 jhorwitz left 20:42 cspencer left 20:56 donaldh joined 21:02 hudnix joined 21:10 jferrero left 21:16 dwhipp left, aindilis joined 21:18 cspencer joined 21:46 aindilis left 22:00 alanhaggai__ joined 22:14 mberends joined 22:17 alanhaggai_ left 22:24 donaldh left
pugs_svn r24758 | ruoso++ | [smop] PurePrototypeHOW implements add_attribute 22:38
22:40 sri_kraih left 22:57 cspencer left 23:09 kisu__ is now known as kisu 23:10 cspencer joined 23:13 mberends left 23:39 kisu_ joined 23:40 elmex left 23:41 km2 joined 23:44 kisu left, Khisanth left, Khisanth joined, meppl joined 23:52 Jedai joined 23:58 duke_leto left 23:59 vixey left