code logs -> 2007 -> Fri, 25 May 2007< code.20070524.log - code.20070526.log >
--- Log opened Fri May 25 00:00:59 2007
00:09 GeekSoldier is now known as GeekSoldier|Sleep
00:15
<@Chalcedon>
is there a good reason why I shouldn't be able to use a for loop to set a list of String objects sequentially to the value of a series of strings in another list.
00:15
<@Chalcedon>
*?
00:15
<@Vornicus>
Sounds like it should work, but it might be tricky.
00:15
<@Vornicus>
Well, actually, show us what you mean.
00:16
<@Chalcedon>
for (int index = 0; index < 11; index++)
00:16
<@Chalcedon>
{
00:16
<@Chalcedon>
characterAttributes[index] = baseStats[index];
00:16
<@Chalcedon>
}
00:16
<@Chalcedon>
character attributes is a list of String objects. baseStats is a list of strings.
00:16
<@Chalcedon>
(well, arrays at the moment, but I tried lists first)
00:17
<@Vornicus>
It should work, if you have made sure that characterAttributes has enough elements in the first place.
00:17
<@Chalcedon>
yes.
00:17 * Chalcedon has an idea.
00:17
<@Chalcedon>
I don't actually /need/ the string objects
00:19
<@Chalcedon>
yup, that works, shortens the code quite a bit too.
00:19
<@Vornicus>
If you're copying the whole list, you can use a Copy Constructor.
00:20
<@Chalcedon>
I realised I only needed a list of strings.
00:20
<@Chalcedon>
I've set it up as an object, so I just need to set the get{} to return baseStats[index] instead of a named variable.
00:21
<@Chalcedon>
It's maybe not quite as easy to follow, but it's a whole lot shorter and saves me, effectively repeating myself.
00:22
<@Chalcedon>
any suggestions on how to shorten the gets?
00:22
<@Chalcedon>
or do I just have to type the lot out?
00:25
<@Vornicus>
Show me, again, because I don't know C#
00:28
<@Chalcedon>
what, one of the get{}s?
00:28
<@Chalcedon>
(sorry, I don't want to code spam unnecissarily)
00:28
<@Vornicus>
The whole mess, I don't know what you're doing.
00:28
<@Vornicus>
and this is why we have a pastebin.
00:30
<@Chalcedon>
:)
00:30
<@Chalcedon>
nah, don't worry about it.
00:31
<@Chalcedon>
it's really only an excersize and it was mostly copy paste.
00:31
<@Chalcedon>
I'm fairly sure you /can't/ shorten it because of the structure.
00:31
<@Vornicus>
blarg
00:31
<@Chalcedon>
blarg?
00:31
<@Vornicus>
blarg!
00:31
<@Chalcedon>
o.O
00:32
<@Vornicus>
(by the way: characterAttributes[:11] = baseStats[:11] )
00:32 * Chalcedon hopes she has not enblargenated Vorn
00:32
<@Vornicus>
indeed not
00:32
<@Chalcedon>
what does that do?
00:32
<@Vornicus>
What you did up there, in Python.
00:32
<@Chalcedon>
copies the whole thing?
00:32
<@Vornicus>
If you want the whole thing: characterAttributes = baseStats[:]
00:33
<@Chalcedon>
what, a shortcut in C#? Never!
00:33
<@Chalcedon>
its good to know how you do that in Python though.
00:34 * Vornicus <3 Python.
00:34
<@Vornicus>
actually I did that in the permutations code.
00:34
<@Chalcedon>
I remember the [:] yes
00:34
<@Chalcedon>
create a copy
00:35 * Chalcedon hrm
00:41 ToxicFrog|W`rkn is now known as ToxicFrog
00:43 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
00:52
< Takyoji>
*shrugs* I think all I needed for my Javascript scenario was by just using the 'this' keyword
00:54
<@ToxicFrog>
....yay?
00:54
< Takyoji>
I guess
00:55
< Takyoji>
I thought it meant for using different types of objects in JS..
00:56
<@ToxicFrog>
Context is generally considered desireable.
01:02
< Takyoji>
Sorry I take that back... even the 'this' keyword doesn't even work
01:04
< Takyoji>
oh, NOW I found it
01:05
< Takyoji>
'this' has to be handled like:
01:06
< Takyoji>
<script>
01:06
< Takyoji>
function blah ( objectRef ) {
01:06
< Takyoji>
document.write("<p>Color is" + objectRef.style.color + "</p>");
01:06
< Takyoji>
} </script>
01:06
< Takyoji>
<p onMouseOver="blah(this)">You get the point...</p>
02:33 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
02:34 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
02:34 mode/#code [+o ToxicFrog] by ChanServ
03:07 Derakon [~Derakon@Nightstar-12922.sea2.cablespeed.com] has joined #code
03:07 mode/#code [+o Derakon] by ChanServ
03:18 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
04:32
<@Derakon>
I believe I've figured out how the makers of N handled the problem of SAT not being able to tell you how to hold still on slopes.
04:32
<@Derakon>
Namely, in N, you can't hold still on slopes.
04:36
<@Vornicus>
heh
04:54
<@Derakon>
Okay, engine? The intersection of <640, 507><640, 602> and <600, 600><600, 700> does, in fact, exist.
04:54
<@Vornicus>
uh
04:54
<@Vornicus>
no?
04:54
<@Vornicus>
Those two lines are parallel.
04:54
<@Derakon>
...right, two vertical lines.
04:54
< Takyoji>
Hmm.. I never noticed there was a forum on NightStar... especially after I realized someone quoted me which I found from Google
04:54 * Derakon coughs.
04:55
<@Derakon>
I meant <600, 600><700, 600> as the second line.
04:56
<@Vornicus>
that should exist, <640, 600>
04:56
<@Derakon>
Right. But my functions aren't finding it.
04:57 * Vornicus hunts his lineline intersection code.
04:57
<@Derakon>
I have line-line intersection code that I'm fairly certain works.
04:58
<@Derakon>
It has a couple special cases for vertical and horizontal lines that I'd love to be able to ditch, though.
05:00
<@Derakon>
...apparently they don't work. Bah.
05:00
<@Derakon>
I want to know if a horizontal line intersects a vertical line! This is not rocket science!
05:01 * Derakon glares at the him of a year or two ago.
05:04 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
05:06
<@Derakon>
...ahh. I was doing line segment intersection, not line intersection.
05:07 Chalcedon is now known as ChalcyAFK
05:07
<@Vornicus>
Should still succeed.
05:08
<@Derakon>
No; the actual lines I'm testing for intersection are based on the endpoints of the lines I listed and a velocity vector.
05:08
<@Derakon>
And thus are considerably shorter.
05:33
<@Derakon>
...Mouse is using a PS1 controller to lasso a Tear.
05:39 GeekSoldier|Sleep is now known as GeekSoldier
05:45 ChalcyAFK [~Chalcedon@Nightstar-1216.ue.woosh.co.nz] has quit [Quit: Gone]
05:51 ReivZzz is now known as Reiver
06:00
<@Vornicus>
Der: ....what?
06:02
<@Derakon>
ReBoot episode.
06:02
<@Vornicus>
...aha.
06:04
<@Derakon>
Mouse also has a snazzy katana that fits into a ~12" sheath on her calf.
06:04
<@Derakon>
Despite being otherwise full-size.
06:04
<@Vornicus>
I want one.
06:13
<@Derakon>
Whee season two has an exponential dimmer switch.
06:19
<@Derakon>
YES! Finally!
06:19
<@Derakon>
I have a sprite standing on another sprite without jittering all over the place!
06:20 MahalWork [~Mahal@Nightstar-12512.worldnet.co.nz] has quit [Quit: Leaving]
06:20
<@Vornicus>
Woohoo!
06:22
<@Derakon>
Now I just have to work out the proper normals for the lines involved in the collision so that I can let my sprites *walk* on each other too.
06:22
<@Derakon>
Or I could watch another ReBoot episode before bed.
06:28 * Derakon snerks as Dot trots out a gun about five times her volume held in both hands.
07:09 * Derakon makes LJ post, heads for bed. Night, all.
07:09 Derakon is now known as Derakon[AFK]
08:12 You're now known as TheWatcher
08:54 AnnoDomini [~farkoff@Nightstar-6925.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
08:54 KBot [~karma.bot@Nightstar-29497.neoplus.adsl.tpnet.pl] has joined #Code
08:54 KarmaBot [~karma.bot@Nightstar-6925.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
08:55 KBot is now known as KarmaBot
09:00 AnnoDomini [~farkoff@Nightstar-29497.neoplus.adsl.tpnet.pl] has joined #Code
09:00 mode/#code [+o AnnoDomini] by ChanServ
09:14 You're now known as TheWatcher[afk]
10:01 Reiver is now known as ReivOut
10:09 You're now known as TheWatcher[wr0k]
11:14 GeekSoldier is now known as GeekSoldier|Rides
11:36 ReivOut is now known as Reiver
11:44 You're now known as TheWatcher
11:45 You're now known as TheWatcher[afk]
11:59 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
11:59 mode/#code [+o gnolam] by ChanServ
12:47 GeekSoldier|Rides is now known as GeekSoldier
13:03 You're now known as TheWatcher[wr0k]
14:36 Vornicus is now known as Vornicus-Latens
14:38 * ToxicFrog is still in season 1
14:38
< Reiver>
?
14:38
< GeekSoldier>
ReBoot
14:38
< GeekSoldier>
backscroll from 7 hours ago.
14:38
< Reiver>
Loved that show. ;_;
14:38 * AnnoDomini too!
14:38
< Reiver>
For the sheer glorious brainlessness of it, but it was fun
14:39 * AnnoDomini knew next to nothing outside of video games about CompSci, so he didn't notice the brainlessness.
14:40
< Reiver>
Well, more that it wasn't a terribly intelligent show.
14:40
< Reiver>
Kids show, and all.
14:40
< Reiver>
But it was fun.
15:16 * Serah stabs Reiver with a spoon.
15:16 * Reiver dies.
15:19
<@ToxicFrog>
I've been having fun mapping characters to their real-world equivalents.
15:19
<@ToxicFrog>
I still think Hex is the entropy pool.
15:32 You're now known as TheWatcher
15:39
< Reiver>
...beg pardon?
16:07
<@ToxicFrog>
?
16:07
<@ToxicFrog>
Which part?
16:09
< MyCatVerbs>
All of it.
16:09
< MyCatVerbs>
And the part with the sausages, too.
16:09
< MyCatVerbs>
Oh, my bacon. Cheese-toasted sausages dancing with tacos on a sea of broken glass.
16:15
<@ToxicFrog>
Oh dear.
16:15 * ToxicFrog eyes his script as it attempts to invoke sed with some 13,600 arguments.
16:16
< MyCatVerbs>
ToxicFrog: I didn't realise bash even allowed you to put together command strings that long.
16:16
< MyCatVerbs>
ToxicFrog: or are you exec(2)ing directly?
16:16
<@ToxicFrog>
No, bash. And I interrupted it before it actually called sed; constructing the argument list was taking way too long.
16:37
<@ToxicFrog>
oh god nooooo
16:37 * ToxicFrog weeps
16:37
<@ToxicFrog>
So. I have a bash script that searches the source for #includes and determines if they need to be altered to match case with the actual file.
16:38
<@ToxicFrog>
I have run into an unforseen difficulty.
16:38
<@ToxicFrog>
Specifically, we have lots of duplicate filenames in different modules.
16:38
<@ToxicFrog>
For example, auth.h, auth.h and Auth.h.
16:38
<@ToxicFrog>
And the script can't tell which one you're trying to include.
16:44 * ToxicFrog starts mixing languages with abandon
17:10 You're now known as TheWatcher[afk]
17:17
<@ToxicFrog>
Quick poll. Overloading + to mean string concatenation. Better or worse than having a seperate concat operator?
17:20
<@gnolam>
Depends on if you expect to do a lot of generalized concatenations (i.e. all kinds of lists and arrays).
17:28
<@ToxicFrog>
Well, actually, I phrased the question wrong.
17:28
<@ToxicFrog>
"using for concatenation an operate that means something different elsewhere in the language"
17:29
<@ToxicFrog>
The discussion in question is of Java's +, which is both summation and concatenation.
17:29
<@ToxicFrog>
And what happens when you do { 1+"2" }, which is fairly obvious in languages where it doesn't mean both but is less so in Java.
17:47 Reiver is now known as ReivOut
17:48 ReivOut is now known as ReivZzz
18:41 GeekSoldier_ [~Rob@Nightstar-6681.pools.arcor-ip.net] has joined #code
18:42 GeekSoldier [~Rob@Nightstar-4031.pools.arcor-ip.net] has quit [Ping Timeout]
19:21 GeekSoldier_ is now known as GeekSoldier______
19:26 GeekSoldier______ is now known as GeekSoldier
19:43 You're now known as TheWatcher
21:51 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
23:13 GeekSoldier is now known as GeekSoldier|Sleep
23:44 You're now known as TheWatcher[T-2]
23:47 You're now known as TheWatcher[zZzZ]
--- Log closed Sat May 26 00:00:05 2007
code logs -> 2007 -> Fri, 25 May 2007< code.20070524.log - code.20070526.log >