News for hackers. Stuff that matters.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by lvass on Wednesday November 17, 2021 @11:35AM (#29255252)
Cython, pypy, micropython, nuitka, shedskin, ironpython, graalpython, jython, mypyc, pyjs, skuptjs, brython, activepython, stackless, transcrypt, cinder and many more I don't remember.

They're all practically useless or delegated to specific tasks. At this point you'd need to present incredible evidence that an alternative compiler can be useful. Personally I find it comical how many developers are still eluded by a promise of performant python. I hope you achieve your goals, good luck.

Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by zanellia on Wednesday November 17, 2021 @12:39PM (#29256148)
The point of prometeo is not to obtain a "performant Python". Python is used merely as a host language for an embedded domain specific language. You could do the same thing with any other language with a mature library for AST analysis :)
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by lvass on Wednesday November 17, 2021 @12:55PM (#29256392)
Which makes this thread's title at least confusing.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by throw10920 on Wednesday November 17, 2021 @02:41PM (#29257901)
I'd argue it's downright misleading. "Python-to-C transpiler" means Python, not "a DSL based on a subset of Python".

An accurate title would be "a DSL embedded in Python for high-performance scientific computing" or something similar.

Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by zanellia on Wednesday November 17, 2021 @01:00PM (#29256478)
fair enough - could not cram "embedded" into it :)
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by fwsgonzo on Wednesday November 17, 2021 @11:58AM (#29255574)
Most of the ones you list require dynamic linking and so is hard to make use of in specialized environments.

His project seems to be generating generic C code which is much easier to port to any weird platforms. In fact, it might be perfect for my use-case where dynamic linking is just extra attack surface.

I understand that the project is still in the early stages, but I will be paying close attention to it. If at some point it will be possible to write "regular" Python in it (minus most of the standard library and imports), then it could be a candidate for an edge computing platform.

Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by m_ke on Wednesday November 17, 2021 @11:56AM (#29255546)
Numpy, Numba and PyTorch seem to be doing ok.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by gh02t on Wednesday November 17, 2021 @12:28PM (#29256001)
Cython is also pretty successful obviously, though I don't think it quite fits in OPs list given that it's more about writing extensions than replacing your entire Python code/stack. But I do agree with OPs sentiment even as someone who writes a lot of Python.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by Der_Einzige on Thursday November 18, 2021 @12:05AM (#29262147)
Not sure what you mean by "eluded by a promise of performant python". Tensorflow and Pytorch do a great job thank you very much.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by nspattak on Wednesday November 17, 2021 @12:06PM (#29255678)
so much effort to match the performance of lower level languages that it would have actually been easier to use those directly :)
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by Zababa on Wednesday November 17, 2021 @12:27PM (#29255977)
I'm not sure, most people aren't writing ASM these days because the compilers are good enough for most cases. Compilers are great.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by zanellia on Wednesday November 17, 2021 @12:33PM (#29256070)
I think most HPC people would disagree with this statement. State-of-the-art HPC code is still written in ASM (see e.g., https://github.com/xianyi/OpenBLAS) [that's what Intel is doing too]
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by marmaduke on Wednesday November 17, 2021 @01:16PM (#29256684)
ASM makes sense when the time spent in a specific routine exceeds the time it takes to write the ASM, which makes a lot of sense for Blas, less so for other HPC yet speculative or less fundamental projects. Cvodes for instance doesn’t need to be written in ASM, and I think Julia makes a strong case that it could have been written in Julia.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by Zababa on Wednesday November 17, 2021 @04:18PM (#29258945)
I don't think they would. I think they realize that state-of-the-art HPC code is a small fraction of all the code written. I doubt that these people write ASM instead of Python or JS or C or whatever when doing simple scripts.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by guenthert on Wednesday November 17, 2021 @03:00PM (#29258157)
That ASM code is however not necessarily constructed manually. You'd think for high performance code with limited scope, a superoptimizer would be used.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by zanellia on Wednesday November 17, 2021 @03:45PM (#29258605)
Not sure what a "superoptimizer" would look like in this context. For a reference, I know for sure that this https://github.com/giaf/blasfeo (which beats Intel MKL) was coded entirely by hand.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by giaf on Thursday November 18, 2021 @02:20PM (#29269275)
There is more and more effort in the automatic development of high-performance linear algebra kernels. But based on my experience, it would certainly be a big challenge to have a tool able to exploit the subtle differences in the assembly languages of different architectures, if the aim is to match or even exceed an expert-crafted assembly kernel.

Anyway, that's surely a very promising active research direction.

Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by Tozen on Wednesday November 17, 2021 @01:07PM (#29256558)
Good point. And you don't have to go that low. Maybe go use Object Pascal, Nim, or Vlang. I know... the libraries. But a lot of them are bindings of C libraries. So, you can create bindings in other languages too or use Python from those languages. There are various options.
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by zanellia on Wednesday November 17, 2021 @01:09PM (#29256576)
I would disagree on "easier" :) Ever spent half a day debugging a segfault?
Re:Show HN: Prometeo – a Python-to-C transpiler for high-per... by staticautomatic on Wednesday November 17, 2021 @01:45PM (#29257129)
SpaCy is pretty incredible evidence.