code logs -> 2008 -> Wed, 13 Aug 2008< code.20080812.log - code.20080814.log >
--- Log opened Wed Aug 13 00:00:10 2008
00:34 Derakon[AFK] is now known as Derakon
00:36 Thaqui [~Thaqui@Nightstar-26708.jetstream.xtra.co.nz] has joined #code
00:36 mode/#code [+o Thaqui] by ChanServ
00:36
< Vornicus>
If this were in, then I'd deprive some of my dwarves of rooms just to have hobos.
00:36
< Vornicus>
Seconded... and I would also ask for an implementation that allowed dwarves to give change to other dwarves.
00:37
<@Derakon>
Er, what are you responding to, Vorn?
00:38
< Vornicus>
This is another quote from the DF forums.
00:38
< Vornicus>
The sheer amount of comedy in there is impressive.
00:38
<@Derakon>
DF is a fount of serendipitous comedy.
00:40
< Vornicus>
The fact that so many of the forumgoers are themselves very funny people doesn't hurt.
01:00 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has quit [Quit: The screams are not loud enough.]
01:10 Attilla [~The.Attil@92.2.65.ns-20699] has quit [Ping Timeout]
01:12 Attilla [~The.Attil@92.2.65.ns-20699] has joined #code
01:12 mode/#code [+o Attilla] by ChanServ
01:33
< Shoukanjuu>
DF Forums?
01:36
< Vornicus>
Dwarf Fortress.
01:37
< Vornicus>
A game of much entertainment and also much frustration to programmers.
01:37
< Vornicus>
There have been many times when people here have thrown up their hands and said "I can code better than that!"
01:42
< Vornicus>
Though i really shouldn't denigrate Toady for his occasional complete fuckups; he's built one of the biggest procedural generation things out there.
01:43
< Vornicus>
Well. Denigrate too much.
02:13 Vornicus is now known as Vornicus-Latens
02:23 Mojo1978 [~Mojo1978@Nightstar-13370.hsi.ish.de] has quit [Connection reset by peer]
02:31 Consul [~darren@Nightstar-1916.dsl.sfldmi.ameritech.net] has quit [Quit: Ex-Chat]
03:19 Attilla [~The.Attil@92.2.65.ns-20699] has quit [Quit: <Insert Humorous and/or serious exit message here>]
03:21 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has quit [Quit: Z?]
03:43
<@McMartin>
12:47 * TheWatcher pokes his brainmeats, tries to remember if he's ever seen a portable c or c++ lib that will give him the absolute location of a file given the current dir and a relative path, of if he'll have to write one
03:43
<@McMartin>
I believe that boost::filesystem does this.
03:43
<@Derakon>
Hmm...that's one utility I'm gonna miss when I leave Amazon.
03:43
<@Derakon>
A little program called "realpath" that resolves all the symlinks for a file. Shouldn't be too hard to replicate.
03:44
<@McMartin>
You could probably do something horrible with `ls` and grep/awk to do it.
03:44
<@Derakon>
Heh.
04:48 Consul [~darren@Nightstar-1916.dsl.sfldmi.ameritech.net] has joined #code
04:53
< Consul>
And I'm not even halfway done with cataloging all of my vacuum tubes. :-(
06:03
< Shoukanjuu>
I can't seem to find sheet music for the kasandora song, from act raiser.
06:38 Derakon is now known as Derakon[AFK]
08:30 You're now known as TheWatcher
10:14 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
10:14 mode/#code [+o AnnoDomini] by ChanServ
11:03 Serah [~Z@87.72.35.ns-26506] has joined #Code
11:03 mode/#code [+o Serah] by ChanServ
11:05 Syloqs-AFH [~Syloq@Admin.Nightstar.Net] has quit [Connection reset by peer]
12:32 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:39 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
12:39 mode/#code [+o AnnoDomini] by ChanServ
12:41 Attilla [~The.Attil@92.2.65.ns-20699] has joined #code
12:41 mode/#code [+o Attilla] by ChanServ
13:29 Thaqui [~Thaqui@Nightstar-26708.jetstream.xtra.co.nz] has left #code [MORE constitution LESS destitution MORE pros...perity.]
13:58 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
14:56 Serah [~Z@87.72.35.ns-26506] has quit [Connection reset by peer]
15:08 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
15:08 mode/#code [+o ToxicFrog] by ChanServ
15:21 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has joined #Code
15:21 mode/#code [+o gnolam] by ChanServ
15:51 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
16:02 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
16:02 mode/#code [+o AnnoDomini] by ChanServ
16:04 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Ping Timeout]
16:04 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
16:29 * Consul questions the wisdom of choosing C++ for this project...
16:29
< jerith>
There is no wisdom in choosing C++ for any project.
16:29
< Consul>
It's hard to find help for, and it seems that every single third-party library or code we can find useful is written in C.
16:30
< Consul>
Well, some of the STL types are really handy.
16:30
< Consul>
The issue now, though, is that my partner on this project has written a lot of good working code in C++.
16:32
< Consul>
Oh, wait... There's actually one big important reason we went with C++
16:33
< Consul>
The FAUST language, which is a functional language for audio DSP, compiles to C++ only.
16:33
< Consul>
It takes advantage of abstract classes.
16:35
<@TheWatcher>
Consul: the fact that it's written in C does not mena you can't use it in c++
16:37
< Consul>
What, FAUST?
16:37
< Consul>
FAUST outputs optimized C++ code, as a set of classes.
16:40
< Consul>
So it would be a matter of wanting to use C++ code inside of C.
16:41
< Consul>
I just posted my misgivings to our project list. I guess I'll find out what happens from here.
16:43
< Consul>
In the meantime, I think I'll read my K&R C book.
16:43
<@TheWatcher>
No, I meant third-party libraries
16:43
< Consul>
Oh, I know.
16:43
< Consul>
I mean, I know I can use libs written in C.
16:45
<@ToxicFrog>
jerith: I disagree; C++ lets you do some things that are very hard to fake in C, and offers more tools for organizing large projects.
16:45
<@ToxicFrog>
It's just rarely the right choice.
17:11
<@McMartin>
Qt would be one of the places where it is.
17:12
<@McMartin>
Which I guess means that there are a fair number of places where it is excellent for somebody else to be writing C++ code.
17:13
<@McMartin>
(Also, yes. C++'s exceptions are not great, but they're infinitely better than setjmp/lngjmp. Also, Precise destruction gives you an unwind-protect mechanism that C entirely lacks.)
17:17
<@McMartin>
It's also not *too* difficult to provide a C wrapper around C++ libraries, so assuming you can get the C++ library to build, you can make a mini-C++ library that exports a bunch of extern "C" functions that C will happily call.
17:17
<@TheWatcher>
Exporting classes is another matter, but also doable ¬¬
17:18
<@McMartin>
Yeah, so don't do that, export functions that resolve to accessors~
17:18
<@McMartin>
And classes are directly representable as void *s as long as you never cast them before returns
17:18
<@McMartin>
Since C++ casts will mutate pointer values.
17:18
<@McMartin>
By which I mean "where they point"
17:19
<@McMartin>
This is one of the few places where Java and C# are actually closer to C than C++ is.
17:22
<@TheWatcher>
the technique I'm using is to have an abstract base class that the class in the library derives from, and have two extern C functions in the library to create and destroy instances of the class. Then use the base class throughout the client code. Means that the class in the library can't add functions, but for my purposes that's not needed.
17:23
<@McMartin>
Yeah, that's fine
17:23
<@McMartin>
(I'm a big fan of factory methods over direct construction *anyway*)
17:24 * Consul is back from mowing the lawn. :-/
17:24
< Consul>
I see I opened another can of worms.
17:24 * TheWatcher also eyes boost:filesystem
17:24
< Consul>
You know, one of my complaints is trying to learn exception handling in C++, but seeing you say it's infinitely better than in C, I may have to redact that. :-)
17:26
<@McMartin>
Well, C has functions that you can use to implement exceptions with
17:26
<@TheWatcher>
I see this suffers from Java Swing Syndrome
17:26
<@McMartin>
But they're actually extremely inefficient, and C cannot portably express any way of doing exceptions right.
17:26
<@McMartin>
TW: I prefer to think of it as Python os.path Syndrome, myself.
17:28
<@McMartin>
(They aren't *that* inefficient on x86, but you're looking at a few dozen instructions each for entering or leaving a try block, there's no way to safely not catch an exception in the middle of the call stack, and a Proper Implementation can do try, throw, and catch in two instructions each, assuming no unwind-protects)
17:29
< Consul>
Well, like I said, we're likely stuck with C++ anyway, just because we already have some stuff done.
17:29
< Consul>
Well, he does.
17:29
< Consul>
I'm just a fifth wheel right now, until the signal processing stuff can start.
17:31
< Consul>
Would studying the K&R book help my C++ skills?
17:36
<@gnolam>
No.
17:44
< Consul>
Oh well, it was worth asking.
17:54
<@TheWatcher>
K&R won't help you /C/ programming, these days ¬¬
18:04 * TheWatcher vaguely ponders whether to stick get_base_directory() in SysConfig or VFS, suspects this may end up being a coin-toss
18:32
<@McMartin>
TW: K&R these days means the 3rd edition, which covers ANSI C and most of the bits of C99 that aren't totally retarded.
18:33
< Consul>
That's the one I have, I'm sure.
18:33
< Consul>
I think.
18:33
< Consul>
I'd have to dig it out.
18:33
<@TheWatcher>
McM: ah, okies.
18:36
< Consul>
D'oh! No, second edition, but it has a big stamp on the front that says "ANSI C".
18:38
< Consul>
Oh well, it's useless to me anyway. I'm sure we'll continue in C++. May as well make the most of it.
18:38
< Consul>
My preset manager is expanding in scope.
18:40
< Consul>
Actually, no.
18:40
< Consul>
It just occurred to me, I can keep parameter and preset management separate.
18:40
< Consul>
Yay!
18:41
< Consul>
"Parameter" as in a synthesis parameter that corresponds to a front panel "knob", so to speak.
19:06
<@gnolam>
The second edition or K&R conforms with TheWatcher's statement above.
19:06
<@gnolam>
*cough*implicit types*cough*
19:08
< Consul>
Yeah, I know. May as well set it on fire, then.
19:10
< Consul>
Buying books for programming is absolutely pointless.
19:10
< Consul>
They're useless in 18 months from publication.
19:17
<@McMartin>
Nah, K&R2 lasted a good dozen years.
19:17
<@McMartin>
Deitel and Deitel might be a decent C++ primer from a data structures standpoint.
19:17
<@McMartin>
I learned data structures in Pascal in high school, so, um.
19:18
<@McMartin>
And then from CLR later, but that's not really recommended.
19:18
<@McMartin>
That said
19:18
<@McMartin>
I'm not sure what the problem is with K&R 2 now.
19:19
<@McMartin>
Just remember that ANSI is the only thing that exists, so when it says "ANSI will require" or "ANSI permits" that generally means it's mandatory.
19:19
<@McMartin>
In particular, function prototypes. C is horrifically lax about them but ANSI tightened it up a fair amount.
19:20
<@McMartin>
However, I'm guessing that you already know the basic control flow operations and stuff from your C++ class, so the only bits that will be new is the C library.
19:20
<@McMartin>
Which you probably won't be using.
19:26
<@ToxicFrog>
Consul: I disagree. Reference manuals are good for as long as the release cycle of the library or language is, which could be years; pure theory like the Dragon Book or SICP is always useful.
19:26
< Consul>
ToxicFrog: I think that's exactly what I need is some grounding in pure theory.
19:26
< Consul>
Web apps don't really do it. :-)
19:27
< Consul>
Neither does being good at pure maths.
19:27
<@ToxicFrog>
SICP - or possibly HTDP, given your focus - is well worth reading; it won't help with C++ specifically but will with programming in general.
19:28
< Consul>
HTDP?
19:28
< Consul>
SICP you linked me to before...
19:28
<@ToxicFrog>
(SICP = Structure and Interpretation of Computer Programs, introductory CS for CS students; works its way from basic concepts up to interpreter construction. HTDP = How to Design Programs, introductory programming for non-CS students; it's lighter on the theory and heavier on This Is How You Design Programs That Don't Suck. Both of them are available for free online from MIT, and both use Scheme)
19:33
<@ToxicFrog>
Since you already have SICP, HTDP is at http://htdp.org/
19:34
< Consul>
Already found it. :-)
19:34
< Consul>
Thanks, anyway.
20:10 Syloq [Syloq@Admin.Nightstar.Net] has joined #code
20:11 Syloq is now known as Syloqs-AFH
20:26 Attilla [~The.Attil@92.2.65.ns-20699] has quit [Ping Timeout]
20:45 Attilla [~The.Attil@92.2.65.ns-20699] has joined #code
20:45 mode/#code [+o Attilla] by ChanServ
20:45
< Consul>
A Google ad for curve-fitting software... I can't help but think dirty thoughts on that one.
20:55
< Consul>
That sounds like a chat-up line at a math convention. "Oh yes, I'm quite fond of a bit of curve-fitting..."
23:32 You're now known as TheWatcher[zZzZ]
--- Log closed Thu Aug 14 00:00:20 2008
code logs -> 2008 -> Wed, 13 Aug 2008< code.20080812.log - code.20080814.log >