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

I has always been hard.

comment 4y ago · link · parent

Just reformulate:

"Türkiye quit being called Turkey cold turkey"

comment 4y ago · link · parent

In Python.

comment 4y ago · link · parent

Context switching is terrible for productivity.

And displaying more things mean you need to context switch less.

comment 4y ago · link · parent

High resolutions on small screen are very hard to read.

comment 4y ago · link · parent

In python:

    from functools import partial 
    new_function = partial(yourfunction, the_injected_dep=the_value)

comment 4y ago · link · parent

Modules are already name spaces, and dependency injection can be configured using partial application.

comment 4y ago · link · parent

Poetry is the cleanest python deps handling experience, and I would recommend it as well.

But it is very slow.

comment 4y ago · link · parent

For those who are wondering what is the benefit over pip freeze: pip freeze dumps you entire venv, while pip compile gets project dependancies, and infer the requirements file from that.

comment 4y ago · link · parent

When in Africa, I worked around that problem and many others using a pypi proxy. Today devpi is the standard: https://devpi.net/docs/devpi/devpi/stable/%2Bd/index.html

You pip install from it instead of pypi. It will in turn download from pypi and give the result to you. It will also keep itself updated, and you can batch download during the nigh packages you assume you will work.

As a result, our entire team always as most packages locally available. Changing machine, location or purging cache didn't mean loosing this benefit.

Besides, pip caching wheels doesn't mean it's not making any requests, so it's still a better experience.

For big companies, I recommend it anyway: it speeds up the entire team work, CI, allow you to publish private packages, etc.

If you can't do that, the next best things is to do "pip download", instead of "pip install", and save the wheels into a hard drive.

comment 4y ago · link · parent

It's interesting if you got a lot of wheels to build locally, but this is very specific: most wheels are pre-built for you, that kinda the point.

It still happens from time to time, but if somebody else read this comment, you want to check how many wheels you build before doing so.

Also, you may want to cache those build once and for all.

comment 4y ago · link · parent

"PEP compliant" is kinda saying "convention compliant", it's not meaningful unless you provide the PEP number.

However, pdm and the likes are interesting because they are, indeed, PEP 582 compliants, which let you use __pypackages__ like one uses node_modules.

comment 4y ago · link · parent

No, however heating is $200 if electrical. But I work from home, so it's always on high temps, unlike for most people.

Also, that's still far from $600, that's not anymore "preventing your food to spoil", and that's only a few months a year. A/C as well, you don't usually use it in december in most parts of the US.

So yeah, I find this number surprising for a very rich country that should have great infrastructures.

comment 4y ago · link · parent

A $1800 energy bill would supposedly be the triple of a $600 energy bill that people pay for their fridge ?

I got a fridge, a freezer, a giant screen a phone, a dyson, an electrical water heater and a computer and various electrical cooking appliances.

I pay $60 a month. Who pays $600? Is that a common price in the US?

comment 4y ago · link · parent

A tree of code scopes is a graph, and you have one per module, plus a navigation history, which makes it 3d, even 4.

A device like that could be adapted for dev.

comment 4y ago · link · parent

Oh, I though it was the idea to go full electronic.

Then yes, a perfect ledger for all monetary transactions would be great, espacially for big sums.

Appart from that, the current financial system is mostly digital and satisfactory for day to day payments.

comment 4y ago · link · parent

I wish CUElang is going to succeed.

From what I'm seeing, it's already better than Taxi at what Taxi is supposed to be excellent at, and yet does much more, while still not being Turing complete.

I enjoy it better than JSON, YAML, TOML, and any respective schema associated to those. Sum and Union types are a killer feature, espacially since CUE can define a type and a value using the same syntax.

But it must be hard to implement, because for now, only the reference implementation, in Go, exists.

comment 4y ago · link · parent

Given we have one win for a 1000 fails with big companies, and that they clearly don't pay much consequences for their bad actions but benefit a lot from it, I doubt it.

Espacially if this becomes state mendated for national security reasons. Indeed, have you seen anyone been sued for the PRISM program?

In fact, it's already happening: have you seen a lot of things modified in iOS lately? It's super hard, so few people even attempt now.

comment 4y ago · link · parent

Because you can still use cash.

But once you can't, then the temptation to coerce people into "the right way" is going to be too big.

Then you need to hope you don't need to go to a gay bar in an anti gay state, pay for an abortion without your parent knowing, or give financial support to a controversial political group.

comment 4y ago · link · parent

