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 4y ago · link · parent

It makes sense to me. Nowadays, all the GAFAM has solved most problems python is good at: glueing a lot of things, experimenting with ideas, bootstrapping new product, hiring and training a lot of new people fast.

They now are in the optimization phase. They first picked the low hanging fruits, but after 10 years of doing that they need to fine tune. For them, gaining 20% of speed can add up to millions of dollar a day, so it's now the new priority.

Just like with JS in the 2000', today they have to decide if it's worth rewritting python code or just improve the platform. For some projects, they made the calculations and it was just cheaper to improve the plateform. We got V8. Now Python is getting the new focus.

comment 4y ago · link · parent

The performance problems arrive very late, you can go very far with python.

So it makes sense to start with something that let you be as agile as you can, when you don't have money, and then, once you are filthy rich, spend the resource you have massively to solve your new problem.

Starting with something that is less productive to avoid a problem you might have later if you are rich doesn't seem practical to me.

comment 4y ago · link · parent

That should be illegal IMO. You are forced to subscribe after you paid.

comment 4y ago · link · parent

Electricity is not the only energy we consume, you have to see calories as a whole: transport, chemistry, making building, etc.

Also, the US delegated most of the industry in Asia, and the energy consumption moved there.

If you buy an iphone in the US, the energy used to create and ship that iphone doesn't appear on the US consumption, yet it is american.

And of course, any local consumption is affecting the world as a whole.

comment 4y ago · link · parent

Decreasing population and consumption is going to crash the economy no matter what, and poisining the land we live on is going to make our life terrible. We don't have a choice, billionaire or not, so not planning for it because they exist is like not doing exercice because you wife takes a big alimony: unfair, but unrelated to our survival. Unless you plan to kill the wife.

comment 4y ago · link · parent

You need people to work in giga factories.

comment 4y ago · link · parent

> False. The US electricity consumption per person has fallen in the last decade.

I don't have stats for the US, but for the world, the trend is growth until 2016:

https://imgur.com/a/WkaF60w

> It’s easy to assume people want to use endless amounts of energy, but consider once your AC gets things to a comfortable temperature lowering below that isn’t a benefit.

We invent new ways to consume power every day: video games, bitcoin, air sanitizer, food delivery...

> Hauling mangos long distances isn’t an inherent advantage from the trip, it simply allows them to be grown in a more efficient location

That's a good example: before, you just didn't eat mango if it didn't grow next to you, unless you had a lot of money.

> It’s easy to see a trend like people buying larger homes and assume it can continue forever, but if you look at billionaires you find they eventually find ever larger homes impractical

I consume more than my father, and he consumes more than my grandfather. The later didn't have a fridge when young, me, I can use a plane several times a year.

There is a huge margin between me and a billionnaire, and everybody wants to live like one.

comment 4y ago · link · parent

If the plan to prevent humanity from collapsing is to go to another (for now not life sustaining) planet instead of taking care of the one we are on right now that can sustain us, something is wrong.

Not saying we should not try, but that should plan Z, not plan B.

Not maxing out our current petri dish should not be controversial.

comment 4y ago · link · parent

> Capitalism isn’t tied to growth it’s tied to efficiency

That's a beautiful theory that doesn't match what we have put in application during the last century.

In pratice, our systems assume growth, and in fact the planetary resource consumption has just gone up and up. Green energy don't replace fossil fuel, it adds to them. When you give faster transport to people, stats tell us they don't spend less time in transport, they just travel more distance. When we make something cheaper, we don't keep enjoying the difference, we give it to more people. Once everybody has one, we make it disposable so people buy them again. You put computers to use less energy? Nope, people use them to do things they didn't do before, and we use more energy as a whole.

So yes, on a paper, capitalism is tied to efficiency. Practically, that's not reflected in our growth, as capitalism distorts incentive toward growth. And so the periods of capitalism are the periods with the most growth ever in human history. Also, when growth stats go down, the stock market goes down as well.

And even better, if the energy input goes down, the production goes down, and the economic health goes down. Because you need calories for all those machines producing things.

Innovation can't beat physics. At some point, if you want more, you need more resources.

comment 4y ago · link · parent

Innovation can't break the laws of thermodynamics.

