Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-11-16

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:00 muixirt need sleep, bye
00:00 muixirt left #perl6
00:00 masak blog post! http://strangelyconsistent.org/blog/november-15-2010-taking-charge-and-getting-stuff-done
00:03 huf i love your unrelated bits of history
00:04 huf are you living in china or studying chinese or what's the apropo?
00:04 masak the latter.
00:05 masak Chinese history basically made me appreciate history :)
00:06 diakopter Tene: "There's nobody involved in Perl 6 right now that believes that they can reimplement everything required better, more-accurately, and more-performantly than current VM offerings on the same time-scale as getting a more-complete Perl 6."
00:06 diakopter Tene: but I thought that's what Parrot ....
00:06 diakopter (or even reducing "better, more-accurately, and more-performantly" to "as good, as accurately, and as performantly")
00:07 donaldh left #perl6
00:07 XaRDaX left #perl6
00:08 hercynium left #perl6
00:08 diakopter Tene: or were you seriously considering Parrot in "current VM offerings"?
00:09 masak seven years, and Parrot *still hasn't been released*! :P
00:09 diakopter ... seeing as how (if I understand correctly) it's all back to the drawing board, throwaway except in the minds of the new rewriters?
00:10 masak diakopter: as opposed to how Rakudo has been progressing? :)
00:10 diakopter touche (implicit accent)
00:10 masak ng in 2009-2010, jnthn's doing 6model now...
00:11 masak TGE, nqp, nqp-rx...
00:12 masak seems all we do around here is write and rewrite things until we get proficient at it.
00:12 diakopter well, I was really only referring to the nascent lorito, not the progress of parrot the past 7(-10?) years
00:13 justatheory left #perl6
00:13 masak it's like those Zen gardens where the gardener softly bends branches until they get the right shape. except we're bending ourself until we get the right model mindset to implement things right.
00:13 masak "plan to throw 3 or 4 away"
00:14 diakopter "plan to throw n-1 away"
00:14 masak :D
00:14 masak that's a tautology!
00:14 diakopter so's a tautology!
00:18 masak "There's such a mind-numbing lack of competence in any IT field that you don't have to be brilliant to be extraordinary, and you don't have to excel to deliver consistently high quality." -- http://www.xach.com/naggum/articles/3169377456998126@naggum.no.html
00:18 cotto_work diakopter: I'll become cotto in an hour or so if you'll be around to continue our conversation.
00:18 masak I find there's more than a grain of truth in this quote.
00:18 masak cotto_work: if diakopter won't be around, will you remain at work? :)
00:18 cotto_work yes
00:19 masak oh :)
00:19 cotto_work I'm really hoping he's around.
00:19 dukeleto masak: That quote is especially true in academia. You would think these people would know something. But they don't.
00:19 cotto_work ;)
00:19 diakopter cotto_work: I'm 'round
00:19 thundergnat joined #perl6
00:19 masak dukeleto: I know what you mean. I'm in it, too.
00:20 masak dukeleto: it's only when you find good scientific papers/articles that you realize how bad the rest really were.
00:20 cotto_work If you can't dazzle them with your brilliance...
00:21 stkowski left #perl6
00:21 Tene diakopter: I didn't really use enough context there.  That was part of an answer to muixirt about why we use VMs.  There's nobody sufficiently ... [such that they're working on rewriting Rakudo to emit x86 machine code and not use an existing VM].
00:23 Chillance left #perl6
00:23 diakopter Tene: but see my followup question
00:23 dukeleto I think VM's are sufficiently complex that a single person does not have any hope doing it themselves, unless they want to spend a lifetime.
00:24 thundergnat Hi #perl6.
00:24 dukeleto thundergnat: welcome!
00:24 Tene diakopter: muixirt was saying "VMs are bad; why don't you just emit x86 machine code and leave out the VM."  Parrot is a VM, so anyone working on Parrot doesn't count for what muixirt was asking.
00:25 thundergnat Non -interdependent modules shouldn't care about their load order in a script should they?
00:25 Tene thundergnat: that sounds right.
00:26 thundergnat I'm getting a bizarre error if I change the load order of two completely independent modules.
00:26 sftp left #perl6
00:26 Tene thundergnat: what error?
00:26 risou joined #perl6
00:27 masak hi thundergnat.
00:27 masak thundergnat: I've had such errors as well.
00:27 masak there's at least one (still open) bug report in RT about it.
00:27 thundergnat For my module Sort-Naturally https://github.com/thundergnat/Sort-Naturally in the test file t/01-basic.t, if i change the order of "use Sort::Naturally; and "use Test;" It basically doesn't load my module.
00:28 thundergnat fails all tests
00:28 masak huh.
00:28 * masak tries
00:28 thundergnat tested on both windows XP and ubuntu linux
00:29 masak ah; here was the one I was thinking of: http://rt.perl.org/rt3/Ticket/Display.html?id=65738
00:29 masak see if it's similar...?
00:29 diakopter Tene: so, you were including Parrot in "current VM offerings".  I honestly don't see how that's a supportable claim, given the pending total rewrite of parrot (again, iiuc).
00:29 jedai left #perl6
00:30 thundergnat masak: looking...
00:30 risou left #perl6
00:30 Tene diakopter: Are any parrot people working on a Perl 6 compiler that emits x86 machine code?
00:31 dukeleto Tene: not that I know of.
00:32 Tene diakopter: If not, I stand by my edit, "... such that they're working on rewriting Rakudo to emit x86 machine code ..."
00:32 diakopter Tene: not that I know of, but I don't follow your argument above about your response to muix
00:33 thundergnat masak: Hmm. I'm not sure if its the same issue or not. I'm not overriding core functions (though I am MONKEY_TYPING).
00:34 diakopter Tene: after re-re-re-re-reading, I think I see what you're saying
00:34 masak thundergnat: ran test file unmodified. everything passes.
00:34 masak making prescribed change now.
00:35 Tene diakopter: "<muixirt> VMs suck! Do it without a VM!" "<tene> I guess maybe? Nobody here agrees enough with you that they're working on Perl 6 without a VM."
00:35 Tene That's all I meant.  Perhaps a spoke poorly.
00:35 masak thundergnat: now it passed two tests and then "Could not find sub &nsort"
00:35 diakopter no, I did understand you correctly
00:36 masak thundergnat: either way, I would definitely say you have a bug here.
00:36 thundergnat Yeah, thats what I'm seeing.
00:36 masak thundergnat: care to report it?
00:36 thundergnat I'm not sure how small a test case I can golf that down to though.....
00:37 masak I'm on it right now :)
00:39 pmb left #perl6
00:41 impious left #perl6
00:41 masak I'm getting odd results. lib/Sort/Naturally.pm6 compiles fine when I remove everything after the 'augment class Any' block, but t/01-basic.t dies with a parse error. (even an unmodified t/01-basic.t)
00:41 masak I can't make sense of that.
00:42 thundergnat I don't guarantee that I haven't done something completely insane.
00:43 masak no, it looks ok.
00:43 masak thundergnat++
00:46 masak thundergnat: btw, you've got "conceivably" right, but seem to consistently misspell "yields".
00:46 thundergnat masak: sigh
00:47 masak I'm still stumped as to what causes the syntax error. seems to be something on the next line, but beyond that, I don't know.
00:47 masak oh! must be the operator.
00:47 masak right. I can't just remove that from the .pm file. silly me.
00:52 masak thundergnat: I have it golfed now. hang on.
00:53 masak thundergnat: https://gist.github.com/701261
00:55 QinGW joined #perl6
00:57 mikehh joined #perl6
00:59 mikehh ok how do you build rakudo with the latest parrot release - it reports ===SORRY!=== Parrot revision RELEASE_2_9_1-261-g495feaf required (currently RELEASE_2_9_1-273-gae3500c)
00:59 masak that looks... wrong. :/
01:00 mikehh I used perl Configure.pl --parrot-config=/home/mhu/install/lib/bin/parrot_config
01:00 masak mikehh: Parrot recently moved over to git, and Rakudo's configure systems were changed even more recently to accomodate for this.
01:01 masak from what you're saying, I think there's a bug somewhere.
01:01 thundergnat masak: sorry, afk for a bit; Cool I'll go ahead and submit that if you haven't already
01:01 masak thundergnat: yes, please do.
01:01 masak mikehh: moritz_, who's the one likely to know more about this, went to bed about two hours ago.
01:03 mikehh masak: yeah, I should too, but will check with him later
01:05 mikehh masak: was testing parrot for the release on the morrow, but thought I would check rakudo and it gave me that problem
01:06 masak mikehh: thanks for checking.
01:06 masak I'm glad to hear about this too, since I'm the release manager for Rakudo on Thursday :)
01:06 * masak heads to bed
01:06 Tene 'night
01:06 masak 'night, #perl6!
01:06 thundergnat night masak, thanks
01:06 mikehh cu, mee too
01:07 masak oh, right "n8" in German would be "nacht". that makes even more sense.
01:07 masak n8 :)
01:07 masak left #perl6
01:11 jedai joined #perl6
01:13 rgrau left #perl6
01:24 knewt2 left #perl6
01:40 thundergnat left #perl6
01:52 colomon ping jnthn
02:01 Teratogen left #perl6
02:09 Teratogen joined #perl6
02:10 knewt2 joined #perl6
02:15 jaldhar left #perl6
02:16 jaldhar joined #perl6
02:33 molaf_ joined #perl6
02:33 mariano left #perl6
02:34 ch3ck3r joined #perl6
02:37 molaf left #perl6
02:39 ch3ck left #perl6
02:39 colomon phenny: tell jnthn nqp-rx / nom branch has spaces where there should be tabs in Makefile.in, then fails during the build.  suggestions?
02:39 phenny colomon: I'll pass that on when jnthn is around.
02:43 cdarroch left #perl6
02:57 meppl left #perl6
03:05 mindos1 left #perl6
03:15 whiteknight left #perl6
03:18 Alias joined #perl6
03:22 leprevost joined #perl6
03:27 masonkramer joined #perl6
03:37 kanishka joined #perl6
03:43 kanishka left #perl6
04:01 leprevost left #perl6
04:02 _xiaomo_ joined #perl6
04:05 justatheory joined #perl6
04:15 kanishka joined #perl6
04:18 _xiaomo_ left #perl6
04:18 _xiaomo_ joined #perl6
04:19 kanishka left #perl6
04:32 nymacro joined #perl6
04:36 _xiaomo_ left #perl6
04:37 sorear good * #perl6
04:37 phenny sorear: 15 Nov 13:34Z <PhatEddy> tell sorear to check back here in irc when he has chance ... http://irclog.perlgeek.de/perl6/2010-11-15#i_2995501
04:39 araujo left #perl6
04:45 kanishka joined #perl6
05:01 breinbaas left #perl6
05:01 breinbaas joined #perl6
05:12 masonkramer left #perl6
05:16 dalek niecza: c135903 | sorear++ | / (4 files):
05:16 dalek niecza: Implement @*ARGS
05:16 dalek niecza: review: https://github.com/sorear/niecza/commit/c135903bee53c377989994c3aee49a563531945d
05:16 sorear I hear masak cannot write apps with my dialect
05:16 sorear this needs to be fixed
05:18 kaare joined #perl6
05:18 kaare is now known as Guest20775
05:23 huf left #perl6
05:25 huf joined #perl6
05:37 crythias left #perl6
05:45 rbuels left #perl6
05:45 __rnddim__ joined #perl6
05:45 hugme left #perl6
05:45 kaare joined #perl6
05:46 kaare is now known as Guest36181
05:47 Lorn left #perl6
05:47 Lorn joined #perl6
05:48 Guest20775 left #perl6
05:49 lue left #perl6
05:50 nymacro left #perl6
06:04 __rnddim__ is now known as lue
06:09 dalek niecza: 3483ebc | sorear++ | v6/tryfile:
06:09 dalek niecza: [v6] Add command line processing to tryfile
06:09 dalek niecza: review: https://github.com/sorear/niecza/commit/3483ebccf6f1328b18fd18310ffa12e293981b15
06:13 agentzh joined #perl6
06:21 dalek rakudo: f73bf4d | moritz++ | Configure.pl:
06:21 dalek rakudo: fix comparison logic thinko in Configure.pl, mikehh++
06:21 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/f73bf4d0b980b27384452ca7aacba347ecfe6815
06:22 perigrin left #perl6
06:23 perigrin joined #perl6
06:37 cjk101010 left #perl6
06:37 colomon left #perl6
06:41 bartolin left #perl6
06:41 bartolin joined #perl6
06:49 sorear good news: mono tryfile.exe CORE.setting starts
06:49 sorear bad: it leaks memory.  A lot.  And it doesn't finish.
06:50 dalek niecza: 21f2eac | sorear++ | lib/Cursor.cs:
06:50 dalek niecza: Instrument Cursor to dump highwater movement
06:50 dalek niecza: review: https://github.com/sorear/niecza/commit/21f2eac536f8bc49290004e4a3584a257719427d
06:51 sorear ... or, for that matter, make much progress.
06:56 wtw joined #perl6
07:12 ggoebel left #perl6
07:15 spinclad left #perl6
07:19 dalek nqp-rx: c4c31a1 | moritz++ | / (2 files):
07:19 dalek nqp-rx: [configure] fix two thinkos
07:19 dalek nqp-rx: review: https://github.com/perl6/nqp-rx/commit/c4c31a13b51ee6df80b7214afb21f5e2b4236940
07:22 ch3ck3r moins3n
07:23 dukeleto left #perl6
07:24 ch3ck3r left #perl6
07:25 ch3ck joined #perl6
07:27 starcoder left #perl6
07:29 dukeleto joined #perl6
07:30 starcoder joined #perl6
07:30 araujo joined #perl6
07:30 araujo left #perl6
07:30 araujo joined #perl6
07:32 Guest36181 is now known as kaare_
07:33 sorear there's probably a better tool than 'less' for studying 0.9GB log files
07:34 dukeleto sorear: cat ?
07:35 dukeleto sorear: are you searching for a regex?
07:35 dukeleto sorear: ack usually makes life happier
07:37 jfried joined #perl6
07:56 ch3ck left #perl6
08:01 colomon joined #perl6
08:01 cjk101010 joined #perl6
08:05 sorear dukeleto: I'm more doing "interactive exploration"
08:06 sorear and ack can't handle corpuses larger than 10-100 MB or so without becoming unusably slow
08:06 sorear this one is 875 MB
08:10 sorear niecza-compiled STD is falling into an infinite loop but I'm not quite sure *where*
08:11 justatheory left #perl6
08:27 kjeldahl joined #perl6
08:27 Raynes left #perl6
08:28 Raynes joined #perl6
08:28 satyavvd joined #perl6
08:34 dalek niecza: 29ec560 | sorear++ | lib/Kernel.cs:
08:34 dalek niecza: Add a *very* primitive statistical profiler
08:34 dalek niecza: review: https://github.com/sorear/niecza/commit/29ec5608f050336e842296df4dab4ced8c3375cb
08:36 sorear profiling++
08:37 sorear without this, I would never have noticed the actual problem
08:37 sorear I somehow managed to write an O(2^n) implementation of Cursor.lineof
08:38 moritz_ wow
08:38 moritz_ that's... scary
08:41 icwiener joined #perl6
08:41 bbkr left #perl6
08:42 Trashlord joined #perl6
08:55 tzhs joined #perl6
09:02 Woodi left #perl6
09:11 kanishka left #perl6
09:11 icwiener left #perl6
09:16 Woodi joined #perl6
09:19 icwiener joined #perl6
09:24 mikehh_ joined #perl6
09:26 mikehh left #perl6
09:29 kanishka joined #perl6
09:31 dalek niecza: 9912342 | sorear++ | v6/tryfile:
09:31 dalek niecza: [v6] Stop runaway backtracking in Cursor.lineof
09:31 dalek niecza: review: https://github.com/sorear/niecza/commit/991234213be0740e3dd66ecd6f922a9644e91567
09:31 dalek niecza: 7b487ef | sorear++ | v6/tryfile:
09:31 dalek niecza: [v6] Fix readonly value assignment in package_def
09:31 dalek niecza: review: https://github.com/sorear/niecza/commit/7b487efe119b8f42a406f3584b9b50e6adf1d64b
09:43 jnthn colomon: Use a version of make that doesn't care. ;-) Alternatively, replace the spaces with tabs. (Let me know if you don't have an nqp-rx commit bit.)
09:43 phenny jnthn: 02:39Z <colomon> tell jnthn nqp-rx / nom branch has spaces where there should be tabs in Makefile.in, then fails during the build.  suggestions?
09:46 moritz_ jnthn: should I give everybody with a mu commit bit also access to nqp-rx?
09:47 jnthn moritz_: I don't think so - or at least, not without asking pmichaud
09:48 moritz_ ok
09:48 moritz_ I just added colomon++
09:48 jnthn Anyone with a Rakudo commit bit is certainly fine though.
09:48 jnthn moritz_++
09:48 moritz_ I can't easily tie the two together, because rakudo has another account
09:50 sorear Should all people who have nqp-rx commit bits have them for Rakudo?
09:50 jnthn No, nqp-rx has a more liberal commit policy than Rakudo.
09:50 jnthn Just that anyone who's trusted enough to have a Rakudo commit bit is certainly trusted enough to have an nqp-rx one :)
09:51 dalek roast: e0961ad | moritz++ | S (4 files):
09:51 dalek roast: unfudge some tests for rakudo, including tests for RT #64474
09:51 dalek roast: review: https://github.com/perl6/roast/commit/e0961ade887dad732a26217324f57f23aa8b2014
09:52 sorear S (4 files)
09:52 sorear hehehe
09:52 sorear how is roast going to look in the future, once niecza is running spectests?
09:53 moritz_ sorear: it'll probably have #?niecza markers too
09:53 moritz_ just like it pugs and rakudo markers for some time
09:54 sorear yes, but
09:54 sorear there's currently nothing like a ROAST_REVISION
09:54 sorear so if I add new tests, rakudo will break
09:55 moritz_ you can be so kind to add them as skipped for rakudo
09:55 moritz_ or you just break rakudo, and some rakudo devs fudge it
09:56 sorear would there be a general rule that new roast tests get fudges for all other major implementations?
09:56 sorear well, implementations that care
09:56 moritz_ I guess we'll just see how it works out, and deduct rules when it seems necessary
09:57 sorear good plan
09:57 moritz_ I don't expect huge edit wars, or an exponential growth of number of perl 6 compilers :-)
09:57 sorear hehehe.
09:59 sorear RT79242 is wtf-y
10:00 moritz_ indeed
10:03 QinGW left #perl6
10:08 rindolf joined #perl6
10:08 rindolf PackFile_unpack: This Parrot cannot read bytecode files with version 9.1. ==> what should I do about it?
10:08 rindolf Hi all, BTW.
10:09 moritz_ rindolf: remove the old parrot, and all files it generated
10:09 moritz_ and compile a new one instead
10:10 sorear that includes all files it installed
10:10 moritz_ and go to #parrot and complain that their packfile format is incompatible across parrot versions (they know, but a bit of complaining helps to remind them that it's annoying for the end user)
10:10 sorear go to #parrot and complain that their handling of installing into /usr/local is utterly broken
10:11 sorear I've given up on having Parrot in the default $PATH at this point
10:11 * moritz_ installs into parrot_install dir that he can easily nuke, and only symlink parrot_install/bin/perl6 into ~/bin
10:12 sorear that works?  impressibe
10:13 moritz_ it works as long as the install location is known at configure time
10:14 ddwagnz joined #perl6
10:15 ddwagnz left #perl6
10:15 rindolf moritz_: I did Rakudo perl Configure.pl --gen-parrot.
10:15 rindolf moritz_: it should have installed everything into parrot_install
10:16 moritz_ rindolf: right. Then you might need to rm -rf parrot_install; make realclean
10:16 rindolf moritz_: make realclean where?
10:16 moritz_ in rakudo
10:16 moritz_ and since your parrot copy is probably still svn, rm -rf parrot/  too
10:17 rindolf moritz_: I already have a fresh git checkout there.
10:17 moritz_ then you don't need that step.
10:17 rindolf moritz_: in ./parrot/ I mean.
10:17 Trashlord hi rindolf
10:18 rindolf Hi Trashlord
10:18 sorear hello
10:18 sorear when in doubt, git clean -dxff
10:18 Trashlord I gotta go to work at 2pm to replace someone
10:18 rindolf Trashlord: ah.
10:18 Trashlord yeah, kinda sucks, but oh well, it's only for like 2 hours or so
10:18 moritz_ Trashlord: when is the last time you contributed something Perl 6 related to this channel?
10:19 sorear how very uncharacteristic of you
10:19 sorear didn't you write a hugbot once?
10:19 rindolf There's a Perl 6 lecture today by szabgab as part of http://www.lambda.org.il/
10:20 Trashlord moritz_: I think a few months ago
10:20 moritz_ Trashlord: please try to keep your signal/noise ratio high
10:21 moritz_ well, raise it, it's not high at the moment :-)
10:21 dakkar joined #perl6
10:22 Trashlord moritz_: alright then
10:23 sftp joined #perl6
10:33 * sorear is trying to implement .comb and running into "a" !~~ /./
10:33 moritz_ huh?
10:33 moritz_ your . seems pretty selective
10:33 sorear some kind of deep brokenness
10:33 sorear I had a bug the other day where . wouldn't match unassigned codepoints
10:35 mavrc joined #perl6
10:47 timbunce joined #perl6
10:48 sorear niecza: for [1,2,3] -> $x { say $x.dump }
10:48 p6eval niecza 7b487ef: OUTPUT«1␤2␤3␤»
10:48 moritz_ niecza: for (1,2,3) -> $x { say $x.dump }
10:48 p6eval niecza 7b487ef: OUTPUT«1␤2␤3␤»
10:48 moritz_ the latter is correct, the former not
10:49 dalek niecza: cbbbd07 | sorear++ | src/Op.pm:
10:49 dalek niecza: Fix for loops ignoring argument flattiness
10:49 dalek niecza: review: https://github.com/sorear/niecza/commit/cbbbd077ada488a496bf90726612250109f31e1f
10:49 moritz_ rakudo: for [1, 2, 3] -> $x {say $x }
10:49 p6eval rakudo 015d77: OUTPUT«1 2 3␤»
10:49 sorear yeah
10:49 sorear that was the actual bug
10:49 sorear a loop in .comb was stripping off too many levels of listiness
10:50 sorear /./ returns a single match with no positional captures, it's sort of like []
10:50 sorear previous versions of the regex engine returned ([],) instead, but I've optimized that... exposing the for bug
10:55 dalek niecza: 6ca0209 | sorear++ | test3.pl:
10:55 dalek niecza: Add a prototype of Cool.comb
10:55 dalek niecza: review: https://github.com/sorear/niecza/commit/6ca0209f666e78bd0aaaf75dad69e866d2ad8591
10:55 dalek niecza: 78407bb | sorear++ | v6/tryfile:
10:55 dalek niecza: [v6] Add enum support
10:55 dalek niecza: review: https://github.com/sorear/niecza/commit/78407bb2a7fb96f41f7074a495483966539fca82
11:00 meppl joined #perl6
11:05 mavrc left #perl6
11:05 mavrc joined #perl6
11:10 sorear niecza: my %h; %h<a> = (%h<a> = 5)
11:10 p6eval niecza 7b487ef: OUTPUT«Unhandled exception: Autovivification collision␤  at  line 650 (SAFE extend @ 15)␤  at  line 731 (SAFE G506ANONC @ 6)␤  at  line 0 (Assign @ 1)␤  at  line 1 (MAIN mainline @ 5)␤  at  line 954 (SAFE G818ANONC @ 5)␤  at  line 954 (SAFE module-SAFE @ 28)␤  at  line 954 (SAFE
11:10 p6eval ..mainline …
11:10 moritz_ rakudo: my %h; %h<a> = (%h<a> = 5); say %h.perl
11:10 p6eval rakudo 015d77: OUTPUT«{"a" => 5}␤»
11:10 * moritz_ wouldn't be surprised if rakudo blew up too
11:11 sftp_ joined #perl6
11:11 sftp left #perl6
11:12 sorear rakudo doens't blow up because rakudo is missing an internal sanity check
11:12 sorear only, now that STD has hit it I wonder if it may be me that is insane
11:12 moritz_ what makes you think that it's missing a check?
11:12 sorear in that expression, both instances of %h<a> are evaluated before either assignment
11:13 sorear they both create independant variables with WHENCE closures to slot themselves in
11:13 sorear my WHENCE closures check that nobody else has put in a value in the meantime
11:13 moritz_ rakudo: my %h; %h<a> = 2 *(%h<a> = 5); say %h.perl
11:14 p6eval rakudo 015d77: OUTPUT«{"a" => 10}␤»
11:14 moritz_ seems pretty correct to me
11:14 sorear rakudo: my %h; %h<x> += (%h<x> = 5); say %h.perl
11:14 p6eval rakudo 015d77: OUTPUT«{"x" => 5}␤»
11:14 moritz_ seems correct too
11:16 moritz_ as long as there's no user visible misbehavior, I maintain that rakudo is correct here
11:17 sorear rakudo: my %h; sub foo(\$x) { %h<a> = 5; $x++ }; foo(%h<a>); say %h.perl
11:17 p6eval rakudo 015d77: OUTPUT«{"a" => 1}␤»
11:18 moritz_ sorear: please put those in the test suite
11:18 sorear moritz_: what's correct?
11:18 moritz_ so far they all looked correct to me
11:18 sorear even the last one?
11:18 moritz_ wait, no
11:19 daxim joined #perl6
11:19 moritz_ hm
11:19 moritz_ not sure
11:19 sorear the issue is Perl 6's lazy autovivification
11:19 moritz_ it creates a new autovivification closure
11:19 sorear %h doesn't know about $x
11:19 sorear so %h<a> = 5 sets a new slot, not the nascent one in $x
11:20 moritz_ then $x++ is correct to store 1 in %h<a>, no?
11:20 moritz_ or should it know about the 5?
11:21 moritz_ after double confusion, I think that 1 might be correct
11:21 sorear that's the problem - I don't know
11:21 sorear 1 is the easy answer
11:21 moritz_ but I'm not sure either
11:21 sorear but not the POLS one
11:22 moritz_ well, POLS does conflict with many optimizations, and Perl has traditionally had a balanced view on how to chose (and not always in favor of POLS)
11:27 dalek niecza: 1f49178 | sorear++ | v6/tryfile:
11:27 dalek niecza: [v6] Add trait parser
11:27 dalek niecza: review: https://github.com/sorear/niecza/commit/1f49178dfc44b24467d9f94ef192721a62d4bd16
11:27 ggoebel joined #perl6
11:30 dalek niecza: 40ac1ca | sorear++ | v6/tryfile:
11:30 dalek niecza: [v6] Removed a sanity check that did more harm
11:30 dalek niecza:
11:30 dalek niecza: %hash<key> = (%hash<key> = 5) is now accepted, despite being on
11:30 dalek niecza: somewhat shaky ground in S09.  Some other variations violate POLS;
11:30 dalek niecza: see http://irclog.perlgeek.de/perl6/2010-11-16#i_2998697 .
11:30 dalek niecza: review: https://github.com/sorear/niecza/commit/40ac1ca89d1923f31e542c59c5ad35ca67440a6b
11:31 jedai left #perl6
11:36 ch3ck joined #perl6
11:36 * sorear calls it a night
11:39 rindolf left #perl6
11:43 satyavvd left #perl6
11:50 colomon jnthn: I wasn't clear, sorry.  I fixed the makefile problem, then the build failed afterward.
11:51 masonkramer joined #perl6
11:56 jedai joined #perl6
12:04 colomon and then I cleverly blew away the entire directory instead of keeping it around so I could send you the problem  :\
12:05 colomon I'll try to start again after my walk this morning.
12:15 sftp_ left #perl6
12:18 jnthn colomon: ah, ok
12:18 jnthn Would need to see how it failed
12:18 jnthn Maybe some *nix silliness. :)
12:19 colomon yeah, of course.  I apologize for not thinking to save the directory.  (I tried to merge latest nqp-rx and failed, then blasted it to get ready of git-messiness)
12:21 moritz_ colomon: fwiw you now have a commit bit to nqp-rx
12:21 colomon moritz_++
12:21 colomon github actually let me know.
12:22 colomon (and I saw it in the backlog, too.)
12:27 colomon off to walk.
12:27 masak joined #perl6
12:27 masak oh hai, #perl6!
12:27 colomon but, err... you installed a curling app on my phone?!
12:28 jnthn yayitsmasak!
12:28 orafu left #perl6
12:28 orafu joined #perl6
12:28 colomon wow, big time wrong window there.
12:29 colomon masak has not touched my phone.  :)
12:29 moritz_ lolitsmasak!
12:29 masak colomon: I'm glad we agree.
12:31 masak sorear++ # gearing niecza to be app-friendly
12:31 moritz_ masak: I've started to submit TODO niecza bug reports to the github issue tracker - feel free to join me in that quest :-)
12:32 masak good idea.
12:32 masak moritz_++
12:37 moritz_ $ bzgrep 'masak submits rakudobug' *.bz2|wc -l
12:37 moritz_ 696
12:38 moritz_ that's in the directory of the #perl6 logs, obviously
12:41 masak heh :)
12:44 [particle]1 joined #perl6
12:44 masak anyone seen this? http://search.cpan.org/dist/Whatever/lib/Whatever.pm
12:47 [particle] left #perl6
12:51 takadonet morning all
12:54 masak takadonet: \o
12:54 takadonet masak: how are u?
12:55 masak takadonet: well rested. I wish I could be both well rested and sleep on the right side of the morning, though.
12:55 masak and u?
12:56 takadonet hacking on my big perl 5 project and made another round of commit on Text-Tabs-Wrap
12:57 masak \o/
12:57 masak how's Text-Tabs-Wrap coming along?
12:58 masak I see it has three medals on modules.perl6.org :)
12:59 takadonet well I forgot out how to pass a rx// to it now so that makes a good chuck of the test passing. So out of the 3 'main' cases. 2 work and the third works on most cases
13:00 masak nice.
13:01 masak takadonet: have you thought some more about contributing a Str.indent method to Rakudo? I think it would be fairly low-hanging fruit for you now that you've ported Text::Tabs::Wrap.
13:02 takadonet masak: probably in the future
13:03 masak sure, no pressure.
13:08 agentzh left #perl6
13:08 takadonet there is...
13:08 takadonet heh
13:15 nothingmuch joined #perl6
13:15 masak thundergnat++'s http://rt.perl.org/rt3/Ticket/Display.html?id=79242 is an excellent example of the assertion that modules and applications, just by virtue of crawling the space of all possible combinations and orderings of features, help find rakudobugs.
13:16 masak also, we're over 800 new/open tickets now.
13:16 takadonet should start closing them?
13:17 masak yes, I think the time has come to close at least some of them.
13:17 masak but I guess there's a bit of a bell-on-cat problem.
13:18 masak and I do respect the core devs' right to choose their priorities.
13:20 _xiaomo_ joined #perl6
13:21 jnthn ENOTENOUGHCOREDEVS
13:21 MayDaniel joined #perl6
13:22 Woodi left #perl6
13:23 PerlPilot joined #perl6
13:23 Patterner left #perl6
13:24 takadonet jnthn: Well for the moment, i'm too far upstream the coding tree to help just yet. I love modifying code, so porting cpan module is the best I can do for now
13:25 PerlJam left #perl6
13:28 risou joined #perl6
13:29 Woodi joined #perl6
13:29 masak takadonet: and that's just as important, as thundergnat's bug report shows.
13:30 takadonet masak: I know
13:32 takadonet side note the program meld is the best thing since slice bread when porting a module
13:34 Psyche^ joined #perl6
13:34 Psyche^ is now known as Patterner
13:34 colomon meld?
13:35 MayDaniel left #perl6
13:36 takadonet http://meld.sourceforge.net/
13:36 takadonet best way to compare two  or third files to see what is different
13:40 masak why is a merge/diff tool useful when porting from Perl 5 to Perl 6?
13:40 takadonet you do print statement at different stages of the program. you can tell where things are going wrong
13:41 takadonet so print the input before a function and after for both version of the module then see what is different
13:41 masak interesting.
13:42 masak sounds fairly complementary to tests.
13:42 takadonet even after if /else
13:42 takadonet makes it easier to do small steps
13:43 takadonet well I use it in conjunction with tests
13:43 masak right, that's what I mean.
13:43 takadonet now having trouble.... appending a "\n" to every element of an array
13:43 masak see if I understand this: you put debug statements in both the Perl 5 and the Perl 6 code?
13:44 takadonet rakudo: my @arr= <'b,'a','c'>; @arr>>~>>"\n" ; @arr.say
13:44 p6eval rakudo 015d77: OUTPUT«'b,'a','c'␤»
13:44 takadonet yes
13:44 takadonet I download the module so I don't mess around my system version of it
13:44 masak takadonet: you're not assigning to anything there.
13:44 takadonet ...
13:44 * takadonet needs more coffee
13:44 masak rakudo: my @arr= <'b,'a','c'>; say @arr>>~>>"\n"
13:44 p6eval rakudo 015d77: OUTPUT«'b,'a','c'␤␤»
13:45 masak hm.
13:45 masak oh right. only one element in that array.
13:46 takadonet ..
13:46 masak elements inside <> are separated by whitespace.
13:46 masak not commas.
13:47 takadonet ya ya.... man really do need that coffee
13:47 kanishka left #perl6
13:53 masak alester: re "It won't happen, so there's no point in discussing it." from http://perlbuzz.com/2010/11/progressing-vs-leapfrogging.html -- while agree with both sides of that implication, I don't agree that there's no point in discussing it *because* it won't happen.
13:55 masak alester: it's more like, there are a small bunch of people actually working on Perl 6 and making it real. then there's a small bunch of people clamoring for a new name. and those two sets of people are mostly disjunct. which, I would say, lends little credibility to the "rename" bunch.
13:56 masak it's as if I had very little involvement with Google Go, but I was really adamant that the name needed changing, for PR reasons.
14:00 kanishka joined #perl6
14:00 nothingmuch left #perl6
14:04 takadonet is their an 'easy' way to append "\n" to every element of the array but the last one?
14:05 masak what about the edge case, when the array is empty?
14:05 _xiaomo_ left #perl6
14:06 takadonet SHOULD not have an array empty
14:06 takadonet but if they are, will check beforehand and skip the step
14:07 masak rakudo: my @a = <a b c>; @a[0 ..^ *-1] >>~=<< "\n"; say @a.perl
14:07 p6eval rakudo 015d77: OUTPUT«(timeout)»
14:07 * masak submits rakudobug
14:08 colomon rakudobug for that?
14:09 masak rakudo: my @a = <a b c>; @a[0 ..^ @a-1] >>~=>> "\n"; say @a.perl
14:09 p6eval rakudo 015d77: OUTPUT«["a\n", "b\n", "c"]␤»
14:09 masak colomon: locally, I get a stack overflow.
14:09 masak takadonet: that work for you?
14:09 colomon but do you think it is correct?
14:10 masak colomon: no, you're right.
14:10 masak rakudo: my @a = <a b c>; @a[0 ..^ *-1] >>~=>> "\n"; say @a.perl
14:10 p6eval rakudo 015d77: OUTPUT«(timeout)»
14:10 colomon you're mixing positional whatever with range whatever
14:10 masak oh, I can't do that?
14:10 colomon probably shouldn't stack overflow, but...
14:10 masak I totally thought I could.
14:10 masak it feels so natural.
14:11 masak rakudo: my @a = <a b c>; @a[0 ..^ *-1]
14:11 p6eval rakudo 015d77: OUTPUT«(timeout)»
14:11 colomon well, do you know if it is (0 ..^ *) - 1 or 0 ..^ (*-1) (for starters)
14:11 colomon ?
14:11 masak I'm assuming the latter, for precedence reasons.
14:11 colomon and if it is the later, you're making a Range with an Int on one side and a closure on the other
14:12 masak so?
14:12 masak that's what WhateverCode is; a closure.
14:12 masak I don't see the fundamental difference to ordinaty ranging with Whatever.
14:12 colomon ranges don't participate in WhateverCode, do they?
14:13 masak I don't know.
14:13 colomon Certainly 1..* does not generate a closure
14:14 masak S09:245 has @array[0 .. *-1] as an example of valid slicings.
14:15 mikehh_ is now known as mikehh
14:15 masak that line in S09 is due to someone with the nick 'lwall'.
14:15 colomon never heard of
14:15 colomon 'em
14:16 masak :)
14:17 rgrau joined #perl6
14:18 colomon where is WhateverCode covered in the spec?
14:19 colomon (It does look like it should parse as 0..(*-1))
14:19 jnthn masak: In [0..*-1] the *-1 would...yes, that. :)
14:19 [particle]1 is now known as [particle]
14:19 takadonet masak: perfect. All my
14:19 takadonet all my
14:19 takadonet ...
14:19 masak jnthn: that's why I expected.
14:19 takadonet all my 'meld' test are good now
14:19 masak s/why/that/
14:20 masak or rather, I don't care much how it works implementation-wise (as long as it works), but that was the precedence I assumed.
14:21 plainhao joined #perl6
14:21 masak takadonet: glad to hear it.
14:21 colomon "For any prefix, postfix, or infix operator that would be curried by a Whatever, a WhateverCode also autocurries it"
14:22 colomon to me, that pretty explicitly leaves out the 0..*-1 case
14:22 takadonet takadonet: so got 8 more test passing and 6 fail... not bad start
14:22 masak colomon: even though S09 says it should work?
14:22 KyleHa joined #perl6
14:22 colomon masak: the spec is known to have errors
14:22 masak KyleHa! \o/
14:22 masak colomon: but it would *suck* if this didn't work!
14:22 KyleHa Howdy Masak!
14:23 masak colomon: and TimToady wrote that part of S09, so it's not like it's untrustworthy because of many chefs.
14:23 colomon personally, I'm not seeing any reason to have the above quote... it seems like anything hit with a WhateverCode could curry.
14:23 colomon masak: TimToady++ is a genius, but he does make mistakes.
14:24 masak colomon: well, what I'm saying doesn't depend on TimToady not making mistakes. it depends on what feels right from a user perspective.
14:24 masak and if I won't be able to write [0 .. *-1], I'll fork and make my own Perl 6.
14:26 jnthn .oO( Who'd be less tormenting to the implementer... )
14:26 colomon Look, I don't see any obvious harm in allowing that.  But presumably the specquote is there for a reason which I do not understand.
14:27 takadonet well we will ask TimToady when he is in
14:27 takadonet anyway back to hacking...
14:28 masak I don't see why this even needs deferral to TimToady. he already wrote in S09 how it should wokr.
14:28 masak s/wokr/work/
14:30 masak fwiw, I think that rakudobug (the fact that it recurses infinitely) is fairly severe. it's not a terribly uncommon use case to want to slice up to *-1.
14:31 masak &
14:33 Raynes left #perl6
14:34 kjeldahl left #perl6
14:37 alester sorear: I'm interested in your assertion that "and ack can't handle corpuses larger than 10-100 MB or so without becoming unusably slow"
14:37 Teratogen does perl 6 handle complex numbers?
14:37 alester masak: As far as I'm concerned, any discussion of "Perl 6 should actually be called X" is wasted breath.
14:37 Teratogen and does this extend to the math library?
14:37 flussence Yes and Yes.
14:38 flussence rakudo: atan2(3i)
14:38 p6eval rakudo 015d77: OUTPUT«atan2 is only defined for Reals, you have a Complex()␤»
14:38 colomon jnthn: I think I can see where to modify the source to make masak happy
14:38 colomon rakudo: atan(3i)
14:38 p6eval rakudo 015d77:  ( no output )
14:39 colomon rakudo: say atan(3i)
14:39 p6eval rakudo 015d77: OUTPUT«1.5707963267949 + 0.346573590279973i␤»
14:40 Raynes joined #perl6
14:40 colomon jnthn: just not 100% convinced it is a good idea
14:40 KyleHa left #perl6
14:45 colomon that is to say, I can't think of any logical justification for why 0..*-1 should work other than, "Man, that would be nice."
14:46 takadonet colomon: is that not a good enough reason? :)
14:46 colomon takadonet: as a for instance, @list xx * is another operator like 0..* which doesn't generate a WhateverCode.
14:47 colomon does @list xx *-1 make any sense?
14:47 flussence I rationalise it as shorthand for @a[*].Int - 1
14:50 KyleHa joined #perl6
14:53 kaare_ left #perl6
14:54 colomon bah, compiling rakudo takes too long
14:54 colomon either that or I really really broke it...
14:59 colomon oh, builds and passes make test
15:00 colomon but if I try 0..*-1
15:00 colomon "set_number_native() not implemented in class 'Num'"
15:00 colomon any ideas what that might mean?
15:06 zby_ joined #perl6
15:06 zby_ left #perl6
15:07 zby left #perl6
15:09 PerlPilot is now known as PerlJam
15:10 PerlJam left #perl6
15:10 PerlJam joined #perl6
15:14 satyavvd joined #perl6
15:16 colomon jnthn, pmichaud_: ping?
15:17 timbunce left #perl6
15:18 oyse joined #perl6
15:18 silug left #perl6
15:20 satyavvd left #perl6
15:20 satyavvd joined #perl6
15:20 wtw left #perl6
15:24 am0c joined #perl6
15:25 oyse left #perl6
15:30 plobsing left #perl6
15:32 zby joined #perl6
15:38 MayDaniel joined #perl6
15:43 plobsing joined #perl6
15:48 justatheory joined #perl6
15:48 masak colomon: here's where I'm coming from. (I should have explained this part from the beginning.) @a[0..4] works. @a[*-1] works. purely by virtue of those two working, I expect @a[ 0 .. *-1 ] to work, and to have the "obvious" semantics that combining the two simpler cases would produce.
15:49 masak in general, when I combine features in Perl, I have a higher expectation than in other languages that the combination of features will Just Work. this is such a case.
15:49 masak it's not just a case of "ooh, wouldn't it be nice if...?"
15:49 colomon masak: yes, I understand all that.
15:50 masak I'm actually fairly surprised that someone would consider arguing against the usefulness of the above case.
15:50 colomon but you're basically expecting two completely different features to magically combine and do exactly what you want
15:50 PerlJam colomon: isn't that the Perl Way  :)
15:50 colomon and you don't seem to be considering that these are completely general features
15:51 jaldhar left #perl6
15:51 masak colomon: I don't *care* how they combine.
15:51 jaldhar joined #perl6
15:52 colomon for instance, the spec says that Feb..* is the same as Feb..Dec
15:52 masak fsvo "the same".
15:52 colomon what the heck should Feb..*-1 do?
15:52 PerlJam Feb..Nov of course
15:52 masak that's a good, but unrelated, question.
15:52 colomon it's completely related
15:52 masak no, I'm not talking about enums.
15:52 colomon because what you've just asked is that Feb..*-1 return closure
15:53 colomon return a WhateverCode, specifically
15:53 masak *sigh*
15:53 masak there should be a word for when a user comes to a dev, expecting sympathy, but getting internals-speak instead.
15:54 masak unless you mean to say "it can't be done", I'm not too interested in the internals details in this case.
15:54 colomon how is that an internal detail?
15:54 masak if it doesn't work with our current model, we need a new model.
15:56 masak colomon: everything about how .[0 .. *-1] translates into "all elements except the last one" is, by definition, details about the internals.
15:58 colomon but what 0 .. *-1 returns is NOT about internals
15:58 PerlJam masak: given that, I'm having a hard time reconciling how colomon's enum example is "unrelated"
15:59 masak PerlJam: it's not completely unrelated, but it's not about array indices any more.
15:59 PerlJam okay
16:00 masak PerlJam: I know colomon++ wants to shed light on what he considers is a problem with making the current implementation do what the spec says, and that he brought up *-1 in the context of enums for that reason.
16:00 plobsing_ joined #perl6
16:01 plobsing left #perl6
16:01 masak PerlJam: however, my interest is to keep the focus on the very simple issue of slicing an array up to but not including the last element. it's backed up by the spec, it falls out naturally as the combination of two simpler cases.
16:01 colomon it doesn't fall out naturally, that's the problem here!
16:02 colomon it looks like it does, that's all.
16:02 masak it doesn't fall out naturally in Rakudo.
16:02 masak that's the problem.
16:02 colomon no, it doesn't fall out naturally in perl 6
16:02 masak I disagree.
16:02 colomon that's the entire point of the enum example.
16:02 masak please explain.
16:04 colomon Why does [*-1] work?  Because it generates a WhateverCode.
16:04 colomon Why does [1..*] work?  Because Ranges are intersected with array bounds, more or less.
16:05 masak "intersected with array bounds"?
16:05 flussence "clamped to"?
16:05 PerlJam colomon: A typical newbie Perl 6 coder isn't going to know those things however.  They'll see "this does this and that does that, maybe I can combine this and that"
16:05 colomon "clamped to", yes.
16:05 masak colomon: what PerlJam said.
16:06 colomon PerlJam: yes, it would be absolutely terrific if [0..*-1] worked.
16:06 masak colomon: what you're doing now is explaining internals to me. with my dev hat on, I know those things.
16:06 colomon but to build a consistent language, you have to have a REASON it works.
16:06 masak colomon: with my user hat on I don't much care.
16:06 MayDaniel_ joined #perl6
16:08 colomon So, it makes sense to say, well, if you pass a WhateverCode to a Range, it autocurries the Range.
16:08 PerlJam colomon: but the users will have a reason it works.  that reason won't have anything to do with WhateverCode or Range however.
16:08 colomon though note that even that has all sorts of problematic issues.
16:08 PerlJam s/it works/it should work/
16:09 masak colomon: making @a[ *-1 ] communicate from the whatever star to the array indexing via a WhateverCode (as opposed to, say, this being a purely syntactic construct) was a *design decision* taken by Rakudo. you're defending it as if it can't be changed or improved.
16:09 colomon no
16:09 kanishka left #perl6
16:09 colomon that's not rakudo.  that's perl 6
16:09 masak oh?
16:10 masak @a[ *-1 ] not being a purely syntactic thing is in the spec?
16:10 MayDaniel left #perl6
16:10 colomon *-1 generating a WhateverCode closure is Perl 6
16:10 masak that's different.
16:11 colomon "he final element of an array is subscripted as @a[*-1], which means that when the subscripting operation discovers a Code:($) object for a subscript, it calls it and supplies an argument indicating the number of elements in (that dimension of) the array."
16:11 colomon that's S02
16:11 masak huh. ok.
16:12 masak then I agree with you. that part of S02, together with your reasoning about Range, sits in opposition to the line of S09 that I quoted.
16:13 MindosCheng joined #perl6
16:13 jnthn I suspect users AND devs can unite around wanting a consistent spec. :)
16:13 colomon and again, it would be awesome if @a[0..*-1] worked.
16:14 bluescreen joined #perl6
16:14 masak awesome and per spec.
16:14 bluescreen left #perl6
16:14 colomon but either we're adding another layer of inconsistent magic to make that work, or there will be consequences for things like Feb..*-1
16:14 colomon and what about something like @a[*/2 .. *-1]  ?
16:14 masak I don't consider Feb..*-1 that unreasonable, fwiw.
16:15 envi left #perl6
16:15 colomon Feb .. *-1 returning a WhateverCode, you mean?
16:15 masak colomon: I have objections to */2, but only on a code-maintenance level.
16:16 masak colomon: whatever it *returns*, I'd expect it to *mean* Feb..Nov (like PerlJam said), or be illegal.
16:16 masak if it's illegal, there should be an overwhelming reason for it being illegal, for example that it's unimplementable.
16:16 tzhs left #perl6
16:16 masak or that it's implementable, but it can't be made fast.
16:18 diakopter I want @a[but last] to work ;)
16:18 masak all is fair if you predeclare. ;)
16:18 TimToady note that there's no guarantee that Foo .. Bar will represent a 0..^$n range
16:19 TimToady if Jan == 1 then you can't subscript an array with it, assuming Jan is the first element
16:20 colomon hmmm... I guess I mean * div 2, btw.
16:20 PerlJam colomon: */2 would work
16:21 masak TimToady: I have always thought of the array indexing being wrapped by some adapter-like thingy in the case of exotic indexings.
16:21 PerlJam for array indexing you get floor(*/2)
16:21 TimToady there's also no guarantee of uniqueness in enums--what if Bar - 1 has two enums mapped to it?
16:21 colomon jnthn: so what does "set_number_native() not implemented in class 'Num'" mean, anyway?  That's not the error I expected to get
16:21 [particle]1 joined #perl6
16:21 risou_ joined #perl6
16:22 TimToady likely range operations on enums are on their values, not their keys, so Feb .. * - 1 is really 2 .. * - 1 (assuming your enum is 1-based)
16:23 masak aye.
16:23 colomon masak: As for Feb .. *-1 meaning Feb .. Nov or being illegal -- the change you are effectively requesting to the spec would make it legal and equal to { Feb .. $_ - 1 }
16:23 masak this is what I meant by enums being an interesting but unrelated question.
16:23 [particle] left #perl6
16:23 [particle]1 is now known as [particle]
16:23 * colomon hopes TimToady++ has a brilliant way of making this all work
16:24 risou left #perl6
16:24 TimToady well, I think you folks are misreading S09
16:24 TimToady the implication goes the other way
16:24 colomon and if you don't like @a[*/2 .. *-1], consider @a[*-3 .. *-1]
16:25 jnthn colomon: I'm mostly confused by that error. :/
16:25 masak colomon: I would expect @a[*-3 .. *-1] to work too.
16:25 masak colomon: and yes, that's inconsistent with how * works in other contexts.
16:25 TimToady assuming subscripts can note the arity of the WhateverCode they get
16:25 masak hm, that'd help.
16:25 jnthn colomon: It feels like an attempt to mutable an immutable thing is happening but I'm still surprised it's that error.
16:26 colomon jnthn: context is that's what happened when I tried to allow WhateverCode arguments to autocurry for Range and sequence operators.
16:27 colomon jnthn: https://gist.github.com/702012
16:27 moritz_ TimToady: somehow I thought the arity related to the dimensionality of the array, but I might be wrong about that
16:27 jnthn colomon: OK. I need to decommute now...home in 30-45 minutes and can look more then.
16:27 TimToady moritz_: maybe you're thinking of HyperWhatever?
16:29 moritz_ yes
16:29 TimToady for @a[*-3 .. *-1] to work, subscripting would notice a 2-arity and feed the size as two arguments
16:30 colomon I see the @array[*-3..*-1] example is actually in S09
16:30 rbuels joined #perl6
16:30 TimToady or, wild idea, or maybe autocurrying should default the second arg to the first
16:31 TimToady that might be in the category of six impossible things before breakfast though
16:32 colomon that actually seems kind of sensible to me.
16:32 colomon I guess it might be dangerous in other contexts.
16:32 TimToady that wouldn't help the folks who want * * * to square a number in a sequence operator though
16:33 XaRDaX joined #perl6
16:33 colomon actually, that's the best reason NOT to default the second arg to the first
16:34 colomon because it would only add to the chaos if (* * *)(3) was nine, but 1, 2, * * * ... * was 1 * 2
16:35 colomon (so 1, 2, 4, 8, etc instead of 1, 2, 4, 16, 256, etc)
16:36 TimToady well, the arity detection probably belongs in the subscriptor
16:36 colomon +1
16:36 masak I think things are magical enough as they are without things defaulting to things.
16:36 colomon TimToady: so, do you have a notion how @a[1..*-1] works?
16:36 TimToady exactly as specced
16:36 TimToady 1..*-1 returns a WhateverCode
16:37 colomon that's not spec, as far as I can tell
16:37 TimToady if you think S09 contradicts this, you're reading it wrong
16:37 colomon no, I think S02 contradicts this
16:37 colomon or at least, explicitly says it doesn't have to work in the general case, with no mention of the Range operator specific case
16:38 TimToady I don't see that
16:38 colomon "For any prefix, postfix, or infix operator that would be curried by a Whatever, a WhateverCode also autocurries it, such that any noun phrase based on * as a head noun autocurries transitively outward as far as it makes sense, including outward through metaoperators."
16:39 colomon There's no mention of what happens for an operator that would NOT be curried by a Whatever, but the very fact they are explicitly not mentioned has to mean something.
16:39 TimToady .. is not in the first category, so the rest doesn't apply; again, you're reading the implication backwards
16:39 TimToady that's an argument from silence
16:40 dalek specs: c0b0845 | duff++ | S09-data.pod:
16:40 dalek specs: Spring before Summer usually  :)
16:40 dalek specs: review: https://github.com/perl6/specs/commit/c0b0845586be1d1fe07106cd2bb13acf56f13a20
16:40 TimToady all operators autocurry a WhateverCode, whether or not they curry a Whatever
16:40 colomon really????
16:40 dalek specs: 8b43df0 | duff++ | S09-data.pod:
16:40 dalek specs: random errant "or"
16:40 dalek specs: review: https://github.com/perl6/specs/commit/8b43df0b09582837dfb91bf69f3d65ce966cad35
16:41 TimToady certainly all binary operators
16:41 colomon then why the heck is "For any prefix, postfix, or infix operator that would be curried by a Whatever," in there?
16:41 colomon so $a = *-1 does not assign a WhateverCode to the variable $a?
16:42 TimToady assignment isn't really a binary operator
16:42 masak PerlJam: nice catch with Spring and Summer. https://github.com/perl6/specs/commit/c0b0845586be1d1fe07106cd2bb13acf56f13a20
16:42 TimToady neither is ~~
16:42 masak PerlJam: but what is that extra 'or' doing there?
16:42 PerlJam masak: it's gone now.
16:42 masak oki :)
16:43 colomon TimToady: perhaps we need a list of the infix operators which are not really binary operators.  :p
16:43 TimToady in any case, the intent is that the operators that autocurry Whatever are a subset of the operators that autocurry WhateverCode
16:44 TimToady and there are operators like .. that autocurry WhateverCode but not Whatever
16:44 colomon and what are those operators?
16:45 TimToady the ones that prefer to interpret a bare * as "to infinity and beyond!"
16:45 TimToady such as xx
16:45 colomon (and so the user will get confused by Feb .. *-1 but @a[0..*-1] works as expected.  seems reasonable to me.)
16:46 TimToady Feb .. *-1 will only do what is expected if the enum is 0-based
16:46 colomon TimToady: and you're trying to use it as a subscript
16:46 PerlJam TimToady: For the user defined indices @calendar example in S09, could @calendar{Jan;1;9} also be written  @calendar{1;1;9}  ?
16:47 colomon if you say @favorite_months = Feb .. * - 1, you're not going to get an array of ten months
16:47 TimToady enums aren't ranges
16:47 colomon (as I said, I think that's a reasonable hole)
16:47 TimToady though they are often used to represent them
16:49 TimToady however, if you say Feb .. Dec - 1 you might get 2..11
16:49 TimToady or 1..10 if 0-based
16:49 TimToady using * when you know the final value is a bit silly in any case
16:50 TimToady why wouldn't they just write Feb .. Nov?
16:50 TimToady most enums are declarative
16:50 PerlJam :q
16:50 colomon TimToady: they could be writing something like Feb .. *-$a
16:51 * PerlJam looks for generative enums
16:51 PerlJam .oO(I thought all enums were declarative)
16:51 colomon I'm just trying to explore where the magic happens.
16:51 mila_ joined #perl6
16:52 colomon anyway, my patch for making [0..*-1] work is waiting on jnthn to explain why it fails miserably...
16:55 mila__ left #perl6
16:55 sftp joined #perl6
16:57 PerlJam Perl 6 has this way of making things that I thought were simple suddenly seem very complex.  :)
16:58 * masak .oO( all I wanted was to recline in this nice waterbed )
16:59 MindosCheng masak: I finally understand what is .oO( ) notation...
17:00 masak MindosCheng: :)
17:00 PerlJam Does the following work?  https://gist.github.com/702034
17:01 masak I can see how it could; don't know whether it does.
17:02 PerlJam I think S09 needs an explicit statement about the relationship between enum values as used in user-defined indexes and how they are mapped to the standard 0-based indexes.   I just don't know what that statement should say  :)
17:03 TimToady how can that possibly work if all the enums map to 1?
17:03 dukeleto This is pretty cool: http://search.cpan.org/dist/Whatever/lib/Whatever.pm
17:03 masak dukeleto: yeah, found that one earlier today :)
17:05 dukeleto masak: I think that is hard proof that Perl 5 and Perl 6 are sister languages, and not competitors. Good stuff flows both ways.
17:05 masak dukeleto: and it's hardly the first such instance.
17:05 masak dukeleto: on the language level, Perl 5 recently got given/when.
17:06 moritz_ why can't they both be sisters and competitors? :-)
17:06 stkowski joined #perl6
17:06 masak moritz_++ :)
17:06 moritz_ masak: and say(), ~~, // and others
17:06 masak right.
17:06 moritz_ I mean, I used to compete with my brother and sister all the time
17:06 takadonet well it's time to 'steal' their cpan module!
17:06 masak and Regexp::Grammars.
17:06 PerlJam TimToady: I don't understand how "mapped to 1" related to their use as indices.
17:06 TimToady that essentially gives them the same identity
17:07 TimToady unlike a Set, where the 1 would indicate existence
17:07 PerlJam okay, that makes sense then.
17:07 masak TimToady: so the mapping in enums essentially allows the user to give the same value several names?
17:07 TimToady that is how enums are typically defined
17:08 masak right.
17:08 TimToady they're really just a shorthand for constant declarations
17:09 PerlJam so, could @calendar{Jan;1;9} also be written as @calendar{1;1;9}    ?
17:09 TimToady yes, if Jan == 1
17:11 frettled I'm no. 1, yes.
17:11 frettled What?  Oh, you were monthing.  :)
17:11 TimToady .oO(nick encapsulation violation)
17:12 TimToady I find it very strange that English allows "no." as an abbreviation for "number"; obviously some history there...
17:13 frettled It makes for some excellent ambiguity.
17:13 TimToady no.
17:13 masak :P
17:14 zb left #perl6
17:16 frettled Up is my no.
17:16 diakopter o. no. no. no.
17:22 risou joined #perl6
17:24 TimToady I'll be going down so. for the holidays.
17:24 risou_ left #perl6
17:25 masak diakopter: your pun is so.ewhat obscure :P
17:26 Bzek left #perl6
17:28 silug joined #perl6
17:28 Bzek joined #perl6
17:29 dalek specs: 977d920 | TimToady++ | S02-bits.pod:
17:29 dalek specs: [S02] clarify * vs *-1 semantics for globbish ops
17:29 dalek specs:
17:29 dalek specs: Globbish ops like .. and xx do not autocurry on Whatever but
17:29 dalek specs: do autocurry on WhateverCode.  Also mention that assignment and
17:29 dalek specs: smartmatching don't autocurry because they're primitive
17:29 dalek specs: pseudo-operators.
17:29 dalek specs: review: https://github.com/perl6/specs/commit/977d920241c26aec8913d5f37c218948b28bbb23
17:30 masak \o/
17:30 kanishka joined #perl6
17:34 diakopter yay
17:34 diakopter "laid out in memory contiguously without pointer indirection"
17:35 diakopter yay "assignment ... syntactic sugar for underlying primitive"
17:38 colomon TimToady++
17:40 colomon #phasers in 80 minutes?
17:40 diakopter mruhaha; this means my perlesque subset language is a lot (like, nearly all the way) closer to correct than [I] previously thought.
17:41 takadonet left #perl6
17:42 takadonet joined #perl6
17:42 masak oh dear, phasers. gotta go nom. &
17:42 masak left #perl6
17:44 Axius joined #perl6
17:48 * jnthn home
17:49 Axius_ joined #perl6
17:50 Axius left #perl6
17:52 am0c left #perl6
17:53 zb joined #perl6
17:53 kanishka left #perl6
17:54 colomon jnthn: I'm hoping you have some time for me to pick your brains here tonight.  (And I'm hoping I have time to do so!)
17:56 jnthn colomon: OK, I should be about a bit.
17:58 colomon https://gist.github.com/702012 is the code change that lead to the set_number_native error
17:58 colomon anything obviously wrong with it?
17:59 MayDaniel_ left #perl6
17:59 cjk101010 left #perl6
18:00 dakkar left #perl6
18:00 jnthn colomon: Any chance of a diff?
18:01 jnthn <-- lazy ;)
18:01 Axius_ left #perl6
18:01 jnthn Also when does teh error occur?
18:01 colomon it's not going to do you any good...
18:01 jnthn Runtime? Compile time?
18:02 colomon https://gist.github.com/702174
18:02 cdarroch joined #perl6
18:02 cdarroch left #perl6
18:02 cdarroch joined #perl6
18:02 colomon getting the error in the REPL when I send it 0..*-1
18:03 colomon (That's the diff for the code, the other diff is that operators which should never autocurry have their not_curried value set to 2)
18:04 jnthn ah, I see the aim...
18:06 jnthn But if you do e.g. --target=pir does it produce output?
18:06 jnthn e.g. is this actually dying because of the generated code, or while generating it?
18:07 impious joined #perl6
18:07 jnthn colomon: I understand what the patch is doing now
18:07 jnthn colomon: And it doesn't look wrong in any way that's obvious to me.
18:08 jnthn (The checking logic looks right, anyways.)
18:10 colomon \o/
18:10 colomon of course, an obvious error causing problems would be easier to debug
18:11 colomon Wynne:rakudo colomon$ perl6 --target=pir
18:11 colomon > 0..*-1
18:11 colomon set_number_native() not implemented in class 'Num'
18:11 colomon so dying generating code, I think?
18:14 jnthn Looks like it. :S
18:14 sorear good * #perl6
18:14 jnthn o/ sorear
18:15 MindosCheng \o sorear
18:15 colomon jnthn: any easy way of adding a "say" in there, so we can see if it is getting past the conditionals or not?
18:17 jnthn pir::say("# lolz fail"); will work in Actions.pm easily enough.
18:18 colomon can I make it "# lolz fail" ~ $/   ?
18:18 jnthn aye
18:19 jnthn maybe ~$/
18:19 jnthn (e.g. coerce match object to a string)
18:19 jnthn just to be on the safe side
18:20 sorear @a[1..*] doesn't work because of a critical syntactic ambiguity
18:20 jnthn Going to sort out some noms pre-#phasers, bbiab
18:20 _kaare joined #perl6
18:20 sorear just use @a[{1..$^a}]
18:20 sorear oh masak is gone
18:20 colomon sorear: you've got a lot of backlogging to catch up on there.  :)
18:23 takadonet sorear: you will also see that I was the cause of it
18:23 risou_ joined #perl6
18:24 risou left #perl6
18:25 Chillance joined #perl6
18:25 colomon jnthn: looks like it is indeed properly getting past the conditionals and into the currying body
18:27 sorear whee, done
18:28 molaf_ left #perl6
18:30 sorear alester: ack was designed for trees of code; it can't optimize "ack foo /tmp/one-gig-logfile" by throwing away files
18:30 alester sorear: oh yeah, if you're just doing a straight grep, use grp.
18:30 alester grep.
18:31 PerlJam left #perl6
18:33 impious left #perl6
18:34 kjeldahl joined #perl6
18:36 lichtkind joined #perl6
18:36 lichtkind hai
18:37 sjohnson p6 masters, i was wondering if this very nice python example can be written as one complex statement as well.
18:37 sjohnson http://www.pastie.org/1303259
18:38 sjohnson i remember asking if there was a function based way to do string replaces a while back, instead of s///, which might make it easily doable
18:38 sjohnson in this python example, it is quite certain the int will be a BigNum too
18:39 wamba joined #perl6
18:40 takadonet colomon: your up sir :)
18:40 wamba left #perl6
18:40 wamba joined #perl6
18:41 colomon sjohnson: seems like you're talking about subst?
18:41 flussence rakudo: say :16('09:f9:11'.comb(/<xdigit>+/).join)
18:41 p6eval rakudo 015d77: OUTPUT«653585␤»
18:41 sjohnson wow
18:41 sjohnson :16
18:41 sjohnson i didnt know about that
18:42 colomon but yeah, unless I'm missing something, flussence++'s approach is much better than that python code there
18:43 hudnix left #perl6
18:43 colomon errr, or maybe
18:44 colomon rakudo: say :16('09:f9:11'.subst(':', '', :g).join)
18:44 p6eval rakudo 015d77: OUTPUT«653585␤»
18:44 colomon whoops
18:44 colomon rakudo: say :16('09:f9:11'.subst(':', '', :g))
18:44 p6eval rakudo 015d77: OUTPUT«653585␤»
18:45 MindosCheng Cool.
18:45 sjohnson colomon: im surprised no one told me about subst
18:45 sjohnson maybe i asked on a different channel
18:45 sjohnson but the answers were mostly "you don't need it.  use s///" :(
18:45 sjohnson so thanks for that
18:45 colomon sjohnson: I'm surprised you got this far without hearing about it, it was the only way to do it until moritz_++ got s// working in spring
18:45 flussence the :16 is pretty non-obvious too
18:46 flussence (is that part of the :param syntax, or is it a special case?)
18:46 sjohnson is there a nice way to do it in p5 too?
18:46 TimToady it's special
18:46 hudnix joined #perl6
18:46 TimToady sjohnson: recent P5 added /r to return the value
18:47 TimToady but the .subst vs .=subst is a P6ism
18:47 sjohnson im glad subst is around
18:47 sjohnson one of the few things i actually like about PHP
18:47 sjohnson another good thing about PHP is being able to push onto arrays using $array[] = $val;   (square brackets)
18:47 sjohnson .oO(i like .push better tho)
18:48 MindosCheng sjohnson : I like the $array[] = $val; thing :)
18:49 sjohnson MindosCheng: don't forgot to do $a = array() before, otherwise it won't wokr
18:50 sjohnson rakudo: my $house = "0843ffffffffffffewm".subst('f','aA'); say $house
18:50 MindosCheng sjohnson : Soga.
18:50 p6eval rakudo 015d77: OUTPUT«0843aAfffffffffffewm␤»
18:50 sjohnson oops
18:51 sjohnson rakudo: my $house = "0843ffffffffffffewm".subst('f','aA', :g); say $house
18:51 flussence That house isn't up to building code.
18:51 p6eval rakudo 015d77: OUTPUT«0843aAaAaAaAaAaAaAaAaAaAaAaAewm␤»
18:51 sjohnson thats better
18:51 sjohnson rakudo: say :g
18:51 p6eval rakudo 015d77: OUTPUT«Unexpected named parameter 'g' passed␤  in 'say' at line 5505:CORE.setting␤  in main program body at line 22:/tmp/g3974lHYMO␤»
18:51 sjohnson .oO( ????? ! )
18:52 moritz_ rakudo: $*OUT.say(:g)
18:52 p6eval rakudo 015d77: OUTPUT«␤»
18:52 moritz_ sub vs. methods
18:53 sjohnson is :g just a symbol that stands for some perl recognized integer on a big list of special numbers?
18:53 sjohnson or some non-printable character that i can't see
18:53 TimToady it's a named arg that is being ignored by the method
18:54 TimToady see S12:2099
18:55 KyleHa left #perl6
18:55 KyleHa joined #perl6
18:55 KyleHa left #perl6
18:56 sjohnson rakudo: say 0x65
18:56 p6eval rakudo 015d77: OUTPUT«101␤»
18:56 sjohnson whoops
18:57 moritz_ rakudo: say :g.perl
18:57 p6eval rakudo 015d77: OUTPUT«"g" => Bool::True␤»
18:57 MindosCheng rakudo: $_='FFF'; s/F/Aa/g; say
18:57 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Unsupported use of /g; in Perl 6 please use :g at line 22, near "; say"␤»
18:58 sjohnson rakudo: say "mamama".subst('ma', 'mi', 1);
18:58 moritz_ rakudo: $_='FFF'; s:g/F/Aa/; .say
18:58 p6eval rakudo 015d77: OUTPUT«No applicable candidates found to dispatch to for 'subst'. Available candidates are:␤:(Mu : Any $matcher, Any $replacement, Any :samecase(:ii($samecase)), Any :samespace(:ss($samespace)), *%options)␤␤  in main program body at line 22:/tmp/HErOqHp08U␤»
18:58 p6eval rakudo 015d77: OUTPUT«AaAaAa␤»
18:58 colomon #phasers in t-2
18:58 sjohnson rakudo: say "mamama".subst('ma', 'mi', Bool::True);
18:58 p6eval rakudo 015d77: OUTPUT«No applicable candidates found to dispatch to for 'subst'. Available candidates are:␤:(Mu : Any $matcher, Any $replacement, Any :samecase(:ii($samecase)), Any :samespace(:ss($samespace)), *%options)␤␤  in main program body at line 22:/tmp/9lOqx30EMx␤»
18:58 moritz_ sjohnson: what do you want to express with the third argument?
18:59 sjohnson moritz_: just trying to reverse engineer p6 guts for learning purposes
18:59 MindosCheng moritz_++
18:59 hudnix left #perl6
18:59 TimToady you can't pass a positional argument to a parameter that is declared named only
18:59 moritz_ sjohnson: you know, there's also source code you can look at :-)
18:59 mj41 left #perl6
19:00 MindosCheng For blackbox testing :P
19:00 sjohnson trying to bone up on my p6 obfuscated code for future contests too!
19:00 [Coke] joined #perl6
19:00 colomon jnthn: error is happening somewhere in the last two lines here:
19:00 colomon if $right.returns eq 'WhateverCode' {
19:00 colomon $right_new := PAST::Op.new( :pasttype('call'), :node($/), $right);
19:00 colomon my $total_arity := $counter + $right.arity;
19:03 MayDaniel joined #perl6
19:03 jnthn colomon: ...weird.
19:03 colomon yes
19:04 colomon but "say" doesn't lie.  ;)
19:04 colomon guess I can narrow it down to the line...
19:04 hercynium joined #perl6
19:05 sjohnson TimToady: what are your current thoughts on p6 these days
19:05 sjohnson in a broad "how's it going?" kind of sense
19:06 * MindosCheng reading historical documents in the middle night.
19:06 [Coke] left #perl6
19:06 * hercynium needs to spend more time here :)
19:06 MindosCheng s/middle/mid/
19:06 sorear hello
19:07 TimToady sjohnson: it doesn't matter how I think it's going; it only matters how it's going :)
19:07 hercynium "At that moment, the student was enlightened"
19:08 sjohnson haha
19:08 sjohnson p6koans
19:09 sjohnson :)
19:09 Bucciarati left #perl6
19:10 MindosCheng hercynium++
19:12 jnthn colomon: Does this help: $total_arity := $counter + +$right.arity;
19:12 jnthn (if yes then, srsly eww.)
19:12 colomon my $total_arity := $counter + $right.arity; is definitely the line that is failing
19:12 diakopter +($right.arity)
19:12 diakopter er
19:12 jnthn Same ;)
19:13 colomon not needed in p6, maybe needed in nqp?
19:13 jnthn the parens?
19:13 * diakopter find coffee
19:13 TimToady what happens if $right doesn't have a .arity?
19:14 jnthn Oh wait, that's .arity on the PAST::Block
19:14 * MindosCheng was enlightened with the koan of lazy evaluation.
19:14 jnthn OK, REALLY wtf. :/
19:14 * TimToady hopes to be enlightened lazily...
19:15 dalek niecza: 13d3657 | sorear++ | v6/tryfile:
19:15 dalek niecza: [v6] fix order-of-operations bug in package_def
19:15 dalek niecza: review: https://github.com/sorear/niecza/commit/13d36577a74810615e1e0e8c5830103f04469ee8
19:15 hudnix joined #perl6
19:15 hercynium TimToady: I tried that but without a restricted calorie diet it's impossible
19:15 diakopter sorear: v6 ?
19:17 sorear where I'm trying to build the bootstrapped niecza
19:17 sorear as opposed to the Perl 5 one
19:17 sorear I'm still just chasing STD.pm6 though
19:17 sorear *almost* there
19:17 diakopter oh
19:19 colomon jnthn: +$right.arity doesn't help
19:20 dalek niecza: 4f1401b | sorear++ | docs/lhf.txt:
19:20 dalek niecza: Remove two stale LHF items
19:20 dalek niecza: review: https://github.com/sorear/niecza/commit/4f1401b3b497709a79a307eb896390322bc25aa1
19:26 MayDaniel left #perl6
19:26 masak joined #perl6
19:28 jnthn colomon: Um. Hmm.
19:28 * jnthn is confused
19:28 Util Does NQP support .match and .subst as methods? I have only gotten them to work as subs.
19:29 colomon jnthn: not half as confused as I am
19:29 jnthn What is $counter?
19:29 colomon 0
19:29 colomon now counter 0
19:29 colomon now right.arity 1
19:30 jnthn Initialized as my $counter := 0;
19:30 jnthn ?
19:30 colomon (those are really +$counter and +$right.arity)
19:31 colomon recompiling to get ~$counter and ~$right.arity
19:34 jnthn maybe pir::typeof__SP($counter) too
19:34 jnthn I'm curious what the two things actually are
19:36 colomon still say 0 and 1 when ~ified
19:36 Lorn repo?
19:36 risou_ left #perl6
19:36 rindolf joined #perl6
19:37 colomon jnthn: recompiling with typeof now
19:37 TheHarlot joined #perl6
19:38 TheHarlot okay... a few questions. Is it possible to do static variables in Perl 6 classes? If so, what sigil do I use?
19:39 jnthn TheHarlot: Just declaring a lexical in the class body should have that effect.
19:39 jnthn (e.g. one of them, visible just inside the class)
19:39 TheHarlot second: is reading the contents of a directory any different from reading from a file? If so, how different? Or can I just do @list = slurp("/var/my_file_pool"); and Perl 6 will figure it out.
19:39 jnthn e.g. use my
19:39 jnthn No, slurp is only for files.
19:39 TheHarlot jnthn, ah, I was going to jump over to "our".
19:39 jnthn my @files = dir('/the/path')
19:40 TheHarlot ah, thank you.
19:40 jnthn TheHarlot: Well, that is visible from outside teh class.
19:40 jnthn TheHarlot: Depends how much encapsulation you want :)
19:40 TheHarlot well, I have a weighted count in this class. So, one class will have 50, others will be weighted at 30, 41, 25, etc. The variable is mostly just to hold a cached value of the total weight of these objects.
19:42 TheHarlot I will be reading a directory in, making objects based on that directory--with an initial weight (that changes over the program). The next step is that I randomly choose a entry based on the total weight, and shoot it off to a program, to play until finished.
19:42 masak TheHarlot: see http://strangelyconsistent.org/blog/i-can-haz-constant
19:42 TheHarlot which gives the next issue: how do I call an outside program in Perl6, and return when that program exits.
19:42 TimToady I guess the only problem with "my" is if you need it modifiable from subclasses
19:43 TheHarlot I am thinking something like how the static keywork can work in C for variables.
19:43 masak TimToady: then it should be public anyway.
19:43 TheHarlot er... c++
19:43 masak s/should/should probably/
19:43 TheHarlot thanks masak, jnthn and Larry ~.n
19:43 jnthn TimToady: Well, that's consistent with has attributes, which are also only visible inside the class :)
19:44 colomon jnthn: both types are Integer
19:44 TimToady TheHarlot: we have a "state" keyword that is like static
19:44 TimToady it makes a variable persistent across invocations
19:44 TheHarlot yeah, that is probably what I want.
19:44 TimToady but a class body is only invoked once, so it doesn't buy you anything
19:45 TheHarlot uh--does rakudo have a different version of perldoc, btw?
19:45 TimToady if you put it into a method body, though, it would persist
19:45 hanekomu joined #perl6
19:45 TheHarlot TimToady, a bit counter intuitive--but I could put it in a weight tracker method, I guess?
19:45 TimToady you could
19:46 TheHarlot hmmm... or when updating the weighting, I could have that function return the new total weight.
19:46 * sorear wants to know why it's not possible to use semantic tags with code
19:46 sorear well, intermixed I mean
19:46 TheHarlot which is not a pretty solution.
19:46 TimToady I don't think rakudo comes with a perldoc
19:46 masak TheHarlot: see S26 for Perl 6's variant of Pod. only a small part of it is in Rakudo so far.
19:47 jnthn colomon: As they should be. :S
19:47 masak oh, the program? no, it doesn't.
19:47 colomon jnthn: I was afraid of that
19:47 * masak re-remembers u4x
19:47 TheHarlot masak, TimToady: I am mostly look for an easier way to rtfm on that one.
19:48 colomon jnthn: anything else you can think of trying here?
19:49 TimToady at the moment the synopses at http://perlcabal.org/syn/ are still the most comprehensive docs, though they're written more for implementers than users
19:49 masak TheHarlot: not much beats the synopses right now in terms of rtfm. for all else, I'd recommend coming here.
19:49 sorear Is Darren Duncan insane?
19:50 jnthn colomon: I'm just finding it incredibly bizzare that adding two Integers together could lead to the error we're seeing...
19:50 TimToady sorear: not really, but he's pretty far out on the Spectrum
19:50 colomon jnthn: I couldn't agree more!
19:50 sorear TimToady: what is the Spectrum?
19:51 jnthn Why, the good old ZX of course.
19:51 masak :)
19:52 flussence k
19:52 flussence whoops
19:52 TimToady the Autistic Spectrum, which most of us here are on somewhere
19:53 diakopter some of us even move along it over time
19:53 masak dAut
19:53 masak er, dAut/dt
19:53 TimToady we all have our little failures in pragmatics from time to time
19:53 jnthn I never do that!
19:53 jnthn ;)
19:54 TimToady jnthn: you are anchoring the Neurotypical End  :)
19:55 masak jnthn: don't you dare leave! :P
19:55 MindosCheng rakudo: map { $_++ } <TimToady diakopter>
19:55 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Confused at line 22, near "map { $_++"␤»
19:55 sjohnson heh
19:55 TheHarlot hmmm... just found my method was a pretty bad.
19:55 TimToady MindosCheng: needs a comma after the block to parse
19:55 TheHarlot though, I did figure out more on this issue.
19:56 TheHarlot TimToady, I technically was only on the Autistic Spectrum due to a misdiagnosis.
19:56 * TheHarlot scratches her head
19:56 * masak replied to Darren Duncan
19:57 masak TheHarlot: were you really supposed to be diagnosed with some other spectrum?
19:57 TimToady TheHarlot: that just means you're on the normal end :)
19:57 TheHarlot long story short, lazy doctors ended with me being on the chemical equivalent to PCP for about twenty years, as after being medicated for Aspergers for two years, they decided I was Bipolar.
19:58 TheHarlot And gave bipolar meds to somebody who is not actually bipolar...
19:58 MindosCheng rakudo: say map { $_++ }, <TimToady diakopter>
19:58 p6eval rakudo 015d77:  ( no output )
19:58 TheHarlot TimToady, pfft! that is like saying gamma radiation or AM Radio is part of the visible light spectrum ~.n
19:59 jaldhar left #perl6
19:59 TimToady I think the Autistic Spectrum is more like the universe, which has no "outside"
20:00 TimToady at least on the neurotypical end, you can't be more normal than "Normal" :)
20:00 TimToady you can find other dimensions to go off into though...
20:01 mj41 joined #perl6
20:01 TheHarlot well in full honesty. There are only two definitions of normal I have been given. One is Situation Normal (SNAFU), and the other is the act of washing dishes.
20:02 MindosCheng It's multi-dimensional, more than that in the universe.
20:02 TimToady sometimes normal just means "at right angles", which implies another dimension...
20:02 hercynium in another dimension, my dishes are all clean
20:03 colomon jnthn: here's a gist, just in case there's something stupid I'm doing: https://gist.github.com/702404
20:03 TheHarlot In the case of the Autistic Spectrum is is a set of issues in one are of human life. Like Visible Light. You can still jump over to radio waves. Which have their own divisions (AM, FM, UHF, etc)--and work their own way... but they are no visible light. They however are the same universe. Just a different subset of that universe.
20:04 TheHarlot Unless you imply stuff like Schizophrenia, Bipolar--and quite a bit of mental disorders that are not part of the Autistic Spectrum are "normal".
20:04 masak TheHarlot: I'm just waiting for the moment when you tie all this back to Perl 6 somehow.
20:04 TheHarlot ah... I was commenting on something somebody else said.
20:04 TimToady so what's "normal" Perl 6 code :)
20:05 TheHarlot That everybody here is part of the Austism Spectrum.
20:05 masak :)
20:05 TheHarlot TimToady, by my two definitions, either a jeph or a dish washer program.
20:05 TimToady :)
20:06 sorear austism, eh?
20:06 sorear rakudo: say $*IN.slurp
20:06 p6eval rakudo 015d77: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem
20:06 p6eval ..stark…
20:07 * masak snaps at attention
20:07 TimToady attention snaps back
20:07 masak that's Austrism, not Autism. :P
20:07 masak attention whiplash.
20:08 TimToady and vice versa
20:08 TheHarlot I mean, if we were to put Perl 6 code to the DVM (or whatever the TLA is), as an analogy, each and every piece of code has problems it can have. With Perl 6 code that can be attributed to any mental illness possible.
20:08 TimToady provably, we don't have ADD here
20:08 TheHarlot Autism is just one spectrum the code could be screwed up. You can have Schizo Code, and Bipolar code as well.
20:09 fhelmberger joined #perl6
20:09 TheHarlot The code would only be considered ill if it has those issues to levels that it no longer functions at its goal.
20:09 * TheHarlot blinks
20:09 sorear masak++
20:09 TimToady as we get closer to true AI, this may become truer than we'd like to think...
20:10 MindosCheng rakudo: say <Autism not-Autism>.pick
20:10 p6eval rakudo 015d77: OUTPUT«Autism␤»
20:10 * masak rests his case
20:10 * TimToady wrests his case
20:10 TheHarlot right--and my final question for the moment: how do I call an outside program in Perl6, and return to the Perl6 code, once done being called?
20:10 * hercynium crests his race
20:11 masak TheHarlot: run()
20:11 TheHarlot thank you masak
20:11 masak you're welcome, harlot.
20:11 TheHarlot now I can go trying to code this piece.
20:11 jnthn But it's a good idea to pass it an argument ;)
20:11 masak run("ls")
20:11 TheHarlot jnthn, I dunno--maybe I could use that to get the voices to talk to my program ~.n
20:11 hercynium code in piece
20:11 TimToady the return value is the opposite of p5's system()
20:12 TheHarlot TimToady, returns true on success then?
20:12 TimToady correct
20:12 masak TimToady: only Rakudo doesn't do that yet.
20:12 TimToady that's spec, anyhoo
20:12 colomon boy, that seems like it ought to be an easy bug to fix...
20:12 TheHarlot Not really concerned about return value. I am mostly writing a music player right now. All I care about is way to randomly play songs based on a directory listing.
20:13 masak nice!
20:13 TheHarlot I will post a blog, as I start to work on being at least an EPO Tinman.
20:13 TimToady should do for htat
20:13 TimToady *that even
20:13 hercynium sane return values from system commands? NOE!
20:13 hercynium (as opposed to 0E0?)
20:13 MindosCheng TheHarlot++
20:14 TheHarlot MindosCheng, the name in the system would be KatrinaTheLamia
20:15 TheHarlot I am just running this, as my shell is currently down.
20:15 sjohnson rakudo: say
20:15 sjohnson 95   # Maybe in the future... I will add something similar to cfvi, where it gets rid of template_c and .swp files
20:15 p6eval rakudo 015d77: OUTPUT«␤»
20:15 sjohnson oops
20:15 sjohnson note to self:  always check paste buffer
20:15 masak sjohnson: that's actually a known rakudobug.
20:15 masak std: say
20:15 sjohnson haha
20:15 p6eval std a194beb: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/zFrPifZjqj line 1:␤------> [32msay[33m⏏[31m<EOL>[0m␤ok 00:01 117m␤»
20:16 sjohnson i'm good at finding bugs by accident
20:16 * jnthn dresses masak's say
20:16 sjohnson rakudo: say 0b1100101 # what i really meant to do
20:16 p6eval rakudo 015d77: OUTPUT«101␤»
20:16 TheHarlot rakudo: Any() + 50
20:16 p6eval rakudo 015d77: OUTPUT«Could not find sub &Any␤  in main program body at line 22:/tmp/2G2R9k1iMZ␤»
20:17 masak rakudo: say Any + 50
20:17 p6eval rakudo 015d77: OUTPUT«Use of uninitialized value in numeric context  in <anon> at line 22:/tmp/e9xf08xgKn␤50␤»
20:17 TheHarlot rakudo: my $var; say $var + 50;
20:17 p6eval rakudo 015d77: OUTPUT«Use of uninitialized value in numeric context  in <anon> at line 22:/tmp/nhOJnqa9Gm␤50␤»
20:17 * moritz_ doesn't understand why it dies instead of just warning
20:17 jnthn moritz_: It printed the 50 too
20:17 TheHarlot right... going to need to do something to initialise a variable in a class.
20:17 moritz_ oh, right
20:18 TheHarlot wait--it does not die then?
20:18 TheHarlot rakudo: my $var = 50; say $var;
20:18 p6eval rakudo 015d77: OUTPUT«50␤»
20:18 * TheHarlot compares output
20:19 TheHarlot ah... that character is a newline... I guess?
20:19 sjohnson rakudo: say rand
20:19 p6eval rakudo 015d77: OUTPUT«0.663876019043045␤»
20:19 TimToady .u ␤
20:19 phenny U+2424 SYMBOL FOR NEWLINE (␤)
20:20 TimToady you can use it on input too
20:21 TimToady std: { 1 } { 2 }
20:21 p6eval std a194beb: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/CSMpbfLQYw line 1:␤------> [32m{ 1 } [33m⏏[31m{ 2 }[0m␤    expecting infix or meta-infix␤Parse failed␤FAILED 00:01 119m␤»
20:21 TimToady std: { 1 }␤{ 2 }
20:21 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
20:22 TimToady TheHarlot: if you have a utf-8 aware irc client, and if you have good font support, it should come out as a little NL of some sort
20:24 * MindosCheng using ChatZilla now.
20:25 MindosCheng I am still confused with the closure example.
20:25 * sorear gets some popcorn and watches masak and dduncan
20:25 MindosCheng rakudo: my $a = -> { my $c=10; return { say $c-- } }(); $a(); $a();
20:25 p6eval rakudo 015d77:  ( no output )
20:26 masak sorear: I don't intend to continue that thread.
20:26 MindosCheng Why it has no output?
20:26 masak MindosCheng: something looks broken.
20:26 sorear because the 'return' statement ended the program
20:26 masak oh, right.
20:27 sorear pointy blocks don't catch return, so the exception bubbles up and caused the eval() frame to return
20:27 masak sorear++
20:27 MindosCheng sorear++
20:27 MindosCheng rakudo: my $a = -> { my $c=10; -> { say $c-- } }(); $a(); $a();
20:27 p6eval rakudo 015d77: OUTPUT«10␤9␤»
20:28 TimToady rakudo: my $a = sub { my $c=10; return { say $c-- } }(); $a(); $a();
20:28 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = su"␤»
20:28 masak TimToady: needs parens around sub {...}
20:28 TimToady rakudo: my $a = (sub { my $c=10; return { say $c-- } })(); $a(); $a();
20:28 p6eval rakudo 015d77: OUTPUT«10␤9␤»
20:28 TimToady std: my $a = sub { my $c=10; return { say $c-- } }(); $a(); $a();
20:28 p6eval std a194beb: OUTPUT«ok 00:01 122m␤»
20:28 jnthn Eww!
20:28 TheHarlot TimToady, it comes out as two hex quadlets in my client's font.
20:29 TheHarlot rakudo: say rand(9001);
20:29 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Unsupported use of rand(N); in Perl 6 please use N.rand or (1..N).pick at line 22, near "(9001);"␤»
20:29 TheHarlot rakudo: say 9001.rand()
20:29 p6eval rakudo 015d77: OUTPUT«691.640323830381␤»
20:29 jnthn TimToady: Granted Rakudo should follow STD, but I'd rather STD didn't let you do that tbh.
20:29 plainhao left #perl6
20:29 TheHarlot rakudo: say Interger 9001.rand()
20:29 jnthn TimToady: Just visually looks...weird.
20:29 p6eval rakudo 015d77: OUTPUT«Could not find sub &Interger␤  in main program body at line 22:/tmp/kgjWXbY5_v␤»
20:29 TheHarlot rakudo: say Integer 9001.rand()
20:29 p6eval rakudo 015d77: OUTPUT«Could not find sub &Integer␤  in main program body at line 22:/tmp/6TB35dbiOg␤»
20:29 TimToady TheHarlot: do you get french quotes here: « Oui! »
20:30 masak TheHarlot: read the error message.
20:30 TheHarlot TimToady, I get the unicode version of << and >>
20:30 daxim left #perl6
20:30 jnthn TimToady: I get the same dissonance in C# where you can do like "var x = new Foo().Bar()" - my brain always groups that wrongly. Maybe that's just my brain though :)
20:30 TimToady good, then it's probably just a font issue
20:30 TheHarlot masak, yeah... trying to figure out howto type cast... then I just decided to my code does not need it.
20:31 masak rakudo: say 9001.rand
20:31 p6eval rakudo 015d77: OUTPUT«8506.55472686801␤»
20:31 masak rakudo: say 9001.rand.int
20:31 p6eval rakudo 015d77: OUTPUT«Method 'int' not found for invocant of class 'Num'␤  in main program body at line 22:/tmp/ONztBUqdoE␤»
20:31 masak rakudo: say 9001.rand.Int
20:31 p6eval rakudo 015d77: OUTPUT«8308␤»
20:31 TimToady rakudo: say (^9001).pick
20:31 p6eval rakudo 015d77: OUTPUT«4014␤»
20:31 TimToady rakudo: say (^90010000).pick
20:31 TheHarlot rakudo: say Int(9001.rand)
20:32 p6eval rakudo 015d77: OUTPUT«(timeout)»
20:32 p6eval rakudo 015d77: OUTPUT«Could not find sub &Int␤  in main program body at line 22:/tmp/0E7b1ouLyj␤»
20:32 TimToady tell me it's not generating a list from ^90010000...
20:32 TheHarlot hmm... okay, I will note that behaviour on objects for the future.
20:32 masak TimToady: seems it is :(
20:32 sorear TheHarlot: め # Here, have a very common Unicode character >256
20:32 masak TimToady: or maybe .pick is flattening it out.
20:32 TheHarlot rakudo: say (^100000000000).pick
20:32 p6eval rakudo 015d77: OUTPUT«(timeout)»
20:33 sorear « is <256 so it's not necessarily a fair indicator of Unicode support
20:33 TimToady troo
20:33 TimToady but I think there would at least have been some garbage
20:33 lue left #perl6
20:33 lue joined #perl6
20:33 XaRDaX Hi all. I've a question: Is there a Module in p6 like IO::Socket in perl5?
20:33 TimToady extra  and such
20:34 sorear alpha had an IO::Socket, iirc
20:34 TheHarlot sorear, the first one is a japanese character...  my mind is spacing out on the charset (I keep wanting to say "hanashita"... but that is wrong... so bloody wrong)
20:34 sorear .u め
20:34 phenny U+3081 HIRAGANA LETTER ME (め)
20:34 TheHarlot Hiragana! Haha!
20:35 colomon .pick is flattening it out, because 100000000000 isn't really an Int in Rakudo.
20:35 colomon rakudo: say (^1000000000).pick
20:35 p6eval rakudo 015d77: OUTPUT«(timeout)»
20:35 MindosCheng rakudo: say <め 安>
20:35 colomon rakudo: say (^100000).pick
20:35 p6eval rakudo 015d77: OUTPUT«め安␤»
20:35 p6eval rakudo 015d77: OUTPUT«(timeout)»
20:36 TimToady rakudo: say 90010000.WHAT
20:36 p6eval rakudo 015d77: OUTPUT«Int()␤»
20:36 TimToady that is
20:36 colomon yeah, something weird is going on here.
20:36 dalek 6model: 021ee7e | jonathan++ | dotnet/ (4 files):
20:36 dalek 6model: [dotnet] Add an LHF entry.
20:36 dalek 6model: review: https://github.com/jnthn/6model/commit/021ee7ea1fe453004334ee2d0e14f2c73fdd155b
20:36 TheHarlot well, seeing as how my random music player is using NIALL based weighting, I do not need it to be an Int(). Though, which takes up less space, Int() or Float()?
20:37 TheHarlot Well, less space, and less cycle abuse?
20:37 sorear TheHarlot: hanashita is at least a word, and has the right initial consonent
20:37 sorear consonant.
20:37 TimToady "hanashita" wo hanashita!
20:37 XaRDaX sorear: do you mean v6-alpha?
20:37 TheHarlot sorear, it means "speak" with tense of past but continuing on.
20:37 colomon rakudo: say (^1000000).max.WHAT
20:37 p6eval rakudo 015d77: OUTPUT«Int()␤»
20:38 colomon rakudo: say (^1000000).min.WHAT
20:38 p6eval rakudo 015d77: OUTPUT«Int()␤»
20:38 TheHarlot That is why I knew it was the wrong word for hirogana.
20:38 sorear alpha: say 2 + 2
20:38 p6eval alpha : OUTPUT«4␤»
20:38 colomon ooooo.
20:38 sorear alpha: say IO::Socket.^methods
20:38 p6eval alpha : OUTPUT«sendcloserecvsqrtrindexasinintatanhcoshcosecgrepvaluescharsrootsreverseisaucfirstkvsamecasetanlog10coscapitalizefmtbytesflipdoesp5choplcasinhacotanreducecotanhchracotanh:d:e:fcombfloorasechatanacos:levalroundchoptanhsplitmatchexp:sacoshwordscancotanatan2lcfirstucsrandkeyspolarmapci…
20:38 colomon I think the Range.pick patch a few weeks ago broke it.
20:38 TheHarlot wait... there is more than just rakudo in p6eval?
20:39 TheHarlot pugs: say "I am a perl 6."
20:39 p6eval pugs: OUTPUT«I am a perl 6.␤»
20:39 TimToady TheHarlot: that's okay, most of use are a bit weak on our 日本語 here.
20:39 TimToady s/use/us/  # our English too
20:39 sorear XaRDaX: 'alpha' is a retronym for Rakudo 2010.01
20:39 sorear yapsi: say "hi"
20:40 p6eval yapsi: OUTPUT«===SORRY!===␤Unable to find module 'Yapsi' in the @*INC directories.␤(@*INC contains:␤  lib␤  /home/p6eval/.perl6/lib␤  /home/p6eval//p2/lib/parrot/2.9.1-devel/languages/perl6/lib␤  .)␤»
20:40 wamba left #perl6
20:40 sorear nqp: say("Hi")
20:40 p6eval nqp: OUTPUT«Hi␤»
20:40 TheHarlot TimToady, well, I am strong enough, that I barely use subtitles in anime... mostly for harder words or when I do a double take on what a character said.
20:40 sorear perlesque: say("Hi")
20:40 p6eval perlesque:  ( no output )
20:40 jedai left #perl6
20:40 TheHarlot TimToady, mostly with the hanashita/hiragana thing is with a similar issue in English. Where something is on the tip of my tongue--and I am trying to figure it out.
20:40 TheHarlot jerl6: say "I should not be here"
20:41 TheHarlot ah... it returned the proper output.
20:41 jedai joined #perl6
20:41 sorear almost everyone here is at least learning Japanese
20:41 sorear a funny coincidence
20:41 MindosCheng pugs: my $a = -> { my $c=10; return { say $c-- } }(); $a(); $a();
20:41 XaRDaX sorear: thank you
20:41 p6eval pugs:  ( no output )
20:41 TimToady .oO("Know your enemy...Ruby")
20:41 * masak goes offline for battery reasons
20:41 masak left #perl6
20:42 MindosCheng sorear: I only know a bit Japanese...
20:42 MindosCheng pugs: my $a = -> { my $c=10; -> { say $c-- } }(); $a(); $a();
20:42 p6eval pugs: OUTPUT«10␤9␤»
20:42 TheHarlot ah--I am fairly solid in it... not fluent. But solid. I am also working on Mandarin and soon German. I also want to look into Spanish, so I can finally watch a soccer game, and not hate the announcer.
20:42 MindosCheng masak: Cya.
20:42 * TheHarlot HATES the british football announcers. sooo much.. hate...
20:43 fhelmberger left #perl6
20:43 MindosCheng TheHarlot: Mandarin is my native language... zh-TW
20:43 TheHarlot ah, well, from what I have seen of it, it is a brilliant language to know.
20:44 stkowski left #perl6
20:44 sorear Audrey was zh-TW; I wonder if she started this trend
20:44 PerlJam joined #perl6
20:44 TheHarlot I mean, if I could choose a language to be spoken world wide instead of English, it would be German, Mandarin or Sanskrit.
20:44 MindosCheng sorear: I happen to know Audrey long time ago.
20:45 MindosCheng TheHarlot: It's nice to know so many language.
20:46 TheHarlot The notion of making English a standardised academics language or language of commerce, makes about as much sense to me, as doing the same with Ebonics, Welsh, Newfie or Cockney Slang.
20:46 TheHarlot MindosCheng, it is. Though, I do not really consider English a language.
20:47 TimToady it's really a creole, like Japanese
20:47 TimToady but creoles can become real languages, for some definition of "real"
20:47 TimToady if communication happens, it's a language
20:47 TheHarlot TimToady, though, Japanese at least has slightly better tenses to deal with it.
20:48 MindosCheng sorear: That's why I started to learn Perl.
20:48 takadonet left #perl6
20:48 hanekomu and with Perl 6, Perl becomes a creole as well
20:48 TimToady TheHarlot: depends on what you're trying to express
20:48 TimToady you can't say "will have been going" in Japanese, fer instance
20:49 PerlJam hanekomu: you don't think Perl 5 is a creole?
20:49 TheHarlot I hate making use of tenses in English. Hate, hate, hate! Especially since I have started looking into German, Mandarin and Japanese
20:49 TimToady every language has its warnts
20:49 hanekomu PerlJam: there's more than one way to do it, but there's only one perl interpreter
20:49 TheHarlot TimToady, well, try explaining temporal mechanics in English.
20:49 TimToady *warts
20:49 moritz_ the usage of tenses in English isn't so much different from German
20:49 TheHarlot moritz_, my understanding was German has more tenses though
20:50 TimToady since I have not idea what temporal mechanics are, it's will be difficult for me to explain them in any language
20:50 TimToady *it
20:50 TimToady if you want lots of tenses, try classical Greek
20:50 hanekomu TimToady: English isn't my native language, so I'm not even sure what "will have been going" means... Does it mean "before X, he will have been going to Y" or some such?
20:50 TimToady (using the word "tense" loosely)
20:50 TheHarlot TimToady, uh, well, lets say I enjoy analyzing and thinking about plot elements of Dr. Who, Torchwood, Back To The Future--and most stuff from the Discordians.
20:51 TheHarlot Though, conveying what exactly happened, is next to impossible in english.
20:51 TheHarlot Or, if it is possible, only in the least elegant manners.
20:51 TheHarlot It also sucks for planning stuff.
20:52 TheHarlot As I tend to plan for different opportunities. And, the inability to give solid tenses in those plans is irritating in English.
20:52 colomon Range.pick fixed locally, starting spectest ASAP.
20:52 TimToady hanekomu: by point X in the future, it will be the case that he is already going, and is still going at point X
20:52 PerlJam The world needs less tenseness, not more :)
20:52 sorear when you call English a creole, are you referring to the Norman Invasion and related events?
20:52 TimToady but English mixes up its tense system with its aspect system rather badly
20:53 TimToady sorear: among other things
20:53 TheHarlot PerlJam, well, by adding proper tension to the English language, you will remove some chaos.
20:53 PerlJam TheHarlot: but I *like* chaos!
20:53 TheHarlot PerlJam, well, yeah--but that chaos will appear in other, better uses of it.
20:53 TimToady the craziest thing about English is that it borrowed its *pronoun* system from the Vikings
20:54 TheHarlot As now, you no longer have all that perfectly good chaos being wasted on order of events, you can now spend it on better things.
20:55 TheHarlot too many people are worried about the conservation of energy, the conservation of matter... what about the conservation of insanity?
20:55 * hanekomu looks at a table of english tenses
20:55 hanekomu The horror...
20:55 TimToady http://rosettacode.org/wiki/Discordian_date#Perl_6
20:55 PerlJam Hmm.  I don't think I want to conserve insanity.  Seems better to spend insanity freely.
20:56 TheHarlot we need a way to more inefficiently use the insanity we all have.
20:56 hanekomu But it seems to me that in Japanese you can use auxiliary verbs to get to some of those tenses
20:56 TheHarlot PerlJam, the thing is, we are only given a small amount of madness. We need to make the best use of it.
20:56 hanekomu though IANAL (I Am Not A Linguist)
20:56 TimToady well, Japanese slices their verb system much differently than English
20:57 TheHarlot We lose our madness by wasting it on describing order of events--we do not have that madness for other truly crazy things!
20:57 donaldh joined #perl6
20:58 * sorear wonders if hanekomu is a native
20:58 donaldh_ joined #perl6
20:58 hanekomu native German speaker, yes
20:58 hanekomu :P
20:58 TimToady hanekomu: it's true that you can convey any idea if you work at it; the differences between languages are more in what you have to say, not it what you can say
20:58 hanekomu true
20:59 donaldh__ joined #perl6
20:59 * PerlJam wonders what you have to say to talk about future events in a language with no future tense
20:59 * TimToady wonders why hanekomu's feathers are crowded...
20:59 sorear PerlJam: that depends on what you mean by "no future tense"
21:00 sorear Japanese has neither a present tense nor a future tense, but rather a single not-past tense
21:00 TheHarlot TimToady, well, newspeak and duckspeak do have things you cannot say in them. But that only applies to people in Great Britain, and other Orwellian countires.
21:00 Tene I expect people in here will find this interesting; http://www.guardian.co.uk/books/2010/nov/07/tom-lubbock-brain-tumour-language
21:00 hanekomu TimToady: feathers? crowded? what? :)
21:00 sorear if you want to say that something will happen tomorrow, you use the word for tomorrow + not-past tense
21:00 TimToady 羽はねhanefeather; plume; wing
21:00 hanekomu ah that :)
21:00 TheHarlot PerlJam, oh, you set the stage. "this is tomorrow", and work from there in your sentence.
21:00 TimToady 込む 混むこむkomuto be crowded
21:01 hanekomu it's a Go term
21:01 hanekomu http://senseis.xmp.net/?Hanekomi
21:01 sorear TimToady: oooh, what's that from?
21:01 hanekomu sorear: from this: http://search.cpan.org/~marcel/?R=D
21:01 TimToady a version of Jdict that has been rendered greppable
21:01 hanekomu oh
21:01 hanekomu nice
21:02 donaldh left #perl6
21:02 donaldh__ is now known as donaldh
21:02 hanekomu other "hane" actually
21:02 TheHarlot hanekomu, ah! You may be the person to talk to in a month or so, when I have Jerl 6 at a point, that I can use it to put stuff onto the Android Market.... as one think the Driod market is missing, is a good Go game.
21:02 donaldh_ left #perl6
21:02 sorear TheHarlot: Jerl 6?
21:03 TimToady more like a "wing" kind of hane
21:03 TheHarlot sorear, Perl 6 for the JVM.
21:03 sorear TheHarlot: how far along are you?
21:03 MindosCheng 羽翼
21:03 TheHarlot sorear, sorry, I have not mentioned it in here in forever, and I have done nothing on it.
21:03 TimToady or maybe from haneru
21:03 TheHarlot What being normal and all (my SNAFU life)
21:04 hanekomu TimToady: yes
21:04 TheHarlot sorear, however, I am in a state, that I am getting stuff pushed out on the two main components for it. libNIMh and Java Kitty. Java Kitty being a JVM Dead Cat Hub Thingy.
21:05 TimToady that's one of those verbs that, though it uses several different kanji, I rather suspect are related etymologically
21:05 TheHarlot (I have no better way to describe how Java Kitty relates to the JVM)
21:05 hanekomu A "hane" move in Go is usually translated as a "bend"; it means to bend around the opponent's stone. But I guess it's more like "jump in front of the opponent, blocking his way". This would fit well with the 込む part.
21:07 TheHarlot rakudo: my $x = 0; while $x < 10 { $x++; next}
21:07 p6eval rakudo 015d77:  ( no output )
21:07 TimToady I'd guess it's 跳ねる, to jump; to leap; to prance; to spring up; to bound; to hop
21:07 TheHarlot rakudo: my $x = 0; while $x < 10 { $x++; continue; }
21:07 p6eval rakudo 015d77: OUTPUT«Could not find sub &continue␤  in main program body at line 22:/tmp/WIwtDm64Di␤»
21:07 hanekomu TimToady: yes
21:07 TheHarlot ah... it is next I want, definitely.
21:07 TimToady as in a "jump" in checkers, kinda
21:09 TimToady TheHarlot: if you're partly insane, you've come to the right place
21:09 hanekomu :)
21:09 TimToady it's part of our mandate here to figure out how to put our collective insanities to good use
21:10 TimToady and if you're differently insane from the rest of us, all the better
21:11 * diakopter warnts a nap
21:12 TheHarlot TimToady, I have been her before. Under the name "KatrinaTheLamia"... I am just using this, because my shell is currently not here (for about ten days). I may^H^H^H should update irssi to join this channel again.
21:13 TheHarlot been here before*
21:13 TheHarlot I am going with this, as I cannot be bothered to set up this IRC client properly. Laziness really.
21:13 sorear hane is also translated as hook or bend
21:13 timbunce joined #perl6
21:13 hanekomu "bend" fits
21:13 sorear my teacher used that word quite a lot when talking about drawing hiragana
21:14 TimToady probably because wings bend
21:14 sorear TheHarlot: what do libNIMh and Java Kitty do?  what kinds of stuff can Jerl6 programs do?
21:15 * sorear wants to compare niecza against it now
21:16 * TimToady now warnts a nap, and blame diakopter...
21:16 TimToady *s
21:17 * diakopter boorish/booring
21:18 hanekomu pretty sure now it's the "bend" meaning, since 跳ね (hane) is 젖힘 (jeotchim) in korean, coming from 젖히다 = bend (back).
21:18 * hanekomu is satisfied now. :)
21:18 diakopter er, and I don't mean the 2nd usage listed on urbandi********.***
21:19 sorear error: quantifier quantifies nothing
21:20 diakopter std: ???.?++
21:20 p6eval std a194beb: OUTPUT«ok 00:01 118m␤»
21:20 diakopter fix THAT
21:20 diakopter ;)
21:21 diakopter oooo
21:21 diakopter rakudo: ???.?++
21:21 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Method 'isa' not found for invocant of class 'Undef'␤»
21:21 timbunce left #perl6
21:22 TheHarlot rakudo: run("ls -F")
21:22 p6eval rakudo 015d77: OUTPUT«Operation not permitted in safe mode␤  in 'Safe::forbidden' at line 2:/tmp/I8nNGZFTB0␤  in main program body at line 22:/tmp/I8nNGZFTB0␤»
21:22 diakopter there are ways around that, but please don't :)
21:23 TheHarlot sorear, libNIMH is a set of frameworks for dealing with the OS, that I have gotten irritated with programming over and over.
21:24 TheHarlot sorear, Java Kitty is a set up for developing onto the JVM. It will allow debugging tools for Android, Applets, Servlets and what not. Running as a JVM, with multiple entrances.
21:25 TheHarlot sorear, Jerl 6, will be Perl 6, but targetting the JVM to compile onto. Having access to all the classfiles and what not a Java program would. With two versions, Jerl 6 written in C--which produces .class files and links them to Jerl6.jar. Jerl 6 will also have a version written in Jerl 6, that does not require a prior compile step to deploy.
21:26 lichtkind left #perl6
21:26 TheHarlot The steps to the final goal, of Jerl 6, compiling Perl 6 code a run time, will be to get a Jerl 6 compiler done in C--then produce another Jerl 6 compiler--but done in Perl 6.
21:26 dual left #perl6
21:26 sorear TheHarlot: what about the present tense?
21:27 TheHarlot it is mostly me blasting hot air.
21:27 diakopter jnthn: do you have AutoCrlf or SafeCrlf (or neither) set in your .git/config
21:28 TheHarlot libNIMH has a set of prototype header functions--but the have not been defined. Though, that is mostly a matter of pointer arthemetic for its entirety to define
21:28 moritz_ colomon++
21:29 rindolf rakudo: 10000000000000000000000000000000000000000000003
21:29 TheHarlot All the structures and prototypes are there... it is mostly about having the functions get/set and what not.
21:29 p6eval rakudo 015d77:  ( no output )
21:29 rindolf rakudo: say 10000000000000000000000000000000000000000000003
21:29 p6eval rakudo 015d77: OUTPUT«8023796054858137603␤»
21:29 rindolf What is needed to add bignums to Rakudo?
21:30 dukeleto TheHarlot: you will have some fun representing dynamic language semantics in a mostly static virtual machine. Do you have any code in that direction?
21:30 sjohnson rindolf: that's a big number!
21:30 sjohnson rindolf: time
21:30 rindolf sjohnson: well, Math::GMP can handle it fine.
21:30 diakopter rindolf: if it were that simple to answer, someone would've written down the steps by now, I'd think :)
21:30 sjohnson sorear told me that they are comin around the mountain when they come.
21:30 rindolf sjohnson: I need this if I am to use Rakudo for Project Euler.
21:30 diakopter and riding six white horses.
21:31 sjohnson diakopter: :)
21:31 TheHarlot dukeleto, well, it should be easy (for me) to figure out. I mean. the JVM already has Clojure, Jython and JRuby on it.
21:31 timbunce joined #perl6
21:31 timbunce left #perl6
21:31 dukeleto TheHarlot: of course. I am sure it will be trivial.
21:32 TheHarlot dukeleto, there will be two versions, like I said, the compile object version, which will use CJerl6, and link it to Jerl6.jar. Then the one that compiles as your run the Jerl6 code. Which will be the J6Jerl6 compiler.
21:33 diakopter dukeleto: :)
21:33 TheHarlot My understanding is that Perl 6, is compiled, at some state in its running.
21:34 TheHarlot First I seperate that--which will cause issues, in the over all matter. Then, work to bring it back together, by the matter of writting a Perl 6 compiler in Perl 6.
21:34 PerlJam TheHarlot: just like Perl 5
21:35 TheHarlot Which, my understanding is, that Perl 6, is a "real" enough of a language, that it could be used to write a compiler for itself.
21:35 TheHarlot My other option, is to write a Perl 6 compiler in Java, Jython or JRuby... I think I made the best decision here.
21:36 dukeleto TheHarlot: i am sure you will find some holes in the spec, however you decide to implement it.
21:36 TheHarlot dukeleto, well, yeah... that is why the spec is not a waterfall spec, but a washing machine spec.
21:36 TheHarlot or something to that effect.
21:37 TheHarlot I am aware Perl 6 does have a .net port in some stage. And Rakudo, is a port to parrot... which parrot is a more FlOSS version of .net and JVM (well, an equivalent idea).
21:39 TheHarlot Though, once I can get the J6Jerl6 compiler, there is little reason to need the CJerl6 one--as that mostly exists as a bootstrap for the most part.
21:39 dukeleto TheHarlot: perl 6 and parrot were the same project in 2000, and later split.
21:39 diakopter [dish-]washing machines are often connected to garbage disposals
21:39 TheHarlot well, yes... my understanding is parrot was more of a virtual machine.
21:39 TheHarlot diakopter++
21:40 dukeleto TheHarlot: if your work could provide a layer of converting JVM bytecode to Perl 6 and back, the parrot project would be very intereted in that
21:40 diakopter TheHarlot: "once I can get the J6Jerl6 compiler" - I'm just curious... what's your "person-hours" estimate on this... decimal order of magnitude
21:41 rindolf left #perl6
21:41 TheHarlot dukeleto, I am aware, that Parrot started off nearly complete connect to Perl 6. However, the JVM did start off as part of Java. And, I will look into that... however ClassFile to Perl 6 is not going to look pretty in the least bit.
21:42 TheHarlot diakopter, that... well, lets say working five to eight hours a day. five days a week--not expecting it in less than ten to fifteen weeks.
21:42 TheHarlot and that is on the J6Jerl6 compiler alone.
21:42 diakopter let's break it down a little
21:42 diakopter how much of that is the parser/grammar engine
21:42 TheHarlot Nothing on CJerl6, nothing of Java Kitty, nothing on libNIMH.
21:42 _kaare left #perl6
21:43 TheHarlot diakopter, I was not going to break it down, until I got close enough to start the J6Jerl6 portion.
21:43 TheHarlot diakopter, I am still working on the Java Kitty portion.
21:43 diakopter ... which begs the question: how can you estimate 15 weeks ...
21:44 dukeleto TheHarlot: i am not worried about how ugly the code is, but Parrot is interested in Parrot Bytecode <--> JVM bytecode interop
21:44 TheHarlot diakopter, well 8 * 5  * 15.
21:44 diakopter TheHarlot: 15 weeks.
21:44 TheHarlot diakopter, this is based on other projects I have put code into, and how quick the code base filled up.
21:44 dukeleto TheHarlot: so if you do something that provides that, parrot is interested. If you can give us perl 6 from jvm bytecode, we can turn that perl 6 into parrot bytecode or PIR/PASM/NQP-rx/whatever
21:44 diakopter ok
21:45 TheHarlot diakopter, I should have reasonable knowledge of JVM from Java Kitty at that point, and Perl 6 from CJerl6 at that point.
21:46 TheHarlot It is mostly a matter of implementation, and I doubt that there is more than 600 hours worth of typing, to get up to what the specs say on that date.
21:46 diakopter uh-huh
21:47 dukeleto TheHarlot: i am very interested to see this happen. Good luck on this important journey.
21:47 TheHarlot diakopter, look, if it sounds like I am full of shit here, it is because you asked the wrong question.
21:47 diakopter and nobody ever has to think while not typing
21:47 TheHarlot diakopter, again, if I sound full of shit here, it is because you are asking the wrong questions.
21:47 diakopter so answer the right ones :P
21:47 TheHarlot there are two steps before that, you can ask for time frames on.
21:48 sorear I've been hacking niecza for 20 weeks now, and the road ahead is at least as long as the road behind me
21:48 PerlJam 600 person hours spread across 5 years?  :)
21:48 diakopter I don't think you're full of shit; I was curious what your expectation is about the project's size.
21:49 dukeleto TheHarlot: I think everyone wants your ideas to work. We are just skeptical of the timeframes. But please, prove us wrong :)
21:49 spinclad joined #perl6
21:49 TheHarlot diakopter, PerlJam: well, the back end to my  C JVM compiler setup, that reasonably any language could use (plans for MUMPs, Python 3, Python 2.6 are in the future), are still variable in time. I am hoping to get something out in a month--maybe 2... but that is assuming things do not go horribly wrong here.
21:49 TheHarlot Even then, that time frame could be horridly wrong.
21:50 TheHarlot The next step, CJerl6, I honestly could not give a reasonable time frame, and can only promise to shoe out code over the while I figure that out.
21:50 TheHarlot Then, J6Jerl6, which requires me to have completely both Java Kitty and CJerl6, should be no problem.
21:51 TheHarlot The J6Jerl6 step is not the problem. It is the two directly before it that are the doozy.
21:51 dalek rakudo: 94b52d1 | colomon++ | src/core/Range.pm:
21:51 dalek rakudo: Add back in Range.pick multi which takes no arguments, as it is a huge optimization for large Ranges.
21:51 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/94b52d15a3324a8d9eb4b403a041718a2edcc944
21:51 diakopter TheHarlot: it sounds like you have a reasonable overall architecture planned out; might I interest you in contributing to the JVM backend of 6model?
21:52 TheHarlot 6model? I will look into that then.
21:52 diakopter mberends has been working on it as of late
21:53 TheHarlot anyways--right now, I am hungry, and will be heading to the store for food.
21:55 TheHarlot and, in full honesty, none of you accused me of being full of shit--but if I saw somebody responding the way I did, I probably would suspect the person was full of shit. If only due to a flawed line of questioning.
22:00 XaRDaX Another question for you... How can I write in a SOCKET? In perl5 was print SOCKET ARGS but in p6 doesn't work. Any suggestions?
22:04 moritz_ probably $socket.print('foo')
22:04 snarkyboojum_ is now known as snarkyboojum
22:05 PerlJam are sockets even implemented?
22:05 jnthn Yes
22:05 XaRDaX yes
22:06 XaRDaX found it! $socket.send();
22:07 PerlJam shows how much I've paid attention to such things  :)
22:08 jnthn Well, you should listen() more :P
22:15 kjeldahl left #perl6
22:17 MindosCheng rakudo: say #`[早安]"Morning!"
22:17 p6eval rakudo 015d77: OUTPUT«Morning!␤»
22:19 Cyberhawk joined #perl6
22:19 Cyberhawk left #perl6
22:20 jlaire left #perl6
22:21 dalek niecza: 5c951ff | sorear++ | / (3 files):
22:21 dalek niecza: Re-merge
22:21 dalek niecza: review: https://github.com/sorear/niecza/commit/5c951ff4d5cf962b37d8758dae7336537053b0ff
22:21 dalek niecza: fe957ea | sorear++ | lib/ (2 files):
22:21 dalek niecza: Implement lexer subclass reuse optimization
22:21 dalek niecza: review: https://github.com/sorear/niecza/commit/fe957ea9875674ac090ecd3e0fb1c03f83e97548
22:23 sorear so now niecza-compiled STD can process most of (STD's) CORE.setting without hitting swap
22:23 MindosCheng sorear++
22:24 sorear I see I still need 'import'
22:26 jlaire joined #perl6
22:32 mj41 left #perl6
22:34 masak joined #perl6
22:35 masak blog post! http://strangelyconsistent.org/blog/november-16-2010-the-polite-revolt
22:35 masak rakudo: sub foo($x? is rw) { $x = "OH HAI" }; foo()
22:35 p6eval rakudo 015d77: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'foo' at line 22:/tmp/rnAMWYBIfS␤  in main program body at line 22:/tmp/rnAMWYBIfS␤»
22:35 masak discuss.
22:35 * masak submits rakudobug
22:35 Tene masak: http://www.guardian.co.uk/books/2010/nov/07/tom-lubbock-brain-tumour-language
22:35 * masak looks
22:37 Tene masak: A third of the way through or so, I was thinking "Could he use 'is copy' instead?" :)
22:38 Tene masak: I agree in that I expect rw defaults to be a copy/assign.
22:39 Tene masak: Shouldn't be too hard to fix, I expect.
22:39 masak Tene: oh, good.
22:39 hanekomu left #perl6
22:39 satyavvd left #perl6
22:40 Tene I mean, the functionality is obviously already there, as 'is copy' can do it fine, so you'd just look at what's different in the PAST, etc.
22:41 masak I had the same thought.
22:41 colomon rakudo: say "hi"
22:41 p6eval rakudo 015d77: OUTPUT«hi␤»
22:42 jnthn akshually probably an easy-ish binder patch.
22:42 masak \o/
22:42 colomon errr... p6eval's rakudo is from Nov 13th.  :\
22:43 lichtkind joined #perl6
22:43 lichtkind is .defineda method any scalar has?
22:43 jnthn It's in Mu
22:43 jnthn So everything has it pretty much.
22:45 lichtkind thank you
22:45 masak Tene: so far, the article is sad and intriguing at the same time.
22:45 lichtkind jnthn: i now start to really work on my grant
22:47 masak (Dan Kogai)++ # "Real Life on Earth is base-4 coded :-p"
22:48 lichtkind can i say in english Hashmethods ?
22:48 lichtkind or hash methods
22:49 satyavvd joined #perl6
22:53 lichtkind masak: i didnt got it :)
22:54 masak lichtkind: the joke about Real Life and base 4?
22:54 lichtkind yes
22:54 masak lichtkind: didn't your parents tell you about the birds and the genes?
22:55 lichtkind no :)
22:55 masak sorry, as a biologist I sometimes take these things for granted.
22:56 masak lichtkind: every cell in your body contains gigabytes of DNA information. it is base-4-coded.
22:56 lichtkind i alway thought since they are only 2 pairs of acids its actually digital
22:56 masak so maybe giganibbles is more accurate...
22:56 lichtkind but you say the order matters?
22:57 masak it's "digital" regardless.
22:57 masak digital only means that it's isomorphic to numbers.
22:57 lichtkind with digital i mean base 2
22:57 masak lichtkind: well, stop that :)
22:57 lichtkind you mean a g-t is different to an t-g pair?
22:57 masak lichtkind: yes.
22:58 masak lichtkind: the "meaning" emerges during translation, which looks at only one strand at a time.
22:58 lichtkind im more a fan of epigenetics anyway
22:58 masak which means that all four of the acgt bases are significant.
22:59 lichtkind yeah
23:00 * masak is a bit exhausted from the misunderstanding density in the above few lines
23:00 MindosCheng If one string is AAATCG it can encoded as 000123, and the complementary string is CGATTT 230111
23:00 MindosCheng , for example.
23:00 masak MindosCheng: that's not complementary, that's reverse-complementary.
23:00 MindosCheng masak: sorry.
23:01 dukeleto dna and relatives are in base 4. Proteins are in base 20, which makes more lots of fun combinations.
23:01 dukeleto s/more lots/lots more/
23:01 * dukeleto was using stack-based thinking for bit there
23:01 masak :)
23:02 masak and the mapping is from (RNA) base triplets to amino acids, so there's a theoretical max of 64 possible amino acids. but the mapping is "degenerate" which means that (just as with Perl 6 enums) you sometimes end up on the same output starting from different inputs.
23:03 masak the mapping is called "The Genetic Code" and was successively uncovered in the sixties.
23:04 masak since then, people have consistently mistaken the DNA sequence for the Genetic Code, so it was probably a bad name in retrospect. :P
23:05 TheHarlot okay--final question, then I can head off: how do I properly escape variables before shoving them off to run("")?
23:06 masak rakudo: my $variables = '$x $y $z'; say $variables.perl
23:06 p6eval rakudo 015d77: OUTPUT«"\$x \$y \$z"␤»
23:06 masak you mean like that?
23:08 jnthn masak: Making 'is rw' assigny with default values does kinda break the "it's binding if there is a value" symmetry.
23:09 jnthn masak: Though maybe usefulness beats that here.
23:09 masak jnthn: yes, I touch upon that in my blog post.
23:09 jnthn masak: I don't feel especially strong either way at first blush.
23:09 jnthn Would be interested to see TimToady++'s opinion.
23:09 masak aye.
23:10 masak but I agree that it's a question of model purity versus convenience.
23:10 jnthn masak: The one to consider is if we can ever get something weird out of
23:10 XaRDaX too few positional arguments: 2 passed, 3 (or more) expected -> Is that a bug?
23:10 masak XaRDaX: yes. were you using .subst?
23:10 jnthn my $a = ...stuff...; sub foo($x is rw = $a) { ... }
23:11 XaRDaX no
23:11 jnthn Is there a case where binding vs assignment of $a here would cause issues?
23:11 masak jnthn: I was thinking there might be a good reason for it being binding, for example when the default is a sub call.
23:11 jnthn Well, or a variable like in the above case.
23:11 masak maybe those boil down to the same thing, yes.
23:11 jnthn It may have interesting implications if it's an l-value sub too.
23:11 masak XaRDaX: then perhaps share a bit more of what you're doing in a nopaste?
23:12 XaRDaX ok
23:12 jnthn masak: I think leaving it as binding is the conservative thing to do and - to me - the least surprising. But it seems you've got surprised the other way around. And my views on the binder doing surprising things are doubtlessly tainted by having written the thing. :)
23:13 XaRDaX http://pastebin.com/FDwzuiqD
23:13 masak jnthn: this is exactly the feedback I hoped to get from you.
23:13 masak jnthn: how do you feel about a special case for literals, as Tene++ suggested?
23:13 * masak looks at XaRDaX's paste
23:14 jnthn Oh, I thought we fixed the "variable not declared gives the argument error" bug?
23:14 TheHarlot masak, more, I have a variable that contains characters like () and " ". I want to have those escape, so they can be fed as a file name.
23:14 jnthn XaRDaX: What Rakudo are you running?
23:14 envi joined #perl6
23:14 jnthn XaRDaX: Looks like $sock is undeclared.
23:14 jnthn XaRDaX: Not at all keen.
23:14 jnthn gah
23:14 jnthn masak: ^^
23:14 XaRDaX rakuto 2010.10
23:15 jnthn XaRDaX: OK, I think we fixed it in master. It crashes when reporting the error.
23:15 XaRDaX downloaded 3 hours ago
23:15 jnthn Yes, but released last month :)
23:15 XaRDaX :D
23:15 TheHarlot like a file named "12 - Frank Zappa Stink Foot(The pood slippers).mp3" for a fictional example. If that was in $track and I ran run("mplayer $track"); mplayer is going to WTF?!
23:15 jnthn XaRDaX: Anyway, I think you need a "my" at line 11
23:15 masak TheHarlot: try using .trans with the substitutions you want to apply to the string.
23:16 masak TheHarlot: S05 has the scoop on .trans, right at the bottom.
23:16 TheHarlot ah.
23:16 masak .trans is nice, because it lets you do several substitutions at once, and you don't have to worry about the order they're to be made in.
23:16 jnthn rakudo: $x = 42
23:16 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Symbol '$x' not predeclared in <anonymous> (/tmp/Yez_Wcgutn:22)␤»
23:17 jnthn XaRDaX: It should do something like the above. I bet if you try that program with the undeclared variable, you'll get the same error.
23:17 jnthn er, as in, the same one you got before
23:17 XaRDaX yes same error
23:18 TheHarlot rakudo: my $the_answer = 5
23:18 p6eval rakudo 015d77:  ( no output )
23:18 TheHarlot XaRDaX, put my in front of your undeclared variable.
23:18 TheHarlot rakudo: my $the_answer ::= 5
23:18 p6eval rakudo 015d77:  ( no output )
23:19 XaRDaX TheHarlot: I did but i got the same error
23:19 masak XaRDaX: are you running a non-new version of Rakudo?
23:19 TheHarlot XaRDaX, what line is the issue being reported on?
23:20 XaRDaX This is Rakudo Perl 6, version 2010.10 built on parrot 2.9.1
23:22 jnthn masak: October release, was mentioned above.
23:22 jnthn masak: I'm pretty sure the bug was fixed since the last release.
23:22 XaRDaX I've added my ($host,$port,$nick); in the line before the method
23:23 TheHarlot is the error now being reported on the line you added that "my" statement?
23:24 XaRDaX no line specification in the error
23:24 XaRDaX that's strange
23:24 TheHarlot okay...
23:24 jnthn XaRDaX: The error is totally bogus. It's an error that occurs when trying to report the real error.
23:25 jnthn XaRDaX: The latest git master has it fixed, and 2010.11 will be out in not so long :)
23:26 mavrc left #perl6
23:26 XaRDaX jnthn: this mean that there's a real error in my code.
23:26 TheHarlot Symbol '@dir_list' not predeclared in load_songs (musical.p6:39) << btw, the line number is directly after the file name.
23:26 * TheHarlot removed a "my" from her code.
23:26 jnthn XaRDaX: Correct
23:27 jnthn XaRDaX: You need to write my $sock = IO::Socket::INET.new();
23:27 jnthn you have just $sock = IO::Socket::INET.new();
23:27 jnthn Without the my
23:27 jnthn If you add that my to what you pasted at http://pastebin.com/FDwzuiqD it should be fine.
23:29 XaRDaX http://pastebin.com/gm041Ukw -> still not working
23:30 jnthn What error now? Same one?
23:30 XaRDaX yes same old error
23:30 * MindosCheng try to install Rakudo Star
23:31 jnthn XaRDaX: Oh!
23:31 jnthn You use $sock in method join too
23:31 jnthn XaRDaX: Did you not want to make it an attribute?
23:31 jnthn has $!sock;
23:32 jnthn So you can share it between the methods
23:32 XaRDaX argh i didn't saw that
23:32 TheHarlot masak, is doing $blah.trans( / <-alpha> | <-digit> / => "\$/"); going to return the results I want? Or am I doing something buggy?
23:32 XaRDaX hahaha
23:33 XaRDaX yaww!!! It's working now!
23:33 jnthn \o/
23:33 jnthn XaRDaX++
23:33 masak TheHarlot: that regex looks fishy.
23:33 XaRDaX what a stupid error... thank's jnthn
23:33 masak TheHarlot: first, use C<||>, not C<|> for now.
23:34 XaRDaX jnthn++
23:34 masak TheHarlot: second, seems your two alternatives cover all possible characters between themselves.
23:34 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / [ <-alpha> || <-digit> ] / => "\\$/");
23:34 p6eval rakudo 015d77: OUTPUT«I want ty (ypen) yyu and EAT yyu␤»
23:34 masak heh :)
23:34 masak that [] is entirely redundant.
23:35 masak also -- wtf happened there?
23:35 Chillance left #perl6
23:35 masak "yyu"?
23:35 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / <space> || <symbol> / => "\\$/");
23:35 p6eval rakudo 015d77: OUTPUT«I want ty (ypen) yyu and EAT yyu␤»
23:35 TheHarlot okay... this... this is an error report.
23:35 colomon that's o => y, isn't it?
23:36 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / \s / => "\\$/");
23:36 p6eval rakudo 015d77: OUTPUT«I want ty (ypen) yyu and EAT yyu␤»
23:36 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / \s / => "\\\\$/");
23:36 p6eval rakudo 015d77: OUTPUT«I want tn (npen) ynu and EAT ynu␤»
23:36 TheHarlot colomon, I want to take anything that is not a letter or number, and put a "\" infront of it.
23:37 TheHarlot that is what I asked masak prior. He suggested trans... I have never been able to use tr/// even in the Perl 5 days... so... yeah.
23:38 masak TheHarlot: I mean .trans with strings even on the lhs.
23:38 masak TheHarlot: I'm guessing the results we're seeing is due to the regex stringifying.
23:38 masak rakudo: say ~//
23:38 p6eval rakudo 015d77: OUTPUT«===SORRY!===␤Null regex not allowed at line 22, near ""␤»
23:38 masak rakudo: say ~/./
23:38 p6eval rakudo 015d77: OUTPUT«_block124␤»
23:38 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell ~~ trans( / \s / => "\\$/");
23:38 p6eval rakudo 015d77: OUTPUT«Could not find sub &trans␤  in main program body at line 22:/tmp/JC1F9MNi4g␤»
23:39 TheHarlot rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell ~ trans( / \s / => "\\$/");
23:39 p6eval rakudo 015d77: OUTPUT«Could not find sub &trans␤  in main program body at line 22:/tmp/IrQNw6RikJ␤»
23:39 jnthn rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.subst(/\W/, { "\\$/" })
23:39 p6eval rakudo 015d77: OUTPUT«I\Any()want to (open) you and EAT you␤»
23:39 jnthn uh
23:39 jnthn rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.subst(/\W/, { "\\$_" }, :g)
23:39 p6eval rakudo 015d77: OUTPUT«I\ want\ to\ \(open\)\ you\ and\ EAT\ you␤»
23:39 jnthn there
23:39 masak right.
23:39 TheHarlot thank you jnthn
23:40 colomon rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.comb(/./).map({when /<alpha>/ { $_ }; when / <digit> / { $_ }; "\\" ~ $_ }).join
23:40 p6eval rakudo 015d77: OUTPUT«I\ want\ to\ \(open\)\ you\ and\ EAT\ you␤»
23:40 masak rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( [" ", "(", ")"] => ["\\ ", "\\(", "\\)"] )
23:40 p6eval rakudo 015d77: OUTPUT«I\ want\ to\ \(open\)\ you\ and\ EAT\ you␤»
23:40 colomon jnthn++'s version is better, but I already had mine halfway typed at the time.
23:40 masak that's what I meant by "use .trans".
23:41 TheHarlot masak, that mostly requires me to think of all the scenarios I may come across in file names
23:42 TheHarlot which would have me reading the bash, sh, tcsh, ksh, etc manpages...
23:42 jnthn Having to read sucks.
23:42 jnthn ;)
23:42 masak TheHarlot: right. jnthn++'s solution is more robust in that sense.
23:42 TheHarlot which would probably have me find writing this in bash may be quicker =P
23:42 masak at least if backslashing all \W is harmless.
23:42 TheHarlot jnthn, or, I could just do anything not a letter or number--and do it the easy way.
23:43 TheHarlot masak, it is harmless, and makes it harder to get stuff in via my own oversight
23:43 jnthn \W is "not a letter or a number" pretty much...
23:44 florz TheHarlot: just don't call a shell?
23:44 TheHarlot well--unless people get rather creative with their file names. At which point an errantly named file could wipe my system.
23:44 TheHarlot florz, ah, I am saving time, by sending this stuff off to mplayer to deal with.
23:44 florz TheHarlot: yeah, just don't call a shell
23:45 florz TheHarlot: if you want to use mplayer, why are you calling a shell?
23:45 jnthn Yeah, I love that track. "Da Hakaz - I love to $(rm -rf /*) you all nite long"
23:45 TheHarlot florz, that would mean setting it up, so my Perl 6 script can handle anything...
23:45 TheHarlot ...
23:45 TheHarlot florz, other options?
23:45 florz TheHarlot: call mplayer?
23:45 TheHarlot how?
23:45 TheHarlot call("mplayer tracke")?
23:46 florz I don't have a clue how to (in perl 6, that is ;-), but I guess someone will
23:46 TheHarlot I got the notion to run("mplayer track"); by asking, "how do I run a command, then return to Perl 6 once done."
23:47 florz in perl 5 it would be system('mplayer','mplayer',$track);
23:47 florz dunno whether things work similarly in p6
23:47 Tene jnthn: whould there be a binding failure when you try to pass a ro value to an rw param?
23:48 jnthn Tene: I think there's meant to be.
23:48 Tene rakudo: sub foo($x is rw) { say $x }; foo(42);
23:48 p6eval rakudo 015d77: OUTPUT«42␤»
23:48 jnthn Tene: I'm not sure we do it...
23:48 XaRDaX while $irc.sock {say $irc.sock.recv();} Is that the right way to read the socket?
23:48 Tene jnthn: then allowing a constant as a default value for an rw param should be an error if it means binding.
23:48 jnthn Tene: Yes, there is that
23:48 jnthn Tene: We could even pick up the obvious cases at compile time.
23:49 TheHarlot jnthn, yeah... at least with the current escaping, that (the song "Da Hakaz - I love to $(rm -rf /*)" is not a big issue. Though, even adding slashes does not remove the possbility of that happening via other ways. People have gotten creative enough in the XSS world, that I do not image it is still not an issue.
23:50 TheHarlot florz, well, run does work similarly to system. I suppose I could do run('mplayer','mplayer',$track);
23:50 florz TheHarlot: doesn't look like it, just tried it
23:51 masonkramer left #perl6
23:51 masak MindosCheng: oh, you're from .tw? nice! it's one of the Mandarin-speaking areas I feel interested in visiting.
23:51 masonkramer joined #perl6
23:51 TheHarlot I never bothered with system in Perl 5. By the time I started coding in it (about ~2000... before then, I was still doing Perl 4), people had made enough bindings that I did not need to.
23:51 Tene TheHarlot: you should always do it the multiple-args way.
23:52 TheHarlot Tene, florz just said that did not seem to work.
23:52 florz at least in R* 10.09
23:52 Tene If you really want to allow injection, you should ask for it explicitly.  sub inject-me-harder($cmd) { system('bash', '-c', $cmd); }
23:52 Tene IMO
23:53 donaldh left #perl6
23:53 masak Tene: :P
23:54 jnthn Tene: Sounds like a good fit in S16...
23:54 jnthn ;)
23:54 * TheHarlot giggles
23:55 TheHarlot right... I am having issues finding the S... S16 you say?
23:55 colomon jnthn: my nqp-rx/nom error: https://gist.github.com/702754
23:55 masak TheHarlot: lucky you.
23:56 jnthn colomon: oh ouchee.
23:56 colomon jnthn: unfortunately (debugging-wise) I'm running off to the pub now...
23:56 Tene I would be pleased if Perl 6 didn't contain any simple 'pass this off to the shell' functions, but I expect others would disagree with me in the name of "Make easy things easy"
23:56 jnthn colomon: The pub is always fortunate!
23:56 Tene I'd really prefer it if you had to work to allow injection failures like that, though.
23:56 TheHarlot okay... S16 does not have what I am looking for.
23:57 TheHarlot Tene, yeah... I am not wanting to just pass it off.
23:57 colomon afk
23:57 TheHarlot I understand the dangers there in.
23:58 Tene TheHarlot: Lemme update my rakudo and see if I can help you.
23:58 TheHarlot oh, get the error that run() only accepts one argument
23:58 Tene ><
23:59 Tene yeah, looks like it does.  That's unfortunate.
23:59 TheHarlot This is Rakudo Perl 6, version 2010.09 built on parrot 2.8.0 << wonderful. We got an old version in the Fedora 14 repos.

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

Perl 6 | Reference Documentation | Rakudo