Better HN
topnewbestaskshowjobs
Log inSign up

BiteCode_dev

24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions

I write to save you time and effort when dealing with Python:

https://www.bitecode.dev/

Email: contact at bitecode.dev

Submissions

comment 3y ago · link · parent

It's very hard to filter NSFW content. Every site I tried, unstable diffusion, kawaix.com, Mage space, novel ai... They all have some content moderation on (to avoid CP, to keep payment processors happy...), but things leak.

Some are really bad at filtering. Kawaix is particularly terrible at it, because they are new, while mage have upped their game a lot but had many months to do so.

It feels like 2000' again, and it's the wild west.

Plus when you have a horde of teenagers having a whole summer to try prompts from their bed, you get serious pen testing sessions.

comment 3y ago · link · parent

I know many hunters, and they do.

comment 3y ago · link · parent

I'm the first one to hate on JS, but the whole integrated event loop, with auto scheduled async tasks and Promise system that works both with callbacks or async is one of the easiest system for http calls I ever used.

comment 3y ago · link · parent

And worse, when you do, something loop back.

comment 3y ago · link · parent

Damn, I explicitly disabled the subscribe wall in the settings. WTF?

comment 3y ago · link · parent

Also, asyncio started like this as well.

comment 3y ago · link · parent

Summary:

Concurrency has a lot to do with sharing one resource, and Python has dedicated tools to deal with that depending on the resource you must share.

If you have to share one CPU while waiting on the network, then the specialized tools for this are asyncio, twisted, trio, gevent, etc.

Asyncio is the current standard to do this, but tornado, gevent and twisted solved this problem more than a decade ago. While trio and curio are showing us what the future could look like.

But chances are, you should use none of them.

1538.

Asyncio, twisted, tornado, gevent walk into a bar(bitecode.dev ↗)

195 points · by BiteCode_dev · 3y ago · 77 comments

comment 3y ago · link · parent

Nice tips.

