The Dasypeltis, gansi, is considered an egg-eating snake. Their diet consists of all forms of eggs considering they have no teeth in which to eat living prey with.
Dasy is an experimental smart contract programming language in the lisp family. It is implemented by compiling to Vyper and benefits from the extensive optimizations and excellent performance of Vyper.
Learn more in the [[file:docs.org][documentation]]
(defvars :public myMap (hash-map :address :uint256) nums (dyn-arr :uint256 3) owner :address)
(defn init [] :external (set self/owner msg/sender) (set-at self/myMap msg/sender 10) (do ;; wrap statements in do (.append self/nums 11)))
(defn getOwnerNum [] :uint256 :external (get-at self/myMap self/owner))
pip install git+https://github.com/dasylang/dasy.git
** For use as an executable via =pipx=
pipx install git+https://github.com/dasylang/dasy.git
** [[https://github.com/dasylang/ape-dasy][Ape Plugin]]
pip install ape-dasy
** [[https://github.com/dasylang/foundry-dasy][Foundry plugin]]
macros are written in Hy, a pythonic lisp. They allow us to transform our code at compile time, allowing the developer to tailor the language itself to their needs.
=cond= and =condp= are examples of useful macros that help make your code shorter, yet easier to understand.
(defn useIf [:uint256 x] :uint256 :external (if (<= x 10) (return 1) (if (<= x 20) (return 2) (return 3))))
;; cond macro helps prevent deeply nested ifs (defn useCond [:uint256 x] :uint256 :external (cond (<= x 10) (return 1) (<= x 20) (return 2) :else (return 3)))
;; condp saves you from repeating the same operation (defn useCondp [:uint256 x] :uint256 :external (condp <= x 10 (return 1) 20 (return 2) :else (return 3)))
** For fun