-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDEVELOP
84 lines (55 loc) · 3.31 KB
/
DEVELOP
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
A Simple Affair
You shall require:
C programming environment: GNU: GCC, Make and [BSD] pkgconf (or handhacking:upstream-welcome)
Bash Shell - because sh gives birth to all shells. [or every shell is bourne in sh ;) ]
curl - Web Download utility for access to DynCall.org FFI Archive (if this
package is not local).
Git - Revision Control System (if this package file is not local)
WebKitGTK 4.0 - JavascriptCore and WebKit HTML Engine (for html ui development).
tar/gzip - archiving utilities
To Begin:
navigate to your c project directory and type:
git clone https://github.com/hypersoft/jse.git
cd jse;
make;
sudo make install;
And you should be up and running. You must always sudo make install your changes to
the software, to make updates available to the operating system.
To Do:
Read) plugin/*.c, share/core.js, share/template/classPlugin.c share/doc/dyncal-0.8.pdf,
src/JseFunctions.c
knowledge of the dyncall call format symbols will help you decipher some of the
internal call API.
share/core.js contains the implementation of the MachineType interface and the
plugin/* classes provide library access to the scripts. This is the recommended
engineering method for production-level library-interfacing, but there is no
requirement that you cannot call a function, create buffers from arrays,
transform buffers to JavaScript arrays and other memory operations,
with a variable typing system which provides declare once type definition for
c library interfacing.
plugins will be made available to GHTML and JSE once installed to a plugin path.
there are several default plugin paths defined within the code, for global,
and user scope plugins. all jse features are available in ghtml. you can
use ghtml to create beautiful apps based on web technology, at the same time,
have full forward function call acces to your system libraries and commands.
the webkit platorm has a built in script debugger. the web inspector can be
used to debug shell scripts, web scripts, and design html pages with wysiwyg
support. But keep in mind, doing advanced things as mentioned here depends on your,
level of knowledge and ingenuity. If you know of something you should be able to do,
but it can't be done for some reason, please file that as an issue!
Hack on something, write a tutorial, ask a question (as an issue on github),
or simply enjoy your new unix coding shell kits!
You might see strange array syntax. Its not strange just unfamiliar usage.
For example to create a buffer:
var a = [1, 2, 3, 4].toBufer(TYPE[, MAX]);
creates a buffer of TYPE with MAX or ([? ... ?]).length whichever is smallest.
to cast a value (or Address instance):
Int8.value(a[2]);
returns the value of (a[2]) cast as an Int8, suitable for
passing as a parameter to a shared function requiring the Int8 type as a parameter.
Declaring functions is a snap:
libc = new SharedLibrary("libc.so.6") // get lib
puts = new SharedFunction(libc, Int32, "puts", Pointer);
// now call that bad baby:
puts("Wow dude!");
see: SCRIPTING for more on SCRIPTING.