3,006 karma · joined Nov 1, 2009 (17y ago) · 1,339 submissions
In the past I developed SuperTux (http://supertux.lethargik.org) when I was bored.
comment 1y ago · link · parent
let
x k = if x then k 1 else k 2
E k h = if h == 1 then k 2 else k 3
in
\k -> x (E k)
and then when you inline E into x it becomes let
E k h = if h == 1 then k 2 else k 3
in
\k -> if x then E k 1 else E k 2
which can again be locally simplified to \k -> if x then k 2 else k 3
Unlike ANF, no blind duplication is needed, it is obvious from inspection that E can be reduced. That's why ANF doesn't handle this transformation well - determining which expressions can be duplicated is not straightforward.comment 1y ago · link · parent
comment 1y ago · link · parent
Let's say E[h] is "if h == 1 then 2 else 3", a is 1, and b is 2. Then before:
if (if x then 1 else 2) == 1 then 2 else 3
After:
if x then (if 1 == 1 then 2 else 3) else (if 2 == 1 then 2 else 3)
which trivially simplifies to if x then 2 else 3
Your proposed rewrite is "let a0 = if x then 1 else 2 in if a0 == 1 then 2 else 3" which is not a simplification at all - it makes the expression longer and actually introduces a variable indirection, making the expression harder to analyze. The call will require some sort of non-local analysis to pierce through the variable and do the duplication and elimination.
comment 1y ago · link · parent
So... 10 years after Walmart opens, poverty is 3% higher, and annual household earnings decline by $4,230. Is this a huge effect? This is something like a 10 point difference on the SAT (https://www.cs.jhu.edu/~misha/DIReadingSeminar/Papers/DixonR...).
comment 1y ago · link · parent
- first you make a "raw" corpus, with all the information needed to produce an answer
- then you generate sample question-answer pairs
- then you use AI to make better questions and better answers (look at e.g. WizardLM https://arxiv.org/pdf/2304.12244)
- can also finetune with RLHF or modify the Q-A pairs directly
- then you have a final model finetune once the Q-A pairs look good
- then you use RAG over the corpus and the Q-A pairs because the model doesn't remember all the facts
- then you have a bullshit detector to avoid hallucinations
So the corpus is very important, and the Q-A pairs are also important. I would say you've got to make the corpus by hand, or by very specific LLM prompts. And meanwhile you should be developing the Q-A pairs with LLMs as the project develops - this gives a good indication of what the LLM knows, what needs work, etc. When you have a good set of Q-A pairs you could probably publish it as a static website, save money on LLM generation costs if people don't need super-specific answers.
To add to the current top-scoring comment, though (https://news.ycombinator.com/item?id=42326324), one advantage of an LLM-based workflow is that the corpus is the single source of truth. It is true that good documentation repeats itself, but from a maintenance standpoint, changing all the occurrences of a fact, idea, etc. is hard work, whereas changing it once in the corpus and then regenerating all the QA pairs is straightforward.
comment 1y ago · link · parent
In contrast, Wikipedia editors have all the time they care to spend on the subject (which is a lot!). They often reproduce the original discoverer's words, when appropriate. E.g., https://en.wikipedia.org/wiki/Central_dogma_of_molecular_bio... uses Crick's words. Whereas in the case of Maxwell, the formulation "is credited to Oliver Heaviside". Long story short: Wikipedia has the best explanations, and if you don't think so then fix it!
comment 2y ago · link · parent
It is true, one microbenchmark only shows that said microbenchmark is slow, not that the language as a whole is slow, but the plural of anecdotes is data. If you systematically evaluate a representative set of microbenchmarks (as in the Computer Language Shootout), then it is proof that the language is slow or fast.
Now of course one can argue about what is "representative", but taking random samples of code from across GitHub seems like a reasonable approach. And of course there is the issue of 1-1 translation but at this point LLM's can do that.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
Even after trying the site, I still don't think you have a marketable product, but kudos for shipping. I hope to see you back in a year with "How I made 1 million dollars shipping SaaS apps" blog post. ;-)
comment 2y ago · link · parent
comment 2y ago · link · parent
I mostly walk these days but when I did bike I had these crash patterns memorized so I could avoid them.
comment 2y ago · link · parent
I choose to fly up through the sky into outer space, away from this place. ;-) Oh wait, I don't have wings, and there's no way to fly into outer space besides maybe begging for a ticket on Virgin Galactic.
It's true that choices are important, but it's also true that you have less control over your choices than you might think (see e.g. The Power of Habit). In particular some choices that you would like to decide one way are simply impossible to actually do.
In practice I've found the best way to modify choices is to build tools. In particular my smartphone - at this point essentially all of my life is directed by apps. There are some cases where this backfires, e.g. recently I found myself driving to an event location and halfway there I realized the event had been cancelled and I had forgotten to remove it from my calendar, but it's the best I've got.
comment 2y ago · link · parent
The idea is similarly to just simulate one logical step at a time, with the fixed timestep (this is important because SuperTux uses simple Euler integration which is timestep-sensitive). But there is tracking code that sleeps / adds extra logical steps between frames so the rate of logical frames ends up corresponding closely to the rate of rendered frames. And as with the final solution here there's no interpolation in rendering, you just display the latest game state without storing the previous.