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

Swift has this as well, and it's really nice.

Doing map(lambda x: x + 1, stuff) or [x + 1 for x in stuff] adds nothing of value for those very simple cases. I wish we had map($1 + 1, stuff), or ever better, stuff |> $1 + 1.

Python does a lot of things right, but for a language with a strong emphasis on the iterator design pattern, I wish it would provide more expressive primitives.

However, it comes with the FP territory, which Python is not well suited for, and it would also imply a higher cost of entry to beginners.

comment 4y ago · link · parent

The optional parenthesis kills it for me. It makes scanning the code impossible: you have to understand each line context.

comment 4y ago · link · parent

I can't fathom optional parenthesis. In this code it makes it very hard to know if today is an attribute or a method without knowing the context, meaning I can't scan the code, I have to read it carefully.

comment 4y ago · link · parent

It's been hyped a lot then killed.

Another g project in the grave.

comment 4y ago · link · parent

Last month I had a client contacting me with a mission that was:

- fun

- twice my usual billing

- easy

They found me because of a Stackoverflow answer I wrote 10 years ago.

comment 4y ago · link · parent

It's the same with feminism, pacifism, communism, veganism, etc.

I have around me numerous activists about various topics I'm not invested in: feminists, communists and vegans, mostly. Most of them don't try to guilt trip me or convince me of anything. They just do their stuff.

Once in a while, one of them do, just like once in a while, a doctor makes a medical error or a plane crashes.

But we tend to only remember this one, and associate the movement with it.

comment 4y ago · link · parent

With root certificates, gov already have complete ability to MITM your https connection.

comment 4y ago · link · parent

That would be a good thing. Put some light on one of the biggest failure of our democracies.

comment 4y ago · link · parent

We used to say that about https, and now we got letsencrypt.

comment 4y ago · link · parent

In this particular case, Pypi is giving away hardware security key.

I have 3 of them, it is secure and convenient.

comment 4y ago · link · parent

Github answers 404 instead of a 403 when you try to access a private repository while not being logged in.

I assume the rational is to not leak information about what's private. But still, it's weird.

comment 4y ago · link · parent

From the article:

> The message to me as a maintainer is quite clear: once a project achieved criticality, then the index wants to exercise a certain amount of control

I don't think that's the definition of control. Pypi gains no power with this, only more work.

And 2FA is really not a big deal.

> One could imagine that an index would like to enforce cryptographic signing of newly released packages.

Yes. Please yes.

Letsencrypt was a boon to the web.

Having a quick way to sign your package to send it so pypi would be a great thing.

This is a long article over nothing.

comment 4y ago · link · parent

And here is where Django and RoR shine. With their very rich, and above all, well integrated ecosystem, we have had plugins to do all this with a few settings for years.

That's where "libs over frameworks" doesn't pay.

And you don't have to delegate your sign in to a third party, share user data, get locked in, or have all the problems associated with having some part of your stack as a service, micro or not.

comment 4y ago · link · parent

8ft is 2.4m, it's not that long, it's the lenght of a small car. With current modern resolutions and zooms, you can even read the name of cops on their plaque from that distance.

I don't think it's going to prevent much recording. In fact, the recording are probably be of much more quality: instead of close ups that doesn't show much actions, we will see the a bigger context. Most useful videos are from at least 8 ft away.

I understand the author of the law doesn't have a great background in the US and cops have terrible reputation in this country. So it's probable there is an abuse path I don't see here.

But if I haven't been given that context, the law would not have seen excessive: in a law enforcement context, you don't want every body to park too close to the hot spot. Also, there is this annoying tendency of people with a camera to put it in your face, or to not mind their surrounding.

Given an arrest can be tensed, 8ft sound like it make sense. What am I missing, as a French person not understanding all the weird american social details ?

comment 4y ago · link · parent

Terrible landing page for an otherwise excellent tool.

It sets up JS transpiling and bundling for you in an easy way, then provide a server with pretty fast hot reload.

This solves 2 problems:

- the complicated js project stack is now simple to setup, unlike with webpack

- saving and seeing the result of your coding is now almost instant, unlike with CRA

It's a joy to use, given that it's from VueJS author, and I highly recommend it to anyone that has a lof of frontend to do.

comment 4y ago · link · parent

There should be a law stating that if you write a new DSL, you are forced to write all the plugin for all the IDE and a debugger for it before you are allowed to publish it.

For 3 months I have been working with a team leader that had the project of making all entrypoints in the program accessible from a JSON based DSL. I tried to suggest we first expose a nice regular ergonomic API, and if we can't satisfy our requirement, we then add the DSL on top.

Nope.

Got the PR this week. Now he leaves next month, so we will have to maintain that.

comment 4y ago · link · parent

XKCD 927, once again.

I would rather avoid YAML all together.

Small human editable files: TOML.

Big machine editable files: JSON.

And I validate all that with pydantic.

I wish CUElang was ready for prime time, that would solve all this at once.

