urn
hebigo
Our great sponsors
urn | hebigo | |
---|---|---|
6 | 21 | |
362 | 21 | |
- | - | |
0.0 | 1.9 | |
about 5 years ago | 11 months ago | |
Common Lisp | Python | |
BSD 3-clause "New" or "Revised" License | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
urn
-
Using other languages
There's many different languages that can compile to Lua: - TypeScript is probably the most well-known and most compatible language for Lua. The TypeScriptToLua compiler lets you compile TypeScript code into Lua with a mostly 1:1 conversion. You can use the @jackmacwindows/craftos-types and @jackmacwindows/cc-types NPM packages to add typing declarations for CraftOS APIs and modules. Alternatively, use my template repo for a more ready-to-go setup. - Haxe was built with compilation to Lua in mind, and so you can write code for it and have it run just fine in CC. There's some declarations for it available online, and I also have my own typing set for it (which I should really upload somewhere - DM me if you want it for now). - C# can also compile to Lua, but it's a bit tough to get working right in CC, as it has a huge default library and abuses the global table in a way that CC has trouble with. However, it's possible to use, and I've gotten it working in the past (unfortunately, I don't know how anymore). - Urn is a Lisp dialect that was built by two CC devs and was designed to run in CC. However, I wouldn't recommend it unless you're good with functional programming.
-
C-Lisp Implementations for microcontrollers?
Also, if the microcontroller you're working with is an ESP32 chip, you may be able to use use one of the lisp-to-Lua transpiled languages (urn or fennel) with something like Lua RTOS or NodeMCU. Not entirely sure how well this works in practice, but in theory it should be possible. Of the two, Fennel's probably more likely to behave well when used like this because it's more like a thin translation layer on top of Lua, but Urn's probably going to feel more comfortable to use because it feels like this weird mix of CL and Racket design.
-
Interesting or distinctive lisps?
Urn Lisp, A Lisp implementation on top of Lua: https://urn-lang.com
-
Trying Fennel for GTK apps and it's surprisingly good
For Lua-based lisps I kind of prefer Urn, which is more batteries-included and just feels better to me overall. Both are interesting though, if for no other reason, because Lua desperately needs macros in some form. :) Another interesting Lisp transpiled language is Amulet, which is an ML-style language somewhere between Haskell and OCaml in style. Something that's interesting about these Lua-based languages to me is they understand that Lua's an embeddable language and most of them have a way to generate Lua output that can be used wherever Lua's used, like in game modding
I don't know how much of reloading you need. I did something like that many moons ago. See here: https://github.com/SquidDev/urn/issues/12
-
Urn for CC?
Clone Urn: wget run https://gist.githubusercontent.com/SquidDev/e0f82765bfdefd48b0b15a5c06c0603b/raw/clone.lua https://github.com/SquidDev/urn.git (or similar)
hebigo
-
What is the point of the if __name__ == "__main__":, i.e. why use a file as both script and module?
The Lissp transpiler incrementally compiles and executes each top-level form to Python. It needs to do this in case there's a macro definition that might affect the compilation of a subsequent form. If it's only executing definitions, this is harmless, but if you want to precompile the main module, it needs the guard, or the side effects will happen too.
-
What's the most hilarious use of operator overloading you've seen?
If you want Python to be as customizable as Lissp, check out Hissp (and Hebigo).
-
Want cleaner code? Use the rule of six
Python's lambdas can have as many lines as you want. Just wrap parens around it. Hissp uses this form as a compilation target. Its REPL shows the Python compilation. Play around with it til you get it: https://github.com/gilch/hissp
- What would be your “perfect” programming language?
- Kamby – A programming language based on Lisp that doesn't seems like Lisp
- Wisp: Whitespace to Lisp
-
Is ECMAScript really a dialect of Lisp?
The original Lisp's S-expression syntax was just supposed to be an intermediate language used by the compiler when processing the real language based on M-expressions, which kind of never took off. Numerous alternatives to S-expressions have been proposed, and some retain homoiconicity, another feature diagnostic of a Lisp (and one that ECMAScript lacks). For example, see Hebigo's readme, which shows a direct correspondence between its Python-like syntax and that of Hissp's default reader (Lissp), which uses the S-expressions. Julia can also be written in S-expressions, but this usually only used in macro definitions.
- Why Hy?
-
Land of Lisp
I think LoL is too CL-specific. If you know both languages first, you can pretty much translate, but since they'd be trying to learn Lisp in the first place, this is a bad idea.
On the other hand, [Hissp][1] has a pretty good tutorial for anyone coming from a Python background.
-
Interesting or distinctive lisps?
Hebigo: a whitespaceLisp isomorphic to Hissp that looks like Python.
What are some alternatives?
Fennel - Lua Lisp Language
hy - A dialect of Lisp that's embedded in Python
hy-lisp-python - examples for my book "A Lisp Programmer Living in Python-Land: The Hy Programming Language"
slime - The Superior Lisp Interaction Mode for Emacs
smtfmt - An SMT-LIB formatter.
coalton - Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
smart-imports - smart imports for Python
LiveSplit - A sleek, highly customizable timer for speedrunners.
medley - The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
awesome-functional-python - A curated list of awesome things related to functional programming in Python.
TailRec.jl - A tail recursion optimization macro for julia.
Deck-Builder-Master-Duel-Macro - This is a Macro to get deck cards from masterduelmeta.com/ or Texts and automatically insert them at Mastel Duel