1. Phix 1.0.2 uploaded

Obviously overdue, usual place: http://phix.x10.mx/download.php (1.0.1 notes: https://openeuphoria.org/forum/m/136518.wc )

Should you find this useful, please consider contributing the cost of a can of beans on a monthly basis.

missing eval.e and XPM_ICON.E added to distro, opengl.e now only once 
builtins\bigatom.e added a couple more deep_copy() bugfixes 
builtins\opengl.e added glDetachShader 
builtins\mpfr.e added mpfr_const_euler, mpfr_get_d_2exp 
demo\arwen\dll_links.ew removed C_PTR (fixes the p -c edita issue) 
IupCanvas/ACTION (aka redraw_cb) no longer attempts/allows posx/y params (easy alt). 
 - 72 demos updated, most if not all of which would have crashed when run on 64bit. 
call_back() docs updated to note it cannot handle C float/double callbacks. 
100% on rosettacode, now with over 1,100 examples marked as javascript compatible. 
(s)printf: new %n for true:"\n", false:"". 
Limit of base 36 => 62 in both p2js/printf(%A), and [desktop too] to_number(). 
Added some extra "unexpected end block comment" error checking, see readme. 
Added mpz_get_short_str() as a faster shorten(mpz_get_str()), alas no gain under pwa/p2js. 
Added traditional stack and queue handling to builtins/pqueue.e (for convenience not speed). 
Since pad("X",4,"BOTH",'.') gives ".X..", added "BLOTH" for "..X." if/when needed. 
While Phix uses "exit" to quit loops and "break" to quit switch statements, JavaScript uses  
"break" for both, hence additional checking has been added under "with js" to prohibit any 
attempt to directly "exit" a loop from within a switch, or "break" a case clause from within 
a loop, and only allowing such statements when they are adequately and properly nested. 
Bugfix: file mode error attempting to get_text() a file opened in update mode. 
The global builtin constant E has been renamed as EULER, also 2dp more accurate on 64 bit. 
(Slightly oddly, small change to the outcome of rc/gamma on 32 bit as well, who'da thunk it: 
 A tip has been added to the documentation's "floats are not exact" page, and PI was also  
 given a couple of extra digits that I had previously assumed could never be helpful.) 
map:get() renamed as map_get() - maybe I should also rename get.e's get() as get_get(). 
for in - as discussed, maybe kept simpler, see docs [and perhaps test/t68forin.exw] 
mpfr_addmul_si() added to match mpz_addmul_si() 
rmdr() is now an alias of remainder(), and sq_remainder() an alias of sq_rmdr(), ditto hll_rmdr(). 
Added #[ and #] multiline comments, for use in multiline shebangs. 
Added Ctrl J (with nowt selected) popup to Edita/Edix/p2js to set "with javascript_semantics" etc. 
Documented class constructors (Core Language/Declarations/Structs and Classes/class/constructors) 
Added optional fmt parameter to apply(), shorten(), join(), and join_by(). 
Added base to mpfr_get_fixed(), and made non-decimal fractions work properly. 
Added comma_fill to mpfr_get_str(), mpfr_get_fixed(), and mpfr_[s]printf(). 
New algorithm for permute(prev still available) and new permutes() routine. 
puts(fn,x,false): New optional 3rd parameter of false allows p2js.js to output html w/o substitution. 
Added a simplistic version of command_line() to p2js.js, ditto get_proper_dir|path(). 
Moved get_file_(base|extension|name[_and_path]|path[_and_name]) to builtins\file_utils.e, for p2js. 
Added optional lo, hi and partition function parameters to binary_search(). 
Added clear_screen(), text_color(), and bk_color() to p2js.js 
Added write_lines(), and moved read_lines() onto it's own help page 
New builtins/url.e (so-so stuff) split from pfile.e and lightly documented 
New builtins/speak.e for 32-bit Windows and matching speak() in p2js.js 
Made odd() [and even()] map directly to [%opNot] %opAndBits(,1) in pmain.e 
Added tagstart() as a simple complimentary wrapper of tagset(). 
makephix.exw now also checks version() in p2js.js matches pglobals.e 
"wait_key()" now treated as "{} = wait_key()", ie no longer forcing the explicit discard. 
(A specific T_wait_key thing in pmain.e, rather than a dumb blanket auto-discard) 
Removed an unnecessary incref in s[i] &= x (and friends), making it p2js compatible. 
integer {ch} = "1" now generates the required and correct p2js violation under with js. 
Bugfix: mpz_init("0x1e") crashed because of (eg) mpz_init("1e200") handling, it now 
        checks for leading '#', or '0' followed by "x|X|(" and skips all that stuff. 
