Earlier quoted context omitted.
They should have said python compiler (shorter) or python compiler in c++ (more accurate and only one character longer, including spaces). Considering at least 2 people have gone to look at the source and then come here to comment, it would have been a net benefit for all involved. Plus, what does it say about the potential quality of your compiler if you can't even make correct English statements? This seems easier…
These headlines usually work by the dept asking a researcher for a 10 sentence summary of their work. Someone in the dept summarizes that to 3 sentences, and sends that to the university pr dept. The university turns that 3 sentences into 1 and that's what's published. My take is this says more about the weird game of telephone being played than it does about the research product itself.
Python-based compiler achieves orders-of-magnitude speedups
91–100 of 193 posts
Re: Python-based compiler achieves orders-of-magnitude speedups
#92>“Google users in America have searched for Python more often than for Kim Kardashian.” I wonder how Kim Kardashian programming language looks like. I guess low level but with garbage collector. :D
Since I have the world's greatest creative assistant handy, here's what GPT-4 thinks a Kim Kardashian language would look like: Hey dolls, let me introduce you to the Kimmie programming language, it's like totally fab and easy to use! To declare a variable, just use the hashtag symbol and the variable name, like this: #my_var To assign a value to the variable, use the word "like" followed by the value, like this: #my…
import re
def trashtalk_interpreter(code): variables = {} code_lines = code.split("\n")
for line in code_lines:
if line.startswith("#"):
var_name, _, value = line.partition(" like ")
if "add " in value:
_, var1, var2 = value.partition("add ")
var1 = var1.strip()
var2 = var2.strip()
variables[var_name.strip()] = variables[var1] + variables[var2]
else:
variables[var_name.strip()] = int(value)
elif line.startswith("OMG"):
message = re.findall(r'"(.*?)"', line)
if message:
print(message[0].format(**variables))
# Sample code
code = '''
#my_var like 10
OMG "Value of my_var: {my_var}"
#var1 like 5
#var2 like 7
#sum like add #var1 #var2
OMG "Sum of {var1} and {var2} is {sum}"
'''trashtalk_interpreter(code)
Re: Python-based compiler achieves orders-of-magnitude speedups
#93Earlier quoted context omitted.
These headlines usually work by the dept asking a researcher for a 10 sentence summary of their work. Someone in the dept summarizes that to 3 sentences, and sends that to the university pr dept. The university turns that 3 sentences into 1 and that's what's published. My take is this says more about the weird game of telephone being played than it does about the research product itself.
Yes, but it's a game of telephone that does make it annoying for HN readers to try and actually understand what's being presented, so it should be discussed and corrected if possible.
Re: Python-based compiler achieves orders-of-magnitude speedups
#94Earlier quoted context omitted.
Can you use Django with those optimisations or are they good mainly for scientific computing?
Have a look at Cinder - https://github.com/facebookincubator/cinder - it's Meta's performance oriented fork of CPython that they use to run Instagram (which is a big Django app).
Re: Python-based compiler achieves orders-of-magnitude speedups
#95Preface: I don't just want to crap on Python here and sell Nim. I like Python, and still use it. But it still shocks me just how much money and manpower is thrown at trying to bikeshed and optimize and compile Python and its libraries, while the Nim compiler is essentially a community hobby project that has made the concept of a "compiled Python" a reality already. The orders of magnitude in scale difference, and the…
A lot of effort is dedicated to trying to improve the speed because python is so widely used that improving performance could have a massive beneficial impact. Migrating to a new language is not easy when you have millions of lines of code.
You can adopt it incrementally, but then you could just as well switch to a language with higher default performance, more language features that just work, unified tooling etc. and adopt that incrementally?
Re: Python-based compiler achieves orders-of-magnitude speedups
#96Earlier quoted context omitted.
A fair implication, but they mean "Python-based" in that the language the compiler implements is based on Python.
They should have said python compiler (shorter) or python compiler in c++ (more accurate and only one character longer, including spaces). Considering at least 2 people have gone to look at the source and then come here to comment, it would have been a net benefit for all involved. Plus, what does it say about the potential quality of your compiler if you can't even make correct English statements? This seems easier…
2. There are lots of good developers who aren't capable of making any statements in English.
Re: Python-based compiler achieves orders-of-magnitude speedups
#97nit: 'Python-based' would imply to me that it's written in Python, but it looks like it's mostly C++ & LLVM: https://github.com/exaloop/codon/tree/develop/codon
Hardly a nitpick. It's key to the claim.
Re: Python-based compiler achieves orders-of-magnitude speedups
#98Earlier quoted context omitted.
They should have said python compiler (shorter) or python compiler in c++ (more accurate and only one character longer, including spaces). Considering at least 2 people have gone to look at the source and then come here to comment, it would have been a net benefit for all involved. Plus, what does it say about the potential quality of your compiler if you can't even make correct English statements? This seems easier…
> This seems easier to get right than if( x = *p++ ) For people with native or fluent English, for sure. For the others, probably not.
Re: Python-based compiler achieves orders-of-magnitude speedups
#99So the differences: https://docs.exaloop.io/codon/general/differences So more limited types (integers) and more type checking and collections have to have one kind of thing in them. There are other python compilers though, like https://github.com/Nuitka/Nuitka I wonder really what the advantages/disadvantages of these are?
Re: Python-based compiler achieves orders-of-magnitude speedups
#100Earlier quoted context omitted.
And it is severely underrated. Even though performance gain is aevrate around 4x-20x. Used in production and memory usage is also about 1/6th of CPython. Can get 10x perfromance easily in many cases.
> Used in production and memory usage is also about 1/6th of CPython I thought it would have higher memory usage? (based only on reading)