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

> How did sticking to cash help them prevent their situation?

The contrapositive is not true.

comment 3y ago · link · parent

With a little jitter to make sure the fining system don't get overloaded by all those criminal companies.

comment 3y ago · link · parent

Indeed.

Just like when people say "sugar", they usually mean the white stuff, or fructose syrup, not carbs in general nor fructose in fruits.

comment 3y ago · link · parent

Summary:

The tenacity library comes with an intriguing mix of iterators and context managers to allow the users to retry blocks with this syntax:

    from tenacity import Retrying, stop_after_attempt

    for attempt in Retrying(stop=stop_after_attempt(3)):
        with attempt:
            1 / 0
You can use the same mechanism yourself, by creating and linking a custom context manager and iterator:

    class YouAndIhaveUnfinishedBusiness:
        def __init__(self, notify_success, attempt_number):
            self.notify_success = notify_success
            self.attempt = attempt_number

        def __enter__(self):
            pass

        def __exit__(self, exc_type, exc_value, traceback):
            if exc_value:
                print(f"You have disappointed me {self.attempt} time(s).")
            else:
                self.notify_success()
            return True

    class DoOrDoNotThereIsNoTry:
        def __init__(self, max_attempts):
            self.max_attempts = max_attempts
            self.success = False

        def __iter__(self):
            for i in range(self.max_attempts):
                yield YouAndIhaveUnfinishedBusiness(self.succeed, i+1)
                if self.success:
                    print("You are ready for the Kumite.")
                    break
            else:
                print("We trained him wrong on purpose, as a joke.")

        def succeed(self):
            self.success = True

1565.

Python cocktail: mix a context manager and an iterator in equal parts(bitecode.dev ↗)

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

comment 3y ago · link · parent

Cash don't prevent a dictatorship.

But having your entire population tracked when they pay and a way to shut down the money of anything because it has no cash fallback helps a lot setting one up.

comment 3y ago · link · parent

Really funny, but a lot of those contain more carbs than fiber, so they cannot be used every day.

comment 3y ago · link · parent

Op has a point since one phone is enough to ruin the privacy of a place. It doesn't need to be yours to cause some trouble.

comment 3y ago · link · parent

All those topics will go down the drain even more if you get into a dictatorship. And cashless is a fantastic tool to get it.

comment 3y ago · link · parent

Indeed. Or war. Or just bad engineering.

comment 3y ago · link · parent

I don't know of any business in my country that has the manual machine anymore.

But even if it did, how would visa process the recipe without power ? Their money is all bits.

Cash is cash, even when there is no accounting.

comment 3y ago · link · parent

Graeber's dawn of humanity have taught me humans have tried a lot of different social setups in the past for power and cooperation structures.

Many animals have evolved in different direction for educational, emotional and sexual structures.

I don't see any impossibility here.

Only the believe the future will like the present, which is obviously not true.

comment 3y ago · link · parent

Yes, but it did bring the concept to be debated to HN. I'm now thinking we should do it in my country.

comment 3y ago · link · parent

It helps with accessibility, not with the problem that cashless is dangerous for democracy.

Everytime you pay anything with something else than cash, it is recorded: the amount, the time, the place, and the nature of the thing you buy.

There is no way to go to a gay bar (or another place loaded with consequences) without a trace. And this is needed for human dignity.

There is way to support a controversial political movement without a trace. And this is necessary for new idea to come up.

There is not way for kids to do dumb things without a trace. And this is necessary for growing.

There is no way to pay for something when electricity or network goes down. And this is necessary to deal with crisis.

Basically, cash buys humanity margin of maneuver, and a fallback against any decaying societal or technical system.

comment 3y ago · link · parent

A good idea is a good idea, even when uttered by terrible people.

If Hitler said german should eat more fruits and vegetables, that doesn't make it false.

comment 3y ago · link · parent

As a Frenchmen, I think we can't say we are against government oversight. But I don't think I would agree that:

> people consider it unnecessary

In fact, I've discussed a cashless society with friends, and the majority is against, precisely because of this.

Now it may be my bubble, and not apply to the average French citizen.

comment 3y ago · link · parent

This assumes having a long couple relationship is necessary for humans.

Maybe the next generations will evolved in ways that means they are very happy without the structure of the couple.

Other structures exist.

comment 3y ago · link · parent

We will never know, but maybe they receive some governmental pressure to never publish and pretend the research lead nowhere so that their country only gets the benefit.

But the rogue scientist wanted to share it with the entire world.

It would make for a nice movie.

comment 3y ago · link · parent

True, I never think about the machine learning stack as something I want a stand alone executable for.

comment 3y ago · link · parent

Nuitka deals pretty well with those in general: https://nuitka.net/

comment 3y ago · link · parent

It's 5 years for free. You can have 15. You just have to pay for it.

comment 3y ago · link · parent

Sure, but then you have to militate also for half of the fortune 500, most of them having bigger impacts.

comment 3y ago · link · parent

What debates is there to be?

It's making us all sick. Slowly but surely.

comment 3y ago · link · parent

Hence the "because it solves a real problem by people deeply familiar with the problem, way more than a programmer would be."

comment 3y ago · link · parent

There is another point to consider: more and more people are writing code without being experienced programmer, thanks to easier languages, better IDE, more streamlined lib API, and now, even ChatGPT.

A geographer scripting her GIS in Python or a quant doing some pandas analysis has a very limited programming experience, since her expertise is in her job.

And so we see more and more code produced by people that don't know what is slow and fast, what is safe or dangerous, what is maintainable or not. This code is popular, because it solves a real problem by people deeply familiar with the problem, way more than a programmer would be.

I have an example at $current_client, where they have some matlab code that handles tremendous amounts of money, with no comments, no doc, no tests, side effect everywhere and some interesting quadratic behaviors. They solved by loading balancing the thing on 6 servers with 17 processes, and manual testing.

comment 3y ago · link · parent

I started to write summaries for all articles everywhere I post. No need for people to waste their time if they are not interested in the topic.

This also keeps my traffic stats clean: people that comes are the ones that are interested in the content. The number are smaller, but closer to what my real readership looks like. Since I have no ads, I don't aim for volume, so I rather know the truth.

comment 3y ago · link · parent

Everything in the US is getting the superlative treatment anyway. When I read something, if it's from UK I x2, if it's from the US I x0.1.

If it's from Autralie, I subtract the number of "cunt" and multiply by pi.

comment 3y ago · link · parent

It wouldn't stay barebone, or would stop being used. That's the point.

comment 3y ago · link · parent

I guess I always felt like the chosen one deep down.

comment 3y ago · link · parent

Yes.

I tried to come up with something that would convey in a few words that the GIL was going to be removed for sure this time. But as a Frenchmen, I couldn't find better.

"GIL will be removed" was the closest, but it's very long, and it sounds like all those times we had the promise it would be, but it never did.

So the Prophetic perfect tense is the best compromise: it asserts near certainty, it's short, and worst case scenario the article remove ambiguity.

Plus the news popped up this week in HN front page, so a lot of people knew the context.

1
525354
184