From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: [potluck dish] Compiler for the Joy language Date: Thu, 18 Feb 2016 13:04:39 +0800 Organization: HFG Message-ID: <1455771879.3838.2.camel@Renee-desktop.suse> References: <20160215221723.240e4fa6@openmailbox.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1455771912 385 80.91.229.3 (18 Feb 2016 05:05:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 05:05:12 +0000 (UTC) Cc: guile-user@gnu.org To: Eric Bavier Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Feb 18 06:05:02 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aWGlv-00073M-Al for guile-user@m.gmane.org; Thu, 18 Feb 2016 06:04:59 +0100 Original-Received: from localhost ([::1]:36956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWGlu-0003ye-ON for guile-user@m.gmane.org; Thu, 18 Feb 2016 00:04:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWGlk-0003y0-Cr for guile-user@gnu.org; Thu, 18 Feb 2016 00:04:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWGlh-0000Ky-6U for guile-user@gnu.org; Thu, 18 Feb 2016 00:04:48 -0500 Original-Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:34613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWGlg-0000Ku-VK for guile-user@gnu.org; Thu, 18 Feb 2016 00:04:45 -0500 Original-Received: by mail-pa0-x232.google.com with SMTP id fy10so23941528pac.1 for ; Wed, 17 Feb 2016 21:04:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :organization:content-type:mime-version:content-transfer-encoding; bh=SsJRH4snsevQLRouprEluYgJRPwL9SxmoY1UO/ZyX7A=; b=Ii14bUsT5jJm2gilYcDheflaRDOEh/il9ekI3HbStcXsSaoeeqgnyZFt3uNk9MUn7D BPnPfGh5rLH9mlGGh0m2MCMIvJ7Bkv5x8zN9jzute/PdPe3YRdsVexVAzvE/72s2lkvt f7op14UtBPyKiY/6ljcJL6iUEs0PqBagKNmHfz52UVyDdAgSutKGi8Ch3TFZANai1mCQ HhK7JryYZHgF7V75xFVlUcKMTZF9vJzdeOMYdSOw6r3J+1uSECKUuFyW3L8FHRpHg4dp V+5bpgNCDtIViHlUb5JmSdU6ER/HTOKo/5L9hfw6T+P/dBrpN2L8LIsrhzD47Oa8svMS YQcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:mime-version :content-transfer-encoding; bh=SsJRH4snsevQLRouprEluYgJRPwL9SxmoY1UO/ZyX7A=; b=l0N9/UPh/hK9DBal9XNDHRdBWELzxf2/gcyyTfdMHoKbgtLkaPJ8b/r4NNoYTI6Wgj lSvDJ+jgiL5gryU8ohyu333d9bvFDVJs6HWAjcZIN7qNvRT7cxwbxSUo5tKF62if8yL0 9uQx8ISbNxDinOc/zpPRpZJljiOLCcCDQJicAQ84ZH0NFJ0Anxv0+PHuQQoKYDnAsZIp 9GkGsUa2vthiDg6vq0iyatv9bxm5WYlnts0UpnGLxwjgAvZUQ5fItlTLrJPxUkwe8gt3 0Nzr6MtOVO2ubdyTIpzvRnj4RfFDPhDGpiLPVskTSFLXoZz/GZ3jMHQ/f3ErXoZR8rOt 9cbg== X-Gm-Message-State: AG10YOTFUJf+Asfde2X3Z6/dXjR70Q4YFz610lPUk4wsTMgyK22G/d9kwyNosmW4j6xgIA== X-Received: by 10.66.97.40 with SMTP id dx8mr7396176pab.29.1455771884012; Wed, 17 Feb 2016 21:04:44 -0800 (PST) Original-Received: from [147.2.147.24] ([203.192.156.9]) by smtp.gmail.com with ESMTPSA id 87sm6339328pfq.93.2016.02.17.21.04.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Feb 2016 21:04:43 -0800 (PST) In-Reply-To: <20160215221723.240e4fa6@openmailbox.org> X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::232 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12419 Archived-At: I'm glad to see a new language implemented on Guile! IMO, the language project could be out of Guile core, and it's easier to maintain or apply patches. Thanks! On Mon, 2016-02-15 at 22:17 -0600, Eric Bavier wrote: > Hello Guilers, > > And happy birthday Guile! > > I started this project a few weeks ago, and managed to make enough > progress that I thought I'd share it for the potluck. > > Joy is a simple, forth-like, purely functional, concatenative > programming language: > > https://en.wikipedia.org/wiki/Joy_(programming_language) > http://www.latrobe.edu.au/humanities/research/research-projects/past-projects/joy-programming-language > > Attached is a patch to guile master that adds a module/language/joy > directory, with lexer, parser, compiler to tree-il, runtime, and minimal > standard library. This is still a work-in-progress, but you can already > do some fun things: > > $ guile > scheme@(guile-user)> ,L joy > joy@(guile-user)> "/base.joy" include . > joy@(guile-user)> 2 3 + 4 1 . > $1 = (1 4 5) > joy@(guile-user)> DEFINE foo == 2 3 + 4 1 ; bar == + + . > joy@(guile-user)> foo bar . > $2 = (10) > joy@(guile-user)> [1 2 3 4 5 6] [fact] map . > $3 = ((1 2 6 24 120 720)) > joy@(guile-user)> [1 2 3 4 5 6] [fact] map sum . > $4 = (873) > joy@(guile-user)> [1 2 3 4 5 6] [fact 2 /] map . > $5 = ((0 1 3 12 60 360)) > > My interest in Joy came from a search to find a small language whose > minimal base could be implemented as an easily-audited assembly > interpreter, but which has higher-level language capabilities. The > guile implementation sprang out of a desire to get to know the language > a bit more before embarking on the assembly route. Learning more about > Guile's multi-language support has been a real pleasure, and I'd love > to see it/help it grow more. > > Limitations and things yet to do: > > - The compiler and runtime currently do not support "sets" aka bitsets > as a native type like the reference implementation does. > > - String support in the primitives and base library is not complete. I > have been toying with the idea of just compiling strings to > lists-of-chars for easier handling and simplicity of the primitives. > > - REPL: A joy-specific writer would be nice. And better backtraces? > > - Writing more interesting libraries. I had hoped to write a useful > parser-combinator library. > > - Better include-path handling. > > - Distribution: part of Guile, or separate? > > Anyhow, I hope some find this interesting. > > Happy Hacking and happy birthday Guile! > `~Eric Bavier