»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by wolfe.freenode.net on 30 October 2009. |
|||
06:42
Bucciarati left
15:32
literal left,
mj41 left
18:13
ilogger2 joined
18:15
TimToady sets mode: +v ilogger2
18:39
ascent joined
18:44
rjh_ joined
18:45
lmc joined
19:05
diakopter sets mode: +oo TimToady [particle]
|
|||
diakopter | oh | 19:05 | |
Wolfman2000 | Lots of ops today. Wonder what the occasion is. | ||
19:05
diakopter sets mode: +o Wolfman2000
|
|||
Wolfman2000 | diakopter: I don't idle in here long enough. Besides: soon as I disconnect/quit, it's gone. THanks anyway. | 19:06 | |
19:06
Wolfman2000 sets mode: -o Wolfman2000
|
|||
TimToady | long weekend, is all, and attacks often happen on long weekends | 19:07 | |
colomon still hasn't figured out what he can do as operator... | |||
Wolfman2000 | colomon: set the topic, kick people, ban people, control channel modes | ||
TimToady | mostly, /kick people who are misbehaving | ||
colomon | gotcha, /kick. that I think I can remember. | ||
Wolfman2000 | Of course, there are plenty that have autojoin set up on their client, so kicking doesn't always work | 19:08 | |
diakopter | /ipkb ircname | ||
TimToady | that's what bans are for | ||
rgrau_ | ban works then | ||
Wolfman2000 | TimToady: Care to explain how I can set up XChat Aqua so that I only automatically rejoin specific channels? | 19:09 | |
19:09
PacoLinux joined
|
|||
colomon | TimToady: I don't think I buy the idea of not reducing fractions if one denominator is a multiple of the other. It seems like the only case it really makes sense for is dollars and cents. | 19:09 | |
TimToady | but generally just the presence of operators prevents most griefers from trying | ||
why would I care to explain something I know nothing about? | |||
btw 'care to explain' is one of those phrases that aspergery people should avoid using because it makes neurotypical people think you're being snotty when you're not | 19:10 | ||
Wolfman2000 | ...noted | 19:11 | |
I'll simplify the issue then. | |||
My IRC client only allows a blanket "auto rejoin" for all or none | |||
TimToady | then don't :) | ||
I've never used autorejoin myself | 19:12 | ||
Wolfman2000 | One particular server I take part in often does kicks for...well, "fun". | ||
It's primarily for that server. | |||
TimToady | yes, well, I think we should optimize for how we want it to be, not necessarily for how it is | 19:13 | |
and personally I just stay away from such servers | |||
diakopter | or p0wn them with one of the many /usr/bin/perl backdoors | 19:14 | |
Wolfman2000 | ...depending on certain situations, that may happen in a few months. | ||
TimToady | you could probably run separate client processes in different windows somehow | ||
Wolfman2000 | diakopter: I'm not going to get myself klined | ||
diakopter | (I wasn't referring to Wolfman2000) | ||
Wolfman2000 | diakopter: wasn't obvious. My apologies. | 19:15 | |
19:25
masak joined
|
|||
masak | o/ | 19:25 | |
Wolfman2000 | afternoon masak | ||
masak | Wolfman2000: evening. | ||
Wolfman2000 | Did November work this time around? | 19:26 | |
masak | yup. | ||
Wolfman2000++ | |||
someone want to help me reply to this Twitterer? twitter.com/fail2code/status/6109938235 | |||
Wolfman2000 | masak: trying to come up with a reply | 19:27 | |
masak | I'm looking for a combination of honest, witty and understanding. | 19:28 | |
[particle] | something like: try implementing it. talk about horror... | ||
Wolfman2000 | my thinking... | ||
@fail2code Can you explain more of your feelings about this? What is fascinating? What is horrible? Input helps make the language better. :) | |||
lambdabot | Unknown command, try @list | ||
masak | [particle]: aye, something like that. :) | ||
jnthn | The horror is about how fascinating you find it? ;-) | ||
Wolfman2000 | guess I wasn't what you were looking for. | ||
masak | Wolfman2000: good thinking, but we lost him at 'explain'... :) | ||
Wolfman2000 | ...right, I did that again | 19:29 | |
/botignore @fail2code What are your feelings of Perl 6 in more detail? What is fascinating? What is horrible? Input helps make the language better. :) | |||
Wolfman2000 isn't in witty mode yet | 19:30 | ||
[particle] | jnthn: what's the size of perl6.obj on your system? | ||
i think i may be out of disk space, and that's why my rakudo build is faliing. | 19:31 | ||
my figners ar eflaiing too | |||
masak | Wolfman2000: I took [particle]'s suggestion and merged yours in at the end. | ||
Wolfman2000 | masak++: gotcha. I thought you wanted all of us to reply | 19:32 | |
jnthn | [particle]: 22.3 KB or so. | ||
[particle]: Note that the PBC ends up in a resource file. | |||
masak | Wolfman2000: I did. I find this PR stuff fascinating, to the extent that I grok it. | ||
[particle] | hrmm, i've got 5.5MB free | ||
jnthn | [particle]: Which we link in separately. | ||
[particle] | oh, right, how big is perl6.exe? | 19:33 | |
jnthn | [particle]: I think I last encountered that situation in like, 1995... :-) | ||
[particle] | yeah, well, it's a vm. | ||
jnthn | [particle]: 4.3 MB but that's in ng, so I suspect master is bigger. | ||
[particle] | ok, that's likely it, i'll see what i can delete. maybe msvc docs or some service pack files or something | 19:34 | |
jnthn wonders just how big the .exe is in master | 19:38 | ||
19:38
cotto joined
|
|||
jnthn | [particle]: If you're building 64 bit, you can almost half the size of it by building a 32-bit version instead, probably. ;-) | 19:38 | |
[particle] | i've got 83MB now, rebuilding... | 19:39 | |
jnthn | Yay | 19:40 | |
[particle]: What OS, BTW? | |||
[particle] | vista x86 | ||
as perl 5.10.1, msvc 2008 | |||
jnthn 's new laptop is Win7. | 19:41 | ||
Well, will be. | |||
:-) | |||
[particle] | i've been using win7 since this summer on my laptop. feels better, but not as good on the battery as i hoped | ||
Wolfman2000 | I tried Windows 7...it's even more of a Mac clone now | 19:42 | |
[particle] | aha! perl6.exe is 6,888,448 bytes | 19:43 | |
Wolfman2000 | that's...small | 19:44 | |
[particle] | nmake still fails, but that's when trying to write perl6.exe.manifest, which i don't care about | ||
19:44
araujo joined
19:46
araujo left
|
|||
jnthn | [particle]: Do you still get a perl6.exe out? | 19:46 | |
[particle] | yes | 19:47 | |
but i can't make test, because make fails. sigh, i'll submit a rakudobug | |||
19:48
araujo joined
|
|||
jnthn | [particle]: Is it a Rakudo bug? | 19:49 | |
[particle]: Or a pbc2exe bug? | |||
[particle]: I guess either way, I can look into it a bit when I've got Win7 about...which I guess will exhibit the same issue. | 19:50 | ||
[particle] | it probably will... are you xp now? | ||
jnthn | yeah | 19:51 | |
[particle] | i haven't been able to build on my win7 laptop, with the same issue, so either it's my environment or my platform | ||
19:52
eternaleye joined
|
|||
[particle] | it's not entirely clear to me whether it's pbc_to_exe or rakudo makefile, but it's likely pbc_to_exe. question is, why isn't it a problem for me to build parrot, if it's pbc_to_exe? | 19:52 | |
eternaleye | o/ | 19:53 | |
phenny | eternaleye: 15:14Z <Wolfman2000> tell eternaleye I think parallelism is implemented...at least, on the rakudo bot | ||
jnthn | [particle]: Sure...if it's pbc_to_exe that has the issue it'll be installation or path related I guess. | ||
[particle]: We won't know for sure until we get it tracked down. | 19:54 | ||
[particle] | ok, parrot does have parrot.exe.manifest... looking into the parrot makefile | 19:59 | |
ah, it may be a simple bug... | 20:01 | ||
jnthn | That would be nice. :-) | 20:02 | |
20:04
Exodist joined
|
|||
[particle] | from parrot's makefile: if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 | 20:04 | |
from the rakudo make output: mt.exe -nologo -manifest perl6.exe.manifest -outputresource:perl6.exe.manifest;1 | 20:05 | ||
notice the output resource names don't match | |||
with parrot, it uses $@, which is 'parrot.exe'. with rakudo, it's using 'perl6.exe.manifest' | 20:06 | ||
check parrot's tools/dev/pbc_to_exe.pir, lines 654-72 | 20:07 | ||
manifest_file_name = exefile | |||
manifest_file_name .= '.manifest' | |||
embed_manifest_str = 'mt.exe -nologo -manifest ' | 20:08 | ||
embed_manifest_str .= manifest_file_name | |||
embed_manifest_str .= ' -outputresource:' | |||
embed_manifest_str .= exefile | |||
embed_manifest_str .= ';1' | |||
this should result in '... -outputresource:perl6.exe;1' | |||
but it doesn't. | |||
20:11
obra joined
|
|||
obra | '$TIMEOFDAY | 20:11 | |
TimToady: I'd love to get your input on www.nntp.perl.org/group/perl.perl5....53965.html | |||
[particle] | hola obra | ||
masak | o/ | 20:13 | |
ironically, I'm getting slight mojibake in the fourth paragraph of that message. | 20:15 | ||
TimToady | I'm fine with generalizing \X to mesh more with the Unicode notion of graphemes | 20:19 | |
which is basically where Perl 6 is aiming for its default notion of "character" | 20:20 | ||
Wolfman2000 | 無 <-- so is this a grapheme? | ||
TimToady | yes | ||
masak thinks so | |||
TimToady | also happens to be a codepoint | 20:21 | |
Wolfman2000 | a code point somewhere...hang on | ||
.u 7121 | |||
phenny | U+7121 CJK UNIFIED IDEOGRAPH-7121 (無) | ||
Wolfman2000 | that's the one | ||
20:25
japhb joined
20:36
eternaleye left
20:37
eternaleye joined,
eternaleye left
|
|||
dukeleto | pmichaud: any comments re: github.com/leto/nqptap/commit/fbb06...245173b563 ? | 20:42 | |
20:42
pmurias joined
20:43
mberends joined,
pnate joined
|
|||
pmurias | diakopter: is anyone other then us using V8.pm? | 20:43 | |
masak | I have an enum. how do I get a list of its values, in the order I defined them? | 20:44 | |
20:44
colomon joined
|
|||
masak | er, a list of the names of the values. | 20:44 | |
jnthn | rakudo: enum Foo <a b c>; say Foo.^methods(:local) | 20:45 | |
p6eval | rakudo 7347ec: ( no output ) | ||
mberends | \o guys | 20:46 | |
jnthn | mberends: o/ | ||
masak | hi mberends! | 20:47 | |
mberends | Foo.perl probably NYI | ||
colomon is very confused by the last few minutes backlog... | |||
diakopter | pmurias: I don't know.. :) did you know it was originally named ACME::JavaScript (I think)? | 20:49 | |
dukeleto | pmichaud: nevermind :) | ||
colomon ah, my client dropped a key line from masak. | |||
diakopter read that as "key lime" | 20:52 | ||
I must be hungry | |||
jnthn hands diakopter some citrus fruits | |||
masak | with keys in them? | ||
colomon now wants key lime pie... | 20:53 | ||
jnthn | masak: Your comment doesn't appeel to me. :-P | 20:54 | |
masak | jnthn: pear not, I'm very grapeful. | 20:55 | |
jnthn | Those are appling. | 20:56 | |
masak | .oO( sour grapes ) |
||
jnthn blows a raspberry at masak | 20:57 | ||
masak | I think we've had that idiom up for discussion before. still, I had to go look it up again. :) | 20:58 | |
'to make a rude noise by putting your tongue between your lips and blowing' | |||
arnsholt | masak: A labio-lingual trill =D | 21:00 | |
masak | I love it when you talk dirty. | 21:01 | |
std: subset Foo of Int where sub($_) { return 1 } | |||
p6eval | std 29203: ===SORRY!===sub() interpreted as function call at line 1; please use whitespace instead of parensUnexpected block in infix position (two terms in a row) at /tmp/3TgSVH0PgV line 1:------> subset Foo of Int where sub($_) ⏏{ return 1 } expecting | ||
..an… | |||
masak | std: subset Foo of Int where sub ($_) { return 1 } | ||
p6eval | std 29203: ok 00:01 105m | ||
masak | ok, so where clauses to subtypes can be subs, if declared as such. that helps. | ||
colomon | :O | ||
arnsholt | masak: There's a stale old pun I really have to combat making right now ^^ | ||
21:01
bluescreen joined
|
|||
jnthn | masak: Erm. I'm not too sure on that. | 21:02 | |
masak | arnsholt: does it contain fruit? | ||
jnthn: works in Rakudo. :) | |||
jnthn | masak: Oh. | ||
arnsholt | masak: It contains linguists | ||
jnthn keeps quiet :-) | |||
masak | arnsholt: are they cunning? | ||
arnsholt | And, er, cleverness | ||
masak | right. | ||
I think we'll leave it at that. | |||
this is a family channel. | |||
colomon | what the heck does Foo back there do? | ||
arnsholt | Yeah, I think we better | 21:03 | |
jnthn | Yeah, let's prune this punning. | ||
arnsholt | I prefer raisins, meself | ||
colomon | partridge berries. | 21:04 | |
masak | rakudo: sub foo(@bar) { [<] @bar }; subset Ascending of List where &foo; say (1, 2, 4, 7) ~~ Ascending | 21:05 | |
that works locally! \o/ | 21:06 | ||
std: sub foo(@bar) { [<] @bar }; subset Ascending of List where &foo; say (1, 2, 4, 7) ~~ Ascending | |||
p6eval | rakudo 7347ec: ( no output ) | ||
std 29203: ok 00:02 131m | |||
masak | that means where clauses can be separated and re-used. woot! | ||
jnthn | std: subset Ascending where { [<] @^xs } | ||
p6eval | std 29203: ok 00:01 106m | ||
sjohnson | yo masak | ||
and colomon | |||
masak | sjohnson: hello! | 21:07 | |
colomon | greetings! | ||
masak++ for factoring wheres | |||
jnthn | colomon: I just realized why it works fine. | 21:08 | |
:-) | |||
jnthn is a bit slow today | |||
colomon | jnthn: it is supposed to work, I hope? | ||
jnthn | colomon: Yeah. We treat the RHS of the where, if it's not a block, as something to smart-match against. | 21:09 | |
But smart-matching against a sub invokes it and uses the result. :-) | |||
colomon | woot! | ||
jnthn | So however it's treated, it does what we want. | ||
masak | convenient. | ||
jnthn | In other words, even if we pick the wrong way to treat it, we still get the right answer anyway. | 21:10 | |
;-) | |||
masak | The Impossible Dream of Babbage! | ||
colomon | does that mean you can do something like $x where 1..5 ? | ||
jnthn | masak: Heh. Now we just need to make the rest of Perl 6 fall out that way, and we won't have any more bugs. ;-) | 21:12 | |
TimToady | where is always smartmatch, the subs aren't an exception | ||
masak | jnthn: speaking of bugs... | ||
masak just got a Null PMC access in his new script | |||
jnthn | masak: Surprise! | 21:13 | |
masak | awww... for me? you shouldn't have... :P | 21:14 | |
sjohnson | muri dana | ||
jnthn | .oO( next time, use "Peved!" instead ) |
||
masak | Preved! \o/ | 21:15 | |
jnthn | masak: Do you think the rest of the channel can bear us making puns in Russian too? :-) | ||
masak | jnthn: I think you just went a bit too fir. | 21:16 | |
jnthn | OK, I've leave off. | 21:18 | |
colomon | I pine for the days when people around here spent more time programming than punning... | ||
masak | yeah, but what's the pun in that? | 21:19 | |
rakudo: my @a = 1, 2, 3; my @b = (@a.shift for ^3); @b[0].WHAT | |||
p6eval | rakudo 7347ec: Null PMC access in find_method('WHAT')in Main (file <unknown>, line <unknown>) | ||
masak | there's my bug. | ||
masak submits rakudobug | |||
jnthn | That's an...odd...one. | ||
masak | the odd ones are the only ones left nowadays. :) | 21:20 | |
as a bug hunter, one learns not to be choosy. | 21:21 | ||
colomon | unless you want to work in ng | 21:22 | |
masak | yeah, but then you don't have any features, instead. :P | ||
are ranges and lists supposed to flatten inside of the list of values in enums? | 21:23 | ||
21:24
hcchien joined
|
|||
TimToady | it would be rather weird to have the name of an enum element be an unflattened list | 21:25 | |
masak | TimToady: how do I get all the names the elements of an enum, in order? | 21:30 | |
TimToady: simplest one I've found so far is SomeEnum.pick(*),sort | |||
colomon | Does there "where" thing work in reverse for "when"? By which I mean, if you have when { ... }, will it execute the block and fire the when's block if it returns true? | 21:31 | |
masak | hardly very idiomatic. | ||
TimToady | colomon: don't know what you mean by "in reverse"; when and where are really the same thing, they just use their boolean differently | 21:32 | |
21:33
Picta joined
|
|||
TimToady | both do a smartmatch on the current topic, but where assumes the topic is a type, and when just uses $_ | 21:33 | |
colomon | TimToady: I mean, we're "used" to where's clause being a block, and when's being something which is smartmatched. | ||
TimToady | speak for yourself; where has always been a smartmatch to me :) | ||
masak | man, this is the funkiest code I've written in Perl 6. | 21:35 | |
21:38
Picta left
|
|||
TimToady | masak: you might try SomeEnum::.keys since Type:: is supposed to be the stash of the type; no guarantees about rakudo though | 21:39 | |
masak | TimToady: oki, thanks. | ||
TimToady | doesn't guarantee order either | 21:40 | |
though of course, enums are only conventionally in a particular order | |||
they're just a convenient way to write a lot of constants | |||
colomon | my impression is that rakudo's enums are pretty dodgy right now. | 21:41 | |
jnthn | colomon: They're better now than they were. Trouble is, the spec seems to want them to be a bunch of different things at once... | 21:42 | |
TimToady | well, STD's enums are probably even dodgier, given it can't even evaluate a list | ||
jnthn | colomon: I'm just not sure at all how to put them back in ng. | ||
I guess I could try and delegate 'em to Pm since my previous 2 attempts ain't been so awesome. ;-) | 21:43 | ||
21:44
iblechbot joined,
hicx174 joined
|
|||
jnthn | TimToady: fwiw, the problem is more giving them all of their runtime semantics/behaviors rather than producing the name to value mapping... | 21:44 | |
TimToady | an enum is just sugar for constant declarations, and constants are values that can also be used as subsets representing that single value | ||
jnthn | TimToady: Yeah, but there's also an expection, that the enum's name can also function as a role. | 21:45 | |
TimToady: And that you can do .pick on it | |||
TimToady | .pick is minor | ||
jnthn | TimToady: And other bits. | ||
Well, all of the bits on their own are minor. | |||
I just didn't find a nice way yet to do do *all* of them. :-) | |||
TimToady | I don't know if "but" really needs a role, mostly it just has to intuit a has-a relationship for the enum property, I suppose, and a role might be one way to do it | 21:48 | |
but yeah, that part is a bit mushy | |||
might be more of a punning thing too | 21:49 | ||
but that might just be something that "but" does rather than something enum knows how intrinsically | 21:50 | ||
so I'd ignore "but" for the moment | |||
does that help? | |||
jnthn | TimToady: Perhaps. I fear we have tests trying to use the enum name on the RHS of "does" too. I guess we can always declare 'em wrong... | 21:51 | |
TimToady: The test file S12-enum/as-role.t for example. | |||
TimToady | in other words, if you wrote a fake enum entirely by putting constants into a module, it might still work just as well in 'but' and 'does' | ||
but it would do so by some kind of role generation | 21:52 | ||
that's how I see it today, but maybe I'm forgetting something fundamental | |||
I do that once every decade or so... | |||
21:53
M_o_C joined
|
|||
jnthn | :-) | 21:53 | |
TimToady: I'll keep those bits in mind when I/we get to looking at them again in ng. Thanks. | 21:54 | ||
TimToady | lemme think about it s'more in the meantime | ||
pmurias | diakopter: do you think if we were to release V8.pm on cpan bundling v8 would be a good idea? | ||
TimToady | bbl & | ||
masak | rakudo: sub foo($b) { $b == 42 }; subset FortyTwo of Int where &foo; say 42 ~~ FortyTwo | 21:58 | |
rakudo: sub foo($a, $b) { $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo | |||
p6eval | rakudo 7347ec: ( no output ) | ||
diakopter | pmurias: sure, I think that'd be cool | 21:59 | |
p6eval | rakudo 7347ec: ( no output ) | ||
masak | locally, the first one gives 1 and the second one gives a 'Not enough positional parameters passed'. | ||
jnthn: should the second one work? | |||
diakopter | pmurias: just a snapshot of trunk (which is "stable") should suffice | 22:00 | |
jnthn | masak: Um | 22:01 | |
masak: I *think* so. | |||
diakopter | pmurias: or you could include a switch in the Makefile.pl that could pull the latest from svn trunk if the user had subversion installed... of course, including it would also require dependencies on python, scons, g++ (or msvc++) | ||
jnthn | Since that should return a curry sub. | 22:02 | |
uh, curried | |||
.oO( mmm...vindaloo ) |
|||
masak | :) | ||
jnthn would almost go back to Riga again just for That Restaurant. | 22:04 | ||
masak | it was indeed a Good One. | 22:05 | |
22:05
_eMaX_ joined
|
|||
jnthn | Yeah...it does kinda beat my local one here. :-/ | 22:06 | |
OTOH, there's a Very Good One back in England, where I'm heading next week. | |||
masak | OK. here we go. | 22:08 | |
gist.github.com/244255 | |||
that code works. it's a bit slow, but it classifies poker hands, down to the resolution of two hands of the same type. | |||
jnthn | o_O | 22:09 | |
You just introduced 2, 4, 6, 8... as type names. :-) | |||
masak | yeah, sorry about that :P | ||
it does work, though. | |||
jnthn | lol | ||
masak | and there is prior art. | ||
jnthn | std: my 2 $x; | 22:10 | |
p6eval | std 29203: ===SORRY!===Malformed my at /tmp/p6P4NB6VeF line 1:------> my ⏏2 $x; expecting scoped declaratorFAILED 00:01 105m | ||
masak | you can have subs called 1 in Perl 5. | ||
jnthn | std: enum Foo ( 2, 4, 6 ); my 2 $x; | ||
p6eval | std 29203: ===SORRY!===Malformed my at /tmp/b7QB5cmy4S line 1:------> enum Foo ( 2, 4, 6 ); my ⏏2 $x; expecting scoped declaratorFAILED 00:01 105m | ||
jnthn | rakudo: enum Foo ( 2, 4, 6 ); my 2 $x; | ||
p6eval | rakudo 7347ec: Malformed declaration at line 2, near "2 $x;"in Main (file <unknown>, line <unknown>) | ||
jnthn | ooh, OK, not as type names. | ||
:-) | |||
masak | jnthn: well, no, not as such. | ||
jnthn | rakudo: enum Foo ( 2, 4, 6 ); &2 | ||
rakudo: enum Foo ( 2, 4, 6 ); say &2.WHAT | |||
masak | I just name the enum values as numbers, which should be kosher. | ||
p6eval | rakudo 7347ec: ( no output ) | 22:11 | |
masak | jnthn: I think you must quote the 2. | ||
jnthn | Oh well, at least Rakudo let you dod it, rather than exploding. :-) | ||
subset FullHouse of PokerHand where OnePair & ThreeOfAKind; | |||
wow! | |||
masak | :) | ||
jnthn | That's...beautiful. | ||
masak | this will do for blogging tonight. | 22:12 | |
22:12
astrojp joined
|
|||
diakopter | masak: I think FullHouse will hit on all ThreeOfAKind, as well..? | 22:13 | |
masak | diakopter: well, shouldn't it? it's higher in the type hierarchy. | 22:15 | |
jnthn | take Card.new(:$suit, :$rank); # heh | 22:16 | |
masak | hm, I should probably have made that one a map. | 22:18 | |
jnthn | masak: Yeah but "take Card" is cute. | 22:20 | |
(Cuteness Driven Development)++ | |||
masak | yes, it is. slightly misleading, though, since we're not taking cards at that point. :) | ||
jnthn | Yeah, true. | 22:21 | |
22:21
colomon left
|
|||
masak submits the where-and-assuming rakudobug | 22:21 | ||
22:22
colomon joined,
justatheory joined
|
|||
pmurias | diakopter: unless you want to do a lot of build magic there is no way we can get rid of the dependency on scons | 22:27 | |
Tene | masak: "$_ == $rank" -- does "==" work for "knight"? | 22:33 | |
masak | Tene: yes. | ||
Tene | Huh. | ||
masak | Tene: it's numeric comparison. | ||
Tene | Oh, "enum". | ||
masak | :) | ||
Tene | nice. | ||
masak | cunning, even. :P | ||
Tene | There should be a version of "grep" that smartmatches, IMO. | ||
grep $rank, @cards>>.rank | 22:34 | ||
masak | that oughta work, actually. | ||
masak makes local experiments | |||
Tene | rakudo: my @a = <a b c d e a e a>; say (grep 'a', @a).perl; | 22:35 | |
p6eval | rakudo 7347ec: ["a", "a", "a"] | ||
Tene | rakudo: my @a = <a b c d e a e a>; say @a.grep('a').perl; | ||
p6eval | rakudo 7347ec: ["a", "a", "a"] | ||
Tene | Nice. | ||
Yeah, do that. It looks much nicer. | |||
masak | yes, this works: | 22:36 | |
rakudo: enum A <a b c d>; my @a = a, b, c, b, c, b, a; for A.pick(*).sort -> $rank { say (grep $rank, @a).elems } | |||
p6eval | rakudo 7347ec: ( no output ) | ||
masak | locally. | ||
Tene++ # suggestion | |||
Tene | rakudo master doesn't have parameterized containers yet, right? | 22:37 | |
List[Card] | |||
Rakudo: Bag.new(); | 22:38 | ||
rakudo: Bag.new(); | |||
p6eval | rakudo 7347ec: Could not find non-existent sub Bagin Main (file src/gen_setting.pm, line 324) | ||
Tene | Still, very nice work, masak. :) | ||
masak | thanks :) | ||
Tene | oh, one more... | ||
colomon | btw, masak, very interested to see this code you are working on. :) | 22:39 | |
Tene | rakudo: my @a = <a b c d e>; say [lt] @a; | ||
p6eval | rakudo 7347ec: 1 | ||
Tene | rakudo: my @a = <a b c d e a>; say [lt] @a; | ||
p6eval | rakudo 7347ec: 0 | ||
masak | colomon: gist.github.com/244255 | ||
Tene | can you use '<' on Enums? If so, do Straight with [<] | ||
masak | Tene: necessary but not sufficient. | 22:40 | |
colomon | masak: for the book? | ||
Tene | Ah. | ||
Right. | |||
masak | colomon: maybe. | ||
colomon | :0 | ||
masak | colomon: after writing it, this piece of code, or something like it, feels like a good candidate. | ||
colomon | You certainly are doing interesting things with where. | 22:42 | |
jnthn | masak: It could introduce both enums and subset types. | ||
masak: "Other Typey Things" chapter? :-) | 22:43 | ||
masak | jnthn: well, the MMD example already uses enums currently. | ||
don't know if it should, though. | |||
jnthn | Oh? | ||
Isn't that the json one? | |||
masak | I mean the rock-paper-scissors one. | ||
jnthn | oh, OK. | 22:44 | |
wait, that uses enums?! | |||
jnthn never wrote that one in terms of enums... | |||
I guess you can.... | |||
masak | no, I kinda rewrote it... :/ | ||
it looked much better that way. | |||
but I'm not 100% sure it should stay that way. | |||
maybe we should 'simplify' a little by not introducing enums at that point. | 22:45 | ||
jnthn | Yeah...we have to write some "not what a guru would write" code in the earlier chapters in some senses, I think. | 22:51 | |
It is, after all, OK to speak in baby speak too as a beginner. :-) | 22:52 | ||
masak | guru? moi? | 22:53 | |
only in the sense that the prices of my courses are exorbitant. :P | |||
eiro | haha ... yes you are | ||
masak | I just work here... | ||
eiro | hello all | ||
masak | o/ | 22:54 | |
arnsholt | It amuses me that guru means heavy/weighty at the base ^^ | 22:55 | |
Even though it makes sense, I keep seeing some balloon-shaped guru, rather than the more standard mental image of the thin ascetic =) | 22:56 | ||
Tene | My job title is "guru". That's even what it says on my business cards. | 22:59 | |
arnsholt | Very cool | ||
jnthn | Tene: But are you heavy/weighty at the base though? | 23:00 | |
:-) | |||
Tene | My feet are a little bit larger than usual. | ||
jnthn | That'll do! True guru! :-) | 23:01 | |
masak | rakudo: enum SomeEnum <a b c>; say SomeEnum::.keys | 23:03 | |
locally, I get "invoke() not implemented in class 'Perl6Role'" | |||
p6eval | rakudo 7347ec: ( no output ) | ||
masak | is that worth a rakudobug submission? | ||
std: enum SomeEnum <a b c>; say SomeEnum::.keys | 23:04 | ||
p6eval | std 29203: ok 00:01 106m | ||
23:04
robert__ joined
|
|||
jnthn looks confused at what the indent was there | 23:04 | ||
*intent | |||
Oh | |||
Treating it as a namespace...hm | |||
masak | yah. a stash, said TimToady. | ||
jnthn is vaguely surprised Rakudo even parses that. | |||
masak | heh. | 23:05 | |
jnthn | I guess if it ends with :: we're meant to treat it as a stash...I guess I can go with that. | ||
File rakudobug if you like. | |||
masak likes | 23:06 | ||
jnthn | Many bugar today. :-) | 23:07 | |
masak | min rakudo e kass. :) | ||
arnsholt | masak: Det tror jeg ikke på ett eneste sekund =p | 23:08 | |
jnthn | Ja ar inte en bra compilerwriter. | ||
*Jag | |||
:-) | |||
masak | ja, ja. | ||
we all suck to some extent. :) | |||
jnthn | Just remember: if you think you suck, black holes suck SO much more. | 23:09 | |
.oO( I should be a motivational consultant ) |
|||
masak | jnthn++ pmichaud++ # have written the most compliant implementation out there so far | ||
Wolfman2000 | back from errands and whatnot. masak: what implementation? rakudo? | ||
masak | Wolfman2000: yes, that one. | 23:10 | |
mathw | Evening | ||
23:11
iblechbot left
|
|||
jnthn | hi, mathw :-) | 23:11 | |
masak | oh hai mathw! | 23:12 | |
mathw | :) | 23:14 | |
I can haz sweet and sour chikn ballz | 23:15 | ||
The cat's eyeing them acquisitively though | |||
jnthn | I can haz a jellus! | ||
mathw | you can join the cat in that then | ||
masak stores the word 'acquisitively' in his brain; nice one | 23:16 | ||
mathw | oh dear | 23:23 | |
it seems the cat does have a taste for batter | |||
mdxi | i45.tinypic.com/2ptcxfr.jpg | 23:24 | |
mathw | aaaaawww | ||
jnthn | awww...the cute! | 23:25 | |
mathw: That's...healthy. :-) | |||
mathw | keeps him quiet for a bit... | ||
I'm off to bed shortly anyway, so I shall have to take it away from him | |||
jnthn | OTOH, it won't make that much difference, given the main component of a cat's diet is cheezburgers. | ||
mathw | quite | ||
and it's far healthier than chocolate | |||
...which is poisonous to cats | 23:26 | ||
goodnight all | |||
jnthn | o/ | ||
mathw | I may do some lolsql tomorrow :) | ||
jnthn | \o/ | 23:28 | |
masak | mathw: 'night | ||
jnthn | Talking of SQL. I was doing some code review today (can't say what in...) and discovered something an incredible and innovative way to handle dynamic SQL query generation. | 23:29 | |
masak | so, are there plans to do a Perl 6 advent calendar? where do I sign up for a few days' worth? | ||
jnthn | Produce chunks of SQL, interpolating variables into them (without escaping, so you get vulnerabilities). The chunks should correspond to the SELECt, FROM, etc. Then pass those SQL strings to a stored procedure. The SP then concatenates and execs them. | 23:30 | |
Yes, I actually encountered this! | |||
The real world is a scary place. | |||
The SP actually had parameters like @SelectClause. | |||
I think using lolsql would actually have been an improvement. :-/ | 23:31 | ||
masak | probably. | ||
jnthn | I'm not quite sure what thought process you go through to actually create something like that... :-/ | 23:32 | |
It's like, enterprise level fail. | |||
Thankfully my job is only to whine about the code, not to actually maintain it. | |||
jnthn is glad the bulk of that is done and he can return to the much saner world of Rakudo hacking. | 23:33 | ||
colomon | masak: there are indeed plans afoot for an advent calendar. | ||
arnsholt | jnthn: It's the kind of thought process where you haven't heard of parameter binding I think | 23:36 | |
colomon | PerlJam and I were discussing it this morning. But I think he may have taken discussion to one of them fancy google wave things, and I'm not on there yet. | ||
jnthn | arnsholt: Yes, but they'd actually heard of it enough to use it to pass the manually-constructed chunks of SQL to the SP. That was the bewildering part. :-) | 23:37 | |
arnsholt | Now THAT is a WTF | 23:38 | |
jnthn | Right. :-) | ||
arnsholt | Consider sending it to thedailywtf.com? =) | ||
jnthn | arnsholt: NDA. :-( | 23:40 | |
Thus the "can't tell you where it's from" at the start of this. :-) | 23:41 | ||
oh gah | |||
I just tried to sign up to blogs.perl.org. The signup form tells me, "Text entered was wrong. Try again." | |||
arnsholt | Point, point. Reading comprehension is not my strong point I suppose. At least not at one in the morning =) | ||
jnthn | ...and doesn't tell me which field I didn't fill in right. And they all look fine to me. | ||
colomon | jnthn: It just throws me out with mysterious errors every time I try to login. | 23:42 | |
jnthn | colomon: Ah, not just me having issues then... | 23:43 | |
jnthn leaves it for another time | |||
colomon | jnthn: mind you, not the same error you are describing... | 23:44 | |
jnthn | colomon: I get the impression they're still working out the kinks. | 23:45 | |
masak | colomon: cool. anyway, I'm prepared to contribute some Perl 6 advent calendar day blog posts if need be. | ||
colomon | masak: \o/ I'm sure any contributions from you would be welcome. :) | 23:46 | |
afk (son's dinner) | |||
masak | sleep & | ||
23:47
masak left
|