code logs -> 2009 -> Tue, 09 Jun 2009< code.20090608.log - code.20090610.log >
--- Log opened Tue Jun 09 00:00:06 2009
--- Day changed Tue Jun 09 2009
00:00
<@McMartin>
Yeah, "Unicode" is too generic
00:00
<@McMartin>
There's at least four standard forms, of which UTF-8 is the one you want.
00:00
<@UndeadAnno>
I do?
00:00
< ToxicFrog>
Yes.
00:01
< ToxicFrog>
UTF-8 is compact and also equivalent to ASCII when you stay within that character set.
00:02
<@UndeadAnno>
Mumble. Putting the meta tag in the JLabel that displays the question doesn't seem to work.
00:02
<@UndeadAnno>
In fact, it stopped working altogether, there's nothing displayed.
00:04 * Derakon eyes the Doxygen documentation.
00:04
<@UndeadAnno>
Is it generated with Doxygen?
00:04
<@Derakon>
Er, I meant the documentation for my project, made with Doxygen.
00:05
<@Derakon>
It's interpreting the line "regionOverlayResolutionMultiplier = .1" as "int map.regionOverlayResolutionMultiplier = 1"
00:30
<@UndeadAnno>
Mumble. Apparently, I need to use InputStreamReader to do this.
00:30
<@UndeadAnno>
Unfortunately, that thing doesn't have a readLine function.
00:30
<@McMartin>
You can wrap it in something that does, I believe.
00:30
<@McMartin>
I want to say "BufferedReader"
00:30
<@McMartin>
But it's been awhile.
00:31
<@UndeadAnno>
But, uh, BufferedReader and InputStreamReader extend Reader.
00:31
<@UndeadAnno>
I'm not sure if that's an issue.
00:31
<@McMartin>
Readers are what you want here.
00:31
<@McMartin>
InputStreams operate on bytes.
00:31
<@McMartin>
Readers operate on characters, which are what you want.
00:32
<@McMartin>
That is, the Readers actually *do* the conversion.
00:32
<@McMartin>
If you're trying to get it out of a file, you should go new BufferedReader (new FileReader (fname)), not new BufferedReader(new InputStreamReader (new FileInputStream (fname)))
00:32
<@McMartin>
The latter is just kind of redundant
00:33
<@UndeadAnno>
What I want is the ability to set the charset, which is an option in InputStreamReader and the ability to read lines, which is an option of Buffered Reader.
00:34 * McMartin looks at FileReader
00:34
<@McMartin>
Quite so.
00:34
<@McMartin>
So, yeah, the latter is what you want, with the extra options.
00:35
<@UndeadAnno>
But I'm using BufferedReader now. How do I set the charset with it?
00:35
<@McMartin>
You don't have to; by the time it gets a chance to do anything, it's already been done.
00:35
<@McMartin>
It's a wrapper, if you will.
00:36
<@McMartin>
Buffered Readers take a reader of some kind and make it have line buffering.
00:36
<@McMartin>
InputStream readers take an input stream (of bytes) and apply a character encoding to it.
00:36
<@McMartin>
So when you read a line from the buffered reader, it asks its underlying reader for the characters.
00:36
<@McMartin>
That will be your InputStreamReader, which is applying the encoding the bytes it gets. It could be getting them from anywhere.
00:37
<@UndeadAnno>
So. You are telling me that I should wrap an InputStream with an InputStreamReader and then wrap that in BufferedReader.
00:37
<@McMartin>
But in this case, it's getting them from a FileInputStream, which is getting its bytes from the disk.
00:37
<@McMartin>
A FileInputStream. Yes.
00:37
<@Derakon>
There, now just the Player remains to be documented. Phew.
00:37
<@McMartin>
I was under the misapprehension that FileReader let you set encodings too; it does not appear to.
00:38
<@Derakon>
And the Player's codebase is a big mishmash of stuff that should be part of a larger "game object" class, stuff that is specific to terrestrial creatures, and stuff that is specific to the player.
00:38
<@McMartin>
Basically, you've got an onion.
00:38
<@McMartin>
[BR [ FR [ FIS ] FR ] BR ]
00:38
<@McMartin>
Er. ISR, not FR.
00:38
<@McMartin>
FileReader says "The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream."
00:39
<@UndeadAnno>
YES!
00:39
<@UndeadAnno>
It works! Thanks!
00:39
<@McMartin>
This whole "wrap a bunch of objects around some core, each adding a specific effect" thing is a very Java-y thing to do and you'll want to get comfortable with it.
00:41
<@UndeadAnno>
BTW, what do I do with http://pastie.org/505192 ?
00:41
<@UndeadAnno>
I don't understand what it's telling me.
00:41
<@UndeadAnno>
Should I cast or something?
00:42
<@McMartin>
I believe you want a new ArrayList<QuestionAnswer>()
00:43 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
00:43
<@UndeadAnno>
That did it. Thanks.
00:43
<@McMartin>
Type<OneType> and Type<SomeOtherType> are treated by the compiler as different types.
00:43
<@McMartin>
And Type alone ("the erased type") is different from all of them, even though it's equivalent to Type<Object>
00:44
<@McMartin>
The rules for when you don't need to do casts between them, or when casts are legal when you do them, are pretty complicated and you should get that from a Generics tutorial, not from us.
00:44
<@McMartin>
(Well, other than the rule that you don't need to do the casts when the casts are the same)
00:48
<@UndeadAnno>
http://2t.no-ip.com/~abudhabi/pub/russian/jquiz.rar <- This version actually works! :D
00:48
<@UndeadAnno>
But now I'm going to bed.
00:48
<@Derakon>
Congrats, and good night.
00:48 UndeadAnno [AnnoDomini@Nightstar-28003.neoplus.adsl.tpnet.pl] has quit [Quit: I am Magellan-R-MGE. I see your group is missing a Hygiene officer.]
00:52
< SmithKurosaki>
night Derakon
00:52
<@Derakon>
Er...I was saying good night to Anno.
00:52
<@Derakon>
I myself am not going anywhere.
00:53
< SmithKurosaki>
ahh
01:00 * gnolam ponders cleaning up his OBJ loader and posting it to his computer graphics course's forum, to save next year's students from his professor's awful code.
01:01
<@Derakon>
Hmm. My code has 10 to-do notes in it.
01:01
<@Derakon>
Also, now that it's mostly documented, it's 20% comments, as opposed to 11% earlier.
01:05 Derakon is now known as Derakon[DDR]
01:40 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has joined #code
01:40 mode/#code [+o Consul] by ChanServ
02:10 Derakon[DDR] is now known as Derakon
02:29 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has quit [Quit: Z?]
02:58
< ToxicFrog>
Yay, array resync completed
02:59
< ToxicFrog>
/dev/md0 2.1T 1.4T 586G 71% /
03:00
<@Vornicus-Latens>
that's, what, total, used, available?
03:00 Vornicus-Latens is now known as Vornicus
03:09
<@Consul>
Okay, huge t-storm outside. See ya later!
03:09 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
03:45 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has joined #code
03:45 mode/#code [+o Consul] by ChanServ
03:45
<@Consul>
Well, that blew over pretty quick.
03:52
<@Consul>
Okay, here's a question for you. If I wanted to develop with Java, on the Windows platform, what should I get, other than my head examined?
03:52
<@Consul>
I was just reading up on Google's Web Toolkit and Google Apps, and got a few ideas.
03:52
<@Vornicus>
Eclipse.
03:53
<@Consul>
And presumably the JDK, right?
03:53
<@Consul>
I have the JRE now.
03:54
<@Vornicus>
Eclipse should drag in all its requirements during the install process, which includes the jdk.
03:55
<@Consul>
Even on Windows?
03:55
<@Vornicus>
Should.
03:56
<@Consul>
Oh, I see. It's like an all-in-one package.
03:56
<@Consul>
Do I want the one for straight Java or Java EE?
03:56
<@Consul>
Whatever that is.,
03:56
<@Vornicus>
Straight Java should do; EE has a bunch of stuff but I'm not sure of their use.
03:57
<@Consul>
Thanks!
04:06 Vornicus [~vorn@Admin.Nightstar.Net] has quit [Quit: Leaving]
04:14 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
04:14 mode/#code [+o Vornicus] by ChanServ
06:04 Syloqs-AFH [Syloq@ServicesAdmin.Nightstar.Net] has quit [Connection reset by peer]
07:33 * Vornicus has just been asked to write a short tutorial on Pygame.
07:33
<@Derakon>
Is there something wrong with the existing tutorials?
07:35
<@Vornicus>
They're out of date.
07:35
<@Derakon>
I don't recall having difficulty using them...
07:39
<@Derakon>
In any event, though, you make good tutorials. The Internet will not be harmed by your actions. :)
07:51 Derakon is now known as Derakon[AFK]
08:41 UndeadAnno [AnnoDomini@Nightstar-28003.neoplus.adsl.tpnet.pl] has joined #Code
08:41 mode/#code [+o UndeadAnno] by ChanServ
09:01 You're now known as TheWatcher
09:01 gnolam [lenin@Nightstar-1382.A163.priv.bahnhof.se] has joined #Code
09:01 mode/#code [+o gnolam] by ChanServ
09:42 Vornicus is now known as Vornicus-Latens
10:50 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has quit [Quit: Rhamphoryncus]
11:04 UndeadAnno [AnnoDomini@Nightstar-28003.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
11:12 UndeadAnno [AnnoDomini@Nightstar-29141.neoplus.adsl.tpnet.pl] has joined #Code
11:12 mode/#code [+o UndeadAnno] by ChanServ
12:03 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has joined #code
12:03 mode/#code [+o Attilla] by ChanServ
12:16 Attilla [~The.Attil@Nightstar-9147.cdif.cable.ntl.com] has quit [Ping Timeout]
13:56 * gnolam can has job!
13:58
<@UndeadAnno>
Not much salary, free coffee?
13:59
<@gnolam>
That one.
13:59
<@TheWatcher>
job > no job.
13:59
<@TheWatcher>
So, grats!
13:59
<@gnolam>
But I even got a pretty decent salary for someone without his degree yet.
14:00
<@gnolam>
Also, I can even work mostly from home (and keep my own hours).
14:00
<@gnolam>
So in conclusion: Best. Summer job. Ever.
14:10
<@gnolam>
Looks like we're going to try to add beta radiation in this iteration, so I might get some new toys as well. The beta detector looked like even more fun to play with than the gamma intensimeter. >:)
14:47
< Orthia>
What's it doin', gnolam?
14:56
<@gnolam>
What's what doing?
15:00
<@UndeadAnno>
You can only one piece of armour.
15:01 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
15:04 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
15:05 mode/#code [+o GeekSoldier] by ChanServ
16:07 Syloqs_AFH [Syloq@Admin.Nightstar.Net] has joined #code
16:08 Syloqs_AFH is now known as Syloqs-AFH
17:11 Derakon[AFK] is now known as Derakon
19:12 * TheWatcher eyes a piece of the phpBB3 code, blinks
19:14
<@TheWatcher>
The more I eye this, the more tempted I get to just roll my own (given that phpB3 is the least shitty of the FOSS forums I've looked through, this is rather depressing)
19:15
<@TheWatcher>
Alas, time.
19:19
< Namegduf>
FOSS a strict requirement?
19:19 * Namegduf uses SMF.
19:28
<@TheWatcher>
YEs
19:34
<@TheWatcher>
Yeah, SMF isn't FOSS, so
19:35
< Namegduf>
Yeah, no good in that case.
19:39 Rhamphoryncus [~rhamph@Nightstar-7168.ed.shawcable.net] has joined #code
19:48 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
20:07 Vornicus-Latens is now known as Vornicus
20:16 Consul [~dmlandrum@Nightstar-2808.dsl.sfldmi.ameritech.net] has joined #code
20:16 mode/#code [+o Consul] by ChanServ
20:17 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
20:37 * TheWatcher is a Bad Coder: my $wherechar; # not to be confused with Project Satan
20:37
<@Derakon>
?
20:38
<@TheWatcher>
Probably only makes sense to futurama fans. Project Satan was a car created from the most evil components available, and it could curse any other car to become a were-car
20:38
<@Derakon>
Ahh.
20:38
<@TheWatcher>
*cough* I'll be over here, now
20:39 * Derakon pats TW.
20:39 * TheWatcher hms, realises that he hasn't yet managed to work an Alien Abduction Error into the code yet...
20:40
< Namegduf>
Haha.
20:49 forzar [~whatsnex@83.235.26.ns-12398] has joined #code
20:50 forzar [~whatsnex@83.235.26.ns-12398] has left #code []
20:54 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
20:54 mode/#code [+o GeekSoldier] by ChanServ
20:59
<@Consul>
http://www.youtube.com/watch?v=Xtp2TWI1764&feature=related -- I do believe I just found my latest hobby.
21:16 SmithKurosaki [~jess@Nightstar-6870.dsl.teksavvy.com] has quit [Quit: Leaving]
21:17 SmithKurosaki [~Jenn@Nightstar-7213.cpe.net.cable.rogers.com] has joined #code
21:45
<@Derakon>
Hunh. Neat.
21:47
<@Derakon>
He should probably be wearing a respirator though.
22:05 Derakon is now known as Derakon[AFK]
22:08 jess_ [~jess@Nightstar-6870.dsl.teksavvy.com] has joined #code
22:08 jess_ [~jess@Nightstar-6870.dsl.teksavvy.com] has quit [Client exited]
22:38
<@Consul>
I have the materials for some experiments. I think I'll go try one. :-)
22:55 Derakon[AFK] is now known as Derakon
23:02
<@Consul>
Blast! No black spraypaint. That's a complete showstopper.
23:03
< SmithKurosaki>
aww, were you planning to trick a bird to running into a wall?
23:04
<@Consul>
Heh, no, though that would be fun.
23:04
<@Consul>
http://www.youtube.com/watch?v=Xtp2TWI1764&feature=related -- I was going to try my hand at this, though a much simpler one.
23:04
< SmithKurosaki>
it would be
23:05
<@Consul>
I'm missing other primary colors, too. I could improvise with what I had, but without black, nothing happens. Black and white are absolutely required.
23:17
< SmithKurosaki>
Consul: thats fucking awesome
23:19
<@gnolam>
Hah. Never knew there were people doing those in studios. :D
23:23
<@gnolam>
(I've only ever seen 'em done in the street.)
23:25 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
23:28 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
23:28 mode/#code [+o GeekSoldier] by ChanServ
23:31 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
23:43
<@UndeadAnno>
In class today, while being bored on a lecture, I spoke with a colleague about programming, since the lecturer was doing some pseudocode with pointers in it. He said that he never could grasp purpose and thought they had no purpose anyway, since Java doesn't have them at all, so you don't need them.
23:44
<@UndeadAnno>
I disagreed, mostly because I know how to use pointers, and the sentiment felt wrong.
23:44
<@UndeadAnno>
Who's right in this?
23:44
<@McMartin>
Java, as it happens, has pointers more or less everywhere.
23:44
<@UndeadAnno>
I told him that.
23:44
< ToxicFrog>
pointers in the sense of "indirect references to data" are goddamn vital.
23:44
<@McMartin>
Anything that isn't int/char/double/other-primitive-type is a pointer in Java.
23:45
< ToxicFrog>
Pointers in the sense of "raw memory locations", ie C-pointers, are sometimes useful but dangerous, and just plain dangerous the rest of the time.
23:45
< ToxicFrog>
Neither should be discounted.
23:45
<@McMartin>
Now, you will find people who insist that they aren't *pointers*, they're *references*, because it's not *really* a pointer unless you can take x, square its address, and dereference it.
23:45
<@McMartin>
These people are (a) wrong, and (b) complaining about "arbitrary pointer arithmetic", which has its place, but generally not where C uses it, which is fucking everywhere.
23:46
<@McMartin>
This is why every typo in a C program tends to let people use the resulting program to get root on your machine. =P
23:46
< ToxicFrog>
McMartin: to me, "reference" is the general type and "pointer" is the specific kind that you can modify a la C.
23:47
<@McMartin>
That's techspeak in C++, but it's kind of misleading everywhere else, imo.
23:47
<@McMartin>
(That is, in C++, int& a is a "reference to int", acts like a Java one but can never be NULL; int *a is a pointer identical to C)
23:49
<@McMartin>
Raw addresses are primarily useful for using direct memory access to control hardware.
23:50
<@McMartin>
And, of course, because it is at the end of the day the only form of indirection the chip understands, so the *generated code* is purely pointer based and will be doing pointer arithmetic to implement things like structs.
23:52
<@Consul>
And, some would argue, that's the *real* reason you need to understand pointers.
23:53
<@McMartin>
Only if you're writing a code generator or a device driver.
23:53
<@Consul>
They were damned useful for real-time DSP graphs.
23:53
<@Consul>
Granted, we only got that partially working, but that had nothing to do with the pointers.
23:54
<@McMartin>
Wouldn't those be references or cursors?
23:54
<@Consul>
Well, okay, we were passing references around.
23:55
<@Consul>
But we still used pointers to objects to run functions on blocks of data.
23:55
<@McMartin>
Yeah, that part's fine.
23:55
<@Consul>
It's kinda hard to explain.
23:55
<@Consul>
But I really don't care anymore.
23:55
<@McMartin>
The question is when you need arbitrary pointer arithmetic, and the only *real* places that's true are when it's the only weapon you have (code generation) or because you actually need to write to memory page B800:0000 (memory-mapped I/O).
23:56
<@McMartin>
Bonus retro points for anyone who remembers what that address means~
23:57
<@Consul>
According to Professor Google, that's the start of the 16k text mode display buffer.
23:57
< ToxicFrog>
The ability to pointercast is sometimes damn handy: fread(buf, sizeof(RES_Toc), 1, fin); RES_Toc * toc = (RES_Toc *)buf;
23:58 * TheWatcher eyes Consul, notes that's hardly remembering ;P
23:58
<@Consul>
TheWatcher: Why remember when one can look up? :-P
23:58
<@Consul>
I never did any of that kind of coding on PCs, anyway. My assembler experience is on the C64.
23:59
<@Consul>
Longer ago than I care to admit.
23:59 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
23:59 mode/#code [+o GeekSoldier] by ChanServ
23:59
<@McMartin>
LDA #$00; STA $D020; STA $D021; LDA #147; JSR $FFD2
23:59
<@TheWatcher>
('course, the first thing that came into my head on seeing that was "huh, I don't remember seeing that as a guru meditation error...")
--- Log closed Wed Jun 10 00:00:33 2009
code logs -> 2009 -> Tue, 09 Jun 2009< code.20090608.log - code.20090610.log >