»ö« | 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 moderator on 24 November 2009.
00:14 mariano__ joined 00:26 eternaleye joined
Wolfman2000 eternaleye: I have a github now 00:30
github.com/wolfman2000/Perl-6-Pastebin Perhaps this way you can make sure you get that command line interface in.
eternaleye \\o/
sjohnson ( `ー´) 00:33
Wolfman2000 I don't recognize that face sjohnson
sjohnson i call it /fatface
(´ー` )
worried face
PerlJam colomon: pong 01:07
phenny PerlJam: 26 Nov 13:45Z <colomon_> tell PerlJam I propose we do the Perl 6 Advent Calendar as a serious of blog posts linked to by a central blog post. It's super-low-tech, but it's also super-simple and would allow for comments, which strikes me as pretty important.
PerlJam colomon++ sounds good
colomon :) 01:09
Wolfman2000 anyone know when masak is planning on coming back?
jnthn Wolfman2000: Maybe when he's concious? 01:11
;-)
Wolfman2000: It's like, 2:11am here. ;-)
Wolfman2000 jnthn: ...right, you guys are in sweden or slovakia or somewhere with good beer.
jnthn All the sensible people are sleeping.
Wolfman2000: LOL!!
Wolfman2000: masak is in Sweden, I'm in Slovakia. :-)
Wolfman2000: But same timezone.
Wolfman2000 I've read some of your slides jnthn. Close enough. 01:12
colomon PerlJam: should we try to go ahead and kick out some days? or ideas for days, at least?
jnthn Wolfman2000: Well, they both being with an "S", so I guess they're pretty similar.
;-)
PerlJam colomon: Sure. Do you have any topics in mind? It might help to have any conceptual overlap planned for consecutive days or at least some planned progression. 01:14
colomon My only notion so far is given / when.
Wolfman2000 adverbs
I want >+ :rotate. :/
colomon has been having a busy life the last few days...
Wolfman2000 admits he's biased 01:15
01:15 quantumEd joined
PerlJam colomon: I have an idea for a two part thing with grammars in part 1 and objects in part 2. I'm not sure where that should be, but I don't think it should be in the first few days (I tend to think that *this* advent calendar, since it's the first for Perl 6, should be organized from "easy" to "hard") 01:17
colomon PerlJam: oh, and I was thinking of days for reduce and hyperoperators.
PerlJam: grammars are all yours, I haven't had time to really learn how to use them yet. :) 01:19
PerlJam: ooo, and a day for Rats. 01:20
PerlJam: Start off with describing how to get and build Rakudo? I know there are numerous descriptions out there, but that might help get things off to a good start. 01:21
PerlJam yeah 01:22
colomon: are you on google wave? 01:23
colomon I am not, but my wife just got on, and was asking what to do with it. :)
Wolfman2000 PerlJam: If it helps, I'm on wave
colomon (Can't ask her about it at the moment, she's putting our boy to sleep.)
Wolfman2000 ...alright! I gained more invitations! 01:24
colomon: I can send you an invite
colomon Wolfman2000: sweet.
PerlJam I was thinking we could wave about the topics for each day.
Wolfman2000 I require an email address from everyone that wants Wave
colomon colomon at gmail.com
Wolfman2000 PerlJam: Need my email? 01:25
PerlJam sure
mine is perlpilot at gmail.com
oh! Looks like I got 16 invites myself
Wolfman2000 PerlJam: added as a buddy 01:26
01:27 colomon_ joined
PerlJam Wolfman2000: you realize that you're now on the hook for writing something for the Perl 6 advent calendar :) 01:27
Wolfman2000 ...
jnthn
.oO( avoid Google Wave until January )
Wolfman2000 jnthn: why?
jnthn Wolfman2000: Or I'll be on the hook too. ;-) 01:28
Wolfman2000 jnthn: you're on the hook anyway
jnthn Oh...
Fine, I'll write something then.
Wolfman2000 besides...looks like we're already buddies on Google Wave
jnthn Huh? I didn't know I was on Google Wave... 01:29
Wolfman2000 ...oh: must have been another jonathan
jnthn They probably exist. :-) 01:30
01:30 agentzh joined
jnthn None of them are quite like me though. 01:30
Wolfman2000 well, get on wave anyway
I've got 14 invites, and I'm not afraid to use them
jnthn Wolfman2000: Can you tell me in one sentence what wave actually *is*? :-) 01:31
Wolfman2000 jnthn: Google Wave is a hybrid of IRC and Wikipedia all in one.
PerlJam odd, that's not how I would describe it.
Wolfman2000 PerlJam: Alright, let's see your description
PerlJam It's real-time, threaded, persistent, discussion. More like a hybrid of email and wiki 01:32
(It generally sucks as an IRC-a-like in my (limited) experience)
01:33 spinclad_ joined
jnthn OK, so basically it's epicly buzzword compliant. 01:33
I'm SO sold!
Well, I'll give it a try out of curiosity. :-)
01:33 athaba joined
PerlJam Wolfman2000: did you send jnthn an invite? 01:33
Wolfman2000 PerlJam: He has to give me his email address
jnthn my_nick@my_nick.net
<-- my_nick :-) 01:34
Wolfman2000 invite in the queue
From Google: "Invitations will not be sent immediately. We have a lot of stamps to lick."
jnthn Eww. Stamps taste disgusting. 01:35
Wolfman2000: Thanks. I'll probably have it in my inbox tomorrow or so. :-)
01:42 kaare joined
PerlJam okay, well I started a wave tagged with "Perl 6" and "Advent" for organizing days / topics, but right now I've got to settle a 3yr old down for sleep 01:43
Wolfman2000 I'm not seeing the wave...then again, I never figured out how to join a wave yet.
01:44 kcwu joined
PerlJam search for "Advent" (I'm not sure I made it public or even how) 01:44
anyway I'll figure that out later
PerlJam &
Wolfman2000 add public@a.gwave.com as someone you invite to the wave 01:45
dj_goku PerlJam: add, haha what Wolfman2000 said.
Wolfman2000 ...and I'm going to need a feather expert. I've busted up my cpan again 01:47
jnthn figures he should do the sleep thing, so he has a vague chance of being productive-ish tomorrow 01:48
o/
dj_goku jnthn: is that a wave?
colomon oh noes, Rat bug: lastofthecarelessmen.blogspot.com/2...1/aha.html 02:04
say 424/61731 + 832/61731
rakudo: say 424/61731 + 832/61731
p6eval rakudo 7347ec: too many positional arguments: 3 passed, 1 expected␤in Main (file <unknown>, line <unknown>)␤ 02:05
colomon hmmm 02:06
rakudo: say 424/61731 + 832/61733
p6eval rakudo 7347ec: too many positional arguments: 3 passed, 1 expected␤in Main (file <unknown>, line <unknown>)␤
Wolfman2000 ...and I've been run out of the #perl room due to miscommunication, among other things. 02:10
02:10 LionMadeOfLions joined
Wolfman2000 With this in mind...I need a Feather admin to look at my '/home/jafelds/.cpan/CPAN/MyConfig.pm' file and make sure it's "sane", or if I need to look into this "local::lib" thing that others are trying to emphasize. 02:11
Juerd, moritz_: either of you around for this?
colomon "A Rat64 that would require more than 64 bits of storage in the denominator is automatically converted either to a Num or to a lesser-precision Rat, at the discretion of the implementation." 02:13
Wolfman2000 no longer understands the Perl 5 community... 02:15
02:19 orafu joined
colomon rakudo: say 65535 * 65535 02:21
p6eval rakudo 7347ec: 4294836225␤
colomon rakudo: say (65535 * 65535) div 2 02:22
Wolfman2000 colomon: If it's alright for me to know, what are your thoughts of Perl 5 and the people anyway?
p6eval rakudo 7347ec: No applicable candidates found to dispatch to for 'infix:div'␤in Main (file <unknown>, line <unknown>)␤
Wolfman2000 rakudo: say (65535 * 65535) / 2
p6eval rakudo 7347ec: 2147418112.5␤
colomon Wolfman2000: Even though I've been a perl user since version 4, I haven't really paid much attention to the Perl 5 community. 02:23
Wolfman2000: It took Perl 6 to get me involved with the community at all, and even that was very slight involvement until about a year ago. 02:24
rakudo: say (65536 div 2 * 65535)
p6eval rakudo 7347ec: 2147450880␤
Wolfman2000 ...well, since this seems to be one of the few places that can accept my quirks... 02:25
colomon Audrey did a very good job setting up #perl6 as an accepting place. :) 02:26
Wolfman2000 PerlJam: when you are done taking care of your family, I wish to see this new Wave. Perhaps I'll have to contribute to this calendar somehow...if only to prove that I'm capable of solving some problems...even if other ideas provided are available.
The reason for being run out was due to a CPAN issue I had when I previously configured my Feather account. I thought the issue was one thing, but it ended up being another issue entirely. When I fixed it...well, I was accused of lying and nothing using a different tool. 02:27
colomon++: Remind me to thank Audrey++ should he/she come in.
colomon She. I've only seen here around here once or twice recently. 02:28
s/here/her/ 02:29
02:29 synth joined
colomon She was the one who started pugs. Awe-inspiring programmer, and apparently a thoroughly nice person. 02:30
colomon needs to break rat.t... 02:31
rakudo: say 61731 * 61731 02:36
p6eval rakudo 7347ec: 3810716361␤
TimToady rakudo: say (61731*61731).WHAT 02:37
colomon rakudo: say (100001 / 3810716361).perl
p6eval rakudo 7347ec: Num()␤
rakudo 7347ec: 100001/3810716361␤
TimToady rakudo: say (61731*61731) div 2e0
p6eval rakudo 7347ec: No applicable candidates found to dispatch to for 'infix:div'␤in Main (file <unknown>, line <unknown>)␤
TimToady rakudo: say 2e0.WHAT 02:38
p6eval rakudo 7347ec: Num()␤
TimToady rakudo: say Int(3810716361) div 2 02:40
p6eval rakudo 7347ec: invoke() not implemented in class 'Integer'␤in Main (file <unknown>, line <unknown>)␤
02:40 IllvilJa joined
diakopter rakudo: say 3810716361.Int div 2 02:41
p6eval rakudo 7347ec: 1905358180␤
colomon oooooo...
TimToady++
diakopter oh
diakopter backlogs, maybe
Wolfman2000 ...right, I may as well ask the head honcho. 02:42
TimToady akudo say 3810716361.Int
diakopter r:
TimToady rakudo: say 3810716361.Int
p6eval rakudo 7347ec: 3810716361␤
TimToady rakudo: say 3810716361.Int.WHAT
colomon rakudo: say 100001 / (61731 * 61731);
p6eval rakudo 7347ec: Int()␤
rakudo 7347ec: 2.62420475644527e-05␤
Wolfman2000 TimToady: I know you've created Perl. You've had a big hand in the community process I'm sure. Based on my experiences within this month, the Perl 6 community seems to be more...friendly than the present Perl 5 community. Is there any reason for that?
TimToady mostly just size; hasn't grown into having a high priesthood that needs to defend its right to exist 02:43
Wolfman2000 ...or claim that despite your nickname, there are some things that should only be done one way? 02:44
TimToady at some point it becomes easier to tell people not to rock the boat
Wolfman2000 diakopter: You can access my feather stuff, right?
diakopter yeah, anyone with a feather account can, I assume 02:45
Wolfman2000 Can you at least make sure that my CPAN/Config file is set up decently? I've been chewed out of the other Perl rooms due to a misunderstanding and me fixing the issue via different path.
jafelds is the account
diakopter at least? 02:46
colomon rakudo: say (61731 * 424 + 61731 * 832) / (61731 * 61731)
Khisanth TimToady: or age? ;)
p6eval rakudo 7347ec: 0.0203463413843936␤
Wolfman2000 has a feeling Perl 5 is slowly turning into Python
diakopter Wolfman2000: well, no
Wolfman2000 diakopter: was my phrasing bad?
diakopter a bit demanding and presumptuous :) I mean, I think I looked at a CPAN Config.pm only once or twice, a few years ago... 02:47
I could learn about it probably not much more quickly than you could...
Wolfman2000 ...alright, let me dig out the offender 02:48
mbuildpl_arg [--install_base /home/jafelds/perl5] <-- This line is fine right now as is, correct?
diakopter dunno. I can only guess that has something to do with Module::Build
Wolfman2000 You are correct on that. 02:49
diakopter grasps for straws, and finds only the shortest one :)
Wolfman2000 That line is how I managed to make installing CPAN packages on Feather work properly when created with Module::Build
Previously, they were trying to install on the traditional /usr/* directories...a no no
colomon rakudo: say (61371 * 61371).WHAT 02:50
p6eval rakudo 7347ec: Num()␤
diakopter dare I ask what is your observable/repeatable symptom?
Wolfman2000 diakopter: unsure if I understand your question right, but Asperger Syndrome
TimToady you haven't told us what went wrong
diakopter I mean, without any idea of what problem we're trying to solve, I'm kinda out of ideas 02:51
Wolfman2000 diakopter: right, I'll try to hurry
previously, mbuild_arg and mbuildpl_arg were set differently. I asked for help on fixing that, and the suggestions I was given...well, for some reason, CPAN wouldn't cooperate. While they were giving more ideas, I had to find a different answer in the documentation.
I found a different command to handle the issue of installing Module::Build packages, and it worked. 02:52
Thus, I was accused of lying and not listening.
diakopter: I was able to solve my own problem this time.
But I created another one by showing that there was more than one way of doing things. 02:53
diakopter, TimToady: that covers it, or do you need more?
TimToady what are you trying to do Right Now? 02:54
diakopter oh. someone might interpret that as "ha-HA. you didn't give me ALL the possible solutions"
Wolfman2000 TimToady: Presently, trying to calm down and pray that the Perl 5 group does the same. 02:55
Otherwise, more "install a package that may help with designing the Perl 6 Pastebin"
TimToady not personally, technologically
diakopter TimToady: what's the difference? :)
pugs_svn r29200 | colomon++ | [t/spec] Add (skipped) test for 424/61731 + 832/61731.
diakopter (kidding, really)
TimToady which package?
Wolfman2000 I was installing the most recent version of Perl::Critic.
That uses Module::Build 02:56
it's been installed locally on my end now.
If I'm going to have a hosted pastebin dedicated for Perl 6 code, I may as well make sure the code used is clean throughout.
02:57 LionMadeOfLions joined
TimToady perhaps they felt your solution was a workaround rather than a fix 02:58
as for the Aspergers, that just means that, while you almost certainly weren't lying, it's quite likely that you weren't hearing things the way they were intended
Wolfman2000 They did. I asked for help with a specific thing, but the answer I found was not 100% related to that original question.
Furthermore, I was yelled at for not using a particular package, local::lib, instead of using what CPAN provides. 02:59
colomon oh hey, I finally understand the 424/61731 + 832/61731error. 61731^2 isn't an Int, so Rat.new(Int, Int) isn't called, so it's complaining because Rat.new(Int, Num) isn't Rat.new().
TimToady well, if it's any comfort, I haven't the foggiest idea what local::lib is... :)
diakopter hardly any answers correspond that way to their questions, if the questions are very meaningful
Wolfman2000 TimToady: search.cpan.org/~apeiron/local-lib-...cal/lib.pm 03:00
diakopter it's rare that the person asking the question knows fully what they're asking and how to express it entirely "properly"
TimToady and people get tired of reformulating people's questions to suit their answers, unless they're politicians... :)
anyway, the main thing you should learn from this is not to treat other people the same way when you become an "expert" :) 03:01
colomon TimToady: I'm assuming it's okay for infix:<+>(Rat, Rat) (really Rat64) to return a Num if the sum cannot be represented as a Rat64? 03:02
Wolfman2000 TimToady++: considering I'm becoming a teacher right now, that is definitely sound advice.
TimToady colomon: that is what the spec says
Wolfman2000 would rather be a jack of all trades person than a specialist...at least that way, can't be stuck being an expert and hard headed.
TimToady though it's a bit unfortunate that two Rats with the same denominator end up overflowing on the square 03:03
esp when doing addition
03:03 nihiliad joined
colomon TimToady: obviously we can optimize this. :) 03:03
TimToady it oughta just be able to add the numerators and be done with it
Wolfman2000 ...that was my thought.
rakudo: my $tmp = 3/5; my $but = 4/5; say $tmp.num; say $but.den; 03:04
p6eval rakudo 7347ec: Method 'num' not found for invocant of class 'Rat'␤in Main (file src/gen_setting.pm, line 324)␤
colomon TimToady: would it be brilliant or insane to have a Rat.new that took a Num as the second argument and returned a Num instead of a Rat? That seems to be the way to automatically catch this....
Wolfman2000 ...how do you get the numerator and denominator again?
colomon Wolfman2000: .nude
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say $tmp.nude; 03:05
colomon Wolfman2000: or .perl or .numerator and .denominator.
p6eval rakudo 7347ec: 35␤
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say $tmp.nu;
p6eval rakudo 7347ec: Method 'nu' not found for invocant of class 'Rat'␤in Main (file src/gen_setting.pm, line 324)␤
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say join(" ", $tmp.nude);
p6eval rakudo 7347ec: 3 5␤
colomon TimToady: actually, on reflection, probably makes more sense to just rewrite the Rat math functions so that they use num / den to generate Rats rather than Rat.new.
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say join(" ", $tmp.nude).shift; 03:06
p6eval rakudo 7347ec: Method 'shift' not found for invocant of class 'Str'␤in Main (file src/gen_setting.pm, line 324)␤
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say $tmp.nude.shift;
p6eval rakudo 7347ec: 3␤
Wolfman2000 rakudo: my $tmp = 3/5; my $but = 4/5; say $tmp.nude.pop;
p6eval rakudo 7347ec: 5␤
diakopter rakudo: say (1 / 0).nude[1]
p6eval rakudo 7347ec: 0␤
Wolfman2000 somehow, I'm unsure if I like calling numbers nude.
TimToady it's the Rats that are nude 03:07
anyway, you won't forget the method name :)
Wolfman2000 rakudo: my $tmp = (1/(1/2)); say $tmp.nude.pop;
p6eval rakudo 7347ec: 1␤
TimToady that shouldn't work, actually
Wolfman2000 rakudo: my $tmp = (1/(1/2)); say $tmp.nude.shift;
p6eval rakudo 7347ec: 2␤
diakopter .nude[1] shouldn't work or .nude.pop shouldn't work
Wolfman2000 ...I think this one did work
TimToady it only works because rakudo cheats and returns arrays instead of parcels
Wolfman2000 1 / 1 / 2 = 1 * 2 = 2
TimToady pop shouldn't 03:08
nor shift
diakopter is it supposed to complain on Rat 1 / 0
TimToady no
diakopter ok
rakudo: say Inf.Int 03:09
TimToady however Num(1/0) is gonna complain :)
p6eval rakudo 7347ec: -9223372036854775808␤
diakopter sweet
rakudo: say Inf.Int + 1
p6eval rakudo 7347ec: -9.22337203685478e+18␤ 03:10
TimToady er, it's gonna complain someday...
diakopter rakudo: say Num(1/0)
p6eval rakudo 7347ec: invoke() not implemented in class 'Float'␤in Main (file <unknown>, line <unknown>)␤ 03:11
diakopter rakudo: say (1/0).Num
p6eval rakudo 7347ec: Divide by zero␤in Main (file src/gen_setting.pm, line 324)␤
diakopter rakudo: say (1 / 0).Num
p6eval rakudo 7347ec: Divide by zero␤in Main (file src/gen_setting.pm, line 324)␤
TimToady should probably just return +Inf
Wolfman2000 and -1 / 0 return -Inf?
TimToady I would presume
Wolfman2000 ∞ I wonder if we can get this symbol some use...
TimToady not without a macro; constant requires alpha 03:13
std: constant ∞ = Inf;
p6eval std 29199: [31m===[0mSORRY![31m===[0m␤Missing initializer on constant declaration at /tmp/QhhdjK4OOj line 1:␤------> [32mconstant [33m⏏[31m∞ = Inf;[0m␤ expecting any of:␤ trait␤ type_declarator__S_230constant␤ typename␤FAILED 00:01 105m␤
Wolfman2000 std: my constant ∞ = Inf;
p6eval std 29199: [31m===[0mSORRY![31m===[0m␤Missing initializer on constant declaration at /tmp/peJtkZj3VU line 1:␤------> [32mmy constant [33m⏏[31m∞ = Inf;[0m␤ expecting any of:␤ trait␤ type_declarator__S_230constant␤ typename␤FAILED 00:01 103m␤
TimToady std: constant 無 = Mu; # okay
p6eval std 29199: ok 00:01 104m␤
Wolfman2000 ...so how does the Mu one work and the Inf one not? 03:14
TimToady actually "missing initializer" is the wrong error
ideographs are considered alphabetic
std: sub term:<∞>() { Inf }; say ∞ / ∞ 03:15
p6eval std 29199: ok 00:02 109m␤
TimToady that works
Wolfman2000 TimToady: perhaps term should be multi? 03:16
TimToady well, not semantically :)
Wolfman2000 rakudo: sub term:<∞>() { Inf }; say ∞ / ∞
TimToady how so, if there are no args to differentiate?
p6eval rakudo 7347ec: say requires an argument at line 2, near " \\u221e / \\u221e"␤in Main (file src/gen_setting.pm, line 2593)␤
03:19 pointme joined, zaslon joined
Wolfman2000 TimToady: ...good point 03:20
TimToady aha, looking for \\N*'=' doesn't work under ratcheting
(was supposed to say "Malformed constant") 03:21
pugs_svn r29201 | lwall++ | [STD] do not complain about missing constant init if there seems to be one 03:26
diakopter std: ::& = ::& 03:27
p6eval std 29200: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix = instead at /tmp/PtWGiQoUE7 line 1:␤------> [32m::& =[33m⏏[31m ::&[0m␤FAILED 00:01 104m␤
colomon I need to go to bed now, but if people want to add tests to S32-num/rat.t for things like (1/0).Num == Inf, I'll try to make them work in the morning. :)
03:27 c9s joined
diakopter TimToady voice alias 03:28
03:29 c9s joined 03:36 moritz__ joined
TimToady rakudo: say Mu 03:36
p6eval rakudo 7347ec: Could not find non-existent sub Mu␤in Main (file src/gen_setting.pm, line 324)␤
03:37 literal_ joined
quantumEd rakudo: does perl 6 have buddha nature? 03:37
p6eval rakudo 7347ec: Confused at line 2, near "have buddh"␤in Main (file <unknown>, line <unknown>)␤
03:37 mathw_ joined
Wolfman2000 quantumEd: buddha/japanese/multicultural 03:37
03:37 Maddingu1 joined, rhr_ joined 03:38 athomaso1 joined 03:39 envi^office joined
TimToady std: does perl 6 have buddha nature? 03:40
p6eval std 29200: [31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/kmSPNvZTgF line 1:␤------> [32mdoes perl 6 [33m⏏[31mhave buddha nature?[0m␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤ terminator␤Undeclared routines:␤
..'does' used at li…
diakopter std: do do do do 03:41
p6eval std 29200: ok 00:01 103m␤
TimToady std: does perl6 have buddha nature?
p6eval std 29200: [31m===[0mSORRY![31m===[0m␤Confused at /tmp/rlHnyNv8HG line 1:␤------> [32mdoes perl6 have buddha nature[33m⏏[31m?[0m␤ expecting any of:␤ POST␤ argument list␤ bracketed infix␤ infix␤ infix or meta-infix␤ infix stopper␤ postfix␤ postfix_prefix_meta_operator␤
.. standard stopper␤ st…
Wolfman2000 umm... TimToady: unsure what you're going for
diakopter fun? 03:42
std: do: do :do :do :do :do :do 03:43
p6eval std 29200: ok 00:01 103m␤
diakopter std: do re: mi: fa: so: la: ti: do 03:45
p6eval std 29200: ok 00:01 103m␤
Wolfman2000 nicely done
diakopter Netsplit zelazny.freenode.net <-> irc.freenode.net quits: frew, mathw, literal, @TimToady, buu, rhr, athomason, renormalist 03:46
03:47 TimToady joined, buu joined, frew joined, athomason joined, mathw joined, rhr joined, renormalist joined, literal joined
TimToady std: do perl6 programs have buddha nature ??? 03:48
p6eval std 29200: Undeclared routines:␤ 'buddha' used at line 1␤ 'have' used at line 1␤ 'nature' used at line 1␤ 'perl6' used at line 1␤ 'programs' used at line 1␤ok 00:01 104m␤
diakopter TimToady: how were you netsplit but I wasn't?
oh, different server
TimToady yes, I was 無
it didn't seem very much like nirvana... 03:50
03:57 frew_ joined
TimToady rakudo: say "M\\x0336u\\x0336" 04:02
p6eval rakudo 7347ec: M̶u̶␤
TimToady looking for something better than () on the end of a typename... 04:04
rakudo: say "M\\x0305u\\x0305" 04:05
p6eval rakudo 7347ec: M̅u̅␤
TimToady pity it comes out on different levels
Wolfman2000 ...what's \\x0305 again? overbar?
TimToady COMBINING OVERLINE 04:06
Tene displays fine for me.
Wolfman2000 it doesn't display fine for me 04:07
looks like M and u are in the same location
rakudo: say "M\\x0305 u\\x0305"
p6eval rakudo 7347ec: M̅ u̅␤ 04:08
Tene .u ̄
phenny U+0304 COMBINING MACRON (◌̄)
Wolfman2000 ...it's like \\x0305 doesn't allow for extra space to the right...
rakudo: say "M\\x0305 u\\x0305 "
p6eval rakudo 7347ec: M̅ u̅ ␤
Wolfman2000 when I do that, I clearly see the individual letters
Tene .u 0305
phenny U+0305 COMBINING OVERLINE (◌̅)
TimToady rakudo: say "M\\x0338u\\x0338" 04:11
p6eval rakudo 7347ec: M̸u̸␤
Wolfman2000 that came through clearly
TimToady yowsers, that response took about 2 minutes to get back to me... 04:14
showed up in the log long before it got back here
04:19 xomas_ joined
TimToady rakudo: say "ᴹᵘ" 04:19
p6eval rakudo 7347ec: ᴹᵘ␤
Wolfman2000 small raised letters?
TimToady dunno if we have raised colons though... 04:20
doesn't look like it, drat 04:22
diakopter how 'bout a pun on 'type' 04:28
Wolfman2000 type...how do you pun that? 04:29
diakopter you just did :D
Wolfman2000 ...I don't get it
diakopter you typed "how do you pun that"
TimToady rakudo: say "\\e[31mMu\\e[0m"
p6eval rakudo 7347ec: [31mMu[0m␤
diakopter rakudo: say "\\e[31mMu" 04:30
p6eval rakudo 7347ec: [31mMu␤
diakopter rakudo: say "hi"
p6eval rakudo 7347ec: hi␤
diakopter oh
04:34 jaldhar joined
TimToady just seems to me that if we're going to tack extra chars on anyway in the form of (), we could tack something else on instead that doesn't take extra columns and save screen real estate 04:38
and still indicate that the value is really undefined, not literal "Int", say 04:39
with overstrikes, or colors, or something
maybe config with PERL6MU :) 04:40
Wolfman2000 config with emptiness? 04:41
TimToady: I support the idea of Mu replacing Undef. I don't know about PERL6Mu
TimToady well, it's just that it'll typically print out Mu() rather htan just Mu
by current spec
rakudo: say Int
p6eval rakudo 7347ec: Int()␤ 04:42
TimToady rakudo: say "\\e[31mInt\\e[0m" # cooler
p6eval rakudo 7347ec: [31mInt[0m␤
TimToady or hotter
s1n s1n.dyndns.org/index.php/2009/11/27...he-giving/ 04:46
that goes for pmichaud and frew
(i don't know if anyone else is in the area)
Wolfman2000 I'm also in America if that helps
but probably not near where you live
s1n dallas 04:47
Wolfman2000 North Carolina
s1n well, if you're in dallas, offer extended :)
04:47 eternaleye joined
Wolfman2000 how much do they pay math teachers in training? 04:47
s1n lol dunno 04:48
Wolfman2000 thanks anyway 04:49
s1n no, thank you :) 04:50
04:53 snarkyboojum joined 04:58 JimmyZ joined
eternaleye Wolfman2000: I'm on wave with this nick @googlewave 05:05
diakopter that's impressive
eternaleye I started the "Perl bindings for wave?" wave
Wolfman2000 hope you made it public
eternaleye Yes, and it got some bikeshedding XD
Wolfman2000 bikeshedding? don't recall that. I'll try to find your wave 05:06
...seriously, I question if the search functionality even works 05:07
05:07 jaldhar joined
Wolfman2000 eternaleye: jafelds@googlewave for me. 05:08
eternaleye Wolfman2000: It does, if you know what switches need toggled
Wolfman2000 eternaleye: apparently I don't
eternaleye What are you wanting to find? 05:09
Wolfman2000 eternaleye: the perl bindings for wave wave
I just searched for your recent waves, and it came up with no results
eternaleye That I can link you to
Wolfman2000 ...so waves CAN be linked to 05:10
eternaleye also, with:public tag:perl does wonders
Wolfman2000 I didn't figure that out
ah...HERE we go
eternaleye: still wish to know how to copy a wave. I think I found a good one 05:15
eternaleye What's the waveid?
(the bit after ! in the URL)
Wolfman2000 w%252BLHWztcnmD.1 05:16
eternaleye Waves can be linked to via the url in the browser window, since no client state is stored there
05:16 pure1111_ joined
Wolfman2000 and...beta version of Firefox crashed. 05:16
I may have to try what I want to on Safari 05:17
eternaleye Use Chrome!
Wolfman2000 Mac OS X
eternaleye And I'm on linux, use Chromium!
www.manu-j.com/blog/download-update...-mac-os-x/ - there are buckets more on google 05:18
Wolfman2000 also, I can't view the Gadget that's being talked about
eternaleye: with:public tag:prime 05:42
I made an update
You'll know what to look for
...and I possibly broke it 05:45
eternaleye en.wikipedia.org/wiki/Primality_tes...stic_tests maybe? 05:51
Lotsa math, but...
05:54 crythias joined
Wolfman2000 eternaleye: I'll let someone else do that 05:54
eternaleye ;D
Wolfman2000 I have the wave up, and it's not code locked
eternaleye Actually, this is really damn simple math: en.wikipedia.org/wiki/AKS_primality_test 05:55
I'm astounded
It's beautiful 05:56
Wolfman2000 eternaleye: The problem I have with that is the very first step. What numbers do you even choose for a and b?
eternaleye as long as 0 <= a <= r and b >= 1, it looks like it works 05:59
Grr,
as long as 0 < a <= r and b > 1, it looks like it works
Wolfman2000 You can mess with it if you want. I need sleep very soon 06:00
eternaleye Cool 06:02
06:23 beggars joined 06:29 JimmyZ_ joined 06:36 kaare joined 06:41 kst` joined 06:42 [sbp] joined, Bucciarati left 06:43 Lorn joined, drbean joined 06:44 szabgab joined
eternaleye phenny: tell Wolfman2000 that I added some junctions to the prime tester. That way it'll speed up when we get autothreading, is a tighter loop now, and is also fewer lines! 06:45
phenny eternaleye: I'll pass that on when Wolfman2000 is around.
07:05 hcchien joined, jan_ joined
mathw Hello 07:07
07:10 hcchien joined
moritz__ ood morning 07:17
s/^/g/
07:17 Su-Shee joined 07:25 quantumEd joined 07:50 lestrrat joined
diakopter hm 07:50
08:01 mberends joined
mberends good $coffee-time everyone 08:02
mathw good $nomming-time 08:05
mberends this weekend is the annual largest computer fair in the Netherlands, which I enjoy attending. Many professionals hate it, because of the bustling crowds and hectic selling, but that's what makes it so much fun :) 08:07
mathw :) 08:19
08:21 pure1111 joined, sjn joined, nsh joined, _eMaX_1 joined, japhb joined, yahooooo joined, s1n joined, lisppaste3 joined, IRSeekBot joined, broquaint joined, Bucciarati joined, silug joined 08:25 pure1111_ joined 08:27 ejs joined 08:28 riffraff joined, iblechbot joined 08:40 ejs1 joined 08:54 elmex joined
sjohnson heh 08:57
09:08 meppl joined 09:10 dbrock joined 09:16 colomon joined 09:50 hanekomu_ joined 09:52 justatheory joined 10:04 jferrero joined 10:13 riffraff joined, sjn joined, nsh joined, _eMaX_1 joined, japhb joined, yahooooo joined, s1n joined, lisppaste3 joined, IRSeekBot joined, broquaint joined, Bucciarati joined, silug joined 10:16 ejs2 joined 10:20 masak joined
masak oh hai, #perl6. 10:20
phenny masak: 26 Nov 21:32Z <frettled> tell masak Coup d'etat? masak++ :D
masak frettled: well, only in the sense that I'll try the forgiveness rather than the permission.
10:31 payload joined
frettled masak: Yeah, yeah, but that's what I support :D 10:34
masak frettled: :) 10:35
10:40 justatheory joined 10:53 hanekomu_ joined 10:55 payload joined 11:06 draxil42 joined 11:35 colomon_ joined
jnthn Good...not-morning... 11:43
11:43 iblechbot joined
huf jnthn: it's always morning in space, so on average... :) 11:44
masak lolitsjnthn! 11:46
11:50 SmokeMachine joined
colomon_ jnthn: the good news is I'm working on making Rats smarter in master/ 11:55
jnthn: the bad news is, my fixes won't port to ng until the wrong operator bug is fixed. 11:56
moritz_ "wrong operator bug"? that dispatch thing? 11:57
jnthn That's fine...we need to fix that anyway.
moritz_: yeah
moritz_ www.perlmonks.org/?node_id=809468 12:03
jnthn Ouch. 12:08
colomon_ I'm kind of impressed rakudo even runs on a PowerOC Mac.
jnthn Yeah, but that's...well..slow. 12:09
colomon_ but someone else there reports it only takes 3 sec on his G4 12:10
moritz_ something's srsly b0rked 12:11
colomon_ 15 sec suggests somethinfgis wonky with the build
moritz_ aye
jnthn Yeah 12:12
3 secs is still a lot though. :-(
moritz_ but you know... p6eval also times out when a class is declared 12:13
jnthn That's especially odd. 12:14
colomon_ are there parrot benchmarks? 12:15
moritz_ colomon_: yes, dukelet0 did some
colomon_ seems like getting this guy to run those might be educational. 12:16
moritz_ dukelet0: do you have some fancy charts from your benchmarks? 12:17
12:18 JimmyZ joined
JimmyZ Good evening, #perl6 12:18
12:19 bluescreen joined 12:23 am0c joined
lisppaste3 colomon pasted "lots of spectest errors with master on 64-bit linux" at paste.lisp.org/display/91158 12:37
moritz_ I know :( 12:38
most of them related to the Object -> Mu transition
colomon_ ah 12:39
moritz_ but if pmichaud++ and jnthn++ still plan to get ng up for the next release, I won't invest the time to investigate and fix/fudge
colomon_ last I heard pmichaud++ was talking about having ng replace master next week. but I'm starting to seriously doubt that is reasonable. 12:42
moritz_: did you get anywhere with split? 12:43
moritz_ colomon_: yes, I wrote an implementation yesterday night and forgot to push :-)
ng_feed rakudo-ng: moritz++
rakudo-ng: Implement Any.split(Regex).
moritz_ colomon_: sadly Any.match regressed, so I couldn't test it
(I recommend reading the full commit message, ng_feed shows only the first line) 12:44
colomon_ like I said, I think we should probably write some more really basic test files for this stuff.
moritz_ the problem is that "really basic" is very dependent on what you actually implement 12:45
there's already a split-simple.t or so 12:46
JimmyZ ng_feed needs more clever.
moritz_ nope
it's just a stop-gap solution
until either dalek can track multiple branches, or ng replaces master
JimmyZ replace++
moritz_ it's not worth the trouble hacking on ng_feed 12:47
JimmyZ expect that
colomon_ moritz_: should split really return match objects? 12:48
moritz_ colomon_: with the :all flag set, yes 12:49
colomon_ funky
do you ever do $l--? 12:50
moritz_ anyway, I find that this implementation is quite cute, and it becomes lazy automagically one gather/take is lazy
colomon_ agreed, moritz_++ 12:51
moritz_ now I only want to know if it works :-)
colomon_ isn't there supposed to be a version which takes a normal string instead of a regex? 12:52
if match is broken that would be easier to test. :) 12:53
moritz_ there is, but I haven't written that yet
maybe I'll get to some book-writing over the weekend 12:54
not sure I'll get to Str.split(Str) 12:55
colomon_: so feel free :-)
colomon_ hmmmm....
looks to me like you've already done all the hard work.... 12:56
btw, looks to me like my $l = $limit.WHAT eq 'Whatever()' ?? Inf !! $limit - 1; should have some sort of sugar to simplify it. :) 12:58
moritz_ $limit ~~ Whatever ?? Inf !! $limit-1 13:01
if Whatever as a type object is known
13:02 envi^home joined 13:04 bluescreen joined
mathw .WHAT eq "typename" is not a good idea :) 13:05
I think you almost always want to use ~~ instead
moritz_ mathw: I know 13:06
but at that part of the setting the Whatever type object isn't known
maybe .does('Whatever') would have been better
13:06 bbelehrad joined
moritz_ or .isa, not sure 13:06
ng: say *.does('Whatever') 13:07
p6eval ng 6c3372: too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 10046 (src/builtins/List.pir:144)␤
moritz_ ng: say *.isa('Whatever')
p6eval ng 6c3372: 1␤
moritz_ better
jnthn moritz_: $foo ~~ ::Whatever # should work
13:08 colomon joined
moritz_ ng: say 1 ~~ ::Whatever 13:09
p6eval ng 6c3372: 0␤ 13:10
moritz_ ng: say * ~~ ::Whatever
p6eval ng 6c3372: 1␤
ng_feed rakudo-ng: moritz++ 13:12
rakudo-ng: small improvement in workarounds in Any-Str.pm; fixed typo in comment
rakudo-ng: moritz++
rakudo-ng: remove ugly workaround as suggested by jnthn++
moritz_ uhm 13:13
I meant to squash these two commits
moritz--
13:14 bbelehrad left
JimmyZ any differece between $foo ~~ Whatever and $foo ~~ ::Whatever? 13:19
jnthn JimmyZ: ::Whatever indicates it's certainly a type name. 13:20
moritz_ only if the Whatever typo object is not known
jnthn JimmyZ: If the parser just sees Whatever and it doesn't know that type yet, it has to assume that it's a sub call.
moritz_: typo? ;-) 13:21
moritz_ :-)
13:21 xenoterracide joined
JimmyZ jnthn: which is better? if these all work. 13:22
moritz_ the one you're more comfortable with 13:23
13:23 colomon joined
moritz_ timtowtdi 13:23
13:24 colomon_ joined
colomon_ jnthn: anyway to order the core file build so basic types like Whatever come before fancier types? 13:25
moritz_ wasn't able to do that
JimmyZ I like the former, but it doesn't work well. 13:26
ng needs more semicolons 13:27
13:27 pmurias joined 13:29 xenoterracide joined 13:30 xenoterracide joined
colomon_ is a little perturbed at all the Rat math edge cases he is thinking up.... 13:32
moritz_ colomon_: aye, I think it was premature to introduce Rat as a pretty default type before we have either bigints or automatic degeneration to Num 13:34
takadonet morning all 13:35
13:37 colomon joined
colomon moritz_: actually, I'm writing automatic degeneration to Num right now. 13:41
moritz_ colomon: great
colomon It's not hard, it's coming up with all the tests to test it that is a pain.
It's totally simple, actually. 13:42
Right now most Rat math is something like multi sub infix:<*>(Rat $a, Rat $b) { 13:43
Rat.new($a.numerator * $b.numerator, $a.denominator * $b.denominator);
}
Switch that to ($a.numerator * $b.numerator) / ($a.denominator * $b.denominator) and it generates a Rat when it can and a Num otherwise.
moritz_ hey, I didn't know that infix:</> was that smart 13:44
13:44 LionMadeOfLions joined 13:45 xenoterracide joined
colomon moritz_: it's not smart, per se... but if ($a.denominator * $b.denominator) doesn't fit in an Int, then it turns out to be Int / Num, which is a different operator, and generates a Num. 13:45
moritz_ ah
colomon but I think that will extend as far as we need it, as long as we generate appropriate infix:</> for our types. 13:46
moritz_ I think Int / Num dispatches to the Num/Num right now, so that should be fine 13:47
if you want to do some more number hacking over the weekend...
rakudo: say -1/2 <=> 0
p6eval rakudo 7347ec: Multiple Dispatch: No suitable candidate found for 'cmp_num', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤
moritz_ not sure if that's easy to fix
13:48 colomon_ joined
colomon_ like I said, making the change to Rat.pm is pretty straightforward. But generating all the edge case tests is a long process.... 13:48
13:48 xenoterracide joined
colomon particularly because I'm also trying to generate cases which currently will force to Num, but should be smart enough to stick with Rat, like 424/61731 + 832/61731. 13:49
moritz_ note that the spec might disagree with rakudo about where conversion happens 13:50
in case of doubt, code the tests to the spec
colomon moritz_: actually, I'm coding to rakudo. there's no sane way to test to the spec now, and all the current rakudo edge cases will still be valid when rakudo gets closer to the spec. (But more tests will need to be written then.) 13:51
(spec has Rat with Int64 as the denominator, but rakudo only has Int32) 13:52
13:52 xenoterracide joined
moritz_ as long as you don't test that some operations convert to Num even though the spec allows Rat here, that's fine 13:52
testing that the operations live, and produce correct (or approximate) results is also fine 13:53
colomon No, I don't test that we get a Num. I just test that the math is_approx the same as the results calculated with Nums.
moritz_ ok
colomon errr... actually I see I've been using is when I was thinking is_approx so far. how the heck is that work? 13:54
s/work/working/
JimmyZ rakudo also needs native types.
colomon and I'm testing that things which reasonably can be a Rat are a Rat (though for now those are all skipped) 13:55
JimmyZ is looking at the ROADMAP
13:55 xenoterracide joined
colomon Oh, is worked because the math is exactly the same either way. 13:55
happy coincidence, and now I've switched to is_approx 13:56
14:00 colomon joined 14:07 crythias joined 14:14 ejs1 joined 14:16 xenoterracide joined 14:20 silug joined, LionMadeOfLions joined, sjn joined 14:21 yahooooo joined, IRSeekBot joined 14:22 colomon joined, nsh joined
colomon rakudo: say Inf.Int 14:25
p6eval rakudo 7347ec: -9223372036854775808␤
moritz_ rakudo: say (-Inf).Int 14:26
p6eval rakudo 7347ec: -9223372036854775808␤
moritz_ rakudo: say Inf.Num
p6eval rakudo 7347ec: Inf␤
colomon WTF?
moritz_ rakudo: say Inf ~~ Num
p6eval rakudo 7347ec: 1␤
moritz_ rakudo: say Inf ~~ Int
colomon rakudo: 9223372036854775808.WHAT
p6eval rakudo 7347ec: 0␤
rakudo 7347ec: ( no output )
colomon rakudo say 9223372036854775808.WHAT 14:27
moritz_ I bet Num.Num just returns self
colomon Yes, I wrote that, I think. :)
rakudo: say 9223372036854775808.WHAT
p6eval rakudo 7347ec: Int()␤
colomon huh.
rakudo: say (9223372036854775808 + 1).WHAT
p6eval rakudo 7347ec: Num()␤ 14:28
colomon rakudo: say (9223372036854775808 - 1).WHAT
p6eval rakudo 7347ec: Num()␤
moritz_ rakudo: say (9223372036854775808 + 1) - 9223372036854775808
p6eval rakudo 7347ec: 0␤
moritz_ fun with smallints and auto-upgrade to Num
colomon now wondering if rakudo (at least on feather) has Int 64s but the math only thinks it has Int32s
rakudo: say (2^31).WHAT 14:29
p6eval rakudo 7347ec: Junction()␤
colomon duh
14:30 riffraff joined
moritz_ ** 14:30
colomon rakudo: say (2**3).WHAT
p6eval rakudo 7347ec: Int()␤
colomon colomon: laern to type
rakudo: say (2**31).WHAT
p6eval rakudo 7347ec: Num()␤
moritz_ rakudo: say (2**$_).WHAT for 31, 32, 63, 64
p6eval rakudo 7347ec: Num()␤Num()␤Num()␤Num()␤
moritz_ rakudo: say (2**$_).WHAT for 15, 16 14:31
p6eval rakudo 7347ec: Int()␤Int()␤
colomon I'll be damned.
(on 15, 16)
moritz_ rakudo: say $_, (2**$_).WHAT for 16..31
p6eval rakudo 7347ec: 16Int()␤17Int()␤18Int()␤19Int()␤20Int()␤21Int()␤22Int()␤23Int()␤24Int()␤25Int()␤26Int()␤27Int()␤28Int()␤29Int()␤30Int()␤31Num()␤
moritz_ so 30 is the last Int
colomon rakudo: say (2**30 + (2**30 - 1)).WHAT
p6eval rakudo 7347ec: Int()␤ 14:32
colomon must be the last Int32.
rakudo: say (2**30 + (2**30 - 1))
p6eval rakudo 7347ec: 2147483647␤
moritz_ aye
rakudo: say (2**30 + (2**30 - 1)).WHAT
colomon which is what I was looking for. :)
p6eval rakudo 7347ec: Int()␤
colomon rakudo: say (-(2147483647)).WHAT 14:33
p6eval rakudo 7347ec: Int()␤
colomon rakudo: say (-(2147483648)).WHAT
p6eval rakudo 7347ec: Int()␤
colomon rakudo: say (-(2147483649)).WHAT 14:34
moritz_ rakudo: say (-(2147483649)).WHAT
p6eval rakudo 7347ec: Num()␤
moritz_ 2s complement at its finest
colomon that's what I thought.
so then I think the test I want is
rakudo: say -(-2147483648/1) 14:35
p6eval rakudo 7347ec: No applicable candidates found to dispatch to for 'infix:div'␤in Main (file <unknown>, line <unknown>)␤
moritz_ ng: say -(-2147483648/1)
p6eval ng b155b4: No applicable candidates found to dispatch to for '&infix:<div>'␤current instr.: 'perl6;Rat;new' pc 211939 (src/gen/core.pir:15319)␤
14:35 riffraff joined
colomon rakudo: say -2147483648/1 14:35
p6eval rakudo 7347ec: No applicable candidates found to dispatch to for 'infix:div'␤in Main (file <unknown>, line <unknown>)␤
colomon oh, it's a parsing thing.
rakudo: say (-214748364) / 1 14:36
p6eval rakudo 7347ec: -214748364␤
colomon rakudo: say (-2147483648) / 1
p6eval rakudo 7347ec: No applicable candidates found to dispatch to for 'infix:div'␤in Main (file <unknown>, line <unknown>)␤
colomon oh, ack. 14:37
this case breaks Rat.new.
because gcd works on the absolute value, and when it converts -2147483648 to + 2147483648, it turns to a Num. 14:38
okay, I'll skip worrying about a test for this case for now....
unless.. 14:39
rakudo: say Rat.new(numerator => -2147483648, denominator => 1);
p6eval rakudo 7347ec: ( no output )
colomon bah. 14:40
14:41 colomon_ joined 14:43 colomon joined 15:02 Psyche^ joined 15:04 ejs joined
JimmyZ rakudo: say 2**4 15:08
p6eval rakudo 7347ec: 16␤
JimmyZ rakudo: say 2**16
p6eval rakudo 7347ec: 65536␤
pmurias nothingmuch: ping
nothingmuch pong
JimmyZ rakudo: say 2**10
p6eval rakudo 7347ec: 1024␤
pmurias nothingmuch: your recent blog post implies that a pass everything at once api would be better for Moose 15:09
nothingmuch yes 15:10
at least at the low level
pmurias nothingmuch: i'm thinking if the Perl6 metamodel should be using a pass everything at once model
Wolfman2000 *yawn* morning
phenny Wolfman2000: 06:45Z <eternaleye> tell Wolfman2000 that I added some junctions to the prime tester. That way it'll speed up when we get autothreading, is a tighter loop now, and is also fewer lines!
nothingmuch a definite yes from me
Wolfman2000 I'll have to take a look
nothingmuch basically the current model is that every 'has' declearation does the actual meta attribute creation
what i'm hoping to be able to get with the new use Moose 0.93 whatever is to allow breaking that assumption without killing compat 15:11
then we can finally make has just push arguments onto a stack
and have Moose::Metra::Class->create fire at the end with all of the data at once
so the syntax won't change but the semantics will 15:12
and we will no longer have order dependencies between has/with
or nonsensical method modifiers
and the compile time cost can be much lower
(a single eval per class instead of for every sub installed)
plus the method cache is only blown once 15:13
and compile time computational costs can be reduced
please have a look at my MO project and audrey's port of it to haskell
that illustrates a low level, purely functional MOP
Wolfman2000 rakudo: sub is_prime(Int $x) { return Bool::False if $x !% any( 5..(sqrt($x).Int) ); return Bool::True; }; say is_prime(101);
p6eval rakudo 7347ec: 1␤
pmurias nothingmuch: ok will do 15:14
nothingmuch it clearly defines the dependencies between thte different parts of the MOP
Wolfman2000 phenny: tell eternaleye I think parallelism is implemented...at least, on the rakudo bot
phenny Wolfman2000: I'll pass that on when eternaleye is around.
nothingmuch and it's designed with Perl 6 in mind
the compile time stuff is a little overwhelming, and kinda clumped together
that's because I was just trying out a bunch of ideas 15:15
so disregard the actual structure of Class
it's a little hard coded with Module::Compile::TT
but the relationships between slots, meta instances, attributes and method sets holds
pmurias nothingmuch: once you move to a functional api won't it be much easier to precompile Moose classes to remove the overhead?
nothingmuch hopefully
but there's another problem 15:16
plus Moose's api is still not purely functional and won't be any time soon
what we might be able to do is cache intermediate structures a bit more
making compile time shorter
but that's not likely to help a lot because in benchmarks deserializing metaclass structures took aboiut as long as defining them
15:17 pmurias_ joined
colomon rakudo: say 61731 * 2 15:19
p6eval rakudo 7347ec: 123462␤
carlin ohh nice, syntax highlighting on Wave 15:24
Wolfman2000 carlin: not Perl 6 though
carlin True, but Perl 5 highlighting is mostly correctly, does some things terribly wrong though 15:26
s/tly/t
15:32 athomason joined, literal left, mj41 left 15:33 TimToady joined, buu joined, frew joined, pmichaud joined, Patterner joined, colomon joined, yahooooo joined, sjn joined, LionMadeOfLions joined, crythias joined, iblechbot joined, draxil42 joined, elmex joined, Su-Shee joined, rjh joined, xomas_ joined, mathw joined, moritz_ joined, IllvilJa joined, orafu joined, cotto joined, awwaiid joined, omega__ joined, r0bby joined, mofino joined, bloonix joined, xinming joined, Wolfman2000 joined, avuserow joined, zaphar_ps joined, hicx174 joined, stepnem joined, idemal joined, carlin joined, cotto_work joined, wolverian joined, krakan joined, jsut|work joined, sunnavy joined 15:34 tylerni7 joined, ejs joined, riffraff joined, envi^home joined, hcchien joined, drbean joined, kst` joined, jaldhar joined, snarkyboojum joined, pointme joined, nbrown joined, gbacon joined, zamolxes joined, ssm joined, Khisanth joined, estrabd_ joined, nothingmuch joined, dj_goku joined, kolibrie joined, Helios joined, zostay joined, pnu joined, solarion joined, constant joined, leedo joined, allbery_b joined, araujo joined, [particle] joined, yves joined, Juerd_ joined 15:35 lestrrat joined 15:36 huf joined 15:37 frettled joined, astinus joined, d^_^b joined 15:38 astrojp joined
pugs_svn r29202 | colomon++ | [t/spec] Add a number of edge case tests for Rats represented by Ints which are really Int32s. 15:38
15:42 frew joined 15:43 Grrrr joined 15:45 literal joined 15:46 ejs joined 15:58 quantumEd joined 16:04 TimToady joined
PerlJam Perl 6 Advent Calendar Wave: search for with:public Perl 6 Advent 16:05
16:08 quietfanatic joined
TimToady I surely hope that freenode has got over the server flu... 16:08
16:15 payload joined 16:18 rgrau_ joined 16:22 s1n joined
diakopter thought for the day: 16:29
well, it'll be a minute 16:31
jnthn ENEEDCOFFEEBEFORETHINKING
crythias I think your thoughts have been hijacked by black friday 16:32
colomon I thought it was some sort of zen thing... 16:33
crythias "there is no spoon^H^H^H^H^Hthought
" 16:34
TimToady Moo
colomon "A moo is an array of what we've always known to be the best and only way to play." -- probably Kurt Elling 16:36
16:36 snearch joined
TimToady sounds like a python programmer 16:36
crythias hee 16:39
16:41 astrojp left 16:43 Infinoid_ joined 16:46 snearch_ joined
diakopter I noticed this tweet: twitter.com/EelcoVisser/status/6113972577 16:50
and I thought:
hm.
search engines index on one big namespace 16:51
but tweets like that one provide disambiguation, or at least the hint of a possible ambiguity
crythias I'm not sure I follow :) 16:52
diakopter sec 16:53
crythias isn't disambiguation the opposite of possible ambiguity? 16:54
does this relate to the thought of the day? 16:56
diakopter yeah it was my thought earlier 16:57
16:57 lisppaste3 joined
crythias is ambiguity like fuzzy logic? 16:58
diakopter someone influential could declare "name clash" (or something similar) as a tag that identifies explicit partitioning of terms' usages 17:01
17:03 pmurias_ joined
diakopter and that got me thinking about memes 17:04
there are memes and meta-memes; 'meme' is a meta-meme 17:05
pmurais: you pmurias 17:12
pmurias diakopter: yes 17:14
diakopter: what's the state of perl-v8? 17:15
17:16 nihiliad joined
pugs_svn r29203 | lwall++ | [S02] clarify when precision may (not) be lost on Rat calculation 17:16
r29203 | [S32/Numeric] add scaling option to round()
diakopter pmurias: I don't know... I was hoping someone who knows git (at all, a.k.a. more than I do) would just post a copy of it on github 17:17
pmurias i have a copy at github 17:18
github.com/pmurias/perl-v8/
diakopter all I know about it is I did `apt-get install git-core` and then I typed some things, and then it deleted my work :)
so I was scared off a bit
by my bumbling 17:19
17:20 kaare joined
diakopter pmurias: good thing you cloned it 17:20
er, forked it
pmurias diakopter: i gave you commit bit on perl-v8
diakopter ok; thanks. now if I ever find that ssh key... 17:21
er, rsa key
colomon TimToady: like your clarification on Rat precision in addition and subtraction, and I beat you to the punch slightly by checking in some tests (currently rakudo TODO) for that this morning. 17:22
pmurias you can register a new one
diakopter afk a bool
colomon TimToady: not so sure about the denominator of 100 thing, however. must ponder.
pmurias diakopter: a bool = ? 17:23
crythias a bool is a bit 17:24
[particle] and seven bools make a byte. no, eight. no, wait, it's twelve. wait, what system am i on? 17:25
mdxi a PDP-8, full of twisty passages 17:27
crythias cnbc talking about dubai all day long
a maze of twisty passages, all alike
I throw the bird at the snake. 17:28
17:29 ejs joined 17:35 cdarroch joined
TimToady would like to voice bots, but does not feel operative 17:36
arnsholt How about operant? 17:38
17:38 colomon_ joined
[particle] is non-operative as well 17:39
17:45 novus joined 18:03 rgrau_ joined 18:07 ejs joined 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
I have an enum. how do I get a list of its values, in the order I defined them?
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 )
jnthn rakudo: enum Foo <a b c>; say Foo.^methods(:local)
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: [31m===[0mSORRY![31m===[0m␤sub() interpreted as function call at line 1; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/3TgSVH0PgV line 1:␤------> [32msubset Foo of Int where sub($_) [33m⏏[31m{ return 1 }[0m␤ 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
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 parens␤Unexpected 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: Erm. I'm not too sure on that.
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␤
21:06 takadonet left
masak that means where clauses can be separated and re-used. woot! 21:06
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? :-)
21:16 Su-Shee left
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 21:31
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?
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: 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 declarator␤FAILED 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 declarator␤FAILED 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
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 Bag␤in 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