code logs -> 2008 -> Tue, 12 Aug 2008< code.20080811.log - code.20080813.log >
--- Log opened Tue Aug 12 00:00:00 2008
00:01 AnnoDomini [AnnoDomini@Nightstar-29569.neoplus.adsl.tpnet.pl] has quit [Quit: Astro Cat will play for you... the Symphony of Space.]
00:26
<@MyCatVerbs>
ToxicFrog: that'd have to be something implementation-specific. Or you could just (define ei exact->inexact) and use that to coerce for printing's sake.
00:29
<@ToxicFrog>
Yes, it's implementation specific; you're the one conversant with drscheme, hence why I ask.
00:38
<@MyCatVerbs>
Er. I'm not *very* conversant with drscheme.
00:39
<@MyCatVerbs>
Sorry for not being able to help.
00:40
<@MyCatVerbs>
Hell on a stick, I cannot type for shit right now.
00:46 Thaqui [~Thaqui@Nightstar-13764.jetstream.xtra.co.nz] has joined #code
00:46 mode/#code [+o Thaqui] by ChanServ
00:51
<@gnolam>
Hmm. I have vague memories of the existence of some kind of pretty print function in Scheme.
00:51
<@gnolam>
Can't for the life of me remember what it was called though.
01:07 Derakon[AFK] is now known as Derakon
01:55 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has quit [Quit: Z?]
02:44 Thaqui [~Thaqui@Nightstar-13764.jetstream.xtra.co.nz] has left #code [MORE constitution LESS destitution MORE pros...perity.]
03:17 Attilla [~The.Attil@92.2.65.ns-20699] has quit [Quit: <Insert Humorous and/or serious exit message here>]
06:26 Thaqui [~Thaqui@Nightstar-13764.jetstream.xtra.co.nz] has joined #code
06:26 mode/#code [+o Thaqui] by ChanServ
06:43 Derakon is now known as Derakon[AFK]
07:07 AnnoDomini [AnnoDomini@Nightstar-29569.neoplus.adsl.tpnet.pl] has joined #Code
07:08 mode/#code [+o AnnoDomini] by ChanServ
07:57
<@McMartin>
Ahahahahaha
07:57
<@McMartin>
"Putting nice UI touches in research code is like folding toilet paper into origami just before you wipe your ass with it."
08:49 You're now known as TheWatcher
09:22 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has joined #Code
09:22 mode/#code [+o gnolam] by ChanServ
09:58
<@Reiver>
gnolam: That is really quite impressive. Are you able to do heightfields on the island too?
09:59
<@Reiver>
And do you have any control over the shape generated?
10:11
<@gnolam>
Thanks. :)
10:11
<@gnolam>
I'm able to, but I only need a 2D outline and visualization in the form of a nautical chart.
10:11
<@gnolam>
And no /real/ control over the shape.
10:13
<@gnolam>
I do some futzing with the values of the first midpoint and corners. I guess you could get more control over it, but meh. Work.
10:17 * Reiver nods.
10:17
<@Reiver>
It is very nifty.
10:17 * Reiver ponders. Can you, say, put in a specified random seed and get a repeatable island?
10:17
<@Reiver>
(I'm assuming it used a random seed to generate itself initially. If not, I stand corrected.)
10:20
<@gnolam>
Yep. That's how it works.
10:23
<@Reiver>
What's it run in/as?
10:26
<@gnolam>
?
10:27
<@Reiver>
What language, is it able to be standalone?
10:30
<@gnolam>
Ah.
10:30
<@gnolam>
C++ and yes.
10:31
<@gnolam>
(Well, as soon as I clean it up)
10:33
<@Reiver>
That'd be awesome.
10:33
<@Reiver>
Let me know if/when you do so? :)
10:33
<@gnolam>
Oki. :)
10:34
<@Reiver>
(I tend to need to do a lot of mapmaking. My biggest failing in such is my inability to come up with the Initial Coastline.)
10:38
<@gnolam>
GMing?
10:52
<@TheWatcher>
is svnbook.red-bean.com/en/1.4/index.html unresponsive for anyone else?
11:09 Attilla [~The.Attil@92.2.65.ns-20699] has joined #code
11:09 mode/#code [+o Attilla] by ChanServ
12:00 AnnoDomini [AnnoDomini@Nightstar-29569.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
12:22 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has quit [Ping Timeout]
12:31 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
12:31 mode/#code [+o AnnoDomini] by ChanServ
12:31 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has joined #Code
12:31 mode/#code [+o gnolam] by ChanServ
12:35 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has quit [Quit: Reboot]
12:37 gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has joined #Code
12:37 mode/#code [+o gnolam] by ChanServ
12:46 Thaqui [~Thaqui@Nightstar-13764.jetstream.xtra.co.nz] has left #code [MORE constitution LESS destitution MORE pros...perity.]
13:08
<@ToxicFrog>
TheWatcher: timeout
13:18
<@TheWatcher>
Meh. Thanks
14:42 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
14:42 crem [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
16:42
<@ToxicFrog>
> (mul 7 5)
16:42
<@ToxicFrog>
63
16:42
<@ToxicFrog>
I think there's a bug in my code.
16:43
<@AnnoDomini>
Hmmmm.
16:43
<@AnnoDomini>
I'd say so.
16:43
<@EvilDarkLord>
I think your code needs a hug.
16:43
<+Consul>
Is that base 7 or 8?
16:43
<@ToxicFrog>
10.
16:43
<+Consul>
I was making a joke, but okay. :-P
16:45
<+Consul>
Albeit a poor one.
16:47
<+Consul>
Now I'm off to pick up a mess of vinyl records someone's giving away. BBL
16:47
<@ToxicFrog>
Eek. 1.19 is intimidating.
16:54
<@ToxicFrog>
I think p` = q` = 1
16:55
<@ToxicFrog>
...the code, however, disagrees
16:55
<@ToxicFrog>
Oh, wait
16:56
<@ToxicFrog>
starting with (0,1)
17:04
<@ToxicFrog>
p' <- q^2 + p^2
17:05
<@ToxicFrog>
q' <- 2pq + q^2
17:08
<@ToxicFrog>
...I cannot type gcd in less than three tries.
17:08
<@ToxicFrog>
It comes out as gdb.
17:11
<@ToxicFrog>
...ok, I don't get 1.20 at all.
17:11 * ToxicFrog casts about for people conversant with SICP
17:11 * jerith is a little conversant.
17:12
<@ToxicFrog>
Oh, nvm
17:12
<@ToxicFrog>
Figured it
17:13
<@ToxicFrog>
And the answer is "twice as many times"
17:14
<@AnnoDomini>
Plan B: Twice as much dynamite.
17:15
< jerith>
Plan C: Antimatter.
17:24
<@ToxicFrog>
Pfft
17:24
<@ToxicFrog>
"In testing primality of very large numbers chosen at random, the chance of stumbling upon a value that fools the Fermat test is less than the chance that cosmic radiation will cause the computer to make an error in carrying out a ``correct'' algorithm. Considering an algorithm to be inadequate for the first reason but not for the second illustrates the difference between mathematics and engineering."
17:25 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has quit [Excess Flood]
17:26 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
17:26 mode/#code [+o AnnoDomini] by ChanServ
17:26 * TheWatcher debates between virtual ~vfsImplementation() = 0; and having to do vfsImplementation::vfsImplementation() { }, or just doing virtual ~vfsImplementation() { }
17:27 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has quit [Excess Flood]
17:28 AnnoDomini [AnnoDomini@Nightstar-29295.neoplus.adsl.tpnet.pl] has joined #Code
17:28 mode/#code [+o AnnoDomini] by ChanServ
17:31
<@ToxicFrog>
TheWatcher: if you do the =0, can't you omit the {}? Doesn't the first mean "no implementation provided", and the second "implementation provided which does nothing"?
17:33
<@TheWatcher>
According to the stuff I've been reading, even if you do the =0 you need the {} as " the destructor must still be defined (even if it's empty)" because derived class' destructors must be able to call the base class' destructor.
17:34
<@TheWatcher>
Of course, I've yet to consult Stroustrup on the issue... *goes to get the fork-lift*
17:35
<@TheWatcher>
if you do need to do the { } anyway, I can't see any point in doing the = 0, really
17:35
<@ToxicFrog>
Yeah
17:36 EvilDarkLord is now known as Zenon
17:36
<@ToxicFrog>
For that matter, I'm not sure that's legal; it seems like it should be: virtual ~vsfImplementation(); vfsImplementation::vfsImplementation() { }
17:36
<@ToxicFrog>
(but I havent' tested this)
17:36
<@ToxicFrog>
Woo, higher-order functions
17:37 * TheWatcher resorts to the Test Code
17:43
<@TheWatcher>
yep, if I just do virtual ~TestClassA() = 0; I get a load of "undefined reference to `TestClassA::~TestClassA()'" whereas virtual ~TestClassA() { /* do nothing */ } works
17:44 crem_ [~moo@Nightstar-28703.adsl.mgts.by] has quit [Connection reset by peer]
17:44 crem [~moo@Nightstar-28703.adsl.mgts.by] has joined #code
17:45 * TheWatcher stabs Bjarne Stroustrup in the face with a rusty spoon.
17:54
<@ToxicFrog>
> (integral cube 0 1 10000)
17:54
<@ToxicFrog>
7501/30000
17:54
<@ToxicFrog>
Woot
17:54
<@ToxicFrog>
TheWatcher: so drop the " = 0"
17:54
<@ToxicFrog>
Just like a normal method declaration
17:55
<@ToxicFrog>
Unless you're after having the whole thing in the header?
17:56
<@TheWatcher>
I may as well, considering that otherwise it's all pure virtuals
17:57
< Vornicus>
...doing calculus in scheme?
18:11
<@McMartin>
The reason for doing the =0 and the {} at the same time is so that you can have it be the only virtual function if you want RTTI to work
18:11
<@McMartin>
Er, sorry
18:11
<@McMartin>
If you want it to be noninstantiatable, but if it has no other virtual functions that you can make pure.
18:11
<@McMartin>
Since we couldn't possibly, you know, have a type qualifier like "abstract" or something.
18:11
<@McMartin>
Nor can we detect this problem until frickin' link time.
18:26
<@ToxicFrog>
Vornicus: yes.
18:27
<@ToxicFrog>
The introductory exercises concerning higher-order functions involve calculating definite integrals.
18:27 * McMartin also takes this moment to froth at the rules for virtuality of implicit destructors, to say nothing of the fact that a class can by default have incorrect code automatically generated.
18:28
<@McMartin>
Given the goals, it's sensible, but argh.
18:28
<@TheWatcher>
Indeed, argh
18:30
< jerith>
Quite, argh.
19:27
< Vornicus>
Very arg.
19:27
< Vornicus>
h.
19:28
< Vornicus>
AH. That's what DF needs.
19:28
< Vornicus>
A way of seeing everything 'at ground level'
19:29
< Vornicus>
Also, a way of telling without individually querying each square whether something is farmable.
19:42
<@ToxicFrog>
The latter is semi-doable.
19:42
<@ToxicFrog>
b-p-(resize)-pan over the area you're interested in.
19:44
< Vornicus>
No, see, that's the problem - that means when I'm trying to fit in a farm I have to query every square to find a suitable location to farm.
19:45
< Vornicus>
(I'm farming outdoors because this civilization came with no seeds in the embark)
20:19
<@ToxicFrog>
So...you're looking for free soil on the surface and hoping plants will spring up on it?
20:20
<@ToxicFrog>
If you don't have seeds, deploying a farm plot will do nothing anyways.
20:21
<@ToxicFrog>
Or do you mean that you've collected seeds from outdoors and now need to grow them in sunlight?
20:24
<@ToxicFrog>
In that case, just pick the location that best fits the fortress and irrigate, or use skylights
20:24
<@ToxicFrog>
You don't need to grow on ground level, just exposed to the sky.
20:32
< Vornicus>
The latter, and irrigation is difficult because I don't have pumps yet.
20:37
<@ToxicFrog>
Aah. And you don't have a soil layer you can dig in?
20:38
< Vornicus>
it's waaaay over there. This is kind of an odd location - there's soil to the east, and a river to the north in a canyon.
20:42
<@ToxicFrog>
In that case you basically have two options: irrigate the stone near the river, or farm in the soil
20:44 * 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
21:01 * Vornicus posts some suggestions to the DF forum.
21:05
<@TheWatcher>
bleh, i'm going to have to write this myself, I bet.
21:06
< Vornicus>
man, I love the DF forum.
21:06
< Vornicus>
in response to a suggestion of concrete: "F that crap, what kind of pansy-assed sky-kissing grass-eating stone-hating sunfairy are you?"
21:13
< Shoukanjuu>
>_>
21:17 Zenon is now known as EvilDarkLord
21:33
< Vornicus>
"I heartily support this, so long as Toady includes orbiting bodies in world gen, so I can build my scaffolding to the Moon, and claim it in the name of the Mountainhomes."
21:50 Mojo1978 [~Mojo1978@Nightstar-13370.hsi.ish.de] has joined #code
22:10 * ToxicFrog rocks out, implements (sigma) and (phi)
22:11
< Vornicus>
phi?
22:11
< Vornicus>
product is usually capital pi
22:11
<@ToxicFrog>
Well I know that now
22:12
<@ToxicFrog>
But, not knowing that at the time, I pulled a random greek letter starting with P out of the air.
22:13
<@ToxicFrog>
(also, calling it 'pi' is confusing)
22:20
<@AnnoDomini>
Speaking of Pi, where is Pi?
22:21
<@ToxicFrog>
Why does scheme distinguish between let and local define?
22:27
<@MyCatVerbs>
Dunno.
22:28
<@AnnoDomini>
A mystery of the ages.
22:28
<@MyCatVerbs>
Ask in #scheme on freenode, they're freakishly friendly in there, so you might actually get a sane answer to that one.
22:28
<@MyCatVerbs>
What's the distinction, anyway? I didn't even know there was one.
22:29
<@ToxicFrog>
SICP says "the distinction would make your head explode if we explained it here, so we'll cover it much later in chapter 4"
22:29
<@ToxicFrog>
"but in the meantime, trust us that you want to use let for local non-procedures, not define"
22:29 * MyCatVerbs giggles.
22:32 You're now known as TheWatcher[T-2]
22:34 You're now known as TheWatcher[zZzZ]
23:11
< Vornicus>
"Dwarfs were built for underground. They require so little oxygen, they can get it from the mold in their beard."
23:11
< Vornicus>
Pi had a massive computer failure.
23:11
<@AnnoDomini>
Uncool.
23:14
<@gnolam>
... aren't molds usually aerobic?
23:15
< Vornicus>
I don't know.
23:31
<@ToxicFrog>
Found it by reading ahead in scheme.
23:31
<@ToxicFrog>
Er, in SICP.
23:32
<@ToxicFrog>
Not sure I believe it, though ??
23:33
<@ToxicFrog>
(short form: mutual recursion works only for code, not data - (define (x) (y)) (define (y) (x)) is legal (albeit unwise), whereas (define b (+ 2 a)) (define a 5) is an error)
23:33
<@ToxicFrog>
(let doesn't solve this, though, it just makes it impossible)
23:48
<@ToxicFrog>
Hmm. Ok, it's actually more subtle than that.
23:48
<@ToxicFrog>
let binds all the lvalues to their rvalues resolved against the containing scope.
23:48
<@ToxicFrog>
define, on the other hand...
23:49
<@ToxicFrog>
First all names defined in that scope are reserved.
23:49
<@ToxicFrog>
Then each define is processed in sequence.
23:49
<@ToxicFrog>
They are resolved against their containing scope.
23:50
<@ToxicFrog>
If one of them attempts to make use of a variable which has been reserved but not yet defined, it errors.
--- Log closed Wed Aug 13 00:00:10 2008
code logs -> 2008 -> Tue, 12 Aug 2008< code.20080811.log - code.20080813.log >