1. Phix 0.8.2 uploaded
- Posted by petelomax Nov 24, 2020
- 2359 views
- Last edited in December
Usual place http://phix.x10.mx/download.php (0.8.1 notes: https://openeuphoria.org/forum/m/134804.wc )
Some notes scribbled over the last few months:
--11/07/20: ORAC enhancements (to investigate the FAST, aka Flat Abstract Syntax Tree): -- Allow // as a line comment (as well as --) -- Allow routine-level constant and static declarations (top only, some needed moving) -- Added a hash() builtin offering partially compatibility with Euphoria -- Added || and && bitwise operators along with ||= and &&= compound assignments -- At the same time I added >> and << bit shift operators -- NB in Orac those were rotate. -- Note that assert cond must be coded as assert(cond) [95 instances (6 already had the ())] -- Likewise bitwise constant ==> enum by *2 [5 instances], and obj -> object [31 instances], -- and a ''= b ==> xor_bits(or_bits(a,b),b) [5 instances, in orac that is, could do better?] -- [note that enum by *2 does not allow general expressions, only compile-time literals.] -- Also note that Phix has block scope whereas ORAC does not, so quite a few variables -- had to be hoisted to routine-level rather than go out of scope at the (eg) "end if". -- There were also a couple of places where I had to replace constant a,b with enum a,b. -- While ORAC now runs on Phix, it is probably quite unstable, crashing with sq_op etc. -- Note that "and" is a logical operator whereas && is bitwise, hence "1 and 2"=>1 (true) but "1 && 2"=>0, (=false). -- Note that "or" is a logical operator whereas || is bitwise, hence "1 or 2"=>1 (true) but "1 || 2"=>3 (true-ish). -- Short-circuiting is //not// performed by the && and || operators. -- Migrate constants to block scope. -- IupMglPlot, IupFlatFrame, IupDropButton, IupGLText, IupDatePick, IupFlatLabel, IupFlatList, -- IupFlatSeparator, IupGauge, IupFlatToggle, IupFlatTree, IupFlatValuator, IupMatrixList, -- IupSpace, IupMessageAlarm, IupMessageError, IupGlobalsDialog, IupClassInfoDialog -- IupProgressDlg, IupMultiBox, IupFlatTabs, IupPostMessage, IupExecute, IupLog. -- [also IupFlowBox, but IupMultiBox is probably better anyway] -- added an optional limit argument to substitute() -- new progress() routine - replace on rc when 0.8.2 is shipped -- local constants and static variables in routines -- static is now a reserved keyword -- added bankers_rounding() routine -- Icallbacki -- dict_pop() and dict_peek() added -- IupDestroy is now a function to encourage nullification of destroyed handles. -- (nb this will break existing code, but the fixes should be obvious [or tmp/just {}= ]) -- builtins/unit_test.e (an autoinclude) -- Work has begun in earnest on p2js. Do not get too excited just yet about the references to it -- that have sprung up all over the docs - they are actually there to help me, not you, for now. -- At this stage, feedback would probably impede, not help, thanks for the offer anyway. -- db_current_table() added -- peep_dict() and pop_dict() added -- get_interpreter() is now an autoinclude -- new requires() builtin -- get_routine_info() now also returns the actual name -- new hll_stubs.e -- added mpz_xor(), mpfr_init_set_q(), mpfr_init_set_z(), mpfr_get_d(), mpq_cmp() -- apply() enhanced to accept true/false as first argument, papply() addded. -- factors(0) and prime_factors(0) now return {}, and is_prime(0) now returns false. -- new sq_cmp() routine -- shorten() what(aka 2nd arg) can now be "" -- new is_integer() -- added %q and %Q to printf(), along with prefer_backtick option -- Edita/Edix: -- Ctrl [] now copes with try statements -- some nested comments were incorrectly handled (eg "--/* /**/ --*/") -- Edix not found msg no longer spanners focus
Update: "static" removed in 1.0.1 (it only ever worked for integers and bools assigned to a literal or pre-existing file-level constant, and proved incompatible with p2js)
UPDATE: (rather belated) It was, I believe, in this release that myfunc (without a following '(') became equivalent to routine_id("myfunc"),
and <int>(x,y,z) became equivalent (depending on context) to call_func/proc(<int>,{x,y,z}).
2. Re: Phix 0.8.2 uploaded
- Posted by begin Nov 25, 2020
- 2290 views
Hi Pete,
thanx a million!
Richard
3. Re: Phix 0.8.2 uploaded
- Posted by ChrisB (moderator) Nov 25, 2020
- 2250 views
Hi Pete.
Thanks for the update - so far all win32 progs seem to be working.
As a discussion point, what is the best way to update your Phix installation? this time I just copied all the zip contents and overwrote the existing files, but doing this is it possible to leave some unused and possibly conflicting stragglers?
Cheers
Chris
4. Re: Phix 0.8.2 uploaded
- Posted by lesterb Nov 25, 2020
- 2249 views
Thanks for the release Pete.
I'll download and have a go later today (or tomorrow).
Les
5. Re: Phix 0.8.2 uploaded
- Posted by irv Nov 25, 2020
- 2244 views
With Linux 64-bit:
Testing[59]: /home/irv/phix/test/t64struct.exw /home/irv/phix/test/t64struct.exw:598 attempt to divide by 0Uncommenting line 597:
Testing[59]: /home/irv/phix/test/t64struct.exw [1;5,2] + 1/2 -> [1;1,2,7,36600682685931650] /home/irv/phix/test/t64struct.exw:598 attempt to divide by 0
If I skip this test, all other tests pass.
6. Re: Phix 0.8.2 uploaded
- Posted by petelomax Nov 25, 2020
- 2250 views
As a discussion point, what is the best way to update your Phix installation?
Backup & overwrite.
With rename/recreate, you'll lose Edita settings, which should be preserved by an overwrite.
The benefits of a backup should be obvious, not just in case of a bum release or corrupt zip, but you may have edited some demo and that'll get clobbered.
After my PC needed open heart surgery in March this year (new PSU), I had to perform a rename/recreate, and found yet more things to recover while building 0.8.2.
this time I just copied all the zip contents and overwrote the existing files, but doing this is it possible to leave some unused and possibly conflicting stragglers?
Generally not.
For instance builtins\VM\psprintN.e in 0.8.2 now begins with "DEAD (now in VM\pprntfN.e)" rather than just being omitted from this release.
Eventually such things will be removed completely, once any unnecessary and now incorrect "include [VM\]psprintN.e" have been eradicated.
You'll find about ten such remnants in 0.8.2, they'll hardly hurt anyone.
A far bigger danger is corrupt/partial zip files, damaged by my upload or your download.
7. Re: Phix 0.8.2 uploaded
- Posted by petelomax Nov 25, 2020
- 2226 views
With Linux 64-bit:
Testing[59]: /home/irv/phix/test/t64struct.exw /home/irv/phix/test/t64struct.exw:598 attempt to divide by 0Uncommenting line 597:
Testing[59]: /home/irv/phix/test/t64struct.exw [1;5,2] + 1/2 -> [1;1,2,7,36600682685931650] /home/irv/phix/test/t64struct.exw:598 attempt to divide by 0
If I skip this test, all other tests pass.
Thanks, mea culpa, inadequately tested on 64-bit, I've simply changed it:
--for i=1 to length(dd) do for i=iff(machine_bits()=32?1:4) to length(dd) do
8. Re: Phix 0.8.2 uploaded
- Posted by irv Nov 25, 2020
- 2245 views
All tests completed successfully, 3.36 seconds
Thanks!
9. Re: Phix 0.8.2 uploaded
- Posted by lesterb Nov 29, 2020
- 2160 views
Ok, took me a bit longer than I expected, but I was in the middle of an IUP update, so finished that before installing phix 0.8.2.
All done now and tests all run, using my pre-installed IUP. Marvellous.
For info, I'm on IUP 3.30, CD 5.14, IM 3.15.
10. Re: Phix 0.8.2 uploaded
- Posted by petelomax Nov 29, 2020
- 2187 views
For info, I'm on IUP 3.30, CD 5.14, IM 3.15.
Be warned, I had an issue with K_ANY on 3.30 whereby I got '+' whether shift was pressed or not,
whereas on 3.29 and earlier I got '+' or '=' as expected. It was fixed in SVN on the 28th August,
so if your source/dll/so predates that...
Hence I shipped 0.8.2 with the (windows) 3.29 dlls.
11. Re: Phix 0.8.2 uploaded
- Posted by lesterb Nov 29, 2020
- 2148 views
Hi Pete,
Thanks for the info. I downloaded 3.30 about a week ago.
I haven't checked the dates but a quick test in C and Phix seems to behave correctly.
I'll do a bit more digging tomorrow - dinner and wine imminent.
Les
12. Re: Phix 0.8.2 uploaded
- Posted by lesterb Dec 03, 2020
- 1989 views
Yes, I can see the K_ANY problem now. I think I'll revert to Iup 3.29 as well.
Les
13. Re: Phix 0.8.2 uploaded
- Posted by _tom (admin) Dec 04, 2020
- 1958 views
I can't get Phix to load .so files for pGUI.
How do you install Phix on Linux? Where does /Phix directory go? How do you get Linux to read p64 from any terminal?
be well
_tom
14. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 05, 2020
- 1937 views
I can't get Phix to load .so files for pGUI.
How do you install Phix on Linux? Where does /Phix directory go? How do you get Linux to read p64 from any terminal?
be well
_tom
I'll have to pass on where the Phix directory should really go, or how you set "%PATH%" on Linux, maybe irv will chip in.
I (eventually) managed to find this: https://openeuphoria.org/forum/m/131839.wc - see the "Install" section.
I usually just slap it in my home directory, and once it runs "./p -test" from there I deem it a good 'un.
There are some notes in Phix\demo\pGUI\lnx\installation.txt re installing IUP, slightly out of date - I'll recommend versions as follows: IUP 3.29, CD 5.13, IM 3.14
HTH, Pete
15. Re: Phix 0.8.2 uploaded
- Posted by irv Dec 05, 2020
- 1907 views
I can't get Phix to load .so files for pGUI.
How do you install Phix on Linux? Where does /Phix directory go? How do you get Linux to read p64 from any terminal?
be well
_tom
I'll have to pass on where the Phix directory should really go, or how you set "%PATH%" on Linux, maybe irv will chip in.
I (eventually) managed to find this: https://openeuphoria.org/forum/m/131839.wc - see the "Install" section.
I usually just slap it in my home directory, and once it runs "./p -test" from there I deem it a good 'un.
There are some notes in Phix\demo\pGUI\lnx\installation.txt re installing IUP, slightly out of date - I'll recommend versions as follows: IUP 3.29, CD 5.13, IM 3.14
HTH, Pete
I don't know. I used sudo to mv /home/irv/phix/p /usr/local/bin (note: not p64, just p)
Now, from my home directory, I can type p hello, and run hello.ex.
However, if I add anything that needs to autoload a built-in (like open_dll), I get:
$ p hello "/home/irv" Cannot open autoinclude VM/pfileioN.e in /home/irv/, /usr/local/bin/, /usr/local/bin/builtins/VM/, or /usr/local/bin/builtins/.
So p is looking in /usr/local/bin for the builtins folder. That is not where such things should be stored.
Euphoria libraries are in /usr/local/include which seems more reasonable.
I don't know how to change where p looks for the builtins.
16. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 06, 2020
- 1891 views
I don't know how to change where p looks for the builtins.
In ptok.e, routine initFilePathSet(), you'll find:
addPath(rootpath&"builtins"&SLASH) --DEV addPath(rootpath&"builtins"&SLASH&"VM"&SLASH) -- (added 8/4/15)
rootpath is set in pglobals.e, routine set_rootpath(), from command_line()[1].
Note that as well as builtins, phix loads tests|demos|docs|etc relative to that, I think.
There is also a global constant phixverstr in that file, eg "0.8.2", which I predict will be useful.
I suspect what should really be done is to copy the distro's builtins to eg /usr/local/include/builtins.0.8.2/ and that way you could have >1 version at the same time without clobbering the last, and without suffering wierd failures from loading the wrong version autoinclude files. /usr/local/include/phix.0.8.2/builtins/ might prove better. Obviously there is nothing as yet that attempts to automate any of that.
It would be equally fair to say that some of the stuff I've bunged into C:\Program Files[ (x86)]\Phix on windows should really be put in (say) C:\ProgramData, aka %ALLUSERSPROFILE%,\Phix and/or C:\Users\Pete\AppData\Local aka %LOCALAPPDATA%, \Phix.
17. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 11, 2020
- 1726 views
phix.0.8.2.setup.exe located in C:\Users\user Downloading C:\Users\user\phix.0.8.2.1.zip: Current=0, Total=0 (0%) C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:95 Error 22(The requested URL returned error: 404 Not Found) downloading file --> see C:\Program Files (x86)\Phix\ex.err Press Enter...
C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:95 in procedure download() crash(Error 22(The requested URL returned error: 404 Not Found) downloading file) filename = `C:\Users\user\phix.0.8.2.1.zip` url = `http://phix.x10.mx/C:\Users\user\phix.0.8.2.1.zip` out = `C:\Users\user\phix.0.8.2.1.tmp` fn = 3 pFilename = 3898416 ret = 22
18. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 12, 2020
- 1691 views
C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:95 in procedure download() crash(Error 22(The requested URL returned error: 404 Not Found) downloading file) url = `http://phix.x10.mx/C:\Users\user\phix.0.8.2.1.zip`
Aside: HaHa! It's gone wrong 'cos you put the phix.0.8.2.setup.exe somewhere sensible! If you either a) moved it somewhere random so it don't find it, or b) manually downloaded all the other zips next to it, then it'd probably run fine. Anyway, obviously it's a bug:
Can you change line 77 in C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e to
-- string url = base_url&filename, string url = base_url&get_file_name(filename),
and then (as per ppw.bat) re-run 'pw pdemo -settings', see what happens (it should complete)
Thanks
19. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1696 views
and then (as per ppw.bat) re-run 'pw pdemo -settings', see what happens (it should complete)
Thanks
Ok, did, opened console in C:\Program Files (x86)\Phix\ and this occured:
C:\Program Files (x86)\Phix>pw pdemo -settings C:\Program Files (x86)\Phix>and then this in a new console happened:
phix.0.8.2.setup.exe located in C:\Users\user Downloading C:\Users\user\phix.0.8.2.1.zip: Current=0, Total=0 (0%) C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:95 Error 22(The requested URL returned error: 404 Not Found) downloading file Press Enter...so we got ex.err file:
C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:95 in procedure download() crash(Error 22(The requested URL returned error: 404 Not Found) downloading file) filename = `C:\Users\user\phix.0.8.2.1.zip` url = `http://phix.x10.mx/C:\Users\user\phix.0.8.2.1.zip` out = `C:\Users\user\phix.0.8.2.1.tmp` fn = 3 pFilename = 3898416 ret = 22 ... called from C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:187 in procedure install()Sorry for messing things up again, Kat
20. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 12, 2020
- 1671 views
What does line 77 in C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e say?
Has something somehow undone the edit you just did?
22. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1656 views
What does line 77 in C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e say?
Has something somehow undone the edit you just did?
Line 77 of C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e
string url = base_url&get_file_name(filename),
Kat
23. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1652 views
Ok, strangeness...
... called from C:\Program Files (x86)\Phix\demo\pGUI\pdemo\installation.e:187 in procedure install()and sure enough, there was a call to download. So i added a line to print out the filename at that location..
puts(1,"\n--- "&filename&" ---\n") download(filename)and i got no puts() and ex.err still says the error is on line 187, even tho that call is now line 188. I did a search for "install", and installation.e exists only in "C:\Program Files (x86)\Phix\demo\pGUI\pdemo\".
Is Phix cacheing code somewhere, and running from there if it wasn't deleted by a previous completed run?
I just added a with trace and a trace(1) and this was also ineffective.
Kat
24. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1654 views
Ah HA
C:\>dir *installation.e /S Directory of C:\Program Files (x86)\Phix\demo\pGUI\pdemo 11/24/2020 04:47 PM 9,485 installation.e 1 File(s) 9,485 bytes Directory of C:\Users\user\AppData\Local\VirtualStore\Program Files (x86)\Phix\demo\pGUI\pdemo 12/12/2020 12:23 PM 9,500 installation.e 1 File(s) 9,500 bytesBut............ adding the puts line for the filename at line 187 did nothing there also.
Kat
25. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1649 views
So i went looking for a help file, or manpages, or a readme, or anything. Win7 won't open the .chm. On a whim, i tried and recieved....
C:\Program Files (x86)\Phix>p help `C:\Program Files (x86)\Phix` C:\Program Files (x86)\Phix\pmsgs.e:564 in procedure Fatal() invalid file number (-1) msg = `Cannot open C:\Program Files (x86)\Phix\help.ex` fn = -1 ... called from C:\Program Files (x86)\Phix\ptok.e:880 in procedure includeFile() file = `C:\Program Files (x86)\Phix\help.ex` autoInclude = 0 emitcol = 0 pathno = <novalue> k = 28 km1 = <novalue> kp1 = 29 Global & Local Variables Press Enter... C:\Program Files (x86)\Phix>And it's true, there is no help.ex file. I tried the webpages, and there's no "search for", and no result clicking on keywords, and "trace" isn't mentioned. There's no mention of why editing installation.e has no effect. I don't know what to do.
Kat
26. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 12, 2020
- 1677 views
C:\Program Files (x86)\Phix\pmsgs.e:564 in procedure Fatal() invalid file number (-1)There's no mention of why editing installation.e has no effect. I don't know what to do.
Looks like a permissions error:
global procedure Fatal(string msg) ... fn = open("ex.err","w") puts(fn,msg) -- <<============================= this is line 564
If I right click on C:\Program Files (x86)\Phix, properties, security tab, then Users (Pete-PC/Users) has Full Control checked. I recommend you try the same.
I suspect windows is saving mods/edits in a "VirtualStore", and then running the now hidden original...
Some background: https://stackoverflow.com/questions/3219255/why-do-files-get-placed-in-c-users-usernameappdata-local-virtualstore-progra
and https://interworks.com/blog/dsmith/2011/09/21/disabling-windows-7-virtual-store and lastly the last line of post #16 above.
I'm open to suggestions for improvement, but ultimately I believe that kind of security model simply does not make any sense for a self-hosted compiler with the source files in C:\Program Files. On reflection, that is probably why my C:Root is now a messy circus of two dozen or more compiler-related directories that I always thought should have been put in C:\Program Files instead. As if whacking things in root is secure...
<rant class="sarcasm"> Here is our new security model. Here are some ways you'll need to get around it, making it completely pointless. But we'll still make your life a misery. Aren't we clever? </rant>
27. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1644 views
If I right click on C:\Program Files (x86)\Phix, properties, security tab, then Users (Pete-PC/Users) has Full Control checked. I recommend you try the same.
I cannot get all the checks to be bold-grey. about half are lite-skinny-grey.
Same 404 in the same ole same ole. Waaaiiiitttt... RE-edited the installation.e, program is downloading.........
till it froze with
File C:\Users\user\phix.0.8.2.3.zip saved Delete downloaded zip files?(Y/N):N secondary installation complete fatal error: VCRUNTIME140.DLL could not be loaded try installing Visual C++ Redistributable Packages for Visual Studio 2015..19 from https://aka.ms/vs/16/release/VC_redist.x86.exe [and maybe https://aka.ms/vs/16/release/VC_redist.x64.exe]
What? Waasn't this self-hosted, self-compiling, and no need for any compiler knowledge?
Kat
28. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 12, 2020
- 1634 views
I cannot get all the checks to be bold-grey. about half are lite-skinny-grey.
That's fine, it just means some are inherited
Same 404 in the same ole same ole. Waaaiiiitttt... RE-edited the installation.e, program is downloading.........
Excellent, almost there
till it froze with
File C:\Users\user\phix.0.8.2.3.zip saved Delete downloaded zip files?(Y/N):N secondary installation complete fatal error: VCRUNTIME140.DLL could not be loaded try installing Visual C++ Redistributable Packages for Visual Studio 2015..19 from https://aka.ms/vs/16/release/VC_redist.x86.exe [and maybe https://aka.ms/vs/16/release/VC_redist.x64.exe]
What? Waasn't this self-hosted, self-compiling, and no need for any compiler knowledge?
Yeah, I guess I should automate that... at least download them for you and issue an explanatory message/warning... it's (now) on my to-do list.
Anyway, you are almost there, that should be the last step [or two], and I don't recall it asking any tricky questions.
29. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1620 views
I don't have any Visual Studio, and didn't consider wanting it, but must i get that now to get the libraries for it?
30. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 12, 2020
- 1623 views
I don't have any Visual Studio, and didn't consider wanting it, but must i get that now to get the libraries for it?
Just the runtimes ~ 13.5MB (*2), as opposed to the monster 800MB download and 20-50GB (erm, up to 210GB) of space the full Visual Studio would take.
PS You should now technically have a working Phix installation (try p -test), these runtimes are for pGUI.
31. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 12, 2020
- 1623 views
I don't have any Visual Studio, and didn't consider wanting it, but must i get that now to get the libraries for it?
Just the runtimes ~ 13.5MB (*2), as opposed to the monster 800MB download and 20-50GB (erm, up to 210GB) of space the full Visual Studio would take.
Good deal, that 200GB is already allocated for something else, and if program terminates normally, it will be full by mid Feb next year.
PS You should now technically have a working Phix installation (try p -test), these runtimes are for pGUI.
........ All tests completed successfully, 2.98 seconds Press Enter...And the .chm now opens!
Phix is an impressive amount of work. I plan to have some time this winter to dig into it.
Thank you,
Kat
32. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 13, 2020
- 1604 views
Phix is an impressive amount of work. I plan to have some time this winter to dig into it.
Thank you,
Kat
Thank you back - Phix now has one less bug, and the code to download and launch those VC_redist files (that is, ready for 0.8.3).
33. Re: Phix 0.8.2 uploaded
- Posted by irv Dec 14, 2020
- 1558 views
Can you recommend a demo or demos that use class and methods?
34. Re: Phix 0.8.2 uploaded
- Posted by petelomax Dec 14, 2020
- 1573 views
Can you recommend a demo or demos that use class and methods?
There are now 16 examples on https://rosettacode.org/wiki/Category:Phix/Class
I've also just identified these as potential grateful recipients of a class-based version:
https://rosettacode.org/wiki/Delegates#Phix
https://rosettacode.org/wiki/Respond_to_an_unknown_method_call#Phix
https://rosettacode.org/wiki/Polymorphic_copy#Phix
https://rosettacode.org/wiki/Polymorphism#Phix
https://rosettacode.org/wiki/Averages/Simple_moving_average#Phix
Lastly, obviously you've already run test/t64struct.exw
PS It would be remiss of me not to mention that while the use of classes should make no measurable difference for the vast bulk of something like EuGTK, there may be some "tight inner loops" such as idle/resize/refresh handling which might be noticably better off done the old fashioned way, that is if they're ever likely to be called thousands of times a second, for the very same reasons that myfunc(x,y) will beat call_func(routine_id("myfunc"),{x,y}) hands down.
35. Re: Phix 0.8.2 uploaded
- Posted by katsmeow Dec 14, 2020
- 1597 views
<snip>
https://rosettacode.org/wiki/Respond_to_an_unknown_method_call#Phix
<snip>
they're ever likely to be called thousands of times a second, for the very same reasons that myfunc(x,y) will beat call_func(routine_id("myfunc"),{x,y}) hands down.
Woaaahhh... this addresses something i asked for in OE many many years ago, didn't get, and now use a preprocessor to make up for the absence of! Or what Donald Rumsfeld once said (paraphrasing) "we don't know what it is we don't know". People made fun of him, as if he had spouted nonsense (to be fair, he was long-winded), but he had finally told a logical truth.
The preprocessor can also make up for the lack of a come_from() (which is unrelated to the goto()).
But while it was originally only to control the access to an app's shared variables, it can now also know if it has a variable or function. Since it has access to it's var list, a subprogram (or the main control program) can save it's list, write out a different version of itself, abort() and restart, reload the vars, and resume with the function which was asked for. And know it.
But yes, speed is an issue. It's a big hit with the abort/run, but may be faster in the long run than a pure interpreter. I had hopes OE would eventually have a code block that could un/load OE source code and run it, as an interpreter, rather transparently to the programmer and outside world, like Greg's mention of re/loadable .il code. I suspect this was the promise of .dll code blocks, but oh well.
Equally wonderful hack, Pete!
Kat
36. Re: Phix 0.8.2 uploaded
- Posted by _tom (admin) Dec 23, 2020
- 1483 views
I can't get Phix to load .so files for pGUI.
How do you install Phix on Linux? Where does /Phix directory go? How do you get Linux to read p64 from any terminal?
be well
_tom
Here is a suggestion that anyone can use to test a phix installation...
My process for testing:
- get a Linux distribution; install iso to USB drive
- tested with MX19.3 KDE, Mint 20.1 Mate, Manjaro XFCE
- boot from USB and get a "live" demo of Linux
- make a directory /home/phix
- copy all unzipped phix files to here
- make phix active
- rename p64 to p
- make p executable
- add /home/phix to bash path (KDE as a gui for this, very easy)
- or, copy p and builtins (as administrator) to /user/local/bin
result is you can run p from any terminal and test phix demos
for gui
- download IUP files that are a close match to the linux kernal
- unzip to a temporary directory
- (as administrator) bash install
resutl is iup .so files are found in /user/lib64
problem
I can get phix to load libiuip.so but most .so are not loading
be well
_tom