Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Alex Queiroz

Hallo,

On 2/12/07, felix winkelmann <[EMAIL PROTECTED]> wrote:


(I've added it to our logos page at http://chicken.wiki.br/logos - unfortunately
svnwiki doesn't like me today, so I don't know whether they appear or not)



I'm new around here but... Why do you guys use it? I couldn't
even found a Page Index or something.

--
-alex
http://www.ventonegro.org/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread felix winkelmann

On 2/13/07, Alex Queiroz <[EMAIL PROTECTED]> wrote:

Hallo,

On 2/12/07, felix winkelmann <[EMAIL PROTECTED]> wrote:
>
> (I've added it to our logos page at http://chicken.wiki.br/logos - 
unfortunately
> svnwiki doesn't like me today, so I don't know whether they appear or not)
>

 I'm new around here but... Why do you guys use it? I couldn't
even found a Page Index or something.


Because it's ours! ;-)


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] yet another command-line parsing tool

2007-02-13 Thread felix winkelmann

http://chicken.wiki.br/tool


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Mario Domenech Goulart
Hi Alex,

On Tue, 13 Feb 2007 09:29:17 -0300 "Alex Queiroz" <[EMAIL PROTECTED]> wrote:

> On 2/12/07, felix winkelmann <[EMAIL PROTECTED]> wrote:
> >
> > (I've added it to our logos page at http://chicken.wiki.br/logos - 
> > unfortunately
> > svnwiki doesn't like me today, so I don't know whether they appear or not)
> >
> 
>  I'm new around here but... Why do you guys use it? I couldn't
> even found a Page Index or something.

Well, svnwiki is a wiki developed in Chicken, is actively mantained by
and has a great "local" support from Chicken contributors (Alejandro
Cuervo, Nelson Castillo), and has features convenient for the project
(e.g., syntax highlight for Scheme code, subversion backend etc.).

