From: jbranso@dismail.de
To: "jgart" <jgart@dismail.de>
Cc: "Guix Help" <help-guix@gnu.org>
Subject: Re: How can I step through this code?
Date: Sat, 08 Oct 2022 15:03:54 +0000 [thread overview]
Message-ID: <84b87078a96fef786a827ff491c631fc@dismail.de> (raw)
In-Reply-To: <20221007202549.GC12984@dismail.de>
October 7, 2022 9:25 PM, "jgart" <jgart@dismail.de> wrote:
> On Fri, 07 Oct 2022 21:52:40 +0000 jbranso@dismail.de wrote:
>
>> October 7, 2022 3:22 PM, "jgart" <jgart@dismail.de> wrote:
>>
>> On Fri, 07 Oct 2022 18:45:36 +0000 jbranso@dismail.de wrote:
>>
>> I wish guile had a nice debugger like elisp. :)
>>
>> I wish guile had a nice debugger like racket or common lisp. :)
>>
>> I haven't actually tried those debuggers...
>
> Just paste some guile code into drracket and press debug to start stepping through the Guile code.
That's smart!
>
> This guile code should work:
>
> (define (list-index l k)
> (let loop ((n 0)
> (l l))
> (and (not (null? l))
> (if (eq? (car l) k)
> n
> (loop (+ n 1) (cdr l))))))
>
> (list-index '(1 2 3 4 5 6 7 8 9) 2)
>
> Just make sure you put the following at the top of the file:
>
> #lang racket
>
> Of course not all guile code would work because it's Guile and Racket
> but some subsets of Guile can be used from the drracket debugger.
>
> ;()
next prev parent reply other threads:[~2022-10-08 15:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 3:05 How can I step through this code? jgart
2022-10-07 18:45 ` jbranso
2022-10-07 19:22 ` jgart
2022-10-07 21:52 ` jbranso
2022-10-08 1:25 ` jgart
2022-10-08 15:03 ` jbranso [this message]
2022-10-08 17:23 ` jgart
2022-10-09 0:14 ` jbranso
2022-10-09 16:30 ` jgart
2022-10-10 19:49 ` jbranso
2022-10-10 22:40 ` jgart
2022-10-10 16:04 ` Ludovic Courtès
2022-10-10 17:00 ` jgart
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84b87078a96fef786a827ff491c631fc@dismail.de \
--to=jbranso@dismail.de \
--cc=help-guix@gnu.org \
--cc=jgart@dismail.de \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.