I *like* it! Probably the most universal, and can even be run locally. Possibly even as a bookmarklet. And luckily for all of us, the DOM standards let javascript access user input in a fairly elegant way.

BUT: the pipe paradigm of unix shells allows you to have the input be a file and the output to be piped into a file or another program. Our browser approach only lets us use literal text in and out. No big deal, but I wonder if there's a hack to get directly at the javascript language within the browser, and to use it like a command line command.

I think, however, your answer is likely the winner.

    -- Owen


On Dec 27, 2008, at 8:01 PM, Russ Abbott wrote:

JavaScript sure seems like a simple solution. Here's a primitive version of
one possibility.

<html>
<head>
<script>
function transform(input) {
 output.value = "transformed version of:\n" + input;
}
</script>
</head>
<body>
Copy the text to be translated into this text area and press "Go". <br />
<textarea id = "input" cols = 100></textarea>
<input type=button value="Go"
onclick="transform(document.getElementById('input').value);" />
<br />
<textarea id = "output" cols = 100></textarea>
</body>
</html>

-- Russ


On Sat, Dec 27, 2008 at 5:59 PM, Owen Densmore <[email protected]> wrote:

On Dec 27, 2008, at 4:04 PM, Marcus G. Daniels wrote:


What language could I write a script in (no graphics, simply text in,
text out) that would run on all the computers used by Friam folks?


Javascript!


Well, it is certainly lurking on all of our systems that have a browser, that's for sure! But if I just send folks a javascript file, how are they
to execute it, and how are they to specify stdin/out?

I really am serious here: I'd like to know which scripting language and runtime is reasonably likely to be on our systems. Its pretty grim if
there's not a reasonable answer!

The specific stunt I'm looking at takes a text file in, and converts it to morse code. Also the reverse, take in morse code and translate it to ascii. Dead simple and kinda fun. But to share it with others, I'd like a script
that could work on most systems.

  -- Owen


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to