code logs -> 2007 -> Thu, 10 May 2007< code.20070509.log - code.20070511.log >
--- Log opened Thu May 10 00:00:18 2007
00:08 AnnoDomini [~farkoff@Nightstar-29191.neoplus.adsl.tpnet.pl] has quit [Killed (NickServ (GHOST command used by AbuDhabi))]
00:08 AnnoDomini [~farkoff@Nightstar-29191.neoplus.adsl.tpnet.pl] has joined #Code
00:08 mode/#code [+o AnnoDomini] by ChanServ
00:23 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Ping Timeout]
00:36 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
00:57 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
00:57 mode/#code [+o ToxicFrog] by ChanServ
01:08 Thaqui [~Thaqui@Nightstar-26992.jetstream.xtra.co.nz] has joined #code
01:08 mode/#code [+o Thaqui] by ChanServ
01:10 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Quit: Z?]
01:32 Serah [~Z@87.72.36.ns-26407] has joined #Code
01:32 mode/#code [+o Serah] by ChanServ
02:31 KarmaBot [~karma.bot@Nightstar-29191.neoplus.adsl.tpnet.pl] has left #code [Banished by Einar.]
02:42 Vornicus is now known as IanMusgrave
03:04 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
03:07 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: http://img.photobucket.com/albums/v492/tai_ragnarok/controlroom.png LAWL AT BAD CODE SNIPPET O3o]
03:09 IanMusgrave is now known as Vornicus-Latens
03:09
< Takyoji>
Is there any reason to also learn C/C++ if I already know C#?
03:12
<@ToxicFrog>
The ability to write cross-platform programs is pretty nice.
03:12
< Takyoji>
ahh
03:13
< Takyoji>
yea, because my Palm PDA can only have it's programs built with C++ and not C#
03:13
< Takyoji>
Who originally made C?
03:13
<@ToxicFrog>
Well, C and C++ programs can, potentially (it depends on how you write the actual code) be compiled for, and run on, pretty much anything.
03:13
<@ToxicFrog>
From a Cray to a Gameboy.
03:14
<@ToxicFrog>
C was originally devised by Brian Kernighan and Dennis Ritchie; it was standardized by an ANSI comittee (which I don't remember all the names of) in 89, and updated in 99.
03:16
< Takyoji>
ahh
03:16
< Takyoji>
Any suggested resources or should I consult my friend Google?
03:17
<@ToxicFrog>
Umm.
03:17
<@ToxicFrog>
I know of good /reference materials/, but no good introductory materials; I learned C from my dad.
03:17
<@ToxicFrog>
(who was one of the members of the abovementioned committee)
03:18
<@ToxicFrog>
I'm sure someone in here knows where to find good C/++ learning resources, though.
03:20 * Takyoji looks around the room
03:21
< Takyoji>
I suppose 10 minutes and someone will speak up..
03:22
< Takyoji>
Hopefully I can learn C++ sometime, because I do need to make a program for my Palm(tm) PDA for programming on the run
03:23
< Takyoji>
I don't have an actual laptop, but it does the job well, I even have a foldable keyboard for it, but it is a little old, but has a decent resolution
03:23
< Takyoji>
I mean, the PDA is kinda old
03:24
<@ToxicFrog>
I note that C++ is not the only language Palm supports.
03:24
<@ToxicFrog>
In particular, anything that supports C++ generally supports C as well, and anything that supports C can usually be made to support Lua; I know that is an existent Lua build for Palm.
03:26
<@Raif>
That trivia better be from memory, TF.
03:26
<@Raif>
As for learning C: google.
03:27
<@Raif>
I know of several intermediate resources, but nothing like a "beginning to program" book.
03:28
< Takyoji>
Well, the compiler set for PalmOS compiles C++ code files into some random file format, then is compiled into an actual app
03:28
<@Raif>
the intermediate format is probably an object file.
03:28
< Takyoji>
So what is the best way to refer to it as? C or C++ ?
03:28
< Takyoji>
probably
03:28
<@ToxicFrog>
Raif: which trivia?
03:29
< Takyoji>
Is C++ a revision of C?
03:29
<@ToxicFrog>
...no.
03:29
<@ToxicFrog>
C++ is a superset of C which implements objectification, exceptions, templates, and some other stuff that C lacks.
03:29
<@ToxicFrog>
It's also a mess ;.;
03:29
< Takyoji>
ahh
03:29
<@Raif>
K&R, TF. :)
03:30
<@ToxicFrog>
C code will (usually) compile in a C++ compiler, but the converse is not true.
03:30
<@ToxicFrog>
Raif: of course.
03:30
< Takyoji>
Also, how would I be able to use an SDK that's simply just a stack of C code files to be used in a C# program?
03:30
<@Raif>
Since you're on Windows, Microsoft distributes their C/C++ compiler free.
03:31
<@Raif>
I'm unsure about the SDK thing.
03:31
< Takyoji>
Would I have to compile the SDK into a DLL and then load it in the C# script for use?
03:34
<@Raif>
Dunno. Check the MSDN (google for something like MSDN C# linking to C)
03:35
<@ToxicFrog>
Yeah, you'll have to check the MS docs for that, I have no idea what C#'s linking procedures are like.
03:37
<@ToxicFrog>
It might have something like C++'s [[ extern "C" {} ]] in which case you just include the headers and add it to the link line and it just works.
03:37
<@ToxicFrog>
But probably not.
03:38
< Takyoji>
And.. I've heard from a friend that you have to manually work with memory management..
03:38
< Takyoji>
Is it not all that bad?
03:39
<@ToxicFrog>
Well.
03:39
<@ToxicFrog>
I could say that you have nothing to worry about.
03:39
<@ToxicFrog>
But that would be a terrible lie.
03:40
<@ToxicFrog>
Memory Management Is Not Fun, and that and unbounded arrays probably account for 95% of the bugs in C and C++ code between them.
03:42
<@Raif>
Yep, pretty much.
03:42
<@Raif>
Pointers seem to be the stumbling block for most people.
03:43
<@ToxicFrog>
Well, in C/++, pointers and arrays and strings and memory management are all tangled together anyways.
03:56 TakyojiClone [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has joined #code
03:58 Takyoji [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has quit [Ping Timeout]
03:58
< TakyojiClone>
Heh, so there's a language called B?
03:59
<@ToxicFrog>
Yes.
03:59
<@ToxicFrog>
And one called D, I think.
03:59
< TakyojiClone>
heh
04:03
< TakyojiClone>
Think it'd just be wise to get a book on it rather than running through various tutorials and such?
04:03
< TakyojiClone>
For me, that is
04:04
< TakyojiClone>
The only way I learn C# was from a book
04:04
< TakyojiClone>
learned
04:04
< TakyojiClone>
*
04:06
< TakyojiClone>
I guess I have to go. Bye folks.
04:07 TakyojiClone [~Takyoji@Nightstar-25812.dhcp.roch.mn.charter.com] has quit [Quit: Leaving]
04:15 ReivZzz is now known as ReivOut
05:07 Thaqui [~Thaqui@Nightstar-26992.jetstream.xtra.co.nz] has left #code [Leaving]
05:28 ReivOut is now known as Reiver
06:10 Chalcedon is now known as ChalcyOut
06:37 You're now known as TheWatcher
07:05 Squeak [~David@Nightstar-24056.hsd1.il.comcast.net] has joined #code
07:05
< Squeak>
Hey ToxicFrog!
07:06
< Squeak>
I'm not sure of your usual schedule, but I hope I'll bump into you soon.
07:52 gnolam [lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
07:52 mode/#code [+o gnolam] by ChanServ
08:06 MahalBEDD is now known as Mahal
08:36 Reiv [~reaverta@IRCop.Nightstar.Net] has joined #Code
08:37 Reiver [~reaverta@IRCop.Nightstar.Net] has quit [Killed (Reiv (Ghostbusters!))]
08:50 AnnoDomini [~farkoff@Nightstar-29191.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
08:50 KBot [~karma.bot@Nightstar-29066.neoplus.adsl.tpnet.pl] has joined #Code
08:51 KBot is now known as KarmaBot
08:56 AnnoDomini [~farkoff@Nightstar-29066.neoplus.adsl.tpnet.pl] has joined #Code
08:56 mode/#code [+o AnnoDomini] by ChanServ
08:59 AnnoDomini [~farkoff@Nightstar-29066.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
09:05 AnnoDomini [~farkoff@Nightstar-29066.neoplus.adsl.tpnet.pl] has joined #Code
09:05 mode/#code [+o AnnoDomini] by ChanServ
09:13 Reiv is now known as Reiver
09:45 Thaqui [~Thaqui@Nightstar-26992.jetstream.xtra.co.nz] has joined #code
09:45 mode/#code [+o Thaqui] by ChanServ
09:52 Mahal is now known as MahalBEDD
09:52 ChalcyOut is now known as Chalcedon
09:53 Chalcedon [~Chalcedon@Nightstar-2310.ue.woosh.co.nz] has quit [Quit: Gone]
11:40
<@TheWatcher>
Python people! I know that 'python setup.py install' is the standard way to install a python modul, but what is the standard way to /remove/ on?
11:40
<@TheWatcher>
+e
11:54 Vornicus-Latens is now known as Vornicus
12:04
<@gnolam>
IIRC, there is none.
12:04
<@gnolam>
Could be wrong though.
12:07
<@Vornicus>
Yeah, looks like there really isn't one. I wonder why.
12:09
<@Vornicus>
but setup.py install will usually install in $PYTHON_LIB_PATH/site-packages
12:14
<@Vornicus>
So you should be able to just remove the directory.
12:15
<@Vornicus>
the specific directory, I don't think it ever installs single files but I could be wrong.
12:22
<@TheWatcher>
I foun there's a workaround: python setup.py install --record files && cat files | xargs rm -f
12:22
<@TheWatcher>
the --record option stores the list of installed files, so
12:41
<@ToxicFrog>
Squeak! You still around?
12:43 * gnolam burns MatLab with righteous fire.
14:08 * AnnoDomini tries to change a JLabel's displayed text with a button, yet his attempts are met with a NullPointerException.
14:19 ToxicFrog is now known as ToxicFrog|wr0k
14:43 Thaqui [~Thaqui@Nightstar-26992.jetstream.xtra.co.nz] has left #code [Leaving]
14:43 * ToxicFrog|wr0k does horrific things with bash
14:48 AnnoDomini is now known as Shell
14:49
< MyCatVerbs>
It's bash. The 'horrific' qualifier is redundant.
14:50
<@ToxicFrog|wr0k>
Oh, you think that now.
14:50
<@ToxicFrog|wr0k>
But when you're eleven levels of quotes in, you'll realize that there are depths of horror to bash that you have not yet plumbed.
14:50 EvilDarkLord is now known as Icarus
15:13 * MyCatVerbs whimpers.
15:14
< MyCatVerbs>
ToxicFrog|wr0k: honestly, I'd much rather write a bash-code-generator in Haskell or something than attempt that by hand.
15:14 * Reiver plumbs TF's depths. And then bashes him, 'cuz apparently he likes that sort of thing.
15:20 * TheWatcher bahs, just recommends writing it in perl ¬¬
15:21
<@Shell>
Reiver:
15:22
< MyCatVerbs>
I'm with TheWatcher on this one. Unless it's possible to use Python or Ruby or something instead.
15:22
<@ToxicFrog|wr0k>
TheWatcher: not practical in this case. Must be easily redistributable to windows, have chosen mingw build of bash shell for this purpose.
15:22
<@ToxicFrog|wr0k>
It's just a small package for easily searching SupComm source files.
15:22
< MyCatVerbs>
ToxicFrog|wr0k: ActiveState Perl?
15:23 * Vornicus <3 Python.
15:23
<@ToxicFrog|wr0k>
Honestly, it's not that horrific.
15:24
<@ToxicFrog|wr0k>
Checks a bunch of markers, re-unpacks any SCDs that have changed since last time it was run, and then reads stuff from stdin and passes it to grep.
15:24
<@TheWatcher>
MCV: the chances are that sizeof(mingw bash) < sizeof(activeperl)
15:25
<@TheWatcher>
By a considerable amount.
15:25
<@ToxicFrog|wr0k>
Mingw bash is <1MB and requires no special installation.
15:25
< MyCatVerbs>
Oh, fair enough.
15:26
<@ToxicFrog|wr0k>
And I can easily package it with RXVT, because I'm not about to inflict the cmd.exe terminal emulator on someone.
15:26
<@TheWatcher>
heh
15:29 GeekSoldier [~Rob@Nightstar-6391.pools.arcor-ip.net] has joined #code
15:31
< Squeak>
ToxicFrog! Who works these days?
15:32
<@ToxicFrog|wr0k>
Impoverished university students, of course.
15:39 You're now known as TheWatcher[ded]
15:39
<@ToxicFrog|wr0k>
Squeak: concerning the shadowing implementation, it'll work, but the reason I didn't recommend it is that it's not really suitable for mod distribution.
15:40
<@ToxicFrog|wr0k>
The user has to hand-edit either SupComDataPaths or the SupComm shortcut each time they want to enable or disable the mod.
15:40
<@Vornicus>
Squeak, I take it, if from the SupComm mod community?
15:40
<@Vornicus>
s/if/is/
15:40
< Squeak>
Yes
15:40
<@Vornicus>
Cool. Welcome.
15:41
< Squeak>
Right, but if I can test it out this way then I can submit it when the patch comes out that supposed to fix all! Small battle won and all :)
15:41 You're now known as TheWatcher[afk]
15:41
< Squeak>
TY Vorn
15:44
<@ToxicFrog|wr0k>
True!
15:51
<@ToxicFrog|wr0k>
About the searcher - do you think people will actually find it useful?
15:54
< Squeak>
Yes
15:55 You're now known as TheWatcher
15:55 * ToxicFrog|wr0k idly stabs windows for not having the tools built in in the first place
15:55
< Squeak>
I've got to figure out a good way to transfer over the whole lua/bp library to my laptop.
15:56
< Squeak>
With the least work possible from myself.
15:56
< Squeak>
I think if I stare at it long enough, it should just osmosis through the air onto the laptops hd, right?
15:56
<@ToxicFrog|wr0k>
What's the laptop running?
15:56
< Squeak>
xp
15:56
<@ToxicFrog|wr0k>
And you don't have Cygwin installed on either system?
15:56
< Squeak>
nope
15:57
< Squeak>
I think i've actualy had that installed before, but I wasn't sure what I was working with. That and I am not very profficient in linux.
15:59
<@ToxicFrog|wr0k>
And there's no easy to way to unpack *just* lua and bp files with the graphical tools, either.
15:59
<@ToxicFrog|wr0k>
At least as far as I know.
16:00
<@ToxicFrog|wr0k>
Gnar. It's been so long since I used a windows system without Cygwin that I no longer remember how.
16:01
<@Vornicus>
heh
16:02
<@ToxicFrog|wr0k>
Does windows come with unzip(1)? I don't think it does...
16:04 * ToxicFrog|wr0k also eyes apache
16:04
<@ToxicFrog|wr0k>
From the logfile:
16:04
<@ToxicFrog|wr0k>
httpd: could not open document config file ../apache/conf/httpd.conf
16:04
<@ToxicFrog|wr0k>
From strace:
16:04
<@ToxicFrog|wr0k>
open("../apache/conf/httpd.conf", O_RDONLY) = 3
16:06 Squeak is now known as squeak
16:06 squeak is now known as squeak|afk
16:06
< squeak|afk>
alright guys, catch ya in a few hours
16:06
<@ToxicFrog|wr0k>
Ta.
16:56 Shell is now known as AnnoDomini
16:56 Icarus is now known as EvilDarkLord
17:02
< MyCatVerbs>
ToxicFrog|wr0k: they embedded a zip archiver into explorer a while back.
17:03
<@ToxicFrog|wr0k>
MyCatVerbs: if by "a while back" you mean "in winXP", yes. This doesn't really help.
17:03
<@ToxicFrog|wr0k>
Since the problem is "extract all files of certain types from a group of about ten zipfiles, preserving directory structure"
17:03
< MyCatVerbs>
Ahhhh.
17:04
<@TheWatcher>
And in any even, IME the zip files XP generates are not valid and will only open in explorer anyway.
17:04
<@TheWatcher>
+t
17:04
<@ToxicFrog|wr0k>
You can do the "of certain types" part with find, but that flattens them; you can do the "preserving directory structure" part with copy, but that gets you 1.5GB of unwanted data.
17:04
<@ToxicFrog|wr0k>
TheWatcher: no generation involved.
17:04
<@TheWatcher>
Ah, 'kay.
17:04
< MyCatVerbs>
Bundle up mingw unzip, perhaps?
17:04
<@ToxicFrog|wr0k>
We're talking about unpacking existing files here, specifically $SUPCOMM/gamedata/*.scd
17:05
<@ToxicFrog|wr0k>
MyCatVerbs: mingw doesn't come with unzip. I will need an unzip command, so I'll be either building it from source or using the Cygwin version.
17:05
<@ToxicFrog|wr0k>
However, again, not the right answer.
17:05
<@ToxicFrog|wr0k>
<Squeak> I've got to figure out a good way to transfer over the whole lua/bp library to my laptop.
17:06
<@ToxicFrog|wr0k>
Unless you mean "wait for me to finish the SupComm autosearcher, then yoink the source tree it generates", in which case yes.
17:06
< MyCatVerbs>
I mean a copy of unzip built with mingw, since it seems to produce binaries with little installation hassle.
17:10 Reiver is now known as ReivZzz
17:10 gnolam is now known as gnopub
17:10 You're now known as TheWatcher[afk]
17:24 * ToxicFrog|wr0k kills Ubuntu in the face
17:24
<@ToxicFrog|wr0k>
No official packages for flood, and I'm having trouble building it from source because Ubuntu's build environment is messed up.
17:27
< MyCatVerbs>
You really do hate everything, no? Grabbed all the -devel packages, too?
17:27 McMartin [~mcmartin@Nightstar-6608.dsl.pltn13.sbcglobal.net] has joined #code
17:27 mode/#code [+o McMartin] by ChanServ
17:28
< MyCatVerbs>
(And yes, I hate that feature of Debian and its derivatives, too. No, the libraries aren't and never will be any goddamn use to me if the includes and manpages aren't available too.)
17:29
<@McMartin>
Not sure what I walked into here, but it does seem like everyone but Gentoo makes the includes impossible to get to.
17:29
<@jerith>
Generally, binary distros tend to not like includes.
17:29
< MyCatVerbs>
McMartin: eh. FBSD and OBSD bundle them, and the manpages too.
17:30
< MyCatVerbs>
McMartin: Arch Linux also always included the includes, as did Slackware.
17:30
<@jerith>
The *correct* way to do it is to have -devel packages for everything with the headers and such.
17:30
<@McMartin>
jerith: That was, I thought, what he was railing against.
17:30
<@jerith>
Unless you're aiming at developers in which case everything installs with everything you need to code against it.
17:31
< MyCatVerbs>
jerith: No. I want to set your teddybear on fire for even suggesting that.
17:31
<@McMartin>
And the disadvantage there is that it's only workable if you can go from binary/lib names to the name of the package.
17:31
< GeekSoldier>
not his teddy bear!
17:31
< MyCatVerbs>
jerith: the include files are, like, bare kilobytes on top of megabytes of binaries, and they compress well too.
17:31
<@McMartin>
Because when you need asd;lkfuaewr.h and it turns out that's part of binutils-devel or whatnot.
17:32
<@jerith>
There is that.
17:32 * MyCatVerbs apologises to jerith for the cuddlytoy threat.
17:32
<@jerith>
I've mostly worked with either completely non-dev systems or source-based distros.
17:33
<@jerith>
And most of my devwork has been with interpreted languages anyway.
17:33
<@McMartin>
The problem mostly hits when you want to, say, install something that isn't part of the repository to begin with.
17:33
<@McMartin>
At which point you suddenly need -devel files, and (as was the case for me most recently) it's not always obvious which -devel package has, say, the include files for uuidgen.
17:35
< MyCatVerbs>
Whereas on Slack, *all* the devel files are installed, because the maintainer has the commonsense to know that there's no point in not doing so.
17:36
<@McMartin>
Version skew.
17:36
< MyCatVerbs>
McMartin: how so?
17:36
<@McMartin>
Basically, what gentoo uses slots for.
17:37
<@McMartin>
See also: GTK+ and its approach to wx.
17:37
< MyCatVerbs>
I'm not sure what you're talking about here.
17:37
< MyCatVerbs>
Slack has infrequent releases, and the includes are built from the same sources as the binaries. No worries there.
17:37
<@McMartin>
"Most of the distro is linked against library X; you just downloaded app Y that needs a different version."
17:38
< MyCatVerbs>
That's vanishingly rare amongst open source programs, and pretty damn rare with closed, too.
17:39
<@McMartin>
Anything linking wx had it in several thousand evil varieties of spades, which is why I hate it so.
17:39
<@McMartin>
Especially since I had no fewer than three wx-using apps I really wanted to use.
17:39
<@McMartin>
And wx demanded that GTK be compiled with or without Unicode support, depending
17:40
<@McMartin>
And depending on which one it demanded, the target app would or would not work.
17:40
< MyCatVerbs>
That's not really the distro's fault, though I have to admit I'm damnably impressed by Gentoo's ability to solve it.
17:41
<@McMartin>
Back in the day it solved it by refusing to emerge wxWidgets if libgtk+2 had been emerged without USE=-unicode.
17:41
< MyCatVerbs>
...ouch!
17:41
<@McMartin>
It later solved it, after I decided that spending 1.5 days to upgrade GNOME every three weeks wasn't really The Thing, was to play LD_PATH games depending on target binary.
17:41 * ToxicFrog|wr0k upreads
17:41
< GeekSoldier>
sounds rather kludgy.
17:42
<@McMartin>
wxWidgets is quite possibly the worst library I have ever encountered.
17:42
<@ToxicFrog|wr0k>
When I said "build environment was messed up", what I meant was "./configure fails to detect either the operating system or CPU architecture when run on vanilla Ubuntu"
17:42 * jerith glances idly at jakarta-commons-httpclient-[23].
17:42
<@McMartin>
Not As Bad As wx.
17:42
<@ToxicFrog|wr0k>
The fact that there are no headers or man pages is a seperate issue.
17:42
<@ToxicFrog|wr0k>
The headers are all in -devel packages, which is acceptable, but fuck if I know where the documentation is.
17:43
<@jerith>
They're mutually incompatible. You can have both installed, but what the package is called depends on your distro.
17:44
<@McMartin>
That's what ClassLoaders are for.
17:44
<@McMartin>
As messy as the Java Classpath system is, the fact that you can have the same application using mutually incompatible classes with the same name simultaneously is a feat I fully respect.
17:45
<@McMartin>
(And which is, for instance, already mandatory if you want Tomcat to be able to function reasonably at all)
17:45
<@jerith>
Yeah, but now you have to build distro-specific packages for an essentially platform-agnostic app.
17:45
<@jerith>
Because Fedora has httpclient and httpclient-3. RHEL has httpclient and httpclient-2.
17:46
<@McMartin>
I suppose. It's less of an issue for the rest of Jakarta Commons because you tend to just bung those into WEB-INF/lib for whatever your application is.
17:46
<@jerith>
Yeah.
17:46
<@jerith>
But try providing downloadable client tools.
17:46
<@McMartin>
And then Tomcat lets you use your own copies, regardless of what else is installed, and indeed, regardless of what other modules in the same JVM are using.
17:47 * McMartin is mostly baffled that such a system is part of commons
17:47
<@jerith>
Commons is a large pile of dung. (The bits that I've used, at least.)
17:48
<@McMartin>
Tagutils makes my life harder, but that's in part because it makes writing safe JSPs much easier.
17:48
<@McMartin>
I forget whether that's in Commons or Struts, though.
17:48
<@jerith>
Then again, I tend to have high standards.
17:49
<@McMartin>
Java is, in fact, really good at middleware.
17:49
<@McMartin>
This means that there's shitloads of bad middleware written in it
17:49
<@McMartin>
And lots of people who end up insisting on using all of it all at once.
17:49
<@McMartin>
Often while forgetting that it solves a problem that doesn't exist in Java to begin with.
17:50
<@McMartin>
Like, oh, the mapping of strings to types.
17:50
< MyCatVerbs>
Truuf.
17:50
<@jerith>
Heh.
17:51
<@Vornicus>
"mapping of strings to types"?
17:51
<@jerith>
Try finding a decent SOAP library.
17:51
< MyCatVerbs>
McMartin: this is something that needs to be beaten into framework builders' skulls. "But what problem does it *solve* in a manner less difficult and error prone than doing it by hand?"
17:51
<@McMartin>
MCV: Well, in C++, it would solve it!
17:51
<@jerith>
There must be about twelve of them. Each one sucks in a completely new and interesting way.
17:51
< MyCatVerbs>
McMartin: but nobody would ever do it in C++, because C++ sucks ass at middleware. =D
17:52
<@McMartin>
Wrong. ;_;
17:52
<@McMartin>
At the former, not the latter.
17:52
< MyCatVerbs>
Right. C++ is good at libraries. Middleware?
17:52
<@McMartin>
Also, legacy stuff. Middleware predates Java by a long, long time.
17:52
<@McMartin>
And by mapping of strings to types and vice versa, I mean Object.getClass().getName() and Class.forName(String).
17:56 GeekSoldier_ [~Rob@Nightstar-3635.pools.arcor-ip.net] has joined #code
17:57
<@Vornicus>
aha
17:57
<@McMartin>
Which, if you want to do something similar in C++, is an absolute cavern of woe.
17:57 GeekSoldier [~Rob@Nightstar-6391.pools.arcor-ip.net] has quit [Ping Timeout]
17:57
<@McMartin>
(And which, indeed, cannot be done in general to arbitrary libraries, which is why there are big cumbersome middleware layers for doing it.)
18:00
< MyCatVerbs>
Or, better still, don't.
18:00
<@McMartin>
Well, not now.
18:00
<@McMartin>
Your options were more limited in the 20th Century.
18:00
< MyCatVerbs>
Er, either way.
18:01
<@ToxicFrog|wr0k>
McMartin: is it possible, in Java, to do something like new Object.getClass()?
18:01
< MyCatVerbs>
That much difficulty? May as well just work on a method to tackle your problem set without metaprogramming, in the end.
18:05
<@McMartin>
TF: You mean "Give me an object of the same type of this object"?
18:05
<@McMartin>
MCV: Suppose your task is "make a moddable/extensible engine for X".
18:06
<@McMartin>
TF: Assuming a default constructor exists, though, yes, and it's easy: x.getClass().newInstance().
18:06
<@McMartin>
You have to go through the more cumbersome java.lang.reflect interface if there is no default constructor, and this also means you have to know the constructor's type signature.
18:07
<@McMartin>
But, well, "no default" means no default.
18:07
<@McMartin>
Also, if you make messier uses of reflection hard to do, the n00bs will do it less.
18:07
<@McMartin>
And that's just a win all around~
18:08 * McMartin -- in fine Python style -- invokes hasattr() three times, falls to the King in Yellow
18:08
<@ToxicFrog|wr0k>
McMartin: yep, that's what I was asking.
18:08
<@ToxicFrog|wr0k>
(more generally, "can I treat classes as first-class values and instantiate from them")
18:08
<@ToxicFrog|wr0k>
(which C++ fails at badly)
18:08
<@ToxicFrog|wr0k>
King in Yellow?
18:08
<@McMartin>
(java.lang.Class is, indeed, a subclass of java.lang.Object)
18:09
<@McMartin>
You know, Hast---*pwnt*
18:09
<@ToxicFrog|wr0k>
(...is java.lang.Object a subclass of java.lang.Class as well?)
18:10
< MyCatVerbs>
McMartin: make a moddable engine for X -> embed a 'terp, write a lot of callbacks.
18:11 GeekSoldier_ is now known as GeekSoldier
18:11
<@McMartin>
(No, but it has a field of type java.lang.Class, which is the same as the result of Class.forName("java.lang.Object"))
18:11
<@McMartin>
MCV: Insufficient performance.
18:11
<@McMartin>
Remember, every time you go back in time 18 months, computing power halves.
18:12
<@McMartin>
Most of the stuff we're talking about with Java here is actually neatly covered by suitable use of dlopen().
18:13
<@McMartin>
And LD_PATH raping.
18:14
<@McMartin>
The part where the same application can use conflicting versions of the same library simultaneously is new to Java, and in Days of Yore (and indeed even today) you can get similar effects by spawning subshells.
18:16 * Vornicus always wondered how that worked, the whole "Class and Object are instances of Class, and Class is a subclass of Object" thing.
18:16
<@Vornicus>
Or, more precisely, how you can get to that point.
18:17
<@jerith>
Vornicus: magic.
18:17
<@ToxicFrog|wr0k>
I did it by creating Class by hand, then overwriting it with an instance of itself.
18:17
<@jerith>
Aargh! The cable to my right earphone has broken. :-(
18:18
<@jerith>
I'm going to have to take them home and pull out the soldering iron.
18:22
<@McMartin>
In Java, Class and Object are both objects of type Class, and Object and Class are hardcoded below the VM level.
18:23
<@McMartin>
Any given object also has a field of type Class that represents its class.
18:31 You're now known as TheWatcher
19:25 MahalBEDD is now known as Mahal
19:42
<@McMartin>
Man, I was a much worse programmer two years ago.
19:42 * McMartin sets this code on fire
19:45
<@ToxicFrog|wr0k>
Boy do I know that feeling.
19:47
<@TheWatcher>
Heh
19:48
<@TheWatcher>
I was vaguely surprised looking at some of the perl I did 3 years ago, it wasn't actually too bad - in fact some of it I've been reusing in various places since then.
19:51
<@McMartin>
Well, I should specify.
19:51
<@McMartin>
Code that it is OK to evolve semi-randomly and then ignore for years: texture mapping libraries, graph algorithms.
19:51
<@McMartin>
Code that it is not OK to evolve semi-randomly and then ignore for years: language parsers.
19:51
<@TheWatcher>
... yeah
19:52
<@McMartin>
The paper I've been working on has demonstrated to me that my specification language requires the ability to do inline typecasts.
19:52
<@McMartin>
My conclusion is actually "All the lexer and parser code needs to die".
19:55
<@McMartin>
"But it would probably be a good idea to formally specify the language first."
19:55
<@McMartin>
Seat-of-the-pants LL(k) for the, um, win.
20:08 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
20:10 Mahal is now known as MahalGone
20:48 AnnoDomini is now known as Shell
20:48 EvilDarkLord is now known as Icarus
20:59 * Vornicus finally gets around to reading McM's paper.
20:59
<@Vornicus>
...and here I thought that the filename was just a sly joke.
21:00
<@ToxicFrog|wr0k>
Which filename?
21:01
<@Vornicus>
McM sent me his paper, the filename is qed.pdf
21:01
<@Vornicus>
if you want it you should ask him; I shouldn't throw it around.
21:04
<@Vornicus>
But it actually stands for "Query-Based Event Director", as opposed to Quod Erat Demonstrandum or Quantum Electrodynamics
21:05
<@Vornicus>
...though I guess that's kinda a sly joke in itself.
21:08 Chalcedon [~Chalcedon@Nightstar-2310.ue.woosh.co.nz] has joined #code
21:08 mode/#code [+o Chalcedon] by ChanServ
22:05 You're now known as TheWatcher[T-2]
22:10 You're now known as TheWatcher[zZzZ]
22:20 Chalcedon is now known as ChalcyAFK
22:51 ChalcyAFK is now known as Chalcedon
23:35 Shell is now known as AnnoDomini
23:35 Icarus is now known as EvilDarkLord
23:51 McMartin [~mcmartin@Nightstar-6608.dsl.pltn13.sbcglobal.net] has quit [Quit: back later]
23:52 Thaqui [~Thaqui@Nightstar-26992.jetstream.xtra.co.nz] has joined #code
23:52 mode/#code [+o Thaqui] by ChanServ
23:54
< EvilDarkLord>
By popular demand, (i.e. I can blame Anno for it in part) here is a quote from our resident bannee, Mischief regarding the inhabitants of this channel. 01:49 < Kamikosis> I've got A+ certification now, they can kiss my arse. >_>;
23:54
< EvilDarkLord>
That is all. *flrrd*
--- Log closed Fri May 11 00:00:18 2007
code logs -> 2007 -> Thu, 10 May 2007< code.20070509.log - code.20070511.log >