conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Correct import syntax in a test\n"
},
{
"from": "human",
"value": "(import [hy.extra.reserved [names] hy._compat [PY3]])\n\n(defn test-reserved []\n (assert (is (type (names)) frozenset))\n (assert (in \"and\" (names)))\n (when PY3\n (assert (in \"False\" (nam... | hy | chosen |
[
{
"from": "system",
"value": "Fix the test decorator to return the class.\n"
},
{
"from": "human",
"value": "(defn foodec [func]\n (lambda [] (+ 1 1)))\n\n\n(with-decorator foodec\n (defn tfunction []\n (* 2 2)))\n\n\n(defn bardec [cls]\n (setv cls.my_attr 123))\n\n(with-decorator bardec\n... | hy | chosen |
[
{
"from": "system",
"value": "Handle broken sockets a bit more gracefully\n"
},
{
"from": "human",
"value": "(import sys [uuid [uuid4]])\n(import\n [HyREPL [bencode]]\n [HyREPL.ops [find-op]])\n\n\n(def sessions {})\n\n\n(defclass Session [object]\n [[status \"\"]\n [eval-id \"\"]\n [eval... | hy | chosen |
[
{
"from": "system",
"value": "Fix empty strings triggering as values\n"
},
{
"from": "human",
"value": "(import os\n [flask [Flask]]\n dataset)\n\n;; flask\n(setv main-dir (os.path.dirname (os.path.abspath __file__)))\n(setv tmpl-dir (os.path.join main-dir \"templates\"))\n(setv st... | hy | chosen |
[
{
"from": "system",
"value": "Check if window is open\n"
},
{
"from": "human",
"value": "(defmacro loop [&rest body]\n \"\n Outermost s-expression\n the body is executed every frame\n (loop\n (window ...))\n \"\n `(try\n (do\n (import pineal)\n (while true \n ~@b... | hy | chosen |
[
{
"from": "system",
"value": "Fix failing tests, wrong quoting\n"
},
{
"from": "human",
"value": "(import ast\n [hash.codegen [visit]])\n\n(defmacro hyc [e] `(visit (ast.parse ~e)))\n\n(defn test-assign []\n (assert (= \"(setv a 10)\" (hyc \"a=10\")))\n (assert (= \"(+= a 10)\" (hyc\"a+... | hy | chosen |
[
{
"from": "system",
"value": "Add on the fly evaluation of code\n\nSigned-off-by: Julien Danjou <5c682c2d1ec4073e277f9ba9f4bdf07e5794dabe@danjou.info>\n"
},
{
"from": "human",
"value": "(import irc.bot)\n\n(defn on-welcome [bot event]\n (.join bot \"#hy\"))\n\n(defn start []\n (let [[bot\n ... | hy | chosen |
[
{
"from": "system",
"value": "Fix \"hylang-sh\" test to no longer \"import pip\"\n\n(https://blog.python.org/2018/04/pip-10-has-been-released.html)\n\n> In addition, the previously announced reorganisation of pip's internals has now taken place. Unless you are the author of code that imports the pip module ... | hy | chosen |
[
{
"from": "system",
"value": "Debug output was fixed. Previously it returned None and interrupted futher item processing.\n"
},
{
"from": "human",
"value": "(import [pprint [pprint]])\n\n(defn debug []\n pprint)\n"
},
{
"from": "gpt",
"value": "(import [pprint [pprint]])\n\n(defn de... | hy | chosen |
[
{
"from": "system",
"value": "Update hy test for 0.15 hy changes\n\nSee https://github.com/hylang/hy/releases/tag/0.15.0\n"
},
{
"from": "human",
"value": "(->\n (+ 2 2)\n (print))\n\n(import [subprocess] [sys])\n(subprocess.check_call [sys.executable \"-m\" \"pip\" \"install\" \"-q\" \"sh\"])... | hy | chosen |
[
{
"from": "human",
"value": "Add new damage system with targettable body parts\n\nMost of the time, damage is done against the torso of player and only\nmain armour matters for damage reduction calculation. In some more\nexotic cases, like with caltrops, this does not make any sense, thus\nthis new system w... | hy | chosen |
README.md exists but content is empty.
- Downloads last month
- 4