HN user

batterseapower

469 karma

Max Bolingbroke

http://www.github.com/batterseapower http://blog.omega-prime.co.uk/

Posts0
Comments105
View on HN
No posts found.

I tried it in OpenAI's O1. If I give it minimaxir's original prompt it writes the obvious loop, even if I include the postamble "Look for tricks that will make this function run as fast as possible in the common case".

However, if I then simply ask "What is the most probable result for this function to return?" it figures out the answer and a very good approximation of the probability (4.5e-5). From there it's easily able to rewrite the program to use the trick. So the creative step of spotting that this line of reasoning might be profitable seems missing for now, but 2025's models might solve this :-)

Annual ridership is about 7m passengers (https://www.caltrain.com/media/34265) or 9m if we annualize the numbers in this article. At the same time, the Caltrain is losing more than $33m/year (https://www.caltrain.com/blog/2023/04/financial-future-caltr...) even though it recieved a huge $410m subsidy from the state government for the capital investment required to complete the electrification. So it's losing more than $5 per ride even ignoring capital costs. In fact, the farebox recovery ratio is only 25%, which is truly horrible even by public transport standards: https://www.caltrain.com/media/33996/download

The curmudgeon in my questions where it really make sense for the Caltrain to exist at all, given that it:

  1. It is extremely far from covering its own costs
  2. The subsidy provided by the state is regressive because it principally benefits the wealthy commuters along the line
  3. It imposes substantial negative externialities on the South Bay both in terms of noise & traffic delays at grade crossings
  4. The line and stations occupy very valuable real estate that could be sold and put to better uses

I don't think that's naive - it could definitely help ameliorate the issues. To my knowledge noone has tried this approach.

The other idea I had when I was working on this stuff was to do JIT supercompliation. Clasically, supercompilers expand the whole graph at compile time, but it would be straightforward to delay the supercompilation process until the first time that the code is actually executed, which helps tame the problem of generating lots of specializations that may never actually be executed in practice.

(Choosing a generalization heuristic becomes more important in the JIT setting because you always have access to the full info about all parameters to the function you are specializing, and naively you would end up e.g. specializing sigmoid(x)=1/(1+exp(x)) for each value of x observed at runtime.)

My PhD was on supercompilation for Haskell (thanks for the cite in the repo :-))

Cool to see that people are still working on it, but I think that the main barrier to practical use of these techniques still remains unsolved. The problem is that it's just so easy for the supercomplier to go into some crazy exponential blowup of function unfolding, making the compilation step take impractically long.

Even if you avoid a literal exponential blowup you can easily end up generating tons of specializations that bloat your code cache but don't reveal any useful optimization opportunities/are infrequently used in practice. Similar performance problems also plague related techniques like trace-based JITs, even though the trace JIT happens at runtime and thus has access to strictly more information about the frequency with which a trace might be used.

You can try to use annotations like the @extract proposed in the article to control these problems, but it can be hard to predict in advance when this is going to occur.

One interesting research direction might be to use deep reinforcement learning to try to guide the generalization/termination decisions, where the reward is based on A) whether the unfolding leads to a tie-back later on, and B) to what extent the unfolding allowed deforestation/beta reduction to take place.

I was curious about this question too so I tried to find a list of comparable risks. Wikipedia has a list: https://en.wikipedia.org/wiki/Template:Global_catastrophic_r...

The solar flare risk (at ~1% per year [1]) seems much more likely than many of the other items there. Supervolcanos, pandemics, war, and AI also seem like salient risks, but we probably shouldn't worry about e.g. gamma ray bursts or asteroids.

[1] https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/201...

If you like the idea of this library you'll probably like the book "How to Measure Anything" by Douglas Hubbard (https://www.goodreads.com/book/show/20933591-how-to-measure-...). It's all about how to get sensible confidence intervals for things that are often considered unmeasurable such as the value of IT security. The book mostly uses Excel to do this modelling, but it looks like riskquant would be an excellent alternative on that approach, that for the more technically minded practitioner.

For ridesharing apps, at least, it seems clear that the gig economy has grown the total market and hence the number of workers needed to serve this market. Before Uber entered New York there were ~500k cab trips per day: now, yellow cabs only serve 250k trips but 700k trips are performed by ridesharers [1]. The negative effect on employment is about 3x smaller than the positive one.

[1] https://toddwschneider.com/dashboards/nyc-taxi-ridehailing-u...

The value of large corpora for translation may be diminishing.. In particular, Facebook have achieved impressive results using unsupervised ML for translation: https://code.fb.com/ai-research/unsupervised-machine-transla...

The basic idea is to use word vector embeddings to build a source<->target dictionary, then combine this with a language recognition model to iteratively bootstrap a set of source<->target training examples for use with a conventional ML approach.

Real compensation has become disconnected from wages mostly due to 2 factors [1]:

- Wage inequality (the average wage is growing faster than the median wage)

- Growth in benefits like pensions and health insurance which are not part of wages but are part of compensation

The inequality and benefits effects are about equally strong. Once you control for these 2 factors, compensation has risen at almost exactly the same rate as productivity growth, which is what you would expect of the economy in long run equilibrium.

[1] https://www.resolutionfoundation.org/app/uploads/2014/08/Dec...

Recommendations for vitamin D seem to be a bit of a trend recently, but the evidence for their efficacy does not necessarily seem to be there.

Meta-analysis suggests that supplementation in vitamin-D deficient populations does not reduce cancer, fractures, cardiovascular problems or all cause mortality (http://www.sciencedirect.com/science/article/pii/S2213858713..., https://academic.oup.com/jcem/article/96/7/1931/2833735).

One limitation of this research is that most studies are done with fairly low doses (700-800 IU is common). However, those few studies that look at higher doses (5000-1000IUs) you don't necessarily see any better signs. On the contrary, there is some evidence that high doses seem to be associated with e.g. higher risk of falls and fractures in elderly patient populations (https://jamanetwork.com/journals/jama/fullarticle/185854, https://jamanetwork.com/journals/jamainternalmedicine/fullar...).