decorator | hy | |
---|---|---|
1 | 56 | |
821 | 4,802 | |
- | 0.6% | |
3.5 | 9.2 | |
3 months ago | 12 days ago | |
Python | Python | |
BSD 2-clause "Simplified" License | GNU General Public License v3.0 or later |
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.
decorator
-
Python Malware Starting to Employ Anti-Debug Techniques
that doesn't make much sense and there are necessary uses for eval() /exec(), mostly for dynamic creation of code:
For example here's Python dataclasses in the standard library using exec() to create the `__init__` and other methods that go on your dataclass:
https://github.com/python/cpython/blob/main/Lib/dataclasses....
Here's Pydantic using it for a jupyter notebook check:
https://github.com/pydantic/pydantic/blob/594effa279668bd955...
here's Pytest using it to rewrite modules so that functions like assert etc. are instrumented by pytest:
https://github.com/pytest-dev/pytest/blob/eca93db05b6c5ec101...
Here's the decorator module using it (as is the only way to do this in Python) to create a signature matching decorator for an arbitrary function:
https://github.com/micheles/decorator/blob/ad013a2c1ad796996...
All of these libraries are completely secure as eval/exec are used with code fragments that are generated by the libraries, not based on untrusted input.
eval() /exec() are not running executable files, just Python code, the same way all the rest of the package is already doing.
hy
- Try Clojure
-
Homoiconic Python
Only tangentially related, but for anyone interested in the idea of a simple, quick Python-like scripting Lisp, there are two Clojure-style languages to look at:
1) Hy (https://hylang.org/, compiles to Python bytecode, usually slower than Python but compatible with all Python libraries)
2) Janet (https://janet-lang.org/, very light Lua-style embeddable VM ~1 Mb, roughly twice as fast as Python for similar ops, very easy C interop)
- Basilisp: A Clojure-ish Lisp dialect targeting Python 3.8
-
Show HN: Exploring HN by mapping and analyzing 40M posts and comments for fun
I couldn't help but notice that Hy is on the map but Clojure isn't.
Am I out of touch?
https://hylang.org
- A dialect of Lisp that's embedded in Python
-
How to Write a (Lisp) Interpreter (In Python)
Not exactly the same (doesn't embed into the source like this did), but I believe Hylang[0] is the best Lisp package available for modern Python.
[0] https://github.com/hylang/hy
-
Sapling: A highly experimental vi-inspired editor where you edit code, not text
Isn't that a bit what hy (https://hylang.org/) tries to do ? AIUI it is a lisp interacting directly with the AST of Python, allowing seamless interop: Python modules can be used from hy and vice versa, everything is transparent.
- Hylang, a Lisp dialect embedded in Python
-
Hissp
I’ve been keeping loose tabs on this and Hy[1] for a while, but I’ve had some trouble figuring out the major differences between them and the use-cases for either. Would love to see an in-depth comparison in the form of a blog post sometime (though maybe the answer here is to do the research and write one up myself).
1: https://hylang.org
- Hy
What are some alternatives?
CPython - The Python programming language
hissp - It's Python with a Lissp.
pytest - The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
Fennel - Lua Lisp Language
thonny - Python IDE for beginners
babashka - Native, fast starting Clojure interpreter for scripting
act - Run your GitHub Actions locally 🚀
eso-light-attack-weave - This is a macro for the game Elder Scrolls Online
Carp - A statically typed lisp, without a GC, for real-time applications.
hebigo - 蛇語(HEH-bee-go): An indentation-based skin for Hissp.
awesome-clojure-likes - Curated list of Clojure-like programming languages.
mal - mal - Make a Lisp