diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-03-16 23:27:49 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-03-16 23:27:49 +0300 |
commit | 34f9adcdd3d405cf76d5e0db9ae73409570f9b97 (patch) | |
tree | 3ac64877d0d77c994cb0c26b9a1108fcd963a27e | |
parent | 6eb66884bdb5416cf6ae3675a1c4a3ebac2f8758 (diff) | |
parent | ca6ff5058a53fb8673a0cb5cc6131d6961ab60c2 (diff) |
Merge pull request #17 from Atcold/better-help
Better help
-rw-r--r-- | init.lua | 41 | ||||
-rw-r--r-- | th | 20 |
2 files changed, 41 insertions, 20 deletions
@@ -46,25 +46,46 @@ local selfhelp = [[ Tab-completion on nested namespaces Tab-completion on disk files (when opening a string) - History + History stored in: + + ]]..col.magenta("_RESULTS")..[[ + ]]..col.magenta("_LAST")..[[ + Pretty print (table introspection and coloring) - Auto-print after eval (can be stopped with ;) + Auto-print after eval (no need for '='), can be stopped with ]]..col.magenta(";")..[[ Each command is profiled, timing is reported - No need for '=' to print Easy help on functions/packages: - ]]..col.magenta("? torch.randn")..[[ + + ]]..col.magenta("? torch.randn")..[[ + + Documentation browsable with: + + ]]..col.magenta("browse()")..[[ + ]]..col.magenta("browse(package)")..[[ + Shell commands with: - ]]..col.magenta("$ ls -l")..[[ + + ]]..col.magenta("$ ls -l")..[[ + Print all user globals with: - ]]..col.magenta("who()")..[[ + + ]]..col.magenta("who()")..[[ + Import a package's symbols globally with: - ]]..col.magenta("import 'torch' ")..[[ + + ]]..col.magenta("import 'torch'")..[[ + Require is overloaded to provide relative (form within a file) search paths: - ]]..col.magenta("require './local/lib' ")..[[ + + ]]..col.magenta("require './local/lib' ")..[[ + Optional strict global namespace monitoring: - ]]..col.magenta('th -g')..[[ + + ]]..col.magenta('th -g')..[[ + Optional async repl (based on https://github.com/clementfarabet/async): - ]]..col.magenta('th -a')..[[ + + ]]..col.magenta('th -a')..[[ ]] -- If no Torch: @@ -139,11 +139,11 @@ if asyncrepl then print( [[ - ______ __ ]]..col.Black[[| Torch7 ]]..[[ - /_ __/__ ________/ / ]]..col.Black[[| ]]..col.magenta[[Scientific computing for Lua. ]]..[[ - / / / _ \/ __/ __/ _ \ ]]..col.Black[[| ]]..[[ - /_/ \___/_/ \__/_//_/ ]]..col.Black[[| ]]..col.blue[[https://github.com/torch ]]..[[ - ]]..col.Black[[| ]]..col.blue[[http://torch.ch ]]..[[ + ______ __ ]]..col.Black[[| Torch7 ]]..[[ + /_ __/__ ________/ / ]]..col.Black[[| ]]..col.magenta[[Scientific computing for Lua.]]..[[ + / / / _ \/ __/ __/ _ \ ]]..col.Black[[| Type ? for help ]]..[[ + /_/ \___/_/ \__/_//_/ ]]..col.Black[[| ]]..col.blue[[https://github.com/torch ]]..[[ + ]]..col.Black[[| ]]..col.blue[[http://torch.ch ]]..[[ ]] .. col.red('WARNING: ') .. col.Black('you are running an experimental asynchronous interpreter for Torch.') .. [[ ]] .. col.Black('Note 1: It has no support for readline/completion yet.') .. [[ @@ -165,11 +165,11 @@ else print( [[ - ______ __ ]]..col.Black[[| Torch7 ]]..[[ - /_ __/__ ________/ / ]]..col.Black[[| ]]..col.magenta[[Scientific computing for Lua. ]]..[[ - / / / _ \/ __/ __/ _ \ ]]..col.Black[[| ]]..[[ - /_/ \___/_/ \__/_//_/ ]]..col.Black[[| ]]..col.blue[[https://github.com/torch ]]..[[ - ]]..col.Black[[| ]]..col.blue[[http://torch.ch ]]..[[ + ______ __ ]]..col.Black[[| Torch7 ]]..[[ + /_ __/__ ________/ / ]]..col.Black[[| ]]..col.magenta[[Scientific computing for Lua.]]..[[ + / / / _ \/ __/ __/ _ \ ]]..col.Black[[| Type ? for help ]]..[[ + /_/ \___/_/ \__/_//_/ ]]..col.Black[[| ]]..col.blue[[https://github.com/torch ]]..[[ + ]]..col.Black[[| ]]..col.blue[[http://torch.ch ]]..[[ ]] ) |