If a resource is finite, you are basically betting the future of the specie on its ability to find a substitute before we run out, in the context of an exponentially growing chance of failure.

Right now we are betting we can find a substitute to fossil fuel before we run out of it, while exponentially consumming more energy. We haven't so far, since nothing comes close to the logistic practically, chemical flexibility and energy density of fossil fuel.

But even if we fail at that, we can recover. We have less performant alternatives that are enough so sustain humanity, albeit not at the current level of productivity (after all, we currently build nuclear plants and wind turbines using fossil fuel).

It's less true for soil we can live and growth food on, water we can drink, air we can breath, since those are complex systems.

It's very easy to bring out that it's not a zero sum game when you can type on a computer and order delivery food. But somebody in the desert will have a very different idea of the practicality of the claim.

There are many possible configurations where we end up with the equivalent of the desert of some sort for some very important resources given our population size.

Claiming we are sure to be able to innovate ourself out of those possibilities is naive, and frankly, arrogant. I'm sure somebody used that argument on the Easter Island.

comment 4y ago · link · parent

If there is much more mouths to feed that food, people will not laught a lot, and not love for very long.

comment 4y ago · link · parent

Periods of stability are necessary, but constant stability is undesirable, and idealised. However, unstability means immediate (albeit necessary) pain, which nobody wants to opt in.

comment 4y ago · link · parent

All our economical and political systems are based on growth, and it's very hard to sustain growth if you don't have growing resources (energy, mineral, etc) input, innovation and population.

If the population goes down, the system will go through a phase of chaos before stabilising (E.G: retirement systems will default, factories will not have enought workers, companies not enought clients, loan will not get repaid...), and people are very afraid of that. Elon Musk has made the topic quite popular recently.

I would argue exponential growth being exponentially hard to maintain, the chances that the system collapse are the highest anyway. Better that it does with a decline in population than a decline in resources. We can stabilitise and recover more easily from the first, than from the other one.

There were several times in the history of humanity when we here just a few millions. If we plan, we can even control the fall instead of going full throttle.

But we won't plan, nobody wants to vote for the end of the good times. We will protest, fight to keep the growth, and we will crash. We always do.

comment 4y ago · link · parent

In France, if you use "ami" ("friend"), it implies intimacy. What americans call friends are what we call "potes", which are "buddies".

The word "friend" is tossed around so easily in the US culture. "This is my very good friend Eric" can mean you know him from work.

But it hasn't always been like that, "friend" use to mean something more. I feel like it's not specific to "friend", but a general growing trend in America to use superlatives for everything. Like "I ate the most amazing fries yesterday".

This removes all meaning, all nuances, from the language. But it does a lot of virtue signaling and sells better.

And it makes sense, because Frenchmen are terrible sellers, and Americans are good ones.

Unfortunately it also mean I now have an automatic filter pass on American speech to tone it down.

comment 4y ago · link · parent

It's just a poc to show indecently running codes, the exec() is not how you will use it, but it simulates importing python code and running it (because an exec() is what import does :)).

comment 4y ago · link · parent

I have a client that wants me to work only on their official locked down laptop, which I do. But it has a terrible camera and microphone, so I use my own better gear.

It made a huge difference in the quality of life of all my coworkers with which I spend hours peer coding or in conf calls.

It's also better for myself, as my client takes me more seriously because in a meeting, as I'm the only one with good sound and image.

Were I to use only approved hardware, I would not be able to make our work life better.

comment 4y ago · link · parent

And a wifi that works and scales with the number of participants if you are at a conference.

comment 4y ago · link · parent

The forest in France are growing faster than we are cutting them. Therefore, using them for energy would make for:

- a cheap, local energy source;

- one that is renewable;

- one that captures as much carbon as its consumption emmitted when its renewed (minus transportation and transformation, which is true for any energy source we use).

So it seems it's not that of a bad idea if you manage to keep the forest sizeable and healthy. It's hard to do for the UK because it's a small densely populated islande, so maybe the tweet is valid for them, but extending it for all Europe is far fetched. Espacially since the UK brexited.

Now, I'm pretty sure if we start abusing it, we will discoverd it kills some important ecosystem to regularly turn over trees like that, or suck all minerals from the the soil. So I'm not going to assume it's without problems, but we don't have an energy source for 8 billions humans that don't have any.

