From: Puneet <schemer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: GNU Guile 1.8.3 released
Date: Wed, 17 Oct 2007 15:59:19 +0530 [thread overview]
Message-ID: <590516e30710170329j129809d0v81deffdb2247a0c9@mail.gmail.com> (raw)
In-Reply-To: <87zlyiuby4.fsf@chbouib.org>
[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]
Greetings
Let me first express my gratitude for the continued development of
Guile. Speed improvements in the new version are noticeable.
I have just compiled the new guile version. It all works fine, but I
am facing a peculiar problem with my application. There was no such
problem with the previous version of guile. Looks like there is some
small glitch in the new scheme reader/parser.
Let me first explain what I am trying to do in my application. I am
using the sockets to open a TCP/IP port. Then I attach a top-repl to
it and wait for guile commands over the TCP. I am attaching the log of
my interactive sessions (one where guile is launched and the telnet
session to feed guile commands). Please let me know if you need any
other information to replicate the bug or to debug.
Many thanks and Regards
Puneet
########## Guile session -- serv.scm file is attached to the email
$ guile --version
Guile 1.8.3
Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007 Free Software Foundation
Guile may be distributed under the terms of the GNU General Public Licence;
certain other uses are permitted as well. For details, see the file
`COPYING', which is included in the Guile distribution.
There is no warranty, to the extent permitted by law.
$ guile serv.scm
071017 15:40:45: Opening connection from 127.0.0.1 at port 34196
########## Telnet Session on same machine but different terminal
$ telnet localhost 12345
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
guile> (define a 'foo)
guile> a
}#ROR: Unbound variable: #{a\
ABORT: (unbound-variable)
guile> (use-modules (ice-9 pretty-print))
guile> (pretty-print '(1 2 3))
(1 2 3)
guile> (pretty-print
'(1 2 3))
}#ROR: Unbound variable: #{pretty-print\
ABORT: (unbound-variable)
guile> (pretty-print a)
foo
guile>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: serv.scm --]
[-- Type: text/x-scheme; name="serv.scm", Size: 2264 bytes --]
(define-module (txc utils serv)
#:use-module (ice-9 threads)
#:use-module (ice-9 format)
#:export (start-repl
exit-repl
start-repl-no-thread))
(define (server-report action conn p)
(display (strftime "%y%m%d %H:%M:%S: " (localtime (current-time))) p)
(display action p)
(display " connection from " p)
(display (inet-ntoa (vector-ref conn 1)) p)
(display " at port " p)
(display (vector-ref conn 2) p)
(newline p))
(define user-repl-interactive-flag #f)
(define (start-repl server-port)
(let ((o (current-output-port))
(port (socket AF_INET SOCK_STREAM 0)))
(setsockopt port SOL_SOCKET SO_REUSEADDR 1)
(bind port AF_INET INADDR_ANY server-port)
(listen port 10) ; Queue up to 10 requests.
(select (list port) '() '())
(set! user-repl-interactive-flag #t)
(let ((p (accept port)))
(begin-thread
(server-report "Opening" (cdr p) o)
(server-repl (car p))
(server-report "Closing" (cdr p) o)
(close-port (car p)))
(while user-repl-interactive-flag
(usleep 1000)))))
(define exit-repl
(lambda ()
(set! user-repl-interactive-flag #f)
(exit)))
(define (start-repl-no-thread server-port)
(let ((o (current-output-port))
(port (socket AF_INET SOCK_STREAM 0)))
(setsockopt port SOL_SOCKET SO_REUSEADDR 1)
(bind port AF_INET INADDR_ANY server-port)
(listen port 10) ; Queue up to 10 requests.
(select (list port) '() '())
(set! user-repl-interactive-flag #t)
(let ((p (accept port)))
(server-report "Opening" (cdr p) o)
(server-repl (car p))
(server-report "Closing" (cdr p) o)
(close-port (car p)))
))
;; As we are not running a Guile shell and we run things by way of
;; shells only, it is perfectly fine to not revert to the original
;; input/output ports.
(define (server-repl p)
;; (let ((i-port (current-input-port))
;; (o-port (current-output-port))
;; (e-port (current-error-port)))
(set-current-input-port p)
(set-current-output-port p)
(set-current-error-port p)
(top-repl)
;; (set-current-input-port i-port)
;; (set-current-output-port o-port)
;; (set-current-error-port e-port))
)
(start-repl 12345)
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2007-10-17 10:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 18:54 GNU Guile 1.8.3 released Ludovic Courtès
2007-10-17 10:29 ` Puneet [this message]
2007-10-17 18:06 ` Neil Jerram
2007-10-17 21:14 ` Neil Jerram
2007-10-17 21:30 ` Neil Jerram
2007-10-17 22:10 ` Ludovic Courtès
2007-10-18 6:06 ` Puneet
2007-10-17 22:05 ` Ludovic Courtès
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=590516e30710170329j129809d0v81deffdb2247a0c9@mail.gmail.com \
--to=schemer@gmail.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).