HN user

tmm1

1,882 karma

Aman Karmani, @tmm1, github.com/tmm1

Posts30
Comments57
View on HN
cursor.com 11mo ago

Cursor: 1.5x Faster Moe Training on Blackwell with MXFP8 Kernels

tmm1
2pts0
news.ycombinator.com 4y ago

Show HN: Calculator for US individual income tax, from 1970-present

tmm1
497pts155
taxsim.app 4y ago

An interactive US Individual Income Tax simulator (1960-2023)

tmm1
2pts0
githubengineering.com 11y ago

Deploying branches to GitHub.com

tmm1
178pts28
github.com 11y ago

Git 2.4 – atomic pushes, push to deploy, and more

tmm1
6pts0
github.com 11y ago

How GitHub Uses GitHub to Document GitHub

tmm1
256pts53
tmm1.net 12y ago

Garbage Collection in Ruby 2.1

tmm1
163pts30
tmm1.net 12y ago

Ruby 2.1: Profiling Ruby

tmm1
102pts15
tmm1.net 12y ago

Ruby 2.1: Process.clock_gettime

tmm1
15pts1
github.com 13y ago

GitHub Pulse

tmm1
64pts10
github.com 14y ago

GitHub: Issues Dashboard for Organizations

tmm1
23pts1
github.com 15y ago

The Merge Button

tmm1
254pts18
github.com 15y ago

posix-spawn: a faster fork+exec for ruby

tmm1
56pts12
github.com 15y ago

rbtrace: like strace, but for ruby code

tmm1
101pts11
www.scribd.com 16y ago

Memprof: a memory profiler for ruby [scribd]

tmm1
33pts4
www.scribd.com 16y ago

Debugging Ruby with MongoDB

tmm1
63pts3
timetobleed.com 16y ago

EventMachine: scalable non-blocking i/o in ruby

tmm1
82pts37
timetobleed.com 16y ago

Garbage Collection and the Ruby Heap

tmm1
99pts27
www.appleinsider.com 16y ago

Touchscreen analysis shows iPhone accuracy lead over Droid

tmm1
2pts1
timetobleed.com 16y ago

What is a ruby object?

tmm1
41pts0
www.chinahush.com 16y ago

Pollution in China, in pictures

tmm1
5pts0
timetobleed.com 16y ago

Threaded Awesome: Understanding Ruby 1.8 Threads

tmm1
1pts0
github.com 17y ago

JsSocket: javascript socket API

tmm1
3pts0
hopper.squarespace.com 17y ago

Simple AMQP Library for Ruby

tmm1
1pts0
www.osnews.com 18y ago

Measuring code quality- a scientific approach

tmm1
4pts0
www.cbsnews.com 18y ago

Re-generative medicine: Man re-grows fingertip and fingernail

tmm1
8pts2
antoniocangiano.com 18y ago

Ramaze: a Ruby framework that will amaze

tmm1
17pts6
source.ramaze.net 18y ago

Easy Facebook apps with Ramaze (ruby web framework)

tmm1
7pts0
www.rubyinside.com 18y ago

Ramaze: a simple, light, modular ruby web-framework

tmm1
1pts0
news.ycombinator.com 18y ago

Ask YC: Critique my Facebook app

tmm1
5pts10

In 2014, the Policy Simulation Library [1] added a model called Tax-Simulator [2], which is a Python reimplementation of TAXSIM [3][4]. It is available as open-source [5], and designed to let researchers both change existing policy variables and implement new tax reforms in Python.

[1] https://pslmodels.org/

[2] https://taxcalc.pslmodels.org/

[3] https://taxcalc.pslmodels.org/about/history.html

[4] https://github.com/PSLmodels/Tax-Calculator/blob/master/taxc...

[5] https://github.com/PSLmodels/Tax-Calculator

From the abstract of NBER paper I mentioned [1]:

Each year Americans spend over two billion hours and $30 billion preparing individual tax returns, and these filing costs are regressive. To lower and redistribute the filing burden, some commentators have proposed having the IRS pre-populate tax returns for individuals. We evaluate this hypothetical policy using a large, nationally representative sample of returns filed for the tax year 2019. Our baseline results indicate that between 62 and 73 million returns (41 to 48 percent of all returns) could be accurately pre-populated using only current-year information returns and the prior-year return. Accuracy rates decline with income and are higher for taxpayers who have fewer dependents or are unmarried. We also examine 2019 non-filers, finding that pre- populated returns tentatively indicate $9.0 billion in refunds due to 12 million (22 percent) of them.

[1] https://www.nber.org/system/files/working_papers/w30008/w300...

Fossil vs Git 7 years ago

git clone --local will hardlink the existing git objects from the first checkout so no extra space is required.

test-queue supports minitest too, and follows the same basic design outlined in this article: a central queue sorted by slowest tests first, with test runners forked off either locally or on other machines to consume off the queue.

We use test-queue in a dozen different projects at GitHub and most CI runs finish in ~30s. The largest suite is for the github/github rails app which runs 30 minutes of tests in 90s.

Before the release of 2.1.0, funny_falcon, samsaffron and I developed a patch that removes the global method cache in favor of a local method cache inside each class. (This was originally proposed for upstream inclusion in https://bugs.ruby-lang.org/issues/9262).

The patch has been running in production on GitHub's servers for over a year, and provides the benefits of a high cache-hit rate without the need for manual tuning. I recently ported this patch to ruby 2.2 as well and it is available in this squashed commit: https://github.com/github/ruby/commit/bd002fc9fc3c7236395df2...

GDB tricks 12 years ago

Copying `/usr/bin/gdb` and `/usr/libexec/gdb/gdb-i386-apple-darwin` from an OSX Lion installation is one way to get a functional gdb on Mountain Lion or Yosemite.

We implement preload_all, which loops over app/{models,controllers}/ and requires everything. This method is generally called from config.ru, and happens in the unicorn master before it forks off workers.

I recently upstreamed a warmup method for Rack::Builder you can also use for this purpose: https://github.com/rack/rack/pull/617

Unicorn pre-forks workers upfront. New processes are not created per request.

posix-spawn is also only useful for fork+exec, where the new process starts executing a new binary. This is not the case in unicorn or resque, where the child processes actually need to be copies of the parent.

We're currently using posix-spawn in albino and grit, which execute external commands like `pygmentize` and `git`

The reason fork is so slow on Linux is because the default page size is 4k. This means for a 300MB process, 76800 page table entries have to be copied during the fork.

There are ways to enable HugeTBL on linux to increase the page size, which can improve fork performance as well. See http://stackoverflow.com/questions/2731531/faster-forking-of..., http://linuxgazette.net/155/krishnakumar.html and http://sourceforge.net/projects/libhugetlbfs/

Does anyone know how fork is implemented on BSD/OSX and why it doesn't exhibit the same characteristics?

If you tried it, you would understand. Ruby programs make a _LOT_ of method calls.

Unfortunately the firehose doesn't work too well on OSX, because the unix message queue API I'm using (msgget(2)) is capped in the kernel to 2048 bytes and 40 messages per queue.

You're right, there's about 90k NEWLINE nodes on the heap, and at 40 bytes a piece that's taking up about 3.6mb of slots on the heap that could be used by other ruby objects instead.

Unfortunately, removing newlines from your codebase will not help since NODE_NEWLINE is used for separators like semicolons as well.

Ruby 1.9 gets rid of NODE_NEWLINE altogether by adding a NEWLINE flag to the next node instead. A similar patch will be in the next release of REE.