hylang / hy Goto Github PK
View Code? Open in Web Editor NEWA dialect of Lisp that's embedded in Python
Home Page: http://hylang.org
License: Other
A dialect of Lisp that's embedded in Python
Home Page: http://hylang.org
License: Other
Impl that
See if we can integrate rpython into hy off processed asts
Impl that
We need two things added to the docs:
Also, the README should point to the docs on rtfd.
for stuff like files or context managed functions
(with foo
(baz))
to
with foo:
baz()
or something. also with-as
or something:
(with-as foo e
(baz-with-e e))
to
with foo as e:
baz_with_e(e)
I've just droped py2.6 from travis and tox because I added importlib (I was concerned about import not picking up my pep302 import shims, because I want to move macros to .hy files)
I think this'll just require adding importlib to the tox / travis setup, but it will raise an Exception for non-py2.6 installs, which means we can't set it globally.
@jonathanmarvens want to give it a go?
Duct macros
Blocked by #51
(Syntax requires that we're in a quoted form)
Allow for stuff like
(quote (foo (unquote bar)))
which aught to return
HyExpression([HySymbol("foo"), bar])
(to allow access of the local scope)
for the repl
(fn []
(do (print "Foo")))
breaks
Srsly
So we can write (try (catch) (else))
Stuff like:
((fn [x] (* x x) 2)
Should work. The issue with the current implementation:
Module(body=[Expr(value=Call(func=FunctionDef(name='_hy_anon_fn_1', args=arguments(args=[Name(id='x', ctx=Param())], vararg=None, kwarg=None, defaults=[]), body=[Return(value=BinOp(left=Name(id='x', ctx=Load()), op=Mult(), right=Name(id='x', ctx=Load())))], decorator_list=[]), args=[Num(n=2)], keywords=[], starargs=None, kwargs=None))])
Which, of course, will TypeError
on us.
We need to do (basically) the following:
(fn [x] (* x x)) ; where fn is called by internal name _hy_anon_fn_00001 or so
(_hy_anon_fn_00001 2)
which requires we "hoist" something from inside a statement out and above the current expression.
Very sucky. Blocking lots of work.
So we can write (try (catch) (finally)).
(defn foo [x]
(for [x y]
(yield y)))
turns into
def foo(x):
for x in y:
return yield y
Blocked by #50
(need to ensure imports on the fly, perhaps not entirely blocked)
Allow for stuff like
(quote (foo bar))
which aught to return
HyExpression([HySymbol("foo"), HySymbol("bar")])
Impl
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_disassemble.html
A function that returns the implementation-specific representation of a Hy code object to stdout... so that you can see the generated Python AST from the REPL or a script.
Since hy is basically creating an AST from scratch, it should be fairly easy to leverage something along the lines of https://pypi.python.org/pypi/astoptimizer to trim it along the way.
Of course, this should be made unpluggable, as manipulating the generated AST could impact debugging.
(ticket name courtesy of @paultag)
it'd be really useful to have hytests
Coverage sux
Sux now
lucky for us, it's fairly well tested.
Let's see if we can swap it out to help with maintainability. If parsley isn't good, poke @twneale about tater
r e p l
Fix it
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.