* limits for (export ...)
@ 2011-10-29 16:40 Pavel V. Kaygorodov
2011-10-29 17:51 ` Ian Price
2011-10-29 20:36 ` Ludovic Courtès
0 siblings, 2 replies; 7+ messages in thread
From: Pavel V. Kaygorodov @ 2011-10-29 16:40 UTC (permalink / raw)
To: guile-user
Hi!
My library has many (~80) symbols to export and I facing with strange problem when adding a new symbols to the export list -- some other symbols becomes "undefined" for a program using my library.
Does guile-2 limit the number of exported symbols for libraries?
WBR,
Pavel.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: limits for (export ...)
2011-10-29 16:40 limits for (export ...) Pavel V. Kaygorodov
@ 2011-10-29 17:51 ` Ian Price
2011-10-29 20:35 ` Ludovic Courtès
2011-10-29 20:36 ` Ludovic Courtès
1 sibling, 1 reply; 7+ messages in thread
From: Ian Price @ 2011-10-29 17:51 UTC (permalink / raw)
To: Pavel V. Kaygorodov; +Cc: guile-user
"Pavel V. Kaygorodov" <pavel.kaygorodov@gmail.com> writes:
> Does guile-2 limit the number of exported symbols for libraries?
I decided to generate a file with ~100 definitions.
; manysyms.scm
(define-module (manysyms)
#:export (sym0 sym1 ... sym101))
(define sym0 'sym0)
(define sym1 'sym1)
...
(define sym101 'sym101)
; test.scm
(use-modules (manysyms))
(write (list sym0 sym1 ... sym101))
And when I ran test.scm I got the expected output, so I'm not sure there
is.
Although, and I don't think this is related to your issue, when
trying out the (list sym0 ...) from the repl, I did get an error
scheme@(guile−user)> (list sym0 sym1 ... sym100 sym101)
;;; <stdin>:3:0: warning: possibly unbound variable `sy'
;;; <stdin>:3:0: warning: possibly unbound variable `m85'
<unnamed port>:3:0: In procedure #<procedure a08bf50 at <current input>:3:0 ()>:
<unnamed port>:3:0: In procedure module−lookup: Unbound variable: sy
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile−user) [1]> ,q
But further exploration shows that all the symbols are in fact bound,
and this error only seems to occur if there is no line break at some
point after sym8 and before sym85. Presumably, I'm running up against
some reader limit there.
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: limits for (export ...)
2011-10-29 17:51 ` Ian Price
@ 2011-10-29 20:35 ` Ludovic Courtès
2011-10-29 22:50 ` Ian Price
0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2011-10-29 20:35 UTC (permalink / raw)
To: guile-user
Hi,
Ian Price <ianprice90@googlemail.com> skribis:
> Although, and I don't think this is related to your issue, when
> trying out the (list sym0 ...) from the repl, I did get an error
>
> scheme@(guile−user)> (list sym0 sym1 ... sym100 sym101)
> ;;; <stdin>:3:0: warning: possibly unbound variable `sy'
> ;;; <stdin>:3:0: warning: possibly unbound variable `m85'
> <unnamed port>:3:0: In procedure #<procedure a08bf50 at <current input>:3:0 ()>:
> <unnamed port>:3:0: In procedure module−lookup: Unbound variable: sy
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile−user) [1]> ,q
>
> But further exploration shows that all the symbols are in fact bound,
> and this error only seems to occur if there is no line break at some
> point after sym8 and before sym85. Presumably, I'm running up against
> some reader limit there.
Weird. I can’t reproduce it this way:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (use-modules(srfi srfi-1))
scheme@(guile-user)> (define syms (unfold (lambda (i) (> i 1234)) (lambda (i) (string->symbol (format #f "sym~a" i))) 1+ 0))
scheme@(guile-user)> (define s (with-output-to-string (lambda () (write syms))))
scheme@(guile-user)> (equal? syms (call-with-input-string s read))
$6 = #t
--8<---------------cut here---------------end--------------->8---
Could you see if you can find a way to reproduce the problem?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: limits for (export ...)
2011-10-29 20:35 ` Ludovic Courtès
@ 2011-10-29 22:50 ` Ian Price
2011-10-29 23:09 ` Ian Price
0 siblings, 1 reply; 7+ messages in thread
From: Ian Price @ 2011-10-29 22:50 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-user
ludo@gnu.org (Ludovic Courtès) writes:
> Could you see if you can find a way to reproduce the problem?
Actually, this turns out to be an issue with geiser not guile. Sorry
about that.
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: limits for (export ...)
2011-10-29 22:50 ` Ian Price
@ 2011-10-29 23:09 ` Ian Price
2011-10-31 21:07 ` Thien-Thi Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: Ian Price @ 2011-10-29 23:09 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-user
Ian Price <ianprice90@googlemail.com> writes:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Could you see if you can find a way to reproduce the problem?
> Actually, this turns out to be an issue with geiser not guile. Sorry
> about that.
Well, it's not fair to just blame geiser, it's the same if I run guile
in M-x shell, but works just fine in gnome-terminal. It seems to split a
line at a given length, which means that if a symbol is crossing those
that length, it is split in two.
e.g. here a... is 501 characters long
scheme@(guile−user)> (define aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 501)
While compiling expression:
ERROR: Syntax error:
unknown file:75:0: source expression failed to match any pattern in form (define aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a 501)
but if I try the same thing with e.g. echo in M-x shell, then I don't
have a problem. Anyone got any hints on where I should be looking?
--
Ian Price
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: limits for (export ...)
2011-10-29 16:40 limits for (export ...) Pavel V. Kaygorodov
2011-10-29 17:51 ` Ian Price
@ 2011-10-29 20:36 ` Ludovic Courtès
1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2011-10-29 20:36 UTC (permalink / raw)
To: guile-user
Hi,
"Pavel V. Kaygorodov" <pavel.kaygorodov@gmail.com> skribis:
> My library has many (~80) symbols to export and I facing with strange
> problem when adding a new symbols to the export list -- some other
> symbols becomes "undefined" for a program using my library. Does
> guile-2 limit the number of exported symbols for libraries?
No, there’s no such limit.
Could you try to come up with an example that reproduces the problem?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-31 21:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 16:40 limits for (export ...) Pavel V. Kaygorodov
2011-10-29 17:51 ` Ian Price
2011-10-29 20:35 ` Ludovic Courtès
2011-10-29 22:50 ` Ian Price
2011-10-29 23:09 ` Ian Price
2011-10-31 21:07 ` Thien-Thi Nguyen
2011-10-29 20:36 ` Ludovic Courtès
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).