suggestions sought for a framework for a quick, dirty, reallysimple GUI prototype

suggestions sought for a framework for a quick, dirty, reallysimple GUI prototype

Nadav Har'El nyh at math.technion.ac.il
Thu Jul 19 21:14:54 IDT 2012


On Thu, Jul 19, 2012, Dov Grobgeld wrote about "Re: suggestions sought for a framework for a quick, dirty, reallysimple GUI prototype":
> very nicely reflects the beauty of the GObject system. Especially in C it
> is easy to miss that because of the very tedious syntax you need to use,
> e.g. to define an derived class. In Vala the syntax is very concise.

This is a very important point. This is why I loved Tcl/Tk when I
learned it in the mid 90s - the code to create the gui was so compact,
so elegant - the complete opposite of Xlib, Xaw and Motif, each
requiring you to write dozens of lines for every simple task.

For example, here is a program in TCL/TK which shows a "hello" button
which outputs "hi" when pressed. How does it look in your favorite
gui language?

	#!/usr/bin/wish
	button .a -text "hello" -command "puts hi"
	pack .a

For the curious, the first command creates a button ".a" - in TK, widgets
are hierarchical and have hierarchical pathnames, with "." separating
components, so ".a" is a child of the toplevel window "." with the name
a. The TCL language is a simple language resembling the shell (but with
interesting improvements, which I can eleborate if anyone cares).
The second command "packs" .a in its parent, i.e., the toplevel window
".". "packing" means that you ask to have .a be placed and sized
automatically.

I'm still saddened by the fate of TCL/TK. I still blame Sun for what
happened to it. sun bought TCL/TK and its inventor John Ousterhout
with intentions of turning TCL into a browser scripting language, and
then "burried" TCL when Sun decided to go with Java instead (though
interestingly, Java NEVER become a language of the web). I'm sad,
because I was really a big fan of TCL and TK. I still am.

Sic transit gloria mundi.

> Regarding the fact that it compiles to C, as long as I have an automatic
> build system, what do I care what it compiles to? But most other high
> language bindings to Gtk are just as easy to use (e.g. Python, Lua, or
> Haskell).

I'm curious, why does it need to compile at all? Why didn't they just
write an interpreter, like TCL did?

Nadav.


-- 
Nadav Har'El                        |         Thursday, Jul 19 2012, 1 Av 5772
nyh at math.technion.ac.il             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |error compiling committee.c: too many
http://nadav.harel.org.il           |arguments to function



More information about the Linux-il mailing list