Re: Guile benchmark

2017-01-26 Thread Linas Vepstas
On Thu, Jan 26, 2017 at 3:56 PM, Mike Gran  wrote:

>
> On Thursday, January 26, 2017 7:31 AM, Rchar  wrote:
>
>
>> Is Guile slow or fast, comparing to others?
>
> Guile is about average compared to the others. But it depends
> on the specific task. It is usually not the fastest or slowest.

FWIW, I have C++ code that has bindings both to guile and to python,
via cython.  The guile bindings were faster than python, which then
caused the cython maintainer to enter a nuclear arms race, to improve
performance, doing things like caching values in various places to improve
performance.  But then, one can do the same in guile, and it becomes a
game of who can be more clever in optimizing.

I do have one complaint: guile has a fairly hefty overhead in entering
and exiting: I forget now, and the measurements were done on a
circa-2011 PC, but I was getting something like 7K guile enter-exits
per second, which limits the speed at which you can cross the C/guile
boundary.   You can avoid this cost by entering guile and then caching,
but this requires some C-coding cleverness that naive users won't do.
(I'm currently getting maybe 500K/sec or 1M/sec guile-C crossings, but
only if I do this caching trick).

--linas



Re: guile can't find a chinese named file

2017-01-26 Thread Linas Vepstas
It's a bug. There have been bugs on and off with guile utf8 handling.
One of the guile-2.0 versions does almost everything right, but utf8
is semi-broken, again in 2.2 -- some things work, but various things
that used to work great are now broken (again).   I'm guessing that
guile has a weak/non-existent unit-test suite for utf8.

Open bug reports. I could even (maybe) volunteer to fix some of them,
cause I know where they are, and why they are, but would need
encouragement/help from one of the core guile devs to create
acceptable patches.

(I'm doing Chinese text processing in guile, right now, so each of
these bugs is painful to hit, and requires yet another work-around in
my code.)

--linas



On Mon, Nov 28, 2016 at 2:54 AM, Thomas Morley  wrote:
> 2016-11-27 13:16 GMT+01:00 Chaos Eternal :
>> Seems that UTF-8 encoded string has been converted to unicode before calling
>> `open',
>> but on filesystem the filename is utf8 string
>
> Your analysis is surely correct, but what to do?
> I expected
> guile filename_名字.scm
> to work out of the box.
>
> Am I missing something?
> Or is it a bug, worth reporting?
>
> Cheers,
>   Harm
>



extension paths

2017-01-26 Thread Linas Vepstas
I'd like to ask for help/clarification (and maybe even volunteer to
write the required code) to resolve this extension-loading problem.

I have almost a dozen C++ shared libs that implement guile modules,
and regularly struggle to get them loaded correctly.   First, they
need to be installed into one of 8 different places:

/usr/lib/guile/2.0/extensions
/usr/local/lib/guile/2.0/extensions
/usr/lib64/guile/2.0/extensions
/usr/local/lib64/guile/2.0/extensions
/usr/lib/guile/2.2/extensions
/usr/local/lib/guile/2.2/extensions
/usr/lib64/guile/2.2/extensions
/usr/local/lib64/guile/2.2/extensions

which is unworkable in practice.  So what I usually do is to install
wher I want to, and then do this:

(setenv "LTDL_LIBRARY_PATH"
   (if (getenv "LTDL_LIBRARY_PATH")
  (string-append (getenv "LTDL_LIBRARY_PATH") ":" path)
  path))

(load-extension "libblah" "blah_guile_init")

so that libblah gets found via the env variable.  But this too, is not
always ... stable. What I'd like to have is something like

(add-to-extension-path "/path/to/whereever")

that gets searched, when loading guile extensions...

Comments? Suggestions?

--linas



[ANN] Chickadee 0.2.0 released

2017-01-26 Thread Thompson, David
Hello Guilers,

I am happy to announce the release of Chickadee 0.2.0.

Chickadee is a game development toolkit for Guile Scheme built on top
of SDL2 and OpenGL that aims to provide all the features that
parenthetically inclined game developers need to make 2D (and
eventually 3D) games in Scheme, such as:

* extensible, fixed-timestep game loop
* OpenGL-based rendering engine
* keyboard, mouse, controller input
* sound effects and music playback
* REPL-driven development model

This release contains the following improvements:

* Bitmap font rendering
* Support for loading the Angel Code XML font format
* Sound effect and music playback
* More API documentation in manual

This release also fixes two major bugs in 0.1.0:

* The keyboard event hander was using an obsolete procedure from
  guile-sdl2
* The viewport was not being cleared each frame

Thanks to Alex McGrath for reporting both issues.

Chickadee targets the upcoming Guile 2.2 series, so Guile 2.1.x is
required to compile and run Chickadee programs.

tarball: https://files.dthompson.us/chickadee/chickadee-0.2.0.tar.gz

signature: https://files.dthompson.us/chickadee/chickadee-0.2.0.tar.gz.asc

homepage: https://dthompson.us/projects/chickadee.html

Bug reports, bug fixes, feature requests, and patches are welcomed.

Happy hacking!

- Dave