Coder Social home page Coder Social logo

adderall's People

Contributors

algernon avatar brandonwillard avatar niitsuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adderall's Issues

Rename and move from algernon/adderall to hylang/loghyc

The name adderall was a good idea way back when, but the name does have a bit of a stigma, and sends bad vibes. For this reason, @brandonwillard and I came to the conclusion that renaming the library to loghyc would be in order.

We'll keep a compatibility layer of sorts for a short while, so old imports will still work, but eventually, those will be removed, and the old name will fade away into the deep pits of git history.

Error on import

After a fresh install of adderall I get the following error at the REPL after importing everything from adderall.dsl as per the example in the README

=> (import [adderall.dsl [*]])
Traceback (most recent call last):
  File "stdin-13d9f4ed2fba76e7292f4eef6fccb574c1d68064", line 1, in <module>
    (import [adderall.dsl [*]])
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.7/site-packages/adderall/internal.hy", line 26, in defmacro_alias
    (.append ret
hy.errors.HyMacroExpansionError:
  File "/usr/local/lib/python3.7/site-packages/adderall/dsl.hy", line 96
    (defmacro-alias [run1 run¹] [vars &rest args]
  "Return a single result from `run` (i.e. `n` set to `1`).

See `run`."
  `(first (run 1 ~vars ~@args)))
    ^
expanding macro defmacro-alias
  AttributeError: 'HyExpression' object has no attribute 'append'

I'm running hy 0.17.0+140.ge6d6a02 and Python 3.7.6 on macOS Mojave 10.14.4.

Cheatsheet for adderall

It would be nice to have a cheatsheet that lists all goals and brief description of them. Currently I'm reading the source / Reasoned Schemer when trying to figure out how to do things.

Add support for else branches in conde and others

In miniKanren, you can write:

(conde
  [(emptyo q) #s]
  (else (somethingo q)))

It would be nice if that syntax would be supported by Adderall too. One way to do that is to define an else function within the context of the macro, that returns [#s (somethingo q)], but that may have unwanted implications, like leaking through to goals.

Another option is to replace the else from within the macro at compile time, but that's a bit harder. Lets evaluate that, and if it is feasible, implement it.

conde is too eager

There is a problem with conde: it is eager, and its arguments get evaluated before the function itself is called, which leads to infinite recursion when we're working with other functions that call themselvs inside a conde, such as listo.

The proper fix here is turning conde into a macro.

drop the toolz dependency

We only use interleave from toolz. We should simply use our own implementation of the function, to reduce our dependencies (and toolz is not packaged for Debian, which was the trigger for this issue...)

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.