When I try to make script like ddns-tool in scheme, which implementation is usufull? or handy?
Here I show the comparison report. First I choose SCM. For the first time I tried to study scheme or Lisp, I could use just only SCM and ELK (in 1992 1993...) . At that time, my machine does not have SPARC CPU or intel CPU. I had minor machine.
So it was quite difficult to make lisp system or scheme system in my machine.(some unix machine)
Next, I choose gauche, guile, racket, chicken. These implementation is populer. I checked google search "scheme usefull".
I checked if it could use srfi.
And one more important thing,,, these implementation is in FreeBSD packege.(^^)
I use these functions to check implementation. Functions shown below.
These functions are importanto to make script.
I made table below.
(a) (require 'i/o-extensions)
(b) script with arguments result is below.
#!/usr/local/bin/scm (print *argv*) (exit) Name of above script is test.scm. $ test.scm aa bb cc then result is below. $ (/usr/local/bin/scm test.scm aa bb cc)
(c) (use file.util)
(d) No problem. I can use this.
(e) script with arguments result is below.
#!/usr/local/bin/gosh (print *argv*) (exit) Name of above script is test.scm. $ test.scm aa bb cc then results is below $ (aa bb cc)
(f) (use srfi-13)
(g) script with arguments result is below.
#!/usr/local/bin/guile -s !# (print (command-line)) (exit) Name of above script is test.scm. $ test.scm aa bb cc then results is below. $ (test.scm aa bb cc)
(h) (use-modules (ice-9 rdelim))
(i) script with arguments result is below.
#!/usr/local/bin/racket #lang racket (print (current-command-line-arguments)) (exit) Name of above script is test.scm. $ test.scm aa bb cc then results is below. $ #(aa bb cc) racket system has arguments in vector style!!
(j) (require srfi/13)
(k) (use utils)
(l) script with arguments result is below
#!/usr/local/bin/csi -script (print (argv)) (exit) Name of above script is test.scm. $ test.scm aa bb cc then results is below. $ (/usr/local/bin/csi -script test.scm aa bb cc)
(m) (use srfi-13)
Appendix 1:Gauche is known to "multi byte system".!! But sometimes multi-byte system is difficult to use.
My script, ddns-tool reads lines one by one. It searches the line that include specific string pattern. For example "msgShow" etc etc....
In this case, lines have asci-characters or shift-jis characters or UTF-8 characters. Gauche which has built with multi-byte definition (for example UTF-8) occurs error in case that reads unexpected character (such as shift-jis in UFT-8-compiled-gausche). So, gauche that was built with multi-byte difinition can't do my job.
I avoided this error by building gauche with no-multi-byte difinition.
Appendix 2:Racket implementation, if-clause needs else-part. Mandatory!! In the other implementation (guile gauche chicken SCM), else-part is optional, not mandatory. Just only Racket is unique! May be this is because RnRS. But I did'nt check this reason carefully.
If you have interest to this problem, please check RnRS carefully by yourself.
I tried to run ddns-tool in guile, racket, chicken, gauche. In each implementation, it works well.
Perhaps you already know that conclusion is depend on personal taste.
First, I decided to use SCM continuously. But later, I noticed that I can't measure millisecond time in SCM. This is the reason why I stopped to use SCM.
Racket implementation, else-part is unique! And I could not load other script in racket script. If I try to use racket, I have to read manual more carefully. So I also gave up to use racket implementation.
Perhaps, the person who maintains gauche implementation is a very ability man. But he is personal. Just one person. I'm afraid if maintenance stops suddenly.
Chicken is supported by some family. But in 2014, it seems that there is some confusion in chicken's family. It makes me nervous.
At last, I decide to use guile implementation. guile is supported by GNU. This fact makes me at ease.
This is my personal conclusion. But it is not steady conclusion. May be I say another conclusion later (^^;;;
SUPPLEMENTATION:(Sep 2016)
I have checked R6RS. Else part is mandatory in R6RS. And load function is eliminated in R6RS. So, the behavior of racket based on R6RS.
But I don't like these changes. I prefer R5RS.