Search:

Type: Posts; User: Asymptotic

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. I want to get good with bitwise stuff

    There is a bit of untapped power in my current C programming skills. I dive into bit manipulation here and there, but there are guys I work with who are machines with it... They can write a program...
  2. Replies
    1
    Views
    364

    Multithreading Exercises

    I'm trying to gain more experience writing multithreaded code, especially with pthreads.

    Occasionally I need to do it for work, but no often enough to really improve my skills to where I'd like to...
  3. Replies
    7
    Views
    322

    zach its hard to tell what you're talking about,...

    zach its hard to tell what you're talking about, but it looks like you are overcomplicating the matter.

    The concept of "updating a file" is basically just reading the file into memory, modifying...
  4. Replies
    6
    Views
    297

    First thing I see wrong is that you have the...

    First thing I see wrong is that you have the following code:




    if(fp == NULL)
    {
    printf("ERROR");
    fclose(fp);
    return -1;
  5. Niccolo, Thought you might find this article...

    Niccolo,

    Thought you might find this article interesting: ripgrep is faster than {grep, ag, git grep, ucg, pt, sift} - Andrew Gallant's Blog

    These are the types of challenges I had been...
  6. Oh by the way I forgot to mention... Although my...

    Oh by the way I forgot to mention... Although my example was around a few megabytes, I'd be actually using this program to handle like 4-10GB files and up to 40GB at a time. I definitely would not...
  7. Wow, Niccolo thanks for getting my thinking...

    Wow, Niccolo thanks for getting my thinking going. I totally understand your experimentation suggestion, and I love experimenting. In fact, this entire project is basically an experiment. But it's...
  8. Splitting up a bunch of lines for processing

    I want to write a program which will open up a large plaintext file with many thousands of lines, split that file into n number of chunks, and then pass each chunk to a different thread for...
  9. Thread: char*

    by Asymptotic
    Replies
    16
    Views
    981

    zach, 15 hours ago you made a thread called...

    zach, 15 hours ago you made a thread called "puzzled by char*" and then you said my response cleared up a lot for you.

    8 hours ago, you made this thread with 1 sentence asking what a char* is...
  10. Replies
    6
    Views
    515

    christop you're right, that is a bad habit I'm...

    christop you're right, that is a bad habit I'm trying to break. It's not technically "bad" per se, but I agree with you that it's better to limit the places a programmer must change should the type...
  11. Replies
    5
    Views
    450

    Furthermore, your question is this: "i want to...

    Furthermore, your question is this:

    "i want to know what is the use of this function "

    That is a bit concerning because quite literally, the use of the function is to set the console cursor...
  12. Replies
    6
    Views
    515

    One more thing I wanted to clarify is that when...

    One more thing I wanted to clarify is that when you use the char array format like this:



    char name2[] = {'t','e','s','t'};


    This is not a string because there's a gotcha in C here where if...
  13. Replies
    6
    Views
    515

    The answer is yes - mostly but not 100% the same...

    The answer is yes - mostly but not 100% the same as strings in other languages.


    You see, the C programming language constructs are generally less abstracted/high level than other languages such...
  14. Multithreading in C pthreads - Where to learn

    I looked at the book recommendations thread and couldn't find one - I'm looking for a book which thoroughly covers pthreads and multithreading/parallelism in C.

    I can find about 100 tutorials...
  15. Replies
    20
    Views
    1,109

    Syntax error on line 16, you have an extra right...

    Syntax error on line 16, you have an extra right parenthesis:


    charstr[5] = security()); <----
  16. Replies
    9
    Views
    792

    Yeah what's the deal with this type of stuff? Is...

    Yeah what's the deal with this type of stuff? Is there another update to C planned which could include some of this type of stuff, or like when we get to 96 bit or whatever?
  17. Replies
    9
    Views
    792

    @GReaper, Interesting. I suppose some...

    @GReaper,

    Interesting. I suppose some concurrent programming, or at least using the cores efficiently, could potentially increase responsiveness as well for some of those user-mode tasks. But that...
  18. Replies
    9
    Views
    792

    Dealing with huge files

    I've been getting into memory allocation lately. I wrote a couple of my own (basic) memory allocators and really enjoyed it.

    One topic of interest to me is handling large files. Many text/code...
  19. Replies
    6
    Views
    237

    Niccolo, I appreciate that well-explained...

    Niccolo, I appreciate that well-explained response. Luckily for the both of us (you, so I dont keep asking more and more questions), I'm quite familiar with many of those concepts because I've...
  20. Replies
    6
    Views
    237

    Ah I blew it in that I forgot that by default...

    Ah I blew it in that I forgot that by default pointer arithmetic applies to sizeof(data) in any case. Meaning, + 25 isn't 25 bytes in, but rather, it's 25*sizeof(struct myStruct) etc...

    I have a...
  21. Replies
    6
    Views
    237

    Pointer Arithmetic confusion

    I have the following program:


    #include <stdio.h>
    #include <stdlib.h>




    struct myStruct {
  22. Replies
    25
    Views
    891

    True story: (And I am not drawing paralells to...

    True story: (And I am not drawing paralells to you, this is for entertainment only) I knew a guy who spent several days on a school projected, frustrated, telling me that the professor wouldnt help...
  23. Replies
    25
    Views
    891

    Try Visual Studio Code with GCC. That's what I...

    Try Visual Studio Code with GCC. That's what I use. It's fast and works great. You can get an extension and get GUI debugging functionality out of it using GDB or LLDB or whatever you want.
  24. To some degree, these "issues" can even be...

    To some degree, these "issues" can even be recognized in non-embedded systems as well with a slightly exaggerated example.

    For example, if you write some code which counts to 5 million and then...
  25. Replies
    17
    Views
    1,070

    Niccolo that is exactly the main reason I asked...

    Niccolo that is exactly the main reason I asked this question. I began to realize that the concept of a multidimensional array at least as shown here in C, is basically an abstract concept that...
Results 1 to 25 of 125
Page 1 of 5 1 2 3 4