help-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awk and graphics


From: Miriam English
Subject: Re: awk and graphics
Date: Mon, 6 Nov 2023 06:02:47 +1000

That's something I would not have thought of.
I'm not sure how I'd get it to display realtime graphics...

Hmmm... I guess I could keep rewriting a pbm file and copying it to
another which acts like a frame buffer and which is displayed in an html
page that refreshes every few seconds without a webserver.
Interesting idea. Thanks David.

 - Miriam


On Sun, 5 Nov 2023 08:30:57 -0700
david kerns <david.t.kerns@gmail.com> wrote:

> you could also make a web server from awk and serve it to a browser
> 
> On Sun, Nov 5, 2023 at 7:59 AM Manuel Collado <mcollado2011@gmail.com>
> wrote:
> 
> > El 5/11/23 a las 10:10, Miriam English escribió:  
> > > Does anybody know some simple, fast, screen display extension
> > > that awk can use?
> > >
> > > I've been fiddling around with some of my old cellular automata
> > > programs and have translated them to a few languages, including
> > > awk. I haven't found any way to output graphics to the screen
> > > directly from awk, so I've made it write to a .pbm image file.
> > > The great advantage of this is that pbm is an ascii format, and
> > > easy to write to from awk. (I've attached a pbm file of a
> > > cellular automaton, and another converted to png in case you
> > > can't view pbm. It is an old format.) [...]
> > >
> > > Anybody know of something I can use?  
> >
> > There are a lot of other textual source code for graphics, in
> > addition to .pbm. But it seems you want direct generation of images
> > in the screen instead of creating graphic files for later
> > inspection.
> >
> > Perhaps a possible approach could be to pipe awk output to some
> > interpreter that draws the image on screen. For instance, you can
> > pipe awk output to a Tcl/Tk intepreter (tclsh/wish), and send
> > commands for creating and draw elements in a canvas widget.
> >
> > This way the screen image could be modified on the fly, I think.
> >
> > HTH.
> > --
> > Manuel Collado - http://mcollado.z15.es
> >
> >  



-- 
There are two wolves and they're always fighting.
One is darkness and despair. The other is light and hope.
Which wolf wins?
Whichever one you feed.
  -- Casey in Brad Bird's movie "Tomorrowland"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]