Hi Alex,

Thank you. That is a nice example.

The ability to explicitly flush buffered data on the output channel was
what I was looking for.
Of course, there is a existing function to do just that... that I should of
thought to look for... (flush)

I am still trying to get a handle on using  io channels in picolisp.. and
the nuances of '@'  :)

One way to do that has been to see where I can use channels to wire useful
functionality into existing projects.
For context, the Perl example I referenced is from here
https://httpd.apache.org/docs/2.2/rewrite/rewritemap.html#prg

Best regards,
/Lindsay.


On Tue, Jan 17, 2017 at 10:46 PM, Alexander Burger <a...@software-lab.de>
wrote:

> Hi Lindsay,
>
> > Is is possible to turn off I/O buffering in a PicoLisp program?
>
> I/O buffering can't be turned off, it happens on a lower (stdin) level.
>
>
> I think what you mean is a low-level (e.g. character-wise) read as opposed
> to
> the higher-level 'read' function.
>
> > e.g In Perl one can do something like this...
> >
> > #!/usr/bin/perl
> > $| = 1; # Turn off I/O buffering
> > while (<STDIN>) {
> > s/-/_/g; # Replace dashes with underscores
> > print $_;
> > }
>
> This could be:
>
>    (while (char)
>       (prin
>          (case @
>             ("-" "_")
>             (T @) ) ) )
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to