Hacker News new | past | comments | ask | show | jobs | submit | ambivalence's comments login

You know that people change their minds and now Guido is working as part of a team at Microsoft that is literally called "Faster CPython"?


It is on Mastodon as well, actually: https://mastodon.social/@ambv/110665808046065754


Could we get the mastodon link as the main link, please? Can actually view that one.


Is the Twitter link really not working for you at the moment? I can open it without having an account.


You can't see replies on Twitter links anymore, though that doesn't really matter in this particular case.

Of course, who knows what it'll be doing tomorrow. I'd definitely think it's probably time for HN to prefer Mastodon (or Threads, I suppose) links, where a post is available on multiple microblogging things; Twitter has had any one of about five behaviours for non-logged-in linked tweets (work properly, work but without replies, spin forever, redirect to login, generic error page) over the last week, depending on when you try.


The tweet is currently viewable while logged out. Have you tried?


Only thing I see is: "Something went wrong. Try reloading."

(Mastodon link works.)


If you want real irony here, it's this: powering an app called Threads with Python that's got a global interpreter lock which makes threading hard.

Get it? Threads, threading...? OK, I'll see myself out.


Now that is Meta!


Gotten burned by that. Have a python utility that calls something that's very CPU intensive (GDAL) and I literally have to wrap this python process in java for real concurrency. Not a python expert by any means but I'd love to know what other people do when this happens. I'm assuming it's something revolving around containers and messaging (blech)...


I thought Python calling a native lib was the one time you could multithread your way around the GIL if you were cpu limited? Are the GDAL bindings not releasing the lock or something?


Is your problem that the c part of GDAL isn't concurrent and you are calling it multiple times, or are you blocking on something you shouldn't?

Python calling a concurrent c thing is super common. For more complex things there is multiprocessing, but that essentially is simplification of IPC.


Had a massive amount of images that I was trying to process for a specific purpose. I wound up spinning up multiple python processes within a java wrapper using concurrent linked queues. Got the job done but it's not the proudest moment of my life.


Why did you need the Java wrapper? You can orchestrate stuff like that within Python. The multiprocessing module.


You could have done this with the multiprocessing module. It interfaces like the threading library but it's launching new processes for each "thread". I've done a shitload of image processing in Python with it. You'll end up with a 100% Python version of what you did.


Multiprocessing does basically the same thing, but in python.


Python works around this by having multithreading through multiprocessing and IPC. its made pretty easy to use with the futures builtin module but is finicky/slow/hard to support.


I guess PEP 703 has to be auto-accepted now. I don't make the rules.


Meta does have their own higher-performance JIT-compiled implementation of Python, but I don't know if it still uses a global interpreter lock.


... wait, what? Did this morph out of HHVM? Any links on this?


Click on the link, it's linked inside.


Seems to be behind login.



Python does threading fine than most languges. Not every language supports native threading.


In short: static analysis, unit tests, staging environments, effective log aggregation.

The first one is a big productivity booster as it shows you bugs before you commit them.

Here's a post about this, not exactly new but still describing the general principles very well: https://instagram-engineering.com/static-analysis-at-scale-a...


Thanks. For context, I happen to have a PhD in static analysis, so I'm not entirely stranger to the general idea :)

Sadly, all the attempts I've had with static analysis in Python screamed that while the language and tools make a valiant effort at supporting a reasonable set of annotations, 8-9 years after PEP 484, the libraries are simply not yet ready for it (not even, in many cases, the standard library).

Unit tests, staging environment, effective log aggregation are all important tools, of course.


I would say that those things don't really contribute to the actual runtime scalability of the application. Those things ensure that the code is at least correct for what it's supposed to do, not necessarily whether it's performant. Even the most perfectly-written Python code will still be dog-slow and require an enormous budget to actually run at scale. It's obviously fine to do that and there are many success stories, but all of them required massive infrastructure investment.


> Even the most perfectly-written Python code will still be dog-slow and require an enormous budget to actually run at scale.

