Re: [MIT-Scheme-users] Adding command-line processing to my script

2014-12-12 Thread Matt Birkholz
 From: Nathan Thern nth...@gmail.com
 Date: Thu, 11 Dec 2014 10:15:44 -0500
 
 On 12/10/2014 10:45 PM, Matt Birkholz wrote:
  [...]  They are documented in the User Manual, node Command-Line
  Options.
 
 [Since] --disable-pdf to the config script doesn't actually disable
 building the pdfs, I haven't been able to build the documentation
 for 9.2.

Fixed in commit 73bb197.

 The documentation one gets from the MIT-Scheme website is for
 version 9.1.

Will fix soon.

___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Adding command-line processing to my script

2014-12-12 Thread Matt Birkholz
 From: Matt Birkholz m...@birchwood-abbey.net
 Date: Fri, 12 Dec 2014 10:13:33 -0700
 
  From: Nathan Thern nth...@gmail.com
  Date: Thu, 11 Dec 2014 10:15:44 -0500
  
  On 12/10/2014 10:45 PM, Matt Birkholz wrote:
   [...]  They are documented in the User Manual, node Command-Line
   Options.
  
  [Since] --disable-pdf to the config script doesn't actually disable
  building the pdfs, I haven't been able to build the documentation
  for 9.2.
 
 Fixed in commit 73bb197.

in should be as of.  The fix was actually in 285850e.  73bb197 is
related, but different.

And you will need --disable-ps too.  --disable-ps and --disable-pdf
build only Info and HTML, which do not involve TeX.

___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Adding command-line processing to my script

2014-12-11 Thread Nathan Thern

On 12/10/2014 10:45 PM, Matt Birkholz wrote:

From: Nathan Thern nth...@gmail.com
Date: Wed, 10 Dec 2014 14:41:21 -0500

Works!
The command-line procedure and the -- separator don't appear to be
documented - are they new?

Yes, as of 9.2.  I actually added them a couple years ago in commit
544915d.  They are documented in the User Manual, node Command-Line
Options.
Well, since I refused to install the texlive package (500+ MB when 
dependencies are included) on my somewhat resource-limited box and 
--disable-pdf to the config script doesn't actually disable building the 
pdfs, I haven't been able to build the documentation for 9.2. The 
documentation one gets from the MIT-Scheme website is for version 9.1.


I would look deeper, but I don't grok autotools. Would you like me to 
file a bug report?

Also, is there a way to use #! notation in a script?

Nope.


After trying hard to understand the docs better, I think that the
way one would use argument-command-line-parser is via [?]q
disk-save and then calling mit-scheme with the --band argument.
Is that right?

Yes, well spotted.



___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Adding command-line processing to my script

2014-12-10 Thread Matt Birkholz
 From: Nathan Thern nth...@gmail.com
 Date: Tue, 9 Dec 2014 16:55:48 -0500
 
 I should mention that I also tried adding a dash (calc = -calc)
 in the argument-command-line-parser line:
 
 (argument-command-line-parser -calc #f calc)
 
 Same error.

By the time your script installs your command line parser, the command
line has already been parsed.

If you separate the machine options from your script's options with
-- you will not get the warning.  The command-line procedure will
return the words following -- as a list of strings.

Compiling scripts is not recommended.  You probably want to do
something like the following.

cat fib-script.scm EOF
(load fib-program.com)
(let ((words (command-line)))
  (if (not (= (length words) 1))
  (error One integer argument is required...))
  (let* ((n-str (car words))
 (n (string-number n-str))
 (fib-n-str (number-string (fib n
(display (string-append n-strth Fibonacci number is fib-n-str\n
(%exit)
EOF

cat fib-program.scm EOF
(declare (usual-integrations))
(define (fib m)
  (if ( m 2)
  m
  (+ (fib (- m 1)) (fib (- m 2)
EOF

mit-scheme EOF
(compile-file fib-program)
EOF

mit-scheme --batch-mode --load fib-script -- 10

___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users


Re: [MIT-Scheme-users] Adding command-line processing to my script

2014-12-10 Thread Matt Birkholz
 From: Nathan Thern nth...@gmail.com
 Date: Wed, 10 Dec 2014 14:41:21 -0500
 
 Works!
 The command-line procedure and the -- separator don't appear to be 
 documented - are they new?

Yes, as of 9.2.  I actually added them a couple years ago in commit
544915d.  They are documented in the User Manual, node Command-Line
Options.

 Also, is there a way to use #! notation in a script?

Nope.

 After trying hard to understand the docs better, I think that the
 way one would use argument-command-line-parser is via [?]q
 disk-save and then calling mit-scheme with the --band argument.
 Is that right?

Yes, well spotted.

___
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
https://lists.gnu.org/mailman/listinfo/mit-scheme-users