HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
josephg
Chipmunk-js
JavaScript2013–2022
josephg / Chipmunk-js

Chipmunk-js

Port of slembcke/Chipmunk-Physics to Javascript

3Distinct people
5Mentions
0Explicit recommenders
540GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Port of slembcke/Chipmunk-Physics to Javascript

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year5 dated mentions

Observed mentions: 2013-04-14 07:40:44 UTC to 2022-07-14 23:22:11 UTC.

01232013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC303
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

What Hacker News says

5 sources
About a decade ago I hand-ported the chipmunk2d physics engine to javascript. After porting it, I tried about 30 different things trying to make the code run faster. Some things I tried made it faster. Some made it slower. The most performance-critical section is the "arbiter applyImpulse" physics code[2], which is all math. I tried putting everything in as big TypedArray to avoid all the object lookups, but performance got slightly worse, not better. I still have no idea why. I think the reason is that the optimizer couldn't optimize the typedarray lookups at the time. Not in the same way it can optimize math on normal objects. Maybe v8 is more clever now? I dunno! The biggest performance win I got was from inlining vector fields. Chipmunk heavily uses {x,y} 2d vectors. Lots of objects looked like this: {pos: {x, y}, velocity: {x, y}, ..
Read the rest
.}. Flattening everything to this {posx, posy, velocityx, velocityy, ...} made the code uglier. But it caused a massive performance improvement because it reduced the number of objects allocated on the heap. (This one change reduced the number of heap allocations by about 70% from memory, and it caused a double-digit performance improvement overall.) As I see it, Javascript will always be much slower than other languages for complex data structures because everything is stored on the heap. [1] https://github.com/josephg/chipmunk-js [2] https://github.com/josephg/Chipmunk-js/blob/ec447072458f4009...
In Is WebAssembly magic performance pixie dust? (2021)
Author of ChipmunkJS here. I did some benchmarks moving things to typed arrays about a year ago, and the change was a wash in my benchmark results. I think that might not be the case now considering all the optimizations the v8 team have been making to asmjs-like code. I did some quick benchmarks using emscripten recently and performance absolutely blew away my hand-tweaked chipmunk code[3]. Hand optimized, ChipmunkJS takes 2.8x as long to run the tests. Emscripten compiled chipmunk is 1.4x, so twice as fast. That said, the generated code is huge and awful, and the API is terrible. I've been playing around with porting my library to LLJS recently, but when I looked at LLJS it hadn't been updated in over a year. Its nice to see that there were some commits a few months ago, but LLJS needs a lot of work before its generally usable. I've bee
Read the rest
n doing some stuff manually as a toy - still not sure where to go with all of this. Bridging from ASMJS to regular javascript makes your API really hard to use. --- [1] https://github.com/josephg/Chipmunk-js [2] https://docs.google.com/spreadsheet/ccc?key=0Ap2hDnCZnXiVdDV... , though this is somewhat hard to read. [3] http://josephg.com/blog/chipmunkjs-and-emscripten [4] http://josephg.com/blog/chipmunk-in-asm-js
In Newton - Javascript Physics Library
As a maintainer of a project with almost 2000 stars on github, I sway back and forth between being allowing ("Just submit code to get what you want done. We can fix it once its in the repository") and a stickler for details ("I don't want your change until you give me tests.") I really wish I could just give everyone who submits patches commit access and let them at the repository. It would save me time. It would save you time. It would make my project better. And I don't write opensource software because I enjoy being a policeman. I hate it. I hate saying no to real work that solves real problems. Unfortunately, the majority of pull requests are simply bad. - Many do not understand the project's conventions (eg, if my project is written in coffeescript, so your code needs to be in coffeescript too). Example: https://github.com/josephg/Sh
Read the rest
areJS/pull/36/files . After I insisted on the code being ported to coffeescript, several users whinged on the project's mailing list about my language choice. - Most pull requests don't have tests. Submitters usually don't even run the unit tests before submitting, and their pull requests often break the tests we do have. I understand that you don't write tests in your application, but the rules are different in an infrastructure project that many people rely on. - People often have extra modifications in their PR that have nothing to do with the patch. For example, this pull request has good parts near the top and also makes my code uglier riiiight down the bottom in the name of 'optimization'. Quotes because optimization was never run, and the changes didn't actually improve performance. https://github.com/josephg/Chipmunk-js/pull/15/files - Some bug reports exist only to waste my time and complain about my programming language choices. This is what I was doing instead of triaging your bug. I'm sorry, ok? https://github.com/josephg/Chipmunk-js/issues/11 I usually err on the side of allowing changes and fixing stuff later, but my projects have suffered for this several times. I've had maintainers accept pull requests that break the unit tests (and leave them broken for weeks). I've had otherwise normal code suddenly sprout extra levels of indentation. I've had mountains of bugs appear, filed against a feature I didn't write, don't understand and I never use, who's author has disappeared. I've been burned enough that I can totally understand maintainers who ignore patches and bug reports. I still love everyone who cares about my projects enough to submit a bug report or takes the time to make a pull request. I need contributors to make good software, but it breaks my heart when nice people submit slightly bad code, and I need to either whinge at you or stop working on my own pet feature to clean up your mess. I'm sorry to everyone who's patches gets ignored, but sometimes I get tired too. In short, its fun to complain about The Man because your precious donation of code is being ignored. But its just as thankless running a project, only we shoulder way more responsibility and burn way more time doing it. If you want me to look at more of your bug reports, help triage my other pending bugs and pull requests. If you want me to stay excited about the project, email me to say how much you like it, and tell me about the cool things you're doing with my code. If you want commit access, ask for it. Finally, if you think you can do a better job running a project, use the fork button and do something about it.
In A plea for better open source etiquette

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.