this post was submitted on 16 Jun 2024
126 points (97.7% liked)

Python

6347 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] wewbull@feddit.uk 17 points 4 months ago (10 children)

Furthermore there are many changes to NumPy internals, including continuing to migrate code from C to C++, that will make it easier to improve and maintain NumPy in the future.

I realise that C can be rather low level a lot of the time, but I'm not sure I'd pick C++ to help keep things easy to maintain. It opens up a Pandora's box of possibilities.

[–] cbarrick@lemmy.world 16 points 4 months ago* (last edited 4 months ago) (8 children)

With a good style/best-practice guide, C++ can be quite productive of a language to work with.

Those kinds of guides typically define which standard/convention to use and which features not to use (cough exceptions cough).

I highly recommend Google's C++ style guide: https://google.github.io/styleguide/cppguide.html.

[–] pankuleczkapl@lemmy.dbzer0.com 4 points 4 months ago (1 children)

You accidentally added a dot at the end of the link. Here's the fixed one https://google.github.io/styleguide/cppguide.html

[–] cbarrick@lemmy.world 20 points 4 months ago (1 children)

I intentionally added a period because it was the end of a sentence.

If your Lemmy app messed it up, then that's a bug in its markdown parser.

[–] rhymepurple@lemmy.ml 3 points 4 months ago (1 children)

I'm curious about this. The source text of your comment appears that your comment was just the URL with no markdown. For your comment about a markdown parsing bug to be true, shouldn't the URL have been written in markdown with []() notation (or a space between the URL and the period) since a period is a valid URL character? For example, instead of typing https://google.github.io/styleguide/cppguide.html., should [https://google.github.io/styleguide/cppguide.html.](https://google.github.io/styleguide/cppguide.html) have been typed?

[–] cbarrick@lemmy.world 4 points 4 months ago* (last edited 4 months ago) (1 children)

Huh. This got me curious.

Yes, I did just type a bare URL. Every mature markdown parser I've used turns this into a link, and appropriately handles trailing punctuation.

So I went to the spec, and it's explicitly called out that this is not an autolink. Autolinks must be explicitly surrounded with angle brackets <>.

So yeah \shrug.

https://spec.commonmark.org/0.31.2/#autolinks

Edit to be clear: This means that both of our markdown parsers are wrong relative to the commonmark spec. But I'll argue that if a parser is going to attempt to autolink this, then handling trailing punctuation is better than not.

[–] rhymepurple@lemmy.ml 2 points 4 months ago

I did not know about autolinks - thanks for the link!

It is interesting how different parsers handle this exact situation. I usually am cautious about it because I typically am not sure how it will be handled if I am not explicit with the URL and additional text.

load more comments (6 replies)
load more comments (7 replies)