Re: Phix Tutorial problems
- Posted by petelomax Jan 18, 2023
- 4081 views
Having not thought about this myself for a couple of weeks, it is now blindlingly obvious that rather than a boring static image at the start it should be a web page (not pdf) that shows a running clock and finishes with something like:
While it's a bit beyond the scope of this brief introduction, here (better yet inline) is the source code for the clock shown at the start, and the exact same runs almost identically on Windows, Linux, and in a web browser.
It is probably perfectly possible to achieve something similar with, say, node+React, not that I've been able to find a similar example [anyone?], but I think you'll agree that single source file is significantly easier.
Of course the whole JavaScript ecosystem (ditto many other programming languages) has tens of thousands of eager contributors and we're not quite there yet with Phix, but if you're prepared to roll your sleeves up...
May take me a while to cobble something together - pretty much just a slightly tedious manual cut and paste job of the links just given (plus a mere six supporting files).
It would of course be nice to have editable syntax coloured code as per CodePen and the like, maybe on some kind of wiki, but one step at a time, eh?
PS: There's a planned upgrade to Miraheze on Jan 21, fingers crossed that'll include an updated pygments with proper Phix syntax colouring rather than the horrible mess I currently use, so I'll certainly wait for that.
PPS: There's no rush on this and I also certainly wouldn't bother to publish it anyway while that piggin segfault on Linux is still hanging over my head.