> (if (not (defined? 'ToggleFiguredBassMode::Active))
> (define ToggleFiguredBassMode::Active #f))
>
> The intention is to have a variable defined at the top level which
> starts out being #f. The need for the construct arose because it
> appears in a self-contained script which cannot expect
-[ Fri, Nov 16, 2012 at 02:54:50PM +0100, Panicz Maciej Godek ]
> And now I have a problem: the modules that I wrote make use
> of the symbols defined by my application (using scm_c_define...),
> but they are unavailable outside my application, i.e. for external
> modules.
>
> The result is th
-[ Tue, Sep 11, 2012 at 11:45:51PM +0200, Ludovic Courtès ]
> l...@gnu.org (Ludovic Courtès) skribis:
>
> > We basically want ???mkdir -p???, but we can even omit the stat(2) call upon
> > EEXIST, because if DIR doesn???t point to a directory, the error will be
> > caught soon after anyway.
>
I'm refering to the ensure-writable-dir function.
I've stumbled upon this problem recently : I have a program that's suid root
but calls guile. The guile compiler then creates some directories in
.cache/guile but then check (with access()) that he can write in there, which
he can't since access rev
-[ Thu, Apr 26, 2012 at 05:04:23PM -0400, Noah Lavine ]
> > I use it daily and it's working allright.
> > I'd have a closer look to the libffi you used to compile guile
> > if I were you.
>
> What version of Guile do you use it with?
2.0.2.224-b1a52-dirty compiled with libffi 5.0.10
> Is guile-sqlite3 actually in such a shape that it might be useful for
> curious testers?
I use it daily and it's working allright.
I'd have a closer look to the libffi you used to compile guile
if I were you.
> After working on the docs I intend attaching agent support to allow
> extending any guile enabled app with an snmp agent.
Regarding this, were you aware of https://github.com/securactive/guile-agentx ?
-[ Tue, Jan 10, 2012 at 10:15:54PM +0100, Andy Wingo ]
> Why not use program-arguments-alist, or program-lambda-list?
Because they were not in the procedure index, hence the attached patch.
>From 6637ce41e5e8cbfefe4c14c47ac79c7a3f5a6cfe Mon Sep 17 00:00:00 2001
From: Cedric Cellier
Date: Wed
I'm trying to get a list of parameter names from a function, using this:
(use-modules (system vm program))
(define (val->string v)
(if (string? v) v (object->string v)))
(define (fun-params fun)
(let ((bindings (program-bindings fun)))
(map (lambda (binding) (val->string (binding:name bind
Thank you to both of you for the explanations and for looking
for a solution so quickly.
Anyway, I changed my code to not use this evil multiple value feature and I
think I will keep away from this. Returning a list seams so much natural.
Do you need me actualy fill a bugreport?
Is it normal that this:
(or (values 'a 'b) 'c)
returns two values ('a and 'b) while this:
(or (values 'a (lambda (port) #f)) 'c)
returns only one ('a)?
Isn't it a bug?
-[ Fri, Dec 02, 2011 at 07:41:40AM -0500, Paul Smith ]
> On Fri, 2011-12-02 at 11:41 +0100, ri...@happyleptic.org wrote:
> > $ find where-your-files-are -type f -name '*.scm' |
> > while read f; do echo '; coding: iso-8859-1' > $f ; done
>
> Boy I _really_ don't think you want to do th
-[ Fri, Dec 02, 2011 at 09:06:07AM +0100, Sven Hartrumpf ]
> How can I avoid to add this comment line to all the other files
> which are currently included by the master file using "load"?
You very possibly have better reasons to refuse to add this line
to your files than the mere trouble of t
Thank you all for your responses.
The target audience of the newsletter I was contemplating being free
software hackers rather than inexperienced programmers, I don't think
a wiki, a stackoverflow-style website nor a web forum would suit ; In
essence because the information that would be provided
Warning, non-technical ramblings incoming.
In your opinion, how does guile user community compare (in size) with other
free schemes user communities? I am under the impression that guile user base
is somewhat smaller than chicken' or racket', but to what extent? And how
could we roughly figure th
-[ Wed, Nov 23, 2011 at 08:28:56PM +0800, Nala Ginrut ]
> I think there's no such a given function in Guile to do this.
> But you can make it in a easy way in Guile:
> (catch 'system-error
> (lambda () (execlp "asdfasdf"))
> (lambda (k . e)
> (format #t "oh no~%~")))
>
> PS:
-[ Tue, Nov 22, 2011 at 05:34:00PM -0600, Ariel Rios ]
> Hello,
>
> So after battling to compile g-wrap (I needed a macro in gettext) I
> have bee able to install guile-gnome but I am getting:
>
> [ariel@~/src/guile-gnome-platform/gtk/examples/tutorial]$
> guile-gnome-2 -l hello.scm
> ;;; not
Here is a minimal example reproducing the problem.
Note that it only fails the first time (when scheme.scm is compiled).
Note: I put bug-guile on CC, hoping it will not trash the attachments,
because with this example I'm starting to believe there is something
wrong going on.
CFLAGS += $(shell gu
-[ Mon, Nov 21, 2011 at 10:26:07AM +0100, ri...@happyleptic.org ]
> But on my dev machine (where I use a guile from the
> stable-2 branch) it always worked.
Actually, it always worked because my setup was slightly different
and not because of the different version of guile, since it failed
as
Hello list !
I'm using guile 2.0.2.4-17047 in production and noticed a strange
problem when my program try to compile some expression ; namely,
this exception:
In language/glil/spec.scm:
32: 4 [compile-asm # # ()]
In language/glil/compile-assembly.scm:
275: 3 [compile-assembly #]
In srfi/srfi-
-[ Wed, Nov 16, 2011 at 11:43:52AM -0800, Mike Gran ]
> I believe that you can still run the whole test suite on the C evaluator
> by erasing all the .go files from the modules lib, setting auto compile off,
> then running the check-guile script.
I though it would run the evaluator written in
Very good then.
Forget about my remark then.
-[ Wed, Nov 16, 2011 at 10:31:31AM +0100, Andy Wingo ]
> If I bootstrap Guile-X from Guile-Y, I have to make sure that Guile-X's
> code can load in Guile-Y -- not trivial -- and I have to trust the
> output of Guile-Y.
You have to make sure that the evaluator that's written in scheme
can be ru
According to the doc, guile currently maintain 3 evaluators:
- the new VM
- an evaluator written in scheme
- the old C evaluator, used for bootstrapping the compiler.
That's a lot of code just to bootstrap the compiler. Why not bootstrapping the
compiler from either previous installed guile or (
-[ Fri, Sep 02, 2011 at 04:07:47PM +0100, Brian Gough ]
> I'm thinking of publishing a printed edition of the Guile manual - but
> it only makes sense if there's enough interest from Guile users who like
> printed books.
Any news about this?
Now that I've replied to your last message, I think I've spotted the bug:
-[ Tue, Oct 25, 2011 at 08:34:23PM +, Whitlock, Bradley D ]
> {
> // Storage for temporary string
> char* s = NULL;
> scm_dynwind_begin (0);
> scm_dynwind_unwind_handler (free, s, SCM_F_WIND_EXPLICITLY);
>
>
> {
> // Storage for temporary string
> char* s = NULL;
>
> scm_dynwind_begin (0);
> s = scm_to_locale_string (scm_val);
>
> fstWriterEmitValueChange(SCM_TO_CTX (scm_ctx),
> SCM_TO_FSTHANDLE (scm_fsthandle),
> s);
> scm_dynwind_free (s
> Did you know that Coq would only compile a function when it can prove
> that it terminates? That???s another kind of compiler-supported proof one
> quickly gets used to.
It's funny how researchers are concerned by proofs that a program
terminates, while most engineers try hard everyday to desig
Your critique about C values that can be made invalid (through lack of
proper initialization or erroneous cast) are of course valid but sounds
quite rhetorical, since in practice, in my experience, this does not
cause many bugs (yet I'm sure you could site several examples of such
bugs). What's of
Couldn't one use vm hooks to perform that?
I mean, a hook that's fed with a list of addresses where to stop if some
condition are met, and that would just wait for the condition to be
cleared before proceeding? Then one could alter these conditions from
another thread?
-[ Thu, Oct 13, 2011 at 12:22:46PM +0200, Andy Wingo ]
> Much respect to the late Ritchie, but C is a dangerous language that has
> negative impacts on the real world. We need to stop writing code that
> launches the missiles (or, more likely, installs malicious keylogging
> darknets) if your
-[ Thu, Oct 13, 2011 at 01:56:32AM +0200, Jose A. Ortega Ruiz ]
> Couldn't you use the FFI?
While FFI makes indeed things simplier, it's only one part of the story.
Scheme/C integration involves also:
- main() func can be C or Scheme (in order to slowly goes from C to Scheme)
- Scheme runtime
> > but it's primary goal is to be an extension language, a companion for
> > another C/C++ program, or at best an orchestrator of business oriented
> > code.
>
> I really hope that that's not Guile's primary goal these days (and my
> understanding is that it is not): i wouldn't be much interested
-[ Wed, Oct 12, 2011 at 10:54:11AM -0400, John Lewis ]
> I don't understand while Guile is so slow. According to these
> benchmarks
> http://www.cs.utah.edu/~mflatt/benchmarks-20100126/log3/Benchmarks.html
> GNU Guile is running about a order of magnitude slower than Bigloo,
> Chicken, Gambit,
Hello guilers!
Just to report that from this page:
http://www.gnu.org/software/guile/manual/html_node/Locales.html#Locales
Then the "Locales and Internatioanlization" link leads to a 404 error
(looking for:
http://www.gnu.org/software/guile/manual/libc/Locales.html#Locales
)
-[ Sun, Sep 04, 2011 at 12:18:15PM +0200, Andy Wingo ]
> > Actually 1.8 has a serious problem when it comes to multi-threading:
> > memoization, which modifies the source code tree structure, is not
> > thread-safe.
>
> Yeah, at this point I think that you really should be using 2.0 if you
> a
-[ Fri, Sep 02, 2011 at 11:26:42AM +0200, ri...@happyleptic.org ]
> Or maybe the deadlock involves another lock in addition to
> this one. I'm going to turn scm_i_port_table_mutex into a recursive
> mutex in order to try to invalidate my theory.
initializing scm_i_port_table_mutex as a recursi
-[ Fri, Sep 02, 2011 at 11:26:42AM +0200, ri...@happyleptic.org ]
> > For 1.8, could you try running Helgrind and see what happens?
> ==26762== Thread #1: Exiting thread still holds 1 lock
> ==26762==at 0x5A81B4D: waitpid (waitpid.c:41)
> ==26762==by 0x4F0A289: scm_waitpid (posix.c:560)
> For 1.8, could you try running Helgrind and see what happens?
Helgrind complains about loads of 'possible data race' but does not
detect anything wrong when the actual deadlock occurs. When I exit
the program it does tell that a threads still own some lock, but
does not reveal the addresses of t
-[ Thu, Sep 01, 2011 at 11:45:37PM +0200, Ludovic Courtès ]
> Hi Cédric,
>
> ri...@happyleptic.org skribis:
>
> > I attached 2 files:
> >
> > - "guile deadlock.scm > /tmp/log" deadlocks after around 12k lines of
> > output for me
>
> AFAICS the problem does not occur with Guile 2.0.
> For 1
> > #1 ports are not thread safe (and any other thread safety issues) ;
>
> In general I think this issue needs to be split up between issues with
> port buffers and other issues; while it might be helpful to you to have
> a tracker bug, it's not helpful to me to conflate things that require
> dif
he shell can open/dup the file additional files you explicitly
ask for, but the point is that it will nonetheless closes the file
descriptors it is using itself. For instance my shell is using these
files :
$ ls -l /proc/$(pidof zsh)/fd
lrwx-- 1 rixed rixed 64 Aug 31 09:25 0 -> /dev/tty1
lrwx-
Your arguments are very convincing, sir.
-[ Tue, Aug 30, 2011 at 05:55:22PM +0200, Ludovic Courtès ]
> Like in C, it???s up to the application to close those ports that it
> considers worth closing upon exec.
I was under the impression that the idiom was to close all files before
execing a coprocess, but I just checked POSIX popen, R
The problem is not that the *ports* are not closed (they are), but that
the other *files* (that are not port) are not closed.
When a program exec another one, it's supposed to close all files but 0,
1 and 2. open-process only closes the ports, so if you have other files
opened (that you have opene
-[ Mon, Aug 29, 2011 at 10:35:20PM +0800, Nala Ginrut ]
> On Mon, Aug 29, 2011 at 8:50 PM, wrote:
>
> #4 fork does not close all open files.
> >
>
> well, I got the same question, will fork auto close in Guile or should I
> close it myself?
Sorry I did not report the problem very well. The
Hello !
I'm still annoyed by the runtime bugs related to ports/threads at work,
so I can devote some time to work on it.
So far, the pending problems are, in order of importance for me :
#1 ports are not thread safe (and any other thread safety issues) ;
#2 fork may freeze in some occurrence ;
#
-[ Tue, Aug 23, 2011 at 12:36:44PM +0100, Richard Shann ]
> I have defined a function with one needed and one optional arg, using
>
> scm_c_define_gsubr (name, 2, 0, 0, callback);
You mean :
scm_c_define_gsubr (name, 1, 1, 0, callback);
don't you ?
> The problem is that the compiler, while compiling test.scm, sees no
> syntax declaration of `without-exception', and therefore assumes that
> `without-exception' is simply a top-level variable.
So, according to you, should I fill a bug report or I am overusing the
load directive ?
test.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/rixed/src/sact.junkie/test.scm
;;; /home/rixed/src/sact.junkie/test.scm:2:0: warning: possibly unbound
variable `without-exception'
;;
-[ Sat, Aug 13, 2011 at 01:26:03AM -0400, Ken Raeburn ]
> ("Is for some reason invalid" is not very descriptive; please include
> specific compiler messages.)
Sorry ; the specific error message was, you guesssed it right:
"initializer element is not constant".
> That syntax -- the parenthesi
Between stable-2.0 and master a patch changed the C representation
of the SCM type so that it is now a union.
This code :
static SCM foo = SCM_UNSPECIFIED;
now expands to something similar to :
static SCM foo = (SCM) { ... };
This form (casting a struct or union initializer while initializing
Should I file a bug report at savannah, then?
> > - all ports are closed, but what about other open files that are not
> > ports ? My application opens many files in C that are not known to
> > guile. Shouldn't these be closed as well ?
> >
> From this, I gather you have a C application that has Guile embedded,
> right?
Yes.
> (...) it c
Hello !
Sometime, my progam calls open-input-pipe and the forked child hangs
waiting for a lock (so after the fork but before executing the command).
So I read the code for open-process, especially what happens between the
fork and the execlp, and I noticed several potential problems :
- all por
Well, the bug is more annoying than previously though since guile use
select on various ports internally.
The attached patch fixes all occurrences of such uses.
The scm_std_poll function API is ugly, though.
I'd really like this issue being addressed in current guile branch
either with this patch
-[ Wed, Jun 22, 2011 at 04:31:06PM +0200, Ludovic Courtès ]
> We could/should apply it, but I must admit I feel little motivation to
> push another 1.8 release.
I can understand.
BTW, the same patch apply to master as well.
-[ Wed, Jun 22, 2011 at 10:34:42AM +0200, ri...@happyleptic.org ]
> Here is attached a patch over 1-8-8 that seams to fix the problem (I'm
> going to test it more thoughtfully).
Works for me.
Here is attached a patch over 1-8-8 that seams to fix the problem (I'm
going to test it more thoughtfully).
What do you think of the approach?
diff --git a/configure.in b/configure.in
index 217ac83..ea26b5c 100644
--- a/configure.in
+++ b/configure.in
@@ -661,7 +661,7 @@ AC_CHECK_HEADERS([complex.
Ok, the problem is straightforward: fport_input_waiting is using select
with a predefined SELECT_SET_SIZE of 1024. Although guile does not see
the many files used by the applications, it may ends up with a file
descriptor whose number is bigger than that. Then the select will
block forever.
Increa
dangi.happyleptic.org with esmtp
(Exim 4.72) (envelope-from ) id 1QWNyn-0003OY-51 for
guile-user@gnu.org; Tue, 14 Jun 2011 09:24:05 +0200
Received: from rixed by ccellier.rd.securactive.lan with local (Exim 4.72)
(envelope-from ) id 1QWNwF-00041G-0V for
guile-user@gnu.org; Tue, 14 Jun 2011 09:21:27
Hello happy hackers!
I'm using guile (1.8.7) to extend an application (written in C) that
writes on many opened file descriptors (usually 5000 files opened at
once).
Amongst other things, guile is listening on a socket to serve user'
commands (kind of embedded REPL).
When many files are opened,
-[ Mon, May 09, 2011 at 11:34:21AM +0200, r...@tuxteam.de ]
> But that talk was about symbols (which might well go aut of scope), im
> asking about _keywords_ whose semantics seem to be different.
Sorry I'm too new to notice the difference.
-[ Mon, May 09, 2011 at 11:14:11AM +0200, r...@tuxteam.de ]
> am I correct in assuming that the return value from
> scm_from_locale_keyword("unknown");
> won't ever be garbage collected od do I have to protect
> it?
>From an IRC discussion some time ago:
16:1
> > Something similar to python's twisted would be extra cool IMO.
>
> I don't know much about it, but serveez might be going in that
> direction.
Unfortunately, from a quick fly-by of serveez manual I wouldn't say so.
While, from some high level viewpoint, twisted can be seen as a mere
server b
-[ Tue, Apr 26, 2011 at 11:21:42AM +0200, Andy Wingo ]
> > is there a library for requesting an url? and get the contents?
> > like python's http://docs.python.org/library/urllib.html
>
> Not yet, no. There exist libraries for URIs and HTTP requests and
> responses, but Guile doesn't have a
I'm using guile in for configuring a "real time" application (a
sort of network sniffer) as well as offering some kind of live
introspection of the internals of the program.
This program is not allowed to stop working during garbage collection
either.
With Guile 1.8, only the guile threads are sto
-[ Fri, Apr 01, 2011 at 01:16:31PM +0200, Roberto Rosetti ]
> On 04/01/2011 12:45 PM, ri...@happyleptic.org wrote:
> > -[ Fri, Apr 01, 2011 at 11:24:29AM +0200, Paolo Bonzini ]
> >> GNU Smalltalk 4.1 has been released at
> >>
> >> * ftp://ftp.gnu.org/gnu/smalltalk/smalltalk-4.1.tar.gz
> >>
-[ Fri, Apr 01, 2011 at 11:24:29AM +0200, Paolo Bonzini ]
> GNU Smalltalk 4.1 has been released at
>
> * ftp://ftp.gnu.org/gnu/smalltalk/smalltalk-4.1.tar.gz
> SHA1 checksum: 617072696c277320666f6f6c2773206865726521
Cannot find it. Not there yet?
Maybe touching these file triggered a required rebuild.
So the bug would be a missing dependency in the makefiles?
-[ Mon, Feb 07, 2011 at 01:58:07PM -0800, Andrew Pinski ]
> > The problem is : of these 64 bits, only the 32 lowest bits were set by
> > guile, and the upper 32 are desperately random.
>
> How were those lower 32bits set? If set by the 32bit instructions
> then it is automatically sign extend
Hello!
I encountered a bug running guile test-suite on MIPS n32. I think I understand
enough to explain it, yet I don't really know who to blame for the bug. I tend
to think that the error belongs to libffi but I'm unsure as I don't know how
one is supposed to use libffi.
The bug hits in this sit
General 2cents:
If you have multiple guile scheme, don't.
If you keep any SCM value across a call to scm_function(), protect it
from the GC.
Sorry, my bad, I just can't read code (hopefully I'm paid to /write/ some :-))
-[ Fri, Sep 17, 2010 at 11:03:13PM +0200, Thien-Thi Nguyen ]
> Perhaps you can make a port first; then use ???port->fdes???
> for file-descriptor based access; then close the port.
Wait a minute, you can close a port ?
... check check check ...
Ooookay. I might be blind somehow : Althoug I
> If you should read only one, then only SICP (and watch the videos).
Out of curiousity, what's interresting about the videos ?
I tested it on the various hardware around and the only problem I
encountered was that on a busybox/ARM some Makefiles are relying on gnu
touch (using options -r and -t) which was not available under the name
"touch" but gtouch (installed separately from busybox). This could have
been simplier with
> Guile 1.9's interpreter is slower than 1.8's interpreter, but 1.9 has a
> compiler, and compiled Scheme runs much faster than 1.8.
"much faster" is very nice to hear !
> You're probably not hitting the compiler for some reason. (...)
> To work around it for now, call `load' from scheme. I know
> The same goes for Scheme code. If you have found something in `format'
> that is not thread-safe, do let us know.
Well, apparently for format this was already known, see the last sentence of
this old msg from Marius Vollmer :
http://www.mail-archive.com/bug-gu...@gnu.org/msg01949.html
But if
Hello !
Frequently, our C program computes a set of approximately 50 values that it
wants
to make accessible for a user defined call back so that the user can choose to
print some of these values (if some condition is met for instance).
I first thought to make some C functions accessible that wo
Suppose I have a multithreaded C program. Isn't the guile environment supposed
to be shared amongst all threads ? That's what I understood from reading the
docs anyway.
Yet this simple exemple shows the opposite (see the 3 attached files).
So am I supposed to source my global scheme definitions in
Hi list !
At work, I recently pushed the idea to use an extention language for our
main product, which is a middle sized program written in C with many
threads, that must run quickly without without interruption 24/7, and
that have little memory nor CPU to spare.
As nobody comes with a better ide
82 matches
Mail list logo