Bugfix: a >> n didn't work for negative a under pwa/p2js (humphff, JavaScript, grr). 
Switched to display:flex for dialog-body, much better, and space-evenly for v/hbox. 
The wholly unnecessary aliases WEB and JAVASCRIPT removed, please use JS instead. 
Major trawl through the docs marking everything thing as p2js compatible or not. 
assert() is now the trivial wrapper to crash() it should be. +nFrames,->pCrashN.e 
Added (optional) MODE=BAR/MARK/LINE to IupGraph() [was just BARMODE/not before] 
Finally managed to get MINSIZE attribute to work in pGUI.js, or at least seem to. 
Added atom_to_float32/64 and float32/64_to_atom to p2js.js (but 80s not do-able), 
which also means that serialise() and deserialise() are now p2js compatible (mostly). 
Added IupToggleInt(), a trivial but fairly handy IupSetInt(not IupGetInt()) wrapper. 
Added IupImage[RGB[A]]() to pGUI.js 
repeat() now has an optional third parameter to stop it creating (binary) strings. 
New [trivial] ordinant() routine, yields "never"/"once"/"twice"/"three times", etc. 
do..until loop added, see while loop docs, until is now a reserved word. 
Bugfix: switch <atom> failing with swecode 14. 
find_any(), head(), tail(), pad(), shift_bits(), vlookup(), and begins() promoted 
from "Compatiblity with Euphoria" to full/official standard builtin status. 
Allowed eg add[eq|gt|le|lt|ne][s] in .syn, Phix.txt, and index.txt help files. 
Bugfix: paste of utf8 text in Edix. It now applies utf8_to_utf32 to clipboard  
        content, and automatically saves the file with a UTF8 BOM if needed. 
Added %F for printf, blanks trailing 0/dp, eg "1.1 " not "1.10", and "1   "  
         not "1.00" (all being 4 chars), and obviously "1000" as-is. 
Minor bugfixes to mpz_get_short_str(), eg 1e80+1 -> "1000..1" not "1000..0001", 
                                    and comma_fill no longer overruns 2*ml check. 
Added mpfr_ceil(), and mpfr_floor(), mpfr_get_si(), mpfr_cmp(), mpfr_cmp_si() to js. 
Bugfix: mpz_get_str(comma_fill) broken in js [when adding that to mpfr_get_str()] 
Replaced several jmp :%opRetf with jmp :!opCallOnceYeNot (26/8/22 spotted in passing) 
Bugfix: demo\enumfont.exw now also works on (Windows) 64 bit. 
Bugfix[maybe]: c_func returns on 64 bit of C_ULONG, C_PTR, etc were trying to check the 
               reconstruction of (unsigned/2)*2+carry was correct, using code that was 
               pretty much guaranteed to fail, as demo/winwire.exw was. Removing that 
               offensive code fixed winwire, but I can't recall why it was ever there. 
Phix now has a pygments lexer (in master, releases seem to be around every 3 months) 
Added ln() as a simple alias of log(), to emphasize the use of a natural logarithm, 
           along with matching (sq|hll|complex)_ln(), however there is no mpfr_ln() 
           since it would not be a valid gmp/mpfr name, whereas I coined the others. 
Added if {} shorthand: no elsif/else, and no equivalent end for/while/switch/etc. 
            Should be considerd experimental, liable to removal if any issues raised. 
Added mpz_factors(), which constructs the full list of factors from the prime_powers 
                     list. At the same time, I discovered that approach was quite a 
                     bit faster for native factors(n) when n>1e7 (>3000 trial divs), 
                     so have added the appropriate code to that as well. 
Added mpfr_gamma_inc(), needed some replacement/renamed dlls [all done, in distro]. 
Added mpfr_zeta[_ui](), and marked them, "", and mpfr_const_euler as js-incompatible. 
Added mpfr_abs(), mpfr_add_d(), mpfr_sub_d(), mpfr_mul_d(), and mpfr_div_d(). 
Made mpfr_get_fixed() honour -ve d.p. on desktop (like mpfr.js), and added a maxlen. 
New optional parameter bKeys=true on getd_all_keys(), to obtain data instead of keys. 
Added new factor_count/sum(n) builtins, return length/sum(factors(n,1)) but way faster. 
Bugfix: constant n = 9_007_199_254_740_991 was creating the wrong constant, ending 
        in 92 not 91. The tokeniser was performing TokN = TokN*10 + Ch-'0', but 
        the (TokN*10 + Ch) part was exceeding available precision (temporarily), 
        which no longer happens with the corrected TokN = TokN*10 + (Ch-'0'). 
        Amazing these things still occasionally crop up after all this time, to 
        think that every number ever parsed by Phix was being handled wrongly! 
        Tell you what though, not exactly very hard to track down and fix blink 
        Took twenty times as long to trawl round for other troublesome -'0's. 
Allowed reinstate() to replace a single item with an integer indexes parameter. 
Bugfix: is_prime(<0) now returns false, rather than crashing for no good reason. 
Bugfix/local constant restrictions: While you can still have a locally scoped  
        constant x = "one two three", attempting something more complex such as  
        constant y = split(x) was generating some rather whacky compiler errors. 
        On analysis, I realised that if the routine was the target of a forward 
        call, there would be (even more than usual) difficulties, and nowhere to 
        put the split() call, therefore I decided to limit local constants to 
        literals only, spit out "not supported (sorry)", and update the docs. 
        Ho hum, it seems the whole statics and local constants thing has all been  
        a bit of a complete and utter humiliating whitewash wipeout, n'er mind. 
