Search:

Type: Posts; User: Sir Galahad

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    0
    Views
    253

    Minimizing Poisson distributions?

    Suppose you were looking at the Poisson distribution P(L, I) for a given Lambda and Index. How would you go about minimizing P to some arbitrary confidence level? My initial thought is to simply...
  2. I wasn't very impressed with WebAssembly when I...

    I wasn't very impressed with WebAssembly when I last tried it. Of course that was several months ago, so maybe things have improved by now.

    Anyhow, there are probably a ton of other ways to do...
  3. Replies
    16
    Views
    447

    You really need to learn to "separate concerns"...

    You really need to learn to "separate concerns" in the organization of your code. Think of it like a machine. The more self-contained parts, the easier it is to write virtually bug-free code. So make...
  4. I say learn whatever is interesting and of course...

    I say learn whatever is interesting and of course applicable to whatever you're working toward at the moment. If you plan to make 3-D games for example then things like matrices and physics equations...
  5. Replies
    53
    Views
    1,315

    I see! After some testing it does indeed seem to...

    I see! After some testing it does indeed seem to lead to something like N*log(N) comparisons. I don't think I've ever heard of the Knuth-Fisher-Yates shuffle. Such an elegant and efficient approach,...
  6. Replies
    53
    Views
    1,315

    Just wanted to point out another simple approach...

    Just wanted to point out another simple approach to the whole random-shuffle thing. Use qsort() with some kind of randomizing callback. Crude example:



    #include <stdio.h>
    #include <stdlib.h>...
  7. char& myString::operator[](size_t index) { ...

    char& myString::operator[](size_t index)
    {
    return content[index];
    }

    const char& myString::operator[](size_t index) const
    {
    return content[index];
    }
  8. Replies
    18
    Views
    334

    /* file1.c */ #include int...

    /* file1.c */

    #include<stdio.h>

    int Global_Variable = 12;
    void SomeFunction(void);

    int main(void)
    {
    SomeFunction();
  9. Just wait till you compile the damn thing. You...

    Just wait till you compile the damn thing. You could write a short novel in the time it takes to do that....
  10. Going back to when it was first being developed...

    Going back to when it was first being developed it was like the world was on their shoulders to make something that would make everyone happy. The result is this huge mega-monolithic thing we call...
  11. Poll: Kind of pedantic but okay. I prefer function over...

    Kind of pedantic but okay. I prefer function over form I guess. I would rather not have to type ten times what I could be just to be "semantically correct".



    Well I'm not so willing to waste my...
  12. Okay so then what is the sound of one finger...

    Okay so then what is the sound of one finger snapping against "no hand"?
  13. Poll: Assigning a print object to a value and having...

    Assigning a print object to a value and having that, well, print is not a very surprising result. Seems quite natural actually. Unlike associating output with "leftness" or something anyway...
  14. Clever! The old "if you can't gain enlightenment...

    Clever! The old "if you can't gain enlightenment pondering an open-ended question just come up with something indisputably semantically correct" trick.
  15. Poll: I just don't see it. So output is like doubling...

    I just don't see it. So output is like doubling and input halving? Meh. Operator + would've been more natural than that at least.

    And what, no vote? Surely even witches have opinions...
  16. Replies
    12
    Views
    389

    I honestly don't know what I was thinking there....

    I honestly don't know what I was thinking there. Yeah that would not work.
  17. What is the sound of one hand clapping?

    "Two hands clap and there is a sound.
    What is the sound of one hand?.."

    - Hakuin Ekaku

    I love this koan. Sort of like how we humans are so keen to grasp concrete concepts but not so much...
  18. Replies
    12
    Views
    389

    Perfect. And defining them as friend functions...

    Perfect. And defining them as friend functions means less verbose template syntax too, so I guess I'll do it that way.
  19. Replies
    12
    Views
    389

    Yes, that's it! That's exactly what I was talking...

    Yes, that's it! That's exactly what I was talking about. Okay, so is a friend function the same thing or is there some semantic difference? I'll look it up...
  20. Poll: Well I compiled and ran it if that's what you're...

    Well I compiled and ran it if that's what you're asking. Otherwise no. It has only been like an hour now so...
  21. Replies
    12
    Views
    389

    I was just thinking that I'd heard that operators...

    I was just thinking that I'd heard that operators defined outside of the class were somehow "more flexible" or something?

    Thanks for the other bits of advice by the way. I think I might need a...
  22. Poll: Do C++ output streams need a better interface?

    Do you ever get the feeling when you're working with std ostreams that there's just way too much typing going on? I do. Never quite understood why the left-shift operator was chosen either.

    So...
  23. Replies
    12
    Views
    389

    Thanks! I didn't see any single-header C++...

    Thanks! I didn't see any single-header C++ libraries on the list but that does seem to be the search term I was looking for.

    Also regarding the rules of operator overloading. Should they all be...
  24. Replies
    12
    Views
    389

    Library for working with error terms?

    Take the number V = 1.2 +/- 0.3 for example. So V spans the interval [0.9, 1.5]. Then V + V -> 2.4 +/- 0.6 -> [1.8, 3] and V * V = 1.53 +/- 0.72 -> [0.81, 2.25], etc.

    I have a rough implementation...
  25. Best rule of thumb: if the job can be done...

    Best rule of thumb: if the job can be done without it, use something else. Most useful thing about a #define is conditional compilation anyway...
Results 1 to 25 of 102
Page 1 of 5 1 2 3 4