Search:

Type: Posts; User: trent.josephsen; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. [SOLVED] Re: Which version control system do you prefer?

    I use Git for my personal projects. Mercurial is another option but I never gave it much of a chance and now I'm set in my ways. I've also used SVN and Perforce for work but they both frustrate me.
    ...
  2. [SOLVED] Re: General Purpose - non GUI, programming language

    Most people use bash or generic sh for that kind of thing.

    Personally, I think most shell languages are really ugly and awkward. Not to mention that for any task X, there are generally a dozen...
  3. [SOLVED] Re: Correct way to refer to BASH: BASH or bash?

    Nobody I know does, and you'll annoy far more people by capitalizing it unnecessarily than you would by leaving it lowercase. Caps make YOU read slowly AND mess with the FLOW of sentences. Use...
  4. Re: How is this possible.... if statement executing even though condition is not true

    Yes, except it doesn't actually apply to your example, because K&R/OTBS styles don't put the { of a function body on the same line as its declaration. (This is for some reason called "cuddling".)...
  5. Re: How is this possible.... if statement executing even though condition is not true

    I read the title, and I said to myself... "Semicolon."

    Lo and behold, a stray semicolon after the if(...)!

    Not to start a style war, but this is one reason I prefer the One True Brace Style --...
  6. Replies
    3
    Views
    263

    [SOLVED] Re: float - characteristics

    Please mention the language when you ask questions like this one.

    I've never heard of such a thing as an unsigned float. Most floating-point implementations use the IEEE 754 formats, either by...
  7. Replies
    6
    Views
    280

    Re: Bitboards

    Think about how you'd write code that's able to check whether any bit is set:

    #define BIT_0 1
    #define BIT_1 2
    #define BIT_2 4
    #define BIT_3 8
    ...

    bool is_bit_set(unsigned n, unsigned b) {
    ...
  8. [SOLVED] Re: able to work with array in spite of not malloc'ing enough memory

    Not without writing your own code (or borrowing someone else's), no. But the amount of extra code-writing is trivial. Here's a function I use sometimes (borrowed from Perl):

    int chomp(char *s) {
    ...
  9. Re: Is this how you print out a 2d array using array of pointers?

    In answer to this:


    If I have a function that takes a pointer, I declare it as taking a pointer, not an array. I might change my mind if for instance this:

    int fn(int a[10])
    {
    a[100] =...
  10. Re: Is this how you print out a 2d array using array of pointers?

    I've been sans-Internet for a few days, but I have a different answer to this:

    In fact, I agree. It's downright weird that "int a[10]" declares a as pointer-to-int when it's a function parameter,...
  11. Re: Is this how you print out a 2d array using array of pointers?

    One of these things is not like the others...

    void printSize1(int (*a)[5]);
    void printSize2(int **a);
    void printSize3(int *a[5]);
    I was talking about the last two. You're talking about the...
  12. Re: Is this how you print out a 2d array using array of pointers?

    Looks fine to me.

    One thing to remember is that these two declarations are exactly equivalent:

    int fun(int *b[2])
    int fun(int **b)

    because you can't pass an array directly to a function, so...
  13. [SOLVED] Re: able to work with array in spite of not malloc'ing enough memory

    In the C model, memory is flat. When you call malloc(200), it does nothing more nor less than reserve two hundred bytes in one contiguous block. What you do with those bytes is your concern. If you...
  14. Re: surprised that not being able to work between 2d arrays and pointers interchangea

    This is not true; C will never implicitly copy an array. The issue here is a question of what type the pointer is.

    In the following case,

    int print(int a[][5]);
    you declare print as taking a...
  15. Replies
    7
    Views
    517

    Re: Memory,addresses and pointers

    "Free store" is sometimes used as a synonym for "heap". In C++, I understand it refers specifically to the memory space used for allocation with new/delete, as opposed to the heap which is used by...
  16. Re: Problem with my output in my Assembly program. Area of a Trapezoid.

    That was my first thought, too, but the ABI says that floating point parameters are passed in xmm0 through xmm7. It looks like OP is doing it right, although I haven't walked through it to know for...
  17. Re: Problem with my output in my Assembly program. Area of a Trapezoid.

    The thing that jumps out at me immediately is that you're using addss with double-precision floats, which might partially explain the area being wrong.

    Also IIRC %lf is the wrong printf format for...
  18. Replies
    6
    Views
    391

    Re: Am I being stupid?

    test is a shell command:

    $ which test
    test: shell built-in command

    Type ./test to make sure you're running the file in the current directory.
  19. Replies
    5
    Views
    939

    Re: C++ and Java and Games

    Here's a recent /r/Minecraft thread you might find interesting, but take TheRuiner_'s top level comment as a warning.

    Notably, Java doesn't have to be slow. Minecraft's performance issues are...
  20. Replies
    11
    Views
    532

    Re: Python and Go and the Binary

    Yes, I'm sure you're right about that. The comparison to freeze was inappropriate. (There's a reason I don't normally post before noon.) But what I should have said was that Go "binaries" still have...
  21. Replies
    11
    Views
    532

    Re: Python and Go and the Binary

    Go doesn't exactly compile to binary in the same sense as C.



    In other words, Go is "compiled" in a manner somewhat analogous to how py2exe and freeze work. This is basically the only way to...
  22. Re: Becoming a better programmer: depth or breadth of knowledge recommended?

    No, that's practically the exact opposite of refactoring. Refactoring is making small incremental changes that alter the code's structure but not its content, and is generally much more difficult...
  23. Re: Becoming a better programmer: depth or breadth of knowledge recommended?

    Fairly recent although brief thread on this very topic. Two comments I liked:
  24. Replies
    3
    Views
    361

    Re: System Calls? Ubuntu.

    A system call is by definition a kernel feature, so if there are differences between those available on different distros, it's because the distros use different kernels. This could be due to...
  25. Replies
    26
    Views
    2,249

    Re: Selecting a programming language

    Added to my original post. Couldn't think of anything to say about PL/1 or Rexx, though, and some of them are beginning to stretch a bit.


    Good point.

    It's also important to realize that most...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4