zsh-users
 help / color / mirror / code / Atom feed
* Tksh and dtksh replacements for Zsh-users?
@ 2000-07-22 12:07 Juhapekka Tolvanen
  2000-07-22 17:14 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Juhapekka Tolvanen @ 2000-07-22 12:07 UTC (permalink / raw)
  To: zsh-user mailing list


That shell called ksh also has Tksh and Dtksh.

http://www.kornshell.com/

http://www.kornshell.com/software/

http://www.cs.princeton.edu/~jlk/tksh/

Tksh is an implementation of the Tcl C library written on top of the library
for the new KornShell (ksh93). Dtksh is something like Tksh, but it is for
making of CDE-apps.

I just wonder: Is it possible to create something like that for zsh? How
about possibility to create Tk-apps with zsh? Or better yet, how about
possibility to creating Gtk- or even Gnome-apps with Zsh?

And here are the names I propose:

- TkZsh
- GtkZsh
- GnomeZsh

Currently, it is possible to write Tk-, Gtk- and even Gnome-apps with Perl
and Python. Is it better idea to just stick with those scripting languages?

Comments, please?

-- 
Juhapekka "naula" Tolvanen * U of Jyväskylä * juhtolv@st.jyu.fi
http://www.cc.jyu.fi/~juhtolv/ * * "STRAIGHT BUT NOT NARROW !!" 
---------------------------------------------------------------
"if i was twice the man i could be, i'd still be half of what
you need"                                       Nine Inch Nails


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tksh and dtksh replacements for Zsh-users?
  2000-07-22 12:07 Tksh and dtksh replacements for Zsh-users? Juhapekka Tolvanen
@ 2000-07-22 17:14 ` Bart Schaefer
  2000-07-24 12:06   ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2000-07-22 17:14 UTC (permalink / raw)
  To: Juhapekka Tolvanen, zsh-user mailing list

On Jul 22,  3:07pm, Juhapekka Tolvanen wrote:
} Subject: Tksh and dtksh replacements for Zsh-users?
}
} Tksh is an implementation of the Tcl C library written on top of the
} library for the new KornShell (ksh93).  Dtksh is something like Tksh,
} but it is for making of CDE-apps.
} 
} I just wonder: Is it possible to create something like that for zsh?

Sure.  Just another module.

I don't know about the CDE graphics library, but the easiest way for Tk
would be to create a zsh module to link to the Tcl library as a builtin
command, then simply attach the existing Tcl bindings for Tk to that.  I
did exactly that years ago for Z-Mail, although the version with Tk was
never released.  The zsh module would also have to install a couple of
Tcl builtins to use for calling back to zsh functions, because the Tk
event loop has to be allowed to take over control once the UI is ready
to come up.

} How about possibility to create Tk-apps with zsh? Or better yet, how
} about possibility to creating Gtk- or even Gnome-apps with Zsh?

That should be possible, too.  All you need is someone with time and
inclination (I presently have neither).

} And here are the names I propose:
} 
} - TkZsh
} - GtkZsh
} - GnomeZsh

I have a better proposal:  Just call it zsh.  (The module names would
typically be something like ztk, zgtk, and zgnome, ala zpty and zftp.)

} Currently, it is possible to write Tk-, Gtk- and even Gnome-apps with
} Perl and Python. Is it better idea to just stick with those scripting
} languages?

I'm not very familiar with the sorts of things that one uses e.g. Dtksh
to write.  My suspicion would be that a graphically-enabled shell is more
often used to add simple I/O dialogs to shell scripts than it is to write
full-blown GUI apps in shell.

Certainly I'd prefer a language with something approximating real data
structures for purposes of writing a GUI.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tksh and dtksh replacements for Zsh-users?
  2000-07-22 17:14 ` Bart Schaefer
