code logs -> 2006 -> Mon, 14 Aug 2006< code.20060813.log - code.20060815.log >
--- Log opened Mon Aug 14 00:00:02 2006
00:23 Mahal [~Mahal@Nightstar-5192.worldnet.co.nz] has quit [Quit: This computer just fell asleep.]
00:23 Mahal [~Mahal@Nightstar-5192.worldnet.co.nz] has joined #code
00:23 mode/#code [+o Mahal] by ChanServ
00:47 Reiver is now known as ReivClass
03:34 Chalceon is now known as Chalcedon
03:35 ReivUni [~82d94c4d@Nightstar-14006.mail.city-net.pl] has joined #Code
03:41
< ReivUni>
...Damnit, I left my sketch notes at home. >.<
03:42
< ReivUni>
Opinions: Best to use X and Y, or A and Num?
03:43
<@Chalcedon>
what for Reivy?
03:44
< ReivUni>
Chessboard
03:44
<@Chalcedon>
and is it so you can read it, someone else can read it or so the program can read it?
03:44
< ReivUni>
Co-ordinates will be assigned via the traditional chess co-ordinates - a5b3 type thing.
03:44
< ReivUni>
However, in the internals of the program?
03:44
< ReivUni>
Tempting to just use X and Y. >.>
03:45
<@Chalcedon>
so, x = a, y = 5 type thing?
03:45
< ReivUni>
right
03:45
< ReivUni>
Er
03:45
< ReivUni>
No
03:45
<@Chalcedon>
x = 5, y = a?
03:45
< ReivUni>
X = A = 0
03:45
< ReivUni>
Inside the array, anyway.
03:45 * Chalcedon blink blink
03:45 * ReivUni sigh.
03:46
< ReivUni>
Arrays are numerical, and start from 0
03:46
<@Chalcedon>
don't worry about explaining
03:46
< ReivUni>
I'm mostly wondering idly what to call my variables.
03:46
<@Chalcedon>
well, who'll benefit from the labeling?
03:46
< ReivUni>
The coder.
03:47
< ReivUni>
Fuggit, I shall use X and Y.
03:47
<@Chalcedon>
if thats what works for you then do it
03:47
<@Chalcedon>
but remember which is which
03:49 * ReivUni is mostly frustrated as he left his text book behind. >.<
03:50
< ReivUni>
I am doing stupid syntax mistakes.
03:50
<@Chalcedon>
you have another class later, don't you?
03:51
< ReivUni>
Yeah
03:51
< ReivUni>
So can't really go home
03:51
< ReivUni>
Is /annoying/.
03:51
<@Chalcedon>
what's the text called again?
03:51
< ReivUni>
Head First Java
03:51
< ReivUni>
But really right now I just need a book full of syntax.
03:52
< ReivUni>
And I left my mp3 player behind and people are /talking/. >.<
03:52
<@Chalcedon>
you could go up and get it out of the library
03:52
<@Chalcedon>
:(
03:52
<@Chalcedon>
http://waikato.lconz.ac.nz/cgi-bin/Pwebrecon.cgi?v1=1&ti=1,1&Search%5FArg=head%2 0first%20java&SL=None&Search%5FCode=TALL&CNT=25&PID=21546&SEQ=20060814145154&SID =1
03:52
< ReivUni>
I... no, it's a bloody... thingy. Desk copy. I think.
03:52
<@Chalcedon>
I know it says on loan, but there are two copies
03:53
< ReivUni>
...I thought it was a desk copy?
03:53 * Chalcedon hrm
03:53
<@Chalcedon>
the new catalogue is not very helpful with multiple copies
03:53
< ReivUni>
I see.
03:54 * ReivUni pokes ToxicFrog
03:55
<@Chalcedon>
it could be, and then, maybe not
03:55
<@Chalcedon>
I think it gets issued to the course reserve desk
03:56
<@Chalcedon>
the date on the copy thats out is huge - it's not due until October, only a grad, a staff memeber or the course reserve desk would have a date that long
03:57
<@Chalcedon>
is there anything else you could get out that might help if you're just after syntax?>
03:58
< ReivUni>
Probably a google site. >.>
03:59
<@Chalcedon>
so google!
04:00
< ReivUni>
*flail* Just wanna write code. >.<
04:00
<@Chalcedon>
having compared a couple of other entries
04:00
<@Chalcedon>
I think the other copy of your text is free
04:01
<@Chalcedon>
failing that, you could look up some other hardcopy resources that wont require window switching
04:01 * Chalcedon gah at hiccoughs
04:05 * Vornicus applies the ancient remedy: stoatburgers.
04:05
< ReivUni>
VORN
04:05
<@Vornicus>
ep
04:05
< ReivUni>
Do you know java? At all?
04:06
<@Vornicus>
...uhoh.
04:06 * ReivUni pokepoke!
04:06
< ReivUni>
Please? >.<
04:06
<@Chalcedon>
watch out Vorn, you've been grabbed by a desparate coder
04:06
<@Chalcedon>
those stoatburgers won't save you now!
04:06 * ReivUni is being stressed and stupid and ADD and brain not worky and argh.
04:06
< ReivUni>
What I want to do is.
04:06
< ReivUni>
Declare a freaking array of characters.
04:07
<@Vornicus>
char array_of_chars[how_big]
04:07
< ReivUni>
AHA
04:07 * ReivUni was using Ch >.<
04:11
< ReivUni>
...Putting stuff into an Array. Hm.
04:11 * Chalcedon gives ReivUni a stoatburger
04:11
< ReivUni>
...I'm a dolt, the array needs to be of Peices.
04:11
< ReivUni>
(Yes I know the spelling is wrong. Shut up, it's how I will, always have, and probably always will. So...)
04:12 * Chalcedon introduces ReivUni to Trial and Error
04:12
<@Vornicus>
array_of_chars[where] = what
04:12
<@Chalcedon>
sorry, I'm not being very helpful here but you are not dumb or stupid
04:13
<@Chalcedon>
and you may be stressed, but that's normal.
04:13
<@Vornicus>
arrays are not resizable.
04:13
<@Chalcedon>
thats probably a good thing when the chess board has a fixed size.....
04:14
< ReivUni>
Peice Chessboard[8][8] = null;
04:14
< ReivUni>
Will give me an array of 8x8, from 0,0 to 7,7, all set to null, right?
04:14
< ReivUni>
Or have I messed that up by giving exact numbers...
04:14 * ReivUni hrmm.
04:16
<@Vornicus>
er
04:16
<@Vornicus>
should be Chessboard[8]
04:16
<@Vornicus>
er
04:16
<@Vornicus>
dammit
04:16
<@Vornicus>
I was writing here.
04:16
< ReivUni>
...Sorry, Vorn. Didn't mean to distract. :(
04:16
<@Vornicus>
chessboard[8][8] = {null};
04:16
<@Vornicus>
will do the job.
04:16
<@Vornicus>
Not you.
04:16
<@Vornicus>
Other people, PMing me while I'm trying to type.
04:17
< ReivUni>
Oh, arg. Sorry.
04:33 ASCIISkull [~none@Nightstar-19431.ny325.east.verizon.net] has joined #Code
04:33 himi-coffee [~himi@Nightstar-2512.ACT.netspace.net.au] has joined #code
04:33
< himi-coffee>
. . . . . .
04:33
< ReivUni>
hio. :)
04:34
< ReivUni>
This is, uh. Coder channel. Funny thta.
04:34
< ReivUni>
*that
04:34
< himi-coffee>
We used to have a #appliedcs
04:34
< ReivUni>
Heh. Okay.
04:34
< himi-coffee>
Anyway
04:35
< himi-coffee>
Don't think about the board as a bunch of null squares
04:35
< himi-coffee>
Think about it as a bunch of pieces that may or may not be there
04:35
< ReivUni>
The logic was one of two ways: An arraylist with the peices knowing where they were, and collision detection involving scanning through the list of peices to see if anything matched the destination.
04:35
< himi-coffee>
Or, think about the /game/ as a bunch of pieces in certain positions
04:35 * himi-coffee nods
04:35
< ReivUni>
The other was simply being able to check for the board having a null in Board[X][Y], if so, empty.
04:36
< himi-coffee>
Now, exactly /how/ long is the list of pieces going to be?
04:36
< ReivUni>
Chessboard.
04:36
< ReivUni>
16.
04:36
<@ToxicFrog>
32. 16 per player.
04:36
< himi-coffee>
Why on /earth/ would you bother making things more complicated than you need to?
04:37
< ASCIISkull>
because he's reiver
04:37
< himi-coffee>
There is that, I guess
04:37
<@ToxicFrog>
himi-coffee: this is what I said a few days ago~
04:37
< ASCIISkull>
but that's neither here nor there
04:37
< himi-coffee>
Dumb implementation that works!
04:37
< ReivUni>
TOXIC
04:37
< himi-coffee>
Pieces that know where they are
04:38
< ReivUni>
Help? Um. I don't have any of the stuff we talked about and have been trying to retrace my steps. Abysmially.
04:38
< himi-coffee>
Collision detection that looks through that /massively/ long list of 16 pieces in, oh, 100 microseconds
04:38
< ReivUni>
And this lot seem to think the two dimensional array is a silly idea~
04:38
<@ToxicFrog>
himi-coffee: I suggested pieces that know where they are, and a board that knows where the pieces are.
04:38 * himi-coffee nodnods
04:38
<@ToxicFrog>
No real performance benefit, but it simplifies the code.
04:38
< himi-coffee>
The board is overkill
04:39
< himi-coffee>
Walk the list
04:39
<@ToxicFrog>
Premature optimization == root of all evil!
04:39
<@Vornicus>
Having both means that you have to maintain both.
04:39 * himi-coffee nods at Vorn
04:39
<@Vornicus>
One word.
04:39
<@Vornicus>
Desync.
04:39
< ReivUni>
Vorn: This is what was worrying me about doublehandling.
04:39
< ReivUni>
But apparently it was better that way. >.>
04:39
<@ToxicFrog>
Vornicus: we worked this out earlier. It amounts to something like four extra lines of code in the Piece constructor and destructor.
04:40
<@ToxicFrog>
And in exchange simplifies the move legality logic significantly.
04:40
<@Vornicus>
Personally I would do the list of pieces; unless you're making Go, that's the world you're in.
04:40
< himi-coffee>
In fact, for a list this size, trying to speed it up would probably slow things down
04:41
< ASCIISkull>
shogi!
04:41
< ASCIISkull>
you know, given the small size of the chessboard, you could just have matrices representing each piece's possible moves and just overlay them on the board
04:42
< ASCIISkull>
to determine possible moves
04:43
<@ToxicFrog>
...
04:44
< himi-coffee>
ASCIISkull: they'd need updating as the piece moved, to take into account the edge of the board
04:44
<@ToxicFrog>
himi-coffee: oh, you are aware that this needs to be displayed to a dumb terminal?
04:44
< himi-coffee>
Nope
04:44
<@ToxicFrog>
Which is the /other/ reason I suggested a board as well as a list.
04:45
< himi-coffee>
All I knew prior to this was "chess game"
04:45
<@Vornicus>
Making the board does make it easier to display.
04:45
< himi-coffee>
Reiver asked about java syntax, and I said I might be able to help
04:45 * himi-coffee nods
04:46
<@ToxicFrog>
Vornicus: exactly. Using graphics or curses you can use a list and just display stuff to (x,y), but on a dumb terminal we actually have to do it LTRTTB
04:46 * Mahal hugs Reiver.
04:46 * Mahal can't offer any more help than that.
04:46
< ASCIISkull>
huzzah for dumb terminals
04:47
<@Vornicus>
On the other hand it's not like it's impossible to build the board string from a list of pieces.
04:47
<@ToxicFrog>
Yeah.
04:47 * himi-coffee nods
04:47
< himi-coffee>
But you /do/ start to gain enough to justify the cost
04:47
<@ToxicFrog>
But again, I'm operating on the principle that (1) excessive optimization here is overkill and (2) it's better to have smart data and dumb code than smart code and dumb data.
04:47 * himi-coffee nods
04:48
< himi-coffee>
As long as you can declare said smart data ;-)
04:48
<@ToxicFrog>
Anyways, I'm off to sleep.
04:48
<@ToxicFrog>
Have fun!
04:48
< himi-coffee>
Sleep well, TF
04:49 * ReivUni hugs Mahal, a surprisingly useful gesture right now.
04:50
< ReivUni>
TF! waitwait! Um.
04:50
< ReivUni>
I have isHorizontal and isDiagonal functions for movement checking.
04:50
< ReivUni>
I'm putting the movement rules in the Peice class, right?
04:50
< himi-coffee>
ReivUni: McM is back, so you can pester him now . . .
04:50
< ReivUni>
Ooh. Er. I feel silly asking him, though >.<
04:51
< himi-coffee>
He's a nice guy
04:51
<@Vornicus>
Asking McM for help in basic Java is like asking Stephen Hawking to talk to your 5th grade science class.
04:51
< ASCIISkull>
chess in inform
04:51
< ASCIISkull>
hasn't steven hawking, in fact, talked to 5th grade classes?
04:52
< himi-coffee>
Yes, he has, ASCIISkull
04:52
<@Vornicus>
Yeah, he'd do it, but in some sense it is overkill to the nth order.
04:52
< himi-coffee>
It's fun to watch, though
04:53
< ReivUni>
>.<
04:53 * himi-coffee snickers, and gives Reiver a Tim Ta
04:53
< himi-coffee>
m
04:53 * ReivUni nrom.
04:54 * Mahal feeds Reiver the cassata icecream that melted mid fridge defrost.
04:54
< himi-coffee>
What did you need help with?
04:54
< himi-coffee>
We may struggle to provide java help, but we can definitely provide programming assistance
04:55
< ReivUni>
meep.
04:55
< ReivUni>
Um.
04:55
< ReivUni>
Actually, I could do with general OO assistance in constructing things right.
04:55 * himi-coffee notes that explaining the issues to someone else can help clarify them in your own mind
04:56
< ReivUni>
Yes.
04:56
< ReivUni>
Um.
04:56 * ReivUni set this channel up for that very purpose, heh. But, er. Time constraints, um...
04:56
< ReivUni>
I have class in 5 mins, and will be gone for an hour. >.<
04:56
< himi-coffee>
Ah
04:56 * Mahal grins!
04:56
< himi-coffee>
Well, I'll still be here
04:56
< ReivUni>
Right. Cheers.
04:57
< himi-coffee>
If you'd prefer someone else, I can tie them up by their ears
04:57
< himi-coffee>
. . . . they might not be happy about it, though . . .
04:57
< ReivUni>
heh
04:57
< ReivUni>
http://www.cs.waikato.ac.nz/Teaching/COMP209B/assignments/Assignment1.pdf
04:58
< ReivUni>
Is my assignment.
04:58
< ReivUni>
(Don't worry too much about the 'no copying' thingy. We are allowed to ask for general code structure advice, and Stupid Questions regarding syntax.)
04:59 * himi-coffee moves his mouse to his left side, so he can use it without disturbing the cat currently sitting on his right arm
04:59
< ReivUni>
(What we're /not/ allowed to do is swipe entire blocks of code and paste them into our work verbatim.)
04:59
< himi-coffee>
Yeah
04:59 * Mahal aww at himi-coffee
04:59 * himi-coffee /did/ go to Uni ;-P
04:59
< ReivUni>
Heh, point.
04:59
< himi-coffee>
. . . . . .
04:59 * himi-coffee now has /another/ cat sitting on him
04:59 * ReivUni shrugs - he's had people read that bit and go "Um, should I be helping you with this?", so he provides disclaimer.
05:00 * Mahal steals cats from Himi.
05:00
< himi-coffee>
. . . . no, no, don't do that?
05:00
<@Mahal>
aw.
05:00
<@Mahal>
:(
05:00 * Mahal likes kitties.
05:00 * ReivUni , uh. Thanks in advance for the help, but must flee now.
05:01 * himi-coffee struggles a little bit for the show, while contemplating the savings in cat foot and vet bills
05:01 * himi-coffee eyes his third cat
05:01 * Mahal steal the THIRD cat!
05:01 ReivUni [~82d94c4d@Nightstar-14006.mail.city-net.pl] has quit [Quit: Class. Back in an ~hour.]
05:01
< himi-coffee>
. . . . no, no, bring them back . . . . yeah . . .
05:02 * himi-coffee would, of course, miss them very greatly
05:02 * Mahal cuddles the kitties, then returns.
05:13
< himi-coffee>
. . . . . . . I wonder how hard it'd be to link the computer player with a serious chess playing program . . .
05:13
<@Vornicus>
Then you'd have to figure out the API to the serious chess playing program.
05:13
< himi-coffee>
Scare the bejesus out of the lecturer
05:14
< himi-coffee>
Vorn: I know of one that's nicely documented
05:14
<@Vornicus>
but yes, that would be pretty cool.
05:14
< himi-coffee>
It's written in C, though, so you'd need a JNI interface, too
05:14
< himi-coffee>
Only really worth it if you had lots of time left after doing the main part of the assignment
05:53 ASCIISkull [~none@Nightstar-19431.ny325.east.verizon.net] has quit [Ping Timeout]
05:54 ASCIISkull [~none@Nightstar-4984.ny325.east.verizon.net] has joined #Code
06:46 ReivClass is now known as Reiver
06:46 * Reiver flails vaugely.
06:46
<@Reiver>
rant into parents at uni.
06:47
<@Reiver>
-t
06:47
< himi-coffee>
Scary
06:47
<@Vornicus>
That's just disturbing.
06:47
<@Reiver>
Not really
06:47
<@Reiver>
There to see folks about my brother.
06:47
<@Reiver>
But held me up. >.<
06:47
<@Mahal>
they were visitng... I was gonna ask :)
06:50 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
06:50 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
06:50 mode/#code [+o Chalcedon] by ChanServ
06:52 * Reiver flees to clean house for Parental Visit >.<
07:01 * himi-coffee . . .
07:02
<+Serah>
I see your ". . ." and raise you by "..."
07:03
< himi-coffee>
Well, given I'm . . . ing because I was expecting to help Reiver with his assignment, I'm not sure that another elipsis would make much difference
07:04
<@Reiver>
right
07:04
<@Reiver>
ok
07:04
<@Reiver>
house is tidyish
07:04
<@Reiver>
um
07:04
<@Reiver>
Assignment.
07:04 * Reiver digs paper out of bag.
07:05
<@Reiver>
I am thinking that while the arraylist is indeed better code-y stuff, if I use the 2D array, it will leave everything simpler - and I can apparently do away with the arraylist completely.
07:06 * himi-coffee nods
07:06
<@Reiver>
Apparently the way the lecturer did the AI was to iterate the board, finding each AI peice and then iterating the board to construct a list of all legitimate moves for each bit. And then randomly selecting from the list.
07:06
< himi-coffee>
That's a valid approach
07:06
<@Reiver>
Effectively brute-forcing the thing. Which works.
07:06
<@Vornicus>
Sounds about right.
07:06
< himi-coffee>
. . . another would be to weight them, but that's getting complicated
07:07
<@Reiver>
One thought is, that /is/ easier with the 2D array though. All the arraylist would really be saving you is having to search through 64 locations to find all the bits...
07:07
< himi-coffee>
(a real chess AI will use decision trees and weighting of moves and so forth, but that's the kind of thing you write PhDs on
07:07
< himi-coffee>
)
07:08
<@Reiver>
We're also expected to have a random AI.
07:08
< himi-coffee>
meh
07:08
<@Reiver>
I'm therefore writing a random AI. >.>
07:08
< himi-coffee>
My reading of the assignment is that the AI just has to /play/, not behave in any particular way
07:08
<@Reiver>
Right.
07:08
< himi-coffee>
You could plug in a real chess AI if you wanted
07:09
< himi-coffee>
But
07:09
<@Reiver>
Er. Well, we were told in class to just do a random, as there would be no marks for anything extra.
07:09
< himi-coffee>
Get the rest of the code working /before/ you do more than consider the requirements of the AI
07:09
<@Reiver>
Yes. :)
07:10
<@Reiver>
So... Arraylist would be nice, but I think the code in general would be simpler, if not cleaner (If admittedly relatively clunky for the AI), to just use a 2D.
07:10
<@Reiver>
As checking board locations is more straightforward than searching the arraylist each time. >.>
07:10
< himi-coffee>
eh
07:11
< himi-coffee>
The difference is really easy to hide behind an interface
07:11
< himi-coffee>
But
07:11
<@Reiver>
Do I want to code an interface? >.>
07:11
< himi-coffee>
. . . .
07:11
<@Reiver>
Well, er.
07:12
<@Reiver>
I more mean.
07:12
< himi-coffee>
Not a Java interface
07:12
<@Reiver>
Do I want to code that interface.
07:12
< himi-coffee>
Just an interface in general
07:12
<@Reiver>
Instead of cheating a bit more easily. >.>
07:12
< himi-coffee>
You may, you may not
07:12 * Reiver goes to write the arithmetic rules for legal peice moves.
07:12 * himi-coffee shrugs
07:12
< himi-coffee>
A 2d board is probably the best bet, though
07:16 * Reiver nods.
07:16
<@Reiver>
Hm.
07:16 * Reiver pokes.
07:16
< himi-coffee>
Me?
07:17
<@Reiver>
variables are all lower case, y/n?
07:17
< himi-coffee>
. . . .
07:17 * Reiver keeps forgetting the blasted conventions.
07:17
< himi-coffee>
This depends on your school of thought, and what the lecturer taught you
07:17
< himi-coffee>
javaTendsToUseMixedCase
07:18
<@Reiver>
Ah, right
07:18
<@Vornicus>
^---- that there is both methods and variables.
07:18
< himi-coffee>
personally_i_like_something_saner
07:18
<@Vornicus>
^---- I agree with that statement.
07:18
< himi-coffee>
I also prefer to use short, sensible variable names
07:18
< himi-coffee>
Longer, descriptive names for methods/functions
07:18
< himi-coffee>
Mixed case is just a pain
07:19 * Reiver nod.
07:19
<@Reiver>
Offset is offx = currentx-destx, offy = currenty-desty.
07:19
<@Vornicus>
My personal coding style document: FooClass, doFoo, a_dog_named_foo
07:20
< himi-coffee>
If you ever feel the need to put warts on your variables, I will personally be on the next flight over there to break all the bones in both your hands
07:20
<@Vornicus>
Though with Ruby it's vastly different, because of the way the language works.
07:20
<@Vornicus>
warts?
07:20
<@Reiver>
To test for straightness, it'd be if(([offx] == 0 && [offy] > 0) || ([offx] > 0 && [offy] == 0))
07:20
< himi-coffee>
um
07:20
< himi-coffee>
Hungarian notation?
07:20
<@Vornicus>
ah.
07:20
<@Reiver>
Yes/no/is there a cleaner way?
07:21
< himi-coffee>
As in, ippointertoint
07:21
<@Vornicus>
Reiver: offx == 0 || offy == 0. A null move is straight.
07:22
<@Reiver>
...Why did I not think of that.
07:22
<@Reiver>
>.<
07:22
<@Vornicus>
Because you're tired.
07:22
<@Reiver>
Right, probably.
07:22
<@Reiver>
Diagonal moves would be [offx] == [offy]
07:22
<@Reiver>
Yes?
07:24
<@Reiver>
...But a null move is not /legal/...
07:24
< himi-coffee>
Reiver: if((newx - x) == 0 && (newy - y) != 0 || (newx - x) != 0 && (newy - y) == 0 || (newx == x && newy == y))
07:24
<@Reiver>
...Oh wait the square would count as occupied by a friendly peice and throw an exception.
07:24 * Reiver giggles.
07:25
<@Reiver>
himi: I was thinking of making an offx and offy for simplicity sakes. As they will be used repeatedly.
07:25
< himi-coffee>
Hm
07:25
<@Reiver>
Knights: ([offx] == 2 && [offy] == 1) || ([offx] == 1 && [offy] == 2)
07:25
<@Reiver>
Is there a better way to do it?
07:25
< himi-coffee>
Yeah, I guess it would be a useful thing
07:26
< EvilDarkLord>
Hm. What if you made a list of all legal moves and let the user choose one by number?
07:26
< himi-coffee>
The interface is specified in the assignment
07:26
< EvilDarkLord>
*nod*
07:27
< himi-coffee>
Each piece needs to have its own test for legality of a move
07:27
<@Reiver>
Yes, was planning on this.
07:27
< himi-coffee>
And it can't just be based on the offsets
07:27
<@Reiver>
Nope
07:28
<@Reiver>
Was going to be ^ for knights, and collision on destination.
07:28 * himi-coffee nods
07:28
< EvilDarkLord>
Heh. Finding out if a king can move to position X might be mildly painful.
07:28
< himi-coffee>
Yeah
07:28
<@Reiver>
For queen, it's isStraight and isDiagonal, and isClear.
07:28
< himi-coffee>
For each piece you need to write a move one step
07:28
<@Reiver>
Rooks, isStraight and isClear
07:29
< himi-coffee>
Then the test for legality is to iterate it
07:29
< himi-coffee>
Override the legality test for knights
07:29
<@Reiver>
I'm going to have an isClear method that iterates between the current square and the target square.
07:29
<@Reiver>
(But not testing the target square itself.)
07:29
< himi-coffee>
(there aren't any other pieces that can jump over other pices are there?)
07:29
<@Reiver>
knights will not use the isClear method in their isLegal method.
07:30
<@Reiver>
isLegal being the one I intend to have over-ridden in each class.
07:30
< himi-coffee>
The thing is, doing it step-wise lets you test things other than that step-wise, too
07:30
<@Reiver>
knights override the isClear, pawns override checkDestination.
07:31
<@Vornicus>
Pawns are going to be a hell of a mess to get them to work right.
07:31
< himi-coffee>
Which means you can handle castling without any extra complexity (outside the complexity of the move)
07:31
<@Reiver>
Pawns are not too bad.
07:31
<@Vornicus>
Because you don't just have the capture move, you have en passant.
07:31 * himi-coffee is thinking testing threats step-wise
07:31
<@Reiver>
Oh
07:31
<@Reiver>
We don't check enpassant.
07:31
<@Vornicus>
You should, just to be a bastard.
07:32
<@Reiver>
Heh
07:32
<@Reiver>
Assignment says not to bother.
07:32
<@Reiver>
I am not arguing with assignment if it makes my life easier.
07:32
<@Vornicus>
heh
07:32
<@Reiver>
...But I /do/ intend to check such matters later.
07:32
< himi-coffee>
You may find it doesn't, though . . .
07:32
< himi-coffee>
Sometimes these things just fall out
07:32
<@Reiver>
It's not too bad - it'll be implimented the same method as checking for check.
07:32
<@Reiver>
>.>
07:33
<@Vornicus>
what, en passant? It's easily the most complicated rule in the game.
07:33
<@Reiver>
Can't move two squares forward if pawn is threatened in square in front?
07:33
< EvilDarkLord>
Shouldn't be that hard. When a pawn moves two steps on the other side you just store the square it skipped over and add it to the options of another pawn if it's in the right position?
07:34
<@Reiver>
I'd highjack the AI's legalmoves alograthm, and just check to see if an opponent /could have/ moved into that square.
07:34
<@Reiver>
Same thing with check.
07:34
<@Reiver>
You'd have in pawn and king peices, a verbotenSquare check. >.>
07:35
<@Vornicus>
you /can/ move two squares forward... but you give your opponent the option - and only on his next move - to capture that pawn using a pawn to capture at the location passed through.
07:35
<@Vornicus>
It's not forbidden, it adds a capture option.
07:35
< EvilDarkLord>
*nodnod*
07:35
<@Reiver>
Ehn. *shrug*
07:35
<@Vornicus>
it's the only capture option where you capture without landing on the square where you captured.
07:35
<@Reiver>
Will get there when I get there ok?
07:35
<@Reiver>
Um.
07:35
<@Reiver>
Can I have input on the knights legalMove thingy?
07:36 * Reiver is trying desperately not to get sidetracked. No offense is intended. >.>
07:36
<@Vornicus>
when you say [offx] do you mean abs(offx)?
07:40
<@Reiver>
Right.
07:40
<@Reiver>
Sorry, math jargon slipping in. >.>
07:41
< himi-coffee>
The knight is reasonably easy, I think
07:42
< himi-coffee>
(abs(offx) == 2 && abs(offy) == 1) || (abs(offx) == 1 && abs(offy) == 2)
07:42
<@Vornicus>
Looks fine to me.
07:43
<@Vornicus>
Otherwise you could do max(abs(offx), abs(offy)) == 2 && min(abs(offx), abs(offy)) == 1
07:43
<@Vornicus>
which is nearly as bad, but describes the symmetry better.
07:45
<@Reiver>
Hm.
07:45 * Reiver nods.
07:45
<@Vornicus>
In my opinion anyway.
07:45
< himi-coffee>
I'm sure a mathematician would prefer your way, but I prefer mine ;-P
07:45
< himi-coffee>
It actually says what it means
07:45
<@Reiver>
Mine is... easier to read what is going on, I think.
07:45
<@Reiver>
Well, mine/himi
07:45
<@Vornicus>
All right then.
07:47 You're now known as TheWatcher
07:47 * Reiver does ponder Vorns though.
07:47
<@Reiver>
Kings.
07:48
<@Vornicus>
max(abs(offx), abs(offy)) == 1
07:48 * himi-coffee puts a funny hat onn Reiver
07:48
<@Reiver>
Yus!
07:48 * Reiver was just typing that, and getting himself muddled.
07:48
< himi-coffee>
Vorns is perfect in this case
07:48
< himi-coffee>
As long as you ignore castling
07:49
< himi-coffee>
(and everyone should, for any sane first case implementation)
07:49
<@Reiver>
No castling nor en passant is needed.
07:50
<@Reiver>
Queening is still there (But it is only a queen, you don't choose other options), but check, castling, and en passant not.
07:52 Serah [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has quit [Ping Timeout]
07:54
<@Reiver>
Which only leaves pawns!
07:54
<@Reiver>
They are going to be a bitch, but a managable bitch.
07:54
<@Reiver>
Just a /messy/ bitch, you know? Lots of ifs.
07:54
<@Vornicus>
Chalain: I have completed and sent tangents.lua to your shinybit address.
07:55
<@Vornicus>
I have not tested it, but if there's errors they're entirely "Vorn doesn't know the language"
07:56
<@Vornicus>
Do yourself a favor and refactor mercilessly.
07:58
<@Vornicus>
Now, however, I need sleep.
07:59
<@Vornicus>
Er. That refactor mercilessly was to Reiver.
08:00 * Reiver huggles Vorn. Nini, lad!
08:00
<@Reiver>
Thank you for the help.
08:00
<@Vornicus>
My code is already properly refactored.
08:00
<@Vornicus>
niiiiiiiii
08:01
<@Reiver>
niiiiii!
08:01
< EvilDarkLord>
ni!
08:03 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
08:03 mode/#code [+o Chalcy] by ChanServ
08:04 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
08:05 Vornicus is now known as Vornicus-Latens
08:29
<@Reiver>
checkDestination has three returns.
08:30
< himi-coffee>
zOMG!
08:30
<@Mahal>
?
08:30
<@Reiver>
From the array, I mean. Er.
08:30
<@Reiver>
Null, for an empty square.
08:30
<@Reiver>
Or there can be a peice on it.
08:31
<@TheWatcher>
Ah, for a minute then I thought you meant you were going ot return a triple :)
08:31
<@Reiver>
This peice is, um, either friendly (No can take), or opponent (yes please take!).
08:31
< himi-coffee>
I'll admit that was my first thought, but this is java
08:31
<@Reiver>
Um... perhaps it could return true for the latter, and automatically--no. That's not what it's meant to do. Hrm.
08:32
< himi-coffee>
How are you using it?
08:32
<@Reiver>
Well, I have checkClear. This checks all the squares /between/ the current square and the destination square for being empty.
08:33
<@Reiver>
I now need one for checking the legality of the destination.
08:33
< himi-coffee>
What are the possible situations?
08:33
< himi-coffee>
You have a piece, and a move
08:34
< himi-coffee>
The move may be fundamentally illegal
08:34
< himi-coffee>
It may be blocked
08:34
< himi-coffee>
The destination may be taken by a friendly piece
08:34
< himi-coffee>
The destination may be taken by an enemy piece
08:34
< himi-coffee>
It may be completely clear
08:34
< himi-coffee>
(this ignores any threat assessments)
08:35 * Reiver nods.
08:35
<@Reiver>
That's the three, yeah.
08:35
<@Reiver>
Blocked is checked by another function.
08:35
< himi-coffee>
Those are all the same level of issue
08:35
<@Reiver>
I chose to seperate the final square, and /getting/ to the final square, on the basis that Knights and Pawns will both need special rules in one or the other situations.
08:37 * himi-coffee ponders
08:37
<@Reiver>
So we only need to worry about what is /in/ the final square.
08:37
<@Reiver>
Which is: Friendly, empty, opponent.
08:37
< himi-coffee>
From the way you're talking it sounds like you're making things more complicated than they need to be
08:37
<@Reiver>
Can't move, move, move-with-capture.
08:38
<@Reiver>
Yes and no. I'm setting up the superclass right now.
08:38
<@Reiver>
I'm setting it up so the subclasses can overwrite the bits they /need/, and no more.
08:38
< himi-coffee>
Not really in that sense, but in the way you're thinking about the whole problem
08:38
<@Reiver>
Oh.
08:38
<@Reiver>
Hrm.
08:38
< himi-coffee>
(the problem of assessing a move)
08:38 Chalcy is now known as Chalcedon
08:38
<@Reiver>
...Actually there are only really two solutions...
08:39
<@Reiver>
Can move, or can't. You just need an if statement allowing you to capture the enemy peice. And even that is only technically needed for the king...
08:40
< himi-coffee>
Right now, if /I/ was going to implement this, I'd implement the test for assessing a move iteratively
08:40
<@Reiver>
Er. Huh?
08:40
< himi-coffee>
I'd step one square at a time, assess that move, and then step again
08:40
<@Reiver>
Oh.
08:41
<@Reiver>
And how does that work with a Knight? :p
08:41
< himi-coffee>
I'd special case the knight's move by either skipping the collision check, or by treating it as a single magical step
08:42
< himi-coffee>
The pawn's moves can be dealt with iteratively
08:42
<@Reiver>
Yes.
08:42
< himi-coffee>
So, special case the knight, iterate everything else
08:42 * Reiver intends the code for isLegal to work like thus, for, say, a Queen:
08:43
<@Reiver>
if((isDiagonal(destx, desty) || isStraight(destx, desty)) && isClear(destx, desty)) { checkDestination }
08:44
<@Reiver>
Rooks? Drop the Diagonal. Bishops? Drop the Straight. Knights? Drop those both, have the isKnightMove formula we came up with earlier, and drop the isClear too.
08:45
<@Vornicus-Latens>
Thrice-bedamned dust.
08:45
<@Reiver>
Pawns? Don't even bother with anything of that other than isClear, and just overwrite checkDestination with their special rules.
08:45
< himi-coffee>
That's pretty much how I'd do it
08:45 * Reiver huggles Vorn. Allergies? :(
08:46
<@Vornicus-Latens>
yes.
08:46
<@Vornicus-Latens>
Laundry time.
08:46
<@Vornicus-Latens>
soon's I find enough quarters anyway.
08:47 * himi-coffee ponders
08:48
< himi-coffee>
I have to wonder why on earth it all feels like it's being far more complicated than it needs to be, then
08:59 * Vornicus-Latens laundries.
08:59 * Mahal envies the laundry.
09:00
<@Reiver>
Mahal: He's paying laundromat.
09:00
<@Reiver>
>.>
09:00 * Mahal will have to do that shortly.
09:01 * Vornicus-Latens LJposts on the subject.
09:02
<@Reiver>
Hey, Vorn.
09:02
<@Reiver>
You used to work for McDonnel-Douglas, didn't you?
09:02 * Reiver forgets.
09:03
<@Vornicus-Latens>
Sikorsky.
09:03
<@Reiver>
Right.
09:04
<@Vornicus-Latens>
McDonnell-Douglas makes airplanes.
09:04
<@Reiver>
Right.
09:04
<@Reiver>
You did something with HUDs, yes?
09:04
<@Vornicus-Latens>
A little, yes.
09:05 * Reiver just couldn't remember. :)
09:06
<@Vornicus-Latens>
piss and biscuits, I forgot there were so many aircraft manufacturers.
09:07
< himi-coffee>
Oh, Vorn
09:07
<@Vornicus-Latens>
?
09:07
< himi-coffee>
Recall your idea of listening for shells?
09:07
< himi-coffee>
(in the context of my battleships)
09:07
<@Vornicus-Latens>
Yeah.
09:07
<@Vornicus-Latens>
That whole resolution thing kinda blew it out of the water, sadly.
09:07
< himi-coffee>
It looks like I may be going with that idea, actually
09:07
<@Vornicus-Latens>
Really?
09:07
<@Vornicus-Latens>
Wow.
09:08
< himi-coffee>
I have some thoughts about the resolution, and the big thing is /track/, not the exact position, as long as it's coupled with accurate impact detection on the hull
09:08
<@Vornicus-Latens>
...apparently I opened the post window at exactly 2 AM.
09:08
<@Vornicus-Latens>
True. If you get a lot of data points you can see the right path through the noise.
09:09
< himi-coffee>
. . . . and when you consider the risks of putting large numbers of 5m lengths of thin copper wire in lakes, you quickly realise that it's just not an option, from an ecological impact perspective . . . .
09:10
<@Vornicus-Latens>
indeed.
09:10
<@Vornicus-Latens>
What're you using for the shells again?
09:10
<@Chalcedon>
what are you trying to do himi?
09:10
< himi-coffee>
Paraffin wax
09:11
< himi-coffee>
Which isn't an issue, since it's basically non-toxic
09:11
< himi-coffee>
Chalcedon: . . . . . it's . . . complicated
09:11
<@Vornicus-Latens>
He's making boats.
09:11
< himi-coffee>
Yeah
09:11
<@Vornicus-Latens>
That shoot wax bullets at each other.
09:11 * himi-coffee shiftyeyes
09:11 * TheWatcher suggests lacing the shells with bioluminescent bacteria and they using cameras to track them incoming ¬¬
09:12 * himi-coffee snickers
09:12
<@Chalcedon>
that sounds... highly ineffective
09:12
<@Vornicus-Latens>
And he's looking for bullet path tracking systems.
09:12
<@TheWatcher>
Also means you get glowing ducks!
09:12
<@Chalcedon>
(for making holes in boats which is usually why you're shooting htem)
09:12
< himi-coffee>
This is the point
09:12
<@Chalcedon>
what's with the copper wire?
09:12
<@Vornicus-Latens>
I don't think he wants to actually sink the things.
09:12
< himi-coffee>
The idea is to /not/ make holes
09:12
<@Vornicus-Latens>
The copper wire would have been for magnetic sensing.
09:12
< himi-coffee>
It's more like paintball
09:12
<@Chalcedon>
hrm
09:13
<@Chalcedon>
what about the little datalogger things limnologists use?
09:13
<@Chalcedon>
I'm not sure if they do magnetic fields or not, but they might
09:13
<@TheWatcher>
When you have $5AUDk (okay, so about £25 *flrrd*) ships, you don't want them sinking..
09:13
<@Vornicus-Latens>
Unfortunately half the problem is to not pollute the lake.
09:13
<@Chalcedon>
I'm in NZ, I deal with AU$ fine.
09:13
< himi-coffee>
These are 12.7mm caliber shells
09:14
<@Chalcedon>
so they're not very big shells.
09:14
< himi-coffee>
Most rfid systems have larger antenna than that
09:14
<@Vornicus-Latens>
So you can't use stuff like copper, which does nasty things to water.
09:14
< himi-coffee>
They also hit the same issue as the copper wire - pollution
09:14 * Chalcedon confused
09:14
<@Chalcedon>
what hits the same issue as the copper wire?
09:15
< himi-coffee>
rfid tags are made up of a small chip and an antenna grid
09:15
<@Vornicus-Latens>
RFID tags, and most electronic equipment.
09:15
< himi-coffee>
The antenna grid is exactly the same kind of thing as the copper wire, only not home made
09:15
<@Vornicus-Latens>
So some months ago I proposed a passive solution - bullets scream when they go through the air.
09:15
< himi-coffee>
(quietly, unfortunately)
09:15
<@Vornicus-Latens>
So listen for that sound.
09:16
<@Chalcedon>
what's an rfid tag (firefox is taking forever)
09:16
< himi-coffee>
Radio-frequency ID
09:16
<@Reiver>
Chalcedon: He is trying to create 1/50 scale remote control battleships, complete with functional cannons for ranged combat.
09:16
<@Vornicus-Latens>
Radio Frequency ID. A small, reactive radio that when activated sends a unique ID number.
09:16
< himi-coffee>
It's a passive or semi-passive RF based tagging system
09:16
< himi-coffee>
Essentially a chip and an antenna
09:16
<@TheWatcher>
radio frequency id tag. Essentially small microchips wiht an antenna. Hit them with a signal requesting their ID and the power of the radio signal is enough to respond with an ID
09:17
<@Reiver>
The wax bullets and such is a discussion on how to get shells that can have 'hits' accurately tracked in a manner not lethal to the boat, nor the enviroment.
09:17
< himi-coffee>
It's powered by the antenna
09:17
<@Reiver>
Does that give better context? :)
09:17 * himi-coffee gives Reiver a chocolate cigar
09:17 * himi-coffee <--- Mad Engineer, apparently
09:17
<@TheWatcher>
And I still say it'd be better to simulate it ¬¬
09:18
< himi-coffee>
TW: as I've said, feel free to do so! ;-P
09:18
<@Chalcedon>
my dad is an engineer and so's my husband, I'm quite accustomed to it
09:18
<@Chalcedon>
I'm asking all this because I'm trying to figure out if a standard limnological data logger will collect the information you require
09:18
< himi-coffee>
I'm actually a CS person, but I used to be into engineering and I'm crazy enough to want to give this a shot
09:18
< himi-coffee>
I'm not sure what system they use
09:19
<@Chalcedon>
they're used all the time to measure temperature, PO2 and a few other things in lakes
09:19 * Chalcedon is trying to figure this out and see if it helps at all
09:19
<@Reiver>
...Remind me, incidentally.
09:19
<@Reiver>
Did anyone ever toy with the idea of home-made paintballs?
09:20
< himi-coffee>
Well, since I'm trying to detect the trajectory of projectiles that will be travelling at between 50 and 130m/s, I'm not sure it's relevant to this /particular/ issue
09:20
<@TheWatcher>
himi-coffee: after I build 5 million polys worth of spacestation, probably the same worht of city, several hundred thousand worth of spacecraft...
09:20
< himi-coffee>
It'd be useful information for other things
09:20 * himi-coffee snickers
09:20
< himi-coffee>
Reiver: people /have/
09:20 * Vornicus-Latens could use some spaceships.
09:20
< himi-coffee>
I threw away the idea of using paintballs because they have a maximum range of 135m or so
09:21
< himi-coffee>
Oh, and they can't hit anything reliably at more than 50-60
09:21
<@Reiver>
himi: I was pondering paintball(s) inside a wax casing.
09:21
< himi-coffee>
Ah
09:21
<@Reiver>
So you get the aerodynamics, and a 'warhead'.
09:21
< himi-coffee>
They're too big
09:21
< himi-coffee>
~17mm caliber
09:22
<@Reiver>
Aha.
09:22
< himi-coffee>
That ups the drag /massively/
09:22 * Reiver then suggests: steel shot!
09:22
<@Reiver>
>.>
09:22
<@Reiver>
Just like momma used to make!
09:22
< himi-coffee>
To achieve a good range with that caliber would require /much/ heavier shells
09:22
<@Reiver>
(Bring a spare battleship.)
09:22
< himi-coffee>
heh
09:22
<@TheWatcher>
Make them futuristic battleships and fit them with laser cannons ;)
09:22 * himi-coffee chose 1/2 inch as a caliber with more care than it seems
09:23 * himi-coffee thpbts TW /yet again/ ;-P
09:23 NSGuest-689 [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has joined #Code
09:23
< himi-coffee>
TW: if I ever actually get these things working, I'll have to actually /show/ you why I did it
09:24
< himi-coffee>
I realise you're a software person, but the sheer /niftiness/ of it all will surely impress you
09:24 NSGuest-689 is now known as Serah
09:24
<@Chalcedon>
sorry himi, it looks like the best they do is dissolved oxygen, temperature, conductivity, pH, salinity, total dissolved salts, total dissolved gas, and depth measurements
09:25 * himi-coffee nods
09:25
<@Chalcedon>
wouldn't the shells make an audible noise as they bounced off the hull?
09:25 * himi-coffee snickers
09:25
<@Chalcedon>
not with wax?
09:25
< himi-coffee>
They won't /bounce/ - they'll break into tiny little pieces
09:26
<@Chalcedon>
... ok.
09:26
<@TheWatcher>
And kinda spluch, too
09:26
< himi-coffee>
And yes, they'll make a good solid thump, since they'll be hitting at 200kph+
09:26
<@Reiver>
...Will they break into little peices, will they?
09:26
<@Reiver>
Hm.
09:26
< himi-coffee>
Reiver: hell yeah
09:26
<@Reiver>
Make your own paintballs.
09:26 * himi-coffee is doing that
09:26
<@TheWatcher>
He is doing
09:26
<@Chalcedon>
but wouldn't you be able to hear that?
09:26
<@Reiver>
Wax mould filled with paint.
09:26
< himi-coffee>
Chalcedon: yeah
09:26
< himi-coffee>
Reiver: yes
09:26
<@TheWatcher>
But he needs the trajectory
09:26
<@Reiver>
Oh.
09:26
<@TheWatcher>
for scoring
09:26
<@Reiver>
I... oh, right, to simulate damage.
09:26
<@Chalcedon>
so why can't you use that to determine a hit (or did I miss the point)?
09:27
<@Reiver>
Well, forensic splatter charts can help give angle of splatter... >.>
09:27
<@TheWatcher>
Hit is only part of it. Who hit you is another part.
09:27
<@Reiver>
(Colored paint)
09:27
<@Chalcedon>
so how is the magnetic field going to help with trajectory...?
09:27
< himi-coffee>
The angle that the hit comes in at determines the way that it penetrates the armour (in a real battleship)
09:27
<@Reiver>
Chalcedon: ...Good quesion.
09:27
< himi-coffee>
Which is what I want to model
09:28
< himi-coffee>
Aha
09:28
<@Chalcedon>
which will effect the magnitude and pattern of vibrarions in the hull?
09:28
< Serah>
When taking a backup of an SQL database, do you need to do anything but copy it onto a secure drive?
09:29
< himi-coffee>
The magnetic field thing is Nifteh(tm)
09:29
<@TheWatcher>
Serah: which DB?
09:29
< Serah>
Oh, and I have to ask, do any of you have any homosexual BDSM donkey porn?
09:29
<@Chalcedon>
... pardon?
09:29
<@Reiver>
>_>
09:29
< Serah>
Ask Reiver for details.
09:29 * Chalcedon looks at Reiver
09:29
<@Reiver>
*ahem* I was getting smart to Serah in another channel.
09:29
<@Reiver>
She called my bluff. :p
09:30
< himi-coffee>
You set up a magnetic field around the ship, and put coils in the shells. As the shells pass through the magnetic field, the motion induces a current in the coil, which creates a magnetic field, which can then be detected.
09:30
< Serah>
I'm at work, and he said he would DCC some of that porn. I said "This is denmark, they wouldn't care."
09:30 * himi-coffee suspects the battleships have been forgotten now
09:31 * Chalcedon wishes himi luck
09:31
<@Chalcedon>
I see with the magnetic field
09:32
<@Chalcedon>
could you measure it from above water?
09:32
<@Chalcedon>
like, sensor in the boat or something?
09:32
< himi-coffee>
You pretty much have to
09:32
< himi-coffee>
And yes, sensors in the boat
09:32
<@Chalcedon>
so where's the problem with polluting the water?
09:32
< himi-coffee>
Probably ten or fifteen of them
09:32
< himi-coffee>
The coils in the shells
09:32
<@Chalcedon>
AH
09:32
<@Chalcedon>
large magnet?
09:33
< himi-coffee>
You need maybe 4 or 5 meters of thin copper wire, made into a loop
09:33
<@Chalcedon>
no, copper not magnetic
09:33
<@Chalcedon>
learn to dive?
09:33
< himi-coffee>
um
09:33
<@Chalcedon>
you got a lake picked out? how deep is it?
09:33
< himi-coffee>
I'm not talking a few, I'm talking /thousands/
09:33
<@Chalcedon>
in a day?
09:33 * himi-coffee nods
09:34 * Chalcedon hrm
09:34
< himi-coffee>
Well
09:34
< himi-coffee>
Probably a couple of thousand
09:34
< himi-coffee>
Maybe a thousand per ship, in a day
09:34
<@Chalcedon>
could you use something magnetic instead of copper?
09:34
<@Chalcedon>
then you could use a rubber boat and a big magnet?
09:35
<@Chalcedon>
-magnetic from first statement + iron or steel
09:35 * Chalcedon has been invaded
09:35
< himi-coffee>
. . . . not the way that I was planning on doing it
09:36
< himi-coffee>
The coil needs to have as little resistance as possible, and any magnetic materials have quite high resistance
09:36
<@Chalcedon>
in terms of fixing or in terms of creating problem?
09:36
<@Chalcedon>
why low resistance?
09:36
< himi-coffee>
Possibly a different model, but that would require a different method
09:37
< himi-coffee>
Because the field that's being detected is induced
09:37
< himi-coffee>
The higher the resistance, the lower the induced current, and hence the lower the field
09:37
< himi-coffee>
And the lower the field strength, the harder it is to detect
09:37 * Vornicus-Latens goes to put his sheets in the dryer.
09:38
< himi-coffee>
As it is, it's at the limits of what a 12-bit ADC can pick up
09:38
<@Chalcedon>
right
09:38
<@Chalcedon>
my physics is /very/ rusty
09:39
< himi-coffee>
And it'd still need to be collected afterwards
09:40
< himi-coffee>
Whereas if we can just listen for them, there's no need to put anything risky in the shells at all
09:41 * Chalcedon feels that you should talk to Forj (who is an engineer)
09:41 * himi-coffee shiftyeyes
09:41
<@Chalcedon>
why?
09:42
< himi-coffee>
Fear of being laughed at?
09:42
<@Chalcedon>
no, currently he's sitting here asking me akward questions that I don't know how to answer
09:42
< himi-coffee>
. . . . . oh
09:43
<@Chalcedon>
but currently Forj is engaged in cleaning the house! which I should be too.
09:43
<@Chalcedon>
maybe in an hour or so?
09:43 * himi-coffee is quite willing to talk to an engineer who is willing to talk to him . . . .
09:43 * Chalcedon will see what she can do
09:43
<@Reiver>
himi: Forj is an active proponent of SCIENCE!.
09:44
<@Chalcedon>
but right now, Cleaning!(tm)
09:44 * himi-coffee snickers
09:44
<@TheWatcher>
SCIENCE!
09:44
<@Chalcedon>
Forj is also a slightly mad scientist
09:44
<@TheWatcher>
He's not mad, he's misunderstood.
09:44
< himi-coffee>
. . . strangely, that is somewhat reassuring
09:44
<@Reiver>
SCIENCE!
09:44
<@Chalcedon>
his Masters thesis was on 15th Century German armour steel.
09:44
<@Reiver>
himi: Of course he is.
09:44
<@Reiver>
He'll look at how to /make it work/, instead of just laughing at you. :)
09:45
<@Reiver>
It may not be possible, even then, but he's willing to consider the possibility. ;)
09:45
<@TheWatcher>
Well, any more than a mad scientist normally laughs, anyway
09:45
<@Chalcedon>
especially then
09:45 * Chalcedon go
09:46
< himi-coffee>
The somewhat scary part is being told that it won't work, because of <x>, which I might have known about if I'd actually studied engineering but didn't, so don't, and hence have been spouting large quantities of crap for the last six months . . . .
09:47
<@Reiver>
Better 6 months crap, than a $5000 lawn orniment...
09:48
< himi-coffee>
Well yes
09:48
< himi-coffee>
. . . . though I'm /certain/ I could build a model that would, you know, float
09:48
< himi-coffee>
And do ship-type things
09:48
< himi-coffee>
The only things I'm /not/ sure of are the gunnery parts
09:48
<@Reiver>
Like sink?
09:48
<@Reiver>
:p
09:48 * himi-coffee thwaps Reiver
09:49
< himi-coffee>
Stop feeding my insecurities!
09:49
<@Chalcedon>
boys: heres a lesson for you:
09:49
< himi-coffee>
Yes, mama?
09:49 * himi-coffee hides behind Reiver
09:50 * Reiver is not scared! He has seen Chalcedon angry, and there were hardly even any toasters!
09:50
<@Chalcedon>
do NOT ask your wife to do something that involves going out into the cold dark wet yard to a place you go half a dozen times a week (the shed), particularly not when she's currently busy doing something that YOU missed. Nor is it advisable to remind her that you've requested said task to be done previously
09:50 * Serah tosses a toaster to Chalcedon.
09:50
<@Chalcedon>
toaster? why a toaster?
09:51
< himi-coffee>
Reiver is apparently afraid of them
09:51 * Chalcedon does not toss toasters!
09:51
< Serah>
Here, let me demonstrate.
09:51 * Mahal giggle at Chalcedon
09:51 * Serah swipes the toaster from Chalcedon and throws it at Reiver.
09:51
<@Reiver>
Aii!
09:51 * Reiver dives for cover.
09:51 * himi-coffee thinks he shall go make some more coffee, and go pick up some more milk and bread before the shops close
09:51 * Chalcedon occasionally tosses pillows, mice, tissue boxes and various other small items, but not toasters.
09:51
<@Reiver>
Chalcedon: Quite.
09:51 * TheWatcher catches the toaster, uses it to make toast.
09:51
<@Reiver>
You /have/ heard the tale of the Toastergirl, yes?
09:52
<@Chalcedon>
yes.
09:52
<@Chalcedon>
but:
09:52
< Serah>
No, I haven't.
09:52 * Reiver notes to TW that the toaster is long dead. :(
09:52 * Chalcedon != toastergirl
09:52
<@Vornicus-Latens>
...you toss mice?
09:52
<@TheWatcher>
... I assume by "mice" you mean the computer sort?
09:52
<@Chalcedon>
no, the mouse got banged against the mouse one.
09:52
<@Chalcedon>
*-one + pad
09:52
<@Reiver>
*SQEEEEEAAAAAAL*splat!*thump*
09:52
<@Chalcedon>
I may have tossed a few frozen ones (of the organic variety)
09:53 * Chalcedon == biologist
09:53
<@Reiver>
"...I hope you're going to clean that up."
09:53
<@Chalcedon>
oi Reiver they were frozen!!
09:53
< himi-coffee>
Oooh, a squishy-scientist!
09:53
<@Vornicus-Latens>
...lovely.
09:53
<@Chalcedon>
and mice squeak, not squeal (not that I meet many live ones)
09:53 * himi-coffee snickers quietly
09:54
<@Reiver>
Chalcedon is one of those sadistic biologists that likes to kill harmless little rodents so she can pull their teeth out.
09:54 * Chalcedon is a mouse killer, and a stoat and rat killre
09:54
<@Reiver>
I, however, consider myself far more civilised.
09:54 * Vornicus-Latens distributes stoatburgers.
09:54 * Chalcedon has pulled no rodent teeth!
09:54
<@Reiver>
I merely kill billions of life forms every week.
09:54
< himi-coffee>
Oh, I forgot you're also a biologist
09:54
<@Reiver>
(Yay biochemistry)
09:54
< himi-coffee>
So many squishies
09:54 * TheWatcher eyes you all
09:54 * Reiver is a coder/biochemist. Go figure.
09:55
<@Chalcedon>
I chopped their heads off, boiled them, removed all the flesh then stuck the skull under a microscope, teeth intact! (they're too hard to examine if they arent)
09:55 himi-coffee is now known as himi-shopping
09:55
<@Reiver>
Oh, that's right.
09:55 * Chalcedon go back to cleaning now
09:55
<@Vornicus-Latens>
09:55
<@Chalcedon>
what?
09:55
<@Reiver>
You flayed their skulls, as it were more convinent than pulling teeth.
09:55
<@Reiver>
:p
09:55
<@Chalcedon>
yes
09:55
<@Chalcedon>
they were dead at the time
09:56 * Reiver flays Vorn's skull.
09:56
< himi-shopping>
. . . . if you think /that's/ flaying, you have no idea
09:56
<@Reiver>
(himi: I'm kidding.)
09:56
<@Reiver>
(But didn't it sound dramatic?)
09:57
< himi-shopping>
(I didn't /really/ think you did, but seriously, most people these days have very little idea what some of the medieval tortures actually /were/)
09:57
< Serah>
You study mouseteeth for a living?
09:57
< Serah>
How cool is that?
09:57
<@Vornicus-Latens>
:(
09:57
<@Reiver>
Well, currently she writes code about mouseteeth.
09:58
<@Reiver>
And how patchy they are.
09:58
< himi-shopping>
I imagine it's a growth industry in NZ
09:58
<@Reiver>
Or something...
09:58
<@Reiver>
(I am so dead when she gets back.)
10:10 * Vornicus-Latens has clean sheets!
10:10
<@TheWatcher>
Yay
10:11
<@Reiver>
Yay Vorn!
10:11
<@Reiver>
Nini?
10:11
<@Reiver>
:)
10:11
<@Vornicus-Latens>
soon's I finish applying the sheets.
10:13
<@Vornicus-Latens>
there.
10:13
<@Vornicus-Latens>
SLEPFORREAL
10:13 * Vornicus-Latens slepforreal
10:13
<@Reiver>
Ni Vorn!
10:13
< Serah>
Night Vornie.
10:14 * Reiver damns as he just realises he could do with a hand with code.
10:15
< Serah>
What's the pay?
10:15
< Serah>
Would I have to move to NZ?
10:15
< Serah>
In case I did, would work supply living space?
10:16
< Serah>
I require a kitchen, a WC, and a bed, plus approximately 5 m2 for the computers.
10:17
<@TheWatcher>
Reiver: what's up?
10:17 himi-shopping is now known as himi
10:18
< Serah>
Zenith!
10:18
< Serah>
Vector 180 from the COM of the nearest gravitational centre.
10:19
<@Reiver>
TW: I have a number of variables I wish to use.
10:19
<@Reiver>
Um. They are the offset of a peices new position compared to its old position.
10:20
<@Reiver>
But I'm not sure where in my method I should be calculating these...
10:20
<@Reiver>
They're not strictly instance variables, so putting them in the class itself seems wrong.
10:20
<@Reiver>
But at the same time, I need them in basically every method in the class, so rewriting the code in each method seems bad coder practice...
10:21
< himi>
Why are they not instance variables?
10:22
<@Reiver>
Because instance variables are values an object stores between calls.
10:22
<@TheWatcher>
I think he means they are local variables
10:22
< himi>
Well yes
10:22
< himi>
But you can either calcuate them in each method, or store them between calls
10:22
<@Reiver>
They're temporary variables, but having to declare and calculate them is going to result in a lot of copy+paste code, and that's bad form, innit?
10:22
<@TheWatcher>
No
10:22
<@TheWatcher>
Quite the opposite
10:23
<@Reiver>
I don't want to store them between calls.
10:23
<@TheWatcher>
NEVER EVER make temporary variables global
10:23
<@Reiver>
Um. Ok.
10:23
< himi>
TW: eh, that's debatable
10:23 * Reiver puts in three lines of code per method. >.>
10:23
< himi>
It depends on whether they /are/ temps or not
10:24
<@TheWatcher>
Reiver: better three extra lines than debugging hell
10:24
< himi>
These aren't - they're a reflection of the object in flight, and as such they're kind of quasi-temporary
10:24
<@Reiver>
TW: Three lines repeated seven times?
10:24
<@TheWatcher>
Yes
10:24
<@Reiver>
Is that not bad practice?
10:24
<@TheWatcher>
No
10:24
< himi>
But, the decision is matter of taste . . .
10:25
<@Reiver>
(If java supported touplets, I'd use a function for it.)
10:25
<@TheWatcher>
Well, taste + years of me seeing exactly what happens when students start using globals for things that have no pressing need to be so
10:25
< himi>
Oh
10:25
< himi>
heh
10:25
< himi>
Okay, in /that/ context, yeah
10:26
< himi>
Hard and fast rule
10:26
<@Reiver>
Well... it's only global within that object...
10:26
<@TheWatcher>
Doesn't matter.
10:26
<@Reiver>
>.>
10:26 * Reiver pokes his methods.
10:26
<@Reiver>
Is it also ok to have every single method with the same values being passed in?
10:26
<@TheWatcher>
Yes
10:27
< himi>
. . . . OO is rarely elegant
10:27
< himi>
It's one of the reasons I don't like it much
10:27
<@TheWatcher>
(which is one reason I like C/C++ and perl - you can chose the technique you want)
10:28
<@Reiver>
isStraight(int newX, int newY) {} vs isDiagonal(int newX, int newY) {} vs isClear(int newX, int newY) {} vs checkDestintion(int newX, int newY) {} vs...
10:28
< himi>
(damn straight)
10:28 * Reiver woes.
10:28
< himi>
Oh hell yeah
10:28
< himi>
That's inevitable
10:28 * TheWatcher acress with himi
10:28
< himi>
You'd see that even if it was /lisp/
10:28
<@TheWatcher>
*agrees
10:29 * Reiver pokes his three-line repitition, wonders if it isn't possible to make it a... AHA!!!
10:30 * Reiver geniuses... so long as, uh.
10:30
< himi>
Don't try to be smart, bubs
10:30
<@Reiver>
Instance variables are effectively global variables, right?
10:30
<@Reiver>
So I can call them within a method without trouble, right?
10:30
<@Reiver>
Well, global variables within that class.
10:31 ASCIISkull [~none@Nightstar-4984.ny325.east.verizon.net] has quit [Ping Timeout]
10:31
<@TheWatcher>
Yes
10:31
<@Reiver>
So I could have a little methods called OffsetX, and OffsetY?
10:32
<@Reiver>
offsetX(NewX) and offsetY(NewY), anyway
10:32
< himi>
. . . . yes
10:32
< himi>
That's not even cheating
10:32 * Reiver did not say he was cheating.
10:33
< himi>
That's Good OO Programming Form(tm)
10:33
<@TheWatcher>
What exactly with offsetX do?
10:33 * Reiver just disliked having to write out multiple lines of code each time. >.>
10:33
<@Reiver>
Er.
10:33
<@TheWatcher>
*will
10:33
<@Reiver>
Kinda pointless except for readability.
10:33
< EvilDarkLord>
But so much more OO!
10:33
<@Reiver>
private int offsetX(NewX) {
10:34
< himi>
TW: exactly the same as having an instance variable, except recalculating it based on the given value of NewX
10:34
<@Reiver>
return NewX-OldX;
10:34
<@Reiver>
}
10:34
<@Reiver>
>.>
10:34
<@Reiver>
Just seems nicer in my functions than repeating the maths each time.
10:35
<@TheWatcher>
OldX is an instance variable?
10:35
< himi>
OldX would actually be X
10:35
< himi>
That's just the current position
10:35
<@TheWatcher>
Ah, that's okay
10:35 * himi baps Reiver for mixing that up
10:36
<@Reiver>
Well, it's posX
10:36
<@Reiver>
(shorthand, positionX)
10:36
<@Reiver>
but I thought I'd change the name to something more immediately readable. >.>
10:36
< Serah>
It might be you don't get extra credit for more fancy work, but the teacher likes you more, so that's extra credit enough.
10:37
< himi>
However you've done it - the proposed position minus the current position
10:37
< EvilDarkLord>
Hm. Is two methods using the same math already a good excuse to make a private method for that math?
10:37
< Serah>
We had to make a "guess which of these nine boxes I'm thinking of" we made a revamp of a battleship game.
10:37
< Serah>
With only two ships, moving, repairing, and splash on their fire.
10:37
< Serah>
We never did get the AI going due to lack of time.
10:37
< Serah>
But everything else worked.
10:38
<@Reiver>
What color goes first on a chessboard?
10:38
< EvilDarkLord>
White.
10:38
< himi>
The evil ones
10:38
<@Reiver>
right
10:38
< Serah>
Metal goes first, wood goes second.
10:38 * Reiver hrms. He wants black to be True... >.>
10:38
< Serah>
Why+
10:39 * Reiver has a boolean. BLACK or WHITE.
10:39
<@Reiver>
(TF's idea.)
10:39
<@Reiver>
(Apparently makes the If statements much easier.)
10:40
< Serah>
Of course it does.
10:41
< himi>
I'm rather surprised Java doesn't have the normal C convention of 0 == false, everything else == true
10:42
< himi>
. . . unless it does
10:42 * himi hasn't touched Java code in a /long/ time
10:42
< EvilDarkLord>
I think I tried that once and it failed to work.
10:45 * himi calls western union and chews them out
10:49
< himi>
Jesus /fucking/ christ they are a pile of steaming /faeces/
10:49
< EvilDarkLord>
Eh wot?
10:49 * Reiver feeds himi a tranquiliser to calm him down.
10:50
< himi>
Western Union won't allow me to send any money, and they won't tell me /why/
10:52
< himi>
They have got to be the most useless service imaginable
10:58
<@Reiver>
How do I import the math library into a class, again? >.<
10:58
< himi>
import math
10:58
< himi>
Oh, wait, Java
10:59 * himi shiftyeyes
11:00
< EvilDarkLord>
import java.Math.*; before all other stuff?
11:01
<@Reiver>
java.lang.math.*;
11:01
<@Reiver>
figures.
11:02
< EvilDarkLord>
When in doubt, use java.lang.x or java.util.x =)
11:02
<@Reiver>
:p
11:03
< himi>
I was going to suggest that, but figured you'd tried it . . . .
11:04
<@Reiver>
No
11:04
<@Reiver>
I'm a right dolt at simple syntax. >.<
11:04
<@Reiver>
I know how to code, but I do not know java, if that makes sense.
11:04
<@Reiver>
>.>
11:05
<@Chalcedon>
kind of like, you know how to talk, but you don't know any french?
11:05
< himi>
No sense at all!
11:05
< himi>
Everyone who knows how to code knows Java!
11:05
< himi>
. . . .
11:05
< EvilDarkLord>
Reiver: When in doubt, make a guess. The methods, for example, tend to be very intuitively named.
11:06
< himi>
Not that I'm being sarcastic, of course
11:06 * himi nods
11:06
< himi>
And hey, if you guess wrong the compiler will tell you
11:06
< himi>
It won't tell you what the /right/ guess would have been, but it'll tell you where you went wrong
11:07
< EvilDarkLord>
Unless you guessed wrong in a way that is technically right :)
11:07
< himi>
heh
11:07
< himi>
Much harder in Java than in, say, perl or python
11:07
<@Reiver>
Compiler?
11:07
<@Reiver>
Heh.
11:07
<@Reiver>
Eclipse tells me all my syntax errors with squiggly red lines.
11:07
<@Reiver>
Just like Word does with spelling mistakes :p
11:08
< himi>
Yes, because it has a compiler built in
11:08
<@Chalcedon>
thats what I like about python
11:08
< himi>
It's easy?
11:09
<@Chalcedon>
no seeing the mistake and then trying to figure out what the hell caused it.
11:09
< himi>
. . . .
11:09
< himi>
um
11:09
<@Chalcedon>
(eg html)
11:09 * himi has had just as hard a time tracking down bugs in python as he has in C
11:10
< himi>
. . . . well, maybe not /just/ as hard
11:10 * himi has had some use without initialisation bugs that have been nearly impossible to work out
11:10
<@Chalcedon>
oh yeah, sure, figuring out what you did wrong and fixing it is still hard, but at least you know where the compiler's running into problems
11:10
<@Chalcedon>
(or do other compilers do that too?)
11:11
< himi>
Yup
11:11
<@Chalcedon>
oh
11:11 * Chalcedon deflates
11:11
< himi>
Some better than python
11:11
<@Chalcedon>
ok.
11:11
<@Chalcedon>
I should really have a look at C++ among other things, but I figure one step at a time is best.
11:12
< himi>
In fact, I've run into problems an hour into a run with python code, where a "real" compiler would have picked it up at compile time
11:12
<@Chalcedon>
oops
11:12
< himi>
But then, it would have taken ten times as long to write the code in C, so it's a tradeoff
11:12 * Chalcedon keeps making while loops that don't end
11:12
< himi>
heh
11:13
<@Chalcedon>
I generally have to go back and add a n -= 1 that I forgot
11:13
<@TheWatcher>
Heheh
11:13
<@TheWatcher>
I know that one ¬¬
11:13
<@Chalcedon>
you'd think I'd have learnt by now...
11:13
<@TheWatcher>
Nah, t'is easy done.
11:13
< himi>
I was going to act all old-codgerly and say experience helps there, but I've done /far/ too much of that in the last few months
11:14
<@Reiver>
Experience doesn't help.
11:14
<@Reiver>
Practice, does.
11:14
< himi>
Yes, it does
11:14
< himi>
Experience helps /immensely/
11:14
<@Reiver>
If you get enough out of practice, you start doing the errors again I assure you. :p
11:14
< himi>
It makes it /much/ easier to spot the screwups
11:14
<@Reiver>
Oh, spotting the screwup, yes.
11:14
<@Chalcedon>
I learned HTML about 2.5 years ago (though haven't really used it since), but python I only started on ~4-5 months ago and I've had big gaps in that.
11:14
<@Reiver>
But I was meaning doing it at all in the first place >.>
11:14 * himi nods
11:14
<@TheWatcher>
Well, HTML is not a programming language
11:15
<@Chalcedon>
I know
11:15
<@TheWatcher>
It's a markup language
11:15
<@TheWatcher>
Big diff
11:15
< himi>
Nothing stops you from doing it in the first place except genius ;-p
11:15
<@Chalcedon>
I have to say that's part of why I decided to learn python
11:16
<@TheWatcher>
could have chosen far worse first languages... although the whitspace sensitivity in python does my head in.
11:16
<@Chalcedon>
I think of the two I prefer Python actually
11:16 * himi does, too
11:17
< himi>
. . . . not for creating markup, though
11:17
< himi>
And the whitespace sensitivity does /my/ head in sometimes, too
11:17
< himi>
It's /not/ designed with big complicated functions in mind
11:17
<@Chalcedon>
well, I didn't have too many options with what I chose. The majority of why I learned it was because that's what Vorn wrote the patchiness algorithm in (long story) and I wanted to be able to understand it.
11:18
<@Chalcedon>
himi: I have to agree with you on that one.
11:18
<@Reiver>
Um.
11:18
<@Reiver>
So.
11:18 * Chalcedon hijacked the conversation, sorry.
11:18
< himi>
So?
11:18 * himi was hoping for engineering hijacks, which would be even worse ;-P
11:18
<@Reiver>
I am making an if statement.
11:19 * himi congratulates Reiver!
11:19 * Reiver thwap the smartarse.
11:19 * himi ows
11:19
<@Chalcedon>
(oh, and sorry himi, Forj went to bed)
11:19 * himi sniffles
11:19
<@Reiver>
I am using a boolean for the side - BLACK and WHITE
11:19
<@Reiver>
But, um...
11:20
<@Reiver>
If the current side is BLACK, how do I check to see if a peice on the board is WHITE?
11:20
<@Reiver>
!= BLACK is not sufficient.
11:20
<@Reiver>
...Or is it?
11:20
<@Reiver>
Booleans can't resolve to null, can they...
11:20
< himi>
um
11:20
<@TheWatcher>
that's not a normal java boolean...
11:21
< himi>
TW: he's repurposing True and False
11:21
<@TheWatcher>
booleans are either true or false, and you might attach some naming convention to that
11:21
< himi>
. . . . . I believe
11:21
<@TheWatcher>
So black is false and white is true?
11:21
< himi>
t'other way around
11:22
< himi>
'cause he wants marks taken off for contrariness ;-)
11:22
<@TheWatcher>
Ohay, so
11:22
<@Reiver>
Black is true.
11:22
<@Reiver>
Because it /is/.
11:23
<@Reiver>
Don't ask me why.
11:23
<@TheWatcher>
if(currentSquare(x,y)) { body } will execute body if currentSquare returns black, and if(!currentSquare(x, y)) { body } will execute body if the square is white
11:23
< himi>
The Truth Shal Set Ye Fret
11:23
<@Reiver>
...Why would I lose marks for contraryness? Black is the color of law; white is the color of chaos. :p
11:24
<@Reiver>
TW: It needs to resolve against the /current color/, though.
11:24
<@Reiver>
Er. By that I mean the color currently in play
11:24
< himi>
Chalcedon: if he ever feels sufficient interest to have a chat about it, I may be in here, or Reiver will be able to get hold of me
11:25
<@Reiver>
himi: You're welcome to stay in here. :)
11:25
<@Chalcedon>
knowing Forj, this is unlikely sadly. If you were sitting here in our lounge, he'd probably sit and talk to you about it for hours, but currently it requires /effort/
11:25
< himi>
heh
11:26
<@TheWatcher>
Reiver: so you want to do something if the piece on a black square is white?
11:26
<@Reiver>
...Nono.
11:26
<@Reiver>
Um.
11:26
<@Chalcedon>
Forj has grown quite out of the habit of using irc I'm afraid
11:26
< himi>
'tis a terrible habit, terrible
11:26
<@Reiver>
If player black is playing, I need it to do something if it lands on a square with a white peice on it.
11:26
<@TheWatcher>
Right
11:26
<@Reiver>
Chalcedon: Forj merely killed /his computer/, didn't he?
11:26
<@Chalcedon>
yeah
11:27
<@Chalcedon>
he's getting a new one
11:27
< himi>
What sort of engineer /is/ he?
11:27
<@Chalcedon>
currently Mechanical Design
11:27
< himi>
Hm
11:27
<@Chalcedon>
that's what the computers for, its his CAD machine, it's costing us $2000
11:27
<@TheWatcher>
if(board.PieceOnSquare(x,y).getColour() != this.getColour()) { body } ?
11:27
< himi>
That's surprisingly cheap for a reasonable workstation . . .
11:27
<@Chalcedon>
(he two friends are starting their own business)
11:27
<@Chalcedon>
thats wihtout monitor
11:28
<@Chalcedon>
+$600
11:28
< himi>
Even without a monitor . . .
11:28
<@Chalcedon>
and half the ram it should have.
11:28
< himi>
Though I guess with the price of a high end CPU these days
11:28
< himi>
Hm
11:28
< himi>
Okay, that's dragging it into a reasonable range
11:28
<@Chalcedon>
also, half the graphics capability
11:28
< himi>
heh
11:29
< himi>
Alright, I can now believe it
11:29
<@Chalcedon>
(we wanted to put in a 256 chip but had to go with the 128 - they're industrial chips so the 256 is $1700)
11:29 * himi nods
11:29
<@Chalcedon>
(128 is still $500)
11:29
< himi>
Nasty nasty prices they are, but the gaming ones just lack precision
11:29
<@Chalcedon>
there was a 512 chip but it was something insane.
11:30
<@Chalcedon>
I don't know what the difference is, but the software people have a list of approved graphics chips
11:30
<@Chalcedon>
*/cards
11:30
< himi>
It's a shame, because the high end gaming chips these days are a lot more powerful than the workstation type chips, but they tend to be rather sloppy
11:30 Mahal [~Mahal@Nightstar-5192.worldnet.co.nz] has quit [Quit: slwwp]
11:31 * Chalcedon hasn't /seen/ a high end gaming chip
11:31
< himi>
heh
11:31 EvilDarkLord is now known as ThokkTheMysteriousStranger
11:31
< himi>
You can't tell unless you really care
11:31 ThokkTheMysteriousStranger is now known as Thokk
11:32
<@Chalcedon>
or are trying to do something it can't cope with
11:32
< himi>
They tend to either be optimised versions of the gaming chips, or specialist chips
11:32
< himi>
But one thing they /definitely/ do is make even the most expensive gaming rigs look cheap
11:33
<@Chalcedon>
heh
11:33
<@Chalcedon>
but not on a 17" CRT I'll bet
11:33
< himi>
Oh, not in terms of the looks
11:33
<@Chalcedon>
?
11:33
<@TheWatcher>
Add an extra 0 to the cost
11:33
< himi>
In terms of the steaming crater they make in your bank account
11:33
<@TheWatcher>
Or two, sometimes
11:33
<@Chalcedon>
hehe
11:34
<@Chalcedon>
yeah, I discovered that one
11:34
<@Chalcedon>
anyhow, its time I went to bed.
11:34
<@Chalcedon>
night all.
11:34
< himi>
Sleep well
11:34
<@TheWatcher>
night
11:34
<@Reiver>
Nini, Chalcedon!
11:38 * himi hasn't looked at computer hardware in /ages/
11:38
< himi>
Outside of specialist stuff
11:39 * TheWatcher is busy Plotting because he urgently needs Vastly More Processing Power for the Sekrit Projekts
11:39 * Reiver eyes TW.
11:39 * Reiver donates TW the encryption alograthms to SETI@Home.
11:40
<@TheWatcher>
(discussion in #fleet last night involved me buying a cheap 8 processor rackmount box and keeping it in work, along with plans for a dualcore or possibly twin dualcore rig ¬¬)
11:40
< himi>
. . . . . they have encryption algorythms?
11:41
< himi>
TW: you'd probably be better off getting el-cheapo 1U single or dual CPU boxes
11:41
< himi>
What sort of work?
11:41
<@TheWatcher>
Rendering. Masses of it.
11:42
< himi>
Yeah, el-cheapo 1U dualcore boxes
11:42
<@TheWatcher>
More processors == better, because I can render one frame per processor
11:42
< himi>
Yes
11:42
< himi>
8 1U boxes is cheaper than 1 8CPU box
11:43
<@TheWatcher>
Well, I can get an 8 core dell server for a bit over 1.3k
11:43
< himi>
...........
11:43
<@TheWatcher>
It's second hand, sure
11:43
< himi>
Oh, 8 /core/
11:43
< himi>
Ahhh
11:43
<@TheWatcher>
Well, 8 procesor
11:43
<@TheWatcher>
We've already gone one in work
11:43
<@TheWatcher>
*got
11:43
< himi>
You had me wondering why on /earth/ we were paying so goddamned much for our Dell hardware
11:44
<@TheWatcher>
Yeah, I don't care if it's 20-th hand as long as the processors work and it has a network connection
11:45
<@Reiver>
TW: Surely you'd want it capable of actual processor power, too?
11:45
<@Reiver>
I mean.
11:45
< himi>
Right now, about the best options I can see for that sort of thing are bits and pieces x86_64 boxes
11:45
<@Reiver>
8x200MHz is not exactly faster than 1x3.2 GHz these days...
11:45
<@Reiver>
>.>
11:45
< himi>
Reiver: 8x600MHz probably would be
11:45
<@TheWatcher>
In the last box we got they were all 2gig xeons.
11:46
< himi>
Though I'd want to test that
11:46
<@Reiver>
...For 1.3 grand, TW?
11:46
<@TheWatcher>
Yup
11:46
<@Reiver>
...Oh, wait, pounds?
11:46 * himi suspects the cutover point would be between 500MHz and 800MHz
11:47
<@Reiver>
2 GHz will kill it dead, then.
11:47
< himi>
Yes
11:47 * TheWatcher would give his left arm to get time on the NHPCS boxes downstairs though
11:47
< himi>
But, that would be suffering somewhat from memory bandwidth
11:48
< himi>
It'd still whomp the alternatives short of the same number of CPUs
11:49
<@TheWatcher>
I might also try to rope other people into donating cycles for me ¬¬
11:49
< himi>
How much does a bits and pieces athlon64 box cost in the UK?
11:50
<@TheWatcher>
Off the top of my head, can't tell you, I'd have to dig for it
11:50
< himi>
eh, not that it matters
11:50
< himi>
I doubt it'd beat your second hand box
11:51
<@Reiver>
TW: I'm up for cycle donation.
11:51
<@Reiver>
This boxen runs overnight.
11:51
<@Reiver>
Dunno if I have the bandwidth for it, though...
11:51
<@Reiver>
But it's the thought that counts right? >.>
11:52
< himi>
Bandwidth won't be an issue for renders
11:52 * himi eyes TW
11:52
<@Reiver>
Rendering software might be...
11:52
< himi>
Well, not /too/ much of an issue
11:52
< himi>
Unless he's planning on doing a movie
11:53
<@TheWatcher>
Reiver: screamernet nodes don't have a full install of LW, it's legal to shove them on arbitrary boxes
11:53
<@TheWatcher>
himi: ah, funny you should mention that
11:53
<@Reiver>
Oh, nice.
11:54
<@Reiver>
Can the nodes be paused and unpaused?
11:54
<@TheWatcher>
I believe so
11:54 * himi eyes TW some more
11:54 * Reiver has seen render software that did that, thought it highly awsome for chewing 'spare' cycles. AKA, 75% of his day. ¬¬
11:54
< himi>
What resolution would each frame be?
11:55
<@TheWatcher>
Probably D1 (PAL) size - 720x576
11:55
< himi>
Any idea how long they
11:56
< himi>
d take to render?
11:56
<@TheWatcher>
Pieces of string.
11:56
< himi>
Yes, I realised that as I hit enter
11:56
< himi>
um
11:56
< himi>
Complexity?
11:56
< himi>
um
11:57
< himi>
No, useless question
11:57
< himi>
Never mind
11:57
<@TheWatcher>
Probably the most complex scene would involve some 6 million polys.
11:57
<@TheWatcher>
Usually less than that
11:58
< himi>
Thems a lot of surfaces
11:58
<@TheWatcher>
Yeah
11:59
<@TheWatcher>
But now, I must vanish off to do "omgI'mflyinghalfwayroundtheworldtomorrow" related things.
11:59
< himi>
Ooh
11:59 You're now known as TheWatcher[afk]
11:59
< himi>
Don't forget to pack your explosives!
11:59
< himi>
After all, you can't take them in your handluggage any more
12:00
<@TheWatcher[afk]>
Yes, I'll be bringing the laptop with me ;P
12:00
< himi>
heh
12:00
<@TheWatcher[afk]>
(and they've lifted the restrictions somewhat - you get a single bag, including electronic equipment (thank god I don't have to entrust my laptop and camera to checked baggage!), no liquids)
12:01
<@TheWatcher[afk]>
And now, away!
12:01
< himi>
I /still/ don't understand how anyone thinks a drink bottle's worth of explosive would bring down an aeroplane
12:02
<@TheWatcher[afk]>
Especially if it really was peroxide laced sports drinks.
12:02
< himi>
. . . . .
12:02
< himi>
Dear /god/
12:02
< himi>
The incompetence
12:02 * himi prods TW away
12:02
< himi>
Gogogogo
12:02
<@TheWatcher[afk]>
yes, that's what the reports have been saying. well, except the ones in the UK media that have been keeping /very/ quiet about what was involved.
12:03
<@TheWatcher[afk]>
anyway, bye
12:03
< himi>
Have fun
12:05
<@Reiver>
Good luck!
12:29 ASCIISkull [~none@Nightstar-22145.ny325.east.verizon.net] has joined #Code
12:55 Thokk is now known as Haste
12:59 Haste is now known as EvilDarkLord
13:05 You're now known as TheWatcher
13:45 ASCIISkull [~none@Nightstar-22145.ny325.east.verizon.net] has quit [Ping Timeout]
14:45 ToxicFrog|AFK is now known as ToxicFrog|W`rkn
14:49 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
14:49 mode/#code [+o Chalcy] by ChanServ
14:49 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
15:11 Reiver is now known as ReivZzz
15:40 ReivZzz [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
15:40 MahalWork [~Mahal@Nightstar-5192.worldnet.co.nz] has quit [Ping Timeout]
15:40 Reivlin [~reiver@Nightstar-2240.ubs-dsl.xnet.co.nz] has quit [Ping Timeout]
15:43 ASCIISkull [~none@Nightstar-22145.ny325.east.verizon.net] has joined #Code
15:48 Reivlin [~reiver@Nightstar-873.ubs-dsl.xnet.co.nz] has joined #Code
15:48 ReivZzz [~reaverta@IRCop.Nightstar.Net] has joined #Code
15:48 mode/#code [+o ReivZzz] by ChanServ
15:49 himi is now known as himi-sleeping
16:20 ReivZzz is now known as ReivSLEP
16:58 Serah [~Shemhazai@Nightstar-27025.bynxx4.adsl-dhcp.tele.dk] has quit [Ping Timeout]
17:30 You're now known as TheWatcher[afk]
18:20 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
18:24 ASCIISkull [~none@Nightstar-22145.ny325.east.verizon.net] has quit [Ping Timeout]
18:25 ASCIISkull [~none@Nightstar-17767.ny325.east.verizon.net] has joined #Code
18:59 You're now known as TheWatcher
19:31 Chalcy [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
19:31 mode/#code [+o Chalcy] by ChanServ
19:41 * jerith fiddles with YAWS.
19:41
<@jerith>
Interesting web framework there.
19:41
< EvilDarkLord>
YAWS?
19:41
<@ToxicFrog|W`rkn>
Yet Another Web Server?
19:42
<@jerith>
Indeed.
19:42
<@jerith>
Written in Erlang.
19:43
<@ToxicFrog|W`rkn>
...now that is interesting.
19:43
<@TheWatcher>
er..
19:43
<@jerith>
Mostly I'm playing with it because I want to dabble in Erlang with a programming challenge that requires something GUIish.
19:44
<@jerith>
And Erlang has no GUI bindings that I can find.
19:44
<@jerith>
So I thought I'd give it a shot.
19:45
<@jerith>
Anyone else used Erlang?
19:45
<@jerith>
I'm still at the "hello world" and process pingpong stage.
19:46
<@ToxicFrog|W`rkn>
I've poked it a bit. Its IPC closely resembles that of SGOS, which is convenient.
19:46
<@ToxicFrog|W`rkn>
Just a bit, though.
19:47
<@ToxicFrog|W`rkn>
(more accurately, it resembles SGOS IPC using nothing but CK_Receive() and CK_Send_signal(), unless there's a synchronous send construct I've missed)
19:48
<@jerith>
There doesn't seem to be one.
19:49 * ToxicFrog|W`rkn nods.
19:49
<@jerith>
I don't expect to do much with it, but it's pure functional and I come from an almost exclusively imperative background.
19:49
<@ToxicFrog|W`rkn>
I'm more comfortable with synchronous sends, really.
19:49
<@jerith>
And it also has the coolness factor of being used on half the world's GSM switches.
19:50
<@ToxicFrog|W`rkn>
But I suppose you could implement SRR on top of Erlang anyways, so./
19:50
<@jerith>
SRR?
19:51
<@ToxicFrog|W`rkn>
Send-Receive-Reply. The synchronous counterpart to Signal-Receive, which is what Erlang uses.
19:51
<@ToxicFrog|W`rkn>
Also, it's /not/ purely functional; it has both state (ie variables) and side effects (eg spawn())
19:52
<@ToxicFrog|W`rkn>
Anyways. The idea behind SRR is that when a thread sends a message, it doesn't return immediately as in Erlang; instead it blocks.
19:53
<@jerith>
Well, pure enough.
19:53
<@ToxicFrog|W`rkn>
The receiver can at any time choose to reply to a thread that's sent it a message, which causes it to unblock and the return value of the send() is the reply.
19:53
<@jerith>
And the state is entirely local and immutable.
19:53
<@jerith>
Hmm.
19:53
<@ToxicFrog|W`rkn>
...ok, I'll accept that.
19:54
<@jerith>
Also, what I've read seems to suggest that it's generally considered pure functional.
19:54 himi-sleeping [~himi@Nightstar-2512.ACT.netspace.net.au] has quit [Ping Timeout]
19:55
<@ToxicFrog|W`rkn>
Anyways. The SGOS IPC subsystem uses Send-Receive-Reply (which also means, with a few exceptions, that all locking etc is implicit in how threads send- or receive-block on each other), with an additional function, CK_Send_signal(), which sends a message to a thread but doesn't block and cannot be replied to.
19:55
<@jerith>
Hmm.
19:55 Vornicus [~vorn@Nightstar-18307.slkc.qwest.net] has joined #code
19:55 mode/#code [+o Vornicus] by ChanServ
19:55
<@jerith>
Erlang has no locks because all data is immutable.
19:55
<@ToxicFrog|W`rkn>
Erlang is pretty much just signal and receive.
19:55
<@jerith>
Hey Vorn.
19:55 * Vornicus wavels
19:56
<@ToxicFrog|W`rkn>
Hoi, Vorn
19:56
<@jerith>
Although you could do a receive straight after every send if you wanted to.
19:56
<@ToxicFrog|W`rkn>
Exactly.
19:56
<@jerith>
Sorted your dusty-sheet woes?
19:56
<@ToxicFrog|W`rkn>
This doesn't guarantee that you get a signal from the thread you just sent to, though :P
19:56 * Vornicus applies a Jjaro gravitics station to TF.
19:57
<@ToxicFrog|W`rkn>
But, yes, I figure you could implement synchronous SRR on top of Erlang if you needed to
19:57
<@ToxicFrog|W`rkn>
augh
19:57
<@jerith>
You could always just ignore (or requeue) anything that doesn't match the PID you sent to...
19:57 * ToxicFrog|W`rkn is trapped in Lh'owon's sun
19:58
<@Vornicus>
jerith: yes.
19:58
<@ToxicFrog|W`rkn>
And speaking of, I need to get to work on v2 of luathreads.
20:00
<@jerith>
Anyways, Erlang seems to have somewhat nifty exception handling.
20:01
<@jerith>
And the philosophy appears to be "let stuff die and then deal with it somewhere else".
20:01 * ToxicFrog|W`rkn nods.
20:01
<@ToxicFrog|W`rkn>
I wonder if you could write a Spellcast daemon in Erlang?
20:01 himi-sleeping [~himi@Nightstar-29007.ACT.netspace.net.au] has joined #code
20:07 * ToxicFrog|W`rkn reads the reference manual, gahs at strings.
20:39 * Vornicus beats ant and java with a stick.
20:52 Mahal [~Mahal@Nightstar-5049.worldnet.co.nz] has joined #code
20:52 mode/#code [+o Mahal] by ChanServ
21:25 Chalcy is now known as Chalcedon
21:50 Mahal is now known as MahalShower
22:23 You're now known as TheWatcher[T-2]
22:27 You're now known as TheWatcher[afk]
22:53 * Vornicus beats ant and java with a bigger stick.
23:00 ToxicFrog|W`rkn is now known as ToxicFrog|AFK
23:10 * Vornicus repurposes the Jjaro gravitics station to beating ant and java. With a stick.
23:15 * Chalcedon removes Vorn's stick and replaces with cookies and marshmallows
23:18
<@Vornicus>
It's a computer. I don't think cookies and marshmallows do anything to it.
23:28
<@Chalcedon>
no, but they might do something to you, like cheer you up
23:28
<@Chalcedon>
by all means keep beating it
23:28 * Chalcedon gives stick back... after Vorn has consumed cookies and marshmallow
23:30 * Vornicus nroms cookies, but passes on the marshmallows... can't stand them.
23:37
<@Chalcedon>
oh
23:42 * Vornicus needs someone familiar with java, particularly classpaths.
23:44
<@ToxicFrog>
My experience with classpaths can basically be summed up as "AUGHNONONOPLEASEHAUHGUHADGAFGAH"
23:45
<@Vornicus>
...there truly is nothing new under the sun. I said the very same thing.
23:45
<@Vornicus>
Just this morning, even.
23:51 * MahalShower would be happy to help.
23:51
<@MahalShower>
If I knew Java.
23:51 MahalShower is now known as Mahal
23:59 * Vornicus floons
23:59 Serah [~Shemhazai@Nightstar-8502.ds1-ba.adsl.cybercity.dk] has joined #Code
--- Log closed Tue Aug 15 00:00:02 2006
code logs -> 2006 -> Mon, 14 Aug 2006< code.20060813.log - code.20060815.log >