Live data from Hacker News

Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

medicalxpress.com

141–150 of 394 posts

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#141
post #89

Earlier quoted context omitted.

Good question. The regex I tried is for extracting amounts in EUR and USD: / (? (? €|EUR|\$|USD ) [ \t]? )? (? (? -? \d{1,3} (?:[\.,]\d{3}|\d*) ) [\.,] (? \d{2,3} ) ) (? [ \t]? (? (? €|EUR|\$|USD ) ) | (? [ \t]|$|\n ) )/x

I'd imagine many nested named capturing groups may trip even the best automated system! I do like the solution though. I would've probably approached it differently, trying to first get the 'inverted' match (i.e. ignore anything that isn't a currency-like pattern) and refine from there. A bit like this one I did a while back, to parse garbled strings that may occur after OCR [0]. I imagine the approach does not trans…

Thanks for sharing! I have to admit I do not have the necessary brain cycles to spare today, but OCR processing is indeed of interest to me, and I will take a more in-depth look in the upcoming days.

The idea of an exclusionary approach sounds interesting as well. I'll have to think about that a bit.

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#142
post #47

Earlier quoted context omitted.

Some elements don’t occur naturally and need to be formed artificially / by force by smashing together atoms that would never smash together in nature (in some cases because those atoms in turn also don’t exist in nature).

I suspect chasd00 is making a pedantic point that the atoms are smashing together in nature. Because nature is just everything that happens. Although pedantic, it does challenge what we really mean when we say "natural". Just like what we mean when we say "chemicals". Everything is chemicals.

“In nature” means “it would not happen if humans weren’t around”. So no, nature isn’t “everything that happens”. Calcium and californium atoms smashing together to form oganesson would never happen “in nature” without humans using a particle accelerator to drive the process.

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#143
post #122

Earlier quoted context omitted.

One thing I always appreciated about CoffeeScript was its [heregex syntax]( https://coffeescript-cookbook.github.io/chapters/regular_exp... ), which made regexes clear and easy to document. Many CoffeeScript constructs were adopted into JavaScript and TypeScript, but unfortunately, heregexes weren't among them.

I agree. I'm pretty sure jashkenas got it from Ruby, which got it from Perl, with the `/x` flag (for extended regular expressions). Later languages have added support for the `x` flag, including C# and Rust. There is also a stage 1 proposal for JavaScript: https://github.com/tc39/proposal-regexp-x-mode

Nice roundup, and thanks for sharing that proposal!

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#144

Earlier quoted context omitted.

A proper litmus test, what's causing the hang in your case? Regex to me, is pattern finding and abstraction taken to the extreme. I like the challenge

I think what's causing the hang is using the site. I gave it [a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12} and it sat thinking about things for a few minutes. So I tried the reverse and asked it "Match a UUID" and it sat and thought about things. Now I am enlightened.

Aww shucks, and here I was feeling a wee bit proud of myself for managing to break it.

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#145

Earlier quoted context omitted.

It's nearly always a side effect of weight loss, and it's a good thing. It's confusing how people act like it's bad. If you're obese, your legs are enormously strong with crazy amounts of muscle. Have you ever seen someone obese do leg presses at the gym? They can handle tons of weight. When you lose weight, you don't need all that extra muscle . If you're carrying around 180 lbs instead of 300 lbs on your frame, all…

That is absurd. Muscle mass is a huge predictor of mortality and anyone who isn't actively strength training and maintaining higher levels of muscle would see a health benefit by doing so. The idea that an overweight person has "too much muscle" is nonsense. The side affect of muscle loss from these glp-1 agonist drugs is a serious downside that everyone should be aware of and try to mitigate if they choose to take t…

> The idea that an overweight person has "too much muscle" is nonsense.

I think you've misunderstood GP. He's not saying they have too much muscle when they're overweight. He's saying that take that exact same amount of muscle, subtract a ton of fat from their upper bodies, then they have "too much muscle" as typically needed for their body mass. I don't agree with their phrasing, but the point isn't "nonsense."

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#146
post #7

Delighted to discover this kind of breakthrough is based on a gnarly regular expression: https://github.com/Svensson-Lab/pro-hormone-predictor/blob/m...

Is that an anti-pattern to put the comment inside the function vs above

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#147
post #3

If this really has the potential to compete with Ozempic, then it should have a noticeable impact on Novo Nordisk's stock value [1], but we're not seeing that yet. [1] https://finance.yahoo.com/quote/NVO/

"The market" contains people like my dad who asked me if I knew about deepseek... 3 weeks ago...

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#148
post #7

Delighted to discover this kind of breakthrough is based on a gnarly regular expression: https://github.com/Svensson-Lab/pro-hormone-predictor/blob/m...

I got lost at (?R). IIUC, this is a feature of the "regex" module that "tries to match the entire regex recursively". Fun.

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#149
post #92

Earlier quoted context omitted.

I don't think that's the mechanism. A caloric deficit causes your system to metabolize whatever it can. It likes fat because that's energy dense, but muscle is also a good source of energy as well, and the more rapid the weight loss, the more body mass it has to burn.

As far as I know, muscle is only used when fat reserves are depleted or you don't eat enough protein for the brain's personal amino acid supply. I'm not particularly knowledgeable about this, though, maybe an expert can weigh in.

Any calorie deficit of 500 under BMR and the body will not just consume the fat stores but also muscle. That’s what I learned on the bodybuilding forums at least. Some people went too high on the deficit and ended up losing some muscle definition

Re: Natural occurring molecule rivals Ozempic in weight loss, sidesteps side effects

#150
post #146
post #7

Delighted to discover this kind of breakthrough is based on a gnarly regular expression: https://github.com/Svensson-Lab/pro-hormone-predictor/blob/m...

Is that an anti-pattern to put the comment inside the function vs above

Function documentation goes inside functions in Python, explicitly making them self-documenting. That can then be automatically picked up by any other code (like tooling for automatically generating API documentation) formalized as PEP 257, https://peps.python.org/pep-0257

Python will literally assign the content of your docstring (a triple-quoted string at the start of a function) to a special double underscored ("dunder") property called `__doc__` that any code can access; not just docs generators, but your own code as well (pretty dang useful for generating on-the-fly help output!).

Which also means that if you run into weird behaviour where a function doesn't do what you think it should do, you can just fire up the REPL, import that function, type `print(function_name.__doc__)` and presto, you have the documentation right there, specifically for the exact version you're using. You don't even need to leave your IDE if it comes with an integrated terminal.

Post reply on HN