I would add: embrace tab containers (https://support.mozilla.org/fr/kb/utiliser-conteneurs-firefo...), especially if you love chrome profiles.

They do half of what profiles do: they isolate cache, cookies, sessions, etc. But they do so in a very light manner and fast manner. The UI is better too. So for things that don't need getting different settings or extensions and so on, containers are the way to go.

comment 3y ago · link · parent

Now sing it with the melody of Stairways to heaven.

comment 3y ago · link · parent

Gravity is not instantaneous.

comment 3y ago · link · parent

For now there is nothing impressive with it. The perfs they show off don't include data sharing, which is very primitive.

Which means there is nothing subinterpreters do that can't be done with multiprocessing.

They show progress, and it's good. But I would wait until we can see gunicorn spawning WSGI interpreters workers and get similar performances to the setup with regular workers to get enthusiastic.

comment 3y ago · link · parent

The article is well written, and a good history of the all ordeal. But please note it gives more weight to the "against the GIL" side of the story, and all that can go wrong.

It doesn't highlight enough the other side of the coin:

- Sam's work is very high quality, and he brought with the no-gil some unrelated perf improvements so that people don't feel like they loose perf too much.

- Sam played the open source game perfectly, and is incredibly patient given what he is bringing on the able and how slow and flaccid the steering council reaction was (without the community pushing on it, it would still be collecting dust).

- Sub interpreters have yet to demonstrate any usefulness at all in Python. In fact, any serious metrics at all. This is the first attempt to be that well defined, and measured.

- The community feedback shown a great interest in this particular project.

- The steering council did conclude "We intend to accept PEP 703, although we’re still working on the acceptance details."

I'm not a no-gil enthusiast. I would be fine with have it never be removed, and I think we should try sub-interpreter first.

But what's fair is fair.

comment 3y ago · link · parent

We had an client side pastebin called 0bin.net

Recently, the last CP addict idiot basically killed us. We always remove those posts when we get a report (we can't see them by our-self, that's the point), but we were swamped by other things, and we didn't catch this one in time. It's a free volunteer project after all.

Our host took down our server and our backup server. We didn't have an offline backup because it makes taking down bad content more work.

We are still struggling to go back up.

This is why you can't have nice things.

(and also, don't host your backup server with the same host)

comment 3y ago · link · parent

I'm guessing every language has a module to abstract that.

E.G: for python, the current go-to pypi module for this is platformdirs (https://pypi.org/project/platformdirs)

It's probably easier to promote the use of the module than explain the standard.

comment 3y ago · link · parent

And hence the numpy API.

comment 3y ago · link · parent

Indeed, but this general wisdom is too vague to be useful on its own.

When I was young, I heard it many times, and couldn't make anything from it.

What's the audience exactly? How do I know them? Once I know them, what am I suppose to do? And all that stuff is contextual, so what are we talking about really?

When learning to negociate, knowing your audience is a very different thing than when trying to teach. Very few people are able to pull it off accross fields.

So I decided to write an article that targets a specific case with a concrete application and examples.

This would have been more useful to me back then.

comment 3y ago · link · parent

Lot of comments here are replying the nature of the solution matters.

E.G:

"Sure you are being paid for a solution. But you are also probably being paid for a quality solution"

or

"Code can be the solution. Good code even more so"

or

"when you pay to get your car fixed, there's an implicit expectation that it will be fixed well enough that it doesnt break the same way again"

But the article does address this:

> Now, of course, this is a tad more subtle.

> Different types of problems have different types of costs, consequences, and constraints. And solutions to those problems as well also have them.

> When code is the solution, it has a cost, at the very minimum in time and man-hours. And constraints, such as licenses, NDA, platforms, versions, formats, resource limits... And of course, consequences, such as technical debt, electricity consumption, user experience and hiring difficulties.

> While the clients don't care about the code, they care very much about those.

> And so, as IT professionals, we must communicate talking about that. Not about the code.

Of course the quality of the solution matters, but it any good thing has a price. Therefore you have to present it with the price, and then your opinion on the whether it's worth it.

comment 3y ago · link · parent

I was pleasantly surprised to realize my little part of town is getting quieter and quieter because more and more EV are getting in.

It's a delight.

Even if it were polluting just the same forever, it would be a significant improvement.

comment 3y ago · link · parent

And usually they are combined with existing parking spots.

comment 3y ago · link · parent

AKA encryption.

comment 3y ago · link · parent

It seems you haven't read the article.

1553.

Nobody ever paid me for code(bitecode.dev ↗)

210 points · by BiteCode_dev · 3y ago · 146 comments

comment 3y ago · link · parent

Yes.

Last week I talked with a guy who was pitching to rewrite their entire product in another language because he never heard of python GIS ecoshst and was doing spatial calculations by hand. Would cost hundred of thousand euros.

The HN bubble strikes again.

1555.

Ts_zip: Bellar's Text Compression Using LLM(bellard.org ↗)

4 points · by BiteCode_dev · 3y ago · 1 comment

comment 3y ago · link · parent

It's one thing knowing the language, it's another being productive with the ecosystem.

One takes between a few days and a few months. The other is a few years, unless you get pro training.

I guarantee most people starting with Python from another language will be productive quickly. But they will curse the packaging ecosystem because they will follow a lot of tutorials that don't follow this:

https://bitecode.substack.com/p/why-not-tell-people-to-simpl...

And they'll get screwed.

They will have a hard time learning this:

https://www.bitecode.dev/p/relieving-your-python-packaging-p...

It will take a long time of trials and errors, suffering all the way.

And this is true for many other aspects: good editor config, good web deployment story, good app sharing system, good tooling setup, etc

A runtime or a stlib is quite small and stable. But an ecosystem is gigantic and moving.

comment 3y ago · link · parent

This is why I always start with a tl;dr for all articles on https://bitecode.dev.

There is too much BS out there. Let's save everybody's time.

comment 3y ago · link · parent

> No surprises here. Come what may, Amazon has always strived to lower costs

I have a hard time reading "amazon" and "lower costs" in the same sentence.

The cloud is consistently an order of magnitude more expensive than self hosting, even when including people cost, unless you need every single bit of load balancing/high availability/normalization they provide.

The vast majority of projects don't.

comment 3y ago · link · parent

I've yet to notice any event where firefox "screw users over" that was not vastly overblown, especially compared to the competitors.

People tend to just judge Mozilla way more harshly.

It's very unfair: they do good, and we ask even more of them.

comment 3y ago · link · parent

The point is, it never became cool.

It was a good tool, and it still is. There is no marketing, no fluff, no buzz world.

It gets the job done.

That's what's good about it.

1
515253
184