如何在 Windows 中获得 common-lisp GUI?

发布于 2024-07-12 03:23:12 字数 92 浏览 4 评论 0 原文

我正在使用 Emacs、CLISP 和 Slime,并且希望能够在屏幕上绘制图片。 我正在特别考虑绘制图表,但是任何可以让我绘制基本形状并操纵它们的东西都可以让我开始。

I'm using Emacs, with CLISP and Slime, and want to be able to draw pictures on the screen. I'm specifically thinking about drawing graphs, but anything that would let me draw basic shapes and manipulate them would be able to get me started.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

著墨染雨君画夕 2024-07-19 03:23:13

道格是对的; CAPI 会正常工作。 您可以尝试的其他方法:

cltk: http://www.cliki.net/Lisp-Tk

我知道 Allegro 也有一些用于 Windows 编程的东西,但我从未尝试过。

也可能有效的是 cells-gtk: http://common-lisp.net/project/ cells-gtk/

再说一次,我只能告诉你它存在,但不能告诉你它有多糟糕,或者它是否真的有效......

我也无法评论它的质量
http://www.cliki.net/GTK%20binding

但这主要是可用的。

Corman Lisp 可能也可以为 Windows 编程提供一些东西。

无论如何,Windows 上的选择相对较少。 您可能对 CAPI 最有信心,它用于 Windows、Linux、MacOS X 以及相当多的大型 unice 上的 LispWorks IDE...

问候

Doug is right; CAPI will work fine. Other things you can try:

cltk: http://www.cliki.net/Lisp-Tk

I know that Allegro has something for Windows programming also, but I've never tried it.

What may also work is cells-gtk: http://common-lisp.net/project/cells-gtk/

Again, I can only tell you that it exists but not how bad it is or if it even really works...

I can not comment also on the quality of
http://www.cliki.net/GTK%20binding

But that's mostly what is available.

Corman Lisp probably has something to offer for Windows programming also.

Anyway, the choices on Windows are relatively slim. The you can probably have the most confidence in CAPI, which is used for the LispWorks IDE on Windows, Linux, MacOS X and on quite few big unices also...

Regards

梦幻之岛 2024-07-19 03:23:13

我想我已经找到了自己的答案。 Clojure 似乎拥有我正在寻找的一切,只是因为我现在可以在 LISP 中本地使用所有 Java GUI 项目。 它是与我使用的 Common-Lisp 不同的 LISP 方言,但似乎有很多社区支持,并且通过 SLIME 或通过 Inferior-Lisp 解释器与我安装的 Emacs 集成。 到目前为止,我印象非常深刻。

哦,代码示例:

(. javax.swing.JOptionPane (showMessageDialog nil "Hello World"))

你猜猜这是做什么的? :)

Bill Clementson 的博客中有很多关于 Clojure 的内容,其中包括许多有关安装它的有用帖子。 请参阅此处:他在 Clojure 上的帖子

I think I've found my own answer. Clojure seems to have everything I was looking for, just because I can now use all of the Java GUI items natively in LISP. It is a different dialect of LISP than the Common-Lisp I was using, but seems to have a lot of community support, and integrates with my Windows installation of Emacs either through SLIME or through the Inferior-Lisp interpreter. So far I've been very impressed.

Oh, a code sample:

(. javax.swing.JOptionPane (showMessageDialog nil "Hello World"))

Any guesses what this does? :)

Bill Clementson's blog has quite a bit on Clojure, including a lot of helpful posts on installing it. See here: his posts on Clojure

夜吻♂芭芘 2024-07-19 03:23:13

您可以从 CLISP 切换到免费的 LispWorks 个人版并使用 CAPI 图形端口绘图 API。

或者您可以使用 Lisp 的 外部函数接口 并使用其中一个图形适用于您的操作系统的工具包。

You could switch from CLISP to the free LispWorks Personal Edition and use the CAPI Graphics Ports drawing API.

Or you could use Lisp's Foreign Function Interface and use one of the graphics toolkits available for your OS.

万劫不复 2024-07-19 03:23:13

