Live data from Hacker News

A port of the GTK+3 Hello World to Bash

github.com

21–27 of 27 posts

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

#23
post #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…

You can simplify it by starting your program like this:

  #!/bin/sh
  # \
  exec wish "$0" ${1+"$@"}
( You wouldn't need the cat pipe. )

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

#24

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.

You should be able to do something like this in PowerShell on Windows already; .NET types are easy to use in it.

Since I haven't heard any screams of anguish coming from Windows people, I wouldn't worry about it.

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

#25

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'm trying to understand your position.

Would you rather that something like this not be possible or that people would not create things like this?

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

#26

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.

All the languages provide the tools to create a mess, the only external dependency is the user. This can be abused quite destructively, but with good intentions it can be used for testing purposes or making a tiny interface to a library. Why throw the baby with the bathwater?
Post reply on HN