»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by lichtkind on 5 March 2010. |
|||
00:00
masak left,
masak joined,
hatsefla1s joined
|
|||
masak | blr, wobbly neighbournet... | 00:00 | |
lue | blr? | 00:01 | |
00:01
hatsefla1s is now known as hatseflats
|
|||
masak | as in, 'yuck'. :) | 00:01 | |
lue | does the tester have a built in ETOOLONG type situation? | 00:02 | |
masak | no. | ||
you'll have to ^C | |||
lue will now hunt w/ masak for bug | 00:03 | ||
masak might have just found it :/ | |||
yup. | |||
it was yet another instance of RT #73034. | 00:04 | ||
should have seen that one coming... | |||
pushed. try pulling, rebuilding, and running the tests file again. | 00:06 | ||
lue | or just that one test. | 00:07 | |
masak | yeah. | ||
I tried that here, and it doesn't hang anymore. | |||
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! | ||
masak | the `./test-regex 'a**bc' ''` should indeed give 'No match'. | 00:09 | |
it's trying to do '' ~~ /a ** b c/ | |||
00:09
justatheory left
00:11
dual left
00:13
dual joined
00:15
ash_ left
|
|||
lue | how's it going masak? | 00:16 | |
masak | running the tests :) still not past 414. just passed 200, though. | ||
whoa! Segmentation fault | 00:17 | ||
that's been a while. | |||
diakopter | ltns, sigsegv | ||
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. | ||
masak tries the test suite again | |||
getting to be time for me to hit the pods, too. | 00:19 | ||
lue | You have an ex-parrot!? | ||
masak | seems I do. | ||
but on average, Parrot is much less dead nowadays than a year or two ago. | 00:20 | ||
lue | Then 2 things are true about you. | 00:21 | |
00:21
dual_ joined
|
|||
lue | 1) You don't have a Norweigan Blue | 00:22 | |
2) You didn't get it in Bolton | |||
masak | I find no fault in that logic. | ||
lue | Corrolary to 2) You didn't get it in Notlob | 00:24 | |
00:24
dual left
|
|||
lue | .mmorpg(The expansive bed chamber of RD* is ready to receive occupants) | 00:24 | |
masak yawns | 00:25 | ||
just going to see if I can reproduce this segfault, and then go to bed. | |||
if it persists, probably the way to run the other tests is to change the order in which the files are run. | 00:26 | ||
lue | So, today on my P6 checklist is a) begin a P6 created general-purpose utility for dealing with DNA/RNA | 00:27 | |
b)design the layout of the rakudo death star | |||
masak | 'dealing with'? | ||
do you mean handling transcription/translation and their inverse operations? | |||
lue | "decoding/encoding" it, analysis, maybe even a Life Simulator (in the distant future of course) | 00:28 | |
masak | hm, translation is proteins. | ||
Tene | 'night masak | ||
masak | Tene: 'night. if you're here during the weekend, I'll be happy to meet to discuss the Last Mile of Web.pm. | ||
lue | It's scary how DNA, out of all organic matter and processes, relates to programming. (IMO) | ||
masak | aye. DNA is digital. | ||
Tene | lue: www.guardian.co.uk/science/2010/may...-life-form | 00:29 | |
00:29
dual_ left
|
|||
masak | huh. this time, it didn't segfault. that's both good and bad news. | 00:29 | |
Tene | masak: Yes, that would be great. | ||
lue | Tene: I know. It kills me | ||
The Dark Side now can patent the Creation of Life | 00:30 | ||
masak | don't worry. I'm sure there's Prior Art. | ||
lue | c) Profit! | ||
masak: the USPTO tends to patent discoveries. I'm scared. | |||
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. | ||
lue | *gurk* | 00:33 | |
00:33
dual joined
|
|||
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:33 | |
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:35 | |
masak | yay, the tests now run past 415. \o/ | 00:38 | |
lue | \o/ | ||
masak | test 440 fails. | 00:40 | |
that'll be tomorrows riddle to crack. | |||
s/ws/w's/ | 00:41 | ||
lue | goodnight, masak | 00:42 | |
masak | 'night | ||
00:42
masak left
00:43
dual_ joined
00:45
dual left
00:48
dual_ left
00:49
alanhaggai left
00:51
dual joined
00:57
dual left
00:58
huf_ is now known as huf
00:59
justatheory joined
|
|||
BrowserUk | ? | 01:07 | |
01:07
BrowserUk left
|
|||
lue | ?? | 01:10 | |
01:17
justatheory left
01:19
rgrau` joined
|
|||
pmichaud | ?! | 01:19 | |
01:19
rgrau left
01:21
Patterner left,
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
TimToady | . | 01:22 | |
Trashlord | yeah | 01:24 | |
lue hears crickets | 01:29 | ||
01:30
plobsing joined,
am0c left
01:40
seatek joined
01:48
eternaleye joined
|
|||
colomon | ?? !! | 01:54 | |
01:57
wknight8111 left
01:58
[mark] joined
01:59
meppl left
|
|||
diakopter | : | 02:05 | |
lue | ~~ | 02:10 | |
rakudo: multi sub infix:<^.^>($a, $b){say "$a $b happy";}; 3 ^.^ 4 | |||
p6eval | rakudo 6a7ded: OUTPUT«3 4 happy» | 02:11 | |
lue | .u dna | 02:15 | |
phenny | lue: Sorry, no results for 'dna'. | ||
lue | .u helix | ||
phenny | lue: Sorry, no results for 'helix'. | ||
lue | Unicode gives me an entire deck of cards, but no DNA symbol? Weird... | 02:16 | |
02:18
Exodist joined
|
|||
diakopter | .u pair | 02:20 | |
phenny | U+21C8 UPWARDS PAIRED ARROWS (⇈) | ||
diakopter | .u diam | 02:23 | |
phenny | U+2300 DIAMETER SIGN (⌀) | ||
diakopter | .u diamo | ||
phenny | U+25C6 BLACK DIAMOND (◆) | ||
lue | .u ace | 02:24 | |
phenny | lue: Sorry, no results for 'ace'. | ||
lue | .u card | ||
phenny | lue: Sorry, no results for 'card'. | ||
isBEKaml | .u double | 02:43 | |
phenny | U+29FA DOUBLE PLUS (⧺) | ||
isBEKaml | .u urn | ||
phenny | U+26B1 FUNERAL URN (⚱) | ||
02:44
snarkyboojum joined
|
|||
isBEKaml | .u symbol | 02:44 | |
phenny | U+2136 BET SYMBOL (ℶ) | ||
isBEKaml | .u beta | ||
phenny | U+03D0 GREEK BETA SYMBOL (ϐ) | ||
isBEKaml | .u bet | ||
02:44
am0c joined
|
|||
phenny | U+2136 BET SYMBOL (ℶ) | 02:44 | |
02:48
alester joined
02:57
k23z__ left
02:59
jjore left
03:00
gbacon joined
|
|||
dalek | psi: 1e6efbb | masak++ | .gitignore: [.gitignore] added |
03:09 | |
yapsi: 6a5a68e | masak++ | (2 files): | |||
yapsi: [Yapsi] blocks now return | |||
03:09
dalek left
03:10
dalek joined
|
|||
dalek | november: d6cd2f8 | (Jason Felds)++ | skins/CleanAndSoft/register (3 files): | 03:10 | |
november: Start of registration pages. Copied from login. | |||
03:10
dalek left
03:11
dalek joined
|
|||
lue | o no not again | 03:11 | |
dalek | ok: 0bc215d | (Hinrik Örn Sigurðsson)++ | (4 files): Fixed problem with -l/--locate, added test for it |
03:13 | |
ok: c06849e | (Hinrik Örn Sigurðsson)++ | (4 files): Look up the man pages. Depend on Perl6::Doc 0.42 |
|||
ok: 8cf5c68 | (Hinrik Örn Sigurðsson)++ | (9 files): Bump version to 0.16_02 |
|||
ok: 3454ac2 | (Hinrik Örn Sigurðsson)++ | Changes: Make the Changes file historically accurate |
|||
grok: 056121c | (Hinrik Örn Sigurðsson)++ | (4 files): | |||
grok: Small Pod fixes | |||
03:14
Chillance left
|
|||
dalek | ok: 8e36bf7 | moritz++ | src/classes-and-objects.pod: grammar fix pointed out by diakopter++ |
03:14 | |
03:15
JimmyZ joined
|
|||
lue | Are we supposed to get grok? | 03:15 | |
dalek | vember: 1c9a598 | (Jason Felds)++ | lib/November.pm: Quickie one-liner from login useful in register. |
03:17 | |
03:24
stephenlb left
|
|||
pugssvn | r30746 | svatsan++ | [u4x] render.pl - removed unnecessary module and minor cleanups | 03:33 | |
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)» | ||
isBEKaml | rakudo: my $sq = -> $x { $x * $x }; say $sq(22); | ||
p6eval | rakudo 6a7ded: OUTPUT«484» | ||
isBEKaml | rakudo: my $sq = -> $x { $x * $x }; say $sq(1..10); | 04:01 | |
p6eval | rakudo 6a7ded: OUTPUT«100» | ||
isBEKaml | rakudo: my $sq = -> $x { $x * $x }; say $sq(1..^10); | ||
p6eval | rakudo 6a7ded: OUTPUT«81» | ||
isBEKaml | rakudo: my $sq = -> $x { $x * $x }; say $sq(^10); | ||
p6eval | rakudo 6a7ded: OUTPUT«100» | ||
04:05
[particle] left
04:41
envi^home joined
04:52
alester left
05:11
am0c left
05:15
justatheory joined
05:36
am0c joined
05:37
[particle] joined
05:38
eternaleye left
05:40
lue left
05:41
lue joined
05:47
eternaleye joined
05:55
gbacon left
05:58
am0c left
05:59
Juerd left,
Juerd joined
06:05
jakk joined,
Targhan left
06:07
jakk left
06:33
justatheory left
06:43
TiMBuS joined
|
|||
eternaleye | (backlogging) bbkr, might Quill be parsing the Q as the quote meta? | 06:56 | |
06:59
Su-Shee joined
|
|||
TiMBuS | how do you check match results in current rakudo head? using $0 will fail if there was no match. | 07:37 | |
moritz_ | if $/ { } | ||
TiMBuS | that makes sense | ||
07:37
iblechbot joined
|
|||
TiMBuS | is it supposed to fail or is it just not implemented correctly yet? | 07:38 | |
moritz_ | NYI | ||
TiMBuS | that's ok then. thanks | ||
pugssvn | r30747 | moritz++ | [S03] s/shaped/nested/ when talking about auto-recursive hyper ops | 07:41 | |
dalek | kudo: 9a15b82 | moritz++ | src/old/ (87 files): remove src/old/. |
07:43 | |
isBEKaml | [OT]: www.ibm.com/developerworks/library/...;S_CMP=HP. This is the most reasonable argument in favour of opensource I've ever read. :) | 07:44 | |
moritz_ | rakudo: say $/.Bool | 07:47 | |
p6eval | rakudo 6a7ded: OUTPUT«0» | ||
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)» | ||
moritz_ | rakudo: say $/.PARROT | 07:50 | |
p6eval | rakudo 6a7ded: OUTPUT«» | ||
moritz_ | rakudo: say $/.perl | ||
p6eval | rakudo 6a7ded: OUTPUT«Any» | ||
07:50
cls_bsd left,
cls_bsd joined
|
|||
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)» | ||
moritz_ | rakudo: say Any.list | ||
p6eval | rakudo 6a7ded: OUTPUT«Any()» | ||
moritz_ | rakudo: say Any.list.perl | 07:51 | |
p6eval | rakudo 6a7ded: OUTPUT«(Any, )» | ||
07:51
cls_bsd left
07:55
cls_bsd joined
|
|||
pugssvn | r30748 | moritz++ | [u4x/web] fix a syntax error | 07:55 | |
07:56
cls_bsd left
08:00
cls_bsd joined
08:01
cls_bsd left
08:05
cls_bsd joined
|
|||
moritz_ | I havve a patch for $0... that now produces a different error :/ | 08:05 | |
rakudo: $/.list.[0] | |||
p6eval | rakudo 6a7ded: ( no output ) | ||
moritz_ | rakudo: say $/.list.[0] | ||
p6eval | rakudo 6a7ded: OUTPUT«Any()» | 08:06 | |
08:06
cls_bsd left
08:10
cls_bsd joined
08:11
cls_bsd left
|
|||
isBEKaml | oops... :(, isBEKaml-- | 08:12 | |
moritz_ | no problem | ||
08:15
cls_bsd joined
|
|||
moritz_ | somebody please confirm my sanity: 3[0] should be 3, 3[1] should be Nil, right? | 08:19 | |
I'm about to implement that in Rakudo, and get lots of tests failing that seem to indicate otherwise | |||
m6locks | rakudo: say 3[1] | ||
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
|
|||
moritz_ | ah well, my patch produces Any instead of Nil | 08:24 | |
still, it's a start | 08:25 | ||
08:26
nnhi left
|
|||
m6locks | :3 | 08:29 | |
spinclad | i wouldn't expect 3 to have Positional parts (or Associative for that matter) | 08:33 | |
moritz_: ^ | 08:34 | ||
moritz_ | spinclad: well, it's TimToady's decree that everything should be usable like a List | ||
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 | ||
spinclad | so yes, 3[1] would be Nil to mark EOL. | 08:38 | |
(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 | ||
spinclad | rakudo: say [3, Nil].perl; say [3, Nil, 2].perl | ||
p6eval | rakudo 6a7ded: OUTPUT«[3][3, 2]» | ||
spinclad | rakudo: say [3, Nil][1].perl | 08:40 | |
p6eval | rakudo 6a7ded: OUTPUT«Proxy.new()» | ||
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 | ||
uohm | |||
my $thing = { a => 1} | 08:43 | ||
say $thing[0] | |||
what should that produce? | |||
spinclad | rakudo: say (3, Nil).perl | ||
moritz_ | a Pair? | ||
p6eval | rakudo 9a15b8: OUTPUT«(3, ())» | ||
spinclad | rakudo: say (3, Nil)[1].perl | ||
p6eval | rakudo 9a15b8: OUTPUT«()» | ||
spinclad | rakudo: say (3, Nil)[2].perl | ||
p6eval | rakudo 9a15b8: OUTPUT«Any» | ||
spinclad | (EOL is called Empty, i think?) | 08:44 | |
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)» | ||
spinclad | rakudo: my $thing = { a => 1 }; say $thing.pairs.[0] | ||
p6eval | rakudo 9a15b8: OUTPUT«a 1» | ||
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:48 | |
rakudo: for (3, Nil) { .say } | 08:49 | ||
p6eval | rakudo 9a15b8: OUTPUT«3» | ||
spinclad | rakudo: for (3, Nil, 2) { .say } | ||
p6eval | rakudo 9a15b8: OUTPUT«32» | ||
08:51
dalek left
|
|||
spinclad -> bed o/ | 08:52 | ||
08:52
meppl joined
08:54
dalek joined
09:04
silug left
09:25
kel__ joined
09:29
Jedai joined
09:48
wknight8111 joined,
ethel left
09:59
agentzh joined
10:21
masak joined
|
|||
masak | it's weekend! \o/ | 10:22 | |
m6locks | party tiem | 10:24 | |
colomon | o/ | 10:25 | |
masak celebrates by finding the next bug in GGE | |||
10:41
rgrau_ left
10:46
molaf joined
10:51
BrowserUk joined
|
|||
BrowserUk | ? | 10:54 | |
moritz_ gives match objects another shot | 10:55 | ||
time to rebase another branch... | 10:56 | ||
when I have a long-lived topic branch, should I merge from master from time to time? | |||
currently I rebase, and then use a new branch name | 10:57 | ||
which is why there are mob2, mob3 and mob4 on github... | |||
... now only mob4 :-) | |||
\o/ suddenly stuff works | 10:58 | ||
the 'mob5' branch handles named captures without evil workarounds | 10:59 | ||
... as long as they are not quantified :/ | |||
masak | there's not much of 'should' in the possible git workflows themselves. | 11:00 | |
and I'm not sure I know how to argue for one model or the other. | |||
moritz_ | is there something like "best practise" | ||
if somebody else tracks my branches, giving them new names every few weeks is certainly confusing | |||
masak | apart from "don't push/rebase/push", I don't know. | 11:01 | |
maybe ask on #git? | |||
11:01
gbacon joined
|
|||
moritz_ | maybe googling a bit first :-) | 11:01 | |
masak does that | |||
'Rebasing and mergin: some git best practices' lwn.net/Articles/328436/ | 11:02 | ||
11:03
rgrau joined
|
|||
masak | 'A successful Git branching model' nvie.com/git-model | 11:03 | |
11:04
salmonix_ joined
|
|||
moritz_ hates the "Method '$meth' not found for invocant of class ''" errors | 11:07 | ||
11:08
agentzh left
|
|||
masak | they have something to do with the type objects. | 11:08 | |
moritz_ | rakudo: say Array.new.perl | ||
p6eval | rakudo 9a15b8: OUTPUT«[]» | ||
masak | I'm currently trying to squash a bug in which an array of Ints suddenly magically contains a GGE::Match object. | 11:09 | |
11:10
salmonix_ left
|
|||
masak | I find the whole thing very worrying. | 11:10 | |
moritz_ | understandable | ||
colomon | I'm currently trying to do a lexicographical compare on two arrays of numbers and failing badly. | 11:11 | |
oooo.... just occurred to me that I should probably prototype in normal code, considering how "say" no longer works in the setting... | |||
moritz_ | what's so hard about it? | ||
rakudo: say [1, 2, 3] cmp [1, 0, 3] | |||
p6eval | rakudo 9a15b8: OUTPUT«1» | 11:12 | |
moritz_ | rakudo: say [1, 2, 3] cmp [1, 4, 3] | ||
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
colomon | moritz_: I didn't think there was anything hard, but my code is failing badly. | ||
moritz_ | colomon: why not juse use cmp? | ||
colomon | orly? | ||
no one ever told me cmp did that? | |||
moritz_ | rakudo: say [1, 2] cmp [1, 2, 3] | ||
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
moritz_ | rakudo: say [1, 2, 3] cmp [1, 2] | ||
colomon | are you sure it does, actually? | ||
p6eval | rakudo 9a15b8: OUTPUT«1» | ||
Su-Shee | I don't understand the output. | ||
colomon | rakudo: say [111, 2] cmp [2, 3, 4] | 11:13 | |
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
11:13
silug joined
|
|||
moritz_ | rakudo: say 111 cmp 2 | 11:13 | |
p6eval | rakudo 9a15b8: OUTPUT«1» | ||
moritz_ | rakudo: say 1 cmp 2 | ||
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
moritz_ | cmp needs fixing | ||
colomon | moritz_: I don't think cmp does what you think it does.... | ||
moritz_ | it should compare numbers numerically | ||
colomon | moritz_: it does | ||
moritz_ | Su-Shee: which part don't you understand? | ||
colomon | but it compares arrays by string. | 11:14 | |
moritz_ | oh. | ||
should it? | |||
Su-Shee | moritz_: does it return yes/no or the position of what's different or how many elements are the same or not..? | ||
colomon | well, you just now is the first I ever heard that it should compare arrays lexicographically. | ||
but that doesn't mean you are wrong. | 11:15 | ||
moritz_ | Su-Shee: it's three-way comparsion | ||
11:15
slavik joined
|
|||
moritz_ | Su-Shee: and returns smaller, same or greater | 11:15 | |
Su-Shee | oh, I thought it compares element by element. | ||
moritz_ | rakudo: say (1, 2, 3) »cmp«(1, 0, 5) | 11:16 | |
p6eval | rakudo 9a15b8: OUTPUT«01-1» | ||
colomon | moritz_: I don't see anything in the spec about cmp working intelligently on lists/arrays. | 11:17 | |
but I may be missing something. | |||
moritz_ | oh, it might be very well that I'm wrong, or the spec is incomplete, or both | ||
TimToady: any thoughts? | 11:18 | ||
quick question on src/core/Array.pm lines 20 to 23... why does it fill up to $i+1, not up to $i? | 11:20 | ||
afk, lunch etc (will backlog) | 11:21 | ||
colomon | moritz_: I think because it doesn't matter if you fill extra? | ||
which is a non-answer answer.... | |||
but then, I thought that code wasn't currently being used, and is scheduled to be rewritten. | 11:22 | ||
11:25
FreeStorm joined
|
|||
colomon | moritz_: turns out the correct answer is that my lexicographical code was working fine, but its support code was broken. | 11:28 | |
11:29
wknight8111 left
|
|||
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)» | ||
colomon | rakudo: say [||] 0, 0, -1, 1, 0 | ||
whoops | |||
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
colomon | ack, I love p6! | ||
rakudo: say [||] 0, 0, -1, -3, 255 | 11:32 | ||
p6eval | rakudo 9a15b8: OUTPUT«-1» | ||
11:38
[Coke] left
11:42
BrowserUk left
|
|||
dalek | meta: r293 | pawelmurias++ | trunk/Sprixel/t/parse_bug2.t: test for a parsing bug |
11:45 | |
11:46
[mark] left
|
|||
isBEKaml | I don't understand self!fill in Array.pm - where's it defined? | 11:46 | |
is that a private sub in there? | 11:47 | ||
colomon | isBEKaml: it's defined in Array.pir, I believe. Or possibly Seq.pir | ||
11:48
pmurias joined
|
|||
isBEKaml | colomon: I'm looking at Seq.pir, since I don't find it in Array.pir | 11:48 | |
pmurias | diakopter: hi | ||
colomon | isBEKaml: Seq.pir, line 118. (ack is your friend. ;) | 11:49 | |
11:49
[Coke] joined
|
|||
isBEKaml | colomon: aye, sir. but I don't have ack, I use find and fgrep. :) | 11:50 | |
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 | :) | ||
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. | ||
pmurias | masak: if $a = 42 {...} | ||
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. | ||
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. | ||
masak | colomon: what are the reasons for hating Seq? I don't think I've had much exposure to it. | 12:00 | |
but I definitely think there is an undue proliferation of almost-similar types in that area. | |||
isBEKaml | colomon: Oh, I see... | ||
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. | ||
mathw | Hey | ||
pmurias | masak: if my $a = 42 {...} is a thing i use regularly | 12:06 | |
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? | ||
isBEKaml: me too. | |||
pmurias | masak: literal no | ||
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. :) | ||
pmurias | if'ing for an literal doesn't seem very sensible | ||
masak | pmurias: well, hence the high probability of a thinko. | 12:10 | |
slavik | how can I make an iterator for a list? | ||
colomon | loliblogged: justrakudoit.wordpress.com/2010/05/...-numerics/ | ||
isBEKaml | masak: if ( my $a == 42) # I prolly won't make that mistake if we need parens here.. | ||
slavik | is it: $blah <== @list ? | ||
masak | pmurias: I sense some slight talking at cross purposes here. you do realize that sigmung finds possible thinkos? | ||
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? | ||
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 | ||
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. | ||
masak | isBEKaml: more cross purposes. this conversation needs to slow down a bit. :) | 12:14 | |
maybe we should talk in full sentences via nopaste instead. | |||
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 | ||
masak | pmurias: yeah. | ||
granted, it could evolve into a Critic too. | |||
pmurias | * Perl::Critic | ||
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 | ||
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. | ||
pmurias: yes. I'll explicitly leave that to someone else, though. the Padre people, maybe. | |||
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? | ||
masak | aye. and a vim user. | 12:18 | |
I also use Perl 5, Perl 6, Python and Ruby. :) | |||
pmurias | masak: you use viper? | 12:19 | |
masak | no. | ||
I tend to avoid hybrids. | |||
isBEKaml | masak: if you're an emacs user, you could write up a plugin for that using elisp? | ||
masak | perhaps. | ||
isBEKaml | I don't use emacs, so I don't know. (vim user) | ||
masak | well, it's certainly possible. | ||
I'm still not terribly good at Elisp. | 12:20 | ||
and I don't use Emacs for programming much. | |||
mostly for prose. | |||
isBEKaml | I'm not good at vimscript either. | ||
slavik | rakudo: say $*IN.WHAT | ||
p6eval | rakudo 9a15b8: OUTPUT«IO()» | ||
slavik | dang it | 12:21 | |
masak | slavik: how so? | ||
slavik | rakudo: my $a = 1..10; say $a.WHAT; | ||
p6eval | rakudo 9a15b8: OUTPUT«Range()» | ||
slavik | masak: ? | ||
masak | slavik: why 'dang it' on that result? | ||
seems perfectly fine to me. | |||
12:22
carlin joined
|
|||
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? | ||
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)» | ||
masak | slavik: prefix:<=> is dead, long live .get | 12:25 | |
isBEKaml | rakudo: my $a = 1..10; for $^a { .say } | ||
p6eval | rakudo 9a15b8: OUTPUT«12345678910» | ||
masak | o.O | ||
masak submits rakudobug | |||
slavik | masak: so ... it's $*IN.get ? | ||
masak | slavik: for one line, yes. | ||
slavik: but for many lines, you want .lines | |||
slavik | masak: just learning what the new (while (<>)) would look like ;) | 12:26 | |
isBEKaml | masak: bug? :O | ||
masak | rakudo: my $a = 42; say $^a | ||
p6eval | rakudo 9a15b8: OUTPUT«42» | ||
masak | std: my $a = 42; say $^a | ||
p6eval | std 30748: OUTPUT«===SORRY!===Placeholder 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» | ||
masak | alpha: my $a = 42; say $^a | ||
p6eval | alpha 30e0ed: OUTPUT«42» | ||
masak | huh. | ||
slavik: for lines($*ARGFILES) { ... } | 12:27 | ||
isBEKaml | masak: doesn't look like a bug to me. I think of ^ as a limiting operator here. | 12:28 | |
masak | isBEKaml: sure, if you use it before the dollar. | 12:29 | |
isBEKaml: after, it's a twigil. | |||
12:29
alanhaggai_ joined
|
|||
isBEKaml | rakudo: my $temp = 5; for $^temp { .say } | 12:29 | |
p6eval | rakudo 9a15b8: OUTPUT«5» | ||
masak | rakudo: my $temp = 5; for ^$temp { .say } | ||
p6eval | rakudo 9a15b8: OUTPUT«01234» | ||
masak | that's the difference. | ||
isBEKaml | masak: yes, I defined $temp to be a range here. | ||
rakudo: my $temp = 0 .. 5; for $^temp {.say } | 12:30 | ||
masak | no, you didn't. it's an Int. | ||
p6eval | rakudo 9a15b8: OUTPUT«012345» | ||
masak | isBEKaml: do you believe me when I claim that you're slightly confused about this? | ||
isBEKaml: I'll be happy to set you straight, though. | |||
isBEKaml | masak: I'm always confused. ;) | ||
masak | isBEKaml++ # excellent starting point | 12:31 | |
12:31
alanhaggai_ left
|
|||
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 { ... }` | ||
that's the range you're talking about. $variable is numified and used as the exclusive-upper point of a range starting at 0. | |||
TimToady referred to prefix:<^> as 'upto' the other day. | 12:32 | ||
a 'twigil', or a 'secondary sigil' is something that comes after a sigil (one of $ @ % & ::) | |||
twigils usually denote different scoping of some kind. | 12:33 | ||
for example $!attr and $.meth denote object has-scoping. | |||
and $*contextual denote some dynamic scoping. | |||
slavik | $.meth makes no sense ... $.makemeth on the other hand ... does | ||
:) | 12:34 | ||
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 | |
isBEKaml: a bit like `sort { $a <=> $b }` in Perl 5. | |||
isBEKaml: in Perl 6, you'd write `sort { $^a <=> $^b }`, which is sugar for `sort -> $a, $b { $a <=> $b }` | 12:36 | ||
i.e. a block with two parameters $a and $b. but with $^a and $^b, you don't have to declare them as such. | |||
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. | ||
most likely it's a typo for `for ^$range { ... }` | |||
12:38
Su-Shee left
|
|||
isBEKaml | masak++ # twigils and range limit operator | 12:39 | |
masak: Now, I definitely agree there has to be some sort of a gotcha here by the p6 compiler to notify the programmer. | |||
masak | isBEKaml: you're lucky to be here in 2010 so you get the long answer. :) | ||
isBEKaml: in 2015, we'll have to dole out FAQ URLs instead. | |||
isBEKaml | masak: I'm lucky I got in early! ;) | 12:40 | |
masak | yup. | ||
isBEKaml | rakudo: my $temp = { $^x * $^x }; say $temp(42); | 12:41 | |
p6eval | rakudo 9a15b8: OUTPUT«1764» | ||
isBEKaml | yay for twigils! :) | ||
masak | S02 has the story. | ||
and probably S06, a bit. | |||
isBEKaml | masak: I still haven't gone through it fully... too much detail, too much distraction :( | 12:42 | |
masak | know the feeling. :/ | ||
you will, eventually. | |||
rakudo: my $a = sub { say $^a + $^a }; $a(4) | |||
p6eval | rakudo 9a15b8: OUTPUT«8» | ||
masak | rakudo: my $a = sub { say $^a + $^a }; $a(4, 5) | ||
p6eval | rakudo 9a15b8: OUTPUT«Too many positional parameters passed; got 2 but expected 1current instr.: '_block48' pc 329 (EVAL_1:33593300)» | ||
masak | ah, closing rt.perl.org/rt3/Ticket/Display.html?id=73106 | 12:43 | |
isBEKaml | rakudo: my $temp = { $^b + $^c }; say $temp(23, 45); | ||
p6eval | rakudo 9a15b8: OUTPUT«68» | ||
isBEKaml | twigils can bind themselves to anything? this looks a lot like closures... | 12:44 | |
masak | well, they are closures. | ||
they bind themselves to the innermost surrounding block. | |||
12:44
BrowserUk joined
|
|||
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... | ||
masak | which is why $a is a synonym for $^a after the latter has been used once. | ||
isBEKaml: a closure is simply a block that retains information about its surrounding environment. | 12:46 | ||
isBEKaml | rakudo: my $temp = { say $^b; $^c ** 2 }; say $temp(23, 'String') | 12:47 | |
p6eval | rakudo 9a15b8: OUTPUT«230» | ||
masak | rakudo: sub iter-gen() { my $c = 0; return { $c++ } }; my $i = iter-gen(); .say for $i(), $i(), $i() | ||
p6eval | rakudo 9a15b8: OUTPUT«012» | ||
isBEKaml | rakudo: my $temp = { say $^b; say $^c ** 2 }; say $temp(23, 'String') | ||
p6eval | rakudo 9a15b8: OUTPUT«2301» | ||
isBEKaml | rakudo: my $temp = { say $^b; say $^c ** 2 }; $temp(23, 'String') | 12:48 | |
p6eval | rakudo 9a15b8: OUTPUT«230» | ||
masak | here, the closure is { $c++ }. it retains a binding to the $c, declared in the 'iter-gen' sub. | ||
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. | |||
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 | ||
but anyway, that's closures. they 'close' over a surrounding environment, keeping references to some variables which would otherwise have gone out of scope. | |||
in many ways, they have the aspects of very light-weight objects. | 12:50 | ||
isBEKaml | masak++ # closures-in-detail | 12:51 | |
12:51
carlin left
|
|||
masak | I seem to be in Tutor Mode today. :P | 12:51 | |
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... :( | ||
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. | ||
isBEKaml | masak: Very relevant. "When a closure is not a closure" | 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. | ||
which probably means I should keep chunking up until the concepts are few enough to fit. :) | 12:56 | ||
(and no, 'chunking up' is not a drug euphemism, it's an NLP term. 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 | ||
:D | |||
masak: don't bother explaining euphemisms. Non-native here. :) | 13:02 | ||
masak | hey, me too. I'm just a silly Swede. | ||
isBEKaml | masak: Btw, that quote from S04 says: "Keep it small, keep it close" :D | ||
masak likes that quote | 13:03 | ||
isBEKaml | and I, a confused Indian. ;) | ||
masak | ah, Bharato. | 13:04 | |
isBEKaml | Bharat, yeah. (internal name among ourselves, like Nippon to Japanese ) | ||
jnthn | o/ | 13:05 | |
masak | jnthn! | ||
isBEKaml | yo, jnthn ! | ||
jnthn | мэсак!! | ||
masak | 'Bharato' is the name sometimes used instead of 'Hindio' by politically-aware Esperantists. | ||
:) | |||
I haven't heard anyone use 'Nipono', though. | 13:06 | ||
though some say 'Suomo' rather than 'Finnlando'. | |||
Suomio* | 13:07 | ||
isBEKaml | suomi! | ||
jnthn | I heard their language is hard to finnish learning. | ||
masak | -Opun | 13:08 | |
Finnish is said to be very grammatically pleasing, actually. | |||
isBEKaml | Finnish won't finish learning their language! | ||
masak | Perl6ers won't finnish their language... :) | ||
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 | |
iiuc, there's lots of cases. But, well, those are OK. :-) | |||
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:10 | |
jnthn | Wow. :-) | 13:11 | |
isBEKaml | :) | 13:12 | |
masak | [citation needed] | ||
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 | ||
thread get to see the value of $x? | |||
masak | ETOOLONG | ||
jnthn | masak: It's the Lund Carnival today | ||
masak | ENOCOLON | ||
jnthn | masak: Feels like a bit of a DDoS of the city. :-) | ||
masak | :P | ||
jnthn | But kinda fun too. | 13:13 | |
pmichaud | good morning, #perl6 | ||
jnthn | :-) | ||
masak | pmichaud! \o/ | ||
jnthn | moritz_, pmichaud | ||
oh | |||
*morning | |||
pmichaud | (closures): nqp has working closures, even if rakudo doesn't at the moment :-) | ||
masak | good moritz_ :) | ||
jnthn | wtf, I tried to tab-complete "morning" | ||
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. | ||
masak | ESTILLNOCOLON | ||
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. | ||
phenny | BrowserUk: I'll pass that on when ruoso is around. | ||
masak | jnthn: clearly we need to invite someone called 'morning' to the channel. :P | 13:14 | |
13:14
isBEKaml is now known as morning
|
|||
morning | :D | 13:14 | |
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? | ||
phenny | BrowserUk: I'll pass that on when ruoso is around. | ||
morning | uhh... | ||
morning pmichaud | |||
ah, that's better! ;) | |||
13:16
morning is now known as isBEKaml
|
|||
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() | ||
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)» | ||
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()) | ||
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)» | ||
jnthn | pmichaud: I was tempted to fix it but then thought you may have a reason. | ||
pmichaud | nqp: sub itergen() { my $c := 0; return { $c++ } }; my $x := itergen(); my $y := itergen(); say($x(), $y()); say($x()); say($x()) | ||
p6eval | nqp: OUTPUT«0012» | ||
jnthn | nqp: my $oh-noes = "doesn't work"; | ||
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)» | ||
jnthn | nqp: my $oh-noes := "doesn't work"; | ||
p6eval | nqp: OUTPUT«Multiple Dispatch: No suitable candidate found for 'subtract', with signature 'PPP->P'current instr.: '_block11' pc 0 (EVAL_1:4)» | ||
pmichaud | jnthn: yeah, I need to think about that (and what it might mean for translating to an underlying vm) | 13:18 | |
nqp: sub itergen() { my $c := 0; return { $c++ } }; my $x := itergen(); my $y := itergen(); say($x(), $y()); say($x()); say($x()); say($y()); | |||
p6eval | nqp: OUTPUT«00121» | ||
pmichaud | yay for working closures (in nqp) | ||
jnthn | \o/ | ||
pmichaud: How's the context PAST node coming along? | |||
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. | ||
pmichaud | jnthn: I've primarily been working on REPL | ||
I'm almost done | |||
jnthn | Oh, cool. \o/ | ||
pmichaud | we now have this, though: | ||
pmichaud@orange:~/nqp-rx$ ./nqp | |||
> 3+4 | |||
7 | |||
> | |||
(note: no "say()") | 13:20 | ||
jnthn | > say 3 + 4 # what does this do? | ||
pmichaud | however, if you explicitly print something, the return value isn't printed | ||
jnthn | OK, cool. | ||
pmichaud | pmichaud@orange:~/nqp-rx$ ./nqp | ||
> say(3+4); 5+7; | |||
7 | |||
> | |||
masak | someone should write up a HLL which can run the snippets in this old April Fools interview: www.perl.com/pub/a/2001/04/01/parrot.htm | ||
jnthn | > sub foo() { say 42 }; foo(); | ||
pmichaud | > sub foo() { say(42); }; foo(); | 13:21 | |
42 | |||
jnthn | .oO( lol, using pmichaud++ as a repl ) |
||
masak | :D | ||
BrowserUk wonders if he's the only one who finds the lack of definitiveness in the SOs more than vaguely disconcerting? | |||
pmichaud | > sub foo() { 42 }; foo(); | ||
42 | |||
jnthn | .oO( Save Our Synopses ) |
||
masak | 'SOs'? | ||
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
|
|||
masak | BrowserUk: what helps most is if you air your disconcertedness in the form of questions here on-channel. | 13:23 | |
13:23
protorom left,
protorom joined
|
|||
masak | some types of lack of definitiveness are actually the Sxx documents just being scattered due to the way they were written. | 13:23 | |
some things are indeed inconsistent, contradictory or not-specified-enough. we're always on the lookout for those things. | 13:24 | ||
S09 was brought up as something the other day that'll probably undergo review as soon as someone starts implementing it. | |||
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
protorom left
|
|||
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:29 | |
masak | BrowserUk: nod. | 13:30 | |
BrowserUk: what would be really useful, but will probably be quite hard, is if someone wrote "real code" on the current S09. | |||
to sort of shake out the uncertainties. | |||
colomon | jnthn: (backlogging) Seems like once or twice a day I try to tab-complete a normal (but long) word here. :) | ||
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. | ||
I'm guessing (hoping) that SO9 is probably one of the worst in this respect due to the nature of what it covers. | 13:32 | ||
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 | |
13:34
redicaps joined
|
|||
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. | ||
isBEKaml | Those solid synopses are what I'm trying to read, unsuccessfully, over the past couple of weeks... | 13:36 | |
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. | |||
masak | isBEKaml: what really helped for me was to use Rakudo and actually write stuff. | ||
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. | ||
isBEKaml | I have just temporarily put an hold on that pursuit until I gain more into S02 until S04... | 13:40 | |
13:41
FreeStorm is now known as FreeStorm_wTV
|
|||
isBEKaml | You see, coding up those in confused state is the last thing we all want... :) | 13:42 | |
pmichaud | S08 is wrong. :-) | ||
isBEKaml | pmichaud++ ## he's definite, here.. :-) | ||
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:44 | |
13:45
molaf left
|
|||
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:45 | |
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:46 | |
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. | |||
masak | good. I think we're all walking on eggshells. :) | ||
moritz_ tramples over broken eggshells | |||
pmichaud plasters over the broken eggshels | |||
isBEKaml looks for eggshells! :-) | 13:48 | ||
pmichaud | "new coat of paint, and everything is fine!" | ||
BrowserUk looks at the bulge in the carpet and and wonders if anyone else notices it :) | 13:49 | ||
isBEKaml | .u phone | 13:50 | |
phenny | isBEKaml: Sorry, no results for 'phone'. | ||
isBEKaml | .u ☎ | 13:51 | |
phenny | U+260E BLACK TELEPHONE (☎) | ||
isBEKaml | there... :| | ||
.u tele | 14:00 | ||
phenny | U+2121 TELEPHONE SIGN (℡) | ||
isBEKaml | .u bl | ||
phenny | U+2712 BLACK NIB (✒) | ||
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. | ||
moritz_ | hugme: add freestorm to irclog | 14:09 | |
hugme | moritz_: sorry, I don't know anything about project 'irclog' | ||
moritz_ | hugme: add freestorm to ilbot | ||
hugme hugs freestorm. Welcome to ilbot! | |||
14:15
jakk joined
14:16
finanalyst joined
|
|||
finanalyst | hello everyone | 14:24 | |
moritz_ | hi | ||
pmurias | BrowserUk: i use the book "Erlang Programming" for learning erlang | ||
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 | ||
finanalyst | thanx that works | 14:26 | |
is it a known bug? | |||
isBEKaml | finanalyst: what? | ||
masak | finanalyst: yes. | 14:27 | |
a quite quirky one. | |||
isBEKaml | rakudo: my @list = <tom dicken harry>; say @list[$_] for 0..+@list; | ||
p6eval | rakudo 9a15b8: OUTPUT«tomdickenharry» | ||
finanalyst | isBEMaml: inside a loop the index is considered type Num, but it should be Int. | ||
isBEKaml: does not always happen | 14:28 | ||
rakudo: for 1 .. 4 { say $_.WHAT } | |||
p6eval | rakudo 9a15b8: OUTPUT«Int()Int()Int()Int()» | ||
masak | rakudo: say <a b c d>[2.0] | ||
p6eval | rakudo 9a15b8: OUTPUT«c» | 14:29 | |
masak | and it doesn't always produce an error. | ||
that's the quirky part. | |||
isBEKaml | o.O | ||
lue | goood morning! | 14:30 | |
isBEKaml | btw, why does +@list append a new line to the end of output? | 14:31 | |
rakudo: say $_ for 0..3; | |||
p6eval | rakudo 9a15b8: OUTPUT«0123» | ||
isBEKaml | rakudo: my @list = <tom dicken harry>; say $_ for 0..+@list; say @list[$_] for 0..+@list; | 14:32 | |
p6eval | rakudo 9a15b8: OUTPUT«0123tomdickenharry» | ||
moritz_ | isBEKaml: you have an offbyone error | ||
there are only 0..(@list-1) items in your array | |||
or ^@list or @list.keys | 14:33 | ||
isBEKaml | moritz_++ #noticed it just now when I did $_ | ||
masak | lue: \o | 14:34 | |
isBEKaml | rakudo: say <a b c d>[2.00001] | ||
p6eval | rakudo 9a15b8: OUTPUT«c» | ||
isBEKaml | rakudo: say <a b c d>[2.554] | 14:35 | |
p6eval | rakudo 9a15b8: OUTPUT«c» | ||
finanalyst | rakudo: class A { has $.a; method m { for $.a .. 5 { say $_.WHAT }}}; my A $x.=new(:a(2.0)); $x.m | ||
p6eval | rakudo 9a15b8: OUTPUT«Rat()Rat()Rat()Rat()» | ||
isBEKaml | maybe it does an equivalent of ceil() ? | ||
d'oh, floor() ? | 14:36 | ||
colomon | isBEKaml: probably truncate | ||
moritz_ | rakudo: say (Any .. 5).perl | ||
p6eval | rakudo 9a15b8: OUTPUT«Any..5» | ||
moritz_ | rakudo: say (Any .. 5).Seq.perl | ||
p6eval | rakudo 9a15b8: OUTPUT«()» | ||
isBEKaml | but doesn't *always* show an error is really quirky.. | ||
masak | here's the ticket I was thinking of: rt.perl.org/rt3/Ticket/Display.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 | ||
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)» | ||
masak | it's array indexing and 'is copy' interacting badly with each other. | 14:39 | |
finanalyst | isBEKaml: thats the error | ||
masak | hm, but that one seems to be attr arrays and indexing. | ||
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)» | ||
masak submits rakudobug | |||
finanalyst++ | |||
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 | ||
p6eval | rakudo 9a15b8: OUTPUT«3» | ||
colomon | it would be sooooo awesome if the first Mu there in all of those was the actual type involved... | ||
masak | finanalyst: you mean of $.a? but that's not it, my example didn't use $.a | ||
isBEKaml | rakudo: class A { has @.m; method foo { @.m[2] } }; A.new(:m(1,2,3)).foo | 14:42 | |
p6eval | rakudo 9a15b8: ( no output ) | ||
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)» | ||
finanalyst | masak: I ran across a bug where arrays inside a method were being treated differently than outside. is this the same thing? | ||
we discussed it about two weeks ago | |||
masak | rakudo: class A { has @.m; }; A.new(:m(1,2,3)).m[2.0] | ||
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)» | ||
colomon | finanalyst: probably is the same thing. | ||
masak | it's not even methods. | ||
it's just the attribute array. | |||
14:56
rv2733 joined
|
|||
BrowserUk | pmurias: Is "Erlang Programming" is a real, go out and buy book only, rather than an ebook? | 14:57 | |
pmurias | BrowserUk: i have the ebook | 15:02 | |
BrowserUk: but i guess you could buy a printed copy if you want | |||
15:07
orafu left,
orafu joined
15:13
rokoteko joined
|
|||
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 | |
rakudo: my $temp = 1..10; for $^temp { say "hi"; } | |||
p6eval | rakudo 9a15b8: OUTPUT«hi» | ||
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. | ||
isBEKaml | gack, s/usage/logic/ | ||
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"; } | ||
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'? | ||
isBEKaml | masak: the logic behind the for loop, though there should be checks against using $^ variables in a loop. | ||
p6eval | std 30748: OUTPUT«===SORRY!===Placeholder 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» | ||
masak | isBEKaml: no, I'm not sure there should. | 15:37 | |
isBEKaml: as I said, it's not always wrong. | |||
there might be very unusual but completely admissible situations where it's right. | |||
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
elmex left
|
|||
isBEKaml points at std... | 15:39 | ||
masak | TimToady: hunh. I thought that'd actually be illegal. | ||
TimToady | it shouldn't allow a $^temp after 'my $temp' | 15:40 | |
masak | phew. | 15:42 | |
isBEKaml | rakudo: my $somevar= { say $_ for $^temp; }; $somevar(1..10); | ||
p6eval | rakudo 9a15b8: OUTPUT«1 2 3 4 5 6 7 8 9 10» | ||
15:42
elmex joined
|
|||
masak | isBEKaml: yeah, things like that. | 15:43 | |
isBEKaml | ouch* | ||
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. | ||
TimToady | my first test was illegal because you can't use a placeholder in mainline code, though "this kind of block" is LTA | 15:44 | |
"in this lexical context" would be more accurate | 15:45 | ||
15:49
TiMBuS left
|
|||
isBEKaml wonders if he exhausted his mistake quota for the day.... ;) | 15:49 | ||
masak | isBEKaml++ # trial and error | ||
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 | ||
isBEKaml | TimToady++, masak++, #perl6++ ## awesome community to help ease into trial & error | 15:51 | |
pmurias | std: sub ($foo) {$^bar} | ||
p6eval | std 30748: OUTPUT«===SORRY!===Placeholder variable $^bar cannot override existing signature ($foo) at /tmp/zkqefQuVs6 line 1:------> sub ($foo) {$^bar⏏}Check failedFAILED 00:01 112m» | ||
pmurias | std: sub {$^bar} | ||
p6eval | std 30748: OUTPUT«ok 00:01 111m» | ||
pmurias | std: if 1 {$^bar} | ||
p6eval | std 30748: OUTPUT«ok 00:01 111m» | ||
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 | |
15:52
tedv joined
|
|||
TimToady | std: class Foo { $^nope } | 15:52 | |
p6eval | std 30748: OUTPUT«===SORRY!===Placeholder 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 } | ||
p6eval | std 30748: OUTPUT«===SORRY!===Placeholder variable $^nope cannot be used in this kind of block at /tmp/rwi1Z77Bag line 1:------> role Foo { $^nope⏏ }Check failedFAILED 00:01 111m» | ||
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 | ||
p6eval | rakudo 9a15b8: OUTPUT«Symbol '$nope' not predeclared in barcurrent instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)» | ||
jnthn | Phew. :-) | ||
TimToady: I could half see Rakudo acidentally making it work. :-) | |||
pmurias | TimToady: Placeholder variable $^nope cannot be used in a block which can't have a signature.? | 15:56 | |
maybe s/can't/is not allowed to/ | |||
15:57
redicaps left
16:00
FreeStorm_wTV is now known as FreeStorm
|
|||
masak | and shouldn't be allowed to :P | 16:01 | |
TimToady | my current code say "may not" | ||
and gives a different message if $*CURPAD === $*UNIT | 16:02 | ||
making it check for an existing my is a bit harder though | |||
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» | ||
TimToady | retroactively changing a non-parameter to a parameter is not nice | 16:04 | |
16:10
pmurias left
|
|||
masak | that's my point. | 16:10 | |
tedv | By "not nice" do you mean "swears at the police officer" not nice or "breaks the speed of light" not nice? | 16:11 | |
cognominal | \o | 16:12 | |
masak | o/ | ||
slavik | \o/ | 16:13 | |
masak | a multi-hour bug hunt in GGE finally ended happily. | 16:14 | |
16:14
FreeStorm left
|
|||
masak | ultimate cause: `while index(...)` instead of `while defined(index(...))` | 16:14 | |
so, don't do that. | |||
lue | Well, the index(...) could have been 0! :) | 16:18 | |
masak | right. | ||
it was, in the cases where the bug manifested. | 16:19 | ||
lue: for example in test 440, where I left off yesterday. | |||
that one should pass now. | |||
TimToady | By "not nice" I mean "Does a bait-and-switch on the customer." | ||
the customer here being the *reader* of the code, not the writer | |||
masak | the writer isn't being nice to the reader. | 16:20 | |
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 | ||
masak | and, by transitivity, a programming language which allows such a bait-and-switch isn't being nice to the reader wither. | ||
s/wither/either/ | |||
diakopter | compilers emit tears too | ||
masak | diakopter++ # that should be a tutorial of some sort | 16:22 | |
16:22
iblechbot left
|
|||
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:23
JimmyZ left
|
|||
lue | diakopter: what if it tries to escape? | 16:25 | |
masak .oO( Compile-or-flight response ) | 16:26 | ||
awk is known for trying to bail out when things get tricky. | |||
lue | I heard a rumor that '' keeps them from escaping (but that seems odd, because "" seems stronger) :) | 16:27 | |
masak | lue: I think you have it too literally :P | 16:28 | |
nom & | 16:29 | ||
16:29
masak left
16:37
Exodist left,
Exodist joined
16:39
PacoLinux left
16:41
rgrau left
16:42
PacoLinux joined
|
|||
moritz_ | rakudo: say Array.new eqv [] | 16:47 | |
p6eval | rakudo 9a15b8: OUTPUT«1» | ||
cognominal | rakudo: say True | 16:50 | |
p6eval | rakudo 9a15b8: OUTPUT«1» | ||
cognominal | rakudo: say True.perl | ||
p6eval | rakudo 9a15b8: OUTPUT«Bool::True» | ||
cognominal | (.perl)++ | 16:51 | |
snarkyboojum | rakudo: my @a = 1 .. Inf; | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
cognominal | beats me why this is not the default | ||
snarkyboojum | I take it that's timing out because lists aren't lazy yet | ||
16:55
rindolf joined
|
|||
rindolf | Hi all. | 16:55 | |
16:58
JimmyZ joined
|
|||
pugssvn | r30749 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 23: Lazy fruits from the gather of Eden | 17:05 | |
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:12 | |
snarkyboojum | rokoteko: nope - not that I know of anyway | 17:14 | |
take(5, some list), will return 5 and then the list | 17:15 | ||
rokoteko | so how is one supposed to refer to the first 5 elements of an infinite list if perl6 provide lazy evaluation? | 17:16 | |
@arr = (1..Inf); @arr[0..4] ? when is @arr evaluated? | |||
17:17
JimmyZ left
|
|||
lue | rakudo: my @a = (1..Inf); say @[0..4] | 17:20 | |
p6eval | rakudo 9a15b8: ( no output ) | ||
lue | rakudo: my @a = (1...Inf); say @[0..4] | ||
snarkyboojum | rakudo: my @a = 1..10; say @a[^5] | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
rakudo 9a15b8: OUTPUT«12345» | |||
lue | I could have sworn we had lazy lists all figured out... | ||
TimToady | roketeko, use .batch(5) | 17:22 | |
snarkyboojum | lue: I don't think Rakudo has properly lazy lists (?) | 17:23 | |
TimToady | rakudo: say (1...*).batch(5) | ||
p6eval | rakudo 9a15b8: OUTPUT«12345» | ||
rokoteko | TimToady: (1..Inf).batch(5) ? | ||
ah ok. | |||
cant you have it on the LHS? | |||
TimToady | 'take' means something else in p6 | ||
I dunno | 17:24 | ||
rakudo: say batch 5, 1..* | |||
p6eval | rakudo 9a15b8: OUTPUT«Could not find sub &batchcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
TimToady | could easily be defined | ||
rokoteko | rakduo: say batch(5).(1..Inf) | 17:25 | |
rakudo: say batch(5).(1..Inf) | |||
p6eval | rakudo 9a15b8: OUTPUT«Could not find sub &batchcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
TimToady | . is not what it is in Haskell | ||
lue | std: my @a = 1..Inf | ||
p6eval | std 30748: OUTPUT«ok 00:01 114m» | ||
TimToady | it's just method call, not function compositoin | ||
so that doesn't make sense | |||
rokoteko | TimToady: how would you chain it then perl6? | 17:26 | |
+way | |||
TimToady | well, there's probably some way to curry it | ||
hmm | |||
rokoteko | currying more than once is what I missed in perl5 :) | 17:27 | |
TimToady | rakudo: my $x = *.batch(5); say $x(1...*) | ||
p6eval | rakudo 9a15b8: OUTPUT«12345» | ||
TimToady | there's one way | ||
rokoteko | what is *? | ||
TimToady | it's a "DON'T curry this argument" | ||
rokoteko | refers to the last result? | ||
TimToady | so *.batch(5) really means { $^arg.batch(5) } | 17:28 | |
or -> $arg { $arg.batch(5) } in a more lambdaish notation | |||
rokoteko | TimToady: Im not a haskell programmer :) | ||
but well put words anyway. :) | 17:29 | ||
TimToady | why not? haskell is easy to learn; I've learned it five or six times now | ||
but yeah, everyone is coming from a different background | |||
so it behooves us to say things several different ways | |||
in the hopes that one will stick | |||
rokoteko | well, Im planning to be, but it just for the cause of understanding something different from imperiative languages. | ||
TimToady | what is your background? | 17:30 | |
rokoteko | as a programmer? ppl -> basic -> perl5 -> php -> c -> java -> haskell ... but currently at perl5. | 17:31 | |
ppl is pcobard programming language. | |||
pcboard. | |||
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)» | ||
TimToady | not all * forms are correctly curried yet in rakudo | ||
snarkyboojum | TimToady: but that should work eventually? | 17:33 | |
17:34
szabgab_ joined
|
|||
snarkyboojum | and build ["aA", "bA", "cA", "dA", "eA"]? | 17:34 | |
rokoteko | rakduo: my $x = *.**2; say $x(1...5) | ||
rakudo: my $x = *.**2; say $x(1...5) | |||
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)» | ||
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)» | ||
rokoteko | intuitively its not clear for me. :/ | ||
oh wait. | 17:36 | ||
rakudo: my $x = *.(**2); say $x(1..5) | |||
p6eval | rakudo 9a15b8: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» | ||
pugssvn | r30750 | lwall++ | [STD] awesomize placeholder messages | ||
r30750 | disallow use of placeholder after non-placeholder | |||
r30750 | [viv] suppress recursion warning | |||
TimToady | snarkyboojum: correct | 17:37 | |
well, except for the [...] part | |||
it would just be a parcel of parcels | |||
snarkyboojum | ok | ||
TimToady | std: my $x = *.(**2); say $x(1..5) | 17:38 | |
p6eval | std 30749: OUTPUT«===SORRY!===Unable 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 | ||
..… | |||
TimToady | std: my $x = *.(* * 2); say $x(1..5) | ||
p6eval | std 30749: OUTPUT«ok 00:01 112m» | ||
TimToady | ** is a valid term | ||
17:39
ajs joined
|
|||
moritz_ | that breaks my old starry obfu :-) | 17:39 | |
TimToady | we've broken one or two other things as well :P | ||
moritz_ | rakudo: ** | ||
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)» | ||
isBEKaml | rakudo: say 2** 5; | ||
p6eval | rakudo 9a15b8: OUTPUT«32» | ||
TimToady | it's also a valid infix | 17:40 | |
ajs | rakudo: toekn isegment { blah } | ||
p6eval | rakudo 9a15b8: OUTPUT«Could not find sub &isegmentcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
ajs | that one took me a while to see ;-) | ||
Anyway, my URI.pm now parses... I'll debug it after I do some chores. | 17:41 | ||
TimToady | std: toekn isegment { blah } | 17:42 | |
p6eval | std 30749: OUTPUT«===SORRY!===Undeclared routines: 'blah' used at line 1 'isegment' used at line 1 'toekn' used at line 1Check failedFAILED 00:01 111m» | ||
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 :) | ||
snarkyboojum | lue: write tests for the advent calendar :) | ||
TimToady | std: {my $foo;say $^foo} | ||
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» | ||
TimToady | well, that should fix itself while I take a walk :) | 17:44 | |
bbl & | |||
lue | *o* | 17:45 | |
isBEKaml | lue: what's wrong? | 17:48 | |
diakopter | phenny: tell pmurias I fixed the problem(s) there, mostly. | ||
phenny | diakopter: I'll pass that on when pmurias is around. | ||
lue | No; that was a cheerleader (see TimToady ^^^) | 17:49 | |
isBEKaml | :) | ||
17:50
szabgab_ left
|
|||
dalek | meta: r294 | diakopter++ | trunk/Sprixel/ (12 files): [perlesque] add more (commented) debug for some grammar combinators, make State be fully debugged, fix parse_bug2.t since it tried to augment a class already defined, which can't occur. |
17:51 | |
lue goes forth to have an advent-ure in P6 | 17:52 | ||
snarkyboojum | lue: I'm having a go at day 19 atm fyi | 17:53 | |
dalek | ok: a30e807 | jonathan++ | src/operators.pod: Some initial explanations of smart matching. |
17:55 | |
ok: e86ce00 | jonathan++ | src/subs-n-sigs.pod: Examples of where without a block, which just smart matches. |
|||
meta: r295 | diakopter++ | trunk/Sprixel/Main.cs: [perlesque] once again, remove debug flag |
17:56 | ||
lue | Where exactly are the advent tests? | ||
isBEKaml | lue: in the pugs repo. t/spec/integration | ||
lue | ah, thank you. | 17:58 | |
isBEKaml | yw. | ||
17:59
rurban joined
|
|||
lue | I'm confused. Do you write/change the tests, or make them the implementation run them correctly? | 17:59 | |
17:59
rurban left
|
|||
snarkyboojum | lue: just write tests where they're missing I'd say | 18:00 | |
isBEKaml | rakudo: any(1,2,3).WHAT.perl.say; | 18:02 | |
p6eval | rakudo 9a15b8: OUTPUT«Junction» | ||
diakopter | phenny: tell pmurias well, I guess I broke other things. :/ | ||
phenny | diakopter: I'll pass that on when pmurias is around. | ||
isBEKaml | rakudo: my $tt = "yah"; say "booyah!" if $tt ~~ any("boo", "yah"); | 18:03 | |
p6eval | rakudo 9a15b8: OUTPUT«booyah!» | ||
pugssvn | r30751 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar Day 19: Whatever | 18:04 | |
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 | |
snarkyboojum: I'm reading the blog post over and over trying to comprehend it... | |||
snarkyboojum | isBEKaml: yeah, I took and look and passed over that one :) | 18:06 | |
TimToady | std: {my $foo;say $^foo} | ||
p6eval | std 30750: OUTPUT«Use of uninitialized value $decl in concatenation (.) or string at STD.pm line 101334.===SORRY!===$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 | ||
..lin… | |||
snarkyboojum | maybe moritz_++ can give us an idea :) | ||
18:07
whiteknight joined
|
|||
snarkyboojum | isBEKaml: how are junctions tested in the current spec test suite? | 18:07 | |
pugssvn | r30752 | lwall++ | [STD] suppress uninit warning | ||
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 } | ||
p6eval | std 30750: OUTPUT«===SORRY!===Placeholder 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» | ||
snarkyboojum | isBEKaml: might be worth looking in there for inspiration yeah | ||
TimToady | std: sub { my $foo; say $^foo } | ||
p6eval | std 30750: OUTPUT«===SORRY!===$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 | ||
..00:… | |||
TimToady | std: sub { my $foo; { say $^foo } } | ||
p6eval | std 30750: OUTPUT«ok 00:01 111m» | ||
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.===SORRY!===$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 | ||
..lin… | |||
isBEKaml | TimToady: message is part funny.. TimToady++ | ||
lue | TimToady: short walk | ||
diakopter | long pier? | ||
TimToady | ENOTYET | ||
isBEKaml | TimToady: "so you will confuse the reader if you suddenly declare $^foo here" | ||
TimToady | Secundus called upon the matriarch | ||
TimToady curtsies | 18:10 | ||
diakopter hopes for a green All Tests Successful | |||
TimToady | std: sub { -> $^foo { } } | 18:11 | |
p6eval | std 30750: OUTPUT«===SORRY!===You may not use the ^ twigil in a signature at /tmp/LY51rGuDDX line 1:------> sub { -> $⏏^foo { } } expecting twigilParse failedFAILED 00:01 112m» | ||
dalek | meta: r296 | diakopter++ | trunk/Sprixel/ (3 files): [perlesque] temp bandaids (aren't they all) |
||
isBEKaml | snarkyboojum: I passed over Day 10 too. it was too broad.. | ||
TimToady | std: sub { -> $x where $^foo { } } | ||
p6eval | std 30750: OUTPUT«Use of uninitialized value $decl in concatenation (.) or string at STD.pm line 101310.===SORRY!===Placeholder variable $^foo is not allowed in the signature at /tmp/t3wqVJSH8B line 1:------> sub { -> $x where $^foo⏏ { } }Unexpected block in | ||
..… | |||
isBEKaml | snarkyboojum: in scope... | ||
TimToady | std: sub { method ($x where $^foo) { } } | ||
p6eval | std 30750: OUTPUT«===SORRY!===Placeholder variable $^foo is not allowed in the method signature at /tmp/SyG9C8trvj line 1:------> sub { method ($x where $^foo⏏) { } }Check failedFAILED 00:01 112m» | ||
TimToady | std: class { $^huh } | 18:12 | |
p6eval | std 30750: OUTPUT«===SORRY!===Placeholder 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» | ||
rindolf | TimToady: BTW, do you recall saying "It's easier to port a shell than a shell script."? | 18:13 | |
TimToady | yes | ||
rindolf | TimToady: ah. | ||
TimToady: was it an original sentiment? | 18:14 | ||
TimToady | afaik | ||
rindolf | TimToady: OK, thanks. | ||
rokoteko | what does $^var mean in perl6? | ||
TimToady | a self-declaring parameter | ||
{ $^x + $^y } is the same as -> $x, $y { $x + $y } | 18:15 | ||
rokoteko | what does that mean? like $foo = "bar" without my in perl5? | ||
TimToady | it's more like a 'my-but-really-I'm-a-parameter-in-the-surrounding-block' | ||
std: -> $x { $^y } # should fail | 18:16 | ||
p6eval | std 30750: OUTPUT«===SORRY!===Placeholder variable $^y cannot override existing signature ( $x ) at /tmp/deGfaJ2hA3 line 1:------> -> $x { $^y⏏ } # should failCheck failedFAILED 00:01 112m» | ||
rokoteko | what is its scope then? | ||
rindolf | en.wikiquote.org/wiki/Larry_Wall - hmmm... this shell script quote was removed from here. | ||
TimToady | attaches to the surrounding curlies | ||
18:16
Su-Shee joined
|
|||
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 | ||
well, the weird thing is that parameters in general may be declared outside their lexical scope | 18:18 | ||
but as far as the scope is concerned, they're inside the curlies | |||
rokoteko | { local ($x, $y) { $x + $y } } .. trying to translate it to perl5. | ||
TimToady | and the scope just thinks that parameters are 'my' vars | ||
rokoteko | TimToady: are you always correct? | 18:19 | |
TimToady | no, more like sub { my ($x,$y) = @_; ... } | ||
I'm always right, even when I'm not correct :) | |||
rokoteko | Im usually left. | ||
TimToady | sometimes I get over there too | ||
but generally I'm a rabid moderate... | 18:20 | ||
rokoteko | it's the dude who can switch the north and south pole? | ||
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; | ||
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)» | ||
TimToady | I think it's actually a girl superhero named Fluid Dynamo | ||
are you familiar with Perl 5's sort? | 18:22 | ||
sort { $a <=> $b } @list | |||
for instance | |||
rokoteko | yes I am | 18:23 | |
TimToady | in p5, that's hardwired behavior | ||
diakopter | phenny: tell pmurias I fixed the problems | ||
phenny | diakopter: I'll pass that on when pmurias is around. | ||
TimToady | in p6, it falls out naturally | ||
std: sort { $^a <=> $^b }, 1,2,3 | |||
p6eval | std 30750: OUTPUT«ok 00:01 112m» | ||
TimToady | which really means | ||
rokoteko | TimToady: sort { $^var1 cmp $var^2 } is valid? | ||
ah. $^var2 | |||
TimToady | std: sort { $^var1 <=> $^var2 }, 1,2,3 | 18:24 | |
p6eval | std 30750: OUTPUT«ok 00:01 112m» | ||
TimToady | placeholders are always assumed to be alphabetically ordered | ||
so that's the same as | |||
rokoteko | I have no idea why on the eart the p6eval bot outputs that mucs utf8. | ||
makes it difficult to read for humans. | |||
TimToady | std: sort -> $var1, $var2 { $var1 <=> $var2 }, 1,2,3 | 18:25 | |
p6eval | std 30750: OUTPUT«ok 00:01 113m» | ||
TimToady | rokoteko: most of us have irc clients that handle utf8 just fine | ||
which client are you using? | |||
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 :) | ||
rokoteko | irssi, but Im finnish. we're kinda stuck with latin1, or weird. | ||
TimToady | latin1 is a subset of unicode | ||
rindolf | rokoteko: you're still using Latin1 in .fi? | ||
rokoteko | rindolf: yes I am. | ||
rindolf | rokoteko: ah. | ||
rokoteko: I hope not on IRC. | |||
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)» | ||
TimToady | maybe start an alternate irssi with unicode | ||
rokoteko | rindolf: I type in ascii where the charset matters. | ||
TimToady | we do a *lot* of unicode in here | ||
rindolf | rokoteko: www.shlomifish.org/art/slogans/give...-death.svg | ||
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)» | ||
lue | rakudo: say "hello" for ^3 | ||
p6eval | rakudo 9a15b8: OUTPUT«hellohellohello» | ||
dalek | ok: eb8fadc | jonathan++ | src/subs-n-sigs.pod: Describe captures. |
18:29 | |
TimToady | including using the replacement char for newline :) | ||
lue | rakudo: say ("hello" for ^3) ~~ "hello\nhello\nhello\n"; | ||
p6eval | rakudo 9a15b8: OUTPUT«get_string() not implemented in class 'ArrayIterator'current instr.: 'perl6;Str;ACCEPTS' pc 13125 (src/builtins/Parcel.pir:161)» | ||
Su-Shee | rokoteko: if I can unicode you can. those handful of special chars in finnish.. ;) | ||
rokoteko | TimToady: do you know Archibald Higgings? | ||
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)» | ||
rokoteko | Su-Shee: uni is dream in finnish. :) | ||
or vice versa. | |||
TimToady | er, not sure...I'm terrible with names, even among friends. :) | ||
lue | argh.. what be wrong? | ||
rakudo: say ("hello" for ^3).Str ~~ "hello\nhello\nhello\n"; | |||
TimToady | every time I remember a name I forget a Japanese verb... | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'Str' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
rindolf | TimToady: heh. | 18:31 | |
lue | then stop remembering names :) | ||
rindolf | TimToady++ | ||
lue | [o wait, wrong priorities] | ||
rindolf | TimToady: are Japanese verbs inflected? | ||
jnthn | Is Japanese anything inflected? | 18:32 | |
TimToady | rindolf: yes, but in a much regular way than most Indo-European languages | ||
18:32
Exodist left
|
|||
rokoteko | TimToady: you were referring to Fluid Dynamo. to me that is the chick in : www.savoir-sans-frontieres.com/JPP/...ld_eng.pdf ( a comic about topology ) | 18:32 | |
TimToady | s/much/much more/ | ||
lue | rakudo: say ("hello" for ^3).perl | ||
jnthn | TimToady: Do you count "add this particle" as an inflection? | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'perl' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
lue | rakudo: say ("hello" for ^3).WHAT | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'WHAT' not found for invocant of class 'ArrayIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
rindolf | TimToady: I see. | ||
jnthn | TimToady: Are are there "real" inflections that morph stuff? | ||
lue | Now _that's_ ironic. | ||
jnthn | *or are | 18:33 | |
lue | the above code I entered (the .WHAT) should work, right? | ||
jnthn | Oh, wait...I guess Japanese does have real inflections on verbs, looking it up. | ||
:-) | |||
D'oh. | |||
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? | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'Num' not found for invocant of class 'Block'current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)» | ||
moritz_ | jnthn: did you get around to fix the multi/candidates bugs | 18:35 | |
rokoteko | or it just a bug ? | ||
lue | rakudo: my @a = "hello" for ^3; say @a.WHAT | ||
p6eval | rakudo 9a15b8: OUTPUT«Array()» | ||
lue | rakudo: my @a = "hello" for ^3; say @a | ||
TimToady | lue: yes, in the sense that Japanese has "pitch accent", but it is not a tonal language | ||
moritz_ | general Whatever-currying is not yet implemented in Rakuo | ||
p6eval | rakudo 9a15b8: OUTPUT«hello» | ||
lue | rakudo: my @a = ("hello" for ^3); say @a | 18:36 | |
p6eval | rakudo 9a15b8: ( no output ) | ||
lue | ō.o | ||
rindolf | rakudo: my @a = "hello" for ^3; say @a.perl | ||
TimToady | basically, instead of accenting a syllable by stressing it, they accent it by dropping the pitch on the next syllable | ||
p6eval | rakudo 9a15b8: OUTPUT«["hello"]» | ||
Su-Shee | lue: in mandarin or cantonese you really have to learn "tones". | ||
TimToady | or between syllables, if you think of it that way | ||
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 | ||
jnthn | moritz_: No, been writing book instead. :-) | ||
moritz_ | jnthn: ah, I've just seen the commits on #perl6book | ||
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 :) | ||
moritz_ | I've got named (non-quantified) captures working, without evil workarounds | ||
lue | rakudo: say ((say "hello") ~~ "hello") | ||
p6eval | rakudo 9a15b8: OUTPUT«hello0» | ||
lue | rakudo: say ((say "hello") ~~ "hello\n") | ||
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.. :( | ||
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 | ||
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 | ||
moritz_ | in (1|2|3) the eigenstates are 1, 2 and 3 | ||
rokoteko | three dots why? is "===" also perl6 syntax? | ||
isBEKaml | rakudo: my $foo = any(1,2,3); say $foo!eigenstates.perl; | ||
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)» | ||
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 | ||
p6eval | rakudo 9a15b8: OUTPUT«(1, 2, 3)» | ||
moritz_ | it shouldn't be a public method | ||
isBEKaml | moritz_: well, it looks like it.. | ||
jnthn | moritz_: Ah, great. | ||
TimToady | the only junction that is anything like a set of its eigenstates is all(1,2,3) | ||
jnthn | moritz_: I need to go buy / eat noms now, but back later on. :-) | ||
moritz_: Does the mob4 branch build against the same Parrot as current master? | 18:42 | ||
lue | sub marine($parameter) { say $parameter; }; marine("h3llo"); marine() | ||
rakudo: sub marine($parameter) { say $parameter; }; marine("h3llo"); marine() | |||
moritz_ | jnthn: nope; I've rebased, and pushed as 'mob5' | ||
p6eval | rakudo 9a15b8: OUTPUT«h3lloNot enough positional parameters passed; got 0 but expected 1current instr.: 'marine' pc 194 (EVAL_1:79)» | ||
TimToady | any(1,2,3) is really *six* different sets | ||
isBEKaml | TimToady: so any(1,2,3) or none(1,2,3) don't take on all of their eigen states? | ||
jnthn | moritz_: ah, cool. I needn't go building an older Parrot hen. :-) | 18:43 | |
*then | |||
TimToady | and none(1,2,3) is an an infinite number of sets (as defined defined in the current universe of discourse) - 6 | ||
which is why we will allow only all() junctions to autoconvert to sets, if any do | 18:44 | ||
18:44
rokoteko left
|
|||
isBEKaml | Ah, I see... | 18:44 | |
lue | Would that go under aleph-zero or similar? | ||
[none(1,2,3)] | |||
TimToady | well... | 18:45 | |
lue | ∞-6=∞ | ||
TimToady | rakudo: say "what's my universe?" if pi === none(1,2,3) | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
TimToady | hmm | ||
rindolf | rakudo: pi | 18:46 | |
p6eval | rakudo 9a15b8: ( no output ) | ||
rindolf | rakudo: say pi | ||
p6eval | rakudo 9a15b8: OUTPUT«3.14159265358979» | ||
TimToady | rakudo: say "what's my universe?" if pi == none(1,2,3) | ||
p6eval | rakudo 9a15b8: OUTPUT«what's my universe?» | ||
TimToady | right, rakudo is still busted in autothreading === | ||
lue | so === is "too strict for true to be true"? :) | ||
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 | ||
isBEKaml | rakudo: say non(1,2,3).WHAT; | ||
p6eval | rakudo 9a15b8: OUTPUT«Could not find sub &noncurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
isBEKaml | rakudo: say none(1,2,3).WHAT; | ||
p6eval | rakudo 9a15b8: OUTPUT«Junction()» | ||
TimToady | but to answer your question, pi is irrational, so I think it's at least א₁ | ||
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. :( | ||
lue | Because I want to be able to type both an aleph and an o w/ umlaut :) | ||
Su-Shee | lue: just input the unicode code point. | ||
isBEKaml | .u aleph | ||
phenny | isBEKaml: Sorry, no results for 'aleph'. | ||
isBEKaml | .u umlaut | ||
phenny | isBEKaml: Sorry, no results for 'umlaut'. | ||
isBEKaml | :( | 18:50 | |
Su-Shee | I mean in your term/irc client/editor and so on. :) | ||
lue | hah! If only KDE would do that.... :( | ||
.u alef | |||
phenny | U+2135 ALEF SYMBOL (ℵ) | ||
lue | .u diaresis | ||
phenny | lue: Sorry, no results for 'diaresis'. | ||
TimToady | rakudo: my $x = { map { $^x * 2}, @_ }; say $x(1..5); | 18:51 | |
p6eval | rakudo 9a15b8: OUTPUT«246810» | ||
TimToady | rakudo: my $x = { map { $^x * 2}, @_ }; say $x(1...5); | ||
p6eval | rakudo 9a15b8: OUTPUT«246810» | ||
BrowserUk | -? | ||
moritz_ wonders if BrowserUk knows greetings that contain letters | |||
isBEKaml is glad BrowserUk typed two chars instead of one. ;) | 18:52 | ||
lue | !(~~>] | 18:53 | |
TimToady | phenny: tell rokoteko you want something like: my $x = { map { $^x * 2}, @_ }; say $x(1..5); | ||
phenny | TimToady: I'll pass that on when rokoteko is around. | ||
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:55 | |
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. | ||
Juerd | .u diaeresis | ||
phenny | U+00A8 DIAERESIS (¨) | ||
Juerd | lue: Correct spelling helps :) | ||
lue | thank you. I can never remember that. Is it supposed to be english? | ||
moritz_ | isBEKaml: "recently", yes | ||
like, within in the last two years :-) | |||
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.. :-) | ||
lue | I think it's weird. I prefer "umlaut" :) | ||
moritz_ | isBEKaml: don't they? | ||
Juerd | lue: Umlaut is a diaeresis used for a specific purpose. | ||
isBEKaml | moritz_: No.. | ||
moritz_: t/spec/S03-junctions/eigenstates.t | 18:58 | ||
moritz_ | this test... sucks. | ||
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
|
|||
TimToady | you have to say $x!ThatClass::method | 19:00 | |
diakopter | pmurias: say something | ||
isBEKaml | TimToady: yes, the spec test suite actually violated them. | ||
pmurias | diakopter: hi | ||
phenny | pmurias: 17:48Z <diakopter> tell pmurias I fixed the problem(s) there, mostly. | ||
pmurias: 18:02Z <diakopter> tell pmurias well, I guess I broke other things. :/ | |||
pmurias: 18:23Z <diakopter> tell pmurias I fixed the problems | |||
diakopter | :) | ||
TimToady | walking to lunch on Castro & | ||
pugssvn | r30754 | moritz++ | remove a test file that is mostly wrong, isBEKaml++ for pointint it out | ||
pmurias | diakopter: what was the source of the bug? | 19:01 | |
isBEKaml | moritz_: fgrepping revealed one more file in the same directory. misc.t | 19:02 | |
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 | ||
diakopter | pmurias: well, you can't declare a class P6object in that test when one already exists | 19:04 | |
19:04
envi^home left
|
|||
diakopter | pmurias: (the one you wrote in C#) | 19:04 | |
TimToady | Amarin Thai, probably & # really gone | 19:05 | |
isBEKaml | moritz_: :391,404 d | ||
lue | well, I've seen an "umlaut" used like that, but I believe you. | ||
pugssvn | r30755 | moritz++ | [t/spec] remove another wrong/confusing test | ||
pmurias | diakopter: i'll remove the C# versions of the p6 classes then | 19:07 | |
diakopter | pmurias: ok :) | ||
pmurias | diakopter: and why did the test pass when commenting out some of the methods? | ||
diakopter | I didn't know it did | ||
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)» | ||
diakopter | pmurias: which methods | ||
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] | ||
p6eval | rakudo 9a15b8: OUTPUT«3» | ||
pmurias | diakopter: the last one | ||
diakopter | I don't know; it shouldn't have | ||
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 | ||
pmurias | why does class Z {};class X is Z { has List<Z> $positionals} fail? | 19:11 | |
diakopter | I dunno; i'll try it | ||
pmurias | List[Z] | ||
fixes | 19:12 | ||
diakopter | oh, yeah :D | ||
pmurias: oh btw, should I make an Array type? | |||
moritz_ | mixing syntaxes considered harmful | ||
diakopter | which were mixed? | ||
oh, parametric roles syntax for parametric types | 19:13 | ||
pmurias | patametric roles vs templates | ||
moritz_ | C++ templates | ||
pmurias | C++ considered evil | ||
diakopter | that's just C# | ||
different from C++ templates | |||
moritz_ | C# cripped it from C++ | 19:14 | |
mathw | C# generics are rather different to C++ templates | ||
diakopter | (ditto) | ||
moritz_ talked only about the syntax | |||
diakopter | but still, p6 doesn't have parametric/generic classes (booo) | ||
pmurias | it has parametric roles | 19:15 | |
diakopter | right, but that doesn't help :P since perlesque won't have roles | ||
too complex for that layer. | |||
pmurias | perlesque shouldn't even have syntax | 19:16 | |
diakopter | ? | ||
it shouldn't be a language? | |||
pmurias | IMHO it should accept AST in JSON | 19:17 | |
diakopter | I thought we talked through this and you agreed that was impossible? | ||
besides, how would it translate anything? | 19:18 | ||
who will write the "translate this type of AST node to this" translation routines | 19:19 | ||
show me [an example of or the spec of] the AST API the JSON would match against | 19:20 | ||
VAST? | |||
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? | ||
moritz_ | ajs: it never was | ||
ajs | oh, I must have misread | 19:22 | |
moritz_ | ajs: perlgeek.de/blog-en/perl-6/object-c...ation.html | ||
ajs | So I should be defining my own new, then? | ||
moritz_ | yes | ||
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:24
rindolf left
|
|||
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
|
|||
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)» | ||
lue | ō.o | ||
Why did that fail? | 19:26 | ||
moritz_ | lue: did you mean to assign to that variable? | ||
lue | I meant to put something in the hash, yes. | ||
moritz_ | then do it | ||
you know, assignment with the = operator | 19:27 | ||
lue | I thought hashes were special (don't use them often) | ||
rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say (%nonfoos.keys.fmt("'%s'", ', ')).WHAT | |||
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)» | ||
lue | ō.ō | 19:28 | |
moritz_ | rakudo: (1, 2).fmt('a', 'b') | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
moritz_ | rakudo: my %h; say %h.keys.WHAT | ||
p6eval | rakudo 9a15b8: OUTPUT«MapIterator()» | ||
moritz_ | ah | ||
that's why | |||
lue | It's part of the advent calendar (2009 Day 9) | 19:29 | |
capturing named arguments (arbitrary amount) | |||
19:31
Ross^ joined
|
|||
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)» | ||
lue | alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ') = ("a","b") | ||
p6eval | alpha 30e0ed: ( no output ) | ||
moritz_ | alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ') | ||
p6eval | alpha 30e0ed: ( no output ) | 19:32 | |
moritz_ | alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys | ||
alpha: say 2 | |||
p6eval | alpha 30e0ed: ( no output ) | ||
alpha 30e0ed: OUTPUT«2» | |||
19:33
rindolf left
|
|||
isBEKaml | rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys; | 19:33 | |
p6eval | rakudo 9a15b8: OUTPUT«ab» | ||
lue | old advent code then; should it still work? | 19:34 | |
19:34
finanalyst left
19:35
finanalyst joined,
Ross^ left,
Ross^ joined
|
|||
moritz_ | i think so | 19:35 | |
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)» | ||
moritz_ | lue: don't you want to submit a patch for rakudo that implements it? | ||
isBEKaml | rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys>>.Str.fmt("'%s'", ', '); | ||
p6eval | rakudo 9a15b8: OUTPUT«'a', 'b'» | ||
moritz_ | lue: likely it's straight forward to backport it from alpha | ||
lue | I can, but I'm writing the test file for advent day 9, maybe afterwards | ||
isBEKaml | lue: ^^ | 19:37 | |
19:37
jakk left,
Ross^ left
|
|||
lue | I'll just put it in as-is. After all, it is a *test* I'm writing. | 19:37 | |
19:38
Ross^ joined
|
|||
isBEKaml | moritz_: does this still need a patch? >>.Str seems to do it... | 19:38 | |
moritz_ | isBEKaml: hash .fmt'ing shoul still work | 19:39 | |
lue | alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', ').WHAT | ||
p6eval | alpha 30e0ed: ( no output ) | ||
isBEKaml | alpha: my %nonfoos = {"a" => 1, "b" => 2}; say %nonfoos.keys.fmt("'%s'", ', '); | ||
lue | I'll assume it returns an array | ||
19:40
finanalyst left
|
|||
p6eval | alpha 30e0ed: ( no output ) | 19:40 | |
isBEKaml | huh? no output? | ||
moritz_: you mean, .fmt should be able to stringify a MapIterator into a flat string? | 19:41 | ||
moritz_ | aye | ||
19:43
Ross^ left
|
|||
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:45 | |
moritz_ | on everything listy it should take a separator too, I think | 19:46 | |
rakudo: say <1 2 3>.fmt('%02d', 'a') | 19:47 | ||
p6eval | rakudo 9a15b8: OUTPUT«01a02a03» | ||
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 | ||
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:48 | |
moritz_ | snarkyboojum: is (@deck .= pick(*); @deck.elems), 4 * 13, 'Shuffled card deck'; | 19:49 | |
snarkyboojum: that's not working how you think it does | 19:50 | ||
snarkyboojum | moritz_: ok :) | ||
19:50
jakk joined
|
|||
snarkyboojum | moritz_: I thought it was a dodgey way to test it anyway :) | 19:50 | |
lisppaste3 | pmurias pasted "diakopter: why doesn't that work?" at paste.lisp.org/display/100307 | 19:51 | |
pugssvn | r30756 | snarkyboojum++ | [t/spec] Added initial tests for Perl 6 Advent Calendar | ||
pmurias | diakopter: why does that cause an error | ||
? | |||
moritz_ | snarkyboojum: it's better to do the @deck .= pick(*) before the line with the is() | 19:52 | |
snarkyboojum | moritz_: ok - will fix | ||
moritz_ | snarkyboojum++ | ||
diakopter | pmurias: b/c the expression parser cheats a lot | ||
as in, doesn't exist | |||
you need parens | |||
(self.positionals).Add($pos); | 19:53 | ||
snarkyboojum | moritz_++ # thanks for reviewing the tests :) | ||
diakopter | pmurias: at first glance. | ||
19:53
Ross^ joined
|
|||
lue | hi snarky! Back from the Perl 6 golf course, eh? | 19:54 | |
diakopter | pmurias: oh, I'm wrong; that's not it. | ||
snarkyboojum | moritz_: is that was you had in mind - gist.github.com/410321 ? | 19:55 | |
s/was/what/ | |||
moritz_ | snarkyboojum: aye | ||
lue | ( must've seen a lot of .t's :) ) | ||
snarkyboojum | k | ||
lue: o/ | 19:56 | ||
moritz_ | rakudo: DEBUG(3) | ||
p6eval | rakudo 9a15b8: OUTPUT«Could not find sub &DEBUGcurrent instr.: '_block14' pc 29 (EVAL_1:0)» | ||
diakopter | pmurias: hrm. grammar engine buglet. it'll take me awhile to trace it down | 19:57 | |
pugssvn | r30757 | snarkyboojum++ | [t/spec] Cleaned up a test for Advent Calendar Day 5 in response to feedback from moritz_++ | 19:59 | |
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 | |
20:00
Ross^ left,
Ross^ joined
|
|||
diakopter | pmurias: well, it works on its own.... odd. | 20:01 | |
oh | |||
pmurias | hm? | ||
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 | |
rakudo: say %*ENV.keys.WHAT | |||
p6eval | rakudo 9a15b8: OUTPUT«MapIterator()» | 20:03 | |
moritz_ | rakudo: say list(%*ENV.keys).WHAT | ||
p6eval | rakudo 9a15b8: OUTPUT«List()» | ||
moritz_ | rakudo: say list(%*ENV.keys).fmt('%s%s', '|-|') | ||
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)» | ||
isBEKaml | rakudo: say %*ENV.keys.List.WHAt; | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'List' not found for invocant of class 'MapIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
isBEKaml | rakudo: say %*ENV.keys.List.WHAT; | ||
p6eval | rakudo 9a15b8: OUTPUT«Method 'List' not found for invocant of class 'MapIterator'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
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 <> | ||
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)» | ||
moritz_ | diakopter: that's how I understood it, yes | ||
diakopter | oh ok | ||
isBEKaml | rakudo: my %nonfoos = {"a" => 1, "b" => 2}; say list(%nonfoos.keys)>>.fmt("'%s'", ', '); | ||
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)» | ||
isBEKaml | moritz_: EnumMap.pm ? | ||
pmurias | diakopter: other annoying thing why do i have to declare the return type of a constructor? | 20:05 | |
moritz_ | huh? | ||
lue | How do I evaluate a piece of code as being ok in a test? | ||
moritz_ | isBEKaml: sorry, I'm a bit distracted at the moment | ||
what do you mean with "as ok"? | |||
diakopter | pmurias: it's on the list to fix.. | 20:06 | |
the mental list | |||
afk& | |||
lue | test to see if it works, such as this [which should fail]: | 20:07 | |
sub f(Array @a){...} | |||
moritz_ | dies_ok { code }, 'description'; | ||
like this? | |||
lue | And then for a success, it's something like eval_ok ? | ||
moritz_ | lives_ok | ||
isBEKaml | lue: for more, look at Test.pm. Easy to read (I don't know p6, either) | 20:08 | |
:) | |||
lue | thank you. | ||
20:09
Ross^ left
|
|||
snarkyboojum | shuteye& | 20:09 | |
20:09
Ross^ joined
|
|||
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)» | ||
lue | rakudo: sub f(Array @a) { say @a;}; my @b = 1,2,3; f(@b) | ||
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)» | ||
moritz_ | that's correct | 20:11 | |
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 | |
20:12
Ross^ left
|
|||
BrowserUk | ? | 20:12 | |
moritz_ | isBEKaml: grep/ack | ||
20:13
Ross^ joined
|
|||
BrowserUk | Hey moritz | 20:13 | |
moritz_ | hi BrowserUk | ||
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. | ||
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. | ||
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:15 | |
moritz_ | ack '(sub|method).*!fill\b' | 20:16 | |
finds src/builtins/Seq.pir pretty quickly | |||
isBEKaml | moritz_: I'm using find . -type f -exec fgrep fmt {} + | 20:17 | |
:) | |||
20:17
kcwu left
|
|||
moritz_ | isBEKaml: cpan -i App::Ack # welcome to the 21st century | 20:17 | |
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): | ||
sub f(:$a, :$b) {...}; | |||
when the advent was written, this automagically makes every forced named parameter optional | 20:19 | ||
jnthn | That's still troo. | ||
pmurias | BrowserUk: a legal one? | ||
phenny | pmurias: 20:14Z <BrowserUk> tell pmurias do you have a link to the ebook version of Erlang Programming? | ||
jnthn | rakudo: sub f(:$a, :$b) { say "look I'm ok!!!" }; f | ||
p6eval | rakudo 9a15b8: OUTPUT«look I'm ok!!!» | ||
[Coke] | ʘ‿ʘ | 20:20 | |
20:20
meteorja1 left
|
|||
lue | AAH! | 20:20 | |
20:21
pmurias left,
pmurias_ joined,
pmurias_ is now known as pmurias
|
|||
lue | Oh, wrong test I thought keeled :) . Guess I need *eval*_dies_ok then. | 20:21 | |
20:21
rv2733 left
|
|||
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... | ||
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 | |
[alternatively, I can wait to upload the test] | |||
moritz_ | sure, fudge it | ||
20:31
Charlie joined,
Charlie is now known as Guest12194
20:32
Guest12194 is now known as Ross,
Ross^ left,
Ross left,
Ross joined
20:34
masonkramer joined,
meteorjay joined
|
|||
pugssvn | r30758 | lue++ | [t/spec] Updated Day 9 Advent test to actually test Day 9 bits of code | 20:36 | |
isBEKaml | rakudo: my $temp = any(3,2,5); my $another = $temp * 2; say $another.eigenstates; | 20:38 | |
p6eval | rakudo 9a15b8: OUTPUT«6410» | ||
lue | Dankon, kaj FDK [later I might feel like undfudging Day 9 Advent :)] | 20:42 | |
.btw(FDK = For de Klavaro) | |||
20:42
meteorjay left
20:46
cognomore joined
|
|||
isBEKaml | rakudo: (3&5&8).WHAT.perl.say; | 20:50 | |
p6eval | rakudo 9a15b8: OUTPUT«Junction» | ||
moritz_ | EWRONGFILENAMEINBACKTRACE | 20:54 | |
isBEKaml | huh? | ||
moritz_ | in some local back traces | ||
current instr.: 'perl6;Seq;!fill' pc 14956 (src/builtins/Code.pir:161) | 20:55 | ||
ajs | That should probably have its own error code ;-) EEWRONGFILENAMEINBACKTRACEINBACKTRACE | ||
jnthn | That's...very wrong. :-| | 20:56 | |
isBEKaml | :) | ||
moritz_ | there's not a single occurence of !fill in Code.pir | ||
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 | ||
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» | ||
moritz_ | ah | ||
20:59
zorgnax joined
|
|||
moritz_ | that's how you do it :-) | 20:59 | |
ajs | oh nice | ||
moritz_ | (it's not specced | ||
jnthn | But it is useful. :-) | 21:00 | |
ajs | I'll take it ;) | ||
jnthn has found and fixed bugs with that | |||
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! | ||
jnthn | :-) | 21:02 | |
zorgnax | so its just a way to specify what the language is, I cant run it yet | ||
moritz_ | sure you can | ||
ajs | * step 4 may involve time travel, rendering steps 1 and 2 hypothetical | ||
moritz_ | std: <a b c> | ||
p6eval | std 30758: OUTPUT«ok 00:01 114m» | ||
moritz_ | std: <a b c | 21:03 | |
isBEKaml | as for time travel, have a look at tardis! | ||
p6eval | std 30758: OUTPUT«===SORRY!===Unable 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» | ||
jnthn | STD.pm6 gets translated to Perl 5. Rakudo also has a grammar that is a lot like STD an converging with it. | ||
Rakudo's grammar engine is bootstrapped - it parses itself. | |||
moritz_ has been chasing bugs in the wrong method for the last two hours | |||
jnthn | moritz_: Oh, ouch. :-( | 21:04 | |
zorgnax | my heads going to explode | ||
moritz_ | my $x = 3; Q:PIR { $P0 = find_lex '$x'$P2 = box 3 $P0[0] = $P2 } | 21:05 | |
rakudo: my $x = 3; Q:PIR { $P0 = find_lex '$x'$P2 = box 3 $P0[0] = $P2 } | |||
p6eval | rakudo 9a15b8: OUTPUT«set_pmc_keyed() not implemented in class 'Integer'current instr.: '_block14' pc 29 (EVAL_1:0)» | ||
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... | ||
bkeeler | Hallo folks! | ||
moritz_ | isBEKaml: it means that parrot screwed up. Or rakudo, or boh :( | 21:06 | |
jnthn | hi bkeeler! | ||
moritz_ | \o/ | ||
21:07
gbacon left
|
|||
jnthn | moritz_: Are you attached to what's in the "=head1 Unpacking" section of subs-n-sigs.pod? | 21:07 | |
moritz_: I find it kinda confusing-ish. | |||
moritz_ | jnthn: feel free to improve it any way you like | 21:08 | |
(including ripping it out :) | |||
jnthn | moritz_: OK, will try and do so :-) | ||
moritz_: After that, we're much of the way through having subs-n-sigs.pod in decent shape. | |||
dalek | ok: e4f473a | jonathan++ | src/subs-n-sigs.pod: A little explanation about why signature introspection might be useful, to |
||
isBEKaml | moritz_: I don't understand it at all. I see core.pir, run.pir - unknown file and HLLCompiler lower level gobbledygook... :( | ||
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? | ||
jnthn | ajs: It's a bug in present Rakudo. | 21:09 | |
ajs | Oh, OK. Cool. As long as it's not me misunderstanding. | ||
jnthn | No, it should work. | ||
bkeeler | jnthn: do you have any idea why the following doesn't work? | 21:10 | |
rakudo: class C does Associative does Positional { } | |||
p6eval | rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» | ||
moritz_ | ajs: it's something I'm working on as we speak | ||
jnthn | bkeeler: erm | ||
bkeeler: wtf :-/ | |||
moritz_ | but it's not trivial | ||
jnthn | bkeeler: I don't know why. | ||
bkeeler: But I'm a tad surprised. | 21:11 | ||
rakudo: class C does Associative { } | |||
p6eval | rakudo 9a15b8: ( no output ) | ||
jnthn | rakudo: class C does Positional { } | ||
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. | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
jnthn | rakudo: role A { }; role P { }; class C does A does P { } | ||
p6eval | rakudo 9a15b8: ( no output ) | ||
bkeeler | rakudo: class C does Associative ; use MONKEY_TYPING; augment class C does Positional { } | ||
p6eval | rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» | ||
moritz_ | ajs: that's a pain as-is, I know | ||
21:11
whiteknight left
|
|||
jnthn | oh | 21:11 | |
bkeeler: I know | |||
bkeeler: Bet it's an error reporting FAIL. | 21:12 | ||
bkeeler | This is the roadblock for making Capture do Positinal and Associative | ||
jnthn | bkeeler: Or related fail. | ||
ajs | no worries. I'm thick-skinned when it comes to debugging | ||
jnthn | rakudo: class C does Associative does Positional { method of() { Mu } }; say "lived"; | ||
p6eval | rakudo 9a15b8: OUTPUT«get_attr_str() not implemented in class 'Sub'current instr.: 'perl6;Code;multi' pc 13975 (src/builtins/Num.pir:234)» | ||
jnthn | ah, it's deeper | ||
Damm. | 21:13 | ||
bkeeler confused jnthn! o/ | |||
jnthn | :-P | ||
moritz_ | $ ./perl6 -e '"ab0" ~~ /(.)/; say $/{0}' | ||
a | |||
jnthn | ergh | ||
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 | ||
moritz_ | ajs: it depends on the color scheme, iirc | ||
arnsholt | Yeah, my vim doesn't do that either | ||
moritz_ | ajs: "my" vim doesn't do that | ||
bkeeler | I don't have that problem with vim | ||
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. | ||
isBEKaml | ajs: give :nohlsearch | ||
that should fix it.. | |||
jnthn | moritz_: Oh? That's...unexpected. | ||
ajs | ah thanks isBEKaml | ||
jnthn | bkeeler: ah | 21:16 | |
I think I know what's up with it | |||
21:16
cognomore left
|
|||
moritz_ | jnthn: irclog.perlgeek.de/perl6/2010-05-22#i_2358731 yes, set_pmc_keyed. sigh. | 21:19 | |
jnthn | moritz_: I'm...a tad perplexed by that. | ||
moritz_: oh | 21:20 | ||
moritz_: Actually, that's not the case, I don't think | |||
(more) | |||
moritz_ | or am I doing something execptionally stupid there? | ||
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
|
|||
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 | |
See src/pmc/default.pmc - I get it's in there. | |||
moritz_ | thanks | ||
jnthn | np | ||
Sorry, I missed the detail the first time I glanced at the Rakudo output. | |||
moritz_ | no problem | 21:22 | |
jnthn | bkeeler: | ||
> class C does Positional does Associative { } | |||
Method 'of' collides and a resolution must be provided by the class | |||
> class C does Positional does Associative { method of() { Mu } } | |||
> | |||
\o/ | |||
21:26
pmurias left
|
|||
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)» | ||
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>; | ||
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)» | ||
isBEKaml | what's wrong? named captures don't work? | ||
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
|
|||
isBEKaml | moritz_: oh.. :( | 21:32 | |
moritz_ | wow, adding {set,get}_pmc_keyed_int to Mu.pir causes new dimensions of fails | ||
ajs | rakudo: my %x; say %x<apple> :exists; | ||
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)» | ||
ajs | is that not the exists syntax? | ||
jnthn | ajs: No adverbs on postcircumfixes yet; in Rakudo use %x.exists('apple') | 21:33 | |
ajs | oh, cool | ||
thanks | |||
jnthn | (In fact, no operator adverbs in general.) | ||
21:34
zorgnax left
|
|||
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)» | ||
dalek | ok: 82782ca | moritz++ | src/subs-n-sigs.pod: [subs] remove duplicated words |
||
BrowserUk | phenny: seen ruoso? | ||
21:36
moritz_ sets mode: +v dalek
21:40
jakk left
|
|||
isBEKaml | is there any way I can test out my changes without having to build? | 21:40 | |
bkeeler | jnthn: \o/ | ||
moritz_: also \o/ | |||
isBEKaml | for instance, any changes i make to Seq.pm goes into core.pm. So I have to build.. :( | ||
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 | ||
isBEKaml | moritz_: compile just one, not all. dev switches could be made available? | 21:42 | |
moritz_ | isBEKaml: compiling the setting separately is non-trivial | ||
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... | ||
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 :/ | ||
isBEKaml: I've tried to implement it once, and failed | 21:45 | ||
diakopter | bkeeler: somehow I doubt you're correct. | 21:46 | |
bkeeler | diakopter: about what? | ||
diakopter | the last thing you said. | ||
bkeeler | diakopter: Oh, about pmichaud's tuit supply | ||
21:46
ShadeHawk joined
|
|||
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 :/ | ||
ShadeHawk | After reading perlgeek.de/en/article/5-to-6 I have one question: how to create empty list, and one-element list in Perl 6? | ||
jnthn | $x."$y"() | ||
ajs | Ah, ok. thanks jnthn | ||
jnthn | $x.$y() always assumes $y is a code object | 21:48 | |
moritz_ | ShadeHawk: () is an empty list | ||
ShadeHawk: and (1,) a one-item list | |||
rakudo: say (1,).elems | 21:49 | ||
p6eval | rakudo 9a15b8: OUTPUT«1» | ||
jnthn | Also, for one element, anything that puts a single element in list context will do that too. | ||
dalek | kudo: 1499f20 | jonathan++ | src/builtins/Code.pir: Since methods in Code.pir may also get called on Parrot subs, we should be |
||
ShadeHawk | moritz_, jnthn: thanks | ||
jnthn | s/single element/single thing) | ||
bkeeler | Well, I pushed anway ;) | ||
jnthn | my @x = 1; # list context, so like my @x = (1,); | ||
bkeeler: ;-) | |||
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. | ||
bkeeler: Same. | |||
dalek | p-rx: f2c2f18 | (Bruce Keeler)++ | (5 files): Add support for interpolation in regexes |
||
p-rx: 96c2b36 | (Bruce Keeler)++ | (35 files): Merge remote branch 'upstream/master' into regex-interpolation |
|||
p-rx: 3664226 | (Bruce Keeler)++ | src/PAST/Compiler-Regex.pir: Make it work with Rakduo |
|||
p-rx: 0050310 | (Bruce Keeler)++ | src/PAST/Compiler-Regex.pir: Removed debugging line |
|||
p-rx: bbaab49 | (Bruce Keeler)++ | src/HLL/Compiler.pm: Merge remote branch 'upstream/master' into regex-interpolation |
|||
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. | ||
bkeeler | Perhaps I should have folded it into one commit. Will have to work on my git-fu | ||
I still don't grok rebase | 21:52 | ||
moritz_ | bkeeler: no need for squashing into one commit | ||
jnthn | bkeeler: But if it's what was agreed on from a previous review, then I guess fine to time out. :-) | ||
bacek | aloha | ||
bkeeler | It will need to make its way into parrot before I can give you the corresponding rakudo patch | ||
jnthn | o/ bacek | ||
bacek | jnthn, привет! | ||
bkeeler | hallo bacek | ||
21:52
ShadeHawk left
|
|||
bacek | bkeeler, hio. | 21:53 | |
bkeeler | Uh oh, we're back to privet bushes again? | ||
bacek | bkeeler, looks like you can help me with nqp :) | ||
bkeeler | I can? | ||
jnthn | bacek: Привет, как дела? :-) | ||
bacek | bkeeler, can you? :) | ||
jnthn, отлично! | |||
jnthn | \o/ | 21:54 | |
bkeeler | bacek: What can I do? | ||
bacek | \o/ | ||
moritz_ | bkeeler: if you 'make boostrap-files' and commit the changes, I can push them into parrot | ||
bacek | bkeeler, can you clone github.com/bacek/pir? | ||
moritz_ | I can do it too, but first I have to build a newer parrot | ||
which takes some time | |||
bacek | bkeeler, I have one reproducable bug (probably "hash ordering" related) | 21:55 | |
jnthn | moritz_: You going for it? | ||
(doesn't make sense for both of us to :-)) | |||
moritz_ | jnthn: aye | ||
jnthn | moritz_++ | ||
bacek | bkeeler, nopaste.snit.ch/20618 with little bit of description | 21:56 | |
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)» | ||
jnthn | Eww that's disgusting. | ||
bkeeler | moritz_: OK, done the bootstrap | 21:59 | |
22:00
Exodist joined
22:01
tlb joined
|
|||
moritz_ | bkeeler++ | 22:01 | |
bkeeler | bacek: How do I build this thing? | 22:02 | |
dalek | p-rx: b228f8f | (Bruce Keeler)++ | src/stage0/ (4 files): Make new bootstrap |
||
bacek | bkeeler, parrot setup.pir | ||
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:03 | ||
(With adjustments of nqp-rx.pbc path) | 22:04 | ||
22:04
kel__ left
|
|||
bacek | Test passed on my box with --hash-seed=2 and failed with "3" | 22:04 | |
22:05
Su-Shee left
|
|||
bkeeler | Hmmm | 22:07 | |
bacek | bkeeler, nopaste.snit.ch/20620 shorter version of test | ||
moritz_ | parrot r46901 includes the new nqp-rx version | 22:08 | |
bacek | Same "2" vs "3" hash seed problem. | ||
bkeeler | So what exactly does --hash-seed do? | 22:12 | |
bacek | bkeeler, set initial seed for parrot hashes. | 22:13 | |
bkeeler | So we're just make an otherwise hard-to-reproduce problem reproducable? | ||
moritz_ | right | ||
bacek | something like this | ||
colomon | bacek++ bkeeler++ | 22:14 | |
bkeeler | Hallo there colomon | ||
moritz_ | \o/ | ||
colomon | o/ | ||
22:14
moritz_ sets mode: +ooo bacek colomon bkeeler
|
|||
colomon | lurking here while I show my little guy music videos in a big window. ;) | 22:18 | |
moritz_ | :-) | 22:19 | |
jnthn | o/ colomon | 22:20 | |
colomon | \o | ||
jnthn opens up a La Trappe | 22:21 | ||
bkeeler praises Belgian beer | |||
bacek warming up with morning coffee | |||
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>"?? | ||
bacek | bkeeler, Leffe ftw! | ||
colomon | let the record show he watched five videos before deciding he really needed to be playing with the mouse. ;) | ||
isBEKaml | hi, colomon ! :) | 22:23 | |
jnthn | ajs: I was just failing to fix that bug. :-/ | ||
moritz_ -> bed | |||
colomon | isBEKaml: shouldn't you be in bed? :) | ||
ajs | oh heh | ||
colomon | 'night, moritz_ | ||
isBEKaml | colomon: way long past time.. :) | ||
ajs | Is there a better way to flatten lists? | ||
or at least a working way? ;) | |||
isBEKaml | Nite moritz_ | ||
colomon | jnthn: what's the deal? | ||
jnthn | colomon: Turns out we stick the generated meta-op subs in @BLOCK[0].loadinit(...) | 22:24 | |
colomon: So if we have | |||
{ [~] ... }; { [~] ... }; | |||
We've a problem. | |||
Erm | |||
Actually not that | |||
If it's namespace. | |||
*namespaced | |||
class A { [~] used in here }; class B { [~] used in here } | |||
ajs | Ah, so I could write a global list-flattener sub. | 22:25 | |
jnthn | We only generated the meta-op once | ||
ajs | that'll work for now | ||
jnthn | ajs: Yeah, as a workaround | ||
colomon | jnthn: woah | ||
jnthn | colomon: Then we generate it, mark it as globablly generated in METAOPGEN | ||
But of course, it's namespace. :-( | |||
colomon | do we have a test for that? :) | ||
jnthn | Obviously not. | ||
I just tried to fix it | |||
And failed | 22:26 | ||
22:26
Exodist left
|
|||
jnthn | I figured putting it in @BLOCK[+@BLOCK -1] would do it | 22:26 | |
But we actually get a failure in the setting of all places then! | |||
BrowserUk backlogs; comes up empty but raises a glass of Duval in salute to jnthn. & | 22:27 | ||
jnthn | Duval - also a good one. :) | ||
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? | ||
colomon is starting to feel like should have gone to the party store earlier.... | |||
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. | ||
colomon: Maybe metaops.pm needs to come arlier in the bootstrap too. | |||
BrowserUk | jnthn: You are right Duvel. | 22:30 | |
(my typing is not good pre-Duvel. | |||
Nite all. | 22:31 | ||
colomon | o | ||
o/ | |||
22:31
BrowserUk left
22:32
Exodist joined
|
|||
jnthn | .oO( s/pre/post/ ? ;-) ) |
22:33 | |
colomon: Trying out the setting order tweak. | 22:34 | ||
colomon | jnthn+ | ||
jnthn | .oO( what could possibly go wrong ) |
||
colomon | jnthn++ | ||
.oO(this time for sure!) |
22:35 | ||
jnthn | .oO( Plz I can haz sharper circularity saw for Christmas? ) |
||
Grr, that didn't fix it. :-/ | 22:36 | ||
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... | ||
or anyone else who cares to for that matter | |||
jnthn | colomon: Can you remember where we set up != as an alias to !== ? | 22:40 | |
colomon | in actions.pm? | ||
jnthn | oh, I found it | ||
nah, it's in operators.pm | |||
...so metaops.pm maybe wants to come before operators.pm in the bootstrap. Hmm. | 22:41 | ||
Or maybe those aliases can get booted into metaops.pm. | |||
colomon: aha. Fixed. | 22:46 | ||
spectesting. | |||
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"]» | ||
ajs | That's perfectly sane | 22:51 | |
grr... something is off | |||
22:52
meteorjay joined
|
|||
ajs | In my code I "return @a, <host>" and get [[@a], 'host'] | 22:52 | |
isBEKaml | ajs: looks like you haven't interpolated your variables. | 22:53 | |
ajs | interpolated in what sense? | 22:54 | |
isBEKaml | rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say "@b"; #this.. | ||
p6eval | rakudo 1499f2: OUTPUT«@b» | ||
isBEKaml | rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say @b[]; #this.. | ||
p6eval | rakudo 1499f2: OUTPUT«123457» | ||
isBEKaml | rakudo: my @a=<1 2 3>; my @b = @a, <4 5 7>; say "@b[]"; #this.. | ||
p6eval | rakudo 1499f2: OUTPUT«1 2 3 4 5 7» | ||
isBEKaml | see the quotes there.. :) | ||
ajs | Oh, sorry. I was shorthanding... | ||
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 | ||
No, no I figured it out! | |||
silly me | 22:57 | ||
isBEKaml | :) | ||
jnthn | ajs: It'll not flatten at the point of return, but it should flatten if you put it in list context. | 22:58 | |
ajs: It returns a Parcel, fwiw. | |||
ajs | yeah, my @a contained a list of lists | ||
jnthn | Parcels themselves maintain structure until something makes 'em not | ||
Ah, OK. :-) | |||
That'd do it too ;-) | |||
ajs | yep ;-) | ||
22:59
whiteknight joined,
Psyche^ joined
23:00
skangas left
23:02
jaldhar joined
23:03
Patterner left,
Psyche^ is now known as Patterner
|
|||
isBEKaml hits the sack. Night, folks (even as it's early morning here) :) | 23:05 | ||
lue | 'ello! | ||
night | |||
23:06
isBEKaml left,
whiteknight left,
whiteknight joined
|
|||
bkeeler | Heya lue | 23:07 | |
dalek | kudo: 5cb546e | jonathan++ | (2 files): Make sure that since we build meta-ops once globally, we install them at the top issue, so done a little re-ordering. |
23:13 | |
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 | ||
bacek: nopaste.snit.ch/20623 | |||
lue | [assuming, of course, everything is done right: changing the makefile appropriately, etc.] | ||
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 | ||
ajs | rakudo: sub a { return [ <1 2 3>, <4 5 6> ] }; for a() -> $x { say "List: $x" } | ||
p6eval | rakudo 1499f2: OUTPUT«List: 1 2 3 4 5 6» | ||
ajs | did I miss something there? Shouldn't that be List: [1, 2, 3] and List: [4, 5, 6]? | ||
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! | ||
bkeeler | Anyway, I'm out for the evening. See y'all anon | 23:26 | |
ajs | ciao bkeeler | ||
jnthn | ajs: BTW, 5cb546e fixed that bug you mentioned earlier. | 23:28 | |
(the one with the reduction ops) | |||
23:34
lestrrat is now known as lest_away,
lest_away is now known as lestrrat
|