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

new topic     » topic index » view thread      » older message » newer message

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 thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu