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

It's super verbose, doesn't compose well with the host language primitives, is hard to introspect, full of gotchas and very low level.

comment 5y ago · link · parent

No, ORM provides an inspectable central entry point for your models with a standardized API. That's the feature.

That's why you get a great django ecosystem: the ORM abstractions allow all libs to rely on the fact the rest of the code access the model the same way.

comment 5y ago · link · parent

Language tends to converge on good features, luckily.

Although some generator implementations are not as complete as python ones, and the ecosystem generally donc have much support for it

E.g : Very few languages have an equivalent to itertools.

comment 5y ago · link · parent

Most people hesitating to vaccinate don't believe it's a hoax, but rather believe that if something goes wrong by accident, which in an accelerated procedure on a complex system in the middle of a crisis is not unheard of, the people in charge won't disclose what we need to know, take responsabilities or the make the right decisions.

Despite going to get vaccinated, I don't think it's an unfair line of reasoning.

comment 5y ago · link · parent

Unless I'm mistaken, it propagate pulling, but not pushing with send(). I haven't checked though.

comment 5y ago · link · parent

Yield from comes to mind.

comment 5y ago · link · parent

My parents does in fact talk about BW printing, hence as do I.

And I own a Brother inkjet. It was the same deal as usual.

I don't know about your experience, so can't really argue.

comment 5y ago · link · parent

> You would be really surprised at how much of one's knowledge sits on assumptions and believes that are not well founded

I would not, I am perfectly aware of it, just like I'm aware I'm not able to go through walls.

And now what ? Knowing it doesn't change the fact I have to go through the door anyway.

The best we can do is all we can do, there is nothing else, your point is kinda moot.

comment 5y ago · link · parent

Yes. In fact, E.G: C# and JS have them, although they don't have exactly the same features.

edit, sorry I've meant generators. Incidentally, it's also true for js decorators.

comment 5y ago · link · parent

Generators are one of the concepts that devs from other languages under use in Python. It's a natural solution to a ton of problems, since it lazily evaluates, and only stores one result out of the entire sequence at a time, and its interface is compatible with the iterator protocol. It's a mini state machine with it's own little memory world as well.

If you are used to call backs, promises, tick() calls or closures, it will be natural to reach for them a lot, and be disappointed at their state in the Python ecosystem.

But while I do miss better anonymous functions support sometimes in Python, it is rarely a problem because it comes with other tools to arrive to the same result.

Generators are one of them. Of course, you'll have to realize that generators are way more that a lazy way of generating data. You can use them for control flow, hold state, hide complexity or delegate behavior using a common interface. The send() method is very often completely ignored by most devs, and the yield from underused.

But beyond generators are a lot more things that, in the same vein, will bring you to python enlightenment once you start thinking with them instead of trying to make a Python fits into a square hole:

- the functools module

- the itertools module

- context managers

- any/all/zip/iter/next/enumerate

- decorators (it can do so much more than you imagine)

- type hints (take a look at fast api for awesomeness)

comment 5y ago · link · parent

I don't know, and I weight the odds and wage a bet given the various sources of information I have and my knowledge of human nature.

Unlike most of my vaccine enthusiast friends, I don't blame people that want to avoid it, I get the sentiment.

I'm not thrilled at the idea of getting the shot despite being a strong vaccine proponent, but I have made the appointment. Maybe it will turn out to be the wrong decision, however I took it with the best of my knowledge and abilities. And that's all what we can do.

comment 5y ago · link · parent

Or can enter the proper key words on Google.

It feels like cheating, but I put my imposter syndrome in a trash bin years ago.

comment 5y ago · link · parent

The Ethiopian in Israel being injected with contraceptive without consent, while not a vaccine in itself, didn't help either:

https://www.theguardian.com/world/2013/feb/28/ethiopian-wome...

The COVID crisis is as much a trust crisis than a health crisis. The internet made the people deeply aware of how little the people in power actually cares about the average citizen or customer, and now that we really, really need the mass to have confidence in the institutions, it's getting hard to play the "for real, we are good this times guys" card.

comment 5y ago · link · parent

I use the imagery to create a visual atmosphere rather than aiming at calling out a particular demographic.

Besides, I don't blame him, he was performing the job he was paid for.

comment 5y ago · link · parent

I would never buy something else than a laser printer again.

