Tag Info

New answers tagged

1

Everyone who said your utility function needs to track the actual problem domain is correct. Here’s my advice on how, specifically, to do that. The utility of weapons and armor in a D&D-like RPG is that they help you win battles. How useful at the margin better armor or a better weapon are is going to depend on what you’re fighting: more damage is ...


1

It sounds like you are saying each of the simulator programs is a separate executable, and you run it by 1) writing a file for it to input, 2) spawning a process to run it and waiting for it to complete, and 3) reading its result file. As they say, in this way the various modules can be written in any language, it doesn't matter what languages. The problem ...


15

Linking code (using the linker, e.g. ld often started by gcc or gfortran compilation commands) written in two different languages is implementation specific. It is often called foreign function interface. It depends upon calling conventions specific to the implementations. On Linux, with code compiled by gfortran and gcc (both from the GCC compiler) is ...


9

I think all they're saying here is that there are two components (one containing MODFLOW 2000 and MT3DMS 5.0, and the other containing NGSA II, with the two components being written in different languages) which simply use files as their interprocess communication (IPC) mechanism - hence the two components are logically linked while not being linked as in ...


4

You say "maximise your damage, attack speed and armour". I think the answer to your question is to accurately define what this means. You can only "maximise" a single value. If you have multiple values you need to provide a function to turn them into this single value you want to maximise. What makes a "good" function for this is entirely application ...


0

No, you can't implement it without a performance penalty. PIMPL is, by it's very nature, a performance penalty, as you are applying a run-time indirection. Of course, this depends on exactly what you wanted to indirect. Some information is simply not used by the consumer- like what exactly you intend to put in your 64 4-byte-aligned bytes. But other ...


2

To me, the advantages don't outweigh the disadvantages. Advantages: It can speed up compilation, since it saves a rebuild if only the private method signatures have changed. But rebuilding is necessary if public or protected method signatures or private data members have changed, and it's rare that I have to change private method signatures without ...


4

The selling points of the Pimpl pattern are: total encapsulation: there are no (private) data members mentioned in the header file of the interface object. stability: until you break the public interface (which in C++ includes private members), you'll never have to recompile code that depends on the interface object. This makes the Pimpl a great pattern ...



Top 50 recent answers are included