Skip to content

Instantly share code, notes, and snippets.

View philippeantoine's full-sized avatar

philippeantoine

  • Paris
View GitHub Profile
@cheeaun
cheeaun / js-error-logging-services.md
Last active December 10, 2023 13:04
JavaScript error logging services
@olim7t
olim7t / gist:1061569
Created July 2, 2011 19:38
Game of Life
/**
* Clear-headed attempt at a functional-style, "Scala-way" implementation.
*
* Seems to work on trivial cases. Too lazy to write unit tests now (note to self: write them later and then pretend I did TDD).
*/
class GameOfLife(val width: Int, val height: Int, val liveCells: Set[(Int, Int)]) {
def nextIteration: GameOfLife = {
val newCells = for {
(cell, liveNeighborCount) <- liveNeighborCounts