»ö« | perl6.org/ | 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 moritz_ on 25 June 2010. |
|||
00:11
hercynium joined
00:17
yinyin joined
00:23
jferrero left,
yinyin left
00:29
songmaster joined
00:32
rgrau_ left
00:41
masonkramer joined
01:09
patspam joined
01:10
patspam left
01:14
[Coke] joined
|
|||
sorear | Has anyone tried to translate the YamlReference grammar to Perl 6? | 01:32 | |
01:39
PZt joined
|
|||
sorear | TimToady: Does a method call always have to account for the possibility that said method will be overriden with a version that has "is rw" arguments? | 01:44 | |
ie class Foo { method bar(int $x) { ... }; }; sub sam(Foo $a) { ...; $a.bar($y); ... }; ...; ...; ...; eval 'class Foo2 is Foo { method bar(int $x is rw) { ... }; }' | 01:45 | ||
01:59
bgoggin joined,
hmmm joined
02:01
bgoggin left
02:09
agentzh joined
02:20
masonkramer left
|
|||
hmmm | About Perls 6, and the choice between loading Parrot or Haskell to try it, what's advised foe Win32? | 02:22 | |
foe==for, typo... | |||
[Coke] | rakudo works fine on win32. | 02:23 | |
SFAIK. | |||
hmmm | no Parrot for Rakudo on Win32? | ||
maybe no haskell needed for PUGS also on Win32? | 02:24 | ||
Though i do like Haskell, and mayy load it anyways... | 02:25 | ||
02:29
masonkramer joined
02:30
lkk- joined
|
|||
[Coke] | yes, parrot builds on win32. | 02:31 | |
if you don't have a compiler, you can just grab strawberry perl. | 02:32 | ||
I have no idea what the current state of pugs is. | |||
02:36
ash_ joined
02:48
masonkramer left
02:54
hercynium left
02:57
alester joined
02:58
justatheory joined
|
|||
dalek | kudo: 9993ee9 | pmichaud++ | src/builtins/Parcel.pir: Refactor Parcel assignment to be lazier, use &infix:<=>. Fixes RT #75950. |
03:04 | |
03:04
lkk- left
03:05
tylercurtis joined
03:09
rcsheets joined
|
|||
tylercurtis | Is there anything in Perl 6 like the "[1]" in APL's "+/[1]m"(i.e., something that modifies operators/functions on arrays by causing them to operate on a different axis of a multi-dimensional array than they normally would, in this case, on the first axis(columns, if it's a matrix))? | 03:09 | |
[particle] | not in the spec, you'd have to build that | ||
03:09
jaldhar joined
|
|||
tylercurtis | I didn't expect there would be. Thanks. | 03:11 | |
[particle] | p6 stole some things from apl, but not that one | 03:12 | |
hmmm | I see, parrotWin32+Rakudo is the needed combo for Perls6 on Win32. | 03:20 | |
03:20
lkk- joined
|
|||
hmmm | PUGS looks like a version in December... interesting. | 03:21 | |
L8R, thxs! | |||
03:25
hmmm left
03:30
Bigshot joined
|
|||
ash_ | tylercurtis: how does that [1]m work in your example from APL? | 03:35 | |
pmichaud | sub abc(@pos) { say @pos.elems }; abc([1, 2, 3]); # valid, outputs 3? | ||
that should probably say "valid?" | 03:36 | ||
03:37
TiMBuS joined
|
|||
ash_ | 3 looks right to me... | 03:37 | |
rakudo: sub abc(@pos) { say @pos.elems }; abc([1, 2, 3]); # what does rakudo say? | 03:38 | ||
p6eval | rakudo d16a2f: OUTPUT«3» | ||
pmichaud | sub abc(@pos) { say @pos.elems }; 'a' ~~ /./; abc($/); # valid? outputs 0? | 03:40 | |
ash_ | $/ has no captures in the current regex, so... sure... | 03:41 | |
tylercurtis | ash_: normally, "+/m" would sum the last axis(rows) of the matrix, so, if m were "1 2 3\n4 5 6", it would be "5 7 9"(I think, I don't have an actual APL interpreter on hand), but "+/[1]m" would sum the first axis(columns) of the matrix, so, given the same value for m, it would be "6 15"(or maybe "6\n15", again, no APL implementation on hand). I think. | 03:42 | |
03:43
tedv left
03:46
Bigshot left
|
|||
ash_ | so your selecting the first column of the matrix, (say ((1, 2, 3), (4, 5, 6), (7, 8, 9))) and you want to add the first column? | 03:52 | |
lue | pmichaud: how's variable refactor going? I noticed the commit earlier. | 03:53 | |
pmichaud | lue: it's going a bit slower than I'd like.... there's lots of pieces that have to be fixed. | 03:56 | |
lue: but each piece I fix seems to close another ticket or two :) | |||
lue | it's sounds like something I would be interested in. Something about modifying a fundamental part of the interpreter I guess. :) | ||
rakudo: say ((1, 2, 3), (4, 5, 6), (7, 8, 9)).perl | |||
p6eval | rakudo d16a2f: OUTPUT«((1, 2, 3), (4, 5, 6), (7, 8, 9))» | 03:57 | |
lue | (hrm, I could swear () flattened...) | ||
pmichaud | it does flatten in item context | ||
rakudo: say ((1, 2, 3), (4, 5, 6), (7, 8, 9)).item.perl | 03:58 | ||
p6eval | rakudo d16a2f: OUTPUT«(1, 2, 3, 4, 5, 6, 7, 8, 9)» | ||
ash_ | wouldn't @m[0;*] give you a slice with the first column (assuming my @m[3;3]) | ||
lue | Ah well. For safety, I'll always use [] | 03:59 | |
rakudo: my @a = [ [1,2,3], [4,5,6], [7,8,9] ]; say @a[0;*].perl | |||
p6eval | rakudo d16a2f: OUTPUT«Method 'Num' not found for invocant of class 'Block' in 'infix:<<>' at line 283:CORE.setting in 'infix:<<>' at line 555:CORE.setting in 'postcircumfix:<[ ]>' at line 1083:CORE.setting in main program body at line 1» | ||
ash_ | master doesn't do multi-dimensional arrays currently | ||
i forget if alpha did or not... | 04:00 | ||
pugs: my @a[3;3]; | |||
p6eval | pugs: OUTPUT«***  Unexpected ";" expecting "_", fraction, exponent, term postfix, operator or "]" at /tmp/SbgnSqgOkL line 1, column 8» | ||
ash_ | alpha: my @a[3;3]; | ||
p6eval | alpha 30e0ed: OUTPUT«Confused at line 10, near "[3;3];"in Main (file <unknown>, line <unknown>)» | ||
ash_ | std: my @a[3;3]; | ||
p6eval | std 31481: OUTPUT«ok 00:01 109m» | ||
ash_ | yeah, i think thats just not yet implemented | 04:01 | |
pmichaud | rakudo has never done multdim arrays | ||
tylercurtis | ash_: What "+/[1]m" does is add all of the columns together. with ((1,2,3), (4,5,6), (7,8,9)), the result should be (1+4+7, 2+5+8, 3+6+9). | ||
ash_ | oh, like that, got ya | ||
lue | .oO(Then I guess matrix multiplication is out of the question) |
||
ash_ | @m.grep: { [+] @_ }; #? | 04:02 | |
me shrug just thinking | 04:03 | ||
ash_ shrug* | |||
does grep flatten? | |||
tylercurtis | rakudo: my @m = [1,2,3], [4,5,6], [7,8,9]; @m.map([+] *).perl.say | 04:06 | |
p6eval | rakudo d16a2f: OUTPUT«(6, 15, 24)» | ||
ash_ | there ya go, thats not to bad | 04:07 | |
pmichaud | rakudo: say (1,2,3) Z (4,5,6) Z (7,8,9); | 04:09 | |
p6eval | rakudo d16a2f: OUTPUT«No applicable candidates found to dispatch to for 'infix:<Z>'. Available candidates are::():(Any $lhs, Any $rhs) in main program body at line 11:/tmp/eSDz5bCi4S» | ||
pmichaud | urgh. | ||
rakudo: say (1,2,3) Z (4,5,6); | 04:10 | ||
p6eval | rakudo d16a2f: OUTPUT«142536» | ||
lue gets the crazy idea that Z is supposed to chain | 04:12 | ||
pmichaud | it's supposed to be list associative, iirc | ||
we probably need variadic slice context | 04:13 | ||
rakudo: say ((1,2,3) Z (4,5,6)).perl; | 04:15 | ||
p6eval | rakudo d16a2f: OUTPUT«(1, 4, 2, 5, 3, 6)» | ||
pmichaud | that's wrong also, I think. | ||
should be parcels | |||
ciphertext | pmichaud: see rt.perl.org/rt3/Ticket/Display.html?id=75818 | 04:17 | |
pmichaud | fixing the two-arg form is pretty easy. | 04:18 | |
I'm wondering if I can do the three-arg form. | |||
(er, n-arg form) | |||
04:29
eternaleye joined
|
|||
tylercurtis | rakudo: ([>>+<<] ([1, 2, 3], [4, 5, 6])).perl.say | 04:39 | |
p6eval | rakudo d16a2f: OUTPUT«[[5, 7, 9]]» | ||
tylercurtis | rakudo: ([>>+<<] ([1, 2, 3], [4, 5, 6], [7, 8, 9])).perl.say | ||
p6eval | rakudo d16a2f: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 113:CORE.setting in 'hyper' at line 136:CORE.setting in 'reducewith' at line 1 in main program body at line 1» | ||
tylercurtis | rakudo: ([>>+<<] \[1,2, 3], \[4, 5, 6], \[7, 8, 9]).perl.say | 04:42 | |
p6eval | rakudo d16a2f: OUTPUT«[[[12, 15, 18]]]» | ||
tylercurtis | rakudo: my @m = [1,2,3], [4,5,6], [7,8,9]; ([>>+<<] @m).perl.say | 04:43 | |
p6eval | rakudo d16a2f: OUTPUT«Sorry, sides are of uneven length and not dwimmy. in 'hyper' at line 113:CORE.setting in 'hyper' at line 136:CORE.setting in 'reducewith' at line 1 in main program body at line 1» | ||
mberends | [>>+<<], now that's a good looking operator (maybe there's a single Unicode character for that ;) | ||
songmaster | rakudo: say [+] 1, 2, 3 | 04:48 | |
p6eval | rakudo 9993ee: OUTPUT«6» | ||
songmaster | Strange, my perl6 installation responds with "Could not find sub &prefix:<[+]>" | 04:49 | |
ciphertext | songmaster: i'm getting that too: it seems to be a new REPL bug | ||
mberends | commute -> $work | 04:51 | |
songmaster | ciphertext: Thanks, I though I was going crazy... | ||
tylercurtis | songmaster, ciphertext: I've gotten that sometimes, too. It usually stops happening if I close my REPL and start it again, though. | ||
tylercurtis has no idea why... | |||
ciphertext trying that | |||
> [+] 1,2,3; | 04:52 | ||
6 | |||
o.O | |||
weird | |||
songmaster | Ditto; strange. | ||
ciphertext | although, i actually tried that once earlier, and it didn't work that time... | 04:53 | |
ingy | pmichaud: when you terminate a ec2 running instance, does it blow away all your work? | 04:55 | |
pmichaud | ingy: yes. There's a way to use a different storage type to keep your work, I think (i.e., mounted volumes) | 04:56 | |
ingy: I haven't tried it yet. | |||
ingy | pmichaud: so I can't turn this thing off without nuking my whole setup, eh? | 04:57 | |
pmichaud | uec-images.ubuntu.com/releases/10.04/release/ has a list of available ubuntu images -- I think the ones that say 'ebs' have some sort of persistant storage available. | 04:58 | |
04:58
synth joined
|
|||
songmaster | rakudo: say [||] 0,0; say [||] 0,1; say [||] 1,0; say [||] 1,1 | 04:58 | |
p6eval | rakudo 9993ee: OUTPUT«0111» | ||
04:58
Mowah joined
|
|||
songmaster | rakudo: say [&&] 0,0; say [&&] 0,1; say [&&] 1,0; say [&&] 1,1 | 04:59 | |
p6eval | rakudo 9993ee: OUTPUT«===SORRY!===Could not find sub &infix:<&&>» | ||
hejki | rakudo: say 0 && 0 | ||
p6eval | rakudo 9993ee: OUTPUT«0» | ||
songmaster | Bingo! I have not managed to get [&&] to work yet. | ||
hejki | rakudo: say [+] 5,1,3 | 05:00 | |
p6eval | rakudo 9993ee: OUTPUT«9» | ||
tylercurtis | songmaster: That's because infix:&& and infix:and aren't actually defined. &&, ||, and, and or are implemented specially in the grammar. I'm about to submit a patch on RT to define sub forms of && and and, though. | 05:02 | |
05:03
synth left
|
|||
songmaster | tylercurtis: Thanks, I'll do a work-around then. | 05:03 | |
ciphertext | tylercurtis: looks like someone beat you to it: rt.perl.org/rt3/Ticket/Display.html?id=76206 | 05:05 | |
tylercurtis | ciphertext: yay! I don't have to learn to use RT yet. | 05:08 | |
05:10
synth joined
05:15
synth left
|
|||
hejki | rakudo: say [and] 0,1 | 05:19 | |
p6eval | rakudo 9993ee: OUTPUT«===SORRY!===Could not find sub &infix:<and>» | ||
hejki | ahh.. what tylercurtis said about those :P | 05:20 | |
05:22
jhuni joined
05:23
agentzh left
|
|||
dalek | kudo: aea3bbc | pmichaud++ | src/Perl6/ (2 files): Add statement_mod_cond:sym<when>. Resolves RT #75916. |
05:29 | |
05:32
alester left
05:33
kaare joined,
kaare is now known as Guest94095
05:41
eternaleye left
05:46
synth joined
|
|||
tylercurtis | Is "[@a, @b]" the idiomatic way to concatenate two arrays together in Perl 6? | 05:59 | |
06:06
justatheory left
|
|||
pmichaud | tylercurtis: (@a, @b) | 06:08 | |
tylercurtis: [@a, @b] also works if you want an array instead of a list. But most people would consider (@a, @b) to be a bi tmore canonical, I think. | |||
tylercurtis | rakudo: my @a = 1, 2, 3; my @b = 4, 5, 6; (@a, @b).perl.say | 06:09 | |
p6eval | rakudo 9993ee: OUTPUT«([1, 2, 3], [4, 5, 6])» | ||
06:10
xinming joined
|
|||
tylercurtis | pmichaud: (@a, @b) appears to produce a nested list, at least in Rakudo. Should it not do that? Or is there something I'm failing to understand(most likely option)? | 06:12 | |
06:15
synth left
06:17
synth joined
06:20
xinming left
|
|||
pmichaud | it's not a nested list | 06:20 | |
it only looks that way because of the way that .perl works (which I disagree with atm) | |||
rakudo: my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = (@a, @b); say @c.perl; | 06:21 | ||
p6eval | rakudo 9993ee: OUTPUT«[1, 2, 3, 4, 5, 6]» | ||
pmichaud | currently .perl forces arrays to be display with [ ] | ||
*displayed | |||
note the difference: | |||
my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = (@a, b); my @d = [@a, @b]; say @c.elems; say @d.elems; | 06:22 | ||
rakudo: my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = (@a, b); my @d = [@a, @b]; say @c.elems; say @d.elems; | |||
p6eval | rakudo 9993ee: OUTPUT«Could not find sub &b in main program body at line 11:/tmp/z7SGd8jhbx» | ||
pmichaud | rakudo: my @a = 1, 2, 3; my @b = 4, 5, 6; my @c = (@a, @b); my @d = [@a, @b]; say @c.elems; say @d.elems; | ||
p6eval | rakudo 9993ee: OUTPUT«61» | ||
pmichaud | there. | ||
dalek | kudo: 05684c0 | pmichaud++ | src/Perl6/Actions.pm: Change handling of return value in empty statementlist. Partially resolves RT |
06:26 | |
06:31
xinming joined
06:34
foodoo joined
06:40
synth left
06:41
synth joined
06:47
synth left
06:50
synth joined,
pmichaud joined
06:55
synth left,
synth_ joined,
Helios left
06:58
colomon joined,
eiro joined,
thepler joined,
tomaw joined,
Gothmog_ joined,
opx^away joined,
card.freenode.net sets mode: +o colomon
06:59
synth_ left,
synth joined
|
|||
cosimo_ | how do I convert a Match object to a Str ? | 07:05 | |
moritz_ | ~$/ | 07:08 | |
or $/.Str | |||
hejki | Match() has method .Str now? | 07:09 | |
moritz_ | rakudo: say ('abc' ~~ /../).Str | ||
p6eval | rakudo 05684c: OUTPUT«ab» | ||
hejki | nice | ||
cosimo_ | $0.Str worked, thanks | ||
moritz_ | hejki: pmichaud and I fixed Match objects for the last release | ||
cosimo_ | it's fantastic! LWP::Simple now uses MIME::Base64 for HTTP basic auth support | ||
hejki | last time i updated my anydice.pl Match() didn't have that method :> | ||
moritz_: ahh nice :) | |||
07:10
Helios joined
|
|||
cosimo_ | \o/ | 07:10 | |
moritz_ | \o/ | 07:11 | |
cosimo_++ # LWP::Simple, and blogging about it | |||
cosimo_ | now I need chunked transfers support, and it'll be even usable | 07:15 | |
07:18
songmaster left
07:26
Su-Shee joined
07:28
synth left,
synth joined
07:41
Guest94095 is now known as kaare_
07:53
eternaleye joined
08:03
Ross joined
|
|||
sorear | phenny: tell hmmm pugs has been effectively dead for >1 year. There are more recent releases, but only to track incompatible changes in GHC Haskell | 08:03 | |
phenny | sorear: I'll pass that on when hmmm is around. | ||
08:30
felipe joined
08:31
clintongormley joined,
eternaleye left
08:40
dakkar joined
08:42
Ross left
08:44
eternaleye joined
08:49
thebird joined
|
|||
_sri | trading my firstborn for non blocking sockets! | 08:52 | |
imarcusthis | what if it's a girl? | 08:58 | |
_sri | hmm | 08:59 | |
then i have to raise the offer by a cow or so? | 09:00 | ||
moritz_ | copy on write FTW! | 09:01 | |
09:02
lkk- left
|
|||
cosimo_ | moritz_: is proto.perl6.org updated regularly from proto's master tree? | 09:09 | |
moritz_ | cosimo_: yes | ||
cosimo_ | made a change there, hope it's useful | ||
sorear | _sri: as it happens, I adopted blizkost specifically to be able to use non blocking sockets from Rakudo, and succeeded. | ||
09:11
proller joined
|
|||
moritz_ | cosimo_: I've now triggered an update there manually | 09:11 | |
cosimo_++ # nice update. It bothered me too at one point, but not enoough to fix it :-) | 09:12 | ||
cosimo_ | moritz_: what about ufo's make install ? | 09:16 | |
that's next in my list | 09:17 | ||
is that done already? | |||
moritz_ | cosimo_: ufo && make install should work | ||
cosimo_: with a sufficiently recent ufo | |||
cosimo_ | i need to update ufo then | ||
yes :) | |||
moritz_ | github.com/masak/ufo/commit/293547c...a97dc0111f | ||
github.com/masak/ufo/commit/f5ddb07...331d70593a | |||
09:18
plobsing left
|
|||
arnsholt | I like yapsi's icon ^^ | 09:18 | |
09:20
Guest37381 left
09:21
jhuni left
|
|||
cognominal | pmichaud++ # fixing bugs | 09:24 | |
cosimo_ | moritz_: mmh, do i need 'make install-src'? | 09:25 | |
09:26
tylercurtis left
|
|||
kaare_ | Anyone with some parrot-fu who can decipher this parrot/t/library/pg.t into something rakudo? | 09:29 | |
09:29
azert0x joined
|
|||
kaare_ | The central section seems to be load_bytecode 'postgres.pir' + load_bytecode 'Pg.pir' and then by Parrot magic there is a cl = new 'Pg' | 09:29 | |
I know there is a load_bytecode in rakudo. But does that help me? | 09:30 | ||
arnsholt | You can call parrot opcodes from Perl 6 in rakudo with pir::opcode | 09:31 | |
kaare_ | Please pretend I know nothing about Parrot ;-) | 09:32 | |
arnsholt | For example, you could do pir::load_bytecode("postgres.pir") | ||
kaare_ | OK, so far so good. How do I create a new Pg object? | 09:33 | |
afaics that is what's going on in the parrot test file with cl = new 'Pg' | 09:34 | ||
pir::new('Pg') ? | 09:35 | ||
... nope | 09:41 | ||
09:53
pragma_ left,
pragma_ joined,
pragma_ is now known as Guest48110
09:54
Guest48110 left,
Guest48110 joined
|
|||
sorear | cognominal: I just got what appears to be a reply to a bug report autopost in my inbox | 09:54 | |
cognominal: did you mean to send it as an actual bug report addition? | |||
09:55
Guest48110 is now known as pragma_
|
|||
sorear | #76068 | 09:55 | |
09:57
masak joined
|
|||
masak | oh hai, #perl6! | 09:57 | |
sorear | hello masak! | 09:58 | |
09:59
gbacon joined
10:00
shade\ left
|
|||
arnsholt | kaare_: You might have to specify the signature of the opcode (there can be several variants) | 10:01 | |
10:01
cygx joined
|
|||
arnsholt | Try pir::new__ps | 10:01 | |
10:02
cygx left
|
|||
masak | wow, I noticed from the commit log that pmichaud++ was active yesterday. now I see it in the RT messages! :) | 10:05 | |
10:05
cygx joined
|
|||
jnthn | oh hai #perl6 | 10:05 | |
jnthn back from his ickle trip | |||
masak | what's an ickle? | 10:06 | |
welcome back, jnthn! | |||
cygx | hi | ||
jnthn | masak: slang for "little" :-) | ||
masak | ah. figures :) | ||
sounds like something a mother would say to a toddler :) | |||
sorear wonders what to make of the trend where people use their native writing systems for From: on English mailing lists | |||
jnthn | Yes, well, I did visit my mum. :-) | 10:07 | |
sorear | on the one hand, Unicode FTW | ||
jnthn managed to be in six different countries in the last 5 days | |||
sorear | on the other hand, it's hard to keep characters straight when they are all identified as <hanzi><hanzi><hanzi> | ||
arnsholt | sorear: OTOH, "what are these people called?" | ||
masak | sorear: maybe those foreigners will finally learn to read hanzi. :P | 10:08 | |
arnsholt | But there are so many of them! =) | 10:09 | |
masak | arnsholt++ # ambiguity | 10:10 | |
10:10
mberends joined
|
|||
arnsholt | Oh, heh. Pun not intended, actually ^^ | 10:10 | |
sorear | Right. Yes. Hanzi. And Cyrillic. And Icelandic. And Greek. And Arabic. And ... | ||
masak | lolitsmberends! | ||
moritz_ | oh hai | 10:11 | |
mberends | oh hai from $work in .nl! | ||
jnthn | Wow, pmichaud++ had quite a commitfest yesterday! | ||
hi mberends :-) | 10:12 | ||
masak | sorear: I think it's a positive trend. even when you transcribe Chinese names, it requires effort to tell them apart. so the latin alphabet doesn't fully solve the problem either. | ||
jnthn: yes! whatever he ingested, we need to send him more of that. :P | |||
jnthn | .oO( pivo ) |
||
More likely a few gallons of Dr Pepper. :-) | 10:13 | ||
moritz_ | masak: sub pmichaud(@tuits --> Code) { $magic } :-) | ||
arnsholt | sorear: Icelandic is ok. Just ð and þ | ||
masak | :) | ||
make $magic # :) | |||
arnsholt | Arabic and Hanzi is probably the hardest for me | ||
masak | arnsholt: I'd like to learn en.wikipedia.org/wiki/Devanagari | 10:15 | |
sorear | arnsholt: icelandic orthography is so different from english orthography that the similarity of the underlying character sets is lost to me | ||
I mean, sure, I can read it | |||
but it has no mnemonic value | 10:16 | ||
masak | this symbol frightens and fascinates me: en.wikipedia.org/wiki/File:JanaSans...ddhrya.svg | ||
sorear | (to this native english speaker, &c) | ||
10:16
sftp joined
|
|||
arnsholt | Oh, right. The names are so similar to Norwegian I don't have that problem | 10:16 | |
masak | talk about a ligature! | ||
arnsholt | Yeah, but that's an intentionally perverted example | ||
sorear | NFG is fun stuff | 10:17 | |
arnsholt | Devanagari is pretty straightforward. And the ligatures aren't really used in Hindi | ||
It's only in Sanskrit ligatures are mandatory | |||
masak | oh! | ||
arnsholt | Of course, Sanskrit is an awesome language. But I would say that, I suppose =) | 10:18 | |
masak | while we're on the topic of complex scripts... en.wikipedia.org/wiki/File:Bi%C3%A1...cript).svg | ||
I believe that character has been discussed here before. | |||
sorear | 2010.06.22.17.37.44 <@darbelo> P<LATIN CAPITAL LETTER O WITH FIVE UMLAUTS AND A HAT>ST | ||
masak | at least I recall TimToady dissecting it. | 10:19 | |
sorear | I wonder if I should submit that to ParrotQuotes | ||
masak | sorear: please do! | ||
moritz_ | please do :-) | ||
arnsholt | Whoa. Not that's complicated =) | ||
sorear | well, it was a conversation that involved me | ||
moritz_ | so what? | 10:20 | |
sorear | so I might not be authorized? | 10:21 | |
moritz_ | you are. | ||
masak | it's not Wikipedia :) | ||
10:22
mmcleric joined
|
|||
bbkr | can I achieve in pure P6 something that P5 Moose offers: "has 'x' => ('lazy' => 1, 'default' => \&some_sub_that_sets_x )" ? | 10:23 | |
sorear | no. | ||
you probably will be, eventually | |||
masak | why does all of JimmyZ's bug reports involve augmenting Str and then looping on a range of strings with numbers in them? :) | ||
sorear | but Moose is (understandably) a lot more mature on the finer points of classes | ||
masak | s/does/do/ | ||
bbkr | sorear: thanks | 10:24 | |
masak | I believe rt.perl.org/rt3/Public/Bug/Display.html?id=76202 is invalid. am I right? | ||
sorear | in current Perl 6, the standard way to do that is to tie $x to a cusrom container that lazily self-initializes | ||
moritz_ | bbkr: it will be a simple matter of has $.x = lazy { foo() }; | ||
10:24
liuchong joined
|
|||
sorear wonders how to make that work with clearers | 10:24 | ||
and predicates. especially and predicates. | 10:25 | ||
bbkr | moritz_: awesome syntax :) | ||
sorear | The circularity saw strikes again. I need to allow non-containerized returns from FETCH. | 10:26 | |
liuchong | ls | ||
sorear | Password: | ||
moritz_ | no such file or directory. | ||
sorear | Input/output error | ||
I wonder if containers should be a native type. Implementing FETCH as a completely ordinary method is raising many circularity saw issues, and the spec doesn't actually talk about custom container *types* at all | 10:27 | ||
moritz_ | how do I check the presense of a contextual variable in NQP without dying if it doesn't exist? | 10:28 | |
arnsholt | moritz_: I suspect pir::somethingorother | 10:30 | |
sorear | trac.parrot.org/parrot/wiki/ParrotQuotes last entry | 10:31 | |
moritz_ | sorear: can't method calls on the container type use a more primitive, non-overridable container? | 10:32 | |
sorear | moritz_: I use containers as part of the calling convention. Containers which need to be FETCHed | 10:33 | |
also, TimToady wants me to make absolutely everything augmentable | |||
moritz_ | he learned his p5 lesson well :-) | 10:34 | |
10:34
eternaleye left
|
|||
kaare_ | arnsholt: At least that got me one step further :-) | 10:39 | |
10:41
frmadem joined
|
|||
frmadem | Hey how can I help? | 10:41 | |
arnsholt | kaare_: Good, good | ||
masak | frmadem: in many ways! welcome. | ||
10:41
shade_ joined
|
|||
moritz_ | frmadem: the question is more, what do you want to do? | 10:42 | |
frmadem: write Perl 6 modules? documentation? blogging? | |||
kaare_ | I kinda naively hoped to have a perl6 object, but my $dbh = $pg.connectdb(''); returns an error, | ||
frmadem | I'm a Spanish perl developer | ||
masak | frmadem: most of the ways involve getting a copy of Rakudo and becoming gamiliar with it. | ||
s/gamiliar/familiar/ | |||
kaare_ | Null PMC access in invoke() | ||
moritz_ | kaare_: try say $pg.connectdb('').WHAT | 10:43 | |
kaare_: and tell me what kind of error it produces :-) | |||
frmadem | Iwould like to test some already developed modules in Perl6 | ||
masak | frmadem: here's a list: proto.perl6.org/ | 10:44 | |
moritz_ | frmadem: that's a good start | ||
frmadem | I've already got a rakudo copy from the git repository | ||
10:44
pmurias joined
|
|||
kaare_ | moritz_: The same :-( | 10:44 | |
Null PMC access in invoke() | |||
frmadem | I've tested some of the features, running well in my Mac | 10:45 | |
masak | frmadem: some projects on that list work in Rakudo today. others are old and not updated after the last refactor. so you're likely to find things that need fixing. | ||
cognominal | rakudo: "{}" # :) | ||
p6eval | rakudo 05684c: OUTPUT«Null PMC access in get_string() in main program body at line 11:/tmp/OBctzGOoQZ» | ||
masak submits rakudobug | |||
cognominal++ | |||
10:45
liuchong left
|
|||
moritz_ | frmadem: of my modules that there some which could use more tests... | 10:46 | |
frmadem | problem is i'm not familiar with parrot vm | ||
moritz_ | there's the json module | ||
you don't need to be, for writing tests | |||
masak | frmadem: intimate knowledge with Parrot is not needed. | ||
I know fairly little about Parrot, but I can still read and write Perl 6 code :) | |||
frmadem | Right I can try to port my Json module to perl 6 | ||
? | 10:47 | ||
It's okay | |||
? | |||
masak | frmadem: there is a JSON::Tiny already... | ||
moritz_ | but of course diversity is encouraged | ||
github.com/masak/svg/ needs tests | |||
masak | oh, certainly. | 10:48 | |
moritz_ | github.com/moritz/CGI-Application needs tests | ||
masak | frmadem: give it a shot. writing grammars is fun, except when it's frustrating. :P | ||
frmadem | All right take a look... mucas gracias | ||
mucas/muchas | |||
10:48
felliott left
|
|||
masak | :) | 10:49 | |
masak shudders to think what a "mucas gracias" looks like... | |||
frmadem | ps. I found grammars an explendid idea... | ||
hasta luego!! | |||
10:50
frmadem left
|
|||
jnthn | masak: I was trying not to think that. :P | 10:50 | |
masak | jnthn: sorry :P | ||
jnthn: sometimes a little knowledge is a dangerous thing... :) | |||
moritz_ | grammars are just like programming: you need quite some experience with them to be able to write more than 3 lines at once without it all blowing up | 10:51 | |
now, how much grammar experience do you have, compared to your normal programming experience? | |||
kaare_ | how do I see the class of an object? I don't even know that :-( | ||
kaare_ hugs good ole perl5 ;-) | 10:52 | ||
moritz_ | kaare_: say $thing.WHAT | ||
kaare_: if you have some code to share, I can take a look and try to help you a bit | |||
kaare_ | moritz_: oh. So I don't have an object from my $pg = pir::new__ps("Pg"); | 10:53 | |
moritz_ | kaare_: that might be because you're in the wrong HLL namespace | 10:54 | |
kaare_: Perl 6 code runs in the 'perl6' HLL, Pg is in the 'parrot' HLL | |||
masak | is rt.perl.org/rt3/Ticket/Display.html?id=76142 a dupe of rt.perl.org/rt3/Ticket/Display.html?id=63786 ? | ||
sorear out | 10:56 | ||
jnthn | masak: ano | ||
masak merges | 10:57 | ||
moritz_ | kaare_: github.com/cosimo/perl6-digest-md5/...est/MD5.pm contains an example of how to call some parrot stuff out of the parrot HLL | ||
kaare_ | moritz_: nopaste.snit.ch/21628 | ||
jnthn | If you're looking at Postgres from Perl 6, you may also be interested in github.com/jnthn/zavolaj/blob/maste...lclient.p6 | ||
kaare_ | jnthn: I am and I am | 10:58 | |
jnthn | Ah, OK | 10:59 | |
moritz_ | kaare_: looking at it... but first I have to compile a new rakudo, my current one is broken :) | ||
kaare_ | moritz_: All OK. Just note that it fails in line 5. | ||
jnthn: thanx | |||
dalek | meta: r351 | stefa...@cox.net++ | trunk/vicil/Kernel.cs: [vicil] As a concession to circularity, FETCH and STORE become responder |
11:00 | |
bbkr | is there working P6 phaser that does the same functionality as Moose BEGIN{} block, or do I have to overload new() method? | ||
kaare_ | back to $$$ work. & | 11:01 | |
11:01
xinming_ joined
|
|||
moritz_ | bbkr: what do you want to do with it? (I'm not too familiar with Moose) | 11:01 | |
arnsholt | Not sure what Moose's BEGIN blocks do, but if you want to run code when an object is constructed, implement method BUILD | ||
moritz_ | s/method/submethod/ | ||
arnsholt | Right you are =) | 11:02 | |
I should probably fix that in Algorithm::Viterbi | 11:03 | ||
11:03
xinming left
|
|||
masak | lunch & | 11:04 | |
11:04
masak left
|
|||
bbkr | arnsholt: yes, I want to run some code when object is constructed. but it found something that looks like a bug; | 11:12 | |
rakudo: class ConditionBlock { has Int $.id; method BUILD { $.id = 666; }; }; ConditionBlock.new(); # why read-only ? | |||
p6eval | rakudo 05684c: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'ConditionBlock::BUILD' at line 11:/tmp/LWTYBgAyhj in main program body at line 11:/tmp/LWTYBgAyhj» | ||
jnthn | has Int $.id is rw; | 11:14 | |
or use $!id = 666; | |||
But make it a submethod | 11:15 | ||
moritz_ | or | 11:16 | |
bbkr | rakudo: class X { has Int $.id; method BUILD { $.id = 666} } X.new # jnthn - but this one works, while previous one doesn't ? | ||
p6eval | rakudo 05684c: ( no output ) | ||
moritz_ | has Int $.id = 666; | ||
bbkr | $.id is rw by default, isn't it? | 11:18 | |
moritz_ | nope | ||
bbkr | rakudo: class X { has Int $.id; method BUILD { $.id = 666; }; }; X.new | ||
p6eval | rakudo 05684c: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'X::BUILD' at line 11:/tmp/cp70pg547y in main program body at line 11:/tmp/cp70pg547y» | ||
bbkr | ?! I just added few semicolons :) | ||
rakudo: class X { has Int $.id; method BUILD { $.id = 666; } }; X.new | 11:19 | ||
p6eval | rakudo 05684c: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'X::BUILD' at line 11:/tmp/Flmay942pR in main program body at line 11:/tmp/Flmay942pR» | ||
bbkr | rakudo: class X { has Int $.id; method BUILD { $.id = 666 } }; X.new | ||
p6eval | rakudo 05684c: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'X::BUILD' at line 11:/tmp/gBZkgzfxzz in main program body at line 11:/tmp/gBZkgzfxzz» | ||
bbkr | rakudo: class X { has Int $.id; method BUILD { $.id = 666 } } X.new | ||
p6eval | rakudo 05684c: ( no output ) | ||
bbkr is confused. why adding semicolon after class definition made $.id read-only? | 11:20 | ||
moritz_ | bbkr: I guess without the semicolon it is mis-parsed | 11:21 | |
bbkr: and then for some strange reason X.new isn't actually run, and $.id is always read-only | |||
bbkr | rakudo: class X { has Int $.id; method BUILD { $.id = 666 } } say X.new.id # checking for misparsing | 11:22 | |
p6eval | rakudo 05684c: OUTPUT«===SORRY!===Confused at line 11, near "class X { "» | ||
moritz_ | kaare_: I've created trac.parrot.org/parrot/ticket/1692 | ||
bbkr | moritz_: you're right (again). is this a bug? spec doesn't force semicolons after class blocks. | 11:23 | |
moritz_ | std: class X { has Int $.id; method BUILD { $.id = 666 } } X.new | 11:24 | |
p6eval | std 31481: OUTPUT«===SORRY!===Method call found where infix expected (omit whitespace?) at /tmp/KVuVqGABwZ line 1:------> nt $.id; method BUILD { $.id = 666 } } X⏏.new expecting infix or meta-infixParse failedFAILED 00:01 114m» | ||
moritz_ | bbkr: spec says that after a } either a newline or a ; is required | ||
bbkr: but it's a bug that rakudo doesn't complain about it | 11:25 | ||
bbkr reports | |||
moritz_ | bbkr++ | ||
cognominal | is there a way to print the rakudo git version and the parrot svn version from rakudo? | 11:31 | |
moritz_ | cognominal: nope; there's a patch for that in RT, but it's not applied yet | ||
parrot version is accessible though | |||
rakudo: say %*VM<config><revision> | |||
p6eval | rakudo 05684c: OUTPUT«47723» | ||
11:32
mmcleric left
|
|||
cognominal | I realize that my bug reports art about the "current" version which is not very helpful down the chain. | 11:33 | |
moritz_ | cognominal: the rakudo git hash is usually enough, if you use the recommended parrot revision from build/PARROT_REVISION | ||
kaare_ | moritz_: thanx | 11:34 | |
moritz_ | kaare_: I've also submitted a fix in parrot r47900 | 11:35 | |
arnsholt | .u U+FEFC | 11:36 | |
phenny | arnsholt: Sorry, no results | ||
arnsholt | .u FEFC | ||
phenny | U+FEFC ARABIC LIGATURE LAM WITH ALEF FINAL FORM (ﻼ) | ||
imarcusthis | .u BEEF | 11:39 | |
phenny | U+BEEF HANGUL SYLLABLE BBEGS (뻯) | ||
imarcusthis | .u CAFE | ||
phenny | U+CAFE HANGUL SYLLABLE JJWAELM (쫾) | ||
imarcusthis | boring | ||
moritz_ | .u DEAD | 11:40 | |
phenny | U+DEAD (No name found) | ||
imarcusthis | .u FEED | ||
phenny | U+FEED ARABIC LETTER WAW ISOLATED FORM (ﻭ) | ||
imarcusthis | .u FADE | ||
phenny | U+FADE (No name found) | ||
kaare_ | moritz_: downloading now | 11:41 | |
moritz_ | kaare_: mind you, I only tested the reduced PIR form... no idea if the Perl 6 example works now | 11:42 | |
11:42
felliott joined
|
|||
kaare_ | moritz_: That's why I download now :-) | 11:42 | |
moritz_ | :-) | ||
imarcusthis | .u ACED | 11:43 | |
phenny | U+ACED HANGUL SYLLABLE GOLT (곭) | ||
colomon | So, I just forked LastOfTheCarelessMen's Vector and ABC to try to port them to current Rakudo. github.com/colomon/Vector has my first wave of changes. ufo++ | 11:45 | |
phenny | colomon: 27 Jun 06:15Z <ciphertext> tell colomon i've got series passing all (nonfudged) tests, and conforming to almost all of the spec. See nopaste.snit.ch/21602 for details. (especially note the section at the bottom). | ||
colomon | But I get this error: | ||
error:imcc:syntax error, unexpected '\n' | |||
in file 'EVAL_5' line 58 | |||
===SORRY!=== | |||
syntax error ... somewhere | |||
kaare_ | moritz_: I'll give you a ping when it's tested | ||
colomon | make: *** [lib/Vector.pir] Error 1 | ||
anyone have a clue what could be doing that? | |||
11:49
envi^home joined
11:52
kfo left,
xinming joined
|
|||
jnthn | colomon: Not without seeing the PIR that's generated | 11:53 | |
11:55
xinming_ left
|
|||
takadonet | morning all | 11:55 | |
11:56
ruoso joined
|
|||
moritz_ | kaare_: oh, it seems that the load_bytecode("postgres.pir") is interfering | 11:57 | |
kaare_: without it I have something working | |||
kaare_ | moritz_: ok, i just assumed it was necessary. | 11:59 | |
moritz_ | kaare_: nopaste.snit.ch/21629 | ||
says | |||
Pg;Conn | |||
whih means $con actually holds a connection object | |||
kaare_ | OK, I'll play with it later. Thanks | 12:01 | |
say $dbh.WHAT; still doesn't work though | 12:02 | ||
moritz_ | yes | ||
that's because it's not a Perl 6 object | |||
but a parrot object | |||
colomon | jnthn: --target=PIR ? | 12:03 | |
jnthn | --target=pir | ||
moritz_ | colomon: isn't that a .pir file alredy? | ||
jnthn | (think it only likes lowercase) | ||
moritz_ | 13:45 <@colomon> make: *** [lib/Vector.pir] Error 1 | 12:04 | |
Vector.pir looks like pir :-) | |||
colomon | fair enough, I don't know what magic ufo performs. ;) | 12:07 | |
errr, no it isn't. | |||
12:07
xinming left
|
|||
colomon | there doesn't seem to be any Vector.pir file. | 12:08 | |
12:08
ruoso left
|
|||
colomon | It gets that error generating Vector.pir | 12:09 | |
moritz_ | ah | ||
colomon | env PERL6LIB='/Users/colomon/tools/Vector/lib' /Users/colomon/tools/rakudo/perl6 --target=pir --output=lib/Vector.pir lib/Vector.pm | 12:10 | |
12:10
xinming joined
|
|||
colomon | is the command which generates the error. | 12:10 | |
jnthn | colomon: Does Vector.pm have any "use" of an already pre-compiled module? | 12:11 | |
colomon | MONKEY_TYPING doesn't count, does it? | ||
moritz_ | nope | 12:12 | |
colomon | then no, it's just | ||
use v6; | |||
use MONKEY_TYPING; | |||
jnthn | Ah :-( | 12:13 | |
My best guess was that it was loading a pre-compiled module that contained bad PIR. | |||
colomon | I'll try mucking about with the source and see if that affects anything. | 12:14 | |
in the meantime, if you'd like to play with it, the exact same source is up at github.com/colomon/Vector ... ;) | |||
moritz_ | what you can always try is to comment out large chunks of code and see when the error goes away | 12:15 | |
colomon | moritz_: that's exactly what I just did to make the error go away. | 12:16 | |
I suspect it might be the use of multi sub circumfix:<⎡ ⎤> | |||
moritz_ | I think that's NYI in master | ||
rakudo: multi sub circumfix:<[ ]>($x) { say $x }; [5] | |||
p6eval | rakudo 05684c: OUTPUT«5» | ||
moritz_ | huh | 12:17 | |
colomon | if that's the problem, worst error message ever.... | ||
but that definitely does it. If I comment out just that, the build continues to work. | |||
arnsholt | rakudo: multi sub circumfix:<⎡ ⎤>($x) { say $x }; ⎡5⎤ | 12:18 | |
p6eval | rakudo 05684c: OUTPUT«error:imcc:syntax error, unexpected '\n' in file 'EVAL_1' line 24665226===SORRY!===syntax error ... somewhere» | ||
colomon | now to see how badly make test splodes.... | ||
arnsholt++ | |||
arnsholt | Looks like it doesn't want to define new operators | ||
colomon | wow, make test really goes splode in a big way. | ||
arnsholt | rakudo: multi sub circumfix:<£ ¤>($x) { say $x }; £5¤ | 12:19 | |
p6eval | rakudo 05684c: OUTPUT«error:imcc:syntax error, unexpected '\n' in file 'EVAL_1' line 24665226===SORRY!===syntax error ... somewhere» | ||
arnsholt | Or it could be a Unicode problem (come to think of it) | ||
moritz_ | rakudo: multi sub circumfix:<foo bar>($x) { say $x }; foo 5 bar | ||
p6eval | rakudo 05684c: OUTPUT«error:imcc:syntax error, unexpected '\n' in file 'EVAL_1' line 24665226===SORRY!===syntax error ... somewhere» | ||
kaare_ | moritz_: I did get a real connection. At least I could create a table. | ||
moritz_ | kaare_: \o/ | 12:20 | |
kaare_: do you have a github ID? | |||
kaare_ | dont know of it's usable for anything though :-) | ||
moritz_ | well, it's a start. | ||
kaare_ | moritz_: Yes, my user id is kaare. Is that enough info? | 12:21 | |
moritz_ | hugme: add kaare to fakedbi | 12:22 | |
hugme hugs kaare. Welcome to fakedbi! | |||
moritz_ | kaare_: you can put a FakeDBD::pg into the fakedbi repo :-) | ||
kaare_ hugs hugme | |||
moritz_ | github.com/mberends/fakedbi/ | ||
12:23
filius joined,
ruoso joined
12:24
filius left
|
|||
colomon | huh. seems like user-defined operators in a module don't work at the moment? | 12:25 | |
mathw | don't work inside the module, or don't export properly? | 12:27 | |
12:27
ruoso left
|
|||
colomon | don't export properly | 12:28 | |
mathw | huh | ||
somehow I'm not surprised | |||
colomon | don't even parse properly after export, which maybe is a clue? | ||
moritz_ | colomon: not exporting is a known to me, but dunno if there's a ticket for it | 12:29 | |
colomon: problem is that 'use' doesn't really happens at compile time right now | 12:30 | ||
maybe that's not the whole problem | |||
it creates stubs for the lexicals it exports | |||
at that part it could modify the grammar | |||
12:31
ruoso joined
|
|||
pmichaud | good morning, #perl6 | 12:33 | |
takadonet | pmichaud: morning | 12:34 | |
mathw | lolitspmichaud! | 12:35 | |
12:35
kfo joined
|
|||
jnthn | morning, pmichaud | 12:36 | |
12:36
pnate joined
|
|||
jnthn | colomon: That's known (and why they're not marked done in ROADMAP) | 12:37 | |
12:38
masak joined
|
|||
pmichaud | 11:19 <bbkr> rakudo: class X { has Int $.id; method BUILD { $.id = 666 } } X.new | 12:40 | |
is being parsed as &infix:<X>(class ..., $_.new) | |||
12:41
audreyt joined,
ChanServ sets mode: +o audreyt
|
|||
mathw | oh my | 12:41 | |
12:41
audreyt is now known as audreyt__
|
|||
pmichaud | (hint: don't name your classes X, Z, Q, etc. :-) | 12:41 | |
mathw | Well I wasn't planning to, but it's a bit surprising | 12:42 | |
pmichaud | std: class X { has Int $.id; method BUILD { $.id = 666 } } X.new # curious | ||
p6eval | std 31481: OUTPUT«===SORRY!===Method call found where infix expected (omit whitespace?) at /tmp/1M7OQvOM75 line 1:------> nt $.id; method BUILD { $.id = 666 } } X⏏.new # curious expecting infix or meta-infixParse failedFAILED 00:01 114m» | ||
pmichaud | std++ again | ||
mathw | interesting | 12:43 | |
I'd think that once it saw 'class' it'd know that there's an indentifier or a block coming | |||
colomon | jnthn: any idea when we might have that? It makes Vector a complete non-starter. | ||
jnthn | colomon: I may get to work on it this week; if not, I can do it at the weekend | 12:44 | |
colomon | \o/ | ||
jnthn is has a hackathon at the weekend o/ | |||
12:44
skids joined
|
|||
colomon | I will be off-line for a week starting sometime over the weekend, but if you get it fixed after I'm gone, maybe someone else can pick up the ball on this one. | 12:46 | |
pmichaud | colomon: could we move the str2num et al methods into cheats? | 12:47 | |
for compile-time dec-number constants, I'd like to see us do the calculations at compile-time instead of runtime | 12:48 | ||
12:49
moritz_ sets mode: +oo pmichaud mathw
|
|||
colomon | I don't think we can unless we move Rat into NQP. | 12:49 | |
pmichaud | no | ||
colomon | well, I guess we could for Num constants. | ||
pmichaud | the Rat construction can continue to be runtime | ||
but the arguments to Rat could be compile-time | |||
colomon | sure. | ||
moritz_ | as long was we can calucate numerator and denominator without using Rats | ||
pmichaud | we can | ||
the str2num stuff just uses native parrot registers anyway | 12:50 | ||
we'd save a *lot* of time on dec-number constants if we didn't have to convert them from strings (every time they're used) | |||
colomon | the PIR routines should go into NQP very easily, no? | ||
pmichaud | I don't understand the "go into NQP part" | 12:51 | |
12:51
audreyt__ left
|
|||
masak | I was sure we had one like rt.perl.org/rt3/Ticket/Display.html?id=76226 , but I can't find it. | 12:51 | |
colomon | I mean, .... | ||
hmmm. | |||
pmichaud | I want to move the str2num-* subs into cheats | ||
give them ! prefixes (so they don't appear in the global namespace) | |||
moritz_ | masak: so was I | ||
pmichaud | then NQP can call them at compile time | ||
colomon | I'm trying to figure out what the non-cheating solution is. | ||
pmichaud | colomon: why? it's a cheat no matter what. | 12:52 | |
and the logic still has to be available at runtime. | |||
(for conversion of Str to numbers) | |||
masak | moritz_: it's a bit hard to search for. | ||
colomon | pmichaud: I guess I don't quite understand the ramifications of moving the routines around. but I certainly have no objections to do it, as long as numeric constants continue to actually work. | 12:55 | |
12:56
steffan joined
12:57
jaldhar left
12:58
perlygatekeeper joined
|
|||
pmichaud | I suppose I could also put some better str-to-num conversion code into nqp-rx itself, then re-use it from rakudo. | 12:59 | |
13:00
jaldhar joined
|
|||
moritz_ | when I do a 'my Int $x' declaration, where is the type constraint stored at compile time? | 13:00 | |
pmichaud | on the container for $x | ||
oh, wait | |||
at compile time | |||
moritz_ | I kinda expected it in the Past::Var | ||
pmichaud | I'm not sure it's stored at the moment. It will likely be in the symbol table that holds the reference to $x | ||
Parrot doesn't know about type constraints. | 13:01 | ||
13:01
masonkramer joined
|
|||
pmichaud | also, there's a PAST::Var for each usage of $x in a program, not a global one | 13:01 | |
it really belongs in the block's symbol table. | |||
(the symbol table could hold a link to the PAST::Var defining $x, but that's entirely up to the HLL) | |||
moritz_ | so I need to find the block which encloses the PAST I'm looking at | ||
pmichaud | in rakudo we have a subroutine for that | 13:02 | |
...well, we used to. | 13:03 | ||
NQP has an example of a way to do it. essentially, you walk through @BLOCK looking for the first one that has an entry in @BLOCK.symbol | 13:04 | ||
13:04
Zapelius joined
|
|||
moritz_ | is @BLOCK accessible after the action methods ran? | 13:04 | |
pmichaud | oh, you mean from the already-created PAST tree | 13:05 | |
moritz_ | ie in a compilation stage after PAST | ||
yes | |||
pmichaud | nope | ||
moritz_ | :( | ||
pmichaud | PAST::Compiler handles it by keeping a stack of nested Blocks as it traverses the tree. | ||
it also keeps a stash of all of the in-scope symbols | 13:06 | ||
moritz_ | so, the current state for compile-time optimizations in rakudo is "don't do", it seems | ||
or analysis, for that matter | |||
what I wanted to do is catching things like my Int $x = 'foo' | |||
and the code for finding &infix:<=>($var, $typed_thing) works | 13:07 | ||
but since there's no good way to get the type constraints of $var, a static check seems not a LHF at all | |||
pmichaud | adding a type constraint to the symbol isn't too difficult | 13:08 | |
I'm more curious about how one would detect/handle: my XYZ $x = 'foo' | |||
I guess we'd only check the known builtin types | 13:09 | ||
moritz_ | look up XYZ, if possible | ||
pmichaud | (for a first pass) | ||
moritz_ | and only if the lookup works, do the check | ||
pmichaud | where "do the check" is actually calling '&infix:<=>' ? | 13:10 | |
moritz_ | no, I thought about .ACCEPTS | ||
we should really have a long talk at YAPC::EU | 13:11 | ||
:-) | |||
pmichaud | definitely. :) | ||
anyway, off the top of my head, here's one thing I'd do | 13:12 | ||
one choice would be to add symbol table entries for each PAST::Block's outer block | 13:13 | ||
that would make walking up-the-tree simpler. | |||
this could be done as part of an optimization pass as well | |||
i.e., while walking down the past tree, establish outer links as appropriate. | 13:14 | ||
13:14
kaare_ left
|
|||
pmichaud | another possibility would be to build a stash in the block's symtable that keeps a list of all of the symbols in scope and references to their PAST::Var decl (if available) | 13:15 | |
there's nothing that says that the HLL compiler has to (or even should) build these structures... in some senses it's more generic for the optimizing passes to do it. | 13:16 | ||
moritz_ | depends on how much analysis it wants to do | ||
it just bothers me that we have to rebuild data structures that we already have in the action methods | 13:17 | ||
13:17
masonkramer left
|
|||
moritz_ | feels like there could be a better long-term solution | 13:17 | |
pmichaud | I'm not entirely sure about that (more) | ||
the action methods already have enough to keep track of, without also trying to manage a lot of cross-referencing structures | 13:18 | ||
13:18
mmcleric joined
|
|||
pmichaud | one advantage of doing cross-referencing after building the entire PAST structure is that it's "static" at that point | 13:18 | |
moritz_ | well, if the PAST tree held more information, the action methods could use that, and keep less state on their own | 13:19 | |
pmichaud | especially for Rakudo, while in the midst of a copmile the PAST structure is incredibly dynamic as the action methods are taking place. Keeping up with the cross-referencing structures (and patching them whenever a section needs to be moved/refactored) would be very difficult to keep straight. | ||
the PAST tree can already hold more information, yes. | |||
nothing blocks that. | |||
moritz_ | I guess I need to read more about PAST make useful changes (or suggestions) | 13:20 | |
pmichaud | keep in mind that PAST allows a HLL to put its own annotations in place | ||
PAST only puts minimal expectations on what goes in a block's symtable (i.e., it expects the symtable to hold "user-defined" information as well as the basic symbol list) | |||
it also allows each note to have its own set of annotations -- i.e., each PAST::Node is really a hash. | 13:21 | ||
s/note/node/ | |||
for example, it's perfectly okay for a PAST::Block's symtable to maintain a list of all symbols in scope, not just those defined within the block itself. Rakudo doesn't do this yet, but PAST doesn't prohibit it. | 13:23 | ||
moritz_ nods | |||
pmichaud | but I figured that requiring every HLL compiler to supply this information in order to make use of an optimization might place some extra burden on the hll compiler author. In some sense I think the optimization passes ought to be smart enough to deduce some of these things on their own. | 13:24 | |
or, more precisely, iwbni the optimization passes could deduce these things on their own whenever the hll compiler author doesn't provide them as hints. (If the hll compiler author provides appropriate hints, then the optimization passes can work better.) | 13:27 | ||
13:27
slavik joined,
plobsing joined
|
|||
jnthn | rakudo: {;}.WHAT.say | 13:28 | |
p6eval | rakudo 05684c: OUTPUT«Block()» | ||
13:30
gbacon left
|
|||
moritz_ | pmichaud: I'll talk to tcurtis about that (the gsoc student working on the parrot optimization framework) | 13:31 | |
13:34
redicaps joined,
steffan left
13:35
redicaps left
13:36
JimmyZ joined
|
|||
pmichaud | rakudo: " { a => 4 } ".say | 13:37 | |
p6eval | rakudo 05684c: OUTPUT« a 4 » | ||
bbkr | rakudo: (...).WHAT.say # WHAT returning empty string? seems weird, because spec says everything is derived from Mu. bug? | ||
pmichaud | rakudo: " { } ".say | ||
p6eval | rakudo 05684c: ( no output ) | ||
rakudo 05684c: OUTPUT«Null PMC access in get_string() in main program body at line 11:/tmp/usmP5SQR0Q» | |||
pmichaud | interesting. | ||
rakudo: say (...) ~~ Failure | |||
p6eval | rakudo 05684c: ( no output ) | ||
pmichaud | bbkr: ... is a failure | 13:38 | |
bbkr: invoking it causes the program to stop at that point | |||
(well, it causes the routine to return a failure) | |||
so the .WHAT is never being executed | |||
moritz_ | rakudo: say sub {...}.() ~~ Failure | ||
p6eval | rakudo 05684c: OUTPUT«===SORRY!===Confused at line 11, near "say sub {."» | 13:39 | |
13:39
mberends left
|
|||
moritz_ | rakudo: say (sub {...}).() ~~ Failure | 13:39 | |
p6eval | rakudo 05684c: OUTPUT«1» | ||
pmichaud | rakudo: say (sub { ... }).().WHAT | ||
p6eval | rakudo 05684c: OUTPUT«Failure()» | ||
bbkr | pmichaud: not a bug then, thanks. | ||
hmm, but Failure returned from main block should IMO set $? bash variable to 1, am I right? otherwise there is no way of checking if code failed in main block. | 13:42 | ||
pmichaud | it should at least not fail silently | 13:44 | |
bbkr | pmichaud: right. should i put it in RT queue for discussion? | 13:45 | |
pmichaud | bbkr++ | ||
(+1) | |||
13:49
RAT joined
|
|||
masak | rakudo: my $a = [1, 2, 3]; foo($a); bar($a); sub foo(@a) { say @a.perl }; sub bar(@a is copy) { say @a.perl } | 13:50 | |
p6eval | rakudo 05684c: OUTPUT«[1, 2, 3][[1, 2, 3]]» | ||
masak | that one's new, isn't it? | ||
masak submits rakudobug | |||
RAT | Did my suggestion of the converse of slurp=burp get into the standards yet? ;-) | 13:51 | |
jnthn | I thought splat was the latest suggestion. ;-) | 13:52 | |
pmichaud | masak: that one is interesting. I'm not sure it's a bug. | ||
masak | RAT: what should such a function do if it resks overwriting an existing file? | ||
mathw | pmichaud: it is quite surprising... | ||
masak | pmichaud: oh, come on! :/ | ||
mathw | although I suspect flattening would hide it in many cases | 13:53 | |
masak | pmichaud: going against my expectations is *always* a bug! :P | ||
moritz_ | rakudo: sub bar(@a is copy) { say @a.perl }; say bar [1, 2, 3] | 13:54 | |
masak | pmichaud: er. put differently, where does the spec say "putting 'is copy' on an array gives you an extra layer of array"? | ||
pmichaud | my $a = [1,2,3]; my @b = $a; say @b.perl; | ||
p6eval | rakudo 05684c: OUTPUT«[[1, 2, 3]]1» | ||
moritz_ | pmichaud: that's assignment | ||
pmichaud | it's the same logic by which | ||
moritz_ | pmichaud: signature binding is *binding* | ||
pmichaud | moritz_: except for is_copy | ||
it's the same logic by which | |||
my $b = [1,2,3]; sub xyz($x is copy) { $x[1] = 'b'; }; xyz($b); say $b.perl; | 13:55 | ||
rakudo: my $b = [1,2,3]; sub xyz($x is copy) { $x[1] = 'b'; }; xyz($b); say $b.perl; | |||
p6eval | rakudo 05684c: OUTPUT«[1, "b", 3]» | ||
masak | rakudo: my $a = 5; sub bar(@a is copy) { say @a.perl }; bar($a) | ||
p6eval | rakudo 05684c: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead in 'bar' at line 11:/tmp/zpKCBPqCXv in main program body at line 11:/tmp/zpKCBPqCXv» | ||
pmichaud | anyway, I can fix it. | ||
I agree that the other interpretation likely makes more sense. | |||
masak | pmichaud: if the above doesn't bind, why does my first line give double arrays? | ||
seems very arbitrary. | 13:56 | ||
pmichaud | I just said I wasn't certain of it. :-) | ||
masak | just trying to make you even less certain :P | ||
pmichaud | the "is copy" logic is still not completely nailed down, based on discussion with TimToady++ at yapc::na | ||
masak | I do see the parallel with attr arrays and :attr[]. by the way. | 13:57 | |
colomon was wondering about laziness and "is copy".... | 13:58 | ||
pmichaud | anyway, the one thing I *am* certain of is that "is copy" is not "binding". Indeed, the whole point of "is copy" is to avoid the bind. :-) | 13:59 | |
mathw | yes that's what I thought :) | ||
moritz_ | I thought it copied, and then binds | 14:00 | |
pmichaud | okay, one can think of it that way. :-) | ||
but it's not binding to the argument | |||
in the same way, my @b = $a; is a bind only in the sense that we bind the symbol '@b' to an array before doing the assign | 14:01 | ||
anyway, I know the fix. Should be one-line :) | 14:02 | ||
did the ticket get filed yet? | |||
14:02
alester joined
|
|||
masak | almost. :) | 14:03 | |
stop talking about it, and I'll file it. :P | |||
pmichaud | I'm compiling a fix now. :) | 14:04 | |
1-line fix. Actually, 0-line fix, just need to move a statement to a new location. :) | |||
14:04
skids left
|
|||
mathw | I think git might count that as two lines | 14:05 | |
one delete, one insert :) | |||
masak | :) | ||
mathw | obviously this is enormously important for pmichaud to know, lest he misunderstand how big his patch is | ||
masak | pmichaud: should become #76242. | ||
14:05
mmcleric_ joined
14:06
mmcleric_ left
|
|||
masak | yup :) | 14:06 | |
14:06
PacoLinux joined,
mathw sets mode: +o masak,
mmcleric_ joined,
mmcleric left,
mmcleric_ is now known as mmcleric
14:09
skids joined,
cygx left,
Guest23195 joined
|
|||
pmichaud | > sub xyz(@a is copy) { say @a.perl; }; xyz([1,2,3]); | 14:10 | |
[1, 2, 3] | |||
mathw | \o/ | 14:11 | |
pmichaud | > my $b = [1,2,3]; sub xyz(@a is copy) { @a[1] = 'x'; }; xyz($b); say $b.perl; | ||
[1, 2, 3] | |||
spectesting now. | 14:12 | ||
mathw | pmichaud++ | ||
masak | pmichaud++ | 14:13 | |
pmichaud | is Bool still an enum? (I'm looking at RT #76238) | 14:16 | |
we keep trying to make it into one, and failing. | |||
masak | by spec, it is. | ||
I've always thought that it's hard because Bool is so central, and keeps getting in the way of the circularity saw. | |||
jnthn | There's that. | ||
masak | enums are quite high-level in the implementaion. | 14:17 | |
jnthn | There's also been in the past other weird requirements on Bool that make it not just an enum iirc | ||
masak | Bools are quite low-level. | ||
jnthn: like what? | |||
jnthn | Like .succ and .pred on it | ||
Which I don't think would be on enum elements. | |||
masak | why not? | ||
that's be kinda nice. | |||
colomon | they need to be there, actually. | 14:18 | |
for range | |||
and probably series. | |||
jnthn | Further violates the "enum values behave like their underlying value" thingy. | ||
Unless we decide we want that in this case. | |||
colomon | Range is full of examples like Wed..Fri | ||
jnthn | Oh | ||
Then we probably do want to define them somehow | 14:19 | ||
But ugh | |||
How the heck to implement that nicely... | |||
colomon | Are you worried about the middle cases, or just the ends? :) | ||
jnthn | We'd make the enum values by taking the value and mixing some role into them, I guess | 14:20 | |
How does it then find its next value? | |||
Maybe go and look through the .mappings... | |||
colomon | I was under the vague impression they mapped to Ints, but I admit I haven't paid full attention to the enum spec updates. | 14:21 | |
pmichaud | can we go enum => Int => .succ => enum ? | ||
i.e., convert an enum to its int represetation, take the .succ of that, then go back to the enum? | 14:22 | ||
mathw | eeew | ||
jnthn | pmichaud: no | ||
pmichaud | why not? | ||
jnthn | consider the pair case. | ||
pmichaud | Day(3) doesn't work? | ||
jnthn | enum foo ( :a(1), :b(42) ); | 14:23 | |
1.succ isn't 42 :-) | |||
pmichaud | in that case, I'm not sure that a has a .succ | ||
mathw | that would lead to two kinds of enum | ||
and you'd never know what you had | |||
jnthn | If the succ was always "the next thing in the enum" then it can work | ||
mathw | yes | 14:24 | |
jnthn | But that means you can't go round-tripping to the base-type. | ||
[particle] | does p6 have sparse arrays natively? | ||
jnthn | S09 | ||
14:24
IllvilJa left
|
|||
moritz_ decommutes for a few hours | 14:24 | ||
mathw | Personally I'm all for anything that divorces enums from the base type as much as possible, provided the conversion's still possible if you really need it. I've seen far too much code which abused enums as ints to be comfortable with it. | ||
[particle] | if so, there must be some way to get to the next non-empty slot in the sparse array | ||
mathw | must there? | 14:25 | |
masak senses another slight tweat to the enum spec coming up... | |||
bbkr | rakudo: my @t=1; sub foo(@u is copy) { }; foo(@t[0..*]); # hmm | ||
[particle] | in order to efficiently traverse them, yes | ||
p6eval | rakudo 05684c: ( no output ) | ||
jnthn | masak: Heh. You start to understand why I avoid working on enums like the plague yet? :-) | 14:26 | |
pmichaud | anyway, back to my original question, is Bool ever going to make it to be an enum? ;-) | ||
[particle] | if my array has items at indexs 1, 1_000_000 and 1_000_000_000_000, i sure don't want to iterate naively | ||
mathw | I think a clearer idea of what enums are is required first... | ||
Bool might have to become a... something else | |||
masak | jnthn: nobody said you have to work on it like the plague... :P | ||
bbkr | rakudo: my @t=1; sub foo(@u is copy) { }; foo(@t[0..*]); say "works"; | ||
14:27
Zapelius left
|
|||
p6eval | rakudo 05684c: ( no output ) | 14:27 | |
mathw | jnthn: please don't, I like having enums and wouldn't want them all to die of a horrible fever | ||
jnthn | pmichaud: I've only been asking that for a couple of years. ;-) | ||
pmichaud | jnthn: me also :) | ||
jnthn | pmichaud: And enums are a moving target. | ||
mathw | that's the problem | ||
if enums were pinned down, then somebody could say 'yes, Bool is an enum' | |||
or 'no, Bool is not an enum' | |||
jnthn | The enum spec is like the IO spec imnsho. | ||
mathw | nah, the IO spec's worse :) | 14:28 | |
jnthn | Full of speculative "ooh wouldn't this be nice" | ||
mathw | and much, much more minefieldy IMO | ||
pmichaud | well, afaict, the reason that enums are a moving target is because we keep asking "so, how is it that Bool is an enum again?" 1/2 :-) | ||
jnthn | Rather than something straightforward and implementable. | ||
And then we can add things as people actually need them. | |||
pmichaud | i.e., every enum spec change has been in response to trying to figure out how Bool fits with it :) | ||
mathw | That might be a hint | ||
Maybe it means Bool isn't an enum | |||
masak | I mostly like the current enum spec very much. it's an improvement on the previous one. | ||
pmichaud | I like it as well. | 14:29 | |
So the iterative refinement is very good. | |||
But we're still left wondering about Bool :-) | |||
masak | neither of pmichaud and jnthn seem to think that Bool is an enum. | ||
maybe that's a hint too. | |||
jnthn | +1 to "it' snot an enum" | ||
pmichaud | I can think of Bool as an enum, I just keep getting nicked by the circularity saw | ||
jnthn | pmichaud: Exactly. | ||
er, it's not | 14:30 | ||
EPLAGUETHEMEWON'TGOAWAY | |||
pmichaud | actually, perhaps the answer is that while Bool is an enum, "bool" is not. | ||
jnthn | std: my bool $does-it-exist; | 14:31 | |
pmichaud | and we should be returning low-level bools | ||
p6eval | std 31481: OUTPUT«ok 00:01 111m» | ||
jnthn | pmichaud: That's also possible. | ||
pmichaud: In that case, how would bool and bit differ? | |||
std: my bit $does-it-exist; | |||
p6eval | std 31481: OUTPUT«ok 00:01 108m» | ||
mathw | jnthn: the difference is... er... symbolic constants? | ||
'bool' makes people think 'true or false' | |||
pmichaud | well, 'true' isn't a constant :) | 14:32 | |
mathw | the difference is mind control | ||
pmichaud | (in P6) | ||
oh, at least it wasn't. | |||
mathw | pmichaud: pfft you could make it one if you wanted to | ||
pmichaud | I think we s/true/so/ | ||
it used to be a low-level prefix | |||
mathw | oh yes, I remember that, dimly | ||
umm, I've lost the current enum spec | 14:33 | ||
masak | the main thing I like about the current enum spec is that you can get at the underlying EnumMap. | ||
I find it slightly... odd... that EnumMap ends up being the parent class of Hash in Rakudo. | 14:34 | ||
but oh well. | |||
14:35
plobsing left
|
|||
mathw | ah, found it | 14:35 | |
masak | maybe it's just named unfortunately. | ||
*ill-named | 14:36 | ||
frettled | mathw: we had a horrible punning session, involving also «make it so», of course. | ||
jnthn | masak: Well, Mapping was the parent class of Hash in master | ||
masak | jnthn: that's OK, methinks. | ||
jnthn: but a Hash has nothing to do with enums. | |||
jnthn | masak: But Mapping is gone, long live EnumMap | ||
masak: Tell that to anonymous enums. | |||
:P | |||
frettled | EA = Enumns Anonymous | 14:37 | |
masak | I can see a Hash generalizing to non-Str keys. can't see the same with EnumMap. | ||
mathw | well that's why Hash derives from, it adds stuff | ||
like mutability | |||
although it is kind of weird, I just accept it | 14:38 | ||
frettled | Nah, it's normal OO, ain't it? | ||
mathw | yeah, that's why I just accept it :) | ||
frettled | heh | ||
arnsholt | masak: Hash should definitely support non-Str keys. But that'd entail adding some methods to Any or some such I think | ||
mathw | I'm convinced that there's something wrong with OO pretty much everywhere, I just haven't figured it out yet | 14:39 | |
It might be because virtually everything isn't Smalltalk | |||
masak | indeed. | ||
bbkr | rakudo: perl6 -e 'class Maybe is Bool::True is Bool::False {}; say Bool::True; say Maybe'; # stupid example :P but Maybe calles in ~ context should return the same output as Bool::True | 14:43 | |
p6eval | rakudo 05684c: OUTPUT«===SORRY!===Confused at line 11, near "perl6 -e '"» | ||
bbkr | rakudo: class Maybe is Bool::True is Bool::False {}; say Bool::True; say Maybe; # stupid example :P but Maybe calles in ~ context should return the same output as Bool::True | ||
p6eval | rakudo 05684c: OUTPUT«1Maybe()» | ||
frettled | mathw: Smalltalk is just so unamerican, Bigtalk is more like it! ;) | ||
pmichaud decides he needs to re-read the updated enum spec | 14:44 | ||
masak | maybe the "why can't Bool be an enum is really two questions": (1) "what prevents us, with the current Rakudo, from creating an enum type MyBool which does all we want Bool to do?", and (2) "once we have such a type, what are the obstacles to putting it where Bool is now?" | 14:45 | |
all the circularity issues end up in the second part. | 14:46 | ||
pmichaud | masak: I was just trying that (1) | ||
masak | oh, nice. | ||
broquaint | docs/vendadocs/VendaProduction/Wire...ic_Content | 14:47 | |
mathw | I'm wondering where the circularity issues come from | ||
does enum itself require Bool in order to work? | |||
broquaint | very ww :S | ||
pmichaud | mathw: no, but lots of builtins and internals want True and False to work. | 14:48 | |
mathw | and enum requires some of those | ||
hmm | |||
True and False are pretty fundamental really | |||
14:49
skids left
|
|||
mathw | which leads back to 'bool' | 14:49 | |
pmichaud | rakudo: enum MyBool { MyFalse MyTrue }; say MyTrue.succ; | ||
p6eval | rakudo 05684c: OUTPUT«Could not find sub &MyBool in main program body at line 11:/tmp/k0WSSSWH7a» | ||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say MyTrue.succ; | 14:50 | |
p6eval | rakudo 05684c: OUTPUT«2» | ||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say MyTrue.name; | ||
p6eval | rakudo 05684c: OUTPUT«Method 'name' not found for invocant of class 'Integer' in main program body at line 11:/tmp/ebKr3V6byi» | ||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say MyBool; | 14:51 | |
p6eval | rakudo 05684c: OUTPUT«MyFalse 0MyTrue 1» | ||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say MyTrue ~~ MyBool; | ||
p6eval | rakudo 05684c: OUTPUT«0» | ||
14:51
skids joined
|
|||
mathw | this looks unencouraging | 14:51 | |
dalek | kudo: c18d372 | pmichaud++ | src/binder/bind.c: Fix @a is copy (and %h is copy) when passed a scalar array or hash. Fixes RT |
||
mathw & | 14:52 | ||
jnthn | pmichaud: Rakudo's current idea of enums is very much like what S12 has at the start of the enums seciton | ||
e.g. just sugar for a bunch of constants | |||
pmichaud | jnthn: that's fine with me, I'm exploring the spec. :-) | ||
14:52
timbunce joined
|
|||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say 0 ~~ MyBool; | 14:53 | |
p6eval | rakudo 05684c: OUTPUT«0» | ||
pmichaud | hmmm. | ||
masak | I suspect that one is filed. | ||
masak checks | |||
pmichaud | rakudo: enum MyBool < MyFalse MyTrue >; say MyBool.WHAT; | ||
p6eval | rakudo 05684c: OUTPUT«EnumMap()» | 14:54 | |
masak | pmichaud: guess it's a manifestation of rt.perl.org/rt3/Ticket/Display.html?id=75296 | ||
it's not even a bug really, more like a TODO. | |||
jnthn++ for making it work at all in the meantime. | |||
JimmyZ | hello, what's wrong with my bug report? | 14:55 | |
phenny | JimmyZ: 22 Jun 11:23Z <masak> tell JimmyZ if moritz_ is right, and I think he is, a BOM must've snuck into your src/core/metaops.pm -- maybe you've edited that file? | ||
masak | JimmyZ: hi. what do you mean "what's wrong..."? | 14:56 | |
JimmyZ | masak: I did a clean clone, and it builds now | ||
... I don't know... | |||
呵呵 | 14:57 | ||
masak | heh. someone on Twitter thinks Rakudo Star released already: twitter.com/exussum/status/17256454939 | ||
14:57
steffan joined
|
|||
jnthn | omg tweets from the future! :-) | 14:58 | |
masak | I told him this: twitter.com/carlmasak/status/17256876238 | ||
14:58
patspam joined
|
|||
pmichaud | it looks to me as though enum Day <Mon Tue Wed>; should create Day as a subclass of Int | 14:59 | |
or subtype | |||
(could be a role) | |||
ash_ | a more styled web shell for try.rakudo.org, with an index of the tutorial: greaterthaninfinity.com/frontend/ma...shell.html any comments? | ||
jnthn | pmichaud: I was expecting mixing in a role | ||
pmichaud | jnthn: okay, so it subclasses Int and mixes in a role? | 15:00 | |
jnthn | pmichaud: mixing in to an int automatically derives a subclass | ||
*Int | |||
So no need to do that first | |||
colomon | ash_: I like it, and my 22 month old does too (he's pointing in admiration at Camelia) | ||
masak | colomon: lol! | 15:01 | |
ash_ | if you type "chapter index" plus enter it shows the chapters now | ||
jnthn | That is, 42 does role { method enum { return $enummap } } or some such creates a subclass that composes the role, re-blesses the 42 object into it | ||
pmichaud: See operators.pm, infix:<does> | |||
masak | ash_: I would strongly advise against using hovering to show/hide things. that's been tried far too many times, and has led to madness in all documented cases. | 15:02 | |
jnthn | pmichaud: You may find anonymous roles are handy here, anyway | ||
pmichaud | jnthn: that feels odd. I have to think on it a bit. | ||
jnthn | pmichaud: Which bit? :-) | ||
ash_ | masak: alright, i'll try to find a better way of doing that | ||
masak | ash_: to be precise, showing/hiding things which *displace* other text is Wrong. | ||
ash_ | ya, i know what you mean | ||
it makes it feel jump | |||
jumpy* | |||
masak | also, it can lead to infinite update loops. | 15:03 | |
pmichaud | anyway, I'm going to leave Bool alone for now; will write a response to the recent ticket. | ||
masak | sort of like the CSS version of time paradoxes. | ||
pmichaud++ | |||
ash_: apart from that, I'm positively surprised (this is the first time I look) at how nice the design is, and how well it fits with the rest of perl6.org's "look". | 15:04 | ||
ash_++ | |||
ash_ | thats where i stole the styles for part of it :P (hope no one minds) | ||
pmichaud | on a related question.... what do we do with %hash.pick ? | ||
masak | ash_: au contraire, I suspect. | ||
pmichaud: pick a pair? | 15:05 | ||
jnthn | ash_: It looks nice | ||
ash_++ | |||
ash_ | i modified the colors some, but yeah, its the same basic stuff | ||
masak | I guess I *could* argue for "pick a key" as well, but pair feels righter. | ||
pmichaud | so, Bool.pick returns a bool, while Bool.enums.pick would return a Pair. | ||
masak | pmichaud: that makes sense. | 15:06 | |
pmichaud | (assuming Bool is an enum) | ||
masak | :) | ||
pmichaud | that's a pretty convincing case that an enum type is not an EnumMap :) | ||
(it may contain an EnumMap, but it isn't one) | |||
jnthn | pmichaud: Agree. | 15:07 | |
pmichaud | rakudo: enum Day <Mon Tue Wed>; say Day.pick; | ||
p6eval | rakudo 05684c: OUTPUT«Wed 2» | ||
pmichaud | rakudo: enum Day <Mon Tue Wed>; say Day.pick; | ||
p6eval | rakudo 05684c: OUTPUT«Tue 1» | ||
JimmyZ | rakudo: enum Day <Mon Tue Wed>; say Day.pick.WHAT; | 15:08 | |
p6eval | rakudo 05684c: OUTPUT«Pair()» | ||
JimmyZ | looks like array of pair? | ||
masak | bug? | 15:09 | |
oh wait. | |||
it's the same one again :P | |||
15:12
songmaster joined
15:13
tadzik joined
|
|||
pmichaud | ticket #76238 updated | 15:13 | |
masak | \o/ | 15:14 | |
I'm still in the camp favoring Bool as an enum type. | |||
pmichaud | I'm idly wondering if int ~~ Int | 15:15 | |
(and, by analogy, if bool ~~ Bool) | |||
masak | pmichaud: based on what sorear said TimToady said the other day, yes. | ||
jnthn | Given comments by TimToady recently, I suspect so. | ||
pmichaud | I'm pretty sure it would have to be that way. | ||
but I guess that also implies that int ~~ Cool and int ~~ Any | 15:16 | ||
masak | sure. | ||
jnthn | that's fine | ||
They just have to be boxed before you can call any methods on them. | |||
So by the time they're seen as an invocant in a Cool or Any method, they're an Int. | |||
pmichaud | so I'm wondering if we can make 'bool' work. | ||
or even 'int', for that matter. | |||
then our builtins could start returning bool | 15:17 | ||
masak | how does one create a bool? | ||
pmichaud | iiuc, it's just a bit | ||
masak | `my bool $b = 1`? | ||
pmichaud | internally, we'd probably use an int in parrot | ||
i'm more curious about what happens with &prefix:<?> then | 15:18 | ||
can it return a bool? | |||
ash_ | if anyone else wants a copy of the code i am using to do basic highlighting in the web shell, let me know, i can make it a separate entity | ||
pmichaud | (same for the other boolean-returning methods) | 15:19 | |
in fact, I wonder what would happen if we simply converted our existing "Bool" type to instead be "bool", and then (for now) derived Bool from it. | 15:20 | ||
15:20
jaldhar left
|
|||
pmichaud | do typed enums work in Rakudo yet? i.e., my Str enum .... ? | 15:20 | |
actually, deriving Bool from bool can't work, because bool ~~ Bool | 15:21 | ||
(at least, not in the inheritance notion of "derive") | 15:22 | ||
jnthn | pmichaud: The trouble is, I think we're not all the way there with these definitions yet. | 15:24 | |
pmichaud | jnthn: right, I'm trying to explore it a bit. | ||
jnthn | Take Num, for example | ||
(Because it's easiest one to discuss in isolation.) | |||
pmichaud | in particular, I think I can find the contradiction that results from trying to make a Bool an enum.) | ||
or at least find *a* contradiction that has to be resolved. | 15:25 | ||
jnthn | We'd say num ~~ Num | ||
masak | ash_: I typed 'my @a = <a b c>', and got 'my @a = ' in the history. perhaps needs an escaping step? | ||
ash_ | yup, haven't hit that issue yet, thanks | ||
jnthn | In that num is a constrained version of Num (constrained not by range of representable values in this case, but by representation) | ||
BUT | |||
I would also expected to have | |||
class Num { has num $.num; ... } | 15:26 | ||
That is, it has a low-level num inside it. | |||
pmichaud | oh, I don't quite expect that second part. | ||
I think that builtin types are allowed to cheat quite liberally on internal representation. | |||
I think they have to. | |||
15:26
redicaps joined
|
|||
jnthn | *sigh* | 15:26 | |
No, that's just nasty. | |||
masak | ash_: "123.456" is color-coded, but not "123e42" | ||
jnthn | OK, on what num means under the hood, yes, some cheating is fine. | 15:27 | |
masak | ash_: the history doesn't scroll to the bottom when there's more than a screenful. | ||
ash_ | hmm, i don't do the e syntax yet, i'll add that too | ||
masak | ash_: STD.pm6 is a good hint :) | ||
ash_ | which browser? | ||
jnthn | But we should know how, in Perl 6, to write class Num { ... } | ||
And define that it has some underlying storage | |||
masak | ash_: Google Chrome on a Mac. | ||
jnthn | Because, after all, we need to be able to define compact structs made up of natively typed attributes too. | ||
ash_ | its using javascript to scroll to the bottom... so that might be tricky | ||
hmm, i am using chrome on a mac too, i'll look into it | 15:28 | ||
pmichaud | jnthn: sure, but compact structs aren't invoking the circularity saw | ||
masak | ash_: it seems to scroll a part of the way down. | ||
pmichaud | defining Num in terms of num is. | ||
jnthn | pmichaud: Only because we define num in terms of Num | ||
pmichaud: That's the bit that makes me uncomfortable. | |||
pmichaud | it's a similar problem with int and Int | 15:29 | |
masak | ash_: I'm on the fence whether errors should have the little '→' prefix just like the results do. | ||
jnthn | It feels like the primitive types should be, well, the primitives. | ||
pmichaud | well, there's certainly little to prevent Num.ACCEPTS from special-casing num | ||
anyway, that wasn't where I was headed. | 15:30 | ||
for any my X enum Y .... | |||
jnthn | Yes, I wanted to avoid int vs Int at this point because Int has the added complexity of needing to handle big-ints too, iirc. | ||
pmichaud | we have that elements of Y ~~ X | ||
for example: my Int enum Day <Mon Tue>; Mon ~~ Int # true | |||
TiMBuS | kraih So #rakudo doesn't even support sockets yet and they are already porting cgi frameworks? I smell a marketing desaster. | 15:31 | |
jnthn | wtf | ||
TiMBuS | what is up with this FUDdery | ||
tadzik | no sockets? | ||
jnthn | Rakudo supports sockets. | ||
tadzik | trololololo… | ||
jnthn | Nice spelling desaster too ;-) | ||
TiMBuS | trolling on twitter? why i never | ||
pmichaud | I think the original author might be confusing "sockets" with "non-blocking sockets" | 15:32 | |
jnthn | pmichaud: I had once envisioned it along the lines of... | ||
TiMBuS | thats what im thinking | ||
15:32
pmurias left
|
|||
pmichaud | so, if we do my bool enum Bool <False True> | 15:32 | |
jnthn | Oh, hm | 15:33 | |
pmichaud | ah, it works differently for native types | ||
okay, so that's plausible | |||
I wish I knew what to call the "false" and "true" values of "bool" | |||
(i.e., as constants) | 15:34 | ||
are they just 0 and 1? since native values don't know their own type? | |||
jnthn | For non-native ones, I expected the implementation may be that the enum type name itself is a role that we generate. We then mix it in to each of the values, but with a different "current value" set | ||
pmichaud: Yes, I believe so | |||
pmichaud: I think the enum spec has some language on that | 15:35 | ||
pmichaud | jnthn: that's what I'm reading now :) | ||
masak | pmichaud: that's what I meant earlier with "how do you create a bool"? | ||
pmichaud | masak: yes | ||
ingy | I find it odd that this fails: nopaste.snit.ch/21637 | ||
jnthn | oh eww | ||
3 ~~ Day # True, using Day as a subset of Int | |||
masak | ingy: you must declare before you use. | 15:36 | |
ingy: it's the one-parse thing, you know. | |||
ingy | It masak that's what I find odd | ||
pmichaud | also, can't have two semicolon declarations in a single file. | ||
masak | ingy: Perl 6 is strictly one-pass. | ||
ingy: I wrote a long mail on p6l about it some months ago, and TimToady wrote a long email back :) | |||
pmichaud | i.e., it would need to be class Document::Section { ... } and not class Document::Section; | ||
jnthn | ingy: If you want to go "out of order" in terms of definitions, it's fine, but you need to declare a stub earlier. | 15:37 | |
15:37
macdaddy joined
|
|||
masak | ingy: here: www.nntp.perl.org/group/perl.perl6....33141.html | 15:38 | |
15:38
macdaddy is now known as Guest3330
|
|||
ingy | so when does the 'has' assignment actually happen? | 15:38 | |
pmichaud | okay, well, thinking about enums is very interesting, but it's not on the critical path for R* so I think I'll suspend it for now and work on something else :) | ||
ingy: when an instance is created, iirc. | |||
ingy | that's good | ||
at least what I wanted | |||
jnthn | ingy: What pm said - the thingy on the RHS is actually "thunked" | ||
Gets promoted to an anonymous method. | 15:39 | ||
So you can do like has $.a; has $.b; has $.c = $.a + $.b; | |||
15:39
sftp left
15:40
steffan left
|
|||
ingy | thanks :) | 15:40 | |
masak | rakudo: class A { ... }; class B { has A $.a }; class A { has B $.b }; say "alive" | ||
p6eval | rakudo 05684c: OUTPUT«alive» | ||
jnthn | Nice try. :P | 15:41 | |
masak | wasn't actually trying to break things :P | ||
ash_ | masak: i can change the error prefix to be something more noticeable so you can tell the difference easier, maybe a ! or ‽ | ||
masak | just showing how to make two classes use each other. | ||
ash_: is there a skull in Unicode? :) | |||
.u skull | 15:42 | ||
phenny | U+2620 SKULL AND CROSSBONES (☠) | ||
masak | ash_: use that :) | ||
ash_ | ☠ | ||
lol | |||
k | |||
masak | ash++ | ||
ash_ | html entity ☠ | ||
masak | er, ash_++ | ||
rakudo: say :16<2620> | |||
p6eval | rakudo 05684c: OUTPUT«9760» | ||
masak | yup. | ||
_sri | TiMBuS: kraih is me, and i meant to write non blocking sockets but ran out of chars :) | 15:43 | |
btw. the offer still stands, my firstborn for non blocking sockets! | |||
pmichaud | 15:41 <masak> wasn't actually trying to break things :P | 15:44 | |
....somehow I don't quite believe that. :-) | |||
I think masak is always on the lookout for possible breakages :) | |||
masak | pmichaud: I swear, most of the time when I do break stuff, it's not deliberate! :P | ||
pmichaud | masak: I *do* believe that. :) | ||
ash_ | when is the 12e123 valid? (i guess i could find it in the spec... S02?) | ||
masak | ash_: anywhere a term is valid, I guess. | 15:45 | |
ash_ | but can you do 0b01210e123 | ||
is more my point | |||
masak | ash_: you do realize that you're about to write a Perl 6 parser here? | ||
ash_ | shhh only select bits | ||
masak | ash_: how will you decide which bits to fail on? | ||
ash_ | std: 0b01210e123 | 15:46 | |
p6eval | std 31481: OUTPUT«===SORRY!===Whitespace is required between alphanumeric tokens at /tmp/tdYazMUpXi line 1:------> 0b01⏏210e123Two terms in a row at /tmp/tdYazMUpXi line 1:------> 0b01⏏210e123 expecting any of: POST bracketed | ||
..infix i… | |||
ash_ | dumbly | ||
masak | ash_: I admire your optimism. | ||
ash_ | 123e123 | ||
std: 123e123 | |||
p6eval | std 31481: OUTPUT«ok 00:01 106m» | ||
masak | ash_: here's hoping that what you end up with won't be too messy. | ||
ash_ | github.com/moritz/try.rakudo.org/bl...l.html#L14 lines 14~35 are all of my highlighting to date | 15:47 | |
its pretty dumb so far, but i am not trying to hard to make it perfect, just good enough that the web shell looks alright | |||
pmichaud | while I definitely do not want to stifle ambition here, I do hope that the effort to syntax highlight doesn't distract too much from the overall goal of having an interactive web-based perl 6 shell. | 15:48 | |
ash_ | cygx is doing the backend of it, so i am waiting on him to evaluate the content, i am just working on the front end since its something i am capable of | 15:49 | |
15:49
ruoso left,
rv2733 joined,
Su-Shee left
|
|||
pmichaud | ash_++ sounds like you have it well-handled then :) | 15:49 | |
ash_ | right now, aside from the highlighting corrections masak++ found, i am adding a tutotrial thing, mostly I am planning on expecting a certain result, so if the example says "enter 1 + 2", i'll look for 3 in the stdout | 15:50 | |
15:51
Ross joined
|
|||
ash_ | i am trying to come up with a good way of designing those steps, plus i have the index of the chapters now so I can figure out what goes where when I need to build examples, if you type "chapter index" in the terminal it will show you the chapters | 15:51 | |
i'll probably also start with a brief tutorial on how to use the terminal before starting perl6, (a chapter 0 really) | 15:52 | ||
pmichaud | there should always be a chapter 0. :) | ||
bbkr | rakudo: say "foo" ~~ /<[d..b]>? foo/ | 15:53 | |
p6eval | rakudo 05684c: OUTPUT«foo» | ||
ash_ | should i say "perldoc" instead of "help" for looking up definitions? (since that might be more like what you would do in the terminal) | ||
TiMBuS | _sri, i asked a few places (perl 5 hackers) what they thought about the perl 6 logo and um. | 15:54 | |
they were very honest. | |||
they prefer yours to say the least | |||
15:55
JimmyZ left
|
|||
_sri | TiMBuS: i'll release it in a different form than originally planned, but under cc-share-alike to allow remixing and stuff | 15:56 | |
15:56
IllvilJa joined
|
|||
TiMBuS | good idea | 15:56 | |
15:57
sftp joined
|
|||
masak | wow, subs defaulting to 'my' feels more and more right every day! | 15:57 | |
15:57
plainhao joined
|
|||
mathw | masak: yes it is nice isn't it | 15:57 | |
masak | mathw: it's like having Scheme, but with a sane syntax. | 15:58 | |
ash_ | _sri, TiMBuS: its not done yet by any means, but have you guys seen: greaterthaninfinity.com/frontend/ma...shell.html ? its the current design I am working with for an interactive web terminal for rakudo star | ||
tadzik | subs defaulting to 'my'? | ||
TiMBuS | heey thats cool | 15:59 | |
_sri | TiMBuS: btw. i'm honestly worried about all the cgi stuff going on, it could totally backfire marketing wise | ||
pmichaud | _sri: what would you suggest instead? | ||
mathw | masak: an altogether completely more awesome syntax | ||
TiMBuS | he wants nonblocking sockets. id settle for threads :3 | 16:00 | |
ingy | is there a way to get .perl to dump objects deeply? | ||
mathw | if you have threads, you can write a non-blocking I/O layer | ||
pmichaud | (I mean to avoid the "marketing disaster") | 16:01 | |
_sri | pmichaud: non blocking sockets and a sweet http 1.1 api (which i'll be able to provide) | ||
16:02
ashleydev joined
|
|||
pmichaud | _sri: and you're saying that without that, we'll have a disaster? | 16:02 | |
ingy | when I say Document.new.perl I get >>Document.new()<< | ||
_sri | pmichaud: thats not what i said | ||
pmichaud | _sri: okay, I don't mean to misquote or misinterpret. | 16:03 | |
ingy | even if the object has been populated | ||
_sri | pmichaud: i said by nurturing a culture of cgi hacking you are likely to have a disaster | ||
arnsholt | ingy: Not at the moment, AFAIK | 16:04 | |
pmichaud | ingy: we don't have a generic .perl for objects yet, no. | ||
ingy | ok | ||
pmichaud | I suppose we could see about writing one that introspects the attributes and dumps them. | 16:05 | |
ingy | :) | ||
one more newbie q | |||
how do I get a unique id on an object | |||
is there a .id? | |||
pmichaud | _sri: I don't see the disaster, but accept that there could be one. | 16:06 | |
ingy: perhaps .WHICH ? | |||
rakudo: my $a = Int.new; my $b = Int.new; say $a.WHICH; say $b.WHICH; | |||
jnthn | _sri: I'm not sure I follow. Yes, there are better ways to do things than CGI, but it's hardly like nobody ever writes/deploys CGIs any more. | ||
p6eval | rakudo 05684c: OUTPUT«00» | 16:07 | |
16:07
songmaster left
|
|||
pmichaud | oh, bad example. | 16:07 | |
[particle] | ha, really bad example. | ||
pmichaud | rakudo: my $a = Array.new; my $b = Array.new; say $a.WHICH; say $b.WHICH; | ||
p6eval | rakudo 05684c: OUTPUT«8088740880885392» | ||
jnthn | _sri: Plus there *is* a basically working HTTP server. | ||
I think mberends++ is hacking on stuff in that area. | |||
So CGI is not the only option Rakudo offers either. | |||
_sri: But granted I may have missed your point entirely. | 16:08 | ||
pmichaud | besides, the way to get non-blocking sockets implemented will be for us to have enough people interested in Rakudo to hit upon someone that decides they want it badly enough to investigate what's needed to implement them. :) | 16:09 | |
ingy | pmichaud: nice. it's interesting that WHICH just gives a stringification for strings... | ||
is that on purpose? | |||
pmichaud | .WHICH on value types basically returns the values | ||
see S12? S13? for a more thorough description of what .WHICH actually does. | |||
ingy | fair enough | 16:10 | |
thanks! | |||
_sri | /me gives up | 16:11 | |
16:12
justatheory joined,
ash_ left
|
|||
_sri | i accept that marketing has no place in this channel | 16:13 | |
masak | it might. | ||
pmichaud | _sri: I'm trying to understand, really. | 16:14 | |
16:15
ash_ joined
|
|||
masak | _sri: my reaction to that tweet was "huh, someone who thinks we're more organized and less volunteer-based than we actually are" | 16:16 | |
_sri | i could argue all day about perl5 still being haunted by the 90s... but i think we would keep spinning round and round...i'm tired :( | ||
ash_ | non-blocking IO, do you mean like using select? or fork? | ||
masak | _sri: seems no-one really is in disagreement with you. | ||
ash_ | can current rakudo fork? | ||
pmichaud | ash_: I'm guessing it's along the lines of select. | 16:17 | |
_sri | non blocking sockets + poll/epoll/kqueue | ||
pmichaud | I don't really know what Parrot has in mind for that. | 16:18 | |
16:20
Mowah left,
skids left
|
|||
_sri | without you can pretty much forget about websockets | 16:21 | |
pmichaud | _sri: I'm speculating that somewhere you've read or seen something that implies that we're trying to market Rakudo to cgi hackers. | 16:22 | |
perhaps others are doing that, but I don't think I've done anything to market specifically to cgi. | |||
ash_ | the only reason i have tried using rakudo with cgi is cgi is dead simple | ||
_sri | pmichaud: my fear was triggered by moritz_ mumbling about porting cgi frameworks | ||
pmichaud | ...which iirc was itself in response to someone saying we need a Perl 6 forum written in perl 6. | 16:23 | |
which, btw, I totally disagree with. | |||
jnthn | Doesn't the world have enough forum software? :-) | ||
masak | if I use the fat comma for formatting purposes, am I totally evil? :> | ||
pmichaud | I'm all in favor of new forum software, written in Perl 6. | ||
But if we're looking at that as a short-term project, I think it a bit unrealistic. | 16:24 | ||
so I think we need to set expectations. If we want a forum -soon- for Perl 6 specific discussions, we shouldn't require it to be written in Perl 6. | |||
masak | I just realized that instead of `say something(), "\t", something-else();`, I could write `say something() => something-else();` with the same effect. | ||
jnthn | masak: heh | ||
pmichaud | If we want to have some forum software written in Perl 6, that's great too, but we shouldn't expect to have it soon. | ||
masak | mwhaha. | ||
jnthn | masak: Relying on how pairs stringify. | 16:25 | |
masak | aye. | ||
jnthn | masak: I guess that's spec'd, tested and kosher. | ||
:-) | |||
masak | jnthn: probably not very maintainable, though. | ||
jnthn | masak: It will, however, probably confuse some newbie who reads your code. :-) | ||
masak | right. | ||
pmichaud decides to comment to the perl6 mongers post | 16:26 | ||
er, perlmonks | |||
16:26
skids joined,
Su-Shee joined
16:31
redicaps left
|
|||
ash_ | masak: sub amp { }; say & # that works in my console now, that one was trixy | 16:33 | |
masak | ash_: as in 'trixy to color-code'? | ||
ash_ | yeah, since & is html for & | 16:34 | |
masak | ah, right. | 16:35 | |
yes, that one is often tricky to get right, when implementing an escaper. :) | |||
it does help that Str.trans does all the replacements in one go... | |||
...but I guess this is js, not p6. :) | |||
pugssvn | r31482 | bbkr++ | t[t/spec/S06-signature/slurpy-params.t] tests for RT #72600 if statements clobber @_ in Rakudo | 16:38 | |
16:39
thebird left,
envi^home left
|
|||
ash_ | str_obj.replace(/reg/g, "Replacement"); works in javascript, but since i have multiple passes to do various things like highlight $var's it was seeing & as not a variable (since & gets translated to &amp; it was trying to highlight the wrong part of it) | 16:39 | |
masak | swimming & | ||
16:39
masak left
16:40
hercynium joined
16:41
Trashlord joined
16:43
kloeri joined
16:48
hercynium left
16:56
cdarroch joined,
cdarroch left,
cdarroch joined
16:58
dakkar left
|
|||
pugssvn | r31483 | bbkr++ | [t/spec/S06-multi/type-based.t] tests for RT #72750 Make Inf and NaN acceptable constants parameters in Rakudo | 17:04 | |
bbkr | tickets closing day :) | 17:05 | |
colomon | bbkr++ | 17:06 | |
pmichaud | yes, I tried to do things so that we'd have some tickets to close :) | ||
bbkr | pmichaud++ | 17:07 | |
17:08
meppl joined
17:15
timbunce left
|
|||
bbkr | rakudo: say (4...^5).perl # is this correct output? | 17:17 | |
p6eval | rakudo c18d37: OUTPUT«((4, 3, 2, 1, 0), [1, 2, 3, 4])» | ||
pmichaud | bbkr: I claim the current definition of .perl in the spec is a bit ambiguous. | ||
cxreg | so what's the deal with STM? looks like it was removed from parrot last year? is it still part of the design? | 17:18 | |
bbkr | rakudo: say (4 ... 0 .. 5) | ||
p6eval | rakudo c18d37: OUTPUT«4321012345» | ||
pmichaud | anyway, testing a result based on .perl is generally not the best way to test | ||
rakudo: say (4...^5).elems # just curious | 17:19 | ||
p6eval | rakudo c18d37: OUTPUT«9» | ||
pmichaud | good. | ||
bbkr | pmichaud: thanks, I was checking if rt.perl.org/rt3/Ticket/Display.html?id=72912 can be closed | ||
pmichaud | since .perl now works on &infix:<...>, I think so. | 17:20 | |
17:21
mberends joined
17:25
cygx joined
17:30
TiMBuS left
|
|||
[Coke] | cxreg: parrot questions are generally better asked in #parrot on irc.parrot.org - but yes, I don't think STM is currently expected to make a comeback. I'm not sure that the version we had was ever in trunk or finished. | 17:31 | |
17:39
Mowah joined
17:40
cygx left
17:41
[Coke] left
17:42
[Coke] joined
|
|||
ash_ | ping cygx ? | 17:47 | |
doh i think he left already | |||
17:47
proller left
17:48
proller joined
18:06
hejki_ joined,
spinclad_ joined,
hejki_ left,
Ross left,
patspam left,
diakopter left,
takadonet left,
breinbaas left,
elmex left,
saaki left,
silug left,
szabgab left,
kolibrie left,
_sri left,
ashleydev left,
Patterner left,
sorear left,
rhr left,
jjore_ left,
Khisanth left,
astinus left,
renormalist left,
jql left,
spinclad_ left,
Trashlord left,
dimid left,
revdiablo left,
cdarroch left,
tadzik left,
mmcleric left,
clintongormley left,
Helios left,
christine left,
lue left,
frettled left,
Tene left,
Su-Shee left,
pragma_ left,
azert0x left,
dju left,
nimiezko left,
sukria left,
c1sung left,
zostay left,
szbalint left,
slavik left,
jedai left,
mikehh left,
gfldex left,
allbery_b left
|
|||
ash_ | phenny: tell cygx how is the backend going? Is there anyway I could start testing any of it with the backend? I can run it on my server, also i don't mind if some of the responses are faked for now | 18:06 | |
phenny | ash_: I'll pass that on when cygx is around. | ||
ash_ | phenny: cygx also greaterthaninfinity.com/frontend/ma...shell.html has a more up-to-date shell example | ||
18:06
mdxi_ joined,
pjcj_ joined,
hatsefla1s joined,
Mowah left,
ash_ left,
felipe left,
colomon left,
eiro left,
thepler left,
tomaw left,
Gothmog_ left,
opx^away left,
pjcj_ left,
kloeri left,
alester left,
pmichaud left,
PZt left,
buubot left,
IllvilJa left,
rv2733 left,
PacoLinux left,
RAT left,
synth left,
meppl left,
rcsheets left,
[Coke] left,
perlygatekeeper left,
frew left,
chitragupt left,
mdxi_ left,
sftp left,
foodoo left,
pnu left,
literal left,
fda314925 left,
TimToady left,
justatheory left,
Guest23195 left,
bbkr left,
baest left,
PerlJam left,
Maddingue left,
f00li5h left,
Guest3330 left,
shade_ left,
dual left,
cono left,
zamolxes left,
pugssvn left,
nothingmuch left,
awwaiid left,
bkeeler left,
moritz_ left,
mberends left,
pnate left,
xinming left,
felliott left,
jnthn left,
buu left,
sbp left,
yves__ left,
hatsefla1s left,
proller left,
plainhao left,
ciphertext left,
Juerd left,
frodwith left,
cxreg left,
m6locks left,
phenny left,
mdxi left,
hatseflats left,
ascent_ left
18:07
Ambiguity joined,
dimid joined,
cuppe_ joined,
spinclad joined,
imarcust1is joined,
patch_ joined,
ascent_ joined,
m6locks joined,
phenny joined,
yves__ joined,
sbp joined,
cxreg joined,
buu joined,
moritz_ joined,
jnthn joined,
TimToady joined,
card.freenode.net sets mode: +vooo phenny moritz_ jnthn TimToady,
f00li5h joined,
Maddingue joined,
frodwith joined,
bkeeler joined,
Juerd joined,
fda314925 joined,
PerlJam joined,
awwaiid joined,
baest joined,
nothingmuch joined,
pugssvn joined,
zamolxes joined,
literal joined,
pnu joined,
chitragupt joined,
frew joined,
gabiruh joined,
wolverian joined,
lucs joined,
BinGOs joined,
dukeleto joined,
card.freenode.net sets mode: +oovo Juerd PerlJam pugssvn dukeleto,
sunnavy joined,
athomason joined,
Grrrr joined,
nsh_ joined,
cognominal joined,
Woody2143 joined,
charsbar joined,
kst joined,
dalek joined,
card.freenode.net sets mode: +v dalek,
zakame joined,
lestrrat joined,
Solarion joined,
cosimo_ joined,
yahooooo joined,
knewt2 joined,
mantovani joined,
LionMadeOfLions joined,
cls_bsd joined,
sjohnson joined,
sykes_ joined,
constant joined,
Lorn joined,
japhb joined,
stepnem joined,
hugme joined,
ingy joined,
sawyer_ joined,
exodist joined,
skangas joined,
stef_ joined,
ciphertext joined,
cono joined,
buubot joined,
dual joined,
bbkr joined,
PZt joined,
rcsheets joined,
foodoo joined,
pmichaud joined,
colomon joined,
eiro joined,
thepler joined,
tomaw joined,
Gothmog_ joined,
opx^away joined,
synth joined,
felipe joined,
shade_ joined,
felliott joined,
xinming joined,
pnate joined,
perlygatekeeper joined,
RAT joined,
alester joined,
PacoLinux joined,
card.freenode.net sets mode: +oo pmichaud colomon,
Guest23195 joined,
Guest3330 joined,
rv2733 joined,
IllvilJa joined,
sftp joined,
plainhao joined,
justatheory joined,
ash_ joined,
kloeri joined,
meppl joined,
mberends joined,
Mowah joined,
[Coke] joined,
proller joined,
mdxi_ joined,
pjcj_ joined,
hatsefla1s joined,
hejki_ joined,
cdarroch joined,
Su-Shee joined,
ashleydev joined,
Ross joined,
tadzik joined,
patspam joined,
mmcleric joined,
slavik joined,
pragma_ joined,
azert0x joined,
clintongormley joined,
Helios joined,
Patterner joined,
jedai joined,
christine joined,
dju joined,
mikehh joined,
lue joined,
nimiezko joined,
saaki joined,
cotto joined,
araujo joined,
simcop2387 joined,
dmpk2k_ joined,
nadim joined,
Sanitoeter joined,
arnsholt joined,
_ilbot2 joined,
card.freenode.net sets mode: +v _ilbot2,
p6eval joined,
cj joined,
tylerni7 joined,
[particle] joined,
s1n joined,
Sarten-X joined,
estrabd joined,
drbean joined,
broquaint joined,
aesop joined,
Util joined,
mtve joined,
rgrau joined,
IRSeekBot joined,
mathw joined,
card.freenode.net sets mode: +vovo p6eval [particle] IRSeekBot mathw,
betterworld joined,
huf joined,
meteorjay joined,
metaperl joined,
gfldex joined,
sorear joined,
silug joined,
rhr joined,
jjore_ joined,
diakopter joined,
sukria joined,
c1sung joined,
takadonet joined,
szabgab joined,
Khisanth joined,
frettled joined,
kolibrie joined,
breinbaas joined,
astinus joined,
_sri joined,
zostay joined,
elmex joined,
renormalist joined,
jql joined,
Tene joined,
allbery_b joined,
szbalint joined,
card.freenode.net sets mode: +ooo sorear diakopter Tene,
kfo left,
Ambiguity left,
kfo joined
18:08
Trashlord joined
18:10
Ambiguity joined
18:23
stef_ left
18:29
stef_ joined,
timbunce joined
18:35
cuppe joined
|
|||
cuppe | rakudo: my @squares = gather for 0 .. Inf { take $_*$_ }; say 1; | 18:36 | |
p6eval | rakudo c18d37: ( no output ) | ||
cuppe | hm | 18:37 | |
18:37
ash_ left
|
|||
cuppe | shouldn't that work and give 1 | 18:37 | |
mberends | some of it is not lazy yet | ||
for, probably | 18:38 | ||
18:38
ash_ joined
|
|||
cuppe | hm | 18:38 | |
18:38
dakkar joined
|
|||
[particle] | i don't like the lack of spaces there | 18:39 | |
rakudo: my @squares = gather for 0 .. Inf { take $_ * $_ }; say 1; | |||
p6eval | rakudo c18d37: ( no output ) | 18:40 | |
cuppe | that's how I would type it in code | ||
colomon | it should not work. | ||
or at least, it shouldn't work yet. | |||
cuppe | should it work...eventually? | ||
colomon | I don't know. | ||
pmichaud? | |||
cuppe | it's a wikipedia example | ||
colomon | For perl 6? | 18:41 | |
cuppe | en.wikipedia.org/wiki/Perl_6#Gather | ||
colomon | rakudo: say $squares = gather for 0 .. Inf { take $_ * $_ }; say 1; # should work | 18:42 | |
p6eval | rakudo c18d37: OUTPUT«===SORRY!===Symbol '$squares' not predeclared in <anonymous> (/tmp/q49fB8Dkng:11)» | ||
[particle] | rakudo: say 0 * 0 | ||
p6eval | rakudo c18d37: OUTPUT«0» | ||
colomon | rakudo: my $squares = gather for 0 .. Inf { take $_ * $_ }; say 1; # should work | ||
[particle] | that's not a square. | ||
p6eval | rakudo c18d37: OUTPUT«1» | ||
cuppe | rakudo: my $squares = gather for 0 .. Inf { take $_ * $_ }; say $squares.perl; | 18:43 | |
p6eval | rakudo c18d37: ( no output ) | ||
ash_ | rakudo: my $squares = gather for 0 .. Inf { take $_ * $_ }; say $squares.WHAT; | ||
[particle] | rakudo: my @squares = gather for ^Inf { take $_ * $_ }; say $squares[3]; | ||
p6eval | rakudo c18d37: OUTPUT«List()» | ||
rakudo c18d37: OUTPUT«===SORRY!===Symbol '$squares' not predeclared in <anonymous> (/tmp/EuTmu3056z:11)» | |||
colomon | cuppe: you have to watch for trying to evaluate infinite lists. | ||
[particle] | rakudo: my $squares = gather for ^Inf { take $_ * $_ }; say $squares[3]; | ||
p6eval | rakudo c18d37: OUTPUT«9» | ||
cuppe | colomon: of course | ||
pmichaud | right now, rakudo stops eagerly evaluating only on those things that it can provably determine are infinite | 18:44 | |
colomon | $squares.perl will do that. | ||
[particle] | rakudo: my $squares = gather for 1 .. Inf { take $_ * $_ }; say $squares[3]; | ||
p6eval | rakudo c18d37: OUTPUT«16» | ||
[particle] | yep, works | ||
pmichaud | a gather/take loop isn't provably infinite, for the most part :-) | ||
cuppe goes to read up on sigils again | |||
colomon | cuppe: what pmichaud is saying is that @a = infinite list will only work in certain limited cases. | 18:45 | |
very limited at the moment, as far as I know. | |||
pmichaud | yes | ||
we might be able to get .map and .grep to transitively determine infinite-ness | |||
cuppe | why is this working with $squares | ||
pmichaud | because assignment to a scalar isn't eager | 18:46 | |
assignment to an array is eager | |||
18:46
armagad joined
|
|||
colomon | when you assign to @squares, it tries to find the first value, then second, etc. | 18:46 | |
ash_ | can you do something like: (gather for 1..Inf { take $_ * $_ }).lazy; ? | ||
or lazy gather ... | |||
colomon | when you assign to $squares, it just puts the List object in $squares. | ||
ash_ | (with list assignment) | 18:47 | |
pmichaud | ash_: I suppose that .lazy could somehow be a list that always reports true for infiniteness | ||
but that gets tricky with things like .elems then | |||
18:47
armagad left
|
|||
colomon | seems like that is confusing laziness with infinite-ness. | 18:47 | |
pmichaud | it's really a question of "mostly eagerness" | ||
and when something that is "mostly eager" (such as array assignment) should stop evaluating. | 18:48 | ||
ash_ | i expect the lazyness of gather/take to catch some people by surprise, especially with 1..* ranges | ||
pmichaud | I think there are surprises no matter what we do. | 18:49 | |
So the question is where to put the surprises, or how to minimize them. | |||
ash_ | rakudo: my @a = 1..*; for @a { last }; # what if someone tries that? | 18:50 | |
pmichaud | that works out fine. | ||
p6eval | rakudo c18d37: ( no output ) | ||
pmichaud | rakudo: my @a = 1..*; for @a { say $_; last; } | ||
colomon | rakudo: my @a = 1..*; for @a { last }; say "got here" | ||
the suspense is killing me. | |||
pmichaud | I'm wondering why there's suspense. :) | 18:51 | |
ash_ | i think its timing out with p6eval (it might work locally, haven't checked) | ||
p6eval | rakudo c18d37: ( no output ) | ||
colomon | ash_: it should be very fast | ||
works locally | |||
pmichaud | > my @a = 1..*; for @a { say $_; last; } | ||
1 | |||
works here. | |||
ash_ | ah, i didn't try it locally, i kinda assumed it was going into an infinite loop | ||
pmichaud | rakudo: my @a = 1..*; | 18:52 | |
something isn't right there. | |||
p6eval | rakudo c18d37: ( no output ) | ||
pmichaud | rakudo: my @a = 1..*; say 'alive'; | ||
ash_ | maybe p6eval is out of date? | ||
colomon | c18d37 is latest | ||
p6eval | rakudo c18d37: ( no output ) | ||
pmichaud | yeah, I'm thinking p6eval is out of date, even though it appears to be reporting the correct git revision | ||
ash_ | rakudo: say 'testing' | ||
p6eval | rakudo c18d37: OUTPUT«testing» | ||
colomon | rakudo: say 4 %% 3 | 18:53 | |
p6eval | rakudo c18d37: OUTPUT«===SORRY!===Confused at line 11, near "say 4 %% 3"» | ||
colomon | oooo, definitely out of date. | ||
pmichaud | it's definitely out of date. | ||
colomon | that's an ugly p6eval bug. | ||
ash_ | its lying about its version, eh? | ||
colomon | yes | ||
pmichaud | where's the RT for p6eval?!? I want to channel masak++! | ||
ash_ | maybe someone could add the git id to $?PERL.version | 18:54 | |
? | |||
or is that not worth the effort | |||
pmichaud | ash_: where would we get it from? | ||
ash_ | git? (if its installed? at compile time?) | ||
if not thats fine | 18:55 | ||
pmichaud | and why would we believe it any more than whatever p6eval is reporting now? presumably p6eval gets it from the same place :-) | ||
ash_ | just thinking | ||
well, if its added to the settings or something at compile time... it shouldn't change...? | |||
pmichaud | maybe we can do something with git describe | 18:56 | |
ah, we can put git-describe into a generated file | 18:57 | ||
and use it | |||
ash_ | rakudo: say $?PERL.version | ||
p6eval | rakudo c18d37: OUTPUT«===SORRY!===Symbol '$?PERL' not predeclared in <anonymous> (/tmp/kyzYCGPscl:11)» | ||
cuppe | so I have another thing that's confusing me. I noticed that BUILD kills any initialized values you gave variables. so I can create them in the BUILD, except they don't seem to keep values | ||
rakudo: class Data { submethod BUILD { has $.user = 13;}}; say Data.new.user; | 18:58 | ||
p6eval | rakudo c18d37: OUTPUT«Any()» | ||
colomon | rakudo: class Data { has $.user; submethod BUILD { $.user = 13;}}; say Data.new.user; | ||
p6eval | rakudo c18d37: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'Data::BUILD' at line 11:/tmp/SJlRxmNmmd in main program body at line 11:/tmp/SJlRxmNmmd» | ||
ash_ | rakudo: class Data { has $.user is rw; submethod BUILD { $.user = 13;}}; say Data.new.user; | 18:59 | |
pmichaud | inside of build, use $!user | ||
p6eval | rakudo c18d37: OUTPUT«13» | ||
colomon | rakudo: class Data { has $.user; submethod BUILD { $!user = 13;}}; say Data.new.user; | ||
p6eval | rakudo c18d37: OUTPUT«13» | ||
18:59
shade_ left
|
|||
cuppe | oh okay. my problem that I was leading at was creating readonly variables with initial values | 19:00 | |
and that'll solve that | |||
19:00
masak joined
|
|||
pmichaud | afk | 19:00 | |
bbl | |||
19:01
hejki_ left,
hejki joined,
emadum joined
19:02
pyrimidine joined
19:03
shade_ joined,
emadum is now known as __eric__
19:04
rv2733 left
19:11
rindolf joined
|
|||
cuppe | if a scalar can hold a List type...what's special about arrays | 19:12 | |
masak | cuppe: they convey list context. | 19:14 | |
cuppe: they also narrow things down to something Positional, often an Array. | |||
think of it as a small, cute type system :) | |||
hm, I seem to have interpreted your question as "what's so special about the @ sigil?" -- hope that's what you meant. :) | 19:15 | ||
cuppe | but surely I can force list context in some other way, like () in p5 | ||
masak | sure. | ||
it's just for convenience. | |||
but the convenience is quite significant, I would say. | |||
cuppe | yeah | ||
mberends | \o masak | 19:16 | |
cuppe | so I can create scalars of hashes too then. or any type | ||
masak | cuppe: yes, scalars are the generic type. | ||
mberends: o/ | |||
mberends | masak: after porting half of HTTP::Server::Simple::PSGI, I discovered that I'd misunderstood the intend of HTTP::Server::Simple :/ | 19:17 | |
masak | mberends: :/ | 19:18 | |
mberends: in what way? | |||
dakkar | grammar Foo { rule TOP { <[a..z]> } };my $match=Foo.parse('a');.perl.say for @($match) | 19:19 | |
rakudo: grammar Foo { rule TOP { <[a..z]> } };my $match=Foo.parse('a');.perl.say for @($match) | |||
p6eval | rakudo c18d37: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only from => 0, orig => "a", to => 1, positional => [, ],)» | ||
dakkar | rakudo: my $match=Perl6::Grammar.parse('$a+$b');.perl.say for @($match) | ||
p6eval | rakudo c18d37: OUTPUT«Method 'perl' not found for invocant of class 'Regex;Match' in main program body at line 11:/tmp/c6s7sZA5NA» | ||
mberends | masak: I thought the latter was a working, self contained class. But it's only abstract :( | ||
masak | oh. | ||
dakkar | ehrm… what am I doing wrong? | 19:20 | |
masak | dakkar: that shouldn't happen, I think. | ||
dakkar | oh :) | ||
rindolf | Is rakudo-2010.04-1mdv2010.1 good enough or should I use the git version? | 19:21 | |
masak | at least if moritz_++'s efforts to make Match a pure-Perl 6 class were ever finished, and I think they were. | ||
rindolf: please be more specific. | |||
rindolf: you do know that we add and change things on a daily basis? :P | |||
rindolf | masak: ah. | ||
masak | rindolf: sometimes I take for granted that people know that. Rakudo has a fairly high development speed. | 19:22 | |
rindolf: the last release added lazy lists. | |||
dakkar | masak: well, Match seems to work. Perl6::Grammar is not returning Match objects, though | ||
masak | dakkar: I wish I knew more. moritz_ will, though. | ||
dakkar | I'll stay around | 19:23 | |
sorear | hello #perl6 | 19:25 | |
sorear hugs _sri | 19:26 | ||
Negativity is not tolerated here. | |||
masak backlogs | |||
_sri hugs sorear back | |||
[Coke] | everybody's always hating on negativity. maaaan. | 19:29 | |
rindolf | Hi sorear | ||
github.com[0: 207.97.227.239]: errno=Connection timed out - sucks. | |||
Oh wait. Firewall. | |||
No, doesn't work. | 19:31 | ||
19:31
simcop2387 left
|
|||
masak | _sri: I'd love to have unblocking sockets too. not sure Parrot allows this at thigs point, even theoretically. Rakudo (and Rakudo Star) is all about releasing something which is Usable Now rather than Perfect and Complete. | 19:32 | |
_sri | masak: i don't think parrot supports them yet | ||
sorear | anyways, jnthn and I need your firstborn at this point | 19:33 | |
use POSIX:from<perl5>; my $s = socket(...); | |||
masak | _sri: given this, are you suggesting unblocking sockets are important enough to slip the release date for Rakudo Star? | ||
_sri | masak: thats not my decision to make | 19:34 | |
masak | right. neither is it mine. | ||
just asking about what you consider to be the priorities here. | |||
you seem to think they are very important. | 19:35 | ||
_sri | i'm just lobbying from the sideline | ||
ash_ | parrot doesn't do async io yet, so you can't do async sockets either | ||
_sri | i know i want a websocket server on perl6 asap | ||
Guest23195 | hm, @b is flattened into @a if I push @a, @b. How do I make a multidimensional array? | 19:36 | |
masak | _sri: I think it's very good that we have someone lobbying for that, lest we forget it among all the other stuff that's happening. | ||
_sri | short term the next big fight in the web development work will be all about non blocking io, everybody will have to compete with node.js | ||
masak | Guest23195: push @a, [@b] | ||
_sri | so thats what i'm interested in | ||
Guest23195 | masak thx | 19:37 | |
masak | Guest23195: that copies. there's one variant which doesn't, too. | ||
Guest23195: push @a, \@b | |||
Guest23195: the copying is shallow. | |||
_sri | *world | ||
Guest23195 | ok. all perl5 is not lost :-) | 19:38 | |
masak | Guest23195: we did retain some fragments :P | ||
_sri | masak: right now it looks like ruby will be in big trouble soonish, because it can't keep up with the async requirements for the next generation of web frameworks | 19:39 | |
masak: so i want to verify the same thing doesn't happen in perl6 | |||
ash_ | non-blocking io and threading are big issues, especially if you don't have a GIL or a way to work around a GIL | ||
masak | ash_: what's a GIL? | 19:40 | |
sorear | _sri: seriously, it disheartens me to see you passing over blizkost like this | ||
ash_ | global interpreter lock | ||
python and ruby have them, they can use system threads, but they can only have 1 scheduled at a time | |||
19:41
plainhao left
|
|||
_sri | sorear: :( | 19:41 | |
ash_ | so, while they are doing multi-processing, they aren't taking advantage of multiple cores | ||
in python though you can use the module multiprocessing, which does shared memory and forks, so you can take advantage of multiple cores, although you can't do somethings like share a file handler | 19:42 | ||
_sri | ruby fibers are really poor | ||
ash_ | macruby got rid of the GIL in OS X, and added libdispatch too | 19:43 | |
_sri | it's a big opportunity for perl6 actually | ||
ash_ | so it can do some cool stuff with that | 19:44 | |
19:44
simcop2387 joined
|
|||
_sri | oh, thats interesting | 19:44 | |
ash_ | but, thats mac only, and requires the llvm, its also not 100% compatible with 1.9, its a fork of matz's ruby 1.9, but it forked a while back, they have gotten almost all of the compatibility back though, it can run rack, and most gems are fine, its mostly edge cases that differ | 19:45 | |
its actually kinda cool, you can even compile your ruby code into a native executable or a .dylib, and it can natively call anything in the obj-c runtime so you can do cocoa programming in it without a bridge | 19:47 | ||
thats what i want to do for parrot with part of my GSoC | 19:48 | ||
add an llvm based runcore, so it can compile parrot bytecode into native code, and i am almost done with my libffi changes so you can have a lot more flexibility with NCI calls | |||
_sri | damn, if it wasn't mac specific it could totally take over the world | 19:50 | |
19:50
rindolf left
|
|||
ash_ | yup, they replaced the GC system in macruby, so it uses the obj-c GC system, that is the biggest reason they still have the GIL in ruby | 19:51 | |
19:51
rindolf joined
|
|||
ash_ | and all ruby objects are obj-c types, ([].class #=> "NSMutableArray" in macruby, Array is an alias to that) so all obj-c calls just use native obj-c objects, its pretty crazy, but part of the reason they can get away with that is ruby's object system is almost identical to obj-c, and they both allow runtime construction of objects | 19:52 | |
_sri | i was already excited when i was reading up on rubinius, but this is wow | ||
ash_ | i bet it will be included by default in 10.7 since there is code for 10.7 in their repository, which is kinda funny IMO | 19:54 | |
19:54
mmcleric left
|
|||
_sri | one more reason to be afraid of cocotron www.cocotron.org/ | 19:54 | |
alester | stackoverflow.com/questions/3135673...ons-mature FYI | 19:55 | |
masak | thanks! | 19:58 | |
ash_ | it would be cool if more platforms did Obj-C (only OS X 10.6 does Obj-C 2.1), the gnu obj-c runtime doesn't even do 2.0 yet | 19:59 | |
10.5 was obj-c 2.0 | |||
anyway, this is a perl channel :P | 20:00 | ||
_sri | hmm, apple is heavily sponsoring macruby | 20:01 | |
masak | I think pmichaud would be able to write a good reply to that stackoverflow question. | ||
Su-Shee | ash_: which means we should steal the best of other ideas. | ||
_sri | i suspect it might become a first class language in the apple eco system | ||
ash_ | they have an svn host and a git host and will accept patches, but like 99% of the macruby work is done by apple employees (or they all have apple emails) | 20:03 | |
sorear | sheesh | 20:04 | |
ash_ | you could port macruby to other OS's, its been done on linux before, but you need to compile libautozeon (the GC system macruby and objective-c use on OSX), which is also open source, but apple specific, its drops down to assembly in places, i hear it compiles on x86, x86-64 linux, and might work on ppc, and ppc-64, but its not plain C, (its C++, C and assembly) | 20:08 | |
libautozone* | |||
masak | "Some of the smartest error messages that STD emits are actually the two-terms message transmogrified into something more specific by context." -- I like this quote. I hope I remember to integrate it into my YAPC::EU talk. it's by TimToady in www.nntp.perl.org/group/perl.perl6....33148.html | 20:09 | |
std: constant Int pi = 3; pi 'foo'; | 20:10 | ||
p6eval | std 31483: OUTPUT«===SORRY!===Malformed constant at /tmp/svPM4BwE7Q line 1:------> constant Int ⏏pi = 3; pi 'foo'; expecting traitParse failedFAILED 00:01 109m» | ||
masak | TimToady, sorear: uhm... ^ | ||
sorear | std: pi; | 20:11 | |
p6eval | std 31483: OUTPUT«ok 00:01 106m» | ||
masak | oh. | ||
sorear | pi is already defined | ||
masak | std: constant Int psi = 3; psi 'foo'; | ||
p6eval | std 31483: OUTPUT«===SORRY!===Malformed constant at /tmp/NbS2wffr4e line 1:------> constant Int ⏏psi = 3; psi 'foo'; expecting traitParse failedFAILED 00:01 106m» | ||
masak | but that's not the problem. | ||
unless psi is also already defined :P | |||
std: psi | |||
p6eval | std 31483: OUTPUT«===SORRY!===Undeclared routine: 'psi' used at line 1Check failedFAILED 00:01 107m» | ||
ash_ | should that work? | ||
what does that mean? | 20:12 | ||
3 'foo'? | |||
20:12
ShaneC joined
|
|||
masak | ash_: see www.nntp.perl.org/group/perl.perl6....33148.html | 20:13 | |
ash_: TimToady theorizes that it should error out at parse time. | |||
ash_ | isn't that a parse time error? "Parse failedFAILED" | ||
masak | ash_: yes, but it's occurring earlier than I would expect. | 20:14 | |
ash_: take a look at the bail-out marker. | |||
rindolf | t/spec/S05-mass/properties-derived.rakudo ...................... Failed 9/256 subtests # Mandriva 2010.1 on an x86-64 machine - rakudo master. | ||
ash_ | masak: is it the type? | 20:15 | |
Int? | |||
rakudo: constant psi = 3; psi 'foo'; | |||
p6eval | rakudo c18d37: OUTPUT«Could not find sub &psi in main program body at line 11:/tmp/WlvSppdD8i» | ||
masak | ash_: yes, it's the type. but that should parse. | ||
ash_ | std: member:constant psi = 3; psi 'foo'; | ||
p6eval | std 31483: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = instead at /tmp/uYXNEX6EcF line 1:------> member:constant psi ⏏= 3; psi 'foo';Parse failedFAILED 00:01 109m» | ||
ash_ | std: constant psi = 3; psi 'foo' | 20:16 | |
p6eval | std 31483: OUTPUT«===SORRY!===Two terms in a row at /tmp/GuLrMgAsH9 line 1:------> constant psi = 3; psi ⏏'foo' expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:01 109m» | ||
masak | that's more what I wanted. | ||
ash_ | std: constant Int a = 123; | ||
p6eval | std 31483: OUTPUT«===SORRY!===Malformed constant at /tmp/1IGa5FgQ1Q line 1:------> constant Int ⏏a = 123; expecting traitParse failedFAILED 00:01 106m» | ||
ash_ | i don't think std's constant likes types | ||
masak | rindolf: some of the test files in t/spec/S05-mass/ are known to misbehave irregularly. | 20:17 | |
ash_: that's the problem, yes. correct. | |||
rindolf | masak: do you know how to solve it? | ||
masak | rindolf: no. | 20:18 | |
rindolf | masak: I see. | ||
masak | ash_: ah, maybe the syntax isn't that. there's not an example in the spec that puts the type in that place. | ||
std: my Int constant psi = 3 | |||
20:18
rindolf left
|
|||
p6eval | std 31483: OUTPUT«ok 00:01 109m» | 20:18 | |
masak | std: constant psi of Int = 3 | ||
p6eval | std 31483: OUTPUT«ok 00:01 109m» | ||
[particle] | std: constant a = Int(3) | 20:19 | |
p6eval | std 31483: OUTPUT«ok 00:01 109m» | ||
20:19
rindolf joined
|
|||
masak | either of those is fine. | 20:19 | |
the form in the email probably isn't. | |||
ash_ | got ya | ||
masak | we're lucky that TimToady wrote a program to tell us when he writes improper Perl 6 :P | ||
ash_ | so my and constant aren't interchangeable, it looks like he just replaced my with constant | 20:20 | |
std: my Int pi = 3; | |||
p6eval | std 31483: OUTPUT«===SORRY!===Multiple prefix constraints not yet supported at /tmp/jhP3b2jXAw line 1:------> my Int pi ⏏= 3;Malformed my at /tmp/jhP3b2jXAw line 1:------> my Int pi ⏏= 3; expecting any of: multi_declarator | ||
..typenamePa… | |||
ash_ | ah wait, no sigil | ||
std: my Int $pi = 3; | |||
p6eval | std 31483: OUTPUT«ok 00:01 110m» | ||
masak | ash_: correct. with 'constant', you get away with not having the sigil. | 20:21 | |
ash_ | std: constant Int pi = 3; | ||
p6eval | std 31483: OUTPUT«===SORRY!===Malformed constant at /tmp/HG3ME7a3Ai line 1:------> constant Int ⏏pi = 3; expecting traitParse failedFAILED 00:01 106m» | ||
20:27
Trashlord left
20:35
rindolf left,
tadzik left,
mberends left
20:37
ShaneC1 joined
20:38
ShaneC left
20:39
ShaneC joined
20:41
RAT is now known as robert3t,
ShaneC1 left
20:43
ShaneC left
20:45
timbunce left
20:46
Intensity joined
20:48
Su-Shee left
|
|||
masak | "omg people are helpful there!" -- :) -- blogs.perl.org/users/kaare/2010/06/...-code.html | 20:50 | |
oh, and moritz_++ | |||
20:50
Gruber joined
20:53
Grrrr left
|
|||
masak | with #parrot's help, I just figured out a way to read a non-utf8 file with Rakudo. \o/ | 20:53 | |
[particle] | does $ntuples-1 actually parse an infix:<-> there? | ||
masak | rakudo: my $ntuples = 8; say $ntuples-1 | ||
p6eval | rakudo c18d37: OUTPUT«7» | ||
masak | [particle]: yes. | 20:54 | |
std: my $ntuples = 8; say $ntuples-1 | |||
p6eval | std 31483: OUTPUT«ok 00:01 113m» | ||
[particle] | that doesn't mean it's correct, and i don't know how to check std... wait, i do | ||
masak | [particle]: yes, that means it's correct. | 20:55 | |
[particle] | std: my $ntuples-1 = 8; | ||
p6eval | std 31483: OUTPUT«ok 00:01 110m» | ||
[particle] | orly? | ||
jnthn | rakudo: my $ntuples-1 = 8; | ||
p6eval | rakudo c18d37: OUTPUT«Use of uninitialized value in numeric contextCannot assign to readonly value in '&infix:<=>' at line 1 in main program body at line 11:/tmp/ufkEM0BA3_» | ||
jnthn | Right. :-) | ||
It's doing | |||
(my $ntyples - 1) = 8 | |||
[particle] | that still doesn't tell me whether rakudo or std is wrong | ||
jnthn | Both are right I think. | ||
[particle] | yes, and you can assign to that? | ||
jnthn | STD doesn't do semantics like that. | 20:56 | |
[particle] | hrmm | ||
jnthn | So it'd not know. | ||
(Rakudo whines at you at runtime there.) | |||
sorear | std: die | ||
[particle] | ok, gotta re-read the semantics for the apostrophe | ||
p6eval | std 31483: OUTPUT«ok 00:01 107m» | ||
sorear | std: 2 + 2 = 5; | ||
p6eval | std 31483: OUTPUT«ok 00:01 108m» | ||
[particle] | s/semantics/syntax rules/ | 20:57 | |
masak | [particle]: anywhere between two \w chars is fine. | ||
std: my $_-_-_'_-_'_ | |||
p6eval | std 31483: OUTPUT«ok 00:01 108m» | ||
[particle] | is 1 not \w? | ||
masak | [particle]: er. yes :/ | ||
[particle] | see! | 20:58 | |
dalek | kudo: 2acfad3 | moritz++ | src/Perl6/Grammar.pm: complain about infix:<!%>. Closes RT #76170 |
||
kudo: cccc121 | moritz++ | (2 files): re-enable Cool.rindex parrot String. Also enable rindex.t |
|||
kudo: 1734e43 | moritz++ | src/core/Signature.pm: properly reflect capture/parcel binding in signature introspection |
|||
[particle] | LTM suggests $ntuples-1 is one identifier | ||
masak | then it must be <+[\w]-[\d]> | ||
that is, alphabetics and underscore. | |||
pugssvn | r31484 | moritz++ | [t/spec] tests for RT #75956, @*INC should be writable | ||
r31485 | moritz++ | [t/spec] test for RT #76174, "if" does not break lexical aliasing of $_ in a for-loop | |||
[particle] | token identifier { <.ident> [ <.apostrophe> <.ident> ]* } | 20:59 | |
ash_ | won't it only say $ntuples-1 is an identifier if there is an identifier $ntuples-1 ? | ||
[particle] | token ident { <.alpha> \w* } | ||
jnthn | There's always reading the grammar ;-) | ||
<.ident> [ <.apostrophe> <.ident> ]* | |||
[particle] | urk | ||
pugssvn | r31486 | moritz++ | [t/spec] test for RT #76226, all-whitespace range | ||
r31487 | moritz++ | [t/spec] test for RT #76198, {;} should be a Block | |||
ash_ | rakudo: my $a = 1; say $a-1; | ||
p6eval | rakudo c18d37: OUTPUT«0» | ||
jnthn | token ident { <.alpha> \w* | ||
} | |||
[particle] | yep | ||
pugssvn | r31488 | moritz++ | [t/spec] unfudging for rakudo | ||
r31489 | moritz++ | [t/spec] regex unfudging for rakudo | |||
r31490 | moritz++ | [S06] \| and | prefixes of parameters should be separately introspectable | |||
r31491 | moritz++ | [t/spec] tests for RT #76116, parcel and capture binding in signature introspection | |||
jnthn | So it has to be alphanumeric after the - or the ' | ||
It's not about what's before | |||
gah | |||
alpha | |||
[particle] | yep | ||
jnthn | not alphanum... | 21:00 | |
colomon | moritz_ goes crazy! | ||
moritz_ | just had a long, boring offline train ride | 21:01 | |
masak | moritz_: dakkar has a Regex::Match-related question in the backlog that I suspect you might be able to answer. | 21:02 | |
or is that Regex;Match? :) | |||
dakkar | precisely the problem :) | ||
rakudo: my $match=Perl6::Grammar.parse('$a+$b');.perl.say for @($match) | |||
p6eval | rakudo c18d37: OUTPUT«Method 'perl' not found for invocant of class 'Regex;Match' in main program body at line 11:/tmp/dzxhNxBx5Z» | ||
dakkar | that is: why is Perl6::Grammar returning objects of that weird class? | 21:03 | |
21:03
__eric__ left
|
|||
moritz_ | because it derives from Regex::Cursor, not Grammar | 21:03 | |
[particle] | so... i can't seem to enter unicode 2170 here | 21:04 | |
but that could be confusing after an apostrophe | |||
masak | [particle]: ⅰ | 21:05 | |
[particle] | rakudo: my $x = 5; say $x-ⅰ | ||
p6eval | rakudo c18d37: OUTPUT«===SORRY!===Confused at line 11, near "say $x-\u2170"» | ||
[particle] | rakudo: my $x = 5; say $x - ⅰ | ||
p6eval | rakudo c18d37: OUTPUT«===SORRY!===Confused at line 11, near "say $x - \u2170"» | ||
[particle] | ok, still confused | 21:06 | |
.u 2170 | |||
phenny | U+2170 SMALL ROMAN NUMERAL ONE (ⅰ) | ||
masak | [particle]: I don't think ⅰ is defined in Rakudo (or Perl 6) | ||
[particle] | icu should see it as numeric, no? | ||
masak | [particle]: yeah, but... | ||
...Rakudo still doesn't know what to *do* with it. | |||
it doesn't parse as anything. | 21:07 | ||
espectially not a number literal. | |||
[particle] | hrmm | ||
dalek | kudo: d18b5e7 | masak++ | src/core/Buf.pm: [Buf] now does Positional and .[] |
21:09 | |
masak | time to blog a little. | 21:10 | |
colomon | rakudo: say 5 - 1i | ||
p6eval | rakudo c18d37: OUTPUT«5 + -1i» | ||
colomon | rakudo: say 5 - i | ||
p6eval | rakudo c18d37: OUTPUT«Could not find sub &i in main program body at line 11:/tmp/epnqR0vEKi» | ||
lue | ohai | ||
I looked once, and couldn't find it; where's the i for imaginary/complex numbers defined? | 21:11 | ||
21:11
ciphertext left
|
|||
colomon | These days it's in Numeric, I think. | 21:12 | |
multi sub postfix:<i>(Numeric $z) { | |||
$z * 1i; | |||
} | |||
lue | .oO( hooray for recursion! \o/ ) |
21:13 | |
21:14
songmaster joined
|
|||
lue | I look at that and am amazed it doesn't break. | 21:16 | |
moritz_ | I guess there's another grammar rule for <number>i | 21:17 | |
so that the postfix:<i> only handles cases like $x\i | 21:18 | ||
21:18
patch_ is now known as patch
|
|||
moritz_ | stackoverflow.com/questions/3135673...92#3136192 | 21:21 | |
lue | Because I have the beginnings of a Quaternion type, and I was wondering how to get stuff like 4+3i+2k+1j working. | ||
21:24
Mowah left
21:26
foodoo left
|
|||
sorear | somebody needs to point out that [+] is implemented by calling a high level function which uses a loop | 21:27 | |
masak | loliblogged! use.perl.org/~masak/journal/40422 | ||
moritz_ | sorear: just updated my post | ||
masak | I really like the look-and-feel of StackOverflow. | 21:29 | |
moritz_ | lolialzoblogged: perlgeek.de/blog-en/perl-6/contribu...ttery.html | ||
ash_ | masak: anymore suggestions for the try.rakudo.org shell? | 21:31 | |
masak | ash_: looking. | ||
moritz_ | have prepared a post for tomorrow: next challenge is to implement $*ARGFILES, as suggested by pmichaud++ | ||
github.com/moritz/perlgeek.de/blob/...gfiles.txt # preview | 21:32 | ||
21:33
whiteknight joined
|
|||
masak | ash_: well, unfortunately after my comment about hovering for showing things, the cammands list sticks out from under the main blue thing in a not altogether aesthetic way. | 21:33 | |
ash_ | yeah, i know | ||
lue | .oO(I thought they were clockroaches) |
||
ash_ | i am trying to figure out how i want to deal with that | ||
masak | ash_: not a very critical thing, just letting you know. | 21:34 | |
ash_ | i might resize camelia and move it to fit above the terminal and move the commands list up the side some | ||
masak | ash_: I really like the skull-and-crossbones ^^ | ||
ash_ | lol | ||
masak | ash_++ | ||
ash_: I bet I could make up all manner of nightmarish things for you to fix with string interpolation. are you sure you want me to tell you? | 21:35 | ||
for example: "foo $bar baz" should highlight $bar, but 'foo $bar baz' shouldn't. right now, it does. | 21:36 | ||
21:36
Guest23195 left
|
|||
masak | ditto q[foo $bar baz] | 21:36 | |
ash_ | i don't do fancy quotes yet | ||
only ' and " | |||
moritz_ | but q:s[foo $bar baz] should highlight $bar :-) | ||
masak | well, '$bar' shouldn't hightlight $bar. | 21:37 | |
21:37
robert3t left
|
|||
masak | ash_: it should only highlight if it actually interpolates. | 21:37 | |
ash_ | i think i broke string constants... | ||
one sec | |||
masak | in that vein, "foo @bar[] baz" should highlight @bar[], but "foo @bar baz" shouldn't highlight @bar. | 21:38 | |
ash_ | hmm, string constants seem broken completely | 21:39 | |
wonder when i did that, probably when i add <a b c> | |||
masak | you had a separate color for string literals? | 21:40 | |
ash_ | ya | ||
masak | ash_: make sure you have "$foo."$bar"" as a test case, then. | ||
um. | |||
ash_ | um... | ||
masak | "$foo."$bar"()" | ||
that's it. | |||
ash_ | k | ||
i can live with that | |||
(i think) | |||
21:42
japhb left
|
|||
ash_ | ' and " work again | 21:43 | |
masak | '$baz' still highlights $baz here. | 21:44 | |
ash_ | is that wrong? | ||
masak | yes. | 21:45 | |
ash_ | ya, thats wrong isn't it, ' doen't interpolate | ||
masak | single quotes don't interpolate. | ||
"$foo."$bar"()" doesn't interpolate right either. it gets the variables right, but should probably interpolate the dot and the parens, too. | 21:46 | ||
also, there's not very much difference between the non-interpolated green and the interpolated green :) | |||
masak stops complaining and goes to bed | 21:47 | ||
'night, #perl6 | |||
21:47
masak left
21:51
dakkar left
22:04
Ross left
22:06
pyrimidine left
|
|||
sorear | jnthn: invocant types in Perl 6 are never statically known without whole-program analysis | 22:08 | |
sorear is, as it happens, working on a whole-program optimizing compiler for Perl 6 | 22:09 | ||
22:11
christine left
22:13
christine joined
|
|||
jnthn | sorear: While that may be true for full-blown Perl 6, it doesn't mean you can't have some additional pragmas in place for your internals/setting which tells the compiler that it can asusme more when it compiles those. | 22:13 | |
Like, that Foo.new actually returns something that ~~ Foo | 22:14 | ||
22:21
gfldex left,
gfldex joined
22:31
tylercurtis joined
22:32
felliott left
|
|||
pugssvn | r31492 | bbkr++ | [t/spec] tests for RT #72856 Null PMC access when two methods from different roles collide in a class composition in Rakudo | 22:33 | |
22:42
japhb joined
|
|||
pugssvn | r31493 | bbkr++ | [t/spec] tests for RT #72870 Cant take .WHAT of sufficiently decimal-endowed Rat in Rakudo | 22:53 | |
22:56
rgrau_ joined
22:57
masonkramer joined
23:05
skids left
23:06
tedv joined
23:08
lestrrat is now known as lest_away
23:14
rgrau_ left
|
|||
dalek | meta: r352 | stefa...@cox.net++ | trunk/vicil/Kernel.cs: [vicil] Sub gets to be a native class too for now |
23:15 | |
23:22
bluescreen joined
23:23
bluescreen is now known as Guest99621
23:29
cdarroch left
23:31
stepnem left
23:32
azert0x left
|
|||
ingy rebuilds an EC2 image and rebuilds rakudo... | 23:38 | ||
I need to learn how to save this EC2 image before turning it off | |||
23:41
stepnem joined
|
|||
pugssvn | r31494 | bbkr++ | [t/spec] tests for RT #72848 "0 but True" causes a no-applicable-candidates error in Rakudo | 23:42 | |
23:53
ruoso joined,
Psyche^ joined
23:57
hercynium joined
23:58
Patterner left,
Psyche^ is now known as Patterner
|