BYP's Avatar
BYP
GitHub
Twitch
Twitter
Member since

Recent Activity

Snippet Test


any blooooog posts?

#define foreach(i,z,N) for(auto i=z; i<N; i++)

static int test(int* vals, int i, int count, int best){
    if(i < 0){ return best; }
    int included = test(vals, i-1, count+1, use(vals[i], best);
    int excluded = test(vals, i-1, count+0, best);
    return select(included, excluded);
}

$\forall \ \vec{v} \in V \ \exists \ \vec{v}^{-1} \in V \ (v + v^{-1} = \vec{0})$

Note, there isn't a markdown preview for adding random snippets from profile
let's hope I can delete this after pressing Save ;)

&ldl Floyd's Algorithm has one pointer moving at 1-step per iter, and another at 2-steps per iter
This makes the initial step of "find node in loop" take 3-steps per iter
Brent's Algorithm reduces this to 1-step per iter by having one pointer at 0-steps per iter and another at 1-step per iter
By periodically updating the stationary pointer every power of 2, you'll find a node in the loop (and the loop length) faster
Now that you have the loop length, you can use the same method as before to find the start of the cycle

View original message on Discord

&ldl Added sliders, hit testing, and lots of polish

View original message on Discord

&ldl added some sliders, hit testing, and lots of polish

&ldl demonstrating a simple cycle detection algorithm

  • Find node in loop (one moves at 2x speed)
  • Compute length of loop
  • Compute start of loop
    2 ways to get to the start of the loop:
  • Take s steps
  • Take s + l steps -> equivalent to taking l + s steps
View original message on Discord

With the jam finished, here's a little demo video that highlights most of the project's features :)

&rede Better NFA superstate diffing for stepping backwards. Node hit-testing. Red flash for entering null-state. Strict/Loose matching with contextual underline.

View original message on Discord

Added NFA superstate visualization and particles my jam project &rede (https://handmade.network/p/369/rede/)
Planning on making it more clear what path the individual states go through as well as be better at stepping backwards

View original message on Discord

&sdf I'm not procrastinating, you're procrastinating :owlofshame:
https://gfycat.com/likableoddhusky

View original message on Discord

&sdf Adding some features to the editor to allow the user to... y'know, edit
https://gfycat.com/secondhandpoliticalamphiuma

View original message on Discord

&sdf When everything's a distance function, hit-testing / mouse-picking is free. (Animated Undo/Redo on the other hand, is gonna cost ya :drugz:)
https://gfycat.com/wellinformeddrearyeskimodog

View original message on Discord

&sdf Basic rendering of SDF primitives for an atlas entry

View original message on Discord