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

They don't have the same goals, nor characteristics.

Numba and cython are rarely used to write the entire program, you usually apply them on your bottleneck, and compile just this part.

Also JIT, like for numba or pypy, compile when the program runs, but projects like cython and nuikta compile ahead of time. The performance characteristics are very different, since the former need a warmup but the latter don't, however they need to be manually built.

Solutions like cython or mypyc require type hinting for getting the best speed up.

All of them except nuikta target better perfs, some in general (pyston, mypyc, cython), some targetting specifically numerical calculations (numba).

nuitka doesn't care about any of that, it takes regular Python code and compiles it. While it does provide some speedup (up to 4x), it's not the goal at all. The goal of nuikta is to able you to ship your python program as a standalone executable to the end user.

It's the most reliable way to do it, as, just like the tag line says, it's "extremly compatible". I've yet to find a Python program that nuikta couldn't compile, including one with PyQT + numpy. It's very good at it.

comment 3y ago · link · parent

It's always been there. 20 years ago my father went for business in Turkmenistan, and all this was already in place. This country is one of the biggest producer of fossil fuel, it's an ultra-dictatorship, and has strong commercial partnerships with France. It's very well known.

So why is there sudden medias coverage of this?

I'm now doubting more and more that the politicians and medias really care about any environmental issue and that, like terrorism and pedophilia, it's used to motivate another agenda.

The problem is, unlike terrorism and pedophilia, climate change is an urgent issue that affects every single human in the world, so I really want this to be a genuine concern.

But some part of me now always wonder if somebody, somewhere, is not preparing us to invade Turkmenistan 2 years from now.

comment 3y ago · link · parent

Twitter started like this as well, let's see their real policy in 10 years when investors, law makers, medias and advertisers pressure them before getting too enthusiastic.

comment 3y ago · link · parent

"just"

comment 3y ago · link · parent

Because insurers decide if who is at fault and to pay or not. This system is creating bad incentives since the entity at fault and the entity deciding who is at fault are the same on one side.

The problem with American society, as your comment reflects, is that culturally every discussion always goes back to money.

But money, while quite a good proxy for many things, reduces the human experience to a simplistic model.

It's like game theory: beautiful in a lab, but a parody of life interactions IRL.

You have to shape the system so that the emerging behaviors take in consideration justice, happiness, sustainability, etc.

comment 3y ago · link · parent

Your last point makes a lot of sense actually, although pretty hard to convey to the general population.

comment 3y ago · link · parent

There are millions of small businesses that have an online presence and no way to protect themselves against a physical building penetration.

Heck, most administrations can't. A small town city council cannot be expected to have the budget or expertise to deal with someone trying to break in.

comment 3y ago · link · parent

I'm divided on this one. On one hand, I can see a lot of good in this, because, well, I'm on HN.

On the other hand, I think people would find it weird that anybody would be allowed to do that IRL with physical building, so why allow it on the internet?

Given that the consequences of probing a website are less than cracking on an office, and the surface of attack bigger on a website, with potentially a larger cascade, I think I can find more arguments for than against.

But it's not so easy to answer.

comment 3y ago · link · parent

Yes, but open ai is not an investor, it's the company. They don't have to follow this logic, they can build something without thinking of the moat, and succeed anyway.

The moat is a priority for rent seekers, but most successful builders didn't start by that.

Coca cola, Mac Donald, Gillet and all the Buffet favorite children didn't grow by thinking moat first. The moat was built on the way, sometimes very late.

comment 3y ago · link · parent

The fact you accept this assertion as if it were a fact is exactly why I posted the comment in the first place.

comment 3y ago · link · parent

Do they hope people to believe this is not printing money, because it's a coin?

comment 3y ago · link · parent

My tip list of tips:

- disable all notifications except direct mentions and let your team know.

That's it.

comment 3y ago · link · parent

Shameless plug for cuelang, which, among many other things, avoid this problem:

https://cuelang.org

It's not a new issue, the Python community had exactly the same surprise with 3.10: https://github.com/actions/runner/issues/1989

1934.

I checked if browsers could cache all bookmarked pages locally(bitecode.substack.com ↗)

4 points · by BiteCode_dev · 3y ago · discuss

comment 3y ago · link · parent

I know of a 15 years django project that runs on 2.7 that is still making money. It got reinstalled this month on brand new Ubuntu servers out of a rubbish requirements.txt, and it worked.

So much for saying python packaging sucks.

comment 3y ago · link · parent

Django comes with a lot: auth, caching, csrf protection, an orm, the admin, form workflow, templating, migrations, i18n, and yet doesn't come with thousands of deps.

comment 3y ago · link · parent

