in reply to Re^17: Is an aXML compiler possible?
in thread Is an aXML compiler possible?

Impressive :)

Let me guess, you did this;

my $data =~ s@</code>@@gs;

Hrm... nope...

Ahhh rtfm!

my $data =~ s@<c>
</c>@@gs; </code>

Blah... one more try..

my $data =~ s@</code>@@gs;

Ok that's lovelly... now how would you do this:

my $data =~ s@</code>@@gs; my $data =~ s@
@@gs; </c>

Oops I did it again!

Incase anyone is wondering; the above literally looks like:

<c>

my $data =~ s@</code>@@gs;
my $data =~ s@</c>@@gs;

</c>

I'm having to write more and more complex string literals to express the output required.

Sorry, am I being obtuse?

Replies are listed 'Best First'.
Re^19: Is an aXML compiler possible?
by Anonymous Monk on Oct 31, 2011 at 14:52 UTC

    I'm having to write more and more complex string literals to express the output required.

    You're calling two tags which do not nest complex?

    Two tags that aren't self-modifying and infinitely recursive?

     s@</c>@@;

     s@</code>@@;

    aXML is RocketBrainf-ck on the complexity scale

    Sorry, am I being obtuse?

    If only

      No, I'm pointing out that the code of this site suffers from a problem which requires a certain level of knowledge and understanding to get around.

      It's exactly the same problem that certain characters suspect aXML of suffering.(wrongly as it happens)

      Point is even a well thought out and mature code base can contain problems when treated roughly in an exceptional manner with the intention of breaking it, as the above proves.

      aXML is not RocketBrainf-ck, it's very simple, and as it stands right now my current parser appears to be capable of outputting any HTML/aXML code without problems. (I have yet to find a test case that fails). To be honest I'm having a slight problem with outputting certain Perl constructs, however I have already figured out the solution and intend to have it coded up prior to launching PerlNights.

      One criticism someone made, I can't remember who, was that it wasn't possible to see from looking at the aXML code what it actually does without inspecting the plugin code. Well all I have to say to that one is this; what does the following do:

      use foo; print foo(bar(baz()));

      Please tell me how to know what the output of that program is, WITHOUT inspecting the code of the package foo... if you can I will accept the criticism as valid, if you cannot, then I will consider that criticism, like all the others, as firmly refuted.

        No, I'm pointing out that the code of this site suffers from a problem which requires a certain level of knowledge and understanding to get around.

        HA!

        Please tell me how to know what the output of that program is, WITHOUT inspecting the code of the package foo...

        Already explained to you many times, that isn't even close to what aXML does.

        The closes equivalent that resembles print foo(bar(baz())); would be print eval foo( eval bar( eval baz() ) ) ); except its really

        $program = 'foo(bar(baz())'; while( evalable $program ){ $program = eval $program; } print $program;

        In otherwords, rocket-brainf-ck

        if you can I will accept the criticism as valid, if you cannot, then I will consider that criticism, like all the others, as firmly refuted.

        HA!