»ö« | 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. |
|||
eric256 | actualy, took only minutes to refix, bug hunting is nice that way | 00:00 | |
eric256 now has 65 substr tests failing gracefully instead of having the whole file unparseable | 00:01 | ||
hehe | |||
:P | |||
later guys, off for home | |||
00:01
eric256 left
|
|||
wayland76 | lithology++ | 00:04 | |
00:04
PacoLinux left
00:17
justatheory left
00:19
nihiliad left
00:52
douglashunter left
01:08
ashizawa joined,
partisan left
01:14
partisan joined
01:22
orafu left,
orafu joined
01:29
lestrrat is now known as lest_away
01:33
nihiliad joined
01:39
fridim_ left
01:40
dbrock joined
01:41
cdarroch left
01:50
galf joined
02:00
rgrau` left
02:02
Exodist joined,
lest_away is now known as lestrrat,
orafu left
02:03
orafu joined
02:15
K9 joined
|
|||
K9 | hello | 02:16 | |
where is this channel ill connect with my mIRC | |||
diakopter | ? | ||
K9 | all i could find was this link on my browser. | ||
what irc network is this | |||
diakopter | :) freenode | ||
K9 | irc.freenode.org ? | ||
diakopter | irc.freenode.net | 02:17 | |
02:17
^K9 joined
|
|||
^K9 | good | 02:17 | |
02:17
K9 left
|
|||
^K9 | Hi i hope im at the right place | 02:17 | |
ive been trying to get this bot to work but I coudlnt', its called Zaslon | |||
anyone here knows how to work with it ? | |||
diakopter looks around for carlin | |||
^K9 | oh carlin lol | 02:18 | |
ive seen that name in the documenation | |||
looks like a pretty good bot | |||
diakopter | I haven't looked at the code, myself | 02:19 | |
(lazy of me) | |||
^K9 | hehe | ||
do u think u could help me ? | |||
02:19
japhb left
|
|||
diakopter | have you built rakudo? | 02:19 | |
^K9 | got some pretty general questions... | ||
rakudo ? | |||
just took all the files into a blank mirc and ran the files like he said in the readme.txt | 02:21 | ||
can't seem to make it work tho | |||
02:23
JimmyZ joined
|
|||
diakopter | I don't know what you mean by "blank mirc" | 02:24 | |
^K9 | mIRC.exe | ||
diakopter | well, I'm afraid I thikn I do | ||
^K9 | when I run a mIRC.exe in a folder it just installs all the files it needs. | ||
02:24
agentzh joined
|
|||
^K9 | thats what i meant :) | 02:25 | |
diakopter | zaslon won't function as a bot inside mirc. | ||
^K9 | o? | ||
diakopter | it runs standalone, afaik. | ||
^K9 | what do I need to do to make it work ? | ||
diakopter | you need a build of Perl 6 (rakudo) | 02:26 | |
^K9 | can I do that on Windows 7 ? | ||
diakopter | sourceforge.net/projects/parrotwin3...e/download | ||
^K9 | downloading thank you | 02:27 | |
diakopter | actually, I think you have to install this one first: sourceforge.net/projects/parrotwin3...e/download | ||
^K9 | ok | 02:28 | |
ok so ive installed both of em | 02:29 | ||
only option in start menu is to uninstall | 02:30 | ||
02:32
jferrero left
|
|||
^K9 slaps diakopter around a bit with a large trout | 02:35 | ||
:P | |||
im looking at one of your channel logs | 02:37 | ||
zaslon works perfectly | |||
diakopter | ^K9: it's not a point-n-click program | ||
you must launch it from the command line, after configuring it | 02:38 | ||
zaslon, I mean. | |||
^K9 | yes ive seen that on the /bin | ||
and i can handle configuring it | |||
i just don't know how to launch things | |||
like i dont know the basic commands on that perl6 thingy | |||
diakopter | windows Command Prompt | ||
^K9 | cmd ? | 02:39 | |
diakopter | yes | ||
at this point, I will advise caution | |||
^K9 | what | ||
what do u mean ? | |||
diakopter | it's easy to destroy things inadvertently :) | 02:40 | |
^K9 | ok ill take the risk | ||
im assuming by what you told me earlier that u don't know how to configure the bot right ? | |||
diakopter | I just read the code | 02:41 | |
so, now I do. :) | |||
^K9 | lol | ||
diakopter | first, you'll need to install proto | ||
^K9 | i just read that code | ||
im a C# developer | |||
I don't really understand how this linux stuff works tho | |||
diakopter | ah | 02:42 | |
I'm a C# developer also. | |||
^K9 | how old are you ? | ||
diakopter kicks in the universal translator | |||
why, how old are you? | |||
^K9 | ive been looking for a job for ages. | ||
23 | |||
diakopter | 29 | 02:43 | |
^K9 | got a job in the field i assume | ||
diakopter | not doing C# at the moment, but yes | ||
^K9 | that's just great man | ||
all the best... | |||
diakopter | you've just installed parrot, which is akin to the .NET CLR | 02:44 | |
^K9 | akin ? | ||
diakopter | akin, meaning intended to do the same things. | ||
the same sorts of things. | |||
^K9 | oh cool | ||
diakopter | run various languages with high interoperability | ||
^K9 | but how do i configure the bot first of all | ||
diakopter | you'll need to use another program "proto" to install its dependencies | 02:45 | |
^K9 | oh alrighty than | ||
diakopter | but, for that, you'll need Perl 5 :) | ||
I think :) | |||
^K9 | damn | ||
let me ask you a differnt question\ | |||
all I want is an IRC bot to fetch posts information from wordpress | 02:46 | ||
do you happen to know one that does that without installing the whole world ? | |||
diakopter | this one looks ok www.hawkee.com/snippet/5925/ | 02:47 | |
I can't vouch for it, of course. I'd search google for "mirc" "rss" | |||
^K9 | yeah using the rss would be smart... | 02:48 | |
diakopter | (that's what zaslon does) | ||
^K9 | REALLY? | ||
diakopter | yes | ||
^K9 | oh alright | 02:49 | |
well diakopter | |||
thanks a lot | |||
diakopter | yw | 02:50 | |
^K9 | have a great nighjt :) | ||
02:50
^K9 left,
astrojp left
03:14
cognominal_ left
03:15
dbrock left,
japhb joined
03:24
dbrock joined
03:26
cognominal joined
03:35
eternaleye left
03:37
am0c joined
03:38
ashizawa_ joined
03:48
eternaleye joined
03:54
ashizawa left,
colomon__ left
03:57
cotto_work left
04:01
jaldhar joined,
JimmyZ left
04:11
eternaleye left
04:35
icey joined
04:58
stephenlb left
05:12
icey left
05:13
ShaneC left
05:18
rachelBROWN left
05:20
orafu left
05:21
orafu joined
|
|||
pugs_svn | r29474 | mberends++ | [vill] statementlist() gets through to statement(), small doc updates | 05:22 | |
05:38
nihiliad left
05:51
mberends left
06:14
orafu left
06:15
orafu joined
06:19
gfx joined
06:27
bbkr left
06:32
bbkr joined
06:43
orafu left,
orafu joined
06:54
soupdragon joined
06:55
lmc joined
07:05
meppl joined
07:09
cognominal left
07:10
Su-Shee joined
|
|||
Su-Shee | good morning | 07:11 | |
07:12
kaare joined
07:13
kaare is now known as Guest22497
|
|||
saschi | Su-Shee: hello | 07:14 | |
^^ | |||
similar sounding nicknames >_< | 07:15 | ||
07:16
Chillance left
07:22
agentzh left,
agentzh joined,
fridim_ joined
07:23
langen joined
07:32
mberends joined
07:34
justatheory joined
07:36
gfx left
|
|||
mberends | two days ago microsoft finally decided to support SVG blogs.msdn.com/ie/archive/2010/01/0...group.aspx | 07:38 | |
.oO( does that mean they figured out how to "embrace and extend" SVG? ) |
07:44 | ||
07:45
Hurley joined
|
|||
Hurley | hi | 07:45 | |
mberends | hi Hurley | ||
Hurley | how can i set on perl 64 the integer as 32bit signed to make a overflow on bitwise for a hash? | 07:46 | |
07:48
justatheory left,
Baggiokwok joined,
jnthn left,
jnthn joined
|
|||
mberends | hmm. sounds like a Perl 5 question. Is that what you're using, Hurley ? | 07:48 | |
Hurley | yes on 64bit | 07:49 | |
version 5.10 | |||
mberends | we _use_ Perl 5 here to build Perl 6, but we're not all that expert at this kind of thing. Have you tried other Perl IRC channels? | 07:50 | |
07:50
partisan left,
bbkr left
07:51
iblechbot joined
|
|||
Hurley | i try on perl channel | 07:51 | |
thanks | |||
mberends | good luck :) | ||
07:53
rachelBROWN joined
|
|||
sjohnson | diakopter: javascript is causing me much grief | 07:53 | |
var num = 00.00; and 0.0 will cause completely different results | |||
</rant> | 07:54 | ||
07:54
Juerd left
|
|||
diakopter | sjohnson: oh? | 07:54 | |
what are the different results | |||
07:55
Juerd joined
|
|||
diakopter | in V8/Chrome, 00.00 is a syntax error. | 07:55 | |
same in IE | 07:56 | ||
07:57
JohnDoe365 joined
|
|||
diakopter | sjohnson: same in safari | 07:57 | |
07:57
bryan[c1] joined
|
|||
diakopter | same in firefox | 07:58 | |
sjohnson: opera accepts it, but it's identical to 0.0 | 08:00 | ||
08:02
partisan joined
|
|||
sjohnson | diakopter: is it a syntax error in perl? | 08:06 | |
my argument for why i hate javascript | |||
causing me unbelievable frustration to get something that would take perl 2 minutes to do | |||
is taking forever | |||
can't see declaring something to be 0.0 or 0.00 or 00.00 to cause huge problems for most languages.. though i have learned that javascript is low-level | 08:07 | ||
as opposed to some other languages that can handle this without any problems.. | 08:08 | ||
diakopter | I read that as "I don't like it because it's different from the languages to which I'm accustomed" | 08:10 | |
bryan[c1] | do you guys know a way to increment through websites within a domain? | ||
diakopter | but in perl, 00.00 produces the string "00" | ||
sjohnson | diakopter: how do you add to a var int; variable, something from getElementbyId().value? | 08:11 | |
the only way i have it working, is to do x = x - -(getelementbyid... etc | |||
+= assumes it's a string | |||
diakopter | only if x is already a string | ||
sjohnson | having trouble declaring x as a float | 08:12 | |
tried var x = new Float(); | |||
08:12
partisan left
|
|||
diakopter | sjohnson: all numbers in javascript are doubles | 08:12 | |
08:12
bryan[c1] left
|
|||
diakopter | (unless the compiler can infer it's always used as an int, uint, etc) | 08:13 | |
sjohnson | alright, you are correct that i dont really know it well | ||
though, how about this for a good argument: how do you do here documents easily | |||
without having to do 'text'+ for every line | 08:14 | ||
diakopter | put a \ at the end of the line you want to wrap inside a string literal | ||
var x = "hihi \ | |||
<new line> | |||
hihi"; | |||
sjohnson | ... i wish the documents i found on google told me that ... :) | ||
diakopter: plz2help me declare an int | 08:15 | ||
is var inty = 0; the best way? | |||
diakopter | easy; var x = 0 | ||
(if you're going to be adding to it) | |||
if you're going to be multiplying it, init it as 1, of course) | 08:16 | ||
08:16
Baggiokwok left
|
|||
sjohnson | diakopter: alright maybe js isn't so bad :) | 08:16 | |
just bad documentation on the internet | |||
and i don't think David O'Flannigan is the best writer as far as Javascript bibles go | 08:17 | ||
everytime i look up "how to do basic array stuff" | |||
chapter gives mickey mouse examples | 08:18 | ||
and says "you can find MORE elsewhere in this book, in chapter 8..." etc | |||
diakopter | I agree; "JavaScripdt: The Definition Guide" is about the worst one I've flipped through at the bookstore. | ||
Definitive, I mean | |||
08:31
bbkr joined
|
|||
sjohnson | diakopter: he didnt do any better on his Ruby book | 08:32 | |
he even stated that he wanted the book format to mimic K&R C | 08:33 | ||
and it's a piece of crap compared to K&R C | |||
Su-Shee | I liked "javascript - the good parts" (and a short reference at hand) | 08:34 | |
sjohnson | Su-Shee: now THAT is a good book | ||
i bought it and work paid for it | |||
and i agree with the "bad parts" section | |||
as the author states that a few things were rushed | |||
Su-Shee | overall, I started to like the books published by manning more than o'reilly's. | 08:36 | |
(does one really write "o'reilly's car"?) | |||
08:39
TiMBuS joined
|
|||
langen | yes | 08:39 | |
08:40
yahooooo left
08:48
yahooooo joined
|
|||
mathw | Indeed one does | 08:51 | |
08:56
TiMBuS left
08:59
Baggiokwok joined
09:05
bbkr left
09:14
Baggiokwok left
09:18
Baggiokwok joined
|
|||
frettled | diakopter: hee-hee, funny conversation with ^k9 tonight :) | 09:29 | |
diakopter: Perl 6 now has market penetration! \o/ | |||
carlin++ | |||
09:32
dakkar joined
09:42
ihrd joined
09:47
ihrd left
|
|||
moritz_ | good morning | 09:58 | |
mathw | oh hai moritz_ | ||
frettled | lolwerelolcatz | 09:59 | |
10:00
langen left
|
|||
mathw | sleepy ones | 10:00 | |
in my case, anyway | |||
wayland76 | and diakopter++ for answering fairly non-P6 questions :) | 10:02 | |
10:02
cls_bsd left
|
|||
szbalint | good morning | 10:05 | |
10:06
lestrrat is now known as lest_away
|
|||
frettled | wayland76: but I do that all the time, and all I got was this lousy t-shirt! | 10:08 | |
10:17
Baggiokwok left,
Baggiokwok joined
10:21
Baggiokwok left
10:22
Baggiokwok joined
10:25
hanekomu joined
10:26
rjh joined
10:28
Baggiokwok left
10:30
Baggiokwok joined
10:42
thmghtd joined
10:43
thmghtd left
10:54
mj41_ left
10:56
tl joined
10:58
tl left
11:01
JohnDoe365 left
11:02
thmghtd joined
|
|||
wayland76 | frettled: Sounds like your t-shirt needs de-lousing then :) | 11:03 | |
moritz_ has asked and answered lots of off-topic questions here and elsewhere, and never got a t-shirt for it :-) | |||
11:05
Baggiokwok left
11:07
thmghtd left,
Baggiokwok joined
|
|||
frettled | moritz_: I had to pay for mine ;) | 11:08 | |
wayland76 is tring to figure out whether "lolwerelolcatz" means "We are lolcats" or whether it refers to a werelolcat, an animal that is somewhat like a werewolf, but with a lolcat instead of a wolf | |||
11:11
agentzh left
|
|||
saschi | i'm working topless | 11:14 | |
wayland76 | I expect to do that later this week. It should be 38 (Celsius) outside, and maybe more in here where I am | 11:15 | |
soupdragon | in this cold?? | 11:16 | |
saschi | yep | ||
wayland76 | well, it's warm here in Australia :) | 11:17 | |
saschi | wayland: i guess, there is kinda summer 'cause of this odd earth's rotation axis >_< | 11:20 | |
11:33
nbrown left
|
|||
moritz_ | 38 °C > 100 F | 11:33 | |
11:37
colomon_ joined
11:53
cls_bsd joined
11:55
ashizawa_ left
12:01
payload left
12:05
bluescreen joined
12:07
bluescreen left,
bluescreen joined
|
|||
frettled | Today is a positively balmy -15 °C, light snow, some sunshine. | 12:09 | |
(that's 5 °F, BTW) | 12:10 | ||
And now you guys know why the Nordic Perl Workshop never was in January ;) | |||
12:11
IllvilJa left
|
|||
frettled can imagine the headlines: «Perl development halted - main developers out with cold, flu and broken hips» | 12:11 | ||
12:11
Baggiokwok left
|
|||
Su-Shee | frettled: not all of us are over 60. ;) | 12:12 | |
12:14
SmokeMachine joined
|
|||
frettled | Su-Shee: you'll have to settle for a common cold, then ;) | 12:14 | |
Mind you, this is still better than the worst weather in the northern US states. | 12:15 | ||
or Canada, brrrr. | |||
frettled still wants to have a YAPC::Spitsbergen | |||
12:21
iblechbot left
|
|||
wayland76 | Su-Shee: You can go in a car adccident for the broken hips, if you prefer :) | 12:23 | |
'night all :) | |||
saschi | this morning we had -22 deg C | 12:24 | |
wayland: good night! ^^ | |||
Su-Shee | saschi: where the hell are you? | 12:25 | |
saschi | Su-Shee: Wolfenbuettel (Lower Saxony) | ||
Su-Shee | _wolfenbuettel_ had -22?! | 12:26 | |
12:28
galf left
|
|||
saschi | Su-Shee: yes, here in the periphery of wolfenbuettel | 12:28 | |
Su-Shee | .oO(there's something more periphery than wolfenbuettel already is? ;) |
12:29 | |
saschi | Su-Shee: i'm living near the asse | ||
Su-Shee: well, yeah, there truly is :D | |||
Su-Shee: maybe that's why the german one and only ultimate storage place for nuclear waste is nearby ;) | 12:30 | ||
Su-Shee | gee. I would move. ;) | 12:31 | |
saschi | well :D | ||
12:31
clintongormley joined
|
|||
saschi | Su-Shee: i will - in a couple of years | 12:33 | |
Su-Shee | then it's too late. ;) | 12:34 | |
moritz_ | saschi: I've been in Wolfenbüttel over Christmas :-) | 12:35 | |
saschi | Su-Shee: since it's really scary, that, if you are standing on the western hill side of the asse, you've direct line of sight to the headgear of schacht konrad, the other candidate for high radiactive waste >_< | 12:36 | |
moritz_: uh, you've family here? ^^ | |||
moritz_ | saschi: no, but my girlfriend has | 12:37 | |
saschi | moritz_: any relations with matthias "the guitarist" lenz? | ||
moritz_: ah, ok :) | |||
moritz_ | not that I'm aware of :-) | ||
saschi | Su-Shee: i guess, we've app. two decades left :D | 12:38 | |
12:39
Pzt joined
12:40
payload joined
|
|||
saschi | if nothing will be done (except more MgCl_2 for Carnallit stabilization) | 12:41 | |
12:46
Baggiokwok joined
12:47
frederico joined
12:48
frederico left,
frederico joined,
frederico left
12:49
frederico joined,
mikehh joined,
frederico left
12:55
frederico joined
12:58
KyleHa joined
|
|||
takadonet | morning all | 13:00 | |
13:00
ruoso joined
13:20
payload left
13:22
ihrd joined
13:28
iblechbot joined
13:31
KyleHa left
13:43
ihrd left
13:44
ihrd joined
13:45
patspam left
13:51
Baggiokwok left
13:52
Baggiokwok joined
13:58
carlin left
14:00
mj41 joined
|
|||
takadonet | hey mj41 | 14:02 | |
PerlJam | good soon-to-be-cold-and-windy morning from Corpus Christi Texas | 14:04 | |
takadonet | PerlJam: how cold are you talking about? | 14:05 | |
frettled | takadonet: probably so cold that the infrastructure isn't designed to handle it :) | ||
takadonet | frettled: Just be glad you are not where I'm right now | 14:06 | |
PerlJam | I hear it's going to get into the 30s and then < 20 tomorrow. Not "cold" by some standards, but for a place where winter usually means we have to wear a long sleeve shirt instead of a short sleeve shirt, it's too cold :) | ||
frettled | takadonet: too warm? | ||
14:06
payload joined
|
|||
takadonet | frettled: -38 C | 14:06 | |
frettled | takadonet: too warm. ;) | ||
takadonet: but yep, I'm glad. | 14:07 | ||
takadonet: if it was that cold outside, I'd have to go down to the server room, that one stays at around +20-22 :) | 14:08 | ||
14:10
Exodist left
14:22
lest_away is now known as lestrrat
14:23
Baggiokwok left
14:32
breinbaas joined
14:38
Baggiokwok joined
14:41
eric256 joined
14:42
iblechbot left
|
|||
eric256 | ng doesn't have exit yet? | 14:46 | |
ng: exit | |||
p6eval | ng 3f06c7: sh: ./perl6: No such file or directory | ||
moritz_ | ng: exit | 14:48 | |
p6eval | ng 3f06c7: sh: ./perl6: No such file or directory | ||
14:49
jbd joined
|
|||
moritz_ | ng: exit | 14:49 | |
p6eval | ng 3f06c7: Could not find non-existent sub &exitcurrent instr.: '_block14' pc 29 (EVAL_1:0) | ||
eric256 | yay! got t/spec/S32-str/substr.t to at least run completly, now to fix and unfudge | 14:52 | |
15:00
ignacio_ joined
15:04
Guest22497 left
15:10
Gothmog_ left
15:11
PacoLinux joined
15:13
ignacio__ joined
15:14
jbd left
15:22
ignacio_ left
15:27
Baggiokwok left
15:28
rgrau` joined
15:29
douglashunter joined
15:35
colomon_ left
|
|||
PerlJam | eric256: \o/ | 15:35 | |
eric256 | i think the tests are wrong, they are expecting four arg substr to do an inplace edit | 15:36 | |
moritz_ | that's the Perl 5 behaviour | ||
eric256 | not according to the docs.... | ||
oh wait, that part is in the example..... | 15:37 | ||
moritz_ | S32/Str.pod says the return value 'is rw' | ||
15:38
Baggiokwok joined
|
|||
eric256 | arg each test is passing $str along and modifying it, so the test depends on the test before it suceeding,/me goes to change it | 15:42 | |
15:46
Psyche^ joined
15:48
REPLeffect_ left
15:49
Baggiokwok left,
REPLeffect_ joined
15:56
ash_ joined
16:00
justatheory joined
16:02
Patterner left,
Psyche^ is now known as Patterner
16:07
uniejo joined,
nihiliad joined
16:09
payload left
16:16
mberends left
16:17
xinming_ is now known as xinming
16:25
iblechbot joined
16:26
colomon_ joined
16:32
cognominal joined
16:33
jferrero joined
16:35
KyleHa joined
16:40
REPLeffect_ left
16:48
pmurias joined
16:57
jferrero left
16:59
jferrero joined
17:23
cdarroch joined
|
|||
TimToady ponders the semantics of substr($x,3,5) += 2, and then wonders about my Str $x = "10"; $x += 2; | 17:23 | ||
rakudo: my Str $x = "10"; $x += 2; | 17:24 | ||
p6eval | rakudo 3867ff: Assignment type check failed; expected Str, but got Numin Main (file <unknown>, line <unknown>) | ||
17:25
cotto_work joined
|
|||
PerlJam | TimToady: lvalue substr does str -> num conversion on just that portion of the string, adds 2 to the number, then does a num -> str conversion and inserts that string in the appropriate place in the original ??? | 17:27 | |
17:29
scottietaz joined
|
|||
TimToady | well, it does in Perl 5, I expect | 17:33 | |
17:34
_jaldhar joined
|
|||
TimToady | my $x = '000000'; substr($x,2,2) += 4; print $x,"\n"; # prints 00400 | 17:35 | |
17:35
orafu left,
orafu joined
|
|||
ash_ | in perl 5, my $a = "ab 12"; substr($a, 3, 2) += 5; print $a; printed ab 17, which is what i'd expect it to, but i never thought of using substr like that before | 17:36 | |
TimToady | lvalue substr is more versatile than 4-arg substr, but I suspect 4-arg substr can be more efficiently implemented | ||
17:36
jferrero left
|
|||
TimToady | so the type of the lvalue is not really Str, but something like Cool>Str (using that as a coercion type notation) | 17:39 | |
presumably >Str defaults to Cool | |||
in which case my >Str $x = "10"; $x += 2; would have similar back-to-string semantics | 17:40 | ||
PerlJam | Wasn't audrey or someone looking at using Judy strings in pugs? Maybe Perl 6 could spec that and expose it to the users so they'd have type Judy :) | ||
TimToady | we'd need both Punch and Judy | ||
17:43
arthur-_ left
|
|||
ash_ | why was Object changed to Mu again? i can't remember | 17:44 | |
Tene | Soviet cows. | ||
17:45
jaldhar left
17:47
supernovus joined
|
|||
TimToady | because people couldn't combine their idea of "object" with their idea of "undef", and were confused when Perl printed out "Object" to mean the most undefined value | 17:47 | |
and Soviet cows | 17:48 | ||
hejki | weird | ||
i thought it was cause Hitler? | |||
TimToady | wasn't expecting Godwin's Law that soon... | ||
PerlJam wasn't expected Godwin's Law at all | 17:49 | ||
s/expected/expecting/ | |||
hejki | ok sorry i was too bold with it | ||
soviet cows made me think of lenin | |||
and then mussolinis stache | |||
which brought back adolf | |||
TimToady | that's almost as tenuous as some of my reasoning | 17:50 | |
hejki | i've noticed that most people fluent with Perl tend to have some weird neuropathic way in logical thinking | 17:51 | |
ash_ | what is the my >Str $x; semantics, I haven't seen a '>' before used like that | ||
hejki | i recall reading some medical study that linked that with chronic usage of regexp | ||
PerlJam | hejki: that's a community trait--bizarre thinking. | ||
hejki | :P | ||
i'd call it a 'perk' instead tbh | 17:52 | ||
huf | perl-1? | ||
PerlJam | perl-- | ||
TimToady | rakudo: my $name = 'perk'; $name++; say $name | ||
p6eval | rakudo 3867ff: perl | ||
huf | coincidence? i'm just asking questions here ;) | ||
PerlJam wonders if rakudo still has the proper semantics ... | 17:53 | ||
TimToady | ash_: I've mentioned >Str once or twice on channel in the past as a potential coercive type notation | ||
PerlJam | rakudo: my $n = "foo99.jpg"; $n++; say $n; | ||
TimToady | I've also mentioned Str() for the same thing | ||
p6eval | rakudo 3867ff: fop00.jpg | ||
PerlJam | rakudo: my $n = "foo.99.jpg"; $n++; say $n; | 17:54 | |
p6eval | rakudo 3867ff: fop.99.jpg | ||
PerlJam | rakudo: my $n = "9Z.jpg"; $n++; say $n; | ||
p6eval | rakudo 3867ff: 10A.jpg | ||
huf | c'mon we want manly jpegs | ||
ash_ | so, instead of failing an assignment to the value it will convert it to a string then try the assignment? | ||
TimToady | or if used as a parameter, constrains the type to be the "outer" type, but coerces to the "inner" type | ||
ash_ | would that work only with Str objects? or could you define some meta/magic/whatever function so your custom objects can do a similar coercion? | 17:55 | |
TimToady | sub foo (Foo>Bar $x) {} would allow any Foo but coerce to Bar | 17:56 | |
or sub foo(Bar(Foo) $x) {} in the other notation | |||
the > seems more mnemonic though | |||
ash_ | So that takes a Foo and turns it into a Bar once the functions called? | ||
TimToady | and we don't have prefix:«>» | ||
PerlJam | TimToady: today was the first time I've seen you mention the > notation that I can recall, and I tend to agree that it seems to work better. | 17:57 | |
TimToady | that's the idea; we already use this notation for infix:<+> and such | ||
s/notation/notion/ | |||
up till now we've just been poking extra multis into Any (now Cool, conjecturally) | 17:58 | ||
ash_ | Sounds like that would be useful, is it strickly syntactic sugar for sub foo(Bar(Foo) $x) {} or would you need to define a .prefix:«>» () in your class to get the functionality? or are you still thinking about it> | 17:59 | |
s/>/\?/ | |||
TimToady | so something like multi infix:<+> (>Num $x, >Num $y) would define both (Num $x, Num $y) and (Cool $x, Cool $y) sigs, the latter coercing to the former | 18:00 | |
we would not have both >Bar and Bar() | |||
18:02
payload joined
|
|||
TimToady | well, those aren't the only two syntactic possibilities | 18:03 | |
since the notation is used only in declarations, could even use .Bar and Foo.Bar | |||
since .Bar is a normal coercion in normal expressions | 18:04 | ||
ash_ | sub foo(Foo as Bar $a) { ... } # i guess as is taken? | ||
TimToady | (.Num $x, .Num $y) doesn't read so badly either | ||
however, people who think they can leave declarators off will not get a good error message | 18:05 | ||
PerlJam | anything without the parens will probably read okay :) | ||
TimToady | well, I guess .Num $x is also a two-terms-in-a-row error, so maybe it's not so bad | 18:06 | |
that'd mean 'my .Num $x' is short for 'my Cool.Num $x' | 18:07 | ||
PerlJam | Hmm. | ||
18:08
stephenlb joined
|
|||
PerlJam | the dot makes me want to ask about the Num method on Cool | 18:08 | |
That doesn't connect well with coercion like the > does | 18:09 | ||
TimToady | but the Num method *is* a coercion on Cool :) | ||
ash_ | But is there a Bar method on Foo? | 18:10 | |
18:10
zamolxes_ left,
zamolxes joined
|
|||
TimToady | sorry, we're distracted here by a cute little earthquake, felt like about a 3.0 | 18:12 | |
ash_: the parser knows if a method name is a known type, and can force it to be a coercion | 18:14 | ||
18:15
bbkr joined,
rgrau` left
|
|||
ash_ | but doesn't the '.' semantic imply a method call? | 18:16 | |
PerlJam | ash_: yes, and that's what does the coercion. | ||
(from what I can tell) | |||
TimToady | actually, USGS says it was a 4.2 over east of Fremont | 18:17 | |
ash_ | ah, i guess i am misunderstanding how coercion is occuring, will that do: my Bar $a; my .Foo $b = $a; and under the hood do $b = $a.Foo; | 18:19 | |
18:19
am0c left
|
|||
TimToady | coercions may be specified either by the "from" type or the "to" type. on the "from" type it looks like a method. on the "to" type it looks like a call to postcircumfix:<( )> | 18:21 | |
either of these can fall back on the other, I suspect | |||
so if there is only one definition or the other, Foo($x) and $x.Foo are equivalent | 18:22 | ||
ash_ | When you do Foo($x) is that like a Foo.new($x)? | 18:23 | |
eric256 starts to doubt that substr should modify a string at all | |||
PerlJam | TimToady: Earlier it looked like my .X $x; was meant to be an Any->X coercer. True? | 18:26 | |
18:27
payload left
|
|||
PerlJam | er, I guees the proper example would be something like sub foo (.X $x) { ... } | 18:28 | |
TimToady | the coercing types now derive from Cool (which derives from Any) | 18:29 | |
18:29
Chillance joined
|
|||
PerlJam | and maybe it was Cool->X, but still. If either of those is the case, then doesn't that run afoul of the idea that .X is a method call on $_ ? | 18:29 | |
TimToady | so I think it would be Cool->X | ||
18:29
dakkar left
|
|||
TimToady | not in a declaration | 18:29 | |
but there is potential for user confusion, even if the compiler isn't confused | 18:30 | ||
so maybe > is better in that regard | |||
PerlJam | if we've hardwired everyone to think of .foo as the same as $_.foo, (and I think we have) then there'll definitely be user confusion (IMHO) | ||
TimToady | worse for writing HTML though :) | 18:31 | |
18:33
uniejo left
18:34
jferrero joined
18:35
jferrero left,
jferrero joined
|
|||
scottietaz | in that case (HTML) you could use the parenthesis though, yes? | 18:36 | |
18:36
uniejo joined
18:37
supernovus left
|
|||
PerlJam | scottietaz: we already use > and < all over the place in Perl, so I don't think it'll be too much of an added burden here :) | 18:39 | |
besides, I find the parentheses icky (perhaps that's just my anti-lisp bias showing) | |||
scottietaz | I'm in favor of the > over the . | 18:40 | |
ash_ | sub foo(Foo as Bar $a) { ... } makes sense to me, Your expecting Foo but its going to function as a Bar | 18:42 | |
but then i guess the Mu/Cool case doesn't make sens, my as Bar $a; | |||
PerlJam | ash_: aye, as far as wordy ops go, that does make sense. | ||
ash_: my * as Bar $a; | 18:43 | ||
ash_ | bbl, i have to go to lunch | ||
18:43
payload joined,
bbkr left
|
|||
scottietaz | why not, my as Bar $a; | 18:46 | |
PerlJam | it doesn't read well. | ||
sub foo (as Bar $a) { ... } | 18:47 | ||
sub foo (Any:Bar $a) { ... } # everyone wants the colon! :) | 18:48 | ||
Juerd | What are you brainstorming about? | ||
PerlJam | type coercion syntax. | 18:49 | |
Juerd | sub foo ($a.=Bar) { ... } | ||
Can't work, can it :) | |||
PerlJam | Juerd: well, it's more like this: sub foo (X>Y $x) { ... } # foo accepts an X or a Y, but if it gets an X, it is coerced into a Y | 18:50 | |
Juerd | Does that happen a lot? | 18:51 | |
scottietaz | So can you say, my Any as Bar $a; | ||
TimToady | happens every time you say "2" + "4" | ||
scottietaz | but I think the > syntax is fine | 18:52 | |
Juerd | Oh, it doesn't automatically just coerce everything? | ||
TimToady | we would like to rely on multidispatch to decide whether coercion is necessary, and remove extra tests on the bare version for speed | ||
douglashunter wonders if a type coercion discussion caused the earthquake... | 18:53 | ||
TimToady | likely | 18:54 | |
Juerd | Can you add a type later on? | ||
PerlJam | we must've crossed some criticla threshhold because we've talked about it before without an earthquake. | ||
18:54
pmurias left
|
|||
Juerd | If so, I suggest "takes" :) | 18:54 | |
my Str $foo takes Num; $foo takes Blah; | 18:55 | ||
18:55
hugues23 joined
|
|||
PerlJam | That seems more akin to my Str|Num $foo; | 18:57 | |
scottietaz | That looks like a type junction | 18:58 | |
PerlJam | yep | ||
"takes" doesn't connote coercion for me. | |||
scottietaz | exactly what I was about to say regarding the type junction | ||
18:58
Gothmog_ joined
|
|||
scottietaz | does that exist btw? | 18:59 | |
diakopter | rakudo: my $x = "perk"; ++$x for 1..10; say $x | ||
p6eval | rakudo 3867ff: peru | ||
18:59
ShaneC joined
|
|||
diakopter | rakudo: my $x = "perk"; $x+=10; say $x | 18:59 | |
Juerd | PerlJam: It's much like this Polish restaurant that had a sign "we take euro". But you get change in zloty. | ||
p6eval | rakudo 3867ff: 10 | ||
PerlJam | It's funny, but it's a rather small thing. ">" doesn't connote coercion either but once you learn what it means in that context, it's suggestive of it. If we were to use "takes", I'd forever be fighting historical baggage from the english language to remember what it does and when it can and can't be used. | 19:00 | |
Juerd | PerlJam: But how about "eats" then? :D | ||
TimToady | scottietaz: no, not as a storage type declaration, and not really even as a constraint yet | ||
Juerd | sub foo (Bar $a eats Any) { ... } | 19:01 | |
Yum! | |||
Bon apetit :) | |||
TimToady | currently you have to use a subset type to get the constraint as a junction | ||
PerlJam | Juerd: (-: | ||
Juerd | my Cat $kitty eats Mouse; | ||
Weird. | |||
TimToady | the syntax has to support a default of Cool | 19:02 | |
Juerd | What does that mean? | ||
diakopter | Cool was the codename for C#/.Net pre-2000 | 19:03 | |
PerlJam | Juerd: sub foo (>X $x) { ... } # accepts a Cool or an X, coerces the Cool into an X | ||
same as sub foo(Cool>X $x) { ... } | |||
Juerd | What's... a Cool? | ||
TimToady | see S02:1113 and S02:1543 | ||
Juerd | TimToady: Will do | ||
TimToady | it's what Any used to do, along with "anyness" | 19:04 | |
but moritz_++ suggested that user-defined types wouldn't want Perl's standard autocoercion semantics by default | 19:05 | ||
Juerd | Wow, I'm confused. | ||
Or overwhelmed. Maybe both. | |||
And S02 crashed my firefox | 19:08 | ||
PerlJam | ff was overwhelmed too | 19:10 | |
Juerd | But I haven't crashed | ||
douglashunter | I'm just starting to read the spec, so feel free to ignore. What does: `sub foo ( Num $bar as Str ) { ... }` do? | 19:12 | |
PerlJam | douglashunter: nothing, it's a proposed syntax | 19:14 | |
oh wait, I misread I think. | |||
douglashunter | I mean, is that a possible way to write coercion? Or is it reserved for something else? | ||
s/reserved/speced as/ | |||
Or do I need to go keep reading [grin] | 19:15 | ||
PerlJam | okay, now that I've fixed the weird wrapping on my terminal ... | 19:16 | |
douglashunter | Oh, I didn't see that was basically proposed in my readback buffer here. | ||
I think I was asking a version of what ash_ asked. | 19:18 | ||
My (limited) understanding of types makes me want to put "as" in a signature to coerce. | |||
19:18
xenoterracide left
|
|||
PerlJam | douglashunter: currently Perl uses "as Foo" as a possible return type on a subroutine though (which is why I thought I may have misread for a second). | 19:20 | |
19:20
scottietaz left,
scottietaz joined
|
|||
PerlJam | (see S02) | 19:21 | |
douglashunter | Maybe I don't understand the terminology, but I thought "as Foo" was a trait, not part of the parameters. sub foo as Bar {...}; # foo() returns a Bar. | 19:22 | |
19:22
xenoterracide joined
|
|||
PerlJam | douglashunter: no, it sounds like you understand well. | 19:22 | |
douglashunter | Is it already used in parameters as well? sub foo (Num $bar as Bar) { ... }; # foo takes a Num in $bar, coerces it to a Bar | 19:23 | |
PerlJam | douglashunter: no, it's not. | ||
douglashunter | Cool. That might be a nice way to coerce. | 19:24 | |
19:25
payload left
|
|||
PerlJam | except that they mean different things. sub foo as Bar (Blah $x as Baz) { ... } # would be confusing. | 19:25 | |
19:26
cognominal left
|
|||
douglashunter | It's pretty clear to me that foo is a subroutine and $x is a Blah, and they respectively become a Bar and a Baz there. | 19:26 | |
19:27
payload joined
|
|||
douglashunter | if it weren't so long, we could write that as `sub foo as Bar (Blah $x becomes Baz) { ... } | 19:27 | |
maybe that's clearer though. | 19:28 | ||
I can't believe I'm contributing to the earthquake that happened [grin] | 19:29 | ||
PerlJam | Using "as" for both would be confusing because one means "may be a Bar" and the other means "is coerced into a Baz". | ||
though if they were unified to always mean "turns into the type on the RHS", I guess that would be fine. | 19:30 | ||
douglashunter | Ah, sub foo as Bar { ... } allows different return types? | ||
PerlJam | I still like Foo>bar $x :) | ||
douglashunter: see S02:1472 | 19:31 | ||
douglashunter | I dig that, too, because it makes sense to my *nix redirect semantics. | ||
PerlJam: cool, will do. | |||
But it seems that most of our nifty shorcut syntaxes also have a longer spelled out version. | |||
(Foo>bar $x) possibly spelled as (Foo $x becomes bar) in the parameters? | 19:32 | ||
PerlJam: S02:1472 will require me to bend my mind a bit [grin], thanks. | 19:38 | ||
19:40
dakkar joined
19:45
bluescreen left
19:46
pmurias joined
19:51
rgrau_ joined,
dakkar left
|
|||
TimToady | I'm not sure that S02:1472 is well thought out wrt "as" | 19:51 | |
19:52
payload1 joined
19:53
payload left
19:54
payload1 left
|
|||
PerlJam | TimToady: well, it does have the same "structure" as what we're talking about for coercions ... except it doesn't have the coercion :) | 19:54 | |
19:55
bluescreen joined
19:56
Exodist joined
19:58
jonasbn joined
|
|||
ash_ | so, on functions using 'as' is loose and using 'of' is enforced? | 20:05 | |
TimToady | 'as' was meant to imply auto-coecion on the return value, but it might not be worth the mental cost, especially if coercion falls out of type syntax anyway, such as 'of >Num' | 20:08 | |
ash_ | the last sentence of that in S02 is confusing to me referring to: my sub wanda ($x --> Squid) as Fish { ... } ; That should return the type Squid but inside the function your'll be returning a Fish which is getting coercered into a Squid? (please correct me if I am completely mis-reading that) | 20:12 | |
with the > syntax, you could change that to: my sub wanda ($x --> >Squid) { ... } | 20:14 | ||
PerlJam | ($x --> Fish>Squid) you mean | 20:16 | |
>Squid would mean Cool>Squid | 20:17 | ||
ash_ | oh, yeah, right i forgot the Fish | 20:19 | |
20:19
payload joined
20:21
pmurias left
20:26
pmurias joined
20:29
mberends joined
20:32
uniejo left
20:40
scottietaz left
20:41
bryan[c1] joined,
alester joined,
payload left
20:44
payload joined
20:49
colomon_ left,
payload left
|
|||
ash_ | so, my sub wanda ($x --> Fish>Squid) { ... }; &wanda.returns; should give Squid? or Fish? | 20:49 | |
20:51
payload joined
|
|||
TimToady | it would alway give a Squid, but you could return a Fish that would coerce to a Squid | 20:52 | |
*always | |||
ash_ | okay, i get it now | ||
so... could you also do say: my sub wanda ($x --> Animal|Fish>Squid) { ... }; and have it return an Animal or Fish that get coerced into a Squid? | 20:53 | ||
just trying to think of all of a use of that, it might be nice if you had say a rendering function that could take a Str|HTMLElement and coerce it into say a RenderedOutput object or something | 20:56 | ||
21:04
bryan[c1] left
21:06
SmokeMachine left
21:07
soupdragon left
21:12
colomon___ joined
21:17
Su-Shee left
21:21
bbkr joined
21:23
jferrero left
21:24
clintongormley left
21:31
bluescreen left
21:45
hugues23 left,
jferrero joined
21:47
jferrero left
21:50
lacl joined
21:52
lacl left
21:53
astrojp joined,
astrojp left
21:58
bbkr left,
payload left
21:59
Hurley left,
Hurley joined,
hugues23 joined
22:01
ruoso left
22:02
renormalist left
22:03
renormalist joined
22:10
mohij joined
22:11
meppl left
|
|||
mohij | hey guys. I just found out that in perl6 one can attach roles to instantiated objects this essentially allows to modify the interface of already instantiated objects. This is a feature I missed in all other object oriented languages i know. Now I can only say: Perl6 is SO going to rock :-D Thank you guys. | 22:14 | |
PerlJam | mohij: cool. Glad you like it. | ||
mohij: btw, you can modify more than just the "interface" of individual, already instantiated objects :) | 22:16 | ||
Juerd | Javascript's prototype based OO lets you add things too. | 22:17 | |
22:19
patspam joined,
iblechbot left
22:22
ignacio__ left
22:24
jonasbn left
22:25
cognominal joined
22:31
bbkr joined
22:37
KyleHa left
22:38
payload joined
22:41
dbrock left,
mohij left
22:48
bbkr left
22:59
cognominal left
23:00
cognominal joined
23:02
eric256 left
23:19
ash_ left
23:21
jddjdd joined
23:23
cognominal left
23:24
cognominal joined
23:28
jddjdd left,
ashizawa joined
23:34
douglashunter_ joined
23:38
rachelBROWN left
23:39
rgrau_ left,
IllvilJa joined
23:49
mikehh left
|
|||
dalek | ok: c5fca57 | chromatic++ | src/builtins.pod: Minor edits to the builtins section; some author comments. |
23:54 | |
23:54
mikehh joined
23:56
orafu left,
orafu joined
23:57
pmurias left,
nihiliad left
|