~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/tinyscheme/Manual.txt

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
 
3
 
                       TinySCHEME Version 1.38
 
3
                       TinySCHEME Version 1.40
4
4
 
5
5
                    "Safe if used as prescribed"
6
6
                    -- Philip K. Dick, "Ubik"
7
7
 
8
8
This software is open source, covered by a BSD-style license.
9
 
Please read accompanying file COPYING.                                   
 
9
Please read accompanying file COPYING.
10
10
-------------------------------------------------------------------------------
11
11
 
12
12
     This Scheme interpreter is based on MiniSCHEME version 0.85k4
31
31
     coexist in the same program, without any interference between them.
32
32
     Programmatically, foreign functions in C can be added and values
33
33
     can be defined in the Scheme environment. Being a quite small program,
34
 
     it is easy to comprehend, get to grips with, and use. 
 
34
     it is easy to comprehend, get to grips with, and use.
35
35
 
36
36
     Known bugs
37
37
     ----------
47
47
 
48
48
     Maybe (a subset of) SLIB will work with TinySCHEME...
49
49
 
50
 
     Decent debugging facilities are missing. Only tracing is supported 
 
50
     Decent debugging facilities are missing. Only tracing is supported
51
51
     natively.
52
52
 
53
53
 
158
158
     14      #\so              31       #\us
159
159
     15      #\si
160
160
     16      #\dle             127      #\del           
161
 
     
 
161
 
162
162
     Numeric literals support #x #o #b and #d. Flonums are currently read only
163
163
     in decimal notation. Full grammar will be supported soon.
164
164
 
180
180
     Also open-input-output-file, set-input-port, set-output-port (not R5RS)
181
181
     Library: call-with-input-file, call-with-output-file,
182
182
     with-input-from-file, with-output-from-file and
183
 
     with-input-output-from-to-files, close-port and input-output-port? 
 
183
     with-input-output-from-to-files, close-port and input-output-port?
184
184
     (not R5RS).
185
 
     String Ports: open-input-string, open-output-string,
 
185
     String Ports: open-input-string, open-output-string, get-output-string,
186
186
     open-input-output-string. Strings can be used with I/O routines.
187
187
 
188
188
          Vectors
227
227
 
228
228
          Dynamically-loaded extensions
229
229
     (load-extension <filename without extension>)
230
 
     Loads a DLL declaring foreign procedures.          
231
 
     
 
230
     Loads a DLL declaring foreign procedures. On Unix/Linux, one can make use
 
231
     of the ld.so.conf file or the LD_RUN_PATH system variable in order to place
 
232
     the library in a directory other than the current one. Please refer to the
 
233
     appropriate 'man' page.
 
234
 
232
235
          Esoteric procedures
233
236
     (oblist)
234
237
     Returns the oblist, an immutable list of all the symbols.
253
256
     Makes a new closure in the given environment.
254
257
 
255
258
          Obsolete procedures
256
 
     (print-width <object>)          
257
 
     
 
259
     (print-width <object>)
 
260
 
258
261
     Programmer's Reference
259
262
     ----------------------
260
263
 
261
264
     The interpreter state is initialized with "scheme_init".
262
265
     Custom memory allocation routines can be installed with an alternate
263
 
     initialization function: "scheme_init_custom_alloc". 
 
266
     initialization function: "scheme_init_custom_alloc".
264
267
     Files can be loaded with "scheme_load_file". Strings containing Scheme
265
 
     code can be loaded with "scheme_load_string". It is a good idea to 
 
268
     code can be loaded with "scheme_load_string". It is a good idea to
266
269
     "scheme_load" init.scm before anything else.
267
270
 
268
271
     External data for keeping external state (of use to foreign functions)
269
272
     can be installed with "scheme_set_external_data".
270
 
     Foreign functions are installed with "assign_foreign". Additional 
271
 
     definitions can be added to the interpreter state, with "scheme_define" 
272
 
     (this is the way HTTP header data and HTML form data are passed to the 
 
273
     Foreign functions are installed with "assign_foreign". Additional
 
274
     definitions can be added to the interpreter state, with "scheme_define"
 
275
     (this is the way HTTP header data and HTML form data are passed to the
273
276
     Scheme script in the Altera SQL Server). If you wish to define the
274
277
     foreign function in a specific environment (to enhance modularity),
275
278
     use "assign_foreign_env".
292
295
     established standard, this library is supposed to be installed in
293
296
     a directory mirroring its name under the TinyScheme location.
294
297
 
295
 
     
 
298
 
296
299
     Foreign Functions
297
300
     -----------------
298
301
 
309
312
           return sc->NIL;
310
313
          }
311
314
 
312
 
   Foreign functions are now defined as closures: 
 
315
   Foreign functions are now defined as closures:
313
316
 
314
 
   sc->interface->scheme_define( 
315
 
        sc, 
316
 
        sc->global_env, 
317
 
        sc->interface->mk_symbol(sc,"square"), 
318
 
        sc->interface->mk_foreign_func(sc, square)); 
 
317
   sc->interface->scheme_define(
 
318
        sc,
 
319
        sc->global_env,
 
320
        sc->interface->mk_symbol(sc,"square"),
 
321
        sc->interface->mk_foreign_func(sc, square));
319
322
 
320
323
 
321
324
     Foreign functions can use the external data in the "scheme" struct
330
333
     Standalone
331
334
     ----------
332
335
 
333
 
     Usage: tinyscheme -? 
334
 
     or:    tinyscheme [<file1> <file2> ...] 
 
336
     Usage: tinyscheme -?
 
337
     or:    tinyscheme [<file1> <file2> ...]
335
338
     followed by
336
339
               -1 <file> [<arg1> <arg2> ...]
337
340
               -c <Scheme commands> [<arg1> <arg2> ...]