code logs -> 2007 -> Mon, 12 Feb 2007< code.20070211.log - code.20070213.log >
--- Log opened Mon Feb 12 00:00:30 2007
00:03
< Serah-Lost>
[180448] ( ToxicFrog ) Serah-Lost: tried VDMSound? <- Only handles sound, not EMS. Although it may enable EMS support for sound devices. Although I need standard EMS support.
00:03
< Serah-Lost>
There might be a BIOS fix.
00:03
< Serah-Lost>
But since I didn't want to lose my 14wks 2days 3hrs 37mins uptime. I just went with crappy dosbox emulation.
00:04
< Serah-Lost>
My uptime is just to spite people who says windows can't stay up.
00:11
<@ToxicFrog>
Erm.
00:11
<@ToxicFrog>
VDMSound also fixes some issues with memory.
00:11
<@ToxicFrog>
I don't know how completely, but I do know that games I had that wouldn't work because of EMS/XMS woes started working once VDMS was installed.
00:12
< Serah-Lost>
Doesn't for me.
00:12
<@ToxicFrog>
It's in Properties->Advanced->Compatibility->Enable EMS
00:12
< Serah-Lost>
VDMS clears up some of the EMS already in place.
00:12
< Serah-Lost>
Worketh not either.
00:12
< Serah-Lost>
I hav tried this too.
00:12
<@ToxicFrog>
Fooey.
00:12
<@ToxicFrog>
What game is this?
00:12
< Serah-Lost>
I even have the EMS driver, but XP refuses to acknowledge it.
00:12
< Serah-Lost>
Master of magic.
00:13
<@McMartin>
Does that run in teh d0sb0xx0rz?
00:13
<@ToxicFrog>
Well, the EMS driver is for DOS, and even if it were for windows DOS games run inside an emulator in XP.
00:13
<@McMartin>
Well, I actually meant the program "DosBox", and the answer is "As of 0.65, yes"
00:14
<@McMartin>
So, http://dosbox.sf.net/ 4tw.
00:14
<@ToxicFrog>
McMartin: I was replying to Serah's comment on the EMS driver, and why having it won't make any difference in XP.
00:15
<@ToxicFrog>
And she's already running it in dosbox.
00:15
<@McMartin>
Aha.
00:16
<@ToxicFrog>
Serah-Lost: http://home.nycap.rr.com/moonsword/masterofmagic-faq.htm <-- did adding EMM=RAM help?
00:16
< Serah-Lost>
Nope.
00:17
< Serah-Lost>
But it might also have required a reboot, which I did not.
00:17
< Serah-Lost>
And yes it runs in dosbox.
00:17
<@ToxicFrog>
No, it won't require a reboot. This is all configuration for the *dos emulator*
00:17
< Serah-Lost>
Then it didn't.
00:17
<@ToxicFrog>
Which - unlike most parts of windows - can actually be reconfigured without rebooting.
00:17
< Serah-Lost>
Many parts of windows can.
00:18
< Serah-Lost>
Most parts just tells you to reboot because it likes to.
00:18
< Serah-Lost>
WinXP rarely, if ever, uses the registry.
00:18
<@ToxicFrog>
...ahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha
00:18
< Serah-Lost>
I've worked my bøx ( this one ) fine for about a week without a registry.
00:18 * ToxicFrog dies
00:18 * Serah-Lost patpats TF's body and buries it.
00:18
<@McMartin>
Registry modifications often don't require reboots.
00:18
< Serah-Lost>
And I'm not exactly running standard windows.
00:18
< Serah-Lost>
I don't know what does.
00:19
< Serah-Lost>
Whatever it is, has been postponed many a time from this side.
00:19
<@McMartin>
Generally, the kind of thing that would require you to restart a service.
00:19
<@ToxicFrog>
Typically, service restarts or installation of kernelspace DSOs.
00:19
<@ToxicFrog>
The former can actually be done by hand without a reboot, mostly.
00:19
<@ToxicFrog>
The latter cannot.
00:19
<@McMartin>
So, modprobe or anything in /etc/init.d/
00:19
<@ToxicFrog>
Yes, pretty much.
00:20
< Serah-Lost>
Ok, fine.
00:21
< Serah-Lost>
You can laugh at me.
00:21
< Serah-Lost>
I bet that's the purpose of the channel.
00:21
< Serah-Lost>
Happy now?
00:21
<@ToxicFrog>
Well, no.
00:21
< Serah-Lost>
I'm not.
00:21
<@ToxicFrog>
The purpose of the channel is to discuss coding and coding-related stuff.
00:21
< Serah-Lost>
And I'm nowhere nearer a solution either.
00:21
<@McMartin>
Why isn't DosBox a sufficient solution?
00:21
< Serah-Lost>
I would think EMS compatability for WinXP be part of coding, or not?
00:21
<@ToxicFrog>
However, it gets annoying when someone makes claims about their system configuration that are obvious fabrications, to no purpose.
00:21
< Serah-Lost>
Because I have a 5 year old machine, and it runs like crap?
00:21
<@ToxicFrog>
EMS is a dos construct.
00:21
<@ToxicFrog>
It has no relevance to XP or any NT-based windows.
00:22
< Serah-Lost>
Was that too hard to say?
00:22
<@McMartin>
It had alreayd been said three times.
00:22
<@ToxicFrog>
NTVDM has the capability to grab a block of main memory and use it to emulate EMS, as does DosBox.
00:22
< Serah-Lost>
Or were you just being a jerk because you like it?
00:22
< Serah-Lost>
McMartin, in a slightly different, and very condescending tone, yes.
00:22
<@McMartin>
16:13 <@ToxicFrog> Well, the EMS driver is for DOS, and even if it were for windows DOS games run inside an emulator in XP.
00:22
<@McMartin>
That's neutral.
00:22 Janus is now known as Jan[epiphany]
00:23
< Serah-Lost>
Did I dispute it?
00:23
< Serah-Lost>
And if not: Why are we having this conversation?
00:23
<@McMartin>
You said it had only been mentioned in a condescending way, and this is demonstrably false
00:23
< Serah-Lost>
And if so: I clearly am a moron, but I'm mature enough to be told that to my face.
00:24
< Serah-Lost>
Laughing at me, or having to reiterate to the point of silliness is just stupid.
00:24
< Serah-Lost>
Can we get ovr this topic now? Myes?
00:24
< Serah-Lost>
Over* Sorry.
00:24
<@McMartin>
There are at least two going on, but whatever
00:25
< Serah-Lost>
NTVDM is not the sound device?
00:25
< Serah-Lost>
I don't think I found anything regarding NTVDM when I scoured the net for my solution.
00:26
<@ToxicFrog>
NTVDM is the NT Virtual DOS Machine.
00:26
<@ToxicFrog>
The DOS emulator built into XP.
00:27
< Serah-Lost>
Oh.
00:27
< Serah-Lost>
Doesn't seem to do much help to me either.
00:27
<@ToxicFrog>
It emulates video well, memory decently and sound not at all.
00:27
<@ToxicFrog>
VDMS fixes the issues with sound and memory.
00:27
< Serah-Lost>
And no sound is an agreeable compromise.
00:27
<@ToxicFrog>
Not if you're gaming, IMO. There are few games where you can toss the sound without damaging the experience.
00:28
<@ToxicFrog>
But it was mostly meant for dos *apps*, not games.
00:28
< Serah-Lost>
^_^
00:28
<@ToxicFrog>
Hence MS's complete apathy towards fixing it, and the creation of VDMS.
00:28
< Serah-Lost>
Thank you, but I tried the sound thingie, and the EMM=RAM
00:29
< Serah-Lost>
I also tried to increase dosbox's performance, which helped slightly, but that's about it.
00:31
<@ToxicFrog>
That is quite odd, because it should, theoretically, work find in NTVDM+VDMS unless it's doing something really bizarre, like say Terra Nova's video routines.
00:31
<@ToxicFrog>
And if it was doing something that bizarre DOSBox should fall over and die as well.
00:32
< Serah-Lost>
I'll try fidgetting with some of the legacy support, see if I didn't mangle it too bad.
00:44 * ToxicFrog nods
00:51 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, @MahalWORK, Raif, AnnoDomini, @jerith
00:51 Netsplit over, joins: Chalain, Vornicus, jerith, MahalWORK, Raif
00:51 mode/#code [+o Chalain] by ChanServ
00:51 mode/#code [+o Vornicus] by ChanServ
00:51 Netsplit over, joins: Pi
00:51 mode/#code [+o jerith] by ChanServ
00:51 Netsplit over, joins: AnnoDomini
00:51 mode/#code [+o Raif] by ChanServ
00:51 Serah-Lost [~-@87.72.36.ns-26407] has quit [Nick collision (older nick overruled)]
00:51 Serah-Lost [~-@87.72.36.ns-26407] has joined #Code
00:51 ServerMode/#Code [+o MahalWORK] by Troika.TX.US.Nightstar.Net
00:51 mode/#code [+o Pi] by ChanServ
00:51 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has quit [Operation timed out]
00:51 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has joined #code
00:51 mode/#code [-o MahalWORK] by ChanServ
00:51 mode/#code [+o McMartin] by ChanServ
00:51 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: EvilDarkLord, Jan[epiphany], Chalcedon
00:51 ReivWork [~reaverta@IRCop.Nightstar.Net] has quit [Ping Timeout]
00:54 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has quit [Ping Timeout]
00:54 Netsplit DeepThought.NY.US.Nightstar.Net <-> Troika.TX.US.Nightstar.Net quits: @Pi, MahalWORK, @Raif, AnnoDomini, Serah-Lost
--- Log closed Mon Feb 12 00:55:40 2007
--- Log opened Mon Feb 12 01:02:06 2007
01:02 TheWatcher[zZzZ] [~chris@Nightstar-29731.dsl.in-addr.zen.co.uk] has joined #code
01:02 Irssi: #code: Total of 14 nicks [5 ops, 0 halfops, 0 voices, 9 normal]
01:02 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
01:02 Irssi: Join to #code was synced in 29 secs
01:28 mode/#code [+o Chalain] by ChanServ
01:28 mode/#code [+o Vornicus] by ChanServ
01:28 mode/#code [+o jerith] by ChanServ
01:28 mode/#code [+o Raif] by ChanServ
01:28 mode/#code [+o Pi] by ChanServ
01:28 mode/#code [+o Chalcedon] by ChanServ
01:29 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
01:29 mode/#code [+o ToxicFrog] by ChanServ
01:29 Thaqui is now known as NSGuest-400
01:30 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has joined #code
01:30 mode/#code [+o McMartin] by ChanServ
01:46 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
01:55 NSGuest-400 is now known as Thaqui
02:11 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Ping Timeout]
02:13 NSGuest-411 [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
02:20 Vornicus is now known as Vornicus-Latens
02:22
<@ToxicFrog>
I need some way to nest OpenGL and DirectX rendering surfaces.
02:22
<@ToxicFrog>
Then I could play TA and keep Guild Wars in a little window on the side.
02:22
<@ToxicFrog>
And when we're finally ready to do the mission, pause TA and swap them.
03:01 NSGuest-411 is now known as Thaqui
03:08 Syloq is now known as Syloqs-AFH
03:09 Jan[epiphany] [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Charge!]
04:36 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
04:40 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
04:40 mode/#code [+o Chalcedon] by ChanServ
05:09 ReivWork is now known as Reiver
06:46
< Reiver>
Is there a straightforward way to check what version of SATA your HD runs?
06:50 Syloqs-AFH [Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
06:55
< Reiver>
I am trying to decide as to the financial utility of buying a pair of 160GB drives to go with my current 160GB, and having a RAID array with a parity drive.
06:55
< Reiver>
Vs whatever-the-sweetspot-is-for-a-single-drive.
07:15
< Thaqui>
Unless there's an obvious need for it, I'd advise against RAID on a personal PC.
07:15
< Thaqui>
(Except maybe RAID0)
07:16
< Reiver>
Call it "I have a 160GB HD, two 160s costs approximately the same as one 400 (Is that the sweetspot btw?), and I feel like being a paranoid SOB."
07:16
< Reiver>
Primarily due to having failed entire semesters of coursework due to hard drive failures, and this paranoia has thus rubbed off onto my forward-planning for the new computer...
07:17
< Thaqui>
Just have 3x160GB HDs and DVD backups :)
07:17
< Reiver>
It would basically let me re-use my old 160 as a parity drive for the two new ones. I frankly don't actually need the actual space, so >.>
07:17
< Reiver>
I haven't even filled my 160 yet.
07:17
< Thaqui>
Until I visit with MY drives :D
07:17
< Reiver>
Doubling the capacity is forwardproofing.
07:18
< Reiver>
And if I was going to do 3x160, I'd just go the sweetspot. Which by eyeballing seems to be a 400GB atm.
07:18
< Thaqui>
I would say that would be a better idea.
07:18
< Thaqui>
400GB and run a script to replicate your data to another drive :D
07:19
< Reiver>
I don't have another drive, Thaq.
07:19
< Thaqui>
The 400 and the 160?
07:19
< Thaqui>
So you'd have your data on BOTH drives.
07:19
< Reiver>
Only 160GB of the 400 would be backed up, though.
07:20
< Reiver>
I could back up the whole lot if I went the RAID route.
07:20
< Reiver>
(With, granted, only limited failure-protection. But.)
07:20
< Thaqui>
How much of your data would you actually need backed up?
07:20
< Thaqui>
If you're anything like me, the non-recoverable stuff would fit on half a DVD.
07:21
< Reiver>
If you're anything like me, there's not going to be a DVD.
07:21
< Reiver>
>.>
07:22
< Reiver>
Backing up is an awesome theory that I invest DVD writers and blank DVDs in for.
07:22
< Reiver>
I then leave them in the corner and apparently expect them to function by osmosis or something... >.>
07:22
< Reiver>
Possibly diffusion.
07:24 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Quit: ]
07:25
< Thaqui>
If you've suffered a failure, you really should :P
07:26
< Reiver>
I know I should.
07:26
< Reiver>
This doesn't mean I do.
07:26
< Reiver>
Hence the ponderance of "At least if I had a RAID, it would all sort of do it for me".
07:27
< Thaqui>
So would a script :)
07:27
< Thaqui>
It would just be cheaper, really.
07:27
< Reiver>
Assuming my current HD is compatable, it would be approximately the same price, actually.
07:27
< Reiver>
I'd just miss out on, uh. 80GB.
07:29
< Thaqui>
and this backup thing is really striking a chord now that I've lost 2 partitions >.<
07:29
< Thaqui>
Ones that contained all my data...
07:39
< Reiver>
Yes.
07:39
< Reiver>
Yes indeed.
07:39
< Reiver>
:p
10:07 You're now known as TheWatcher[wr0k]
10:11 MyCatVerbs [~rb6822@Nightstar-23390.cs.bris.ac.uk] has joined #code
10:17 Vornicus-Latens is now known as Vornicus
10:56
< MyCatVerbs>
...
10:57
< MyCatVerbs>
To: every researcher and programmer who ever worked on Haskell.
10:57
< MyCatVerbs>
Subject: Y'all rock.
10:57
< MyCatVerbs>
Content: MY CODE WORKS FIRST TIME I RUN IT! IT! FUCKING! WORKS! YOU MIRACULOUS WONDERFUL BASTARDS!
10:58 Reiver is now known as ReivZzz
11:09 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has quit [Quit: Leaving]
11:53 Serah-Lost [~-@87.72.36.ns-26407] has quit [Ping Timeout]
12:00 Serah-Lost [~-@87.72.36.ns-26407] has joined #Code
12:12 MyCatVerbs [~rb6822@Nightstar-23390.cs.bris.ac.uk] has quit [Quit: Lunch!]
12:48 MyCatVerbs [~rb6822@Nightstar-18281.cs.bris.ac.uk] has joined #code
13:32 gnolam [Lenin@Nightstar-13557.8.5.253.se.wasadata.net] has joined #Code
13:54 MyCatVerbs [~rb6822@Nightstar-18281.cs.bris.ac.uk] has quit [Quit: Swim, swim, hungry!]
15:19 MyCatVerbs [~rb6822@Nightstar-18501.cs.bris.ac.uk] has joined #code
15:38
<@ToxicFrog>
ReivZzz: (1) you can probably see what SATA version it is on boot (2) perhaps a cron job that tells you to BACK YOUR STUFF UP every week or something? (3) what you probably want is RAID5, which doesn't have a parity drive, it has a drive's worth of parity - not quite the same thing.
15:38
<@ToxicFrog>
MyCatVerbs: what does it do?
15:39
< MyCatVerbs>
ToxicFrog: what does what do, please? I've quit, logged on at another terminal and lost all my backscroll.
15:40
< AnnoDomini>
<MyCatVerbs> Content: MY CODE WORKS FIRST TIME I RUN IT! IT! FUCKING! WORKS! YOU MIRACULOUS WONDERFUL BASTARDS!
15:40
<@ToxicFrog>
That.
15:41
< MyCatVerbs>
ToxicFrog: fairly simple string manipulation.
15:41
< MyCatVerbs>
But it's fun to do it in an arbitrarily complicated way and have it work perfectly on first run anyway. ^^
15:43
<@ToxicFrog>
Aah.
15:43
< MyCatVerbs>
AnnoDomini: yes, I swear to whatever Gods any random person might wish to worship, if I ever meet one of GHC's implementers or maintainers in person, I will hug them.
15:44
< MyCatVerbs>
Oh and <bitching> my prof makes me use BSD-style bracing and indentation even though Sun's own documents on Java use the One True Brace Style </bitch> =D
15:45
< MyCatVerbs>
Oh yeah, just offhand, anyone happen to have read any design patterns books? I'm implementing one right now but I don't know what the official (?) name for it is.
15:47
< MyCatVerbs>
I'm using an interface base class and passing around a couple of classes which implement it as substitutes for first-class functions.
15:53
<@ToxicFrog>
...Haskell doesn't have first-class functions?
15:54 You're now known as TheWatcher
15:55
< MyCatVerbs>
ToxicFrog: hmmm?
15:55
< MyCatVerbs>
Yes, oh fuck yes it does.
15:55
< MyCatVerbs>
Java doesn't, though. We have to write all our programs for one of these units twice - once in Haskell and once in Java.
15:55
<@ToxicFrog>
Oh.
15:56
<@ToxicFrog>
In that case, that sounds kind of like the Visitor pattern.
15:56
<@ToxicFrog>
But you'd have to ask someone who actually knows design patterns to be sure.
15:56
<@ToxicFrog>
And now, class.
15:56
< MyCatVerbs>
So, just to take the piss, I'm reimplementing a chunk of my Haskell program pretty much vertabim in Java. =D
15:56
< MyCatVerbs>
I thought Visitor was a substitute for map?
15:56
< MyCatVerbs>
Iono, I don't know these either.
15:58
<@ToxicFrog>
Visitor, AIUI, is: you have an interface that defines Visit(); you have a class that implements that; you instantiate that class and pass it to some set of objects which each call visitorObj.Visit(this)
15:58
<@ToxicFrog>
Which you're right, that's a specific use, not the same thing.
15:58
<@ToxicFrog>
I think it's "an ugly hack to get around the lack of first-class functions", then~
15:58
<@ToxicFrog>
And now I really do have to run.
15:59
< MyCatVerbs>
Thanks. Have fun.
16:34 AnnoDomini [~farkoff@Nightstar-29194.neoplus.adsl.tpnet.pl] has quit [Quit: Juffo-Wup is a *candle*. It is filled with many *candy bars*.]
16:37 AnnoDomini [~farkoff@Nightstar-29194.neoplus.adsl.tpnet.pl] has joined #Code
16:47 * ToxicFrog kills C++ right in the goddamn face for not having first-class classes
16:49
< MyCatVerbs>
ToxicFrog: first-class classes? You mean like how it *only* has the template system, polymorphism through inheritance and nothing else?
16:52
< MyCatVerbs>
OTOH, in spite of all this whining I do, there's not exactly many languages that can even hope to come close to Java as regards the standard libraries... <3
16:53 Chalcedon [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has joined #code
16:53 mode/#code [+o Chalcedon] by ChanServ
16:54
<@ToxicFrog>
MyCatVerbs: Java doesn't have first-class classes either, AFAIR.
16:54
<@ToxicFrog>
What I want is to be able to go something like:
16:55
<@ToxicFrog>
Surface::Surface(unsigned long x, unsigned long y, PixelClass px_c)
16:55
<@ToxicFrog>
And have it go:
16:55
<@ToxicFrog>
this->data = new px_c[w*h]
16:56
<@ToxicFrog>
I can do this in Lua. I might be able to do it in Javascript. In C++ or Java it means messing around with PixelFactory classes.
16:57
<@ToxicFrog>
...and, fuck, I can't declare something as an object of a class that contains pure virtuals?
16:57 * ToxicFrog stabs
16:59
<@Vornicus>
um
17:00
<@Vornicus>
you should be able to declare that something is of an abstract class... but you need to assign either null or an object of a concrete subclass to it.
17:00
<@Vornicus>
But, uh, that looks like a job for templates in C++/Java
17:01
<@ToxicFrog>
...oh, wait, there's the problem.
17:01 * ToxicFrog quietly changes "Pixel tmp" to "Pixel * tmp"
17:01
< MyCatVerbs>
ToxicFrog: "class PixelThing implements PixelInterface" ?
17:02
<@ToxicFrog>
I've been working with references too long, I've forgotten my pointer-fu.
17:02
< MyCatVerbs>
ToxicFrog: "interface PixelBlah { int getSomething(); void setSomething(); }"
17:02
<@ToxicFrog>
I keep expecting "Pixel tmp" to be an indirect reference to a Pixel object.
17:02 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has quit [Operation timed out]
17:02
<@ToxicFrog>
Vornicus: why is it a job for templates?
17:03
<@ToxicFrog>
MyCatVerbs: no, it's a job for inheritance.
17:03
<@ToxicFrog>
I have various kinds of pixel (8888, 8880, 8bpp greyscale, bitmap, etc)
17:03 McMartin [~mcmartin@Nightstar-8547.dsl.pltn13.pacbell.net] has joined #code
17:03 mode/#code [+o McMartin] by ChanServ
17:04
< MyCatVerbs>
ToxicFrog: well, even if it isn't a job for inheritance, inheritance still seems to be the only language feature with which you can implement it. >_>
17:04
< MyCatVerbs>
And it *will* work, in spite of sucking major ass.
17:06
<@ToxicFrog>
Then it's a good thing it is a job for inheritance, isn't it?
17:06 * ToxicFrog glares
17:06
< MyCatVerbs>
What? Oh fuck, right.
17:07
< MyCatVerbs>
Wait, what the fuck's the difference in practice between "interface blah" "x implements blah" and "class blah" "x extends blah"?
17:07
< MyCatVerbs>
(Assuming the special case that x only implements a single interface.)
17:07
<@ToxicFrog>
The interface doesn't specify *any* implementation.
17:07
<@ToxicFrog>
It doesn't inherit any methods, data members, etc from it.
17:07
<@ToxicFrog>
Only method signatures.
17:08
< MyCatVerbs>
Ahhhh.
17:08
<@ToxicFrog>
Whereas with inheritance, you get any data members and non-overriden methods from the superclass.
17:08
< MyCatVerbs>
But you can still face inheritance using interfaces by using masses of get and set methods. =D
17:08
< MyCatVerbs>
*fake
17:08
<@Vornicus>
It's a job for templates because you have various kinds of thing that you are storing.
17:09
<@ToxicFrog>
Vornicus: but they're all subclasses of Pixel!
17:09
<@ToxicFrog>
This is what polymorphism is for!
17:09
<@Vornicus>
I'm obviously failing to see the problem here.
17:09
< MyCatVerbs>
Vornicus: it's a job for inheritance because the Pixels' types aren't defined at compile time.
17:10
< MyCatVerbs>
And, uh, doesn't Java, like, y'know... not *have* a template system?
17:10
<@ToxicFrog>
I'm not working in Java.
17:10
<@ToxicFrog>
Thank god.
17:10
<@ToxicFrog>
I'm working in C++.
17:10
< MyCatVerbs>
Wait, C++. Duh.
17:10 * MyCatVerbs stabs himself in the face.
17:10
<@ToxicFrog>
Which doesn't have an interface system.
17:11
< MyCatVerbs>
Sorry! I'm a fucking idiot! *hides*
17:11
<@ToxicFrog>
Vornicus: my point is, I should be able to say "this is a big array of Pixels" and manipulate it using methods common all Pixel subclasses.
17:11
<@ToxicFrog>
Rather than "this is a big array of some arbitrary type"
17:11
<@ToxicFrog>
And in fact I can do this, if I make it an array of Pixel pointers rather than Pixels per se.
17:11
< MyCatVerbs>
ToxicFrog: so, uh, can't you? I mean, is it for some reason not working?
17:12 MahalWORK is now known as Mahal
17:12
< MyCatVerbs>
Ah, righto.
17:12
<@ToxicFrog>
However, I can't say, "initialize yourself to use this specific kind of Pixel"
17:12 * MyCatVerbs hugs Mahal.
17:12
< Mahal>
Hello MCV
17:13
< MyCatVerbs>
ToxicFrog: for (int i=0;i<arraysize;i++) { pixelpointers[i] = new SubClassOfPixel(params); } ?
17:13
<@ToxicFrog>
If I want, say, a bitmap, I either have to (1) subclass Surface so that the subclass defaults to BitPixel; (2) pass Surface a BitPixelFactory object; or (3) create a function in Surface that initializes it with BitPixels
17:13
< MyCatVerbs>
Or you could just make one class for the whole array?
17:13
<@ToxicFrog>
MyCatVerbs: yes, the point is where does that code go
17:13
<@ToxicFrog>
See above
17:13
<@ToxicFrog>
I can't just make a generic initializer that takes a Pixel subclass and fills the array with it.
17:13
< MyCatVerbs>
Make a "BigChunkyArrayOfPixels" class and subclass it to 8pp, paletted, grayscale...?
17:14
< MyCatVerbs>
I mean, wrap the array *itself* in an object rather than its elements?
17:14
<@ToxicFrog>
I have to either make a class tree of PixelFactory classes, or I have to create a seperate initializer function for each pixel format.
17:14
<@ToxicFrog>
In that case I might as well subclass Surface itself.
17:14
<@ToxicFrog>
Which is meant to be the wrapper around a WxH grid of pixels of arbitrary format.
17:14
< MyCatVerbs>
k. Any particular reason you don't want to do that?
17:15
<@ToxicFrog>
Yes. I want to be able to create a surface and be confident that it can hold anything I toss at it, potentially to the point of changing its pixel format.
17:15
<@ToxicFrog>
In Lua I could actually have it change type in mid-call, but C++ isn't that flexible.
17:16
< MyCatVerbs>
So have Surface be an object that keeps a pointer to a class that wraps the actual data for the WxH grid itself, perhaps.
17:17
< MyCatVerbs>
And then does things like reallocates that to a wider format if neccessary
17:17 * ToxicFrog throttles C++
17:18
<@ToxicFrog>
Right. But that still leaves me with one tree of pixel classes, and one tree of containers/generators/whatever for them.
17:18
< MyCatVerbs>
ALTERNATIVELY! Pretend you're a C programmer, take five minutes out of this OO obsession and do it the easy way.
17:18
<@ToxicFrog>
Which kind of defeats the purpose of OO.
17:19
< MyCatVerbs>
Nuhuh, the purpose of OO is to make life easier for yourself. If it's in the way, it's perfectly valid to revert to ugly old-fashioned mechanisms within a class and have the class nicely encapsulate the ugly bits so that the rest of the system doesn't get any headaches from it.
17:20
<@ToxicFrog>
And the non-OO way would be easier...how, exactly?
17:21
< MyCatVerbs>
ToxicFrog: ...have you forgotten how to program in plain C or something? "enum type { eightbpp, twentyfourbitcolour, blahblahblah }; char* enormousgridofpixeldata; int width, int height;..."
17:23
<@Vornicus>
...arg, I'd swear there was a way to do this.
17:25 You're now known as TheWatcher[afk]
17:25 Chalcedon is now known as ChalcyZzz
17:25
<@Vornicus>
It's something like PileOfPixels<Px extends Pixel> or something, I think
17:29
<@Vornicus>
is your class declaration.
17:30
<@Vornicus>
Well, okay, that's Java.
17:31
<@Vornicus>
In C++ you can't explicitly declare that a templated type has to be of a specific type... but that doesn't mean you can't demand that it has certain properties. Consider the allocator and comparator classes used by Map
17:33 AnnoDomini [~farkoff@Nightstar-29194.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
17:34 AnnoDomini [~farkoff@Nightstar-29770.neoplus.adsl.tpnet.pl] has joined #Code
17:36
<@ToxicFrog>
MyCatVerbs: I know how to do it.
17:37
<@ToxicFrog>
I'm just questioning your assertion that this would be in any way better.
17:38
< MyCatVerbs>
ToxicFrog: well, suddenly find yourself no longer pissing about and worrying about how to do it with class hierarchies and actually instead getting on with it.
17:42 * Vornicus looks at MyCatVerbs' C suggestion, /flees screaming/
17:45
<@ToxicFrog>
Quite.
17:45 * ToxicFrog gives up trying to determine which header defines max
17:46 * ToxicFrog gives up trying to determine which header defines max(), macroizes it himself
17:50 ReivZzz is now known as ReivWork
17:52
<@ToxicFrog>
Hmm.
17:52
<@ToxicFrog>
If I allocate a new pointer, is it guaranteed to be NULL?
17:53
<@ToxicFrog>
That is to say, if I go something like:
17:53
< MyCatVerbs>
ToxicFrog: FIZZUCK NO!
17:53
<@Vornicus>
No.
17:53
<@ToxicFrog>
Pixel ** foo = new Pixel*;
17:53
<@ToxicFrog>
is foo NULL?
17:53
<@ToxicFrog>
...dammit.
17:53
< MyCatVerbs>
In Java, yes. In C, THAT PATH IS THE ROAD TO INSANITY AND PAIN!
17:53
< MyCatVerbs>
Er, C++ too.
17:53 * ToxicFrog whips out calloc()
17:53
< MyCatVerbs>
Down, boy! =D
17:54
< MyCatVerbs>
ToxicFrog: might I suggest memset() instead? new and delete operators are a good feature of C++, let's not be undermining them now, please?
17:54
<@Vornicus>
Unlike Java, C does not clean up space it sets up behind a variable name before making it available. And it (usually) doesn't yell at you for trying to read uninitialized data.
17:55
<@ToxicFrog>
..memset. That's what I was forgetting.
17:55
<@ToxicFrog>
Vornicus: well, C gives you calloc.
17:55
<@ToxicFrog>
And I think there are certain guarantees regarding statics as well.
17:56
< MyCatVerbs>
ToxicFrog: look me in the eye and tell me you're brave enough to rely on those. =D
17:56
<@ToxicFrog>
I am, actually.
17:57
<@ToxicFrog>
I rely on them regularly when working in C.
17:58
< MyCatVerbs>
Nice.
17:58
< MyCatVerbs>
I am in awe of your gigantic, world-conquering cojones. =D
17:59
<@ToxicFrog>
Hmm.
17:59
<@ToxicFrog>
Surface::Load().
17:59
<@ToxicFrog>
static function that returns a new surface, or member function that loads a file into this?
18:02
<@jerith>
If it doesn't take a parameter, I'd guess the former.
18:03
<@ToxicFrog>
It's Surface:Load(const char * filename)
18:03
<@jerith>
Then again, relying on the method name for *anything* is a slippery slope to Cthulhian horrors.
18:03
<@ToxicFrog>
And, um.
18:03
<@ToxicFrog>
I wasn't saying "what do you think it is"
18:03
<@ToxicFrog>
I was saying "what should it be"
18:03
<@ToxicFrog>
Since I'm writing this
18:04
< MyCatVerbs>
ToxicFrog: well, use his guess as a guideline then.
18:04
< MyCatVerbs>
ToxicFrog: thus following the rule of least surprise. ^^
18:05
<@jerith>
I'd make it the latter and have a constructor to do the former.
18:07 * ToxicFrog nods
18:21
<@Vornicus>
Though technically you may be better off having it take an istream - that way you can use it on redirected input and sockets.
18:29
<@ToxicFrog>
At the moment it's based on the reference PGM loader code, which expects a filename and uses cstdio.
18:29
<@ToxicFrog>
Eventually I'll go back and change it, but at the moment getting the program working takes priority.
18:29
<@Vornicus>
right
18:38 You're now known as TheWatcher
18:46
<@ToxicFrog>
...that's why testing is so slow.
18:46
<@ToxicFrog>
I have it loading the test images off an sshfs-mounted drive.
18:46
<@ToxicFrog>
Oops.
18:52
<@ToxicFrog>
...hmm,.
18:53
<@ToxicFrog>
I have a Pixel* which is probably actually a subclass.
18:53
<@ToxicFrog>
I need to make a copy of it.
18:53
<@ToxicFrog>
Ie, foo = new <actual type the pointer points to>
19:04
<@ToxicFrog>
$ time ./segment rose.pgm rose-bin.pgm
19:04
<@ToxicFrog>
Loading image (rose.pgm): done
19:04
<@ToxicFrog>
Performing threshold analysis: (threshold: 137) done
19:04
<@ToxicFrog>
Performing connected object analysis: done (found 134519874 objects)
19:04
<@ToxicFrog>
real 0m2.733s
19:04
<@ToxicFrog>
user 0m2.548s
19:04
<@ToxicFrog>
sys 0m0.176s
19:06
<@ToxicFrog>
The connected object analysis function is currently a placeholder that returns uninitialized memory~
19:13
<@ToxicFrog>
...shiiiit.
19:13
<@ToxicFrog>
I think there's a bug in my threshold analysis.
19:13
<@ToxicFrog>
It comes up with 137 no matter what image I feed it.
19:13 MyCatVerbs [~rb6822@Nightstar-18501.cs.bris.ac.uk] has quit [Quit: Gotta go, hungry.]
19:14
< AnnoDomini>
Why does MCV log out when he wants to eat?
19:17 Thaqui [~Thaqui@Nightstar-26359.jetstream.xtra.co.nz] has joined #code
19:17
<@ToxicFrog>
141 0.697525 0.302475 166419659465808000.000000
19:17
<@ToxicFrog>
142 180.217972 -179.217972 -72568917364008608.000000
19:17
<@ToxicFrog>
Ok, that's wrong.
19:18
<@ToxicFrog>
Those second two numbers should *always* be >= 0, <= 1, and sum to 1.
19:18
<@Vornicus>
Well. They /do/ add to 1
19:19 Mahal is now known as MahalWORK
19:19
<@ToxicFrog>
Yes, but they aren't in the 0..1 range.
19:20
<@ToxicFrog>
(unrelated: some people in OCUS are watching a roast of William Shatner. One of the roasters: "but, in all honesty, you are one of my heroes, and if you'd be so kind as to help settle a bet I have with some of my friends...*hands him a paper bag* could you act your way out of this, please?")
19:21
<@Vornicus>
(heee)
19:23 AnnoDomini [~farkoff@Nightstar-29770.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
19:26
<@ToxicFrog>
Ok. Otsu() working.
19:27
<@ToxicFrog>
Now I just need to implement Warshell().
19:28
<@Vornicus>
Otsu and Warshell?
19:30
<@ToxicFrog>
Otsu takes an image and generates a bitmap that's the image divided into foreground and background, using a luminance histogram and statistical analysis.
19:30 AnnoDomini [~farkoff@Nightstar-29149.neoplus.adsl.tpnet.pl] has joined #Code
19:30
<@ToxicFrog>
Warshell takes such a bitmap and calculates the number of connected objects in it.
19:32
<@Vornicus>
aha
19:43
<@ToxicFrog>
This is not as simple as it sounds and involves some fairly nasty matrix math.
19:44 ChalcyZzz is now known as Chalcedon
19:49
<@Vornicus>
It actually sounds mindbogglingly difficult.
20:16
<@ToxicFrog>
Well. I would have thought, off the top of my head, that it consists of "count the number of discrete regions flagged as foreground"
20:17
<@ToxicFrog>
Which is trivial.
20:17
<@ToxicFrog>
Instead, it's that followed by two pages of matrix ops.
20:20
< EvilDarkLord>
I'm glad all this math I'm taking at uni is going to come in handy some day.
20:21
<@Chalcedon>
does anybody have any opinions on Delphi?
20:22
<@jerith>
Fun language, but too bondage-and-discipline.
20:22
<@Chalcedon>
cos, apparently, that's what my programming course uses
20:22
<@jerith>
Then again, I haven't really looked at it since high school/
20:22
<@jerith>
And that was Delphi 3.
20:22
<@Chalcedon>
(I /finally/ tracked down a specific outline)
20:23
<@Chalcedon>
I doubt they'd specify version numbers
20:23
<@jerith>
Well, it's based on Pascal which was designed as a teaching language.
20:23 * Chalcedon nods
20:23 * Chalcedon reads wiki
20:23
<@jerith>
And Delphi adds Windows APIs and a decent object system to that.
20:24
<@Chalcedon>
ah ha. Delphi 5.
20:25 * Vornicus wishes people would actually use a language that's easy to learn.
20:25
<@jerith>
The basic language shouldn't have changed much, but the various libraries tend to evolve between versions.
20:26
<@jerith>
I prefer Delphi to Java, but I wouldn't trade Ruby or Python for it.
20:27
<@Chalcedon>
well, it looks a lot better than C++. As in, I can actually see what the Wiki example is doing.
20:27
<@jerith>
Also, being pretty much Windows only (I never managed to get Kylix to work properly) it's pretty useless to me.
20:27 * Chalcedon woes
20:28
<@Chalcedon>
That means I'm going to have to find my XP CDs and run a dual boot.
20:28
<@jerith>
I think you still have to manage resources by hand (no garbage collection) but the differences between Delphi and C++ aren't really all that big.
20:28 * Chalcedon sigh.
20:28
<@Chalcedon>
...garbage collection...?
20:28
<@jerith>
Well, variables live in memory.
20:29
<@Vornicus>
Garbage Collection: many languages, when a resource is no longer used, will automatically clear out the memory used by that resource.
20:29
<@Chalcedon>
you have to tell the memory to let them go again?
20:29
<@jerith>
What he said.
20:29 * Chalcedon spotted the last line in the example
20:29
<@jerith>
I was going to be all long winded and tiresome.
20:29
<@jerith>
But GC is a Good Thing.
20:29
<@Vornicus>
Without garbage collection, you have to specifically tell it to clean up the resource.
20:30
<@jerith>
Managing resources by hand usually leads to memory leaks or pointer bugs.
20:30
<@Vornicus>
C/C++ and Pascal/Delphi do not have garbage collection. Ruby, Python, and Java do.
20:30
<@Chalcedon>
so in say python. I create a variable, I use it then move on to something else. Python tells the memory that it can erase the variable. Withouth GC, you have to specifically tell the memory that you've finished and it can erase the variable otherwise it will hang on to it and you run out of memory?
20:30
<@Vornicus>
Right.
20:31
<@Vornicus>
Though, it only happens with certain kinds of resources.
20:31
<@Chalcedon>
ok.
20:32
<@Vornicus>
Things that fall out of scope (that is to say, you leave the function it's created in) often clean themselves up - in C++, things created with new must be cleaned up, other things generally do not.
20:33
<@jerith>
You probably won't be allocating memory directly, so it's pretty much only object you instantiate that need to be cleaned up in Delphi.
20:34 * Chalcedon nods
20:35
<@jerith>
I am of the opinion that everyone should have to build at least one nontrivial app in a non-GC language. It makes them appreciate their languages a lot more...
20:39
<@Chalcedon>
heh
20:42 * Chalcedon stops procrastinating and starts work
20:46 MyCatSleeps is now known as MyCatVerbs
20:47
< MyCatVerbs>
Chalcedon: eeeeexcellent strategy. I only wish I'd ever mastered it myself. =D
20:47
<@Chalcedon>
huh wot?
20:47
<@jerith>
22:39 * Chalcedon stops procrastinating and starts work
20:48
<@Chalcedon>
ah right
20:48
<@jerith>
And on that note, it's only about an hour past my bedtime...
20:48
<@jerith>
G'night all.
20:48
<@Chalcedon>
nini jerith
20:48
< MyCatVerbs>
jerith: sleep well.
20:49
<@Chalcedon>
MCO: having the rest of one's life hanging in the balance is an excellent motivator to stop procrastination.
20:49 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #Code
20:49
< MyCatVerbs>
Chalcedon: eep.
20:50
<@Chalcedon>
(this seems somewhat melodramatic, but I'm only slightly exaggerating when I say that if I don't have this ready for binding on monday, I can kiss my career goodbye).
20:50
< MyCatVerbs>
Okay, I'll stop bugging you on IRC.
20:50
<@Chalcedon>
ah, theses, can't live with 'em, can't work without 'em.
20:51
<@Chalcedon>
tis np, just don't bug me constantly
20:52 * Chalcedon strangle something
20:59 * ToxicFrog gives Chalcedon his Analysis of Algorithms prof to strangle
21:00 * Chalcedon strangles the prof, and leaves his battered body in an alleyway
21:00 * AnnoDomini loots the corpse.
21:07
<@Vornicus>
what did said prof do now?
21:09 * Vornicus offers TF a pike, for making-of-examples.
22:10
<@ToxicFrog>
aaaaugh why is this code not wooooorking
22:11 * ToxicFrog flails at it
22:11
<@McMartin>
I suggest 'chucks instead of mere flails.
22:13 You're now known as TheWatcher[T-2]
22:17 You're now known as TheWatcher[zZzZ]
22:19
<@ToxicFrog>
Aha.
22:19
<@ToxicFrog>
It is working.
22:19
<@ToxicFrog>
It just looks incredibly messed up when doing so.
22:20
<@ToxicFrog>
Which is what the hideous matrix math fixes.
22:20
<@ToxicFrog>
There's got to be a better way to do this.
22:27 Chalcedon is now known as ChalcyUni
22:40 ChalcyUni [~Chalceon@Nightstar-869.bitstream.orcon.net.nz] has quit [Ping Timeout]
23:32 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has quit [Ping Timeout]
23:33 MyCatVerbs [~mycatownz@Nightstar-379.dsl.in-addr.zen.co.uk] has joined #code
--- Log closed Tue Feb 13 00:00:30 2007
code logs -> 2007 -> Mon, 12 Feb 2007< code.20070211.log - code.20070213.log >