⚡ Sangsakala Proxy 🏠 Home
Skip to content

Add datalog example to RacketScript playground? #268

Open

Description

@spdegabrielle
#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)?

Activity

  1. spdegabrielle commented on Nov 17, 2021

    @spdegabrielle
    ContributorAuthor

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

  2. stchang commented on Nov 17, 2021

    @stchang
    Member

    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.

  3. sorawee commented on Nov 17, 2021

    @sorawee

    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.

  4. stchang commented on Nov 17, 2021

    @stchang
    Member

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

  5. stchang commented on Nov 19, 2021

    @stchang
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions