在哪里可以找到 Perl 6 的演示/示例代码?
我给自己买了一份 Rakudo,很想试用一下。 在浏览互联网后,我发现了一些很酷的 Perl 6 东西的代码片段,但没有完整的脚本。 任何提供实用 Perl 6 脚本的网站都将受到赞赏。
谢谢你们,埃蒂亚尔。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
请从 http://github.com/perl6/perl6 查看 perl6-examples 存储库-examples/tree/master,它包含许多不错的示例。
如果您有任何疑问,请不要犹豫加入 #perl6 或 irc.freenode.net(或 [电子邮件受保护](如果您是电子邮件用户)。
有时 Perl 6 博客上也有非常好的示例,其中大部分都收集在 http://pl6anet.org。
另请参阅 Rosetta 代码 上的 Perl 6 示例。
Please check out the perl6-examples repository from http://github.com/perl6/perl6-examples/tree/master, it contains many nice examples.
Also don't hesitate to join #perl6 or irc.freenode.net if you have any questions (or [email protected] if you're more the email user).
Sometimes there are also very nice examples on the Perl 6 blogs out there, most of them are collected on http://pl6anet.org.
See also Perl 6 examples on Rosetta Code.
Perl 基金会的此页面很好地介绍了新功能。 特别是“长 Perl 6 超级功能列表”(实际上不是很长,它以要点的形式解释了将出现哪些新功能)。 如果您只是专门寻找新功能,那么就应该寻找新功能,而不是筛选大量示例代码并剖析新功能。
此页面上有一些很好的小型示例,无需大量代码即可演示新功能。
This page at the Perl foundation covers new features very well. Specifically "The Long Perl 6 Super-Feature List" (Which isn't actually very long, it explains what new features will be coming in bullet points). If you are specifically looking for new features only, that is the place to look as opposed to sifting through mounds of sample code and dissecting new features.
There are some good smaller examples on this page that will demonstrate new features without an elaborate amount of code.
Perlgeek 博客是了解其他 perl6 内容的好地方; 那里有几篇文章和示例,包括 JSON 解析的函数语法......非常酷。
A great place for other perl6 stuff is the Perlgeek blog; there are several articles and examples there, including a functional grammar for JSON parsing...very cool.
正如 Robert 提到的,Perlgeek 博客有一些很棒的文章。 我自己写了几篇文章,但它们主要涵盖 Perl 6 的特定内容(类,方法等)。
您可以在此处查看《Using Perl 6》一书,该书以 pdf 格式免费提供。 它有很多关于它所涵盖的概念和功能的代码示例。 这本书也可以在最新 Rakudo * 版本的文档目录中找到。
另外,我建议查看规格测试。 如果您安装了 Rakudo *,它们应该位于 rakudo/t/spec 中。 它们是按概要组织的,这可能有点令人困惑。 然而,浏览它们的好处是巨大的,您将有机会看到如何使用 Perl 6 中的概念的多个示例,您知道这些概念适用于当前的构建,因为您可以运行测试。
As Robert mentioned, the Perlgeek blog has some great articles. I've written a couple articles myself, but they mostly cover specific things of Perl 6 (classes, methods, etc).
You can look at the Using Perl 6 book, which is freely available as a pdf here. It has lots of code examples for the concepts and features it covers. The book is also available in the docs directory of the latest Rakudo * release.
Also, I'd recommend looking through the spec tests. If you have Rakudo * installed they should be in rakudo/t/spec. They are organized by the synopsis, which can be a little confusing. However, the benefit from looking through them is great, you'll get a chance to see multiple examples of how to use concepts in Perl 6 that you know work in your current build because you can run the test.
我认为在撰写此评论时(2015 年 6 月)有帮助的资源,按 QA 最多到最少的顺序列出:
示例.perl6.org。
简短的一篇衬垫文章.
Perl 6 降临节日历。
jnthn 的演讲 例如"Perl 6:你今天能做什么?"。 并发示例的好资源。
Perl 6 条目位于 Rosetta 代码。 其中许多是由 Larry Wall 编写的。
modules.perl6.org 上的模块。
Perl6Maven。 包含片段和一个长的、不完整的、部分被破坏的 P6 教程,但该网站的所有者 (Gabor Szabgab) 表示他打算在今年 (2015 年) 构建他的 P6 内容,因此至少值得快速访问。
Resources I think helpful at the time of writing this comment (June 2015), listed from most to least QA'd:
examples.perl6.org.
Short one liners article.
Perl 6 advent calendars.
jnthn's talks eg "Perl 6: what can you do today?". Good resource for examples of concurrency.
Perl 6 entries at Rosetta Code. Many of these are written by Larry Wall.
Modules on modules.perl6.org.
Perl6Maven. Contains snippets and a long, incomplete, partly bitrotted P6 tutorial, but the site's owner (Gabor Szabgab) has said he intends to build out his P6 content this year (2015) so it's worth at least a quick visit.