Live data from Hacker News

A port of the GTK+3 Hello World to Bash

github.com

11–20 of 27 posts

Re: A port of the GTK+3 Hello World to Bash

#12
tightly packed portable version of this code

--------------------------------------------------------

#!/usr/bin/env bash

cat package require Tk

pack [button .b -text {Push Me} -command {

    tk_messageBox -message {hello, world}
}]

EOF

--------------------------------------------------------

Of course doing it directly in Tk Tcl would be even more portable, readable, simple and smarter and easier to deploy/maintain.

And at the opposite of gtk team tk team does not breaks API for the pleasure of being more right than the users.

So it would be a win-win-win situation to use Tk/Tcl instead of gtk3.

Re: A port of the GTK+3 Hello World to Bash

#13

I hate that something like this is possible. This gives people who know only bash the ability to create a mess rather than learn a real scripting language like Python.

I've tried writing a GTK 3 app in python, it was pretty horrible. The GTK XML format is very annoying to work with, and writing interfaces programmatically requires using an automatically generated C->python API, which has essentially no documentation.

Re: A port of the GTK+3 Hello World to Bash

#14

I hate that something like this is possible. This gives people who know only bash the ability to create a mess rather than learn a real scripting language like Python.

I've tried writing a GTK 3 app in python, it was pretty horrible. The GTK XML format is very annoying to work with, and writing interfaces programmatically requires using an automatically generated C->python API, which has essentially no documentation.

I didn't find GTK2 with Glade all that difficult.

But eventually I dropped GTK and switched to Qt. I thought they worked through all the common issues with better solutions.

Re: A port of the GTK+3 Hello World to Bash

#16

I hate that something like this is possible. This gives people who know only bash the ability to create a mess rather than learn a real scripting language like Python.

I've tried writing a GTK 3 app in python, it was pretty horrible. The GTK XML format is very annoying to work with, and writing interfaces programmatically requires using an automatically generated C->python API, which has essentially no documentation.

Are there any GTK bindings that feel "native"? These automatically generated bindings are almost as “ugly” and uncomfortable as using GObjects in C.

Re: A port of the GTK+3 Hello World to Bash

#17

I hate that something like this is possible. This gives people who know only bash the ability to create a mess rather than learn a real scripting language like Python.

I think the same thing was said about Javascript when node.js was created.

Re: A port of the GTK+3 Hello World to Bash

#18

I hate that something like this is possible. This gives people who know only bash the ability to create a mess rather than learn a real scripting language like Python.

I think the same thing was said about Javascript when node.js was created.

And rightly so. It would be much better to be running Python in the browser than to be running Javascript on the server.

Re: A port of the GTK+3 Hello World to Bash

#20
As someone who has written quite large projects in both C and Bash, I find it amusing that it's now even easier to use two of our biggest footguns together. Still, I can see this being very useful for writing test scripts for libraries.
Post reply on HN