Internet Markup Language

The idea started as intention to code the web pages in any language you prefer. You simply mix any programming language commands with HTML tags as is and run the files through preprocessor which surrounds the HTML tags with a write to file commands

Next I had been suggested to generalize the idea in kind of search and replace language. I’ve named it IML - The Internet Markup Language

Example

iml_start
// The first line of valid iml file should be iml_start

iml_search_and_replace_start
// Define a search and replacement structure

iml_search_start = <&&>
// Define a first pattern to match
// && means anything

iml_search_end = </&&>

iml_replace_start
// .this means the found string
// .output means the produced string
// replace will find and replace the defined in statement strings

replace.in.this " with /"
.output = write(“.this”);

iml_replace_end

iml_search_and_replace_end
// the iml_search and iml_replace blocks should strictly follow each other

iml_body_start

Mix HTML and C as you prefer

You can just write any tags as is, next they’ll be simply replaced with a C write to file commands. After the file is preprocessed it is send to regular C compiler

For example, you can write

if ( a > 2 ){

A is bigger than 2

}

This way you don’t need either <% %> no PHP, you may code the web pages in any language at all

You should learn nothing at all. Until you keep writing the web pages in C only, you should simply use the same IML header which tells the precompiler how to replace the tags before the files are send to C compiler itself

If you start coding the web pages in Python or C++, you should simply use another header

With IML you don’t need ASP or PHP languages. You could ever write the web pages in C and C++. IML is a sort of precompiler, which consists from a header describing how to replace the HTML tags before the files are send to regular C, C++, Python and any other language compilers

As a rule, to develop the ASP and PHP languages had been your fatal mistake, because if you can write interpreter, you can write a compiler for this

iml_body_end

iml_end

Welcome to the forums, @Aenne.

The first question I would have to ask is: why? It seems to me much easier to write straight HTML, or to use an existing language like PHP, so what am I missing here? What benefits would IML bring me that would make it worth learning?

3 Likes

I was ninja’d but I was wondering the same thing. There are all manner of server-side scripting languages, As @TechnoBear mentions PHP, but also ASP, JSP, Cache to mention just three.

3 Likes

We talk here about the convenience. You can just write the web pages in C and output HTML as is, you don’t need to enclose the C commands in any additional markup and don’t have to use the write(“…”) commands for any HTML text and tags

For example, you can write

if ( a > 2 ){

A is bigger than 2

}

I’m sorry, but I still don’t understand what you’re talking about here. This seems very similar to old scripting languages like asp and older styles of php (granted a lot of people still use this method, but “good practice” suggests other methods.

Mixing front-end with back-end should be avoided as much as possible. The maintenance efforts go up exponentially when mixing the two vs separating them out.

edit:

Just saw what you added. How is that any different than this in classic asp?

<% if a > 2 then %>
A is bigger than 2
<% end if %>
3 Likes

You don’t need either <% or ASP. You may code the web pages in any language at all

I think what we are saying, though, is spending the time learning IML really worth it over just writing echo "insert html here"; in PHP?

2 Likes

You should learn nothing at all. Until you keep writing the web pages in C only, you should simply use the same IML header which tells the precompiler how to replace the tags before the files are send to C compiler itself

If you start coding the web pages in Python or C++, you should simply use another header

I’m sorry but I’m still not tracking this.

  • What are the benefits to this approach?
  • How does this save effort over other languages/methods?

Perhaps if you put together a full page example which would show what it’s supposed to do?

1 Like

With IML you don’t need ASP or PHP languages. You could ever write the web pages in C and C++

And if you don’t write in C or C++ (I haven’t written in either of those since college cough 20+ years cough ago)

1 Like

That had been your primary mistake, because we talk about the compiled languages. If you can write interpreter, you can also write the compiler for this

@Aenne I love your enthusiam but I can’t see the benefit for this. Agreed, there might a little bit of benefit if you already use C but there’s zero if you don’t. And even if the learning curve is small for those who program in C, there’s still a learning curve. It is not only learning how to write a header or a couple of other sentences. It is understanding what happens behind and the output you get. So you still need to understand HTML and CSS (even if it is a basic form)

The second thing that I’d comment on is that frameworks already do that job. If you use .NET, you can use .NET to output HTML.

Frameworks have their place but they don’t work for everybody

The reason is that if I use a Framework, I loose control on the output. And I don’t like that. So I don’t see the need for this.

But I’m sure that you have more compeling arguments than “you don’t need ASP or PHP”. Which software or pre-processor you need so the server understand this code and writes the correct output?

1 Like

you can use just about any language you like to generate the HTML.

I’m still no clearer about the supposed benefits here. The example you’ve cited doesn’t look to me like HTML at all, so I’m no nearer to understanding how this works.

As @DaveMaxwell said, it might be helpful if you were to post a full page example.

I’ll take a stab at seeing if I understand things.

As examples, in terms of outputting HTML only, there could be

PHP - HTML
Perl - HTML
ASP - HTML

the concept would change the process to be more like

. . . . . PHP
IML ← Perl → HTML
. . . . . ASP

The idea is that instead of needing to learn the server language syntax and functions, the IML code would be generic and whatever language was specified would be used to generate the output.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.