# what the # heck is # gimgen? ---- George Mauer @togakangaroo - [http://georgemauer.net](http://georgemauer.net)

Me ⮕

I'm CTO at
Operation Spark

You, after this talk

OR

Iterators are Simple(ish)

Iterators can be...well...iterated

Iterators can be used in loops

Yup, you can make anything iterable!

Lets talk about ducks

Iterators can flatten

generators are a simpler iterator syntax

==

Oh yeah, iterators can be infinite!

==

Flattening ducks with generators

Infinite generators are streams

You choose how to enumerate iterators

Now with...promises!

You can use this with anything async

Async...await was clearly a breakthrough

Requisite Functional Reactive Programming bubble chart

From this Egghead Tutorial

In search of a better debounce

How a debounced action works
  • Wait for button click
  • Start a timer and wait for either it or button click
    • If the next thing that happens is another click, start waiting for tick or click again
  • Run action
  • Start over

How a debounced action is implemented

And here's how underscore does a generic one

What is even going on!?

Finally, some gimgen

  • Wait for button click
  • Start a timer and wait for either it or button click
    • If the next thing that happens is another click, start waiting for tick or click again
  • Run action
  • Start over

You get to use some weird primitives

  • Wait for button click
  • Start a timer and wait for either it or button click
    • If the next thing that happens is another click, start waiting for tick or click again
  • Run action
  • Start over

The same stream

# Let's look at more examples --- [Demos](http://georgemauer.net/gimgen/) [Library and Docs](https://github.com/togakangaroo/gimgen/)

I don't know what I have here