TXL question (Attn: Gene)

Discussion in 'C Programming' started by Kenny McCormack, May 14, 2009.

  1. Note that TXL was (AFAICT) written in C, so it is on topic here.

    I've started playing with TXL - and yes, the hard part is wrapping your
    mind around its way of doing things. The first thing I tried to
    implement was an identity filter - i.e., the equivalent of simple "cat".
    It seems to me that an identity filter should be to filter languages/programs
    what "hello, world" is to straight-up procedural languages.

    However, the problem is that it seems to have a concept of line length.
    I am using the "-char" option, but there are still problems.

    Very long lines in the input are output correctly (that's good; they are
    not truncated or wrapped), but an extra empty line is output after the
    very long (I think "very long" can be read as "greater than about 100").
    Also, an extra blank line is output at the end of the file.

    Thus, it seems not possible to write the "IF". Is it?
     
    Kenny McCormack, May 14, 2009
    #1
    1. Advertising

  2. Kenny McCormack

    Lew Pitcher Guest

    On May 14, 2009 16:39, in comp.lang.c, Kenny McCormack
    () wrote:

    > Note that TXL was (AFAICT) written in C, so it is on topic here.


    Perhaps. If you ask questions about specific parts of the C code that
    implements TXL, then yes, in all probability, those questions would be
    on-topic here. However, if you ask questions about TXL itself, then no,
    those questions would not be on-topic.

    Now, what is TXL? According to http://www.txl.ca/nabouttxl.html,
    "TXL is a unique programming language specifically designed to support
    computer software analysis and source transformation tasks. It is the
    evolving result of more than fifteen years of concentrated research on
    rule-based structural transformation as a paradigm for the rapid solution
    of complex computing problems.

    The TXL programming language is a hybrid functional / rule-based language
    with unification, implied iteration and deep pattern match."


    [snip]
    The rest of your post deals with writing programs in TXL, and with the TXL
    language itself. Sorry, but TXL isn't C, and we can't answer TXL questions
    with any authority here. You best find a TXL-specific forum, such as "The
    TXL Forum" (http://www.txl.ca/forum/) to ask your questions in.

    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------
     
    Lew Pitcher, May 14, 2009
    #2
    1. Advertising

  3. Kenny McCormack

    Flash Gordon Guest

    Lew Pitcher wrote:
    > On May 14, 2009 16:39, in comp.lang.c, Kenny McCormack
    > () wrote:
    >
    >> Note that TXL was (AFAICT) written in C, so it is on topic here.


    <snip>

    > TXL Forum" (http://www.txl.ca/forum/) to ask your questions in.


    Consider who made the post. I think you will find that you have been
    trolled.
    --
    Flash Gordon
     
    Flash Gordon, May 14, 2009
    #3
  4. Kenny McCormack

    Lew Pitcher Guest

    On May 14, 2009 18:34, in comp.lang.c, Flash Gordon ()
    wrote:

    > Lew Pitcher wrote:
    >> On May 14, 2009 16:39, in comp.lang.c, Kenny McCormack
    >> () wrote:
    >>
    >>> Note that TXL was (AFAICT) written in C, so it is on topic here.

    >
    > <snip>
    >
    >> TXL Forum" (http://www.txl.ca/forum/) to ask your questions in.

    >
    > Consider who made the post. I think you will find that you have been
    > trolled.


    Yes and no. I recognized the OP, and his purpose.

    OTOH, I also knew that some answer was necessary, both to point those who
    google for TXL to the right place, and to reassert the subject matter of
    the group. I, for one, do not appreciate the side-tracking of topicality
    that some of the posters in this group perform.

    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------
     
    Lew Pitcher, May 15, 2009
    #4
  5. Kenny McCormack

    Gene Guest

    On May 14, 4:39 pm, (Kenny McCormack)
    wrote:
    > Note that TXL was (AFAICT) written in C, so it is on topic here.
    >
    > I've started playing with TXL - and yes, the hard part is wrapping your
    > mind around its way of doing things.  The first thing I tried to
    > implement was an identity filter - i.e., the equivalent of simple "cat".
    > It seems to me that an identity filter should be to filter languages/programs
    > what "hello, world" is to straight-up procedural languages.
    >
    > However, the problem is that it seems to have a concept of line length.
    > I am using the "-char" option, but there are still problems.
    >
    > Very long lines in the input are output correctly (that's good; they are
    > not truncated or wrapped), but an extra empty line is output after the
    > very long (I think "very long" can be read as "greater than about 100").
    > Also, an extra blank line is output at the end of the file.
    >
    > Thus, it seems not possible to write the "IF".  Is it?


    I'd say it's on topic not because TXL is written in C (I don't know if
    that's true. It's original intent was to transform Turing, so I
    guessed it was written in Turing.), but rather because there it's an
    excellent tool for transforming C. E.g. I've used it to implement a
    "near C" language that supports exact garbage collection by making the
    C stack accessible to a gc root-finding algorithm.

    Anyway, Jim Cordy--the PI for the txl project--was very kind,
    answering all my questions as I did the "Practical Introduction"
    problems on the web site, in which he urges you to submit your
    answers. I recommend you do this and ask your questions of him.

    FWIW, I don't think TXL gives a whit for matching input line numbers
    to output. I've had to debug while inspecting the TXL output rather
    than input for that reason.
     
    Gene, May 15, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alien2_51
    Replies:
    8
    Views:
    512
    alien2_51
    Jul 16, 2003
  2. Michael
    Replies:
    3
    Views:
    376
    Richard Heathfield
    Jan 1, 2004
  3. Candida Ferreira

    PyGEP: Gene Expression Programming for Python

    Candida Ferreira, May 1, 2007, in forum: Python
    Replies:
    0
    Views:
    506
    Candida Ferreira
    May 1, 2007
  4. Chad Brewbaker

    Problems building ruby1.9 on Blue Gene/L

    Chad Brewbaker, Dec 9, 2007, in forum: Ruby
    Replies:
    4
    Views:
    96
    Chad Brewbaker
    Dec 12, 2007
  5. SomeDeveloper

    TXL-like capability?

    SomeDeveloper, Jul 10, 2007, in forum: Perl Misc
    Replies:
    2
    Views:
    111
    Peter J. Holzer
    Jul 11, 2007
Loading...

Share This Page