Changeset 35324 in project
- Timestamp:
- 03/22/18 22:08:31 (11 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
wiki/man/5/Getting started
r35322 r35324 1 1 [[tags: manual]] 2 3 XXX4 * R7RS compliance?5 * Do we need to document units here?6 * Update example output7 XXX8 2 9 3 == Getting started … … 51 45 less ambitious than R6RS and more minimal. 52 46 53 CHICKEN fully complies with R5RS and mostly with the "R7RS small"54 language.47 CHICKEN fully complies with R5RS and, by using a separately available 48 extension also with the "R7RS small" language. 55 49 56 50 Even though Scheme is consciously minimalist, it is recognized that a … … 86 80 CHICKEN includes 87 81 88 * a Scheme interpreter that supports al most all of R7RS Scheme, with82 * a Scheme interpreter that supports all of R5(7)RS Scheme, with 89 83 only a few relatively minor omissions, and with many extensions 90 84 * a compatible compiler whose target is C, thus making porting to new … … 246 240 247 241 $ csi 248 249 242 CHICKEN 250 (c) 2008-2016, The CHICKEN Team 251 (c) 2000-2007, Felix L. Winkelmann 252 Version 4.11.0 (rev ce980c4) 253 linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] 254 compiled 2016-05-28 on yves.more-magic.net (Linux) 255 243 (c) 2008-2018, The CHICKEN Team 244 (c) 2000-2007, Felix L. Winkelmann 245 Version 5.0.0 (rev 6653dce) 246 linux-unix-gnu-x86-64 [ 64bit dload ptables ] 247 256 248 #;1> 257 249 … … 305 297 306 298 <enscript highlight=scheme> 307 308 299 ;; irregex, the regular expression library, is one of the 309 300 ;; libraries included with CHICKEN. … … 386 377 387 378 <enscript highlight=scheme> 379 (import (chicken process-context)) ; for "command-line-arguments" 380 388 381 (define (palindrome? x) 389 382 (define (check left right) … … 393 386 (check (add1 left) (sub1 right))))) 394 387 (check 0 (sub1 (string-length x)))) 388 395 389 (let ((arg (car (command-line-arguments)))) 396 390 (display … … 423 417 ;;; Library pal-proc.scm 424 418 (declare (unit pal-proc)) 419 425 420 (define (palindrome? x) 426 421 (define (check left right) … … 438 433 ;;; Client pal-user.scm 439 434 (declare (uses pal-proc)) 435 436 (import (chicken process-context)) 437 440 438 (let ((arg (car (command-line-arguments)))) 441 439 (display … … 456 454 level is a palindrome 457 455 456 The "unit" mechanism is relatively low-level and requires some 457 familiarity with underlying mechanism used to manage compilation 458 units. See [[Units and linking model]] for more information. 459 458 460 === Installing an egg 459 461 … … 465 467 466 468 In this example, we install the {{uri-common}} egg, for parsing 467 Uniform Resource Identifiers. The installation produces a lot of 468 output, which we have edited for space. 469 Uniform Resource Identifiers. 469 470 470 471 $ chicken-install uri-common 471 472 472 retrieving ...473 resolving alias `kitten-technologies' to: http://chicken.kitten-technologies.co.uk/henrietta.cgi474 connecting to host "chicken.kitten-technologies.co.uk", port 80 ...475 requesting "/henrietta.cgi?name=uri-common&mode=default" ...476 reading response ...477 [...]478 /usr/bin/csc -feature compiling-extension -setup-mode -s -O2 uri-common.scm -j uri-common479 /usr/bin/csc -feature compiling-extension -setup-mode -s -O2 uri-common.import.scm480 cp -r uri-common.so /usr/lib/chicken/5/uri-common.so481 chmod a+r /usr/lib/chicken/5/uri-common.so482 cp -r uri-common.import.so /usr/lib/chicken/5/uri-common.import.so483 chmod a+r /usr/lib/chicken/5/uri-common.import.so484 chmod a+r /usr/lib/chicken/5/uri-common.setup-info485 486 473 {{chicken-install}} connects to a mirror of the egg repository and 487 474 retrieves the egg contents. If the egg has any uninstalled … … 493 480 494 481 #;1> (import uri-common) 495 ; loading /usr/lib/chicken/ 5/uri-common.import.so ...482 ; loading /usr/lib/chicken/9/uri-common.import.so ... 496 483 ; [... other loaded files omitted for clarity ...] 497 484 … … 529 516 530 517 ;;; fib-user.scm 518 (import (chicken format)) 519 531 520 #> 532 521 extern int fib(int n);
Note: See TracChangeset
for help on using the changeset viewer.