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

I started my career as a php dev 15 years ago, and yes, there was plenty of wrong with php. Messy Api, terrible default, wonky typing, no namespace, etc.

It succeeded, as it's often the case in IT, not because it was the best, or even very good, but because it was easy to adopt and had a killer feature.

comment 6y ago · link · parent

Yes, and you can do it with import hooks as well.

The reason you don't see it in python much is more a matter of culture: we don't like too much magic nor DSL.

With the new generation of coders incomming, it may change though.

Hope not, as most devs are terrible at designing magic or languages and equally terrible at admitting they are.

It took a decade for the trend of monkey patching things in ruby and js to disapear and I don't regret that time one bit. Bad habits die hard.

comment 6y ago · link · parent

> What the original commenter is saying, and what I will agree will happen, is that the behavior of automatically trusting video as evidence will go away.

This is doubtful. People still believe in pictures despite it's so easy to forge. People believe obvious oral lies. Hell, people believe tweets.

The video medium is incredibly powerful, and the damage it can do is huge.

We are going to suffer for this, and most people won't even understand why.

comment 6y ago · link · parent

It's more about the fact we can't fire anybody, so hiring is a scary game.

comment 6y ago · link · parent

Clearly you have not lived in France :D

We complain about the US politics. We complain about the weather. We complain about how much we complain.

I'm pretty sure the gov cancels your citizenship if you don't reach your weekly complain quota. It's a matter of national identity.

comment 6y ago · link · parent

I live there. I've lived in many other countries as well. And I keep traveling.

I experienced the total opposite of your comment.

I've seen the road in the US. I've seen the health care in the UK. I've seen the internet in Spain. I've seen the cost of life in Switzerland. Heck, I've worked in Asia and Africa.

There are not a lot of countries where life felt as good as in France: germany, sweden, etc.

There are also not a lot of countries where people complain more than the French. It's a national sport.

comment 6y ago · link · parent

I heard this argument for the 35h work week in France. 10 years later, it proved baseless.

comment 6y ago · link · parent

"# check if frame is None" is indeed a good example of comments you should not write. It's weird that someone has the skill to create what seems such a complete lib and yet produces what most would qualify as a beginner structure.

If the project holds up, it's definitely a teaching moment for me.

comment 6y ago · link · parent

Also a good example where 3.8 would be handy:

    while (frame_stab := stream_stab.read()) and (stream_org := stream_org.read()): 
iter() works with all stable versions of Python though, but it's a bit exotic. When I use it, I tend to make aliases to make it clearer because most Python devs don't know about it, let alone this alternative form.

    stab_frames = iter(stream_stab.read, None)
    org_frames = iter(stream_org.read, None)
    for frame_stab, frame_org in zip(stab_frames, org_frames):

comment 6y ago · link · parent

Of course it did: facebook actually started by using the university contacts to propagate using a spammer strategy.

Now that it can't, it invasive use your personal information to suggest contacts.

comment 6y ago · link · parent

Indeed. Migraines for 30 years. Painkillers allows you to keep up with whatever wrong you are doing.

So if you have migraines, it is not normal. It is not incurable either. Use pain killers when you must, but keep looking for a solution.

The solution can be different for everybody. Start with diet, it's a very common cause for it. Don't limit yourself to what you think is right. Try things, even weird ones. Took me 3 decades of trials and errors to not need pain killers.

comment 6y ago · link · parent

Gpg key fingerprints are very small though and can be used for that.

comment 6y ago · link · parent

Yes, that's why I know it's possible.

comment 6y ago · link · parent

Qr code readers show you the url, you have push a button to navigate to it. So it's no different than having it copied manually.

Not that it matters much for most users, as I said earlier, they blindly type url. They have no idea what it is.

You could put a warning saying "are you sure, this is going to kill your mother and steal all your money" and people would click on it if it's easy to do.

comment 6y ago · link · parent

Again, a programming paradigm is like code formatting rules or ide choice. It's a matter of taste. Saying one is an error is just reenacting vim vs emacs. It goes nowhere.

comment 6y ago · link · parent

For url only. Qrcode are for much more than url.

comment 6y ago · link · parent

