Comments (4)
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.
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.
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:
- it appears that user defined macros don't work
- 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.
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 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)
- Some code does not run HOT 2
- Cannot import name `_compile_table` HOT 12
- Change colors HOT 3
- There are no code autocompletion for object attributes/methods? HOT 3
- ImportError: cannot import name '_hy_macros' HOT 28
- Ipywidgets support HOT 1
- Hylang Test.ipynb - In [32]: Show users how to properly unpack keyword arguments HOT 1
- Cannot open Tutorial notebook in Jupyter HOT 2
- Can't evaluate python from Hy
- macros not working in PR HOT 1
- Function defs don't have return value when multiple expressions in cell HOT 6
- Is it possible to start up kernel with pre loaded hy libraries? HOT 7
- %matplotlib inline does not exist HOT 11
- Tagged release + PyPI upload? HOT 2
- Integrate jedi and jedhy as autocompletion HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calysto_hy.