1. p2js update/teaser, make sure you're sitting down first

I am proud to announce that my not-so-secret project, the Phix to JavaScript transpiler is officially a real and working thing,
not that you can actually have/try it yet, or that it will actually prove to be useful, or likely to ship any time soon.

Aside: Something is deeply amiss in the heart of Phix and now is not a good time for a release.
Three or four weeks ago I noticed that some diagnostics were appearing in an odd order.
It started grumbling about database updates a couple of weeks ago and just today it went
into an infinite loop in the background procesing of Edita (quite probably also database
related). It is something nasty and subtle, and I am on high alert to find and fix it.
Hopefully by keeping on testing other things I'll stumble into an actually fixable case.
Worrying times, but this sort of thing has happened before, and will happen again [BSG].

You cannot test yet, but here are some simple and not so simple rosettacode programs that work: https://rosettacode.org/mw/index.php?search=phixonline
(several of those are a bit trivial, feel free to make some better suggestions, but there are also half a dozen or more in there that even I am absolutely amazed actually work.)

You can also see a much shorter list of things that I have decided will never run online: https://rosettacode.org/mw/index.php?search=notonline
Reasons include [stall for] keyboard input, file i/o (esp unixdict.txt), tab characters[!], using a dll/so (esp mpfr/gmp), multithreading, etc.
A few of those could be changed from a console app into a simple GUI app (as per below), so they can be made to run online, for example
Magic_8-ball, 21_game, 24_game, Tic-tac-toe, 16_puzzle_game and Finite_state_machine.

Of course there are another 1100+ tasks I have not yet tried or classified in either way.

Finally (tada) here is my first stab at a proper pretty little gui program:

http://phix.x10.mx/p2js/BarnsleyFern.htm (Bear in mind I have specifically targetted the 0.27% of pGUI needed to get that to work.)
Sure, we can probably open it in full screen mode and hide the windows decorations, in time, but we need to make that happen on
desktop/Phix first, and only then port/support it, and then maybe as a final touch think about adding some if platform()=JS style tweaks.
You should also be able to explore a few [beta] support files that come with that.

You can find the desktop/Phix version here: http://phix.x10.mx/pwa.php?BarnsleyFern

Also http://phix.x10.mx/p2js/hello_world.htm and http://phix.x10.mx/pwa.php?hello_world
and http://phix.x10.mx/p2js/IupTreeView.htm and http://phix.x10.mx/pwa.php?IupTreeView
and http://phix.x10.mx/p2js/IupTable.htm and http://phix.x10.mx/pwa.php?IupTable

Note the IupTreeView and IupTable demos rely on pGUI.e mods only just uploaded to github.
I attacked IupTreeView and IupTable with some gusto, precisely because I figured they would be the most difficult, before the transpiler could even tokenise anything.
Do not infer the state of any other components, in fact I have not made even the slightest start on toggles, radios, groups, sliders, calendars, graphs, images...

Disclaimer: There may be some roadblocks marrying the desktop/Phix and browser event handlers.

I have also uploaded the relevant bits of the first draft of the docs for initial comments:

http://phix.x10.mx/docs/html/p2js.htm

The "Incompatibilites" page is the most complete, I know I need to put me brazen gameface on and do all the positive things equal justice.

There are a gazillion things still to do, including: Add several more decent gui examples to that list, the remainding 99.73% or so of pGUI...
Polish off and port pwa/p2js itself. Those pwa.php links show a fairly primitive proof of concept, that will hopefully get a run button, syntax colouring, etc (like say codepen).

It might also be wise to limit any excited ravings to this forum, at least until the thing is actually available and has at least a dozen decent, interesting, and genuinely useful GUI examples.
Few will be very impressed by a bit of text in small courier font showing up in a browser, as is the case for most of the big/first list.

Hopefully I'll get a handle on whatever is ailing Phix and feel confident enough to ship in maybe three or four weeks.

