code logs -> 2012 -> Sun, 19 Aug 2012< code.20120818.log - code.20120820.log >
--- Log opened Sun Aug 19 00:00:29 2012
00:07 * Vornicus gets 14/12.5/15 cycles per carbon depending on which one he has in hand.
00:38 * Vornicus could probably make it faster, but dang.
00:55 * Vornicus tries to do too many things at once in this program.
00:59 You're now known as TheWatcher[T-2]
01:01 You're now known as TheWatcher[zZzZ]
01:15 Orthia is now known as Reiver
01:22 * McMartin offloads all of Carlsbad's dev work to Osmium.
01:33 cpux|2 is now known as cpux
01:36 * McMartin also gets back to work on Hex Inverter, Multiplatform Edition.
01:46 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
01:49
<&Derakon>
So, style question.
01:49
<&Derakon>
Is it better to import math and do math.ceil, or to just do int(foo + .5)?
01:49
<&McMartin>
math.ceil returns a double.
01:50
< rms>
Python?
01:50
<&Derakon>
As it happens, an int is desirable here.
01:50
<&Derakon>
rms: yes.
01:50
<~Vornicus>
Also that there is not equivalent to ceil
01:50
<&McMartin>
Also true!
01:50
<&McMartin>
It's equivalent to round.
01:50
<&Derakon>
Vorn: ah, fair point.
01:50
<~Vornicus>
ceil is -int(-foo)
01:50
<&Derakon>
...
01:50
<&McMartin>
Is it?
01:51
< rms>
O.o
01:51
<~Vornicus>
It is not, I am wrong
01:51
<&McMartin>
I thought int rounded towards zero, not negative Infinity
01:51
<~Vornicus>
int truncates, I thought it floored
01:51
<&McMartin>
yeah
01:51
<&McMartin>
So, um
01:51
<&McMartin>
"No substitute for math.ceil if that's what you need"
01:51
<&Derakon>
I guess importing math.ceil would be the proper approach then, yeah.
01:51
< rms>
What's the difference between truncation and flooring?
01:51
<&Derakon>
Truncation removes the decimal portion.
01:51
<&McMartin>
floor is "round to negative infinity"
01:51
<&Derakon>
So negatives and positives are both pulled towards zero.
01:51
<&McMartin>
truncation is "round to zero"
01:51 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
01:51
<~Vornicus>
rms: flooring takes -0.8 to -1, truncation takes -0.8 to 0
01:51
< rms>
RE: original question: I'd import math if it's small.
01:51
<&Derakon>
math is a standard module.
01:52
<&McMartin>
Also it's Python so nothing is small >_>
01:52
<&Derakon>
The only reason not to import it is to limit the dependencies a given module ha s.
01:52
<&Derakon>
Er, has.
01:52 * McMartin sads at Java
01:52
<&McMartin>
The lack of delete() means that when I test AIs against one another I cannot have them fight for their very lives
01:53
<&McMartin>
This is the pettiest complaint against Java I have ever made
01:53 * Derakon snerks.
01:53
<&Derakon>
Yeah, you can just vaguely forget about them and let them drift in limbo for awhile before the reaper collects their souls.
01:53
<&McMartin>
The C++ version of this was the Thunderdome. Two objects enter. One object leaves.
01:55
<&McMartin>
On the plus side, it looks like I've ported all of Hex Inverter's AIs to Java in a way that's compact enough that a phone can shrug it off.
01:56
<&Derakon>
Next step: put it on that Android-based game thing?
01:56
<&McMartin>
Actually, the plan here is to actually do all the work by hand.
01:56
<&McMartin>
The goal here was "learn the Android APIs", after all
01:56
<&Derakon>
Ahh.
01:56
<&McMartin>
But I think I may throw together a desktop version first just to do the UI design in a milieu I kind of know
01:57
<&McMartin>
Cons: That would be Swing
01:57
<&McMartin>
Pros: It would also be one JPanel and a JMenuBar, I'll live.
02:07
<&McMartin>
Oh right, also having to deal with resource packaging, ugh
02:25
<&McMartin>
All right, package/module organization question.
02:26
<&McMartin>
Should "core" classes (in this case, the AI and game referee classes) go into a "core" subpackage, or should they be in the package root?
02:26
<&McMartin>
More generally, should the package root be empty except for Main, if that
02:26
<&Derakon>
FWIW, the root directory for Pyrel currently contains pyrel.py, container.py, and userCommand.py.
02:26
<&McMartin>
(Since in Java I'm going to end up having different packages for each UI type, and those are each going to have their own Main)
02:26
<&Derakon>
Everything else is in directories.
02:26
<&Derakon>
And, uh, it's not entirely clear that two of those are in the right locations. >.>
02:27
<&McMartin>
Yeah, the mapping is a little weirder with Java vs. Python, because Java uses directories for what Python uses files for, more or less
02:28
<&Derakon>
Er?
02:28
<&Derakon>
It's been a long time since I worked in Java, I must confess.
02:29
<&McMartin>
When you say "import {name}" in Python, you're talking about a file.
02:29
<&McMartin>
When you say "import {name}" in Java, you are *usually* talking about a directory (though this is no longer a constant in this decadent age)
02:29
<&McMartin>
A java file corresponds to a single class.
02:30
<&McMartin>
Classes in the same module indicate this by being in the same directory.
02:30
<&McMartin>
IIRC, a python file corresponds to a single module, and modules in the same directory are submodules of the same larger module.
02:36
<&Derakon>
Yeah, usually a directory is called a "package" in that case.
02:36
<&Derakon>
So I have the mapgen package, which contains the generator and gameMap modules.
02:36
<&Derakon>
Of course there's no obvious way to tell when you're importing a package vs. a module; they behave basically identically.
02:37
<&McMartin>
Right
02:37
<&McMartin>
I'm mainly wondering whether I should be putting the AI/Game/Board/etc classes in com.bumbershoot.hexinverter.core or just directly in com.bumbershoot.hexinverter.
02:37
<&McMartin>
Also pictured: why "import" isn't frowned on in Java development
02:37
<&Derakon>
Because the package path names get loooooong.
02:38
<&McMartin>
Quite
02:38
<&McMartin>
Most of that stuff is actually now handled by code generators in professional Java development (Both Eclipse and Netbeans have hotkeys for "please import every foreign class I use and list them by name at the top, individually, thanks")
02:38
<&Derakon>
How pleasant.
02:39
<&McMartin>
Also "automatically generate equals() and hashCode() methods for this class now that I've indicated which fields in it are semantically meaningful for equality"
02:39
<&McMartin>
The functional languages have kind of spoiled me here since I'm used to the language sensibly defining these things for me automatically
02:39
<&McMartin>
Or rather, "all custom datatypes can behave sensibly in the language's collections with no additional effort on my part"
02:41
<&McMartin>
Or right, that's why I was going to start with Swing.
02:42
<&McMartin>
Because I really don't want to have to deal with touchscreen jackassery until I can make the interface work right with mouse clicks.
02:46
<&McMartin>
I wonder how intrusive I can make Eclipse not be to my git repositories.
02:46
<&McMartin>
ls
02:47
<&McMartin>
oops
03:19 Kindamoody[zZz] is now known as Kindamoody
03:52 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
04:18 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
04:24
<&ToxicFrog>
=========zaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaavc
04:24
<&Derakon>
\o/
04:26
<~Vornicus>
\o/
04:26
<&McMartin>
\o/
04:54 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
05:03 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
05:05 Kindamoody is now known as Kindamoody|gaming
05:32 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
05:58 * iospace snerks
06:11 iospace is now known as iospacedout
06:43 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
06:52 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
06:56 Derakon is now known as Derakon[AFK]
07:04 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has quit [Ping timeout: 121 seconds]
07:04 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
07:06 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
10:10 Kindamoody|gaming is now known as Kindamoody
10:25 You're now known as TheWatcher
11:00 Im_New_plz_help [Im_New_plz_@2D9871.5B923B.ED2406.B9E3D5] has joined #code
11:00 Kindamoody is now known as Kindamoody|lunch
11:01 Im_New_plz_help [Im_New_plz_@2D9871.5B923B.ED2406.B9E3D5] has left #code []
12:21
<&McMartin>
Oh hey, look at that
12:21 * McMartin gets in-JAR resource bundling to work trivially cross-platform, in a SLAP IN THE FACE to about fifty stack-overflow articles.
12:28 Kindamoody|lunch is now known as Kindamoody
12:49 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
13:15
< Moltare>
I love a good slap in the face
13:15
< Moltare>
It is, after all, my bread and butter to deliver them
13:42
< Rhamphoryncus>
I feel like I just missed a good conversation :P
13:45
< AnnoDomini>
Slapping? Perhaps related: http://nigoro.jp/game/rosecamellia/rosecamellia.php
13:55
< Rhamphoryncus>
http://nigoro.jp/game/rosecamellia/img/howto4.jpg
15:14
< Moltare>
Ram: OH, it's just that I'm in MMO development, so everything I ever produce is a slap in someone's face.
15:50 iospacedout is now known as iospace
16:27
< Rhamphoryncus>
ahh heh
16:42
< iospace>
http://fatpita.net/?i=15813
16:42 * AnnoDomini lols.
16:42
< gnolam>
:D
17:03 Kindamoody is now known as Kindamoody|out
17:05
<~Vornicus>
McM: woot
17:30 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
17:31 mode/#code [+o Vash] by ChanServ
18:21 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
18:22 Moltare [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
18:37 rms is now known as Vasi
18:46
<@Alek>
wuh.
18:46
<@Alek>
Mol is developing a MMO?
18:46
<@Alek>
cool. which one? >_>
18:46
< Moltare>
Runescape :P
18:50
<@Alek>
LOL
18:50 * jerith has been trying not to go all fanboy in India.
18:51
<&jerith>
The Wikimedia guy I'm working with here was a Sierra Games developer for about a decade.
18:51
<&jerith>
He joined about the time of Kings Quest IV and left when they fell apart.
18:59 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
19:37 Kindamoody|out is now known as Kindamoody
19:50 Kindamoody is now known as Kindamoody[zZz]
19:52 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
21:53
<&McMartin>
That's...not a very long timespan >_>
21:53
<&McMartin>
Some might call it negative
21:53
<&McMartin>
When is the point being identified as "it all falling apart"?
21:58 Vasi is now known as rms
23:26 Derakon[AFK] is now known as Derakon
--- Log closed Mon Aug 20 00:00:44 2012
code logs -> 2012 -> Sun, 19 Aug 2012< code.20120818.log - code.20120820.log >

[ Latest log file ]