#lang racket/base ;; Copyright (c) Neil Van Dyke. See file "info.rkt". (require (for-syntax racket/base racket/syntax) racket/system (planet neil/mcfly)) (doc (section "Introduction") (para "The " "CharTerm" " package provides a Racket interface for character-cell video display terminals on Unix-like systems -- such as for " (as-index "GNU Screen") " and " (as-index (code "tmux")) " sessions on " (index '("cloud server" "server") "cloud servers") ", " (as-index "XTerm") " windows on a workstation desktop, and some older hardware terminals (even the venerable " (as-index "DEC VT100") "). Currently, it implements a subset of features available on most terminals.") (para "This package could be used to implement a status/management console for a Racket-based server process (perhaps run in GNU Screen or " (code "tmux") " on a server machine, to be detached and reattached from SSH sessions), a lightweight user interface for a systems tool, a command-line REPL, a text editor, creative retro uses of old equipment, and, perhaps most importantly, a " ;; (hyperlink "http://en.wikipedia.org/wiki/Rogue_%28computer_game%29" "Rogue-like" ;;) " application.") (para "The " "CharTerm" " package does not include any native code (such as from " (as-index (code "terminfo")) ", " (as-index (code "termcap")) ", " (as-index (code "curses")) ", or " (as-index (code "ncurses")) ") in the Racket process, such as through the Racket FFI or C extensions, so there is less potential for a problem involving native code to threaten the reliability or security of a program. " "CharTerm" " is implemented in pure Racket code except for executing " (code "/bin/stty") " for some purposes. Specifically, " (code "/bin/stty") " at startup time and shutdown time, to set modes, and (for terminal types that don't seem to support a screen size report control sequence) when getting screen size. Besides security and stability, lower dependence on native code might also simplify porting to host platforms that don't have those native code facilities.")) (doc (subsection "Demo") (para "For a demonstration, the following command, run from a terminal, should install the " "CharTerm" " package (if not already installed), and run the demo:") (commandline "racket -pm neil/charterm/demo") (para "This demo reports what keys you pressed, while letting you edit a text field, and while displaying a clock. The clock is updated roughly once per second, and is not updated during heavy keyboard input, such as when typing fast. The demo responds to changing terminal sizes, such as when an XTerm is window is resized. It also displays the determined terminal size, and some small tests of the " (racket #:width) " argument to " (racket charterm-display) ". Exit the demo by pressing the " (bold "Esc") " key.") (para "Note: Although this demo includes an editable text field, as proof of concept, the current version of " "CharTerm" " does not provide editable text fields as reusable functionality.")) (doc (subsection "Simple
package pOne;
public class ClassOne {
protected int variableOne = 10;
public void methodOne() {
System.out.println("From methodOne in ClassOne");
}
}