You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
It's possible to embedding seq-lang to Python? Just like the numba and taichi.
The syntax of seq-lang is very similar to Python, so I think maybe it's possible to compile the source code in a Python function to seq-lang, for example:
@seq_langdefcheck_prime(n):
# this part in "seq-lang scope", it will compile to seq lang and get high performanceifn>1:
foriinrange(2, n):
ifn%i==0:
returnFalsereturnTrueelse:
returnFalse# this part run in "Python scope", run slow but could interact with other Python libraryn=1009print(n, 'is', 'a'ifcheck_prime(n) else'not a', 'prime')
If it's possible, it's will more convenient for Python users in their daily work.
The text was updated successfully, but these errors were encountered:
Hi @Nanguage, thanks for the suggestion. This is definitely something on our todo list. In theory it shouldn't be too difficult, and we have an idea of how to implement it. We're in the process now of generalizing/expanding Seq w.r.t. Python compatibility and interoperability, and plan to look more into this soon.
Just saw the paper and was intrigued, and this issue was top of my mind. Calling Python from Seq is great, but calling Seq from Python would be even better :D That way I can keep my existing Python pipeline and only speed up the parts that are particularly painful.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It's possible to embedding seq-lang to Python? Just like the numba and taichi.
The syntax of seq-lang is very similar to Python, so I think maybe it's possible to compile the source code in a Python function to seq-lang, for example:
If it's possible, it's will more convenient for Python users in their daily work.
The text was updated successfully, but these errors were encountered: