Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This isn’t really python is it?


No. Worse, this makes, exactly, the case for Julia[1]. Julia has llvm integrated within it for code gen. So, there's no actual need to start playing with lower level code, unless you really want to.

From a programmer productivity scenario, I'd find it difficult to justify all the extra work and time spent on doing the Python + LLVM version, as compared to something that was far simpler to maintain, and performed almost as well.

Now if he came out with some sort of 2 order of magnitude improvement, that would be a different story. But I don't see Python getting there. Without appealing to something external, which isn't, itself, Python.

[1] https://julialang.org


It is Python in the sense that the solve_linear_system() function is unmodified. At first it runs with Python objects, and then it runs with LLVMCode objects.

It's a form of metaprogramming which some would call staged programming or multi-stage programming:

https://en.wikipedia.org/wiki/Multi-stage_programming


It’s not metaprogramming, it’s a program that outputs llvm ir. What about that is meta?


See the links I put here:

https://news.ycombinator.com/item?id=19013437

The authors of all those systems call it metaprogramming, more or less. Metaprogramming is a very general term, and there many varieties of it.

Once you get past the syntax and specific technologies, you'll see that many of these systems have a similar structure, and you could probably do a line-by-line port of solve_linear_system() to those systems. I think Scala LMS is probably the closest one.


Metaprogramming has a specific technical meaning that has to do with code that reads or generates code. Try not to parse the word metaprogramming itself.


If the syntax is recognize by the python repl .. maybe it's an ad-hoc compiler written in python. Which brings the question: what is a language..

Many low perf dynamic languages did all sorts of tricks to improve perf. It's even an engineering rule to rewrite things that need more perf.

Similarly you can twist the language if it has metalevel capabilities...

It's a thing that I liked in less common languages, they often enjoy generating low level code and consider the system as an object (cpu being consumer of instruction stream) and not a divinity.


I'd consider it more of a DSL written in python




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: