»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released! Set by diakopter on 6 September 2010. |
|||
muixirt | need sleep, bye | 00:00 | |
00:00
muixirt left
|
|||
masak | blog post! strangelyconsistent.org/blog/novemb...stuff-done | 00:00 | |
huf | i love your unrelated bits of history | 00:03 | |
are you living in china or studying chinese or what's the apropo? | 00:04 | ||
masak | the latter. | ||
Chinese history basically made me appreciate history :) | 00:05 | ||
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." | ||
Tene: but I thought that's what Parrot .... | 00:06 | ||
(or even reducing "better, more-accurately, and more-performantly" to "as good, as accurately, and as performantly") | |||
00:07
donaldh left,
XaRDaX left
00:08
hercynium left
|
|||
diakopter | Tene: or were you seriously considering Parrot in "current VM offerings"? | 00:08 | |
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? | ||
masak | diakopter: as opposed to how Rakudo has been progressing? :) | 00:10 | |
diakopter | touche (implicit accent) | ||
masak | ng in 2009-2010, jnthn's doing 6model now... | ||
TGE, nqp, nqp-rx... | 00:11 | ||
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
|
|||
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 | |
"plan to throw 3 or 4 away" | |||
diakopter | "plan to throw n-1 away" | 00:14 | |
masak | :D | ||
that's a tautology! | |||
diakopter | so's a tautology! | ||
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." -- www.xach.com/naggum/articles/316937...um.no.html | 00:17 | |
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. | ||
cotto_work: if diakopter won't be around, will you remain at work? :) | |||
cotto_work | yes | ||
masak | oh :) | 00:19 | |
cotto_work | I'm really hoping he's around. | ||
dukeleto | masak: That quote is especially true in academia. You would think these people would know something. But they don't. | ||
cotto_work | ;) | ||
diakopter | cotto_work: I'm 'round | ||
00:19
thundergnat joined
|
|||
masak | dukeleto: I know what you mean. I'm in it, too. | 00:19 | |
dukeleto: it's only when you find good scientific papers/articles that you realize how bad the rest really were. | |||
cotto_work | If you can't dazzle them with your brilliance... | 00:20 | |
00:21
stkowski left
|
|||
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:21 | |
00:23
Chillance left
|
|||
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. | ||
thundergnat | Hi #perl6. | 00:24 | |
dukeleto | thundergnat: welcome! | ||
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. | ||
thundergnat | Non -interdependent modules shouldn't care about their load order in a script should they? | 00:25 | |
Tene | thundergnat: that sounds right. | ||
thundergnat | I'm getting a bizarre error if I change the load order of two completely independent modules. | ||
00:26
sftp left
|
|||
Tene | thundergnat: what error? | 00:26 | |
00:26
risou joined
|
|||
masak | hi thundergnat. | 00:26 | |
thundergnat: I've had such errors as well. | 00:27 | ||
there's at least one (still open) bug report in RT about it. | |||
thundergnat | For my module Sort-Naturally 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. | ||
fails all tests | 00:28 | ||
masak | huh. | ||
masak tries | |||
thundergnat | tested on both windows XP and ubuntu linux | ||
masak | ah; here was the one I was thinking of: rt.perl.org/rt3/Ticket/Display.html?id=65738 | 00:29 | |
see if it's similar...? | |||
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). | ||
thundergnat | masak: looking... | 00:30 | |
00:30
risou left
|
|||
Tene | diakopter: Are any parrot people working on a Perl 6 compiler that emits x86 machine code? | 00:30 | |
dukeleto | Tene: not that I know of. | 00:31 | |
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 | ||
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:33 | |
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. | ||
making prescribed change now. | |||
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." | ||
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" | ||
diakopter | no, I did understand you correctly | ||
masak | thundergnat: either way, I would definitely say you have a bug here. | ||
thundergnat | Yeah, thats what I'm seeing. | 00:36 | |
masak | thundergnat: care to report it? | ||
thundergnat | I'm not sure how small a test case I can golf that down to though..... | ||
masak | I'm on it right now :) | 00:37 | |
00:39
pmb left
00:41
impious left
|
|||
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 | |
I can't make sense of that. | |||
thundergnat | I don't guarantee that I haven't done something completely insane. | 00:42 | |
masak | no, it looks ok. | 00:43 | |
thundergnat++ | |||
thundergnat: btw, you've got "conceivably" right, but seem to consistently misspell "yields". | 00:46 | ||
thundergnat | masak: sigh | ||
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 | |
oh! must be the operator. | |||
right. I can't just remove that from the .pm file. silly me. | |||
thundergnat: I have it golfed now. hang on. | 00:52 | ||
thundergnat: gist.github.com/701261 | 00:53 | ||
00:55
QinGW joined
00:57
mikehh joined
|
|||
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. :/ | ||
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. | ||
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 | ||
masak | thundergnat: yes, please do. | ||
mikehh: moritz_, who's the one likely to know more about this, went to bed about two hours ago. | |||
mikehh | masak: yeah, I should too, but will check with him later | 01:03 | |
masak: was testing parrot for the release on the morrow, but thought I would check rakudo and it gave me that problem | 01:05 | ||
masak | mikehh: thanks for checking. | ||
I'm glad to hear about this too, since I'm the release manager for Rakudo on Thursday :) | 01:06 | ||
masak heads to bed | |||
'night, #perl6! | |||
Tene | 'night | ||
thundergnat | night masak, thanks | ||
mikehh | cu, mee too | ||
masak | oh, right "n8" in German would be "nacht". that makes even more sense. | 01:07 | |
n8 :) | |||
01:07
masak left
01:11
jedai joined
01:13
rgrau left
01:39
thundergnat left
|
|||
colomon | ping jnthn | 01:52 | |
02:09
Teratogen joined
02:10
knewt2 joined
02:16
jaldhar joined
02:33
molaf_ joined,
mariano left
02:34
ch3ck3r joined
02:37
molaf left
02:39
ch3ck left
|
|||
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
02:57
meppl left
03:05
mindos1 left
03:15
whiteknight left
03:18
Alias joined
03:22
leprevost joined
03:27
masonkramer joined
03:37
kanishka joined
03:43
kanishka left
04:01
leprevost left
04:02
_xiaomo_ joined
04:05
justatheory joined
04:15
kanishka joined
04:18
_xiaomo_ left,
_xiaomo_ joined
04:19
kanishka left
04:32
nymacro joined
04:36
_xiaomo_ left
|
|||
sorear | good * #perl6 | 04:37 | |
phenny | sorear: 15 Nov 13:34Z <PhatEddy> tell sorear to check back here in irc when he has chance ... irclog.perlgeek.de/perl6/2010-11-15#i_2995501 | ||
04:45
kanishka joined
05:01
breinbaas left,
breinbaas joined
05:12
masonkramer left
|
|||
dalek | ecza: c135903 | sorear++ | / (4 files): Implement @*ARGS |
05:16 | |
sorear | I hear masak cannot write apps with my dialect | ||
this needs to be fixed | |||
05:18
kaare joined,
kaare is now known as Guest20775
05:25
huf joined
05:45
__rnddim__ joined,
kaare joined
05:46
kaare is now known as Guest36181
05:47
Lorn joined
05:48
Guest20775 left
05:49
nymacro left
06:04
__rnddim__ is now known as lue
|
|||
dalek | ecza: 3483ebc | sorear++ | v6/tryfile: [v6] Add command line processing to tryfile |
06:08 | |
06:13
agentzh joined
|
|||
dalek | kudo: f73bf4d | moritz++ | Configure.pl: fix comparison logic thinko in Configure.pl, mikehh++ |
06:21 | |
06:23
perigrin joined
06:37
cjk101010 left,
colomon left
06:41
bartolin joined
|
|||
sorear | good news: mono tryfile.exe CORE.setting starts | 06:49 | |
bad: it leaks memory. A lot. And it doesn't finish. | |||
dalek | ecza: 21f2eac | sorear++ | lib/Cursor.cs: Instrument Cursor to dump highwater movement |
06:50 | |
sorear | ... or, for that matter, make much progress. | 06:51 | |
06:56
wtw joined
07:12
ggoebel left
|
|||
dalek | p-rx: c4c31a1 | moritz++ | / (2 files): [configure] fix two thinkos |
07:18 | |
ch3ck3r | moins3n | 07:22 | |
07:24
ch3ck3r left
07:25
ch3ck joined
07:29
dukeleto joined
07:30
starcoder joined,
araujo joined
07:32
Guest36181 is now known as kaare_
|
|||
sorear | there's probably a better tool than 'less' for studying 0.9GB log files | 07:33 | |
dukeleto | sorear: cat ? | 07:34 | |
sorear: are you searching for a regex? | 07:35 | ||
sorear: ack usually makes life happier | |||
07:37
jfried joined
07:56
ch3ck left
08:01
colomon joined,
cjk101010 joined
|
|||
sorear | dukeleto: I'm more doing "interactive exploration" | 08:05 | |
and ack can't handle corpuses larger than 10-100 MB or so without becoming unusably slow | 08:06 | ||
this one is 875 MB | |||
niecza-compiled STD is falling into an infinite loop but I'm not quite sure *where* | 08:10 | ||
08:10
justatheory left
08:26
kjeldahl joined
08:28
Raynes joined,
satyavvd joined
|
|||
dalek | ecza: 29ec560 | sorear++ | lib/Kernel.cs: Add a *very* primitive statistical profiler |
08:34 | |
sorear | profiling++ | 08:36 | |
without this, I would never have noticed the actual problem | 08:37 | ||
I somehow managed to write an O(2^n) implementation of Cursor.lineof | |||
moritz_ | wow | 08:38 | |
that's... scary | |||
08:41
icwiener joined,
bbkr left
08:42
Trashlord joined
08:55
tzhs joined
09:11
kanishka left,
icwiener left
09:15
Woodi joined
09:19
icwiener joined
09:24
mikehh_ joined
09:26
mikehh left
09:29
kanishka joined
|
|||
dalek | ecza: 9912342 | sorear++ | v6/tryfile: [v6] Stop runaway backtracking in Cursor.lineof |
09:31 | |
ecza: 7b487ef | sorear++ | v6/tryfile: [v6] Fix readonly value assignment in package_def |
|||
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? | ||
moritz_ | jnthn: should I give everybody with a mu commit bit also access to nqp-rx? | 09:46 | |
jnthn | moritz_: I don't think so - or at least, not without asking pmichaud | 09:47 | |
moritz_ | ok | 09:48 | |
I just added colomon++ | |||
jnthn | Anyone with a Rakudo commit bit is certainly fine though. | ||
moritz_++ | |||
moritz_ | I can't easily tie the two together, because rakudo has another account | ||
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. | ||
Just that anyone who's trusted enough to have a Rakudo commit bit is certainly trusted enough to have an nqp-rx one :) | |||
dalek | ast: e0961ad | moritz++ | S (4 files): unfudge some tests for rakudo, including tests for RT #64474 |
09:51 | |
sorear | S (4 files) | 09:52 | |
hehehe | |||
how is roast going to look in the future, once niecza is running spectests? | |||
moritz_ | sorear: it'll probably have #?niecza markers too | 09:53 | |
just like it pugs and rakudo markers for some time | |||
sorear | yes, but | 09:54 | |
there's currently nothing like a ROAST_REVISION | |||
so if I add new tests, rakudo will break | |||
moritz_ | you can be so kind to add them as skipped for rakudo | 09:55 | |
or you just break rakudo, and some rakudo devs fudge it | |||
sorear | would there be a general rule that new roast tests get fudges for all other major implementations? | 09:56 | |
well, implementations that care | |||
moritz_ | I guess we'll just see how it works out, and deduct rules when it seems necessary | ||
sorear | good plan | 09:57 | |
moritz_ | I don't expect huge edit wars, or an exponential growth of number of perl 6 compilers :-) | ||
sorear | hehehe. | ||
RT79242 is wtf-y | 09:59 | ||
moritz_ | indeed | 10:00 | |
10:03
QinGW left
10:08
rindolf joined
|
|||
rindolf | PackFile_unpack: This Parrot cannot read bytecode files with version 9.1. ==> what should I do about it? | 10:08 | |
Hi all, BTW. | |||
moritz_ | rindolf: remove the old parrot, and all files it generated | 10:09 | |
and compile a new one instead | |||
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) | ||
sorear | go to #parrot and complain that their handling of installing into /usr/local is utterly broken | ||
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 | |||
sorear | that works? impressibe | 10:12 | |
moritz_ | it works as long as the install location is known at configure time | 10:13 | |
10:14
ddwagnz joined
10:15
ddwagnz left
|
|||
rindolf | moritz_: I did Rakudo perl Configure.pl --gen-parrot. | 10:15 | |
moritz_: it should have installed everything into parrot_install | |||
moritz_ | rindolf: right. Then you might need to rm -rf parrot_install; make realclean | ||
rindolf | moritz_: make realclean where? | 10:16 | |
moritz_ | in rakudo | ||
and since your parrot copy is probably still svn, rm -rf parrot/ too | |||
rindolf | moritz_: I already have a fresh git checkout there. | 10:17 | |
moritz_ | then you don't need that step. | ||
rindolf | moritz_: in ./parrot/ I mean. | ||
Trashlord | hi rindolf | ||
rindolf | Hi Trashlord | ||
sorear | hello | 10:18 | |
when in doubt, git clean -dxff | |||
Trashlord | I gotta go to work at 2pm to replace someone | ||
rindolf | Trashlord: ah. | ||
Trashlord | yeah, kinda sucks, but oh well, it's only for like 2 hours or so | ||
moritz_ | Trashlord: when is the last time you contributed something Perl 6 related to this channel? | ||
sorear | how very uncharacteristic of you | 10:19 | |
didn't you write a hugbot once? | |||
rindolf | There's a Perl 6 lecture today by szabgab as part of www.lambda.org.il/ | ||
Trashlord | moritz_: I think a few months ago | 10:20 | |
moritz_ | Trashlord: please try to keep your signal/noise ratio high | ||
well, raise it, it's not high at the moment :-) | |||
10:21
dakkar joined
|
|||
Trashlord | moritz_: alright then | 10:22 | |
10:23
sftp joined
|
|||
sorear is trying to implement .comb and running into "a" !~~ /./ | 10:32 | ||
moritz_ | huh? | 10:33 | |
your . seems pretty selective | |||
sorear | some kind of deep brokenness | ||
I had a bug the other day where . wouldn't match unassigned codepoints | |||
10:35
mavrc joined
10:47
timbunce joined
|
|||
sorear | niecza: for [1,2,3] -> $x { say $x.dump } | 10:48 | |
p6eval | niecza 7b487ef: OUTPUT«123» | ||
moritz_ | niecza: for (1,2,3) -> $x { say $x.dump } | ||
p6eval | niecza 7b487ef: OUTPUT«123» | ||
moritz_ | the latter is correct, the former not | ||
dalek | ecza: cbbbd07 | sorear++ | src/Op.pm: Fix for loops ignoring argument flattiness |
10:49 | |
moritz_ | rakudo: for [1, 2, 3] -> $x {say $x } | ||
p6eval | rakudo 015d77: OUTPUT«1 2 3» | ||
sorear | yeah | ||
that was the actual bug | |||
a loop in .comb was stripping off too many levels of listiness | |||
/./ returns a single match with no positional captures, it's sort of like [] | 10:50 | ||
previous versions of the regex engine returned ([],) instead, but I've optimized that... exposing the for bug | |||
dalek | ecza: 6ca0209 | sorear++ | test3.pl: Add a prototype of Cool.comb |
10:55 | |
ecza: 78407bb | sorear++ | v6/tryfile: [v6] Add enum support |
|||
10:59
meppl joined
11:04
mavrc left
11:05
mavrc joined
|
|||
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 | ||
..mainline … | |||
moritz_ | rakudo: my %h; %h<a> = (%h<a> = 5); say %h.perl | ||
p6eval | rakudo 015d77: OUTPUT«{"a" => 5}» | ||
moritz_ wouldn't be surprised if rakudo blew up too | |||
11:11
sftp_ joined,
sftp left
|
|||
sorear | rakudo doens't blow up because rakudo is missing an internal sanity check | 11:12 | |
only, now that STD has hit it I wonder if it may be me that is insane | |||
moritz_ | what makes you think that it's missing a check? | ||
sorear | in that expression, both instances of %h<a> are evaluated before either assignment | ||
they both create independant variables with WHENCE closures to slot themselves in | 11:13 | ||
my WHENCE closures check that nobody else has put in a value in the meantime | |||
moritz_ | rakudo: my %h; %h<a> = 2 *(%h<a> = 5); say %h.perl | ||
p6eval | rakudo 015d77: OUTPUT«{"a" => 10}» | ||
moritz_ | seems pretty correct to me | 11:14 | |
sorear | rakudo: my %h; %h<x> += (%h<x> = 5); say %h.perl | ||
p6eval | rakudo 015d77: OUTPUT«{"x" => 5}» | ||
moritz_ | seems correct too | ||
as long as there's no user visible misbehavior, I maintain that rakudo is correct here | 11:16 | ||
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}» | ||
moritz_ | sorear: please put those in the test suite | 11:18 | |
sorear | moritz_: what's correct? | ||
moritz_ | so far they all looked correct to me | ||
sorear | even the last one? | ||
moritz_ | wait, no | ||
11:19
daxim joined
|
|||
moritz_ | hm | 11:19 | |
not sure | |||
sorear | the issue is Perl 6's lazy autovivification | ||
moritz_ | it creates a new autovivification closure | ||
sorear | %h doesn't know about $x | ||
so %h<a> = 5 sets a new slot, not the nascent one in $x | |||
moritz_ | then $x++ is correct to store 1 in %h<a>, no? | 11:20 | |
or should it know about the 5? | |||
after double confusion, I think that 1 might be correct | 11:21 | ||
sorear | that's the problem - I don't know | ||
1 is the easy answer | |||
moritz_ | but I'm not sure either | ||
sorear | but not the POLS one | ||
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:22 | |
dalek | ecza: 1f49178 | sorear++ | v6/tryfile: [v6] Add trait parser |
11:27 | |
11:27
ggoebel joined
|
|||
dalek | ecza: 40ac1ca | sorear++ | v6/tryfile: [v6] Removed a sanity check that did more harm %hash<key> = (%hash<key> = 5) is now accepted, despite being on somewhat shaky ground in S09. Some other variations violate POLS; see irclog.perlgeek.de/perl6/2010-11-16#i_2998697 . |
11:30 | |
11:31
jedai left
11:36
ch3ck joined
|
|||
sorear calls it a night | 11:36 | ||
11:38
rindolf left
11:43
satyavvd left
|
|||
colomon | jnthn: I wasn't clear, sorry. I fixed the makefile problem, then the build failed afterward. | 11:50 | |
11:51
masonkramer joined
11:56
jedai joined
|
|||
colomon | and then I cleverly blew away the entire directory instead of keeping it around so I could send you the problem :\ | 12:04 | |
I'll try to start again after my walk this morning. | |||
12:15
sftp_ left
|
|||
jnthn | colomon: ah, ok | 12:18 | |
Would need to see how it failed | |||
Maybe some *nix silliness. :) | |||
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:19 | |
moritz_ | colomon: fwiw you now have a commit bit to nqp-rx | 12:21 | |
colomon | moritz_++ | ||
github actually let me know. | |||
(and I saw it in the backlog, too.) | 12:22 | ||
off to walk. | 12:27 | ||
12:27
masak joined
|
|||
masak | oh hai, #perl6! | 12:27 | |
colomon | but, err... you installed a curling app on my phone?! | ||
jnthn | yayitsmasak! | 12:28 | |
12:28
orafu left,
orafu joined
|
|||
colomon | wow, big time wrong window there. | 12:28 | |
masak has not touched my phone. :) | 12:29 | ||
moritz_ | lolitsmasak! | ||
masak | colomon: I'm glad we agree. | ||
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 :-) | ||
masak | good idea. | 12:32 | |
moritz_++ | |||
moritz_ | $ bzgrep 'masak submits rakudobug' *.bz2|wc -l | 12:37 | |
696 | |||
that's in the directory of the #perl6 logs, obviously | 12:38 | ||
masak | heh :) | 12:41 | |
12:43
[particle]1 joined
|
|||
masak | anyone seen this? search.cpan.org/dist/Whatever/lib/Whatever.pm | 12:44 | |
12:47
[particle] left
|
|||
takadonet | morning all | 12:51 | |
masak | takadonet: \o | 12:54 | |
takadonet | masak: how are u? | ||
masak | takadonet: well rested. I wish I could be both well rested and sleep on the right side of the morning, though. | 12:55 | |
and u? | |||
takadonet | hacking on my big perl 5 project and made another round of commit on Text-Tabs-Wrap | 12:56 | |
masak | \o/ | 12:57 | |
how's Text-Tabs-Wrap coming along? | |||
I see it has three medals on modules.perl6.org :) | 12:58 | ||
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 | ||
masak | nice. | 13:00 | |
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:01 | ||
takadonet | masak: probably in the future | 13:02 | |
masak | sure, no pressure. | 13:03 | |
13:08
agentzh left
|
|||
takadonet | there is... | 13:08 | |
heh | |||
13:15
nothingmuch joined
|
|||
masak | thundergnat++'s 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:15 | |
also, we're over 800 new/open tickets now. | 13:16 | ||
takadonet | should start closing them? | ||
masak | yes, I think the time has come to close at least some of them. | 13:17 | |
but I guess there's a bit of a bell-on-cat problem. | |||
and I do respect the core devs' right to choose their priorities. | 13:18 | ||
13:20
_xiaomo_ joined
|
|||
jnthn | ENOTENOUGHCOREDEVS | 13:20 | |
13:21
MayDaniel joined
13:22
Woodi left,
PerlPilot joined
13:23
Patterner left
|
|||
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:24 | |
13:28
risou joined
13:29
Woodi joined
|
|||
masak | takadonet: and that's just as important, as thundergnat's bug report shows. | 13:29 | |
takadonet | masak: I know | 13:30 | |
side note the program meld is the best thing since slice bread when porting a module | 13:32 | ||
13:34
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
colomon | meld? | 13:34 | |
13:35
MayDaniel left
|
|||
takadonet | meld.sourceforge.net/ | 13:36 | |
best way to compare two or third files to see what is different | |||
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 | ||
so print the input before a function and after for both version of the module then see what is different | 13:41 | ||
masak | interesting. | ||
sounds fairly complementary to tests. | 13:42 | ||
takadonet | even after if /else | ||
makes it easier to do small steps | |||
well I use it in conjunction with tests | 13:43 | ||
masak | right, that's what I mean. | ||
takadonet | now having trouble.... appending a "\n" to every element of an array | ||
masak | see if I understand this: you put debug statements in both the Perl 5 and the Perl 6 code? | ||
takadonet | rakudo: my @arr= <'b,'a','c'>; @arr>>~>>"\n" ; @arr.say | 13:44 | |
p6eval | rakudo 015d77: OUTPUT«'b,'a','c'» | ||
takadonet | yes | ||
I download the module so I don't mess around my system version of it | |||
masak | takadonet: you're not assigning to anything there. | ||
takadonet | ... | ||
takadonet needs more coffee | |||
masak | rakudo: my @arr= <'b,'a','c'>; say @arr>>~>>"\n" | ||
p6eval | rakudo 015d77: OUTPUT«'b,'a','c'» | ||
masak | hm. | 13:45 | |
oh right. only one element in that array. | |||
takadonet | .. | 13:46 | |
masak | elements inside <> are separated by whitespace. | ||
not commas. | |||
takadonet | ya ya.... man really do need that coffee | 13:47 | |
13:47
kanishka left
|
|||
masak | alester: re "It won't happen, so there's no point in discussing it." from perlbuzz.com/2010/11/progressing-vs...gging.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:53 | |
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:54 | ||
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. | 13:56 | ||
14:00
kanishka joined,
nothingmuch left
|
|||
takadonet | is their an 'easy' way to append "\n" to every element of the array but the last one? | 14:04 | |
masak | what about the edge case, when the array is empty? | 14:05 | |
14:05
_xiaomo_ left
|
|||
takadonet | SHOULD not have an array empty | 14:06 | |
but if they are, will check beforehand and skip the step | |||
masak | rakudo: my @a = <a b c>; @a[0 ..^ *-1] >>~=<< "\n"; say @a.perl | 14:07 | |
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
masak submits rakudobug | |||
colomon | rakudobug for that? | 14:08 | |
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"]» | ||
masak | colomon: locally, I get a stack overflow. | ||
takadonet: that work for you? | |||
colomon | but do you think it is correct? | ||
masak | colomon: no, you're right. | ||
rakudo: my @a = <a b c>; @a[0 ..^ *-1] >>~=>> "\n"; say @a.perl | 14:10 | ||
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
colomon | you're mixing positional whatever with range whatever | ||
masak | oh, I can't do that? | ||
colomon | probably shouldn't stack overflow, but... | ||
masak | I totally thought I could. | ||
it feels so natural. | |||
rakudo: my @a = <a b c>; @a[0 ..^ *-1] | 14:11 | ||
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
colomon | well, do you know if it is (0 ..^ *) - 1 or 0 ..^ (*-1) (for starters) | ||
? | |||
masak | I'm assuming the latter, for precedence reasons. | ||
colomon | and if it is the later, you're making a Range with an Int on one side and a closure on the other | ||
masak | so? | ||
that's what WhateverCode is; a closure. | 14:12 | ||
I don't see the fundamental difference to ordinaty ranging with Whatever. | |||
colomon | ranges don't participate in WhateverCode, do they? | ||
masak | I don't know. | ||
colomon | Certainly 1..* does not generate a closure | 14:13 | |
masak | S09:245 has @array[0 .. *-1] as an example of valid slicings. | 14:14 | |
14:15
mikehh_ is now known as mikehh
|
|||
masak | that line in S09 is due to someone with the nick 'lwall'. | 14:15 | |
colomon | never heard of | ||
'em | |||
masak | :) | ||
14:17
rgrau joined
|
|||
colomon | where is WhateverCode covered in the spec? | 14:18 | |
(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]
|
|||
takadonet | masak: perfect. All my | 14:19 | |
all my | |||
... | |||
masak | jnthn: that's why I expected. | ||
takadonet | all my 'meld' test are good now | ||
masak | s/why/that/ | ||
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:20 | ||
14:21
plainhao joined
|
|||
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" | ||
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 | ||
masak | colomon: even though S09 says it should work? | ||
14:22
KyleHa joined
|
|||
colomon | masak: the spec is known to have errors | 14:22 | |
masak | KyleHa! \o/ | ||
colomon: but it would *suck* if this didn't work! | |||
KyleHa | Howdy Masak! | ||
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. | ||
masak: TimToady++ is a genius, but he does make mistakes. | |||
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 | |
and if I won't be able to write [0 .. *-1], I'll fork and make my own Perl 6. | |||
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. | ||
takadonet | well we will ask TimToady when he is in | 14:27 | |
anyway back to hacking... | |||
masak | I don't see why this even needs deferral to TimToady. he already wrote in S09 how it should wokr. | 14:28 | |
s/wokr/work/ | |||
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:30 | ||
& | 14:31 | ||
14:33
Raynes left
14:34
kjeldahl left
|
|||
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? | ||
alester | masak: As far as I'm concerned, any discussion of "Perl 6 should actually be called X" is wasted breath. | ||
Teratogen | and does this extend to the math library? | ||
flussence | Yes and Yes. | ||
rakudo: atan2(3i) | 14:38 | ||
p6eval | rakudo 015d77: OUTPUT«atan2 is only defined for Reals, you have a Complex()» | ||
colomon | jnthn: I think I can see where to modify the source to make masak happy | ||
rakudo: atan(3i) | |||
p6eval | rakudo 015d77: ( no output ) | ||
colomon | rakudo: say atan(3i) | ||
p6eval | rakudo 015d77: OUTPUT«1.5707963267949 + 0.346573590279973i» | 14:39 | |
14:40
Raynes joined
|
|||
colomon | jnthn: just not 100% convinced it is a good idea | 14:40 | |
14:40
KyleHa left
|
|||
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:45 | |
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. | ||
does @list xx *-1 make any sense? | 14:47 | ||
flussence | I rationalise it as shorthand for @a[*].Int - 1 | ||
14:50
KyleHa joined
14:53
kaare_ left
|
|||
colomon | bah, compiling rakudo takes too long | 14:54 | |
either that or I really really broke it... | |||
oh, builds and passes make test | 14:59 | ||
but if I try 0..*-1 | 15:00 | ||
"set_number_native() not implemented in class 'Num'" | |||
any ideas what that might mean? | |||
15:06
zby_ joined,
zby_ left
15:09
PerlPilot is now known as PerlJam
15:10
PerlJam left,
PerlJam joined
15:14
satyavvd joined
|
|||
colomon | jnthn, pmichaud_: ping? | 15:16 | |
15:17
timbunce left
15:18
oyse joined,
silug left
15:20
satyavvd left,
satyavvd joined,
wtw left
15:24
am0c joined
15:25
oyse left
15:30
plobsing left
15:32
zby joined
15:38
MayDaniel joined
15:43
plobsing joined
15:48
justatheory joined
|
|||
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:48 | |
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 | ||
it's not just a case of "ooh, wouldn't it be nice if...?" | |||
colomon | masak: yes, I understand all that. | ||
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 | ||
PerlJam | colomon: isn't that the Perl Way :) | ||
colomon | and you don't seem to be considering that these are completely general features | ||
15:51
jaldhar left
|
|||
masak | colomon: I don't *care* how they combine. | 15:51 | |
15:51
jaldhar joined
|
|||
colomon | for instance, the spec says that Feb..* is the same as Feb..Dec | 15:52 | |
masak | fsvo "the same". | ||
colomon | what the heck should Feb..*-1 do? | ||
PerlJam | Feb..Nov of course | ||
masak | that's a good, but unrelated, question. | ||
colomon | it's completely related | ||
masak | no, I'm not talking about enums. | ||
colomon | because what you've just asked is that Feb..*-1 return closure | ||
return a WhateverCode, specifically | 15:53 | ||
masak | *sigh* | ||
there should be a word for when a user comes to a dev, expecting sympathy, but getting internals-speak instead. | |||
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? | ||
masak | if it doesn't work with our current model, we need a new model. | ||
colomon: everything about how .[0 .. *-1] translates into "all elements except the last one" is, by definition, details about the internals. | 15:56 | ||
colomon | but what 0 .. *-1 returns is NOT about internals | 15:57 | |
PerlJam | masak: given that, I'm having a hard time reconciling how colomon's enum example is "unrelated" | 15:58 | |
masak | PerlJam: it's not completely unrelated, but it's not about array indices any more. | 15:59 | |
PerlJam | okay | ||
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 | |
16:00
plobsing_ joined
16:01
plobsing left
|
|||
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! | ||
it looks like it does, that's all. | |||
masak | it doesn't fall out naturally in Rakudo. | 16:02 | |
that's the problem. | |||
colomon | no, it doesn't fall out naturally in perl 6 | ||
masak | I disagree. | ||
colomon | that's the entire point of the enum example. | ||
masak | please explain. | ||
colomon | Why does [*-1] work? Because it generates a WhateverCode. | 16:04 | |
Why does [1..*] work? Because Ranges are intersected with array bounds, more or less. | |||
masak | "intersected with array bounds"? | 16:05 | |
flussence | "clamped to"? | ||
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" | ||
colomon | "clamped to", yes. | ||
masak | colomon: what PerlJam said. | ||
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. | ||
colomon | but to build a consistent language, you have to have a REASON it works. | ||
masak | colomon: with my user hat on I don't much care. | ||
16:06
MayDaniel_ joined
|
|||
colomon | So, it makes sense to say, well, if you pass a WhateverCode to a Range, it autocurries the Range. | 16:07 | |
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. | ||
PerlJam | s/it works/it should work/ | ||
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
|
|||
colomon | that's not rakudo. that's perl 6 | 16:09 | |
masak | oh? | ||
@a[ *-1 ] not being a purely syntactic thing is in the spec? | 16:10 | ||
16:10
MayDaniel left
|
|||
colomon | *-1 generating a WhateverCode closure is Perl 6 | 16:10 | |
masak | that's different. | ||
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." | ||
that's S02 | 16:11 | ||
masak | huh. ok. | ||
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:12 | ||
16:13
MindosCheng joined
|
|||
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:13
bluescreen joined
|
|||
masak | awesome and per spec. | 16:14 | |
16:14
bluescreen left
|
|||
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 | |
and what about something like @a[*/2 .. *-1] ? | |||
masak | I don't consider Feb..*-1 that unreasonable, fwiw. | ||
16:15
envi left
|
|||
colomon | Feb .. *-1 returning a WhateverCode, you mean? | 16:15 | |
masak | colomon: I have objections to */2, but only on a code-maintenance level. | ||
colomon: whatever it *returns*, I'd expect it to *mean* Feb..Nov (like PerlJam said), or be illegal. | |||
if it's illegal, there should be an overwhelming reason for it being illegal, for example that it's unimplementable. | 16:16 | ||
16:16
tzhs left
|
|||
masak | or that it's implementable, but it can't be made fast. | 16:16 | |
diakopter | I want @a[but last] to work ;) | 16:18 | |
masak | all is fair if you predeclare. ;) | ||
TimToady | note that there's no guarantee that Foo .. Bar will represent a 0..^$n range | ||
if Jan == 1 then you can't subscript an array with it, assuming Jan is the first element | 16:19 | ||
colomon | hmmm... I guess I mean * div 2, btw. | 16:20 | |
PerlJam | colomon: */2 would work | ||
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) | ||
TimToady | there's also no guarantee of uniqueness in enums--what if Bar - 1 has two enums mapped to it? | ||
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,
risou_ joined
|
|||
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:22 | |
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 } | ||
masak | this is what I meant by enums being an interesting but unrelated question. | ||
16:23
[particle] left,
[particle]1 is now known as [particle]
|
|||
colomon hopes TimToady++ has a brilliant way of making this all work | 16:23 | ||
16:23
risou left
|
|||
TimToady | well, I think you folks are misreading S09 | 16:24 | |
the implication goes the other way | |||
colomon | and if you don't like @a[*/2 .. *-1], consider @a[*-3 .. *-1] | ||
jnthn | colomon: I'm mostly confused by that error. :/ | 16:25 | |
masak | colomon: I would expect @a[*-3 .. *-1] to work too. | ||
colomon: and yes, that's inconsistent with how * works in other contexts. | |||
TimToady | assuming subscripts can note the arity of the WhateverCode they get | ||
masak | hm, that'd help. | ||
jnthn | colomon: It feels like an attempt to mutable an immutable thing is happening but I'm still surprised it's that error. | ||
colomon | jnthn: context is that's what happened when I tried to allow WhateverCode arguments to autocurry for Range and sequence operators. | 16:26 | |
jnthn: gist.github.com/702012 | |||
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. | ||
TimToady | moritz_: maybe you're thinking of HyperWhatever? | ||
moritz_ | yes | 16:29 | |
TimToady | for @a[*-3 .. *-1] to work, subscripting would notice a 2-arity and feed the size as two arguments | ||
colomon | I see the @array[*-3..*-1] example is actually in S09 | ||
16:30
rbuels joined
|
|||
TimToady | or, wild idea, or maybe autocurrying should default the second arg to the first | 16:30 | |
that might be in the category of six impossible things before breakfast though | 16:31 | ||
colomon | that actually seems kind of sensible to me. | 16:32 | |
I guess it might be dangerous in other contexts. | |||
TimToady | that wouldn't help the folks who want * * * to square a number in a sequence operator though | ||
16:33
XaRDaX joined
|
|||
colomon | actually, that's the best reason NOT to default the second arg to the first | 16:33 | |
because it would only add to the chaos if (* * *)(3) was nine, but 1, 2, * * * ... * was 1 * 2 | 16:34 | ||
(so 1, 2, 4, 8, etc instead of 1, 2, 4, 16, 256, etc) | 16:35 | ||
TimToady | well, the arity detection probably belongs in the subscriptor | 16:36 | |
colomon | +1 | ||
masak | I think things are magical enough as they are without things defaulting to things. | ||
colomon | TimToady: so, do you have a notion how @a[1..*-1] works? | ||
TimToady | exactly as specced | ||
1..*-1 returns a WhateverCode | |||
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 | ||
colomon | no, I think S02 contradicts this | ||
or at least, explicitly says it doesn't have to work in the general case, with no mention of the Range operator specific case | |||
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." | ||
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 | ||
that's an argument from silence | |||
dalek | ecs: c0b0845 | duff++ | S09-data.pod: Spring before Summer usually :) |
16:40 | |
TimToady | all operators autocurry a WhateverCode, whether or not they curry a Whatever | ||
colomon | really???? | ||
dalek | ecs: 8b43df0 | duff++ | S09-data.pod: random errant "or" |
||
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? | ||
so $a = *-1 does not assign a WhateverCode to the variable $a? | |||
TimToady | assignment isn't really a binary operator | 16:42 | |
masak | PerlJam: nice catch with Spring and Summer. github.com/perl6/specs/commit/c0b0...cf56f13a20 | ||
TimToady | neither is ~~ | ||
masak | PerlJam: but what is that extra 'or' doing there? | ||
PerlJam | masak: it's gone now. | ||
masak | oki :) | ||
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 | ||
and there are operators like .. that autocurry WhateverCode but not Whatever | 16:44 | ||
colomon | and what are those operators? | ||
TimToady | the ones that prefer to interpret a bare * as "to infinity and beyond!" | 16:45 | |
such as xx | |||
colomon | (and so the user will get confused by Feb .. *-1 but @a[0..*-1] works as expected. seems reasonable to me.) | ||
TimToady | Feb .. *-1 will only do what is expected if the enum is 0-based | 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} ? | ||
colomon | TimToady: and you're trying to use it as a subscript | ||
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 | ||
colomon | (as I said, I think that's a reasonable hole) | ||
TimToady | though they are often used to represent them | ||
however, if you say Feb .. Dec - 1 you might get 2..11 | 16:49 | ||
or 1..10 if 0-based | |||
using * when you know the final value is a bit silly in any case | |||
why wouldn't they just write Feb .. Nov? | 16:50 | ||
most enums are declarative | |||
PerlJam | :q | ||
colomon | TimToady: they could be writing something like Feb .. *-$a | ||
PerlJam looks for generative enums | 16:51 | ||
.oO(I thought all enums were declarative) |
|||
colomon | I'm just trying to explore where the magic happens. | ||
16:51
mila_ joined
|
|||
colomon | anyway, my patch for making [0..*-1] work is waiting on jnthn to explain why it fails miserably... | 16:52 | |
16:55
mila__ left,
sftp joined
|
|||
PerlJam | Perl 6 has this way of making things that I thought were simple suddenly seem very complex. :) | 16:57 | |
masak .oO( all I wanted was to recline in this nice waterbed ) | 16:58 | ||
MindosCheng | masak: I finally understand what is .oO( ) notation... | 16:59 | |
masak | MindosCheng: :) | 17:00 | |
PerlJam | Does the following work? gist.github.com/702034 | ||
masak | I can see how it could; don't know whether it does. | 17:01 | |
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:02 | |
TimToady | how can that possibly work if all the enums map to 1? | 17:03 | |
dukeleto | This is pretty cool: search.cpan.org/dist/Whatever/lib/Whatever.pm | ||
masak | dukeleto: yeah, found that one earlier today :) | ||
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. | ||
dukeleto: on the language level, Perl 5 recently got given/when. | |||
moritz_ | why can't they both be sisters and competitors? :-) | ||
17:05
stkowski joined
|
|||
masak | moritz_++ :) | 17:06 | |
moritz_ | masak: and say(), ~~, // and others | ||
masak | right. | ||
moritz_ | I mean, I used to compete with my brother and sister all the time | ||
takadonet | well it's time to 'steal' their cpan module! | ||
masak | and Regexp::Grammars. | ||
PerlJam | TimToady: I don't understand how "mapped to 1" related to their use as indices. | ||
TimToady | that essentially gives them the same identity | ||
unlike a Set, where the 1 would indicate existence | 17:07 | ||
PerlJam | okay, that makes sense then. | ||
masak | TimToady: so the mapping in enums essentially allows the user to give the same value several names? | ||
TimToady | that is how enums are typically defined | ||
masak | right. | 17:08 | |
TimToady | they're really just a shorthand for constant declarations | ||
PerlJam | so, could @calendar{Jan;1;9} also be written as @calendar{1;1;9} ? | ||
TimToady | yes, if Jan == 1 | 17:09 | |
frettled | I'm no. 1, yes. | 17:11 | |
What? Oh, you were monthing. :) | |||
TimToady | .oO(nick encapsulation violation) |
||
I find it very strange that English allows "no." as an abbreviation for "number"; obviously some history there... | 17:12 | ||
frettled | It makes for some excellent ambiguity. | 17:13 | |
TimToady | no. | ||
masak | :P | ||
frettled | Up is my no. | 17:16 | |
diakopter | o. no. no. no. | ||
17:22
risou joined
|
|||
TimToady | I'll be going down so. for the holidays. | 17:24 | |
17:24
risou_ left
|
|||
masak | diakopter: your pun is so.ewhat obscure :P | 17:25 | |
17:26
Bzek left
17:27
silug joined
17:28
Bzek joined
|
|||
dalek | ecs: 977d920 | TimToady++ | S02-bits.pod: [S02] clarify * vs *-1 semantics for globbish ops Globbish ops like .. and xx do not autocurry on Whatever but do autocurry on WhateverCode. Also mention that assignment and smartmatching don't autocurry because they're primitive pseudo-operators. |
17:29 | |
masak | \o/ | 17:30 | |
17:30
kanishka joined
|
|||
diakopter | yay | 17:34 | |
"laid out in memory contiguously without pointer indirection" | |||
yay "assignment ... syntactic sugar for underlying primitive" | 17:35 | ||
colomon | TimToady++ | 17:38 | |
#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
17:42
takadonet joined
|
|||
masak | oh dear, phasers. gotta go nom. & | 17:42 | |
17:42
masak left
17:44
Axius joined
|
|||
jnthn home | 17:48 | ||
17:49
Axius_ joined
17:50
Axius left
17:51
am0c left
17:53
zb joined,
kanishka left
|
|||
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:54 | |
jnthn | colomon: OK, I should be about a bit. | 17:55 | |
colomon | gist.github.com/702012 is the code change that lead to the set_number_native error | 17:58 | |
anything obviously wrong with it? | |||
17:58
MayDaniel_ left
17:59
cjk101010 left
18:00
dakkar left
|
|||
jnthn | colomon: Any chance of a diff? | 18:00 | |
<-- lazy ;) | |||
18:01
Axius_ left
|
|||
jnthn | Also when does teh error occur? | 18:01 | |
colomon | it's not going to do you any good... | ||
jnthn | Runtime? Compile time? | ||
colomon | gist.github.com/702174 | ||
18:02
cdarroch joined,
cdarroch left,
cdarroch joined
|
|||
colomon | getting the error in the REPL when I send it 0..*-1 | 18:02 | |
(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:03 | ||
jnthn | ah, I see the aim... | 18:04 | |
But if you do e.g. --target=pir does it produce output? | 18:06 | ||
e.g. is this actually dying because of the generated code, or while generating it? | |||
18:07
impious joined
|
|||
jnthn | colomon: I understand what the patch is doing now | 18:07 | |
colomon: And it doesn't look wrong in any way that's obvious to me. | |||
(The checking logic looks right, anyways.) | 18:08 | ||
colomon | \o/ | 18:10 | |
of course, an obvious error causing problems would be easier to debug | |||
Wynne:rakudo colomon$ perl6 --target=pir | 18:11 | ||
> 0..*-1 | |||
set_number_native() not implemented in class 'Num' | |||
so dying generating code, I think? | |||
jnthn | Looks like it. :S | 18:14 | |
sorear | good * #perl6 | ||
jnthn | o/ sorear | ||
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? | ||
jnthn | pir::say("# lolz fail"); will work in Actions.pm easily enough. | 18:17 | |
colomon | can I make it "# lolz fail" ~ $/ ? | 18:18 | |
jnthn | aye | ||
maybe ~$/ | |||
(e.g. coerce match object to a string) | 18:19 | ||
just to be on the safe side | |||
sorear | @a[1..*] doesn't work because of a critical syntactic ambiguity | ||
jnthn | Going to sort out some noms pre-#phasers, bbiab | 18:20 | |
18:20
_kaare joined
|
|||
sorear | just use @a[{1..$^a}] | 18:20 | |
oh masak is gone | |||
colomon | sorear: you've got a lot of backlogging to catch up on there. :) | ||
takadonet | sorear: you will also see that I was the cause of it | 18:23 | |
18:23
risou_ joined
18:24
risou left
18:25
Chillance joined
|
|||
colomon | jnthn: looks like it is indeed properly getting past the conditionals and into the currying body | 18:25 | |
sorear | whee, done | 18:27 | |
18:28
molaf_ left
|
|||
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. | ||
grep. | |||
18:30
PerlJam left
18:33
impious left
18:34
kjeldahl joined
18:36
lichtkind joined
|
|||
lichtkind | hai | 18:36 | |
sjohnson | p6 masters, i was wondering if this very nice python example can be written as one complex statement as well. | 18:37 | |
www.pastie.org/1303259 | |||
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 | ||
in this python example, it is quite certain the int will be a BigNum too | |||
18:39
wamba joined
|
|||
takadonet | colomon: your up sir :) | 18:39 | |
18:40
wamba left,
wamba joined
|
|||
colomon | sjohnson: seems like you're talking about subst? | 18:41 | |
flussence | rakudo: say :16('09:f9:11'.comb(/<xdigit>+/).join) | ||
p6eval | rakudo 015d77: OUTPUT«653585» | ||
sjohnson | wow | ||
:16 | |||
i didnt know about that | |||
colomon | but yeah, unless I'm missing something, flussence++'s approach is much better than that python code there | 18:42 | |
errr, or maybe | 18:43 | ||
rakudo: say :16('09:f9:11'.subst(':', '', :g).join) | 18:44 | ||
p6eval | rakudo 015d77: OUTPUT«653585» | ||
colomon | whoops | ||
rakudo: say :16('09:f9:11'.subst(':', '', :g)) | |||
p6eval | rakudo 015d77: OUTPUT«653585» | ||
MindosCheng | Cool. | 18:45 | |
sjohnson | colomon: im surprised no one told me about subst | ||
maybe i asked on a different channel | |||
but the answers were mostly "you don't need it. use s///" :( | |||
so thanks for that | |||
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 | ||
flussence | the :16 is pretty non-obvious too | ||
(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? | ||
TimToady | it's special | ||
18:46
hudnix joined
|
|||
TimToady | sjohnson: recent P5 added /r to return the value | 18:46 | |
but the .subst vs .=subst is a P6ism | 18:47 | ||
sjohnson | im glad subst is around | ||
one of the few things i actually like about PHP | |||
another good thing about PHP is being able to push onto arrays using $array[] = $val; (square brackets) | |||
.oO(i like .push better tho) |
|||
MindosCheng | sjohnson : I like the $array[] = $val; thing :) | 18:48 | |
sjohnson | MindosCheng: don't forgot to do $a = array() before, otherwise it won't wokr | 18:49 | |
rakudo: my $house = "0843ffffffffffffewm".subst('f','aA'); say $house | 18:50 | ||
p6eval | rakudo 015d77: OUTPUT«0843aAfffffffffffewm» | ||
MindosCheng | sjohnson : Soga. | ||
sjohnson | oops | ||
rakudo: my $house = "0843ffffffffffffewm".subst('f','aA', :g); say $house | 18:51 | ||
flussence | That house isn't up to building code. | ||
p6eval | rakudo 015d77: OUTPUT«0843aAaAaAaAaAaAaAaAaAaAaAaAewm» | ||
sjohnson | thats better | ||
rakudo: say :g | |||
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» | ||
sjohnson | .oO( ????? ! ) |
||
moritz_ | rakudo: $*OUT.say(:g) | 18:52 | |
p6eval | rakudo 015d77: OUTPUT«» | ||
moritz_ | sub vs. methods | ||
sjohnson | is :g just a symbol that stands for some perl recognized integer on a big list of special numbers? | 18:53 | |
or some non-printable character that i can't see | |||
TimToady | it's a named arg that is being ignored by the method | ||
see S12:2099 | 18:54 | ||
18:55
KyleHa left,
KyleHa joined,
KyleHa left
|
|||
sjohnson | rakudo: say 0x65 | 18:56 | |
p6eval | rakudo 015d77: OUTPUT«101» | ||
sjohnson | whoops | ||
moritz_ | rakudo: say :g.perl | 18:57 | |
p6eval | rakudo 015d77: OUTPUT«"g" => Bool::True» | ||
MindosCheng | rakudo: $_='FFF'; s/F/Aa/g; say | ||
p6eval | rakudo 015d77: OUTPUT«===SORRY!===Unsupported use of /g; in Perl 6 please use :g at line 22, near "; say"» | ||
sjohnson | rakudo: say "mamama".subst('ma', 'mi', 1); | 18:58 | |
moritz_ | rakudo: $_='FFF'; s:g/F/Aa/; .say | ||
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» | ||
rakudo 015d77: OUTPUT«AaAaAa» | |||
colomon | #phasers in t-2 | ||
sjohnson | rakudo: say "mamama".subst('ma', 'mi', Bool::True); | ||
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» | ||
moritz_ | sjohnson: what do you want to express with the third argument? | ||
sjohnson | moritz_: just trying to reverse engineer p6 guts for learning purposes | 18:59 | |
MindosCheng | moritz_++ | ||
18:59
hudnix left
|
|||
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 :-) | ||
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
|
|||
colomon | jnthn: error is happening somewhere in the last two lines here: | 19:00 | |
if $right.returns eq 'WhateverCode' { | |||
$right_new := PAST::Op.new( :pasttype('call'), :node($/), $right); | |||
my $total_arity := $counter + $right.arity; | |||
19:03
MayDaniel joined
|
|||
jnthn | colomon: ...weird. | 19:03 | |
colomon | yes | ||
but "say" doesn't lie. ;) | |||
guess I can narrow it down to the line... | 19:04 | ||
19:04
hercynium joined
|
|||
sjohnson | TimToady: what are your current thoughts on p6 these days | 19:05 | |
in a broad "how's it going?" kind of sense | |||
MindosCheng reading historical documents in the middle night. | |||
19:05
[Coke] left
|
|||
hercynium needs to spend more time here :) | 19:06 | ||
sorear | hello | ||
MindosCheng | s/middle/mid/ | ||
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" | ||
sjohnson | haha | 19:08 | |
p6koans | |||
:) | 19:09 | ||
MindosCheng | hercynium++ | 19:10 | |
jnthn | colomon: Does this help: $total_arity := $counter + +$right.arity; | 19:12 | |
(if yes then, srsly eww.) | |||
colomon | my $total_arity := $counter + $right.arity; is definitely the line that is failing | ||
diakopter | +($right.arity) | ||
er | |||
jnthn | Same ;) | ||
colomon | not needed in p6, maybe needed in nqp? | 19:13 | |
jnthn | the parens? | ||
diakopter find coffee | |||
TimToady | what happens if $right doesn't have a .arity? | ||
jnthn | Oh wait, that's .arity on the PAST::Block | ||
MindosCheng was enlightened with the koan of lazy evaluation. | |||
jnthn | OK, REALLY wtf. :/ | 19:14 | |
TimToady hopes to be enlightened lazily... | |||
dalek | ecza: 13d3657 | sorear++ | v6/tryfile: [v6] fix order-of-operations bug in package_def |
19:15 | |
19:15
hudnix joined
|
|||
hercynium | TimToady: I tried that but without a restricted calorie diet it's impossible | 19:15 | |
diakopter | sorear: v6 ? | ||
sorear | where I'm trying to build the bootstrapped niecza | 19:17 | |
as opposed to the Perl 5 one | |||
I'm still just chasing STD.pm6 though | |||
*almost* there | |||
diakopter | oh | ||
colomon | jnthn: +$right.arity doesn't help | 19:19 | |
dalek | ecza: 4f1401b | sorear++ | docs/lhf.txt: Remove two stale LHF items |
19:20 | |
19:26
MayDaniel left,
masak joined
|
|||
jnthn | colomon: Um. Hmm. | 19:28 | |
jnthn is confused | |||
Util | Does NQP support .match and .subst as methods? I have only gotten them to work as subs. | ||
colomon | jnthn: not half as confused as I am | 19:29 | |
jnthn | What is $counter? | ||
colomon | 0 | ||
now counter 0 | |||
now right.arity 1 | |||
jnthn | Initialized as my $counter := 0; | ||
? | 19:30 | ||
colomon | (those are really +$counter and +$right.arity) | ||
recompiling to get ~$counter and ~$right.arity | 19:31 | ||
jnthn | maybe pir::typeof__SP($counter) too | 19:34 | |
I'm curious what the two things actually are | |||
colomon | still say 0 and 1 when ~ified | 19:36 | |
Lorn | repo? | ||
19:36
risou_ left,
rindolf joined
|
|||
colomon | jnthn: recompiling with typeof now | 19:37 | |
19:37
TheHarlot joined
|
|||
TheHarlot | okay... a few questions. Is it possible to do static variables in Perl 6 classes? If so, what sigil do I use? | 19:37 | |
jnthn | TheHarlot: Just declaring a lexical in the class body should have that effect. | 19:38 | |
(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. | ||
jnthn | e.g. use my | ||
No, slurp is only for files. | |||
TheHarlot | jnthn, ah, I was going to jump over to "our". | ||
jnthn | my @files = dir('/the/path') | ||
TheHarlot | ah, thank you. | 19:40 | |
jnthn | TheHarlot: Well, that is visible from outside teh class. | ||
TheHarlot: Depends how much encapsulation you want :) | |||
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. | ||
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 strangelyconsistent.org/blog/i-can-haz-constant | ||
TheHarlot | which gives the next issue: how do I call an outside program in Perl6, and return when that program exits. | ||
TimToady | I guess the only problem with "my" is if you need it modifiable from subclasses | ||
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. | ||
TheHarlot | er... c++ | ||
masak | s/should/should probably/ | ||
TheHarlot | thanks masak, jnthn and Larry ~.n | ||
jnthn | TimToady: Well, that's consistent with has attributes, which are also only visible inside the class :) | ||
colomon | jnthn: both types are Integer | ||
TimToady | TheHarlot: we have a "state" keyword that is like static | 19:44 | |
it makes a variable persistent across invocations | |||
TheHarlot | yeah, that is probably what I want. | ||
TimToady | but a class body is only invoked once, so it doesn't buy you anything | ||
TheHarlot | uh--does rakudo have a different version of perldoc, btw? | ||
TimToady | if you put it into a method body, though, it would persist | 19:45 | |
19:45
hanekomu joined
|
|||
TheHarlot | TimToady, a bit counter intuitive--but I could put it in a weight tracker method, I guess? | 19:45 | |
TimToady | you could | ||
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 | |||
well, intermixed I mean | |||
TheHarlot | which is not a pretty solution. | ||
TimToady | I don't think rakudo comes with a perldoc | ||
masak | TheHarlot: see S26 for Perl 6's variant of Pod. only a small part of it is in Rakudo so far. | ||
jnthn | colomon: As they should be. :S | 19:47 | |
masak | oh, the program? no, it doesn't. | ||
colomon | jnthn: I was afraid of that | ||
masak re-remembers u4x | |||
TheHarlot | masak, TimToady: I am mostly look for an easier way to rtfm on that one. | ||
colomon | jnthn: anything else you can think of trying here? | 19:48 | |
TimToady | at the moment the synopses at 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. | ||
sorear | Is Darren Duncan insane? | ||
jnthn | colomon: I'm just finding it incredibly bizzare that adding two Integers together could lead to the error we're seeing... | ||
TimToady | sorear: not really, but he's pretty far out on the Spectrum | 19:50 | |
colomon | jnthn: I couldn't agree more! | ||
sorear | TimToady: what is the Spectrum? | ||
jnthn | Why, the good old ZX of course. | 19:51 | |
masak | :) | ||
flussence | k | ||
whoops | 19:52 | ||
TimToady | the Autistic Spectrum, which most of us here are on somewhere | ||
diakopter | some of us even move along it over time | 19:53 | |
masak | dAut | ||
er, dAut/dt | |||
TimToady | we all have our little failures in pragmatics from time to time | ||
jnthn | I never do that! | ||
;) | |||
TimToady | jnthn: you are anchoring the Neurotypical End :) | 19:54 | |
masak | jnthn: don't you dare leave! :P | ||
MindosCheng | rakudo: map { $_++ } <TimToady diakopter> | 19:55 | |
p6eval | rakudo 015d77: OUTPUT«===SORRY!===Confused at line 22, near "map { $_++"» | ||
sjohnson | heh | ||
TheHarlot | hmmm... just found my method was a pretty bad. | ||
TimToady | MindosCheng: needs a comma after the block to parse | ||
TheHarlot | though, I did figure out more on this issue. | ||
TimToady, I technically was only on the Autistic Spectrum due to a misdiagnosis. | 19:56 | ||
TheHarlot scratches her head | |||
masak replied to Darren Duncan | |||
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 :) | ||
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. | ||
And gave bipolar meds to somebody who is not actually bipolar... | 19:58 | ||
MindosCheng | rakudo: say map { $_++ }, <TimToady diakopter> | ||
p6eval | rakudo 015d77: ( no output ) | ||
TheHarlot | TimToady, pfft! that is like saying gamma radiation or AM Radio is part of the visible light spectrum ~.n | ||
19:59
jaldhar left
|
|||
TimToady | I think the Autistic Spectrum is more like the universe, which has no "outside" | 19:59 | |
at least on the neurotypical end, you can't be more normal than "Normal" :) | 20:00 | ||
you can find other dimensions to go off into though... | |||
20:01
mj41 joined
|
|||
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:01 | |
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... | ||
hercynium | in another dimension, my dishes are all clean | ||
colomon | jnthn: here's a gist, just in case there's something stupid I'm doing: 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. | ||
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. | ||
TheHarlot | ah... I was commenting on something somebody else said. | ||
TimToady | so what's "normal" Perl 6 code :) | ||
TheHarlot | That everybody here is part of the Austism Spectrum. | 20:05 | |
masak | :) | ||
TheHarlot | TimToady, by my two definitions, either a jeph or a dish washer program. | ||
TimToady | :) | ||
sorear | austism, eh? | 20:06 | |
rakudo: say $*IN.slurp | |||
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 umstrittenliegst dem Erdteil du inmitten,einem | ||
..stark… | |||
masak snaps at attention | 20:07 | ||
TimToady | attention snaps back | ||
masak | that's Austrism, not Autism. :P | ||
attention whiplash. | |||
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. | ||
TimToady | provably, we don't have ADD here | ||
TheHarlot | Autism is just one spectrum the code could be screwed up. You can have Schizo Code, and Bipolar code as well. | ||
20:08
fhelmberger joined
|
|||
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 | |||
sorear | masak++ | ||
TimToady | as we get closer to true AI, this may become truer than we'd like to think... | ||
MindosCheng | rakudo: say <Autism not-Autism>.pick | 20:10 | |
p6eval | rakudo 015d77: OUTPUT«Autism» | ||
masak rests his case | |||
TimToady wrests his case | |||
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? | ||
hercynium crests his race | |||
masak | TheHarlot: run() | 20:11 | |
TheHarlot | thank you masak | ||
now I can go trying to code this piece. | |||
masak | you're welcome, harlot. | ||
jnthn | But it's a good idea to pass it an argument ;) | ||
masak | run("ls") | ||
TheHarlot | jnthn, I dunno--maybe I could use that to get the voices to talk to my program ~.n | ||
hercynium | code in piece | ||
TimToady | the return value is the opposite of p5's system() | ||
TheHarlot | TimToady, returns true on success then? | 20:12 | |
TimToady | correct | ||
masak | TimToady: only Rakudo doesn't do that yet. | ||
TimToady | that's spec, anyhoo | ||
colomon | boy, that seems like it ought to be an easy bug to fix... | ||
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. | ||
masak | nice! | 20:13 | |
TheHarlot | I will post a blog, as I start to work on being at least an EPO Tinman. | ||
TimToady | should do for htat | ||
*that even | |||
hercynium | sane return values from system commands? NOE! | ||
(as opposed to 0E0?) | |||
MindosCheng | TheHarlot++ | ||
TheHarlot | MindosCheng, the name in the system would be KatrinaTheLamia | 20:14 | |
I am just running this, as my shell is currently down. | 20:15 | ||
sjohnson | rakudo: say | ||
95 # Maybe in the future... I will add something similar to cfvi, where it gets rid of template_c and .swp files | |||
p6eval | rakudo 015d77: OUTPUT«» | ||
sjohnson | oops | ||
note to self: always check paste buffer | |||
masak | sjohnson: that's actually a known rakudobug. | ||
std: say | |||
sjohnson | haha | ||
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:------> say⏏<EOL>ok 00:01 117m» | ||
sjohnson | i'm good at finding bugs by accident | 20:16 | |
jnthn dresses masak's say | |||
sjohnson | rakudo: say 0b1100101 # what i really meant to do | ||
p6eval | rakudo 015d77: OUTPUT«101» | ||
TheHarlot | rakudo: Any() + 50 | ||
p6eval | rakudo 015d77: OUTPUT«Could not find sub &Any in main program body at line 22:/tmp/2G2R9k1iMZ» | ||
masak | rakudo: say Any + 50 | ||
p6eval | rakudo 015d77: OUTPUT«Use of uninitialized value in numeric context in <anon> at line 22:/tmp/e9xf08xgKn50» | 20:17 | |
TheHarlot | rakudo: my $var; say $var + 50; | ||
p6eval | rakudo 015d77: OUTPUT«Use of uninitialized value in numeric context in <anon> at line 22:/tmp/nhOJnqa9Gm50» | ||
moritz_ doesn't understand why it dies instead of just warning | |||
jnthn | moritz_: It printed the 50 too | ||
TheHarlot | right... going to need to do something to initialise a variable in a class. | ||
moritz_ | oh, right | ||
TheHarlot | wait--it does not die then? | 20:18 | |
rakudo: my $var = 50; say $var; | |||
p6eval | rakudo 015d77: OUTPUT«50» | ||
TheHarlot compares output | |||
ah... that character is a newline... I guess? | 20:19 | ||
sjohnson | rakudo: say rand | ||
p6eval | rakudo 015d77: OUTPUT«0.663876019043045» | ||
TimToady | .u  | ||
phenny | U+2424 SYMBOL FOR NEWLINE () | ||
TimToady | you can use it on input too | 20:20 | |
std: { 1 } { 2 } | 20:21 | ||
p6eval | std a194beb: OUTPUT«===SORRY!===Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/CSMpbfLQYw line 1:------> { 1 } ⏏{ 2 } expecting infix or meta-infixParse failedFAILED 00:01 119m» | ||
TimToady | std: { 1 }{ 2 } | ||
p6eval | std a194beb: OUTPUT«ok 00:01 118m» | ||
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:22 | |
MindosCheng using ChatZilla now. | 20:24 | ||
I am still confused with the closure example. | 20:25 | ||
sorear gets some popcorn and watches masak and dduncan | |||
MindosCheng | rakudo: my $a = -> { my $c=10; return { say $c-- } }(); $a(); $a(); | ||
p6eval | rakudo 015d77: ( no output ) | ||
masak | sorear: I don't intend to continue that thread. | ||
MindosCheng | Why it has no output? | 20:26 | |
sorear | because the 'return' statement ended the program | ||
masak | MindosCheng: something looks broken. | ||
oh, right. | |||
sorear | pointy blocks don't catch return, so the exception bubbles up and caused the eval() frame to return | ||
masak | sorear++ | ||
MindosCheng | sorear++ | 20:27 | |
rakudo: my $a = -> { my $c=10; -> { say $c-- } }(); $a(); $a(); | |||
p6eval | rakudo 015d77: OUTPUT«109» | ||
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"» | ||
masak | TimToady: needs parens around sub {...} | ||
TimToady | rakudo: my $a = (sub { my $c=10; return { say $c-- } })(); $a(); $a(); | ||
p6eval | rakudo 015d77: OUTPUT«109» | ||
TimToady | std: my $a = sub { my $c=10; return { say $c-- } }(); $a(); $a(); | ||
p6eval | std a194beb: OUTPUT«ok 00:01 122m» | ||
jnthn | Eww! | ||
TheHarlot | TimToady, it comes out as two hex quadlets in my client's font. | ||
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);"» | ||
TheHarlot | rakudo: say 9001.rand() | ||
p6eval | rakudo 015d77: OUTPUT«691.640323830381» | ||
jnthn | TimToady: Granted Rakudo should follow STD, but I'd rather STD didn't let you do that tbh. | ||
20:29
plainhao left
|
|||
TheHarlot | rakudo: say Interger 9001.rand() | 20:29 | |
jnthn | TimToady: Just visually looks...weird. | ||
p6eval | rakudo 015d77: OUTPUT«Could not find sub &Interger in main program body at line 22:/tmp/kgjWXbY5_v» | ||
TheHarlot | rakudo: say Integer 9001.rand() | ||
p6eval | rakudo 015d77: OUTPUT«Could not find sub &Integer in main program body at line 22:/tmp/6TB35dbiOg» | ||
TimToady | TheHarlot: do you get french quotes here: « Oui! » | ||
masak | TheHarlot: read the error message. | ||
TheHarlot | TimToady, I get the unicode version of << and >> | 20:30 | |
20:30
daxim left
|
|||
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 | ||
TheHarlot | masak, yeah... trying to figure out howto type cast... then I just decided to my code does not need it. | ||
masak | rakudo: say 9001.rand | 20:31 | |
p6eval | rakudo 015d77: OUTPUT«8506.55472686801» | ||
masak | rakudo: say 9001.rand.int | ||
p6eval | rakudo 015d77: OUTPUT«Method 'int' not found for invocant of class 'Num' in main program body at line 22:/tmp/ONztBUqdoE» | ||
masak | rakudo: say 9001.rand.Int | ||
p6eval | rakudo 015d77: OUTPUT«8308» | ||
TimToady | rakudo: say (^9001).pick | ||
p6eval | rakudo 015d77: OUTPUT«4014» | ||
TimToady | rakudo: say (^90010000).pick | ||
TheHarlot | rakudo: say Int(9001.rand) | ||
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
rakudo 015d77: OUTPUT«Could not find sub &Int in main program body at line 22:/tmp/0E7b1ouLyj» | |||
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. | ||
masak | TimToady: seems it is :( | ||
sorear | TheHarlot: め # Here, have a very common Unicode character >256 | ||
masak | TimToady: or maybe .pick is flattening it out. | ||
TheHarlot | rakudo: say (^100000000000).pick | ||
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
sorear | « is <256 so it's not necessarily a fair indicator of Unicode support | 20:33 | |
TimToady | troo | ||
but I think there would at least have been some garbage | |||
20:33
lue left,
lue joined
|
|||
XaRDaX | Hi all. I've a question: Is there a Module in p6 like IO::Socket in perl5? | 20:33 | |
TimToady | extra  and such | ||
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) | ||
sorear | .u め | ||
phenny | U+3081 HIRAGANA LETTER ME (め) | ||
TheHarlot | Hiragana! Haha! | ||
colomon | .pick is flattening it out, because 100000000000 isn't really an Int in Rakudo. | 20:35 | |
rakudo: say (^1000000000).pick | |||
p6eval | rakudo 015d77: OUTPUT«(timeout)» | ||
MindosCheng | rakudo: say <め 安> | ||
colomon | rakudo: say (^100000).pick | ||
p6eval | rakudo 015d77: OUTPUT«め安» | ||
rakudo 015d77: OUTPUT«(timeout)» | |||
TimToady | rakudo: say 90010000.WHAT | 20:36 | |
p6eval | rakudo 015d77: OUTPUT«Int()» | ||
TimToady | that is | ||
dalek | odel: 021ee7e | jonathan++ | dotnet/ (4 files): [dotnet] Add an LHF entry. |
||
colomon | yeah, something weird is going on here. | ||
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()? | ||
Well, less space, and less cycle abuse? | 20:37 | ||
sorear | TheHarlot: hanashita is at least a word, and has the right initial consonent | ||
consonant. | |||
TimToady | "hanashita" wo hanashita! | ||
XaRDaX | sorear: do you mean v6-alpha? | ||
TheHarlot | sorear, it means "speak" with tense of past but continuing on. | ||
colomon | rakudo: say (^1000000).max.WHAT | ||
p6eval | rakudo 015d77: OUTPUT«Int()» | ||
colomon | rakudo: say (^1000000).min.WHAT | ||
p6eval | rakudo 015d77: OUTPUT«Int()» | 20:38 | |
TheHarlot | That is why I knew it was the wrong word for hirogana. | ||
sorear | alpha: say 2 + 2 | ||
p6eval | alpha : OUTPUT«4» | ||
colomon | ooooo. | ||
sorear | alpha: say IO::Socket.^methods | ||
p6eval | alpha : OUTPUT«sendcloserecvsqrtrindexasinintatanhcoshcosecgrepvaluescharsrootsreverseisaucfirstkvsamecasetanlog10coscapitalizefmtbytesflipdoesp5choplcasinhacotanreducecotanhchracotanh:d:e:fcombfloorasechatanacos:levalroundchoptanhsplitmatchexp:sacoshwordscancotanatan2lcfirstucsrandkeyspolarmapci… | ||
colomon | I think the Range.pick patch a few weeks ago broke it. | ||
TheHarlot | wait... there is more than just rakudo in p6eval? | ||
pugs: say "I am a perl 6." | 20:39 | ||
p6eval | pugs: OUTPUT«I am a perl 6.» | ||
TimToady | TheHarlot: that's okay, most of use are a bit weak on our 日本語 here. | ||
s/use/us/ # our English too | |||
sorear | XaRDaX: 'alpha' is a retronym for Rakudo 2010.01 | ||
yapsi: say "hi" | |||
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:39
wamba left
|
|||
sorear | nqp: say("Hi") | 20:40 | |
p6eval | nqp: OUTPUT«Hi» | ||
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. | ||
sorear | perlesque: say("Hi") | ||
p6eval | perlesque: ( no output ) | ||
20:40
jedai left
|
|||
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 | |
jerl6: say "I should not be here" | |||
ah... it returned the proper output. | 20:41 | ||
20:41
jedai joined
|
|||
sorear | almost everyone here is at least learning Japanese | 20:41 | |
a funny coincidence | |||
MindosCheng | pugs: my $a = -> { my $c=10; return { say $c-- } }(); $a(); $a(); | ||
p6eval | pugs: ( no output ) | ||
XaRDaX | sorear: thank you | ||
TimToady | .oO("Know your enemy...Ruby") |
||
masak goes offline for battery reasons | |||
20:41
masak left
|
|||
MindosCheng | sorear: I only know a bit Japanese... | 20:42 | |
pugs: my $a = -> { my $c=10; -> { say $c-- } }(); $a(); $a(); | |||
p6eval | pugs: OUTPUT«109» | ||
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. | ||
MindosCheng | masak: Cya. | ||
TheHarlot HATES the british football announcers. sooo much.. hate... | |||
20:43
fhelmberger left
|
|||
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
|
|||
sorear | Audrey was zh-TW; I wonder if she started this trend | 20:44 | |
20:44
PerlJam joined
|
|||
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. | ||
TheHarlot: It's nice to know so many language. | 20:45 | ||
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 | |
MindosCheng, it is. Though, I do not really consider English a language. | |||
TimToady | it's really a creole, like Japanese | ||
but creoles can become real languages, for some definition of "real" | 20:47 | ||
if communication happens, it's a language | |||
TheHarlot | TimToady, though, Japanese at least has slightly better tenses to deal with it. | ||
MindosCheng | sorear: That's why I started to learn Perl. | ||
20:48
takadonet left
|
|||
hanekomu | and with Perl 6, Perl becomes a creole as well | 20:48 | |
TimToady | TheHarlot: depends on what you're trying to express | ||
you can't say "will have been going" in Japanese, fer instance | |||
PerlJam | hanekomu: you don't think Perl 5 is a creole? | ||
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 | ||
hanekomu | PerlJam: there's more than one way to do it, but there's only one perl interpreter | ||
TheHarlot | TimToady, well, try explaining temporal mechanics in English. | ||
TimToady | *warts | ||
moritz_ | the usage of tenses in English isn't so much different from German | ||
TheHarlot | moritz_, my understanding was German has more tenses though | ||
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 | |
*it | |||
if you want lots of tenses, try classical Greek | |||
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? | ||
TimToady | (using the word "tense" loosely) | ||
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. | ||
Though, conveying what exactly happened, is next to impossible in english. | 20:51 | ||
Or, if it is possible, only in the least elegant manners. | |||
It also sucks for planning stuff. | |||
As I tend to plan for different opportunities. And, the inability to give solid tenses in those plans is irritating in English. | |||
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 | ||
PerlJam | The world needs less tenseness, not more :) | ||
sorear | when you call English a creole, are you referring to the Norman Invasion and related events? | ||
TimToady | but English mixes up its tense system with its aspect system rather badly | ||
sorear: among other things | 20:53 | ||
TheHarlot | PerlJam, well, by adding proper tension to the English language, you will remove some chaos. | ||
PerlJam | TheHarlot: but I *like* chaos! | ||
TheHarlot | PerlJam, well, yeah--but that chaos will appear in other, better uses of it. | ||
TimToady | the craziest thing about English is that it borrowed its *pronoun* system from the Vikings | ||
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:54 | |
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 | |||
The horror... | |||
TimToady | rosettacode.org/wiki/Discordian_date#Perl_6 | ||
PerlJam | Hmm. I don't think I want to conserve insanity. Seems better to spend insanity freely. | ||
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 | ||
TheHarlot | PerlJam, the thing is, we are only given a small amount of madness. We need to make the best use of it. | ||
hanekomu | though IANAL (I Am Not A Linguist) | ||
TimToady | well, Japanese slices their verb system much differently than English | ||
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 | |
20:57
donaldh joined
|
|||
sorear wonders if hanekomu is a native | 20:58 | ||
20:58
donaldh_ joined
|
|||
hanekomu | native German speaker, yes | 20:58 | |
:P | |||
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 | ||
hanekomu | true | ||
20:58
donaldh__ joined
|
|||
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... | |||
sorear | PerlJam: that depends on what you mean by "no future tense" | ||
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. | ||
Tene | I expect people in here will find this interesting; www.guardian.co.uk/books/2010/nov/0...r-language | ||
hanekomu | TimToady: feathers? crowded? what? :) | ||
sorear | if you want to say that something will happen tomorrow, you use the word for tomorrow + not-past tense | ||
TimToady | 羽はねhanefeather; plume; wing | ||
TheHarlot | PerlJam, oh, you set the stage. "this is tomorrow", and work from there in your sentence. | ||
hanekomu | ah that :) | ||
TimToady | 込む 混むこむkomuto be crowded | ||
hanekomu | it's a Go term | ||
senseis.xmp.net/?Hanekomi | 21:01 | ||
sorear | TimToady: oooh, what's that from? | ||
hanekomu | sorear: from this: search.cpan.org/~marcel/?R=D | ||
TimToady | a version of Jdict that has been rendered greppable | ||
hanekomu | oh | ||
nice | |||
21:02
donaldh left,
donaldh__ is now known as donaldh
|
|||
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
|
|||
sorear | TheHarlot: Jerl 6? | 21:02 | |
TimToady | more like a "wing" kind of hane | 21:03 | |
TheHarlot | sorear, Perl 6 for the JVM. | ||
sorear | TheHarlot: how far along are you? | ||
MindosCheng | 羽翼 | ||
TheHarlot | sorear, sorry, I have not mentioned it in here in forever, and I have done nothing on it. | ||
What being normal and all (my SNAFU life) | |||
TimToady | or maybe from haneru | ||
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. | ||
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) | ||
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. | ||
TheHarlot | rakudo: my $x = 0; while $x < 10 { $x++; next} | 21:07 | |
p6eval | rakudo 015d77: ( no output ) | ||
TimToady | I'd guess it's 跳ねる, to jump; to leap; to prance; to spring up; to bound; to hop | ||
TheHarlot | rakudo: my $x = 0; while $x < 10 { $x++; continue; } | ||
p6eval | rakudo 015d77: OUTPUT«Could not find sub &continue in main program body at line 22:/tmp/WIwtDm64Di» | ||
hanekomu | TimToady: yes | ||
TheHarlot | ah... it is next I want, definitely. | ||
TimToady | as in a "jump" in checkers, kinda | ||
TheHarlot: if you're partly insane, you've come to the right place | 21:09 | ||
hanekomu | :) | ||
TimToady | it's part of our mandate here to figure out how to put our collective insanities to good use | ||
and if you're differently insane from the rest of us, all the better | 21:10 | ||
diakopter warnts a nap | 21:11 | ||
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:12 | |
been here before* | 21:13 | ||
I am going with this, as I cannot be bothered to set up this IRC client properly. Laziness really. | |||
sorear | hane is also translated as hook or bend | ||
21:13
timbunce joined
|
|||
hanekomu | "bend" fits | 21:13 | |
sorear | my teacher used that word quite a lot when talking about drawing hiragana | ||
TimToady | probably because wings bend | 21:14 | |
sorear | TheHarlot: what do libNIMh and Java Kitty do? what kinds of stuff can Jerl6 programs do? | ||
sorear wants to compare niecza against it now | 21:15 | ||
TimToady now warnts a nap, and blame diakopter... | 21:16 | ||
*s | |||
diakopter boorish/booring | 21:17 | ||
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. :) | |||
diakopter | er, and I don't mean the 2nd usage listed on urbandi********.*** | ||
sorear | error: quantifier quantifies nothing | ||
diakopter | std: ???.?++ | 21:20 | |
p6eval | std a194beb: OUTPUT«ok 00:01 118m» | ||
diakopter | fix THAT | ||
;) | |||
oooo | 21:21 | ||
rakudo: ???.?++ | |||
p6eval | rakudo 015d77: OUTPUT«===SORRY!===Method 'isa' not found for invocant of class 'Undef'» | ||
21:21
timbunce left
|
|||
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» | ||
diakopter | there are ways around that, but please don't :) | ||
TheHarlot | sorear, libNIMH is a set of frameworks for dealing with the OS, that I have gotten irritated with programming over and over. | 21:23 | |
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. | |||
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:25 | ||
21:26
lichtkind left
|
|||
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 | |
21:26
dual left
|
|||
sorear | TheHarlot: what about the present tense? | 21:26 | |
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 | ||
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++ | ||
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. | ||
p6eval | rakudo 015d77: ( no output ) | ||
rindolf | rakudo: say 10000000000000000000000000000000000000000000003 | ||
p6eval | rakudo 015d77: OUTPUT«8023796054858137603» | ||
rindolf | What is needed to add bignums to Rakudo? | ||
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! | ||
rindolf: time | |||
rindolf | sjohnson: well, Math::GMP can handle it fine. | ||
diakopter | rindolf: if it were that simple to answer, someone would've written down the steps by now, I'd think :) | ||
sjohnson | sorear told me that they are comin around the mountain when they come. | ||
rindolf | sjohnson: I need this if I am to use Rakudo for Project Euler. | ||
diakopter | and riding six white horses. | ||
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,
timbunce left
|
|||
dukeleto | TheHarlot: of course. I am sure it will be trivial. | 21:31 | |
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:32 | |
diakopter | dukeleto: :) | 21:33 | |
TheHarlot | My understanding is that Perl 6, is compiled, at some state in its running. | ||
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 | ||
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 | |
My other option, is to write a Perl 6 compiler in Java, Jython or JRuby... I think I made the best decision here. | |||
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. | ||
or something to that effect. | |||
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:37 | ||
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. | ||
diakopter | [dish-]washing machines are often connected to garbage disposals | ||
TheHarlot | well, yes... my understanding is parrot was more of a virtual machine. | ||
diakopter++ | |||
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
|
|||
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:41 | |
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. | |||
and that is on the J6Jerl6 compiler alone. | 21:42 | ||
diakopter | let's break it down a little | ||
how much of that is the parser/grammar engine | |||
TheHarlot | Nothing on CJerl6, nothing of Java Kitty, nothing on libNIMH. | ||
21:42
_kaare left
|
|||
TheHarlot | diakopter, I was not going to break it down, until I got close enough to start the J6Jerl6 portion. | 21:42 | |
diakopter, I am still working on the Java Kitty portion. | 21:43 | ||
diakopter | ... which begs the question: how can you estimate 15 weeks ... | ||
dukeleto | TheHarlot: i am not worried about how ugly the code is, but Parrot is interested in Parrot Bytecode <--> JVM bytecode interop | ||
TheHarlot | diakopter, well 8 * 5 * 15. | 21:44 | |
diakopter | TheHarlot: 15 weeks. | ||
TheHarlot | diakopter, this is based on other projects I have put code into, and how quick the code base filled up. | ||
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 | ||
diakopter | ok | ||
TheHarlot | diakopter, I should have reasonable knowledge of JVM from Java Kitty at that point, and Perl 6 from CJerl6 at that point. | 21:45 | |
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 | ||
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. | ||
diakopter | and nobody ever has to think while not typing | ||
TheHarlot | diakopter, again, if I sound full of shit here, it is because you are asking the wrong questions. | ||
diakopter | so answer the right ones :P | ||
TheHarlot | there are two steps before that, you can ask for time frames on. | ||
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? :) | ||
diakopter | I don't think you're full of shit; I was curious what your expectation is about the project's size. | ||
dukeleto | TheHarlot: I think everyone wants your ideas to work. We are just skeptical of the timeframes. But please, prove us wrong :) | 21:49 | |
21:49
spinclad joined
|
|||
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 | |
Even then, that time frame could be horridly wrong. | |||
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 | ||
Then, J6Jerl6, which requires me to have completely both Java Kitty and CJerl6, should be no problem. | |||
The J6Jerl6 step is not the problem. It is the two directly before it that are the doozy. | 21:51 | ||
dalek | kudo: 94b52d1 | colomon++ | src/core/Range.pm: Add back in Range.pick multi which takes no arguments, as it is a huge optimization for large Ranges. |
||
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? | ||
TheHarlot | 6model? I will look into that then. | 21:52 | |
diakopter | mberends has been working on it as of late | ||
TheHarlot | anyways--right now, I am hungry, and will be heading to the store for food. | 21:53 | |
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. | 21:55 | ||
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:00 | |
moritz_ | probably $socket.print('foo') | 22:04 | |
PerlJam | are sockets even implemented? | ||
jnthn | Yes | 22:05 | |
XaRDaX | yes | ||
found it! $socket.send(); | 22:06 | ||
PerlJam | shows how much I've paid attention to such things :) | 22:07 | |
jnthn | Well, you should listen() more :P | 22:08 | |
22:15
kjeldahl left
|
|||
MindosCheng | rakudo: say #`[早安]"Morning!" | 22:17 | |
p6eval | rakudo 015d77: OUTPUT«Morning!» | ||
22:19
Cyberhawk joined,
Cyberhawk left
|
|||
dalek | ecza: 5c951ff | sorear++ | / (3 files): Re-merge |
22:21 | |
ecza: fe957ea | sorear++ | lib/ (2 files): Implement lexer subclass reuse optimization |
|||
sorear | so now niecza-compiled STD can process most of (STD's) CORE.setting without hitting swap | 22:23 | |
MindosCheng | sorear++ | ||
sorear | I see I still need 'import' | 22:24 | |
22:26
jlaire joined
22:32
mj41 left
22:34
masak joined
|
|||
masak | blog post! strangelyconsistent.org/blog/novemb...ite-revolt | 22:35 | |
rakudo: sub foo($x? is rw) { $x = "OH HAI" }; foo() | |||
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» | ||
masak | discuss. | ||
masak submits rakudobug | |||
Tene | masak: www.guardian.co.uk/books/2010/nov/0...r-language | ||
masak looks | |||
Tene | masak: A third of the way through or so, I was thinking "Could he use 'is copy' instead?" :) | 22:37 | |
masak: I agree in that I expect rw defaults to be a copy/assign. | 22:38 | ||
masak: Shouldn't be too hard to fix, I expect. | 22:39 | ||
masak | Tene: oh, good. | ||
22:39
hanekomu left,
satyavvd left
|
|||
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:40 | |
masak | I had the same thought. | 22:41 | |
colomon | rakudo: say "hi" | ||
p6eval | rakudo 015d77: OUTPUT«hi» | ||
jnthn | akshually probably an easy-ish binder patch. | 22:42 | |
masak | \o/ | ||
colomon | errr... p6eval's rakudo is from Nov 13th. :\ | ||
22:43
lichtkind joined
|
|||
lichtkind | is .defineda method any scalar has? | 22:43 | |
jnthn | It's in Mu | ||
So everything has it pretty much. | |||
lichtkind | thank you | 22:45 | |
masak | Tene: so far, the article is sad and intriguing at the same time. | ||
lichtkind | jnthn: i now start to really work on my grant | ||
masak | (Dan Kogai)++ # "Real Life on Earth is base-4 coded :-p" | 22:47 | |
lichtkind | can i say in english Hashmethods ? | 22:48 | |
or hash methods | |||
22:49
satyavvd joined
|
|||
lichtkind | masak: i didnt got it :) | 22:53 | |
masak | lichtkind: the joke about Real Life and base 4? | ||
lichtkind | yes | 22:54 | |
masak | lichtkind: didn't your parents tell you about the birds and the genes? | ||
lichtkind | no :) | ||
masak | sorry, as a biologist I sometimes take these things for granted. | 22:55 | |
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 | ||
masak | so maybe giganibbles is more accurate... | ||
lichtkind | but you say the order matters? | ||
masak | it's "digital" regardless. | ||
digital only means that it's isomorphic to numbers. | 22:57 | ||
lichtkind | with digital i mean base 2 | ||
masak | lichtkind: well, stop that :) | ||
lichtkind | you mean a g-t is different to an t-g pair? | ||
masak | lichtkind: yes. | ||
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 | ||
masak | which means that all four of the acgt bases are significant. | ||
lichtkind | yeah | 22:59 | |
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 | ||
, for example. | |||
masak | MindosCheng: that's not complementary, that's reverse-complementary. | ||
MindosCheng | masak: sorry. | ||
dukeleto | dna and relatives are in base 4. Proteins are in base 20, which makes more lots of fun combinations. | ||
s/more lots/lots more/ | 23:01 | ||
dukeleto was using stack-based thinking for bit there | |||
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:02 | ||
the mapping is called "The Genetic Code" and was successively uncovered in the sixties. | 23:03 | ||
since then, people have consistently mistaken the DNA sequence for the Genetic Code, so it was probably a bad name in retrospect. :P | 23:04 | ||
TheHarlot | okay--final question, then I can head off: how do I properly escape variables before shoving them off to run("")? | 23:05 | |
masak | rakudo: my $variables = '$x $y $z'; say $variables.perl | 23:06 | |
p6eval | rakudo 015d77: OUTPUT«"\$x \$y \$z"» | ||
masak | you mean like that? | ||
jnthn | masak: Making 'is rw' assigny with default values does kinda break the "it's binding if there is a value" symmetry. | 23:08 | |
masak: Though maybe usefulness beats that here. | 23:09 | ||
masak | jnthn: yes, I touch upon that in my blog post. | ||
jnthn | masak: I don't feel especially strong either way at first blush. | ||
Would be interested to see TimToady++'s opinion. | |||
masak | aye. | ||
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 | ||
XaRDaX | too few positional arguments: 2 passed, 3 (or more) expected -> Is that a bug? | ||
masak | XaRDaX: yes. were you using .subst? | ||
jnthn | my $a = ...stuff...; sub foo($x is rw = $a) { ... } | ||
XaRDaX | no | 23:11 | |
jnthn | Is there a case where binding vs assignment of $a here would cause issues? | ||
masak | jnthn: I was thinking there might be a good reason for it being binding, for example when the default is a sub call. | ||
jnthn | Well, or a variable like in the above case. | ||
masak | maybe those boil down to the same thing, yes. | ||
jnthn | It may have interesting implications if it's an l-value sub too. | ||
masak | XaRDaX: then perhaps share a bit more of what you're doing in a nopaste? | ||
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. :) | ||
XaRDaX | pastebin.com/FDwzuiqD | 23:13 | |
masak | jnthn: this is exactly the feedback I hoped to get from you. | ||
jnthn: how do you feel about a special case for literals, as Tene++ suggested? | |||
masak looks at XaRDaX's paste | |||
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. | ||
jnthn | XaRDaX: What Rakudo are you running? | ||
23:14
envi joined
|
|||
jnthn | XaRDaX: Looks like $sock is undeclared. | 23:14 | |
XaRDaX: Not at all keen. | |||
gah | |||
masak: ^^ | |||
XaRDaX | rakuto 2010.10 | ||
jnthn | XaRDaX: OK, I think we fixed it in master. It crashes when reporting the error. | 23:15 | |
XaRDaX | downloaded 3 hours ago | ||
jnthn | Yes, but released last month :) | ||
XaRDaX | :D | ||
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?! | ||
jnthn | XaRDaX: Anyway, I think you need a "my" at line 11 | ||
masak | TheHarlot: try using .trans with the substitutions you want to apply to the string. | ||
TheHarlot: S05 has the scoop on .trans, right at the bottom. | 23:16 | ||
TheHarlot | ah. | ||
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. | ||
jnthn | rakudo: $x = 42 | ||
p6eval | rakudo 015d77: OUTPUT«===SORRY!===Symbol '$x' not predeclared in <anonymous> (/tmp/Yez_Wcgutn:22)» | ||
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 | |
er, as in, the same one you got before | |||
XaRDaX | yes same error | ||
TheHarlot | rakudo: my $the_answer = 5 | 23:18 | |
p6eval | rakudo 015d77: ( no output ) | ||
TheHarlot | XaRDaX, put my in front of your undeclared variable. | ||
rakudo: my $the_answer ::= 5 | |||
p6eval | rakudo 015d77: ( no output ) | ||
XaRDaX | TheHarlot: I did but i got the same error | 23:19 | |
masak | XaRDaX: are you running a non-new version of Rakudo? | ||
TheHarlot | XaRDaX, what line is the issue being reported on? | ||
XaRDaX | This is Rakudo Perl 6, version 2010.10 built on parrot 2.9.1 | 23:20 | |
jnthn | masak: October release, was mentioned above. | 23:22 | |
masak: I'm pretty sure the bug was fixed since the last release. | |||
XaRDaX | I've added my ($host,$port,$nick); in the line before the method | ||
TheHarlot | is the error now being reported on the line you added that "my" statement? | 23:23 | |
XaRDaX | no line specification in the error | 23:24 | |
that's strange | |||
TheHarlot | okay... | ||
jnthn | XaRDaX: The error is totally bogus. It's an error that occurs when trying to report the real error. | ||
XaRDaX: The latest git master has it fixed, and 2010.11 will be out in not so long :) | 23:25 | ||
23:26
mavrc left
|
|||
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. | ||
TheHarlot removed a "my" from her code. | |||
jnthn | XaRDaX: Correct | ||
XaRDaX: You need to write my $sock = IO::Socket::INET.new(); | 23:27 | ||
you have just $sock = IO::Socket::INET.new(); | |||
Without the my | |||
If you add that my to what you pasted at pastebin.com/FDwzuiqD it should be fine. | |||
XaRDaX | pastebin.com/gm041Ukw -> still not working | 23:29 | |
jnthn | What error now? Same one? | 23:30 | |
XaRDaX | yes same old error | ||
MindosCheng try to install Rakudo Star | |||
jnthn | XaRDaX: Oh! | 23:31 | |
You use $sock in method join too | |||
XaRDaX: Did you not want to make it an attribute? | |||
has $!sock; | |||
So you can share it between the methods | |||
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? | ||
XaRDaX | hahaha | ||
yaww!!! It's working now! | 23:33 | ||
jnthn | \o/ | ||
XaRDaX++ | |||
masak | TheHarlot: that regex looks fishy. | ||
XaRDaX | what a stupid error... thank's jnthn | ||
masak | TheHarlot: first, use C<||>, not C<|> for now. | ||
XaRDaX | jnthn++ | 23:34 | |
masak | TheHarlot: second, seems your two alternatives cover all possible characters between themselves. | ||
TheHarlot | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / [ <-alpha> || <-digit> ] / => "\\$/"); | ||
p6eval | rakudo 015d77: OUTPUT«I want ty (ypen) yyu and EAT yyu» | ||
masak | heh :) | ||
that [] is entirely redundant. | |||
also -- wtf happened there? | 23:35 | ||
23:35
Chillance left
|
|||
masak | "yyu"? | 23:35 | |
TheHarlot | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / <space> || <symbol> / => "\\$/"); | ||
p6eval | rakudo 015d77: OUTPUT«I want ty (ypen) yyu and EAT yyu» | ||
TheHarlot | okay... this... this is an error report. | ||
colomon | that's o => y, isn't it? | ||
TheHarlot | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( / \s / => "\\$/"); | ||
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 / => "\\\\$/"); | ||
p6eval | rakudo 015d77: OUTPUT«I want tn (npen) ynu and EAT ynu» | ||
TheHarlot | colomon, I want to take anything that is not a letter or number, and put a "\" infront of it. | ||
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:37 | ||
masak | TheHarlot: I mean .trans with strings even on the lhs. | 23:38 | |
TheHarlot: I'm guessing the results we're seeing is due to the regex stringifying. | |||
rakudo: say ~// | |||
p6eval | rakudo 015d77: OUTPUT«===SORRY!===Null regex not allowed at line 22, near ""» | ||
masak | rakudo: say ~/./ | ||
p6eval | rakudo 015d77: OUTPUT«_block124» | ||
TheHarlot | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell ~~ trans( / \s / => "\\$/"); | ||
p6eval | rakudo 015d77: OUTPUT«Could not find sub &trans in main program body at line 22:/tmp/JC1F9MNi4g» | ||
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» | ||
jnthn | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.subst(/\W/, { "\\$/" }) | ||
p6eval | rakudo 015d77: OUTPUT«I\Any()want to (open) you and EAT you» | ||
jnthn | uh | ||
rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.subst(/\W/, { "\\$_" }, :g) | |||
p6eval | rakudo 015d77: OUTPUT«I\ want\ to\ \(open\)\ you\ and\ EAT\ you» | ||
jnthn | there | ||
masak | right. | ||
TheHarlot | thank you jnthn | ||
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» | ||
masak | rakudo: my $bloody_hell = "I want to (open) you and EAT you"; say $bloody_hell.trans( [" ", "(", ")"] => ["\\ ", "\\(", "\\)"] ) | ||
p6eval | rakudo 015d77: OUTPUT«I\ want\ to\ \(open\)\ you\ and\ EAT\ you» | ||
colomon | jnthn++'s version is better, but I already had mine halfway typed at the time. | ||
masak | that's what I meant by "use .trans". | ||
TheHarlot | masak, that mostly requires me to think of all the scenarios I may come across in file names | 23:41 | |
which would have me reading the bash, sh, tcsh, ksh, etc manpages... | |||
jnthn | Having to read sucks. | 23:42 | |
;) | |||
masak | TheHarlot: right. jnthn++'s solution is more robust in that sense. | ||
TheHarlot | which would probably have me find writing this in bash may be quicker =P | ||
masak | at least if backslashing all \W is harmless. | ||
TheHarlot | jnthn, or, I could just do anything not a letter or number--and do it the easy way. | ||
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... | ||
florz | TheHarlot: just don't call a shell? | ||
TheHarlot | well--unless people get rather creative with their file names. At which point an errantly named file could wipe my system. | 23:44 | |
florz, ah, I am saving time, by sending this stuff off to mplayer to deal with. | |||
florz | TheHarlot: yeah, just don't call a shell | ||
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" | ||
TheHarlot | florz, that would mean setting it up, so my Perl 6 script can handle anything... | ||
... | |||
florz, other options? | |||
florz | TheHarlot: call mplayer? | ||
TheHarlot | how? | ||
call("mplayer tracke")? | |||
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." | ||
florz | in perl 5 it would be system('mplayer','mplayer',$track); | 23:47 | |
dunno whether things work similarly in p6 | |||
Tene | jnthn: whould there be a binding failure when you try to pass a ro value to an rw param? | ||
jnthn | Tene: I think there's meant to be. | 23:48 | |
Tene | rakudo: sub foo($x is rw) { say $x }; foo(42); | ||
p6eval | rakudo 015d77: OUTPUT«42» | ||
jnthn | Tene: I'm not sure we do it... | ||
XaRDaX | while $irc.sock {say $irc.sock.recv();} Is that the right way to read the socket? | ||
Tene | jnthn: then allowing a constant as a default value for an rw param should be an error if it means binding. | ||
jnthn | Tene: Yes, there is that | ||
Tene: We could even pick up the obvious cases at compile time. | |||
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:49 | |
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
|
|||
masak | MindosCheng: oh, you're from .tw? nice! it's one of the Mandarin-speaking areas I feel interested in visiting. | 23:51 | |
23:51
masonkramer joined
|
|||
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. | ||
TheHarlot | Tene, florz just said that did not seem to work. | 23:52 | |
florz | at least in R* 10.09 | ||
Tene | If you really want to allow injection, you should ask for it explicitly. sub inject-me-harder($cmd) { system('bash', '-c', $cmd); } | ||
IMO | |||
23:52
donaldh left
|
|||
masak | Tene: :P | 23:53 | |
jnthn | Tene: Sounds like a good fit in S16... | 23:54 | |
;) | |||
TheHarlot giggles | |||
right... I am having issues finding the S... S16 you say? | 23:55 | ||
colomon | jnthn: my nqp-rx/nom error: gist.github.com/702754 | ||
masak | TheHarlot: lucky you. | ||
jnthn | colomon: oh ouchee. | 23:56 | |
colomon | jnthn: unfortunately (debugging-wise) I'm running off to the pub now... | ||
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" | ||
jnthn | colomon: The pub is always fortunate! | ||
Tene | I'd really prefer it if you had to work to allow injection failures like that, though. | ||
TheHarlot | okay... S16 does not have what I am looking for. | ||
Tene, yeah... I am not wanting to just pass it off. | 23:57 | ||
colomon | afk | ||
TheHarlot | I understand the dangers there in. | ||
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 | ||
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. |