Coder Social home page Coder Social logo

Installation is broken about calysto_hy HOT 4 OPEN

calysto avatar calysto commented on August 15, 2024
Installation is broken

from calysto_hy.

Comments (4)

actsasgeek avatar actsasgeek commented on August 15, 2024

I've tried to futz with this for an hour (full disclosure, I had only the vaguest idea as to what I was doing). Hy's internals have changed a lot since Calysto Hy's last commit. It's unfortunate because lack of Jupyter support is a deal breaker for using Hy.

from calysto_hy.

paulocesarcuneo avatar paulocesarcuneo commented on August 15, 2024

it appears to be using hy 1.0.X

git clone [email protected]:hylang/hy.git
git checkout 1.0a4
pip install -e .
python3 -m calysto_hy install --user

from calysto_hy.

actsasgeek avatar actsasgeek commented on August 15, 2024

Since none of the Hy Calysto code has been changed in 2 years, I don't think it's using version 1.0.X. When I checked out hy and did a git branch -a there is no 1.0a4 branch listed, just stable and master.

I was able to get it some of it working with by changing:

https://github.com/Calysto/calysto_hy/blob/master/calysto_hy/kernel.py#L136-L146

to:

from hy.reader import read_many
from hy.compiler import hy_eval
...
def do_execute(self, code):
...
            hy_model = read_many(code, filename=filename)
            self.result = hy_eval(hy_model, locals=self.locals)
...

However, there are still issues:

  1. it appears that user defined macros don't work
  2. code completion doesn't work

I was working on code completion when I discovered the macro issue.

I'm not sure how the default completer is working. I just went straight to jedhy. Unfortunately, jedhy has also not been updated in 4-5 years and hy has changed a lot since then. The syntax for require and import are different and deftag was eliminated. Additionally, hy.extra was moved to an external library, hyrule.

(BTW, I am using the git versions of hy and calysto_hy)

from calysto_hy.

actsasgeek avatar actsasgeek commented on August 15, 2024

There is actually a PR for a version that works with 0.24 + but it hasn't been merged. You can install it directly:

 pip install git+https://github.com/fergusq/[email protected] --upgrade

You may need to add --force-reinstall but be careful as that is recursive to all dependencies ☚ī¸ The default code completion works but not jedhy for the reasons described above.

User defined macros still don't (appear?) to work. It's interesting that the test notebook doesn't have any macro definitions in it. There are other reported issues about macros and fixes so maybe something broke again?

from calysto_hy.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.