Phix 0.8.2 uploaded

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

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}).

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

Search



Quick Links

User menu

Not signed in.

Misc Menu