On 25/08/2006, at 6:10 AM, skaller wrote:
> On Fri, 2006-08-25 at 00:10 +0300, Mark Wotton wrote:
>> Is C++ the only backend available?
>
> At the moment yes. I have done considerable work
> to replace C++ hacks in the front end with proper
> combinators, delegating all the C++ specifics
> to the code generator, however this work isn't complete.
>
> However that's the easy part: the system also relies on
> certain 'features' of the target language semantically,
> for example it must have 'goto' instruction.
GOTO is fine - I can target this dumbass Basic variant we have. Low-
level non-inferred statically-typed imperative languages are all more
or less the same, right? ;)
> If you look in the Ocaml file
>
> src/flx_type.mli
>
> you will see a sum type containing variants:
>
> `BEXE_goto _
> `BEXE_call _
>
> etc. These are the primitive instructions of the IL.
> There is a similar set for expressions:
>
> `BEXPR_...
Ok, that should be doable.
Is there a big runtime library for felix? These chips are pretty
small - maybe 16k program code.
>> I'm interested mostly in the synchronous -> asynchronous
>> transformation.
>
> You could easily hand write the driver(scheduler) logic
> for a microcontroller based on the C++ driver.
>
> You could also probably do the required control inversion
> with a Felix like program in Haskell more easily than
> unravel the Felix system itself .. the algorithm
> is fairly trivial eg replace
>
> ...
> call F A
> ...
>
> with
>
> switch (pc) { ...
>
> pc = next;
> return new F(this,A);
> case next:
> ....
> }
>
> although on a micro controller you'd use a computed jump
> (Which Felix also uses with gcc). It's just basic
> continuation passing model, except using a mutable object
> that typically is its OWN continuation.
Ah, John, you're too honest. Here I am offering to work on backend
code for Felix, and you tell me it's easier to roll my own... :)
> This is something FP people just don't get. Procedural
> programming IS continuation passing. There is in fact
> no other possible computational model!
>
> What is the 'program counter' but a continuation?
Sure. But the program counter is implicit, and a continuation is
explicit, and there's a strong bias toward explicitness in FP.
>> (Background: I'm doing some lighting programming, and writing my own
>> event loops and queues gets old fast.)
>
> Oh? For whom? Curious because I *invented* the software
> part of the digital dimmer :)
David Atkins Enterprises - I'm in Doha, in the lighting team for the
Asian Games opening and closing ceremonies. Currently I'm programming
hand-held Linux systems to program a custom chip called the Fat
Controller. In one case, the fat controller is actually programming
(in some sense) the controller of a particular lighting system, so I
really am writing code to write code to write code for food. I'm the
only programmer here: the electronics technician who was doing it
before me has a pile of code that mostly works, but is totally
inscrutable, so I'm trying to clean it up a bit.
Mark
--
I'm haunted by the freakish size of Nancy Reagan's head
No way that thing came with her body.
-- Mission of Burma, Nancy Reagan's Head
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language