Login
You're viewing the discuss.systems public feed.
  • Aug 20, 2026, 1:33 PM

    i dont know what your problem is, this is very valid code... u just need to use the package.....

    (use 📦)
    (👀 [🃏 (🎲 (🕰️))]
    (💢 resultbuffer (🫙))
    (💢 ⤴️ ✅)
    (🔁 ⤴️
    (👀 [a (🎰 🃏 16)
    b (🎰 🃏 10)
    op (🥢 @['+ '- '* '/] (🎰 🃏 3))
    x ((🫕 op) a b)
    prompt (🪢 "%d %q %d =? " a op b)]
    (👓 prompt resultbuffer)
    (👀 [guess (🕶️ (🔝 (🪓 "\n" resultbuffer)))]
    (🫗 resultbuffer)
    (❓ (🟰 x guess)
    (👓 (🪢 "Yupp, %d! press q to exit or any other key to play again " x) resultbuffer)
    (👓 (🪢 "Nope, %d! press q to exit or any other key to play again " x) resultbuffer))
    (⁉️ (🌘 "q" resultbuffer)
    (❗️ ⤴️ ❌)))))
    (💥))

    💬 1🔄 4⭐ 3

Replies

  • Aug 20, 2026, 1:34 PM

    📦.janet:

    (defmacro 👀 [bindings & body] ~(let ,bindings ,;body))
    (defmacro 🎲 [&opt seed] ~(math/rng ,seed))
    (def 🕰️ os/time)
    (defmacro 🎰 [rng &opt maxv] ~(math/rng-int ,rng ,maxv))
    (defmacro 🥢 [ds index] ~(get ,ds ,index))
    (defmacro 👓 [prompt resultingbuffer] ~(getline ,prompt ,resultingbuffer))
    (defmacro 🫗 [abuffer] ~(buffer/clear ,abuffer))
    (def 🫙 buffer)
    (defmacro 🪢 [formatstring & rest] ~(string/format ,formatstring ,;rest))
    (defmacro 🔁 [condition & body] ~(while ,condition (do ,;body)))
    (def ✅ :true)
    (def ❌ nil)
    (defmacro 💢 [name & body] ~(var ,name ,;body))
    (defmacro ❗️ [name & body] ~(set ,name ,;body))
    (defmacro ❓ [condition then else] ~(if ,condition ,then ,else))
    (defmacro ⁉️ [condition then] ~(❓ ,condition ,then ❌))
    (defmacro 🟰 [a & bs] ~(= ,a ,;bs))
    (defmacro 🔝 [ds] ~(first ,ds))
    (defmacro 🪓 [delim the_string] ~(string/split ,delim ,the_string))
    (defmacro 🕶️ [num] ~(scan-number ,num))
    (defmacro 🌘 [pfix input] ~(string/has-prefix? ,pfix ,input))
    (defmacro 🥡 [& parts] ~(symbol ,;parts))
    (defmacro 🫕 [& body] ~((compile ,;body)))
    (def 💥 os/exit)

    💬 0🔄 0⭐ 0