Re: OpenGL and miniPicoLisp

2016-04-23 Thread Robert Herman
Scratch that! I am getting senile. I went back to 7/2015, when I asked
similar questions to you, and you put an article on the site on rcsim! It's
working now...I am getting old!

Rob

On 24 April 2016 at 09:52, Robert Herman  wrote:

> I just tried to run rcsim.l on my newest PicoLisp system, and it didn't
> run. I know I have run it on another box before. What am I doing wrong?
> here's the code from load to failure. I typed '(go)' after the '-> go'
> response, and it brought up a white window though:
>>
>>
>> $ pil +
>> : (load "@misc/rcsim.l")
>> -> go
>> : (go)
>> -> (-20 0 (let R (assoc @ *Run) (sim> *Scene) (sim> *Model) (use (Yaw
>> Pitch) (dir> *Model 'Yaw 'Pitch) (z3dCamera *FocLen Yaw Pitch 0 0 *Tower
>> LightBlue DarkGreen)) (draw> *Scene) (draw> *Model) (z3dPut) (z3dText 20
>> 580 (pack *Throttle " %")) (z3dText 120 580 (pack *Speed " km/h")) (z3dText
>> 220 580 (pack *Altitude " m")) (z3dText 320 580 (case *FocLen (20
>> "(--)") (40 "(-)") (160 "(+)") (320 "(++)")))
>> (z3dSync) (let M (*/ (usec) 1000) (setq "MSec" (- M (set (cdr R) (min -2 (-
>> M "MSec" 20
>> : !? (sim> *Scene)
>> sim> -- Bad message
>> ?
>
>
> Thanks!
>
> Rob
>
> On 24 April 2016 at 09:46, Robert Herman  wrote:
>
>> I think Java is valid, but this is for fun, and to further my PicoLisp
>> education. Plus I think Ersatz is slow even for Java, no?
>> I program in C, well I used to, so I just need to get down with the io.l
>> file and see which route to take. I'd like to do somethign that has some
>> value for the PicoLisp community rather than just a means to an end,
>> meaning no sloppy fix to say I did a game in PicoLisp.
>> I am just having a mental block on whether I am just wrapping libs, since
>> SDL2 is in C, and I just need to call it, or if I want to duplicate it in
>> pure PicoLisp, the way Alex did in his RC simulator. Althought, that was
>> 64-bit PicoLisp, which relies on the 'native' function (where is that
>> defined?), and a custom lib for everything, no openGl? I know there is a
>> 60-bit limit on loops in 64-bit PicoLisp, but that should not be even close
>> to a limitation ;)
>> I will look at your rcsim code, Alex, and maybe I can grok enough to use
>> it for a game lib?? I find digging into the code more and more interesting
>> each day! I am always amazed at what you have built.
>>
>> Rob
>>
>> On 23 April 2016 at 23:26, Jakob Eriksson  wrote:
>>
>>> I think minipicolisp is easy enough to extend. For a small game you need
>>> a dozen or so C calls. The Java route is interesting but has its
>>> distribution problems. What if there is no JVM on the target machine?
>>>
>>> > 23 apr. 2016 kl. 17:49 skrev Alexander Burger :
>>> >
>>> >> On Sat, Apr 23, 2016 at 01:06:46PM +0200, Jakob Eriksson wrote:
>>> >> That support is not going to be widely spread until
>>> >> a few years down the road.
>>> >
>>> > Oh, I see :(
>>> >
>>> > If portability is an issue, and miniPicoLisp is both too limited and
>>> > tedious to extend, then Rob should indeed also consider ErsaztLisp.
>>> >
>>> > It is by far easier to extend, with existing Java libraries. There are
>>> > some examples (in addition to what can be found on picolisp.com) on
>>> > rosettacode.org, not directly for OpenGl, but other GUI/Window stuff:
>>> >
>>> >   http://rosettacode.org/wiki/Animation#PicoLisp
>>> >  -> Java/Swing
>>> >
>>> >   http://rosettacode.org/wiki/GUI/Maximum_window_dimensions#PicoLisp
>>> >
>>> >   http://rosettacode.org/wiki/Image_Noise#PicoLisp
>>> >
>>> > ♪♫ Alex
>>> > --
>>> > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>>>
>>
>>
>


Re: OpenGL and miniPicoLisp

2016-04-23 Thread Robert Herman
I just tried to run rcsim.l on my newest PicoLisp system, and it didn't
run. I know I have run it on another box before. What am I doing wrong?
here's the code from load to failure. I typed '(go)' after the '-> go'
response, and it brought up a white window though:
>
>
> $ pil +
> : (load "@misc/rcsim.l")
> -> go
> : (go)
> -> (-20 0 (let R (assoc @ *Run) (sim> *Scene) (sim> *Model) (use (Yaw
> Pitch) (dir> *Model 'Yaw 'Pitch) (z3dCamera *FocLen Yaw Pitch 0 0 *Tower
> LightBlue DarkGreen)) (draw> *Scene) (draw> *Model) (z3dPut) (z3dText 20
> 580 (pack *Throttle " %")) (z3dText 120 580 (pack *Speed " km/h")) (z3dText
> 220 580 (pack *Altitude " m")) (z3dText 320 580 (case *FocLen (20
> "(--)") (40 "(-)") (160 "(+)") (320 "(++)")))
> (z3dSync) (let M (*/ (usec) 1000) (setq "MSec" (- M (set (cdr R) (min -2 (-
> M "MSec" 20
> : !? (sim> *Scene)
> sim> -- Bad message
> ?


Thanks!

Rob

On 24 April 2016 at 09:46, Robert Herman  wrote:

> I think Java is valid, but this is for fun, and to further my PicoLisp
> education. Plus I think Ersatz is slow even for Java, no?
> I program in C, well I used to, so I just need to get down with the io.l
> file and see which route to take. I'd like to do somethign that has some
> value for the PicoLisp community rather than just a means to an end,
> meaning no sloppy fix to say I did a game in PicoLisp.
> I am just having a mental block on whether I am just wrapping libs, since
> SDL2 is in C, and I just need to call it, or if I want to duplicate it in
> pure PicoLisp, the way Alex did in his RC simulator. Althought, that was
> 64-bit PicoLisp, which relies on the 'native' function (where is that
> defined?), and a custom lib for everything, no openGl? I know there is a
> 60-bit limit on loops in 64-bit PicoLisp, but that should not be even close
> to a limitation ;)
> I will look at your rcsim code, Alex, and maybe I can grok enough to use
> it for a game lib?? I find digging into the code more and more interesting
> each day! I am always amazed at what you have built.
>
> Rob
>
> On 23 April 2016 at 23:26, Jakob Eriksson  wrote:
>
>> I think minipicolisp is easy enough to extend. For a small game you need
>> a dozen or so C calls. The Java route is interesting but has its
>> distribution problems. What if there is no JVM on the target machine?
>>
>> > 23 apr. 2016 kl. 17:49 skrev Alexander Burger :
>> >
>> >> On Sat, Apr 23, 2016 at 01:06:46PM +0200, Jakob Eriksson wrote:
>> >> That support is not going to be widely spread until
>> >> a few years down the road.
>> >
>> > Oh, I see :(
>> >
>> > If portability is an issue, and miniPicoLisp is both too limited and
>> > tedious to extend, then Rob should indeed also consider ErsaztLisp.
>> >
>> > It is by far easier to extend, with existing Java libraries. There are
>> > some examples (in addition to what can be found on picolisp.com) on
>> > rosettacode.org, not directly for OpenGl, but other GUI/Window stuff:
>> >
>> >   http://rosettacode.org/wiki/Animation#PicoLisp
>> >  -> Java/Swing
>> >
>> >   http://rosettacode.org/wiki/GUI/Maximum_window_dimensions#PicoLisp
>> >
>> >   http://rosettacode.org/wiki/Image_Noise#PicoLisp
>> >
>> > ♪♫ Alex
>> > --
>> > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>>
>
>


Re: OpenGL and miniPicoLisp

2016-04-23 Thread Jakob Eriksson

That support is not going to be widely spread until
a few years down the road.

Even so, I expect it (Ubuntu on Windows) to be a
downloadable server component rather than standard on all Windows client
versions.

best regards,
Jakob



On 23/04/16 12:57, Robert Herman wrote:
> Thanks, I'll have a look when I get home.
> 
> Rob
> 
> On Apr 23, 2016 14:59, "Alexander Burger"  > wrote:
> 
> On Sat, Apr 23, 2016 at 02:29:18PM +0800, Robert Herman wrote:
> > I'd love to use full PicoLisp, because it is still small, but it
> is POSIX
> > dependent so you need Cygwin to make and distribute to Windows systems
> 
> I haven't investigated, but perhaps that's no longer a problem now that
> Microsoft supports POSIX natively?
> 
> 
> > If I understand you, I would need to write an FFI for
> miniPicoLisp, like
> 
> There is an FFI for miniPicoLisp by Tomas Hlavaty, but in this case it
> isn't even needed. You can extend the core system with OpenGl functions
> just like the existing I/O functions.
> 
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> ?subject=Unsubscribe
> 
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: OpenGL and miniPicoLisp

2016-04-23 Thread Robert Herman
Thanks, I'll have a look when I get home.

Rob
On Apr 23, 2016 14:59, "Alexander Burger"  wrote:

> On Sat, Apr 23, 2016 at 02:29:18PM +0800, Robert Herman wrote:
> > I'd love to use full PicoLisp, because it is still small, but it is POSIX
> > dependent so you need Cygwin to make and distribute to Windows systems.
>
> I haven't investigated, but perhaps that's no longer a problem now that
> Microsoft supports POSIX natively?
>
>
> > If I understand you, I would need to write an FFI for miniPicoLisp, like
>
> There is an FFI for miniPicoLisp by Tomas Hlavaty, but in this case it
> isn't even needed. You can extend the core system with OpenGl functions
> just like the existing I/O functions.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: OpenGL and miniPicoLisp

2016-04-23 Thread Alexander Burger
On Sat, Apr 23, 2016 at 02:29:18PM +0800, Robert Herman wrote:
> I'd love to use full PicoLisp, because it is still small, but it is POSIX
> dependent so you need Cygwin to make and distribute to Windows systems.

I haven't investigated, but perhaps that's no longer a problem now that
Microsoft supports POSIX natively?


> If I understand you, I would need to write an FFI for miniPicoLisp, like

There is an FFI for miniPicoLisp by Tomas Hlavaty, but in this case it
isn't even needed. You can extend the core system with OpenGl functions
just like the existing I/O functions.

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


Re: OpenGL and miniPicoLisp

2016-04-23 Thread Alexander Burger
Hi Rob,

> So what other libs and files do I need to drag into miniPicoLisp to get the
> existing lib/OpenGl.l to work other than math.l? And, how difficult is it
> to get math.l working in miniPicoLisp sufficiently to do any openGL work?

I think it is quite hard to get @lib/openGl.l to work with miniPicoLisp.

Or, to be exact, it is not possible. @lib/openGl.l is just a wrapper for
the OpenGl "glu" and "glut" libraries using the 'native' function of
pil64. And 'native' is missing from miniPicoLisp. So the whole wrapper
is meaningless, and you must call OpenGl functions from explicitly
written C glue code. Not difficult, but needs to be done.

Same with @lib/math.l, which consists also only of glue functions.

Also, I'm not sure if mini is a good idea. It lacks the database, so
more interesting games are out of reach. Why not pil64, where you can
use @lib/openGl.l right out of the box?

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