[Chicken-users] [ANN] New egg: gl-type

2014-09-24 Thread Alex Charlton
Hello Chickeneers,

I know you’ve all been waiting to do some text rendering in OpenGL, and now you 
can!

gl-type renders your typeface into a reasonably well packed texture (with 
Freetype) and then lets you create a vertex buffer that represents a string. It 
does basic text layout (i.e. it word wraps) but only supports horizontal 
left-to-right scripts.

Check out the docs here:
http://wiki.call-cc.org/eggref/4/gl-type

And the source here:
https://github.com/AlexCharlton/gl-type

-- 
Alex

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


Re: [Chicken-users] [ANN] New egg: gl-type

2014-09-24 Thread Richard
On Wed, 24 Sep 2014 08:45:44 -0400
Alex Charlton alex.n.charl...@gmail.com wrote:

 Hello Chickeneers,
 
 I know you’ve all been waiting to do some text rendering in OpenGL,
 and now you can!
 
 gl-type renders your typeface into a reasonably well packed texture
 (with Freetype) and then lets you create a vertex buffer that
 represents a string. It does basic text layout (i.e. it word wraps)
 but only supports horizontal left-to-right scripts.
 
 Check out the docs here:
 http://wiki.call-cc.org/eggref/4/gl-type
 
 And the source here:
 https://github.com/AlexCharlton/gl-type
 

Hello Alex,

You stream of open-gl eggs is much appreciated!

thx,
Richard

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


[Chicken-users] Printing recursive objects

2014-09-24 Thread Richard
Hello Chickens,

If I have an object that references itself, like for example...

(define v (vector 0))
(vector-set! v 0 v)

and I print it, chicken goes -understandably- into an infinite loop.

Is there a way to prevent this, or is there something like
define-record-printer for non-record objects.

thank you,
Richard

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


Re: [Chicken-users] Printing recursive objects

2014-09-24 Thread Jason Felice
guile knows how to handle this:

scheme@(guile-user) (define v (vector 0))

scheme@(guile-user) (vector-set! v 0 v)

scheme@(guile-user) v

$2 = #(#0#)


It can even read the self-referencing syntax, IIRC.

I know there's discussion of using Tortoise and Hare to break cycles in
this situation, but what guile does seems more sophisticated.

On Wed, Sep 24, 2014 at 5:34 PM, Richard plui...@freeshell.de wrote:

 Hello Chickens,

 If I have an object that references itself, like for example...

 (define v (vector 0))
 (vector-set! v 0 v)

 and I print it, chicken goes -understandably- into an infinite loop.

 Is there a way to prevent this, or is there something like
 define-record-printer for non-record objects.

 thank you,
 Richard

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

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


Re: [Chicken-users] Printing recursive objects

2014-09-24 Thread Evan Hanson
Hi Richard,

On 2014-09-24 21:34, Richard wrote:
 If I have an object that references itself, like for example...
 
 (define v (vector 0))
 (vector-set! v 0 v)
 
 and I print it, chicken goes -understandably- into an infinite loop.
 
 Is there a way to prevent this, or is there something like
 define-record-printer for non-record objects.

FWIW there are `display` and `write` procedures in the scheme.write
library of the r7rs egg that handle such objects. That module is
self-contained and can be used without pulling in the rest of r7rs:

#;1 (use scheme.write)
; loading /home/evanh/.chickens/master/lib/chicken/7/scheme.write.import.so 
...
; loading /home/evanh/.chickens/master/lib/chicken/7/chicken.import.so ...
; loading /home/evanh/.chickens/master/lib/chicken/7/scheme.write.so ...
#;2 (define v (vector 0))
#;3 (vector-set! v 0 v)
#;4 (display v)
#0=#(#0#)

Even so, csi's built-in writer will still loop on `v` if you don't
explicitly print it. Maybe that behavior should also change when
scheme.write is loaded, hmmm...

Evan

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