code logs -> 2012 -> Mon, 27 Aug 2012< code.20120826.log - code.20120828.log >
--- Log opened Mon Aug 27 00:00:30 2012
00:12 Orthia [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds]
00:14 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:17 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
00:17 mode/#code [+o PinkFreud] by ChanServ
00:50 Orthia [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code
01:28
<&McMartin>
gnolam: Excellent. I can't catch it cheating.
01:28
<&McMartin>
(You can do similar tricks in RL with tracing mobius strips)
01:39 himi-cat [fow035@D741F1.243F35.CADC30.81D435] has joined #code
02:15 * McMartin gets enough of Swing-Hex-Inverter working that he thinks shifting over to targeting Android is now sensible.
02:22
<&McMartin>
Should step 1 be the design document, or the UI mockup~
02:41
<&McMartin>
Answer: The design document, which includes UI mockups.
02:41 Kindamoody[zZz] is now known as Kindamoody
02:54 Tarinaky [tarinaky@Nightstar-dd7e4a05.net] has joined #code
03:39
<&McMartin>
Ha
03:39
<&McMartin>
[inform] vaporware says, "But I have more severity levels, so that's now a notice instead of a warning. Also, in what may be a first for compilers, one of the levels is 'protip'."
03:39
<&McMartin>
[inform] zarf says, "boo hiss"
03:39
<&McMartin>
[inform] vaporware | warning RLR4502: '=' used in a condition context, did you mean '=='?
03:39
<&McMartin>
[inform] vaporware | protip RLR4503: explicitly compare the result to 0 if that's what you want to do
03:44 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
04:12 PinkFreud [WhyNot@NetworkAdministrator.Nightstar.Net] has joined #code
04:12 mode/#code [+o PinkFreud] by ChanServ
04:56 iospace is now known as iospacedout
06:01 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:28 Kindamoody is now known as Kindamoody|out
06:38 Derakon is now known as Derakon[AFK]
07:31
< froztbyte>
nice
08:22 Attilla_ [Obsolete@Nightstar-8e1acbff.as43234.net] has quit [Ping timeout: 121 seconds]
08:52 himi-cat [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
10:23
<&McMartin>
Hooray
10:23
<&McMartin>
https://hkn.eecs.berkeley.edu/~mcmartin/HexDesign.html
10:23
<&McMartin>
Anyone who's actually messed with Android - if I'm missing something obvious here do let me know =D
10:26 Kindamoody|out is now known as Kindamoody
10:28 You're now known as TheWatcher
10:30 * jerith takes a look.
10:31
<&jerith>
McMartin: "vversion" in the summary. :-P
10:35
<&jerith>
McMartin: Saving board state every time a move is made is probably easier than explicitly handling it in pause().
10:35
<&jerith>
This also lets you recover from crashes nicely.
10:36
< Moltare>
I note in the second part of the Activities section that you can tell an app in its manifest to fix itself to a specific orientation
10:37
< Moltare>
which has the handy side-effect of not pausing and resuming the app whenever your handset changes orientation
10:37
<&jerith>
I prefer autoswitching orientation, but with the option to lock a specific orientation in the settings.
10:37
<&McMartin>
jerith: Can you do that?
10:38
<&McMartin>
(Save every time a move is made)
10:38
<&McMartin>
The thing is, if I want to save the AI's search state, that clearly needs to happen in, well, stop(), I guess.
10:38
<&McMartin>
Assuming stop() even exists in API level 7, which I'm not totally sure it does.
10:38
<&jerith>
McMartin: Sure. Just put the save code in the ends of make_move() or whatever instead of pause().
10:39
<&jerith>
Bear in mind that my experience with this stuff is strictly pre-Gingerbread, but you want to support that anyway.
10:39
<&McMartin>
OK, that sounds like a good plan, then.
10:39
<&McMartin>
Yeah, Gingerbread is in fact the level I intend to support in the first place, since it's what my personal phone runs. =P
10:39
<&jerith>
There may be performance implications if you're storing a lot of state, but HI's state seems to be small.
10:39
<&McMartin>
It's 121 integers.
10:40
< Moltare>
Oh god, I've been working on Runescape too long
10:40
< Moltare>
My initial reaction was "Fuck me, that's /huge/"
10:41
<&jerith>
I'm reasonably sure that stop() or whatever isn't guaranteed to run if the app is killed while paused. Or something.
10:41
<&McMartin>
(I'm targeting Froyo programmatically both because there's still nontrivial numbers of Froyo devices out there, and because nothing G-specific does anything I care about
10:41
< Moltare>
Yeah, you can guarantee that pause() runs but not stop()
10:42
< Moltare>
You can tell if a pause() is due to a quit request with isFinishing
10:42
<&jerith>
Moltare:
10:43
<&jerith>
Moltare: You can't tell if there's going to be a quit-without-stop() later, though.
10:43
<&McMartin>
OK, I don't see it here now
10:43
< Moltare>
True
10:43
<&McMartin>
But I swear I ran into something in the tutorials that said that starting at a certain API level you got a guarantee of onStop().
10:43
<&McMartin>
That level was, however, past Gingerbread.
10:43
<&jerith>
Yeah.
10:44
<&jerith>
If you have any network connections, you probably want those to happen in a Service rather than an Activity.
10:45
<&McMartin>
Netplay is not in the cards, at least not yet.
10:45
<&McMartin>
I'm still not totally sure how workerthreads fit into this.
10:45
<&jerith>
It would be Good Practice to put all the gameplay stuff in a Service and only do UI in the Activity, except this has nontrivial performance implications.
10:45
<&jerith>
Lots of packing and unpacking in the IPC.
10:46
<&jerith>
I don't recall any Android-specific worker thread stuff.
10:47
<&McMartin>
"Do I kill them in pause() or in stop()"
10:47
<&jerith>
So you get all the power and flexibility of Java threads.
10:47
< Moltare>
I tried to put an ntp request in my UI thread when I first tried Android
10:47
< Moltare>
that was a poor move
10:47
<&McMartin>
Yeah
10:47
<&jerith>
And all the gnashing of teeth that implies.
10:48
<&jerith>
Also, avoid allocating memory at runtime if possible.
10:48
<&jerith>
GC runs can produce noticeable stutter.
10:49
<&McMartin>
Mmm
10:49
<&McMartin>
That's for a refinement pass
10:51
<&McMartin>
A number of bits of the AI code use ArrayLists.
10:54
<&jerith>
It shouldn't /really/ be a problem here.
10:55
<&jerith>
But if you know how big they're likely to grow you can statically allocate one and reuse it or something.
10:55
<&jerith>
Definitely at optimisation-time, though.
10:56
<&jerith>
Write clean code, then mess it up in the interests of performance.
10:56
<&McMartin>
This is particularly the case given that the program only does real-time operations while animating moves.
10:56
<&jerith>
Yeah, but GC can kick in whenever it likes.
10:57
<&McMartin>
Right, but this isn't Canabalt, so one move looking jerky isn't the kind of issue it'd be for an action game.
10:58
<&McMartin>
Oh, actually
10:58
<&McMartin>
" Allocate objects during initialization, or between animations. Never make an allocation while an animation is running."
10:58
<&McMartin>
Done and done
11:00
<&McMartin>
Anyway, thanks.
11:07
<&jerith>
:-)
11:11 Attilla [Obsolete@Nightstar-8e1acbff.as43234.net] has joined #code
11:14 Attilla [Obsolete@Nightstar-8e1acbff.as43234.net] has quit [[NS] Quit: ]
11:15 Attilla [Obsolete@Nightstar-8e1acbff.as43234.net] has joined #code
11:27 Kindamoody is now known as Kindamoody|out
12:01 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
12:41 iospacedout is now known as iospace
13:47 himi-cat [fow035@Nightstar-5d05bada.internode.on.net] has quit [Connection closed]
13:48 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
13:48 mode/#code [+o himi] by ChanServ
14:59 celticminstrel [celticminst@Nightstar-05d23b97.cable.rogers.com] has joined #code
16:25 Kindamoody|out is now known as Kindamoody
17:46 Vasi is now known as rms
18:54 jeroid [jerith@687AAB.1BBF0C.0D2839.6E6D48] has joined #code
18:58 * McMartin works out he actually needs 123 ints and three booleans. Probably four to make the loading logic simpler.
19:03
<~Vornicus>
123 differently named ints?
19:04
< AnnoDomini>
Why not 127 ints, all named using one letter only? :P
19:05 * Vornicus , um, patpats anno
19:05
<&McMartin>
Vornicus: No, there's an 11x11 array and then two enumerations and then two booleans per player, of which one is always provably irrelevant
19:20 Kindamoody is now known as Kindamoody[zZz]
19:21 Attilla [Obsolete@Nightstar-8e1acbff.as43234.net] has quit [Ping timeout: 121 seconds]
19:22 Attilla [Obsolete@Nightstar-8e1acbff.as43234.net] has joined #code
20:23
<&ToxicFrog>
eeeeeeeeeeeee
20:23
<@Tamber>
aaaaaaaaaaaaa?
20:24
<~Vornicus>
ooooooooooooooooo
20:25
<&ToxicFrog>
Just got a phone call from my recruiter at Google
20:25
<~Vornicus>
iiiiiiiiiiiiiiii
20:25
<&ToxicFrog>
Apologizing for the fact that it might be as long as two weeks before I hear anything back
20:25
<&ToxicFrog>
I replied that from what my friends at Google had said I was expecting to wait a month or more, so this is actually great news
20:26
< jeroid>
TF: Do you want to work for Google?
20:26
<&ToxicFrog>
She replied "I like to stay on top of the recruiting process, especially for recruitees who are doing well"
20:26
<&ToxicFrog>
jeroid: yes.
20:26
< jeroid>
Ah, cool.
20:26
< jeroid>
Which office?
20:27
< jeroid>
Also, dev or SRE?
20:27
<&ToxicFrog>
CA-WAT, the Kitchener/Waterloo office (ie, the one right next to me), and dev.
20:30
< jeroid>
Ah, nice.
20:31
< jeroid>
I didn't know they had an office in Canadia.
20:31
<&ToxicFrog>
They have several, actually, but most of them are sales/marketing
20:32
< jeroid>
They have sales offices in ZA.
20:33
< jeroid>
But no tech.
20:35
<&ToxicFrog>
Toronto is sales, Montreal is sales and development, Kitchener is pure development, and I have no idea what Ottawa does.
20:39 jeroid [jerith@687AAB.1BBF0C.0D2839.6E6D48] has quit [[NS] Quit: Bye]
22:21 RichyB [richardb@Nightstar-428e5766.bb.sky.com] has joined #code
22:21 RichyB [richardb@Nightstar-428e5766.bb.sky.com] has quit [Client closed the connection]
22:21 RichyB [richardb@Nightstar-428e5766.bb.sky.com] has joined #code
23:56 Adolf_Hitler [ForEverAuti@4CA975.06D306.F95019.3FD4B0] has joined #code
23:56
< Adolf_Hitler>
:)
23:56
<@Tamber>
o.?
--- Log closed Tue Aug 28 00:00:45 2012
code logs -> 2012 -> Mon, 27 Aug 2012< code.20120826.log - code.20120828.log >

[ Latest log file ]