Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - madman

Pages: [1] 2 3
1
DF General Discussion / Re: What programming language?
« on: May 15, 2010, 10:56:16 am »
It's up to you, as a developer, when your errors will show themselves; unit testing is one way, and neat little tools like Toady's arena are another.  Very simple errors will be caught by a compiler, but they'll rarely go unnoticed by a capable programmer for long.  I don't think I've lost more than an hour or two in every hundred to tracking down bugs caused by typos (in languages without declarations) and I've certainly gained more than that by not feeling constrained by declarations.  It's all a matter of style and self-discipline in the end, even in C.  (It's amazing what you can get away with.)

Have you ever tried a really high level language like Mercury or Haskell? I've had the compiler catch some pretty deep bugs that would have been a real pain to track down. I'm not just talking easy to catch type mismatches - Mercury for instance also tests the determinism if the code (is there a case that might fail? Is there an undeclared ambiguity?). I've found that once it compiles, it probably works (although the error messages are even worse than the ones given by C++ when using STL, which can make the learning curve horrible). Testing, unit tests, etc. are still important, but even as a very experienced programmer, I'll take all the help I can get to keep the bugs out of my code.

I agree that C and C++ are different languages (I use both, and declare them separately on my CV). C is great for embedded stuff, C++ for larger projects, and it's a travesty when C++ is taught as 'C with nicer output functions'.

2
DF General Discussion / Re: What OS do you play Dwarf Fortress on?
« on: May 15, 2010, 02:28:09 am »
Debian Linux 64 bit (stable).