The alternatives are unreliable junks with gold priced cartridges that will dry on you at the sightless neglect. The machine will find a way to end up breaking, jamming or printing garbage at some point anyway, after what you end up buying the new one in a moment of panic, which again lasts barely the honeymoon period.

But then, one day I decided to suck up the buying price, and went laser. My brother too. Since then, every page prints, fast, clear, like the first one. No jam, no breaking, just printing. And so many pages, like the cartridge could never end.

One day though it did, so I prepared to bleed to death again, except it was $10 on amazon.

I wish I could take a time machine and sing to my young self the gospel of laser printers.

comment 5y ago · link · parent

Exactly.

As a freelancer, every time a client decides for a cheaper alternative, I make very clear I would be delighted to work with them in the future anyway. It rarely fails, one or more years later, the clients calls me back because their cheap alternative turned out to suck and be expensive eventually. Last month, a client from Luxembourg called after 6 years of total silence. They still had me in their listing. 3 years ago, one called me because 2 years prior, the 50k quote they rejected from me turned into a 400K bill from my competitor, and still no release yet.

My rates have been steadily increasing for years thanks to this. Before, geeks were at a disadvantage because people didn't know better, and teams with a good marketing would destroy us. But now, they have been burned so many times. And it pays because more and more devs coming to the market are becoming dependent on their tooling. Now, more often than not, I work with teams that have been copy/pasting git commands not knowing what they do, that have never, ever looked the source code of their framework or don't know how to use a debugger. The HN bubbles tends to blind us to the reality of the corporate world.

Yesterday I did a deployment, but was not allowed to touch the machine. Instead, they made me call a guy sharing a screen of a Vista machine, while he was sshing prod using cmd.exe, and I had to dictate him the instructions to debug the deployment on their custom linux setup. A near retired sysadmin that couldn't type with 10 fingers, pressing 30 times the up arrow to find a bash command in the history every time. He could click on WinSCP very well though.

This 20 minutes job turned into an afternoon of billing.

Though I suppose that's what I look like as a Python expert to an old timer from the 80s that can code in assembly, debug using strace and understand L1 cache :)

People are scared we are going to get automatized by AI.

I am preparing for the most lucrative decade I ever worked in.

comment 5y ago · link · parent

Well python is old and doesn't have a lot of funding, Go is young and is backed by google.

I do expect that the state of dependancy management is going to change in the next few years because:

- MS has entered the game

- PEP are being worked on a lot on packaging lately

- shiv, briefcase and nuitka are getting traction

- poetry and dephell are very qualitative tools

- __pypackages__ is on the way (try it with pdm)

- pyflow show a very interesting approach to installing python

- python 2 is dead for good

- wheels are now ubiquitous

comment 5y ago · link · parent

That's harsh. I do think he is very wrong and ignorant, but there is no need to be upset about it.

The article is not without interest for someone who don't see the python ecosystem regularly.

I hope you didn't flag the article for that.

comment 5y ago · link · parent

Why is it flagged ? The article is imperfect, but midly useful.

It does forget to mention very important topics:

- type hints are finally useful, thanks to better mypy default and support, and allowing built-in, protocols and shortcuts into the syntax

- 3.10 ships with pattern matching and, I must insist, absolutely better error messages (being waiting for that for a while)

- black is the status quo formatting tool in the community

- pydantic base libs are getting a lot of traction (the article does mention typer, but not fast api)

- dephell allow you to convert between all those mess of various build systems so you can easily start with pip and move to poetry

- a new dev is now PAID by the PSF to work on python

- __pypackages__ is being actively experimented with, with initiatives like the pdm, the py launcher or pyflow (which also aims to take pyenv job, but saving you the compilation)

- plenty of speed work being done by MS, but also 2 other projects

- pyproject.toml is has now enough PEP to be better than setup.cfg , including one for a lock file

- vscode is now the most popular python ide, their language server pylance rocks and does feature auto imports now

- zipapps with shiv and compiled apps with nuitka changed the game of python deployment

- brett canon decided to use doit as a build tool publicly for new projects so it's getting traction. Ok, I kinda oversold it to him, but it's a good tool, it's worth checking out.

- asyncio is not a curiosity anymore, and the ecosystem is pretty mature, with uvloop, aiohttp, httpx, trio, etc. And the work for a integrated nurseries into the stdlib is on the way

- concurrency in Python has seen a boost because of the stdlib ShareMemory module, and sub interpretter are now being tested by popular projects

