[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile-xcb

From: mark . d . witmer
Subject: Re: guile-xcb
Date: Sun, 17 Feb 2013 14:10:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Woow, looks fun!  Do you have example applications around that we could
> play with?

Not yet. It's still a ways away from a working X application. But
hopefully in the relatively near future I'll have something
working. Once I finish the compiler part I need to write wrapper methods
to actually send data to/from the X server.

> Wouldn’t SRFI-60 or Guile’s own operations (info "(guile) Bitwise
> Operations") do the job?

With some care, I think they would. I'll have to see if XCB ever expects
<< to shift 1s off the end of an integer, since (ash n) wouldn't do

And also, to be really pedantic, logcount behaves differently from XCB's
(otherwise equivalent) popcount when you give it negative numbers... but
popcount takes an unsigned integer as its argument, so nobody ought to
be using it for negative numbers anyway.

> I see you also have wrappers for C integer subtraction and addition, but
> the behavior of these upon overflow/underflow is undefined in the C
> standard (see ‘-fwrapv’ in GCC.)

Yeah, I'm probably being paranoid there. Time to stop worrying and learn
to love safe arithmetic functions!

Mark Witmer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]