pleac-commits Mailing List for PLEAC
Status: Alpha
Brought to you by:
ggc
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(94) |
Sep
(12) |
Oct
(9) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(3) |
Feb
(1) |
Mar
(4) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(1) |
Aug
|
Sep
(8) |
Oct
(2) |
Nov
(2) |
Dec
|
| 2003 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
|
May
(1) |
Jun
(8) |
Jul
(13) |
Aug
(9) |
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(2) |
| 2004 |
Jan
(10) |
Feb
(6) |
Mar
(10) |
Apr
(10) |
May
(10) |
Jun
(4) |
Jul
(1) |
Aug
(11) |
Sep
(21) |
Oct
(16) |
Nov
(12) |
Dec
(17) |
| 2005 |
Jan
(113) |
Feb
(15) |
Mar
(4) |
Apr
(2) |
May
(4) |
Jun
(52) |
Jul
(11) |
Aug
(5) |
Sep
(21) |
Oct
(24) |
Nov
(7) |
Dec
|
| 2006 |
Jan
(5) |
Feb
(3) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(23) |
| 2007 |
Jan
(16) |
Feb
(3) |
Mar
(4) |
Apr
(19) |
May
(12) |
Jun
(4) |
Jul
(10) |
Aug
(11) |
Sep
(5) |
Oct
(21) |
Nov
(6) |
Dec
(13) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(19) |
Apr
(10) |
May
(7) |
Jun
(15) |
Jul
(30) |
Aug
(28) |
Sep
(10) |
Oct
(42) |
Nov
(41) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2010 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2011 |
Jan
(19) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Leonid G. <vab...@gm...> - 2011-01-27 17:01:45
|
Hi, everyone! I would like to contribute to the project. I attached my solutions of two small problems. If I'm doing anything wrong, please tell me. : ) Best wishes, Leo |
|
From: Guillaume C. <gg...@us...> - 2011-01-12 16:23:41
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26184 Modified Files: pleac_bash.data Log Message: improve bash array iteration thanks bibi Index: pleac_bash.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_bash.data,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pleac_bash.data 12 Jan 2011 09:28:54 -0000 1.1 +++ pleac_bash.data 12 Jan 2011 16:23:31 -0000 1.2 @@ -22,7 +22,7 @@ # @@PLEAC@@_4.4 -for index in $(seq 0 $((${#list[@]}-1))); do - echo ${list[$index]} +for element in "${list[@]}"; do + echo $element done # @@INCOMPLETE@@ |
|
From: Guillaume C. <gg...@us...> - 2011-01-12 09:29:03
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2037 Modified Files: .cvsignore Makefile Added Files: pleac_bash.data Log Message: add some array-related bash (not much fun out of it though) --- NEW FILE: pleac_bash.data --- # -*- sh -*- # @@PLEAC@@_NAME # @@SKIP@@ Bash # @@PLEAC@@_WEB # @@SKIP@@ http://tiswww.case.edu/php/chet/bash/bashtop.html # @@PLEAC@@_4.0 # declaring an array declare -a ary # declaring + defining single_level = ( this that the other ) # @@INCOMPLETE@@ # @@PLEAC@@_4.1 # pushing at the end of an array ary[${#ary[@]}]=whatever # @@INCOMPLETE@@ # @@PLEAC@@_4.4 for index in $(seq 0 $((${#list[@]}-1))); do echo ${list[$index]} done # @@INCOMPLETE@@ Index: .cvsignore =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/.cvsignore,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- .cvsignore 2 Jul 2010 11:30:19 -0000 1.19 +++ .cvsignore 12 Jan 2011 09:28:54 -0000 1.20 @@ -53,7 +53,13 @@ pleac_groovy pleac_objective-c.html pleac_objective-c -skeleton -tmp.data pleac_rexx.html pleac_rexx +pleac_picolisp.html +pleac_picolisp +pleac_go.html +pleac_go +pleac_bash.html +pleac_bash +skeleton +tmp.data Index: Makefile =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/Makefile,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Makefile 8 Jan 2011 13:58:10 -0000 1.71 +++ Makefile 12 Jan 2011 09:28:54 -0000 1.72 @@ -19,7 +19,7 @@ #***************************************************************************** # IMPLS must be sorted by percentage of completion -IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd picolisp ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go +IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd picolisp ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd bash nasm go DATAFILES = $(wildcard pleac_*.data) |
|
From: Guillaume C. <gg...@us...> - 2011-01-08 13:58:20
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5496 Modified Files: Makefile pleac_picolisp.data Log Message: more picolisp by alexander burger Index: Makefile =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/Makefile,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- Makefile 2 Jan 2011 14:30:14 -0000 1.70 +++ Makefile 8 Jan 2011 13:58:10 -0000 1.71 @@ -19,7 +19,7 @@ #***************************************************************************** # IMPLS must be sorted by percentage of completion -IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java picolisp cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go +IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd picolisp ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go DATAFILES = $(wildcard pleac_*.data) Index: pleac_picolisp.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_picolisp.data,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- pleac_picolisp.data 2 Jan 2011 21:22:14 -0000 1.3 +++ pleac_picolisp.data 8 Jan 2011 13:58:10 -0000 1.4 @@ -983,3 +983,866 @@ mo-p00-ob.rzone.de post.strato.de 15:44:39 2010/12/31 00:00:05 post.strato.de localhost 15:46:09 2010/12/31 00:01:30 #----------------------------- + +# @@PLEAC@@_4.0 +# PicoLisp doesn't support arrays as contiguous pieces of memory. +# Instead, the standard Lisp linked lists are used. +#----------------------------- +(setq Nested '(this that the other)) +(setq Nested '(this that (the other))) +#----------------------------- +(setq Tune '("The" "Star-Spangled" "Banner")) +#----------------------------- + +# @@PLEAC@@_4.1 +#----------------------------- +(setq A '("quick" "brown" "fox")) +#----------------------------- +(setq A '(Why are you teasing me?)) +#----------------------------- +: (setq Lines (make (char) (while (line T) (link @)))) +The boy stood on the burning deck, +It was as hot as glass. + +-> ("The boy stood on the burning deck," "It was as hot as glass.") +#----------------------------- +(setq Bigarray + (in "mydatafile" + (make + (until (eof) + (link (line T)) ) ) ) ) +#----------------------------- +(setq + PerlHost "www.perl.com" + HostInfo (in (list 'nslookup PerlHost) (till NIL T)) ) +#----------------------------- +: (split (chop "Costs only $4.95") " ") +-> (("C" "o" "s" "t" "s") ("o" "n" "l" "y") ("$" "4" "." "9" "5")) + +: (mapcar pack (split (chop "Costs only $4.95") " ")) +-> ("Costs" "only" "$4.95") +#----------------------------- +(setq Ships '("Niña" "Pinta" "Santa MarÃa")) +#----------------------------- + +# @@PLEAC@@_4.2 +#----------------------------- +: (pack "The " (glue ", " '(big brown dirty hungry)) " fox") +-> "The big, brown, dirty, hungry fox" +#----------------------------- +(setq Array '(red yellow green)) + +: (prinl "I have " Array " marbles.") +I have redyellowgreen marbles. + +: (prinl "I have " (glue " " Array) " marbles.") +I have red yellow green marbles. +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch04/commify_series +#----------------------------- +The list is: just one thing. +The list is: Mutt and Jeff. +The list is: Peter, Paul, and Mary. +The list is: To our parents, Mother Theresa, and God. +The list is: pastrami, ham and cheese, peanut butter and jelly, and tuna. +The list is: recycle tired, old phrases and ponder big, happy thoughts. +The list is: recycle tired, old phrases; ponder big, happy thoughts; and sleep and dream peacefully. +#----------------------------- + +# @@PLEAC@@_4.3 +#----------------------------- +(de whatAboutThatArray () + (prinl "The array now has " (length People) " elements.") + (prinl "Element #4 is `" (get People 4) "'.") ) + +(de People + Crosby Stills Nash Young ) + +: (whatAboutThatArray) +The array now has 4 elements. +Element #4 is `Young'. +#----------------------------- +(con (tail 2 People)) + +: (whatAboutThatArray) +The array now has 3 elements. +Element #4 is `'. +#----------------------------- +(setq People (need -10000 People)) + +: (whatAboutThatArray) +The array now has 10000 elements. +Element #4 is `'. +#----------------------------- + +# @@PLEAC@@_4.4 +#----------------------------- +(for Item List + (doSomething Item) ) +#----------------------------- +(for User BadUsers + (complain User) ) +#----------------------------- +(for User AllUsers + (let DiskSpace (getUsage User) + (when (> DiskSpace MAX_QUOTA) + (complain User) ) ) ) +#----------------------------- +(in '(who) + (while (line T) + (and (sub? "tchrist" @) (prinl @)) ) ) +#----------------------------- +(until (eof) + (prinl (glue " " (flip (split (line) " ")))) ) +#----------------------------- +(for Item Array + (prinl "i = " Item) ) +#----------------------------- +(setq Array (1 2 3)) +(map dec Array) + +: Array +-> (0 1 2) +#----------------------------- + +# @@PLEAC@@_4.5 +#----------------------------- +# iterate over elements of list in $ARRAYREF +(map + '((L) + (foo (car L)) # Do something with the element + (set L) ) # Modify an element (destructively) + List ) + +(for I (length List) + (doSomethingWith (get List I)) ) +#----------------------------- +(setq + Fruits '(Apple Blackberry) + FruitRef 'Fruits ) + +: (for Fruit (val FruitRef) + (prinl Fruit " tastes good in a pie.") ) +Apple tastes good in a pie. +Blackberry tastes good in a pie. +#----------------------------- + +# @@PLEAC@@_4.6 +#----------------------------- +: (let Uniq NIL + (for Item '(a b c b c d c d e d e f) + (unless (memq Item Uniq) + (push 'Uniq Item) ) ) + Uniq ) +-> (f e d c b a) +#----------------------------- +: (let Seen NIL + (for Item '(a b c b c d c d e d e f) + (accu 'Seen Item 1) ) + Seen ) +-> ((f . 1) (e . 2) (d . 3) (c . 3) (b . 2) (a . 1)) +#----------------------------- +: (uniq '(a b c b c d c d e d e f)) +-> (a b c d e f) +#----------------------------- +# generate a list of users logged in, removing duplicates +: (in '(who) + (uniq + (make + (while (split (line) " ") + (link (pack (car @))) ) ) ) ) +-> ("tim" "abu" "ben") +#----------------------------- +: (println 'Users 'logged 'in: (sort @)) +Users logged in: ("abu" "ben" "tim") +#----------------------------- + +# @@PLEAC@@_4.7 +#----------------------------- +# find only elements in A and not in B +: (sect '(a b c d e f) '(a c f h)) +-> (a c f) +#----------------------------- +# Using symbol values +: (setq key1 1 key2 2) +-> 2 +: key1 +-> 1 +: key2 +-> 2 +#----------------------------- +# Using properties +: (put 'Hash 'key1 1) +-> 1 +: (put 'Hash 'key2 2) +-> 2 +: (get 'Hash 'key1) +-> 1 +#----------------------------- +# Using association lists +: (de Hash (key1 . 1) (key2 . 2)) +-> Hash +: (assoc 'key1 Hash) +-> (key1 . 1) +: (asoq 'key1 Hash) +-> (key1 . 1) +: (get Hash 'key1) +-> 1 +#----------------------------- +# Using index tree +: (idx 'Hash '(key1 . 1) T) +-> NIL +: (idx 'Hash '(key2 . 2) T) +-> NIL +: (lup Hash 'key1) +-> (key1 . 1) +#----------------------------- + +# @@PLEAC@@_4.8 +#----------------------------- +(setq + A (1 3 5 6 7 8) + B (2 3 5 7 9) ) +#----------------------------- +# Union +: (uniq (append A B)) +-> (1 3 5 6 7 8 2 9) +#----------------------------- +# Intersection +: (sect A B) +-> (3 5 7) +#----------------------------- +# Difference +: (diff A B) +-> (1 6 8) +#----------------------------- + +# @@PLEAC@@_4.9 +#----------------------------- +(setq + Members '(Time Flies) + Initiates '(An Arrow) ) +#----------------------------- +: (append Members Initiates) # Non-destructive +-> (Time Flies An Arrow) +#----------------------------- +: (conc Members Initiates) # Destructive +-> (Time Flies An Arrow) +# 'Members' is now (Time Flies An Arrow) +#----------------------------- +: (insert 3 Members 'Like) # Non-destructive +-> (Time Flies Like An Arrow) +#----------------------------- +: (set Members 'Fruit) # Destructive +-> Fruit +: (set (tail 1 Members) 'Banana) +-> Banana +: Members +-> (Fruit Flies An Banana) +#----------------------------- + +# @@PLEAC@@_4.10 +#----------------------------- +(reverse List) # Non-destructive +#----------------------------- +(flip List) # Destructive +#----------------------------- +: (sort (2 8 3 7 5 9 6)) +-> (2 3 5 6 7 8 9) +: (by - sort (2 8 3 7 5 9 6)) +-> (9 8 7 6 5 3 2) +#----------------------------- +: (flip (sort '(a 3 1 (1 2 3) d b 4 T NIL (a b c) (x y z) c 2))) +-> (T (x y z) (a b c) (1 2 3) d c b a 4 3 2 1 NIL) +#----------------------------- + +# @@PLEAC@@_4.11 +#----------------------------- +# remove N elements from front of List +: (setq List '(a b c d e f g)) +-> (a b c d e f g) +: (cut 3 'List) +-> (a b c) +: List +-> (d e f g) +#----------------------------- +# remove N elements from end of List +: (setq List '(a b c d e f g)) +-> (a b c d e f g) +: (tail 3 List) +-> (e f g) +: (con (nth List 4)) +-> NIL +: List +-> (a b c d) +#----------------------------- +(setq + Friends '(Peter Paul Mary Jim Tim) + This (pop 'Friends) + Thas (pop 'Friends) ) + +: This +-> Peter +: That +-> NIL +: Friends +-> (Mary Jim Tim) +#----------------------------- +(setq + Beverages '(Dew Jolt Cola Sprite Fresca) + Pair (tail 2 Beverages) + Beverages (head 3 Beverages) ) + +: Pair +-> (Sprite Fresca) +: Beverages +-> (Dew Jolt Cola) +#----------------------------- + +# @@PLEAC@@_4.12 +#----------------------------- +(with + (find + '((This) (== 'engineer (: category))) + Employees ) + (prinl "Highest paid engineer is: " (: name)) ) +#----------------------------- + +# @@PLEAC@@_4.13 +#----------------------------- +(de Nums 84598 4439223 248749 2488711 233716 3375644 211118) + +: (filter '((N) (> N 1000000)) Nums) +-> (4439223 2488711 3375644) +#----------------------------- +: (filter > Nums (1000000 .)) +-> (4439223 2488711 3375644) +#----------------------------- +(filter '((This) (== 'Engineer (: position))) Employees) +#----------------------------- + +# @@PLEAC@@_4.14 +#----------------------------- +# Pids is an unsorted array of process IDs +(sort Pids) +#----------------------------- +# Descending sort +: (flip (sort (4 19 8 4))) +-> (19 8 4 4) + +: (sort (4 19 8 4) >) +-> (19 8 4 4) + +: (by - sort (4 19 8 4)) +-> (19 8 4 4) +#----------------------------- + +# @@PLEAC@@_4.15 +#----------------------------- +: (by cdr sort '((4 . 7) (19 . 3) (8 . 1) (4 . 2))) # (recommended) +-> ((8 . 1) (4 . 2) (19 . 3) (4 . 7)) + +: (sort # (slower and bigger) + '((4 . 7) (19 . 3) (8 . 1) (4 . 2)) + '((X Y) (> (cdr Y) (cdr X))) ) +-> ((8 . 1) (4 . 2) (19 . 3) (4 . 7)) +#----------------------------- +(for This (by '((This) (: name)) sort Employees) + (prinl (: name) " earns $" (: salary)) ) +#----------------------------- +(by '((This) (cons (: name) (: age))) sort Employees) +#----------------------------- +(by '((S) (cadr (chop S))) sort Names) +#----------------------------- +(by length sort Strings) +#----------------------------- +(sort + (in "/etc/passwd" + (make + (while (split (line) ":") + (link (mix @ 4 3 1)) ) ) ) ) +#----------------------------- + +# @@PLEAC@@_4.16 +#----------------------------- +: (circ 'a) +-> (a .) + +: (circ 'a 'b 'c) +-> (a b c .) + +: (rot @) +-> (c a b .) +#----------------------------- + +# @@PLEAC@@_4.17 +#----------------------------- +(by '(NIL (rand)) sort Lst) # OK +#----------------------------- + +# @@PLEAC@@_4.18 +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch04/words +#----------------------------- + +# @@PLEAC@@_4.18 +#----------------------------- +(de permute (Lst) + (ifn (cdr Lst) + (cons Lst) + (mapcan + '((X) + (mapcar + '((Y) (cons X Y)) + (permute (delete X Lst)) ) ) + Lst ) ) ) + +: (mapc println (permute '(man bites dog))) +(man bites dog) +(man dog bites) +(bites man dog) +(bites dog man) +(dog man bites) +(dog bites man) +#----------------------------- +(de factorial (N) + (apply * (range 1 N)) ) + +: (for N 15 (tab (-20 -10) N (factorial N))) +1 1 +2 2 +3 6 +4 24 +5 120 +6 720 +7 5040 +8 40320 +9 362880 +10 3628800 +11 39916800 +12 479001600 +13 6227020800 +14 87178291200 +15 1307674368000 + +: (factorial 500) +-> 12201368259911100687...00000000000000000000 +: (length @) +-> 1135 +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch04/permute +#----------------------------- + +# @@PLEAC@@_5.0 +# To associate keys with values, PicoLisp uses (besides the built-in database) +# 1. Symbol properties ('put', 'get', ':' etc.) +# 2. Association lists ('assoc', 'asoq', 'get') +# 3. Binary trees ('idx', 'lup') +# For the examples in this section we use association lists +#----------------------------- +(de Age + (Nat . 24) + (Jules . 25) + (Josh . 17) ) +#----------------------------- +(push 'Age + (cons 'Nat 24) + (cons 'Jules 25) + (cons 'Josh 17) ) +#----------------------------- +(de FoodColor + (Apple . "red") + (Banana . "yellow") + (Lemon . "yellow") + (Carrot . "orange") ) +#----------------------------- + +# @@PLEAC@@_5.1 +#----------------------------- +# FoodColor defined per the introduction +(push 'FoodColor '(Raspberry . "pink")) + +: (prinl "Known foods:") (for F FoodColor (println (car F))) +Known foods: +Raspberry +Apple +Banana +Lemon +Carrot +#----------------------------- + +# @@PLEAC@@_5.2 +#----------------------------- +# FoodColor per the introduction +: (for Name '("Banana", "Martini") + (prinl Name (if (assoc Name FoodColor) " is a food." " is a drink.")) ) +Banana is a food. +Martini is a drink. +#----------------------------- + +# @@PLEAC@@_5.3 +#----------------------------- +(del Key Var) +#----------------------------- +# FoodColor per the introduction +(de printFoods () + (prin "Keys: ") + (apply println (mapcar car FoodColor)) + (prin "Values: ") + (apply println (mapcar cdr FoodColor)) ) + +(prinl "Initially:") +(printFoods) +(prinl) +(prinl "With Banana undef:") +(del (assoc 'Banana FoodColor) 'FoodColor) +(printFoods) +#----------------------------- +Initially: +Keys: Raspberry Apple Banana Lemon Carrot +Values: "pink" "red" "yellow" "yellow" "orange" + +With Banana undef: +Keys: Raspberry Apple Lemon Carrot +Values: "pink" "red" "yellow" "orange" +#----------------------------- + +# @@PLEAC@@_5.4 +#----------------------------- +# FoodColor as per the introduction +: (for F FoodColor + (prinl (car F) " is " (cdr F)) ) +Apple is red +Banana is yellow +Lemon is yellow +Carrot is orange + +: (mapc + '((Food Color) (prinl Food " is " Color)) + (mapcar car FoodColor) + (mapcar cdr FoodColor) ) +Apple is red +Banana is yellow +Lemon is yellow +Carrot is orange +#----------------------------- +: (for F (sort FoodColor) + (prinl (car F) " is " (cdr F)) ) +Apple is red +Banana is yellow +Carrot is orange +Lemon is yellow +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch05/countfrom +#----------------------------- + +# @@PLEAC@@_5.5 +#----------------------------- +# FoodColor as per the introduction +: FoodColor +-> ((Apple . "red") (Banana . "yellow") (Lemon . "yellow") (Carrot . "orange")) + +: (mapc println FoodColor) +(Apple . "red") +(Banana . "yellow") +(Lemon . "yellow") +(Carrot . "orange") + +: (for X FoodColor + (prinl (car X) " => " (cdr X)) ) +Apple => red +Banana => yellow +Lemon => yellow +Carrot => orange +#----------------------------- + +# @@PLEAC@@_5.6 +#----------------------------- +(queue 'FoodColor (cons 'Banana "Yellow")) +(queue 'FoodColor (cons 'Apple "Green")) +(queue 'FoodColor (cons 'Lemon "Yellow")) + +: FoodColor +-> ((Banana . "Yellow") (Apple . "Green") (Lemon . "Yellow")) + +# In insertion order, the foods are: +: (for Food FoodColor + (prinl " " (car Food)) ) +In insertion order, the foods are: + Banana + Apple + Lemon + +# Still in insertion order, the foods' colors are: +: (for Food FoodColor + (prinl (car Food) " is colored " (cdr Food) ".") ) +Banana is colored Yellow. +Apple is colored Green. +Lemon is colored Yellow. +#----------------------------- + +# @@PLEAC@@_5.7 +#----------------------------- +: (setq Ttys + (sort + (group + (in '(who) + (make + (while (read) + (link (cons @ (read))) + (line) ) ) ) ) ) ) +-> ((abu tty1 pts/1 pts/3 pts/4 pts/5) (root tty2)) + +: (for U Ttys + (prin (car U) ": ") + (apply println (cdr U)) ) +abu: tty1 pts/1 pts/3 pts/4 pts/5 +root: tty2 +#----------------------------- +(for U Ttys + (prinl (car U) ": " (length (cdr U)) " ttys.") + (for Tty (sort (cdr U)) + (prinl "^I" Tty " (owned by " (car U) ")") ) ) +#----------------------------- +# Delete all pts/3 .. pts/5 +(for U Ttys + (con U (diff (cdr U) '(pts/3 pts/4 pts/5))) ) + +: Ttys +-> ((abu tty1 pts/1) (root tty2)) +#----------------------------- + +# @@PLEAC@@_5.8 +#----------------------------- +(setq + Surname '((Mickey . Mantle) (Babe . Ruth)) + FirstName (mapcar '((X) (cons (cdr X) (car X))) Surname) ) + +: (get FirstName 'Mantle) +-> Mickey +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch05/foodfind +#----------------------------- +# FoodColor as per the introduction +: (extract + '((F) (and (= "yellow" (cdr F)) (car F))) + FoodColor ) +-> (Banana Lemon) +#----------------------------- + +# @@PLEAC@@_5.9 +#----------------------------- +: (setq FoodColor (sort FoodColor)) +-> ((Apple . "red") (Banana . "yellow") (Carrot . "orange") (Lemon . "yellow")) + +: (setq FoodColor (by cdr sort FoodColor)) +-> ((Carrot . "orange") (Apple . "red") (Banana . "yellow") (Lemon . "yellow")) +#----------------------------- + +# @@PLEAC@@_5.10 +#----------------------------- +# FoodColor per the introduction +(setq + DrinkColor '((Galliano . "yellow") ("Mai Tai" . "blue")) + IngestedColor (append FoodColor DrinkColor) ) +#----------------------------- +: (setq AllColors (uniq (mapcar cdr IngestedColor))) +-> ("red" "yellow" "orange" "blue") +#----------------------------- + +# @@PLEAC@@_5.11 +#----------------------------- +# FoodColor per the introduction +# CitrusColor is a hash mapping citrus food name to its color. +(de CitrusColor + (Lemon . "yellow") + (Orange . "orange") + (Lime . "green") ) + +# build up a list of non-citrus foods +: (filter '((F) (not (assoc (car F) CitrusColor))) FoodColor) +-> ((Apple . "red") (Banana . "yellow") (Carrot . "orange")) +#----------------------------- + +# @@PLEAC@@_5.12 +#----------------------------- +(setq Files + (extract + '((File) (and (info File) (cons File (car @)))) + '("/etc/termcap", "/vmunix", "/bin/cat") ) ) + +(prinl "open files " (glue ", " (mapcar car Files))) +(for F Files + (prinl (car F) " is " (cdr F) " bytes long.") ) +#----------------------------- + +# @@PLEAC@@_5.13 +#----------------------------- +# Has no meaning in PicoLisp. All data structures grow dynamically. +#----------------------------- + +# @@PLEAC@@_5.14 +#----------------------------- +: (off Count) +-> NIL +: (for Element '(a b c b c d) + (accu 'Count Element 1) ) +-> (d . 1) +: Count +-> ((d . 1) (c . 2) (b . 2) (a . 1)) +#----------------------------- + +# @@PLEAC@@_5.15 +#----------------------------- +(de Father + (Cain . Adam) + (Abel . Adam) + (Seth . Adam) + (Enoch . Cain) + (Irad . Enoch) + (Mehujael . Irad) + (Methusael . Mehujael) + (Lamech . Methusael) + (Jubal . Lamech) + (Tubalcain . Lamech) + (Enos . Seth) ) + +(de ancestor (Name) + (while (assoc Name Father) + (setq Name (cdr @)) ) + Name ) # Always 'Adam' + +(setq Children + (mapcar + '((L) (cons (cdar L) (mapcar car L))) + (by cdr group Father) ) ) + +(de children (Name) + (prinl Name " begat " + (if (get Children Name) + (glue ", " @) + "nobody" ) ) ) +#----------------------------- +: (children 'Adam) +Adam begat Cain, Abel, Seth + +: (children 'Enos) +Enos begat nobody +#----------------------------- + +# @@PLEAC@@_5.16 +#----------------------------- +# @@INCLUDE@@ include/picolisp/ch05/dutree +#----------------------------- + +# @@PLEAC@@_6.0 +# PicoLisp has no strings, and doesn't operate on symbol names directly. +# (see the "Strings" section). Instead, patterns are applied to lists. +#----------------------------- +(match Pattern List) +(fill Pattern [Symbol|List]) +#----------------------------- +: (match '(@Name had a @Adj lamb) '(Mary had a little lamb)) +-> T +: @Name +-> (Mary) +: @Adj +-> (little) +#----------------------------- + +# @@PLEAC@@_6.1 +#----------------------------- +: (replace '(here in this town) 'this 'that 'town 'village) +-> (here in that village) +#----------------------------- +# strip to basename +: (let F (chop "abc/def/ghi") + (prinl (last (split F '/))) # Using 'split' + (prinl (stem F '/)) ) # or 'stem' +ghi +ghi +#----------------------------- +# Make All Words Title-Cased +: (mapcar + '((W) (pack (uppc (car W)) (cdr W))) + (split (chop "Mary had a little lamb") " ") ) +-> ("Mary" "Had" "A" "Little" "Lamb") +#----------------------------- +: (glue '/ + (replace + (split (chop "/usr/man/man3/foo.1") "/") + '("m" "a" "n" "3") + '("c" "a" "t" "3") ) ) +-> "/usr/man/cat3/foo.1" +#----------------------------- +: (mapcar + '((S) (pack (glue '/ (head -1 (split (chop S) '/))) "/lib")) + '("/usr/bin" "/bin" "/usr/local/bin") ) +-> ("/usr/lib" "/lib" "/usr/local/lib") +#----------------------------- + +# @@PLEAC@@_6.2 +#----------------------------- +(not + (find + '((C) (nor (>= "Z" C "A") (>= "z" C "a"))) + List ) ) # it is purely alphabetic +#----------------------------- + +# @@PLEAC@@_6.3 +#----------------------------- +# as many non-whitespace bytes as possible +: (make (find '((C) (or (sp? C) (nil (link C)))) (chop "abcd efg"))) +-> ("a" "b" "c" "d") + +# as many letters, apostrophes, and hyphens +: (make + (find + '((C) + (nand + (or (>= "Z" C "A") (>= "z" C "a") (sub? C "`-")) + (link C) ) ) + (chop "ab`c-d/e") ) ) +-> ("a" "b" "`" "c" "-" "d") +#----------------------------- + +# ... + +#----------------------------- + +# @@PLEAC@@_7.0 +#----------------------------- +(in "/usr/local/widgets/data" + (until (eof) + (and (sub? "blue" (line T)) (prinl @)) ) ) +#----------------------------- +(setq Var (in NIL (till NIL T))) # Read standard input till EOF +#----------------------------- +(out LogFile ...) + +(setq Fd (open LogFile)) +... +(close Fd) +#----------------------------- +(out "+LogFile" # switch to LOGFILE for output + (prinl "Countdown initiated ...") ) +# return to original output +(prinl "You have 30 seconds to reach minimum safety distance.") +#----------------------------- + +# @@PLEAC@@_7.1 +#----------------------------- +(in "file" # Open for input + .. ) + +(out "file" # Open for output + .. ) + +(out "+file" # Open for output (appending) + .. ) +#----------------------------- + +# @@PLEAC@@_7.2 +#----------------------------- + +# Just like any other file, right? |
|
From: Guillaume C. <gg...@us...> - 2011-01-08 13:58:19
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch05 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5496/include/picolisp/ch05 Added Files: countfrom dutree foodfind Log Message: more picolisp by alexander burger --- NEW FILE: countfrom --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/misc.l") (in (opt) (until (eof) (when (match '(~(chop "From: ") @From) (line)) (accu 'From @From 1) ) ) ) (for Person (sort From) (prinl (car Person) ": " (cdr Person)) ) (bye) --- NEW FILE: dutree --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # dutree - print sorted indented rendition of du output (load "@lib/misc.l") # Run du, read input, save directories and sizes (setq *Dirsize # ((name size kids ..) ..) (by length sort (in (list 'du (opt)) (make (while (read) (skip) (link (list (split (line) "/") @)) ) ) ) ) ) # Assign kids (for D *Dirsize (when (assoc (head -1 (car D)) *Dirsize) (conc @ (cons (car D))) ) ) (let Root (car *Dirsize) # Figure out how much is taken up in each directory # that isn't stored in subdirectories. add a new # fake kid called "." containing that much (recur (Root) (let (Size (cadr Root) Cursize Size) (for Kid (cddr Root) (when (assoc Kid *Dirsize) (dec 'Cursize (cadr @)) (recurse @) ) ) (unless (= Size Cursize) (let Dot (append (car Root) '(("."))) (push '*Dirsize (list Dot Cursize)) (conc Root (cons Dot)) ) ) ) ) # Recursively output everything (let (Prefix NIL Width (length (cadr Root))) (recur (Root Prefix Width) (let Name (last (car Root)) (prinl Prefix (align Width (cadr Root)) " " Name) (let? Kids (flip (by cadr sort (mapcar '((K) (assoc K *Dirsize)) (cddr Root)) ) ) (setq Prefix (pack Prefix (align Width "|"))) (setq Width (+ 1 (length Name) (length (cadar Kids)))) (for Kid Kids (recurse Kid Prefix Width) ) ) ) ) ) ) (bye) --- NEW FILE: foodfind --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (ifn (argv Given) (out 2 (prinl "usage: foodfind food_or_color")) (de Color ("Apple" . "red") ("Banana" . "yellow") ("Lemon" . "yellow") ("Carrot" . "orange") ) (when (assoc Given Color) (prinl Given " is a food with color " (cdr @) ".") ) (when (find '((X) (= Given (cdr X))) Color) (prinl (car @) " is a food with color " Given ".") ) ) (bye) |
|
From: Guillaume C. <gg...@us...> - 2011-01-08 13:58:19
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch04 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5496/include/picolisp/ch04 Added Files: commify_series permute words Log Message: more picolisp by alexander burger --- NEW FILE: commify_series --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # commify_series - show proper comma insertion in list output (de Lists ("just one thing") ("Mutt" "Jeff") ("Peter" "Paul" "Mary") ("To our parents" "Mother Theresa" "God") ("pastrami" "ham and cheese" "peanut butter and jelly" "tuna") ("recycle tired, old phrases" "ponder big, happy thoughts") ("recycle tired, old phrases" "ponder big, happy thoughts" "sleep and dream peacefully") ) (de commifySeries (Lst) (ifn (cddr Lst) (glue " and " Lst) (glue (if (find '((S) (sub? "," S)) Lst) "; " ", ") (conc (head -1 Lst) (cons (pack "and " (last Lst))) ) ) ) ) (for L Lists (prinl "The list is: " (commifySeries L) ".") ) (bye) --- NEW FILE: permute --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/simul.l") # For 'permute' function (in NIL (until (eof) (for F (permute (split (line) " ")) (prinl (glue " " F)) ) ) ) (bye) --- NEW FILE: words --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # words - gather lines, present in columns (setq Data (in NIL (make (until (eof) (link (line T)) ) ) ) Maxlen (inc (length (maxi length Data))) Cols (max (/ (or (format (sys "COLUMNS")) 80) Maxlen) 1) Rows (/ (+ (length Data) Cols) Cols) Data (make (while Data (link (cut Rows 'Data)))) ) (while (find bool Data) (map '((D) (space (- Maxlen (length (prin (pop D)))))) Data ) (prinl) ) (bye) |
|
From: Guillaume C. <gg...@us...> - 2011-01-08 13:57:57
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch05 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5414/include/picolisp/ch05 Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp/ch05 added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-08 13:57:46
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch04 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5389/include/picolisp/ch04 Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp/ch04 added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 21:22:23
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14910 Modified Files: index-skeleton.html pleac-faq.html pleac-refer.html pleac_picolisp.data sample.data simple_sample.data Log Message: some improvements after discussions with Alexander Burger Index: index-skeleton.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/index-skeleton.html,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- index-skeleton.html 2 Jan 2011 14:30:14 -0000 1.43 +++ index-skeleton.html 2 Jan 2011 21:22:14 -0000 1.44 @@ -13,9 +13,7 @@ <h1 align="center">PLEAC - Programming Language Examples Alike Cookbook</h1> -<a href="http://sourceforge.net"> -<img src="http://sourceforge.net/sflogo.php?group_id=27880" width="88" -height="31" border="0" alt="SourceForge Logo"></img></a> +<a href="http://sourceforge.net/projects/pleac"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=27880&type=10" width="80" height="15" alt="Get PLEAC at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> <h2>Summary</h2> @@ -174,7 +172,7 @@ -<h2>Contribute</h2> +<a name="Contribute"><h2>Contribute</h2></a> <p> To contribute to this projet, you may implement the Solutions shown in the Index: pleac-faq.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac-faq.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- pleac-faq.html 3 May 2008 20:09:21 -0000 1.9 +++ pleac-faq.html 2 Jan 2011 21:22:14 -0000 1.10 @@ -13,6 +13,8 @@ <h1 align="center">The <a href="http://pleac.sourceforge.net/">PLEAC</a> FAQ</h1> + <a href="http://sourceforge.net/projects/pleac"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=27880&type=10" width="80" height="15" alt="Get PLEAC at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> + <h2>1. Why are you only using Cookbook stuff? I'd like to solve also <...> problem, that would be more interesting!</h2> @@ -210,6 +212,11 @@ environment. </p> + <p> + Then please refer to the second bullet of + the <a href="http://pleac.sourceforge.net/#Contribute">"Contribute" + section of the homepage</a>. + </p> <h2>10. Should I rewrite (some of) the explanatory text?</h2> @@ -253,13 +260,6 @@ </p> -<address> - <a href="http://validator.w3.org/check/referer"> - <img src="images/v3c_validated.png" height="31" width="88" align="right" - border="0" alt="Valid XHTML 1.0!" /> - </a> -</address> - </body> </html> Index: pleac-refer.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac-refer.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- pleac-refer.html 3 May 2008 20:09:21 -0000 1.8 +++ pleac-refer.html 2 Jan 2011 21:22:14 -0000 1.9 @@ -14,6 +14,7 @@ <h1 align="center">Pleac on the Web</h1> + <a href="http://sourceforge.net/projects/pleac"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=27880&type=10" width="80" height="15" alt="Get PLEAC at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> <p> <i>Notice: this is rather old news.</i> @@ -79,13 +80,6 @@ <font size="-2">Sun Jan 21 21:00:11 2007</font> -<address> - <a href="http://validator.w3.org/check/referer"> - <img src="images/v3c_validated.png" height="31" width="88" align="right" - border="0" alt="Valid XHTML 1.0!" /> - </a> -</address> - </body> </html> Index: pleac_picolisp.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_picolisp.data,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pleac_picolisp.data 2 Jan 2011 21:19:35 -0000 1.2 +++ pleac_picolisp.data 2 Jan 2011 21:22:14 -0000 1.3 @@ -806,7 +806,6 @@ 239322000000000000000000 2**19 3 5**18 39887 #----------------------------- - # @@PLEAC@@_3.0 # Dates and times are handled in PicoLisp by the built-in 'date' and 'time' # functions, and additional functions like 'day' and 'week', and various Index: sample.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/sample.data,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- sample.data 20 Jan 2005 19:34:21 -0000 1.4 +++ sample.data 2 Jan 2011 21:22:14 -0000 1.5 @@ -12,8 +12,9 @@ # @@PLEAC@@_INTRO # @@SKIP@@ You need version 666 or above for this code to work. -# @@SKIP@@ I use `megadebug' to interactively debug the code. - +# @@SKIP@@ I use 'megadebug' to interactively debug the code. + Note: this is an optional generic intro, will go in the + "Foreword" after the table of contents # @@PLEAC@@_APPENDIX Note: this section is optional; use it if you need to import very @@ -25,17 +26,29 @@ end -# @@PLEAC@@_2.3 +# @@PLEAC@@_1.0 Implementation in the programming language of the -code shown in section 2.3 of the Perl CookBook. +code shown in foreword of the chapter 1 of the Perl CookBook. +# @@PLEAC@@_1.1 +Implementation in the programming language of the +code shown in section 1.1 of the Perl CookBook. -# @@PLEAC@@_4.7 +# @@PLEAC@@_1.2 Implementation in the programming language of the -code shown in section 4.7 of the Perl CookBook. +code shown in section 1.2 of the Perl CookBook. +... -# @@PLEAC@@_5.3 + +# @@PLEAC@@_2.3 +Implementation in the programming language of the +code shown in section 2.3 of the Perl CookBook. + +... + + +# @@PLEAC@@_4.7 Implementation in the programming language of the code shown in section 4.7 of the Perl CookBook. # @@INCOMPLETE@@ @@ -46,12 +59,14 @@ two tags (there is no need to do so if you have no explanation to put). If you simply cannot do the section, don't put @@INCOMPLETE@@ tags, just put the explanation - why. + why, since this is a definitive "implementation". + # @@PLEAC@@_7.3 -# @@INCLUDE@@ include/{name}/slowcat.ext +# @@INCLUDE@@ include/{name}/ch07/slowcat.ext Note: the above tag, @@INCLUDE@@, allows to inline a short standalone program/script. It is useful to keep it - separated so that users can easily run it, and we can also - give a direct download for it on the published version. + separated so that users can easily download and run it, + and we can also give a direct download for it on the + published version. Index: simple_sample.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/simple_sample.data,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- simple_sample.data 6 Sep 2008 21:39:03 -0000 1.1 +++ simple_sample.data 2 Jan 2011 21:22:14 -0000 1.2 @@ -22,7 +22,7 @@ why. # @@PLEAC@@_7.3 -# @@INCLUDE@@ include/{name}/slowcat.ext +# @@INCLUDE@@ include/{name}/ch07/slowcat.ext Note: the above tag, @@INCLUDE@@, allows to inline a short standalone program/script. It is useful to keep it separated so that users can easily run it, and we can also |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 21:19:44
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13956 Modified Files: pleac_picolisp.data Log Message: remove garbage at end of chapters 2 and 3 Index: pleac_picolisp.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_picolisp.data,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pleac_picolisp.data 2 Jan 2011 14:30:14 -0000 1.1 +++ pleac_picolisp.data 2 Jan 2011 21:19:35 -0000 1.2 @@ -806,15 +806,6 @@ 239322000000000000000000 2**19 3 5**18 39887 #----------------------------- -# vi:et:ts=3:sw=3 -ly ox - species genus phylum - cherub radius jockey - index matrix mythos - phenomenon formula ) - (prinl "One " S ", two " (nounPlural S) ".") ) -#----------------------------- - # @@PLEAC@@_3.0 # Dates and times are handled in PicoLisp by the built-in 'date' and 'time' @@ -993,9 +984,3 @@ mo-p00-ob.rzone.de post.strato.de 15:44:39 2010/12/31 00:00:05 post.strato.de localhost 15:46:09 2010/12/31 00:01:30 #----------------------------- - -# vi:et:ts=3:sw=3 ------------------- -$ ./hopdelta <header -Sender Recipient Time Delta -- |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:30:23
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch01 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28000/include/picolisp/ch01 Added Files: fixstyle psgrep randcap slowcat soundex sum wrapdemo Log Message: add picolisp from Alexander Burger --- NEW FILE: fixstyle --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # Use: ./fixstyle [-v] <infile >outfile (and (= "-v" (opt)) (on *Verbose)) (de Data ("analysed" . "analyzed") ("built-in" . "builtin") ("chastized" . "chastised") ("commandline" . "command-line") ("de-allocate" . "deallocate") ("dropin" . "drop-in") ("hardcode" . "hard-code") ("meta-data" . "metadata") ("multicharacter" . "multi-character") ("multiway" . "multi-way") ("non-empty" . "nonempty") ("non-profit" . "nonprofit") ("non-trappable" . "nontrappable") ("pre-define" . "predefine") ("preextend" . "pre-extend") ("re-compiling" . "recompiling") ("reenter" . "re-enter") ("turnkey" . "turn-key") ) (in NIL (while (apply echo '`(mapcar car Data)) (let (Key @ Val (get Data Key)) (when *Verbose (out 2 (prinl Key " => " Val)) ) (prin Val) ) ) ) (bye) --- NEW FILE: psgrep --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # Use: psgrep 'lisp-expression' # # Takes a single optional argument: # An arbitrary lisp expression without the outermost parentheses # # For example: # psgrep '= "Ss+" STAT' # psgrep 'and (> SIZE 10000) (= TT "tty1")' # psgrep 'member UID (101 102 104 106)' # # The variables (case-sensitive!) have the # same names as the column headers (load "@lib/misc.l") (de PsFields (F 1 "flags" NIL (read)) (UID 6 "uid" NIL (read)) (PID 6 "pid" NIL (read)) (PPID 6 "ppid" NIL (read)) (PRI 4 "pri" NIL (read)) (NI 4 "nice" NIL (read)) (NIL 1) (SIZE 5 "size" NIL (read)) (NIL 1) (RSS 5 "rss" NIL (read)) (NIL 1) (WCHAN -7 "wchan" NIL (skip) (till " " T)) (STAT -5 "stat" NIL (skip) (till " " T)) (TT -9 "tty" NIL (skip) (till " " T)) (TIME 8 "time" (tim$ TIME T) (skip) ($tim (till " " T))) (NIL 1) (COMMAND -30 "command" NIL (char) (line T)) ) (let Cond (or (str (opt)) T) (in (list 'ps "hax" "-o" (glue "," (extract caddr PsFields))) (let Fmt (mapcar cadr PsFields) (apply tab (mapcar car PsFields) Fmt) (bind (mapcar car PsFields) (until (eof) (for Fld PsFields (when (car Fld) (set @ (run (cddddr Fld))) ) ) (when (eval Cond) (apply tab (mapcar '((Fld) (or (eval (cadddr Fld)) (val (car Fld)))) PsFields ) Fmt ) ) ) ) ) ) ) (bye) --- NEW FILE: randcap --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # randcap: filter to randomly capitalize 20% of the letters (in NIL (while (char) (let C @ (prin (if (=0 (rand 0 4)) (uppc C) C)) ) ) ) (bye) --- NEW FILE: slowcat --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # slowcat - emulate a s l o w line printer # usage: slowcat [-DELAY] [files ...] (let Delay (ifn (lt0 (format (car (argv)))) 1 (opt) (- @)) (for F (argv) (for C (in F (till)) (prin C) (wait (* 5 Delay)) ) ) ) (bye) --- NEW FILE: soundex --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/misc.l") (de soundex (Str) (pack (pad -4 (cons (uppc (char (char Str))) (head 3 (let Last NIL (extract '((C) (and (setq C (case (uppc C) (`(chop "BFPV") "1") (`(chop "CGJKQSXZ") "2") (("D" "T") "3") ("L" "4") (("M" "N") "5") ("R" "6") ) ) (<> Last C) (setq Last C) ) ) (cdr (chop Str)) ) ) ) ) ) ) ) (prin "Lookup user: ") (flush) (let (User (clip (in NIL (line T))) Code (soundex User)) (while (native "@" "getpwent" '(S S I I S S S)) # 'native' only in 64-bits (let Lst @ (when (or (= Code (soundex (car Lst))) (= Code (soundex (get Lst 5)))) (println Lst) ) ) ) ) (bye) --- NEW FILE: sum --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l # sum - compute 16-bit checksum of all input files (let Sum 0 (while (opt) (in @ (while (char) (inc 'Sum (char @))) ) ) (println (% Sum 65535)) ) (bye) --- NEW FILE: wrapdemo --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/misc.l") (let Input (chop (wrap 17 (conc (need 4 " ") (chop "Folding and splicing is the work of an editor, \ not a mere collection of silicon \ and \ mobile electrons!" ) ) ) ) (prinl (replace Input "^J" "^J ")) ) (bye) |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:30:23
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28000 Modified Files: AUTHORS Makefile index-skeleton.html Added Files: pleac_picolisp.data Log Message: add picolisp from Alexander Burger --- NEW FILE: pleac_picolisp.data --- # -*- picolisp -*- # @@PLEAC@@_NAME # @@SKIP@@ PicoLisp # @@PLEAC@@_WEB # @@SKIP@@ http://picolisp.com # @@PLEAC@@_1.0 # PicoLisp has no special string type. Instead, symbols are used. Syntactically, # "transient" symbols resemble strings in other languages. Also, there is no # separate character type. Instead, characters are represented by strings of # length 1 (using 1 .. 3 bytes (UTF-8)). #----------------------------- (setq String "^J") # a newline character (setq String "\^J") # two characters, '^' and 'J' #----------------------------- : "Jon \"Maddog\" Orwant" # literal double quotes -> "Jon \"Maddog\" Orwant" [...962 lines suppressed...] #----------------------------- # @@PLEAC@@_3.11 #----------------------------- # @@INCLUDE@@ include/picolisp/ch03/hopdelta #----------------------------- $ ./hopdelta <header Sender Recipient Time Delta ------ --------- ---- ----- Start app 15:44:34 2010/12/31 app mo-p00-ob.rzone.de 15:44:34 2010/12/31 00:00:00 mo-p00-ob.rzone.de post.strato.de 15:44:39 2010/12/31 00:00:05 post.strato.de localhost 15:46:09 2010/12/31 00:01:30 #----------------------------- # vi:et:ts=3:sw=3 ------------------ $ ./hopdelta <header Sender Recipient Time Delta - Index: AUTHORS =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/AUTHORS,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- AUTHORS 2 Jul 2010 11:27:56 -0000 1.62 +++ AUTHORS 2 Jan 2011 14:30:14 -0000 1.63 @@ -192,3 +192,6 @@ Volkan Yazici <yazicivo ttmail com> Common Lisp Haskell + +Alexander Burger <abu software-lab de> + PicoLisp Index: Makefile =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/Makefile,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- Makefile 2 Jan 2011 13:53:22 -0000 1.69 +++ Makefile 2 Jan 2011 14:30:14 -0000 1.70 @@ -19,7 +19,7 @@ #***************************************************************************** # IMPLS must be sorted by percentage of completion -IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go +IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java picolisp cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go DATAFILES = $(wildcard pleac_*.data) Index: index-skeleton.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/index-skeleton.html,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- index-skeleton.html 2 Oct 2010 20:58:15 -0000 1.42 +++ index-skeleton.html 2 Jan 2011 14:30:14 -0000 1.43 @@ -100,9 +100,7 @@ the project, for the top implementations. </p> <p> -Here is the <a href="AUTHORS">name of the authors</a> so far, -and <a href="AUTHORS.currently-working">authors currently busy</a> on the -different languages. +Here is the <a href="AUTHORS">name of the authors</a> so far. </p> |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:30:23
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch02 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28000/include/picolisp/ch02 Added Files: bigfact Log Message: add picolisp from Alexander Burger --- NEW FILE: bigfact --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/misc.l") (de factor (N) (make (let (D 2 L (1 2 2 . (4 2 4 2 4 6 2 6 .)) M (sqrt N)) (while (>= M D) (if (=0 (% N D)) (setq M (sqrt (setq N (/ N (link D))))) (inc 'D (pop 'L)) ) ) (link N) ) ) ) (while (opt) (let? N (format @) (let Factors (factor N) (tab (-11 1 -60) N " " (ifn (cdr Factors) "PRIME" (glue " " (mapcar '((L) (if (cdr L) (pack (car L) "**" (length L)) (car L) ) ) (by prog group Factors) ) ) ) ) ) ) ) (bye) |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:30:22
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch03 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28000/include/picolisp/ch03 Added Files: hopdelta Log Message: add picolisp from Alexander Burger --- NEW FILE: hopdelta --- #!/usr/bin/picolisp /usr/lib/picolisp/lib.l (load "@lib/misc.l") (in NIL (let (Fmt (-21 -21 -9 -10 10) Sender "Start" LastSecs NIL) (tab Fmt "Sender" "Recipient" "Time" NIL "Delta") (tab Fmt "------" "---------" "----" NIL "-----") (for Lst (flip (make (while (from "^JReceived: from ") (let Recipient (till " ^J" T) (from "; ") (from ",") (let (Day (read) Mon (index (till " " T) *Mon) Year (read) Tim (till " " T) Offs (read) Secs (+ (* 86400 (date Year Mon Day)) ($tim Tim)) ) (when (num? Offs) (inc 'Secs (*/ 3600 Offs 100)) ) (link (list Recipient Tim (dat$ (date Year Mon Day) "/") Secs ) ) ) ) ) ) ) #(println (list Day Mon Year Tim '- Secs)) (tab Fmt Sender (car Lst) (cadr Lst) (caddr Lst) (tim$ (- (cadddr Lst) LastSecs) T) ) (setq Sender (car Lst) LastSecs (cadddr Lst)) ) ) ) (bye) |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:29:43
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch03 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27446/include/picolisp/ch03 Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp/ch03 added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:29:43
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch02 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27446/include/picolisp/ch02 Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp/ch02 added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:29:43
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp/ch01 In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27446/include/picolisp/ch01 Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp/ch01 added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 14:29:28
|
Update of /cvsroot/pleac/pleac/pleac/include/picolisp In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27368/include/picolisp Log Message: Directory /cvsroot/pleac/pleac/pleac/include/picolisp added to the repository |
|
From: Guillaume C. <gg...@us...> - 2011-01-02 13:53:32
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18000 Modified Files: Makefile Added Files: pleac_go.data Log Message: add beginning of Go --- NEW FILE: pleac_go.data --- // -*- go -*- // @@PLEAC@@_NAME // @@SKIP@@ Go // @@PLEAC@@_WEB // @@SKIP@@ http://golang.org/ // @@PLEAC@@_INTRO // @@SKIP@@ The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. // @@PLEAC@@_1.0 string1 := "\\n" // two characters, \ and an n string2 := "Jon 'Maddog' Orwant" // literal single quotes string3 := "Jon \"Maddog\" Orwant" // literal double quotes fmt.Println(string1) fmt.Println(string2) fmt.Println(string3) // There is no here-doc in Go. Index: Makefile =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/Makefile,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- Makefile 2 Jul 2010 11:27:56 -0000 1.68 +++ Makefile 2 Jan 2011 13:53:22 -0000 1.69 @@ -19,7 +19,7 @@ #***************************************************************************** # IMPLS must be sorted by percentage of completion -IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm +IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm go DATAFILES = $(wildcard pleac_*.data) |
|
From: Guillaume C. <gg...@us...> - 2010-10-20 07:56:40
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv32744 Modified Files: pleac_pliant.data Log Message: fix latest pliant website Index: pleac_pliant.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_pliant.data,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- pleac_pliant.data 12 Jun 2002 17:28:29 -0000 1.8 +++ pleac_pliant.data 20 Oct 2010 07:56:27 -0000 1.9 @@ -4,7 +4,7 @@ # @@SKIP@@ Pliant # @@PLEAC@@_WEB -# @@SKIP@@ http://pliant.cx +# @@SKIP@@ http://www.fullpliant.org/ # @@PLEAC@@_INTRO # @@SKIP@@ Written for version 73. |
|
From: Guillaume C. <gg...@us...> - 2010-10-02 20:58:24
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30210 Modified Files: index-skeleton.html Log Message: add pickaxe book link Index: index-skeleton.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/index-skeleton.html,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- index-skeleton.html 1 Oct 2010 22:05:44 -0000 1.41 +++ index-skeleton.html 2 Oct 2010 20:58:15 -0000 1.42 @@ -71,6 +71,7 @@ <li><a href="http://www.amazon.com/gp/product/0596003137?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596003137">Perl Cookbook, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596003137" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> <li><a href="http://www.amazon.com/gp/product/0596004567?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596004567">Advanced Perl Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596004567" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> <li><a href="http://www.amazon.com/gp/product/0596526741?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596526741">Perl Hacks: Tips & Tools for Programming, Debugging, and Surviving</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596526741" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> +<li><a href="http://www.amazon.com/gp/product/1934356085?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1934356085">Programming Ruby 1.9: The Pragmatic Programmers' Guide (Facets of Ruby)</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=1934356085" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> </ul> <p> |
|
From: Guillaume C. <gg...@us...> - 2010-10-01 22:05:53
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26141 Modified Files: index-skeleton.html Log Message: add amazon associates links Index: index-skeleton.html =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/index-skeleton.html,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- index-skeleton.html 2 Nov 2008 09:57:44 -0000 1.40 +++ index-skeleton.html 1 Oct 2010 22:05:44 -0000 1.41 @@ -57,6 +57,30 @@ </p> +<h2>Support</h2> + +<p>If you like PLEAC and you want to show your appreciation while + at the same time you wish to buy a great book on software + programming, here are links on amazon.com for buying books I + personally own and recommend. Buying through one of these + referer links, I will get a nice kickback. It's the same price + for you. +</p> + +<ul> +<li><a href="http://www.amazon.com/gp/product/0596003137?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596003137">Perl Cookbook, Second Edition</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596003137" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> +<li><a href="http://www.amazon.com/gp/product/0596004567?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596004567">Advanced Perl Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596004567" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> +<li><a href="http://www.amazon.com/gp/product/0596526741?ie=UTF8&tag=pleac-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0596526741">Perl Hacks: Tips & Tools for Programming, Debugging, and Surviving</a><img src="http://www.assoc-amazon.com/e/ir?t=pleac-20&l=as2&o=1&a=0596526741" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li> +</ul> + +<p> + (I actually wrote a chapter of <em>Perl Hacks</em>, inspired by + my <a href="http://www.frozen-bubble.org/">Frozen-Bubble</a> + game written in Perl - though I don't get any kickback money on + book sells, since what I wrote is so small) +</p> + + <h2>Status</h2> <p> |
|
From: Guillaume C. <gg...@us...> - 2010-07-02 11:30:28
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11855 Modified Files: .cvsignore Log Message: more in .cvsignore Index: .cvsignore =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/.cvsignore,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- .cvsignore 15 Jun 2005 20:41:59 -0000 1.18 +++ .cvsignore 2 Jul 2010 11:30:19 -0000 1.19 @@ -45,6 +45,14 @@ pleac_smalltalk pleac_cposix.html pleac_cposix +pleac_factor.html +pleac_factor +pleac_haskell-on-steroids.html +pleac_haskell-on-steroids +pleac_groovy.html +pleac_groovy +pleac_objective-c.html +pleac_objective-c skeleton tmp.data pleac_rexx.html |
|
From: Guillaume C. <gg...@us...> - 2010-07-02 11:28:35
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11354 Modified Files: pleac_masd.data Log Message: masd-mode blocks emacs :/ Index: pleac_masd.data =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/pleac_masd.data,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pleac_masd.data 23 Aug 2001 10:54:07 -0000 1.6 +++ pleac_masd.data 2 Jul 2010 11:28:26 -0000 1.7 @@ -1,4 +1,4 @@ -% -*- masd -*- +% -*- fundamental -*- % % @@PLEAC@@_NAME |
|
From: Guillaume C. <gg...@us...> - 2010-07-02 11:28:05
|
Update of /cvsroot/pleac/pleac/pleac In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11136 Modified Files: Makefile AUTHORS Added Files: pleac_objective-c.data Log Message: add basic objective-C --- NEW FILE: pleac_objective-c.data --- // -*- objc -*- // @@PLEAC@@_NAME Objective-C // @@PLEAC@@_WEB http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html // @@PLEAC@@_INTRO // @@SKIP@@ This is Objective-C in the context of Apple use - using NextStep foundation classes; // @@SKIP@@ e.g. under Linux, GNUStep runtime and development stuff are needed. A program can // @@SKIP@@ then be successfully compiled using the following commandline: // @@SKIP@@ gcc -x objective-c -Wno-import [source files...] -lgnustep-base -fconstant-string-class=NSConstantString. // @@PLEAC@@_APPENDIX @implementation test // @@PLEAC@@_1.0 // Objective-C supersedes traditional C char* strings with constant // string objects, using the @ character before the opening ". NSString *string1 = @"Jon 'Maddog' Orwant'"; NSString *string2 = @"\n"; // a "newline" character NSString *string3 = @"Jon \"Maddog\" Orwant"; // literal double quotes // @@PLEAC@@_13.0 // A class has a header part traditionally named HumanCannibal.h in that case... #import <Foundation/Foundation.h> @interface HumanCannibal : NSObject { // instance variables NSString *stomach; NSString *place; } - (void) feed: (NSString*) input; - (void) move: (NSString*) input; + (void) classOnlyMethod; @end // ...and an implementation part named HumanCannibal.m in that case #import "HumanCannibal.h" @implementation HumanCannibal - (void) init { // this is the constructor. do whatever but don't forget to // call the parent constructor! [super init]; } - (void) feed: (NSString*) input { stomach = input; } - (void) move: (NSString*) input { place = input; } - (NSString*) description { return [NSString stringWithFormat: @"In %@, stomach contains %@", place, stomach]; } + (void) classOnlyMethod { // do whatever } @end // method calls are between square brackets #import "HumanCannibal.h" int main(void) { HumanCannibal *lector = [HumanCannibal new]; NSLog(@"%@", lector); [lector feed: @"Zak"]; [lector move: @"New York"]; NSLog(@"%@", lector); } // # gcc -x objective-c -Wno-import HumanCannibal.m main.m -lobjc -lgnustep-base -fconstant-string-class=NSConstantString && ./a.out // 2010-07-02 13:19:47.954 a.out[8288] In (nil), stomach contains (nil) // 2010-07-02 13:19:47.958 a.out[8288] In New York, stomach contains Zak Index: Makefile =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/Makefile,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- Makefile 6 Feb 2010 22:26:24 -0000 1.67 +++ Makefile 2 Jul 2010 11:27:56 -0000 1.68 @@ -19,7 +19,7 @@ #***************************************************************************** # IMPLS must be sorted by percentage of completion -IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R masd nasm +IMPLS = perl groovy ocaml python ruby guile commonlisp rexx tcl php pike haskell merd ada haskell-on-steroids java cposix pliant c++ factor smalltalk forth erlang R objective-c masd nasm DATAFILES = $(wildcard pleac_*.data) Index: AUTHORS =================================================================== RCS file: /cvsroot/pleac/pleac/pleac/AUTHORS,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- AUTHORS 2 Feb 2010 14:14:10 -0000 1.61 +++ AUTHORS 2 Jul 2010 11:27:56 -0000 1.62 @@ -5,6 +5,7 @@ Tool to generate the versions Import of Perl version Ruby version + Objective-C version Pixel <pascal at rigaux dot org> Merd version |