为没有ZeroMQ绑定的语言创建IPython的语言内核 [英] Create language kernels for IPython for a language without ZeroMQ bindings

查看:137
本文介绍了为没有ZeroMQ绑定的语言创建IPython的语言内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些有趣描述编写语言内核以允许以前不支持的语言 IPython 将从IPython执行。

There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython.

在所有情况下,内核创建步骤都涉及使用目标语言的 ZeroMQ 绑定(因为ZeroMQ是IPython前端到内核通信协议的主要架构组件)。

In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol).

在我的公司,几年前创建了一种专有语言,并使用编译器维护字节码(使用C ++编写的字节码运行器),Flash和JavaScript ...它仍然被大量使用今天但它从来没有像REPL那样的东西。

In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C++), Flash, and JavaScript ... it's still heavily used today but it has never had anything like a REPL.

这种语言ge是一种类似于Haskell或SML的函数式语言,它没有ZeroMQ绑定,也没有计划让语言维护者添加任何语言。

This language is a functional language similar to Haskell or SML, and it has no ZeroMQ bindings with no plans for the language maintainers to add any.

有没有办法继续写一个可以与IPython通信的内核?

Is there a way to still write a kernel that can communicate with IPython?

推荐答案

如果您的语言有Python绑定,或者您可以使用某些东西从Python驱动REPL像Pexpect一样,你可以创建一个包装器内核,重用IPython通信机制。

If your language has Python bindings, or you can drive a REPL from Python using something like Pexpect, you can create a wrapper kernel, reusing the IPython communication machinery.

这里有记录: http://ipython.org/ipython-doc/dev/development/wrapperkernels.html

这篇关于为没有ZeroMQ绑定的语言创建IPython的语言内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