For now. Modern chips will make it harder and harder, until one day we will have almost no control over the machine we are running. For our own good, of course. Plus nobody will care appart from us. And not all of us. Not the us that are working on this techs at least.

comment 4y ago · link · parent

And this is why I gave a try to VueJS in the first place. It can be deployed with npm, or a simple script tag.

It still does today, making prototypes easy to write, training very simple, and yet, it plays well with the more complex ecosystem.

Now of course, VueJS has Vite, which makes all the complexity of Webpack goes away, removes the slowness of compilation and has sane defaults.

Still, npm remains. I'm now used to it, but I understand that if you come from another language, it's not attractive.

It's funny to me that most people consider JS packaging better than Python packaging.

Both are troublesome, just for different reasons. E.G: using different versions of node is much harder, espacially on windows, or for the same project, than different versions of python. And installing compiled extensions is a way better experience in Python than in any other high level language. On the other hand, node_module is easier to use than the average venv.

comment 4y ago · link · parent

> The article acknowledges this somewhat, but it’s an example of another confidence fallacy: The idea that nobody knows what they’re talking about.

It was the opposite for me realization for . When I was young I was assuming if somebody was saying something, they were likely knowing what they were talking about.

After a bit of a ride in life, I know now that people that does do exist, but they are a rare bread, and usually about some very specific topic.

Competent people are the exception, not the rule, degraded mode is the default for humanity, and we are pretty good at going with it. At the beginning I though: what they are doing must be complicated, since it takes so much time and effort, or since there is so much debate about it. One day, you have to do it yourself, or you are behind the curtain, and you realize in 2 years anybody seriously working at it would be better that those life timers.

But still, because of the social pressure, playing pretend is the status quo for most.

Not just about jobs, not just about science, but about pretty basic things in life as well.

In fact, we are constructing a lot of our society around myths that are emerging because of this collecting behavior. It's quite fascinating to watch unfold, but it's such a waste of potential.

comment 4y ago · link · parent

In Python it's the opposite, as we good serious bootstrapping problems, and people complain for different reasons.

In C, people complain because tooling is too complex, in Haskell because 3rd party tools are unreliable, in PHP because it's riddle with security issues, in JS because it breaks compat regularly, etc.

There is always something it seems.

comment 4y ago · link · parent

Cash.

comment 4y ago · link · parent

In this era of quick outrage, thank you for doing the job of trying to figure out what is really going on, at the risk of taking the less socially acceptable side.

comment 4y ago · link · parent

"Also unlike Python, Rust is not inherently unhygienic, in that the advertised way to install packages is not also the wrong way to install packages."

As a Python expert, this hits home, unfortunatly.

Python packaging is fine now, but the sets of rules to follow to stay on the happy path is the opposite of intuitive, and definitly advertised.

comment 4y ago · link · parent

Interesing project, but I wish it would show me more about what doesn't work.

The bottom of the readme indicates the list of control flow instructions it supports, but it would be convenient to have in the table the ones it doesn't as well: yield, yield from, with, try/excep, match, lambda...

Does it support "else" in loops? Does it support unpacking?

Hard to know how much Python does this Python does.

Good luck to the project though.

comment 4y ago · link · parent

In Lyon it's even more obvious. There are some restaurants with truely huge spaces that you rarely see anymore in France, like near the sucrerie, or the brasserie georges.

But I think it's definitly about money, not culture.

Today, we are more numerous, and there are more building to buid. Hence the projects are in competitions for the resources to build them, like stone or wood. Cement being cheap compared to stone, it wins.

For the same reason, space is now a premium, and so it's expensive to have big volume for new constructions.

What's more, a rich country mean rich people, and so richer workers. 80 years ago, you could abuse your workers so much, and pay them so little, it was much cheaper to build things that took a lot of time. Today, time makes or breaks a project rentability way quicker.

Add to that you have to make everything up to code now, which is even more expensive. And with insurances everywhere, on top of that, environmnent risk evaluations, etc.

And of course, a lot of building used to be constructed either by the state, or rich families. Now, you must borrow money to build, which mean you add the cost of the financial system.

All those things add up.

comment 4y ago · link · parent

Not even that, since it's just a feedback about how people perceived communication.

But we know the brain is terrible at assessing its own decision process.

The hiring party could very well have not like the person, or be attracked sexually to the person, and felt that it was all about communication.

Post decision star rating is junk science.

comment 4y ago · link · parent

Not to mention remote interviews, and with a result solely based on the company rating about perceived communication performances. This has pretty much the equivalent scientific value of a twitter poll.
1
979899
184