要滚动你自己的(就像你说的,基本形状)尝试 Lispbuilder-SDL 或一个cl-cairo FFI(不过我猜测后者可以与 MS Windows 一起使用)。

For rolling your own (like you said, basic shapes) try Lispbuilder-SDL or one of the cl-cairo FFIs (it's just my guess that the latter work with MS Windows, though).

寄居人 2024-07-19 03:23:13

我知道这是一篇旧帖子,但这里的信息是为像我这样发现该线程寻找相同内容的人提供的。

这个用于 common lisp 中 tk 绑定的库似乎工作得相当好。
http://www.peter-herth.de/ltk/

I know this is an old post, but so the information is here for others like me who find this thread looking for the same thing.

This library for tk bindings in common lisp seems to work fairly well.
http://www.peter-herth.de/ltk/

我恋#小黄人 2024-07-19 03:23:13

Clojure 是一个优秀的 Lisp,而 Swing 是一个可靠的(如果不是特别令人兴奋的)窗口工具包。 如果您想做更高级的图形和/或涉足游戏编程,您可能需要查看 Slick,这是一个通用图形/游戏库,位于 Swing 之上,让您可以访问 OpenGL 和许多其他内容。

我发现 Clojure/Slick 组合是进行探索性图形编程的绝佳方法,因为您可以直接从 REPL 与图形窗口交互。

Clojure is an excellent Lisp, and Swing is a solid (if not particularly visually exciting) windowing toolkit. If you want do do more advanced graphics and/or dabble with game programming you might want to check out Slick, which is a general purpose graphics/game library that sits on top of Swing and gives you access to OpenGL and lots of other stuff.

I've found the Clojure/Slick combination an excellent way to do exploratory graphics programming, as you can interact with the graphics window directly from the REPL.

夏末的微笑 2024-07-19 03:23:13

cl-cairo2 - 与 Cairo 矢量绘图库的绑定。 它可用于在各种表面上绘制各种图画。 有一个 cl-2d 库,它使用 cl-cairo2 来绘制图表。

还有 cl-gtk2 - 与 Gtk+ 库的绑定。 您可以创建使用 cl-cairo2(或 cl-2d)绘制的小部件来绘制您想要的内容。

There's cl-cairo2 - a binding to Cairo vector drawing library. It can be used to draw various pictures on various surfaces. There's a cl-2d library that uses cl-cairo2 to draw charts.

And there's cl-gtk2 - a binding to Gtk+ library. You can create widgets that are drawn with cl-cairo2 (or cl-2d) that draw what you want.

錯遇了你 2024-07-19 03:23:13

CLISP 用户可能会发现以下内容对其图形应用程序有用:

cl-vectors 是一个纯粹的 Common Lisp
库来创建、转换和
渲染抗锯齿矢量路径。
可以使用它来安装
ASDF-安装。
http://projects.tuxee.net/cl-vectors/

Vecto 是一个简化的界面
强大的 CL-VECTORS 载体
光栅化库....结果
可以保存为 PNG...由于 Vecto
所有支持库都是
完全用 Common Lisp 编写,
不依赖于外部非Lisp
图书馆,它应该适用于任何
通用 Lisp 环境。 向量是
可在类似 BSD 的许可证下使用。
当前版本为1.4.3,已发布
2009 年 8 月 26 日。
http://www.xach.com/lisp/vecto/

CLISP users might find The following useful for their graphics applications:

cl-vectors is a pure Common Lisp
library to create, transform and
render anti-aliased vectorial paths.
It can be installed using
ASDF-Install.
http://projects.tuxee.net/cl-vectors/

Vecto is a simplified interface to the
powerful CL-VECTORS vector
rasterization library....the results
can be saved to a PNG ... Since Vecto
and all supporting libraries are
written completely in Common Lisp,
without depending on external non-Lisp
libraries, it should work in any
Common Lisp environment. Vecto is
available under a BSD-like license.
The current version is 1.4.3, released
on August 26, 2009.
http://www.xach.com/lisp/vecto/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文