I don't know exactly what "Page Index" is, but my guess is that you
want an index of all wiki pages.  In this case, you can always get a
local copy of the wiki repository (see http://chicken.wiki.br/svn%20checkout).

Best wishes,
Mario



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Alex Queiroz

Hallo,

On 13 Feb 2007 10:50:55 -0200, Mario Domenech Goulart
<[EMAIL PROTECTED]> wrote:


I don't know exactly what "Page Index" is, but my guess is that you
want an index of all wiki pages.  In this case, you can always get a
local copy of the wiki repository (see http://chicken.wiki.br/svn%20checkout).



I hope I'm not sounding too harsh, but that's less than
desirable. Maybe it's because I'm a chicken newbie and so I'm trying
to get all the information I can, which right now is harder than it
should be.
BTW, I can't do an anonymous checkout using the instructions
provided in that page.

Cheers,

--
-alex
http://www.ventonegro.org/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Mario Domenech Goulart
On Tue, 13 Feb 2007 10:03:37 -0300 "Alex Queiroz" <[EMAIL PROTECTED]> wrote:

> On 13 Feb 2007 10:50:55 -0200, Mario Domenech Goulart
> <[EMAIL PROTECTED]> wrote:
> >
> > I don't know exactly what "Page Index" is, but my guess is that you
> > want an index of all wiki pages.  In this case, you can always get a
> > local copy of the wiki repository (see 
> > http://chicken.wiki.br/svn%20checkout).
> 
>  I hope I'm not sounding too harsh, but that's less than
> desirable. Maybe it's because I'm a chicken newbie and so I'm trying
> to get all the information I can, which right now is harder than it
> should be.

Folks here are open to suggestions.  If you think something can be
improved, you can always suggest it here in the mailing list or in the
bugtracker at http://trac.callcc.org.

>  BTW, I can't do an anonymous checkout using the instructions
> provided in that page.

Strange.  I just tried it here and it works.  What errors do you get?

I've tried 

$ svn checkout 
https://anonymous:@galinha.ucpel.tche.br/svn/chicken-eggs/wiki

Best wishes,
Mario


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Alex Queiroz

Hallo,

On 13 Feb 2007 11:13:52 -0200, Mario Domenech Goulart
<[EMAIL PROTECTED]> wrote:


Folks here are open to suggestions.  If you think something can be
improved, you can always suggest it here in the mailing list or in the
bugtracker at http://trac.callcc.org.


Makes sense. I suggest a Page Index. :-)



Strange.  I just tried it here and it works.  What errors do you get?



I got:

"Error: Can't check path 'C:\Documents and
Settings\asandro\Desktop\chicken\The "Easy" foreign function
interface': A sintaxe do nome do arquivo, pasta ou nome do volume está
incorreta."

That's roughly "wrong file name syntax" for non-Portuguese
speakers. I'm using TortoiseSVN under Windows.

--
-alex
http://www.ventonegro.org/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Mario Domenech Goulart
On Tue, 13 Feb 2007 10:40:21 -0300 "Alex Queiroz" <[EMAIL PROTECTED]> wrote:

> On 13 Feb 2007 11:13:52 -0200, Mario Domenech Goulart
> <[EMAIL PROTECTED]> wrote:
> >
> > Folks here are open to suggestions.  If you think something can be
> > improved, you can always suggest it here in the mailing list or in the
> > bugtracker at http://trac.callcc.org.
> 
>  Makes sense. I suggest a Page Index. :-)

Nelson or Alejandro: can svnwiki do that?

> > Strange.  I just tried it here and it works.  What errors do you get?
> >
> 
>  I got:
> 
> "Error: Can't check path 'C:\Documents and
> Settings\asandro\Desktop\chicken\The "Easy" foreign function
> interface': A sintaxe do nome do arquivo, pasta ou nome do volume está
> incorreta."
> 
>  That's roughly "wrong file name syntax" for non-Portuguese
> speakers. I'm using TortoiseSVN under Windows.

It looks like an issue with the SVN client which is not handling
double quotes in filenames.

Best wishes,
Mario


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread John Cowan
Mario Domenech Goulart scripsit:

> It looks like an issue with the SVN client which is not handling
> double quotes in filenames.

Not the client's fault, really.  Windows doesn't allow double quotes
in filenames.

A Posix filename is any sequence of octets not containing 0x00 or 0x2F (/).
It may be interpreted according to any encoding.

A Windows filename is any sequence of 16-bit values not containing 0x
to 0x001F (controls), 0x007F (DEL), 0x005C (\), 0x002F (/), 0x003A (:),
0x002A (*), 0x003F (?), 0x0022 ("), 0x003C (<), 0x003E (>), or 0x007C (|).
It is always interpreted according to the UTF-16 encoding.

-- 
Knowledge studies others / Wisdom is self-known;  John Cowan
Muscle masters brothers / Self-mastery is bone;   [EMAIL PROTECTED]
Content need never borrow / Ambition wanders blind;   http://ccil.org/~cowan
Vitality cleaves to the marrow / Leaving death behind.--Tao 33 (Bynner)


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread Mario Domenech Goulart
On Tue, 13 Feb 2007 09:52:42 -0500 John Cowan <[EMAIL PROTECTED]> wrote:

> Mario Domenech Goulart scripsit:
> 
> > It looks like an issue with the SVN client which is not handling
> > double quotes in filenames.
> 
> Not the client's fault, really.  Windows doesn't allow double quotes
> in filenames.

Hmmm.  In this case I think we should remove the quotes from the
filename.  Is it as simple as executing "svn mv name-with-quotes
name-without-quotes"?  As far as I can see, all the pages that link to
"The \"Easy foreign..." page refer to [[easyffi]].

Best wishes,
Mario



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] gtk2.egg

2007-02-13 Thread Andre Kuehne

Tony Sidaway wrote:

$ svn co https://galinha.ucpel.tche.br/svn/chicken-eggs/gtk2

(login anonymous, leave the password response empty)

This may be of interest to GUI enthusiasts.


At least for me gtk2 is the one big missing egg!


The interesting part of the code, to me, is what is built on top of
the wrapped library.  g+ is a very clean, Scheme-like GUI library that
keeps the fussiness of the underlying C implementation well away from
the Chicken code.

Here for instance, in g+, is a GTK OptionMenu object containing an
embedded button and a nested menu, with the signal handlers embedded
in the menu structure.

(g+option-menu
 (g+menu
   (g+menu-item "First"
 (g+signal 'activate
   (lambda (i) (print "Chose 1"
   (g+menu-item*
 (g+button "Hello"
   (g+signal 'clicked
 (lambda _ (print "Why, hello!"
 (g+menu
   (g+menu-item "hi1"
 (g+signal 'activate
   (lambda (i) (print "Chose 2"
   (g+menu-item "hi2")))
   (g+menu-item "Third"
 (g+signal 'activate
   (lambda (i) (print "Chose 3"))

This is an egg from code originally produced by Tony Garnock-Jones
(tonyg) in 2002.  The code rotted a bit over the years, and I spent a
few days in January cleaning it up so it builds and runs on my Ubuntu
system.  Tony G responded to my licensing request yesterday and
permitted me to upload the updated code.  I've packaged it as an egg.


Great!


The main part of the code is a pretty straightforward wrap of libgtk2
and libglade.  The only unusual thing is that a bespoke wrap program
is used instead of SWIG, and relies on "defs" files that are published
by the (Python) PyGTK project.


I have no experience with writing glue-code, just curious. What's the
advantage over SWIG? Does this approach make it easier to stay compatible
with new gtk versions, since PyGTK is guaranteed to be?


This egg is NOT related to the gtk egg produced by Alejandro Forero
Cuervo and Manuel Alejandro Cerón Estrada.  That other project was
based on SWIG bindings and seems to have stalled.

There are issues with this egg as it stands at present.  It is
definitely not usable for anything serious yet.

Firstly, libgtk+ is absolutely huge and this is an attempt to wrap it
all.  The build process is an absolute beast and takes ages to run on
my system.  It should probably be split up into bite-sized chunks.


On my system (1.73GHz Pentium M, 512MB) it took 3 1/2 minutes
to compile. Compared to the xlib egg it's a snap!


There are UNIX dependencies in the build process, most notably the
shell script "extract-all-types" which really should be converted to
chicken.


Attached is a drop-in-replacement for "extract-all-types".

Additionally the script excludes "gdk_window_get_type".
Otherwise i get this compile error:

wrap.c: In function `code_2':
wrap.c:53: error: too few arguments to function `gdk_window_get_window_type'

I guess for the same reason "gtk_gadget_get_type" is excluded in the
original version of "extract-all-types".


There are also probably some strong gtk-2.0 version dependencies.  It
builds on my Ubuntu system with Ubuntu's stock gtk 2.8.20 build.  It
also expects libglade.  I cannot make promises about which other
versions of GTK it will run on, and if you want to build it without
libglade support you'll have to tweak the code a bit.


Besides the error mentioned above, it compiles against my gtk+ 2.10.6.

However most sample-apps crash:

> csi gtk2-explore.scm
Version 2.5 - linux-unix-gnu-x86 - [ dload ptables applyhook ]
** (gtkchicken:3545): WARNING **: Unknown gtype in gtype-from-name: GtkTreeIter
Error: unbound variable: gtk-tree-store-append

> csi gtk2-test+.scm
** (gtkchicken:3547): WARNING **: Unknown gtype in gtype-from-name: GtkTreeIter
Error: unbound variable: gtk-arrow-new

> csi gtk2-test-liststore+.scm
** (gtkchicken:3554): WARNING **: Unknown gtype in gtype-from-name: GtkTreeIter
Error: unbound variable: gtk-list-store-append

> csi gtk2-test-treestore+.scm
** (gtkchicken:3558): WARNING **: Unknown gtype in gtype-from-name: GtkTreeIter
Error: unbound variable: gtk-tree-store-append

And so on.

However these apps do work:

  gtk2-test-drawingarea.scm
  gtk2-test-gobject.scm
  gtk2-test-libglade.scm


The wrapping system doesn't correctly handle variable argument lists
with a NULL sentinel, despite the gtk headers signalling the usage
clearly.

Some of the demo programs fail mysteriously.  Tony G and I think it's
a pointer wrapping problem, and I'll be working on fixing that.

Further bug reports would be most welcome.  Please include details of
your system and the version of libgtk you're using.



gtk+ version 2.10.6
chicken-version 2.5 - linux-unix-gnu-x86 - [ dload ptables applyhook ]


Best Regards
Andre Kuehne

#! /bin/sh
#|
exec csi -s $0 "$@"
|#

(use posix
 srfi-1
 utils)

(define exclude-list '("#define"
   "visibility(\"hidden\")"
   "gtk_gadget_get_type"
   "gdk_wi

Re : [Chicken-users] gui api design -- some thought -- long mail

2007-02-13 Thread minh thu


A simple alternative is that often you just want to call yourself
later.  That is, register a timer which when it expires, will call the
given function which you give when you register the timer.  It can be
a one-shot or a repeating timer.


In my conception of the event queue, each event has a timestamp
indicating when it has to be dispatched. So an event can be inserted
in the queue before already present events.



> b) (which is related) Since a function call results
> from an event, you can't generate an event whose
> callback needs the end of
> the event-generating-computation (i.e. it's not
> asynchronous).
>
> I'd rather like to finish a computation which generates
> an event before processing it.

If you generate the event and put it in the queue, it will be
processed later when the code gets around to checking the queue,
right?


Yes. The code could be a scheduler (provided by the library) or user code.



> c) Also, say you want to code "When the left mouse button
> is pressed (elsewhere than above my two main widgets),
> make the first widget be blue and the second one be red.".
> (Call this the blue-red exemple for later reuse.)
> You'll need to register a callback on the background widget.
> This callback needs to access (to be aware of) the two
> other widgets. I don't like this.

Whereas in an immediate mode UI, the main "do" function is both
finding out that the button is pressed, and drawing the blue and red
widgets directly right?


I guess  so.


An alternative way to get this behavior with callbacks would be to
make it possible for every widget to register interest in any kind of
event, whether or not it would seem relevant to that widget.  The
callback can have an extra parameter to indicate the relevance.  So a
normal button registers only for a click event on himself, and your
special button registers for a click event anywhere, and is given a
"true" when the click is on him, and a "false" if it's somewhere else,
along with coordinates etc.  Or maybe your special button does two
registrations of two different callbacks so that the parameter is not
necessary...


The first part of your description sticks to my idea. Hwever, when you
say 'the widget registers interest', I would say 'you register a
callback that will only cares of one widget'.
So to implement the button, I would make a handler for
'left-mouse-button-pressed which insert a new event,
'that-button-clicked. This step could be hidden for the user of the
GUI.



> "My" Idea.
>
> I call it mine but I don't know .. maybe it's as old
> as the world ?
>
> - The callback mechanism is exposed and made not mandatory.
> - The widgets are aware of events, not the contrary
> (see c) above).
> - The event facility can be used for application-generated
> events.
> - The ol'callback way is still available.
>
>
> How.
>
> An event-queue keeps the not-yet-processed events.
> (For some application, it might be useful to timestamp
> events so they are dispatched later or even keep the
> already-processed events to be able to reverse time.)

That's probably a really good idea.  I think in general the trend is
that as memory gets cheaper (RAM and disk both, and I believe they
will be the same thing some day when nonvolatile RAM is cheap enough),
you can find reasons to keep data around, timestamp it, take diffs,
even build a sort of version control system for some classes of data,
rather than assume that only the latest, most current data is relevant
and letting new stuff overwrite old stuff.  Especially, any text which
the user enters himself ought to be considered sacred and never
garbage-collected unless the user asks for it to be deleted.  The book
"The Humane Interface" makes this point.  I was thinking a few years
ago that a computer's disk ought to be structured as a giant log,
where the data the user creates is appended to the log, and then data
structures which the software creates to organize that data never
duplicate it - they just point to it.  The user enters a stream of
data, and the computer makes sense of it over time.  You would have
built-in version control - edits are actually a special kind of diff
that is appended to the log, so you will have the new version and the
old version at the same time.  Like CVS or subversion but implemented
more efficiently.  That is what early versions of the Xanadu project
were about...but there is more than one way to implement it, and I
can't make up my mind which is the best one (and neither could the
Xanadu guys, which is why it never got done).

Anyway I'm not sure that mouse events have the same kind of perennial
lasting importance that text does, but in graphical documents, like
diagrams, a persistent history would be nice, with unlimited undo and
the ability to compare different versions.  I want to build something
like that when I get the GUI stuff done.


Interesting point. Although it was not clear, I was thinking of some
functions to get events but also query the existence of a 

Re: [Chicken-users] Centralized documentation

2007-02-13 Thread Alejandro Forero Cuervo

Just a few thoughts that I believe would be good to keep on mind on
the discussion on centralized documentation:

* Egg authors have the choice between using eggdoc or using the wiki.
  Originally all eggs used eggdoc and few started using the wiki as
  their authoritative repository.

* When an egg uses the wiki, whenever a new version of the egg is
  produced, the HTML page is generated automatically from whatever is
  in the wiki.  This page is uploaded to call/cc as well as included
  in the tarball 

* The process of generating the HTML page for an egg from the wiki
  only supports documentation stored as a single wiki page, but I
  suppose it would be easy to extend egg-post-commit to support eggs
  having multiple wiki pages as their associated documentation.

* I kinda agree that it doesn't make that much sense to keep a
  potentially outdated documentation page in call/cc when it is also
  available in the wiki.  Then again, I don't see this as that big an
  issue, since the pages in call/cc do begin with a disclaimer
  pointing to the wiki page.

* It should be kept in mind that some documentation for the eggs
  should be included with them.  For those with the documentation on
  the wiki, the best bet is probably to continue to do what we do now
  (include a render to HTML of whatever is available in the wiki when
  the egg is generated/uploaded).

* Any improvements to the CSS used by the wiki would be more than
  welcome. :-)

There.

Alejo.
http://azul.freaks-unidos.net/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] environments egg

2007-02-13 Thread Arto Bendiken

On 2/9/07, Daishi Kato <[EMAIL PROTECTED]> wrote:

On 2/9/07, Arto Bendiken <[EMAIL PROTECTED]> wrote:
>
> I simply meant that you can use (define-record) to wrap your own
> structure around the environment structure, and include a parent
> pointer (and any other needed goodies) in that.

That doesn't sound so nice.
I don't want to care about the parent pointer when I call (eval foo env).
The layered lookup of bindings should be done internally.


Yes, but Chicken's eval won't do that for you (though you can
partially simulate it [1]) - thus, you need your own evaluator,
anyway. I intend to provide a basic one (derived from felix's sandbox
egg) in the contexts egg, eventually.


Maybe I could just wait for your egg, and discuss later.


I've just uploaded an initial version to the SVN repository (it's in
contexts/trunk/). I'll be adding unit tests and some documentation [2]
in the next few days - you may want to hold off till those are in
place (though the egg is not that difficult to understand from the
source, either, at a couple hundred LOC).

[1] http://chicken.wiki.br/Unit%20lolevel#set-invalid-procedure-call-handler!
[2] http://chicken.wiki.br/contexts

--
Arto Bendiken | [EMAIL PROTECTED] | http://bendiken.net/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] environments egg

2007-02-13 Thread Daishi Kato

On 2/14/07, Arto Bendiken <[EMAIL PROTECTED]> wrote:

On 2/9/07, Daishi Kato <[EMAIL PROTECTED]> wrote:
> On 2/9/07, Arto Bendiken <[EMAIL PROTECTED]> wrote:
> >
> > I simply meant that you can use (define-record) to wrap your own
> > structure around the environment structure, and include a parent
> > pointer (and any other needed goodies) in that.
>
> That doesn't sound so nice.
> I don't want to care about the parent pointer when I call (eval foo env).
> The layered lookup of bindings should be done internally.

Yes, but Chicken's eval won't do that for you (though you can
partially simulate it [1]) - thus, you need your own evaluator,
anyway. I intend to provide a basic one (derived from felix's sandbox
egg) in the contexts egg, eventually.


I see.
Maybe I can create my own evaluator.


> Maybe I could just wait for your egg, and discuss later.

I've just uploaded an initial version to the SVN repository (it's in
contexts/trunk/). I'll be adding unit tests and some documentation [2]
in the next few days - you may want to hold off till those are in
place (though the egg is not that difficult to understand from the
source, either, at a couple hundred LOC).


I think I understand what is going on.
My question would be how much the overhead is.
It should at least be slower than the normal eval.
Ah, I see. That is why you want to redesign it just like the sandbox.

Thanks for your egg anyway, many things for me to help learning.
Daishi


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] cool 3d logo by Joshua Griffith

2007-02-13 Thread felix winkelmann

On 13 Feb 2007 13:26:37 -0200, Mario Domenech Goulart <[EMAIL PROTECTED]> >

Hmmm.  In this case I think we should remove the quotes from the
filename.  Is it as simple as executing "svn mv name-with-quotes
name-without-quotes"?  As far as I can see, all the pages that link to
"The \"Easy foreign..." page refer to [[easyffi]].


The page was obsolete anyway (the functionality is in the easyffi egg, now).

I have removed the file.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users