comment 4y ago · link · parent

I did, and they are very underrated. CUE in itself is brillantly designed: just enough power to be useful (conditionals, loops), but not enough to be dangerous (not turing complete). The idea that you can define data types and data values with the same language makes for very ergonomic configuration files, and it is compatible with YAML and JSON, being able to export to and validate them.

Any new tech is esoteric at first.

When I started Python 20 years ago, there were no job offer for it in my country.

comment 4y ago · link · parent

I'm a big fan of Cue, but it's stuck in Golang.

If I where to use it in Python, I would have to code a parser, then implement the entire type logic mysql.

And I bet this is why it's not more used: JSON or YAML are comparatively easy to implement because you just need the parser. You don't have a full featured language with a set based typing system on top.

comment 4y ago · link · parent

Me too, but only in the case where accepting money compromises something.

Here, I don't think it applies.

comment 4y ago · link · parent

Use NewType for this: https://mypy.readthedocs.io/en/stable/more_types.html?highli...

comment 4y ago · link · parent

> Don't let dicts spoil your code (2020) (roman.pt) * Conditions applies

* Apply only for when parsing I/O. Do not substitute primitives with classes inside your code base for no good reason. Unless validation is needed, prefer a NamedTuple.

comment 4y ago · link · parent

I immediatly checked the box. Peace of mind for what I put in my code, and honestly codepilot would still be useful even with having only access to the local code base.

comment 4y ago · link · parent

My experience is the opposite. Most productions users can tolerate downtime.

It's usually the company leadership that can't tolerate it to have downtime.

And it's fact, they are hit an unplanned with downtime of one service or the other every month or so because of an outage. They are used to it.

So if you plan for it, explain it, and limit the scope and time of it, it usually goes very well unless you are a fortune 500, a hospital or something alike.

comment 4y ago · link · parent

Sure.

But if Google is deciding that avoiding those potential headlines is of higher priority than protecting its users from getting abused by the unfair system they put in place, we are justified to attach a derogative label to the company.

And it's cumulative, with all the other ones. The labels, I mean.

I just hope people will not forget them in 20 years after they make a giant PR campaign to become the good guys again, like with Microsoft.

comment 4y ago · link · parent

Worked for nonprofits in Africa, including the Gate foundation.

Now if I want to help people, I give to a hobo in the street, or take time for someone I know.

I don't trust NGO to handle money with care, or honesty, nor do I think most programs bring more benefits than problems.

comment 4y ago · link · parent

I'll let you know on a secret: most staff is composed of the general public.

comment 4y ago · link · parent

Of course I do.

E.G: last week, my brother wanted to try one of my service account on his ipad (we set it up only on his computer). He tried to connect with my password, but any new device requires a 2FA. So he calls me, and I gave it to him.

Now, in this particular example, I was at home, so I had access to internet.

But I'm often traveling to places where I don't.

In fact, I lived in Mali for 2 year where this has been a big trouble for all administrative stuff. Nowadays, I would assume a lot of Malian people have a phone numbers, but no emails, anyway.

But without going that far, the French country sides have plenty of places where you get text but not internet. And being in a car or train is often enough for that.

I don't think SMS is a good 2FA. I have 3 yukikeys at home.

But I believe any geek should first spend a month working in a call center before making a comment about 2FA.

There is a looooong tail of things getting wrong, and there is a reason corporations chose SMS: they tried all the rest, and it was worse.

Now thing are getting better with in app 2FA notifications, but of course it assumes you have a smartphone.

comment 4y ago · link · parent

> If I have cell signal I have email, but I can have email without SMS access.

In the US populated area, maybe.

In the French country side, definitely not.

comment 4y ago · link · parent

I dig it because it's like a summary of half of the Marvel movies, where the protagonists spend the entire adventure solving a problem they caused themselves.

Like, without the Thanos thingy, iron man is not a bloody hero, he is a villain. He is responsible for so much death and destruction it's not even funny. Black Mamba, killer. Black panther ? Maintains in place a political system that clearly allows any psychopath to access absolute power. Hulk, a time bomb. Thor ? He let his genocidal brother of the hook as soon as he is nice for 2 minutes. Spiderman ? Give an deadly bot swarm to the first father figure that smiles at him. Dr Strange ? Accept the request to GHB the planet and almost destroys it because a kid ask for it for 30 seconds.

It's a well known trope in sups stories, but for some reasons a lot of viewers really believes they are heroes. Even as a kid I though Batman was stupid for spending times fighting one criminal at a time with all his money.

Now, we are seeing a lot of this in today's IRL world.

Progress is saving you by giving you drugs for all the diseases it increases: diabetes, cancer, obesity, hormonal dysfunctions, etc. It's giving you a car so that you can you can go work in a remote place you would never have to work to without progress. It gives you software to organize your day to fit all the thing you would not have to do without progress.

Ok, it's tongue in cheek. I love progress.

But still.

1
949596
184