1. Phix 0.8.1 uploaded

Usual place, http://phix.x10.mx/download.php (0.8.0 notes: https://openeuphoria.org/forum/m/133760.wc )

struct/class, obviously, see http://phix.x10.mx/docs/html/sandc.htm
C_LONG/C_PTR and (new)aliases should now be better, in several/all 32|64 bit, and cross-compilation ways.
days_in_month/include_path/include_file[s]/is_prime/size_of/square_free/get_prime[s]/product/file_size_k/proper/shorten/thread_safe_string/peekns/peeknu/temp_file
builtins/librsvg.e (see http://phix.x10.mx/docs/html/librsvg.htm )
builtins/ordinal.e (see http://phix.x10.mx/docs/html/ordinal.htm )
builtins/pqueue.e now documented (see http://phix.x10.mx/docs/html/pqueue.htm )
builtins/ptypes.e (see http://phix.x10.mx/docs/html/string.htm and http://phix.x10.mx/docs/html/integer.htm )
builtins/punique.e (see http://phix.x10.mx/docs/html/unique.htm )
builtins/sockets.e (not yet documented)
builtins/ubits.e (unsigned and_bits() etc, see http://phix.x10.mx/docs/html/bitlog.htm )
added pipes to system_exec()
allocatew() renamed to allocate_word()
free(NULL) is now quietly ignored
Instead of IupImageA() you should now use IupImage() with an atom third parameter
sqlite3_bind_xxx() can now be passed a string name as well as/instead of an integer from sqlite3_bind_parameter_index().

Unfortunately no real progress on linux (nothing knowingly fixed or broken this release). I have however installed WSL (Windows Subsystem for Linux) and on that at least I get the same segfaults others reported.
My main suspicion is that relocation in non-writable ELF segments is now more strongly policed, but with a completely unfathomable segfault deep within the bowels of the loader. (Nice improvement guys, NOT!)
[I shall also quote this find: note that linux from kernel 2.6.??? needs last segment to be writeable]
I am also considering a KolibriOS port, which may uncover a few things, in a rather more round-about way.

new topic     » topic index » view message » categorize

2. Re: Phix 0.8.1 uploaded

Missing file builtins/structs.e!
As a quick fix, grab it from https://bitbucket.org/petelomax/phix/raw/1adf8651161b72a36f907b4e25a03ad4bf719983/builtins/structs.e

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

3. Re: Phix 0.8.1 uploaded

Thank you so very much for your fantastic work.

I tried to download, but bitdefender and gdata will directly remove the exe files with some virus found message. i reported that as false positives to these companies.

i got it installed now by turning bitdefender completely off and now, i will start checking it out.

Thank you again and i truly think that this is real leap for the language.

Richard

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

4. Re: Phix 0.8.1 uploaded

Hi Pete,

is there some email i could send some source code to?

Richard

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

5. Re: Phix 0.8.1 uploaded

Lots of improvements.

Thanks, Pete

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

6. Re: Phix 0.8.1 uploaded

begin said...

is there some email i could send some source code to?

If you are not overly worried about anyone else seeing it, you can open a new issue on github ( https://github.com/petelomax/Phix/issues/new ) and attach a file there.

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

7. Re: Phix 0.8.1 uploaded

Another bug: demo\pGUI\pdemo\installation.e starts with constant setupver = "0.8.0", so it downloads and extracts the wrong zips.
After fixing it you should then be able to re-run ppw.bat or just "p pdemo -settings".

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

8. Re: Phix 0.8.1 uploaded

This looks pretty cool. Especially the struct feature. I hope Euphoria will implement something very similar to the struct feature.

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

9. Re: Phix 0.8.1 uploaded

Hi Pete

I see you've included Sqlite3 as standard, nice move, but I can't find pSQLite.e in the installation.

Cheers

Chris

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

10. Re: Phix 0.8.1 uploaded

ChrisB said...

Hi Pete

I see you've included Sqlite3 as standard, nice move, but I can't find pSQLite.e in the installation.

Cheers

Chris

I put the main one in (note #7 above), but forgot the builtins\pSQLite.e stub which should read

include ../demo/pSQLite/pSQLite.e 

Thanks. Note that you are expected to install sqlite3.dll/so manually, but pre-built binaries should be easy to find on the www.sqlite.org site.

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

11. Re: Phix 0.8.1 uploaded

Hi

../demo/pSQLite/pSQLite.e

Not there

Cheers

Chris

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

12. Re: Phix 0.8.1 uploaded

I've also got some errors with files missing and some directory related issues. However this can usually be easily resolved. Also, I did a quick test using the new struct feature using my EuSDL2 wrapper.

Phix Version

--include machine.e 
include EuSDL2.ew 
include flags.e 
 
include structs.e 
 
atom width = 800, height = 600 
atom buffer,format 
atom x 
x = SDL_Init(SDL_INIT_EVERYTHING) 
 
if x = -1 then 
	puts(1,"Failed to load initialize SDL!\n") 
	abort(0) 
end if 
 
atom win = SDL_CreateWindow("Window Image",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,width,height,SDL_WINDOW_SHOWN) 
 
if win = -1 then 
	puts(1,"Failed to create window!\n") 
	abort(0) 
end if 
 
atom surf = SDL_GetWindowSurface(win) 
 
atom img = SDL_LoadBMP("SDL.bmp") 
 
if img = -1 then 
	puts(1,"Failed to load image!\n") 
	abort(0) 
end if 
 
--Use SDL_UpperBlit to draw to screen 
--As this replaces SDL_BlitSurface 
 
struct _RECT 
  integer x  
  integer y  
  integer w  
  integer h  
end struct 
 
_RECT Rect = new() 
 
Rect.x = 10 
Rect.y = 10 
Rect.w = 100 
Rect.h = 100 
 
x = SDL_UpperBlit(img,0,surf,Rect) 
 
if x = -1 then 
	puts(1,"Failed to blit image!\n") 
	abort(0) 
end if 
 
integer running = 1 
 
atom key = 0 
 
while running = 1 do 
 
	SDL_PumpEvents() 
	key = SDL_GetKeyboardState(key) 
	 
	if peek(key+SDL_SCANCODE_ESCAPE) > 0 then 
		running = 0 
	end if 
	 
	SDL_UpdateWindowSurface(win) 
end while 
 
SDL_FreeSurface(img) 
SDL_FreeSurface(surf) 
 
SDL_DestroyWindow(win) 
 
SDL_Quit() 
 

Eu Version

include std/machine.e 
include EuSDL2.ew 
include flags.e 
 
atom width = 800, height = 600 
atom buffer,format 
atom x 
x = SDL_Init(SDL_INIT_EVERYTHING) 
 
if x = -1 then 
	puts(1,"Failed to load initialize SDL!\n") 
	abort(0) 
end if 
 
atom win = SDL_CreateWindow("Window Image",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,width,height,SDL_WINDOW_SHOWN) 
 
if win = -1 then 
	puts(1,"Failed to create window!\n") 
	abort(0) 
end if 
 
atom surf = SDL_GetWindowSurface(win) 
 
atom img = SDL_LoadBMP("SDL.bmp") 
 
if img = -1 then 
	puts(1,"Failed to load image!\n") 
	abort(0) 
end if 
 
procedure calc_rect(atom rect,integer sx,integer sy,integer tx,integer ty) 
 
 poke4(rect,sx) 
 poke4(rect+4,sy) 
 poke4(rect+8,tx) 
 poke4(rect+12,ty) 
	 
end procedure 
 
--atom srect = allocate(10) 
atom drect = allocate(10) 
 
--calc_rect(srect,10,10,100,100) 
calc_rect(drect,width / 2,height / 2,100,100) 
 
--Use SDL_UpperBlit to draw to screen 
--As this replaces SDL_BlitSurface 
x = SDL_UpperBlit(img,0,surf,drect) 
 
if x = -1 then 
	puts(1,"Failed to blit image!\n") 
	abort(0) 
end if 
 
integer running = 1 
 
atom key = 0 
 
while running = 1 do 
 
	SDL_PumpEvents() 
	key = SDL_GetKeyboardState(key) 
	 
	if peek(key+SDL_SCANCODE_ESCAPE) > 0 then 
		running = 0 
	end if 
	 
	SDL_UpdateWindowSurface(win) 
end while 
 
SDL_FreeSurface(img) 
SDL_FreeSurface(surf) 
 
SDL_DestroyWindow(win) 
 
SDL_Quit() 
 

Thanks to structs, the Phix version is easier to read and is less lines of code.

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

13. Re: Phix 0.8.1 uploaded

ChrisB said...

../demo/pSQLite/pSQLite.e

Not there

See post #7 above?

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

14. Re: Phix 0.8.1 uploaded

Got it, thanks.

Chris

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

15. Re: Phix 0.8.1 uploaded

Hi

Just run the tests - waited for ages for t64struct test to finish, just sat there on "ok". Thought it was freezing again.

I'm a numpty!

Chris

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

16. Re: Phix 0.8.1 uploaded

Hi Pete,

I've been using a scattergun approach to testing 0.8.1 and I have found a few issues which I have in my local tracker. What follows is a dump of what I have so far.

Les

27-03-2020 Open Error Win32Demo files don't run

None of the win32demo files run. There's a problem with locating the win32lib files. (It's looking for win32lib7) 27-03-2020 @ 17:37:52 INVESTIGATE The library provided is in win32lib6. The win32lib.ew provided in Win32Demo references win32lib7.

I tried changing win32lib.ew so it references win32lib6. The programs I tried then run but there are pages of warnings about struct and class being assumed variables rather than types.

27-03-2020 @ 17:50:05 OPEN

27-03-2020 Open Error Builtin primes.e is missing

Running demo\rosetta\PanDigitalSquares fails because it cannot include builtins\primes.e referenced in mpfr.e. Since primes.e should be a builtin, removing the specific include results in the error.. "Cannot open autoinclude primes.e" in mpfr.e.

27-03-2020 Open Error Help file shows version 0.8.0

The first page of the help file has "Version 0.8.0" on it.

28-03-2020 Investigate Observation Can't run edita.exw

Running edita.exw results in... ...\Phix\demo\edita\src\eafonts.ew:436 in function EnumFontFamExProc() variable SizeList has not been assigned a value. I have an ex.err for this.

I note that SizeList is used in many functions and in all except this case, SizeList is declared local to the function. In this case, it's declared outside the function (EnumFontFamExProc) but eafonts.ew hasn't changed in a long time.

I'm leaving this as an open observation for now as I don't see how edita could NOT work and I haven't used it before, so it might be my problem.

28-03-2020 @ 18:01:06 INVESTIGATE

28-03-2020 Open Error hangman.exw doesn't run

Running ...\demo\hangman.exw results in... ...hangman.exw:129

map wrong_letters = new() ^ a class/struct type must be explicitly specified here.

This has something to do with the addition of class/struct and (I guess) supporting changes.

There's also a warning at hangman line 86 about variable seq assumed to be a variable, not a type. (same reason as above??)

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

17. Re: Phix 0.8.1 uploaded

Sorry, the formatting has gone to rats on my last post. Les

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

18. Re: Phix 0.8.1 uploaded

lesterb said...

Sorry, the formatting has gone to rats on my last post.

The forum expects posts to be written using Creole syntax. Sequential equal signs indicate heading styles. Single line breaks are collapsed into one line of text. Multiple line breaks separate paragraphs. See CreoleHelp for more info.

-Greg

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

19. Re: Phix 0.8.1 uploaded

lesterb said...

Hi Pete,

I've been using a scattergun approach to testing 0.8.1 and I have found a few issues which I have in my local tracker. What follows is a dump of what I have so far.

Les

27-03-2020 Open Error Win32Demo files don't run

None of the win32demo files run. There's a problem with locating the win32lib files. (It's looking for win32lib7) 27-03-2020 @ 17:37:52 INVESTIGATE The library provided is in win32lib6. The win32lib.ew provided in Win32Demo references win32lib7.

I tried changing win32lib.ew so it references win32lib6. The programs I tried then run but there are pages of warnings about struct and class being assumed variables rather than types.

Hi the win32lib7 files are here - all the demos work for me, I haven't included the IDE yet, as that's still work in progress (though mostly working)

Anyway, it's a bit convoluted to find, so here's the link. Just delete the win32lib6 folder, you won't need it again.

https://app.box.com/v/win32lib7forPhix

Edit : I haven't put this on the wiki, as strictly speaking it conflicts with Euphoria.

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

20. Re: Phix 0.8.1 uploaded

Many thanks for this

lesterb said...

It's looking for win32lib7, pages of warnings about struct and class being assumed variables rather than types.
Builtin primes.e is missing
Help file shows version 0.8.0
variable SizeList has not been assigned a value.
hangman.exw doesn't run
map wrong_letters = new() ^ a class/struct type must be explicitly specified here.

I have added win32lib7 and edited 6 and 7 ready for 0.8.2 (basic stuff, eg struct=>pStruct, class=>class_id, etc).
Added primes.e
As well as updating the literal in the help file I've written extra checks to ensure it, pglobals.e, and version() all match, which should help prevent that ever happening again.
Not entirely sure about SizeList either, (maybe you have two eg "courier" fonts installed?), but adding another copy of SizeList = {} on line 555 of eafonts.e some 7 lines earlier cannot exactly hurt, so I've done that too.
The function in map.e has been renamed as new_map(). Surprisingly I couldn't find anywhere other than (the 2 in) hangman.exw that needed changing.

lesterb said...

There's also a warning at hangman line 86 about variable seq assumed to be a variable, not a type.
(same reason as above??)

Renamed as s. (Actually that's probably been there a while, seq==sequence was added in 0.7.5)

Will upload 0.8.2 if I don't get any more reports of slips in the next couple of days.

Pete

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

21. Re: Phix 0.8.1 uploaded

Hi Pete,

Here are a few more things I found. (no lazy attempt to paste output this time!)

demo\rosetta\audio_Frequency_generator doesn't run...

There's an extra 'end if' at line 21 of demo\rosetta\audio_frequency_generator.exw

It results in "function does not return a value" at the extra end if. Is this expected?

Removing the end if fixes it.

demo\rosetta\Pascal_triangle_puzzle fails

At line 50 in program, stops with following text...

"pp_strFmt,1 behaves as 3: use pp_StrFmt,3,pp_IntCh,false instead"

demo\rosetta\SierpinskiPentagon doesn't run

At line 134, error "Cannot open builtins\librsvg.e"

The file is indeed not present in builtins.


I'll keep poking about but I'm short of time.

Les

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

22. Re: Phix 0.8.1 uploaded

regex

  • off-by-one indexing does not make any sense
  • a start argument makes the regex() much more useful

The hacked regex.e file is too big for the pastey.

My hacks look like

-- builtins\regex.e 
-- ================ 
-- 
-- Routines for handling regular expressions. 
-- 
 
--//tom 
--// around line 160 
-- // provide a start argument 
--// allows easy multiple regex matches 
 
--//original    integer sp = 1 
    integer sp = strtndx 
 
 
--// add a start parameter 
 
global function regex(sequence re, string s, integer strtndx = 1) 
-- 
-- returns {} if no match could be found, otherwise an even-length sequence 
-- of capture indexes, eg regex(`(a)(b)`,"ab") yields {1,3,1,2,2,3}. 
 
--\\tom 
--\\ this must not be.. 
 
-- Note 
-- that the goup start is the correct index for the first character but the 
-- end is always <idx of last character>+1. res[1..2] is the capture for the 
-- entire expression, and subsequent pairs for any () as read left-to-right. 
-- 
 
--// the fix is near roughly line 900 
 
--//tom 
--// patch return value so there is no off-by-one 
for i=2 to length(m) by 2 do 
    m[i] := m[i] - 1 
end for 
--//tom 
     
    return m 
end function 

struct

  • only a niggle

regex.e --> is not regexes.e
struct.e --> should not be structs.e

(just some subliminal issue after reading the struct docs...)

  • := not recognized

in a struct you use `=` (as expected) but can't use `:=` (as works in the rest of phix)


thanks for your work

_tom

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

23. Re: Phix 0.8.1 uploaded

structs.e does not like ` += ` notation

include builtins/structs.e 
 
class Time 
   public: atom hour 
   end class 
 
 
Time t = new( {1} ) 
 
t.hour += 3 
? t.hour 
 
-- does not like `+=` notation 
 
/* 

C:\Program Files (x86)\Phix\pmain.e:8294 in procedure Assignment() 
attempt to divide by 0 
    tidx = 2571 
    Type = 2420 
    CompoundAssignment = 1 
    subscript = 0 
    sstokline = 13 
    sstokcol = 143 
    noofsubscripts = 1 
    wasMapEndToMinusOne = 0 
    savetokline = <novalue> 
    savetokcol = <novalue> 
    eqline = 13 
    eqcol = 148 
*/ 

_tom

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

24. Re: Phix 0.8.1 uploaded

Hi Pete

Trying to run euwingui, interpreted, got this error

Fatal run-time error: 
C routine Control() needs 6 arguments, not 0 

Tried to compile it, got this error

oops, bad IdLinks index, symtab[2198(1305)], line 3432 pEmit2.e 
oops, bad IdLinks index, symtab[2199(1306)], line 3432 pEmit2.e 
 
Fatal run-time error: 
C routine Control() needs 6 arguments, not 0 

This ran with no issues under the previous version, and no modifications (afair) have been made, certainly there is no empty Control() function.

Cheers

Chris

Edit : something odd going on, other programs written with euwingui, using the control function, work fine. Hmmm.

Edit 2: Would this make a difference, Designer.exw has 110 instances of Control(..), whereas the largest of mine (that works) has only 58.

Edit 3 : Nope, that didn't work, I created 120 buttons, worked fine.

Since I don't know where that error occured, it's difficult to pin down any further - any ideas on pinning down the location??

this is the actual function in the wrapper

global function Control(atom controltype, sequence caption, atom posx, atom posy, atom dimx, atom dimy) 
    sgv() 
    return v3_c_func(control,{controltype,caption,posx,posy,dimx,dimy}) 
end function 
new topic     » goto parent     » topic index » view message » categorize

25. Re: Phix 0.8.1 uploaded

Hi,

What's the difference between "" and {}.

file_exists throws a fit at {}, but is ok with "".

To me they are both empty sequences, but do I now have to check and convert every time before using this, and related functions.

Cheers

Chris

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

26. Re: Phix 0.8.1 uploaded

ChrisB said...

What's the difference between "" and {}. file_exists throws a fit at {}, but is ok with "".

Not much, except that you can pass a string direct to a c_proc/func, whereas you cannot do that with a dword-sequence.
There is a toString() function, or some variant of it, in builtins\ (at least): pchdir.e, pgetpath.e, pcfunc.e, pfileioN.e, and pFloatN.e
I suppose I should really factor them out, into a new common/auto_include function to_string(), and then also start using that in pfile.e [etc]

I suppose I should also say that (deliberately) trapping non-strings may sometimes help to locate logic errors much quicker.

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

27. Re: Phix 0.8.1 uploaded

ChrisB said...

Trying to run euwingui, interpreted, got this error

I assume you are running that shipped in demo\tinEWGdemo - everything seems to work fine here.
If the ex.err is not giving enough clues, then you are indeed in trouble.
It can be one hell of a slog cutting down a broken program to the smallest possible (compiled) thing that still goes wrong, in order to get it small enough to even contemplate single-stepping through the machine code. In the (thankfully distant) past I have reluctantly been forced to undertake about a dozen such at 3 or more days a piece.
Some compile-time errors can give you a "Press Enter, or d for diagnostics...". Obviously past that point you are no longer debugging your application but rather the compiler.

Pete

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

28. Re: Phix 0.8.1 uploaded

lesterb said...

Audio_Frequency_generator/Pascal_triangle_puzzle/SierpinskiPentagon

Thanks, fixed internally.

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

29. Re: Phix 0.8.1 uploaded

_tom said...

integer strtndx = 1

Added and docs updated

_tom said...

off-by-one indexing does not make any sense

Crikey. I agonised over splitting some internal opcode, just could not see the trivial way to fix it. Added and docs updated

_tom said...

(just some subliminal issue after reading the struct docs...)

Well, it is an auto-include, and maybe regex.e is short for regular_expressions.e ... think I'll pass on that one blink

_tom said...
  • := not recognized

Added the missing code, thanks

_tom said...

structs.e does not like ` += ` notation

Yeah, I've got quite a few of those to wade through.

Thanks,
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu