Re: Is this the right place for bugs / questions about PilOS?

2016-04-16 Thread cat stevens
Robert,

The link  you
gave is, interestingly, quite helpful. (That's the non-404 version, because
things got moved around, it seems.)
I was ambivalent about using an emulator inside Wine (since I use Linux,
and don't have much access to Windows), but trying to compile the sources
for that version, and all surrounding versions, was met with linker errors
only *after* 99% of the object files were generated.

Compilation issues aside, the Windows exe does in fact run inside Wine and
PilOS does in fact run inside that, so thank you for that. :D

I'll still have to see if I can pick up an old-ish cheap-ish Acer
somewhere, if that's what I gotta do to run a modern Lisp on bare-metal.

~cat

On Fri, Apr 15, 2016 at 8:12 PM, Robert Herman  wrote:

> Cat,
>
> Try an older version of qemu. If it works, you can try newer ones if they
> have features or bugs corrected that may affect you.
>
> I had the same problem, but thanks to Joe Bogner and Alex, I have it
> running. Here's the link to the older qemu that worked:
>
> http://qemu.weilnetz.de/w64/qemu-w64-setup-20140715.exe
>
> I was running it on Win 8 64-bit at the time.
>
>
> Regards,
>
> Rob
>
>
>
> On 16 April 2016 at 02:46, cat stevens  wrote:
>
>> > This is an error from the BIOS (Was this also Qemu?).
>>
>> Yes, that was Qemu. Here's a screenshot .
>>
>> It comes after the "Loading PilOS" text, and I found the string constant
>> "READ ERROR 00" in the image binary (at 0xBF), so I thought that was
>> PilOS.
>>
>> I also recompiled using the provided source / instructions on the Wiki,
>> and
>> tried booting the resulting "x86_64.bin" in Qemu and bare metal with the
>> same results.
>>
>> > Most of today's BIOSes seem to implement only the absolute minimum,
>> > which is understandable as modern OSes don't call the BIOS so much any
>> > more.
>>
>> My PC's BIOS is the same (un-updated) one it shipped with, but the trouble
>> with BIOSes is that it's unlikely to find two identical confiugurations on
>> any two systems. :)
>>
>> > This is a pity, and I don't know what to recommend. But at least
>> > Qemu I would have expected to work ...
>>
>> I was kinda looking forward to having a Lisp OS on bare metal, but maybe
>> this is why there aren't that many. :P
>> I'm all ears if you've any suggestions, and I'll definitely keep an eye on
>> development.
>>
>> ~ cat
>>
>> On Fri, Apr 15, 2016 at 12:57 PM, Alexander Burger 
>> wrote:
>>
>> > On Fri, Apr 15, 2016 at 12:08:56PM -0400, cat stevens wrote:
>> > > Hi! I am very interested in the idea and look of PilOS; however, I'm
>> > having
>> > > some issues trying to get started with it. Can I ask about those here?
>> >
>> > Sure! :)
>> >
>> >
>> > > First, the command on the Wiki seems to have an issue, which I asked
>> > about
>> > > here
>> > > <
>> >
>> http://unix.stackexchange.com/questions/276480/booting-a-raw-disk-image-in-qemu
>> > >
>> > > -- it seems like it should be:
>> > >
>> > > qemu-system-x86_64 -drive format=raw,file=x86-64.img
>> >
>> > What I used for Qemu was
>> >
>> >$ qemu-system-x86_64  -m 4096  -smp 4  -ctrl-grab  -no-reboot
>> > pilos/x86-64.img
>> >
>> > so it is similar to what you wrote in the above link, and it worked fine
>> > for me.
>> >
>> >
>> >
>> > > Even when I run that (apparently more correct) command, PilOS gives
>> "READ
>> > > ERROR 09" and hangs.
>> >
>> > This is an error from the BIOS (Was this also Qemu?).
>> >
>> >
>> > > I also tried booting my laptop from the raw disk image written to a
>> USB
>>
>
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sun, Apr 17, 2016 at 12:20:42AM +0700, Robert Herman wrote:
> That did it, Alex. Now onto looking at the libs to see what has been
> implemented in HTML5 Canvas.

Good. The function list can be easily extended if necessary.


One important issue needs still be decided: Do you need key events in
the game? Currently, @lib/canvas.l supports mouse- and touch-events
(click, double-click and drag), but no key-events.

They would be trivial to implement: Just add a handler for keydown, and
pass the key to 'drawCanvas' as a transient symbol in the third argument
(where a number encodes the mouse-events).

The problem is another one: A canvas does normally not receive keyboard
focus (though it may be possible to force it by setting the "tabindex"
and "contentEditable" attributes), and I'm not sure if this is the right
way in a browser. It is of course also always possible to set the
keyboard focus to some input field and process the keys there. How do
other games handle this?


> Any ideas on the maximum amount of entities, and what type, can be rendered
> with picoLisp?

There is no maximum. It may be thousands, see for example

   http://picolisp.com/wiki/?osmgeodata

The question however is how many can be handled at the required speed. I
have no exact info about that.


> Most importantly, how could I package the final picoLisp/HTML5 game for
> folks that don't have or want to install picoLisp?

If a single TGZ is OK, then it is easy. Just install a local PicoLisp
together with the whole app in a single directory (all references with
relative path names), and pack that into a tarball. It can be unpacked
on any equivalent machine in an arbitrary location. Would that suffice?

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


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
That did it, Alex. Now onto looking at the libs to see what has been
implemented in HTML5 Canvas.
Any ideas on the maximum amount of entities, and what type, can be rendered
with picoLisp?
Most importantly, how could I package the final picoLisp/HTML5 game for
folks that don't have or want to install picoLisp?
I'm not a web guy, if you havn't noticed ;)

Rob

On 16 April 2016 at 21:23, Alexander Burger  wrote:

> On Sat, Apr 16, 2016 at 08:50:22PM +0700, Robert Herman wrote:
> > There is hope yet!
> > It works, and I get up to 420 Hz.
>
> Wow! Very fast.
>
>
> > The httpGate command seems to execute,
> > however, if I put in http://localhost the page cannot connect. I have to
>
> The simplest is to start it (as root) as
>
># bin/httpGate 80 8080
>
> then http://localhost redirects to the app listening on port 80.
>
> Perhaps you didn't do that as root?
>
>
> > Is there a way to know if httpGate is running?
>
> I use  'ps -C httpGate'.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sat, Apr 16, 2016 at 08:50:22PM +0700, Robert Herman wrote:
> There is hope yet!
> It works, and I get up to 420 Hz.

Wow! Very fast.


> The httpGate command seems to execute,
> however, if I put in http://localhost the page cannot connect. I have to

The simplest is to start it (as root) as

   # bin/httpGate 80 8080

then http://localhost redirects to the app listening on port 80.

Perhaps you didn't do that as root?


> Is there a way to know if httpGate is running?

I use  'ps -C httpGate'.

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


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
There is hope yet!
It works, and I get up to 420 Hz. The httpGate command seems to execute,
however, if I put in http://localhost the page cannot connect. I have to
put in http://localhost:8080 in both Firefox and Midori (Opera). Is there a
way to know if httpGate is running? I don't see it with pgrep or htop.
Thanks!

Rob

On 16 April 2016 at 19:32, Alexander Burger  wrote:

> On Sat, Apr 16, 2016 at 07:02:57PM +0700, Robert Herman wrote:
> > Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi
> hotspot.
> > I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).
>
> In fact it is not the data rates but the ping times which are relevant
> here.
>
>
> > I cannot run the example locally for some strange reason. I had the
> > rectangle example working earlier. Does this example require running
> > httpGate too? I kind of know what the -main and -go do, but can you
> explain
> > in case I am missing something?
>
> I start it as
>
>$ ./pil misc/canvas.l -main -go +
>
> and then point the browser to http://localhost (with httpGate running on
> port 80).
>
> If httpGate is not running, point the browser to http://localhost:8080,
> but note that then JS won't fire up immediately (due to the same-origin
> policy of XMLHttpRequest). Just click any button or the "Single" link to
> get it going.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
On Sat, Apr 16, 2016 at 07:02:57PM +0700, Robert Herman wrote:
> Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi hotspot.
> I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).

In fact it is not the data rates but the ping times which are relevant
here.


> I cannot run the example locally for some strange reason. I had the
> rectangle example working earlier. Does this example require running
> httpGate too? I kind of know what the -main and -go do, but can you explain
> in case I am missing something?