3
DF General Discussion / Re: What programming language?
« on: May 14, 2010, 08:54:43 pm »
The language I'd use for for something like this would depend on what level of collaboration I was aiming for. I'd use C++ if it was a multi-person project, because it would do the job, and lots of people know it (I might even consider Java if memory use wasn't going to be a bottleneck). I'd use Haskell (or maybe Mercury) if I was doing all the coding myself and never intended anyone else to develop it. Using a functional or logical language might slow development at the start, but as the project grows, a more disciplined language means better stability, an easier time debugging (many errors show up at compile time rather than runtime) and extending things, and a _much_ cleaner way of dealing with complex data structures.

4
DF General Discussion / Re: An open letter to Toady
« on: April 27, 2010, 08:07:01 pm »
I would have preferred a version with these working before adding the behind the scenes stuff of 40#.
There's several good reasons to do the merge now. Firstly, it was something that was in the list of things that was going to get done before the release, although getting it out now is a good compromise. Secondly, for those waiting for a stable version, it's probably better to have all the bugs out now and being fixed together, rather than have a lot of improvements then introduce a whole lot more bugs (that risks a lot of people sticking with the pre-merge version for a while). Last but not least, for those of us not on Windows or with poorer graphics cards, this is not 'behind the scenes' stuff - it is required to make the game playable.
Quote
Looking forward to .04!
Me too!

5
DF General Discussion / Re: Save compatibility (a vote)
« on: April 24, 2010, 05:46:29 pm »
I like save compatibility, but it only really matters to me for the megaprojects. I've been holding off a really big project until this release (still holding off while I wait for the Linux version), and wouldn't want a game breaking bug to mean I have to restart with a later version. On the other hand, I know how save compatibility can slow down development. I think the recent large gap between versions is an example of this.

My preference would be "keep save compatibility where possible, except where it would slow down development, in which case break it".

6
DF General Discussion / Re: Real-world information in the Wiki?
« on: April 24, 2010, 05:19:20 pm »
"elven < human < dwarven" is about as bad as it gets.
I agree. The first thing I look up since the DF2010 release is Immigration, and I see this "Human" label at the top. My first thought is that I want to know about dwarven immigration, not human immigration!

7
Should have thought about that earlier and bought a proper computer.
Some of us did go buy a proper computer (or a proper operating system anyway).

We get to wait  :(

8
I would not mind in the least, if release happened before the merge.
You might not mind, but my isn't it right that without the merge, it won't run on Linux? I'd have to wait for the merge before I can play the new version, so I hope that it is either in for the release, or makes it in very shortly afterwards. It's not going to be a lot of fun being around the forums if everyone is talking about a version I can't play yet.

9
DF General Discussion / Re: FotF: Dwarf Fortress 40d19
« on: March 24, 2010, 01:47:00 am »
What it boils down to, in the (possibly very) long run, is that the 32-bit install base will, at some point in the future, be so marginally small that supporting it becomes pointless.

However, at that point in time, starting a 64-bit build would take even longer to do than it would now, as the code base will have grown enormously and the probability for there to be issue with porting will be much higher.
"Starting...now..." 
Dude, it has been 18 MONTHS sense the last release.  There is no way Toady is going to take on the extra code maintenance he has to perform and reduce his development time just for the convince of a minority of his users and donors.  A couple years from now, when 64-bit hardware+OS is +90% of the install base he will probably do it.

A for Anonymous, I don't think anyone is seriously expecting a 64-bit version with the next release. However, if the code is clean from silly assumptions about pointer sizes, it's probably not a great deal of effort to port sometime afterwards, and very little effort to maintain once ported (it's not nearly as bad as another whole OS). It would need compilation and testing near release time and could be largely ignored the rest of the time. I write a lot of code that is designed to run on both 32 bit and 64 bit Linux - it's not hard.

I also disagree that waiting would make it that much harder - as long as Today is aware to not use any 32-bit specific coding practices, it should be easy to port any time. I hope not to have to wait two years though, as running 32-bit code on a 64 bit Linux system can be a real nuisance, especially when it is as library dependent as Dwarf Fortress.

10
if booze could flow (as I suspect it might in the upcoming version) I am totally going to fill a multi level cistern with it and do all sorts fo fun stuff. <snip>
You forgot the beer driven computer!

11
doubt Toady would throw it away, i mean, why discard such perfectly good code, especially since he seems to feel that it handles the graphics better than his original graphics code did.
I'm sure he wouldn't throw it away. It's just that most other people would be celebrating a release, and I'd still be waiting - the new graphics code really is that much of an improvement for me.

12
Here's my prediction.
-d# merge is thrown out the window. It'll be done at a later time, probably over the summer
I _very_ much hope not. With the graphics drivers I have available (3D OpenGL is emulated), 40d17+ (with the 2D modes) is a _vast_ improvement over the old code. I would not be switching to a new version until that is included - the new graphics is actually the most compelling improvement for me. I'm planning a donation when the dev log says Today is starting the new graphics merge.

13
DF General Discussion / Re: FotF: Dwarf Fortress 40d19
« on: March 10, 2010, 05:37:14 pm »
That's basically correct. The extra registers available in 64 bit mode can really make a large impact on computations. When I was working on the path-finding stuff I was seeing a 5x improvement in pathfinding just by dropping the -m32 compilation flag. Obviously DF will not see such a large improvement, but something like 10%-20% would be quite reasonable.

shadow_slicer, was it you that added the "64bit native DF" paragraph to the eternal suggestions at http://www.bay12games.com/forum/eternal_voting.php ? Can I suggest you add something about ease of installation on 64-bit systems (not having to install a difficult to maintain 32 bit subsystem)? For me, that is the compelling reason to want a 64 bit version, not the speed increase.

I'm _very_ surprised at the 5x improvement in the pathfinding - that's off the charts compared to any improvement that I've ever seen (although I don't bother with 32 bit at all anymore). It must be something where the x86 register spill really hurts.

14
DF General Discussion / Re: FotF: Dwarf Fortress 40d19
« on: March 10, 2010, 04:01:12 pm »
Dropping 32 bit support would be a bad move. The are people who still use 32 bit (often for compatibility reasons with things like Dwarf Fortress? chicken and egg problem). 32 bit DF can be got to run on 64 bit Linux (with some tweaking and grumbling), 64 bit programs can not be got to run on 32 bit systems (AFAIK).

I wouldn't think compilation time for an extra target is too big of a deal - how often would he need to compile, except near a release? Testing time for another target would surely be a much bigger hit.

15
DF General Discussion / Re: FotF: Dwarf Fortress 40d19
« on: March 10, 2010, 03:18:57 pm »
On 64 bit Linux (using gcc):

sizeof(char)=1
sizeof(short)=2
sizeof(int)=4
sizeof(long)=8
sizeof(long long)=8
sizeof(pointer)=8

so the sizes for int downwards are the same as for 32 bit, I'm not sure about longs on 32 bit.

I went to a seminar on this topic a few years ago, and the general result of moving for 32 to 64 bit seemed to be:

* Pointers get larger -> more memory -> more pressure on cache -> slightly slower
* More registers (only available in 64 bit mode) -> significantly faster
So overall things tend to be faster, as the register starvation of 32-bit mode gets avoided.

[As an aside, on PowerPC, moving from 32 to 64 bit made things slightly slower, as they get the larger pointers with no increase in registers].

My reasons for wanting 64 bit are only marginally to do with speed anyway - I'm more bothered about having to install lots of 32 bit libraries that the package system won't maintain. This could make them a security issue, and I'd really like to be able to get rid of them.

The only potential showstoppers I see for 64 bit are:
* If there's lot of coercion between ints and pointers. This would make 64 bit unlikely to ever be possible,
* Toady doesn't want to maintain more targets.

Pages: [1] 2 3