Conversion of Phix to win32lib 0.70.4
Currently Phix is shipped with win32lib 0.60, which doesn't work with the current IDE. SO the project now is to modify win32lib to work with Phix.
First issue
global function w32remainder(object a,object b)
if sequence(a) then
for i=1 to length(a) do
a[i]=remainder(a[i],b)
end for
return a
elsif sequence(b) then
for i=1 to length(a) do
b[i]=remainder(a,b[i])
end for
return b
end if
if compare(a,0.0)=compare(b,0.0) then
return remainder(a,b)
else
return b+remainder(a,b)
end if
end function
Phix baulks at the type for length - only wants to run lenth() on a sequence, not on an object, which could be an atom or integer.
My Phix Adventures
Thursday, 8 December 2016
Tests
euallegro and eusqlite work with a little tweaking.
euallegro 0.3, allegro 4.2, line 3150
-- midi_out
constant my_midi_out = link_proc(AllegroLib, "midi_out", {C_POINTER, C_INT})
global procedure midi_out(sequence data, integer len)
atom data_addr
data_addr = allocate(length(data)) --CMB Modified 8/12/2016
c_proc(my_midi_out,{data_addr, len})
free(data_addr)
end procedure
euallegro and eusqlite work with a little tweaking.
euallegro 0.3, allegro 4.2, line 3150
-- midi_out
constant my_midi_out = link_proc(AllegroLib, "midi_out", {C_POINTER, C_INT})
global procedure midi_out(sequence data, integer len)
atom data_addr
data_addr = allocate(length(data)) --CMB Modified 8/12/2016
c_proc(my_midi_out,{data_addr, len})
free(data_addr)
end procedure
Quick intro. Have been a long time Open Euphoria user, wrote my veterinary database with it, which ran without a hitch on Linux since 2002. Have now upgrade to an all singing all dancing (read slow clunky and top heavy) windows system when my business was acquired by a larger group.
Open Euphoria has stagnated, several of the top developers have disappeared from the scene, and development seems to be in limbo between 4.05 and 4.1. This, in my opinion has led to fragmentation, both in the core language code base, and the external libraries. Several of the most useful libraries have not been updated to keep pace with Eu (Specifically win32lib and the IDE), and some needing quite a few tweaks to get working.
There are several gui libraries, with varying levels of support and usability. A most recent and promising one was Redy, which at the moment is poorly documented and exampled, but the only one which fit my dream of a gui builder was win32lib and IDE combo (EWG having become non functional under 4.05/4.01), and Arwen not working.
So I started playing with Lazarus, and other programming languages, to see if what I wanted was out there. To cut a long story short, I want to write quick and small apps / utilities, and Euphoria is such a simple language to use I kept on coming back to it to see if I could get it to work.
I downloaded Phix, and hey presto, a breath of fresh air. Written / controlled by one man only, no committees, no fragmentation and a large subset of Eu with enhancements. It ran eusqlite and allegro with just a tweak here and there, euallegro ran faster than on Eu, and best of all it ran the programs I had written with IDE / win32lib, without the blocked text manifest issues, which had mad this combo unusable on eu (not I have tested quite a few programs, and so far not found a nissue, but there could always be on lurking.
So this will be a diary of tests and discovery with Phix, and we will see what happens.
Subscribe to:
Comments (Atom)