new topic     » topic index » view message » categorize

2. Re: p2js update/teaser, make sure you're sitting down first

Great, interesting that only BarnsleyFern.htm and hello_world.htm they work with Chrome and firefox supported by Windows XP

new topic     » goto parent     » topic index » view message » categorize

3. Re: p2js update/teaser, make sure you're sitting down first

Clever.

But really Pete, no Android port?

-)

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

4. Re: p2js update/teaser, make sure you're sitting down first

This is necessary so that IUP is first ported to android

new topic     » goto parent     » topic index » view message » categorize

5. Re: p2js update/teaser, make sure you're sitting down first

ChrisB said...

Clever.

But really Pete, no Android port?

Just to be clear, are you saying that these don't work on Android??

new topic     » goto parent     » topic index » view message » categorize

6. Re: p2js update/teaser, make sure you're sitting down first

AlexXX said...

Great, interesting that only BarnsleyFern.htm and hello_world.htm they work with Chrome and firefox supported by Windows XP

By "only" are you trying to say the treeview/table demos do not work?

new topic     » goto parent     » topic index » view message » categorize

7. Re: p2js update/teaser, make sure you're sitting down first

Another one: http://phix.x10.mx/p2js/animate_pendulum2.htm and http://phix.x10.mx/pwa.php?animate_pendulum2
and http://phix.x10.mx/p2js/Archimedean_spiral.htm and http://phix.x10.mx/pwa.php?Archimedean_spiral

new topic     » goto parent     » topic index » view message » categorize

8. Re: p2js update/teaser, make sure you're sitting down first

petelomax said...
ChrisB said...

Clever.

But really Pete, no Android port?

Just to be clear, are you saying that these don't work on Android??

Wishing I'd left that can of worms alone.

Chris

new topic     » goto parent     » topic index » view message » categorize

9. Re: p2js update/teaser, make sure you're sitting down first

ChrisB said...

Wishing I'd left that can of worms alone.

I think I know what that feels like sad

new topic     » goto parent     » topic index » view message » categorize

10. Re: p2js update/teaser, make sure you're sitting down first

I don't know what the problem is, today I checked all the examples again, only one example does not work under XP http://phix.x10.mx/p2js/IupTable.htm

new topic     » goto parent     » topic index » view message » categorize

11. Re: p2js update/teaser, make sure you're sitting down first

AlexXX said...

I don't know what the problem is, today I checked all the examples again, only one example does not work under XP http://phix.x10.mx/p2js/IupTable.htm

It is probably not XP per se, but the age of your browser.
I mean if you are still trying to use IE then, on yer bike!

So, what browser are you using and exactly how old is it?

Not against accepting fixes, but I am going to use recent-ish CSS features,
and would never even pretend to provide any kind of legacy browser support.

new topic     » goto parent     » topic index » view message » categorize

12. Re: p2js update/teaser, make sure you're sitting down first

49 Chromium, 52 Firefox

new topic     » goto parent     » topic index » view message » categorize

13. Re: p2js update/teaser, make sure you're sitting down first

Not sure what happened, but yesterday neither the pendulum nor the spiral worked. Today they all do.

Firefox 88.0.1 Linux

new topic     » goto parent     » topic index » view message » categorize

14. Re: p2js update/teaser, make sure you're sitting down first

AlexXX said...

49 Chromium, 52 Firefox

According to (eg) https://caniuse.com/resizeobserver it'll work better with Chrome >= 64 (Jan 2018), Firefox >= 69 (Sep 2019).
That is probably one of the more recent features that I have taken advantage of, and will continue to take advantage of.
I have no problem with you accepting that some things might not work if you stick with such older versions.
Nor am I strictly opposed to chucking in the odd polyfill, just not particularly keen this end.

irv said...

Not sure what happened, but yesterday neither the pendulum nor the spiral worked. Today they all do.

Probably just the browser cache. If push comes to shove I could stick version numbers on files to prevent that.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu