在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):bakpakin/Fennel开源软件地址(OpenSource Url):https://github.com/bakpakin/Fennel开源编程语言(OpenSource Language):Fennel 91.3%开源软件介绍(OpenSource Introduction):FennelFennel is a lisp that compiles to Lua. It aims to be easy to use, expressive, and has almost zero overhead compared to writing Lua directly.
At https://fennel-lang.org there's a live in-browser repl you can use without installing anything. At https://fennel-lang.org/see you can see what Lua output a given piece of Fennel compiles to, or what the equivalent Fennel for a given piece of Lua would be. Documentation
For more examples, see the cookbook on the wiki. The changelog has a list of user-visible changes for each release. ExampleHello World(print "hello, world!") Fibonacci sequence(fn fib [n]
(if (< n 2)
n
(+ (fib (- n 1)) (fib (- n 2)))))
(print (fib 10)) Building Fennel from sourceBuilding Fennel from source allows you to use versions of Fennel that haven't been released, and it makes contributing to Fennel easier. To build Fennel from source
Note: If you copied the Differences from Lua
Differences from other lisp languages
Why not Fennel?Fennel inherits the limitations of the Lua runtime, which does not offer pre-emptive multitasking or OS-level threads. Libraries for Lua work great with Fennel, but the selection of libraries is not as extensive as it is with more popular languages. While LuaJIT has excellent overall performance, purely-functional algorithms will not be as efficient as they would be on a VM with generational garbage collection. Even for cases where the Lua runtime is a good fit, Fennel might not be a good fit when end-users are expected to write their own code to extend the program, because the available documentation for learning Lua is much more readily-available than it is for Fennel. Resources
LicenseCopyright © 2016-2022 Calvin Rose and contributors Released under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论