racket-rash

The Reckless Racket Shell
授权协议 View license
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 马坚白
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Rash: The Reckless Racket Shell

Rash is a shell language, library, and REPL for Racket.

Use as a repl that is as convenient for pipelining programs as Bash is, but has all the power of Racket. Use as a scripting language with #lang rash. Embed in normal Racket files with (require rash), and mix freely with any other Racket language or library.

Rash is in active development, but it is largely stable (and the parts that aren't are marked as such). I use it as my default interactive shell on my laptop. It currently lacks the interactive polish of Zsh or Fish, but it is so much better as a language. Every script I've ported from a Bourne-related shell to Rash is more robust, simpler, easier to maintain, easier to expand, and much more fun.

Getting started

Prerequisites

Rash does work on windows, but it works better and is more useful on unix based systems.

To install, you will need a working installation of racket v6.12 or later.

Installation

You can either install with racket's built in package manager, raco, or install directly from github. If you have DrRacket installed, you can install rash with File -> Install Package.

via raco:

raco pkg install rash

git version:

git clone https://github.com/willghatch/racket-rash rash && cd rash/linea && raco pkg install && cd ../shell-pipeline && raco pkg install && cd ../rash && raco pkg install

OR

use raco pkg install --clone rash

Readline

The Rash REPL currently relies on Racket's Readline FFI wrapper. However, by default Racket uses libedit instead of libreadline for licensing reasons. Libedit does not support unicode, so typing non-ASCII characters will result in sadness. To use libreadline instead, run raco pkg install readline-gpl. Note that the readline-gpl Racket package needs a libreadline shared library to be installed on your system, so you may need to install a libreadline package using your system package manager. For example, on Debian-based distributions you can install by running sudo apt install --yes libreadline-dev.

Usage

Run with racket -l rash/repl --, or with rash-repl if you have Racket's package bin/ directory on your path.

Online documentation is here. After installation, local documentation can be accessed with raco docs rash.

The project web site has a quick demo video of Rash in action.

I published a paper about Rash in GPCE 2018.

This repo also contains the shell-pipeline and linea packages. They mostly support Rash itself, so they live in the same repo.

Talk

Feel free to ask questions in issues, to join the matrix room, to email me, etc.

 相关资料
  • Racket源自著名的专家型语言PLT Scheme,同时又是Lisp语言的一个分支。它适用于从脚本Script到应用程序开发的任务执行工具,包括图形用户界面,Web服务器等。支持编译器的虚拟机,创建独立的可执行程序的工具,Racket Web服务器,具有丰富而全面的功能库,适用于初学者和专家编程。 Racket可通过创建大量的语法系统来支持和创建新的编程语言,包括Typed Scheme,ACL

  • 本文向大家介绍racket 块注释,包括了racket 块注释的使用技巧和注意事项,需要的朋友参考一下 示例            

  • 本文向大家介绍racket S-expression注释,包括了racket S-expression注释的使用技巧和注意事项,需要的朋友参考一下 示例            

  • 本文向大家介绍racket 你好,世界!,包括了racket 你好,世界!的使用技巧和注意事项,需要的朋友参考一下 示例 以下示例声明要在Racket中编写的一段代码,然后输出字符串Hello, world。 球拍代码可以直接从命令行运行,也可以在DrRacket IDE上运行。racket在命令行上键入将启动REPL,键入racket后跟文件名将评估文件的内容。例如,假设文件hello.rkt包

  • 本文向大家介绍racket 功能定义,包括了racket 功能定义的使用技巧和注意事项,需要的朋友参考一下 示例 可以使用以下lambda表格创建Racket中的函数。该表格包含一个参数列表和一个正文。 在上面的示例中,该函数接受两个参数,并返回将它们相乘的结果。 每当我们想将两个数字相乘时,重新编写函数及其主体都是很麻烦的,所以让我们给它起一个名字。要为其命名,请使用define表格。这会将功能

  • 本文向大家介绍racket 单行注释,包括了racket 单行注释的使用技巧和注意事项,需要的朋友参考一下 示例