From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Beginner questions Date: Tue, 30 Oct 2018 09:27:19 -0400 Message-ID: <87pnvrk1il.fsf@netris.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540906036 17529 195.159.176.226 (30 Oct 2018 13:27:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Oct 2018 13:27:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: guile-user@gnu.org To: swedebugia Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Oct 30 14:27:12 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHU35-0004PT-NX for guile-user@m.gmane.org; Tue, 30 Oct 2018 14:27:11 +0100 Original-Received: from localhost ([::1]:53291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHU5C-0001Tw-3o for guile-user@m.gmane.org; Tue, 30 Oct 2018 09:29:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHU4g-0001Ln-Gy for guile-user@gnu.org; Tue, 30 Oct 2018 09:28:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHU4c-0001Sl-0D for guile-user@gnu.org; Tue, 30 Oct 2018 09:28:50 -0400 Original-Received: from world.peace.net ([64.112.178.59]:34530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHU4a-0001Aj-7r for guile-user@gnu.org; Tue, 30 Oct 2018 09:28:44 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHU41-0005W9-HZ; Tue, 30 Oct 2018 09:28:09 -0400 In-Reply-To: (swedebugia's message of "Mon, 29 Oct 2018 23:00:33 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.112.178.59 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14953 Archived-At: Hi, swedebugia writes: > I would like to learn more scheme and I would like to make a small CLI > program that runs in the terminal and prompts the user for input and > evaluates it. This sounds like a description of Guile's REPL itself. Are you looking to implement your own simple REPL for educational purposes? > Is that possible with guile? In the REPL? Yes and yes. > Can someone point me in the right direction for succeding with that? Here are some relevant sections of the Guile manual to get started: https://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html https://www.gnu.org/software/guile/manual/html_node/Read_002fLoad_002fEval_002fCompile.html https://www.gnu.org/software/guile/manual/html_node/Line_002fDelimited.html https://www.gnu.org/software/guile/manual/html_node/Strings.html The first link gives several small examples of Guile scripts. The second documents procedures to read, evaluate, and print S-expressions, and in particular the 'read', 'eval', and 'write' procedures, which are the three main components of a REPL. The third link documents procedures to read a single line of input as a string, and the fourth documents the string operations. Would you like to start by looking over these sections of the manual, and then asking more questions as they arise? Mark