I start it as

   $ ./pil misc/canvas.l -main -go +

and then point the browser to http://localhost (with httpGate running on
port 80).

If httpGate is not running, point the browser to http://localhost:8080,
but note that then JS won't fire up immediately (due to the same-origin
policy of XMLHttpRequest). Just click any button or the "Single" link to
get it going.

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


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Robert Herman
Cool. I am only getting around 2.80 Hz maximum over my 3G/4G WiFi hotspot.
I usually see 150 KBs to 300 KBs (1.2 to 2.5 mb/s).
I cannot run the example locally for some strange reason. I had the
rectangle example working earlier. Does this example require running
httpGate too? I kind of know what the -main and -go do, but can you explain
in case I am missing something?

I can still consider picolisp for the Lisp Game Jam that's 12 days off, but
I think I need to fall back to CL for this weekend's LD35 compo. Thanks for
your continued help, Alex!

Regards,

Rob

On 16 April 2016 at 16:15, Alexander Burger  wrote:

> Hi Rob,
>
> > A simple game engine only requires a main loop to set things up, and a
> draw
> > loop to update the screen for animation. Do you think the current
> picoLisp
> > libs with Canvas can support a 30 fps update of a 640x480 screen of
> > bitmapped graphics?
>
> This does not depend much on the canvas size, but mainly on network
> bandwidth and the number of elements to draw per frame.
>
> For example, the simple Canvas demo from
>
>http://picolisp.com/wiki?canvasDrawing
>
> runs at about 15 Hz when called on http://canvas.picolisp.com via DSL,
> but at up to 140 Hz when invoked at localhost (tested on my Nexus 9
> tablet) as
>
>$ ./pil misc/canvas.l -main -go +
>
>
> For that, I have just extended the demo a little and inserted a "Hz"
> display:
>
>(let (U (usec)  D (- U (default *Last U)))
>   (inc '*Frames)
>   (when (>= D 100)
>  (setq *Hz (*/ 1 *Frames D)  *Last U  *Frames 0) )
>   (csFillText
>  (pack (format *Hz 2) " Hz")
>  (- *DX 60)
>  20 ) )
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Spring 2016 Lisp Game Jam

2016-04-16 Thread Alexander Burger
Hi Rob,

> A simple game engine only requires a main loop to set things up, and a draw
> loop to update the screen for animation. Do you think the current picoLisp
> libs with Canvas can support a 30 fps update of a 640x480 screen of
> bitmapped graphics?

This does not depend much on the canvas size, but mainly on network
bandwidth and the number of elements to draw per frame.

For example, the simple Canvas demo from

   http://picolisp.com/wiki?canvasDrawing

runs at about 15 Hz when called on http://canvas.picolisp.com via DSL,
but at up to 140 Hz when invoked at localhost (tested on my Nexus 9
tablet) as

   $ ./pil misc/canvas.l -main -go +


For that, I have just extended the demo a little and inserted a "Hz"
display:

   (let (U (usec)  D (- U (default *Last U)))
  (inc '*Frames)
  (when (>= D 100)
 (setq *Hz (*/ 1 *Frames D)  *Last U  *Frames 0) )
  (csFillText
 (pack (format *Hz 2) " Hz")
 (- *DX 60)
 20 ) )

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


Re: Is this the right place for bugs / questions about PilOS?

2016-04-16 Thread Alexander Burger
On Fri, Apr 15, 2016 at 03:46:06PM -0400, cat stevens wrote:
> > This is an error from the BIOS (Was this also Qemu?).
> 
> Yes, that was Qemu. Here's a screenshot .
> 
> It comes after the "Loading PilOS" text, and I found the string constant
> "READ ERROR 00" in the image binary (at 0xBF), so I thought that was PilOS.

Correct. PilOS prints this message after the $0x42 BIOS call (Extended
Read Sectors) returned an error (Carry bit set).


> I was kinda looking forward to having a Lisp OS on bare metal, but maybe
> this is why there aren't that many. :P

Until now we know that it works on

   - Acer TavelMate P-253E (mine)
   - Acer Aspire One 722 (Mattias Sundblad)

Perhaps you can try to find one of these second-hand?

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