Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README.md - github.com/torch/xlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6dd76392390e2abd983f5a642045acf6c1928c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# A set of useful extensions to Lua

[![Build Status](https://travis-ci.org/torch/xlua.svg)](https://travis-ci.org/torch/xlua) 

## Dependencies:
Torch7 (www.torch.ch)

## Install:
```
$ torch-rocks install xlua
```

## Use
```
$ torch -lxlua
xLua > a = 5
xLua > b = 'test'
xLua > xlua.who()

Global Libs:
{[1] = string,
 [2] = package,
 [3] = os,
 [4] = io,
 [5] = xlua,
 [6] = sys,
 [7] = math,
 [8] = debug,
 [9] = table,
 [10] = coroutine}

Global Vars:
{[a] = 5,
 [b] = test}

xLua > xlua.clearall()   -- also calls the garbage collector !
xLua > xlua.who()

Global Libs:
{[1] = string,
 [2] = package,
 [3] = os,
 [4] = io,
 [5] = xlua,
 [6] = sys,
 [7] = math,
 [8] = debug,
 [9] = table,
 [10] = coroutine}

Global Vars:
{}

xLua > print(xlua)
{[clear] = function: 0x10020cd10,
 [clearall] = function: 0x10020ca70,
 [_PACKAGE] = ,
 [progress] = function: 0x10020cda0,
 [print] = function: 0x10020c9d0,
 [_NAME] = xlua,
 [who] = function: 0x10020cd50,
 [_M] = table: 0x10020c990,
 [lua_print] = function: 0x100201900}

xLua > test = {a = 14, b = "test"}
xLua > =test
{[a] = 14,
 [b] = test}
xLua > 
```