code logs -> 2010 -> Mon, 28 Jun 2010< code.20100627.log - code.20100629.log >
--- Log opened Mon Jun 28 00:00:49 2010
00:00
< gnolam>
So far, the only solution I've found is to shut the application in question down and restart it. >:E
00:05 Taki^ [jwjw@Nightstar-9b459f81.consolidated.net] has quit [Ping timeout: 121 seconds]
00:10 Taki^ [jwjw@Nightstar-9b459f81.consolidated.net] has joined #code
00:14 Attilla [Attilla@Nightstar-460d5585.threembb.co.uk] has quit [[NS] Quit: ]
00:49 AnnoDomini [annodomini@Nightstar-1d325a2d.adsl.tpnet.pl] has quit [[NS] Quit: Sleep.]
02:15 Orthia [orthianz@Nightstar-83caa7c5.xnet.co.nz] has joined #code
02:39 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
03:57 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
03:58 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [[NS] Quit: This computer has gone to sleep]
04:30 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
05:15 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
05:16 cpux [Moo@Nightstar-20a84089.dyn.optonline.net] has joined #code
05:32 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
05:53 Orth [orthianz@Nightstar-a45c96cc.xnet.co.nz] has joined #code
05:53 Orthia [orthianz@Nightstar-83caa7c5.xnet.co.nz] has quit [Ping timeout: 121 seconds]
06:35 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:03 Derakon is now known as Derakon[AFK]
08:26 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
08:32 AnnoDomini [annodomini@Nightstar-1a15b5de.adsl.tpnet.pl] has joined #code
08:32 mode/#code [+o AnnoDomini] by Reiver
08:56 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
10:13
<@AnnoDomini>
Can anyone tell me how one uses subroutine-private variables in Perl?
10:13
<@AnnoDomini>
I know there's the my keyword for them.
10:14
<@AnnoDomini>
But I'm unsure where I need to use it. Just at declaration? Every time I assign them?
10:18
< Vornicus>
Just declaration, I would assume.
10:19
<@AnnoDomini>
I'm not so certain, since Perl doesn't require declaration. Over in mIRC scripts, if you wanted a variable with any special properties, you had to state them every time you assigned it.
10:21
<@AnnoDomini>
Also, the if-then-else structures seem just as fucked as in mIRC.
10:24
<@AnnoDomini>
Ah, my mistake there. It's the substr actually doing its job. I'm used to the fucked up thing mIRC has. That's solved at least. :D
10:27
< Vornicus>
Or, rather, First Use.
10:37 * AnnoDomini mutters darkly about string concatenation, which somehow doesn't want to work right.
10:41 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
10:42
<@AnnoDomini>
$result .= int(rand($diesize))+1 . ' '; // works fine
10:43
<@AnnoDomini>
$result .= ' ' . int(rand($diesize))+1; // omits every one of the spaces
10:43
<@AnnoDomini>
WTF?
10:52
< Stalker>
Perl not-so-secretly hates you.
10:52
<@AnnoDomini>
Mhm.
10:53
<@AnnoDomini>
Well, I have made my bot capable of parsing a single dice expression. :D
10:57 * TheWatcher readsup
10:59 RichardBarrell [mycatverbs@Nightstar-6846d4dc.cable.virginmedia.com] has quit [Connection closed]
11:02
< TheWatcher>
AD: you need to put the left seid of the . in brakets to preserve the space, ie: $result .= ' ' . (int(rand($diesize))+1);
11:03
< TheWatcher>
*side
11:03
< Vornicus>
tjat's the right side
11:04
< Vornicus>
And that seems like a ridiculous rule
11:04
< TheWatcher>
yeah, I only woke up about 10 minutes ago, give me some slack >.>
11:04 Vornicus is now known as Vornicus-Latens
11:13
<@AnnoDomini>
TheWatcher: So, first use requires my, yes?
11:20
<@AnnoDomini>
TheWatcher: Also, how do I force output to the console? I'm using print, but it only shows up after exit.
11:21
< TheWatcher>
If you have 'use strict' or 'use vars' then you need my, our, or local before the first use.
11:21
< TheWatcher>
and print goes to stdout, which is buffered
11:21
<@AnnoDomini>
What if I don't use strict?
11:22
< TheWatcher>
if you need it to appear immediately, you either need to flush stdout (which means shenanigans with $|) or do 'print STDERR <whatever>'
11:22
< TheWatcher>
If you don't have use strict or use vars, you don't need my
11:23
<@AnnoDomini>
So any variables used in subroutines are by default private?
11:25
< TheWatcher>
yes
11:26
<@AnnoDomini>
$result = substr($result,0,length($result)-2).')'; // For some reason, this sometimes removes two last characters, and usually one. I want it to remove just one.
11:28
<@AnnoDomini>
No, wait.
11:28
< TheWatcher>
$result = substr($result, 0, -1).')' would work better then - if the last arg to substr is negative, it removes that many characters from the end of the string
11:28
<@AnnoDomini>
Oh.
11:28
<@AnnoDomini>
Thank you.
11:29
<@AnnoDomini>
How do I make newlines in print STDERR?
11:29
<@AnnoDomini>
It just treats them as literal \n.
11:30
< TheWatcher>
are you doing '\n' or "\n"? The former will be the literal, the latter gets interpreted
11:30
<@AnnoDomini>
Single quotes.
11:32
< TheWatcher>
yeah, single quoted strings are not subject to backslash or variable interpolation (except for \' and \\)
11:33
<@AnnoDomini>
TheWatcher: Could you /whois PainBot? I'm getting no output for some reason, and it worked last night.
11:40
< TheWatcher>
ircname : AD's Other DiceBot
11:40
< TheWatcher>
Seems to be there..
11:40
<@AnnoDomini>
Okay, it's a problem with me, then.
11:43 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
12:20 cpux is now known as shade_of_cpux
13:03 ToxicFrog [ToxicFrog@9FC3E4.DD47FD.4D14B9.AEDBB2] has quit [Ping timeout: 121 seconds]
13:04 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
13:04 mode/#code [+o ToxicFrog] by Reiver
13:16 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
13:23
<@AnnoDomini>
TheWatcher: I want to calculate the contents of a string, as if it was a mathematical expression. How do I do that? mIRC had $calc() for that purpose.
13:38
< TheWatcher>
eval
13:39
< TheWatcher>
eg: $foo = "1 + 1 + 1"; $res = eval($foo);
13:40
<@AnnoDomini>
Mmm.
13:40
< TheWatcher>
(if $foo is coming from user input, be very very careful to sanitise it, as eval allows you to execute arbitrary code)
13:40
<@AnnoDomini>
I see.
13:42
<@AnnoDomini>
$foo, in my case, is procedurally generated based on user input.
13:51 You're now known as TheWatcher[afk]
14:16 Orth is now known as Reiv
16:23 You're now known as TheWatcher
16:40 Reiv [orthianz@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
16:44 Orthia [orthianz@Nightstar-bbfae9bd.xnet.co.nz] has joined #code
17:25 Attilla [Attilla@Nightstar-f91b5f12.threembb.co.uk] has joined #code
17:25 mode/#code [+o Attilla] by Reiver
17:37 aoanla [AndChat@37647E.0002A6.6F1B60.963C8F] has joined #code
17:42 Orthia [orthianz@Nightstar-bbfae9bd.xnet.co.nz] has quit [Client closed the connection]
17:45 Orthia [orthianz@Nightstar-bbfae9bd.xnet.co.nz] has joined #code
17:59 aoanla [AndChat@37647E.0002A6.6F1B60.963C8F] has quit [[NS] Quit: ]
19:46 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
20:16 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
20:19 Orthia [orthianz@Nightstar-bbfae9bd.xnet.co.nz] has quit [Ping timeout: 121 seconds]
20:23 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
20:41 aoanla [AndChat@37647E.0002A6.6F1B60.78F38C] has joined #code
20:55 AndChat| [AndChat@Nightstar-6518dbda.range217-43.btcentralplus.com] has joined #code
20:59 aoanla [AndChat@37647E.0002A6.6F1B60.78F38C] has quit [Ping timeout: 121 seconds]
21:05 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
21:10 AndChat| [AndChat@Nightstar-6518dbda.range217-43.btcentralplus.com] has quit [[NS] Quit: ]
21:28 aoanla [AndChat@7C1B03.122F4E.AD7E36.9948B2] has joined #code
21:35 aoanla [AndChat@7C1B03.122F4E.AD7E36.9948B2] has quit [[NS] Quit: ]
21:42
<@ToxicFrog>
Man
21:42
<@ToxicFrog>
I'd forgotten how nice and annoying static typing is
21:45
< Vornicus-Latens>
Heh
21:45 Vornicus-Latens is now known as Vornicus
21:53 * Vornicus fiddles. the "board' class needs "is" and "can be" reader methods, methods to deduce negatively and positively, and a thing to tell whether the board is complete.
21:54
< Vornicus>
And of course it needs a reporting method.
23:18 Gruber [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
23:18 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
23:19 Gruber is now known as gnolam
23:38 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
23:41 Orthia [orthianz@Nightstar-661d35aa.xnet.co.nz] has joined #code
23:48 AnnoDomini [annodomini@Nightstar-1a15b5de.adsl.tpnet.pl] has quit [[NS] Quit: All systems gone.]
23:52 You're now known as TheWatcher[T-2]
23:55 You're now known as TheWatcher[zZzZ]
23:58 Orth [orthianz@Nightstar-66598c17.xnet.co.nz] has joined #code
--- Log closed Tue Jun 29 00:00:37 2010
code logs -> 2010 -> Mon, 28 Jun 2010< code.20100627.log - code.20100629.log >