Skip to content

Add datalog example to RacketScript playground? #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
spdegabrielle opened this issue Nov 17, 2021 · 5 comments
Open

Add datalog example to RacketScript playground? #268

spdegabrielle opened this issue Nov 17, 2021 · 5 comments

Comments

@spdegabrielle
Copy link
Contributor

#lang datalog

ancestor(A, B) :- parent(A, B).
ancestor(A, B) :-
  parent(A, C), ancestor(C, B).
parent(john, douglas).
parent(bob, john).
ancestor(A, B)?
@spdegabrielle
Copy link
Contributor Author

spdegabrielle commented Nov 17, 2021

I saw @samphilips demo of compiling rhombus to RacketScript and I was wondering if examples in other #lang’s are possible?

@stchang
Copy link
Member

stchang commented Nov 17, 2021

Good idea. I can't get it to work because we don't support imaginary numbers at the moment. Though I'm not sure why datalog needs them. Will look into it.

@sorawee
Copy link

sorawee commented Nov 17, 2021

They are from the contract library -- racket/collects/racket/contract/private/generate-base.rkt.

Supposing this problem is fixed, there's still another problem at run-time: TypeError: M3.hash_for_each is not a function in the racket/pretty's compiled module.

@stchang
Copy link
Member

stchang commented Nov 17, 2021

hash-for-each should be easy enough to add.

@stchang
Copy link
Member

stchang commented Nov 19, 2021

I'm also seeing a failure on call to make-semaphore. Does anyone know if contracts are multi-threaded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy