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

What does SO_ATTACH_REUSEPORT_CBPF and how does one uses it?

comment 5y ago · link · parent

That sounds huge.

0.15 % of the entire us population just for cyber security?

I hope you don't need garbage men and bakers.

comment 5y ago · link · parent

Maybe this new wave of ransomwares and the attention it's getting will finally force IT on a more quality driven path. Right now I see a lot of projects with small budgets sent to fast lane to finish asap, security be damn. Or project with big budget wasted on middle men paying scraps to interns sold as experts.

comment 5y ago · link · parent

It can be useful to provide a single installer that works on any system, downloading the machine specific rest of the program.

comment 5y ago · link · parent

Not just slightly shorter, because you need a handler for with MultiError.catch, which will be a function with and if and an instance check.

Also, it doesn't give you easy "finally" and "else" clauses.

And "except *" calls the same handler for single and multi-errors, so for most cases, you avoid code duplication.

Plus, having a natural way to deal with this make the code easier to scan, not to forget IDE already have good support for a try/except, and wrapping things in it.

It's 100% a win.

comment 5y ago · link · parent

Exceptions are not a GOTO:

- they cannot make you end up any place in the code, only up the stack.

- going up in the stack, it leads to the destruction of any frame in the way.

- the exception object carries metadata about the origin and propagation.

- calling code can subscribe to the event and act on it. Handling is decoupled from raising.

- calling code can interrupt (in multiple spots) or stop the propagation.

comment 5y ago · link · parent

I made a script to generate my otp codes from my terminal because there were none at the time and I was fed up with using my phone (I don't use otp in fear my machine in compromise, but in case something outside of my house is).

comment 5y ago · link · parent

> we needed 2.7x lines of Go to handle the same features as our Python code

But it's for a rewrite, so:

- you can use the most modern language features. Python 3.9 is less dense than Python 2.7 (E.G: a silly 2.7 example would be https://0bin.net/paste/xpnCov-3#3s2AgDReXpeqG4knegGwdnYNi523... which is 37 lines, the equivalent in 3.9 is https://0bin.net/paste/b4DVZIS5#372LGWNLBJfDUNQGAMsDlJPNlkVy..., down to 25 lines). Also note that it's not just less lines, but way shorter, yet clearer, lines. Something LoC fails to take in consideration.

- you can use the most modern stack. E.G: fastapi is less dense than flask as soon as you use data validation, plus it adds typing for free.

- you know very well the problem to solve so you get it right the first time.

comment 5y ago · link · parent

It is explicitly inspired by it.

comment 5y ago · link · parent

Answering to GP.

comment 5y ago · link · parent

> Your parties sound like a blast!

They are, but they take a month to prepare for.

> Like the GP of this thread you might want to reread the actual post rather than skim the title. (see my other comment).

In retrospect, yeah.

comment 5y ago · link · parent

I see what you mean, but people used to be angry about women not having the right to vote or the vietnam war. Getting outraged over grammar issues or bathroom policy is kinda new.

comment 5y ago · link · parent

Yes, but if you are among mature adults, you can discuss opposite politic views without one of your friends leaving the dinner table and slamming the door.

Which apparently internet people have a hard time to handle.

I have parties at home with feminists and machists, cryto speculators and communists, vegan meditators and frat guys bbq body builders, atheist hedonists and muslim minimalists, yet they manage to have fun together.

When I read such title I can't help but thinking "what are they, 5 years old?".

comment 5y ago · link · parent

25 years is pretty long in IT history.

I'd say it lasted.

But well, everything is political nowaday, and people apparently can't get political without creating drama. See: the last basecamp outrage.

comment 5y ago · link · parent

Sorry, I don't debate with throwaway accounts, they are usually trolls.

comment 5y ago · link · parent

> But I don't see that he has any special insights into VM performance, let alone the low-level intricacies JIT design.

The guy had no insights into language design before creating python.

He also has Mark Shannon, has the entire MS team available on the phone if needed (including the .net team, with stellar JIT), time and a good brain.

> As mentioned elsewhere in the thread he really has egg on his face after denying Python's performance problems for so many years.

He spent 20 years maintaining a project with minimal resources, so you have to make hard choices on what to work with. Perfs were not the objective of Python, and for the majority of the use cases of the time, it didn't matter much.

Now that more important things are sorted out, like unicode handling, and that Python 3 is a smooth running project, he is been given the opportunity and resources to work on the problem, so he does.

Good for us.

Honestly, for me perfs are still NOT a priority, I'd rather him work on bootstraping, but I'm glad and excited that something good will come out of this.

comment 5y ago · link · parent

Guido track record speaks for itself: he gives an announcement, he studies the problems, he implements, he releases something that kinda works but is meh, he improves on it for years, and then you have a new python feature.

He always delivers. That's a trademark.

So yes, it's a big deal. It means something will come out of it no matter what, in opposition to everything that happened before.

comment 5y ago · link · parent

I've never heard of that, why would it not be?

comment 5y ago · link · parent

Reitz is no core dev, guido has always delivered. His track record is flawless.

However, the first release will probably suck like asyncio or type hints did.

It will take time to become usable, but it's unlikely it won't happen.

comment 5y ago · link · parent

Money.

comment 5y ago · link · parent

This time, Guido is paid to work on it, and he is competing with cinder, pyjion and pyston.

comment 5y ago · link · parent

Because Guido is paid to work on it.

comment 5y ago · link · parent

It's not nuitka main purpose, but it can produce a lib and speed up the code: https://nuitka.net/

comment 5y ago · link · parent

> Why do people in the Python community get so excited over announcements?

When you like a tech, knowing people are brewing improved perfs on it is kinky. On Python, the motto has always been "it's fast enough", "if you want perfs, don't use python", "C extensions will solve this", "we don't want to make the main implementation complicated", "python dynamism and GIL make it a hard problem", etc.

So in the python world, it's particularly big news, especially given that previous attempts (gilectomy, unladen swallow, first pyston...) all died.

comment 5y ago · link · parent

For people googling, not that mark shannon:

https://en.wikipedia.org/wiki/Mark_Shannon_(actor)

That mark shannon:

https://github.com/markshannon

He tried to do hotpy in 2011, and trigger the idea of FAT byte code which I believed inspired the FAT python attempt of Victor Stinner.

Now stinner is working on Hpy, dropbox on pyston, instagram on cinder, and pyjion just got a release.

Looks like Python is going to get faster one way or another.

comment 5y ago · link · parent

Damn, a constructive and sourced answer. I wish I could upvote that twice.

comment 5y ago · link · parent

For what use case?

The main use case for pyiodine is running python without having to setup python.

If you don't want python, there is not need for it.

If you do want python, there is no replacement for it.

comment 5y ago · link · parent

Sure, I can see plenty of good it can do.

Unfortunately, I think the wrong it has the potential to do to the human as a specie outbalances it by an order of magnitude.

It's useless to worry though, we are a careless race, we will use it no matter what, and we will hurt yourself in the process. I just hope it will not be too much.

comment 5y ago · link · parent

Is that some python wrapper exposed through anyblock or something, that they call a new language?

comment 5y ago · link · parent

Great tech for this exact use case.

But I'm dreading that people will start doing it on sane persons that just want an upgrade.

I've read enough Sci-Fy to have a list of 1000 ways it can end badly, and we only need one.

People are dumb enough to get phished by email, gov is spying on any phone, pirates manage to access to nuclear plant, and you want to connect your brain to a network?

1
140141142
184