| Time |
S |
Nick |
Message |
| 00:00 |
|
|
masak joined #perl6 |
| 00:00 |
|
|
hatsefla1s joined #perl6 |
| 00:00 |
|
masak |
blr, wobbly neighbournet... |
| 00:01 |
|
lue |
blr? |
| 00:01 |
|
masak |
as in, 'yuck'. :) |
| 00:02 |
|
lue |
does the tester have a built in ETOOLONG type situation? |
| 00:02 |
|
masak |
no. |
| 00:02 |
|
masak |
you'll have to ^C |
| 00:03 |
|
* lue |
will now hunt w/ masak for bug |
| 00:03 |
|
* masak |
might have just found it :/ |
| 00:03 |
|
masak |
yup. |
| 00:04 |
|
masak |
it was yet another instance of RT #73034. |
| 00:04 |
|
masak |
should have seen that one coming... |
| 00:06 |
|
masak |
pushed. try pulling, rebuilding, and running the tests file again. |
| 00:07 |
|
lue |
or just that one test. |
| 00:07 |
|
masak |
yeah. |
| 00:07 |
|
masak |
I tried that here, and it doesn't hang anymore. |
| 00:08 |
|
masak |
now running all tests, to see what's the next interesting failure. |
| 00:08 |
|
lue |
got a No Match. At least it didn't hang! |
| 00:09 |
|
masak |
the `./test-regex 'a**bc' ''` should indeed give 'No match'. |
| 00:09 |
|
masak |
it's trying to do '' ~~ /a ** b c/ |
| 00:13 |
|
|
dual joined #perl6 |
| 00:16 |
|
lue |
how's it going masak? |
| 00:16 |
|
masak |
running the tests :) still not past 414. just passed 200, though. |
| 00:17 |
|
masak |
whoa! Segmentation fault |
| 00:17 |
|
masak |
that's been a while. |
| 00:17 |
|
diakopter |
ltns, sigsegv |
| 00:18 |
|
lue |
GPF (can you guess what it means _here_?) |
| 00:18 |
|
masak |
the regex in question runs fine in isolation, so the segfault is due to general Parrot weariness. |
| 00:18 |
|
* masak |
tries the test suite again |
| 00:19 |
|
masak |
getting to be time for me to hit the pods, too. |
| 00:19 |
|
lue |
You have an ex-parrot!? |
| 00:19 |
|
masak |
seems I do. |
| 00:20 |
|
masak |
but on average, Parrot is much less dead nowadays than a year or two ago. |
| 00:21 |
|
lue |
Then 2 things are true about you. |
| 00:21 |
|
|
dual_ joined #perl6 |
| 00:22 |
|
lue |
1) You don't have a Norweigan Blue |
| 00:22 |
|
lue |
2) You didn't get it in Bolton |
| 00:22 |
|
masak |
I find no fault in that logic. |
| 00:24 |
|
lue |
Corrolary to 2) You didn't get it in Notlob |
| 00:24 |
|
lue |
.mmorpg(The expansive bed chamber of RD* is ready to receive occupants) |
| 00:25 |
|
* masak |
yawns |
| 00:26 |
|
masak |
just going to see if I can reproduce this segfault, and then go to bed. |
| 00:26 |
|
masak |
if it persists, probably the way to run the other tests is to change the order in which the files are run. |
| 00:27 |
|
lue |
So, today on my P6 checklist is a) begin a P6 created general-purpose utility for dealing with DNA/RNA |
| 00:27 |
|
lue |
b)design the layout of the rakudo death star |
| 00:27 |
|
masak |
'dealing with'? |
| 00:27 |
|
masak |
do you mean handling transcription/translation and their inverse operations? |
| 00:28 |
|
lue |
"decoding/encoding" it, analysis, maybe even a Life Simulator (in the distant future of course) |
| 00:28 |
|
masak |
hm, translation is proteins. |
| 00:28 |
|
Tene |
'night masak |
| 00:28 |
|
masak |
Tene: 'night. if you're here during the weekend, I'll be happy to meet to discuss the Last Mile of Web.pm. |
| 00:28 |
|
lue |
It's scary how DNA, out of all organic matter and processes, relates to programming. (IMO) |
| 00:28 |
|
masak |
aye. DNA is digital. |
| 00:29 |
|
Tene |
lue: http://www.guardian.co.uk/scie[…]nthetic-life-form |
| 00:29 |
|
masak |
huh. this time, it didn't segfault. that's both good and bad news. |
| 00:29 |
|
Tene |
masak: Yes, that would be great. |
| 00:29 |
|
lue |
Tene: I know. It kills me |
| 00:30 |
|
lue |
The Dark Side now can patent the Creation of Life |
| 00:30 |
|
masak |
don't worry. I'm sure there's Prior Art. |
| 00:30 |
|
lue |
c) Profit! |
| 00:30 |
|
lue |
masak: the USPTO tends to patent discoveries. I'm scared. |
| 00:32 |
|
lue |
Although, he does prove now that I could throw nucleotides into the proverbial blender and by chance make a TARDIS :D |
| 00:32 |
|
masak |
it is in times like this that I would advice not forgetting to breathe properly. |
| 00:33 |
|
lue |
*gurk* |
| 00:33 |
|
|
dual joined #perl6 |
| 00:33 |
|
masak |
throwing nucleotides into the proverbial blender is half of how evolution works, so I can't claim the idea doesn't have some merit... |
| 00:35 |
|
lue |
or, if you want to have a chance, change the Hox Genes, and change the proteins for brain-building into producing cells of Si (yada yada yada) |
| 00:38 |
|
masak |
yay, the tests now run past 415. \o/ |
| 00:38 |
|
lue |
\o/ |
| 00:40 |
|
masak |
test 440 fails. |
| 00:40 |
|
masak |
that'll be tomorrows riddle to crack. |
| 00:41 |
|
masak |
s/ws/w's/ |
| 00:42 |
|
lue |
goodnight, masak |
| 00:42 |
|
masak |
'night |
| 00:43 |
|
|
dual_ joined #perl6 |
| 00:51 |
|
|
dual joined #perl6 |
| 00:59 |
|
|
justatheory joined #perl6 |
| 01:07 |
|
BrowserUk |
? |
| 01:07 |
|
|
BrowserUk left #perl6 |
| 01:10 |
|
lue |
?? |
| 01:19 |
|
|
rgrau` joined #perl6 |
| 01:19 |
|
pmichaud |
?! |
| 01:21 |
|
|
Psyche^ joined #perl6 |
| 01:22 |
|
TimToady |
. |
| 01:24 |
|
Trashlord |
yeah |
| 01:29 |
|
* lue |
hears crickets |
| 01:30 |
|
|
plobsing joined #perl6 |
| 01:40 |
|
|
seatek joined #perl6 |
| 01:48 |
|
|
eternaleye joined #perl6 |
| 01:54 |
|
colomon |
?? !! |
| 01:58 |
|
|
[mark] joined #perl6 |
| 02:05 |
|
diakopter |
: |
| 02:10 |
|
lue |
~~ |
| 02:10 |
|
lue |
rakudo: multi sub infix:<^.^>($a, $b){say "$a $b happy";}; 3 ^.^ 4 |
| 02:11 |
|
p6eval |
rakudo 6a7ded: OUTPUT«3 4 happy» |
| 02:15 |
|
lue |
.u dna |
| 02:15 |
|
phenny |
lue: Sorry, no results for 'dna'. |
| 02:15 |
|
lue |
.u helix |
| 02:15 |
|
phenny |
lue: Sorry, no results for 'helix'. |
| 02:16 |
|
lue |
Unicode gives me an entire deck of cards, but no DNA symbol? Weird... |
| 02:18 |
|
|
Exodist joined #perl6 |
| 02:20 |
|
diakopter |
.u pair |
| 02:20 |
|
phenny |
U+21C8 UPWARDS PAIRED ARROWS (⇈) |
| 02:23 |
|
diakopter |
.u diam |
| 02:23 |
|
phenny |
U+2300 DIAMETER SIGN (⌀) |
| 02:23 |
|
diakopter |
.u diamo |
| 02:23 |
|
phenny |
U+25C6 BLACK DIAMOND (◆) |
| 02:24 |
|
lue |
.u ace |
| 02:24 |
|
phenny |
lue: Sorry, no results for 'ace'. |
| 02:24 |
|
lue |
.u card |
| 02:24 |
|
phenny |
lue: Sorry, no results for 'card'. |
| 02:43 |
|
isBEKaml |
.u double |
| 02:43 |
|
phenny |
U+29FA DOUBLE PLUS (⧺) |
| 02:43 |
|
isBEKaml |
.u urn |
| 02:43 |
|
phenny |
U+26B1 FUNERAL URN (⚱) |
| 02:44 |
|
|
snarkyboojum joined #perl6 |
| 02:44 |
|
isBEKaml |
.u symbol |
| 02:44 |
|
phenny |
U+2136 BET SYMBOL (ℶ) |
| 02:44 |
|
isBEKaml |
.u beta |
| 02:44 |
|
phenny |
U+03D0 GREEK BETA SYMBOL (ϐ) |
| 02:44 |
|
isBEKaml |
.u bet |
| 02:44 |
|
|
am0c joined #perl6 |
| 02:44 |
|
phenny |
U+2136 BET SYMBOL (ℶ) |
| 02:48 |
|
|
alester joined #perl6 |
| 03:00 |
|
|
gbacon joined #perl6 |
| 03:09 |
|
dalek |
yapsi: 1e6efbb | masak++ | .gitignore: |
| 03:09 |
|
dalek |
yapsi: [.gitignore] added |
| 03:09 |
|
dalek |
yapsi: review: http://github.com/masak/yapsi/[…]669f85868c62b973e |
| 03:09 |
|
dalek |
yapsi: 6a5a68e | masak++ | (2 files): |
| 03:09 |
|
dalek |
yapsi: [Yapsi] blocks now return |
| 03:10 |
|
|
dalek joined #perl6 |
| 03:10 |
|
dalek |
november: d6cd2f8 | (Jason Felds)++ | skins/CleanAndSoft/register (3 files): |
| 03:10 |
|
dalek |
november: Start of registration pages. Copied from login. |
| 03:11 |
|
|
dalek joined #perl6 |
| 03:11 |
|
lue |
o no not again |
| 03:13 |
|
dalek |
grok: 0bc215d | (Hinrik Örn Sigurðsson)++ | (4 files): |
| 03:13 |
|
dalek |
grok: Fixed problem with -l/--locate, added test for it |
| 03:13 |
|
dalek |
grok: review: http://github.com/hinrik/grok/[…]cf36da565913e91bd |
| 03:13 |
|
dalek |
grok: c06849e | (Hinrik Örn Sigurðsson)++ | (4 files): |
| 03:13 |
|
dalek |
grok: Look up the man pages. Depend on Perl6::Doc 0.42 |
| 03:13 |
|
dalek |
grok: review: http://github.com/hinrik/grok/[…]32bcc2b74c25f45e8 |
| 03:13 |
|
dalek |
grok: 8cf5c68 | (Hinrik Örn Sigurðsson)++ | (9 files): |
| 03:13 |
|
dalek |
grok: Bump version to 0.16_02 |
| 03:13 |
|
dalek |
grok: review: http://github.com/hinrik/grok/[…]55bcf63bd8061a846 |
| 03:13 |
|
dalek |
grok: 3454ac2 | (Hinrik Örn Sigurðsson)++ | Changes: |
| 03:13 |
|
dalek |
grok: Make the Changes file historically accurate |
| 03:13 |
|
dalek |
grok: review: http://github.com/hinrik/grok/[…]95e8051a9d4080850 |
| 03:13 |
|
dalek |
grok: 056121c | (Hinrik Örn Sigurðsson)++ | (4 files): |
| 03:13 |
|
dalek |
grok: Small Pod fixes |
| 03:14 |
|
dalek |
book: 8e36bf7 | moritz++ | src/classes-and-objects.pod: |
| 03:14 |
|
dalek |
book: grammar fix pointed out by diakopter++ |
| 03:14 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]a2bbc75cc16da0ecc |
| 03:15 |
|
|
JimmyZ joined #perl6 |
| 03:15 |
|
lue |
Are we supposed to get grok? |
| 03:17 |
|
dalek |
november: 1c9a598 | (Jason Felds)++ | lib/November.pm: |
| 03:17 |
|
dalek |
november: Quickie one-liner from login useful in register. |
| 03:17 |
|
dalek |
november: review: http://github.com/viklund/nove[…]6dd2f39076521483b |
| 03:33 |
|
pugssvn |
r30746 | svatsan++ | [u4x] render.pl - removed unnecessary module and minor cleanups |
| 03:50 |
|
isBEKaml |
rakudo: my $sq = -> $x { $x * $x }; say $sq 22; |
| 03:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Confused at line 11, near "say $sq 22"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 03:50 |
|
isBEKaml |
rakudo: my $sq = -> $x { $x * $x }; say $sq(22); |
| 03:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«484» |
| 04:01 |
|
isBEKaml |
rakudo: my $sq = -> $x { $x * $x }; say $sq(1..10); |
| 04:01 |
|
p6eval |
rakudo 6a7ded: OUTPUT«100» |
| 04:01 |
|
isBEKaml |
rakudo: my $sq = -> $x { $x * $x }; say $sq(1..^10); |
| 04:01 |
|
p6eval |
rakudo 6a7ded: OUTPUT«81» |
| 04:01 |
|
isBEKaml |
rakudo: my $sq = -> $x { $x * $x }; say $sq(^10); |
| 04:01 |
|
p6eval |
rakudo 6a7ded: OUTPUT«100» |
| 04:41 |
|
|
envi^home joined #perl6 |
| 05:15 |
|
|
justatheory joined #perl6 |
| 05:36 |
|
|
am0c joined #perl6 |
| 05:37 |
|
|
[particle] joined #perl6 |
| 05:41 |
|
|
lue joined #perl6 |
| 05:47 |
|
|
eternaleye joined #perl6 |
| 05:59 |
|
|
Juerd joined #perl6 |
| 06:05 |
|
|
jakk joined #perl6 |
| 06:43 |
|
|
TiMBuS joined #perl6 |
| 06:56 |
|
eternaleye |
(backlogging) bbkr, might Quill be parsing the Q as the quote meta? |
| 06:59 |
|
|
Su-Shee joined #perl6 |
| 07:37 |
|
TiMBuS |
how do you check match results in current rakudo head? using $0 will fail if there was no match. |
| 07:37 |
|
moritz_ |
if $/ { } |
| 07:37 |
|
TiMBuS |
that makes sense |
| 07:37 |
|
|
iblechbot joined #perl6 |
| 07:38 |
|
TiMBuS |
is it supposed to fail or is it just not implemented correctly yet? |
| 07:38 |
|
moritz_ |
NYI |
| 07:38 |
|
TiMBuS |
that's ok then. thanks |
| 07:41 |
|
pugssvn |
r30747 | moritz++ | [S03] s/shaped/nested/ when talking about auto-recursive hyper ops |
| 07:43 |
|
dalek |
rakudo: 9a15b82 | moritz++ | src/old/ (87 files): |
| 07:43 |
|
dalek |
rakudo: remove src/old/. |
| 07:43 |
|
dalek |
rakudo: If you want it back, run "git checkout alpha" |
| 07:43 |
|
dalek |
rakudo: review: http://github.com/rakudo/rakud[…]17f91a0cf2fd2a911 |
| 07:44 |
|
isBEKaml |
[OT]: http://www.ibm.com/developerwo[…]105AGX01&S_CMP=HP. This is the most reasonable argument in favour of opensource I've ever read. :) |
| 07:47 |
|
moritz_ |
rakudo: say $/.Bool |
| 07:47 |
|
p6eval |
rakudo 6a7ded: OUTPUT«0» |
| 07:49 |
|
moritz_ |
rakudo: $0 |
| 07:49 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 07:50 |
|
moritz_ |
rakudo: say $/.PARROT |
| 07:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«» |
| 07:50 |
|
moritz_ |
rakudo: say $/.perl |
| 07:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Any» |
| 07:50 |
|
|
cls_bsd joined #perl6 |
| 07:50 |
|
moritz_ |
rakudo: say Any.Seq |
| 07:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Method 'Seq' not found for invocant of class ''current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 07:50 |
|
moritz_ |
rakudo: say Any.list |
| 07:50 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Any()» |
| 07:51 |
|
moritz_ |
rakudo: say Any.list.perl |
| 07:51 |
|
p6eval |
rakudo 6a7ded: OUTPUT«(Any, )» |
| 07:55 |
|
|
cls_bsd joined #perl6 |
| 07:55 |
|
pugssvn |
r30748 | moritz++ | [u4x/web] fix a syntax error |
| 08:00 |
|
|
cls_bsd joined #perl6 |
| 08:05 |
|
|
cls_bsd joined #perl6 |
| 08:05 |
|
moritz_ |
I havve a patch for $0... that now produces a different error :/ |
| 08:05 |
|
moritz_ |
rakudo: $/.list.[0] |
| 08:05 |
|
p6eval |
rakudo 6a7ded: ( no output ) |
| 08:05 |
|
moritz_ |
rakudo: say $/.list.[0] |
| 08:06 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Any()» |
| 08:10 |
|
|
cls_bsd joined #perl6 |
| 08:12 |
|
isBEKaml |
oops... :(, isBEKaml-- |
| 08:12 |
|
moritz_ |
no problem |
| 08:15 |
|
|
cls_bsd joined #perl6 |
| 08:19 |
|
moritz_ |
somebody please confirm my sanity: 3[0] should be 3, 3[1] should be Nil, right? |
| 08:19 |
|
moritz_ |
I'm about to implement that in Rakudo, and get lots of tests failing that seem to indicate otherwise |
| 08:19 |
|
m6locks |
rakudo: say 3[1] |
| 08:19 |
|
p6eval |
rakudo 6a7ded: OUTPUT«get_pmc_keyed() not implemented in class 'Integer'current instr.: 'perl6;Positional[::T];postcircumfix:<[ ]>' pc 11343 (src/gen/RoleToInstanceApplier.pir:170)» |
| 08:22 |
|
|
nnhi joined #perl6 |
| 08:24 |
|
moritz_ |
ah well, my patch produces Any instead of Nil |
| 08:25 |
|
moritz_ |
still, it's a start |
| 08:29 |
|
m6locks |
:3 |
| 08:33 |
|
spinclad |
i wouldn't expect 3 to have Positional parts (or Associative for that matter) |
| 08:34 |
|
spinclad |
moritz_: ^ |
| 08:34 |
|
moritz_ |
spinclad: well, it's TimToady's decree that everything should be usable like a List |
| 08:37 |
|
spinclad |
right. singleton lists == their singlething. well, it doesn't DW_I_M, but it is well entrenched by now. |
| 08:37 |
|
moritz_ |
I must confess I also feel a bit uneasy at the notion |
| 08:38 |
|
spinclad |
so yes, 3[1] would be Nil to mark EOL. |
| 08:39 |
|
spinclad |
(or is that only if you actually iterate it? dang, i'll have synopsize on it again.) |
| 08:39 |
|
moritz_ |
problem is, it's probably not in any synopsis, but an uttering here in IRC |
| 08:39 |
|
spinclad |
rakudo: say [3, Nil].perl; say [3, Nil, 2].perl |
| 08:39 |
|
p6eval |
rakudo 6a7ded: OUTPUT«[3][3, 2]» |
| 08:40 |
|
spinclad |
rakudo: say [3, Nil][1].perl |
| 08:40 |
|
p6eval |
rakudo 6a7ded: OUTPUT«Proxy.new()» |
| 08:42 |
|
spinclad |
the .[1] element is off the end, so this Proxy (or what it turns into soon, iirc) makes the most sense to me... |
| 08:42 |
|
moritz_ |
aye |
| 08:42 |
|
moritz_ |
uohm |
| 08:43 |
|
moritz_ |
my $thing = { a => 1} |
| 08:43 |
|
moritz_ |
say $thing[0] |
| 08:43 |
|
moritz_ |
what should that produce? |
| 08:43 |
|
spinclad |
rakudo: say (3, Nil).perl |
| 08:43 |
|
moritz_ |
a Pair? |
| 08:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«(3, ())» |
| 08:43 |
|
spinclad |
rakudo: say (3, Nil)[1].perl |
| 08:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«()» |
| 08:43 |
|
spinclad |
rakudo: say (3, Nil)[2].perl |
| 08:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Any» |
| 08:44 |
|
spinclad |
(EOL is called Empty, i think?) |
| 08:45 |
|
spinclad |
rakudo: my $thing = { a => 1 }; say $thing[0] |
| 08:45 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'postcircumfix:<[ ]>' not found for invocant of class ''current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 08:45 |
|
spinclad |
rakudo: my $thing = { a => 1 }; say $thing.pairs.[0] |
| 08:45 |
|
p6eval |
rakudo 9a15b8: OUTPUT«a 1» |
| 08:48 |
|
spinclad |
i like rakudo's present point of view here (the error message could get hoisted to Perl 6 terms instead of Parrot, but that's minor) |
| 08:49 |
|
spinclad |
rakudo: for (3, Nil) { .say } |
| 08:49 |
|
p6eval |
rakudo 9a15b8: OUTPUT«3» |
| 08:49 |
|
spinclad |
rakudo: for (3, Nil, 2) { .say } |
| 08:49 |
|
p6eval |
rakudo 9a15b8: OUTPUT«32» |
| 08:52 |
|
* spinclad |
-> bed o/ |
| 08:52 |
|
|
meppl joined #perl6 |
| 08:54 |
|
|
dalek joined #perl6 |
| 09:25 |
|
|
kel__ joined #perl6 |
| 09:29 |
|
|
Jedai joined #perl6 |
| 09:48 |
|
|
wknight8111 joined #perl6 |
| 09:59 |
|
|
agentzh joined #perl6 |
| 10:21 |
|
|
masak joined #perl6 |
| 10:22 |
|
masak |
it's weekend! \o/ |
| 10:24 |
|
m6locks |
party tiem |
| 10:25 |
|
colomon |
o/ |
| 10:25 |
|
* masak |
celebrates by finding the next bug in GGE |
| 10:46 |
|
|
molaf joined #perl6 |
| 10:51 |
|
|
BrowserUk joined #perl6 |
| 10:54 |
|
BrowserUk |
? |
| 10:55 |
|
* moritz_ |
gives match objects another shot |
| 10:56 |
|
moritz_ |
time to rebase another branch... |
| 10:56 |
|
moritz_ |
when I have a long-lived topic branch, should I merge from master from time to time? |
| 10:57 |
|
moritz_ |
currently I rebase, and then use a new branch name |
| 10:57 |
|
moritz_ |
which is why there are mob2, mob3 and mob4 on github... |
| 10:57 |
|
moritz_ |
... now only mob4 :-) |
| 10:58 |
|
moritz_ |
\o/ suddenly stuff works |
| 10:59 |
|
moritz_ |
the 'mob5' branch handles named captures without evil workarounds |
| 10:59 |
|
moritz_ |
... as long as they are not quantified :/ |
| 11:00 |
|
masak |
there's not much of 'should' in the possible git workflows themselves. |
| 11:00 |
|
masak |
and I'm not sure I know how to argue for one model or the other. |
| 11:00 |
|
moritz_ |
is there something like "best practise" |
| 11:00 |
|
moritz_ |
if somebody else tracks my branches, giving them new names every few weeks is certainly confusing |
| 11:01 |
|
masak |
apart from "don't push/rebase/push", I don't know. |
| 11:01 |
|
masak |
maybe ask on #git? |
| 11:01 |
|
|
gbacon joined #perl6 |
| 11:01 |
|
moritz_ |
maybe googling a bit first :-) |
| 11:01 |
|
* masak |
does that |
| 11:02 |
|
masak |
'Rebasing and mergin: some git best practices' http://lwn.net/Articles/328436/ |
| 11:03 |
|
|
rgrau joined #perl6 |
| 11:03 |
|
masak |
'A successful Git branching model' http://nvie.com/git-model |
| 11:04 |
|
|
salmonix_ joined #perl6 |
| 11:07 |
|
* moritz_ |
hates the "Method '$meth' not found for invocant of class ''" errors |
| 11:08 |
|
masak |
they have something to do with the type objects. |
| 11:08 |
|
moritz_ |
rakudo: say Array.new.perl |
| 11:08 |
|
p6eval |
rakudo 9a15b8: OUTPUT«[]» |
| 11:09 |
|
masak |
I'm currently trying to squash a bug in which an array of Ints suddenly magically contains a GGE::Match object. |
| 11:10 |
|
masak |
I find the whole thing very worrying. |
| 11:10 |
|
moritz_ |
understandable |
| 11:11 |
|
colomon |
I'm currently trying to do a lexicographical compare on two arrays of numbers and failing badly. |
| 11:11 |
|
colomon |
oooo.... just occurred to me that I should probably prototype in normal code, considering how "say" no longer works in the setting... |
| 11:11 |
|
moritz_ |
what's so hard about it? |
| 11:11 |
|
moritz_ |
rakudo: say [1, 2, 3] cmp [1, 0, 3] |
| 11:12 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 11:12 |
|
moritz_ |
rakudo: say [1, 2, 3] cmp [1, 4, 3] |
| 11:12 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:12 |
|
colomon |
moritz_: I didn't think there was anything hard, but my code is failing badly. |
| 11:12 |
|
moritz_ |
colomon: why not juse use cmp? |
| 11:12 |
|
colomon |
orly? |
| 11:12 |
|
colomon |
no one ever told me cmp did that? |
| 11:12 |
|
moritz_ |
rakudo: say [1, 2] cmp [1, 2, 3] |
| 11:12 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:12 |
|
moritz_ |
rakudo: say [1, 2, 3] cmp [1, 2] |
| 11:12 |
|
colomon |
are you sure it does, actually? |
| 11:12 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 11:12 |
|
Su-Shee |
I don't understand the output. |
| 11:13 |
|
colomon |
rakudo: say [111, 2] cmp [2, 3, 4] |
| 11:13 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:13 |
|
|
silug joined #perl6 |
| 11:13 |
|
moritz_ |
rakudo: say 111 cmp 2 |
| 11:13 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 11:13 |
|
moritz_ |
rakudo: say 1 cmp 2 |
| 11:13 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:13 |
|
moritz_ |
cmp needs fixing |
| 11:13 |
|
colomon |
moritz_: I don't think cmp does what you think it does.... |
| 11:13 |
|
moritz_ |
it should compare numbers numerically |
| 11:13 |
|
colomon |
moritz_: it does |
| 11:13 |
|
moritz_ |
Su-Shee: which part don't you understand? |
| 11:14 |
|
colomon |
but it compares arrays by string. |
| 11:14 |
|
moritz_ |
oh. |
| 11:14 |
|
moritz_ |
should it? |
| 11:14 |
|
Su-Shee |
moritz_: does it return yes/no or the position of what's different or how many elements are the same or not..? |
| 11:14 |
|
colomon |
well, you just now is the first I ever heard that it should compare arrays lexicographically. |
| 11:15 |
|
colomon |
but that doesn't mean you are wrong. |
| 11:15 |
|
moritz_ |
Su-Shee: it's three-way comparsion |
| 11:15 |
|
|
slavik joined #perl6 |
| 11:15 |
|
moritz_ |
Su-Shee: and returns smaller, same or greater |
| 11:15 |
|
Su-Shee |
oh, I thought it compares element by element. |
| 11:16 |
|
moritz_ |
rakudo: say (1, 2, 3) »cmp«(1, 0, 5) |
| 11:16 |
|
p6eval |
rakudo 9a15b8: OUTPUT«01-1» |
| 11:17 |
|
colomon |
moritz_: I don't see anything in the spec about cmp working intelligently on lists/arrays. |
| 11:17 |
|
colomon |
but I may be missing something. |
| 11:17 |
|
moritz_ |
oh, it might be very well that I'm wrong, or the spec is incomplete, or both |
| 11:18 |
|
moritz_ |
TimToady: any thoughts? |
| 11:20 |
|
moritz_ |
quick question on src/core/Array.pm lines 20 to 23... why does it fill up to $i+1, not up to $i? |
| 11:21 |
|
moritz_ |
afk, lunch etc (will backlog) |
| 11:21 |
|
colomon |
moritz_: I think because it doesn't matter if you fill extra? |
| 11:21 |
|
colomon |
which is a non-answer answer.... |
| 11:22 |
|
colomon |
but then, I thought that code wasn't currently being used, and is scheduled to be rewritten. |
| 11:25 |
|
|
FreeStorm joined #perl6 |
| 11:28 |
|
colomon |
moritz_: turns out the correct answer is that my lexicographical code was working fine, but its support code was broken. |
| 11:31 |
|
colomon |
rakudo: say [!!] 0, 0, -1, 1, 0 |
| 11:31 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)» |
| 11:31 |
|
colomon |
rakudo: say [||] 0, 0, -1, 1, 0 |
| 11:31 |
|
colomon |
whoops |
| 11:31 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:31 |
|
colomon |
ack, I love p6! |
| 11:32 |
|
colomon |
rakudo: say [||] 0, 0, -1, -3, 255 |
| 11:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«-1» |
| 11:42 |
|
|
BrowserUk left #perl6 |
| 11:45 |
|
dalek |
csmeta: r293 | pawelmurias++ | trunk/Sprixel/t/parse_bug2.t: |
| 11:45 |
|
dalek |
csmeta: test for a parsing bug |
| 11:45 |
|
dalek |
csmeta: review: http://code.google.com/p/csmet[…]urce/detail?r=293 |
| 11:46 |
|
isBEKaml |
I don't understand self!fill in Array.pm - where's it defined? |
| 11:47 |
|
isBEKaml |
is that a private sub in there? |
| 11:48 |
|
colomon |
isBEKaml: it's defined in Array.pir, I believe. Or possibly Seq.pir |
| 11:48 |
|
|
pmurias joined #perl6 |
| 11:48 |
|
isBEKaml |
colomon: I'm looking at Seq.pir, since I don't find it in Array.pir |
| 11:48 |
|
pmurias |
diakopter: hi |
| 11:49 |
|
colomon |
isBEKaml: Seq.pir, line 118. (ack is your friend. ;) |
| 11:49 |
|
|
[Coke] joined #perl6 |
| 11:50 |
|
isBEKaml |
colomon: aye, sir. but I don't have ack, I use find and fgrep. :) |
| 11:56 |
|
isBEKaml |
colomon: the problem is, even if I do find the sub/method, I won't know how that's related to what I'm looking for. For instance, I didn't know that Array is a Sequence. :) |
| 11:56 |
|
colomon |
:) |
| 11:57 |
|
pmurias |
masak: looking at your slides do you claim that if (my $foo = 42) {...} is an example of a bug sigmund finds |
| 11:57 |
|
colomon |
isBEKaml: I believe Seq is on the chopping block at the moment, too. |
| 11:57 |
|
pmurias |
masak: if $a = 42 {...} |
| 11:58 |
|
isBEKaml |
colomon: I don't understand. Chopping block? You mean, it will be dropped? |
| 11:58 |
|
masak |
pmurias: yes. it'd probably not merit a note on the error level, but on the warning level. |
| 11:59 |
|
masak |
because in some rare cases it might be what the programmer intended. |
| 11:59 |
|
colomon |
isBEKaml: there is supposed to be a major rewrite of list/Seq/Array in the very near future, and it seems most of us hate Seq. |
| 12:00 |
|
masak |
colomon: what are the reasons for hating Seq? I don't think I've had much exposure to it. |
| 12:00 |
|
masak |
but I definitely think there is an undue proliferation of almost-similar types in that area. |
| 12:00 |
|
isBEKaml |
colomon: Oh, I see... |
| 12:03 |
|
colomon |
masak: give me a moment, trying to finish a blog post before I have to take on the morning duties of a dad. |
| 12:03 |
|
masak |
oh, no rush. |
| 12:03 |
|
mathw |
Hey |
| 12:06 |
|
pmurias |
masak: if my $a = 42 {...} is a thing i use regularly |
| 12:08 |
|
isBEKaml |
masak: I have made that mistake before and I force myself a re-look every time I write code. I still make mistakes. |
| 12:08 |
|
masak |
pmurias: even with the RHS being a literal? |
| 12:08 |
|
masak |
isBEKaml: me too. |
| 12:08 |
|
pmurias |
masak: literal no |
| 12:09 |
|
masak |
pmurias: that's mainly the case I'm talking about. |
| 12:09 |
|
isBEKaml |
masak: I keep forgetting that p6 doesn't need parens around if blocks, parens help even if that's a practice from elsewhere. :) |
| 12:09 |
|
pmurias |
if'ing for an literal doesn't seem very sensible |
| 12:10 |
|
masak |
pmurias: well, hence the high probability of a thinko. |
| 12:10 |
|
slavik |
how can I make an iterator for a list? |
| 12:10 |
|
colomon |
loliblogged: http://justrakudoit.wordpress.[…]ing-two-numerics/ |
| 12:10 |
|
isBEKaml |
masak: if ( my $a == 42) # I prolly won't make that mistake if we need parens here.. |
| 12:10 |
|
slavik |
is it: $blah <== @list ? |
| 12:10 |
|
masak |
pmurias: I sense some slight talking at cross purposes here. you do realize that sigmung finds possible thinkos? |
| 12:11 |
|
isBEKaml |
masak: OTOH, using if as a postconditional does make me go off. say 'blah' if my $a = 42; ;0 |
| 12:11 |
|
masak |
isBEKaml: not sure what you mean. why would requiring parens help you not make a mistake? and what mistake are you referring to? using 'my' in the if statement? |
| 12:12 |
|
isBEKaml |
masak: I was referring to '=' and '==' thinkos errors. |
| 12:12 |
|
pmurias |
masak: using my in a if statement doesn't seem to be that likely a mistake |
| 12:13 |
|
masak |
pmurias: indeed. but I only need to use 'my' there when I'm testing for definedness. otherwise I tend to use '->'. |
| 12:13 |
|
isBEKaml |
masak: Now I see you were referring to the 'my' in an if conditional. Now that doesn't make sense to me. |
| 12:14 |
|
masak |
isBEKaml: more cross purposes. this conversation needs to slow down a bit. :) |
| 12:14 |
|
masak |
maybe we should talk in full sentences via nopaste instead. |
| 12:14 |
|
isBEKaml |
:) |
| 12:15 |
|
isBEKaml |
masak: maybe, we just found another error here. ;) |
| 12:15 |
|
pmurias |
masak: so sigmund is intendend to be a "check for the suspisious stuff" debugging aid rather than a Devel::Critic for Perl6 |
| 12:15 |
|
masak |
pmurias: yeah. |
| 12:15 |
|
masak |
granted, it could evolve into a Critic too. |
| 12:15 |
|
pmurias |
* Perl::Critic |
| 12:16 |
|
masak |
but it was born out of the need to find stupid thinko stuff early. |
| 12:16 |
|
pmurias |
it seems like something that could benefit very much from editor/ide integration |
| 12:16 |
|
masak |
I started making a list over a year ago of things that would be trivial or easy to catch, using only the parse tree or a slghtly higher-level AST. |
| 12:16 |
|
masak |
pmurias: yes. I'll explicitly leave that to someone else, though. the Padre people, maybe. |
| 12:17 |
|
masak |
I'll try to make such integration easy, of course. but I think that would detract too much from what I want to be working on, and probably someone else would wnjoy it more anyway. |
| 12:17 |
|
pmurias |
masak: you are an emacs user? |
| 12:18 |
|
masak |
aye. and a vim user. |
| 12:18 |
|
masak |
I also use Perl 5, Perl 6, Python and Ruby. :) |
| 12:19 |
|
pmurias |
masak: you use viper? |
| 12:19 |
|
masak |
no. |
| 12:19 |
|
masak |
I tend to avoid hybrids. |
| 12:19 |
|
isBEKaml |
masak: if you're an emacs user, you could write up a plugin for that using elisp? |
| 12:19 |
|
masak |
perhaps. |
| 12:19 |
|
isBEKaml |
I don't use emacs, so I don't know. (vim user) |
| 12:19 |
|
masak |
well, it's certainly possible. |
| 12:20 |
|
masak |
I'm still not terribly good at Elisp. |
| 12:20 |
|
masak |
and I don't use Emacs for programming much. |
| 12:20 |
|
masak |
mostly for prose. |
| 12:20 |
|
isBEKaml |
I'm not good at vimscript either. |
| 12:20 |
|
slavik |
rakudo: say $*IN.WHAT |
| 12:20 |
|
p6eval |
rakudo 9a15b8: OUTPUT«IO()» |
| 12:21 |
|
slavik |
dang it |
| 12:21 |
|
masak |
slavik: how so? |
| 12:21 |
|
slavik |
rakudo: my $a = 1..10; say $a.WHAT; |
| 12:21 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Range()» |
| 12:21 |
|
slavik |
masak: ? |
| 12:21 |
|
masak |
slavik: why 'dang it' on that result? |
| 12:21 |
|
masak |
seems perfectly fine to me. |
| 12:22 |
|
|
carlin joined #perl6 |
| 12:22 |
|
slavik |
masak: it return IO(), I expected it to say something that would indicate it as an iterator |
| 12:22 |
|
isBEKaml |
slavik: that's an implicit file handle for reading used by p6. what's wrong? |
| 12:23 |
|
slavik |
rakudo: my $a = 1..10; for =$a { say }; |
| 12:23 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "for =$a { "current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 12:25 |
|
masak |
slavik: prefix:<=> is dead, long live .get |
| 12:25 |
|
isBEKaml |
rakudo: my $a = 1..10; for $^a { .say } |
| 12:25 |
|
p6eval |
rakudo 9a15b8: OUTPUT«12345678910» |
| 12:25 |
|
masak |
o.O |
| 12:25 |
|
* masak |
submits rakudobug |
| 12:25 |
|
slavik |
masak: so ... it's $*IN.get ? |
| 12:25 |
|
masak |
slavik: for one line, yes. |
| 12:25 |
|
masak |
slavik: but for many lines, you want .lines |
| 12:26 |
|
slavik |
masak: just learning what the new (while (<>)) would look like ;) |
| 12:26 |
|
isBEKaml |
masak: bug? :O |
| 12:26 |
|
masak |
rakudo: my $a = 42; say $^a |
| 12:26 |
|
p6eval |
rakudo 9a15b8: OUTPUT«42» |
| 12:26 |
|
masak |
std: my $a = 42; say $^a |
| 12:26 |
|
p6eval |
std 30748: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^a cannot be used in this kind of block at /tmp/u3vXsAgXHU line 1:------> my $a = 42; say $^a⏏<EOL>Check failedFAILED 00:01 115m» |
| 12:26 |
|
masak |
alpha: my $a = 42; say $^a |
| 12:26 |
|
p6eval |
alpha 30e0ed: OUTPUT«42» |
| 12:26 |
|
masak |
huh. |
| 12:27 |
|
masak |
slavik: for lines($*ARGFILES) { ... } |
| 12:28 |
|
isBEKaml |
masak: doesn't look like a bug to me. I think of ^ as a limiting operator here. |
| 12:29 |
|
masak |
isBEKaml: sure, if you use it before the dollar. |
| 12:29 |
|
masak |
isBEKaml: after, it's a twigil. |
| 12:29 |
|
|
alanhaggai_ joined #perl6 |
| 12:29 |
|
isBEKaml |
rakudo: my $temp = 5; for $^temp { .say } |
| 12:29 |
|
p6eval |
rakudo 9a15b8: OUTPUT«5» |
| 12:29 |
|
masak |
rakudo: my $temp = 5; for ^$temp { .say } |
| 12:29 |
|
p6eval |
rakudo 9a15b8: OUTPUT«01234» |
| 12:29 |
|
masak |
that's the difference. |
| 12:29 |
|
isBEKaml |
masak: yes, I defined $temp to be a range here. |
| 12:30 |
|
isBEKaml |
rakudo: my $temp = 0 .. 5; for $^temp {.say } |
| 12:30 |
|
masak |
no, you didn't. it's an Int. |
| 12:30 |
|
p6eval |
rakudo 9a15b8: OUTPUT«012345» |
| 12:30 |
|
masak |
isBEKaml: do you believe me when I claim that you're slightly confused about this? |
| 12:30 |
|
masak |
isBEKaml: I'll be happy to set you straight, though. |
| 12:30 |
|
isBEKaml |
masak: I'm always confused. ;) |
| 12:31 |
|
masak |
isBEKaml++ # excellent starting point |
| 12:31 |
|
isBEKaml |
masak: Range first, Int second, Range again. # I don't know about twigils |
| 12:31 |
|
masak |
isBEKaml: ok, so. in for loops, you'll be most likely to see `for ^$variable { ... }` |
| 12:31 |
|
masak |
that's the range you're talking about. $variable is numified and used as the exclusive-upper point of a range starting at 0. |
| 12:32 |
|
masak |
TimToady referred to prefix:<^> as 'upto' the other day. |
| 12:32 |
|
masak |
a 'twigil', or a 'secondary sigil' is something that comes after a sigil (one of $ @ % & ::) |
| 12:33 |
|
masak |
twigils usually denote different scoping of some kind. |
| 12:33 |
|
masak |
for example $!attr and $.meth denote object has-scoping. |
| 12:33 |
|
masak |
and $*contextual denote some dynamic scoping. |
| 12:33 |
|
slavik |
$.meth makes no sense ... $.makemeth on the other hand ... does |
| 12:34 |
|
slavik |
:) |
| 12:35 |
|
masak |
isBEKaml: so ^$var creates a range, whereas $^var denotes a variable which also is an auto-declared positional parameter in a sigil-less block. |
| 12:35 |
|
masak |
isBEKaml: a bit like `sort { $a <=> $b }` in Perl 5. |
| 12:36 |
|
masak |
isBEKaml: in Perl 6, you'd write `sort { $^a <=> $^b }`, which is sugar for `sort -> $a, $b { $a <=> $b }` |
| 12:36 |
|
masak |
i.e. a block with two parameters $a and $b. but with $^a and $^b, you don't have to declare them as such. |
| 12:37 |
|
isBEKaml |
masak: yeah, I tried -> this morning.closures. |
| 12:37 |
|
masak |
now, it's CONCEIVABLE that one sometimes means `for $^range { ... }` in code, but it'd have to be very rare. |
| 12:37 |
|
masak |
most likely it's a typo for `for ^$range { ... }` |
| 12:38 |
|
|
Su-Shee left #perl6 |
| 12:39 |
|
isBEKaml |
masak++ # twigils and range limit operator |
| 12:39 |
|
isBEKaml |
masak: Now, I definitely agree there has to be some sort of a gotcha here by the p6 compiler to notify the programmer. |
| 12:39 |
|
masak |
isBEKaml: you're lucky to be here in 2010 so you get the long answer. :) |
| 12:39 |
|
masak |
isBEKaml: in 2015, we'll have to dole out FAQ URLs instead. |
| 12:40 |
|
isBEKaml |
masak: I'm lucky I got in early! ;) |
| 12:40 |
|
masak |
yup. |
| 12:41 |
|
isBEKaml |
rakudo: my $temp = { $^x * $^x }; say $temp(42); |
| 12:41 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1764» |
| 12:41 |
|
isBEKaml |
yay for twigils! :) |
| 12:41 |
|
masak |
S02 has the story. |
| 12:41 |
|
masak |
and probably S06, a bit. |
| 12:42 |
|
isBEKaml |
masak: I still haven't gone through it fully... too much detail, too much distraction :( |
| 12:42 |
|
masak |
know the feeling. :/ |
| 12:42 |
|
masak |
you will, eventually. |
| 12:42 |
|
masak |
rakudo: my $a = sub { say $^a + $^a }; $a(4) |
| 12:42 |
|
p6eval |
rakudo 9a15b8: OUTPUT«8» |
| 12:42 |
|
masak |
rakudo: my $a = sub { say $^a + $^a }; $a(4, 5) |
| 12:42 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Too many positional parameters passed; got 2 but expected 1current instr.: '_block48' pc 329 (EVAL_1:33593300)» |
| 12:43 |
|
masak |
ah, closing http://rt.perl.org/rt3/Ticket/[…]lay.html?id=73106 |
| 12:43 |
|
isBEKaml |
rakudo: my $temp = { $^b + $^c }; say $temp(23, 45); |
| 12:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«68» |
| 12:44 |
|
isBEKaml |
twigils can bind themselves to anything? this looks a lot like closures... |
| 12:44 |
|
masak |
well, they are closures. |
| 12:44 |
|
masak |
they bind themselves to the innermost surrounding block. |
| 12:44 |
|
|
BrowserUk joined #perl6 |
| 12:45 |
|
masak |
which is a problem sometimes, because you might want to refer to a further-out surrounding block. |
| 12:45 |
|
isBEKaml |
masak: AFAIK, closures can bind one local parameter and one free variable. Binding the free variable here is what constitutes a closure. #I might be wrong here... |
| 12:45 |
|
masak |
which is why $a is a synonym for $^a after the latter has been used once. |
| 12:46 |
|
masak |
isBEKaml: a closure is simply a block that retains information about its surrounding environment. |
| 12:47 |
|
isBEKaml |
rakudo: my $temp = { say $^b; $^c ** 2 }; say $temp(23, 'String') |
| 12:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«230» |
| 12:47 |
|
masak |
rakudo: sub iter-gen() { my $c = 0; return { $c++ } }; my $i = iter-gen(); .say for $i(), $i(), $i() |
| 12:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«012» |
| 12:47 |
|
isBEKaml |
rakudo: my $temp = { say $^b; say $^c ** 2 }; say $temp(23, 'String') |
| 12:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«2301» |
| 12:48 |
|
isBEKaml |
rakudo: my $temp = { say $^b; say $^c ** 2 }; $temp(23, 'String') |
| 12:48 |
|
p6eval |
rakudo 9a15b8: OUTPUT«230» |
| 12:48 |
|
masak |
here, the closure is { $c++ }. it retains a binding to the $c, declared in the 'iter-gen' sub. |
| 12:48 |
|
masak |
you could store the closure from several different iter-gen calls into different variables, and they'd all count up their very own $c independently of each other. |
| 12:49 |
|
masak |
I'd show it, but Rakudo is broken in that area right now, so one needs to manyally pir::clone() to make it really work. |
| 12:49 |
|
masak |
but anyway, that's closures. they 'close' over a surrounding environment, keeping references to some variables which would otherwise have gone out of scope. |
| 12:50 |
|
masak |
in many ways, they have the aspects of very light-weight objects. |
| 12:51 |
|
isBEKaml |
masak++ # closures-in-detail |
| 12:51 |
|
masak |
I seem to be in Tutor Mode today. :P |
| 12:52 |
|
masak |
maybe a good time to take a look at the book. |
| 12:52 |
|
isBEKaml |
I only wish I were here early than having to worry about not being able to read specs... :( |
| 12:53 |
|
isBEKaml |
yeah and maybe update the glossary |
| 12:53 |
|
masak |
the specs are hard to read. I'm currently struggling through what the last section of S04 actually means. |
| 12:55 |
|
isBEKaml |
masak: Very relevant. "When a closure is not a closure" |
| 12:55 |
|
isBEKaml |
:) |
| 12:55 |
|
masak |
yeah. I think I see the intent of that section, but my brain hasn't yet succeeded in enveloping the technical specifics. |
| 12:56 |
|
masak |
which probably means I should keep chunking up until the concepts are few enough to fit. :) |
| 12:57 |
|
masak |
(and no, 'chunking up' is not a drug euphemism, it's an NLP term. http://www.renewal.ca/nlp27.htm ) |
| 12:57 |
|
isBEKaml |
that's what this says: ...ever use the current reference to the routine, it gets the current snapshot of its world in terms of the lexical symbols that are visible to it |
| 12:57 |
|
isBEKaml |
:D |
| 13:02 |
|
isBEKaml |
masak: don't bother explaining euphemisms. Non-native here. :) |
| 13:02 |
|
masak |
hey, me too. I'm just a silly Swede. |
| 13:02 |
|
isBEKaml |
masak: Btw, that quote from S04 says: "Keep it small, keep it close" :D |
| 13:03 |
|
* masak |
likes that quote |
| 13:03 |
|
isBEKaml |
and I, a confused Indian. ;) |
| 13:04 |
|
masak |
ah, Bharato. |
| 13:04 |
|
isBEKaml |
Bharat, yeah. (internal name among ourselves, like Nippon to Japanese ) |
| 13:05 |
|
jnthn |
o/ |
| 13:05 |
|
masak |
jnthn! |
| 13:05 |
|
isBEKaml |
yo, jnthn ! |
| 13:05 |
|
jnthn |
мэсак!! |
| 13:05 |
|
masak |
'Bharato' is the name sometimes used instead of 'Hindio' by politically-aware Esperantists. |
| 13:05 |
|
masak |
:) |
| 13:06 |
|
masak |
I haven't heard anyone use 'Nipono', though. |
| 13:06 |
|
masak |
though some say 'Suomo' rather than 'Finnlando'. |
| 13:07 |
|
masak |
Suomio* |
| 13:07 |
|
isBEKaml |
suomi! |
| 13:07 |
|
jnthn |
I heard their language is hard to finnish learning. |
| 13:08 |
|
masak |
-Opun |
| 13:08 |
|
masak |
Finnish is said to be very grammatically pleasing, actually. |
| 13:08 |
|
isBEKaml |
Finnish won't finish learning their language! |
| 13:08 |
|
masak |
Perl6ers won't finnish their language... :) |
| 13:09 |
|
jnthn |
masak: Yeah, I've heard that. Which makes me wonder...since I like grammar, would I actually find it not quite so terrifying. |
| 13:09 |
|
jnthn |
iiuc, there's lots of cases. But, well, those are OK. :-) |
| 13:10 |
|
masak |
jnthn: there's a prepositional noun case in Estonian (which is related to Finnish), meaning 'beside', derived from the word for 'ear'. the thought pleases me. |
| 13:11 |
|
jnthn |
Wow. :-) |
| 13:12 |
|
isBEKaml |
:) |
| 13:12 |
|
masak |
[citation needed] |
| 13:12 |
|
BrowserUk |
phenny tell ruoso: In your vision, can coderefs be passed between kthreads? Eg. my $x=123; sub ($a) thing{ return $a * $x } ...; my @a <== map{ thing( $_ ) }, 1 .. 10; That is, the piped map is run in a kthread, it uses thing() which is a first class function, defined in the current kthreads as a closure over $x, which is a lexical defined in the spawning kthread. If closures are done by CPS keeping around stack frames, how does the spawned |
| 13:12 |
|
BrowserUk |
thread get to see the value of $x? |
| 13:12 |
|
masak |
ETOOLONG |
| 13:12 |
|
jnthn |
masak: It's the Lund Carnival today |
| 13:12 |
|
masak |
ENOCOLON |
| 13:12 |
|
jnthn |
masak: Feels like a bit of a DDoS of the city. :-) |
| 13:12 |
|
masak |
:P |
| 13:13 |
|
jnthn |
But kinda fun too. |
| 13:13 |
|
pmichaud |
good morning, #perl6 |
| 13:13 |
|
jnthn |
:-) |
| 13:13 |
|
masak |
pmichaud! \o/ |
| 13:13 |
|
jnthn |
moritz_, pmichaud |
| 13:13 |
|
jnthn |
oh |
| 13:13 |
|
jnthn |
*morning |
| 13:13 |
|
pmichaud |
(closures): nqp has working closures, even if rakudo doesn't at the moment :-) |
| 13:13 |
|
masak |
good moritz_ :) |
| 13:13 |
|
jnthn |
wtf, I tried to tab-complete "morning" |
| 13:13 |
|
BrowserUk |
phenny tell ruoso In your vision, can coderefs be passed between kthreads? Eg. my $x=123; sub ($a) thing{ return $a * $x } ...; my @a <== map{ thing( $_ ) }, 1 .. 10; That is, the piped map is run in a kthread, it uses thing() which is a first class function, defined in the current kthreads as a closure over $x, which is a lexical defined in the spawning kthread. |
| 13:13 |
|
masak |
ESTILLNOCOLON |
| 13:13 |
|
BrowserUk |
phenny: tell ruoso In your vision, can coderefs be passed between kthreads? Eg. my $x=123; sub ($a) thing{ return $a * $x } ...; my @a <== map{ thing( $_ ) }, 1 .. 10; That is, the piped map is run in a kthread, it uses thing() which is a first class function, defined in the current kthreads as a closure over $x, which is a lexical defined in the spawning kthread. |
| 13:13 |
|
phenny |
BrowserUk: I'll pass that on when ruoso is around. |
| 13:14 |
|
masak |
jnthn: clearly we need to invite someone called 'morning' to the channel. :P |
| 13:14 |
|
morning |
:D |
| 13:15 |
|
jnthn |
\o/ |
| 13:15 |
|
BrowserUk |
phenny: tell ruoso If closures are done by CPS keeping around stack frames, how does the spawned thread get to see the value of $x? |
| 13:15 |
|
phenny |
BrowserUk: I'll pass that on when ruoso is around. |
| 13:15 |
|
morning |
uhh... |
| 13:15 |
|
* morning |
pmichaud |
| 13:15 |
|
morning |
ah, that's better! ;) |
| 13:16 |
|
masak |
morning++ |
| 13:16 |
|
pmichaud |
nqp: sub iter-gen() { my $c := 0; return { $c++ } }; my $x := iter-gen(); my $y := iter-gen(); say $x(), $y(); say $x(); say $x() |
| 13:16 |
|
p6eval |
nqp: OUTPUT«Routine declaration requires a signature at line 1, near "-gen() { m"current instr.: 'parrot;HLL;Grammar;panic' pc 501 (src/cheats/hll-grammar.pir:196)» |
| 13:17 |
|
jnthn |
pmichaud: nqp-rx doesn't support - in identifiers. |
| 13:17 |
|
pmichaud |
nqp: sub iter-gen() { my $c := 0; return { $c++ } }; my $x := iter-gen(); my $y := iter-gen(); say($x(), $y()); say($x()); say($x()) |
| 13:17 |
|
p6eval |
nqp: OUTPUT«Routine declaration requires a signature at line 1, near "-gen() { m"current instr.: 'parrot;HLL;Grammar;panic' pc 501 (src/cheats/hll-grammar.pir:196)» |
| 13:17 |
|
jnthn |
pmichaud: I was tempted to fix it but then thought you may have a reason. |
| 13:17 |
|
pmichaud |
nqp: sub itergen() { my $c := 0; return { $c++ } }; my $x := itergen(); my $y := itergen(); say($x(), $y()); say($x()); say($x()) |
| 13:17 |
|
p6eval |
nqp: OUTPUT«0012» |
| 13:17 |
|
jnthn |
nqp: my $oh-noes = "doesn't work"; |
| 13:17 |
|
p6eval |
nqp: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 1, near " \"doesn't "current instr.: 'parrot;HLL;Grammar;panic' pc 501 (src/cheats/hll-grammar.pir:196)» |
| 13:17 |
|
jnthn |
nqp: my $oh-noes := "doesn't work"; |
| 13:17 |
|
p6eval |
nqp: OUTPUT«Multiple Dispatch: No suitable candidate found for 'subtract', with signature 'PPP->P'current instr.: '_block11' pc 0 (EVAL_1:4)» |
| 13:18 |
|
pmichaud |
jnthn: yeah, I need to think about that (and what it might mean for translating to an underlying vm) |
| 13:18 |
|
pmichaud |
nqp: sub itergen() { my $c := 0; return { $c++ } }; my $x := itergen(); my $y := itergen(); say($x(), $y()); say($x()); say($x()); say($y()); |
| 13:18 |
|
p6eval |
nqp: OUTPUT«00121» |
| 13:18 |
|
pmichaud |
yay for working closures (in nqp) |
| 13:18 |
|
jnthn |
\o/ |
| 13:18 |
|
jnthn |
pmichaud: How's the context PAST node coming along? |
| 13:19 |
|
pmichaud |
needs a good name :-) |
| 13:19 |
|
jnthn |
pmichaud: I really haven't been able to pay much attention to developments over teh last few days. |
| 13:19 |
|
pmichaud |
jnthn: I've primarily been working on REPL |
| 13:19 |
|
pmichaud |
I'm almost done |
| 13:19 |
|
jnthn |
Oh, cool. \o/ |
| 13:19 |
|
pmichaud |
we now have this, though: |
| 13:19 |
|
pmichaud |
pmichaud orange:~/nqp-rx$ ./nqp |
| 13:19 |
|
pmichaud |
> 3+4 |
| 13:19 |
|
pmichaud |
7 |
| 13:19 |
|
pmichaud |
> |
| 13:20 |
|
pmichaud |
(note: no "say()") |
| 13:20 |
|
jnthn |
> say 3 + 4 # what does this do? |
| 13:20 |
|
pmichaud |
however, if you explicitly print something, the return value isn't printed |
| 13:20 |
|
jnthn |
OK, cool. |
| 13:20 |
|
pmichaud |
pmichaud orange:~/nqp-rx$ ./nqp |
| 13:20 |
|
pmichaud |
> say(3+4); 5+7; |
| 13:20 |
|
pmichaud |
7 |
| 13:20 |
|
pmichaud |
> |
| 13:20 |
|
masak |
someone should write up a HLL which can run the snippets in this old April Fools interview: http://www.perl.com/pub/a/2001/04/01/parrot.htm |
| 13:20 |
|
jnthn |
> sub foo() { say 42 }; foo(); |
| 13:21 |
|
pmichaud |
> sub foo() { say(42); }; foo(); |
| 13:21 |
|
pmichaud |
42 |
| 13:21 |
|
jnthn |
.oO( lol, using pmichaud++ as a repl ) |
| 13:21 |
|
masak |
:D |
| 13:21 |
|
* BrowserUk |
wonders if he's the only one who finds the lack of definitiveness in the SOs more than vaguely disconcerting? |
| 13:21 |
|
pmichaud |
> sub foo() { 42 }; foo(); |
| 13:21 |
|
pmichaud |
42 |
| 13:21 |
|
jnthn |
.oO( Save Our Synopses ) |
| 13:21 |
|
masak |
'SOs'? |
| 13:22 |
|
masak |
ah, synopses, I presume. wasn't used to seeing that abbrv. |
| 13:22 |
|
* BrowserUk |
always takes 3 attempts to type Synopses. |
| 13:22 |
|
|
protorom joined #perl6 |
| 13:23 |
|
masak |
BrowserUk: what helps most is if you air your disconcertedness in the form of questions here on-channel. |
| 13:23 |
|
|
protorom joined #perl6 |
| 13:23 |
|
masak |
some types of lack of definitiveness are actually the Sxx documents just being scattered due to the way they were written. |
| 13:24 |
|
masak |
some things are indeed inconsistent, contradictory or not-specified-enough. we're always on the lookout for those things. |
| 13:24 |
|
masak |
S09 was brought up as something the other day that'll probably undergo review as soon as someone starts implementing it. |
| 13:25 |
|
masak |
also, S06 and S19 are known to contradict each other a bit. |
| 13:25 |
|
pmichaud |
some things are not-definitive because we really need an implementation to work before we can be definite |
| 13:29 |
|
BrowserUk |
masak: It's quite hard to put into words with specific examples. I've been reading SO9 over and over, and there seem to be a lot of "maybe"s and "or shoudl it be?"s and "somehow"s ... more generally, just a lack of "this is how it will work". |
| 13:30 |
|
masak |
BrowserUk: nod. |
| 13:30 |
|
masak |
BrowserUk: what would be really useful, but will probably be quite hard, is if someone wrote "real code" on the current S09. |
| 13:30 |
|
masak |
to sort of shake out the uncertainties. |
| 13:30 |
|
colomon |
jnthn: (backlogging) Seems like once or twice a day I try to tab-complete a normal (but long) word here. :) |
| 13:31 |
|
masak |
the problem with that, of course, is that there's nowhere to run that code right now. |
| 13:31 |
|
BrowserUk |
I understand the reasoning for them starting out that way, but ... without joining any bandwagons... it feels like it should be somewhat more defined by now. |
| 13:32 |
|
BrowserUk |
I'm guessing (hoping) that SO9 is probably one of the worst in this respect due to the nature of what it covers. |
| 13:34 |
|
isBEKaml |
colomon: I was surprised to find my name in the release notes to Erlangen in your blog... What did I do wrong? ;) |
| 13:34 |
|
|
redicaps joined #perl6 |
| 13:35 |
|
BrowserUk |
Normally, with less ambitious projects, you either define them in terms of what is known to be possible--and then implement. Or define what is required and then work out how to implement. BUt here both ends are speculating upon what the other will want/will be able to do. That makes progress from either end hard to reason about. |
| 13:35 |
|
masak |
BrowserUk: IO (S16) is still weak. concurrency (S07) is weak. command line options (S19) are weak. Pod (S26) is weak. there are a couple of fairly solid synopses, notably S02, S03, S04, S05, S06 and S12. |
| 13:36 |
|
isBEKaml |
Those solid synopses are what I'm trying to read, unsuccessfully, over the past couple of weeks... |
| 13:37 |
|
* isBEKaml |
thinks maybe he will get it in, one day... #just waits for the epiphany moment... ;) |
| 13:37 |
|
* BrowserUk |
doesn't have the requisite savvy for most of those, hence trying to stay out of them and stick to something I know a little about. |
| 13:37 |
|
masak |
isBEKaml: what really helped for me was to use Rakudo and actually write stuff. |
| 13:39 |
|
isBEKaml |
masak: I am, too. Trying to get existing examples in pugs repo working with Rakudo. Since, we no longer use pugs, I guess we're okay with porting them to rakudo. |
| 13:39 |
|
masak |
isBEKaml: yes, that sounds like a worthy idea. |
| 13:40 |
|
isBEKaml |
I have just temporarily put an hold on that pursuit until I gain more into S02 until S04... |
| 13:42 |
|
isBEKaml |
You see, coding up those in confused state is the last thing we all want... :) |
| 13:42 |
|
pmichaud |
S08 is wrong. :-) |
| 13:42 |
|
isBEKaml |
pmichaud++ ## he's definite, here.. :-) |
| 13:44 |
|
BrowserUk |
maasak: with regard to writing real code. I've been trying. By utilising another language with sufficient existing working code to give a firm underpinning upon which to try things out. I even posted some Perl 5 code that emulated ruoso's test example, but it got no reaction at all. |
| 13:45 |
|
masak |
BrowserUk: sorry you feel you've been overlooked. I for one am excited to see discussion flowing on the concurrency topic, even if I'm too inexperienced to contribute any to it myself. |
| 13:46 |
|
BrowserUk |
I'm playing with Erlang because it has both types of threading and a flexible syntax to allow me to "mock up" scenarios, but it slow going--the Erlang manuals are thorough, but tough to find your way around. |
| 13:47 |
|
masak |
heh. I installed Erlang today, and plan to play around with it a little in my copious spare time. |
| 13:47 |
|
* BrowserUk |
doesn't feel "overlooked", just walking on eggshells most of the time. |
| 13:47 |
|
masak |
good. I think we're all walking on eggshells. :) |
| 13:47 |
|
* moritz_ |
tramples over broken eggshells |
| 13:47 |
|
* pmichaud |
plasters over the broken eggshels |
| 13:48 |
|
* isBEKaml |
looks for eggshells! :-) |
| 13:48 |
|
pmichaud |
"new coat of paint, and everything is fine!" |
| 13:49 |
|
* BrowserUk |
looks at the bulge in the carpet and and wonders if anyone else notices it :) |
| 13:50 |
|
isBEKaml |
.u phone |
| 13:50 |
|
phenny |
isBEKaml: Sorry, no results for 'phone'. |
| 13:51 |
|
isBEKaml |
.u ☎ |
| 13:51 |
|
phenny |
U+260E BLACK TELEPHONE (☎) |
| 13:51 |
|
isBEKaml |
there... :| |
| 14:00 |
|
isBEKaml |
.u tele |
| 14:00 |
|
phenny |
U+2121 TELEPHONE SIGN (℡) |
| 14:00 |
|
isBEKaml |
.u bl |
| 14:00 |
|
phenny |
U+2712 BLACK NIB (✒) |
| 14:06 |
|
masak |
phenny: tell TimToady -- I'm starting my Buf grant, and I have a question about the spec's use of the term 'character'; is it a contextually settable value rather than a Unicode abstraction level in itself, like 'byte' and 'graph'? |
| 14:06 |
|
phenny |
masak: I'll pass that on when TimToady is around. |
| 14:09 |
|
moritz_ |
hugme: add freestorm to irclog |
| 14:09 |
|
hugme |
moritz_: sorry, I don't know anything about project 'irclog' |
| 14:09 |
|
moritz_ |
hugme: add freestorm to ilbot |
| 14:09 |
|
* hugme |
hugs freestorm. Welcome to ilbot! |
| 14:15 |
|
|
jakk joined #perl6 |
| 14:16 |
|
|
finanalyst joined #perl6 |
| 14:24 |
|
finanalyst |
hello everyone |
| 14:24 |
|
moritz_ |
hi |
| 14:24 |
|
pmurias |
BrowserUk: i use the book "Erlang Programming" for learning erlang |
| 14:25 |
|
finanalyst |
i am having problems indexing an array inside a loop because the index is type Num, and rakudo wants type Int |
| 14:25 |
|
moritz_ |
then .Int it |
| 14:26 |
|
finanalyst |
thanx that works |
| 14:26 |
|
finanalyst |
is it a known bug? |
| 14:26 |
|
isBEKaml |
finanalyst: what? |
| 14:27 |
|
masak |
finanalyst: yes. |
| 14:27 |
|
masak |
a quite quirky one. |
| 14:27 |
|
isBEKaml |
rakudo: my @list = <tom dicken harry>; say @list[$_] for 0..+@list; |
| 14:27 |
|
p6eval |
rakudo 9a15b8: OUTPUT«tomdickenharry» |
| 14:27 |
|
finanalyst |
isBEMaml: inside a loop the index is considered type Num, but it should be Int. |
| 14:28 |
|
finanalyst |
isBEKaml: does not always happen |
| 14:28 |
|
finanalyst |
rakudo: for 1 .. 4 { say $_.WHAT } |
| 14:28 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Int()Int()Int()Int()» |
| 14:28 |
|
masak |
rakudo: say <a b c d>[2.0] |
| 14:29 |
|
p6eval |
rakudo 9a15b8: OUTPUT«c» |
| 14:29 |
|
masak |
and it doesn't always produce an error. |
| 14:29 |
|
masak |
that's the quirky part. |
| 14:29 |
|
isBEKaml |
o.O |
| 14:30 |
|
lue |
goood morning! |
| 14:31 |
|
isBEKaml |
btw, why does +@list append a new line to the end of output? |
| 14:31 |
|
isBEKaml |
rakudo: say $_ for 0..3; |
| 14:31 |
|
p6eval |
rakudo 9a15b8: OUTPUT«0123» |
| 14:32 |
|
isBEKaml |
rakudo: my @list = <tom dicken harry>; say $_ for 0..+@list; say @list[$_] for 0..+@list; |
| 14:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«0123tomdickenharry» |
| 14:32 |
|
moritz_ |
isBEKaml: you have an offbyone error |
| 14:32 |
|
moritz_ |
there are only 0..(@list-1) items in your array |
| 14:33 |
|
moritz_ |
or ^@list or @list.keys |
| 14:33 |
|
isBEKaml |
moritz_++ #noticed it just now when I did $_ |
| 14:34 |
|
masak |
lue: \o |
| 14:34 |
|
isBEKaml |
rakudo: say <a b c d>[2.00001] |
| 14:34 |
|
p6eval |
rakudo 9a15b8: OUTPUT«c» |
| 14:35 |
|
isBEKaml |
rakudo: say <a b c d>[2.554] |
| 14:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«c» |
| 14:35 |
|
finanalyst |
rakudo: class A { has $.a; method m { for $.a .. 5 { say $_.WHAT }}}; my A $x.=new(:a(2.0)); $x.m |
| 14:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Rat()Rat()Rat()Rat()» |
| 14:35 |
|
isBEKaml |
maybe it does an equivalent of ceil() ? |
| 14:36 |
|
isBEKaml |
d'oh, floor() ? |
| 14:36 |
|
colomon |
isBEKaml: probably truncate |
| 14:36 |
|
moritz_ |
rakudo: say (Any .. 5).perl |
| 14:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Any..5» |
| 14:36 |
|
moritz_ |
rakudo: say (Any .. 5).Seq.perl |
| 14:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«()» |
| 14:36 |
|
isBEKaml |
but doesn't *always* show an error is really quirky.. |
| 14:38 |
|
masak |
here's the ticket I was thinking of: http://rt.perl.org/rt3/Ticket/[…]lay.html?id=74430 |
| 14:38 |
|
finanalyst |
rakudo: class A {has $.a; has @.m; method foo { for $.a .. 5 { say @.m[$_] }}}; my A $x.=new(:a(2.0),:m(1,2,3,4,5));$x.foo |
| 14:38 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are::(Mu : Int $i;; *%_):(Mu : Block $b;; *%_):(Mu : !whatever_dispatch_helper ;; *%_)current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 14:39 |
|
masak |
it's array indexing and 'is copy' interacting badly with each other. |
| 14:39 |
|
finanalyst |
isBEKaml: thats the error |
| 14:39 |
|
masak |
hm, but that one seems to be attr arrays and indexing. |
| 14:40 |
|
masak |
rakudo: class A { has @.m; method foo { @.m[2.0] } }; A.new(:m(1,2,3)).foo |
| 14:40 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are::(Mu : Int $i;; *%_):(Mu : Block $b;; *%_):(Mu : !whatever_dispatch_helper ;; *%_)current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 14:40 |
|
* masak |
submits rakudobug |
| 14:40 |
|
masak |
finanalyst++ |
| 14:41 |
|
masak |
rakudo: my @m = 1,2,3; say @m[2.0] |
| 14:41 |
|
finanalyst |
masak: somehow the type of the attribute is being 'imported' during the call to new |
| 14:41 |
|
p6eval |
rakudo 9a15b8: OUTPUT«3» |
| 14:41 |
|
colomon |
it would be sooooo awesome if the first Mu there in all of those was the actual type involved... |
| 14:41 |
|
masak |
finanalyst: you mean of $.a? but that's not it, my example didn't use $.a |
| 14:42 |
|
isBEKaml |
rakudo: class A { has @.m; method foo { @.m[2] } }; A.new(:m(1,2,3)).foo |
| 14:42 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 14:43 |
|
isBEKaml |
rakudo: class A { has @.m; method foo { @.m[2.5] } }; A.new(:m(1,2,3)).foo.say |
| 14:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are::(Mu : Int $i;; *%_):(Mu : Block $b;; *%_):(Mu : !whatever_dispatch_helper ;; *%_)current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 14:43 |
|
finanalyst |
masak: I ran across a bug where arrays inside a method were being treated differently than outside. is this the same thing? |
| 14:43 |
|
finanalyst |
we discussed it about two weeks ago |
| 14:43 |
|
masak |
rakudo: class A { has @.m; }; A.new(:m(1,2,3)).m[2.0] |
| 14:43 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'. Available candidates are::(Mu : Int $i;; *%_):(Mu : Block $b;; *%_):(Mu : !whatever_dispatch_helper ;; *%_)current instr.: '!postcircumfix:<[ ]>' pc 11523 (src/builtins/Any.pir:54)» |
| 14:43 |
|
colomon |
finanalyst: probably is the same thing. |
| 14:43 |
|
masak |
it's not even methods. |
| 14:43 |
|
masak |
it's just the attribute array. |
| 14:56 |
|
|
rv2733 joined #perl6 |
| 14:57 |
|
BrowserUk |
pmurias: Is "Erlang Programming" is a real, go out and buy book only, rather than an ebook? |
| 15:02 |
|
pmurias |
BrowserUk: i have the ebook |
| 15:02 |
|
pmurias |
BrowserUk: but i guess you could buy a printed copy if you want |
| 15:07 |
|
|
orafu joined #perl6 |
| 15:13 |
|
|
rokoteko joined #perl6 |
| 15:35 |
|
isBEKaml |
masak: an update on the rakudo bug around $^ variables. The usage appears to be correct since we can't use it for looping. |
| 15:35 |
|
isBEKaml |
rakudo: my $temp = 1..10; for $^temp { say "hi"; } |
| 15:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«hi» |
| 15:35 |
|
masak |
isBEKaml: 'the usage appears to be correct since we can't use it for looping'. I do not understand this phrase. to me, it's clearly a bug. |
| 15:35 |
|
isBEKaml |
gack, s/usage/logic/ |
| 15:36 |
|
masak |
what logic? the one behind the argument that it's a bug? :) |
| 15:36 |
|
TimToady |
std: my $temp = 1..10; for $^temp { say "hi"; } |
| 15:36 |
|
phenny |
TimToady: 14:06Z <masak> tell TimToady -- I'm starting my Buf grant, and I have a question about the spec's use of the term 'character'; is it a contextually settable value rather than a Unicode abstraction level in itself, like 'byte' and 'graph'? |
| 15:36 |
|
isBEKaml |
masak: the logic behind the for loop, though there should be checks against using $^ variables in a loop. |
| 15:36 |
|
p6eval |
std 30748: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^temp cannot be used in this kind of block at /tmp/ENxwcIDYNz line 1:------> my $temp = 1..10; for $^temp⏏ { say "hi"; }Check failedFAILED 00:01 115m» |
| 15:37 |
|
masak |
isBEKaml: no, I'm not sure there should. |
| 15:37 |
|
masak |
isBEKaml: as I said, it's not always wrong. |
| 15:37 |
|
masak |
there might be very unusual but completely admissible situations where it's right. |
| 15:38 |
|
TimToady |
std: { my $temp = 1..10; for $^temp { say "hi"; } } |
| 15:38 |
|
p6eval |
std 30748: OUTPUT«Potential difficulties: Useless redeclaration of variable $temp (see line 1) at /tmp/EpKKXBb4Lo line 1:------> { my $temp = 1..10; for $^temp⏏ { say "hi"; } }ok 00:01 112m» |
| 15:39 |
|
* isBEKaml |
points at std... |
| 15:39 |
|
masak |
TimToady: hunh. I thought that'd actually be illegal. |
| 15:40 |
|
TimToady |
it shouldn't allow a $^temp after 'my $temp' |
| 15:42 |
|
masak |
phew. |
| 15:42 |
|
isBEKaml |
rakudo: my $somevar= { say $_ for $^temp; }; $somevar(1..10); |
| 15:42 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1 2 3 4 5 6 7 8 9 10» |
| 15:43 |
|
|
elmex joined #perl6 |
| 15:43 |
|
masak |
isBEKaml: yeah, things like that. |
| 15:43 |
|
isBEKaml |
ouch* |
| 15:43 |
|
masak |
there's always the balance between helping people who don't know what they're doing, and getting out of the way of those who do, of course. |
| 15:44 |
|
TimToady |
my first test was illegal because you can't use a placeholder in mainline code, though "this kind of block" is LTA |
| 15:45 |
|
TimToady |
"in this lexical context" would be more accurate |
| 15:49 |
|
* isBEKaml |
wonders if he exhausted his mistake quota for the day.... ;) |
| 15:49 |
|
masak |
isBEKaml++ # trial and error |
| 15:50 |
|
masak |
TimToady: about the Spec/character question: I'm trying to figure out what a 'character' really is in the context of Perl 6. whether it is a Unicode level (and if so, which one) or some kind of parameter that you can set to a Unicode level (and if so, how). |
| 15:50 |
|
pmurias |
TimToady: wouldn't "outside a block" be a better error message here |
| 15:51 |
|
isBEKaml |
TimToady++, masak++, #perl6++ ## awesome community to help ease into trial & error |
| 15:51 |
|
pmurias |
std: sub ($foo) {$^bar} |
| 15:51 |
|
p6eval |
std 30748: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^bar cannot override existing signature ($foo) at /tmp/zkqefQuVs6 line 1:------> sub ($foo) {$^bar⏏}Check failedFAILED 00:01 112m» |
| 15:51 |
|
pmurias |
std: sub {$^bar} |
| 15:51 |
|
p6eval |
std 30748: OUTPUT«ok 00:01 111m» |
| 15:51 |
|
pmurias |
std: if 1 {$^bar} |
| 15:51 |
|
p6eval |
std 30748: OUTPUT«ok 00:01 111m» |
| 15:52 |
|
TimToady |
pmurias: yes, but all it knows is that the current lexpad doesn't take a signature; it might be in a block |
| 15:52 |
|
|
tedv joined #perl6 |
| 15:52 |
|
TimToady |
std: class Foo { $^nope } |
| 15:53 |
|
p6eval |
std 30748: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^nope cannot be used in this kind of block at /tmp/5drlz4r1UQ line 1:------> class Foo { $^nope⏏ }Check failedFAILED 00:01 111m» |
| 15:53 |
|
jnthn |
std: role Foo { $^nope } |
| 15:53 |
|
p6eval |
std 30748: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^nope cannot be used in this kind of block at /tmp/rwi1Z77Bag line 1:------> role Foo { $^nope⏏ }Check failedFAILED 00:01 111m» |
| 15:54 |
|
TimToady |
let's not allow that :) |
| 15:54 |
|
jnthn |
rakudo: role Foo { $^nope; method bar() { say $nope } }; class lol does Foo['omg'] { }; lol.new.bar |
| 15:54 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Symbol '$nope' not predeclared in barcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» |
| 15:54 |
|
jnthn |
Phew. :-) |
| 15:54 |
|
jnthn |
TimToady: I could half see Rakudo acidentally making it work. :-) |
| 15:56 |
|
pmurias |
TimToady: Placeholder variable $^nope cannot be used in a block which can't have a signature.? |
| 15:56 |
|
pmurias |
maybe s/can't/is not allowed to/ |
| 16:01 |
|
masak |
and shouldn't be allowed to :P |
| 16:01 |
|
TimToady |
my current code say "may not" |
| 16:02 |
|
TimToady |
and gives a different message if $*CURPAD === $*UNIT |
| 16:02 |
|
TimToady |
making it check for an existing my is a bit harder though |
| 16:03 |
|
pmurias |
std: {my $foo;say $^foo} |
| 16:03 |
|
p6eval |
std 30748: OUTPUT«Potential difficulties: Useless redeclaration of variable $foo (see line 1) at /tmp/AoqTit87g8 line 1:------> {my $foo;say $^foo⏏}ok 00:01 114m» |
| 16:04 |
|
TimToady |
retroactively changing a non-parameter to a parameter is not nice |
| 16:10 |
|
masak |
that's my point. |
| 16:11 |
|
tedv |
By "not nice" do you mean "swears at the police officer" not nice or "breaks the speed of light" not nice? |
| 16:12 |
|
cognominal |
\o |
| 16:12 |
|
masak |
o/ |
| 16:13 |
|
slavik |
\o/ |
| 16:14 |
|
masak |
a multi-hour bug hunt in GGE finally ended happily. |
| 16:14 |
|
|
FreeStorm left #perl6 |
| 16:14 |
|
masak |
ultimate cause: `while index(...)` instead of `while defined(index(...))` |
| 16:14 |
|
masak |
so, don't do that. |
| 16:18 |
|
lue |
Well, the index(...) could have been 0! :) |
| 16:18 |
|
masak |
right. |
| 16:19 |
|
masak |
it was, in the cases where the bug manifested. |
| 16:19 |
|
masak |
lue: for example in test 440, where I left off yesterday. |
| 16:19 |
|
masak |
that one should pass now. |
| 16:19 |
|
TimToady |
By "not nice" I mean "Does a bait-and-switch on the customer." |
| 16:19 |
|
TimToady |
the customer here being the *reader* of the code, not the writer |
| 16:20 |
|
masak |
the writer isn't being nice to the reader. |
| 16:21 |
|
lue |
.oO(Not Nice as in "Buying ebooks on the Kindle and then having Amazon take them back for no good reason.") |
| 16:21 |
|
TimToady |
though I suppose the compiler is also a reader |
| 16:21 |
|
masak |
and, by transitivity, a programming language which allows such a bait-and-switch isn't being nice to the reader wither. |
| 16:21 |
|
masak |
s/wither/either/ |
| 16:21 |
|
diakopter |
compilers emit tears too |
| 16:22 |
|
masak |
diakopter++ # that should be a tutorial of some sort |
| 16:23 |
|
cognominal |
TimToady++ # "bait ans switch on the customer", so true for me, these last few days in meat space. But working actively in Internet space to be sure this will be fixed. |
| 16:23 |
|
diakopter |
"how to break your compiler until it says uncle and cries" |
| 16:25 |
|
lue |
diakopter: what if it tries to escape? |
| 16:26 |
|
* masak |
.oO( Compile-or-flight response ) |
| 16:26 |
|
masak |
awk is known for trying to bail out when things get tricky. |
| 16:27 |
|
lue |
I heard a rumor that '' keeps them from escaping (but that seems odd, because "" seems stronger) :) |
| 16:28 |
|
masak |
lue: I think you have it too literally :P |
| 16:29 |
|
masak |
nom & |
| 16:37 |
|
|
Exodist joined #perl6 |
| 16:42 |
|
|
PacoLinux joined #perl6 |
| 16:47 |
|
moritz_ |
rakudo: say Array.new eqv [] |
| 16:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 16:50 |
|
cognominal |
rakudo: say True |
| 16:50 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 16:50 |
|
cognominal |
rakudo: say True.perl |
| 16:50 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Bool::True» |
| 16:51 |
|
cognominal |
(.perl)++ |
| 16:51 |
|
snarkyboojum |
rakudo: my @a = 1 .. Inf; |
| 16:51 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 16:51 |
|
cognominal |
beats me why this is not the default |
| 16:51 |
|
snarkyboojum |
I take it that's timing out because lists aren't lazy yet |
| 16:55 |
|
|
rindolf joined #perl6 |
| 16:55 |
|
rindolf |
Hi all. |
| 16:58 |
|
|
JimmyZ joined #perl6 |
| 17:05 |
|
pugssvn |
r30749 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 23: Lazy fruits from the gather of Eden |
| 17:12 |
|
rokoteko |
snarkyboojum: is there something like take(5, 1..Inf) in perl6? .. what Im expecting it to return is 1, 2, 3, 4, 5 |
| 17:14 |
|
snarkyboojum |
rokoteko: nope - not that I know of anyway |
| 17:15 |
|
snarkyboojum |
take(5, some list), will return 5 and then the list |
| 17:16 |
|
rokoteko |
so how is one supposed to refer to the first 5 elements of an infinite list if perl6 provide lazy evaluation? |
| 17:16 |
|
rokoteko |
@arr = (1..Inf); @arr[0..4] ? when is @arr evaluated? |
| 17:20 |
|
lue |
rakudo: my @a = (1..Inf); say @[0..4] |
| 17:20 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 17:20 |
|
lue |
rakudo: my @a = (1...Inf); say @[0..4] |
| 17:20 |
|
snarkyboojum |
rakudo: my @a = 1..10; say @a[^5] |
| 17:20 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 17:20 |
|
p6eval |
rakudo 9a15b8: OUTPUT«12345» |
| 17:20 |
|
lue |
I could have sworn we had lazy lists all figured out... |
| 17:22 |
|
TimToady |
roketeko, use .batch(5) |
| 17:23 |
|
snarkyboojum |
lue: I don't think Rakudo has properly lazy lists (?) |
| 17:23 |
|
TimToady |
rakudo: say (1...*).batch(5) |
| 17:23 |
|
p6eval |
rakudo 9a15b8: OUTPUT«12345» |
| 17:23 |
|
rokoteko |
TimToady: (1..Inf).batch(5) ? |
| 17:23 |
|
rokoteko |
ah ok. |
| 17:23 |
|
rokoteko |
cant you have it on the LHS? |
| 17:23 |
|
TimToady |
'take' means something else in p6 |
| 17:24 |
|
TimToady |
I dunno |
| 17:24 |
|
TimToady |
rakudo: say batch 5, 1..* |
| 17:24 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &batchcurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 17:24 |
|
TimToady |
could easily be defined |
| 17:25 |
|
rokoteko |
rakduo: say batch(5).(1..Inf) |
| 17:25 |
|
rokoteko |
rakudo: say batch(5).(1..Inf) |
| 17:25 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &batchcurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 17:25 |
|
TimToady |
. is not what it is in Haskell |
| 17:25 |
|
lue |
std: my @a = 1..Inf |
| 17:25 |
|
p6eval |
std 30748: OUTPUT«ok 00:01 114m» |
| 17:25 |
|
TimToady |
it's just method call, not function compositoin |
| 17:25 |
|
TimToady |
so that doesn't make sense |
| 17:26 |
|
rokoteko |
TimToady: how would you chain it then perl6? |
| 17:26 |
|
rokoteko |
+way |
| 17:26 |
|
TimToady |
well, there's probably some way to curry it |
| 17:26 |
|
TimToady |
hmm |
| 17:27 |
|
rokoteko |
currying more than once is what I missed in perl5 :) |
| 17:27 |
|
TimToady |
rakudo: my $x = *.batch(5); say $x(1...*) |
| 17:27 |
|
p6eval |
rakudo 9a15b8: OUTPUT«12345» |
| 17:27 |
|
TimToady |
there's one way |
| 17:27 |
|
rokoteko |
what is *? |
| 17:27 |
|
TimToady |
it's a "DON'T curry this argument" |
| 17:27 |
|
rokoteko |
refers to the last result? |
| 17:28 |
|
TimToady |
so *.batch(5) really means { $^arg.batch(5) } |
| 17:28 |
|
TimToady |
or -> $arg { $arg.batch(5) } in a more lambdaish notation |
| 17:28 |
|
rokoteko |
TimToady: Im not a haskell programmer :) |
| 17:29 |
|
rokoteko |
but well put words anyway. :) |
| 17:29 |
|
TimToady |
why not? haskell is easy to learn; I've learned it five or six times now |
| 17:29 |
|
TimToady |
but yeah, everyone is coming from a different background |
| 17:29 |
|
TimToady |
so it behooves us to say things several different ways |
| 17:29 |
|
TimToady |
in the hopes that one will stick |
| 17:29 |
|
rokoteko |
well, Im planning to be, but it just for the cause of understanding something different from imperiative languages. |
| 17:30 |
|
TimToady |
what is your background? |
| 17:31 |
|
rokoteko |
as a programmer? ppl -> basic -> perl5 -> php -> c -> java -> haskell ... but currently at perl5. |
| 17:31 |
|
rokoteko |
ppl is pcobard programming language. |
| 17:31 |
|
rokoteko |
pcboard. |
| 17:32 |
|
snarkyboojum |
rakudo: my @x = <a b c d e>; say @x.map: * ~ 'A'; |
| 17:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No candidates found to invokecurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 17:32 |
|
TimToady |
not all * forms are correctly curried yet in rakudo |
| 17:33 |
|
snarkyboojum |
TimToady: but that should work eventually? |
| 17:34 |
|
|
szabgab_ joined #perl6 |
| 17:34 |
|
snarkyboojum |
and build ["aA", "bA", "cA", "dA", "eA"]? |
| 17:34 |
|
rokoteko |
rakduo: my $x = *.**2; say $x(1...5) |
| 17:34 |
|
rokoteko |
rakudo: my $x = *.**2; say $x(1...5) |
| 17:34 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "my $x = *."current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 17:35 |
|
rokoteko |
rakudo: my $x = *.(**2); say $x(1...5) |
| 17:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» |
| 17:35 |
|
rokoteko |
intuitively its not clear for me. :/ |
| 17:36 |
|
rokoteko |
oh wait. |
| 17:36 |
|
rokoteko |
rakudo: my $x = *.(**2); say $x(1..5) |
| 17:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» |
| 17:36 |
|
pugssvn |
r30750 | lwall++ | [STD] awesomize placeholder messages |
| 17:36 |
|
pugssvn |
r30750 | disallow use of placeholder after non-placeholder |
| 17:36 |
|
pugssvn |
r30750 | [viv] suppress recursion warning |
| 17:37 |
|
TimToady |
snarkyboojum: correct |
| 17:37 |
|
TimToady |
well, except for the [...] part |
| 17:37 |
|
TimToady |
it would just be a parcel of parcels |
| 17:37 |
|
snarkyboojum |
ok |
| 17:38 |
|
TimToady |
std: my $x = *.(**2); say $x(1..5) |
| 17:38 |
|
p6eval |
std 30749: OUTPUT«===[0mSORRY!===[0mUnable to parse argument list at /tmp/lJAZkrxa73 line 1:------> my $x = *.(⏏**2); say $x(1..5)Couldn't find final ')'; gave up at /tmp/lJAZkrxa73 line 1:------> my $x = *.(**⏏2); say $x(1..5) expecting any |
| 17:38 |
|
p6eval |
..… |
| 17:38 |
|
TimToady |
std: my $x = *.(* * 2); say $x(1..5) |
| 17:38 |
|
p6eval |
std 30749: OUTPUT«ok 00:01 112m» |
| 17:38 |
|
TimToady |
** is a valid term |
| 17:39 |
|
|
ajs joined #perl6 |
| 17:39 |
|
moritz_ |
that breaks my old starry obfu :-) |
| 17:39 |
|
TimToady |
we've broken one or two other things as well :P |
| 17:39 |
|
moritz_ |
rakudo: ** |
| 17:39 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "**"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 17:39 |
|
isBEKaml |
rakudo: say 2** 5; |
| 17:39 |
|
p6eval |
rakudo 9a15b8: OUTPUT«32» |
| 17:40 |
|
TimToady |
it's also a valid infix |
| 17:40 |
|
ajs |
rakudo: toekn isegment { blah } |
| 17:40 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &isegmentcurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 17:40 |
|
ajs |
that one took me a while to see ;-) |
| 17:41 |
|
ajs |
Anyway, my URI.pm now parses... I'll debug it after I do some chores. |
| 17:42 |
|
TimToady |
std: toekn isegment { blah } |
| 17:42 |
|
p6eval |
std 30749: OUTPUT«===[0mSORRY!===[0mUndeclared routines: 'blah' used at line 1 'isegment' used at line 1 'toekn' used at line 1Check failedFAILED 00:01 111m» |
| 17:43 |
|
lue |
Is there *anything* for Rakudo/P6 that I can do? I'm extremely bored [checking ROADMAP and various] |
| 17:43 |
|
TimToady |
here, wave these pompoms and yell :) |
| 17:43 |
|
snarkyboojum |
lue: write tests for the advent calendar :) |
| 17:43 |
|
TimToady |
std: {my $foo;say $^foo} |
| 17:43 |
|
p6eval |
std 30749: OUTPUT«Potential difficulties: Useless redeclaration of variable $foo (see line 1) at /tmp/avPDaQnzgt line 1:------> {my $foo;say $^foo⏏}ok 00:01 111m» |
| 17:44 |
|
TimToady |
well, that should fix itself while I take a walk :) |
| 17:44 |
|
TimToady |
bbl & |
| 17:45 |
|
lue |
*o* |
| 17:48 |
|
isBEKaml |
lue: what's wrong? |
| 17:48 |
|
diakopter |
phenny: tell pmurias I fixed the problem(s) there, mostly. |
| 17:48 |
|
phenny |
diakopter: I'll pass that on when pmurias is around. |
| 17:49 |
|
lue |
No; that was a cheerleader (see TimToady ^^^) |
| 17:49 |
|
isBEKaml |
:) |
| 17:51 |
|
dalek |
csmeta: r294 | diakopter++ | trunk/Sprixel/ (12 files): |
| 17:51 |
|
dalek |
csmeta: [perlesque] add more (commented) debug for some grammar combinators, make State |
| 17:51 |
|
dalek |
csmeta: more efficient (so parsing is faster), workaround a parsing problem still yet to |
| 17:51 |
|
dalek |
csmeta: be fully debugged, fix parse_bug2.t since it tried to augment a class already |
| 17:51 |
|
dalek |
csmeta: defined, which can't occur. |
| 17:51 |
|
dalek |
csmeta: review: http://code.google.com/p/csmet[…]urce/detail?r=294 |
| 17:52 |
|
* lue |
goes forth to have an advent-ure in P6 |
| 17:53 |
|
snarkyboojum |
lue: I'm having a go at day 19 atm fyi |
| 17:55 |
|
dalek |
book: a30e807 | jonathan++ | src/operators.pod: |
| 17:55 |
|
dalek |
book: Some initial explanations of smart matching. |
| 17:55 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]375bb424e733a6ca6 |
| 17:55 |
|
dalek |
book: e86ce00 | jonathan++ | src/subs-n-sigs.pod: |
| 17:55 |
|
dalek |
book: Examples of where without a block, which just smart matches. |
| 17:55 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]743da008dc95f3fff |
| 17:56 |
|
dalek |
csmeta: r295 | diakopter++ | trunk/Sprixel/Main.cs: |
| 17:56 |
|
dalek |
csmeta: [perlesque] once again, remove debug flag |
| 17:56 |
|
dalek |
csmeta: review: http://code.google.com/p/csmet[…]urce/detail?r=295 |
| 17:56 |
|
lue |
Where exactly are the advent tests? |
| 17:56 |
|
isBEKaml |
lue: in the pugs repo. t/spec/integration |
| 17:58 |
|
lue |
ah, thank you. |
| 17:58 |
|
isBEKaml |
yw. |
| 17:59 |
|
|
rurban joined #perl6 |
| 17:59 |
|
lue |
I'm confused. Do you write/change the tests, or make them the implementation run them correctly? |
| 18:00 |
|
snarkyboojum |
lue: just write tests where they're missing I'd say |
| 18:02 |
|
isBEKaml |
rakudo: any(1,2,3).WHAT.perl.say; |
| 18:02 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Junction» |
| 18:02 |
|
diakopter |
phenny: tell pmurias well, I guess I broke other things. :/ |
| 18:02 |
|
phenny |
diakopter: I'll pass that on when pmurias is around. |
| 18:03 |
|
isBEKaml |
rakudo: my $tt = "yah"; say "booyah!" if $tt ~~ any("boo", "yah"); |
| 18:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«booyah!» |
| 18:04 |
|
pugssvn |
r30751 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 19: Whatever |
| 18:05 |
|
isBEKaml |
snarkyboojum: I'm currently trying to come up with tests for day 13 junctions. I don't know how to go about them. :O |
| 18:05 |
|
isBEKaml |
snarkyboojum: I'm reading the blog post over and over trying to comprehend it... |
| 18:06 |
|
snarkyboojum |
isBEKaml: yeah, I took and look and passed over that one :) |
| 18:06 |
|
TimToady |
std: {my $foo;say $^foo} |
| 18:06 |
|
p6eval |
std 30750: OUTPUT«Use of uninitialized value $decl in concatenation (.) or string at STD.pm line 101334.===[0mSORRY!===[0m$foo has already been used as a non-placeholder in the surrounding block, so you will confuse the reader if you suddenly declare $^foo here at /tmp/iHQIFAYRNC |
| 18:06 |
|
p6eval |
..lin… |
| 18:06 |
|
snarkyboojum |
maybe moritz_++ can give us an idea :) |
| 18:07 |
|
|
whiteknight joined #perl6 |
| 18:07 |
|
snarkyboojum |
isBEKaml: how are junctions tested in the current spec test suite? |
| 18:07 |
|
pugssvn |
r30752 | lwall++ | [STD] suppress uninit warning |
| 18:08 |
|
isBEKaml |
snarkyboojum: that's what I was thinking. Maybe, I could take some ideas from the tests in the current spectest suite.. |
| 18:08 |
|
TimToady |
std: class { my $foo; say $^foo } |
| 18:08 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^foo may not be used here because the surrounding package block takes no signature at /tmp/67fwmKu8AF line 1:------> class { my $foo; say $^foo⏏ }Check failedFAILED 00:01 111m» |
| 18:08 |
|
snarkyboojum |
isBEKaml: might be worth looking in there for inspiration yeah |
| 18:08 |
|
TimToady |
std: sub { my $foo; say $^foo } |
| 18:08 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0m$foo has already been used as a non-placeholder in the surrounding sub block, so you will confuse the reader if you suddenly declare $^foo here at /tmp/CeYwMi4Qgs line 1:------> sub { my $foo; say $^foo⏏ }Check failedFAILED |
| 18:08 |
|
p6eval |
..00:… |
| 18:08 |
|
TimToady |
std: sub { my $foo; { say $^foo } } |
| 18:08 |
|
p6eval |
std 30750: OUTPUT«ok 00:01 111m» |
| 18:09 |
|
TimToady |
std: sub { my $foo; { $foo; say $^foo } } |
| 18:09 |
|
p6eval |
std 30750: OUTPUT«Use of uninitialized value $decl in concatenation (.) or string at STD.pm line 101334.===[0mSORRY!===[0m$foo has already been used as a non-placeholder in the surrounding block, so you will confuse the reader if you suddenly declare $^foo here at /tmp/hU9iBub6KH |
| 18:09 |
|
p6eval |
..lin… |
| 18:09 |
|
isBEKaml |
TimToady: message is part funny.. TimToady++ |
| 18:09 |
|
lue |
TimToady: short walk |
| 18:09 |
|
diakopter |
long pier? |
| 18:09 |
|
TimToady |
ENOTYET |
| 18:09 |
|
isBEKaml |
TimToady: "so you will confuse the reader if you suddenly declare $^foo here" |
| 18:09 |
|
TimToady |
Secundus called upon the matriarch |
| 18:10 |
|
* TimToady |
curtsies |
| 18:10 |
|
* diakopter |
hopes for a green All Tests Successful |
| 18:11 |
|
TimToady |
std: sub { -> $^foo { } } |
| 18:11 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0mYou may not use the ^ twigil in a signature at /tmp/LY51rGuDDX line 1:------> sub { -> $⏏^foo { } } expecting twigilParse failedFAILED 00:01 112m» |
| 18:11 |
|
dalek |
csmeta: r296 | diakopter++ | trunk/Sprixel/ (3 files): |
| 18:11 |
|
dalek |
csmeta: [perlesque] temp bandaids (aren't they all) |
| 18:11 |
|
dalek |
csmeta: review: http://code.google.com/p/csmet[…]urce/detail?r=296 |
| 18:11 |
|
isBEKaml |
snarkyboojum: I passed over Day 10 too. it was too broad.. |
| 18:11 |
|
TimToady |
std: sub { -> $x where $^foo { } } |
| 18:11 |
|
p6eval |
std 30750: OUTPUT«Use of uninitialized value $decl in concatenation (.) or string at STD.pm line 101310.===[0mSORRY!===[0mPlaceholder variable $^foo is not allowed in the signature at /tmp/t3wqVJSH8B line 1:------> sub { -> $x where $^foo⏏ { } }Unexpected block in |
| 18:11 |
|
p6eval |
..… |
| 18:11 |
|
isBEKaml |
snarkyboojum: in scope... |
| 18:11 |
|
TimToady |
std: sub { method ($x where $^foo) { } } |
| 18:11 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^foo is not allowed in the method signature at /tmp/SyG9C8trvj line 1:------> sub { method ($x where $^foo⏏) { } }Check failedFAILED 00:01 112m» |
| 18:12 |
|
TimToady |
std: class { $^huh } |
| 18:12 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^huh may not be used here because the surrounding package block takes no signature at /tmp/IIiNWgFR0T line 1:------> class { $^huh⏏ }Check failedFAILED 00:01 111m» |
| 18:13 |
|
rindolf |
TimToady: BTW, do you recall saying "It's easier to port a shell than a shell script."? |
| 18:13 |
|
TimToady |
yes |
| 18:13 |
|
rindolf |
TimToady: ah. |
| 18:14 |
|
rindolf |
TimToady: was it an original sentiment? |
| 18:14 |
|
TimToady |
afaik |
| 18:14 |
|
rindolf |
TimToady: OK, thanks. |
| 18:14 |
|
rokoteko |
what does $^var mean in perl6? |
| 18:14 |
|
TimToady |
a self-declaring parameter |
| 18:15 |
|
TimToady |
{ $^x + $^y } is the same as -> $x, $y { $x + $y } |
| 18:15 |
|
rokoteko |
what does that mean? like $foo = "bar" without my in perl5? |
| 18:15 |
|
TimToady |
it's more like a 'my-but-really-I'm-a-parameter-in-the-surrounding-block' |
| 18:16 |
|
TimToady |
std: -> $x { $^y } # should fail |
| 18:16 |
|
p6eval |
std 30750: OUTPUT«===[0mSORRY!===[0mPlaceholder variable $^y cannot override existing signature ( $x ) at /tmp/deGfaJ2hA3 line 1:------> -> $x { $^y⏏ } # should failCheck failedFAILED 00:01 112m» |
| 18:16 |
|
rokoteko |
what is its scope then? |
| 18:16 |
|
rindolf |
http://en.wikiquote.org/wiki/Larry_Wall - hmmm... this shell script quote was removed from here. |
| 18:16 |
|
TimToady |
attaches to the surrounding curlies |
| 18:16 |
|
|
Su-Shee joined #perl6 |
| 18:17 |
|
rokoteko |
TimToady: ahh.. so it is OUTSIDE the {}-block.. hmm. weird. |
| 18:17 |
|
TimToady |
well, if they attribute it to someone else, they were probably quoting me |
| 18:18 |
|
TimToady |
well, the weird thing is that parameters in general may be declared outside their lexical scope |
| 18:18 |
|
TimToady |
but as far as the scope is concerned, they're inside the curlies |
| 18:18 |
|
rokoteko |
{ local ($x, $y) { $x + $y } } .. trying to translate it to perl5. |
| 18:18 |
|
TimToady |
and the scope just thinks that parameters are 'my' vars |
| 18:19 |
|
rokoteko |
TimToady: are you always correct? |
| 18:19 |
|
TimToady |
no, more like sub { my ($x,$y) = @_; ... } |
| 18:19 |
|
TimToady |
I'm always right, even when I'm not correct :) |
| 18:19 |
|
rokoteko |
Im usually left. |
| 18:19 |
|
TimToady |
sometimes I get over there too |
| 18:20 |
|
TimToady |
but generally I'm a rabid moderate... |
| 18:20 |
|
rokoteko |
it's the dude who can switch the north and south pole? |
| 18:21 |
|
rokoteko |
I dont completely get the point of $^x .. can anyone illustrate it more? |
| 18:21 |
|
isBEKaml |
rakudo: my $tt = any(1|2|3); $tt!eigenstates.perl.say; |
| 18:21 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method '!eigenstates' not found for invocant of class 'Integer'current instr.: '!DISPATCH_JUNCTION_METHOD' pc 17399 (src/builtins/Junction.pir:30)» |
| 18:21 |
|
TimToady |
I think it's actually a girl superhero named Fluid Dynamo |
| 18:22 |
|
TimToady |
are you familiar with Perl 5's sort? |
| 18:22 |
|
TimToady |
sort { $a <=> $b } @list |
| 18:22 |
|
TimToady |
for instance |
| 18:23 |
|
rokoteko |
yes I am |
| 18:23 |
|
TimToady |
in p5, that's hardwired behavior |
| 18:23 |
|
diakopter |
phenny: tell pmurias I fixed the problems |
| 18:23 |
|
phenny |
diakopter: I'll pass that on when pmurias is around. |
| 18:23 |
|
TimToady |
in p6, it falls out naturally |
| 18:23 |
|
TimToady |
std: sort { $^a <=> $^b }, 1,2,3 |
| 18:23 |
|
p6eval |
std 30750: OUTPUT«ok 00:01 112m» |
| 18:23 |
|
TimToady |
which really means |
| 18:23 |
|
rokoteko |
TimToady: sort { $^var1 cmp $var^2 } is valid? |
| 18:23 |
|
rokoteko |
ah. $^var2 |
| 18:24 |
|
TimToady |
std: sort { $^var1 <=> $^var2 }, 1,2,3 |
| 18:24 |
|
p6eval |
std 30750: OUTPUT«ok 00:01 112m» |
| 18:24 |
|
TimToady |
placeholders are always assumed to be alphabetically ordered |
| 18:24 |
|
TimToady |
so that's the same as |
| 18:24 |
|
rokoteko |
I have no idea why on the eart the p6eval bot outputs that mucs utf8. |
| 18:24 |
|
rokoteko |
makes it difficult to read for humans. |
| 18:25 |
|
TimToady |
std: sort -> $var1, $var2 { $var1 <=> $var2 }, 1,2,3 |
| 18:25 |
|
p6eval |
std 30750: OUTPUT«ok 00:01 113m» |
| 18:25 |
|
TimToady |
rokoteko: most of us have irc clients that handle utf8 just fine |
| 18:25 |
|
TimToady |
which client are you using? |
| 18:26 |
|
isBEKaml |
what are eigenstates in here? |
| 18:26 |
|
TimToady |
(one of our lesser goals is to drag people kicking and screaming into the age of Unicode :) |
| 18:26 |
|
rokoteko |
irssi, but Im finnish. we're kinda stuck with latin1, or weird. |
| 18:26 |
|
TimToady |
latin1 is a subset of unicode |
| 18:26 |
|
rindolf |
rokoteko: you're still using Latin1 in .fi? |
| 18:26 |
|
rokoteko |
rindolf: yes I am. |
| 18:26 |
|
rindolf |
rokoteko: ah. |
| 18:26 |
|
rindolf |
rokoteko: I hope not on IRC. |
| 18:27 |
|
isBEKaml |
rakudo: sub foo(Any $temp) { $tt!eigenstates.perl.say; } foo(any(1,2,3)); |
| 18:27 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "sub foo(An"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 18:27 |
|
TimToady |
maybe start an alternate irssi with unicode |
| 18:27 |
|
rokoteko |
rindolf: I type in ascii where the charset matters. |
| 18:27 |
|
TimToady |
we do a *lot* of unicode in here |
| 18:27 |
|
rindolf |
rokoteko: http://www.shlomifish.org/art/[…]give-me-death.svg |
| 18:28 |
|
isBEKaml |
rakudo: sub foo(Any $temp) { $temp!eigenstates.perl.say; } foo(any(1,2,3)); |
| 18:28 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "sub foo(An"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 18:28 |
|
lue |
rakudo: say "hello" for ^3 |
| 18:28 |
|
p6eval |
rakudo 9a15b8: OUTPUT«hellohellohello» |
| 18:29 |
|
dalek |
book: eb8fadc | jonathan++ | src/subs-n-sigs.pod: |
| 18:29 |
|
dalek |
book: Describe captures. |
| 18:29 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]e2c546657415c0068 |
| 18:29 |
|
TimToady |
including using the replacement char for newline :) |
| 18:29 |
|
lue |
rakudo: say ("hello" for ^3) ~~ "hello\nhello\nhello\n"; |
| 18:29 |
|
p6eval |
rakudo 9a15b8: OUTPUT«get_string() not implemented in class 'ArrayIterator'current instr.: 'perl6;Str;ACCEPTS' pc 13125 (src/builtins/Parcel.pir:161)» |
| 18:29 |
|
Su-Shee |
rokoteko: if I can unicode you can. those handful of special chars in finnish.. ;) |
| 18:29 |
|
rokoteko |
TimToady: do you know Archibald Higgings? |
| 18:30 |
|
lue |
rakudo: say Str("hello" for ^3) ~~ "hello\nhello\nhello\n"; |
| 18:30 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)» |
| 18:30 |
|
rokoteko |
Su-Shee: uni is dream in finnish. :) |
| 18:30 |
|
rokoteko |
or vice versa. |
| 18:30 |
|
TimToady |
er, not sure...I'm terrible with names, even among friends. :) |
| 18:30 |
|
lue |
argh.. what be wrong? |
| 18:30 |
|
lue |
rakudo: say ("hello" for ^3).Str ~~ "hello\nhello\nhello\n"; |
| 18:30 |
|
TimToady |
every time I remember a name I forget a Japanese verb... |
| 18:30 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'Str' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 18:31 |
|
rindolf |
TimToady: heh. |
| 18:31 |
|
lue |
then stop remembering names :) |
| 18:31 |
|
rindolf |
TimToady++ |
| 18:31 |
|
lue |
[o wait, wrong priorities] |
| 18:31 |
|
rindolf |
TimToady: are Japanese verbs inflected? |
| 18:32 |
|
jnthn |
Is Japanese anything inflected? |
| 18:32 |
|
TimToady |
rindolf: yes, but in a much regular way than most Indo-European languages |
| 18:32 |
|
rokoteko |
TimToady: you were referring to Fluid Dynamo. to me that is the chick in : http://www.savoir-sans-frontie[…]the_world_eng.pdf ( a comic about topology ) |
| 18:32 |
|
TimToady |
s/much/much more/ |
| 18:32 |
|
lue |
rakudo: say ("hello" for ^3).perl |
| 18:32 |
|
jnthn |
TimToady: Do you count "add this particle" as an inflection? |
| 18:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'perl' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 18:32 |
|
lue |
rakudo: say ("hello" for ^3).WHAT |
| 18:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'WHAT' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 18:32 |
|
rindolf |
TimToady: I see. |
| 18:32 |
|
jnthn |
TimToady: Are are there "real" inflections that morph stuff? |
| 18:32 |
|
lue |
Now _that's_ ironic. |
| 18:33 |
|
jnthn |
*or are |
| 18:33 |
|
lue |
the above code I entered (the .WHAT) should work, right? |
| 18:33 |
|
jnthn |
Oh, wait...I guess Japanese does have real inflections on verbs, looking it up. |
| 18:33 |
|
jnthn |
:-) |
| 18:33 |
|
jnthn |
D'oh. |
| 18:34 |
|
lue |
[last I heard, tone is important in 日本語] |
| 18:34 |
|
rokoteko |
rakudo: my $x = *.(**2); say $x(1...5) # so how should this be done? |
| 18:34 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» |
| 18:35 |
|
moritz_ |
jnthn: did you get around to fix the multi/candidates bugs |
| 18:35 |
|
rokoteko |
or it just a bug ? |
| 18:35 |
|
lue |
rakudo: my @a = "hello" for ^3; say @a.WHAT |
| 18:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Array()» |
| 18:35 |
|
lue |
rakudo: my @a = "hello" for ^3; say @a |
| 18:35 |
|
moritz_ |
general Whatever-currying is not yet implemented in Rakuo |
| 18:35 |
|
TimToady |
lue: yes, in the sense that Japanese has "pitch accent", but it is not a tonal language |
| 18:35 |
|
p6eval |
rakudo 9a15b8: OUTPUT«hello» |
| 18:36 |
|
lue |
rakudo: my @a = ("hello" for ^3); say @a |
| 18:36 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 18:36 |
|
lue |
ō.o |
| 18:36 |
|
rindolf |
rakudo: my @a = "hello" for ^3; say @a.perl |
| 18:36 |
|
TimToady |
basically, instead of accenting a syllable by stressing it, they accent it by dropping the pitch on the next syllable |
| 18:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«["hello"]» |
| 18:36 |
|
Su-Shee |
lue: in mandarin or cantonese you really have to learn "tones". |
| 18:36 |
|
TimToady |
or between syllables, if you think of it that way |
| 18:37 |
|
lue |
so, in Japanese, monotone would be very... interesting [based on my understanding] |
| 18:37 |
|
TimToady |
rokoteko: I have no idea what you're trying to do |
| 18:37 |
|
jnthn |
moritz_: No, been writing book instead. :-) |
| 18:37 |
|
moritz_ |
jnthn: ah, I've just seen the commits on #perl6book |
| 18:38 |
|
moritz_ |
jnthn: btw I've made progress on match objects |
| 18:38 |
|
TimToady |
lue: there are 25 or so different pitch accent systems in use in different parts of Japan, and "none" is one of them :) |
| 18:38 |
|
moritz_ |
I've got named (non-quantified) captures working, without evil workarounds |
| 18:38 |
|
lue |
rakudo: say ((say "hello") ~~ "hello") |
| 18:38 |
|
p6eval |
rakudo 9a15b8: OUTPUT«hello0» |
| 18:38 |
|
lue |
rakudo: say ((say "hello") ~~ "hello\n") |
| 18:39 |
|
p6eval |
rakudo 9a15b8: OUTPUT«hello0» |
| 18:39 |
|
isBEKaml |
moritz_: can you throw some light on what eigenstates are when it comes to junctions? I saw that on the spectest suite and tried searching up/down on S03, but for some reason my FF just hangs.. :( |
| 18:39 |
|
rokoteko |
TimToady: I was expecting it to be the same as: @res = map { $_**2 } (1..5); # oh wait, I again put the three dots instead of 1..5 |
| 18:40 |
|
moritz_ |
isBEKaml: eigenstates are the values that make up junctions |
| 18:40 |
|
TimToady |
you don't get a map for free like that, and 3 dots should also work |
| 18:40 |
|
moritz_ |
in (1|2|3) the eigenstates are 1, 2 and 3 |
| 18:40 |
|
rokoteko |
three dots why? is "===" also perl6 syntax? |
| 18:40 |
|
isBEKaml |
rakudo: my $foo = any(1,2,3); say $foo!eigenstates.perl; |
| 18:40 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method '!eigenstates' not found for invocant of class 'Integer'current instr.: '!DISPATCH_JUNCTION_METHOD' pc 17399 (src/builtins/Junction.pir:30)» |
| 18:41 |
|
isBEKaml |
rakudo: my $foo = any(1,2,3); say $foo.eigenstates.perl; |
| 18:41 |
|
TimToady |
and in none(1,2,3), they're also 1,2,3, and have an exclusive relationship with the actual set involved |
| 18:41 |
|
p6eval |
rakudo 9a15b8: OUTPUT«(1, 2, 3)» |
| 18:41 |
|
moritz_ |
it shouldn't be a public method |
| 18:41 |
|
isBEKaml |
moritz_: well, it looks like it.. |
| 18:41 |
|
jnthn |
moritz_: Ah, great. |
| 18:41 |
|
TimToady |
the only junction that is anything like a set of its eigenstates is all(1,2,3) |
| 18:41 |
|
jnthn |
moritz_: I need to go buy / eat noms now, but back later on. :-) |
| 18:42 |
|
jnthn |
moritz_: Does the mob4 branch build against the same Parrot as current master? |
| 18:42 |
|
lue |
sub marine($parameter) { say $parameter; }; marine("h3llo"); marine() |
| 18:42 |
|
lue |
rakudo: sub marine($parameter) { say $parameter; }; marine("h3llo"); marine() |
| 18:42 |
|
moritz_ |
jnthn: nope; I've rebased, and pushed as 'mob5' |
| 18:42 |
|
p6eval |
rakudo 9a15b8: OUTPUT«h3lloNot enough positional parameters passed; got 0 but expected 1current instr.: 'marine' pc 194 (EVAL_1:79)» |
| 18:42 |
|
TimToady |
any(1,2,3) is really *six* different sets |
| 18:42 |
|
isBEKaml |
TimToady: so any(1,2,3) or none(1,2,3) don't take on all of their eigen states? |
| 18:43 |
|
jnthn |
moritz_: ah, cool. I needn't go building an older Parrot hen. :-) |
| 18:43 |
|
jnthn |
*then |
| 18:43 |
|
TimToady |
and none(1,2,3) is an an infinite number of sets (as defined defined in the current universe of discourse) - 6 |
| 18:44 |
|
TimToady |
which is why we will allow only all() junctions to autoconvert to sets, if any do |
| 18:44 |
|
|
rokoteko left #perl6 |
| 18:44 |
|
isBEKaml |
Ah, I see... |
| 18:44 |
|
lue |
Would that go under aleph-zero or similar? |
| 18:44 |
|
lue |
[none(1,2,3)] |
| 18:45 |
|
TimToady |
well... |
| 18:45 |
|
lue |
∞-6=∞ |
| 18:45 |
|
TimToady |
rakudo: say "what's my universe?" if pi === none(1,2,3) |
| 18:45 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 18:45 |
|
TimToady |
hmm |
| 18:46 |
|
rindolf |
rakudo: pi |
| 18:46 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 18:46 |
|
rindolf |
rakudo: say pi |
| 18:46 |
|
p6eval |
rakudo 9a15b8: OUTPUT«3.14159265358979» |
| 18:46 |
|
TimToady |
rakudo: say "what's my universe?" if pi == none(1,2,3) |
| 18:46 |
|
p6eval |
rakudo 9a15b8: OUTPUT«what's my universe?» |
| 18:46 |
|
TimToady |
right, rakudo is still busted in autothreading === |
| 18:46 |
|
lue |
so === is "too strict for true to be true"? :) |
| 18:47 |
|
isBEKaml |
=== is too strict against types. |
| 18:47 |
|
pugssvn |
r30753 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 15: .pick your game |
| 18:47 |
|
isBEKaml |
rakudo: say non(1,2,3).WHAT; |
| 18:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &noncurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 18:47 |
|
isBEKaml |
rakudo: say none(1,2,3).WHAT; |
| 18:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Junction()» |
| 18:47 |
|
TimToady |
but to answer your question, pi is irrational, so I think it's at least א₁ |
| 18:49 |
|
lue |
I think I ought to set up a custom keymap for third/fourth/etc levels and 3button emulation (so on) |
| 18:49 |
|
isBEKaml |
TimToady: I haven't got my head around autothreading though. And, it's atleast - sorry, I can't read that character. :( |
| 18:49 |
|
lue |
Because I want to be able to type both an aleph and an o w/ umlaut :) |
| 18:49 |
|
Su-Shee |
lue: just input the unicode code point. |
| 18:49 |
|
isBEKaml |
.u aleph |
| 18:49 |
|
phenny |
isBEKaml: Sorry, no results for 'aleph'. |
| 18:49 |
|
isBEKaml |
.u umlaut |
| 18:49 |
|
phenny |
isBEKaml: Sorry, no results for 'umlaut'. |
| 18:50 |
|
isBEKaml |
:( |
| 18:50 |
|
Su-Shee |
I mean in your term/irc client/editor and so on. :) |
| 18:50 |
|
lue |
hah! If only KDE would do that.... :( |
| 18:50 |
|
lue |
.u alef |
| 18:50 |
|
phenny |
U+2135 ALEF SYMBOL (ℵ) |
| 18:50 |
|
lue |
.u diaresis |
| 18:50 |
|
phenny |
lue: Sorry, no results for 'diaresis'. |
| 18:51 |
|
TimToady |
rakudo: my $x = { map { $^x * 2}, @_ }; say $x(1..5); |
| 18:51 |
|
p6eval |
rakudo 9a15b8: OUTPUT«246810» |
| 18:51 |
|
TimToady |
rakudo: my $x = { map { $^x * 2}, @_ }; say $x(1...5); |
| 18:51 |
|
p6eval |
rakudo 9a15b8: OUTPUT«246810» |
| 18:51 |
|
BrowserUk |
-? |
| 18:52 |
|
* moritz_ |
wonders if BrowserUk knows greetings that contain letters |
| 18:52 |
|
* isBEKaml |
is glad BrowserUk typed two chars instead of one. ;) |
| 18:53 |
|
lue |
!(~~>] |
| 18:53 |
|
TimToady |
phenny: tell rokoteko you want something like: my $x = { map { $^x * 2}, @_ }; say $x(1..5); |
| 18:53 |
|
phenny |
TimToady: I'll pass that on when rokoteko is around. |
| 18:55 |
|
isBEKaml |
moritz_: I find Junctions only take eigenstates as a private method. But I find them on p6eval to be publc. Was that changed recently? |
| 18:56 |
|
TimToady |
phenny: tell rokoteko Yes, ... is a dwimmy "series" operator, while .. is just interval ranges; === is exact type and value equivalence, while == is forced numeric as in p5 |
| 18:56 |
|
phenny |
TimToady: I'll pass that on when rokoteko is around. |
| 18:56 |
|
Juerd |
.u diaeresis |
| 18:56 |
|
phenny |
U+00A8 DIAERESIS (¨) |
| 18:56 |
|
Juerd |
lue: Correct spelling helps :) |
| 18:56 |
|
lue |
thank you. I can never remember that. Is it supposed to be english? |
| 18:56 |
|
moritz_ |
isBEKaml: "recently", yes |
| 18:56 |
|
moritz_ |
like, within in the last two years :-) |
| 18:57 |
|
Juerd |
lue: As English as most of the language... that is: not really |
| 18:57 |
|
isBEKaml |
moritz_: wow, spec test methods need to reflect that, then.. :-) |
| 18:57 |
|
lue |
I think it's weird. I prefer "umlaut" :) |
| 18:57 |
|
moritz_ |
isBEKaml: don't they? |
| 18:57 |
|
Juerd |
lue: Umlaut is a diaeresis used for a specific purpose. |
| 18:57 |
|
isBEKaml |
moritz_: No.. |
| 18:58 |
|
isBEKaml |
moritz_: t/spec/S03-junctions/eigenstates.t |
| 18:58 |
|
moritz_ |
this test... sucks. |
| 18:59 |
|
Juerd |
lue: Umlaut is not correct if the ¨ is used to separate syllables, breaking what would otherwise be a diphthong |
| 18:59 |
|
TimToady |
you aren't supposed to be able to use the bare !method syntax outside of the class in question |
| 18:59 |
|
|
pmurias joined #perl6 |
| 19:00 |
|
TimToady |
you have to say $x!ThatClass::method |
| 19:00 |
|
diakopter |
pmurias: say something |
| 19:00 |
|
isBEKaml |
TimToady: yes, the spec test suite actually violated them. |
| 19:00 |
|
pmurias |
diakopter: hi |
| 19:00 |
|
phenny |
pmurias: 17:48Z <diakopter> tell pmurias I fixed the problem(s) there, mostly. |
| 19:00 |
|
phenny |
pmurias: 18:02Z <diakopter> tell pmurias well, I guess I broke other things. :/ |
| 19:00 |
|
phenny |
pmurias: 18:23Z <diakopter> tell pmurias I fixed the problems |
| 19:00 |
|
diakopter |
:) |
| 19:00 |
|
TimToady |
walking to lunch on Castro & |
| 19:00 |
|
pugssvn |
r30754 | moritz++ | remove a test file that is mostly wrong, isBEKaml++ for pointint it out |
| 19:01 |
|
pmurias |
diakopter: what was the source of the bug? |
| 19:02 |
|
isBEKaml |
moritz_: fgrepping revealed one more file in the same directory. misc.t |
| 19:03 |
|
rindolf |
How would you write a cumulative average of fields one-liner in p6? In Perl 5 we got it down to «(echo '1 1 1 2' ; echo '3 3 3 4') | perl -lape '$f=0;$s[$f++]+=$_ for F;$_="@{[map$_/$.,@s]}"'» |
| 19:03 |
|
isBEKaml |
moritz_: lines 391, 392 |
| 19:04 |
|
diakopter |
pmurias: well, you can't declare a class P6object in that test when one already exists |
| 19:04 |
|
diakopter |
pmurias: (the one you wrote in C#) |
| 19:05 |
|
TimToady |
Amarin Thai, probably & # really gone |
| 19:05 |
|
isBEKaml |
moritz_: :391,404 d |
| 19:05 |
|
lue |
well, I've seen an "umlaut" used like that, but I believe you. |
| 19:05 |
|
pugssvn |
r30755 | moritz++ | [t/spec] remove another wrong/confusing test |
| 19:07 |
|
pmurias |
diakopter: i'll remove the C# versions of the p6 classes then |
| 19:07 |
|
diakopter |
pmurias: ok :) |
| 19:07 |
|
pmurias |
diakopter: and why did the test pass when commenting out some of the methods? |
| 19:07 |
|
diakopter |
I didn't know it did |
| 19:08 |
|
moritz_ |
rakudo: class A is Array is Hash { method push($x) { self.Array::push($x) } }; my $x = A.new(); A.push(3); say A |
| 19:08 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Type objects are abstract and have no attributes, but you tried to access current instr.: 'perl6;Seq;!fill' pc 14888 (src/builtins/Code.pir:161)» |
| 19:08 |
|
diakopter |
pmurias: which methods |
| 19:08 |
|
moritz_ |
rakudo: class A is Array is Hash { method push($x) { self.Array::push($x) } }; my $x = A.new(); $x.push(3); say $x.[0] |
| 19:08 |
|
p6eval |
rakudo 9a15b8: OUTPUT«3» |
| 19:08 |
|
pmurias |
diakopter: the last one |
| 19:08 |
|
diakopter |
I don't know; it shouldn't have |
| 19:09 |
|
pmurias |
diakopter: but i don't think it's important to understand that |
| 19:09 |
|
diakopter |
didn't work for me when I did that just now |
| 19:11 |
|
pmurias |
why does class Z {};class X is Z { has List<Z> $positionals} fail? |
| 19:11 |
|
diakopter |
I dunno; i'll try it |
| 19:11 |
|
pmurias |
List[Z] |
| 19:12 |
|
pmurias |
fixes |
| 19:12 |
|
diakopter |
oh, yeah :D |
| 19:12 |
|
diakopter |
pmurias: oh btw, should I make an Array type? |
| 19:12 |
|
moritz_ |
mixing syntaxes considered harmful |
| 19:13 |
|
diakopter |
which were mixed? |
| 19:13 |
|
diakopter |
oh, parametric roles syntax for parametric types |
| 19:13 |
|
pmurias |
patametric roles vs templates |
| 19:13 |
|
moritz_ |
C++ templates |
| 19:13 |
|
pmurias |
C++ considered evil |
| 19:13 |
|
diakopter |
that's just C# |
| 19:13 |
|
diakopter |
different from C++ templates |
| 19:14 |
|
moritz_ |
C# cripped it from C++ |
| 19:14 |
|
mathw |
C# generics are rather different to C++ templates |
| 19:14 |
|
diakopter |
(ditto) |
| 19:14 |
|
* moritz_ |
talked only about the syntax |
| 19:14 |
|
diakopter |
but still, p6 doesn't have parametric/generic classes (booo) |
| 19:15 |
|
pmurias |
it has parametric roles |
| 19:15 |
|
diakopter |
right, but that doesn't help :P since perlesque won't have roles |
| 19:15 |
|
diakopter |
too complex for that layer. |
| 19:16 |
|
pmurias |
perlesque shouldn't even have syntax |
| 19:16 |
|
diakopter |
? |
| 19:16 |
|
diakopter |
it shouldn't be a language? |
| 19:17 |
|
pmurias |
IMHO it should accept AST in JSON |
| 19:17 |
|
diakopter |
I thought we talked through this and you agreed that was impossible? |
| 19:18 |
|
diakopter |
besides, how would it translate anything? |
| 19:19 |
|
diakopter |
who will write the "translate this type of AST node to this" translation routines |
| 19:20 |
|
diakopter |
show me [an example of or the spec of] the AST API the JSON would match against |
| 19:20 |
|
diakopter |
VAST? |
| 19:21 |
|
diakopter |
if it's VAST, that's nowhere close to low-level enough to translate trivially to CIL. |
| 19:21 |
|
ajs |
Does rakudo just not support BUILD submethods yet, or is that no longer how we define signature-specific initializers for classes? |
| 19:21 |
|
moritz_ |
ajs: it never was |
| 19:22 |
|
ajs |
oh, I must have misread |
| 19:22 |
|
moritz_ |
ajs: http://perlgeek.de/blog-en/per[…]itialization.html |
| 19:22 |
|
ajs |
So I should be defining my own new, then? |
| 19:22 |
|
moritz_ |
yes |
| 19:23 |
|
ajs |
hmm... and here I thought blessing was so Perl 5 ;-) |
| 19:23 |
|
moritz_ |
ajs: Perl 6 still uses some of the Perl 5 ideas under the hood |
| 19:25 |
|
lue |
rakudo: %nonfoos{"a" => 1, "b" => 2}; say (%nonfoos.keys.fmt("'%s'", ', ')).WHAT |
| 19:25 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Symbol '%nonfoos' not predeclared in <anonymous>current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» |
| 19:25 |
|
|
rindolf joined #perl6 |
| 19:25 |
|
lue |
rakudo: my %nonfoos{"a" => 1, "b" => 2}; say (%nonfoos.keys.fmt("'%s'", ', ')).WHAT |
| 19:25 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 19:25 |
|
lue |
ō.o |
| 19:26 |
|
lue |
Why did that fail? |
| 19:26 |
|
moritz_ |
lue: did you mean to assign to that variable? |
| 19:26 |
|
lue |
I meant to put something in the hash, yes. |
| 19:26 |
|
moritz_ |
then do it |
| 19:27 |
|
moritz_ |
you know, assignment with the = operator |
| 19:27 |
|
lue |
I thought hashes were special (don't use them often) |
| 19:27 |
|
lue |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say (%nonfoos.keys.fmt("'%s'", ', ')).WHAT |
| 19:27 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 19:28 |
|
lue |
ō.ō |
| 19:28 |
|
moritz_ |
rakudo: (1, 2).fmt('a', 'b') |
| 19:28 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 19:28 |
|
moritz_ |
rakudo: my %h; say %h.keys.WHAT |
| 19:28 |
|
p6eval |
rakudo 9a15b8: OUTPUT«MapIterator()» |
| 19:28 |
|
moritz_ |
ah |
| 19:28 |
|
moritz_ |
that's why |
| 19:29 |
|
lue |
It's part of the advent calendar (2009 Day 9) |
| 19:29 |
|
lue |
capturing named arguments (arbitrary amount) |
| 19:31 |
|
|
Ross^ joined #perl6 |
| 19:31 |
|
lue |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ') = ("a","b") |
| 19:31 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 19:31 |
|
lue |
alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ') = ("a","b") |
| 19:31 |
|
p6eval |
alpha 30e0ed: ( no output ) |
| 19:31 |
|
moritz_ |
alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ') |
| 19:32 |
|
p6eval |
alpha 30e0ed: ( no output ) |
| 19:32 |
|
moritz_ |
alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys |
| 19:32 |
|
moritz_ |
alpha: say 2 |
| 19:32 |
|
p6eval |
alpha 30e0ed: ( no output ) |
| 19:32 |
|
p6eval |
alpha 30e0ed: OUTPUT«2» |
| 19:33 |
|
isBEKaml |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys; |
| 19:33 |
|
p6eval |
rakudo 9a15b8: OUTPUT«ab» |
| 19:34 |
|
lue |
old advent code then; should it still work? |
| 19:35 |
|
|
finanalyst joined #perl6 |
| 19:35 |
|
|
Ross^ joined #perl6 |
| 19:35 |
|
moritz_ |
i think so |
| 19:36 |
|
isBEKaml |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys>>.Str.fmt(;"'%s'", ', '); |
| 19:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1696 (ext/nqp-rx/src/stage0/Regex-s0.pir:932)» |
| 19:36 |
|
moritz_ |
lue: don't you want to submit a patch for rakudo that implements it? |
| 19:36 |
|
isBEKaml |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys>>.Str.fmt("'%s'", ', '); |
| 19:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«'a', 'b'» |
| 19:36 |
|
moritz_ |
lue: likely it's straight forward to backport it from alpha |
| 19:36 |
|
lue |
I can, but I'm writing the test file for advent day 9, maybe afterwards |
| 19:37 |
|
isBEKaml |
lue: ^^ |
| 19:37 |
|
lue |
I'll just put it in as-is. After all, it is a *test* I'm writing. |
| 19:38 |
|
|
Ross^ joined #perl6 |
| 19:38 |
|
isBEKaml |
moritz_: does this still need a patch? >>.Str seems to do it... |
| 19:39 |
|
moritz_ |
isBEKaml: hash .fmt'ing shoul still work |
| 19:39 |
|
lue |
alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ').WHAT |
| 19:39 |
|
p6eval |
alpha 30e0ed: ( no output ) |
| 19:39 |
|
isBEKaml |
alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', '); |
| 19:39 |
|
lue |
I'll assume it returns an array |
| 19:40 |
|
|
finanalyst left #perl6 |
| 19:40 |
|
p6eval |
alpha 30e0ed: ( no output ) |
| 19:40 |
|
isBEKaml |
huh? no output? |
| 19:41 |
|
isBEKaml |
moritz_: you mean, .fmt should be able to stringify a MapIterator into a flat string? |
| 19:41 |
|
moritz_ |
aye |
| 19:45 |
|
isBEKaml |
moritz_: .fmt currently seems to take a string and format it into the specified format. So, don't know how I'd do that otherwise. :) |
| 19:46 |
|
moritz_ |
on everything listy it should take a separator too, I think |
| 19:47 |
|
moritz_ |
rakudo: say <1 2 3>.fmt('%02d', 'a') |
| 19:47 |
|
p6eval |
rakudo 9a15b8: OUTPUT«01a02a03» |
| 19:47 |
|
pmurias |
diakopter: re taking JSON i agreed that's propably a lot of work, and there are propably a lot of things in perlesque that are more worth doing |
| 19:48 |
|
isBEKaml |
moritz_: I'm currently looking at EnumMap.pm to see how .fmt's implemented. It maps out the pairs to format according to the %format% given and joins them with the separator. |
| 19:49 |
|
moritz_ |
snarkyboojum: is (@deck .= pick(*); @deck.elems), 4 * 13, 'Shuffled card deck'; |
| 19:50 |
|
moritz_ |
snarkyboojum: that's not working how you think it does |
| 19:50 |
|
snarkyboojum |
moritz_: ok :) |
| 19:50 |
|
|
jakk joined #perl6 |
| 19:50 |
|
snarkyboojum |
moritz_: I thought it was a dodgey way to test it anyway :) |
| 19:51 |
|
lisppaste3 |
pmurias pasted "diakopter: why doesn't that work?" at http://paste.lisp.org/display/100307 |
| 19:51 |
|
pmurias |
diakopter: why does that cause an error |
| 19:51 |
|
pugssvn |
r30756 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar |
| 19:51 |
|
pmurias |
? |
| 19:52 |
|
moritz_ |
snarkyboojum: it's better to do the @deck .= pick(*) before the line with the is() |
| 19:52 |
|
snarkyboojum |
moritz_: ok - will fix |
| 19:52 |
|
moritz_ |
snarkyboojum++ |
| 19:52 |
|
diakopter |
pmurias: b/c the expression parser cheats a lot |
| 19:52 |
|
diakopter |
as in, doesn't exist |
| 19:52 |
|
diakopter |
you need parens |
| 19:53 |
|
diakopter |
(self.positionals).Add($pos); |
| 19:53 |
|
snarkyboojum |
moritz_++ # thanks for reviewing the tests :) |
| 19:53 |
|
diakopter |
pmurias: at first glance. |
| 19:53 |
|
|
Ross^ joined #perl6 |
| 19:54 |
|
lue |
hi snarky! Back from the Perl 6 golf course, eh? |
| 19:54 |
|
diakopter |
pmurias: oh, I'm wrong; that's not it. |
| 19:55 |
|
snarkyboojum |
moritz_: is that was you had in mind - http://gist.github.com/410321 ? |
| 19:55 |
|
snarkyboojum |
s/was/what/ |
| 19:55 |
|
moritz_ |
snarkyboojum: aye |
| 19:55 |
|
lue |
( must've seen a lot of .t's :) ) |
| 19:55 |
|
snarkyboojum |
k |
| 19:56 |
|
snarkyboojum |
lue: o/ |
| 19:56 |
|
moritz_ |
rakudo: DEBUG(3) |
| 19:56 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &DEBUGcurrent instr.: '_block14' pc 29 (EVAL_1:0)» |
| 19:57 |
|
diakopter |
pmurias: hrm. grammar engine buglet. it'll take me awhile to trace it down |
| 19:59 |
|
pugssvn |
r30757 | snarkyboojum++ | [t/spec] Cleaned up a test for Advent Calendar Day 5 in response to feedback from moritz_++ |
| 20:00 |
|
isBEKaml |
moritz_: Alright, I'm tempted. How do I go about implementing this functionality ? ## Or, what should I know b4 I do this? |
| 20:00 |
|
|
Ross^ joined #perl6 |
| 20:01 |
|
diakopter |
pmurias: well, it works on its own.... odd. |
| 20:01 |
|
diakopter |
oh |
| 20:01 |
|
pmurias |
hm? |
| 20:02 |
|
moritz_ |
isBEKaml: the sanest thing would be to convert it to an ordinary list (or maybe Seq) first, and then hand it over to the fmt method of that new list |
| 20:02 |
|
moritz_ |
rakudo: say %*ENV.keys.WHAT |
| 20:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«MapIterator()» |
| 20:03 |
|
moritz_ |
rakudo: say list(%*ENV.keys).WHAT |
| 20:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«List()» |
| 20:03 |
|
moritz_ |
rakudo: say list(%*ENV.keys).fmt('%s%s', '|-|') |
| 20:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 20:03 |
|
isBEKaml |
rakudo: say %*ENV.keys.List.WHAt; |
| 20:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'List' not found for invocant of class 'MapIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 20:03 |
|
isBEKaml |
rakudo: say %*ENV.keys.List.WHAT; |
| 20:03 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Method 'List' not found for invocant of class 'MapIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 20:04 |
|
isBEKaml |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say list(%nonfoos.keys).fmt("'%s'", ', '); |
| 20:04 |
|
diakopter |
moritz_: to clarify earlier, perlesque uses the [], not the <> |
| 20:04 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 20:04 |
|
moritz_ |
diakopter: that's how I understood it, yes |
| 20:04 |
|
diakopter |
oh ok |
| 20:04 |
|
isBEKaml |
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say list(%nonfoos.keys)>>.fmt("'%s'", ', '); |
| 20:04 |
|
p6eval |
rakudo 9a15b8: OUTPUT«No applicable candidates found to dispatch to for 'fmt'. Available candidates are::(Mu : Str $format = { ... };; *%_)current instr.: '!dispatch_method_parallel' pc 357 (src/glue/dispatch.pir:71)» |
| 20:04 |
|
isBEKaml |
moritz_: EnumMap.pm ? |
| 20:05 |
|
pmurias |
diakopter: other annoying thing why do i have to declare the return type of a constructor? |
| 20:05 |
|
moritz_ |
huh? |
| 20:05 |
|
lue |
How do I evaluate a piece of code as being ok in a test? |
| 20:05 |
|
moritz_ |
isBEKaml: sorry, I'm a bit distracted at the moment |
| 20:05 |
|
moritz_ |
what do you mean with "as ok"? |
| 20:06 |
|
diakopter |
pmurias: it's on the list to fix.. |
| 20:06 |
|
diakopter |
the mental list |
| 20:06 |
|
diakopter |
afk& |
| 20:07 |
|
lue |
test to see if it works, such as this [which should fail]: |
| 20:07 |
|
lue |
sub f(Array @a){...} |
| 20:07 |
|
moritz_ |
dies_ok { code }, 'description'; |
| 20:07 |
|
moritz_ |
like this? |
| 20:07 |
|
lue |
And then for a success, it's something like eval_ok ? |
| 20:07 |
|
moritz_ |
lives_ok |
| 20:08 |
|
isBEKaml |
lue: for more, look at Test.pm. Easy to read (I don't know p6, either) |
| 20:08 |
|
isBEKaml |
:) |
| 20:08 |
|
lue |
thank you. |
| 20:09 |
|
snarkyboojum |
shuteye& |
| 20:09 |
|
|
Ross^ joined #perl6 |
| 20:10 |
|
lue |
rakudo: sub f(Array @a) { say @a;}; say f((1,2,3)) |
| 20:10 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional[Array] but got Parcel insteadcurrent instr.: 'f' pc 203 (EVAL_1:78)» |
| 20:10 |
|
lue |
rakudo: sub f(Array @a) { say @a;}; my @b = 1,2,3; f(@b) |
| 20:10 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional[Array] but got Array insteadcurrent instr.: 'f' pc 242 (EVAL_1:22837788)» |
| 20:11 |
|
moritz_ |
that's correct |
| 20:12 |
|
isBEKaml |
moritz_: is there a way to know where some method comes from ? I tried deliberately introducing an error for a stacktrace, but the unknown file always gets me off.. :( |
| 20:12 |
|
BrowserUk |
? |
| 20:12 |
|
moritz_ |
isBEKaml: grep/ack |
| 20:13 |
|
|
Ross^ joined #perl6 |
| 20:13 |
|
BrowserUk |
Hey moritz |
| 20:13 |
|
moritz_ |
hi BrowserUk |
| 20:13 |
|
Ross^ |
Toallchannels:Sorry for the annoying reconnect messages, my net connection is through a server which is currently having it's file server module configured... and it's messing stuff up. |
| 20:14 |
|
BrowserUk |
phenny: tell pmurias, do you have a link to the ebook version of Erlang Programming? |
| 20:14 |
|
phenny |
BrowserUk: I'll pass that on when pmurias is around. |
| 20:15 |
|
isBEKaml |
moritz_: and some fore-knowlege about how such classes are related. :) This got me pretty recently, when I tried to search for Array's private Fill method. Turned out in Seq, but didn't know that Arrays are essentially Seqs. (colomon++) |
| 20:16 |
|
moritz_ |
ack '(sub|method).*!fill\b' |
| 20:16 |
|
moritz_ |
finds src/builtins/Seq.pir pretty quickly |
| 20:17 |
|
isBEKaml |
moritz_: I'm using find . -type f -exec fgrep fmt {} + |
| 20:17 |
|
isBEKaml |
:) |
| 20:17 |
|
moritz_ |
isBEKaml: cpan -i App::Ack # welcome to the 21st century |
| 20:18 |
|
moritz_ |
use perl 5 regexes for searching, get decent hilighitng, automatic exclusion of .svn files etc. |
| 20:18 |
|
lue |
Oi! Has the spec changed on this bit of code (from Day 9): |
| 20:18 |
|
lue |
sub f(:$a, :$b) {...}; |
| 20:19 |
|
lue |
when the advent was written, this automagically makes every forced named parameter optional |
| 20:19 |
|
jnthn |
That's still troo. |
| 20:19 |
|
pmurias |
BrowserUk: a legal one? |
| 20:19 |
|
phenny |
pmurias: 20:14Z <BrowserUk> tell pmurias do you have a link to the ebook version of Erlang Programming? |
| 20:19 |
|
jnthn |
rakudo: sub f(:$a, :$b) { say "look I'm ok!!!" }; f |
| 20:19 |
|
p6eval |
rakudo 9a15b8: OUTPUT«look I'm ok!!!» |
| 20:20 |
|
[Coke] |
ʘ‿ʘ |
| 20:20 |
|
lue |
AAH! |
| 20:21 |
|
|
pmurias_ joined #perl6 |
| 20:21 |
|
lue |
Oh, wrong test I thought keeled :) . Guess I need *eval*_dies_ok then. |
| 20:23 |
|
pmurias |
BrowserUk: i think i found it by typing 'rapidshare Erlang Programming' into google |
| 20:23 |
|
isBEKaml |
moritz_: I knew about ack, faster search, better regex support. ## err... |
| 20:28 |
|
lue |
Is it alright to fudge part of an advent test? [something doesn't work in rakudo, and I don't want to fix it right now] |
| 20:28 |
|
lue |
[alternatively, I can wait to upload the test] |
| 20:28 |
|
moritz_ |
sure, fudge it |
| 20:31 |
|
|
Charlie joined #perl6 |
| 20:32 |
|
|
Ross joined #perl6 |
| 20:34 |
|
|
masonkramer joined #perl6 |
| 20:34 |
|
|
meteorjay joined #perl6 |
| 20:36 |
|
pugssvn |
r30758 | lue++ | [t/spec] Updated Day 9 Advent test to actually test Day 9 bits of code |
| 20:38 |
|
isBEKaml |
rakudo: my $temp = any(3,2,5); my $another = $temp * 2; say $another.eigenstates; |
| 20:38 |
|
p6eval |
rakudo 9a15b8: OUTPUT«6410» |
| 20:42 |
|
lue |
Dankon, kaj FDK [later I might feel like undfudging Day 9 Advent :)] |
| 20:42 |
|
lue |
.btw(FDK = For de Klavaro) |
| 20:46 |
|
|
cognomore joined #perl6 |
| 20:50 |
|
isBEKaml |
rakudo: (3&5&8).WHAT.perl.say; |
| 20:50 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Junction» |
| 20:54 |
|
moritz_ |
EWRONGFILENAMEINBACKTRACE |
| 20:54 |
|
isBEKaml |
huh? |
| 20:54 |
|
moritz_ |
in some local back traces |
| 20:55 |
|
moritz_ |
current instr.: 'perl6;Seq;!fill' pc 14956 (src/builtins/Code.pir:161) |
| 20:55 |
|
ajs |
That should probably have its own error code ;-) EEWRONGFILENAMEINBACKTRACEINBACKTRACE |
| 20:56 |
|
jnthn |
That's...very wrong. :-| |
| 20:56 |
|
isBEKaml |
:) |
| 20:56 |
|
moritz_ |
there's not a single occurence of !fill in Code.pir |
| 20:58 |
|
ajs |
Is there a way to turn on some kind of debugging tracing when a regex is executing? |
| 20:58 |
|
moritz_ |
there is... and i forgot how |
| 20:59 |
|
moritz_ |
rakudo: grammar A { token TOP { <?DEBUG(1)> <foo> }; token foo { .+ } }; A.parse('blah') |
| 20:59 |
|
p6eval |
rakudo 9a15b8: OUTPUT«0/1: START foo0/1: PASS foo at pos=40/1: PASS TOP at pos=4» |
| 20:59 |
|
moritz_ |
ah |
| 20:59 |
|
|
zorgnax joined #perl6 |
| 20:59 |
|
moritz_ |
that's how you do it :-) |
| 20:59 |
|
ajs |
oh nice |
| 20:59 |
|
moritz_ |
(it's not specced |
| 21:00 |
|
jnthn |
But it is useful. :-) |
| 21:00 |
|
ajs |
I'll take it ;) |
| 21:00 |
|
* jnthn |
has found and fixed bugs with that |
| 21:01 |
|
zorgnax |
how is STD.pm6 used? How do you make something to parse Perl6 in Perl6? |
| 21:01 |
|
moritz_ |
1) you write a grammar 2) you write a script that translates it to another language 3) you run said script 4) ... 5) PROFIT! |
| 21:02 |
|
jnthn |
:-) |
| 21:02 |
|
zorgnax |
so its just a way to specify what the language is, I cant run it yet |
| 21:02 |
|
moritz_ |
sure you can |
| 21:02 |
|
ajs |
* step 4 may involve time travel, rendering steps 1 and 2 hypothetical |
| 21:02 |
|
moritz_ |
std: <a b c> |
| 21:02 |
|
p6eval |
std 30758: OUTPUT«ok 00:01 114m» |
| 21:03 |
|
moritz_ |
std: <a b c |
| 21:03 |
|
isBEKaml |
as for time travel, have a look at tardis! |
| 21:03 |
|
p6eval |
std 30758: OUTPUT«===[0mSORRY!===[0mUnable to parse quote words at /tmp/8nJmbjYIKC line 1:------> <⏏a b cCouldn't find final '>'; gave up at /tmp/8nJmbjYIKC line 1 (EOF):------> <a b c⏏<EOL>Parse failedFAILED 00:01 110m» |
| 21:03 |
|
jnthn |
STD.pm6 gets translated to Perl 5. Rakudo also has a grammar that is a lot like STD an converging with it. |
| 21:03 |
|
jnthn |
Rakudo's grammar engine is bootstrapped - it parses itself. |
| 21:03 |
|
* moritz_ |
has been chasing bugs in the wrong method for the last two hours |
| 21:04 |
|
jnthn |
moritz_: Oh, ouch. :-( |
| 21:04 |
|
zorgnax |
my heads going to explode |
| 21:05 |
|
moritz_ |
my $x = 3; Q:PIR { $P0 = find_lex '$x'$P2 = box 3 $P0[0] = $P2 } |
| 21:05 |
|
moritz_ |
rakudo: my $x = 3; Q:PIR { $P0 = find_lex '$x'$P2 = box 3 $P0[0] = $P2 } |
| 21:05 |
|
p6eval |
rakudo 9a15b8: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'current instr.: '_block14' pc 29 (EVAL_1:0)» |
| 21:05 |
|
isBEKaml |
what does it mean when I get "unknown file" in a stacktrace? I mean, where do I look for that concerned method implementation? ## I dont' want to grep... |
| 21:05 |
|
bkeeler |
Hallo folks! |
| 21:06 |
|
moritz_ |
isBEKaml: it means that parrot screwed up. Or rakudo, or boh :( |
| 21:06 |
|
jnthn |
hi bkeeler! |
| 21:06 |
|
moritz_ |
\o/ |
| 21:07 |
|
jnthn |
moritz_: Are you attached to what's in the "=head1 Unpacking" section of subs-n-sigs.pod? |
| 21:07 |
|
jnthn |
moritz_: I find it kinda confusing-ish. |
| 21:08 |
|
moritz_ |
jnthn: feel free to improve it any way you like |
| 21:08 |
|
moritz_ |
(including ripping it out :) |
| 21:08 |
|
jnthn |
moritz_: OK, will try and do so :-) |
| 21:08 |
|
jnthn |
moritz_: After that, we're much of the way through having subs-n-sigs.pod in decent shape. |
| 21:08 |
|
dalek |
book: e4f473a | jonathan++ | src/subs-n-sigs.pod: |
| 21:08 |
|
dalek |
book: A little explanation about why signature introspection might be useful, to |
| 21:08 |
|
dalek |
book: remove a TODO. |
| 21:08 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]bac2a9729c3e0afba |
| 21:08 |
|
isBEKaml |
moritz_: I don't understand it at all. I see core.pir, run.pir - unknown file and HLLCompiler lower level gobbledygook... :( |
| 21:08 |
|
ajs |
Is $/.keys supposed to work? Am I missing something? I'm getting no such method for invocant of class 'Regex;Match'... shouldn't that be the names of the named matches? |
| 21:09 |
|
jnthn |
ajs: It's a bug in present Rakudo. |
| 21:09 |
|
ajs |
Oh, OK. Cool. As long as it's not me misunderstanding. |
| 21:09 |
|
jnthn |
No, it should work. |
| 21:10 |
|
bkeeler |
jnthn: do you have any idea why the following doesn't work? |
| 21:10 |
|
bkeeler |
rakudo: class C does Associative does Positional { } |
| 21:10 |
|
p6eval |
rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» |
| 21:10 |
|
moritz_ |
ajs: it's something I'm working on as we speak |
| 21:10 |
|
jnthn |
bkeeler: erm |
| 21:10 |
|
jnthn |
bkeeler: wtf :-/ |
| 21:10 |
|
moritz_ |
but it's not trivial |
| 21:10 |
|
jnthn |
bkeeler: I don't know why. |
| 21:11 |
|
jnthn |
bkeeler: But I'm a tad surprised. |
| 21:11 |
|
jnthn |
rakudo: class C does Associative { } |
| 21:11 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 21:11 |
|
jnthn |
rakudo: class C does Positional { } |
| 21:11 |
|
ajs |
oh sweet. That would really help. For some reason, that debug pragma didn't work for me, so I'm walking the match results. |
| 21:11 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 21:11 |
|
jnthn |
rakudo: role A { }; role P { }; class C does A does P { } |
| 21:11 |
|
p6eval |
rakudo 9a15b8: ( no output ) |
| 21:11 |
|
bkeeler |
rakudo: class C does Associative ; use MONKEY_TYPING; augment class C does Positional { } |
| 21:11 |
|
p6eval |
rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» |
| 21:11 |
|
moritz_ |
ajs: that's a pain as-is, I know |
| 21:11 |
|
jnthn |
oh |
| 21:11 |
|
jnthn |
bkeeler: I know |
| 21:12 |
|
jnthn |
bkeeler: Bet it's an error reporting FAIL. |
| 21:12 |
|
bkeeler |
This is the roadblock for making Capture do Positinal and Associative |
| 21:12 |
|
jnthn |
bkeeler: Or related fail. |
| 21:12 |
|
ajs |
no worries. I'm thick-skinned when it comes to debugging |
| 21:12 |
|
jnthn |
rakudo: class C does Associative does Positional { method of() { Mu } }; say "lived"; |
| 21:12 |
|
p6eval |
rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» |
| 21:12 |
|
jnthn |
ah, it's deeper |
| 21:13 |
|
jnthn |
Damm. |
| 21:13 |
|
* bkeeler |
confused jnthn! o/ |
| 21:13 |
|
jnthn |
:-P |
| 21:13 |
|
moritz_ |
$ ./perl6 -e '"ab0" ~~ /(.)/; say $/{0}' |
| 21:13 |
|
moritz_ |
a |
| 21:13 |
|
jnthn |
ergh |
| 21:14 |
|
moritz_ |
parrot emits a set_pmc_keyed for boths $P1[$I0] = $P0 and $P1[$S0] = $P0 |
| 21:14 |
|
ajs |
I really like vim, but I wish it would stop underlining code as a means of highlighting... my_sub_match_path() is kind of hard to read |
| 21:14 |
|
moritz_ |
ajs: it depends on the color scheme, iirc |
| 21:14 |
|
arnsholt |
Yeah, my vim doesn't do that either |
| 21:14 |
|
moritz_ |
ajs: "my" vim doesn't do that |
| 21:14 |
|
bkeeler |
I don't have that problem with vim |
| 21:15 |
|
arnsholt |
Of course, I'm boring and use almost entirely default settings |
| 21:15 |
|
ajs |
Yeah, and for some reason I'm trying to do this from Windows over putty instead of in my Ubuntu VM. I think I'm just dazed by too much sun today. |
| 21:15 |
|
isBEKaml |
ajs: give :nohlsearch |
| 21:15 |
|
isBEKaml |
that should fix it.. |
| 21:15 |
|
jnthn |
moritz_: Oh? That's...unexpected. |
| 21:15 |
|
ajs |
ah thanks isBEKaml |
| 21:16 |
|
jnthn |
bkeeler: ah |
| 21:16 |
|
jnthn |
I think I know what's up with it |
| 21:19 |
|
moritz_ |
jnthn: http://irclog.perlgeek.de/perl[…]0-05-22#i_2358731 yes, set_pmc_keyed. sigh. |
| 21:19 |
|
jnthn |
moritz_: I'm...a tad perplexed by that. |
| 21:20 |
|
jnthn |
moritz_: oh |
| 21:20 |
|
jnthn |
moritz_: Actually, that's not the case, I don't think |
| 21:20 |
|
jnthn |
(more) |
| 21:20 |
|
moritz_ |
or am I doing something execptionally stupid there? |
| 21:20 |
|
jnthn |
Parrot has fallbacks for set_pmc_keyed_int and set_pmc_keyed_str. If they don't exist, it tries to box the arguemnt and delegate to set_pmc_keyed. And that then throws the error. |
| 21:21 |
|
|
dual joined #perl6 |
| 21:21 |
|
jnthn |
So it almost certainly is calling set_pmc_keyed_int first, it's just that Parrot "helpfully" tires to delegate to set_pmc_keyed |
| 21:21 |
|
jnthn |
See src/pmc/default.pmc - I get it's in there. |
| 21:21 |
|
moritz_ |
thanks |
| 21:21 |
|
jnthn |
np |
| 21:21 |
|
jnthn |
Sorry, I missed the detail the first time I glanced at the Rakudo output. |
| 21:22 |
|
moritz_ |
no problem |
| 21:22 |
|
jnthn |
bkeeler: |
| 21:22 |
|
jnthn |
> class C does Positional does Associative { } |
| 21:22 |
|
jnthn |
Method 'of' collides and a resolution must be provided by the class |
| 21:22 |
|
jnthn |
> class C does Positional does Associative { method of() { Mu } } |
| 21:22 |
|
jnthn |
> |
| 21:22 |
|
jnthn |
\o/ |
| 21:28 |
|
isBEKaml |
rakudo: my $fname; regex namedreg { $fname = (.*)\.lname }; "firstname.lname" ~~ /<namedreg>/; say $/<namedreg><fname>; |
| 21:28 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Malformed regex at line 11, near "namedreg {"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 21:29 |
|
moritz_ |
bkeeler: btw I'm now in the 'mob5' branch, where I don't need ugly workarounds for named captures |
| 21:29 |
|
isBEKaml |
rakudo: my $fname; regex namedreg { $fname = (.*).lname }; "firstname.lname" ~~ /<namedreg>/; say $/<namedreg><fname>; |
| 21:29 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Malformed regex at line 11, near "namedreg {"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 21:29 |
|
isBEKaml |
what's wrong? named captures don't work? |
| 21:30 |
|
moritz_ |
isBEKaml: looking up named regexes from lexical scopes doesn't work |
| 21:30 |
|
jnthn |
bkeeler: Patch is spectesting now, so will push it soon. |
| 21:30 |
|
|
gbacon joined #perl6 |
| 21:32 |
|
isBEKaml |
moritz_: oh.. :( |
| 21:32 |
|
moritz_ |
wow, adding {set,get}_pmc_keyed_int to Mu.pir causes new dimensions of fails |
| 21:32 |
|
ajs |
rakudo: my %x; say %x<apple> :exists; |
| 21:32 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Confused at line 11, near "say %x<app"current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 21:32 |
|
ajs |
is that not the exists syntax? |
| 21:33 |
|
jnthn |
ajs: No adverbs on postcircumfixes yet; in Rakudo use %x.exists('apple') |
| 21:33 |
|
ajs |
oh, cool |
| 21:33 |
|
ajs |
thanks |
| 21:33 |
|
jnthn |
(In fact, no operator adverbs in general.) |
| 21:36 |
|
jnthn |
rakudo: // |
| 21:36 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Null regex not allowed at line 11, near ""current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)» |
| 21:36 |
|
dalek |
book: 82782ca | moritz++ | src/subs-n-sigs.pod: |
| 21:36 |
|
dalek |
book: [subs] remove duplicated words |
| 21:36 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]65cfffd13b447c045 |
| 21:36 |
|
BrowserUk |
phenny: seen ruoso? |
| 21:40 |
|
isBEKaml |
is there any way I can test out my changes without having to build? |
| 21:40 |
|
bkeeler |
jnthn: \o/ |
| 21:40 |
|
bkeeler |
moritz_: also \o/ |
| 21:40 |
|
isBEKaml |
for instance, any changes i make to Seq.pm goes into core.pm. So I have to build.. :( |
| 21:41 |
|
bkeeler |
Breaking up the core.pm build would be nice. People have tried before though |
| 21:41 |
|
moritz_ |
isBEKaml: that's how software development works: you change code, you compile it, you test it |
| 21:42 |
|
isBEKaml |
moritz_: compile just one, not all. dev switches could be made available? |
| 21:42 |
|
moritz_ |
isBEKaml: compiling the setting separately is non-trivial |
| 21:42 |
|
bkeeler |
I think I'm going to go ahead and push my nqp changes. pmichaud's had a chance to review if he wanted to... |
| 21:44 |
|
isBEKaml |
moritz_: will have to learn about that some other time. It's over 3 am and I'm a bit dazed.. :) |
| 21:44 |
|
moritz_ |
isBEKaml: I haven't learned about it myself :/ |
| 21:45 |
|
moritz_ |
isBEKaml: I've tried to implement it once, and failed |
| 21:46 |
|
diakopter |
bkeeler: somehow I doubt you're correct. |
| 21:46 |
|
bkeeler |
diakopter: about what? |
| 21:46 |
|
diakopter |
the last thing you said. |
| 21:46 |
|
bkeeler |
diakopter: Oh, about pmichaud's tuit supply |
| 21:46 |
|
|
ShadeHawk joined #perl6 |
| 21:47 |
|
ajs |
I have an object $x and a method name as a string $y. I tried $x.$y with no luck. What's the right way to invoke $y on $x? |
| 21:47 |
|
bkeeler |
diakopter: I suppose you're right :/ |
| 21:47 |
|
ShadeHawk |
After reading http://perlgeek.de/en/article/5-to-6 I have one question: how to create empty list, and one-element list in Perl 6? |
| 21:47 |
|
jnthn |
$x."$y"() |
| 21:47 |
|
ajs |
Ah, ok. thanks jnthn |
| 21:48 |
|
jnthn |
$x.$y() always assumes $y is a code object |
| 21:48 |
|
moritz_ |
ShadeHawk: () is an empty list |
| 21:48 |
|
moritz_ |
ShadeHawk: and (1,) a one-item list |
| 21:49 |
|
moritz_ |
rakudo: say (1,).elems |
| 21:49 |
|
p6eval |
rakudo 9a15b8: OUTPUT«1» |
| 21:49 |
|
jnthn |
Also, for one element, anything that puts a single element in list context will do that too. |
| 21:49 |
|
dalek |
rakudo: 1499f20 | jonathan++ | src/builtins/Code.pir: |
| 21:49 |
|
dalek |
rakudo: Since methods in Code.pir may also get called on Parrot subs, we should be |
| 21:49 |
|
dalek |
rakudo: careful to handle the case where that happens gracefully. |
| 21:49 |
|
dalek |
rakudo: review: http://github.com/rakudo/rakud[…]c6606b73030f3983a |
| 21:49 |
|
jnthn |
s/single element/single thing) |
| 21:49 |
|
ShadeHawk |
moritz_, jnthn: thanks |
| 21:49 |
|
bkeeler |
Well, I pushed anway ;) |
| 21:49 |
|
jnthn |
my @x = 1; # list context, so like my @x = (1,); |
| 21:49 |
|
jnthn |
bkeeler: ;-) |
| 21:50 |
|
bkeeler |
I'm keen to put the regex interpolation stuff to bed |
| 21:50 |
|
jnthn |
bkeeler: It'd been through one round of feedback before now at least, so hopefully by now it's close enough. If not, we have version control. |
| 21:50 |
|
jnthn |
bkeeler: Same. |
| 21:50 |
|
dalek |
nqp-rx: f2c2f18 | (Bruce Keeler)++ | (5 files): |
| 21:50 |
|
dalek |
nqp-rx: Add support for interpolation in regexes |
| 21:50 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]45c07d35b5eaf4f9f |
| 21:50 |
|
dalek |
nqp-rx: 96c2b36 | (Bruce Keeler)++ | (35 files): |
| 21:50 |
|
dalek |
nqp-rx: Merge remote branch 'upstream/master' into regex-interpolation |
| 21:50 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]5cd907827d079dbf2 |
| 21:50 |
|
dalek |
nqp-rx: 3664226 | (Bruce Keeler)++ | src/PAST/Compiler-Regex.pir: |
| 21:50 |
|
dalek |
nqp-rx: Make it work with Rakduo |
| 21:50 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]c8671e70fc876794c |
| 21:50 |
|
dalek |
nqp-rx: 0050310 | (Bruce Keeler)++ | src/PAST/Compiler-Regex.pir: |
| 21:50 |
|
dalek |
nqp-rx: Removed debugging line |
| 21:50 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]3c0465b8d31dcbda2 |
| 21:50 |
|
dalek |
nqp-rx: bbaab49 | (Bruce Keeler)++ | src/HLL/Compiler.pm: |
| 21:50 |
|
dalek |
nqp-rx: Merge remote branch 'upstream/master' into regex-interpolation |
| 21:50 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]bdb021cff2b4afd6b |
| 21:51 |
|
bkeeler |
jnthn: Yep. It's pretty much exactly what we agreed on. I was just being cautious in requesting the review, perhaps overly so |
| 21:51 |
|
jnthn |
bkeeler: Well, requesting it and waiting a bit was good. |
| 21:51 |
|
bkeeler |
Perhaps I should have folded it into one commit. Will have to work on my git-fu |
| 21:52 |
|
bkeeler |
I still don't grok rebase |
| 21:52 |
|
moritz_ |
bkeeler: no need for squashing into one commit |
| 21:52 |
|
jnthn |
bkeeler: But if it's what was agreed on from a previous review, then I guess fine to time out. :-) |
| 21:52 |
|
bacek |
aloha |
| 21:52 |
|
bkeeler |
It will need to make its way into parrot before I can give you the corresponding rakudo patch |
| 21:52 |
|
jnthn |
o/ bacek |
| 21:52 |
|
bacek |
jnthn, привет! |
| 21:52 |
|
bkeeler |
hallo bacek |
| 21:52 |
|
|
ShadeHawk left #perl6 |
| 21:53 |
|
bacek |
bkeeler, hio. |
| 21:53 |
|
bkeeler |
Uh oh, we're back to privet bushes again? |
| 21:53 |
|
bacek |
bkeeler, looks like you can help me with nqp :) |
| 21:53 |
|
bkeeler |
I can? |
| 21:53 |
|
jnthn |
bacek: Привет, как дела? :-) |
| 21:53 |
|
bacek |
bkeeler, can you? :) |
| 21:53 |
|
bacek |
jnthn, отлично! |
| 21:54 |
|
jnthn |
\o/ |
| 21:54 |
|
bkeeler |
bacek: What can I do? |
| 21:54 |
|
bacek |
\o/ |
| 21:54 |
|
moritz_ |
bkeeler: if you 'make boostrap-files' and commit the changes, I can push them into parrot |
| 21:54 |
|
bacek |
bkeeler, can you clone github.com/bacek/pir? |
| 21:54 |
|
moritz_ |
I can do it too, but first I have to build a newer parrot |
| 21:54 |
|
moritz_ |
which takes some time |
| 21:55 |
|
bacek |
bkeeler, I have one reproducable bug (probably "hash ordering" related) |
| 21:55 |
|
jnthn |
moritz_: You going for it? |
| 21:55 |
|
jnthn |
(doesn't make sense for both of us to :-)) |
| 21:55 |
|
moritz_ |
jnthn: aye |
| 21:55 |
|
jnthn |
moritz_++ |
| 21:56 |
|
bacek |
bkeeler, http://nopaste.snit.ch/20618 with little bit of description |
| 21:58 |
|
jnthn |
rakudo: class A {method m { return [~] gather for ^3 {take 'a'}}}; class B {method n { return [~] gather for ^4 {.say;take 'b'}}};my B $x.=new; say $x.n |
| 21:58 |
|
p6eval |
rakudo 9a15b8: OUTPUT«Could not find sub &prefix:<[~]>current instr.: 'perl6;B;n' pc 1016 (EVAL_1:0)» |
| 21:58 |
|
jnthn |
Eww that's disgusting. |
| 21:59 |
|
bkeeler |
moritz_: OK, done the bootstrap |
| 22:00 |
|
|
Exodist joined #perl6 |
| 22:01 |
|
|
tlb joined #perl6 |
| 22:01 |
|
moritz_ |
bkeeler++ |
| 22:02 |
|
bkeeler |
bacek: How do I build this thing? |
| 22:02 |
|
dalek |
nqp-rx: b228f8f | (Bruce Keeler)++ | src/stage0/ (4 files): |
| 22:02 |
|
dalek |
nqp-rx: Make new bootstrap |
| 22:02 |
|
dalek |
nqp-rx: review: http://github.com/perl6/nqp-rx[…]d4922973b3679dea7 |
| 22:02 |
|
bacek |
bkeeler, parrot setup.pir |
| 22:03 |
|
bacek |
bkeeler, than something like "parrot --hash-seed=3 /usr/local/lib/parrot/2.4.0-devel/library/nqp-rx.pbc t/01-parse/05-assign.t" |
| 22:04 |
|
bacek |
(With adjustments of nqp-rx.pbc path) |
| 22:04 |
|
bacek |
Test passed on my box with --hash-seed=2 and failed with "3" |
| 22:07 |
|
bkeeler |
Hmmm |
| 22:07 |
|
bacek |
bkeeler, http://nopaste.snit.ch/20620 shorter version of test |
| 22:08 |
|
moritz_ |
parrot r46901 includes the new nqp-rx version |
| 22:08 |
|
bacek |
Same "2" vs "3" hash seed problem. |
| 22:12 |
|
bkeeler |
So what exactly does --hash-seed do? |
| 22:13 |
|
bacek |
bkeeler, set initial seed for parrot hashes. |
| 22:13 |
|
bkeeler |
So we're just make an otherwise hard-to-reproduce problem reproducable? |
| 22:13 |
|
moritz_ |
right |
| 22:13 |
|
bacek |
something like this |
| 22:14 |
|
colomon |
bacek++ bkeeler++ |
| 22:14 |
|
bkeeler |
Hallo there colomon |
| 22:14 |
|
moritz_ |
\o/ |
| 22:14 |
|
colomon |
o/ |
| 22:18 |
|
colomon |
lurking here while I show my little guy music videos in a big window. ;) |
| 22:19 |
|
moritz_ |
:-) |
| 22:20 |
|
jnthn |
o/ colomon |
| 22:20 |
|
colomon |
\o |
| 22:21 |
|
* jnthn |
opens up a La Trappe |
| 22:21 |
|
* bkeeler |
praises Belgian beer |
| 22:21 |
|
* bacek |
warming up with morning coffee |
| 22:22 |
|
* bkeeler |
for the 1000th time briefly considers joining a Belgian monestary |
| 22:22 |
|
ajs |
What horrible brokenness would I have to commit to get "Could not find sub &prefix:<[,]>" from "return [,] @ap, <a b c>"?? |
| 22:22 |
|
bacek |
bkeeler, Leffe ftw! |
| 22:22 |
|
colomon |
let the record show he watched five videos before deciding he really needed to be playing with the mouse. ;) |
| 22:23 |
|
isBEKaml |
hi, colomon ! :) |
| 22:23 |
|
jnthn |
ajs: I was just failing to fix that bug. :-/ |
| 22:23 |
|
* moritz_ |
-> bed |
| 22:23 |
|
colomon |
isBEKaml: shouldn't you be in bed? :) |
| 22:23 |
|
ajs |
oh heh |
| 22:23 |
|
colomon |
'night, moritz_ |
| 22:23 |
|
isBEKaml |
colomon: way long past time.. :) |
| 22:23 |
|
ajs |
Is there a better way to flatten lists? |
| 22:23 |
|
ajs |
or at least a working way? ;) |
| 22:23 |
|
isBEKaml |
Nite moritz_ |
| 22:23 |
|
colomon |
jnthn: what's the deal? |
| 22:24 |
|
jnthn |
colomon: Turns out we stick the generated meta-op subs in @BLOCK[0].loadinit(...) |
| 22:24 |
|
jnthn |
colomon: So if we have |
| 22:24 |
|
jnthn |
{ [~] ... }; { [~] ... }; |
| 22:24 |
|
jnthn |
We've a problem. |
| 22:24 |
|
jnthn |
Erm |
| 22:24 |
|
jnthn |
Actually not that |
| 22:24 |
|
jnthn |
If it's namespace. |
| 22:24 |
|
jnthn |
*namespaced |
| 22:24 |
|
jnthn |
class A { [~] used in here }; class B { [~] used in here } |
| 22:25 |
|
ajs |
Ah, so I could write a global list-flattener sub. |
| 22:25 |
|
jnthn |
We only generated the meta-op once |
| 22:25 |
|
ajs |
that'll work for now |
| 22:25 |
|
jnthn |
ajs: Yeah, as a workaround |
| 22:25 |
|
colomon |
jnthn: woah |
| 22:25 |
|
jnthn |
colomon: Then we generate it, mark it as globablly generated in METAOPGEN |
| 22:25 |
|
jnthn |
But of course, it's namespace. :-( |
| 22:25 |
|
colomon |
do we have a test for that? :) |
| 22:25 |
|
jnthn |
Obviously not. |
| 22:25 |
|
jnthn |
I just tried to fix it |
| 22:26 |
|
jnthn |
And failed |
| 22:26 |
|
jnthn |
I figured putting it in @BLOCK[+@BLOCK -1] would do it |
| 22:26 |
|
jnthn |
But we actually get a failure in the setting of all places then! |
| 22:27 |
|
* BrowserUk |
backlogs; comes up empty but raises a glass of Duval in salute to jnthn. & |
| 22:27 |
|
jnthn |
Duval - also a good one. :) |
| 22:28 |
|
bkeeler |
OK, that does it. It's a little early for me, but off to get a glass of Brother David's Trippel |
| 22:28 |
|
jnthn |
BrowserUk: Oh, wait...Duvel or Duval? |
| 22:28 |
|
* colomon |
is starting to feel like should have gone to the party store earlier.... |
| 22:29 |
|
BrowserUk |
But trying tp pour the third (carefully to avoid the sludge) requires patience and practice...............still perfecting my technique, but hey. Practice makes perfect :) |
| 22:29 |
|
jnthn |
colomon: oh...maybe the fail is a bootstrapping/ordering issue. |
| 22:29 |
|
jnthn |
colomon: Maybe metaops.pm needs to come arlier in the bootstrap too. |
| 22:30 |
|
BrowserUk |
jnthn: You are right Duvel. |
| 22:30 |
|
BrowserUk |
(my typing is not good pre-Duvel. |
| 22:31 |
|
BrowserUk |
Nite all. |
| 22:31 |
|
colomon |
o |
| 22:31 |
|
colomon |
o/ |
| 22:31 |
|
|
BrowserUk left #perl6 |
| 22:32 |
|
|
Exodist joined #perl6 |
| 22:33 |
|
jnthn |
.oO( s/pre/post/ ? ;-) ) |
| 22:34 |
|
jnthn |
colomon: Trying out the setting order tweak. |
| 22:34 |
|
colomon |
jnthn+ |
| 22:34 |
|
jnthn |
.oO( what could possibly go wrong ) |
| 22:34 |
|
colomon |
jnthn++ |
| 22:35 |
|
colomon |
.oO(this time for sure!) |
| 22:35 |
|
jnthn |
.oO( Plz I can haz sharper circularity saw for Christmas? ) |
| 22:36 |
|
jnthn |
Grr, that didn't fix it. :-/ |
| 22:37 |
|
colomon |
.oO(I want one of those fancy new ones that shuts off rather than cutting off your hand if you make a logic error....) |
| 22:37 |
|
bkeeler |
jnthn: If you care to merge the 'regex-interpolation' branch in my github fork... |
| 22:37 |
|
bkeeler |
or anyone else who cares to for that matter |
| 22:40 |
|
jnthn |
colomon: Can you remember where we set up != as an alias to !== ? |
| 22:40 |
|
colomon |
in actions.pm? |
| 22:40 |
|
jnthn |
oh, I found it |
| 22:40 |
|
jnthn |
nah, it's in operators.pm |
| 22:41 |
|
jnthn |
...so metaops.pm maybe wants to come before operators.pm in the bootstrap. Hmm. |
| 22:41 |
|
jnthn |
Or maybe those aliases can get booted into metaops.pm. |
| 22:46 |
|
jnthn |
colomon: aha. Fixed. |
| 22:46 |
|
jnthn |
spectesting. |
| 22:50 |
|
ajs |
rakudo: my @a = <1 2 3>;my @b = @a, <4 5 6>; say @b.perl |
| 22:50 |
|
p6eval |
rakudo 1499f2: OUTPUT«["1", "2", "3", "4", "5", "6"]» |
| 22:51 |
|
ajs |
That's perfectly sane |
| 22:51 |
|
ajs |
grr... something is off |
| 22:52 |
|
|
meteorjay joined #perl6 |
| 22:52 |
|
ajs |
In my code I "return @a, <host>" and get [[@a], 'host'] |
| 22:53 |
|
isBEKaml |
ajs: looks like you haven't interpolated your variables. |
| 22:54 |
|
ajs |
interpolated in what sense? |
| 22:54 |
|
isBEKaml |
rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say "@b"; #this.. |
| 22:54 |
|
p6eval |
rakudo 1499f2: OUTPUT«@b» |
| 22:54 |
|
isBEKaml |
rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say @b[]; #this.. |
| 22:54 |
|
p6eval |
rakudo 1499f2: OUTPUT«123457» |
| 22:54 |
|
isBEKaml |
rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say "@b[]"; #this.. |
| 22:54 |
|
p6eval |
rakudo 1499f2: OUTPUT«1 2 3 4 5 7» |
| 22:54 |
|
isBEKaml |
see the quotes there.. :) |
| 22:54 |
|
ajs |
Oh, sorry. I was shorthanding... |
| 22:56 |
|
ajs |
I get [[1,2,3],4] from @a=(1,2,3) when I "return @a, 4" or "my @b = @a, 4" or whatever. |
| 22:56 |
|
ajs |
No, no I figured it out! |
| 22:57 |
|
ajs |
silly me |
| 22:57 |
|
isBEKaml |
:) |
| 22:58 |
|
jnthn |
ajs: It'll not flatten at the point of return, but it should flatten if you put it in list context. |
| 22:58 |
|
jnthn |
ajs: It returns a Parcel, fwiw. |
| 22:58 |
|
ajs |
yeah, my @a contained a list of lists |
| 22:58 |
|
jnthn |
Parcels themselves maintain structure until something makes 'em not |
| 22:58 |
|
jnthn |
Ah, OK. :-) |
| 22:58 |
|
jnthn |
That'd do it too ;-) |
| 22:58 |
|
ajs |
yep ;-) |
| 22:59 |
|
|
whiteknight joined #perl6 |
| 22:59 |
|
|
Psyche^ joined #perl6 |
| 23:00 |
|
|
skangas left #perl6 |
| 23:02 |
|
|
jaldhar joined #perl6 |
| 23:05 |
|
* isBEKaml |
hits the sack. Night, folks (even as it's early morning here) :) |
| 23:05 |
|
lue |
'ello! |
| 23:05 |
|
lue |
night |
| 23:06 |
|
|
whiteknight joined #perl6 |
| 23:07 |
|
bkeeler |
Heya lue |
| 23:13 |
|
dalek |
rakudo: 5cb546e | jonathan++ | (2 files): |
| 23:13 |
|
dalek |
rakudo: Make sure that since we build meta-ops once globally, we install them at the top |
| 23:13 |
|
dalek |
rakudo: of the tree, otherwise we get nasty problems. This uncovered a bootstrapping |
| 23:13 |
|
dalek |
rakudo: issue, so done a little re-ordering. |
| 23:13 |
|
dalek |
rakudo: review: http://github.com/rakudo/rakud[…]5e7bc27610588bd8d |
| 23:23 |
|
lue |
Just curious: If i went insane and tried to convert a .pir file (say in src/builtins) to its equivalent .pm file, would it work/be ok? |
| 23:23 |
|
bkeeler |
bacek: I think the issue is NQP trying proto regexes in a different order. Enabling parse tracing helps a lot |
| 23:23 |
|
bkeeler |
bacek: http://nopaste.snit.ch/20623 |
| 23:23 |
|
lue |
[assuming, of course, everything is done right: changing the makefile appropriately, etc.] |
| 23:24 |
|
bacek |
bkeeler, yes, I suspected it. Any ideas how to fix it? |
| 23:24 |
|
bkeeler |
bacek: I generated parse traces with --hash-seed=2 and =3 and compared them |
| 23:24 |
|
ajs |
rakudo: sub a { return [ <1 2 3>, <4 5 6> ] }; for a() -> $x { say "List: $x" } |
| 23:24 |
|
p6eval |
rakudo 1499f2: OUTPUT«List: 1 2 3 4 5 6» |
| 23:24 |
|
ajs |
did I miss something there? Shouldn't that be List: [1, 2, 3] and List: [4, 5, 6]? |
| 23:25 |
|
bkeeler |
bacek: Possibly your grammar is commiting to an alternative that it shouldn't. I don't have more time right now, but I might be able to look at it more tomorrow |
| 23:25 |
|
bacek |
bkeeler, thanks a lot! |
| 23:26 |
|
bkeeler |
Anyway, I'm out for the evening. See y'all anon |
| 23:26 |
|
ajs |
ciao bkeeler |
| 23:28 |
|
jnthn |
ajs: BTW, 5cb546e fixed that bug you mentioned earlier. |
| 23:28 |
|
jnthn |
(the one with the reduction ops) |