Re: pil64emu, OpenGL?

2012-11-07 Thread Jon Kleiser

Hi,

I suggest, in lib/openGl.l, to replace

(default
   *GluLib libGLU.so
   *GlutLib libglut.so )

with

(if (= *OS Darwin)
(default
*GluLib Frameworks/OpenGL.framework/OpenGL
*GlutLib Frameworks/GLUT.framework/GLUT )
(default
*GluLib /usr/lib/libGLU.so
*GlutLib /usr/lib/libglut.so ) )

It works like a dream on my iMac! Exactly why I can leave out 
/System/Library/ as Jorge suggested, I'm not sure, but it works.

This was good news. ;-)

I'm looking forward to an article about emu64, on picolisp.com ...

/Jon


On 11/6/12 10:21 PM, Jorge Acereda wrote:

On Nov 6, 2012, at 9:34 PM, Alexander Burger wrote:


Hi Jorge,


+   ...
+  /System/Library/Frameworks/OpenGL.framework/OpenGL
+   ...
+   /System/Library/Frameworks/GLUT.framework/GLUT
+   ...

Shouldn't it just provide sane defaults for the platform in question?
There is no libGLU.so on OS X...

Hmm, I'm not sure I understand that. Are the above not libraries?

Sort of. Those are frameworks, frameworks encapsulate headers/shared libraries 
(bundles) and resources.




  (setq
 *GluLib  /System/Library/Frameworks/OpenGL.framework/OpenGL
 *GlutLib /System/Library/Frameworks/GLUT.framework/GLUT )

  (load @lib/openGl.l)

In that way, the 'default' in the library won't override it.

But that seems contrary to the DRY motto. All applications will need
to do that in order to run on OS X.

Well, it could be encapsulated in a commont source file or even
command line argument.


I just feel uneasy to hard-code special library locations. Shouldn't
that be provided by the system environment, like load-library paths?

Ok, in that case just remove /System/Library/ from the paths. I tested and it 
works OK.



That's why I removed /usr/lib/ from the two variables.

Cheers,
- Alex



--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Rosetta Code analysis

2012-11-07 Thread Rudy Hagedorn
Joe: Great help. Many thanks for sharing!
On Nov 7, 2012 6:56 PM, Joe Bogner joebog...@gmail.com wrote:

 Sorry - here is the link:
 http://picolisp.com/5000/!wiki?RosettaCodeAnalysis


 On Wed, Nov 7, 2012 at 12:13 PM, Joe Bogner joebog...@gmail.com wrote:

 Hi All,

 I added a wiki article that includes some basic analysis of the Rosetta
 Code solutions. At several points I've tried to memorize the usage of all
 the PicoLisp functions. I'm getting closer to retaining it, however I may
 use this list as a way to prioritize my learning.

 I considered hyperlinking to the relevant reference for the function page
 but didn't have the time to include that - specifically due to things like
 the Globals. The alpha ones are pretty straightforward to map.  I may
 update the article in the future with the links.

 I'm sharing in case others find it useful / interesting

 Joe





Re: `rd' behavior

2012-11-07 Thread Axel Svensson
Also, a + at the end of the command line is special; it turns on *Dbg
and is not included in (argv).

  bare dash. is there any way around it?

Make a wrapper like this:

#!/bin/bash
/usr/bin/picolisp /usr/lib/picolisp/lib.l file.l +++ $@ +++

Then in file.l, remove the extraneous +++:

(setq Arguments (cdr (reverse (cdr (reverse (argv))
(for A Arguments (prinl A))
(bye)

This makes sure there will never be a dash as first argument, or a
plus sign as the last. A little cumbersome perhaps, but it is caused
by how the picolisp interpreter works.
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe