[IPython-dev] IPython-dev Digest, Vol 131, Issue 2

Matthias BUSSONNIER bussonniermatthias at gmail.com
Wed Dec 3 12:49:45 EST 2014

Le 3 déc. 2014 à 18:44, Kyle Rawlins a écrit :

> I think the most straightforward approach would be to do this kind of thing using IPython magics, probably in IPython notebook.  For an (alpha) example of this, you may find it helpful to look at my IPython Lambda Notebook project which uses cell magics to interface notebooks with a parser for a domain-specific mini-language (the domain is linguistics, in particular linguistic semantics, so the mini-language is a typed logic/lambda calculus).  The magics pass things to the parser, and variable assignments in the mini-language are injected back into the environment in a very straightforward way, so it’s easy to switch back and forth between the mini-language and python code.  I wouldn’t really recommend my approach to parsing and interpreting the mini-language, though, which is tailored to an extremely specific brand of scientific computing (and not for actually doing efficient parsing or computation).
> https://github.com/rawlins/lambda-notebook
> Less relevant to this mailing list but I’d also caution against literally targeting a superset of python, this will be really, really hard to get right.  At least start with a domain-specific language that is python-like but tractable.

Looks cool !

Nbviewer link for the lazy:



> Best,
> -kyle
> -- 
> Kyle Rawlins
> http://sites.krieger.jhu.edu/rawlins/
> Department of Cognitive Science
> Johns Hopkins University
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141203/87924dcd/attachment.html>

More information about the IPython-dev mailing list