4 ms·
If I’m understanding the article correctly, it should be possible to create a Racket language that compiles to any other language. A quick google does reveal wo
by wildermuthn 8y ago
If I’m understanding the article correctly, it should be possible to create a Racket language that compiles to any other language. A quick google does reveal work has been done on C and Python, although it appears there are bugs and various work-arounds that precludes a full and clean integration. The Javascript integration appears dead (in terms of using the latest version of Racket)
Although using Racket for this wholesale integration appears impractical, it does suggests a killer-app: extending general programming languages. In other words, using Racket as a transpiler. I.e., a better Babel.js, but for any language.
I routinely use Python for machine learning tasks, but frequently am frustrated by the inflexibility of the language. Instead of solving the problem itself I have to first solve how to make the language do what I want (usually resulting in code that lacks expressiveness and brevity, and thus extensibility).
I’d love to use lisp to leverage ML work that can only be done effectively in Python (Tensorflow, PyTorch, etc).
Can Racket be an effective transpiler?
- xrayspec 8y agoIIUC Babel.js is essentially a fancy preprocessor for JS. So if by that analogy, you mean "can I use Racket to design my own notation that compiles to Python", yes of course.