repl.lisp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. (in-package :stumpwm)
  2. (defcommand repl-groovy () ()
  3. (term-shell-command "groovysh" :scrollbar t))
  4. (defcommand repl-kotlin () ()
  5. (term-shell-command "nix-shell -p kotlin --run 'kotlinc-jvm'" :scrollbar t))
  6. (defcommand repl-guile () ()
  7. (term-shell-command "guile" :scrollbar t))
  8. (defcommand repl-guix () ()
  9. (term-shell-command "guix repl" :scrollbar t))
  10. (defcommand repl-gdb () ()
  11. (term-shell-command "gdb" :scrollbar t :title "repl-gdb"))
  12. (defcommand repl-perl () ()
  13. (term-shell-command "re.pl" :scrollbar t :title "repl-perl"))
  14. (defcommand repl-php () ()
  15. (term-shell-command "php -a" :scrollbar t :title "repl-php"))
  16. (defcommand repl-python () ()
  17. (term-shell-command "python3" :scrollbar t :title "repl-python"))
  18. (defcommand repl-r () ()
  19. (term-shell-command "R" :scrollbar t :title "repl-r"))
  20. (defcommand repl-racket () ()
  21. (term-shell-command "racket" :scrollbar t :title "repl-racket"))
  22. (defcommand repl-nix () ()
  23. (term-shell-command "nix repl" :scrollbar t :title "repl-nix"))
  24. (defcommand repl-nix-20-03 () ()
  25. (term-shell-command "nix repl /home/oleg/.nix-defexpr/channels/nixos-20-03"
  26. :scrollbar t :title "repl-nix-20-03"))
  27. (defcommand repl-nix-unstable () ()
  28. (term-shell-command "nix repl /home/oleg/.nix-defexpr/channels/nixos-unstable"
  29. :scrollbar t :title "repl-nix-unstable"))
  30. (defcommand repl-emacs () ()
  31. (term-shell-command "emacs -nw -q -e 'ielm'" :scrollbar t :title "repl-emacs"))
  32. (defcommand repl-kawa () ()
  33. (term-shell-command "guix environment --ad-hoc coreutils openjdk kawa rlwrap -- rlwrap kawa" :scrollbar t :title "repl-kawa"))
  34. (defcommand repl-ocaml () ()
  35. (term-shell-command "guix environment --pure --ad-hoc ocaml -- ocaml" :scrollbar t :title "repl-ocaml"))
  36. (defcommand repl-octave () ()
  37. (term-shell-command "octave" :scrollbar t :title "repl-octave"))
  38. (defcommand repl-node () ()
  39. (term-shell-command "node" :scrollbar t :title "repl-node"))
  40. (defcommand repl-sbcl () ()
  41. (term-shell-command "rlwrap sbcl" :scrollbar t :title "repl-sbcl"))
  42. (defcommand repl-chez-scheme () ()
  43. (term-shell-command "guix environment --ad-hoc chez-scheme -- chez-scheme" :scrollbar t :title "repl-chez-scheme"))
  44. (defcommand repl-chicken () ()
  45. (term-shell-command "rlwrap csi" :scrollbar t :title "repl-chicken"))
  46. (defcommand repl-c () ()
  47. (term-shell-command "docker run --rm -it bic:latest" :scrollbar t :title "repl-c"))
  48. (defcommand repl-hy () ()
  49. (term-shell-command "docker run --rm -it hylang:python3.5-buster" :scrollbar t :title "repl-hy"))
  50. (defcommand repl-java () ()
  51. (term-shell-command "docker run --rm -it openjdk:9" :scrollbar t :title "repl-java"))
  52. (defcommand repl-elm () ()
  53. (term-shell-command "guix environment --pure --ad-hoc elm-compiler node -- elm repl"
  54. :scrollbar t :title "repl-elm"))
  55. (defcommand repl-clisp () ()
  56. (term-shell-command "guix environment --pure --ad-hoc clisp -- clisp"
  57. :scrollbar t :title "repl-clisp"))
  58. (defcommand repl-erlang () ()
  59. (term-shell-command "guix environment --pure --ad-hoc erlang -- erl"
  60. :scrollbar t :title "repl-erlang"))
  61. (defcommand repl-lua () ()
  62. (term-shell-command "guix environment --pure --ad-hoc lua -- lua"
  63. :scrollbar t :title "repl-lua"))
  64. (defcommand repl-ghci () ()
  65. (term-shell-command "ghci" :scrollbar t :title "repl-ghci"))
  66. (defcommand repl-go () ()
  67. (term-shell-command "gomacro" :scrollbar t :title "repl-go"))
  68. (defcommand repl-resty () ()
  69. (term-shell-command (format nil (join '("docker" "run" "--entrypoint"
  70. "''" "--rm" "-it"
  71. "openresty/openresty:bionic" "bash" "-c" "~s"))
  72. (join '("apt update" "apt install -y git"
  73. "luarocks install lua-resty-repl"
  74. "resty-repl")
  75. #\;))
  76. :scrollbar t :title "repl-java"))
  77. (defcommand repl-ruby () ()
  78. (term-shell-command "guix environment --pure --ad-hoc ruby -- irb"
  79. :scrollbar t :title "repl-ruby"))
  80. (defcommand repl-bash-pure () ()
  81. (term-shell-command "env -i \"$(command -v bash)\" --login --noprofile --norc"
  82. :scrollbar t :title "repl-bash-pure"))
  83. (defcommand repl-ansible (group) ((:string "Ansible inventory group: "))
  84. (term-shell-command (format nil "ansible-console ~a" group)
  85. :scrollbar t :title "repl-ansible" :color 'dark))