Better HN
topnewbestaskshowjobs
Log inSign up

Mathnerd314

3,006 karma · joined Nov 1, 2009 (17y ago) · 1,339 submissions

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

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

Submissions

comment 2y ago · link · parent

> I couldn't resist

The common refrain of a teenager... https://www.npr.org/2016/04/15/474348291/why-teens-are-impul... honestly at that age I never went out of my room, and I still got in trouble. If you do develop some self-control, you could look at https://blog.benjojo.co.uk/post/dive-into-the-world-of-dos-v... or https://www.sciencedirect.com/science/article/abs/pii/B97801... (c.f. also https://hackmd.io/@_01X9rimQmWH33Djf8QhoA/SkygF9WdP which is based on that book)

comment 2y ago · link · parent

> Unexpected tidbit: If you abbreviate the term 'interrupt descriptor table'. Then reverse it - You get 'TDI', which stands for Turbo Charged Diesel Injection, an engine developed by Volkswagen fo- Okay. Ethically, believe it or not but computers emit more CO2 than cars.

Does this really help people learn the material? I am doing a presentation on networking in a week or two for a high school group. Certainly I could include stuff like this, but to me it seems more like a distraction. If I was writing this I would rather include something like a sample table of how IDT's were used by old DOS video games. (Disclaimer: I'm 30)

comment 2y ago · link · parent

Better question: what is going right for Intel?

comment 2y ago · link · parent

Say you have an array x = [1,2,3]. You do x[2] = 4. Now you have two arrays, x_1 = [1,2,3] and x_2 = [1,2,4]. x_2 is a "copy" with all elements the same except one. The "always copy" here means that (semantically at least) every array modification creates a copy of the array like this. Naturally this is slow, if you implemented it as-is, but then there are the optimizations I mentioned. And it is much easier to optimize a simple semantics consistently than to debug a more complex one. It is somewhat similar to Swift's value semantics.

comment 2y ago · link · parent

That's certainly one of the issues - if having children was separate from raising them, like how pet breeders are generally not pet owners, children would be more of a fungible commodity and everything would be a lot simpler. I'm not saying it should be like that, just that economically it's one of the reasons the child business is not an efficient free market.

comment 2y ago · link · parent

Ah yeah, I didn't mention the foster care system. If you think adopting a pet is hard, try adopting a child...

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

it is specifically the signals-based approach pioneered by Solid, https://youtu.be/82dzMKZzHrY?t=12314

comment 2y ago · link · parent

> 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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

> Why Nim

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

I think waiting a month is fine? I get reports monthly anyway.

comment 2y ago · link · parent

> 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.

comment 2y ago · link · parent

What about requesting it under GPDR?
1
678
45