Search:

Type: Posts; User: Leam

Search: Search took 0.01 seconds.

  1. Reseouces for doing Test Driven Development in C?

    My brain hasn't caught up yet, I'm short a nap...

    I've been doing Tests in other language and would love to bring that back to my C. Is there a way to do unit tests, or similar, with C? Any links...
  2. Replies
    5
    Views
    5,980

    Thanks! I wasn't sure if there was something else...

    Thanks! I wasn't sure if there was something else to look at.
  3. Replies
    5
    Views
    5,980

    Which ones are recommended?

    Which ones are recommended?
  4. Replies
    5
    Views
    5,980

    Preferred Open Source Compiler?

    What open source compilers do you recommend for C? I know GCC is the "standard", but clang is one I've heard of. Are there others? Is there a reason to use one or the other?

    My goal is to get...
  5. Replies
    8
    Views
    4,553

    While it's much faster than the combined version...

    While it's much faster than the combined version I'm still getting 0.023s (awk) vs 0.004s (C). Still, that's good info to pass on, I don't want to misrepresent.
  6. Replies
    8
    Views
    4,553

    Saw your first note and, with help from Google,...

    Saw your first note and, with help from Google, came up with:



    awk 'BEGIN{for(i=0;i<10000;i++) printf "123rte" > dev/null; }'


    Which runs in 0.023 seconds. Comparable to python (0.026s),...
  7. Replies
    8
    Views
    4,553

    Forgot to mention that the C version takes ~...

    Forgot to mention that the C version takes ~ 0.004 seconds and the awk version takes ~20 seconds.
  8. Replies
    8
    Views
    4,553

    Setting up a performace test C vs awk?

    I was told someone's awk code ran almost as fast as C. Not sure that's close to a true statement even in simple tasks. I wrote two tests and ran them with Linux's time command. Is this a fair and...
  9. Replies
    6
    Views
    1,885

    Ah, maybe the small size of my tasks hides the...

    Ah, maybe the small size of my tasks hides the problem the include process is trying to solve?
  10. Replies
    6
    Views
    1,885

    So, here's where I'm playing. The main function...

    So, here's where I'm playing. The main function is in run_ship.c that calls lib/ship.c.
    https://github.com/LeamHall/ale_lcthw/blob/master/leam/run_ship.c#L2

    Which includes lib/ship.h which...
  11. Replies
    6
    Views
    1,885

    Ah...while enlightenment is still far away,...

    Ah...while enlightenment is still far away, perhaps I begin to see. I am a solo newbie on a learner's path, most of my programs are less that two screens of code. Still, trying to learn the right...
  12. Replies
    6
    Views
    1,885

    Reason behind multiple levels of header files?

    I understand putting functions and such into separate files and then including that file. What I don't understand is the logic behind a file with just function declarations, and then a separate file...
  13. Replies
    2
    Views
    466

    Thanks! I've read this a couple times and am...

    Thanks! I've read this a couple times and am letting it sink in. What confused me most was that every time I ran it, pc would end up where ps started. Not something to depend on, but I just assumed...
  14. Replies
    2
    Views
    466

    Different variables have the same content?

    I'm working through "Understanding and Using C pointers" (Reese). Code from page 22:


    #include <stdio.h>

    int main(int argc, char * argv[])
    {
    short s;
    short *ps = &s;
    char c;
  15. Replies
    1
    Views
    554

    Memory addresses (newbie)

    The following code gives the pointer addresses:


    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    int ages[] = { 22, 17, 35, 26};
    printf("%p ages\n", &ages);
    ...
  16. That's what I meant; there's an "if it's not K&R...

    That's what I meant; there's an "if it's not K&R it's crap" mentality. I have K&R. I've tried at least twice to learn C from the 2nd edition and I think once from the first. It may be a great book...
  17. Well, I have to admit to some reverse bias. I've...

    Well, I have to admit to some reverse bias. I've chatted with Zed on-line in years past, and read some of his other stuff. While K&R might be closer to the source, dealing with the IRC community's...
  18. Assess. I'm thinking of picking another book,...

    Assess. I'm thinking of picking another book, either K&R or "Understanding and Using C pointers". I have this wild fantasy of doing Linux kernel work down the road. Whether I get there before I die...
  19. On-line group, so we're just gonna have to smoke...

    On-line group, so we're just gonna have to smoke some electrons...
  20. The self-teaching part is that each of us goes...

    The self-teaching part is that each of us goes through the book on our own. No one standing up in front giving a lecture. From what I understand of learning theory, all good learning is...
  21. Recommendations on starting a short term programming self-teaching group?

    A few of us are talking about using Zed Shaw's "Learn C the hard way" to (re-)learn C. The basic goal is to spend 90 days seeing how far you can get. Anyone have words of wisdom on how to keep such a...
Results 1 to 21 of 21