Hacker Newsnew | past | comments | ask | show | jobs | submit | M0r13n's commentslogin

Personally, I have never liked the PEP 634 pattern matching. I write a lot of code in Python. 99% of the time when I could use pattern matching, I am going to use simple if statements or dictionaries. Most of the time, they are more straightforward and easier to read, especially for developers who are more familiar with traditional control flow.


Dictionaries with a limited key and value type definition are fine, but dictionaries as a blind storage type are a recipe for crashing in prod with type errors or key errors. Structural pattern matching exists to support type safety.

I'll argue that code is in fact not easy to read if reading it doesn't tell you what type an item is and what a given line of code using it even does at runtime.


You should use if statements if that's what you need. The match statement is for structural pattern matching mostly.


What’s the problem using it as a switch statement if you care about typographic issues? I do this so I’d like to know if I missed something and this is a bad practice.


It's not an issue, but that's not where most of the power is and can also be confusing since if you use variables in the case statement, the way it watches does not behave like a simple switch.


Having user other languages after finishing university studies, Python does not spark joy.


I am running an ARM64 build of Ubuntu on my MacBook Air using Multipass. I've never had a problem due to missing support/optimisation for ARM - at least I didn't notice any. I even noticed that build times were faster on this virtualised machine than they were natively on my previous Tuxedo laptop which had an Intel i7 that was a couple of years old. Although, I blame this speed mostly on the sheer horsepower of the newest Apple chips


I can absolutely relate to this. I had similar feelings for the last year or so - although I couldn't express these thoughts as well as the author did.

I've developed this weird addiction to making notes in Obsidian. It wasn't really about learning or understanding anything. I bought into the illusion that having notes in my PKM meant I had actual knowledge. Bigger graph = smarter me, or so I thought. I even started reading books just to feed the system: Look at me with my 3,587 notes this year - aren't I clever!"

Currently, I am just taking notes where it really matters: Readme, documentation and some loosely organised markdown files


I am confused, because this means that you won't be able to install anything. No compiler, no 3rd party libraries and no text editor that isn't preinstalled


> But in people with diabetes, this sensing system is dysfunctional, and the liver releases glucose even when blood levels are already high, causing a host of health problems.

I am pretty sure, that the dysfunctional glucose sensing and inappropriate liver glucose release are consequences and complications of diabetes, not the primary causes. Diabetes (Type 2) is primarily caused by insulin resistance combined with progressive beta cell dysfunction.

Therefore, treating the liver to treat diabetes seems .... weird?


As an analogy, when my driveway is covered in snow and ice, the root cause is precipitation. But my immediate need is to get my car out, so I shovel the drive.

Yes, treating symptoms is not the ideal, but if you can fix the immediate need of getting blood sugar down, that is still helpful.


In your story, your driveway was designed to be shoveled like the body is designed to deal with small amounts of sugar.

Let's say we had a particularly bad winter that required the use of power tools, which had the effect of damaging the driveway. Your body on diabetes is like a damaged driveway.

At some point you'll need to fix the damaged driveway. It will require a change in lifestyle while the driveway is being fixed, and perhaps even a change SOP's to reduce the risk of future damage.

Most people never give up on the power tools (supplemental insulin). Most doctors don't know any better.


Your analogy doesn't really apply to anyone with type 1 diabetes, which is an autoimmune disorder and roughly 10% of all diabetes cases. A lifestyle change cannot fix type 1 diabetes.

Additionally, partial remission in type 2 diabetes has a success rate of just 0.007% per 5 year post-remission cohort. The idea that a lifestyle change can "fix the damaged driveway" is essentially a statistical anomaly - it's not grounded in evidential standards has yet to be proven.


What factors contribute to the poor success rate?


Does it matter? A success rate of 0.007% is practically a statistical error. It signifies that the method is not feasible regardless of individual factors.


I understand the treatment to address those secondary consequences and complications, not the primary causes of diabetes.


You're right. But they explicitly wrote "we examined the potential of FUS as a treatment for diabetes". So they are discussing a treatment, not just symptom relief


"Medical treatment" definitely doesn't always mean dealing with the root cause. As you've learned.

Splinting a leg is treatment, but it has nothing to do with not drinking before driving.


Are you confusing the term "treatment" for the term "cure"? Symptom relief is a type of treatment.


There is a lot of research pointing to the duodenum being damaged and not playing it role correctly. It is essentially the signaler to the pancreas and gall bladder and liver to release All The Things! There have even been some studies around a new approach that resurfaces the duodenum with a hot water balloon that brings back proper function, known as Duodenal Mucosal Resurfacing (DMR).


You are talking about more like reversing the disease


I am a proud user of their assistent. It provides access to all models that I am interested in (basically only Sonnet/Opus) with stronger privacy guarantees than many of their competitors. Their UI/UX has definitely room for improvement. However, I find it pretty useful.


It has. But in my experience their own index is rarely used

> All results from external indexes.

The above is something I see all the time when using Kagi.


I've never seen that, do I need to turn on a setting to show the indices used or something?


It is shown under the search box right before the first result


Ah so it is (on desktop site), thanks. 'test' -> '58% unique Kagi results'; 'test2' -> 'all results from external indexes'.


I never heard about the supplementation of N-acetyl-cysteine with regards to the treatment of dry eye disease (DED). Could you elaborate on your experiences with the supplementation of NAD? I am unable to find any real useful information in the web



Thank you!


I tend to agree. But I also think that the images in the background tend to engage me emotionally much more than plain text would be able to.


Yes, especially with this subject matter. Normally I hate, but in this case it works.


Even if some of the problems shown in the article are not direct consequences of climate change, I am still sad that so much of the Norwegian nature is being destroyed. :-(


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: