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

do you have an example?



You can find a small example for generating CSE'd C code for a sympy expression at https://stackoverflow.com/questions/22665990/optimize-code-g... .

I think the built-in code generator is a bit strange, though: for example, it always prints integers as integers, and not as floats depending on the context, so code often doesn't typecheck.


I tweeted a screenshot of the Jupyter Notebook session I used to create the code at the bottom: https://twitter.com/a1k0n/status/1301261285800030208




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: