News for hackers. Stuff that matters.
Re:Let's Write an LLVM Specializer for Python (2015) by kiriliponi on Wednesday October 16, 2019 @06:55AM (#21269007)
I recommand David Beazley's talk from a recent PyCon India on a similar subject : https://youtu.be/r-A78RgMhZU

Mostly live coded, it really is pretty amazing but also quite insightful.

Re:Let's Write an LLVM Specializer for Python (2015) by heinrichhartman on Wednesday October 16, 2019 @09:14AM (#21269966)
> In this talk, I live-code a simple stack machine and turn it into an interpreter capable of running Web Assembly. I then use that to play a game written in Rust.

Wow. This is mind blowing. Thanks for the pointer.

Re:Let's Write an LLVM Specializer for Python (2015) by bgilroy26 on Wednesday October 16, 2019 @11:25AM (#21271394)
He has a lambda calculus talk in python[0] that is just as good. Just a great educator.

[0] https://www.youtube.com/watch?v=pkCLMl0e_0k

Re:Let's Write an LLVM Specializer for Python (2015) by raincom on Wednesday October 16, 2019 @02:51PM (#21273981)
U of Chicago, I believe, denied him tenure, when he was an assistant prof there.
Re:Let's Write an LLVM Specializer for Python (2015) by jules on Wednesday October 16, 2019 @06:27PM (#21276676)
How good of an educator you are may not even be in the top 5 most important things to get tenure, unfortunately.
Re:Let's Write an LLVM Specializer for Python (2015) by shalabhc on Wednesday October 16, 2019 @06:25AM (#21268853)
If you like this you might also like http://terralang.org
Re:Let's Write an LLVM Specializer for Python (2015) by weberc2 on Wednesday October 16, 2019 @12:17PM (#21272065)
Whoa, I've had this idea kicking around in my mind for a looong time (specifically something for dynamically generating Go code). Was wondering if anyone actually built this out, but could never find anything. Thanks for sharing!
Re:Let's Write an LLVM Specializer for Python (2015) by saagarjha on Wednesday October 16, 2019 @05:58AM (#21268699)
Cool! Aside from the Python JIT portion, this was a pretty decent dive into LLVM. One question: was this a notebook, or it it just CSS that's making the code look like that?
Re:Let's Write an LLVM Specializer for Python (2015) by yorwba on Wednesday October 16, 2019 @06:35AM (#21268908)
Re:Let's Write an LLVM Specializer for Python (2015) by gjvc on Wednesday October 16, 2019 @11:33PM (#21278696)
As others have noted, this is a somewhat dated article. Indeed, the github page for llvmpy (https://github.com/llvmpy/llvmpy) recommends to use llvmlite (https://github.com/numba/llvmlite) instead.

See also http://llvmlite.pydata.org/en/latest/user-guide/index.html and in the context of the original article, in particular these two pages:

http://llvmlite.pydata.org/en/latest/user-guide/ir/examples....

http://llvmlite.pydata.org/en/latest/user-guide/binding/exam...

Hope this helps! :-)

Re:Let's Write an LLVM Specializer for Python (2015) by dang on Wednesday October 16, 2019 @11:56AM (#21271785)
Re:Let's Write an LLVM Specializer for Python (2015) by pulse7 on Wednesday October 16, 2019 @05:53AM (#21268674)
Nice, compressed LLVM overview...
Re:Let's Write an LLVM Specializer for Python (2015) by underdeserver on Wednesday October 16, 2019 @07:52AM (#21269373)
Anyone got a benchmark for the LLVM'd code?
Re:Let's Write an LLVM Specializer for Python (2015) by accnumnplus1 on Wednesday October 16, 2019 @06:16PM (#21276573)
Am I being daft, or is there not much sbout specializers on the web? Any links much appreciated.
Re:Let's Write an LLVM Specializer for Python (2015) by wenning on Wednesday October 16, 2019 @01:27PM (#21272934)
I'm wonder why llvmpy depends on llvm3.2 or 3.3, it's so a lot behind current version.
Re:Let's Write an LLVM Specializer for Python (2015) by hsaliak on Wednesday October 16, 2019 @02:36PM (#21273829)
The article is from 2015. Many of the jits (eg numba) have moved to llvmlite.

https://github.com/numba/llvmlite

Re:Let's Write an LLVM Specializer for Python (2015) by sergius on Wednesday October 16, 2019 @08:43AM (#21269717)
Why not just use Nim?
Re:Let's Write an LLVM Specializer for Python (2015) by sigzero on Wednesday October 16, 2019 @09:20AM (#21270012)
I like Nim. I am learning it now. However, Nim is not Python and this post is about Python.
Re:Let's Write an LLVM Specializer for Python (2015) by nurettin on Wednesday October 16, 2019 @09:00AM (#21269854)
Use nim to create an LLVM specializer for python and call numpy functions with it?