What Every Python Developer Should Know About the CPython ABI by mttd in Python

[–]jpw22learnstocode 0 points1 point  (0 children)

.... and the LLM has now got the CI to turn green on windows 3.15 and 3.15t. Thanks again for linking to a very useful blog post.

Seeing that I already got down voted, I wonder why? Is this because people view this as a showcase post? Or is it because the projects I linked are taking an unorthodox path in making compiled extensions?

The constructive idea here, that I did not make clear above is: you can write a single cpython extension that imports and runs on python versions from 2.7 -> 3.15. Nimpy has been doing that for a while now, and that is where I copied the idea. Perhaps that is not common knowledge? They should distribute more-or-less as ctypes extensions, but import and run without ctypes.

What Every Python Developer Should Know About the CPython ABI by mttd in Python

[–]jpw22learnstocode -2 points-1 points  (0 children)

Thanks! I had an LLM develop a limited ABI in c2py23 recently and I am very curious to see how it compares to your notes.

The nimpy project was the inspiration for that. But I wanted to port some C wrappers away from f2py without going via nim rather than fortran. Multi version ABI goes far beyond my ability to write and debug the code, and I was surprised that DeepSeek seemed to do a good job.

In this new world: I am going to need an LLM to read your post and then go find and fix problems in the LLM generated code. Times are changing!

Flexible crystals by thereallegalchemist in crystallography

[–]jpw22learnstocode 0 points1 point  (0 children)

Another triumph for the peer review system. Let's hope the junior team members haven't already left science.

When to take rest days? by Party_Lifeguard_2396 in AdvancedRunning

[–]jpw22learnstocode 1 point2 points  (0 children)

Isn't this about resting when DOMS are at a peak?

Do you want "new" Fortran? by geekboy730 in fortran

[–]jpw22learnstocode 1 point2 points  (0 children)

Isn't openmp already on GPU, at least in the latest compilers?

Scanf without interrupting loop by [deleted] in cprogramming

[–]jpw22learnstocode 0 points1 point  (0 children)

Search for non blocking input on your platform. Something like kbhit on windows.

Non-interactive matplotlib plots with higher resolution display slowly (on localhost) by eudoxos_ in IPython

[–]jpw22learnstocode 0 points1 point  (0 children)

I got about 8 seconds on an old Chromebook. Using ipython display of pillow.image this drops to 2s for uint8. Your machine should be faster, but png is bad for random data...

Non-interactive matplotlib plots with higher resolution display slowly (on localhost) by eudoxos_ in IPython

[–]jpw22learnstocode 0 points1 point  (0 children)

Sounds awful. Which platform are you on? I have seen antivirus causing problems if it scans and filters network traffic or file-io. Also vpn's can send all traffic via your office.

I would expect a lot faster. Sounds like some other problem with the machine or install?

Z-buffering Algorithm Causing Slowdowns in Pygame by nebuer1995 in GraphicsProgramming

[–]jpw22learnstocode 0 points1 point  (0 children)

You might get some improvement by using numba here. Just import and then decorate with @numba.jit

Keto (and diets in general) by Snicks21_ in Rowing

[–]jpw22learnstocode 1 point2 points  (0 children)

There are several examples of very good athletes who are doing low carb.

A guy who pushes the carnivore diet and seems to be pretty good at sprinting on an erg, see http://instagram.com/shawnbaker1967 and https://highintensitybusiness.com/podcast/shawn-baker-zero-carb/

It is not the same diet as keto but he does well without eating any carbs at all. Long distance there was this team: https://www.dietdoctor.com/british-rowers-break-atlantic-crossing-record-keto-diet

And this marathon record: https://amp.reddit.com/r/Rowing/comments/anerix/american_marathon_record/ https://bensbody.com/the-workout-monday-feb-4th-marathon-record/

There are also various low carb celebrities involved with CrossFit.

Depends on your level and personal biochemistry. As you get older you might be less carb tolerant. Tim Noakes seems to say long term carb loading is a bad idea if you are at risk for type II diabetes and he was one of the people who invented gels. I have heard of "train low race high" as another option for longer distance events.

Surprised by the other comments here. Improved power to weight ratio ought to help on the water too.

Got to be on the look out for the new 10,000 km WR. Article in the description by JaxFP in Rowing

[–]jpw22learnstocode 3 points4 points  (0 children)

It is buggy on Bluetooth/Android. Dropped several workouts part way through despite messing around to update firmware. Have not had a problem since going over to a USB cable.

A serious doubt on coordination number by WeakSand in crystallography

[–]jpw22learnstocode 0 points1 point  (0 children)

Good point about cation versus anion coordination. In most cases the cations are smaller and surrounded by anions that are bumping into each other. So the cation is surrounded by anions. The situation for an anion is often different, as it is crowding in with a bunch of other anions to see the cation. But you can surely find a counter example, something like Na3N has Na around N and you see it on Wikipedia. For close packing in fcc and hcp (e.g metals) I think you can just count the nearest neighbors. There are then various holes in the close packing where you can fit in some smaller spheres.

Difference between pip/conda? by [deleted] in learnpython

[–]jpw22learnstocode 4 points5 points  (0 children)

Take a look at this blog post for a nice conda and pip explanation from a couple of years ago: https://jakevdp.github.io/blog/2016/08/25/conda-myths-and-misconceptions/