Bugfix: 64-bit crashed trying to compile eg assert(res=23514624000) when it found 
        the literal does not fit in a dword. It now stashes it in r14 and compares 
        against that (there simply isn't a cmp reg,imm64 instruction). 32-bit got 
        away with things because it stored such literals in a 64-bit float anyway. 
        [Two cases were found and fixed, other similar problems may yet arise.] 
Added powmod(), == rmdr(power(base,exponent),modulus) only faster/more accurate, 
  and mulmod(), == rmdr(a*b,modulus) only (sometimes slower and) more accurate. 
Merged is_prime() and is_prime2() into a single routine, note isprime(n,false)  
        is (explictly) required to match the is_prime2() performance profile. 
Added count_bits(), a simple implementation of kernigans bit counter, and at the 
        same time documented mpz_popcount() and added a version of it to mpfr.js. 
Bugfix: p2js/integer() now uses "i!=~~i" instead of "!Number.isSafeInteger(i)", 
        so that numbers which pass integer() can be used with and_bits(), etc. 
        I also ended up completely rewriting that test (performance issues). 
Added "notbits" to filter(), eg filter({#1,#2,#4,#8},"notbits",#5) ==> {2,8}. 
Bugfix: sprintf("%+g") rounded eg "-9.999" correctly, but "+9.999" as ",1.000" 
        ** DEV ^^ and below, need porting to/checking in p2js.js *** 
Removed some of the precision limitations in printf(%f) after discovering that 
it was introducing quite unnecessary inacurracies with but could actually cope  
fine with 2^-17 and smaller exact-negative-power-of-2 fractions. After some 
thought, and self-doubt, reinstated the limits for count_bits()!=1. If there 
is a call for it, I could add a printf(0,"",{"precision",flag})-style setting. 
Made (s)printf() print powers of 2 exactly, from 2^-1074 to 2^1024 [on 32 bit, 
                    and at least that but not sure how much further on 64 bit]. 
                     [%d and some %f only, %xob should already have been fine, 
                      however some %a (ie other bases 2..63) probably not yet]. 
Added hcf() as an alias of gcd(), and at the same time (at long last) made p2js  
            understand/copy all of the aliases as defined in psym.e properly. 
Bugfix: $conCat() in p2js now has an optional clone arg, for performance. 
Bugfix: Added 1/5/22, so never actually released, but lain undetected for six 
        months and 4 days, phi[k] -= floor(phi[k]/i) was clobbering the phi[k] 
        to 0 on the lhs and therefore always subtracting 0. In other words a 
        significant performance boost for (esp) s[i] &= x was (deliberately) 
        knobbling a refcount but failing to check for further use on the rhs. 
        It now checks for isCmpndLHS all over pmain.e, note that quite a few  
        of those asserts should really be proper[ly tested] error messages. 
Added phi() builtin/autoinclude, a simple memoised Euler's totient function. 
Added combinations() and combinations_with_repetitions() builtins. 
Added is_nan() and is_inf() builtins. 
Bugfix: tokeniser accepted 0b02 as valid, >base shd've been >=base. 
Made p2js auto-transpile builtins/pFilter.e, and added filter_count(). 
Allowed is_leap_year(), day_of_year(), days_in_month(), and day_of_week() to 
        accept a single [time]date() parameter [extract DT_YEAR/MONTH/DAY]. 
        Also took the opportunity to add a cheeky little week_number() routine. 
Added optional bCrash=true parameter to open_dll(), it now crashes by default. 
    The same thing was also applied to define_c_func() and define_c_proc(). 
    Legacy code that actually tests the result from open_dll(), eg tries in 
    several directories, will need a ",false" added, whereas "explicit crash" 
    statements can simply be deleted, as can eg link_c_func() whose only real 
    job was to provide such explicit crashes, and ditto with the ",false". 
    Got rid of as many link_c_func-style functions in the distro as I could. 
    Note that was a bit painful, but worth it in the long run, I think/hope. 
    It will spanner any "look elsewhere/download" code, being the main risk, 
    and some much less frequent "only use the function when it is present". 
    A safe and fairly easy option is just to blat ",false" on everything, 
    and a quicker option is to replace three "= true" in builtins/pcfunc.e. 
Disallowed "abstract global", which was treated the same as "global abstract", 
    since it was at odds with the more obviously incorrect "atom global",  
    "procedure global", "constant global" etc, which could never possibly  
    be allowed anyway. Note that "global forward" === "forward global" is 
    still allowed, not that I&rsquo;m strongly opposed to banning that too. 
Bugfix: "type error (storing atom in sequence)" on s = {}&1, internal crash 
    on s = {}&{}. When optimising [multiple] & into a single opConcat[N],  
    it "assumed opApnd (alone) occurred", which makes no sense, and in the 
    second case tried to opConcatN 0 items, which ain't ever gonna fly. It  
    now pushes an opMkSq operation for <=1 items, as it always should have. 
Allowed the use of "local" as an optional logical counterpart to "global". 
    (A very minor issue, with absolutely zero impact on any legacy code, 
     apart from some uses of the identifier "local" now being prohibited.) 
Bugfix: p2asm.e was not handling 64bit jump tables correctly, it now uses 
        "if machine=64" instead of "if X64", for reasons that escape me. 
Added asserteq(), which is just a trivial >=2 param variant of assert(), 
        that in one case made the error far more immediately apparent. 
Completed some more (semi-experimental) dealings with nested routines. 
    Not overly happy with the results, or the documentation, but at least 
    they now work properly, and on both desktop/Phix and under pwa/p2js. 
    However debug & appearance in ex.err duff, deferred until Phix 2.0.0. 
Resolved/removed "sorry, p2js cannot name the required temp for that". 
Bugfix: regex:gsub() now uses \0..\9 as it always should have, instead of &. 
        The old version remains available as gsub0(), should you need that 
        for a (hopefully temporary) quick fix, but may be removed in 1.0.3+. 
        Note that regex:gmatch() was not altered, but I noted that it might 
        also benefit from using the new [local/private] breakdown() routine. 
Docs: reorganised other libraries into five ad-hoc subcategories. 
Bugfix: made begins() a proper auto-include (it was missing from psym.e) 
Bugfix: upper/lower() p2js violation on nested sequences (trivial mod). 
Bugfix: segfault on Linux kernels after Aug 2022. 6 months => 12 byte patch.. 
Bugfix: added a missing mpfr_ui_pow_ui() to mpfr.js, also mpfr_mul_d() was  
        just an alias of mpfr_mul_si(), and fairly obviously fell over in a 
        heap when passed 2.5 since you cannot just convert that to a BigInt.  
        Now sep rtn, as always shd have been, ditto mpfr_(add/sub/div)_d(). 

Star feature: for x in s do - I will admit I was a little sceptical when I put it in and slightly concerned I'd made it too simple, now find I just can't stop using it!

I now have a clear plan for Phix 2.0: get it working on a Raspberry Pi - while of itself not a particularly prime target, the ARM chipset certainly is. Wish me luck, I'll need it. At the same time I'll continue my efforts to get p2js working in a web browser, which means largely abandoning the 1.0 sources and starting a new set, based on the tokeniser and parse tree code of p2js, and obviously bulk-copying whatever parts of 1.0 sources that still fit. Transpiling to C remains an open option, but I refuse to even start that without any help. So, I am looking at a new parse tree, a total rewrite of all the binary emit routines, and I plan to throw in a proper (linear scan) register allocator, completely rewrite localtype handling, and (via the new parse tree) preserve scope into the debugger stage properly. Should easily get all of that and more done by two weeks on Tuesday, no problem, innit?

It is likely to have significant breaking changes, in particular I am thinking of totally deprecating routine_id(), c_func(), c_proc(), and call_back() - but of course there would be 500+ working examples, and docs that fully explain what said need to be replaced with. In either case there will be a new way, whether compatibility can be maintained as well..

So far: added some ARM docs, tests & filedump.exw done, started work on xpGUI (ongoing). It suprises even me that a new GUI has become the most critical of blocking components, but targetting an ARM chip is pointless without a GUI, and I have nothing else suitable.

new topic     » topic index » view message » categorize

2. Re: Phix 1.0.2 uploaded

petelomax said...

It is likely to have significant breaking changes, in particular I am thinking of totally deprecating routine_id(), c_func(), c_proc(), and call_back() - but of course there would be 500+ working examples, and docs that fully explain what said need to be replaced with. In either case there will be a new way, whether compatibility can be maintained as well..

I'm kind of curious, why is such a move being considered?

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

3. Re: Phix 1.0.2 uploaded

jimcbrown said...
petelomax said...

It is likely to have significant breaking changes, in particular I am thinking of totally deprecating routine_id(), c_func(), c_proc(), and call_back() - but of course there would be 500+ working examples, and docs that fully explain what said need to be replaced with. In either case there will be a new way, whether compatibility can be maintained as well..

I'm kind of curious, why is such a move being considered?

Well, that code is really ugly, difficult to maintain, as Greg has recently found out there are loads of things it simply cannot cope with, and while you might rarely notice it the performance is actually pretty dreadful.
If I am to do a major update with a new target architecture, that is without any doubt at least according to my current way of thinking, going to be one of the very first things to get thrown into the rubbish bin.
Actually, that's the latter three, routine_id() is slightly different. Given that you can already code myfunc instead of routine_id("myfunc"), and no program should ever need, or in fact be encouraged, to stich together "my" and "func", it really is time to wave it goodbye. Plus I want the freedom to replace a flat symbol table with a nested tree structure, and a complete rewrite (of "routine_id") could well introduce a dirty great heap of possibly very subtle incompatibilites anyway.
Not much is really set in stone for 2.0 yet, but I need the right to choose the easiest route to get there.

Another argument is that if you deliberately break backward compatibility to the extent that almost nothing in The Archive still works, that might actually be the very excuse needed to pick through them one by one and either fix or bin them, and, why not, migrate any successes to a brand shiney new and hopefully much nicer 2.0+-only location, and perhaps even actually delete the by now utterly useless original.

PS the parse tree (etc) will likely still technically be a "flat" table, just one that needs a special traversal process rather than the traditional +1.

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

4. Re: Phix 1.0.2 uploaded

Just curious, no arguement: how do the changes to my_funct , routine_id , and function_id impact the possibility of a func/proc table and a table of variable_names/pointers? I ask because of the massive abnormal leaps forwards , i mean thoughts of 1) changing code during runtime and 2) knowing what's in existance during runtime before trying to use it. All things considered, a simple reply of "No." is expected.

petelomax said...

Should you find this useful, please consider contributing the cost of a can of beans on a monthly basis.

Sadly, i have never been able to accomplish anything on github, and am not a member. But to those that are more github literate than i am, if you have ever bought or funded anything, fund Phix. I can justify funding Phix because i "buy" mIRC (which isn't on github).

Kat

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

5. Re: Phix 1.0.2 uploaded

katsmeow said...

2) knowing what's in existance during runtime before trying to use it.

Yes, that would certainly have to be considered. There is a fair bit to unpick here, not all bad:

It is the compiler's job (and remember that in Phix, interpretation is just "compilation in memory") to emit the fastest possible code, so "normal" function calls and the like are converted to fixed symbol table entries, for instance if you have "function myfunct()" and "x = myfunct()" that means (say) symtab[427] with (say) 9 consecutive entries for result/myfunct/args/locals, and unless you want performance to fall off a cliff, that is not going to change. However call_func() and/or call_proc() (which along with get_routine_info() were never going anywhere, btw, and being advised that the compiler spots non-overidden "routine_ids" and spits out the faster static form) already have to perform the sort of dynamic lookup the static form deliberately avoids.

I want to replace the "flat" symbol table with something more "tree shaped" (and probably also "unpack on demand"), so while some symtab[1..symlimit] may remain set in concrete, there would be more options for symtab[symlimit+1..$] being able to contain a myfunct with the needed 10 or 11 replacement consecutive entries. There is an argument that once you have defined "myfunct", that's it, it should never go away, in case something is still using it, but you could o/c subsequently define "myfunct2", "myfunct3", etc.

In short, I am not about to kill performance for aesthetics sake, if you want dynamic code it has to at least look like dynamic code, and there may need to be a little hoop-jumping to prevent the compiler replacing "call_func(myfunct,...)" with the faster static form, ie "call_func(rid,...)", where rid is not patently always set to myfunct. Anyway, this is all a very long way off, o/c.

One last question I have for you is that Phix already has an eval(), have you tried using it? Pretty much the best I could do with things in their current state, may get something better in 2.0, may not survive, no-one seems to be using it anyway.

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

6. Re: Phix 1.0.2 uploaded

katsmeow said...

Sadly, i have never been able to accomplish anything on github, and am not a member. But to those that are more github literate than i am, if you have ever bought or funded anything, fund Phix. I can justify funding Phix because i "buy" mIRC (which isn't on github).

Kat

As a symbolic gesture of appreciation I wanted to contribute a few Euros, but, "You must be logged in to sponsor petelomax" (to GitHub, that is). Not sure if my minor contribution would justify going through the troubles of setting up a different simple payment option (aka PayPal), but there may be others out there to whom GitHub is as alien a territory as it is to me, and who, like me, might be deterred from supporting Phix by the requirement to register a GitHub account they have no possible use for?

Robert

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

7. Re: Phix 1.0.2 uploaded

RobertS said...

the troubles of setting up a different simple payment option (aka PayPal),

But github isn't accepting Paypal any more. And, it took me over a year to close my Paypal account. Maybe Pete can sell "thank you for Phix" notes on Ebay and Amazon (or etc)? Something to consider is that financial sites may be concerned you don't otherwise get anything in return for making a donation.

Kat

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

8. Re: Phix 1.0.2 uploaded

petelomax said...

One last question I have for you is that Phix already has an eval(), have you tried using it? Pretty much the best I could do with things in their current state, may get something better in 2.0, may not survive, no-one seems to be using it anyway.

I thought i saw you were not making that a permanent feature, so code written for using it would stop working at the next Phix release, due to javascript or something.

[insert pic of runner tripped up on hurdles and falling face first into mud]

Kat

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

9. Re: Phix 1.0.2 uploaded

katsmeow said...

But github isn't accepting Paypal any more. And, it took me over a year to close my Paypal account. Maybe Pete can sell "thank you for Phix" notes on Ebay and Amazon (or etc)? Something to consider is that financial sites may be concerned you don't otherwise get anything in return for making a donation.

Kat

PayPal would be something that most people can use, and are used to using. Or maybe buymeacoffee.com … It's entirely up to Pete, of course, what ways of making contributions he wants to offer. What I notice in this forum, though, is that the target audience seems strictly to be IT professionals — different from the days of RDS Euphoria, which, "Simpler than Basic, More Powerful than C+ +" had catered to a much wider audience. But I don't know, maybe this audience doesn't even exist anymore …

Robert

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

10. Re: Phix 1.0.2 uploaded

RobertS said...

What I notice in this forum, though, is that the target audience seems strictly to be IT professionals — different from the days of RDS Euphoria, which, "Simpler than Basic, More Powerful than C+ +" had catered to a much wider audience. But I don't know, maybe this audience doesn't even exist anymore …

I'm curious why you think this. I think the issue is mostly that we've sat and stagnated over the past decade while many other languages with similar appeal have marched forward. The market exists, we're just not appealing to it (right now).

-Greg

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

11. Re: Phix 1.0.2 uploaded

RobertS said...

What I notice in this forum, though, is that the target audience seems strictly to be IT professionals — different from the days of RDS Euphoria, which, "Simpler than Basic, More Powerful than C+ +" had catered to a much wider audience. But I don't know, maybe this audience doesn't even exist anymore …

I am not an IT professional. I also think appealing to burned out professionals looking for glitter will not give the same results as hooking new programmers. It's been noted here before, the job usually sets the OS, platform, and programing language, but the hobbyist can pick their favorites.

Kat

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

12. Re: Phix 1.0.2 uploaded

katsmeow said...
petelomax said...

One last question I have for you is that Phix already has an eval(), have you tried using it? Pretty much the best I could do with things in their current state, may get something better in 2.0, may not survive, no-one seems to be using it anyway.

I thought i saw you were not making that a permanent feature, so code written for using it would stop working at the next Phix release, due to javascript or something.

[insert pic of runner tripped up on hurdles and falling face first into mud]

Kat

Just to be clear: I will NEVER rip eval() out of 1.0.2, but 2.0 is a massive undertaking with a very high probability that eval() will not initially work on day one, and I am not about to delay that by months, possibly even years, and since I cannot foretell the future, for instance I would take interop with Python over eval() any day of the week, there is a very real possibility it might never resurface. So, you should be prepared for any project that uses eval() to become glued to the 1.0.2 line, and might want to stick a copy of that in with the project to ensure you can still run it in the future. That is all I meant.

The docs for eval() clearly state it does not work under pwa/p2js, but only because it doesn't.

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

13. Re: Phix 1.0.2 uploaded

ghaberek said...
RobertS said...

What I notice in this forum, though, is that the target audience seems strictly to be IT professionals — different from the days of RDS Euphoria, which, "Simpler than Basic, More Powerful than C+ +" had catered to a much wider audience. But I don't know, maybe this audience doesn't even exist anymore …

I'm curious why you think this. I think the issue is mostly that we've sat and stagnated over the past decade while many other languages with similar appeal have marched forward. The market exists, we're just not appealing to it (right now).

-Greg

From what I saw in the 1980s and into the 90s, almost everybody rightly or wrongly felt that knowing a computer language and being able to write their own little programs was an integral part of having a computer at home. Since those computers well into the PC era came with BASIC being hard-wired into them, BASIC was the obvious choice of language. In the 90s the search for "better" languages began, GUIs and the Internet arrived, MS dumped BASIC … but for a while, people were still interested in coding. I remember in the late 90s a friend told me she was learning Java, I asked her why, and she kind of shrugged, well, you have to learn _some_ computer language, don't you? When BASIC was dead I tried Perl, found it highly unsatisfactory, looked around, came across Euphoria, liked its looks and was intrigued by the object data type, as, I suppose, were others. If you look at the rapideuphoria.com site, it still says "Search 2000 contributed programs," "Search 92,000 posted messages in Original EUforum," and "Access the brain-power of hundreds of Euphoria programmers." Those were the days — I'm afraid people don't use their computers that way anymore, they have social media and their cell phones to spend their time on — who, among the general population, still feels that when they own a computer, they should know how to code? But, I don't know who the potential new users of Euphoria or Phix might be today, so, I can't really say anything useful …

Robert

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

14. Re: Phix 1.0.2 uploaded

I think back then there was not a sense of "cloud". There were BBSs, and a few programs to communicate with them, with less than satisfactory results. That's what "social media" is nowadaze : glorified bulletin board servers, overblown computer answering machines. You can leave a message and read msgs left by others.

But without "cloud", there was "reality", and for me, the desktop computer with it's keybd and display screen was a very accommodating interface to microcontrollers of reality. And the interface to/from me could be changed, with different text color and fonts, different programming languages, "music" and human speech for sounds, and hardware ports to plug hardware interfaces into. The C64 was an amazingly capable environmental control unit, needing only signal translation to turn binary bits into motor rpm or room light intensity.

I think it's possible there's as many potential programmers now as back then, but we never were a popular or obvious visable breed, and now the glare of "social media" swamps the tiny olde computer geek signal. And the signal is a little different, it's like electronics, you can still buy vacuum tube kits, but most people look for transistorised stuff. Same with programming, furnishing run-of-the-mill common language features of the 1990's isn't going to be enough. It's going to take something new, and fine-tuned, which no one will understand the need or use for now. Like when i was laughed at for putting an electric motor into a VW Beetle mid 1970's: now there's 100's of $billions going into a dozen factories to make electric cars. In the 1970's, no one saw the need for a handheld portable phone that virtually anyone could own. Or putting a turbocharger (etc) into a car to get better gas mileage.

Kat

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

15. Re: Phix 1.0.2 uploaded

I finally downloaded Phix 1.0.2, and when I installed it, installation ended with an error message — ex.err says:

C:\Phix\builtins\cffi.e:234 in procedure cffi_error() 
crash(`unknown size //`) 
    msg = `unknown size //` 
... called from C:\Phix\builtins\cffi.e:485 in function do_type() 
    mtype = `//` 
    machine = 32' ' 
    substruct = 0 
    k = 0 
    size = <novalue> 
    align = <novalue> 
    signed = 1 
    mname = `age` 
    bFunc = 0 
    ftok = <novalue> 
... called from C:\Phix\builtins\cffi.e:650 in function parse_c_struct() 

etc. etc., a total of 1040 lines.

It seems to work, though.

(Windows 10, installing to C:\Phix, as I had done with 1.0.1 — I renamed that folder prior to installing 1.0.2)

Is that error something that can safely be ignored (as I ignored Windows’s warning that this application might do unspeakable things to my computer, am I really determined to go ahead with it?), or does it mean that some feature may not be working?

Robert

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

16. Re: Phix 1.0.2 uploaded

RobertS said...

C:\Phix\builtins\cffi.e:234 in procedure cffi_error() 
crash(`unknown size //`) 
Is that error something that can safely be ignored (as I ignored Windows’s warning that this application might do unspeakable things to my computer, am I really determined to go ahead with it?), or does it mean that some feature may not be working?

Thanks - I wouldn't overly worry about it, the settings that same(ish) part of the installation process in 1.0.1 presumably successfully made on your PC some 18 months ago haven't changed anyway. I've reproduced it here and immediately identified the culprit changes I made on 16/2/23, I'll investigate further and post an update. That horrible warning probably just stems from the fact that Phix doesn't have much of any "reputation" to speak of, good or bad.

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

17. Re: Phix 1.0.2 uploaded

I noticed that my new Phix 1.0.2 installation lacked the documentation. I downloaded the zip files now and could extract it from phix.1.0.2.3.zip and -4.zip, but maybe creating the documentation is what hadn't worked with the installer? Just noticed, \bench and most of \demo seem also to be missing from the installation, but can be found in the zip files.

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

18. Re: Phix 1.0.2 uploaded

Oh blimey, this fell of the radar, sorry. You're quite right in that installation is left woefully incomplete.

The fix is trivial, around line 275 of builtins/cffi.e replace

--          if match("//",s,sidx)!=sidx then exit end if 
            if s[sidx+1]!=sidx then exit end if 

with

--          if match("//",s,sidx)!=sidx then exit end if 
--          if s[sidx+1]!=sidx then exit end if 
            if s[sidx+1]!='/' then exit end if 

And then re-run pw pdemo. I possibly should/might need to ship a 1.0.3, just for this, but obviously I hope not.

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

19. Re: Phix 1.0.2 uploaded

This is such a minor issue that I honestly do not know if it's worth bothering anyone with it — please ignore if it's not.

In Phix, printf() and sprintf() slightly misbehave with the "%1.nE" format: values of mE-n are printed with an additional zero when m is 1 and n > 10. This is independent of how many digits are specified in the format string, with a value of 1 there is always one zero too many:

atom a
a = 1e-11 
printf(1, "%1.6e\n", a) 
a = 1.234e-11 
printf(1, "%1.6e\n", a) 
 
1.0000000e-11 
1.234000e-11

(This does not happen in Euphoria)

It gave me a little trouble when I wrote a sprint12() function, which does exactly what sprint() does but with 12 instead of 10 digits (in case anyone is interested, I can post it — with minor modifications it also works with Euphoria) — but, as I've said, it is certainly a minor issue.

Robert

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

20. Re: Phix 1.0.2 uploaded

RobertS said...

This is such a minor issue that I honestly do not know if it's worth bothering anyone with it.

Nonsense - that's an out-and-out bug if ever I saw one, you'll be pleased to know with an easy fix:

builtins\VM\pprntfN.e ~line 264 said...
 
        k = find('!',result) 
        if k then 
--          if k=length(result) then 
--              result = result[1..-2] 
--          else 
                result[k] = '.' 
--24/3/23! 
                result = result[1..-2] 
--          end if 
            exponent += 1 
        end if 

What it's done is printed off a number as "9.999999" (note 6 d.p.) before realising it wants rounding, which gets it "10.000000", at which point it
realises it'll have to mess with the decimals and bump the exponent, so it returns "1!0000000" to signal that, but wasn't cropping the extra digit.

Thanks for reporting this!

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

21. Re: Phix 1.0.2 uploaded

petelomax said...

What it's done is printed off a number as "9.999999" (note 6 d.p.) before realising it wants rounding,

<coff><twitch><blink>

"10.000000" is not equal to "9.999999". I realise there's a lot of rounding and tomfoolery in modern computers in using different numeric bases, but what if he wants to know how a computer makes the mistake of being 0.000000000000000001 wrong, shouldn't they be allowed to do so? That is, turn off rounding?

I tried a problem on the Win7 calc, using 5.4470587526855054275613675858572 as the log of 279,936 , it gave me 5.9999999999999999999999999999999 as the 7th root of 279,936. I am glad it did NOT round to 6 when i introduced the error.

Still, Phix blows my lil mind.

Kat

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

22. Re: Phix 1.0.2 uploaded

Of course you can do anything you like with the numbers before passing them to printf(), but
there is no way, or any resemblance of sanity, in disabling rounding within printf() itself.

Suppose I have calculated the price of an item, as 1.8+0.1. Printing that as "1.90" is at
least 100,000,000,000,000 times more accurate/closer to reality than "1.89" would be.

By far the easiest and best way to get/display any rounding (etc) error would be 1.9 - (1.8+0.1).
Note that any error is just as likely to be in the 1.9 as it is the (1.8+0.1).

Phix blows my mind too. What's 10-((10/3)*3)? Answer: 0, and not "nearly 0", but actual 0. Erm...

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

23. Re: Phix 1.0.2 uploaded

Hi Pete,
thanks to Greg Haberek I'm online again, after years of occasional lurking. I tried Phix 1.02 and experienced the same bug, so I'll apply your aformentioned fixes and get back to you.

My 2c on the shrinking userbase..
Rob's original mantra of keeping it simple and NOT having to learn C / C plus plus , memory models, heaps, pointers was what got me hooked.
I saw a recent post where a GUI lib was being punted and win32lib being dissed even though:
The new GUI lib had a post saying its 3000k big already and nowhere near finished?? From that I read users of the new GUI lib would have to debug it ( IE learn C / C plus plus ? ) ??
Nope! I'll keep using my copy of win32lib because it works. I don't have C skills or the time to acquire the skills.
Why be pushed into learning other associated skill stacks (github, GCC, C , linker) when I just want to write a Euphoria program?

Similarly I tried ( a few times over the years) to upgrade from eu 4.05 to eu 4.10 but could never get around the problem where I cannot compile in Watcom, the compiler insists on assuming GCC even when I explicity say Watcom. So, I'm still on eu 4.05 but probably will go Phix instead.. a working GUI is a must though.

Pete, your Phix looks amazing - I gather you do hand tweaking in assember to get the fastest speed? WOW! I'm an old fart, my background is mainframe so I am adverse to wasting resources / cycles too. Rob Craig has mainframe background also BTW.

Thanks!
Forked into: Re-visited: No OpenWatcom in 4.1.0

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

24. Re: Phix 1.0.2 uploaded

fizzpop said...

My 2c on the shrinking userbase..
Rob's original mantra of keeping it simple and NOT having to learn C / C plus plus , memory models, heaps, pointers was what got me hooked.

Thank you — I had thought I was the only one left who felt like that. Though other issues may contribute to the dwindling user base, too — like, going to the Euphoria website and seeing the latest "Current News" being some 15 months old, and being about Phix, which in itself may be confusing to someone who doesn't already know about the Euphoria/Phix duality. And someone who comes across the Phix website, downloads Phix, and finds that the current version doesn't install properly, could theoretically find an explanation and a cure here in the "Phix 1.0.2 uploaded" thread, but their chances of finding it would be rather slim, I'm afraid. (Pete, can you please upload a version where this issue is fixed? Not for us here who can ask you and solve this problem one way or the other, but for the hypothetical prospective new user?)

Your mentioning of GUI being a must made me remember Judith Evans’s IDE, and when I tried to look up what has become of it, it made me sad to read that she has died 8 years ago. This is a tragic loss, but also, something like her IDE, for Phix, would be a great help. Can we ever hope for it?

Sorry, just dreaming …
Robert

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

25. Re: Phix 1.0.2 uploaded

RobertS said...
fizzpop said...

My 2c on the shrinking userbase..
Rob's original mantra of keeping it simple and NOT having to learn C / C plus plus , memory models, heaps, pointers was what got me hooked.

Thank you — I had thought I was the only one left who felt like that.

<coff> I think, therefor i can look in the mirror and see that i still am.

fizzpop said...

Your mentioning of GUI being a must made me remember Judith Evans’s IDE, and when I tried to look up what has become of it, it made me sad to read that she has died 8 years ago. This is a tragic loss, but also, something like her IDE, for Phix, would be a great help. Can we ever hope for it?

Under the heading of KISS, i nominate Jiri Babor, also died. His site is gone, but available in some ways on archive.org. Back in the day, he showed us all we did not need mySQL or "maps", because we had sequences. And because we have sequences, we could have rampantly multi-linked lists AND "string tokens" (akin to atoms, but longer).

Kat

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

26. Re: Phix 1.0.2 uploaded

RobertS said...

... Those were the days — I'm afraid people don't use their computers that way anymore, they have social media and their cell phones to spend their time on — who, among the general population, still feels that when they own a computer, they should know how to code? But, I don't know who the potential new users of Euphoria or Phix might be today, so, I can't really say anything useful …

Robert

With 8 billion people on the planet, there might be as many as 12 potential users.

Here's the problem: a long time ago, being able to do something (almost anything) with a computer was impressive. If you could get crude graphics or marginally user-friendly "windows" on a DOS computer, people said "wow!"

If you were creative, industrious, and lucky, you might even make some money creating software that did something useful or impressive.

Now, nothing we can do with a computer impresses anybody.

My desktop computer has started acting up recently, probably a drive going bad - it's been running almost 24/7 for about 10 years. So I think perhaps it's time to buy a new drive or whole new computer, only to say "no". When it dies, I'll just send it to the recycling plant, and not buy another. My phone is more than adequate for anything I need to do.

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

27. Re: Phix 1.0.2 uploaded

irv said...

Now, nothing we can do with a computer impresses anybody.

I have a rack of olde Tektronix 5A26 and 5A14. I want to digitize each channel at 20msps and input the data for display and measuring and logging. I also have some weather station designs i need to build and get into the computer for correlations and analysis. I promise to be very impressed if you can do that.

Kat

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

28. Re: Phix 1.0.2 uploaded

irv said...
RobertS said...

... I don't know who the potential new users of Euphoria or Phix might be today ...

With 8 billion people on the planet, there might be as many as 12 potential users.

I'm expecting, once the Euphoria track is launched on Exercism, we might actually get ever so slightly above 12.

-Bruce

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

29. Re: Phix 1.0.2 uploaded

irv said...

Now, nothing we can do with a computer impresses anybody. (…) My phone is more than adequate for anything I need to do.

That obviously depends upon what you need to do. I'd be lost without a computer — I need a proper keyboard, a mouse, and a large screen. And I do not write code to impress anyone, but to create little tools that are useful to me. (I usually find it easier to write my own tools, than to figure out how to coax the functionality I want out of existing ones. And some of the stuff I write, which may possibly be of some use to others, I offer to anyone who may accidentally stumble across it.)

Phix is perfect for my needs, even if I use only a tiny fraction of its capabilities. I've come across Euphoria in the days of 2.x, it offered what I was looking for — "Simpler than Basic, more powerful than C++" — and it made me feel welcome. If I came across the Euphoria website today (and to a slightly lesser degree this is also true for Phix), and if I looked at the discussions in the forum, I wouldn't suppose that I might be included in the target audience. But I'm not that special, and with my limited computer skills and my limited needs, I find it hard to believe that I am one of only 12 people on this planet who have use for a simple but powerful, elegant and intelligent computer language.

Robert

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

Search



Quick Links

User menu

Not signed in.

Misc Menu