Live data from Hacker News

Codon: A high-performance Python-like compiler using LLVM

github.com

61–70 of 184 posts

Re: Codon: A high-performance Python-like compiler using LLVM

#62

Free for non-production use... it's a "no" for me.

Surprised this sentiment is so common. It's like, do you want open source devs to work for free forever? Even Redis had to pivot to a business license. I'm not sure what the terms are in this particular case, but in general, wanting someone to pay if they're deploying it to lots of customers seems reasonable.

I understand both perspectives.

On the one hand, in the same way any sort of fee (even $1) is a big impediment to adoption over free, so is the idea that "if I try this out and like it, I'll now be stuck with whatever costs they stick me with now and in the future". In a fast moving world, open source is just easier because if you change your mind, you haven't wasted money. In addition, there are only so many costs a project can afford and it is hard to know as it progresses where those will popup, so you avoid when you can.

That said, developers need to eat, and it is easy to appreciate the fact that they are letting you see the source, play with it, but pay if you want to use. I also fully support their right to license their software as they see fit.

Re: Codon: A high-performance Python-like compiler using LLVM

#63
post #51

Earlier quoted context omitted.

That list actually seems genuinely pretty minimal. Reading your comment I was expecting a long major list of changes, but it's only 3 things, most of which seem relatively unlikely to impact most programs, with the possible exception of dictionary sort order.

The list of small things are for data structure. However, the language is a lot less dynamic than Python: > Since Codon performs static type checking ahead of time, a few of Python's dynamic features are disallowed. For example, monkey patching classes at runtime (although Codon supports a form of this at compile time) or adding objects of different types to a collection. While monkey patching is maybe not done so mu…

From what I understand, this will be possible in the future with implicit union types. Wouldn't work with _arbitrary_ types, but with a set of types that can be computed at compile time (my guess is that this is possible in most real-world cases).

Re: Codon: A high-performance Python-like compiler using LLVM

#64

Since Codon performs static type checking ahead of time, a few of Python's dynamic features are disallowed. For example, monkey patching classes at runtime (although Codon supports a form of this at compile time) or adding objects of different types to a collection. This seems like a very different language from Python if it won't let you do: [1, 'a string']

[deleted]

Re: Codon: A high-performance Python-like compiler using LLVM

#65

Earlier quoted context omitted.

According to this article https://perens.com/2017/02/14/bsl-1-1/ about the Business Source License, the intention conveyed by the word "production" for that license is use "in any capacity that is meant to make money".

What I want to know is: "can I add Codon to a site like https://cocalc.com that I host as long as users of Codon explicitly agree to only use it in a way that is compatible with the license?" I have absolutely no idea if that would be allowed by the rules or not.

I think that's supposed to apply to you, not your users. My understanding is that you pay if you make money using it. I can definitely see how you can easily interpret it in many other ways though.

Re: Codon: A high-performance Python-like compiler using LLVM

#66
post #34

Can we change the title to say Python-like or something similar? Based on the comments so far, it seems that the detail that it compiles its own Python-inspired language, not actual Python, is lost on many. EDIT: A list of differences here: https://docs.exaloop.io/codon/general/differences The summary minimizes with "many Python programs will work with few if any modifications", but it actually looks like a substanti…

Python is a language with several implementations (PyPy, CPython, JPython). Not all python programs work in all of those implementations. So, I think this might qualify as much as a python implementation as PyPy.

I don't think python without heterogenous lists and dictionaries is really python?

Re: Codon: A high-performance Python-like compiler using LLVM

#68

Do people not know about numba which unlike this project is FOSS and integrates with numpy???

Does it make sense to use Numba with Django / Flask / FastApi?

If you're trying to do intense numerical computations on the backend...

Re: Codon: A high-performance Python-like compiler using LLVM

#69
post #51
post #34

Can we change the title to say Python-like or something similar? Based on the comments so far, it seems that the detail that it compiles its own Python-inspired language, not actual Python, is lost on many. EDIT: A list of differences here: https://docs.exaloop.io/codon/general/differences The summary minimizes with "many Python programs will work with few if any modifications", but it actually looks like a substanti…

That list actually seems genuinely pretty minimal. Reading your comment I was expecting a long major list of changes, but it's only 3 things, most of which seem relatively unlikely to impact most programs, with the possible exception of dictionary sort order.

Really? The lack of Unicode strings immediately disqualifies this for most things I've worked on the last few years. No emojis, no diacritics, no non-US users. Ok for internal tools for American companies with an older workforce, I guess, but I wouldn't use this for anything that takes input from the general public (e.g., customers).

Re: Codon: A high-performance Python-like compiler using LLVM

#70
post #42

power of Python is in ecosystem of libraries, not only Python syntax. Without the ecosystem of libraries, I am afraid use cases for Codon will be very very limited. Because Python developers (just like Node) got used to thinking: Need to do X? Lets see if I can pip install library that does it. Ultimately, python is like super flexible glue between ecosystem of libraries that lets anyone build and prototype high qual…

If Codon becomes similar enough to Python, it will be trivial to port Python libs to it, thus opening Codon to the vast Python ecosystem.
Post reply on HN