From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel Subject: Re: feature request: simple hashbang for executable scripts Date: Thu, 24 Aug 2017 18:30:38 -0700 Message-ID: <253145A4-5D7D-433F-98BE-6B4187FAB7C9@gmail.com> References: <20170819090037.GA12397@sph-desktop.fritz.box> <87pobmomb5.fsf@netris.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1503624658 3154 195.159.176.226 (25 Aug 2017 01:30:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2017 01:30:58 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Aug 25 03:30:48 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 1dl3SR-00008P-B2 for guile-devel@m.gmane.org; Fri, 25 Aug 2017 03:30:47 +0200 Original-Received: from localhost ([::1]:51074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl3SW-0002ai-HY for guile-devel@m.gmane.org; Thu, 24 Aug 2017 21:30:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dl3SR-0002aU-SP for guile-devel@gnu.org; Thu, 24 Aug 2017 21:30:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dl3SO-0000oz-OB for guile-devel@gnu.org; Thu, 24 Aug 2017 21:30:47 -0400 Original-Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]:35781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dl3SO-0000mS-IJ for guile-devel@gnu.org; Thu, 24 Aug 2017 21:30:44 -0400 Original-Received: by mail-pg0-x234.google.com with SMTP id 63so6441632pgc.2 for ; Thu, 24 Aug 2017 18:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=cN6bfqE8wFQhzn6h7Z8kCM2aYJRtKiuyI/wgWtxdFdI=; b=uq2VFpMAG+sTiFYqrgtI6ykRPlbyIgc+8YfYFtxMp0JV+bQLx1iPLTsu6HEjUtVHCv A/G9G4nE+tUBNMIyZ52HXcHhMCXRD2+lk9hv8e/IQq2qcqek/qxpMO9qxgDQQGRhqAhF 85Mw8OMi4L8uf82MM6zNRjAT4ue60dBNYnPjfbDjEeLCOM0S2oiCXDWGBeduFDSoEx/f 9eNSCm/Y7xlfuGoG20KKpoehFcXpM6HqFwpmCW+okIzfRBOCOB0VNvsMwpnv93FcCjZo H4AdVzJAB50YKfgjKju4wp/p8MVBpSwPEwYmf475HWTh35YbEUd19cz36V313gAELAIv dn7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=cN6bfqE8wFQhzn6h7Z8kCM2aYJRtKiuyI/wgWtxdFdI=; b=WtuaxqN5ZDE3TMkPOZYAW7Q30hw7de+Sry1wA4mvS1XHxpdvmj+wxvbi1nW4qObR3l fqO+QNwIUxsxkAtC3z4wi7yBTtMX6AoSRRK+prILFWVbtK0gVzOc29FKIU7hBCJBa7WC LceVyAU7x9e2lmTx358hMpxLigVl5q3OSvJQr2DocI3wDMvlHDccMzdB+Vz1ux0GDXSw EyGwFRBzqEYGyBVCFJmRHCuVdgxPpnbf+moHX6lg4s9WcEdMi3/0pAbFVwRbV/6jc6re 4JbN2YMDkvcdGQMmCxHrTrN69b45hC+DWlnO17TC+sgVI6Vwdy6VQ2gP8tYwHKcTWEGg 9Jsg== X-Gm-Message-State: AHYfb5g8SO2IpQxEIeUeFBJILXyHGLk/EPeGZ0I9sHr1Vzpc9ILtUTT2 bkkEoHfmCdB1D6waH1I= X-Received: by 10.98.252.87 with SMTP id e84mr8306333pfh.184.1503624640664; Thu, 24 Aug 2017 18:30:40 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id i29sm10114233pfd.4.2017.08.24.18.30.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Aug 2017 18:30:40 -0700 (PDT) In-Reply-To: <87pobmomb5.fsf@netris.org> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::234 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:19265 Archived-At: > 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. I hadn't thought of this. Pretty cool. =20 mwette$ cat zzz #!/bin/sh echo "hello from shell" export FOO=3D"custom" exec guile -s $0 !# (display "hello from guile\n") (display "FOO: ") (display (getenv "FOO")) (newline) mwette$ ./zzz hello from shell ;;; note: source file /private/tmp/./zzz ;;; newer than compiled = /Users/mwette/.cache/guile/ccache/2.2-LE-8-3.9/private/tmp/zzz.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /private/tmp/./zzz ;;; compiled = /Users/mwette/.cache/guile/ccache/2.2-LE-8-3.9/private/tmp/zzz.go hello from guile FOO: custom mwette$=20=