Gavin Ray

Results 171 comments of Gavin Ray

This is a super valuable PR, just wanted to bring it up again and also give some feedback on it: I rebased this locally off of main today and built...

A really solid reference implementation for this would be the walkthrough and tiny amount of code needed to implement undo/redo mutations and time-travel debugging in Redux: https://github.com/reduxjs/redux/blob/master/website/docs/recipes/ImplementingUndoHistory.md You can apply...

You could wrap the `evolve()` loop in an `if(shouldContinue)` or `while(shouldContinue)`, and then set up a toggle on `shouldContinue` that can be triggered in the browser by invoking it through...

Actually, `paused` is probably a more idiomatic name, and you can throw it on the global namespace under `carrot.paused`. ```js if (!carrot.paused) {} ```

@christianechevarria ONNX.js exists, it's by Microsoft: https://github.com/microsoft/onnxjs It has the same internal architecture for performance that TF.js does, if you check the `onnxjs/lib/backends` directory, they use the same dynamic backend...

You might find the complexity level and cognitive burden can be kept much lower if you use an **Observer/Observable** pattern instead of Publisher/Subscriber. ![image](https://user-images.githubusercontent.com/26604994/68515872-5088c000-0250-11ea-8d9e-961bd83b2949.png) Observables also play really nicely with...

For an event emitter though, Mitt is probably the most lightweight: https://github.com/developit/mitt

@MaxGraey Huh, interesting. I get 60ms/70ms Native/fastexp on Firefox Nightly with my machine. The original, very naive AssemblyScript code I wrote for benchmarking against JS is below: (`x` being an...

> @GavinRay97 > Also I suggest preallocate result array: > > ```ts > let results = new Array(x.lenght); > ``` > > instead > > ```ts > let results: f64[]...

@postspectacular My apologies if you had not intended for that to be linked. The past days have done a lot of experimenting with performance and benchmarking, and I wanted to...