From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vladimir Zhbanov Newsgroups: gmane.lisp.guile.user Subject: Re: G-Golf - Getting started Date: Mon, 12 Apr 2021 17:33:35 +0300 Message-ID: References: <7f98acdae617d7bd20fa3f8432cd7c087a695673.camel@mrc-lmb.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30037"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Apr 12 16:34:05 2021 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 1lVxdd-0007fk-CB for guile-user@m.gmane-mx.org; Mon, 12 Apr 2021 16:34:05 +0200 Original-Received: from localhost ([::1]:59964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVxdc-0004n4-ER for guile-user@m.gmane-mx.org; Mon, 12 Apr 2021 10:34:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVxdJ-0004mh-2y for guile-user@gnu.org; Mon, 12 Apr 2021 10:33:45 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:42535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVxdE-00077w-Ed for guile-user@gnu.org; Mon, 12 Apr 2021 10:33:44 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id l22so8276350ljc.9 for ; Mon, 12 Apr 2021 07:33:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=xCFAk+Ocz9pLMmA8Ap4548Csqvz4hqoVttp4dH44HRY=; b=rpRlZv2IuCR8VBqwnm6UQlJrkMw/RIqESn7gzw8Rtaag64YgjepX5GJAlt2kEiMT9h TJBxX0It+1YiagGgtwfh2asDKaU97KXrwvkIX7aJSo/3kXIaOiumZjoyBW2NA+V2y+G3 lC3MUA4M0qFVuPL/H+3UJS55et5TH+LWp9wiph/03ot8xG8CqA7aZOGDc9MgxRPHUMAy 97ybtqGvyssOK8e1vSCSl3NwEkTehkGQ4KfflpeW9F7p0i0nRAzXf18WA1/nNI9JZiMA Qau63wf1H4RI0TDN7a2avFHzsm26hPj1qJ1TxVuG9Vq/dwCWgppsM6VkycwVPHXyhTOz m58w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=xCFAk+Ocz9pLMmA8Ap4548Csqvz4hqoVttp4dH44HRY=; b=lIcyDeR2XljDk7Ud8wMD7bLx4gJR+X0uk1p61nE5F8SxPv8LzjUAPUwyASqL7Y8gJD isTns5KBNxhMBBAu+VQg3Y5Lx2WXIf5GCO1js6AAkloD2hStKIQdnqRBPQToj5z/rej2 efMFHBoQmdtkzQzkPQhdeYwaz43C+VM6YPjaeiyXCxgF8c6n76vB9T8a76WT5rKM4Jiy fVWvel57YUMWc9THn88Fn+tvQKnBjYkuYhgfBuIVb8b19Ao0jidMp11C/0Dm48xadnxw 9n7vRGSMhqjcHy0SY+Hl/S0LZBy1uZxEVmrEo3jbQgK5NOv33Jr2YQ7X/hLRC+isgoxG yMSA== X-Gm-Message-State: AOAM532ALo5MUzh/bPonUrC03QO6b78TguBUPTa1ZHkExgxpjXYv7Twf 5CTEp4W1qPzP90kaFAwXP+vyInEPvTQ= X-Google-Smtp-Source: ABdhPJzlMtye8Z3J+dkWGLalw5fZiIOcNo10AnyVj8W4DCY0C7WZJo8YZ8gJGKst2BQAwSOtjfbx5g== X-Received: by 2002:a05:651c:2c6:: with SMTP id f6mr2179194ljo.178.1618238017596; Mon, 12 Apr 2021 07:33:37 -0700 (PDT) Original-Received: from lepton ([95.179.127.120]) by smtp.gmail.com with ESMTPSA id z7sm2899371ljo.64.2021.04.12.07.33.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 07:33:36 -0700 (PDT) X-Google-Original-From: Vladimir Zhbanov Original-Received: from vzh by lepton with local (Exim 4.94) (envelope-from ) id 1lVxd9-009hsH-QL for guile-user@gnu.org; Mon, 12 Apr 2021 17:33:35 +0300 Mail-Followup-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: <7f98acdae617d7bd20fa3f8432cd7c087a695673.camel@mrc-lmb.cam.ac.uk> Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=vzhbanov@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, 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-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:17409 Archived-At: Hi Paul On Mon, Apr 12, 2021 at 12:35:58PM +0100, Paul Emsley wrote: > Hi G-Golfers, > > >From here: > https://www.gnu.org/software/g-golf/manual/g-golf.html > > > GNU G-Golf can be obtained from the following archive site http://ftp.gnu.org/gnu/g-golf/. The file will > be named g-golf-version.tar.gz. The current version is 0.1.0, so the file you should grab is: > > http://ftp.gnu.org/gnu/g-golf/g-golf-0.1.0.tar.gz > > This directory does not exist. > > So I used the git repo, built and installed. I extracted the hello-world example (attached) > > $ guile -s example-1.scm # takes about 7 seconds > guile -s example-1.scm > Backtrace: > 8 (apply-smob/1 #) > In ice-9/boot-9.scm: > 705:2 7 (call-with-prompt _ _ #) > In ice-9/eval.scm: > 619:8 6 (_ #(#(#))) > In ice-9/boot-9.scm: > 2312:4 5 (save-module-excursion _) > 3832:12 4 (_) > In g-golf/hl-api/function.scm: > 140:19 3 (_ . _) > In unknown file: > 2 (_ # # 3 …) > In g-golf/hl-api/closure.scm: > 255:8 1 (g-closure-marshal _ _ _ _ _ _) > In /home/paule/Projects/coot/git/g-golf/build/example-1.scm: > 14:4 0 (activate _) > > /home/paule/Projects/coot/git/g-golf/build/example-1.scm:14:4: In procedure activate: > In procedure module-lookup: Unbound variable: set-child > > Have I done something wrong? No, git-grep tells me there is no 'set-child' function in the g-golf repository. I've modified the example and it now works as expected, see below: ================================8<================================ ;; Load Gtk (use-modules (g-golf)) (gi-import "Gtk") ;; When the application is launched.. (define (activate app) ;; - Create a new window and a new button (let ((window (make #:title "Hello" #:application app)) (button-box (make )) (button (make #:label "Hello, World!"))) ;; - Which closes the window when clicked (connect button 'clicked (lambda (b) (close window))) (gtk-container-add window button-box) (gtk-container-add button-box button) (show button) (show button-box) (show window))) (let ((app (make #:application-id "com.example.GtkApplication"))) (connect app 'activate activate) (run app 0 '())) ================================>8================================ HTH, Vladimir