Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-01-18

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:14 ispeak joined #perl6
00:16 ihrd joined #perl6
00:16 ihrd left #perl6
00:29 colomon master compiles, make test is fine.
00:30 colomon and I'll know about make spectest in an hour or so....
00:37 rachelBROWN joined #perl6
00:38 pugs_svn r29552 | Darren_Duncan++ | S02 : Blob does Stringy, or something similar
00:39 diakopter ng: while 3 { do {} } while 1 { do {} };
00:39 p6eval ng 2717d0:  ( no output )
00:45 diakopter std: while 3 { do {} } while 1 { do {} };
00:45 p6eval std 29551: [31m===[0mSORRY![31m===[0m␤Missing semicolon or comma after block at /tmp/2ytOu0lqdb line 1:␤------> [32mwhile 3 { do {} } [33m⏏[31mwhile 1 { do {} };[0m␤FAILED 00:01 107m␤
00:45 diakopter std: while 3 { do {} }, while 1 { do {} };
00:45 p6eval std 29551: [31m===[0mSORRY![31m===[0m␤Confused at /tmp/7vWdp6ekLj line 1:␤------> [32mwhile 3 { do {} }[33m⏏[31m, while 1 { do {} };[0m␤    expecting blockoid␤FAILED 00:01 105m␤
00:46 diakopter less than perfect, but still more than awesome, error msg 'Missing semicolon or comma'
00:48 BinGOs did I miss something earlier in that perl6 still hasn't got threading support ?
00:49 diakopter I thought pugs did?
00:49 BinGOs it may have been a Rakudo related answer then
00:50 diakopter afaik, rakudo lacks threading
00:50 BinGOs I'm not going to huff
00:50 BinGOs neither does perl5
00:50 diakopter huff?
00:50 * BinGOs ducks.
00:51 BinGOs >:)
00:51 diakopter I don't know what you mean by 'huff'.  urbandictionary doesn't help either. :)
00:52 BinGOs http://www.merriam-webster.com/dictionary/huff
00:53 jhuni joined #perl6
00:53 diakopter ok, even if I knew which usage you meant, I still wouldn't get your point. :( sorry; I must be being obtuse today
00:53 BinGOs I was aimming for 2a with sarcasism
00:53 BinGOs however it is spelt
00:55 lumi joined #perl6
00:58 BinGOs also perl + threads has meant pain for years.
01:06 ispeak left #perl6
01:09 drbean_ joined #perl6
01:10 ashizawa joined #perl6
01:11 dalek rakudo/master: 726b83a | (Solomon Foster)++ |  (3 files):
01:11 dalek rakudo/master: Get master working with Parrot HEAD.  Patch from Vasily Chekalkin.
01:11 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/726b83a44af45a2d532191a2d272834bb909e5c7
01:12 colomon Other people should probably test that to make sure it works for them, but it worked perfectly on MacBook.
01:13 colomon on my MacBook, I mean.  OS X, anyway.
01:43 pugs_svn r29553 | diakopter++ | [sprixel] begin porting over the declarative portions of STD.pm.
01:43 pugs_svn r29553 | add lookbehind (literal string only).
01:43 pugs_svn r29553 | add semicolons in places for the JS.
01:43 pugs_svn r29553 | fix the toString methods of many of the emitters.
01:43 pugs_svn r29553 | add a non-backtracking xopt (optional) combinator.
01:53 lisppaste3 joined #perl6
01:53 [particle] joined #perl6
01:53 nbrown joined #perl6
01:53 Patterner joined #perl6
01:53 colomon joined #perl6
01:53 meteorjay joined #perl6
01:53 am0c joined #perl6
01:53 sunnavy joined #perl6
01:53 xinming joined #perl6
01:53 eiro joined #perl6
01:54 jhuni joined #perl6
01:58 lumi joined #perl6
02:08 jaldhar joined #perl6
02:24 orafu joined #perl6
02:54 diakopter std: say 3 unless
02:54 p6eval std 29553: Undeclared routine:␤  'unless' used at line 1␤ok 00:01 106m␤
02:55 diakopter rakudo: say 3 unless
02:55 p6eval rakudo 3867ff: 3␤Could not find non-existent sub unless␤in Main (file src/gen_setting.pm, line 324)␤
02:59 drbean joined #perl6
03:02 diakopter nice. the emitted parser routine is 200KB so far...
03:06 drbean_ joined #perl6
03:22 lumi joined #perl6
03:26 Baggiokwok joined #perl6
03:26 e6HQtmVwr joined #perl6
03:28 e6HQtmVwr joined #perl6
03:31 diakopter ipkb needs some tweaking
03:35 Mantis joined #perl6
03:35 araujo joined #perl6
03:40 Mantis http://pastebin.com/m6707f80
03:40 Mantis im pretty new
03:40 Mantis was just wondering if it looks like bad code
03:41 Mantis all it does is print out and concatenate files
03:42 diakopter nice try bryan[c1]
03:43 Mantis ummm, last time i was on someone was using it or i lagged out and logged back in
03:44 Mantis i'm not hiding, if that's what you're implying.
03:44 diakopter I'd recommend you visit #perl (it's Perl 5, not Perl 6, you're using), except your IP is banned there.
03:49 Mantis correct, which is why i'm asking on irc.perl.org, figured i would give it a shot here - people are usually friendly.
03:49 diakopter this isn't irc.perl.org
03:50 Mantis you win
03:50 Mantis is that what you want to hear?
03:51 diakopter hmm. no? is that what you want to hear?
03:51 Mantis well if that was the case then you would've just helped me
03:52 Mantis later
04:02 rekhajos joined #perl6
04:06 diakopter TimToady: o_O http://rishida.net/code/normalization/nfc-nohanorsuppch.js
04:36 gfx joined #perl6
05:02 pugs_svn r29554 | diakopter++ | [sprixel] more STD porting; some refactoring
05:20 xinming_ joined #perl6
05:24 cognominal_ joined #perl6
05:27 beeboo joined #perl6
05:28 beeboo I'm here because google has failed me :(  Does anyone know how to give a perl program a timer, and still take input while the timer is going?  Ive tried while (1) loop but thats the same as sleep apparantly, also looked into Time::HiRes and failed too
05:30 diakopter have you tried on #perl ? how did Time::HiRes fail you (did you try the setitimer)?
05:30 beeboo yes, but it seems i have to create a loop to check when the timer has completed
05:31 beeboo and the loop i create is basically doing the same thing as sleep()
05:31 beeboo while (1) { check for value of timer to be less than 1
05:31 beeboo i cant join #perl for some reason
05:31 diakopter you don't need a loop... you can use the POSIX module and its pause()
05:32 diakopter then when your alarm is triggered, that subroutine will run.
05:32 beeboo wouldnt pause() pause the whole program like sleep though?
05:32 beeboo i have an infinite loop that i want still running so my program is still taking input
05:32 diakopter yes; it sounds like your timer isn't going off
05:33 beeboo i need like...program never stops taking input, aside from the timer, BUT, when the timer reaches 0, execute sub
05:33 diakopter I've exhausted my available help; this is the Perl 6 channel; I'd try #perl on the irc.perl.org irc network, if I were you
05:33 beeboo i knew i shouldve used POE
05:33 beeboo for this damned acrobot
05:34 beeboo oh, the perl 6 channel
05:35 beeboo ill ask in ruby then, probably have better luck~
05:35 pugs_svn r29555 | diakopter++ | [sprixel] prevent statement_list from backtracking without using out-of-band state
05:35 diakopter :)
05:35 beeboo left #perl6
05:36 lumi joined #perl6
05:45 pugs_svn r29556 | diakopter++ | [sprixel] add a few commit()s to ease backtracking
05:47 agentzh joined #perl6
06:09 pugs_svn r29557 | diakopter++ | [sprixel] learning where commit()s should and shouldn't go... :)
06:16 diakopter std: if 3 {} else{}
06:16 p6eval std 29556: [31m===[0mSORRY![31m===[0m␤Missing semicolon or comma after block at /tmp/TzHJip0Hlj line 1:␤------> [32mif 3 {} [33m⏏[31melse{}[0m␤FAILED 00:01 105m␤
06:16 diakopter std: if 3 {} else {}
06:16 p6eval std 29556: ok 00:01 105m␤
06:19 diakopter std: if 3 {}else {}
06:19 p6eval std 29556: ok 00:01 105m␤
06:20 diakopter std: if 3 {}elsif 3 {}
06:20 p6eval std 29556: ok 00:01 105m␤
06:45 kaare joined #perl6
06:48 kaare_ joined #perl6
07:10 cognominal_ joined #perl6
07:17 Su-Shee joined #perl6
07:38 lumi joined #perl6
07:42 iblechbot joined #perl6
07:49 agentzh joined #perl6
08:02 drbean joined #perl6
08:22 sjn joined #perl6
08:29 Baggiokwok joined #perl6
08:33 nemo__ joined #perl6
09:03 jjore joined #perl6
09:04 jjore joined #perl6
09:04 mssm joined #perl6
09:04 jjore joined #perl6
09:06 jjore joined #perl6
09:07 dakkar joined #perl6
09:13 jjore joined #perl6
09:30 moritz_ good morning
09:34 hejki good ugt
09:36 arnsholt Moin
09:55 frettled Mojomojo.
10:00 mathw Morning
10:00 Su-Shee "coffee for 6, please!"
10:01 moritz_ Perl 6 - gets you a job
10:01 frettled w00t
10:01 Su-Shee moritz_: you've got one? :)
10:01 moritz_ Su-Shee: I've got an offer, yes
10:01 moritz_ including a contract; I just have to sign and return it
10:02 Su-Shee moritz_: oeh.. I would define that as "I got one" :)
10:02 Su-Shee moritz_: and does it involve p6? :)
10:02 moritz_ Su-Shee: nope
10:02 moritz_ Su-Shee: but perl-5.10.1 and Moose
10:03 frettled moritz_: ah, well, you'll save the world later!  But congrats!
10:04 Su-Shee moritz_: SO TELL US DETAILS. (it's not that perl jobs are growing on trees here.. :)
10:04 lumi joined #perl6
10:04 moritz_ Su-Shee: when I moaned about writing applications 2 weeks ago, szbalint++ told me that his company is looking for perl devs
10:05 moritz_ so I wrote a quick email to his boss, he replied, and phoned me
10:05 Su-Shee moritz_: now I'm satisfied. :) nice.
10:06 Su-Shee "hurray, there is still another perl company"
10:06 moritz_ and then on Wednesday I traveled to Vienna for the... "interview"
10:06 moritz_ but it was more a "we feed you with technical details" than a normal interview
10:06 Su-Shee moritz_: I've never had a normal interview. not once.
10:07 moritz_ KyleHa++ # smartmach tests reorganization
10:10 Baggiokwok joined #perl6
10:28 diakopter moritz_: hi
10:28 moritz_ hi diakopter
10:30 diakopter moritz_: for the next grammar feature, should I work on in-grammar slangs (for quoting), user grammar extensions/mutations, or the OPP
10:31 diakopter note that the 2nd one could involve figuring out how to get V8 to build an edition of itself with sprixel built-in/pre-compiled
10:31 jnthn morning, #perl6
10:31 moritz_ diakopter: depends on what you want to achieve
10:32 hanekomu joined #perl6
10:32 moritz_ diakopter: but I think OPP would be very useful without being too intrusive
10:32 moritz_ good morning jnthn
10:35 diakopter the 2nd one would help startup time alot; it's already >1second.... but it's doing all the phases/stages _with_every_execution_.  build the grammar tree; compile it to JS; eval it in JS; execute the function resulting from the eval..  the generated parser routine is nearly 300Kchars long of JS source... it takes V8 about .5s to JIT it the first time... a minimal invocation of the routine is minimum 2ms after that, and about 4kchars/second on the success
10:35 diakopter sigh.  too long.
10:35 diakopter it takes V8 about .5s to JIT it the first time... a minimal invocation of the routine is minimum 2ms after that, and about 4kchars/second on the success path.
10:36 diakopter but if the JS interpreter state is compiled down to a gigantic loadable byte array in a C++ source file (which is how V8 persists its state so as to "compile JS code"), the startup time would be a lot less.  like, 15ms I'm guessing.
10:37 diakopter moritz_: still, I agree with you. :)
10:37 diakopter the OPP is better in the proof-of-concept sort of way.
10:37 moritz_ jnthn: I need your opinion about using latest parrot in ng
10:38 moritz_ jnthn: with bacek's two patches, it builds and runs, but there are still some spectest failures
10:38 moritz_ (will nopaste in a minute)
10:38 diakopter moritz_: colomon applied a patch
10:38 diakopter to rakudo trunk I think?
10:38 jnthn moritz_: OK, depends on what new fails it introduces.
10:39 payload joined #perl6
10:40 moritz_ jnthn: http://paste.lisp.org/display/93550
10:41 moritz_ thing is... parrot 2.0 is going to be released tomorrow
10:41 moritz_ and if they screwed something up, rakudo has a problem.
10:43 * diakopter scrolls STD.pm again and again
10:43 jnthn moritz_: I'm more concernted about the state of master than ng in a sense.
10:43 jnthn (for the release)
10:43 jnthn moritz_: checking paste
10:43 drbean joined #perl6
10:44 jnthn moritz_: hmm. Noisy.
10:48 lumi joined #perl6
10:49 ashizawa joined #perl6
10:54 cognominal joined #perl6
11:05 mssm joined #perl6
11:10 pnate joined #perl6
11:22 lumi joined #perl6
11:25 avar joined #perl6
11:25 literal joined #perl6
11:41 bluescreen joined #perl6
11:44 bluescreen joined #perl6
11:55 payload joined #perl6
11:57 colomon morning!
11:58 moritz_ oh hai colomon
11:58 colomon you found a job!!!11!!
11:58 colomon :D
12:00 szbalint In #perl6, job finds YOU!
12:00 szbalint ;-)
12:00 colomon szbalint++
12:00 moritz_ they do :-)
12:01 gfx joined #perl6
12:01 Su-Shee well let's race for the first perl 6 class/module/component used in "the product" :)
12:01 Su-Shee (whatever you folks are doing with perl.. :)
12:03 moritz_ web stuff. "of course"
12:04 colomon [[[[\
12:05 SmokeMachine joined #perl6
12:08 bbkr Su-Shee - PERL makes the world go round :) If you ask for production usage of P6 I wrote GetResponse API connector using Moritz's JSON::Tiny from CPAN and my own JSON-RPC implementation.
12:10 bbkr Not to mention I use P6 grammars everywhere where P5 regexps gets too complicated and low speed is not the issue.
12:14 payload joined #perl6
12:16 Su-Shee we have nothing where low speed isn't an issue :/
12:22 colomon Right now, the main thing stopping me from using Rakudo as part of my build process for $work is the hassle of building the compiler on every platform I have.  (Cough, I haven't figured out how to get quick, easy development builds of Rakudo on XP and Vista yet.)
12:23 bbkr we sometimes do ad-hoc tasks in P6. lack of DB connectors is often the issue for us.
12:23 colomon (It seemed like the process might start with "Get Strawberry Perl" for all Windows platforms, which is another hassle to worry about...)
12:24 jnthn colomon: I build using ActiveState Perl and the Visual Studio compiler, but that's probably even more hassle. That said, there's no reason afaik that if you build a binary one one platform you cna't just use it on others.
12:24 jnthn *on one
12:25 Su-Shee well I would have to be able to handle a TB of data in a postgres db, 10 mio documents/messages and about 25000 users per instance.. :/
12:25 colomon jnthn: 32-bit versus 64-bit issues, or no?
12:25 jnthn colomon: 64-bit win can run 32-bit binaries, I think?
12:25 nadim joined #perl6
12:26 colomon jnthn: I do believe you're right.  maybe I'll have to have a chat with you sometime about how you get Windows builds to work.
12:26 colomon (All my Windows boxes have ActiveState and Visual Studio.)
12:27 jnthn colomon: Oh. With those two I tend to find it Just Works, provided you're lucky enough to have the VS environment set up.
12:27 cognominal joined #perl6
12:27 colomon Huh.  It definitely didn't just work for me when I tried it earlier this month.
12:28 colomon Might be the problem is I'm still using 5.8 ActiveState?
12:31 ruoso joined #perl6
12:33 alexn_org joined #perl6
12:37 jnthn colomon: Maybe, though I built with that.
12:37 jnthn colomon: Main issue is having the path and other environment vars containing the Visual Studio compiler bits though.
12:38 colomon huh.  guess it can't hurt to give it another go.
12:38 colomon maybe I just gave up in frustration with the 32-bit after realizing I didn't have git yet for that platform.  :)
12:43 payload joined #perl6
12:51 mariano__ joined #perl6
13:06 Baggiokwok joined #perl6
13:13 cognominal rakudo:  grammar A { token TOP { <a> }; token a { a } }; A.parse("a"); say keys %( $/ )
13:13 p6eval rakudo 3867ff:  ( no output )
13:14 cognominal it prints 'a' here
13:14 cognominal now if I says:   keys $/   it prints 0
13:16 bbkr i confirm. #24 release prints 'a'
13:17 cognominal hum, I guess I understand that the %( ) is necessary
13:17 cognominal on the other hand I dont explain the 0 if I suppress it
13:18 bbkr perl6 -e 'say $/.^methods' - match object has keys method, so %() can be written as $/.keys() i think
13:19 bbkr still - it does not explain why it acts in different ways
13:19 cognominal yea, I don't have the automatism to translate perl5 functions in their perl6 method equivalent
13:20 bbkr rakudo:  grammar A { token TOP { <a> }; token a { 'a' } }; A.parse("a"); say keys %( $/ )
13:20 takadonet joined #perl6
13:20 p6eval rakudo 3867ff:  ( no output )
13:20 takadonet morning all
13:20 bbkr hmm
13:26 cognominal joined #perl6
13:26 cognominal rakudo:   say < a b >.keys
13:26 p6eval rakudo 3867ff: 01␤
13:27 cognominal now I understand the 0
13:32 mariano__ joined #perl6
13:35 SmokeMachine joined #perl6
13:39 meneldor joined #perl6
13:41 takadonet joined #perl6
13:49 meneldor guys because this new class/role syntax in p6 is not familiar to me
13:49 meneldor could you please look at my example code
13:50 meneldor hmm this pastebot doesnt paste my code
13:52 meneldor well this is my example code http://paste.lisp.org/display/93553
13:52 meneldor i wanna ask if im on right way understanding class/role
13:57 cognominal I think so but I am no expert
13:58 meneldor this syntax is so different from perl5 one
13:59 meneldor and is a bit dificult to me
13:59 bbkr well, you make roles if you need the same method code in two or more classes. your syntax is correct but doesn't make any advantage of roles.
13:59 mathw It might though
14:00 mathw It opens the way for more things that do Move
14:01 cognominal does Moose has an role quiavalent?
14:01 bbkr sure
14:01 mathw oh yes
14:01 bbkr use Moose::Role
14:02 bbkr and every sub you define and every attribute you define in package that has "use moose::Role" in it can be reused in classes
14:04 bbkr now about melendor's example: roles make sense when they are reused AND use class attributes. otherwise regular package with static methods will be better.
14:07 Exodist joined #perl6
14:12 meneldor but Move and Fight are reused in this example
14:12 meneldor probably for thousands of units
14:22 am0c joined #perl6
14:23 bbkr thousand of instances of Unit class?
14:25 meneldor nope, thousands of Fights/Moves
14:26 meneldor but otherwise why not more instances of units
14:26 meneldor one instance for every type of Unit
14:26 Baggiokwok joined #perl6
14:27 ignacio_ joined #perl6
14:31 bbkr meneldor - implement those roles and we will check. now it's too early to judge usage of roles in your code instead of placing methods in-class or using statics.
14:33 moritz_ I have a proposal for a Perl 6 talk at the Open Source Days in March 2010 in Copenhagen
14:33 moritz_ http://nopaste.snit.ch/19288
14:33 moritz_ I'd appreciated it if you could look over it and give me some feedback before I send it
14:34 bbkr meneldor - like i said - roles make sense when they are reused AND use class attributes (your roles don't yet) AND there is no common class for all classes that use particular role (hard to tell in your case because you used roles only in one class)
14:36 meneldor bbkr: because im trying to write an example
14:36 bbkr moritz: nice, I used your JSON::Tiny and it's perfect example.
14:37 meneldor if someone can rewrite my exaple to show me how it would be
14:41 charsbar joined #perl6
14:44 bbkr rakudo: role Noises { method dies { say $.name ~ " " ~ $.sound ~ "s"}}; class Unit does Noises {has $.name, has $.sound}; Unit.new(name => "Tank", sound => "explode").dies; class Castle does Noises {has $.name, has $.sound}; Castle.new(name => "Malbork", sound => "rumble").dies
14:44 colomon moritz_: Sounds like a very interesting talk.
14:45 p6eval rakudo 3867ff: error:imcc:syntax error, unexpected ')' (')')␤    in file 'EVAL_25' line 246␤error:imcc:syntax error, unexpected ')' (')')␤  in file 'EVAL_25' line 313␤
14:46 jnthn moritz_: Looks cool. :-)
14:47 xinming joined #perl6
14:48 moritz_ ok, three "upvotes" are enough for me to actually submit it
14:49 moritz_ :-)
14:49 meneldor bbkr: i think i catch a bit from your example here :)
14:49 meneldor i fount an article in p6 advent calendar about roles
14:50 meneldor found*
14:50 moritz_ ng: role Noises { method dies { say $.name ~ " " ~ $.sound ~ "s"}}; class Unit does Noises {has $.name, has $.sound}; Unit.new(name => "Tank", sound => "explode").dies;
14:50 p6eval ng 2717d0: error:imcc:syntax error, unexpected ')' (')')␤        in file 'EVAL_1' line 247␤Tank explodes␤
14:50 moritz_ wow
14:51 moritz_ imcc syntax error first, then it still runs
14:51 moritz_ that's... unusual
14:51 bbkr meneldor - you're welcome :) a lot of people overuse roles while they should create parent class with all role methods. good examples are always welcome.
14:52 meneldor yes im trying to learn p6 with such an examples
14:52 meneldor and this game-like examples are good for understanding
14:52 bbkr mortiz: yes, same on 24 rakudo release. syntax error and... output
14:52 bbkr that's ultimate DWIMness :)
14:55 meneldor whats DWIM?
14:55 bbkr Do What I Mean
14:59 PacoLinux joined #perl6
15:05 cognominal rakudo:  sub b( [ $a, $b ] ) { say "$a$b" } ;  b < 1 2 >
15:05 p6eval rakudo 3867ff: 12␤
15:06 iblechbot joined #perl6
15:07 cognominal sub a( { :$a, :$b } ) { say "$a$b" } ; say { a<1>, b<2> }
15:07 cognominal rakudo: sub a( { :$a, :$b } ) { say "$a$b" } ; say { a<1>, b<2> }
15:07 p6eval rakudo 3867ff: Unable to parse multisig; couldn't find final ')' at line 2, near "{ :$a, :$b"␤in Main (file <unknown>, line <unknown>)␤
15:08 cognominal hum, probably asked too much here :)
15:08 alester joined #perl6
15:08 moritz_ sub a { $:a + $:b }; say a(:a(3), :b(7))
15:08 alester joined #perl6
15:09 cognominal rakudo:   sub a( { :$a, :$b } ) { say "$a$b" } ; say  a { :a<1>, :b<2> }
15:09 p6eval rakudo 3867ff: Unable to parse multisig; couldn't find final ')' at line 2, near "{ :$a, :$b"␤in Main (file <unknown>, line <unknown>)␤
15:09 cognominal anyway that's what I meant
15:09 Juerd moritz_: wrt viral commitbits: Anyone with a commit bit can... commit something! Within a project, you could create a folder that is a queue for new commit bits. To hand out a bit, touch $queuedir/email@example.org - a cronjob can poll this and remove the files as messages are sent.
15:09 cognominal wrt?
15:10 moritz_ wrt = with respect to
15:10 cognominal ETOOMUCHTLA
15:10 jnthn rakudo:   sub a(%h { :$a, :$b } ) { say "$a$b" } ; say  a { :a<1>, :b<2> }
15:10 Juerd Or regard
15:10 p6eval rakudo 3867ff: Unable to parse multisig; couldn't find final ')' at line 2, near "{ :$a, :$b"␤in Main (file <unknown>, line <unknown>)␤
15:11 jnthn rakudo:   sub a(%h ( :$a, :$b ) ) { say "$a$b" } ; say  a { :a<1>, :b<2> }
15:11 p6eval rakudo 3867ff: Unable to parse multisig; couldn't find final ')' at line 2, near "( :$a, :$b"␤in Main (file <unknown>, line <unknown>)␤
15:11 jnthn gah, what's the syntax...
15:11 Juerd cognominal: I believe the proper term is TDM TLAs :)
15:11 jnthn rakudo:   sub a(%h :( :$a, :$b ) ) { say "$a$b" } ; say  a { :a<1>, :b<2> }
15:11 p6eval rakudo 3867ff: traits specified as colon pairs not yet understood at line 2, near ") { say \"$"␤in Main (file src/gen_setting.pm, line 892)␤
15:11 jnthn rakudo:   sub a(%h :( :$a, :$b ) ) { say "$a$b" } ; say  a({ :a<1>, :b<2> })
15:11 p6eval rakudo 3867ff: traits specified as colon pairs not yet understood at line 2, near ") { say \"$"␤in Main (file src/gen_setting.pm, line 892)␤
15:11 jnthn oh
15:11 jnthn hmm
15:11 jnthn I'm sure that did work at some point. :-/
15:11 jnthn ng parses it I guess
15:12 cognominal jnthn,  matching on an hash as a first argument whoud have help me to avoid conflict with stuff passed to the slurpy hash
15:12 jnthn ng:  sub a( { :$a, :$b } ) { say "$a$b" }
15:12 p6eval ng 2717d0: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (src/stage0/Regex-s0.pir:907)␤
15:12 jnthn ng:  sub a( :( :$a, :$b ) ) { say "$a$b" }
15:12 p6eval ng 2717d0:  ( no output )
15:12 jnthn There you go.
15:12 cognominal does the spec says something about that? or is that something not yet implemented
15:13 jnthn cognominal: You can do sub-signatures, yes
15:13 jnthn cognominal: master doesn't parse all the variants, but the binder is aware of such things.
15:13 jnthn See S06 for more info on syntax.
15:13 cognominal ok, nice, I have a use for that.
15:15 cognominal so :( :$a, :$b ) is the syntax :)
15:15 cognominal looks like a smiley :)
15:16 jnthn It's unhappy. UNHAPPY.
15:16 jnthn :-(
15:16 jnthn :-)
15:16 cognominal jnthn, what do you think of that :
15:17 cognominal >  (grammar { token TOP { $<a>=a }}).parse("a"); say  $/<a>
15:17 cognominal a
15:17 cognominal >  (grammar { token TOP { $<a>= a }}).parse("a"); say  $/<a>
15:17 cognominal Use of uninitialized value
15:18 cognominal jnthn, when do you think you can land ng?
15:19 jnthn Hmm. I'm a tad surprised about that regex difference...I had thought whitespace was not meant to be so significant...
15:20 ruoso joined #perl6
15:23 cognominal I think that's a bug. it took me a while to figure out why my grammars did not work :)
15:23 cognominal I don't know if it is still in ng so.
15:34 pmichaud joined #perl6
15:34 pmichaud good morning, #perl6
15:34 phenny pmichaud: 13 Jan 22:39Z <jnthn> tell pmichaud In STD and Grammar.pm, in the signature rule, we use a construct like [ ...parameter... ] ** <param_sep>. However, unfortunately it seems the regex engine doesn't capture all of the parameter seperators, but instead only the last one. Tried a couple of possible workarounds, but no joy...any thoughts? kplzthnxbai.
15:34 takadonet pmichaud: morning
15:36 jnthn morning, pmichaud
15:36 cognominal bonjour, pmichaud
15:37 cognominal pmichaud, what do you think of that ?
15:37 cognominal >  (grammar { token TOP { $<a>=a }}).parse("a"); say  $/<a>
15:37 cognominal [16:17:02]  <cognominal> a
15:37 cognominal [16:17:02]  <cognominal> >  (grammar { token TOP { $<a>= a }}).parse("a"); say  $/<a>
15:37 cognominal [16:17:02]  <cognominal> Use of uninitialized value
15:38 moritz_ it's aliasing something which is not a capture
15:38 moritz_ should be... what? an error?
15:39 jnthn Oh, I'd read it as binding whatever the next atom matched against that name...
15:39 jnthn If it is meant to just alias a capture then I guess error for both...
15:40 pnate2 joined #perl6
15:41 cognominal $a<a>=(a)    ie an explicit capture, is not necessary
15:41 ssm joined #perl6
15:41 cognominal $a<a>=a+    works too. The problem is with a space after the =
15:42 cognominal A space before the equal is not a problem
15:42 payload joined #perl6
15:44 pmichaud cognominal: is that in the master branch?
15:44 pmichaud cognominal: if so, I think it's resolved in the ng branch.
15:44 cognominal ok, happy to learn that, I will wait for ng, then
15:44 moritz_ cognominal: no need to learn, you can test right now
15:45 pmichaud ng:  grammar XYZ { token TOP { $<a>= a } };   XYZ.parse('a');   say $<a>;
15:45 p6eval ng 2717d0: Method 'isa' not found for invocant of class 'Undef'␤current instr.: 'perl6;Perl6;Actions;_block956' pc 145831 (src/gen/perl6-grammar.pir:29583)␤
15:45 pmichaud okay, maybe not
15:45 pmichaud anyway, it'll get fixed there if it's really a bug.
15:45 jnthn Don't think grammars are back in palce yet?
15:45 moritz_ pmichaud: I think the problem is the $<a>
15:45 pmichaud ng:  grammar XYZ { token TOP { $<a>= a } };   XYZ.parse('a');   say $/<a>;
15:45 jnthn *plaice
15:45 p6eval ng 2717d0: Method 'isa' not found for invocant of class 'Undef'␤current instr.: 'perl6;Perl6;Actions;_block956' pc 145831 (src/gen/perl6-grammar.pir:29583)␤
15:45 jnthn ...
15:45 moritz_ hash accesses are a problem
15:45 jnthn place, gah.
15:45 pmichaud right, we don't have grammars in ng yet.  I can fix that today/tomorrow
15:45 moritz_ ng:  grammar XYZ { token TOP { $<a>= a } };   XYZ.parse('a'); say ?$/
15:45 p6eval ng 2717d0: Method 'isa' not found for invocant of class 'Undef'␤current instr.: 'perl6;Perl6;Actions;_block956' pc 145831 (src/gen/perl6-grammar.pir:29583)␤
15:45 jnthn .oO( my typing is apparenlty a big fishy today )
15:45 moritz_ oh
15:46 pmichaud sorry for my unexpected absence this past week... kids were sick on thursday, and I ended up with it over the weekend :-(
15:46 jnthn pmichaud: Ugh.
15:46 pmichaud yeah
15:46 jnthn pmichaud: Though apart from getting it from the kids, snap.
15:46 pmichaud but I'm feeling *much* better today, better than in weeks
15:46 moritz_ hope they and you are bett.. great
15:46 jnthn pmichaud: I spent a disproportionate amount of my weekend in bed with something also.
15:47 jnthn Guess it's the time of year for these thingies...
15:47 cognominal we are so happy to see you back, both of you :)
15:47 lisppaste3 joined #perl6
15:49 mberends joined #perl6
15:50 Psyche^ joined #perl6
15:56 pnate joined #perl6
16:00 KyleHa joined #perl6
16:04 mathw jnthn, pmichaud: As long as you're both feeling better, we're happy.
16:05 sbp I entreated the filer of perl6 bug #72070 to come here and explain his work in perl6, but he has not taken the bait
16:07 KyleHa I saw that ticket.  It didn't seem too confusing except I don't know anything about PGE.
16:07 nihiliad joined #perl6
16:08 sbp yeah, it's not the bug that deserves his attention, but his work — he made a neat little app in perl6 and I was hoping he'd describe his problems and successes in developing it
16:08 sbp ah well
16:15 mberends After trying out the "Empathy IM Client" in Ubuntu 10.4 alpha-2, it's not as functional or configurable as plain xchat. The new Ubuntu can be recommended - http://cdimage.ubuntu.com/releases/lucid/
16:16 ash_ joined #perl6
16:36 avar joined #perl6
16:40 literal joined #perl6
17:01 lumi joined #perl6
17:11 pnate2 joined #perl6
17:24 mberends left #perl6
17:25 meteorjay joined #perl6
17:26 lumi joined #perl6
17:28 pnate joined #perl6
17:28 colomon pmichaud: Good to see you back!  We've had a family-wide bug as well, I'm still on the tail-end of it.  I've gotten in about 2.5 days of work out of the last ten....
17:39 smash_ joined #perl6
17:39 smash_ hello
17:40 colomon hello
17:46 lumi joined #perl6
18:02 nihiliad joined #perl6
18:03 ShaneC joined #perl6
18:04 justatheory joined #perl6
18:07 cognominal ng: say  <a b c> : kv
18:07 p6eval ng 2717d0: Confused at line 1, near "say  <a b "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
18:07 cognominal ng: say  <a b c> :kv
18:08 p6eval ng 2717d0: Confused at line 1, near "say  <a b "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
18:08 meppl joined #perl6
18:09 cognominal ng: say  <a b c>[] :kv
18:09 p6eval ng 2717d0: Confused at line 1, near "say  <a b "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
18:09 cognominal ng: say  <a b c>[]:kv
18:09 p6eval ng 2717d0: Confused at line 1, near "say  <a b "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
18:10 cognominal ng: my  @a=<a b c>; say  @a[]:kv
18:10 p6eval ng 2717d0: Confused at line 1, near "say  @a[]:"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
18:10 cognominal hum, zen, even in slices, is a long path
18:11 cognominal rakudo: my  @a=<a b c>; say  @a[]:kv
18:11 p6eval rakudo 3867ff: Confused at line 2, near ":kv"␤in Main (file <unknown>, line <unknown>)␤
18:13 cognominal rakudo: say <a b c>.kv
18:13 p6eval rakudo 3867ff: 0a1b2c␤
18:13 lumi joined #perl6
18:13 cognominal yea!
18:22 diakopter <yawn>
18:34 Chillance joined #perl6
18:35 colomon ng: say <a b c>.kv
18:35 p6eval ng 2717d0: Method 'kv' not found for invocant of class 'List'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
18:36 jackyf joined #perl6
18:36 cotto_working joined #perl6
18:37 ignacio_ joined #perl6
18:41 ispeak_ joined #perl6
18:43 kensanata joined #perl6
18:43 Exodist joined #perl6
18:54 Exodist joined #perl6
18:57 ash_ joined #perl6
18:58 ash_ joined #perl6
18:58 ash_ left #perl6
18:58 ash_ joined #perl6
18:59 ash_ colomon:  strange, S32-Containers doesn't say List should have .kv, it says Array should
19:00 colomon ash_: Seems like Positional should have .kv
19:01 colomon Not that we have Positional yet (as far as I know) in any meaningful sense, but I don't see why List wouldn't have kv.
19:01 colomon I assumed it's just something we haven't gotten to yet in ng.
19:03 ash_ well, kv is used in hashes too, so should it also go into Associative?
19:05 jnthn Agree List should have .kv
19:05 ash_ as far as i can see, Positional and Associative only add postcircumfix:<[ ]> and postcurcomfix:<{ }>
19:05 jnthn Disagree it should be in Positional and Associative.
19:06 jnthn They just imply those methods ash_++ stated, plus .of
19:07 jnthn (where .of returns the type parameter)
19:08 colomon Well, I certainly won't claim to understand Perl 6's role structures yet.
19:08 colomon I have just been thinking of Positional as "does that List and Array thang".
19:09 jnthn colomon: Positional really means "can be indexed into with [...]
19:09 jnthn "
19:09 jnthn And Accotiative the same for for {...}
19:09 Exodist joined #perl6
19:09 colomon and just that, I take it.
19:09 jnthn Yes.
19:10 jnthn It's what the @ sigil implies
19:10 jnthn sub foo(@x) { } is a bit like sub foo(Positional $x) { }
19:10 colomon no guaranteed .elems, for instance.
19:10 colomon or .last
19:10 jnthn Correct.
19:10 jnthn It's a pretty minimal interface.
19:10 colomon then certainly it should not have .kv, either.
19:11 ash_ does Positional and Associative use any function to know how its supposed to get stuff based off of [ ] and { } or do they only garuntee that someone implemented those functions?
19:11 jnthn These roles are why you can have multi foo(@x) { }, multi foo(%x) { } and multi foo($x) { } and have things work out, btw.
19:11 jnthn ash_: Just says they should be implemented.
19:11 ash_ got ya, so they are like postcircumfix:<[ ]> { ... } methods?
19:12 jnthn Yes
19:12 ash_ or !!! possibly
19:12 ash_ cool
19:12 colomon Do they guarantee [] and {} fail gracefully if the key is not present?
19:12 Exodist joined #perl6
19:12 * colomon is still trying to figure out what you can do with something if all you know about it is it does []...
19:12 jnthn role Positional[::T = Object] { method postcircumfix:<[ ]>(*@indexes) { ... }; method of() { T } } # or some such
19:13 jnthn colomon: You can do [...] on it... :-)
19:13 colomon wait, what is [...]  ?!
19:13 ash_ its the range from [  to ] ?
19:13 ash_ lol /doesn't know
19:13 jnthn colomon: I mean, if you have a $x and $x does Positional, then you can do $x[...] (where the ... means "some index here"
19:14 jnthn )
19:14 jnthn e.g. if you write a sub
19:14 colomon ah, I thought it was some mysterious operator I didn't know.
19:14 jnthn sub foo(@x) { }
19:14 colomon but how do you know how many elems are in the Positional.
19:14 colomon ?
19:14 jnthn Then in there you can be certain that @x[42] will work (for some meaning of work) for example.
19:14 jnthn As it's currently defined, Positional doesn't promise you can know that.
19:15 jnthn (I'm stating the status quo rather than how things have to be, fwiw.)
19:15 colomon I'll be very interested to see if that turns out to be useful in the long run.
19:16 jnthn Maybe it should also give a promise that you implement .list...if you can be coerced to a list, then All Things Are Possible.
19:16 jnthn Dunno. I'm sure TimToady will backlog and ponder. :)
19:17 colomon if @a only guarantees Positional, I think 90% of the @a-based subs written for p6 so far are probably wrong...
19:18 jnthn Well, I think anything in Cool probably is meant to listify first anyway.
19:18 jnthn Just as other things in Cool are menat to stringify, nor numify.
19:18 jnthn (anything that is a listy thing, that is.)
19:18 colomon Sure, but the idea of having a role there is that I can implement my own class that does it, right?
19:18 jnthn Sure.
19:19 jnthn I guess the question is, "is just promising postcircumfix:<[ ]> enough, or do we need to promise at least that".
19:19 colomon So what if I say something like class Square does Positional { postcircumfix:<[ ]>($a) { $a * $a } } ?
19:19 ash_ so... if you can do MyRole ~~ Role, how do you do MyClass ~~ ???
19:20 colomon and then my @a = Square.new ?
19:20 jnthn Then I guess say @a[5] # 25 :-)
19:20 colomon sure, but for @a { .say } will completely fail.
19:21 jnthn ng: class Square does Positional { postcircumfix:<[ ]>($a) { $a * $a } }; my @a = Square.new; say @a[5] # may even work...
19:21 p6eval ng 2717d0: Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (src/stage0/Regex-s0.pir:907)␤
19:21 jnthn oh
19:21 jnthn ng: class Square does Positional { method postcircumfix:<[ ]>($a) { $a * $a } }; my @a = Square.new; say @a[5] # may even work...
19:21 p6eval ng 2717d0: ␤
19:22 jnthn :-/
19:22 ash_ ng: class Square does Positional { method postcircumfix:<[ ]>($a) { $a * $a } }; my @a = Square.new; say @a[0][5]
19:22 p6eval ng 2717d0: 25␤
19:22 ash_ \o/
19:22 jnthn oh!
19:22 jnthn Yes.
19:22 jnthn :-)
19:22 colomon ah!
19:24 colomon ng: class Square does Positional { method postcircumfix:<[ ]>($a) { $a * $a } }; my $a = Square.new; say $a[13]
19:24 p6eval ng 2717d0: 169␤
19:24 jnthn :-)
19:25 colomon ng: class Square does Positional { method postcircumfix:<[ ]>($a) { $a * $a } }; sub trouble(@a) { for @a { .say } }; trouble(Square.new);
19:25 p6eval ng 2717d0: Method '!generate' not found for invocant of class 'Square'␤current instr.: 'perl6;List;!generate' pc 11248 (src/builtins/Str.pir:215)␤
19:25 colomon exactly.
19:25 colomon ng: class Square does Positional { method postcircumfix:<[ ]>($a) { $a * $a } }; sub trouble(@a) { say @a.WHAT }; trouble(Square.new);
19:25 p6eval ng 2717d0: Square()␤
19:26 colomon yeah.
19:26 colomon so you can easily create a variable @a which cannot do 90% of the stuff you automatically expect a @a to do.
19:26 colomon I think adding .list to Positional is probably pretty desirable.
19:27 jnthn Yeah, I think there's a decent case for it.
19:27 colomon I suppose you could even come up with a default lazy implementation that returns @a[0], @a[1], @a[2] etc until one of them doesn't exist.
19:33 ash_ how do you make a typed list? does my Foo @a imply like my $a of List of Foo or something?
19:35 jnthn Yeah
19:36 jnthn sub foo(Int @a) { ... } # takes anything declare as doing Positional of Int (which is Positional[Int]).
19:37 ash_ so, what if you do sub foo(@a) { ... } with the Square colomon wrote above? will Square dispatch as an @ since it does positional?
19:37 colomon ash_: that example is already in the backscroll, and it works in ng.
19:37 ash_ oh, oops, totally missed that
19:38 colomon but "works" in the sense that the resulting @a can't do most of what you normally think it would be able to do.
19:38 ash_ yeah, i see what you were getting at from reading the above stuff
19:39 ash_ thats interesting functionality...
19:40 astrojp joined #perl6
19:43 lumi joined #perl6
19:57 canhope joined #perl6
19:57 canhope left #perl6
20:03 ash_ joined #perl6
20:11 pnate2 joined #perl6
20:12 cotto_work joined #perl6
20:15 ilogger2 joined #perl6
20:22 astrojp left #perl6
20:26 ash_ ng: say 'y' if '~/.bashrc' ~~ :r & :w;
20:26 p6eval ng 2717d0: 2 unexpected named parameters passed (r, w)␤current instr.: '&infix:<&>' pc 192693 (src/gen/core.pir:1490)␤
20:27 ash_ is that formatted right for having multiple file tests
20:29 colomon seems like it would just be :r:w  ?
20:29 colomon not that I understand this stuff yet.
20:31 ash_ oh, i just found it, http://perlcabal.org/syn/S32/IO.html#Other_things has them, it says you do them as junction, so :r & :w seems the be the way according to that
20:32 ash_ so, functionally will that do each function in the junction, since 'a_file' ~~ :r is really 'a_file'.:r(), and make sure none of the results were false?
20:33 FCO joined #perl6
20:33 payload joined #perl6
20:40 jan_ joined #perl6
20:47 cognominal joined #perl6
20:47 cognominal joined #perl6
20:52 ShaneC left #perl6
20:54 meppl joined #perl6
20:58 colomon rakudo: say "/etc/passwd".:f
20:58 p6eval rakudo 3867ff: Multiple Dispatch: No suitable candidate found for 'concatenate_str', with signature 'PSP->P'␤in Main (file <unknown>, line <unknown>)␤
20:59 colomon rakudo: say "/etc/passwd" ~~ :f
20:59 p6eval rakudo 3867ff: 1␤
21:03 cognominal rakudo: say "a" ~~ m/ ^ [ <print> & <-[>]> ]+ $/;
21:03 p6eval rakudo 3867ff: a␤
21:05 ash_ rakudo: say '/etc/passwd'.':f'();
21:05 p6eval rakudo 3867ff: 1␤
21:05 mariano__ joined #perl6
21:05 ash_ rakudo: say ~''.^methods;
21:05 p6eval rakudo 3867ff: sprintf Scalar Complex Str pred succ encode perl ACCEPTS WHICH ord rand truncate sort sqrt rindex asin int atanh cosh cosec grep values chars roots reverse isa ucfirst kv samecase tan log10 cos capitalize fmt bytes flip does p5chop lc asinh acotan reduce cotanh chr acotanh :d :e :f
21:05 p6eval ..comb f…
21:11 ash_ rakudo: Str.HOW.add_method(Str, ':say', method ($stuff) { say self  }); 'foo' ~~ :say;
21:11 p6eval rakudo 3867ff: foo␤
21:11 ash_ i see an obfuscated perl program coming out of that, :P
21:15 rachelBROWN joined #perl6
21:16 ash_ rakudo: Str.HOW.add_method(Str, ':say', method ($stuff) { say $stuff, self  }); 'foo' ~~ :say('Another ');
21:16 p6eval rakudo 3867ff: Another foo␤
21:18 ash_ aww it doesn't work in ng
21:18 jnthn ash_: Yes...I know. :-(
21:18 jnthn ash_: Think I may have to do a few tweaks...
21:19 ash_ jnthn: should that be add_method(Str or add_method(Str.HOW ?
21:19 jnthn Str.^add_method(':say', ...) should work
21:19 jnthn Which is Str.HOW.add_method(Str, ':say', ...)
21:19 jnthn ash_: There's a bit of an issue with the way things are currently set up though...
21:20 ash_ got ya, so i guess thats how you'd define a method with a funny character in the name? like ':'
21:21 jnthn Yes.
21:21 jnthn It should work.
21:22 jnthn Braino on my part that it doesn't.
21:22 jnthn I'll try and fix it tomorrow...almost out of hack-energy today.
21:23 ash_ no worries,
21:24 ash_ so... umm, is there a test suite for the meta model yet?
21:24 jnthn ash_: There's some coverage of the introspective aspects of it.
21:25 jnthn But no|little coverage of the declarative aspects.
21:27 pmichaud jnthn: how far along is role support in ng at the moment?
21:29 jnthn pmichaud: Quite far.
21:29 pmichaud okay, good.
21:29 jnthn pmichaud: Rough edges
21:29 pmichaud I'm likely to do Iterator as a role then.
21:29 jnthn pmichaud: See passes in S14-role in spectest.data to get a more concrete idea.
21:29 jnthn pmichaud: OK.
21:29 jnthn pmichaud: Let me know what you run into.
21:29 jnthn pmichaud: If anything. But there's always _something_. :-)
21:31 lumi joined #perl6
21:37 frettled Crikey, gource (http://code.google.com/p/gource/) looks evil ;)
21:38 colomon Iterator as a Role, \o/
21:39 jnthn Yeah! The Pminator is back!
21:39 jnthn \o/
21:40 cognominal joined #perl6
21:40 ash_ jnthn did you ever figure out your lingering question with role's ^ methods?
21:41 jnthn ash_: Not yet...but didn't think so much on it yet either, tbh.
21:41 sjohnson hi
21:41 jnthn Haven't really been in a thinky state for the last week.
21:41 ash_ ah, just wondering
21:42 colomon frettled++ # that's some crazy stuff there.
21:42 jnthn The "we compose them into the class" approach is where I'm kinda leaning, but I'm not sure enough that I'd want somebody to spend time on coding that up...
21:48 ash_ yeah, make sense, i'd only be worried about if you want to say override ^compose, how do you do that? or can you do that?
21:51 smash_ joined #perl6
21:53 jnthn I'm not really keen that we encourage people to override declarative aspects like this anyway, tbh.
21:54 jnthn If people want to do that stuff properly, they should probably declare their own metaclass, probably by subclassing ClassHOW or some such.
21:54 jnthn Monkey-patching the meta-class on a per-class basis is kinda evil (which is why you *can* do it, but it'd hardly be something we want to promote as a best practice. :-))
21:55 jnthn And yes, it's not real monkey-patching, but still... :-)
21:56 alester_ joined #perl6
21:56 frettled Well, if a monkey did it... *g,d&r*
21:56 jnthn ook! banana!
21:56 frettled eek-ook ook!
21:57 frettled Perl 6 BCP: monkeying around
21:58 colomon frettled: gource is taking a long time to install...
21:59 frettled colomon: ohrly :)
21:59 patspam joined #perl6
21:59 frettled colomon: I haven't even tried yet!
22:00 colomon frettled: well, it went and said on the page that Macports has it, so it's easy for me to try.  Of course, Macports installs fail about 25% of the time in my experience, and this one seems crazy complex...
22:01 frettled colomon: heh :)
22:01 frettled I haven't installed Macports yet here, so I'm kindof stuck with the shiny video.
22:07 cognominal rakudo:   sub a(Pair $a) { ... } ; a(:a)
22:07 p6eval rakudo 3867ff: Nominal type check failed for parameter '$a'; expected Pair but got Int instead␤in Main (file src/gen_setting.pm, line 324)␤
22:07 cognominal ng:   sub a(Pair $a) { ... } ; a(:a)
22:07 p6eval ng 2717d0: Nominal type check failed for parameter '$a'; expected Pair but got Int instead␤current instr.: '&a' pc 109 (EVAL_1:49)␤
22:07 cognominal hum...
22:08 cognominal ng:   sub a(Mu $a) { ... } ; a(:a)
22:08 p6eval ng 2717d0:  ( no output )
22:08 cognominal I Mu-ted it
22:10 * jnthn is not aMused.
22:10 lisppaste3 joined #perl6
22:12 frettled a Mu-sed?
22:12 cognominal ng:   sub a(Mu $a) { ... } ; a((:a))
22:12 p6eval ng 2717d0:  ( no output )
22:12 cognominal ng:   sub a(Pair $a) { ... } ; a((:a))
22:12 p6eval ng 2717d0: Nominal type check failed for parameter '$a'; expected Pair but got Str instead␤current instr.: '&a' pc 108 (EVAL_1:49)␤
22:13 cognominal I forgot the correct incantation
22:14 jnthn rakudo: sub a(Pair $a) { ... } ; a((:a))
22:14 p6eval rakudo 3867ff:  ( no output )
22:14 jnthn cognominal: Maybe ng issue.
22:15 frettled Where _is_ masak these days, anyway?
22:18 ash_ jnthn how would one go about changing the HOW of an object? if you wanted to make your own that is
22:18 colomon frettled: yeah, the install failed.  :(
22:19 frettled colomon: :(
22:19 jnthn ash_: there's an example in metamodel.pod, iirc
22:20 jnthn ash_: Typically you'd introduce a new package_declarator that has that metaclass registered against it, or modify one of the package registractions to point to your metaclass, though.
22:20 jnthn ash_: Not something we can do in Rakudo just yet, mind.
22:21 ash_ okay, thats fair, i'll read that example again
22:22 sjohnson hi ash_
22:22 ash_ hi sjohnson
22:26 pnate joined #perl6
22:34 pmurias joined #perl6
22:34 diakopter pmurias: hi!
22:34 ash_ is the use of 'slang' documented somewhere? i haven't seen it before
22:34 pmurias diakopter: hi
22:35 jnthn ash_: S05, iirc.
22:35 ash_ awesome, thanks
22:35 pmurias diakopter: how are things?
22:36 pmurias my linux got hurt by file system errors and i get to reinstall it (now installing mildew dependencies)
22:37 jnthn ash_: Some is S02 also.
22:37 jnthn More in S02, even, it seems.
22:37 ash_ S05 uses it in 1 place it seems
22:38 ash_ cool, thanks, i'll read up on slang
22:39 jnthn We may need to extract more details from TimToady++ at some point. :-)
22:39 ash_ i'll make a list of ??? to ask him :P
22:43 diakopter pmurias: things are great
22:43 diakopter I'm ready to start writing actions for the tiny-subset-of-STD grammar I've got
22:48 ash_ so... to add your own role-like functionality with a custom HOW you'd augment slang MAIN ? to introduce your keyword?
22:48 diakopter pmurias: actually it's not all that tiny
22:48 diakopter pmurias: and actually I should implment the OPP first.
22:49 diakopter I got distracted by Codility
22:49 diakopter (today)
22:55 ash_ you'r really just need to associate a HOW with they keyword... so, extending the Perl6::Grammar.package_declarator:sym and adding a HOW to the appiropriate new HOW.... seems like a lot if you want to simply register a callback for when your role is inherited, but then again if its the 'safe' way thats cool
22:55 ash_ s/you'r/you/
23:03 cotto_w0rk joined #perl6
23:04 mikehh joined #perl6
23:05 pmurias diakopter: i would focus more on improving the regex engine then on hand-translating STD
23:07 jnthn ash_: For callbacky things, we maybe can get away with ^foo style things.
23:07 jnthn ash_: That may be a COMPOSE block perhaps though...like other phaser-ish things.
23:12 * jnthn -> rest
23:13 diakopter pmurias: why is that
23:13 diakopter (why do you recommend not hand-translating STD)
23:14 rgrau` joined #perl6
23:23 pnate2 joined #perl6
23:30 lamedura joined #perl6
23:30 lamedura left #perl6
23:32 matreshat joined #perl6
23:32 matreshat hi
23:32 matreshat i am lerning perl language for programing
23:33 matreshat actually i am becoming computer professonal thats why its part of my course
23:33 matreshat so ur all perl programers
23:33 matreshat or not
23:34 matreshat or hha, lammers
23:36 diakopter er
23:37 Juerd matreshat: This is a Perl 6 channel. Perl 6 is not finished yet. You may want to consider learning Perl 5 for now, if you want something that's actually applicable in production.
23:37 Juerd matreshat: Meanwhile, please improve your spelling :)
23:48 pmurias joined #perl6
23:50 pmurias diakopter: re hand translating STD, it's lot of work, i doubt it's fun, and is annoying to maintain
23:52 pmurias diakopter: and i don't see why that's nessesary
23:54 diakopter those 3 objections aren't true for me.  how is it not necessary?
23:55 diakopter (wouldn't compiling STD's parse of itself to any other language just be even slower?)

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

Perl 6 | Reference Documentation | Rakudo