1. Is anyone interested in Phix to C (I am not really that keen, but will help)

It is probably fairly straightforward to enhance the p2js program to emit C.
It would of course take a few months, and need someone else to lead it.

The basic process would be:

for day=start to whenever do 
    take_some_simple_example()     -- `puts(1,"Hello C")` might be a good start 
    run_p2js() 
    if day=start then 
        manually_edit_test_dot_htm_to_test_dot_c()  -- until it works 
    else 
        manually_edit_the_test_dot_c_p2js_made()    -- "" 
    end if 
    post_that_test_dot_c_and_the_original_here() 
    modify_p2js_as_needed()                         -- this is where I can help 
end for 

Obviuously you replace the html with whatever #include-type-stuff is needed,
the replacement p2c.c instead of p2js.js being entirely someone else's burden,
and aim for small mechanical changes to the JavaScript that was emitted.

new topic     » topic index » view message » categorize

2. Re: Is anyone interested in Phix to C (I am not really that keen, but will help)

+1 But I'm not a C programmer.

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

3. Re: Is anyone interested in Phix to C (I am not really that keen, but will help)

mitgedanken said...

+1 But I'm not a C programmer.

Actually, that might not be a complete showstopper. I mean I don't expect anyone to know HTML/JavaScript/CSS in order to use p2js (in its current form).

The other question is who here uses the Euphoria To C Translator?

If we (as in "you lot") start with something simple, use the -keep option of the above, then examine the generated files and compare them against the test.htm that p2js spits out, that might be enough to get something going.
As you say, I'm not a (proper) C programmer either, the main hurdle is (probably) installing a C compiler and the commandline for gcc (or whatever) - but in theory whatever command line(s) euc is invoking could just be copied?
The one thing I really cannot and should not be responsible for is the documenting of any additional installation and setup needed for various platforms, or (eg) testing on a Raspberry Pi.
[Raspberry Pi is probably a very distant target, I don't think euc supports it, and getting this whole project to self-host (and then some) is probably needed first.]

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

4. Re: Is anyone interested in Phix to C (I am not really that keen, but will help)

petelomax said...

The other question is who here uses the Euphoria To C Translator?

Technically? Everyone. The translator is used to build the Euphoria executables. Otherwise, in my experience I'd say "some people" use it. But more probably use bind if they need to ship an exectuable for something.

petelomax said...

As you say, I'm not a (proper) C programmer either, the main hurdle is (probably) installing a C compiler and the commandline for gcc (or whatever) - but in theory whatever command line(s) euc is invoking could just be copied?

If you're on Windows then I'd recommend TDM-GCC, otherwise just use whatever GCC is built in on your Linux distro.

petelomax said...

The one thing I really cannot and should not be responsible for is the documenting of any additional installation and setup needed for various platforms, or (eg) testing on a Raspberry Pi.

IMO this is where a lot of projects lose people. If it's too hard to get spun up and all you have is a loose list of "required dependencies" with no other directions, people usually just give up and move on.

petelomax said...

[Raspberry Pi is probably a very distant target, I don't think euc supports it, and getting this whole project to self-host (and then some) is probably needed first.]

We absolutely support it and it works pretty well, except building on Raspberry Pi is really slow (you can at least help by using euc -makefile and make -j4) and we only support 32-bit ARM right now.

You might want to have a look at Tiny C Compiler. I've considered it as an option for an "embedded" or "bundled" compiler for the translator.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu