HNHacker News
TopNewBestAskShowJobs

Mathnerd314

3,005 karma · joined November 1, 2009

Making the ultimate programming language https://mathnerd314.github.io/stroscot/

In the past I developed SuperTux (http://supertux.lethargik.org) when I was bored.

submissionscomments
Mathnerd314··on Proposed rule would ban airlines from charging parents to sit with children
Ah yeah, I didn't mention the foster care system. If you think adopting a pet is hard, try adopting a child...
Mathnerd314··on Proposed rule would ban airlines from charging parents to sit with children
Well, there is this quote, "Dr Peng said throwing money at people was not enough to convince them to have children." https://www.abc.net.au/news/2024-05-04/asia-spending-million... It is more of a culture thing.

At least in the US, I think children are perceived as a nuisance right now, and adding special rules for them for airlines doesn't really change that. If anything it makes it worse. Some campaign like "don't get a dog, get a child" might have more appeal. E.g. one could point out how you can't bring a dog on a plane except in a carrier but a child gets their own seat.

Mathnerd314··on Functional languages should be so much better at mutation than they are
There is a way to do FBIP without reference counting - use immutable store semantics (always copy). At that point you are doing a lot of copying but Haskell etc. are actually pretty good at managing this sort of profligate duplication. And of course it is possible to use RC-at-compile-time and other analyses to optimize away the copying - the difference is that runtime RC is not required like it is in Koka. There is even a static analysis algorithm from 1985 https://dl.acm.org/doi/abs/10.1145/318593.318660 (never implemented in Haskell because they went with the ST monad) There is a theorem in the paper that for "natural" translations of imperative programs into FP, their algorithm will optimize the FP back to the imperative program or better.
Mathnerd314··on Hidden flaws behind expert-level accuracy of multimodal GPT-4 vision in medicine
I don't have the original reference, it was an invited talk at UChicago, but something like https://www.sciencedirect.com/science/article/abs/pii/S09574... for example.

But regarding diagnosis, there are symptom checkers where you feed stuff in. I get the impression that multiple companies are in the process of building such tools based on crawling research papers to diagnose even very rare conditions. IIRC IBM Watson had such functionality.

Mathnerd314··on Hidden flaws behind expert-level accuracy of multimodal GPT-4 vision in medicine
I'm not saying doctor's expertise isn't valuable, but studies with even simple linear models have shown that it is much better to feed a doctor's expertise into an expert AI system than to try to teach the AI system to the doctor. And the weighting of the expertise relative to other factors is often lower than you might expect. Even a simple yes/no checklist can be invaluable if it is designed by the top minds of the field.
Mathnerd314··on My mental model of setf was wrong
> You can’t write code like this: (let* ((l (list 1 2 3)) (h (car l))) (setf h 23))

I think that's the crux, does anyone have an argument for why l should be (1 2 3) instead of (23 2 3)? It breaks referential transparency that you have to substitute the value of h into setf to get it to work.

Mathnerd314··on An experiment in UI density created with Svelte
it is specifically the signals-based approach pioneered by Solid, https://youtu.be/82dzMKZzHrY?t=12314
Mathnerd314··on An experiment in UI density created with Svelte
> Svelte's whole selling point was ultra-targeted and efficient DOM updates as a result of the compilation step and not having vdom

Going by performance (https://krausest.github.io/js-framework-benchmark/), Svelte 4 is essentially vdom, Svelte 5 is ultra-efficient based on the direct-DOM approach pioneered by Solid. Svelte 5 is currently a release candidate, API stable but also not necessarily production ready. https://svelte.dev/blog/svelte-5-release-candidate

Disclaimer: I haven't actually looked at Svelte 4 to see why it is so much slower than Svelte 5

Mathnerd314··on The Decline of Mobile Development
There is the target API level policy: https://support.google.com/googleplay/android-developer/answ...

So if your app was for Android, it would not be installable on new devices.

For iOS I am not sure, I think they are better about leaving old apps alone.

Mathnerd314··on Taking my diabetes treatment into my own hands
Oh and regarding probabilistic stuff, I have been playing with PyMC, it seems eminently usable. There is some slightly more specialized software like Stan, and it is certainly worth looking at some Stan tutorials if you don't know anything about probabilistic programming, but PyMC is hackable and modular in a way that Stan is not. There is also tensorflow-probability but I couldn't get it to work, it seems not as active as PyMC. Haven't read it but I found https://github.com/CamDavidsonPilon/Probabilistic-Programmin... and that's probably going to be my coffee table reading for the next few days.
Mathnerd314··on Taking my diabetes treatment into my own hands
So Metropolis-Hastings for example is a probabilistic algorithm. You don't need a probabilistic algorithm. (Well, you do when you want to estimate your physiological parameters, the Bayesian stuff and so on, but that is a whole separate can of worms). I didn't look too carefully at your objective function but it looked continuous - small perturbations in input mean small changes in the objective function. Like hypoglycemic readings, you can easily calculate "how hypoglyemic" rather than a yes/no. Naturally there are places where the objective function isn't continuous and that's where you have to do a discrete-style search, but when it's mostly continuous there are well-known numerical methods. Like check out https://docs.scipy.org/doc/scipy/reference/optimize.html, it isn't necessarily what you need but looking up the Wikipedia pages of the method names will be helpful. I've also found ChatGPT knows an insane amount of math, I wouldn't trust it to write a specific algorithm but it can give intelligent comparisons and list similar algorithms.

What I was saying is I don't think N_51 is the right way to model a dose. I would model it as a real number in the interval [0,50]. I would still round whatever the model gave to what I could actually measure out decently, but within the model I would not use discrete numbers.

Mathnerd314··on Taking my diabetes treatment into my own hands
> https://github.com/SmartCGMS/core/blob/dffdd89a274144d0e9ecb...

> Especially, a diabetic patient is warned that unauthorized use of this software may result into severe injury, including death.

I like the idea of the post - I have actually been thinking about including some biophysical models for medications in my app - but I do think that if you don't understand what a system of differential equations is, maybe trying to use a software library as a black box is a bad idea. For example... genetic algorithms... really? Like use a shooting method or bisection or something. If you have 3 doses you have 3 variables and it is all continuous so searching the space of inputs should be much easier than examining 51^4 discrete possibilities.

Mathnerd314··on Constantine: Nim lang high-performance, zero-dependency cryptography stack
> Why Nim

Does anyone else like Nim? I'm thinking about using it for a project.

Mathnerd314··on Story points are pointless, measure queues
What about function points? (https://en.wikipedia.org/wiki/Function_point) They are basically just lines of code, but LOC has a precise definition and is not just "whatever it takes" like a story point.
Mathnerd314··on The Rise of Faceless Accounts on Instagram
> I spend anywhere from 1-4 hours a week teaching classes live, answering questions and offering support to very real people who are struggling to market their small business. I know from experience that no matter how many step-by-step guides I make, what people always really need is a human. A teacher. Someone who sees their effort and can offer genuine feedback on how to keep moving forward.

... or do they just need ChatGPT? Because the rubber duck effect is real, but I think people have the capability to succeed by themselves.

Mathnerd314··on Just Be Rich (2021)
> If you keep receiving all the income you want and I'll get exclusive rights to all of your wealth, surely you got the better side of this deal then?

I think so, because you can use the income on consumables. Like say you got a no-limit credit card. You go on exotic vacations at tropical resorts. All you have are some (economically worthless) photos of yourself having a great time. When the credit card company comes calling, you turn out your pockets and say "sorry, I'm broke", and walk away to your next plane flight. Definitely seems like a good deal to me, not so much for the credit card company.

The simple fact is that most people are wealth-neutral or even wealth-destroying in that e.g. they wreck their car and just buy another.

Mathnerd314··on A.I. Needs Copper. It Just Helped to Find Millions of Tons of It in Zambia.
IMO AI means neural net. I get that people use it for other things, but that's what I use it to mean - there is just no other term that's easy to say. And at this point the idea of breaking problems down into "neurons" and activation patterns is inherent to most AI models. Here though the keywords are "ensemble machine learning" and "Bayesian" - they could have used a neural net for the machine learning but most likely it is just XGBoost or similar. https://ia.acs.org.au/article/2021/the-ml-technology-looking... mentions they are also doing full-physics joint inversions and computer vision, perhaps the vision is a neural net.
Mathnerd314··on Nevada’s public employee pension fund invests passively and beats peers (2016)
> The dormancy period for IRAs cannot begin until the account owner reaches the age at which one must begin taking required minimum distributions. As of 2023, the required minimum distribution age is 73.

So not until you retire.

Mathnerd314··on Tell HN: your next idea should focus on aged care
I'm working on a fitness app, I was mostly thinking about myself but as soon as I looked at best-selling fitness books it was clear that the market was pretty much all seniors. Although it could just be that seniors like books more, I also found similar trends in other media.
Mathnerd314··on I was an MIT educated neurosurgeon – now I'm alone in the mountains [video]
There are references in her book. The effects of pH and so on have been well-studied, and antibacterial mouthwashes are well-known to kill bacteria. I don't think there's been an RCT or anything of her system specifically, so that is based on her experience, but the studies do demonstrate that brushing alone is not sufficient. I'm not saying she's the last word on the subject, but it's how evidence-based medicine works - if you don't have strong evidence, you look at weak evidence such as expert advice, and I haven't found any other advice that discusses going beyond brushing. That's sort of the issue, is that (similarly to this neurosurgeon's experience) the vast majority of dentistry is focused on filling cavities, rather than promoting oral health or health in general.

Ellie Phillips is a big fan of xylitol though. The science on that is a lot less clear, e.g. how much xylitol is necessary in gum (she of course advocates huge amounts), and then she also sells mints which have little effect on plaque. (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8791908/) I sort of ignore that, just because she has to make money doesn't mean the rest of her advice is not evidence-based.

Mathnerd314··on I was an MIT educated neurosurgeon – now I'm alone in the mountains [video]
Ellie Phillips has this triple mouthwash system, in her book "Kiss your dentist goodbye". Apparently she hasn't had her teeth cleaned in 40 years. I have been using it and it seems to work, in that my dentist says I have the best teeth out of all his patients despite me brushing my teeth maybe once a week. The motivation for the mouthwash is simply that mechanical brushing isn't sufficient to kill the bacteria, whereas mouthwash is if you can disrupt all of the biofilms. And then the other two mouthwashes are for pH and fluoride.
Mathnerd314··on Analyzing my electricity consumption
I think waiting a month is fine? I get reports monthly anyway.
Mathnerd314··on Automate Project Environments with Devbox and Direnv (2023)
> despite it being a very useful tool, its setup requires investing time and getting over the Nix ecosystem's learning curve.

They mention Nix but I guess they are referring to the use_nix integration built-in to direnv? There is a fairly detailed (but old) comparison in https://github.com/direnv/direnv/wiki/Nix#some-factors-to-co... and in the meantime lorri and nix-direnv are the only ones still maintained. But you aren't limited to Nix when using direnv, for example there is nvm. https://github.com/direnv/direnv/wiki/Node#using-nvm

Actually, the post's solution, besides being built on top of direnv, uses Devbox, which itself is built on top of Nix... https://www.jetify.com/devbox/docs/faq/#how-does-devbox-work So they are saying they are outside the Nix ecosystem when in fact they are in it. It is yet another set of nice scripts on top of Nix.

Mathnerd314··on Analyzing my electricity consumption
What about requesting it under GPDR?
Mathnerd314··on Insights from over 10,000 comments on "Ask HN: Who Is Hiring" using GPT-4o
If you read TFA then you will see the answer is yes. Not deep insights though, it is basically just keywords and a few numbers.

I think bytes is generally a better metric than number of entries, naturally 10,000 books will have a lot more insight than 10,000 one-liners.

Mathnerd314··on Code reviews do find bugs
My question is, do human reviewers find more bugs than ChatGPT? Because finding a cofounder costs a lot but asking ChatGPT is free. https://www.thatsoftwaredude.com/content/12848/chatgpt-can-d... says it is mediocre, but that was a year ago and honestly mediocre code reviews seem sufficient.
Mathnerd314··on My philosophy of exceptions: they're always ambiguous (2021)
Errors have the connotation that something has gone wrong, exceptions do not. Exceptions as used in CS also do not have the connotation that they are unusual, as pointed out by the article. But generally, every error can be made into an exception.

As far as deciding on what they mean, I have brought up ChatGPT's definitions in arguments and been laughed at. People seem more interested in arguing than in making their vocabulary precise.

Mathnerd314··on My philosophy of exceptions: they're always ambiguous (2021)
I will paraphrase the Wikipedia definition (itself from Flaviu Cristian and John B. Goodenough):

Each procedure has a precondition, a set of circumstances for which it will terminate "normally". The set of "normal" circumstances is subjective and defined entirely by the programmer. An exception handling mechanism allows the procedure to "raise an exception" if this precondition is violated. The exception handling mechanism then specifies how the exception is handled.

Mathnerd314··on Open source is neither a community nor a democracy
By this logic, X/Facebook/Instagram/etc. are not communities, but "ecosystems"... after all, everyone controls their own posts. You can't force someone to post something you want. "Don't like what <celebrity> is posting? Follow one of the countless alternatives. Or start your own account! Here, you can even use this automated bot as a base for making the posts you'd like." Meanwhile, "whatever word you choose, you'd do well to remember that <platform> is first and foremost a method of collaboration between elites. Not an entitlement program for petulant users to get free stuff or a seat at the table where decisions are made."

But these social media platforms are clearly communities... they even have "community guidelines". Not to mention Github https://docs.github.com/en/site-policy/github-terms/github-c...

Mathnerd314··on What Happened to People Magazine?
Well, for the top ones I watched the YouTube reviews, they all matched 100% with the objective specs but occasionally the YouTubers disagreed on the subjective qualities.
← PreviousPage 7 of 34Next →