Paul Bergeron

Software Engineer in San Francisco

About Me

Paul Bergeron (@dinedal) (resume)

Shaving yaks, building software, musing about the future, trying to build something lasting, ever failing in the pursuit of pure Zen living, and writing short paragraphs that convey little information.

recent public projects

Status updating…

found on

From Zero to Om

- - posted in ClojureScript, code, om, react

Om by swannodette is a ClojureScript interface to Facebook’s React. It’s power is that it can create UIs that are easily snapshottable, rewindable, and all with great performance.

Getting to a good starting point with ClojureScript can be a little complicated, so here’s a step-by-step process for going from a clean slate to a working development enviroment.

Event Machine in Normal Ruby (or Rails) Apps

- - posted in eventmachine, ruby

I learned a new trick from my friend and co-worker @DaDDYe, author of the awesome Padrino framework, on how to use EventMachine in normal Ruby or Rails applications.

In most EventMachine apps, you have to place everything inside of a EventMachine.run block, i.e.:

1
2
3
4
5
require 'eventmachine'

EM.run do
  # ... your app here
end

This usually means that concurrent Ruby apps have to be designed so from the start. However, you can get around this limitation.

Streaming Youtube to MP3 Audio in NodeJS

- - posted in code, coffeescript, networking, nodejs

Recently I learned how to stream a Youtube video’s audio in MP3 format using nodejs. I wanted to publish my findings and show off how to accomplish this.

First, let’s build this the non streaming way, and then I will show you how to upgrade to a streaming method. You must install the powerful ffmpeg via your package management system of choice in order to play along.

I’ll be using nodejs, to do this, because it offers us a very easy way to stream bits around. Despite the recent controversy, I’m still quite partial to coffee-script due to it’s terse syntax and clean output, so I’m going to use that for most of the new code. Let’s also use the wonderful expressjs framework to get us started really quickly. This will set up our project skeleton.

Fixed Point Math in C#

- - posted in Box2D, Box2DX, c-sharp, code, fixed-point, game-development, math, networking, physics

Fixed point math is an interesting optimization for games, and it also has the feature of determinism, something that floating point implementations lack due to rounding, truncation, and hardware differences.

With determinism, a networked physics simulation can guarantee that every machine can perform the same action, and given the exact same starting conditions, produce the same result. This reduces the network overhead significantly, instead of being forced to check the same result was achieved across all computers participating, one can instead make sure that each action was completed in the correct order instead.