- python 2.7 has been dead for 1 year and it's business as uasual

- python 3.6 is the "old python" now. Funny, considering we used to thing f-string were the new toy

- rust is becomming python best friend, with more and more extensions being written in rust, and even one python implementation

- pyiodine makes it trivial to test real python code in a webpage. For web dev it's not usable, but for teaching it's been awesome:. Type to use sqlite in there, it's works magically, despite never touching the server : https://notebook.basthon.fr/

- htmx (the js lib) is getting used by pythonista that don't like js much

- wagtail, the cms, has become a thing of beauty

I probably forget a lot of things.

comment 5y ago · link · parent

Python is no Haskell but type hints does reach Pareto level for catching bugs. Mypy is now well integrated into IDE so no reason to have a type error anymore.

I will switch to python 3.10 as soon as it's released just for the better error messages and the typing goodies though.

comment 5y ago · link · parent

I've tasted it, and agree with your parent. Most people just have no idea what their food is supposed to taste like, so if you give them decent tomatoes, they will think they are amazing.

Do your study in the south of italia in the summer for a fair fight.

comment 5y ago · link · parent

People eat fried chickens because their greens taste like crap while the fried chicken taste good even with a crap chicken.

Give a person delicious plants, and they will eat them.

comment 5y ago · link · parent

No it's because this way your left hand only deals with blinker, and your right one wih the gear shift. Separation of concerns. It's reversed in the UK of course.

comment 5y ago · link · parent

Of course, it's a collection of things, but it's not true for tomatoes in can, which you can put in right after the harvest. And my ex house mate cans from the garden would always feels like fruit juice while the supermarket one, well...

comment 5y ago · link · parent

No, 2 years ago I ate amazing cherry tomatoes from a friend garden. He told me he didn't plant them, they came out themself out of the shitty store bought ones that he discarded one day.

The variety matters, but that's not the end of the story.

comment 5y ago · link · parent

Nope. I've seen many times seeds from letfover of tasteless salads grow into delicous plants after being just throw away in a fertile garden.

And honestly I met so many farmers that have no idea what tomatoes should taste like it's not even funny. Dining at their table, I hear them rejoice the produce in their plate is so good while I cringe because they feels like clown noses compared to the real thing.

Just like people can't fathom that we used to have bird migrations that cover the entire sky, people don't realize what we have lost with food. And they think they do, they think you are some kind of bragging posh to tell them that that's not supposed to be like this.

But I ate strawberries from my mother in law garden yesterday. It felt like eating sweets.

I haven't eaten some like that for 20 years, and I'm a very picky buyer.

Her soil is full of life.

Fruits and vegetable have been selected for being awesome for centuries. If you treat them well, you will not want to eat a kit kat instead.

But I don't blame the kids that do: currently, the kit kat tastes way better that whatever they have for lunch.

comment 5y ago · link · parent

> The soil is basically just a substrate to hold water and fertilizer,

This view is incredibly harmful. What lives in the soil is important too, small animals, insects, mushrooms... And the soil supports this. The density, temperature, texture are all factors to it.

Every time I get to the US, I'm aghast at the pitiful taste of the fruits and veggies. The way you are growing things produces volumes yes, but of tasteless empty shells of a plant.

Of course then you put sugar on everything because the raw thing is aweful to eat.

So you get obese people with nutrient deficiency, on top of a dead soil that is an ecological disaster.

Seing only one dimension of something or maximizing productivity always leads to some kind of unbalance, and the effects are far reaching.

comment 5y ago · link · parent

It's only transparency for us, big players still have means of privacy.

The gov do care about what you buy.

comment 5y ago · link · parent

We have to take in consideration that we are weighting space exploration against the comfort of a minority of hobiists. Do you want a thousand people to take pretty pics of the sky, or millions to have rural internet ? I agree we should make sure we don't destroy the night sky view for the naked eyes, but I'm ok with having to see a satellite through my telescope when I look at venus. Not a big deal, and not important to humanity.

comment 5y ago · link · parent

In france being a waiters is way harder than most others jobs. At most jobs you get to work 35 hours on regular days, with a lot of hollidays and a fixed schedule.

Restaurants have a lot of legal exceptions because you need people to work on sunday, vacations, weird schedules, etc.

So compared to other situations in the same country, it's not a good deal.

1
135136137
184