Skip to content

babashka/pod-babashka-lanterna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 22, 2023
5c3bba3 · Feb 22, 2023

History

38 Commits
Feb 22, 2023
Feb 22, 2023
Feb 22, 2023
Feb 22, 2023
Oct 13, 2020
Jan 16, 2023
Oct 12, 2020
Oct 12, 2020
Oct 21, 2020
Feb 22, 2023
Oct 21, 2020
Feb 22, 2023

Repository files navigation

pod-babashka-lanterna

A pod exposing clojure-lanterna.

To build, see dev. Pre-compiled binaries are available in the CircleCI builds.

API

The following namespaces + vars are exposed:

  • pod.babashka.lanterna.terminal:
    • get-terminal
    • start
    • stop
    • put-string
    • flush
    • get-key
    • get-key-blocking
    • get-size
  • pod.babashka.lanterna.screen:
    • put-string
    • redraw
    • get-key
    • get-key-blocking
    • start
    • stop
    • get-size

More can be added, PRs welcome.

Examples

  • Run bb lanterna.cljc for a simple demo.

  • console-tetris:

    $ export BABASHKA_CLASSPATH=$(clojure -Spath -Sdeps '{:deps {borkdude/console-tetris {:git/url "https://github.com/borkdude/console-tetris" :deps/manifest :deps :sha "f2b8388b160b0326d72a7f18785687175910504f"}}}')
    $ bb -m tetris.core

    Note: this will be considerably slower than the GraalVM tetris from the same repo.

Dev

Build

Set GRAALVM_HOME to your GraalVM 20.2.0-java11 directory.

Run script/compile

Test

Run bb lanterna.cljc.

License

Copyright © 2020 Michiel Borkent

Distributed under the EPL License. See LICENSE.

Clojure-lanterna and Lanterna are distributed under the GNU Lesser General Public License.