From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: feature request: simple hashbang for executable scripts Date: Wed, 23 Aug 2017 02:00:46 -0400 Message-ID: <87pobmomb5.fsf@netris.org> References: <20170819090037.GA12397@sph-desktop.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503468246 4438 195.159.176.226 (23 Aug 2017 06:04:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 23 Aug 2017 06:04:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: guile-devel@gnu.org To: j kalbhenn Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Aug 23 08:04:02 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkOlh-0000Wk-0N for guile-devel@m.gmane.org; Wed, 23 Aug 2017 08:03:57 +0200 Original-Received: from localhost ([::1]:41280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkOlm-00008g-9C for guile-devel@m.gmane.org; Wed, 23 Aug 2017 02:04:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkOj1-0006vJ-3x for guile-devel@gnu.org; Wed, 23 Aug 2017 02:01:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkOiy-0005a9-2P for guile-devel@gnu.org; Wed, 23 Aug 2017 02:01:11 -0400 Original-Received: from world.peace.net ([50.252.239.5]:56939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkOix-0005ZJ-Ul for guile-devel@gnu.org; Wed, 23 Aug 2017 02:01:08 -0400 Original-Received: from pool-72-93-33-39.bstnma.east.verizon.net ([72.93.33.39] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkOiw-0001EV-D9; Wed, 23 Aug 2017 02:01:06 -0400 In-Reply-To: <20170819090037.GA12397@sph-desktop.fritz.box> (j. kalbhenn's message of "Sat, 19 Aug 2017 09:00:37 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 50.252.239.5 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19264 Archived-At: j kalbhenn writes: > scripts of other languages usually need just one line to specify the > interpreter: > > #!/usr/bin/myinterpreter > > but with guile we have to add a final !# > > #!/usr/bin/guile !# The shebang above does not work, because the "!#" is interpreted by the kernel as an argument to pass to Guile before the script file name, and then Guile interprets it as a file to load. Unless "!#" is a file in the current directory, this will fail, or at least it does for me. > or even > > #!/usr/bin/guile -s > !# > > in my opinion, this is not ideal. from my perspective as a guile user > this seems to be unnecessarily inconsistent and complicated. There are advantages to the current approach, but regardless of what our opinions might be about this, I don't see how we could change this now without breaking a great many Guile scripts. Since the earliest days of Guile, "#!" has been comment syntax that terminates with "!#", and many Guile scripts depend on this. For example, it is quite common to put a shell script between #! and !# that ends by running Guile on the same file. It is also quite common to put "-*- scheme -*-" on the second line to that Emacs will recognize the type of the file. Mark