• 0 Posts
  • 27 Comments
Joined 1 year ago
cake
Cake day: July 24th, 2023

help-circle

  • Short answer:
    It gave us compiler explorer, now that it has served its purpose we should stop doing it.

    Long answer:

    Why does hft even exist?

    Hft can exist because most stock markets react to requests as fast as possible and have no noticable fees for certain use cases. This means algorithms that do simple trades like if goggle goes up, buy other tech companies or buy any stock that goes up in europe on the NY market can make small profits if they are faster than everyone else.

    Does it have any value?

    There is one exchange that imposes a delay on every request, effectively inhibiting hft, and its opening actually improved market conditions on all exchanges. This implies it has negative value.
    They also spend millions on hardware, tools and developers to skim small sums of many transaction on the stock market. They are effectively a (very inefficient) tax on the stock market that goes to improving C++ compilers and funding hardware startups.



















  • Recursion is often unintuitive for beginners, to understand this code we should simply it a bit

    
    int main(void)
    {
        int height = get_int("Height: ");
    
        draw(height);
    }
    
    void draw(int n)
    {
        if (n <= 0)
        {
            return;
        }
    
        draw(n - 1);
        printf("%d",  n);
        
        printf("\n");
    }
    

    Inputting 3 should now give us a output like

    1
    2
    3 
    

    Try to understand that case first and than muddle it up with the loop.

    If you examine it in a debugger look at the Stack trace. If you use gdb its bt in a visual debugger it’s probably the list of function names next to the variables