»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by Juerd on 28 August 2009.
00:02 M_o_C joined 00:05 alester joined 00:07 dukeleto left 00:13 ihrd joined 00:17 cotto left 00:22 jdv79 left 00:26 payload joined 00:31 nihiliad left 00:41 cotto joined 00:43 JimmyZ joined
JimmyZ rakudo: my Int = 'a'; 00:43
rakudo: my Int $foo = 'a';
p6eval rakudo 446d49: ( no output ) 00:44
rakudo 446d49: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (/tmp/5lDzGPNkby:2)␤»
JimmyZ rakudo: try{ my Int $foo = 'a'; } 00:47
p6eval rakudo 446d49: ( no output )
00:47 markmont left
JimmyZ rakudo: try{ my Int $foo = 'a'; CATCH { warn "Ops: $! " } } 00:48
p6eval rakudo 446d49: ( no output )
00:52 alester left 01:03 Guest44537 joined, Guest44537 is now known as sm`, sm` is now known as sm^^^ 01:08 meppl joined 01:12 M_o_C left 01:17 KatrinaTheLamia left 01:29 rdice joined 01:30 KatrinaTheLamia joined 01:32 sri_kraih left 01:35 sri_kraih joined 01:45 tak11 left 01:47 bgs100 left 01:49 sri_kraih_ joined 01:53 jaldhar left 02:01 jaldhar joined 02:06 sri_kraih left, sri_kraih_ is now known as sri_kraih 02:10 c9s_ joined 02:12 patspam joined 02:16 reqamst left 02:22 SmokeMachine left 02:32 patspam left 02:33 mdxi joined
mdxi i love serendipity. couple days ago i'm out thrifting and stumble on "Introduction to Tagmemic Analysis", Cook, 1969. Being an addict for all things word-and-language, I grab it (besides, it's $2) 02:37
get home, do some googling to learn what's up before actually reading. 3 minutes later i'm reading a PDF form Allison form YAPC::EU 2002 adn looking at Perl6's given/when statement. 02:38
s/form/from/g
02:38 rdice left
__ash__ i have a bool on cobol from the 70's i found in a thrift store 02:42
and another book on computers from the 70's from a business perspective, it lists computers you can go rent for like $1300 an hour and how many (or few) instructions they can process a second, etc. 02:43
its very amusing considering the state things are in these days
diakopter pmichaud: maybe you know; does a viv Action:: ever get invoked but then backtracked away? or are the ast nodes certain by the time viv gets them? 02:48
02:51 snarkyboojum joined
__ash__ okay, this is probably a dumb question, but in bash how do you redirect stderr to stdout? or how would i do perl6 --trace=5 somefile.pl | grep 'somefunction' 02:56
mdxi stuff 2>&1 | otherstuff 02:58
__ash__ thanks, i really should know that by now, i knew it was something like that but didn't know exactly 02:59
03:00 jaldhar left 03:02 jaldhar joined 03:05 agentzh joined 03:09 zamolxes_ joined, payload left 03:20 drbean joined, zamolxes left 03:21 asciiville joined 03:28 jauaor joined 03:31 frew_ joined, drbean__ joined 03:34 tak11 joined 03:36 drbean_ left 03:37 mepplock joined
colomon rakudo: for (1, 2, 3) Z (5, 3, 4) -> $a, $b { say "$a $b"; } 03:40
p6eval rakudo 446d49: OUTPUT«1 5␤2 3␤3 4␤»
03:41 cotto left, cotto joined
__ash__ colomon, hows the trig stuff going? still looking into that? 03:43
colomon __ash__: Absolutely still looking into it. Checked in a bunch more stuff today. 03:44
03:44 meppl left, mepplock is now known as meppl
__ash__ are you done with the failing Num tests? didn't you get to the complex ones? 03:45
colomon I haven't worked out how to get Complex to work correctly, but I got sucked into fixing the Num functions.
All the hyperbolic ones were broken, as well as several of the normal ones.
I think my next step is going to be to whip up a code generator to generate trig tests, as there's just too much repetition and ugliness otherwise. 03:46
After that, the inverse trig functions need to be tackled. At least a few of those are broken as well. 03:47
__ash__ whats wrong with the complex numbers?
colomon They're calling the Parrot complex number versions of the functions rather than the Rakudo versions. 03:48
Of course, most of the Rakudo versions aren't actually implemented yet, either.
03:49 drbean left
colomon The other thing to do is fix the $base argument to be an enum, as per the spec. That's another thing to tackle once the test generator is up and running. 03:49
I'll probably be tinkering on it for at least another week. :) 03:50
__ash__ rakudo: say (1 + 0i).PARROT;
p6eval rakudo 446d49: OUTPUT«Complex␤»
03:50 Entonian joined
__ash__ rakudo: say (1 + 0i).perl; 03:50
p6eval rakudo 446d49: OUTPUT«1+0i␤»
__ash__ would be nice if it was called ParrotComplex or something to tell the difference 03:51
colomon It says Complex, but it's still calling the Parrot version. I've tested that pretty exhaustively.
Yeah, I guess I don't know if the problem is that it's really complex (parrot version) but it says Complex, or that it calls complex.sin when it should call Complex.sin. 03:52
rakudo: class Complex is also { multi method tan() { say "Hello!"; }; }; say (1 + 1i).tan; 03:53
p6eval rakudo 446d49: OUTPUT«0.271753+1.08392i␤»
colomon See? 03:54
__ash__ rakudo: say &(1 + 1i).tan.signature
p6eval rakudo 446d49: OUTPUT«Use of contextualizer & not implemented. at line 2, near ".tan.signa"␤in Main (src/gen_setting.pm:3043)␤»
__ash__ rakudo: say &((1 + 1i).tan).signature;
p6eval rakudo 446d49: ( no output ) 03:55
03:55 alester joined
__ash__ rakudo: say &(5.tan).signature; 03:55
p6eval rakudo 446d49: OUTPUT«Use of contextualizer & not implemented. at line 2, near ".signature"␤in Main (src/gen_setting.pm:3043)␤»
colomon Anyway, need to get bed now. Busy day ahead tomorrow. Let me know if you come up with anything brilliant on the Complex problem. :) 03:56
__ash__ i'll probably mess around with it some, at least maybe for identifing which complex your actually using (if you could easily tell the difference between a parrot complex and a perl complex it would be easier)
rakudo: say (1 + 1i).WHAT 03:57
p6eval rakudo 446d49: OUTPUT«Complex()␤»
__ash__ rakudo: say ((1 + 1i) + 1).WHAT;
p6eval rakudo 446d49: OUTPUT«Complex()␤»
04:00 __ash__ left
s1n is there any sort of specification for NQP? that is, how much is and is not supported? 04:01
04:02 Entonian left
JimmyZ s1n: docs.parrot.org/parrot/latest/html/ PCT 04:12
lambdabot Title: Parrot 1.5.0 - Home
04:13 dukeleto joined, frew_ left
JimmyZ s1n: docs.parrot.org/parrot/latest/html/...p.pod.html 04:13
lambdabot Title: Parrot - Grammar Actions, tinyurl.com/phluqx
s1n JimmyZ: thanks, this isn't so much what i want though, i'm curious how much or little of perl6 NQP (and PGE) are of perl6... there's no language spec that i know of, just wanted to know if anyone has documented the differences 04:17
JimmyZ s1n: take a look at rakudo. I think. 04:18
s1n JimmyZ: yes, but that's only seeing 1 example, which may or may not use everything available
JimmyZ NQP is written by PM, and it is mainly for rakudo. 04:20
s1n JimmyZ: yes, i am aware of that
04:21 patspam joined
JimmyZ s1n: I think you should read the source code, for more. 04:24
s1n JimmyZ: naw, i'll just ask pmichaud when i see him next weekend 04:25
JimmyZ s1n: :) 04:26
04:27 frew_ joined
s1n phenny: tell pmichaud i'm looking for specifics on nqp; hit me up if you have any info for me 04:30
phenny s1n: I'll pass that on when pmichaud is around.
04:34 frew_ left 04:43 |Jedai| left, Chillance left 04:47 cotto left 04:49 patspam left 04:51 payload joined 04:52 ihrd left 05:02 agentzh left 05:14 c1sung left 05:33 alester left 05:36 dukeleto left 05:48 REPLeffect joined 06:10 agentzh joined 06:25 synth joined, synth^2 left 06:34 Lorn left 06:36 Lorn joined 06:40 orafu left, orafu joined 06:46 tak11 left 07:01 cotto joined 07:12 dukeleto joined, alester joined 07:19 petdance joined
mikehh rakudo (0f1edeb) builds on parrot r41247 - make test PASS / make spectest (up to 28222) FAIL - Ubuntu 9.04 amd64 07:26
rakudo - t/spec/S12-introspection/walk.rakudo FAILs and t/spec/S03-operators/arith.rakudo - TODO passed: 120, 131-132
Note - t/spec/S03-operators/arith.rakudo - TODO passed: 131 only on i386 07:27
and also no more Segmentation faults here 07:28
07:35 alester left, petdance is now known as alester, JimmyZ left 07:40 Tene joined 07:43 rfordinal left, rfordinal joined 07:44 mj41 left 07:45 cotto left 07:54 alester left 07:55 cotto joined
pugs_svn r28223 | fglock++ | mp6 - Javascript stub 07:55
07:56 Su-Shee joined
Su-Shee good morning. :) 07:56
Matt-W Good morning
KatrinaTheLamia good morning
btw... something was mentioned a _long_ time ago about jhiard(sp?) offering shell accounts to some people... I could check my logs about it (which would take quite some time BTW), or I can ask again here. 07:58
mberends KatrinaTheLamia: email [email@hidden.address]
KatrinaTheLamia mberends, thank you kindly ^.^ 08:02
and the email has been sent... awaiting my rejection letter style reply ^.^ 08:16
08:33 payload left 08:52 cotto left 09:34 M_o_C joined 09:50 justatheory left 09:52 sharada joined 09:55 pmurias joined
pmurias KatrinaTheLamia: feather accounts are given to all people interested 09:57
KatrinaTheLamia: they are intended for Perl6 related activities only 09:58
10:46 Whiteknight joined 10:53 pmurias_ joined, pmurias left 11:01 pmurias_ is now known as pmurias 11:11 molaf joined 11:14 cono left 11:15 molaf left 11:17 agentzh left 11:18 cono joined 11:19 jferrero left 11:23 sm^^^ left, Guest44537 joined 11:45 jferrero joined 12:22 digitalise joined, digitalise left 12:23 Whiteknight left 12:26 jauaor left, araujo left 12:33 alexn_org joined
diakopter anyone around read japanese? 12:43
nm; google translate is my friend 12:45
12:50 Su-Shee left 12:51 Eevee_ joined
diakopter rakudo: say »ö« 12:56
p6eval rakudo 446d49: OUTPUT«say requires an argument at line 2, near " \x{bb}\x{f6}\x{ab}"␤in Main (src/gen_setting.pm:2565)␤»
diakopter rakudo: say '»ö«'
p6eval rakudo 446d49: OUTPUT«»ö«␤»
12:57 icwiener joined
diakopter pmurias: hi 12:57
carlin rakudo: say «ö» 12:59
p6eval rakudo 446d49: OUTPUT«ö␤»
diakopter heh 13:02
13:05 Eevee left 13:09 drbean__ is now known as drbean
carlin How do you make a rule case-insensitive? 13:20
13:26 agentzh joined 13:27 zamolxes_ left 13:28 payload joined 13:31 jan_ left
carlin rakudo: if * ~~ /foo/ { }; 13:42
p6eval rakudo 446d49: OUTPUT«Object must be created by a class.␤in regex PGE::Grammar::_block54 (/tmp/W6W5tsaYUS:1)␤called from Main (/tmp/W6W5tsaYUS:2)␤»
pmurias diakopter: hi 13:48
13:55 jferrero left 14:07 colomon left 14:09 nihiliad joined 14:11 synth left
Juerd carlin: With :i 14:13
rakudo: say("foObAr" ~~ /:i oba/) 14:14
p6eval rakudo 446d49: OUTPUT«ObA␤»
Juerd carlin: :i is short for :ignorecase and is documented in Synopsis 5, perlcabal.org/syn/S05.html 14:15
lambdabot Title: S05
carlin Juerd: right, but how do I do that with a rule {} block? 14:18
Juerd rule quux { :i xyzzy }
carlin Argh, I thought I had tried that 14:21
but it works so I guess not. Thanks Juerd++
14:30 nihiliad left 14:33 davidfetter joined 14:34 zamolxes joined 14:37 davidfetter left 14:42 pmurias left 14:46 Psyche^ joined, SmokeMachine joined 14:50 jan__ joined, nihiliad joined 15:00 JimmyZ joined 15:02 Patterner left, Psyche^ is now known as Patterner 15:05 c1sung joined 15:15 agentzh left 15:22 Jedai joined
pugs_svn r28224 | jimmy++ | [Spec/S03-operators.pod]fixed POD format. 15:24
15:45 molaf joined 15:47 JimmyZ left 15:48 abra joined 16:00 __ash__ joined 16:24 tylerni7 left, frew_ joined 16:31 tylerni7 joined 16:33 cotto joined 16:34 rapacity left 16:39 zloyrusskiy joined 16:44 abra left 16:48 abra joined 16:55 nbrown joined 16:57 araujo joined 16:59 abra left 17:02 abra joined
moritz_ re 17:03
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
moritz_ @massages
lambdabot mncharity said 5m 15d 17h 18m 15s ago: re p6 project advertising, it might be worth doing a "state of p6", high-visibility general posting to the p5 community at some point. a tiny sample of
comments on #moose suggests even active p5 developers don't quite realize how shoestring the effort is.
wayland76 said 3m 22d 12h 52m 5s ago: Can eternaleye have a commit bit for the Specs so he can work on S22 please?
17:05 frew_ left
moritz_ @tell wayland76 you can hand out commit bits yourself at <commitbit.pugscode.org/admin/projec...people> 17:05
lambdabot Consider it noted.
moritz_ I hope somebody else gave eternaleye a commit bit in the mean time?
__ash__ moritz_ do you know an easy way to tell if the class an object is, is the parrot version or the perl version? 17:06
moritz_ __ash__: don't know - if .PARROT doesn't reveal that information, I don't think so 17:07
pugs_svn r28225 | moritz++ | [t/spec] delete die-arg-preservation.t which is simply wrong
r28226 | moritz++ | [t/spec] get rid of S06-operator-overloading/method.t 17:08
r28226 |
r28226 | I deleted half of the tests because they were wrong, the others went into
r28226 | sub.t
r28227 | moritz++ | [t/spec/TODO] more spec changes as TODOs
__ash__ rakudo: class Complex is also { multi method tan() { say "Hello!"; }; }; say (1 + 1i).tan;
p6eval rakudo 446d49: OUTPUT«0.271753+1.08392i␤»
pugs_svn r28228 | moritz++ | [t/spec] tests for Rat and Complex literals
r28229 | moritz++ | update test according to r28201
r28230 | moritz++ | [t/spec] forbid lists and ranges as Range end points (as per r28171)
r28231 | moritz++ | [t/spec] initial tests for :my, :our, :state, :constant in regexen
17:12 abra left
__ash__ this is mainly related to complex numbers is why i ask, its hard to figure out if your dealing with the perl complex or the parrot complex for tests 17:13
17:13 abra joined
moritz_ I don't understand the interaction between parrot's Complex and rakudo's Complex at all. 17:15
__ash__ how do you get a method signature? isn't it like &method.signature?
rakudo: sub a { }; say &a.siganture; 17:16
p6eval rakudo 446d49: OUTPUT«Method 'siganture' not found for invocant of class 'Perl6Sub'␤»
__ash__ helps spelling it correctly...
rakudo: sub a { }; say &a.signature;
p6eval rakudo 446d49: OUTPUT«Signature()<0xb6895e28>␤»
__ash__ rakudo: say &((1 + 1i).tan).signature; 17:17
p6eval rakudo 446d49: OUTPUT«Use of contextualizer & not implemented. at line 2, near ".signature"␤in Main (src/gen_setting.pm:3043)␤»
moritz_ .signature.perl 17:18
__ash__ rakudo: say &((1 + 1i).tan).signature.perl;
p6eval rakudo 446d49: OUTPUT«Use of contextualizer & not implemented. at line 2, near ".signature"␤in Main (src/gen_setting.pm:3043)␤» 17:19
17:19 tak11 joined 17:21 justatheory joined 17:23 alexn_org left
Juerd rakudo: say (1, 5).sum 17:23
p6eval rakudo 446d49: OUTPUT«Method 'sum' not found for invocant of class 'List'␤»
Juerd Oh.
moritz_ use [+] instead
Juerd I know it exists, but I wanted a close translation of some original code :) 17:24
__ash__ rakudo: say [+] 1, 2, 3, 4; 17:25
p6eval rakudo 446d49: OUTPUT«10␤»
mberends rakudo: ([+](1,5)).say 17:26
p6eval rakudo 446d49: OUTPUT«6␤»
Juerd mberends: I think say [+] 1, 5; is clearer. 17:27
Juerd is not a big fan of parens.
__ash__ flashbacks to lisp (+ 1 5)
sharada prefer (+ 1 5) to (+ 1, 5) 17:28
moritz_ prefers 1 + 5
__ash__ (format t "Num: ~D~%" (+ 1 5)) ;; if memory serves 17:32
moritz_ @clear messages 17:35
lambdabot Messages cleared.
Juerd Hm, rakudo doesn't like my huge regex
Uses lots and lots of memory
arnsholt __ash__: The CLHS agrees with you
~a would probably work as well
__ash__ yeah but its an int, so might as well call it that
arnsholt True, true
Juerd feather.perl6.nl/~juerd/big_regex.p5.txt 17:36
feather.perl6.nl/~juerd/big_regex.p6.txt
Too big? :)
arnsholt Juerd: Hilfe!
__ash__ Juerd, you just broke my brain
Juerd arnsholt: Ich spreche kein Deutsch! :)
arnsholt Me neither =) 17:37
Juerd Parrot VM: PANIC: Out of mem!
Aw :(
17:38 rewt joined
pugs_svn r28232 | moritz++ | [S05] since \# is forbidden, s/unescaped/unquoted/ 17:42
17:42 synth joined
pugs_svn r28233 | moritz++ | [S03] ^4 cannot mean 0..3 and 0..^4 at the same time, because they are not the same 17:42
17:49 zloyrusskiy left, meppl left
__ash__ gist.github.com/186256 is one of my favorite obfuscated C programs 17:51
lambdabot Title: gist: 186256 - GitHub
moritz_ ;-) 17:52
arnsholt Now that is cool 17:54
17:55 Zloyrusskiy joined
__ash__ it compiles too, you need ncurses for it to work though 17:55
18:00 zamolxes left 18:19 kidd_ joined
Matt-W moritz_: Good blog post 18:29
moritz_ Matt-W: thanks 18:31
I just think that it's a point theoretical/pointless for the outsiders (aka not-yet-perl-6-hackers) 18:32
__ash__ is there a way in perl6 to return code? I imagine macro's would be the way to do it, but what i mean is more like, if you know ruby, say their attr_accessor :attr syntax 18:33
moritz_ macros can return ASTs, but are NYI 18:34
you can return closures
I guess attr_accessor is something like has $.public_attr?
Matt-W I just looked it up, it seems to be a method for creating accessor methods automatically 18:35
so yes, it's rather like has $.attr is rw;
moritz_ __ash__: there'll surely be ways to add methods to classes via the meta class 18:37
but I don't think it's specced in detail yet
__ash__ got yeea
yehudakatz.com/2009/06/04/the-impor...ss-bodies/ has example of what exactly i am referring to more or less 18:38
lambdabot Title: The Importance of Executable Class Bodies « Katz Got Your Tongue?, tinyurl.com/q66yjz
__ash__ I imagine some of that can be done with macro's but then there are some things that seem like it would need a bit more than macros to implement 18:39
like the lazy example at the bottom of that post, which maybe there is a whole different way of doing that sort of thing in perl6 but thats more or less what i am referring to 18:43
18:44 molaf left
moritz_ $yourClass.^add_method($some_closure) 18:44
not yet specced as such
__ash__ ah, okay, cool 18:45
moritz_ the standard meta class really needs specs
rakudo and smop both implement it paritially
__ash__ is there a spec out there for it yet? 18:46
moritz_ no 18:47
unless you write one ;-)
__ash__ lol
i'd be willing it give my opinion on it, but writing the whole thing is probably beyond my capabilities
moritz_ a partial one would be great already 18:48
__ash__ i have to say ruby and smalltalk have influenced my opinion on OO meta programming quite a bit, i have yet to find an OO language that rivals ruby for meta programming capabilities, but perl6 looks more like the kind of language i like all things considered, i like all the other features it has that aren't OO because OO isn't 'the one true way' 18:49
moritz_ (and I mean it, really. No super-wizard skills required for the intial version - others will refine it as needed)
Matt-W The OO/lazy functional hybrid approach seems to work very well 18:50
__ash__ i can write up my ideas if you want and send them to you moritz_ 18:51
moritz_ that would be great 18:52
__ash__ i think it kind of speaks for functional programming that in all the implementations i have seen they can never stay 'purely functional' and be a productive language, but many of the ideas from them have made there way into non-functional languages 18:53
moritz_ or maybe even to p6l, because others have interest in that too
arnsholt Is there anyone that uses OS X for Rakudo development?
__ash__ arnsholt: i do
10.6.1 18:54
moritz_ masak does, too
__ash__ arnsholt: need me to test something OS specific?
arnsholt When I run make test/spectest, there seems to be a lot of tests that are marked as dubious (Test returned status 0 (wstat 10, 0xa)\nafter all the subtests completed successfully) 18:55
Is this a sign of something not quite right with my setup, or just a normal thing?
moritz_ arnsholt: could you please updated to latest parrot and try again?
I had these problems too, but they seem mostly gone now with parrot r41252 18:56
arnsholt 'k. I'll do that and report back
18:56 meppl joined
__ash__ mine still does that on some tests with the newest parrot, i haven't really looked into what it is exactl 18:58
y
pugs_svn r28234 | fglock++ | mp6 - Javascript update 18:59
18:59 finanalyst joined
finanalyst @seen moritz_ 19:00
lambdabot moritz_ is in #perl6. I last heard moritz_ speak 3m 55s ago.
finanalyst moritz_: ping
moritz_ finanalyst: pong
finanalyst hi moritz. Just saw your change to S03 on ranges. I dont think 'exclusively' is sufficiently clear. 19:03
possibly 'upto but not including its argument'
and add an example using a fractional :by 19:04
am i being clear?
moritz_ finanalyst: yes - feel free to change that
finanalyst ok. will try
moritz_ great!
mberends perl6 -v
finanalyst Specs still in pugs? 19:05
moritz_ yes
19:07 kst` is now known as kst
finanalyst mortiz_: applogies, but what it is the correct way to commit an update? 19:18
moritz_ finanalyst: are you familiar with svn? 19:19
finanalyst i use a GUI called rapidsvn
i have downloaded just the directory with the specs and I got a commit bit a long time ago from Audrey 19:20
moritz_ then you need to change the file
finanalyst changed the file 19:21
moritz_ then you need to commit it
finanalyst that's all?
no need to do a diff?
moritz_ that's all
you can do that for sanity checking 19:22
but the diff that's sent to the p6l list ist generated automatically for you 19:23
finanalyst: and if you do mess something up, it can be easily reverted 19:24
finanalyst now i cant remember my password
it was a long time ago
moritz_ I can re-send your password 19:25
is richard@\w+.ru correct?
finanalyst please. yes
thanx 19:26
pugs_svn r28235 | finanalyst++ | clarifying ^4 in a range and including a fractional example 19:29
finanalyst moritz_: finally remembered it
__ash__ does perl6 have a 'method_missing' like functionality right now? 19:30
moritz_ what's that?
__ash__ in ruby on an object if you call a method that doesn't exist it calls that function (which is actually whats throwing the MethodMissingException
)
moritz_ ah, like AUTOLOAD in Perl 5 19:31
grep the specs for CANDO, iirc it provides a similar mechanism
finanalyst: note that ^$number :by didn't used to be specced 19:34
the case where it made a difference before was smart-matching
3.5 ~~ ^4 # true
3.5 ~~ 0..3 # false
__ash__ okay, got ya moritz_ thanks
finanalyst moritz_: i assumed it was intended 19:35
as otherwise how would 0 ..^ 4 be different from ^4? 19:36
just the smart match?
moritz_ good point
finanalyst daren duncan has just emailed me on the same topic 19:38
moritz_ if adverbs work on prefix operators, I see no point in not having them work on prefix:<^> 19:39
finanalyst nevertheless, if what I suggested is a no-no, then it's probable others like me will jump to the same conclusion
moritz_ let's see if others complain ;-) 19:40
__ash__ is there currently a spec for a method thats called when a role is included into a class? 19:41
finanalyst daren has just taken back his objection :)
moritz_ __ash__: afaict it's a bit more complicated... 19:42
__ash__: there's of course the multi 'does' which is called for 'class A does B { ... }'
finanalyst __ash__: interesting question, but why would you want one
19:42 molaf joined
moritz_ __ash__: second there must a be a method on the meta class to (tentatively) add a role (let's say A.^compose(B)) 19:43
__ash__: and then there's a method that's called when the class composition is finished
the reason is that a role may never conflict with itself
if you have role D { }; role B does D { }; role C does D { }; class A does C does B { }, the methods from D don't conflict 19:44
so composition is not performed immediately when calling .^compose, but later when the class construction is finished 19:45
__ash__ finanalyst: lots of reasons if you want an example of how a similiar functionality is useful in ruby look at the DataMapper library
yeah, it would be better to have a function you can call when the class is finished being constructed 19:46
moritz_ put it into your metaclass spec ;-)
__ash__ in the DataMapper ruby library they effectively have a role called Resource that lets them turn any object into a persistable object without screwing up inheritence (so you don't have to inherit from some table class or w/e) 19:47
i am, i am trying to think of the kinds of things i'd include in it, i am outline what i consider useful meta features right now
then i'll try to flush out the ideas a bit more
finanalyst Does ruby have both roles and classes (or the equivalents) - sorry, but i have never used ruby 19:48
__ash__ finanalyst yeah it does
moritz_ it certainly help to have people with different backgrounds working on that
__ash__ say you had a big project and wanted a few random bits of data to be persistent, thats where you could define a simple role to include in a few objects and have them behind the scene's know how to persist themselves based off the role rather than the more traditional approach of inheriting from some DB table object, which you see a lot of 19:50
that is a great example of how/why roles are useful
19:52 reqamst joined
__ash__ datamapper.org/doku.php?id=getting_...our_models is an example of the ruby way of doing that, its simple and readable, the property function returns a constructor to object accessors that know how to make themselves into database table columns, then you can add your Object#save anywhere and it knows how to save its state 19:52
lambdabot Title: getting_started_with_datamapper [DataMapper], tinyurl.com/pbpmqa
__ash__ thats a lot of fancy metaprogramming but in the end it makes things really easy to work with and gives you clean ways of defining what you need in your class 19:53
finanalyst i misunderstood the aim of the question. i wasnt asking why roles are a good idea, but why there would need to be a method called when composing a role into a class, in other words why would a progammer want to have access to such a method. 19:54
moritz_ finanalyst: for all sorts of things. For example role composition, as I mentioned to __ash__ earlier 19:56
__ash__ okay, here's a simple example, say you have a function in a base class A with a method foo
moritz_ finanalyst: role composition is delayed up to the point where the class is fully composed to avoid roles confliciting with itself
so the thing that composes roles must have a callback 19:57
__ash__ datamapper uses the included method to keep track of all of the objects that are supposed to be persistable too, so every time something includes Resource it adds that to another object to keep track of that 20:02
it also has an inherited method so if a class that includes a resource is inherited it can keep track of that too so you can do STI (single table inheritence, a db thing)
so you have Person, which includes Resource, so it knows to make a table called person, then you have Worker < Person, so worker is a child of Person, this shouldn't be a new database table, it should be STI 20:04
there are at least 2 useful meta callbacks in that, 1 called when the role is added to a class, 1 that is called when a class is inherited into another class 20:05
arnsholt __ash__/moritz_: I get 14 dubious (returned 0 after all tests successful) with latest parrot
moritz_ hrmpf. 14 is far too much, but better than the about 50 that I was getting with older parrots 20:06
__ash__ something is exiting with a bad status 20:07
20:08 finanalyst left
moritz_ if anybody has new findings in that matter, please comment on trac.parrot.org/parrot/ticket/998 20:09
__ash__ moritz_ i have noticed that sometimes rakudo gets bus errors and segfaults as the program is finishing, everything runs but i still get the errors 20:13
moritz_ __ash__: yes, there are two classes of such problems. One is the so-called "inferior run-loop problem" when eval()s die under certain circumstances and are caught later on. The other one is quite new and we don't know yet what's the problem 20:14
20:19 Zloyrusskiy left
mberends moritz_, with r41199 perl6 -v segfaulted at exit on Ubuntu x86. r41253 is ok... 20:20
20:20 Confield left 20:21 synth left 20:22 Confield joined 20:23 zamolxes joined 20:32 KatrinaTheLamia left
frettled You guys are just great, you provide me with blogging material each and every week. :D 20:35
20:44 abra left
__ash__ frettled what your blog? 20:45
frettled __ash__: howcaniexplainthis.blogspot.com
20:47 abra joined
__ash__ have any comments on meta classes? 20:48
frettled nopes, I haven't taken the time to wrap my head around them 20:49
moritz_ src/classes/ClassHOW.pir might be worth a read
20:49 KatrinaTheLamia joined 20:50 abra left
__ash__ k, well if you have any ideas let me know, i am taking up moritz_ challenge of writing a preliminary meta-magic spec 20:51
moritz_ __ash__++ 20:52
frettled __ash__: will do, but I don't think it's likely to happen soon, busy times for me :(
__ash__ no worries
frettled but definitely __ash__++ :D 20:54
__ash__ isn't there something about doing somehthing related to generics in perl6? like with roles? 20:55
class A does Role[Something] {} ?
moritz_ there are parameterized roles
yes
(defined in S14, and implemented in Rakudo already)
__ash__ kk, just checking
frettled parametrized roles are cool braintwisters. 20:56
moritz_ which actually is a signature
and you can do multi dispatch on multiple parameterized roles
20:57 mhymn joined
moritz_ rakudo: role A[Int $x { where $x < 12 }] { method size { 'small' } }; role A[Int $x] { method size { "$x is large" } }; class B does A[3] { }; B.new.size 20:57
p6eval rakudo 446d49: OUTPUT«Unable to parse 'generic role'; couldn't find final ']' at line 2, near "{ where $x"␤in Main (src/gen_setting.pm:3469)␤»
moritz_ rakudo: role A[Int $x where { $x < 12 }] { method size { 'small' } }; role A[Int $x] { method size { "$x is large" } }; class B does A[3] { }; say B.new.size 20:58
p6eval rakudo 446d49: OUTPUT«Potential internal error: bindability check may have done more than just binding.␤small␤»
20:58 KatrinaTheLamia left 21:00 jferrero joined
moritz_ rakudo: say (4/6).perl 21:00
p6eval rakudo 446d49: OUTPUT«2/3␤»
__ash__ how do attributes work in inheritence? 21:02
moritz_ they don't
attributes are private to the current class
only accessors are inherited (being normal methods)
__ash__ hmmm so no way for their to be 'cross class' variables? 21:03
like a variable thats inherited into its children
moritz_ well, if you declare an attribute as 'has $.attrib is rw' it's as though the variables was inherited
but it's really just the accessors that are inherited 21:04
mikehh rakudo (0f1edeb) builds on parrot r41254 - make test PASS / make spectest (up to 28235) FAIL (1 test) - Ubuntu 9.04 amd64 21:05
rakudo - t/spec/S12-introspection/walk.rakudo FAILs and t/spec/S03-operators/arith.rakudo - TODO passed: 120, 131-132
rakudo - no Segmentation faults reported in make spectest
pugs_svn r28236 | moritz++ | [evalbot] build parrot and rakudo with ccache and --optimize
__ash__ but if Workers has our $.total is rw that is incremented when its makes a new worker, and you subclass it and make a new instance of a subclass, would it effect Workers?
s/Workers/Workers total/
moritz_ no 21:06
I got you wrong
you mean things like class attributes, no?
__ash__ okay, understandable 21:07
moritz_ class Worker { our $total = 0; ... }
submethod BUILD { $total++ }
21:10 meppl left 21:11 tak11 left
moritz_ and then 'method total() is rw { $total} ' to achieve inheritance of $total (NYI in Rakudo) 21:14
arnsholt Hmm. Running spectest on my Mac returns a lot of funky errors 21:15
Or, some at least
__ash__ arnsholt: what errors? 21:16
arnsholt Two Parrot backtraces, a malloc error (free of an unallocated pointer) and a bus error
And a bucketload of dubiouses
moritz_ with which exit status? 11? 21:17
arnsholt Looks like most of them return 10 21:18
__ash__ mine always exits with a Bus Error 21:22
arnsholt I'm not quite at the end yet 21:23
21:33 icwiener left 21:36 krzys joined
krzys ? 21:37
21:40 krzys left 21:46 c9s_ left
arnsholt Right. 134 failed test scripts, one of which (t/spec/S12-introspection/walk.rakudo) actually failed any tests (4) 21:55
Which command does prove run to execute a single test script? 21:58
moritz_ first 't/spec/fudge --keep-exit-code rakudo $filename' or so, then ./perl6 $fudged_filename 21:59
22:00 KatrinaTheLamia joined
arnsholt Right. Looks like the bad return values are from bus errors (like __ash__ said) 22:03
moritz_ dammit. And they just went away on amd64. 22:04
arnsholt Are Rakudo/Parrot built with or without debugging symbols? 22:05
22:05 molaf left
moritz_ with, per default (I think) 22:05
22:05 jaldhar left
moritz_ at least gdb gives you stack traces 22:05
arnsholt I think you get those without symbols as wel 22:06
+l
From build/gen_parrot.pl and Configure.pl it doesn't look like it builds with debugging symbols 22:08
But that's not really important I suppose
I'll get that stacktrace first
Right. This is annoying 22:09
When I tried it in gdb it exited normally 22:10
moritz_ exits normally to bed
arnsholt And same when I tried it outside of gdb, this time
moritz_ ttfn folks
arnsholt is confused
Hmm. Looks like this error is somewhat transient 22:12
Going from the fact that I got a warning about trying to free something that wasn't allocated, I suppose it's possible this is related 22:14
22:24 M_o_C left 22:25 arnsholt left 22:26 pnu left, Confield left 22:28 omega left, omega joined, rhr left 22:29 Confield joined, Eevee_ left 22:30 yahooooo left, yahooooo joined, p6eval joined 22:32 nbrown left 22:33 arnsholt joined 22:34 awwaiid joined, jaldhar joined, zaphar_ps left, payload left 22:35 nbrown joined 22:36 pnu joined, mberends left 22:37 rhr joined, Eevee joined, synth joined 22:38 arthur-_ joined 22:39 snarkyboojum left 22:41 Entonian joined 22:49 PacoLinux left 22:51 kidd_ left, Guest44537 is now known as sm, sm is now known as sm` 22:59 snarkyboojum joined 23:03 asciiville left 23:06 Whiteknight joined, snarkyboojum_ joined 23:10 Confield left 23:13 nbrown_ joined, nbrown left 23:14 nbrown_ is now known as nbrown 23:15 nbrown_ joined, nbrown left, nbrown_ is now known as nbrown 23:22 Entonian left 23:23 snarkyboojum left, snarkyboojum_ is now known as snarkyboojum, sm^^^ joined 23:30 jrtayloriv joined 23:33 sm` left 23:35 Entonian joined 23:36 nbrown left 23:51 sharada left 23:54 nbrown joined, Entonian left