#generators

[ follow ]
#javascript
fromAlex MacArthur
1 week ago
JavaScript

I used a generator to build a replenishable queue.

Use generators plus promises to implement a replenishable FIFO queue that stays alive and pauses when empty, resuming when new items arrive.
fromAlex MacArthur
8 months ago
React

I think the ergonomics of generators is growing on me.

JavaScript's recent syntactic sugar enhances programming by addressing real pain points, while the practical use of generator functions remains less established.
Python
fromMathspp
2 months ago

A generator, duck typing, and a branchless conditional walk into a bar

Generators provide lazy evaluation in Python, enabling iterable objects like range to create values on demand and avoid upfront computation.
Python
fromAntocuni
15 years ago

Improving Memory Behaviour to Make Self-Hosted PyPy Translations Practical

Deallocating unused JIT-generated loops via a loop_longevity policy dramatically reduces PyPy translation memory usage, enabling successful 32-bit compilations and lower RAM on 64-bit.
[ Load more ]