From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dave Musicant via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Re: Trying to understand trace limit Date: Sat, 3 Oct 2020 15:39:01 -0500 Message-ID: References: Reply-To: Dave Musicant Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9871"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: guile-user To: =?UTF-8?Q?Aleix_Conchillo_Flaqu=c3=a9?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Oct 03 22:39:25 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOoJQ-0002TF-Fa for guile-user@m.gmane-mx.org; Sat, 03 Oct 2020 22:39:24 +0200 Original-Received: from localhost ([::1]:37636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOoJP-0001Jp-EY for guile-user@m.gmane-mx.org; Sat, 03 Oct 2020 16:39:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOoJB-0001JZ-CY for guile-user@gnu.org; Sat, 03 Oct 2020 16:39:10 -0400 Original-Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]:43389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOoJ8-0004GQ-6w for guile-user@gnu.org; Sat, 03 Oct 2020 16:39:08 -0400 Original-Received: by mail-il1-x12a.google.com with SMTP id e5so4472805ils.10 for ; Sat, 03 Oct 2020 13:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=carleton.edu; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=RDcEVWi+GFnV3LzEYml8U/lwIGdvmBRtUM8PppnB5+8=; b=YpiSOULx58B+Cqgvki2Iy8HwqyG/fxtoBZNOiVUA/Fo5F+FuEHAqym/GXyJX+XsYLf OndsTG7lmlRt8zyzOxBEieRrw/qAOOwZSFrzL8M7ET+PMCqIOQgT7Fc5ccyZY1Q0FOby 5yCFZMDWUhBucOkcW7c/veVX0zS8E7cr1l3lU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=RDcEVWi+GFnV3LzEYml8U/lwIGdvmBRtUM8PppnB5+8=; b=goizj8SyK/mV5OuORFsK55JqoNZICWgfUzFOq1/74gsc0djBqPTsRv+FeS7AdfKkz3 68GxRgZb0cfP4Ks/oN/YZavHFrUAyDGRayZbZT7pKJ+X8ub6JGbxi+LUZMuxmXV4gdnt Hu2SWSCAChHlxZA+ow5gFMMeBROO0ar60fdE//n6ZzsP6MFWIdevKvG2pQs2iprz0OkK IjO4+FYiS9tpZ21hFi90hEsCr9h2IXNdXb66sd/NsFBBrvrM+ZjstH+v8UUMvuLBjhFf 4cmCZ/N5CMiSBj9Tu4Ri7nWH3e1GS/x3T9Yx2wdqZ8ShjLCLa0HoeFwKiz/uljSF0o9S 3ggw== X-Gm-Message-State: AOAM530gLZ4/PIK3FJvye0nUXBjAx9Tc1iVup77UOpXSFgmoAD7Pfuql GcXJzB4XfklvRFzIMDSGiX+I4pq0WHJJk5yxnK7933i48V12IZ92zKl6efsR9vX1rOYmp1zEtiO 5wk7U/BByMCg4wFCv1F4orZxJgp9/BHjlJyKQj/0f0dzvH5VjonDirpUSUDDLZBKaMw== X-Google-Smtp-Source: ABdhPJwfTCxVJCtjQURVID3d/GLKUYAtaOi84BhxTcWklDOJ1mcKuQ0hu8TUwjb/b+/X9/sYjItpmw== X-Received: by 2002:a92:c951:: with SMTP id i17mr6006400ilq.158.1601757543496; Sat, 03 Oct 2020 13:39:03 -0700 (PDT) Original-Received: from [192.168.1.115] (066-188-189-106.res.spectrum.com. [66.188.189.106]) by smtp.gmail.com with ESMTPSA id p65sm3210103ill.23.2020.10.03.13.39.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Oct 2020 13:39:02 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::12a; envelope-from=dmusicant@carleton.edu; helo=mail-il1-x12a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.252, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16957 Archived-At: I'm using Guile 2.2.7, under Ubuntu 20.04. -- Dave On 10/3/20 2:15 AM, Aleix Conchillo Flaqué wrote: > > Hi Dave, > > On Mon, Sep 28, 2020 at 10:06 AM Dave Musicant > wrote: > > Hi all, > > I'm seeing some strange behavior with tracing code, which I'd love > some > help understanding. I've boiled it down to the following > simplified example: > > (define count >    (lambda (n) >      (if (equal? n 1) 1 >          (+ 1 (count (- n 1)))))) > > ,tr (count 92) > > > When I run the above code (in a fresh Guile instance, via redirecting > from a file), the trace runs to completion. > > However, when I run this version of the code from a file, which > runs the > function twice... > > (define count >    (lambda (n) >      (if (equal? n 1) 1 >          (+ 1 (count (- n 1)))))) > > ,tr (count 10)   ; runs to completion > ,tr (count 92)   ; dies mid-trace > > > ... then the trace dies when it runs the second time, in something > that > must be some sort of stack overflow, though the error is fairly > cryptic: > > While executing meta-command: > In procedure +: Wrong type argument in position 1: # > > What's happening from a memory perspective where tracing the code the > first time affects how much memory is available for the second > time? It > seems that the first run shouldn't affect the stack limit of the > second, > but something is going on. > > Thanks for the help. > Dave > > > I've tried it with Guile 3.0.4 (in macOS) and I didn't get this error. > What version of Guile and OS are you using? > > Aleix >