[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use guile in a development process
From: |
Dr. Arne Babenhauserheide |
Subject: |
Re: How to use guile in a development process |
Date: |
Thu, 29 Apr 2021 09:26:37 +0200 |
User-agent: |
mu4e 1.4.15; emacs 27.2 |
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
signature.asc
Description: PGP signature