code logs -> 2007 -> Wed, 26 Sep 2007< code.20070925.log - code.20070927.log >
--- Log opened Wed Sep 26 00:00:47 2007
00:05
< Vornicus>
bubble sort is pretty nice.
00:06
< Attilla>
I prefered Quicksort.
00:06
< Attilla>
Because I was lazy
00:06 * AnnoDomini fixes it. Turned out I forgot to reset j.
00:07
<@McMartin>
Bubblesort is, in fact, awful, in terms of performance.
00:07
<@McMartin>
But it's really easy to implement, so that's good in restricted-instruction environments.
00:08
<@AnnoDomini>
http://pastie.caboo.se/100845 <- Here's what I did. Works as intended. :)
00:19
< MinceR>
i prefer to avoid restricted-instruction environments.
00:46 ReivZzz is now known as ReivClass
00:57
< MinceR>
gn
02:01 McMartin [~mcmartin@Nightstar-904.dsl.pltn13.sbcglobal.net] has quit [Ping Timeout]
02:06 McMartin [~mcmartin@Nightstar-904.dsl.pltn13.sbcglobal.net] has joined #code
02:06 mode/#code [+o McMartin] by ChanServ
03:51 Vornotron [~vorn@64.252.86.ns-4159] has joined #code
03:51 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
03:54 Vornotron [~vorn@64.252.86.ns-4159] has quit [Ping Timeout]
03:59 Vornicus [~vorn@ServicesOp.Nightstar.Net] has joined #code
03:59 mode/#code [+o Vornicus] by ChanServ
04:30 GeekSoldier|bed is now known as GeekSoldier|work
04:52 Chalcedon is now known as ChalcyDoc
05:36 ChalcyDoc is now known as Chalcedon
06:23 You're now known as TheWatcher
07:12 GeekSoldier|work [~Rob@Nightstar-4354.pools.arcor-ip.net] has quit [Ping Timeout]
07:23 ReivClass is now known as Reiver
07:37 Forj [~Forj@Nightstar-2472.ue.woosh.co.nz] has joined #code
07:37 mode/#code [+o Forj] by ChanServ
07:59 Vornicus is now known as Vornicus-Latens
08:24 Reiver is now known as ReivOut
08:50 Chalcedon [~Chalcedon@Nightstar-2472.ue.woosh.co.nz] has quit [Quit: Gone]
08:54 Raif [~corvusign@Nightstar-25074.hsd1.wa.comcast.net] has joined #Code
09:07
< MinceR>
r4wr
11:29 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
11:29 mode/#code [+o gnolam] by ChanServ
11:41 ReivOut is now known as Reiver
11:46 Genesis__ [~Genesis@Nightstar-7565.hsd1.md.comcast.net] has joined #code
11:46 Mischief [~Genesis@Nightstar-7565.hsd1.md.comcast.net] has quit [Connection reset by peer]
11:48 Forj [~Forj@Nightstar-2472.ue.woosh.co.nz] has quit [Connection reset by peer]
12:04 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Ping Timeout]
12:06 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
12:07 Syloq is now known as Syloqs-AFH
13:42 KBot [~karma.bot@Nightstar-29056.neoplus.adsl.tpnet.pl] has joined #Code
13:49
<@AnnoDomini>
Heh. Three iterations of the same basic dicebot in one channel. :p
13:49 KBot [~karma.bot@Nightstar-29056.neoplus.adsl.tpnet.pl] has left #Code [Banished by AnnoDomini.]
14:22 MinceR [~mincer@Nightstar-21862.nik.bmf.hu] has quit [Ping Timeout]
14:25 MinceR [~mincer@Nightstar-4916.nik.bmf.hu] has joined #code
15:07 Reiver is now known as ReivZzz
15:23
<@gnolam>
http://youtube.com/watch?v=4nigRT2KmCE
15:23
<@gnolam>
It's stuck in my brain!
15:43
<@AnnoDomini>
o_O
15:58 Genesis__ [~Genesis@Nightstar-7565.hsd1.md.comcast.net] has quit [Ping Timeout]
15:58 Takota_Lowell [~Genesis@Nightstar-7565.hsd1.md.comcast.net] has joined #code
16:56 Attilla [~The.Attil@194.72.70.ns-11849] has quit [Ping Timeout]
17:00 Attilla [~The.Attil@194.72.70.ns-11849] has joined #code
17:12 You're now known as TheWather[afk]
17:38 Vornicus-Latens is now known as Vornicus
17:53
<@gnolam>
http://woodgears.ca/marbleadd/index.html
17:53
<@gnolam>
Marble adder!
17:54
< MinceR>
Granite multiplier!
17:55
< MinceR>
hm, i thought it would be a snake.
17:57 * gnolam made a game that had full and half adders as enemies.
17:57
<@gnolam>
+once
18:00
< MinceR>
:)
18:22
<@jerith>
19:22 < mithrandi> 19:22:23 < psnively> That's what I love about this channel: people use "reflexive transitive closure" in casual conversation.
18:23
< MinceR>
:)
18:23
< MinceR>
took me a while to realize which meaning of "closure" that is.
18:33
<@ToxicFrog>
"It had occurred to me that perhaps with an insane amount of perseverance, it might be possible to build a whole computer that runs on marbles." - I have a DigiComp II at home, which has three registers and a tiny instruction set but does run on marbles.
18:34
<@ToxicFrog>
"The adder would just as well add without it, but the number would have to be read off by the angle of the rockers, rather than have the device dump the count out." - this is why you attach little "0" and "1" flags to the rockers
18:37 You're now known as TheWather
18:37 You're now known as TheWatcher
18:43 MinceR [~mincer@Nightstar-4916.nik.bmf.hu] has quit [Operation timed out]
19:25 Forj [~Forj@Nightstar-2472.ue.woosh.co.nz] has joined #code
19:25 mode/#code [+o Forj] by ChanServ
19:32 Forj [~Forj@Nightstar-2472.ue.woosh.co.nz] has quit [Quit: Gone]
19:38 GeekSoldier|work [~Rob@Nightstar-4800.pools.arcor-ip.net] has joined #code
19:42 GeekSoldier|work is now known as GeekSoldier|bed
19:43 Takota_Lowell is now known as Mischief
20:46 Mischief [~Genesis@Nightstar-7565.hsd1.md.comcast.net] has quit [Connection reset by peer]
20:59 Chalcedon [~Chalcedon@Nightstar-2472.ue.woosh.co.nz] has joined #code
20:59 mode/#code [+o Chalcedon] by ChanServ
21:51 * ToxicFrog tasks wget with downloading the entire javadocs
22:18
<@ToxicFrog>
You'd think that Sun would have the courtesy to offer the docs as a tarball.
22:19
<@jerith>
They're Sun.
22:20
<@ToxicFrog>
Quite.
22:24
<@McMartin>
I bet it's hiding under four levels of click-through licenses somewhere. =P
22:25 You're now known as TheWatcher[T-2]
22:26
<@ToxicFrog>
...
22:27
<@ToxicFrog>
"The import java.util.Scanner cannot be resolved"
22:27
<@McMartin>
Make sure . is still in your classpath.
22:27 You're now known as TheWatcher[zZzZ]
22:27
<@ToxicFrog>
...why does . need to be in my classpath, especially given that java.io.* work fine?
22:32
<@ToxicFrog>
Argh, it's like my Java stdlib is missing java.util.Scanner or something
22:33
<@McMartin>
Well . is magic and also means "$JAVA_HOME/lib"
22:33
<@McMartin>
But you seem to have it
22:35
<@McMartin>
java -version
22:35
<@McMartin>
Scanner doesn't exist in 1.4
22:36
<@ToxicFrog>
...hmm.
22:37
<@ToxicFrog>
java -version reports "java 1.5.0, gij (gnu libgcj) 4.1.2"
22:37
<@ToxicFrog>
So it should work.
22:37
<@McMartin>
Unless libgcj doesn't, in fact, implement the whole API.
22:38
<@McMartin>
Or it's compiling 1.5 source to a 1.4 library
22:38
<@McMartin>
Since 1.5 changed the syntax a bit (adding a foreach construct and typed generics)
22:38
<@ToxicFrog>
It says the default is 1.5, and it still happens if I use -ftarget=1.5
22:38
<@McMartin>
Well, it's easy enough to check.
22:38
<@McMartin>
JAR is a ZIP with special contents.
22:39
<@McMartin>
unzip -l rt.jar | grep Scanner.class
22:39
<@ToxicFrog>
...hmm. javac -version reports "Eclipse java compiler v_686_R32x, release 3.2.2"
22:39
<@ToxicFrog>
But doesn't actually work, complaining that it can't find java.lang.Object.
22:40
<@ToxicFrog>
...
22:40
<@ToxicFrog>
Where the hell is my rt.jar?
22:40
<@McMartin>
locate rt.jar?
22:40
<@McMartin>
My guess is /usr/share/java/VERSION though
22:40
<@ToxicFrog>
locate points me to /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/rt.jar
22:40
<@McMartin>
Or sometimes /opt/java/VERSION.
22:40
<@McMartin>
Huh, OK
22:41
<@ToxicFrog>
Which is a broken symlink to libgcj-4.1.2.jar
22:41
<@ToxicFrog>
Aha. libgcj-4.1.2 is in /usr/share/java
22:41
<@ToxicFrog>
...hmm. No Scanner.
22:41
<@ToxicFrog>
Fuckbiscuits.
22:42
<@McMartin>
Java isn't GPL enough, so we will throw tantrums instead of actually being compliant.
22:42
<@Vornicus>
heh
22:42
<@McMartin>
That said, Scanner is awesome-looking and it's too bad I can't use it, since I have to maintain 1.4 complaince.
22:43
<@McMartin>
The only reason gij and the GNU javac are usable at all is because of the Eclipse project.
22:43
<@McMartin>
Before the ecj fork, gcj added infinite loops to my code.
22:43
<@McMartin>
And this was because Sun refused to open-source AWT, to hear RMS talk.
22:43
<@ToxicFrog>
...
22:44
<@ToxicFrog>
Ok, just out of morbid curiosity, why does gcj report as 1.5.0 when it doesn't actually implement 1.5?
22:44
<@McMartin>
Because I stick to the Sun packages, I can't answer reliably.
22:44 * ToxicFrog sets about uninstalling gcj and replacing it with the Sun JDK.
22:44
<@McMartin>
They can coexist.
22:45
<@McMartin>
Sun puts its versions in /usr/java away from the package managers.
22:45
<@McMartin>
And then you can just fix your symlinks.
22:45
<@McMartin>
Er, your simlinks in /usr/bin, that is.
22:45
<@ToxicFrog>
Yes, buy as gcj is broken I don't want confusion about which javac I'm invoking.
22:45
<@McMartin>
Actually, before you nuke it
22:45
<@McMartin>
See if you can declare an object of type LiinkedList<String>.
22:45
<@McMartin>
Because if you can than I will know why it identifies as 1.5
22:46
<@ToxicFrog>
Yes, I can
22:46
<@McMartin>
OK, that's why, then.
22:46
<@McMartin>
That construct didn't exist in 1.4
22:46
<@ToxicFrog>
Hmm. One would think that Livna, at least, would have the Sun JDK in the repos.
22:46
<@ToxicFrog>
But they don't, so I have to visit Sun's site to download it ;.;
22:47
<@McMartin>
So it compiles the 1.5 language, but only links the 1.4 libraries. And probably not all of those, either.
22:48
<@ToxicFrog>
What fun.
22:48
<@ToxicFrog>
A pity, I like gcj's interface.
22:49
<@McMartin>
How does it differ from Sun's?
22:50
<@ToxicFrog>
I give it a bunch of .java files and it quietly spits out a native binary.
22:50
<@McMartin>
Ah. That is nice, yes.
22:50 * Vornicus does wonder why such a temper tantrum.
22:50
<@McMartin>
OMG NOT GPL!
22:50
<@ToxicFrog>
The fact that I can use CFLAGS (-Wall -g) with it doesn't hurt either.
22:51
<@Vornicus>
I mean, it sounds to me like they can't even open source it until they get buyin from every person they licensed tech from.
22:51
<@McMartin>
Also, at the time, there was no commercial demand, so there wasn't really anybody willing to work on it with any level of quality.
22:58 Chalcedon [~Chalcedon@Nightstar-2472.ue.woosh.co.nz] has quit [Ping Timeout]
22:59 Chalcedon [~Chalcedon@Nightstar-2472.ue.woosh.co.nz] has joined #code
22:59 mode/#code [+o Chalcedon] by ChanServ
22:59
<@ToxicFrog>
Hmm. gcj also has prettier error messages.
23:00
<@McMartin>
That's also likely eclipse's doing.
23:01
<@McMartin>
gcj -- current version -- was designed mainly to plug into Eclipse's IDE system.
23:01
<@ToxicFrog>
Aah
23:01 * ToxicFrog eyes BufferedReader.readLine()
23:02
<@ToxicFrog>
...oh, right.
23:03
<@ToxicFrog>
Having overloaded +, Sun had no more room in the budget to overload == and != on Strings.
23:03 AnnoDomini [AnnoDomini@Nightstar-29056.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
23:04 * Vornicus wants operator overloads!
23:05 * Vornicus wants them, specifically, like Python's.
23:09 AbuDhabi [AnnoDomini@Nightstar-29750.neoplus.adsl.tpnet.pl] has joined #Code
23:12
<@ToxicFrog>
...how the hell do I create a Vector<int>?
23:13
<@ToxicFrog>
Oh, I see. I declare a Vector<Integer> and then add new Integer(lex.nextInt()) to it.
23:13
<@ToxicFrog>
Fuck you, Sun.
23:14 * Chalcedon cookies TF
23:14
<@Vornicus>
I think it boxes and unboxes automatically now.
23:17
<@ToxicFrog>
Ok. ClientThread UI is working.
23:17
<@ToxicFrog>
I think I need some gaming before I tackle the actual network interface.
23:22 AbuDhabi is now known as AnnoDomini
23:40
<@ToxicFrog>
Aha! API docs done download.
23:41
<@ToxicFrog>
Now to write a jman command.
23:42
<@McMartin>
Also, why are you using a Vector instead of an ArrayList?
23:43
<@ToxicFrog>
Because I needed a self-resizing listoid, and Array doesn't do that, but I know Vector does.
23:45
<@McMartin>
ArrayList.ensureCapacity() isn't what you want?
23:45
<@ToxicFrog>
I don't know what the capacity is ahead of time, and I didn't know ArrayList existed until now.
23:46
<@McMartin>
Yeah, so, Vector and Hashtable are the Old And Busted versions of ArrayList and HashMap.
23:46
<@McMartin>
If you just need to append stuff to the end, ArrayList is what you want.
23:46
<@McMartin>
If you need random access to N, I'm not sure that's right, though.
23:46
<@McMartin>
As in "OK, I need to read 1, 2, 3, 4, 985, 432..."
23:46
<@ToxicFrog>
I need to be able to append stuff to the end, and iterate over the contents, and serialize it across a socket.
23:47
<@McMartin>
OK, so, ArrayList implements iterator() and Vector doesn't.
23:47
<@ToxicFrog>
for (int i = 0; i < args.length(); ++i)
23:47
<@ToxicFrog>
It doesn't need to be an actual Iterator :P
23:48
<@ToxicFrog>
But, ok, I'll look into ArrayList as soon as I finish writing jman.
23:48
<@McMartin>
Oh, wait. Vector got iterator backpatched in.
23:48
<@McMartin>
So it does count as a List as well. OK, n/m.
23:48
<@McMartin>
But ArrayList is still the version that's intended to replace it.
23:49
<@McMartin>
If you're using 1.5 there's some kind of foreach command that automatically handles Iterator creation and management and end testing and stuff.
23:49
<@McMartin>
But as I'm stuck in 1.4 land I don't recall it offhand.
23:50
<@McMartin>
Aha.
23:50
<@McMartin>
If strc is a Collection<String> subtype, then you can go
23:51
<@McMartin>
for (String s : strc) { .... } and it will iterate through.
23:51
<@McMartin>
This page also implies that if you make a Collection<Integer> you can feed it ints or read ints out of it and it will handle the boxing there.
23:52 * McMartin has the language and VM specs to hand basically all the time when in lab.
--- Log closed Thu Sep 27 00:00:53 2007
code logs -> 2007 -> Wed, 26 Sep 2007< code.20070925.log - code.20070927.log >