code logs -> 2008 -> Thu, 13 Mar 2008< code.20080312.log - code.20080314.log >
--- Log opened Thu Mar 13 00:00:44 2008
00:06 You're now known as TheWatcher[T-2]
00:09 You're now known as TheWatcher[zZzZ]
00:52
<@ToxicFrog>
Design question.
00:52 Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has quit [Connection reset by peer]
00:52
< Vornicus>
Design answer.
00:52
<@ToxicFrog>
String.split("abc def", 2)
00:52
<@ToxicFrog>
Does this return:
00:52
<@ToxicFrog>
"abc","def" (at most 2 splits are performed)
00:53
<@ToxicFrog>
"abc","def","" (exactly 2, results padded with empty string)
00:53
< Vornicus>
The former.
00:54
<@ToxicFrog>
Ok. This is consistent with current behaviour, which is why my argument parser is blowing up~
01:04 coolthings [coolthings@Nightstar-22360.kc.res.rr.com] has joined #Code
01:04 coolthings [coolthings@Nightstar-22360.kc.res.rr.com] has left #Code []
01:42 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Quit: Z?]
02:43 C_tiger is now known as C_tigerX_X
02:47
<@ToxicFrog>
Hmm.
02:48
<@ToxicFrog>
This would be easier if string.split(nil) returned nil rather than throwing an error.
02:48
<@ToxicFrog>
But that's cheating.
02:55
<@ToxicFrog>
Victoly!
02:57
< Vornicus>
With Victoly Sauce!
02:59
<@ToxicFrog>
No sauce yet.
02:59
<@ToxicFrog>
The error messages list gives are kind of cryptic if you aren't a dev.
03:00
<@ToxicFrog>
And it considers something like "list id > 5 title" as list(filter = "id", sortby = "> 5 title")
03:00
<@ToxicFrog>
But I can't really fix that without including a subset of the lua parser, and the tty interface is only for debugging anyways, so.
03:03
<@ToxicFrog>
Ok. tty.list is done.
03:04
<@ToxicFrog>
Next is tty.edit, as list has revealed to me problems in a bunch of my records~
03:04
<@ToxicFrog>
Damn I love interpreted languages.
03:08
<@ToxicFrog>
tty.edit is 12 lines, 9 of which are error checks; the rest are just: local f = loadstring(editor); setfenv(f, record); f()
03:20
<@ToxicFrog>
Ok. list info save edit tags have been implemented.
03:20
<@ToxicFrog>
That leaves add and remove.
03:20
<@ToxicFrog>
Followed by the real UI.
03:45 ASCIISkull [~none@Nightstar-7066.dyn.optonline.net] has left #code []
04:07 Kazriko [~kaz@Nightstar-26352.gdj-co.client.bresnan.net] has joined #code
04:28 C_tigerX_X is now known as C_tiger
04:40 SouthernMyst [~4b903c59@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
04:40 mode/#code [+o SouthernMyst] by ChanServ
04:40 * SouthernMyst waves
04:43 * Vornicus cookies Myst
04:43 * SouthernMyst nroms cookie, hugs Vorn
04:43 * Vornicus hugs Myst
04:43
<@SouthernMyst>
I'll never understand why the toString always gets to me.
04:45
< Vornicus>
toString fortunately doesn't have any actual contract to fulfill.
04:45
< Vornicus>
I mean, yes, it has to spew a string, but it doesn't have to make it special at all.
04:47 GeekSoldier|bed is now known as GeekSoldier|work
04:48
<@McMartin>
The Dungeon Master would like to remind you that the Gelatinous Companion Cube cannot speak.
04:58
< C_tiger>
it does make a squick/slurp sound.
04:58
< C_tiger>
but only as it's consuming you.
05:00
<@McMartin>
"Shlorb".
05:00
< C_tiger>
that's the word I was looking for.
05:01
<@McMartin>
Though by long (by which I mean one BtAF strip) tradition, Gelatinous Cubes chant CUBE! at every opportunity.
05:02
<@McMartin>
It also made a SQUIRP sound upon landing on the floor.
05:02
<@McMartin>
http://www.angryflower.com/everyb.gif
05:08
< Vornicus>
CUBE_
05:11 AnnoDomini [AnnoDomini@83.21.45.ns-4389] has joined #Code
05:11 mode/#code [+o AnnoDomini] by ChanServ
05:51 SouthernMyst [~4b903c59@Nightstar-29731.dsl.in-addr.zen.co.uk] has quit [Quit: CGI:IRC (Ping timeout)]
06:21 Thaqui [~Thaqui@Nightstar-123.jetstream.xtra.co.nz] has joined #code
06:21 mode/#code [+o Thaqui] by ChanServ
06:52 Vornicus is now known as Vornicus-Latens
07:54 JeffL [Kaline@Nightstar-12251.dsl.sndg02.pacbell.net] has joined #code
07:55
< JeffL>
Anyone on?
08:00 GeekSoldier|work [~Rob@Nightstar-9620.dip.t-dialin.net] has quit [Ping Timeout]
08:14
<@AnnoDomini>
No.
08:19
< JeffL>
Hey, question to ask you.
08:19
< JeffL>
My Linux laptop is out of commission, which means that I'll have to work on... ugh... Windows. Any advice? (Language: Java.)
08:20
<@AnnoDomini>
Well, I have worked with Java on Windows.
08:20
<@AnnoDomini>
What do you need?
08:21
< JeffL>
Advice on what text editor/compiler to use. Or if I should just install Cygwin on my gaming computer. (I'm trying to make this as uncluttered as possible, seeing as how I've owned this computer for just 10 weeks and I've already had my first bluescreen)
08:22
<@AnnoDomini>
Hm. Okay.
08:22
<@AnnoDomini>
Personally, I make use of Notepad2 and batch files.
08:23
<@AnnoDomini>
However, Netbeans isn't so bad as an IDE, if you've got a goodly amount of RAM to feed it.
08:23
<@AnnoDomini>
Eclipse is allegedly better, but I've had bad experience with it, lots of inexplicable crashes.
08:24
<@Reiver>
Eclipse is good, so long as you Do Things Eclipses Way.
08:25
<@AnnoDomini>
If you want a more freeform IDE and at the same time don't like doing things with notepadlike applications, I suggest RealJ, if you manage to find a copy somewhere.
08:26
< JeffL>
I've had trouble with Exlipse.
08:27
< JeffL>
It's a huge resource-sucker.
08:28
< JeffL>
(Admittedly, it was on an old machine in the labs)
08:29 You're now known as TheWatcher
08:53
< JeffL>
Let's say I'm writing a little test game, nothing terribly graphics intensive, sprites only. Would Swing be an okay graphics set?
08:54
<@AnnoDomini>
A buddy of mine wrote a Snake game in Swing, I think.
08:56
< JeffL>
This is a bit more "roguelike with some real-time elements".
08:58
<@AnnoDomini>
Shouldn't be much a problem. I've never worked with actual graphics, using JLabels with HTML-formatted ASCII art to fill that role, but I don't see any problems.
09:01
< JeffL>
If I ever get this written, it will be... interesting to play.
09:02
<@Reiver>
Biggest reccomendation with Swing is for the love of god, either plan the structure meticulously, or don't touch the raw code ever
09:02
<@Reiver>
One or the other is fine. Just don't try to touch the middleground. >.<
09:04
< JeffL>
We used Swing for an IRC Client as a class project this quarter.
09:04
< JeffL>
By the end of the quarter, we were praying during the weekly demos "don't let the client try to resize it, just don't let the client try to resize it this week..."
09:05
<@Reiver>
In that case, I daresay you are Understanding of my statement. <g>
09:06 * AnnoDomini usually goes with NO RESIZING, BITCH.
09:07
< JeffL>
What's the lowest "standard" resolution again? 640x...
09:08
<@EvilDarkLord>
640x480?
09:09
< JeffL>
Yes. Thank you.
09:11
<@AnnoDomini>
JeffL: The ratio is 1:3/4.
09:12
< JeffL>
Thank you. Is there a standard number by which the pixels increment?
09:13 * AnnoDomini doesn't THINK so.
09:15
< JeffL>
Do either of you have suggestions for Swing replacements?
09:16
<@Reiver>
Generally one just uses a GUI generator which does the Swing automagically.
09:17
< JeffL>
What kind of GUI generators are there? Or are you talking about coding one yourself?
09:18 * AnnoDomini hates that approach. Likes to know every damn bit of the code was generated by him actually typing it in.
09:19
<@Reiver>
Anno: And how much do you use Swing? ¬¬
09:20
< JeffL>
Well, good night.
09:20 * JeffL will work more in the morning.
09:21
<@AnnoDomini>
Reiver: I prefer to use the J<whatever> components instead of just <whatever>.
09:22
<@Reiver>
Right.
09:23
<@AnnoDomini>
((For one, JLabel supports HTML, and Label does not. :p))
09:25 * JeffL is using J<component>s
09:46 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
09:47 mode/#code [+o gnolam] by ChanServ
10:17 Thaqui [~Thaqui@Nightstar-123.jetstream.xtra.co.nz] has left #code [Leaving]
10:53 * TheWatcher STABS XML::Simple
10:53
<@TheWatcher>
This makes no goddamn sense!
10:54
<@TheWatcher>
The data it is saving out on the first run of the program is identical to the data it saves out on the secondm except that it gets the output right the first time and completely wrong the second
10:54
<@TheWatcher>
Hm
10:58 * TheWatcher wonders if it's some kind of bizzare utf8 encoding issue
11:05
<@gnolam>
Cosmic rays.
11:07
<@AnnoDomini>
Sunspots.
11:07
<@TheWatcher>
Is mercury still retrograde?
11:13
<@TheWatcher>
... aha, that's where the problem is. If I have <livejournal><usermaps><usermap id="123" user="foo"/></usermaps></livejournal> instead of <livejournal><usermaps><usermap id="123" user="foo"/><usermap id="456" user="bar"/></usermaps></livejournal> then XML::SImple will just blithely ignore me telling it to make it {'usermaps' => {'usermap' => {'123' => {'user' => 'foo', 'id' => '123'}}}} and will instead just do {'usermaps' =>
11:13
<@TheWatcher>
{'usermap' => {'user' => 'foo', 'id' => '123'}}}. This, as you might imagine, Screws Things Up.
12:20 AnnoDomini [AnnoDomini@83.21.45.ns-4389] has quit [Ping Timeout]
12:20 AnnoDomini [AnnoDomini@83.21.0.ns-25791] has joined #Code
12:20 mode/#code [+o AnnoDomini] by ChanServ
15:06
<@jerith>
I require wisdom!
15:06
<@jerith>
Also, I'm thinking aloud a bit here.
15:06
<@jerith>
I have a job that runs periodically. It is stateless, but it interacts with two stateful services that are otherwise unaware of each other.
15:07
<@jerith>
The problem is this: It gets a list of things to do from one service (call it Fred) and then does them using the other (call it George) and notifies Fred when it is done.
15:07
<@jerith>
This is fine, as long as my job (call it Harry) only runs in one place.
15:08
<@jerith>
Except then if the box goes down, Harry's job stops happening and the world ends.
15:09
<@jerith>
(Not really, but it would be a Bad Thing.)
15:11
<@jerith>
The problem is to make Harry run on multiple machines without race conditions.
15:11 Brother_Willibald [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
15:11 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
15:13 Brother_Willibald is now known as gnolam
15:17 Attilla [~The.Attil@194.72.70.ns-11849] has quit [Ping Timeout]
15:25
<@ToxicFrog>
Well, Fred is stateful, yes?
15:25
<@ToxicFrog>
So as soon as it gets a request it locks.
15:25
<@ToxicFrog>
Until the request is marked completed, or some timeout (12h?) expires, it responds to further requests with "job already in progress"
15:37
<@jerith>
Locking Fred is messy.
15:37
<@jerith>
I was hoping to think of something that would put most of the work in Harry.
15:39 Attilla [~The.Attil@194.72.70.ns-11849] has joined #code
15:41
<@ToxicFrog>
Hmm.
15:43
<@ToxicFrog>
Ok, have the Harrys know how to ask one another, and assign each of them a priority. Before running, a Harry asks all higher priority ones whether it's safe. They respond either "I'm handling it, try again next time", "I'm busy, try again in a few minutes" or "go ahead". Lack of response is considered "go ahead".
15:45 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has quit [Ping Timeout]
15:49 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
15:49 mode/#code [+o gnolam] by ChanServ
15:58
< Kazriko>
jerith, any kind of unique identifier that would only apply to one harry process? You could write that value to fred claiming it, then read it a little bit later to verify that it hasn't changed from what you wrote. a timed lock of some sort of fred where once you write that variable it rejects future writes for 2-3 seconds could make it a little more robust. Harries that don't manage to properly claim it this way just either die or
15:58
< Kazriko>
watch/wait. harry can keep the status updated with a heartbeat timestamp to let the others know it's still alive and they shouldn't take over, perhaps.
16:02
<@jerith>
Hmm.
16:02
<@jerith>
That means adding new calls to Fred.
16:06
< Vornicus-Latens>
But, what about Ron and Ginny?
16:06
<@ToxicFrog>
You could implement, say, a simple lock server and use that instead.
16:06
<@ToxicFrog>
I still like my idea, though.
16:11
<@jerith>
Vornicus-Latens: Ron and Ginny (also Neville and Hermione) have other jobs unrelated to this interaction.
16:11
< Vornicus-Latens>
...
16:12 * Vornicus-Latens was kidding, actually, thought you had named them by coincidence.
16:12 Vornicus-Latens is now known as Vornicus
16:12
<@jerith>
ToxicFrog: The major problem there is that Harry is a cron job. He'd have to be a persistent process for that.
16:13
<@jerith>
Vorn: It was no coincidence, although I only named Harry after Fred and George (chosen randomly) gave me the idea.
16:13
< Vornicus>
How often does harry run?
16:13
<@jerith>
I'm not really sure yet.
16:14
< Vornicus>
If it's not too often, I'd say fuck the multiple instances and just use anacron.
16:14
<@jerith>
It's unitary minutes.
16:14
< Vornicus>
So it's at least every ten minutes or so?
16:14
<@jerith>
Somewhere between 1 and 10, probably. We still need to tune it a bit.
16:15
< Vornicus>
Okay, no anacron then
16:15
<@ToxicFrog>
Oh.
16:15
<@jerith>
There's no /real/ problem with making Harry a long-running process, except it means we need a nanny and whatnot.
16:16
< Vornicus>
Obviously that would be Molly.
16:17
<@jerith>
Of course.
16:22 Pi [~sysop@ServicesAdmin.Nightstar.Net] has quit [Ping Timeout]
16:50 GeekSoldier|work [~Rob@Nightstar-7866.dip.t-dialin.net] has joined #code
16:52 GeekSoldier|work is now known as GeekSoldier
17:30 You're now known as TheWatcher[afk]
18:14 Pi-2 [~sysop@76.22.79.ns-4584] has joined #code
18:14 Pi-2 is now known as Pi
18:14 Pi is now known as NSGuest-5530
18:14 NSGuest-5530 is now known as Pi-1
18:16 Pi-1 is now known as Pi
18:40 You're now known as TheWatcher
18:49 Luis [~lgm@Nightstar-29529.valparaiso.ecweb.cl] has joined #code
19:54 GeekSoldier is now known as GeekSoldier|bed
21:07 Chalcedon [~Chalcedon@Nightstar-9527.ue.woosh.co.nz] has joined #code
21:07 mode/#code [+o Chalcedon] by ChanServ
21:48 Luis is now known as Luis|gone
22:01 AnnoDomini [AnnoDomini@83.21.0.ns-25791] has quit [Quit: When the end is near, pants on the west rune, and step on the east.]
23:42 You're now known as TheWatcher[T-2]
23:47 You're now known as TheWatcher[zZzZ]
23:55
< JeffL>
If I create a private class inside an existing class in Java, is that class accessible to subclasses of the original class?
--- Log closed Fri Mar 14 00:00:44 2008
code logs -> 2008 -> Thu, 13 Mar 2008< code.20080312.log - code.20080314.log >