@ 2000-07-24 12:06   ` Oliver Kiddle
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver Kiddle @ 2000-07-24 12:06 UTC (permalink / raw)
  To: zsh-user mailing list

Bart Schaefer wrote:

> I'm not very familiar with the sorts of things that one uses e.g. Dtksh

>From looking at the man page for dtksh, it seems that it does things at
a fairly low level, offering builtins which map directly to many X, Xt,
motif and CDE C functions. I wouldn't have a clue what it would make
sense to use it for.

> to write.  My suspicion would be that a graphically-enabled shell is more
> often used to add simple I/O dialogs to shell scripts than it is to write
> full-blown GUI apps in shell.

This is more the sort of thing which I would like: a few simple routines
for pop-up messages and dialogue boxes. If that was implemented, what
would be good is if there were separate modules for Tk, gtk etc which
all had the same interface in zsh so they could be used interchangably.

> Certainly I'd prefer a language with something approximating real data
> structures for purposes of writing a GUI.

I agree, most of the things a low level GUI interface in zsh could be
used for might be better written in something else like Python, Perl or
C.

Oliver Kiddle


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tksh and dtksh replacements for Zsh-users?
  2000-07-24  7:09 Sven Wischnowsky
@ 2000-07-24  7:26 ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2000-07-24  7:26 UTC (permalink / raw)
  To: zsh-users

On Jul 24,  9:09am, Sven Wischnowsky wrote:
}
} Bart Schaefer wrote:
} 
} > did exactly that years ago for Z-Mail, although the version with Tk was
} > never released.  The zsh module would also have to install a couple of
} > Tcl builtins to use for calling back to zsh functions, because the Tk
} > event loop has to be allowed to take over control once the UI is ready
} > to come up.
} 
} If someone things about trying it, he should first try to define a
} zwait() [...] That way we probably (hopefully) could respond to X-Events
} asynchronously.

If I recall correctly, this isn't sufficient for Tk -- it really does
have to be in control, unless ztk were going to reimplement more of the
bindings than what I described.

Of course, my recollection is from Tk 4.something, so it could be a lot
different now.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tksh and dtksh replacements for Zsh-users?
@ 2000-07-24  7:09 Sven Wischnowsky
  2000-07-24  7:26 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-07-24  7:09 UTC (permalink / raw)
  To: zsh-users


Bart Schaefer wrote:

> On Jul 22,  3:07pm, Juhapekka Tolvanen wrote:
> } Subject: Tksh and dtksh replacements for Zsh-users?
> }
> } Tksh is an implementation of the Tcl C library written on top of the
> } library for the new KornShell (ksh93).  Dtksh is something like Tksh,
> } but it is for making of CDE-apps.
> } 
> } I just wonder: Is it possible to create something like that for zsh?
> 
> Sure.  Just another module.
> 
> I don't know about the CDE graphics library, but the easiest way for Tk
> would be to create a zsh module to link to the Tcl library as a builtin
> command, then simply attach the existing Tcl bindings for Tk to that.  I
> did exactly that years ago for Z-Mail, although the version with Tk was
> never released.  The zsh module would also have to install a couple of
> Tcl builtins to use for calling back to zsh functions, because the Tk
> event loop has to be allowed to take over control once the UI is ready
> to come up.

I've been playing with this ztk idea some time ago (never found the
time to try to hack it).

If someone things about trying it, he should first try to define a
zwait() function (probably with a better name) that is called
everywhere when the shell waits for signals or input (i.e. a wrapper
around select). And then allow modules to register file-descriptors
(and timeouts?) that have to be monitored (with callback functions or
something). That way we probably (hopefully) could respond to X-Events
asynchronously.

That would be nice to have anyway (and I've seen right, the ksh
sources have such a function).


To workers:

There might be some connection between this and the builtins-usable-
in-a-pipe we had some time ago.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-07-24 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-22 12:07 Tksh and dtksh replacements for Zsh-users? Juhapekka Tolvanen
2000-07-22 17:14 ` Bart Schaefer
2000-07-24 12:06   ` Oliver Kiddle
2000-07-24  7:09 Sven Wischnowsky
2000-07-24  7:26 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).