comment 4y ago · link · parent

If you make a big project, you will have to use that many things with every langagues. If the language is rich, you'll learn the language. If not, you'll learn the project patterns. It's not specific to python.

But 99.9999999% projects won't implement metaclasses.

Most won't event implement decorators, context managers or generators. Use them, sure.

comment 4y ago · link · parent

Python is easy, not because it prevent people from doing complicated things, but because with only a few simple things, you are productive.

Most python programmer use 10% of the language, the same 10% that is described in most tutorial, because that's enough, and they don't even know the rest exist.

This makes for a very smooth, but long learning curve which allow you to enjoy python in the early years, yet keep getting a kick out of it after 15 years.

I hear a lot of people raising the same kind of concern you do in comments, but in the field, I never do with people actually using the language.

comment 4y ago · link · parent

Yes, also for anything else than subclass registration, there are things like the descriptor protocol or class decorators that are likely to be easier to use, debug and understand.

And metaclasses can be any callable, not just class. It's usually better to use a simple function.

comment 4y ago · link · parent

They don't have to, they can just say the phone synchronized on its own when set back out of travel mode. They will lie, of pressure you to download the data prior their search.

Again, it's not a technical problem. Abusive people are abusive.

Law enforcers are not good people because of their title, society shape them in who their are and how they behave. Currently, in the US, they are not shaped to be helping citizen.

comment 4y ago · link · parent

Right, I forgot that it was about americans.

But they can, and will if the trend of abuses continue, make you loose your flight, make you waste time, opportunity, and money. And put you in a list so that they do that every time your travel.

comment 4y ago · link · parent

Nope, if an abusive administration is committed enough, it will mark as suspicious any cleaned phone, especially if they can access freely metadata about your life without a judge.

No need for the content, they just need to make sure the activity score is higher than the one on your phone. It's not illegal not to have you real phone, but why haven't you? Do you have anything to hide? And they will make you life annoying enough, making you miss flights, waste your time, cost you money and opportunities, until most of the population comply.

It's a cat and mouse game, where you are trying to oppose technical solutions to people being simply abusive, which doesn't work on the long run, because the problem is that you are being ruled by the mob.

It's funny, because if were it be happening in China or in Russia, everybody would be loosing their mind, saying how those dictatorships are abusive. Then they would note how the Russian and Chinese don't seem to notice they are being abused and defend their country.

comment 4y ago · link · parent

No because if it's standard, they will ask you to disable travel mode and download all the data. You can say no, but you can't refuse and cross the border.

It's not a technical problem.

comment 4y ago · link · parent

I never used facebook for this reason and advised people not to. Now that you are locked in, there is not good solution. It's like smoking and getting cancer, there is no magic to solve the problem and a lot of pain. The best is to not start.

For gmail, have several addresses, with redirections to each others, use imap, don't use social sign it.

comment 4y ago · link · parent

I'm sorry for the pain it will cause you.

I had a similar story with my own accounts.

It's just lost forever, luckily I had many others, and didn't associate my whole life to any single account or provider, nor used social sign in, so it was not life altering, just a bit of work.

But selfishly, I hope those kind of story get published more and more so that people finally realized that what we told them not to do the for the last 20 years was not just for the sake of it.

People don't listen to preventive talks. We see that with cyber security, climate change, and so on.

They only start to move when they get hurt.

I wished people would have listened to us when we advised not to give everything to GAFAM, not to put everything online, and not everything on one provider. And certainly not to trust them with being on your side.

So they wouldn't have to get hurt.

But this is not how we, as a specie, learn. We need to get hurt.

So make sure a lot of people know about this. Not just in the hope to get the account back, but because maybe more people will listen this time.

comment 4y ago · link · parent

Source: my doctor

comment 4y ago · link · parent

You use several API, attach one provider per customer to divide the risks. When one provider bails out, you onboard new customers and new payment on the other payment provider.

Then you only loose the recurring payments on the lost provider that are on hold, and you are not dying, so you can resolve that problem using a lawyer.

This is crisis management, not technical perfection that you need for those situations.

comment 4y ago · link · parent

That depends of your weight and testosteron level because the body fights the inflammation by producing cortisol.
1
868788
184