[GTALUG] Ubuntu 16.04 / gcc 5.4.0 - errors generated inside system include files

Stewart C. Russell scruss at gmail.com
Mon Aug 8 13:38:33 EDT 2016


On 2016-08-07 03:34 PM, D. Hugh Redelmeier via talk wrote:
> 
> I'm still playing with this, but here are my preliminary observations.

Wow, thanks, Hugh - this is definitely the definition of going above and
beyond!

> So here's the fundamental problem.
> 
> "exp" is kind of like a reserved word in C.  It is the exponential
> function and is declared in math.h.
> 
> logo.h has
> #define exp expresn 
> 
> This screws up math.h.

I initially thought “How can C possibly allow that?” — then I remember
that C basically allows everything. So what we have here is a kind of
internal bitrot: the code doesn't change, but the standards of the
language do, so it won't build.

> Fix?  Several, but untested.
>
Thank you. I'll definitely try the simpler ones. Don't think the glibc
ones are within my grasp.

You'd previously asked why I wasn't using the distro-supplied versions.
True enough: Ubuntu has a packaged UCB Logo 5.5 archive that installs
and runs easily enough. Unfortunately, it's not fit for my purposes.

I'm using Logo to generate construction frameworks for decorative
patterns*. I dunno what 5.5 is built on top of, but its PostScript
output is a mess of unnecessary nodes. The newer interpreter has a
completely rewritten graphics system on top of wxWidgets, and its output
is very clean.

Yeah, I should probably do this using Python's turtle module, as it
makes some nice output and is actually maintained. Logo, however,
encourages a much more interactive development style.

cheers,
 Stewart

*: like this -
	cs pd repeat 10 [
		rt  54 fd 43.865
		lt  90 fd 45.002
		lt 108 fd 45.002
		lt  90 fd 43.865
		lt  90
	] pu ht


More information about the talk mailing list