From: thorsopia@lavabit.com
To: guile-user@gnu.org
Subject: I/O, modules
Date: Tue, 13 Nov 2012 00:57:11 -0500 (EST) [thread overview]
Message-ID: <42782.199.48.147.41.1352786231.squirrel@lavabit.com> (raw)
Hello,
Could you show me some trivial programs related to I/O (e.g. read from
file, convert to uppercase, write to another file)?
This page [0] doesn't list a function that can be used to read the whole
file at once. Is there a "read-string" function? What about "read-port"?
Should I import some module to get the above functions? Which one?
BTW, I have a problem with modules. How to check what can be imported?
For example:
I created two files in the same dir:
test-scm.scm:
(define-module (test-scm)
#:export (test-func))
(define (test-func x)
(+ x 1))
import-test.scm:
(define-module (import-test)
#:use-module (test-scm))
(display (test-func 2))
Why does "guile import-test.scm" raise "ERROR: no code for module
(test-scm)"?
[0] https://gnu.org/software/guile/manual/guile.html#Reading
next reply other threads:[~2012-11-13 5:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 5:57 thorsopia [this message]
2012-11-13 9:31 ` I/O, modules Ludovic Courtès
2012-11-13 9:53 ` Thien-Thi Nguyen
2012-11-13 14:31 ` Mark H Weaver
2012-11-13 14:50 ` Mike Gran
2012-11-13 22:29 ` Ian Price
-- strict thread matches above, loose matches on Subject: below --
2012-11-13 11:45 tantalum
2012-11-13 23:03 ` Ian Price
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42782.199.48.147.41.1352786231.squirrel@lavabit.com \
--to=thorsopia@lavabit.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).