Nah, asyncio on uvloop is plenty fast.


For context, I was asking about scaling code complexity, not scaling performance.

That being said, my personal experience suggests that both are really hard in Python, and not independent.


A fair point about what? Threads is out for less than a day, I have 8 followers there so far. I originally posted this information on Mastodon, actually: https://mastodon.social/@ambv/110665808046065754

However, I have a much larger following on Twitter, so it was the tweet that got picked up by someone here on HN.

We'll see how this looks like in twelve months.


A fair point that it's stupid to implement a mostly plain text publishing site that doesn't support linking to any of the text published there.

Edit: Someone kindly pointed out that you can see the content in the browser without an account from following a direct link. (You just can't have the app installed or it will open that and drop you on the login page.) This makes me a lot happier with the product!


You can link to it, what are you talking about? An example fetched from a verge article -> https://www.threads.net/t/CuVaOg1PgU4/


This is the first time I'm seeing this. I'm surprised they have a .net domain and that the design is so terrible.

They just extracted Instagram comments and threw them in a sea of whitespace. No thought is given to anchoring content by importance or context, nor is there any esthetic apeal to it.


Oh nice! Thanks!

I hadn't seen one of these deep links before I installed the app. After I installed the app they just opened the app but did nothing because I don't have an account. But I just uninstalled the app and now I see. This makes me a lot more positive on this product!


That link doesn't work for me - just get a splash page


Same. Worked when I tried Chrome, but apparently they did not test Firefox.


They don't even have the dotcom?


Linking to it works better than linking to Twitter, in fact, as of this week (Twitter no longer shows replies unless you're logged in...)


Twitter no longer shows anything unless you're logged in. Everything just redirects to a login page.


You can’t link to threads? By design?

I was seriously considering trying it out, but if there’s no search engine visibility, there’s no point. Most of the searches for my real name pull up tweets.

Hopefully it’s just a missing feature that will be added later. Even TikToks are linkable, and those have very little google visibility.


It seems like you can generate links, but they don't do anything for people who don't have the app (except direct you to install the app). I haven't fiddled with it to see if they've implemented something to make the content visible to search engines. (Which presumably would mean I could see it too with some effort.) But I haven't seen such a thing yet.

Edit: Someone kindly pointed out that you can see the content in the browser without an account from following a direct link. (You just can't have the app installed or it will open that and drop you on the login page.) This makes me a lot happier with the product!


I am able to view links to Threads from a web browser without being logged in: https://www.threads.net/t/CuVaOg1PgU4/


At least there are links. That’s a good sign. TikTok survived on mostly that model, though it’s still important to make the content visible without installing an app.


Check my edit: It turns out this does work for deep links to threads and user profiles (the homepage is still entirely useless) as long as you don't have the app installed. Definitely much better than I thought.


I think Facebook/Instagram pioneered login walls for public post content.


Pay walls have been around longer than facebook


Pinterest felt especially egregious.


The fork is where the tweaks live.


There are three related terms: mocking, faking, and stubbing. They mean subtly different things, which the article points out. The author prefers the last one, and uses the middle one for complex cases, avoiding mocks altogether. But that doesn't mean he leaves third-party networking libraries run wild in unit tests. In fact, the very example he builds in the article shows how to avoid that without having to create a mock. Maybe you need to read it again?


As long as you can easily review code side-by-side with line numbers intact, you're good. The default was chosen for lower resolution 13" laptop monitors to be able to display the Phabricator diff page (think: Github PR review page) without having to wrap any lines.


This is now improved. Black is compiled with mypyc, should be roughly 2X faster than before.


Oh, good to know!


This was decided very early in the project, the discussion can be read here: https://github.com/psf/black/issues/51



Did you lock that issue before posting it here? Is this some kind of sore/forbidden topic for the project?

Edit: I suppose the question is superfluous seeing how many replies there are just here.


Yes, and yes. Edit: and yes.


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

Search: