by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    vyzo
    @vyzo
    alright, here is #531
    now it should work reliably
    check out this example:
    (begin-amb-random (let ((x (amb 1 2 3)) (y (amb 1 2 3))) (required (> x y)) (all-of (cons x y))))
    it's very declarative
    Jason Felice
    @eraserhd
    ok, building now
    vyzo
    @vyzo
    also note that thanks to begin-amb and the use of parameters we can have nested ambs very easily
    which is not possible in chicken, because they use global variable mutation to track continuations
    Jason Felice
    @eraserhd
    that is very nice
    vyzo
    @vyzo
    plus multiple threads doing ambs at the same time
    don't try that in chicken :)
    vyzo
    @vyzo
    Actually I think I should use amb-end in one-of as well
    it's really nice that we have the second parameter
    Jason Felice
    @eraserhd
    still building... so how does emacs detect that a file is gerbil instead of scheme?
    Do you configure emacs so that all .ss files are gerbil?
    amb-collect is working for me (except, of course, that I'll need to handle the no-values case)
    vyzo
    @vyzo
    I am also exporting the exception predicate now
    will push shortly
    updating the documentation
    so that you can catch the exception
    and do something meaningful in the no values case
    alright, pushed
    is it just me or is github acting up for everyone today?
    so for the emacs detection
    vyzo
    @vyzo
    1) I have set .ss files to default to gerbil mode
    2) I also use the modline, all gerbil code has -*- Gerbil -*- in it
    so handling the no values case:
    (try do-some-amb-stuff-and-collect (catch (amb-exhausted? e) []))
    vyzo
    @vyzo
    also note that all-of still works outside the amb expression
    this works:
    (begin-amb-random (all-of (let ((x (amb 1 2 3)) (y (amb 1 2 3))) (required (> x y)) (cons x y))))
    so we are backwards compatible
    and if the constraint is not satisfied, it will return the empty list
    vyzo
    @vyzo
    alright, merged
    vyzo
    @vyzo
    and I am off to bed
    night fellas!
    François-René Rideau
    @fare
    I would like two infix operators so I can wrap a form on the left or right within another form.
    e.g. x #> y(y x) and f #< x(f x) or some such
    looking at the srfi 1 thing... there might be an issue with wrong dependencies in the spec
    François-René Rideau
    @fare
    oops, I forgot some srfi/ prefixes in extra dependency paths
    François-René Rideau
    @fare
    ^ fixed in #532
    vyzo
    @vyzo
    ah, that explains it
    vyzo
    @vyzo
    so for the infix operators, they have to be supported by the reader first and foremost
    Jeffrey M. Young
    @doyougnu
    @fare I got it working, I was tyring to get a local build of gerbil to run in nix-shell, like nix-shell shell.nix --run "cd src && ./build.sh" not a build from nixpkgs or your branch. I got it working thanks to @thibran.
    François-René Rideau
    @fare
    If the wiki page is incomplete or unclear, please update it. I also accept patches to the scripts in gerbil-utils.
    Oberheim
    @ober
    is there a libnix.so?
    as a form to link to it in gerbil, and provide an alternative to guixsd :P
    François-René Rideau
    @fare
    Not so far as I know. Could be a fun project.
    Oberheim
    @ober
    given it's popularity, and providing a scheme that is better as well
    François-René Rideau
    @fare
    hi