unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: Nala Ginrut <nalaginrut@gmail.com>
Cc: guile-user@gnu.org, Anthony Quizon <anthoq88@gmail.com>
Subject: Re: How to use guile in a development process
Date: Thu, 29 Apr 2021 09:26:37 +0200	[thread overview]
Message-ID: <87im45wnyq.fsf@web.de> (raw)
In-Reply-To: <CAPjoZoe560+h0_CvR1PLOJ_vnQj7mQuSWOeAA3mf_Q4oF9BPUw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]

Hi Anthony,

I typically add doctests to the file (self-written) and bind F9 to
running the file with --test. Here’s an example:

https://hg.sr.ht/~arnebab/dryads-wake/browse/dryads-wake.w?rev=31cced555f13#L16


;; for emacs (progn (defun test-this-file () (interactive) (save-current-buffer) (async-shell-command (concat (buffer-file-name (current-buffer)) " --test"))) (local-set-key (kbd "<f9>") 'test-this-file))

Best wishes,
Arne

Nala Ginrut <nalaginrut@gmail.com> writes:

> Hi Anthony!
> You may use "guile -L ." to add the current path to the load path, then you
> can import the module.
>
> Best regards.
>
> On Thu, Apr 29, 2021, 08:57 Anthony Quizon <anthoq88@gmail.com> wrote:
>
>> Hello,
>>
>> I'm having trouble finding a good development process with guile.
>>
>> I have a file foo.scm and I'm trying to load it into the repl.
>> However, I couldn't find any documentation on how to easily do this.
>> I tried looking up ",help module" in the repl which told me to use ",load
>> FILE".
>> But when I tried this I got the error "In procedure primitive-load-path:
>> Unable to find file "system/repl/foo.scm" in load path"
>>
>> I don't know where to look to change my load file for the repl.
>>
>> I read in a forum somewhere to add (add-to-load-path ".") in my .guile file
>> but that didn't work.
>>
>> How do I load a file from the current path that I'm in?
>> But more importantly, what is the typical workflow when using guile?
>> Do people write files to the filesystem and load them in the repl to try it
>> out?
>> Or is there a faster way to do things?
>>
>> Thanks,
>>


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

  reply	other threads:[~2021-04-29  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  0:35 How to use guile in a development process Anthony Quizon
2021-04-29  2:19 ` Nala Ginrut
2021-04-29  7:26   ` Dr. Arne Babenhauserheide [this message]
2021-04-29  8:16 ` Adriano Peluso
2021-04-29 14:49 ` Jérémy Korwin-Zmijowski
2021-04-30  2:34 ` Tim Meehan
2021-04-30 11:22   ` Leo Butler

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=87im45wnyq.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=anthoq88@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=nalaginrut@gmail.com \
    /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).