I don't have to debug my render functions much in vue because they contains little logic. Debugging is more common in JSX, it's better at solving a problem it introduces.

comment 6y ago · link · parent

Which is the opposite of what you want in rendering. Ui is king here. Data has the rest of the code to shine.

comment 6y ago · link · parent

7kb for a supermarket bill is plenty, and you can have several of them.

Forms and legal documents should all have an immutable official url and uuid anyway to point to their legal and administrative context.

comment 6y ago · link · parent

No more than regular url written in a paper. People write them blindly anyway, they don't know what it means nor how to read it.

But QR code are not just for URL, they can contain up to 7k, which is a lot for text and numbers. And you can have several of them, use compression, etc.

comment 6y ago · link · parent

See second part of my comment. You are in the HN bubble.

comment 6y ago · link · parent

I know it's supposed to be a parody, but it hits very close to home.

comment 6y ago · link · parent

Because of contact discovery and migration. The success of those apps is directly related to the fact you can instantly see all your contacts with it when it first start. Email wouldn't have the same effect because poeple don't have them saved in the contact list.

I think university should have a mandatory course where IT student go and interact with real users and have a budget to manage according to the success of their exhange. It would make those questions much less likely.

comment 6y ago · link · parent

> To me it feels like python is running as far away from simplicity as fast as possible.

In the field, Python stays mostly simple. All those stuff are optional, and they are used in this spirit.

In fact, most Python code I see out there seldom even use lambdas, comprehension lists or yield.

You gotta remember a huge part of the Python user base are not programmers, and they don't have the time to figure those things out.

That's one of the reason of Python success: it scales up, and it scales down.

comment 6y ago · link · parent

The functional paradigm is a matter of taste. Python is willingly limited in its functional capabilities.

You may not like it, but it's not an error, it's a design decision.

comment 6y ago · link · parent

Most ISP put this kind of QR code on the provided "modem" in France with the default Wifi password of the device.

I love QR code. I think it should be everywhere. All legal documents and forms should have one. All supermarket bills should have one.

It's a fantastic way to transition from paper to bits.

Unfortunately most users have no idea what it is. They don't know what a URL is, so a QR code is out of the question.

Plus they don't necessarily have a QR code scanner on their devices: not all phones have one by default, most laptops definitely don't. Not to mention some QRcode readers are sometimes just the regular camera app (E.G: modern iOS), which is very confusing. And even if all that is not a problem, your QRcode scanner may not be able to understand a particular format or will read the Wifi code but just display it while it's supposed to save it as a new access point.

It's definitely not a solved problem.

comment 6y ago · link · parent

In Vue it would be:

    <p v-for="(vars, i) in collection" :key="i">
      {{ vars }}
    </p>
Instead of:

    { collection.map((vars, i) => <p key={i}> {vars} </p> }
It's easier for me to picture what the first example is going to render because it makes the markup the hero, with code inside, while the second example is making JS the hero, with markup inside.

But this example is not even touching the topic. A render function is rarely that simple. Now if you do maps, and filters, and ternary operators, and && / || pass trougth, and set several class conditionally, and pass an event and do preventDefault, etc., now you have a more real life example. And in react you'll get __a lot__ of JS, with very little markup. And you'll have either a lot of boilerplate, or a lot of dependencies to get helpers.

While in Vue you'll get mostly markup, with a little code inside. It will read from top to bottom as well. No needs to wrap stuff in arrow functions to get the event object. PreventDefault has a helper. Setting classes as well. I prefer that.

comment 6y ago · link · parent

Depends of the template language. I prefer vues's than svelte's.

comment 6y ago · link · parent

It normalizes the way templates are coded and forces people to put minimal logic in their rendering.

In react, there are as many ways to do the same things as there are coders. And of course, some don't follow best practices and will put logic code in it.

Personnally I also find it easier to picture the resulting DOM structure because the stylee is forced to be declarative. Too often in react I have to look around a tag to know whats hapening, or I have to follow some nested map/filter/ternary chaining.

Very good react coders will not do that. They will use a lot of tooling and abstract formatting a lot. But they are few.

1
178179180
184