Search:

Type: Posts; User: Hodor

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    449

    As impressive as your code is (I can't beat it)...

    As impressive as your code is (I can't beat it) do you no agree that the order of evaluation of vowels can make a huge difference? Your code makes the order irrelevant of course but, in general, I...
  2. Replies
    19
    Views
    449

    I was being sarcastic when I said "stupid" (Ok,...

    I was being sarcastic when I said "stupid" (Ok, maybe "sarcastic" is not the right word, I'm not sure, but I was certainly having a go at another user who thinks avoiding branches is the way to go)
  3. Replies
    19
    Views
    449

    The point I was trying to make was that...

    The point I was trying to make was that optimisations do not necessarily come from "code"; they can come from other places (i.e. the order you compare aeiou can make a huge difference because of...
  4. Replies
    19
    Views
    449

    I don't think I can

    I don't think I can
  5. Replies
    19
    Views
    517

    It's just a branch. Writing in assembly the...

    It's just a branch. Writing in assembly the mnemonic has never (as far as I know) been "goto"; the example you give is a "C'ificiation"; it'll compile to an ASM branch instruction (which, yeah, are...
  6. Replies
    19
    Views
    517

    @awsdert Up front: I don't care if I get banned...

    @awsdert Up front: I don't care if I get banned from here because of what I am about to say. I'm going to say it because I think it's important.

    Stop showing code that is plainly incorrect,...
  7. Replies
    19
    Views
    517

    a) Using bitwise OR the way you used it there is...

    a) Using bitwise OR the way you used it there is broken (it won't work... seriously)
    b) Yep, fair enough. I and many others find them annoying
    c) GOTO is not an ASM instruction. I take it that you...
  8. Replies
    19
    Views
    449

    That's stupid, flp1969. You have branches (e.g....

    That's stupid, flp1969. You have branches (e.g. if ( is_vowel( *p ) )) in that code so it's just... stupid.
  9. Replies
    19
    Views
    449

    Ok, as a start I'll begin with this (no compiler...

    Ok, as a start I'll begin with this (no compiler optimisations)



    //=========== Start of challenge code =========

    int c;
    while((c = getc(f)) != EOF) {
    if (isalpha(c)) {...
  10. Replies
    19
    Views
    449

    With compiler optimisations turned on or off?

    With compiler optimisations turned on or off?
  11. Replies
    19
    Views
    517

    a) Why are you using bitwise OR? b) Parenthesis...

    a) Why are you using bitwise OR?
    b) Parenthesis where they're not required could, arguably, be regarded as clutter
    c) I have no idea what you're talking about regarding the MUL, GOTO is. Further,...
  12. Replies
    152
    Views
    3,731

    In test_a(), remove the test for test being NULL...

    In test_a(), remove the test for test being NULL because that's the responsibility of the calling function (i.e. test != NULL should be a pre-condition). Either way you are of course correct but...
  13. Replies
    5
    Views
    571

    Interesting... I'm running firefox on Ubuntu as...

    Interesting... I'm running firefox on Ubuntu as well and the rendering is different. BUT I have MS core fonts installed so that's probably why mine looks different and doesn't overlap (?) That said,...
  14. Replies
    5
    Views
    571

    It's not doing that for me. The font my browser...

    It's not doing that for me. The font my browser (firefox) is using is different as well
  15. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    And of course: What Every Computer Scientist...

    And of course: What Every Computer Scientist Should Know About Floating-Point Arithmetic
  16. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    Well, yes. My chemistry textbooks are kind of old...

    Well, yes. My chemistry textbooks are kind of old so I expect some progress has been made since they were printed LOL. I still think the polynomial is an approximation to fit empirical data though :P...
  17. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    I understand your point, but the difference in...

    I understand your point, but the difference in your example is not a result of the loop, it's because calc_abv2() is using pow(). The loop could be modified to use pow() and it would give the same...
  18. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    I don't know which of the below implementations...

    I don't know which of the below implementations below I prefer, but I do know that comments should be added (if there was comments in the initial code I'd not have initially thought it was...
  19. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    Looking at it again I was mistaken. I didn't...

    Looking at it again I was mistaken. I didn't notice that the "coefficients" were being added backwards and the implementation is using methods described here: Horner's method - Wikipedia

    Apologies...
  20. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    I'd double check your implementation of...

    I'd double check your implementation of calc_abv()... it doesn't seem to match your picture
  21. Thread: Pointer help

    by Hodor
    Replies
    27
    Views
    843

    As well as being valid only for 20C it is also...

    As well as being valid only for 20C it is also only valid for inputs between 0.0 and 1.0 inclusive. Both of these constraints should be added as a comment. For the 0.0 to 1.0 you should probably add...
  22. Replies
    152
    Views
    3,731

    Yeah it built libalu_d.so ok (it's in the...

    Yeah it built libalu_d.so ok (it's in the directory); it's not linking though



    $ ls
    1st.mak alu.h alu_int_d.o alu_math_d.o alu_uint_d.o cloned libalu_d.so test_d.o...
  23. Replies
    152
    Views
    3,731

    Unfortunately not (I did make clean first). But,...

    Unfortunately not (I did make clean first). But, just to make sure I deleted the directory and re-cloned your repo... exactly the same result as above
  24. Replies
    152
    Views
    3,731

    Still won't build for me $ make --version...

    Still won't build for me



    $ make --version
    GNU Make 4.2.1
    $ gcc --version
    gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

    $ make debug run
  25. Replies
    152
    Views
    3,731

    make debug Already up to date. Current...

    make debug


    Already up to date. Current branch master is up to date.
    Finished checking
    cc -ggdb -D _DEBUG -fPIC -shared -Wall -Wextra -I cloned/fbstdc/include -o test_d.o -c test.c
    cc -ggdb...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4