Re: is there any guile windows binary distribution available?

2013-08-13 Thread Chaos Eternal
use cygwin please

On Mon, Aug 12, 2013 at 1:35 PM, Yagnesh Raghava Yakkala  
wrote:
>
> Hello Guilers,
>
> I like to install guile on windows. is there any "ready to use"™ binary
> available.?
>
> Thanks.
> --
> ఎందరో మహానుభావులు అందరికి వందనములు.
> YYR
>
>


Re: Issue with compiling to scheme

2013-08-13 Thread mark
Thien-Thi Nguyen  writes:

> Maybe the simplest way is to completely separate code generation from
> compilation.  This also gives you an opportunity to do compilation in
> two places (of the code that generates the code, and of the generated
> code).  So your Makefile would look like:
>
>  gen: gen.scm
>  $(COMPILE) -o $@ $(COMPILEFLAGS) $<
>  chmod +x gen
>  
>  %.generated : %.xml
>  ./gen -o $@ $(GENFLAGS) $<
>  
>  %.go : %.generated
>  $(COMPILE) -o $@ $(COMPILEFLAGS) $<

That's kind of what I wound up doing via abuse of the language's #:read
property. Instead of providing a function that just gives the result
of xml->sxml to the compiler, I have it break some xml tags into
multiple tags so each one can be treated as a separate expression. 

Eg. The file looks like this:


  


And the reader would return each of the following expressions in turn:

'(xcb (@ (header "xproto")))
'(xcb-2 (@ (header "xproto")))
'(struct (@ (name "struct")))

That way the  tag gets compiled into the (define-module ...)
expression and the fictitious  tag gets compiled into the (begin
...)  statement that contains some module-wide definitions and so forth.

This approach stays inside of the guile 2 compiler infrastructure but it
has the disadvantage of turning what's supposed to be a simple,
single-purpose function into a bit of a stateful mess.

It would be nice if the compiler could handle multiple-value returns
from read-and-parse (assuming that doesn't harm performance... I might
try it out and see what it does).

> I am very much looking forward to learning what you discover, and
> applying it to all the projects i maintain.  (For example, Guile-SDL
> test/gfx.scm is a dog under Guile 2.x, blech.)  Fingers crossed...

I'll be happy to do that if I come up with something!

Thanks

-- 
Mark Witmer




Memory use analysis

2013-08-13 Thread mark

I'm facing an issue with ballooning memory usage in a progam I'm writing
and having a difficult time tracking down the root cause. The stack
stays small but it uses more and more heap space until the system runs
out of memory.

Is there some kind of tool or method for getting Guile to enumerate what
objects in the heap are considered "live" by the GC? I guess the
conservative GC Guile uses doesn't explicitly keep track of every
object, but I wouldn't mind just being able to see what stuff in the
heap it *thinks* it needs to keep, and then query what kind of SCM
objects they represent.

Thanks

-- 
Mark Witmer