Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In my ample (NOT!) spare time, I'm fiddling with Lhogho and wondering how to go about morphing it into a script engine for web browsers, viz

<h1>My First Web Page</h1>

<script type="text/lhoghoscript">
   print [Hello World]
</script>

</body>
</html> 

Any suggestions where to start? For Windows, I suppose Microsoft Windows Script Interfaces - Introduction. What about Linux and Mac?

On the way there, I'm also trying to figure out how to make Lhogho into a server-side language, rather like PHP or ASP, viz

<head>
<title>Lhogho Preprocessor</title>
</head>
<? print [Hello world] ?>

<body>
</body>
</html>

I figure that'll be slightly easier. Maybe.

share|improve this question
    
You could have flagged your Stack Overflow question for moderator attention and asked for it to be migrated. In general, cross-posting the same question to multiple sites is frowned upon on the assumption that it should at least be rephrased to fit each site. I'm not sure that your question is more on-topic here than on Stack Overflow. It likely fits better there, since you appear to be asking about performing a task in Lhogho specifically rather than a conceptual question. –  Anna Lear Dec 7 '11 at 4:25
    
Righto then, I'll flag some attention and get it pulled off SO. Thanks for your patience. –  boost Dec 7 '11 at 5:46

1 Answer 1

I would suggest writing a Javascript Lhogho interpreter or a compiler to Javascript for embedding in browsers- processing.js or Dart use these strategies to get their language into browsers.

For instance, if you implement a Lhogho compiler using LLVM, you can use emscripten to turn LLVM bytecode into Javascript. Thus, you could write a preprocessor that turned Lhogho -> LLVM bytecode -> Javascript.

For server-side stuff, you are right, it's easier. You might start with CGI ( http://en.wikipedia.org/wiki/Common_Gateway_Interface ). CGI describes how a web server can invoke an external program to generate server-side content. If Lhogho programs can be invoked as external programs, you could do server-side Lhogho programming without much effort, and research how to make it "nicer" (raw CGI is pretty uncomfortable). Alternatively, you might want to try FastCGI ( http://en.wikipedia.org/wiki/FastCGI ), which offers better performance.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.