If there is liquid water, it means it's not colder than the antarctic sea, which holds a lot of life. Unless there is some weird pressure + salt shenanigans I don't know about.

comment 3y ago · link · parent

PyQt and wxPython have wheels now.

Although, I'm guessing now that Python and Rust are becoming BFF, https://tauri.app/ will become a more and more attractive option.

comment 3y ago · link · parent

There should be a fee, but a fee equal to how much storage and access cost, so a very small one.

If you put no fee, some big actors will create non optimize crawlers and call the service in a loop, wasting your tax money.

A small fee means people will take care of only get exactly the data they need, cache what they need to cache, and refresh only if they really need to, and what they really need to.

Otherwise, it's the tragedy of the common.

comment 3y ago · link · parent

Right now you can't, because voting has proven ineffective for that particular problem, and adding anything that would do so would be blocked by the very people that you are trying to police since they are the rule makers.

But if we had to make it all over again?

Make mandate shorts. Make lobbying illegal. Make trying to game the system be paid by extremely harsh prison sentences. Create an institution that is in charge of corruption of the government that is independent of the government.

There is a lot to do.

comment 3y ago · link · parent

Of course.

Python is a great glue language, so you will do most of the expensive call outside of Python. However, things you typically put in assert are usually pure Python you call repeatedly, putting you in the worse of both worlds.

comment 3y ago · link · parent

Whisper is pretty good honestly. It gets my french accent in english and french slang, without having to tell it what language I'm going to speak first. That's impressive.

comment 3y ago · link · parent

I'd love to do this in Python, but unfortunately we can't.

assert is supposed to be cheap in production because you remove them there.

In python, this is done python passing the "-oo" flag to the interpreted.

Unfortunately, the community never got the memo:

- if you put it in a lib, nobody is going to use "-oo" in prod, and they will think your lib is very slow

- if you using it in prod, some of your 3rd party deps may very well be using "assert" to make required production sanity checks. So using "-oo" would suddenly break your system.

comment 3y ago · link · parent

Investors are obsessed with moats, but people have to realize that the entire world runs on business that have no moats.

There are no moats to being a plumber, a baker, a restaurant...

The moat concept is predominant because the idea that everything must make billions have infected the debate about businesses.

It's all about being a unicorn, a giant, a monopoly, making every body at the top billionaires, and it's like there is no other way to live.

Except that's not how most people do live, even entrepreneurs.

Even Apple, which today is the typical example of a business with a moat, didn't start with "we can't get into this computer business, we'd have no moat".

They have a moat now, but it's a consequence of all the business decisions and the thing they built after many decades.

They didn't start their project by the moat. The started their project by providing value and marketing it.

comment 3y ago · link · parent

Also, any bill should be required to fit on a A4 paper.

There is no democratic process possible with bills taking hundreds or thousands of pages.

One more proof that we are living in (very free) oligarchic systems that think themself to be democracies.

comment 3y ago · link · parent

They just need to win once, and there is not penalty for loosing.

comment 3y ago · link · parent

Also, the US administration didn't got it right, because Nasa didn't do it. They had spacex to do it for them, while half of american society is insulting the elon musk.

Let's not pretend any administration got it right.

Just like the french administration had nothing to do with Pasteur creating the vaccine against rabies, the German administration has nothing to do Gutenberg creating the press and italian administration has nothing to do with Salvatore Sanfilippo creating redis.

At best, administrations from the past may be somewhat credited to foster an environment favorable for something like this to happen.

And even that is a stretch, given most administrations don't design anything, but rather react politically to whatever is the current situation.

comment 3y ago · link · parent

Doesn't matter much in this particular case, one is a tuple, the other is a list, both can be read with a for loop.

The important part is that the way messages types are defined is very heavy, and you can get them to be lighter without sacrificing type safety.

comment 3y ago · link · parent

You can use simpler types. Instead of :

        messages=[
            GPTMessage(
                role=GPTMessageRole.SYSTEM,
                content=SYSTEM_PROMPT,
            ),
            GPTMessage(
                role=GPTMessageRole.USER,
                content="Text: I love this product. It's the best thing ever!",
            )
        ]
Try:

        messages=(
            ("system", SYSTEM_PROMPT),
            ("user", "Text: I love this product. It's the best thing ever!")
        )
Or:

        messages=(
            SystemMsg(SYSTEM_PROMPT),
            UserMsg("Text: I love this product. It's the best thing ever!")
        )
This is still Python, not Java.

comment 3y ago · link · parent

Love the idea, but it seems right now very much tied to their platform.

If I can't install it and run it on my machine, including in prod, it's a hard sell.

But given the tone of their articles, they seem passionate about it, and genuine, so I want to believe Mojo will be released as a FOSS project in the future and they will make money with the service itself.

1
646566
184