unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Jesse Gibbons <jgibbons2357@gmail.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 42456@debbugs.gnu.org, Brett Gilio <brettg@gnu.org>
Subject: [bug#42456] [PATCH] gnu: Rename python-hy to hy.
Date: Mon, 27 Jul 2020 17:05:43 -0600	[thread overview]
Message-ID: <d6d5bf12-7bbf-c5e0-ffb2-56c7da89bc7f@gmail.com> (raw)
In-Reply-To: <CAJ3okZ12ycS30TNoCN6hUemRoj+SG4pZqkZzW9EMDzCS9GW-hQ@mail.gmail.com>

It seems you understand a lot more about Hy than I do (I've never 
actually built a Hy app in my life, and I despise python (hence the 
interest in Hy)), so I have some questions. I'm trying to clear up some 
of my confusion.

On 7/27/20 8:40 AM, zimoun wrote:
> Hy uses the Python VM.  Basically, the Hy Lisp is transformed into an
> AST (from ast import *) i.e. Python internals then evaluated using the
> Python VM (CPython or PyPy).
> Other said, any Hy code compiles to Python (and vice versa :-)).

What about Hy macros? According to 
https://docs.hylang.org/en/stable/language/api.html#require they make no 
changes to the program when imported with require. If I write a Hy 
library with nothing but useful macros, will python be able to use that?

When I call Hy2py on a Hy file with nothing but the sample macro at 
https://docs.hylang.org/en/stable/language/api.html#defmacro it gives an 
error. Is this expected, or is this a guix-related bug? If this is 
expected, then I think Hy macros are significantly more useful to Hy 
than to python without the ast library, and if you want to use Hy macros 
for parts of a python app you might as well use Hy.

> I do not think it makes sense having 'hy-build-system' because Hy uses
> all the Python machinery, not to say Hy is simply Python with
> parenthensis. ;-)
As I mentioned, hy-build-system would just make things a little more 
convenient. Programs written even partially in Hy will require the Hy 
package, but I wouldn't bother hacking a new build system together 
unless there are other things required for all Hy packages. Do such 
things exist? If not, I will let it go.
> Other said, Python code can import Hy code, and vice versa, and not
> because there is "bindings" but because it is the same AST
> representation.
>
> Last, I am not convinced that Hy deserves a rename since it is another
> Python flavor.  Well, similarly than python-on-guile which is in
> gnu/packages/guile-xyz.scm
>
>
> Cheers,
> simon

Similar things can be said of Clojure. Clojure is compiled into Java 
bytecode, then run on the Java VM. Java programs can run Clojure code, 
and vice versa. And just like Clojure and Java, Hy and Python have very 
different grammar and are therefore not the same language. Yet Clojure 
is not packaged as java-clojure.

Though inconsistencies in naming conventions tend to bother me, I 
personally am indifferent about what Hy is named. As the saying goes, "A 
cactus by any other name would pop all the balloons you throw at it that 
don't completely miss it." (Or something like that.) I only submitted 
the patch because I had renamed python-hy to hy in my personal channel a 
while ago, and the people on the IRC suggested I should send the change 
as a patch when I mentioned it there recently. So if my patch is 
accepted is up to those who are more familiar with Hy and Guix than I 
am. I think the only time it will matter to me is if I am the first to 
submit a package that requires Hy, since such a package will be written 
for my channel and my channel won't be adjusted by then to build a 
package dependent on hy.





  reply	other threads:[~2020-07-27 23:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  6:09 [bug#42456] [PATCH] gnu: Rename python-hy to hy Jesse Gibbons
2020-07-21 19:26 ` Jesse Gibbons
2020-07-25  1:13   ` Brett Gilio
2020-07-25 15:44     ` Jesse Gibbons
2020-07-27 14:40       ` zimoun
2020-07-27 23:05         ` Jesse Gibbons [this message]
2020-07-28  2:17           ` zimoun
2020-07-28  4:50             ` Jesse Gibbons
2020-07-28  9:51               ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6d5bf12-7bbf-c5e0-ffb2-56c7da89bc7f@gmail.com \
    --to=jgibbons2357@gmail.com \
    --cc=42456@debbugs.gnu.org \
    --cc=brettg@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).