Yo wait! I figured this out a few weeks ago.

These are the instructions excerpted from
http://www.lexicon.net/antonr/rebol/demo/word-frequency.r

        Type this in the Windows DOS shell:

                type file.txt | rebol031.exe -cs word-frequency.r | more

         or if you installed Rebol/View 1.3.1, type this in the Windows DOS 
shell:

                type file.txt | rebol.exe -ci
http://www.lexicon.net/antonr/rebol/demo/word-frequency.r | more

        or for linux:

                cat file.txt | ./rebol -cs word-frequency.r

Anton.

> I think it would be great if we clubbed together to generate a
> set of REBOL
> scripts for the computer language shoot-out.
>
> As has already been suggested, we could collaborate on the ML to
> develop and
> refine solutions.
>
> And, ditto, it'd make sense to have a thread per REBOL script.
>
>
> To start the ball rolling, I've picked what is probably the
> easiest one of
> all: sum-file -- that'll help us get out heads around the various
> requirements.
>
> My draft solution looks like this:
>
> ----------
>
> rebol []
>
> sum: 0
> foreach line read/lines to-file system/script/args [
>    sum: sum + to integer! trim line
>   ]
> print sum
> quit
> ----------
>
> This needs a command line (cos REBOL doesn't read STDIN) something like:
>
>   rebol sum-file.r sum-file-data.txt
>
> And it is **not** a valid solution as the requirements say:
>   "Programs should write to stdout. Program output is redirected to a
> log-file and compared to the expected output."
>
> As far as I know, that simply isn't possible with REBOL -- it
> does not write
> to STDOUT -- so we may want to stop the whole exercise right now
> until that
> issue is resolved.
>
> Please comment!
> Sunanda

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to