What new libraries or functionality does Guile need?

2008-07-18 Thread Mike Gran
Hi-
If you could ask someone to write a library or package a set of functionality 
for Guile that it doesn't currently have, what would it be?
(My personal projects are near completion, and I may have some Saturdays free.)
-Mike




Re: What new libraries or functionality does Guile need?

2008-07-18 Thread Julian Graham
Hi Mike,

I think Guile could really use a Scheme HTTP client implementation (maybe
even as part of the core).  Evan Prodromou did one for 1.4 that kind of
worked, but it's currently listed on the "old projects" list (
http://www.gnu.org/software/guile/old-gnu-guile-projects.html).  I haven't
tried contacting him (Evan, do you read this list?), but it doesn't look
like it's been touched in quite some time.


Regards,
Julian


On Fri, Jul 18, 2008 at 1:13 PM, Mike Gran <[EMAIL PROTECTED]> wrote:

> Hi-
> If you could ask someone to write a library or package a set of
> functionality for Guile that it doesn't currently have, what would it be?
> (My personal projects are near completion, and I may have some Saturdays
> free.)
> -Mike
>
>
>


Re: What new libraries or functionality does Guile need?

2008-07-18 Thread Andre Kuehne

Mike Gran wrote:

Hi-
If you could ask someone to write a library or package a set of functionality 
for Guile that it doesn't currently have, what would it be?
(My personal projects are near completion, and I may have some Saturdays free.)
-Mike



Hi Mike,

1) I would like to have a sqlite-wrapper for guile. There is a great sqlite 
chicken egg

http://www.call-with-current-continuation.org/eggs/3/sqlite3.html

if this is of any help, but even a simpler interface would be nice.

2) Displaying the signature/parameters of the function around point in the message-line of emacs 
would be helpful too.


Best wishes
Andre




Re: What new libraries or functionality does Guile need?

2008-07-18 Thread Mike Gran
Julian-
There are a couple of ways to do HTTP client stuff already.
TTN's Guile-WWW will do http GET.  It has the advantage of being very schemey.
Depending on you Guile setup, it may need modification.  Last time I tried to 
use it some time ago, it back-ported (fore-ported?) easily enough.  IIRC there 
was some little thing about macros that needed to be simplified to get it to 
work.  I don't remember exactly.  It doesn't (or perhaps didn't) do POST, 
though.
Alternately, Guile-GNOME has the Gnome-vfs interface wrapped.  This does some 
http client stuff.
I think either of these would be enough for simple things.
But in terms of more featureful libraries that could be adapted/wrapped, I 
rather like libcurl.  Bigloo scheme has bindings for this one.  It does all the 
LDAP and https stuff.
But then again libcurl doesn't do webdav.
The neon client library does do webdav.
-Mike Gran





Re: What new libraries or functionality does Guile need?

2008-07-18 Thread dsmich
 Andre Kuehne <[EMAIL PROTECTED]> wrote: 
> Mike Gran wrote:
> > Hi-
> > If you could ask someone to write a library or package a set of 
> > functionality for Guile that it doesn't currently have, what would it be?
> > (My personal projects are near completion, and I may have some Saturdays 
> > free.)
> > -Mike
> > 
> > 
> Hi Mike,
> 
> 1) I would like to have a sqlite-wrapper for guile. There is a great sqlite 
> chicken egg
> 
>  http://www.call-with-current-continuation.org/eggs/3/sqlite3.html
> 
> if this is of any help, but even a simpler interface would be nice.

Hmm.  I have a small wrapper that I have been using in sneek (the #guile 
channel bot on freende) for years.  It just provides open, close, and exec.

I think it's still at http://users.adelphia.net/~dsmich/guile-sqlite-0.4.tar.gz

-Dale




Re: What new libraries or functionality does Guile need?

2008-07-18 Thread dsmich
 Andre Kuehne <[EMAIL PROTECTED]> wrote: 
> 2) Displaying the signature/parameters of the function around point in the 
> message-line of emacs 
> would be helpful too.

Yes.  There ought to be a way of adding this to gds.  I think we just need some 
hooks for eldoc-mode, right?

-Dale





Getting a type of a variable

2008-07-18 Thread Maciek Godek
Hello,
I'm looking for an efficient way to check the
type of an SCM variable. I imagine that I
could write something like:
(define (type? x)
  (cond ((integer? x) 'int)
  (cond ((real? x) 'double)
...
)

and then convert guile symbol to C string, but that
would be terribly inefficient. (I could also use an integer
to refer to a type, but there's still this 'cond' clause)

The solution of my dreams is that it would turn out
that there's a function defined in the scm api:
scm_t_bits scm_get_type(SCM *var)
that returns a type tag and that there's a way to decipher
the contents of this return value, and that it is wisely
defined for all builtin types.

(I started to implement such thing by myself as a separate
module, but please inform me if it's already done)

Thanks in advance for help




Re: What new libraries or functionality does Guile need?

2008-07-18 Thread Jose A. Ortega Ruiz
Mike Gran <[EMAIL PROTECTED]> writes:

> Hi-

> If you could ask someone to write a library or package a set of
> functionality for Guile that it doesn't currently have, what would it
> be? (My personal projects are near completion, and I may have some
> Saturdays free.)

Bindings for OpenGL/GLU/GLUT would be great.

jao
-- 
Nature uses as little as possible of anything.
  -Johannes Kepler, astronomer (1571-1630)





Re: What new libraries or functionality does Guile need?

2008-07-18 Thread Maciek Godek
>> Hi-
>
>> If you could ask someone to write a library or package a set of
>> functionality for Guile that it doesn't currently have, what would it
>> be? (My personal projects are near completion, and I may have some
>> Saturdays free.)
>
> Bindings for OpenGL/GLU/GLUT would be great.

They definitely wouldn't be disturbing. On the other hand, OpenGL is such flat
a library if it comes to structure, that it could be wiser to write a semi
automatic tool for making guile bindings from C headers, i.e. to
transform declarations like

// gl.h
#define GL_BYTE 0x1400
// ...
GLAPI void GLAPIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z);

to

// gl-module.c
static SCM glVertex3d_scmwrapped(SCM x, SCM y, SCM z) {
  glVertex3d(scm_to_double(x), scm_to_double(y), scm_to_double(z));
  return SCM_UNSPECIFIED;
}

// ...

void init() {
  scm_c_define_gsubr("glVertex3d", 3, 0, 0, glVertex3d_scmwrapped);
// ...
}

;; gl.scm
(define-module (gl))
(load-extension "gl-module" "init")
(define-public GL_BYTE 0x1400)
; ...
(export glVertex3d)


GL is a great library to start with, for it uses only the embedded C types