Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-03-10

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:08 am0c joined #perl6
00:10 lue hello
00:11 colomon o/
00:11 lue o/
00:15 payload joined #perl6
00:17 japhb NQP bug or PEBCAK?   $ parrot-nqp -e 'pir::die("foo"); CATCH { pir::exit(0); };'  ===> hang
00:18 CokeGod exit throws an exception...
00:18 CokeGod I think austin has worked around that in nqp by setting a variable IFF in the catch block, and then having a subsequent check to control throwing the new exception.
00:19 japhb CokeGod, Sure ... but is a CATCH block supposed to catch exceptions thrown *from within that CATCH block*?
00:21 yinyin joined #perl6
00:24 lichtkind night
00:24 TimToady o/
00:24 lue o/
00:24 lichtkind :)
00:25 colomon rakudo: my @a = 1..3; sub foo($a, $b, $c) { say $a; say $c; }; foo(@a)
00:26 p6eval rakudo 5b81df: OUTPUT«Not enough positional parameters passed; got 1 but expected 3␤current instr.: 'foo' pc 242 (EVAL_1:91)␤»
00:26 colomon rakudo: my @a = 1..3; sub foo($a, $b, $c) { say $a; say $c; }; foo(|@a)
00:26 p6eval rakudo 5b81df: OUTPUT«1␤3␤»
00:27 diakopter O/
00:34 pugssvn r30017 | lwall++ | [external-aliasing.t] normal // regexen do not make a lexical scope, so no OUTER needed
00:39 lue afk
00:40 zostay joined #perl6
01:17 justatheory_ joined #perl6
01:43 ShaneC1 joined #perl6
02:04 colomon rakudo: say 4 min 3
02:04 p6eval rakudo 5b81df: OUTPUT«3␤»
02:04 colomon rakudo: say 0 .. (4 min 3)
02:04 p6eval rakudo 5b81df: OUTPUT«0123␤»
02:06 lue oh hello minimum. Try and work right :)
02:08 colomon I've got something bizarre going on here with my latest iteration of the series code, and of course the compile error message is completely freaking useless.
02:09 * colomon now suspects the problem was .push ($j) instead of .push($j)...
02:11 * lue contemplates an electronic autograph book, where (maybe famous) people (like lwall) come and sign it... with their public key :D
02:20 colomon it compiled!
02:21 lue *final fantasy victory cheer*
02:21 colomon and I didn't even break the arity-1 case!  \o/
02:22 lue \o/
02:23 TimToady oh yesses
02:23 lue cheeers from me would be more meaninful with a knowledge of arity-1 (to The Guide! er, Wikipedia)
02:24 colomon just means that series like 1, 3, { $^a + 2 } ... * work fine.
02:25 colomon I'm trying to move to th... whoops, I fixed a "minor thing" and broke it completely.
02:27 lue The magic of 楽土
02:34 lue hooray! (oh wait, that's just a nickname) :)
02:37 colomon > (1, 1, { $^a + $^b } ... *).batch(20).perl.say
02:37 colomon (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765)
02:38 lue fibonnaci win!
02:38 colomon lue: that there would be an arity-2 series that works!  \o/
02:38 lue \o/
02:39 pugssvn r30018 | lwall++ | [STD] use Cursor to get ansi colors (hack)
02:39 pugssvn r30018 | [STD] properly scope dynamic package names for {} packages
02:39 pugssvn r30018 | [STD] package_def of ; packages now eats statementlist itself to stay inside proper scope
02:39 pugssvn r30018 | [STD] correctly parse <> part of FOO::<$x> as part of variable name
02:39 pugssvn r30018 | [STD] correctly follow symbolically indirected OUTER:: links
02:39 pugssvn r30018 | [STD] find_top_pkg no longer cares if name ends in ::
02:39 pugssvn r30018 | [STD] figure out whether initial components lead to package or lexical scope
02:39 pugssvn r30018 | [STD] don't scan outer scopes on qualified names, duh
02:39 pugssvn r30018 | [STD] handle FOO::<$x> form in check_variable
02:39 pugssvn r30018 | [STD] don't check for @/% mistakes on qualified names
02:39 lue arity-n sounds like something you'd find said in the Death Star :)
02:39 lue or Star Wars in general
02:39 pugssvn r30019 | colomon++ | [t/spec] Nine variants on the Fibonacci series.
02:40 lue "Arity-3 away" "Sir! We got a report that Arity-7 has suffered critical damage!"
02:40 colomon arity-2 dee-2?
02:42 lue R2D2 = Rakudo Series 2 Death Star v2.0 :D
02:44 am0c joined #perl6
02:47 perpetrator joined #perl6
02:49 agentzh joined #perl6
02:53 lue Oh! [*]die(R) killed everyone, didn't it? If it missed, please speak up :)
02:54 lue I had to escape to the planet Metaop, but I can't see anyone else.
03:00 lue Oh darn. Lessee... O good, they somehow missed Earth. Coming back...
03:04 colomon loliblogged: http://justrakudoit.wordpress.c​om/2010/03/10/series-progress/
03:05 lue lolireadblog
03:07 lue http://xkcd.com/545/ ha ha ha
03:09 colomon > (1, 1, 1, { $^a + $^b + $^c } ... *).batch(10).perl.say
03:09 colomon (1, 1, 1, 3, 5, 9, 17, 31, 57, 105)
03:09 colomon I need to sleep....
03:10 lue arity-3 sent?
03:13 jaldhar joined #perl6
03:14 lue night colomon (when you sleep that is) o/
03:19 lue .muse(writing a P6 interpreter for the TI-84 ought to be... difficult. Bloody difficult)
03:20 buu_ joined #perl6
03:20 Lorn_ joined #perl6
03:21 buu_ joined #perl6
03:22 lue .muse(I wish to create my own language just to get an ISO standard for it :P )
03:26 lue aah
03:27 xomas joined #perl6
03:27 CokeGod joined #perl6
03:27 szbalint joined #perl6
03:27 dual joined #perl6
03:27 charsbar joined #perl6
03:27 Lorn joined #perl6
03:27 buubot joined #perl6
03:27 jjore joined #perl6
03:30 TimToady std: my $x; { { { MY::OUTER::OUTER::OUTER::<$x> }}}
03:30 p6eval std 30019: OUTPUT«ok 00:01 107m␤»
03:30 TimToady std: my $y; { { { MY::OUTER::OUTER::OUTER::<$x> }}}
03:30 p6eval std 30019: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable MY::OUTER::OUTER::OUTER::<$x> is not predeclared at /tmp/bI7yKk2LJl line 1:␤------> [32m $y; { { { MY::OUTER::OUTER::OUTER::<$x>[33m⏏[31m }}}[0m␤    expecting any of:␤    POST␤   postfix␤  postfix_prefix_meta_operator␤FAILED 00:01 106m␤»
03:32 snarkyboojum joined #perl6
03:33 aesop joined #perl6
03:35 lue http://xkcd.com/312/ say it isn't so! (just trying to block that draft :) )
03:57 quietfanatic joined #perl6
03:58 lue afis (er, afk)
04:01 quester_ joined #perl6
04:06 JimmyZ joined #perl6
04:08 JimmyZ rakudo: (1, 1, { $^a + $^b }).perl.say
04:08 p6eval rakudo 5b81df: OUTPUT«(1, 1, { ... })␤»
04:08 JimmyZ rakudo: (1, 1, { $^a + $^b } ... *).batch(20).perl.s
04:08 p6eval rakudo 5b81df: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
04:08 JimmyZ rakudo: (1, 1, { $^a + $^b } ... *).batch(20).perl.say
04:08 p6eval rakudo 5b81df: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
04:09 JimmyZ rakudo: ({ $^a + $^b }(1,1)).perl.say
04:09 p6eval rakudo 5b81df: OUTPUT«2␤»
04:13 japhb phenny, tell PerlJam I'll be AFK for a while now, but please msg me if you manage to get NQP-rx to understand quoted strings on the LHS of => , and I'll take a look when I get back.  Thanks!
04:13 phenny japhb: I'll pass that on when PerlJam is around.
04:17 jaldhar joined #perl6
04:19 IllvilJa joined #perl6
04:21 quester_ part
04:21 quester_ left #perl6
04:22 quester_ joined #perl6
04:32 estrabd joined #perl6
04:32 quester_ left #perl6
04:33 ihrd joined #perl6
04:33 ihrd left #perl6
04:36 quester_ joined #perl6
04:43 alester joined #perl6
04:53 nadim_ joined #perl6
04:56 saleem joined #perl6
05:04 k23z__ joined #perl6
05:10 quietfanatic joined #perl6
05:10 bkeeler_ joined #perl6
05:17 Sarten-X2 joined #perl6
05:30 mberends joined #perl6
05:31 dalek book: b4c81d4 | moritz++ | src/grammars.pod:
05:31 dalek book: [grammars] grammero
05:31 dalek book: review: http://github.com/perl6/book/commit/b4​c81d4802dae8cd4c8fb6582105fa8bf520d6a4
05:31 dalek book: aed5553 | moritz++ |  (2 files):
05:31 dalek book: [operators] precedence
05:31 dalek book: review: http://github.com/perl6/book/commit/ae​d55537bb5fa39788b14a95e6e51dd0feb51d8c
05:58 quester_ left #perl6
06:00 snarkyboojum joined #perl6
06:16 sorear joined #perl6
06:24 gfx joined #perl6
06:31 z3ndrag0n joined #perl6
07:01 mberends joined #perl6
07:03 mberends colomon++ for general series operator: "The trick was to keep an array storing the last N values generated in the series, where N is the number of arguments that the generator function takes". Brilliant!
07:07 PerlJam colomon++ indeed
07:07 phenny PerlJam: 04:13Z <japhb> tell PerlJam I'll be AFK for a while now, but please msg me if you manage to get NQP-rx to understand quoted strings on the LHS of => , and I'll take a look when I get back.  Thanks!
07:09 * PerlJam wonders if a bot is going to mention his recent push
07:13 dalek nqp-rx: 2d51ec9 | duff++ | t/nqp/47-fatarrow.t:
07:13 dalek nqp-rx: Add some tests for the fat arrow
07:13 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/2​d51ec961fea5941c9e17cd487bf0138f0398982
07:13 dalek nqp-rx: c441ffc | duff++ | src/NQP/ (2 files):
07:13 dalek nqp-rx: Make NQP understand single quoted strings on the LHS of =>
07:13 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c​441ffc653572efd82b80e9c0fa4be3aa96dbbd8
07:14 mberends PerlJam++
07:16 eternaleye joined #perl6
07:17 uniejo joined #perl6
07:19 chromatic joined #perl6
07:20 Su-Shee joined #perl6
07:20 Su-Shee good morning
07:20 PerlJam good evening
07:20 mberends hi Su-Shee
07:21 PerlJam (I'm trying to go to sleep and failing)
07:21 jlaire joined #perl6
07:21 Su-Shee PerlJam: I've made a cron job during writing my thesis to plainly shut down the computer on time ;)
07:27 fridim joined #perl6
07:28 kaare joined #perl6
07:30 PerlJam okay ... I'm going to make one more change (because the code I just pushed is bothering me) and then I'm going to sleep
07:39 PerlJam and now it's time for sleep
07:39 PerlJam good night all
07:39 mberends good night
07:42 eternaleye joined #perl6
07:43 dalek nqp-rx: f34ed51 | duff++ |  (3 files):
07:43 dalek nqp-rx: get rid of icky fatarrow2 rule and parse double quoted strings on the LHS of =>
07:43 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/f​34ed51e251c01e7a75286ea703f85d377ca8244
07:43 mberends more PerlJam++
07:45 azawawi joined #perl6
07:45 azawawi good morning
07:45 azawawi rakudo: say 1;
07:45 p6eval rakudo 5b81df: OUTPUT«1␤»
07:46 mberends morning azawawi, you're very careful today ;)
07:47 mberends (some days, the above test fails, admittedly)
07:47 azawawi mberends: ah on win32
07:48 azawawi mberends: http://mail.perlide.org/pipermail​/padre-dev/2010-March/001632.html
07:49 mberends azawawi: I'll look into it, but on a Linux box, so making no promises...
07:50 azawawi mberends: actually the guy complaining is on a linux box...
07:50 azawawi mberends: but it happened to me on winxp box
07:50 mberends ok. first idea is to comment out the 'use v6;' line temporarily, because 'use' is undergoing a refactor
07:51 azawawi mberends: how do i make sure that my rakudo github repo is up2date?
07:51 azawawi mberends: i see
07:51 azawawi mberends: thx
07:52 mberends 'git status' and 'git pull' I guess. I use http://gitready.com for more ideas
07:53 azawawi mberends: ming32-make realclean and deleting parrot again just in case...
07:53 xabbu42 joined #perl6
07:53 * azawawi tries to rebuild again
07:53 mberends good idea. Also delete the parrot_install tree
07:53 iblechbot joined #perl6
07:54 azawawi mberends: ofcourse :)
07:54 mberends :)
07:57 azawawi mberends: im thinking of automating the git pull/build process via Padre::Plugin::Perl6 to build the latest rakudo or a certain release by name
07:58 mberends excellent idea, because Padre will also be the recommended platform for beginners
07:58 azawawi mberends: my earlier attempt at providing ready-made binary rakudo win32 builds didnt succeed a lot on 64-bit systems...
07:58 azawawi mberends: http://ahmadzawawi.blogspot.com/2009​/09/new-padre-perl-six-updater.html
07:59 mberends azawawi: If you get that to work, I think we could add it to http://rakudo.org/how-to-get-rakudo
07:59 azawawi mberends: do you know of a pure perl implementation of git?
08:00 mberends azawawi: definitely not
08:00 azawawi mberends: or we could simplify a bit and let the user download the nightly builds...
08:00 azawawi mberends: that way no need for him/her to have git
08:01 mberends azawawi: the only "safe" build is the monthly one
08:01 azawawi mberends: ofcourse
08:01 azawawi mberends: so basically enumerate these: http://github.com/rakudo/rakudo/downloads
08:02 mberends azawawi: yes. we could extend the monthly build process to include making a Windows compatible archive. zip is easier, msi a bit harder.
08:02 azawawi mberends: not a good idea btw
08:03 azawawi mberends: compiling on 32-bit does not guarantee it will work on 64-bit
08:05 mberends that's a pity. We have appealed for a hosting provider to loan us a Windows dev system online for the other devs to use, but no offers so far :-(
08:05 azawawi mberends: so to build on win32 we need strawberry which has ming32-make/gcc and svn for the parrot
08:05 azawawi mberends: that's easy ask adamk and he'll get you an account at msopensource :)
08:05 azawawi mberends: adamk/alias
08:06 mberends azawawi: the other build system can use a free Microsoft C compiler and make utility, without Strawberry
08:06 azawawi mberends: the problem is these vm servers are shared and hence could be restarted/rebuild without advanced notice
08:07 mberends azawawi: even an occasionally rebooting machine would be useful, we could schedule smoke tests on it for example
08:07 azawawi mberends: if we can put parrot inside the 'released' monthly rakudo that would be great
08:08 azawawi mberends: that way we do not need svn on the user's machine
08:09 mberends azawawi: there may be some reason why that is not currently being done, but it may be ok to do it in the Windows case
08:11 mberends azawawi: It's good to throw these ideas around now, well in time for the Rakudo * release. The other interested members will follow up from the irclog.
08:16 elmex joined #perl6
08:16 azawawi mberends: cool on win32 instead of 'nice your-build-command', you can do 'start /b /low your-build-command'
08:17 _jaldhar joined #perl6
08:17 azawawi mberends: that way a build will be nice to the user's resources :)
08:18 Trashlord how's it going
08:19 eiro_ joined #perl6
08:20 azawawi mberends: nice talking to you. I am taking notes...
08:22 __rnddim__ joined #perl6
08:22 mberends azawawi: nice likewise. oh, he went :/
08:25 azawawi joined #perl6
08:25 azawawi mberends: no worries i backlog :)
08:25 mberends :)
08:25 * azawawi &
08:36 hanekomu_ joined #perl6
08:40 pnu joined #perl6
08:43 xomas joined #perl6
08:43 xomas joined #perl6
08:57 agentzh joined #perl6
09:02 jonafk joined #perl6
09:11 am0c joined #perl6
09:11 dakkar joined #perl6
09:17 eternaleye joined #perl6
09:27 iblechbot_ joined #perl6
09:28 mssm joined #perl6
09:37 riffraff joined #perl6
09:57 mberends jonasbn++: Thanks for organizing an excellent Hackathon. You made a great contribution to Perl 6 :-)
09:58 jonasbn mberends: thanks
09:59 jonasbn I really enjoyed having you guys around, why don't you all move to scandinavia like jnthn?
10:00 m6locks haha
10:09 masak joined #perl6
10:09 masak oh hai, #perl6
10:11 hejki oh hai, masak
10:11 masak hejki: how's things?
10:12 hejki busy @ work, really too busy
10:12 hejki i feel like selling my soul every day
10:12 * masak hugs hejki
10:13 hejki aww..
10:13 * hejki feels the love
10:13 masak hejki: you should make up a plan to spend more time with Perl 6. you know, to compensate.
10:13 masak that helps for me, at least.
10:13 hejki heh.. my freetime is also pretty 'booked up' :)
10:14 hejki maybe when summer comes rolling in
10:14 masak the nice thing about time is that there's always some more of it coming right up :)
10:14 hejki heh ye :p
10:14 hejki there just isn't enuff hours per day
10:15 masak yeah, but rumour is that we only ustilize about 60% of them...
10:16 estrabd_ joined #perl6
10:16 hejki i've heard something like that too, but well.. i like sleeping to a certain extents
10:16 hejki s/s$$//;
10:17 masak indeed. me too.
10:20 tlb joined #perl6
10:28 sid_ joined #perl6
10:29 masak some short-term plans for Tardis: http://github.com/masak/tar​dis/blob/master/docs/plans
10:31 prism joined #perl6
10:42 masak pdcawley blogged: http://www.bofh.org.uk/2010/03/10/f​alling-out-of-love-with-a-language
10:42 masak 'If Perl 6 were declared a failure tomorrow by the people who are actually working on it (as opposed to the people who aren’t working on it, but bitch about it anyway – see some of chromatic’s more intemperate posts about those people), then it will still have had value for the way it’s inspired members of the Perl 5 community to nick the good bits and make them happen in Perl 5.'
10:43 masak that's probably an accurate summary of how many vocal Perl5ists feel about Perl 6.
10:45 estrabd joined #perl6
10:46 hejki i'm perl5ist, but i still think perl6 would be good
10:46 mathw I think he's got a very good point
10:46 hejki also laziness can't be nicked :>
10:47 mathw Even if Perl 6 is a failure, Perl 5 has vastly improved under its loominess
10:47 mathw However, Perl 6 succeeding would, I am sure, exceed even the awesome new Perl 5 in awesomeness
10:47 masak pervasive all-the-way-down grammars can't be nicked either.
10:47 mathw Due to these things you are mentioning
10:48 mathw Due to macros
10:48 masak mmm, macros.
10:48 mathw Due to static typing
10:48 hejki heh
10:48 mathw (if you want it)
10:48 hejki due to HYPERTITS! :>
10:48 xinming_ joined #perl6
10:48 masak macros with cheese and a bit of thyme.
10:48 mathw I like my macros with garlic
10:48 m6locks :3
10:48 masak oooh
10:49 hejki perl5 would've been what perl6 should be if it were written on later time :)
10:49 hejki at least that's how i see it
10:49 masak hejki: I wrote that in a tweet the other day: http://twitter.com/carlmasak/status/10222201257
10:50 masak hm. on second thought, those mean different things :)
10:50 hejki heh.. twitter--
10:51 mathw I don't think we can blame twitter for masak's incoherence
10:51 mathw That probably has something more to do with Copenhagen
10:51 masak :)
10:51 masak Incopenhagenerence.
10:52 m6locks any wrap up on copenhagen accomplishments somewhere?
10:53 masak http://logiclab.org/wordpress/2010/03/09/cope​nhagen-perl-6-hackathon-and-open-source-days/
10:53 m6locks nice, thx
10:53 masak http://github.com/rakudo/rakudo/blob/​master/docs/S11-Modules-proposal.pod
10:55 baest and should be visible in spectest as well
10:55 masak oh, definitely.
10:55 masak but that's harder to reify as a URL :)
10:56 baest masak: well, it should be visible when http://rakudo.org/status gets updated
10:56 masak aye.
10:57 masak I'm actually not sure what prevents someone non-pmichaud-y from doing that, apart from the force of tradition.
10:58 tuxdna joined #perl6
11:36 szbalint joined #perl6
11:36 pmichaud2 joined #perl6
11:36 pmichaud2 good morning, #perl6
11:37 mathw lolitspmichaud...TWO!
11:44 pmichaud2 quiet here this morning?  I guess everyone is in hackathon-recovery-mode?
11:45 colomon o/
11:52 masak pmichaud2: yes, a bit like that.
11:54 colomon pmichaud2: When you get a chance, I'd love to code review the !op metaop with you.  I'm pretty sure I can churn out a few more of the things based on its approach, but I don't want to be cloning dodgy code.
11:57 iblechbot joined #perl6
11:57 pmichaud2 colomon: okay, I'll be glad to do that.  At the moment my connectivity is extremely limited, though.
11:58 pmichaud2 the wifi connection here has draconian security in place; traffic appears to be strictly limited to http connections
11:58 colomon thanks.
11:58 colomon ack, I hate that.
11:59 colomon (that's ack the random sound, not ack the program, which I love.)
11:59 pmichaud2 they even block access to sites that describe how to do http tunneling.  :-\
12:01 colomon may disappear for a few minutes here (sounds like someone in the nursery is waking up), but I'll still be "listening".
12:03 pmichaud2 I probably won't be able to review much for another couple of hours.
12:05 pmichaud2 (and perhaps not even then -- depends on what is going on around here)
12:06 bluescreen joined #perl6
12:13 pmichaud2 afk
12:15 k23z__ joined #perl6
12:15 k23z__ joined #perl6
12:17 freshfish joined #perl6
12:18 freshfish 大家好啊
12:19 freshfish left #perl6
12:37 masak freshfish: come back! I want to greet you in hanzi. :)
12:47 masak std: sub foo(%h{ $left }) {}
12:48 p6eval std 30019: OUTPUT«ok 00:01 108m␤»
12:48 masak rakudo: sub foo(%h{ $left }) {}
12:48 p6eval rakudo 5b81df: OUTPUT«Confused at line 11, near "sub foo(%h"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
12:48 masak NYI?
12:58 cognominal TimToady,  S02-bits.pod:1181:    Slicel      Arguments in a semicolon list (or equiv, like Z)
12:58 cognominal that should be Slice?
13:00 colomon don't think so.
13:00 cognominal ok
13:08 takadonet morning all
13:12 jnthn oh hai, #perl6
13:14 takadonet jnthn: morning
13:15 mathw oh hai jnthn
13:15 colomon \o
13:15 jnthn masak: what you trying to do?
13:15 jnthn Unpack?
13:15 masak jnthn: yes.
13:15 payload joined #perl6
13:15 jnthn Syntax is (%h (:$left))
13:15 lisppaste3 colomon pasted "!op issues (for pmichaud)" at http://paste.lisp.org/display/96205
13:16 masak jnthn: ah.
13:16 MoC_ joined #perl6
13:16 jnthn And should work fine ;-)
13:17 jnthn Though you'll surely find some way to break it. :-P
13:17 riffraff joined #perl6
13:17 masak works fine. jnthn++
13:17 jnthn During my train journey I've been hacking :-)
13:18 jnthn I've got a much-of-the-way-there patch for lexical import working.
13:19 masak \o/
13:19 masak rakudo: multi x(%h($a, $b)) {}; multi x(%h($a, $b)) {}; x({:a, :b})
13:19 p6eval rakudo 5b81df: OUTPUT«Ambiguous dispatch to multi 'x'. Ambiguous candidates had signatures:␤:(%h)␤:(%h)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
13:19 masak jnthn: it seems to me nested sigs don't get printed...
13:21 jnthn masak: Ah
13:22 jnthn Signature.perl probably needs a little tweak.
13:22 * masak submits rakudobug
13:31 colomon btw, masak, don't know if you saw this one yet or not:
13:31 pmurias joined #perl6
13:31 colomon rakudo: .say for "hello";
13:31 p6eval rakudo 5b81df: OUTPUT«h␤e␤l␤l␤o␤»
13:32 masak saw it, but forgot to get back to it.
13:32 * masak submits rakudobug
13:32 colomon masak++
13:32 masak I'd be very interested in how that occurs.
13:32 colomon yeah, me too.
13:32 masak are Str objects iterable now?
13:32 colomon and I've got the source code now...
13:32 colomon geez, I hope not!
13:32 colomon and
13:33 masak I mean accidentally. :)
13:33 colomon rakudo: for "hello" { .say }
13:33 p6eval rakudo 5b81df: OUTPUT«hello␤»
13:33 masak o.O
13:33 masak curiouser and curiouser.
13:34 rv2733 joined #perl6
13:36 ive joined #perl6
13:38 ive left #perl6
13:46 payload joined #perl6
13:50 ive joined #perl6
13:50 PerlJam good morning.
13:51 takadonet morning
13:59 dalek rakudo: a705b41 | jonathan++ |  (6 files):
13:59 dalek rakudo: Translate cheating use into NQP and split out need and import. Stubs for various things we'll need (tags, lexical import).
13:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​705b4116d2837d1ee384fc071d29b0669bef6bd
13:59 dalek rakudo: 5d6aba2 | jonathan++ | src/Perl6/Module/VersionDetectionActions.pm:
13:59 dalek rakudo: Add some comment to say what a file is for.
13:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​d6aba2d9664b5e0201213738086eb6a3046e492
13:59 dalek rakudo: a11211c | jonathan++ | src/Perl6/ (2 files):
13:59 dalek rakudo: Switch symbol importation to lexical by default; actually load modules during the compile. Probably has quirks, but a step towards what we want.
13:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a​11211c19f4766865ad8edb93f4982b35f9ac562
13:59 dalek rakudo: 8d76887 | jonathan++ | src/Perl6/Grammar.pm:
13:59 dalek rakudo: Actually parse a module_name, rather than cheating and parsing a longname, in use.
13:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​d76887311301f8e63c654cc71c1a404ca4fd277
14:07 masak jnthn: did you see http://github.com/masak/tar​dis/blob/master/docs/plans ? specifically, what do you think about the instruction code?
14:08 jnthn masak: no, been away for meetings all morning
14:08 jnthn masak: will glance at it shortly
14:08 jnthn Gotta do a couple of other bits here first. :-)
14:12 colomon masak: Does implementing Tardis involve completely reimplementing p6?
14:13 masak colomon: more or less.
14:13 colomon masak++
14:13 masak not sure I deserve karma for that... :P
14:15 masak jnthn: no sweat.
14:15 masak rakudo: sub foo(%h($left)) {}; foo({ no => "left key" })
14:15 p6eval rakudo 5b81df: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤current instr.: 'foo' pc 213 (EVAL_1:82)␤»
14:16 masak I guess that's a correct error message... wonder if it can be made awesomer, though...
14:16 masak does anyone have any suggestions?
14:19 * PerlJam isn't even sure what %h($left) is supposed to mean these days
14:19 masak PerlJam: 'a hash %h with a key named "left" and the value $left'
14:21 PerlJam Then an "awesomer" message would be "Hash %h has no key named 'left'" perhaps
14:21 masak I really like that.
14:21 masak it works for single dispatch.
14:22 * masak submits LTA rakudobug
14:22 PerlJam where you answering Mark Reed's query on p6l?
14:22 masak I was.
14:22 PerlJam ah.   I just read it :)
14:22 masak :)
14:24 [particle] Sub 'foo' expects a Hash with a required a key named 'left'.
14:25 jnthn ugh, that will be *hard* to do.
14:26 masak jnthn: but it will be *so* worth it.
14:26 jnthn Can quite easily name the parameter that has being bound into a sub-signature though.
14:26 PerlJam jnthn: that's your job!  :)
14:26 [particle] then that must be the correct error message :)
14:27 jnthn Which is maybe semi-awesome-ish. :-)
14:27 CokeGod_ joined #perl6
14:27 [particle] SAI is still LTA :)
14:27 PerlJam CokeGod: have you attained some enlightenment of which I have not been aware?  :)
14:28 jnthn Prague wasn't built in a day.
14:28 jnthn brb, errands
14:28 masak CokeGod: does a Coke God accept offerings in the form of sugar and caffeine?
14:28 [particle] that's not what they say in rome....
14:29 CokeGod Splenda and caffeine.
14:30 CokeGod The explanation of this nick is somewhere on the internet. It's really not worth the search.
14:35 * CokeGod enjoys his current offering which is hot and infused with faux hazelnut aroma.
14:37 masak so, Set and Bag, KeyHash/KeySet/KeyBag amd PairSet. does anyone have any good use cases which might shake out what default operators and methods we want for those?
14:42 masak hm. are .pickpairs and .grabpairs strictly necessary? couldn't one just do .pick and .grab (respectively) after an appropriate coercion?
14:45 jnthn "Rakudos to the team!" :-D
14:45 masak :)
14:45 masak jnthn: was that a quote from somewhere?
14:45 jnthn masak: p6l
14:45 PerlJam masak: or just have $bag.pick return a pair and if you want the key, you say $bag.pick.key
14:46 masak PerlJam: hm.
14:46 PerlJam masak: and the currently specced semantics could be gotten from  $bag.pick(*).>>key or some such
14:46 * jnthn -> exploring the systembolaget
14:47 * masak again apologizes profusely for confusing p6l by actually running stuff :P
14:47 jnthn lol!!
14:47 jnthn bbiab
14:47 masak jnthn: that's sort of a double definite you did there. '-et' translates as 'the'...
14:48 jnthn masak: oops
14:48 jnthn :-)
14:48 masak np, just wierdish. there are no real rules in context switching, I guess...
14:49 jnthn (I kinda knew that, but the double somehow falls out naturally when interpolating it into an English sentence. Maybe it'll feel wierder to me some day. :-))
14:49 * mathw reads the latest on the pattern matching thread and is astonished and overjoyed
14:49 mathw I didn't realise signature unpacking could do that!
14:49 mathw else I would've written about it in my reply, obviously
14:49 * mathw toasts... everyone
14:49 jnthn ouch...it burns!
14:49 PerlJam mathw: jnthn++
14:49 jnthn oh, other toast.
14:49 [particle] prost!
14:49 masak nazdarovie!
14:50 jnthn OK, really going...before it closes. :-)
14:50 * masak extrapolates that jnthn will like Systembolaget
14:50 PerlJam zdar!
14:51 PerlJam (The one small bit of czech I learned from Sokol :)
14:52 mathw cheers!
14:52 masak sanon!
14:54 ignacio_ joined #perl6
15:09 payload joined #perl6
15:10 masak Perl 6 Advent page hits still average 120 +- 40 per day. the long tail seems to hold stable.
15:11 mathw yay
15:11 mathw I think we've got presence in Google and links from various places
15:11 frettled masak: that's nice.
15:12 masak Perl 6: not existing a little less every day.
15:12 frettled frettleblog has 5-10, and that's pretty good, considering the rather narrow audience.
15:12 mberends masak: is it true that tardis is embarking on implementing Perl 6 in Perl 6? Was GGE not glacial enough? ;-)
15:12 Psyche^ joined #perl6
15:12 masak mberends: the glaciality of GGE has in fact been greatly exaggerated... mostly by me. :P
15:13 mberends phew :)
15:13 mathw masak: I recognise sheer geeky cool in the idea... but what's the practical reason?
15:13 masak mberends: but yeah, Yapsi will be slow.
15:13 PerlJam "yapsi"?  heh
15:14 masak mathw: I'm mostly toying around, but the three concrete products will be a time-travelling debugger, a code analysis tool, and a code coverage tool.
15:14 mathw aaah
15:14 masak mathw: all three require a compiler frontend, and the debugger and the coverage tool require a compiler backend.
15:15 PerlJam masak:  you'll have to hang out with Damian quite a bit more to get that time-travel thing down  ;)
15:15 masak PerlJam: I wouldn't mind that :)
15:15 masak PerlJam: but you do know there's a plan already, don't you? :)
15:15 masak plus some very simple already-working code.
15:15 PerlJam masak: I'm only peripherally aware of the plan.
15:16 masak the plan is to have fun until we run out of memory. :P
15:16 mathw I used to do that in Epigram
15:16 mathw the problem with that is that running out of memory took about half an hour and two screenfuls of code
15:17 masak that sounds like a problem Tardis might run into as well.
15:19 PerlJam I was just looking at Python 3's grammar and find it incredibly icky to read.  Now I know I'm too used to Perl 6 regex  :)
15:20 masak STD.pm actually gives Perl 6 grammar an extremely pure feel.
15:21 masak it's as if its author wanted to atone for some previous heinous parsing sins... :P
15:21 PerlJam What really grates on my mind are constructions like this:  [tfpdef] (',' tfpdef ['=' test])*
15:21 PerlJam where the stuff in [] is meant to be optional
15:22 masak that's some form of EBNF, is it not?
15:22 PerlJam yes
15:22 [particle] everything is some form of ebnf, it seems
15:23 [particle] nobody bothered to standardize the 'e'
15:23 PerlJam indeed
15:23 [particle] it's as bad as makefile syntax
15:23 masak embrace-and-extended BNF :)
15:24 [particle] i got stopped dead in my tracks writing an ebnf front end for pge years ago
15:24 PerlJam maybe someone could make a universal translator from EBNF to Perl 6
15:24 [particle] which e?
15:24 * jnthn back
15:24 PerlJam all of them
15:24 masak jnthn: how was Systemet?
15:25 jnthn masak: Win.
15:25 * masak thought so
15:25 jnthn masak: Nice range. :-)
15:25 jnthn And prices akshually not as terrifying as first expected.
15:25 masak jnthn: and late-bindably extendable :)
15:25 jnthn Yes. :-)
15:26 mathw Is jnthn now located in his new town?
15:27 jnthn He is.
15:28 mathw \o/
15:29 jnthn Also on my walk spotted a curry house. :-)
15:30 masak excellent.
15:32 * masak now hopefully glances first at jnthn and then at http://github.com/masak/tar​dis/blob/master/docs/plans
15:35 jnthn :-)
15:35 jnthn Any particular bit you want me to look at, or all of it?
15:36 masak the latter, more insane parts.
15:36 masak specifically, obvious reasons the SIC idea won't fly.
15:36 nihiliad joined #perl6
15:40 am0c joined #perl6
15:40 jnthn "Figure out a way to encode which AST nodes correspond to which substrings of a program.
15:40 estrabd joined #perl6
15:40 jnthn "
15:41 jnthn That is probably do-able by attaching info from the parse node, or the parse node itself, to the AST.
15:42 masak nod.
15:42 masak the trick is to have info flow all the way through from program via AST to SIC.
15:42 jnthn The instruction code looks...odd.
15:42 masak :)
15:42 masak I'm on thin ice there.
15:43 jnthn It looks like post-optimized output. :-)
15:43 jnthn Or some such.
15:43 jnthn It feels awkward that you need to know if you have a container or not.
15:43 jnthn It's possible a value can be bound straight into the lexpad
15:43 masak oh right.
15:44 masak I obviously need to do some more thinking on this.
15:44 jnthn Also I'd kinda expect calls to multi-dispatch routines.
15:44 masak yes.
15:44 jnthn for infix:<=> and postfix:<++>
15:44 jnthn But of coruse that needs multi dispatch and... :-)
15:44 jnthn You gotta start somewhere I guess.
15:44 masak :)
15:44 masak yes.
15:44 jnthn I guess I can only sum up with, implemetning a Perl 6 compiler is Really Really Hard. :-)
15:45 masak gotcha.
15:45 jnthn (Which isn't a reason not to do it. :-))
15:47 mberends masak: don't spend too long on this, you could just dispatch lue++ to the future in his quantum-mobile to get the resulting source code. He's up for a bit of time travel. As long as he doesn't forget it all on the way back to here and now...
15:48 masak mberends: I willen haben shallum asken him.
15:49 mberends masak: talk about all over the tenses ;)
15:51 masak mberends: "If you've done six impossible things this morning, why not round it off with breakfast at Milliways—the Restaurant at the End of the Universe!"
15:52 mberends once you start doing impossible things, the sky isn't the limit. hmm, maybe time travel is harder for programmers than for programs (and debuggers)
15:59 * mberends de-commutes
15:59 mberends left #perl6
16:08 MoC_ joined #perl6
16:09 M_o_C joined #perl6
16:33 pmurias joined #perl6
16:51 WNz joined #perl6
16:52 WNz Hey all
16:52 WNz What's the best tutorial to follow for a newcomer to perl and going straight to perl6?
16:53 takadonet hey WNz
16:53 WNz Hey
16:53 WNz Also anyone here on gentoo?
16:53 takadonet <-- ubuntu sorry
16:53 WNz Heh
16:53 WNz I'm wondering what all i need to emerge
16:54 WNz emerging rakudo seems to be all i need, although i'm not sure
16:54 arnsholt WNz: If you want the latest-greatest you'll git and svn
16:55 arnsholt I think all the other build deps should be there already on Gentoo
16:55 WNz Doesn't portage stay pretty up-to-date?
16:55 arnsholt I'm not on Gentoo anymore, but used to
16:55 takadonet Wnz: http://perl6advent.wordpress.com/​2009/12/01/day-1-getting-rakudo/
16:56 takadonet Advent calendar is a great place for an overview of Rakudo
16:56 Su-Shee it is indeed and one should consider a 40 day pre-easter calendar :)
16:58 arnsholt There was talk of an article series in connection with Rakudo * in CPH
16:58 japhb Would one of the nqp-rx hackers mind updating parrot's snapshot, please?  I'm anxious to start using the fine hackage from the last few hours in Plumage.  :-)
16:58 japhb pmichaud, jnthn, Tene, PerlJam, ^
17:00 WNz I'm looking for more of a structured howto
17:00 WNz For learning
17:00 WNz Not random bits
17:02 m6locks learning what?
17:03 m6locks oh the language
17:03 m6locks i found moritz_'s tutorial handy http://perlgeek.de/en/article/5-to-6
17:04 m6locks before that, i read some introductory text in perl5
17:06 justatheory joined #perl6
17:10 WNz ok so it's not working for me
17:10 ignacio_ joined #perl6
17:10 WNz I'm trying to run commands in the terminal using `perl6`
17:10 WNz i tried something as simple as `my $num = 6;` and `say "$num";`
17:10 WNz with an error
17:11 colomon rakudo: my $num = 6; say "$num";
17:11 p6eval rakudo a11211: OUTPUT«6␤»
17:11 m6locks did you write them on the same line?
17:11 m6locks like that
17:11 WNz no
17:12 m6locks if you hit enter between the commands, youäll get an error because it needs to be inputted on a single line if you're using repl
17:12 WNz ah i see
17:12 WNz what's the crunchbang for using perl6?
17:13 m6locks what would you like it to be?-)
17:14 WNz i'm assuming #!/usr/bin/perl6?
17:14 WNz yep
17:14 WNz cool
17:18 PacoLinux joined #perl6
17:23 colomon hey, we're over 27,000 passing tests now!
17:24 jnthn :-D
17:24 jnthn Nice work everyone!
17:24 WNz is multi sub new?
17:25 jnthn WNz: Yes; Perl 5 doesn't have those.
17:25 WNz interesting
17:25 jnthn They're very useful and quite important in Perl 6 though. :-)
17:25 WNz quite cool
17:25 m6locks what's the test count gonna be when rakudo * is released
17:26 arnsholt Who knows. More than today =)
17:26 m6locks ;)
17:26 jnthn m6locks: It's not a great indicator of progress in some senses, since different features have widely varying numbers of tests.
17:26 ignacio_ joined #perl6
17:27 m6locks yes, i noticed that with the trig. functions
17:28 takadonet well that's colomon fault for that
17:28 colomon sorry!
17:28 colomon ;)
17:29 colomon BTW, I'm hoping for about 33,000 passing tests for Rakudo *.  (And not just by generating 6,000 new trig tests.  :)
17:29 jnthn I think that's achievable with continued graft. :-)
17:30 WNz what's the difference between sub and method?
17:31 colomon It's just 1,000 tests a week, and we actually got 2,000 back this week.  (hackathon++)
17:31 jnthn WNz: A method expects to be able to install itself in some class/role/grammar, and also handles taking the invocant for you, so you needn't list it explicitly in the argument list.
17:32 WNz ok
17:32 WNz I figured it was just the class context
17:34 PerlJam WNz: but you didn't ask about submethods  :)
17:34 WNz ha haven't heard of them yet
17:41 WNz yay! finally chained comparrisons
17:41 WNz I've been waiting to finally be able to do that in a lang
17:42 PerlJam WNz: you can do it in python
17:42 WNz really?
17:42 WNz Didn't know that
17:43 PerlJam WNz: http://docs.python.org/refer​ence/expressions.html#notin
17:43 WNz well that's good to know
17:43 WNz is that new in python?
17:44 WNz i haven't used it in a while
17:44 PerlJam WNz: no, it's been in python quite some time.
17:44 steffan joined #perl6
17:45 PerlJam WNz: but that's not even the neatest thing in Perl 6  ;)
17:45 nihiliad joined #perl6
17:45 WNz well yeah
17:45 WNz how do you make executables in perl?
17:45 PerlJam WNz: Here's one that just tickles me to this day:  if [<] @stuff { say "the stuff is ordered least to greatest" }
17:46 WNz wow that's cool
17:47 steffan left #perl6
17:51 colomon though it isn't actually implemented in current Rakudo.
17:52 arnsholt Are phasers supposed to work in master?
17:53 mberends joined #perl6
17:59 jnthn arnsholt: Not entirely sure. Maybe depends on the phaser.
17:59 jnthn I'm sure I've seen some stuff in the actions that pertains to those.
18:01 WNz so how do you make an executable in perl6?
18:01 arnsholt jnthn: BEGIN phaser in this case. Parses, but isn't executed
18:01 arnsholt rakudo: say "HELO"; BEGIN { say "EHLO"; }
18:01 p6eval rakudo a11211: OUTPUT«HELO␤»
18:03 arnsholt Was Nil the class that changed to Mu recently?
18:03 jnthn Ah
18:03 jnthn No, Object
18:03 arnsholt Okies
18:03 astrojp joined #perl6
18:03 jnthn WNz: At the moment there's not a particularly easy way.
18:03 jnthn You can make a "fakeexecutable" that packages bytecode and a loader.
18:04 jnthn Well, in theory at least :-)
18:04 WNz In what way is it fake?
18:04 jnthn It's not an actual compiling of Perl 6 to machine code, it just contains VM bytecode and something to load the vm and run it.
18:05 WNz Is the code visible?
18:05 WNz I'm making a password storage db with encryption via rsa key
18:06 WNz but i don't want the algorithm viewable
18:06 WNz For obvious reasons
18:06 PerlJam security through obscurity is no security at all
18:06 jnthn RSA is a fairly well known algorithm. :-) But no, the source at present doesn't go into the executable.
18:07 WNz Meaning?
18:07 jnthn You can still reverse engineer it from the bytecode, just as you could from native machien code.
18:08 jnthn You're just making life a little harder rather than preventing anything. :-)
18:08 WNz So then how should I go about it?
18:08 arnsholt alpha: my Num $x = 1.1;
18:08 p6eval alpha 30e0ed:  ( no output )
18:08 arnsholt alpha: my Num $x = 1.1; say $x
18:08 p6eval alpha 30e0ed: OUTPUT«1.1␤»
18:08 arnsholt rakudo: my Num $x = 1.1; say $x
18:08 p6eval rakudo a11211: OUTPUT«Type check failed for assignment␤current instr.: '&die' pc 16804 (src/builtins/Junction.pir:373)␤»
18:08 arnsholt Bug, or something I've missed?
18:09 jnthn Well, I'm not a cryptologist, but as far as I understand these things, using RSA is fine (in fact, it's best to use a well-known algorithm) and the more important issue is key management.
18:09 jnthn arnsholt: Something you missed.
18:09 jnthn rakudo: say 1.1.WHAT
18:09 p6eval rakudo a11211: OUTPUT«Rat()␤»
18:09 arnsholt Ooooh, right
18:09 WNz Well seeing as i'm not planning on releasing the app, wouldn't I be fine by just using obscurity?
18:09 arnsholt Is there a way to force creation of a Num, rather than a Rat?
18:11 WNz It's more of a personal thing
18:11 WNz A secure way of storing my passwords
18:11 WNz I made the app in ruby and it seemed to work pretty well
18:12 WNz you need the private key and the password to unlock the key
18:12 WNz and the app
18:12 Chillance joined #perl6
18:12 WNz is that not enough for my purposes?
18:12 WNz and the sqlite db
18:12 PerlJam arnsholt: (1/2).Num  :)
18:13 arnsholt True dat
18:13 arnsholt I went with 1.1e1 =)
18:14 ruoso joined #perl6
18:15 arnsholt rakudo: my Callable $x; say $x.isa(Callable); # known issue?
18:15 p6eval rakudo a11211: OUTPUT«Method 'isa' not found for invocant of class 'RoleHOW'␤current instr.: 'perl6;Any;isa' pc 9666 (src/gen/RoleToClassApplier.pir:540)␤»
18:21 PerlJam rakudo: (1/2).WHAT.say
18:21 p6eval rakudo a11211: OUTPUT«Rat()␤»
18:21 PerlJam rakudo: (1.0/2).WHAT.say
18:21 p6eval rakudo a11211: OUTPUT«Rat()␤»
18:21 colomon rakudo: (1.0).WHAT.say
18:22 p6eval rakudo a11211: OUTPUT«Rat()␤»
18:22 PerlJam That should be Num, shouldn't it?
18:22 colomon npe
18:22 colomon nope
18:23 PerlJam how do I get a Num literal?
18:23 PerlJam Or can I/
18:23 PerlJam ?
18:23 colomon rakudo: say (1.0e0).WHAT
18:23 arnsholt Scientific notation
18:23 p6eval rakudo a11211: OUTPUT«Num()␤»
18:23 PerlJam arnsholt: yes, of course.  But is that the only way?
18:24 arnsholt No idea. TMTOWTDI usually applies =)
18:24 colomon normally I prefer
18:24 arnsholt rakudo: say (1/2).Num.WHAT
18:24 p6eval rakudo a11211: OUTPUT«Num()␤»
18:24 colomon rakudo: say (1.0.Num).WHAT
18:24 p6eval rakudo a11211: OUTPUT«Num()␤»
18:24 colomon which is a little wordier but more to the point.
18:25 PerlJam And is this a fossil: One consequence of all this is that you may no longer write a Num as C<42.> with just a trailing dot.  You must instead say either C<42> or C<42.0>.
18:25 PerlJam S02:400
18:25 colomon PerlJam: true
18:27 arnsholt rakudo: my Array og Int $foo
18:27 p6eval rakudo a11211: OUTPUT«In "my" declaration, typename Array must be predeclared (or marked as declarative with :: prefix) at line 11, near " og Int $f"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
18:28 PerlJam og!
18:28 PerlJam :)
18:28 arnsholt rakudo: my Array of Int $foo
18:28 p6eval rakudo a11211: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
18:28 arnsholt There. What happen?
18:29 cls_bsd joined #perl6
18:31 PerlJam rakudo thinks it's a parametric type
18:32 arnsholt my Int @array; say "alive";
18:32 arnsholt rakudo: my Int @array; say "alive";
18:32 p6eval rakudo a11211: OUTPUT«alive␤»
18:32 arnsholt Isn't that the same as "my Array of Int $x"?
18:36 meppl joined #perl6
18:36 rindolf joined #perl6
18:36 rindolf Hi all.
18:36 colomon o/
18:36 PerlJam hello rindolf
18:53 M_o_C_ joined #perl6
18:59 bkeeler_ joined #perl6
19:00 justatheory joined #perl6
19:05 ive joined #perl6
19:06 ive joined #perl6
19:26 justatheory joined #perl6
19:29 ruoso joined #perl6
19:37 mantovani joined #perl6
19:39 mantovani joined #perl6
19:41 mantovani joined #perl6
19:42 ash_ joined #perl6
19:43 mantovani joined #perl6
19:43 PerlJam What kind of introspection is available on PAST::Val nodes?
19:45 mantovani joined #perl6
19:49 ShaneC joined #perl6
19:50 mantovani joined #perl6
19:51 pmichaud good afternoon, #perl6
19:52 mberends hi pmichaud
19:52 PerlJam hello pm.  how goes?
19:52 pmichaud it's been an interesting week.
19:52 colomon o/
19:52 jonasbn joined #perl6
19:52 bkeeler_ Mornin, sir
19:52 pmichaud ("interesting" in the chinese proverb sense, alas)
19:54 pmichaud I've finally been able to break out of the wifi jail here, though, so I can at least get back to hacking sorts of things.
19:54 PerlJam rakudo: my @a = "greeble"; .say for @a;
19:54 p6eval rakudo a11211: OUTPUT«greeble␤»
19:54 PerlJam rakudo: .say for "greeble"
19:54 p6eval rakudo a11211: OUTPUT«g␤r␤e␤e␤b␤l␤e␤»
19:54 PerlJam rakudo: .say for "greeble",;
19:54 p6eval rakudo a11211: OUTPUT«greeble␤»
19:54 bkeeler_ wow
19:54 pmichaud Parrot thinks that strings iterate as individual characters.
19:55 pmichaud probably need to evaluate the for argument in list context.
19:55 [particle] that's what makes parrot better than c :)
19:57 PerlJam pmichaud: I have no idea how to do that in Actions.pm
19:57 pmichaud see the way that the statement_control:sym<for> does it.
19:58 PerlJam Hmm
19:58 pmichaud ultimately  statement_control:sym<for>  will translate into a call to map.map()
19:58 pmichaud er, .map()
19:59 colomon that's "ultimately" as in "when we get around to programming it that way", not "if you trace it far enough down in the code", right?
19:59 pmichaud thus    for XYZ { ABC };     is translated into something like    list(XYZ).map({ ABC })
19:59 pmichaud "when we get around to programming it that way"
19:59 pmichaud we can't really do it until we have sink context in place
20:00 TimToady phone
20:00 pmichaud I'll be delayed.
20:00 pmichaud (approx 5-10 mins)
20:34 payload joined #perl6
20:35 payload joined #perl6
20:39 uniejo joined #perl6
20:48 * jnthn is about for a bit.
20:49 aindilis joined #perl6
20:49 M_o_C joined #perl6
20:52 M_o_C joined #perl6
20:56 justatheory joined #perl6
21:02 bbkr joined #perl6
21:09 buchi_ joined #perl6
21:12 sjohnson TimToady: long time no chat.  may i ask a p5 question?  i was wondering if Perl 5 is high-level enough in the way that you can store BIG numbers, like beyond 32-bit etc as integers, and do math on them etc
21:13 bbkr joined #perl6
21:14 buchi_ how to write binary values to a file using perl?
21:14 sjohnson open the file as a binary file
21:14 sjohnson print HANDLER $bindata;
21:15 M_o_C sjohnson: I don't know if this also covers what you consider "storing", but: http://perldoc.perl.org/bigint.html Though last time I tried it was considered inappropriate to ask Perl 5 Questions in #perl6.
21:17 masak joined #perl6
21:17 * masak has watched a movie, eaten dinner, and is generally happy with life
21:18 pugssvn r30020 | duff++ | [t/spec] Add a couple of tests for the one-arg statement modifier for loop
21:19 bkeeler_ Howdy masak
21:19 PerlJam buchi_: This channel is about Perl 6 and it sounds like you're asking a Perl 5 question.  Try #perl or #perlhelp
21:20 PerlJam sjohnson: perldoc bigint
21:20 buchi_ Thank you!!
21:20 PerlJam sjohnson: you can try #perl or #perlhelp too  :)
21:20 iblechbot joined #perl6
21:21 sjohnson perl6 guys aren't too nice, so i ask a perl 5 question on my once-a-month quota here.  plus i get the answers straight from the camel's mouth!
21:21 sjohnson errl.. perl5 guys i mean
21:21 PerlJam sjohnson: Are you saying I'm not nice?
21:21 * PerlJam is a Perl 5 guy
21:21 masak bkeeler_: hi there!
21:21 PerlJam and a Perl 6 guy
21:21 PerlJam and a Ruby guy
21:21 bkeeler_ don't camels tend to spit?
21:21 PerlJam and rarely a python guy
21:22 sjohnson i meant #perl
21:22 sjohnson guys
21:22 bkeeler_ or is that just llamas?
21:23 sjohnson PerlJam: nope you're a pretty nice guy
21:24 nihiliad joined #perl6
21:24 mberends sjohnson: have you tried any of http://search.cpan.org/search​?query=BigInt&amp;mode=module ?
21:26 sjohnson no.. but i am now.  i wasn't sure if it was natively supported, or you needed to import a pragma
21:26 sjohnson it all started when my brother said "ya can't do it in perl 5" and i was skeptical of that claim
21:26 mberends it's not natively supported
21:26 PerlJam sjohnson: you can do anything in Perl 5 ... it's all a question of how hard it is to do.
21:27 sjohnson mberends: 5.10.0 has it as a core pragma though
21:28 sjohnson maybe even earlier stuff
21:29 m6locks binmode INF; binmode OUTF;
21:30 snarkyboojum joined #perl6
21:30 mberends sjohnson: which pragma do you mean?
21:30 sjohnson use bigint;
21:31 mberends sjohnson: thanks, I did not know that, and you have answered your own question.
21:33 sjohnson well... it was the collective wisdom of #perl6 to the rescue once again
21:33 m6locks :3
21:34 mberends 'perldoc bigint' says the pragma is a thin wrapper for Math::BigInt, so you still need to ensure that is installed
21:34 kst joined #perl6
21:34 lichtkind joined #perl6
21:35 sjohnson good tip
21:36 masak joined #perl6
21:36 mberends \o masak
21:36 masak mberends: o/
21:36 CokeGod (bigint) or just use a perl > 5.8, neh?
21:36 masak <jnthn> It feels awkward that you need to know if you have a container or not.
21:37 CokeGod er, >=
21:37 masak jnthn: by that logic, I'd be better off just having something like 'assign "$a", 42'...
21:38 masak (as the SICification of '$a = 42')
21:38 masak and then something like 'bind "$a", "$b"' for '$a := $b'.
21:39 masak hm, that sounds simple enough to actually work.
21:40 lichtkind oh coke became god
21:40 CokeGod I blame freenode.
21:42 masak rakudo: sub infix:<=>($a is rw, $b) { warn "This operator has been overridden by the FBI for your safety" }; my $a = 42; say $a
21:42 p6eval rakudo a11211: OUTPUT«This operator has been overridden by the FBI for your safety␤This operator has been overridden by the FBI for your safety␤Any()␤»
21:42 masak hm. locally, I got only one warning, not two.
21:43 buchi_ left #perl6
21:43 masak maybe the Safe prelude does some assignment.
21:43 masak hm... :>
21:43 PerlJam rakudo: sub infix:<=>($a is rw, $b) { warn "BLAH" } say "hi"
21:43 am0c joined #perl6
21:43 p6eval rakudo a11211: OUTPUT«Confused at line 11, near "sub infix:"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
21:43 masak rakudo: sub infix:<=>($a is rw, $b) {}; say run('ls')
21:43 p6eval rakudo a11211: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤dyne​xt␤lib␤LICENSE␤Makefile␤parrot␤parrot_insta​ll␤perl6_group.c␤perl6_group.h␤perl6_group.​o␤perl6.pir␤README␤src␤t␤Test.pm␤tools␤0␤»
21:43 * masak figgered out a way to disable Safe.pm
21:44 masak may I advise all potential trolls on the channel to exercise a measure of restraint until we fix that? :)
21:44 jnthn lol
21:45 m6locks haha
21:47 Tene masak: Aw, but I don't *like* restraint!
21:48 masak Tene: it was just a suggestion. as was pointed out a few days ago, 'nice' and 'good' don't always coincide.
21:49 Tene Setting up a bot to run inside an selinux sandbox has been on my "interesting afternoon activities" list for months.
21:49 Tene Then we wouldn't need to use Safe.pm to restrict it, and we could let scripts play with the fs.
21:51 masak ++Tene
21:51 CokeGod ->
21:52 Tene
21:52 masak
21:52 Tene .u ⽮
21:52 phenny U+2F6E KANGXI RADICAL ARROW (⽮)
21:52 masak :)
21:53 pmichaud -=»>>
21:53 * pmichaud can't wait to define that operator :-)
21:53 masak std: -=»>>
21:53 p6eval std 30020: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/woLgQzWpBB line 1:␤------> [32m-[33m⏏[31m=»>>[0m␤    expecting any of:␤  prefix or meta-prefix␤    prefix_postfix_meta_operator␤     term␤FAILED 00:01 107m␤»
21:53 jnthn pmichaud: Heh, amusingly enough I just decided to try and parse hypers :-)
21:54 mberends what would a harpoon operator do?
21:55 masak mberends: finally catch that great white whale.
21:55 frettled look, you caught a white cinnamon bun instead
21:55 masak mmm.
21:55 jnthn pmichaud: Didn't exactly succeed though.
21:55 mberends ah, there must be frettles about :)
21:56 jnthn mmm...kamelbullar
21:56 frettled ←↓↑→
21:56 frettled jnthn: camel testicles?
21:56 jnthn ...oops. :-)
21:56 jnthn .oO( don't make puns in languages you don't know )
21:56 frettled they're probably tasty testies
21:57 justatheory joined #perl6
21:58 masak jnthn: for what it's worth, I wouldn't have made that association. YMMV, I guess. :)
21:58 Tene ↑↑↓↓←→←→
21:58 frettled jnthn: do you feel your leg stretching yet?
21:59 frettled Tene: ←-→
22:00 diakopter masak: run() shouldn't be defined..
22:00 Tene
22:00 Tene »≫⋙
22:00 masak diakopter: your utterance is a case where I feel that 'should' should have a context bound to it. :)
22:01 diakopter I mean
22:01 diakopter oh, interesting
22:01 diakopter you killed assignment?
22:01 masak :D
22:02 masak I found a security hole.
22:03 frettled oooh
22:03 diakopter that's weird; it does it in PIR I thought
22:03 frettled masak: that's cool, is it exploitable?
22:03 PerlJam rakudo: run('ls');
22:03 masak frettled: did you see where I did `ls` above?
22:03 p6eval rakudo a11211: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤dyne​xt␤lib␤LICENSE␤Makefile␤parrot␤parrot_insta​ll␤perl6_group.c␤perl6_group.h␤perl6_group.​o␤perl6.pir␤README␤src␤t␤Test.pm␤tools␤»
22:03 frettled masak: argh, sorry, lost the pun.  Rewind.  «is it even remotely exploitable?»
22:03 masak :)
22:03 masak oh hm.
22:04 diakopter :/
22:04 masak PerlJam: seems Safe.pm isn't actually very safe.
22:04 frettled masak: ahaha
22:04 PerlJam alpha: run('ls')
22:04 p6eval alpha 30e0ed: OUTPUT«operation not permitted in safe mode␤in Main (file /tmp/3BGLnFQ04Z, line 1)␤»
22:05 diakopter p6eval doesn't use Safe.pm
22:05 frettled is someone reinventing PHP's safemode?
22:05 diakopter ooo masakbug
22:05 diakopter I mean
22:05 masak diakopter: then what's all the program_prefix crap in evalbot.pl?
22:06 frettled object-oriented osbtructive masakbug?
22:06 diakopter it's the contents of Safe.pm
22:06 diakopter it doesn't "use Safe;"
22:06 masak right.
22:06 masak how come it doesn't work?
22:06 diakopter get_hll_namespace or find_lex must do something different
22:07 PerlJam It works for alpha, so just run all unsafe operations through there ;)
22:08 masak anyway, I don't see a rakudobug in it, since the safemode thing is related to the evalbot, not to rakudo as such.
22:08 diakopter Safe.pm is in git
22:13 dalek rakudo: d0a4488 | duff++ | src/Perl6/Actions.pm:
22:13 dalek rakudo: Use &eager to Parcelize the statement modifier for loop
22:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​0a448868f175a395267a1e5a567a2cfd0f412a6
22:19 colomon > .say for "hello";
22:19 colomon hello
22:19 colomon \o/
22:20 PerlJam rakudo: .say for "greeble";
22:20 jnthn :-)
22:20 p6eval rakudo a11211: OUTPUT«g␤r␤e␤e␤b␤l␤e␤»
22:20 PerlJam I guess it does update every 30 minutes
22:21 jnthn :-/
22:21 jnthn S11's description of import is...confusing.
22:21 masak is it at least deconfusable?
22:21 jnthn I dunno.
22:22 jnthn It's changed since I last implemented tagging.
22:22 jnthn You can do stuff like:
22:22 jnthn sub foo is export(:tag1, :tag2) { ... }
22:22 jnthn Presumably so you can then import interesting groups of methods
22:22 masak nod.
22:22 mberends jnthn: when you work on 'use', could you work on 'require' (run time loading) as well, or is that too big an ask?
22:23 jnthn iirc you can then do like:
22:23 jnthn use ModuleWithFoo :tag1;
22:23 jnthn But I don't spot that in S11 now?
22:23 PerlJam std; need Foo;
22:24 PerlJam std: need Foo;
22:24 jnthn mberends: require's spec looks curious too :-)
22:24 p6eval std 30020: OUTPUT«Potential difficulties:␤  Can't locate module Foo at /tmp/Qx74YuKx3K line 1:␤------> [32mneed Foo[33m⏏[31m;[0m␤ok 00:01 106m␤»
22:24 mberends :-/
22:24 masak jnthn: I've been thinking a bit more about assignment and binding. would it be reasonable to describe these two operations as implicitly accessing some variable %pad in the runtime?
22:24 pugssvn r30021 | colomon++ | [t/spec] Unfudge test that now works, duff++.
22:24 jnthn "Importing via C<require> also installs names into the current lexical scope by
22:24 jnthn default, but delays the actual binding till runtime:
22:24 jnthn "
22:25 jnthn mberends: That is, it does a need at compile time but does binding into the lexpad a bit later, but still needs to know the symbols it will import ahead of time.
22:25 * mberends saw that too
22:25 jnthn That's kinda...not what I expected.
22:26 jnthn masak: I guess in binding, you're modifying the pad. In assignment, you're using the pad to look up some container, and then changing what's in the container.
22:26 masak right.
22:26 jnthn mberends: Is it what you expected?
22:26 masak rakudo: my $a := 42; say 42; $a = 5
22:26 wknight8111 joined #perl6
22:26 p6eval rakudo a11211: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16804 (src/builtins/Junction.pir:373)␤»
22:26 masak alpha: my $a := 42; say 42; $a = 5
22:26 p6eval alpha 30e0ed: OUTPUT«42␤»
22:27 masak ah, good old alpha.
22:27 masak alpha: my $a := 42; say $a; $a = 5; say $a
22:27 p6eval alpha 30e0ed: OUTPUT«42␤5␤»
22:27 jnthn I accidentally the assignment.
22:27 masak that's wrong, innit?
22:27 jnthn Yes.
22:27 masak good.
22:28 mberends jnthn: no. I expected something like 'use "$module";' to do DWIM at run time, somehow :-/
22:29 Tene mberends: not in master, unless that's been changed recently.
22:29 jnthn mberends: I don't see that working.
22:29 jnthn It won't even parse.
22:29 jnthn std: use "$module";
22:29 Tene std: my $foo = "Test"; use "$foo";
22:29 p6eval std 30020: OUTPUT«Undeclared routine:␤   'use' used at line 1␤ok 00:01 107m␤»
22:29 p6eval std 30020: OUTPUT«Undeclared routine:␤   'use' used at line 1␤ok 00:01 106m␤»
22:30 jnthn ...erm.
22:30 mberends indeed :-(
22:30 jnthn lta.
22:30 jnthn But I thought require could do that.
22:30 jnthn But as spec'd it...can't.
22:30 jnthn :-/
22:30 jnthn Well
22:30 jnthn We have commit bits.
22:30 mberends there goes my FakeDBI dream...
22:30 jnthn mberends: Change the require spec to something that does what you want, then I'll implement it.
22:31 jnthn The import syntax seems to be f**ked too. :-/
22:31 mberends I wish I knew how to spec it responsibly
22:31 jnthn That bit made some sense once.
22:32 jnthn I see just about zero use case for the way require is currently spec'd.
22:32 jnthn You may as well just use "use"
22:32 jnthn What is it you were particularly trying to do?
22:32 jnthn Load an appropriate DBD?
22:33 masak rakudo: my $module = 'Test'; eval "use $module"
22:33 p6eval rakudo a11211:  ( no output )
22:33 jnthn Well, there is that. :-)
22:33 masak rakudo: my $module = 'Test'; eval "use $module"; ok 1, "OH HAI"
22:33 p6eval rakudo a11211: OUTPUT«Could not find non-existent sub &ok␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:33 masak hm.
22:33 mberends jnthn: exactly. eval( "use $module" ) runs, but probably does almost nothing.
22:33 jnthn masak: Lexical import.
22:33 masak ah.
22:33 masak operative word being 'lexical' :)
22:36 jnthn mberends: Workaround:
22:37 jnthn Perl6::Module::Loader.need($name, {}); # XXX NON-SPEC HACK!!!
22:37 mberends heehee
22:37 masak rakudo: Perl6::Module::Loader
22:37 p6eval rakudo a11211:  ( no output )
22:37 masak ooh. :)
22:37 jnthn oh no
22:37 jnthn :-)
22:38 * masak rubs hands
22:38 masak what's the hash for? symbols?
22:38 jnthn Adverbs.
22:38 masak ah, 'course.
22:38 jnthn ver => 42
22:38 jnthn etc
22:39 jnthn For anyone curious, src/Perl6/Module/ is the module location/loading implementation.
22:39 jnthn It's in NQP
22:39 masak \o/
22:39 jnthn Which means that it should be rather more accessible than if it was in, say, PIR.
22:41 PerlJam NQP doesn't do backtracking control with :, ::, :::, and <cut> yet does it?
22:42 jnthn I don't think so
22:42 mberends jnthn: tried both modulename and modulename.pir, both give the error:
22:43 mberends get_pmc_keyed() not implemented in class ''
22:43 mberends current instr.: 'perl6;Perl6;Module;Loader;need'
22:43 jnthn oh. :-(
22:43 mberends oh, perl6;Perl6;
22:43 jnthn That's OK.
22:43 jnthn oh
22:43 jnthn I bet it's that adverbial hash.
22:44 jnthn Trouble is, it wants something Parrot-hashish
22:44 jnthn And our Perl 6 ones don't look like that yet.
22:44 mberends it's a pointer in the right hacky direction
22:44 jnthn If you change
22:44 jnthn method need($name, %name_adverbs) {
22:44 jnthn to
22:44 jnthn method need($name, %name_adverbs?) {
22:45 jnthn In Perl6/Module/Loader.pm
22:45 jnthn You may get away with that.
22:45 * mberends goes for it
22:45 jnthn It's all guts, so the interface is only sorta important.
22:45 jnthn (as in, we can revise it at will)
22:46 masak jnthn: containers (in the sense "a variable usually has one of those") can't be created in isolation, can they?
22:47 jnthn "in isolation"?
22:47 jnthn Array.new # omg container!
22:48 masak something like 'my $c = lol-create-container(); my $var := $c; # $var now points to the new container $x'
22:48 masak jnthn: no, I think I mean a scalar container.
22:48 jnthn my $c := omg-awesome-a-container-maker(); # may well work I guess.
22:48 masak ok.
22:49 masak feels like there's some sort of oddity there.
22:49 masak something in the area of the $b in '$a := $b' meaning 'the container in $b', not 'the symbol $b itself'.
22:50 jnthn Yes
22:50 masak just like the $b in '$a = $b' means 'the value in [the container in]? $b', rather than 'the symbol $b itself'.
22:50 jnthn In Rakudo $a = $b; really desugars to $a!STORE($b!FETCH)
22:50 masak oh, nice.
22:51 masak but both $a and $b are entries in some pad somewhere, no?
22:51 PerlJam Should we have Scalar just like we have Array anyway though?
22:51 PerlJam er, s/Should/Shouldn't/
22:52 masak PerlJam: we do.
22:52 PerlJam rakudo: Scalar.new
22:52 p6eval rakudo d0a448: OUTPUT«Could not find non-existent sub &Scalar␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:52 PerlJam rakudo: Array.new
22:52 p6eval rakudo d0a448:  ( no output )
22:52 masak PerlJam: the spec mentions it liberally.
22:52 PerlJam it's specced but not rakudoed
22:52 masak PerlJam: the type always seemed slightly odd to me, but people on a higher resonance plane assuer me that it's very important.
22:53 masak s/assuer/assure/
22:53 dalek rakudo: 0a0469e | duff++ | src/Perl6/Grammar.pm:
22:53 dalek rakudo: parse version and need
22:53 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​a0469ece218ee44a70b8424a40144541e77fb17
22:53 PerlJam I've got to go.  Talk to you guys later.
22:53 * PerlJam &
22:55 masak snarkyboojum: ping
22:55 snarkyboojum masak: pong :)
22:55 phenny snarkyboojum: 09 Mar 21:32Z <masak> tell snarkyboojum that all tests in Tardis pass now. \o/ -- time for the next iteration of spec/test/implementation... :)
22:55 masak snarkyboojum: what phenny said :)
22:55 snarkyboojum masak: you're too fast :) I've been checking your changes out - but haven't played with it much
22:56 snarkyboojum masak: life getting in the way ;)
22:56 masak snarkyboojum: I mostly need someone to bounce ideas with again. but I no rush -- let me know when it's convenient for you.
22:57 masak we prefer to push people to less than their breaking point here on #perl6 :)
22:57 snarkyboojum masak: sure thing.. I want to get my hands dirty as well tho :)
22:58 masak snarkyboojum: if you mean implementation, we'd need more tests first. I maded 10 tests, but I implemented them. :P
22:58 snarkyboojum masak: okydoke
22:59 masak snarkyboojum: I thought about maybe letting you do the interactive debugger part, the one where one actually queries the ticks and gets information about the variables. I think that might be quite a pleasant task.
22:59 snarkyboojum masak: I see - sounds juicy
23:01 snarkyboojum masak: off to the accountant - bb in a couple of hours if you're around
23:01 lue masak: if you need _ideas_ bounced around, that's me :D
23:01 masak snarkyboojum: I'll try to be back in eight hours or so.
23:02 snarkyboojum masak: excellent - speak to you later then
23:02 mberends jnthn: same error, need sleep srsly. goodnight &
23:02 TiMBuS joined #perl6
23:02 masak lue: great! I could outline an idea for a blog post about assignment and binding for you.
23:03 lue sure. I can do that. Just... where? :D
23:03 jnthn mberends: OK, catch me tomorrow
23:03 jnthn We;ll try and hunt it down.
23:03 jnthn Sleep well o/
23:03 masak lue: either here on-channel or in a privmsg booth.
23:03 mberends o/
23:03 masak mberends: 'night!
23:03 jnthn ETOOLATE
23:04 masak I happen to know mberends backlogs :)
23:04 lue ETOOMUCHKNOWLEDGE
23:04 lue EBACKLOGGING
23:04 jnthn ENEEDPIVO
23:05 masak :)
23:05 m6locks ELOL
23:05 arnsholt jnthn: Enjoying state monopoly on alcohol yet? =)
23:05 jnthn arnsholt: It seems to have its good points.
23:06 masak rakudo: my $a = 42; my $b = $a; say $b
23:06 p6eval rakudo d0a448: OUTPUT«42␤»
23:06 jnthn A whole wall of beer immaculately catergorized by type isn't something to complain about. :-)
23:06 masak lue: ok, so the above program is very simple. it's expressible in most programming languages.
23:07 lue a=b. Got It! ō\
23:07 masak lue: we can say something like "oh, there are two symbols called '$a' and '$b'. when we do '$b = $a;' we take the value associated with the symbol $a and assign the same value with the symbol $b."
23:08 masak lue: a bit dry, but a description that explains what's going on.
23:08 masak now, let's make that description collapse. :)
23:08 lue and a:=b would assign the same address in memory, correct?
23:09 masak I'm getting to that.
23:09 masak you have the right idea.
23:09 masak alpha: my $a; my $b := $a; $a = 42; say $b
23:09 p6eval alpha 30e0ed: OUTPUT«42␤»
23:09 masak note how we associate $b with $a before assigning 42 to $a.
23:10 masak note also the ':=' for binding and the '=' for assignment.
23:10 masak so the inevitable conclusion is that there are not TWO levels of abstraction -- symbols and their values -- but THREE levels: symbols, containers and values.
23:11 masak assignment, '=', digs down and assigns a new value to a container.
23:11 masak binding, ':=', digs down and assigns a new container to a symbol.
23:11 masak er, 'binds a new container to a symbol', I should say.
23:12 ShaneC joined #perl6
23:12 lue Alright. I'm wondering where to post this though (probably not my blog... :) )
23:12 masak oh, I meant that I'm planning a post. :)
23:12 lue ah :)
23:12 masak but if you want to post it, feel free.
23:12 masak then there's the little detail of some symbols binding directly to a value, skipping the container altogether.
23:12 masak rakudo: my $a := 42
23:12 p6eval rakudo 0a0469: OUTPUT«:= binding of variables not yet implemented␤current instr.: '&die' pc 16804 (src/builtins/Junction.pir:373)␤»
23:12 japhb pmichaud, ping
23:13 masak alpha: my $a := 42; say $a
23:13 p6eval alpha 30e0ed: OUTPUT«42␤»
23:13 lue I can draw some fancy diagrammy things :D
23:13 masak lue: aye, I had the same notion :)
23:13 masak containers are definitely small boxy thingies.
23:14 masak lue: anyway, binding may seem quirky and slightly unnecessary at first, until one realizes that that's exactly how arguments and parameters work.
23:14 masak alpha: sub foo($b is rw) { $b = 5 }; my $a = 42; foo($a); say $a
23:14 p6eval alpha 30e0ed: OUTPUT«5␤»
23:14 lue seemed perfectly normal to me :D
23:15 masak lue: yes, but you're notoriously used to Douglas Adams-like concepts already :P
23:15 masak binding essentially introduces action-at-a-distance.
23:18 masak also, there are a few things to say about typed variables.
23:18 masak one does typing on the symbol, but the checks are done against the container.
23:19 masak alpha: my Int $a = 5; my $b := $a; $b = 'OH HAI'
23:19 p6eval alpha 30e0ed: OUTPUT«Assignment type check failed; expected Int, but got Str␤in Main (file <unknown>, line <unknown>)␤»
23:19 masak that's the type constraint of $a giving an error for an assignment to $b, since they both share the same container.
23:20 masak in other words, when assigned to, a container must do a
23:20 masak number of checks 'inherited' from the symbols associated with it.
23:22 lue = is a copy machine, := is a sharer. That good enough of a description? :D
23:22 masak it's very pretty.
23:23 masak there are some subleties having to do with scalars which make the 'copy machine' part a simplification. but you definitely got the right idea.
23:23 lue It's a lead-in, at least :)
23:23 masak also, I found a bug in alpha's treatment of binding and types.
23:23 masak alpha: my Str $a; my Int $b := $a; my $c := $b; $c = "HAI"; say $b
23:23 p6eval alpha 30e0ed: OUTPUT«HAI␤»
23:24 am0c joined #perl6
23:24 ShaneC joined #perl6
23:24 masak since $a, $b, and $c all point to the same container, it shouldn't be able to contain a non-Int.
23:24 masak skipping the $c makes the error show up.
23:25 masak alpha: my Str $a; my Int $b := $a; $a = "HAI"; say $b
23:25 p6eval alpha 30e0ed: OUTPUT«HAI␤»
23:25 masak hm. or not.
23:25 lue nope :D
23:25 masak it's simply broken.
23:25 lue Maybe alpha gets messed up and $c is bound to $b, and not going further along the chain to $a
23:25 jnthn I could argue it's complicatedly broken.
23:25 masak jnthn: :)
23:26 masak unfortunately, I have to wait for rakudo master to implement binding before I can submit this bug. :)
23:27 jnthn \o/
23:27 jnthn guess what I haz?
23:27 jnthn > module Foo { sub bar() is export { say "beer" } }
23:27 jnthn > { import Foo; say "inner"; bar(); }; say "outer"; bar();
23:27 jnthn inner
23:27 jnthn beer
23:27 jnthn outer
23:27 jnthn Could not find non-existent sub &bar
23:27 lue what, you can't submit a future potential bug!? O.o
23:27 patspam joined #perl6
23:27 masak jnthn: \o/
23:27 jnthn need also works. :-)
23:28 masak lue: no, not without a time-travelling bug tracker :)
23:28 masak rakudo: class Foo { has %.bar; }; my $f = Foo.new; say $f.bar.WHAT
23:28 p6eval rakudo 0a0469: OUTPUT«Hash()␤»
23:28 jnthn I fixed that one. :-)
23:28 masak oh cool, that was a bug a day or so ago. :)
23:28 masak jnthn++
23:28 jnthn I *think* we got a test for it too.
23:28 masak rakudo: @_.=[3]
23:28 p6eval rakudo 0a0469: OUTPUT«Method '!postcircumfix:<[ ]>' not found for invocant of class 'ResizablePMCArray'␤current instr.: '!dispatch_.=' pc 440 (src/glue/dispatch.pir:118)␤»
23:29 masak was that one submitted?
23:29 masak it's a diakopterbug.
23:29 lue it can't be! (horrid pun, I know)
23:30 masak maybe I'm slow, but I don't immediately see the pun...
23:30 jnthn Not sure on submitted, but it looks familiar.
23:30 * masak submits rakudobug
23:30 * jnthn spectests.
23:30 lue it=@_ (very obsure i must say)
23:30 jferrero joined #perl6
23:31 jnthn OK, so today I got employed and beer, and Rakudo got lexical import and need and initial import keyword support.
23:31 jnthn A good day all in all.
23:31 masak lue: yes, I'd probably associate '$_' with 'it', but not '@_'...
23:32 masak jnthn: yay!
23:32 lue isn't @_ it as well, but in array format?
23:32 masak well, @_'d have to be 'them' :)
23:32 masak and it's not really as topical-y as $_ is.
23:32 lue jnthn: we salute ye! ō\ (this is why you get an omnisub jnthn :) )
23:32 lue how's about @_ apples? :P
23:33 masak :D
23:33 lue then what's %_
23:33 jnthn OH, just take "it" and pluralize to get "its". :-)
23:33 masak that's 'named them'.
23:33 jnthn oh yeah
23:33 masak jnthn: you're evil :)
23:33 jnthn :-)
23:34 jnthn Tomorrow I'll try and get us not to have to pre-compile to PIR.
23:34 masak rakudo: @_[3]
23:34 p6eval rakudo 0a0469:  ( no output )
23:34 jnthn I'm pondering going the whole hog and checking the modification times and ignoring the .pir if the .pm is newer.
23:34 ShaneC joined #perl6
23:34 jnthn Then some enterprising soul (Friday jnthn?) just gotta implement the automatic re-compilation to PIR.
23:34 masak jnthn: that would save a lot of masak confusion in the heat of coding.
23:35 jnthn If anyone fancies writing a few tests for need and import, that would be cool.
23:35 masak I'm still a tad uneasy about automatic (re-)compilation, for some reason.
23:35 masak can't really put my finger on it, so I'll pipe down.
23:36 jnthn In that case, maybe it's important we do have an implementation, so your finger can find its place. :-)
23:36 CokeGod we're going to have to recompile it anyway.
23:36 CokeGod yes? just a question of whether or not to render it on disk?
23:36 masak jnthn: aye, I think so. maybe I'm just superstitious in this case.
23:36 lue .oO(I defy CokeGod! I only trust PepsiGod!)
23:37 jnthn masak: I'll suppress the feature on Friday 13th and we'll write the file in the color red.
23:37 lue I've written things in the color bitter before :)
23:37 jnthn CokeGod: Yeah, with the slight issue that we may not have the ability to write, so need to be ready to fail.
23:37 masak CokeGod: I'm thinking more something along the lines of a module being loaded at runtime in a directory where there are no write permissions, and the program failing because it can't write the .pir file to disk. or something.
23:38 jnthn Well, not to fail.
23:38 masak jnthn: ColorPerl6. :)
23:38 jnthn But to just work anyway.
23:38 jnthn I figure if we compile to PIR, we can then try and write to disk regardless, and then eval it and run it.
23:39 jnthn And if the write fails, it's no real waste.
23:39 masak nod.
23:39 jnthn I expect the installer will pre-compile modules in read-only locations.
23:39 masak I'm less worried now.
23:39 jnthn :-)
23:41 * jnthn is enjoying hacking on Rakudo :-)
23:42 lue jnthn: that was a few days ago :)
23:42 jnthn No no, I'm still enjoying it. :-)
23:43 * lue ought to code that converter to find out when jnthn day is :)
23:47 eternaleye joined #perl6
23:48 alester joined #perl6
23:50 lue .oO(We are now at arity-2 activity levels :) )
23:52 masak ok, I decided to simplify the SIC code somewhat.
23:53 masak now it's just 'fetch' and 'store' instructions.
23:53 masak http://github.com/masak/tar​dis/blob/master/docs/plans
23:53 jnthn The errors in that document make me [SIC]
23:53 masak that should take care of the "don't know whether there's a container in there" problem.
23:53 masak yay, the first SIC pun! :)
23:53 masak was looking forward to that.
23:56 lue s/[SIC]/\u0000/ #I sed not to use puns :)
23:56 jnthn That was a bit of an awkward pun.
23:57 lue don't you mean AWKward? (oh man, raocowing the puns like it was no thing!)
23:59 masak also, 'sed' is Latin for 'but', which is mildly appropriate.
23:59 jnthn oh, cute.

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

Perl 6 | Reference Documentation | Rakudo