Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 22:49

    aryairani on hashqualified-name

    support hashqualified args for … (compare)

  • Jan 31 21:55

    aryairani on hashqualified-name

    propagate wip wip on propagate code compiles, started on unhas… and 19 more (compare)

  • Jan 31 21:50

    aryairani on master

    wip Refactored actions cleanup and 1 more (compare)

  • Jan 31 21:50
    aryairani closed #312
  • Jan 31 21:45
    runarorama synchronize #312
  • Jan 31 21:45

    runarorama on actionsrefactor

    cleanup (compare)

  • Jan 31 21:42

    aryairani on hashqualified-name

    autocompleting hash-qualified n… (compare)

  • Jan 31 21:41
    runarorama opened #312
  • Jan 31 21:26

    aryairani on hashqualified-name

    simplified PrettyPrintEnv (compare)

  • Jan 31 21:25

    runarorama on actionsrefactor

    Refactored actions (compare)

  • Jan 31 19:13
  • Jan 31 17:37

    aryairani on remove-req

    problem: The definition below r… (compare)

  • Jan 31 16:57

    aryairani on hashqualified-name

    well, maybe this time. (compare)

  • Jan 31 15:02
    francisdb commented #310
  • Jan 31 14:47
    francisdb edited #311
  • Jan 31 14:44
    francisdb opened #311
  • Jan 31 14:26
    francisdb opened #310
  • Jan 31 14:04
    francisdb opened #309
  • Jan 31 13:47
    aryairani labeled #308
  • Jan 31 13:47
    aryairani labeled #308
sfultong
@sfultong
I suppose you could build a mostly-pure OO language that compiled down to Unison Terms
not sure how you'd handle effects
Odomontois
@Odomontois
in Unison, all values, including functions, are serializable
does that mean unison would have something like distributed garbage collector? How could this be implemented?
Rúnar
@runarorama
@Odomontois I'm not sure what you mean by distributed gc or why we'd need that. Can you elaborate? Serialization is just implemented as a function of type forall a. a -> Bytes. We're hoping to constrain this type later on so we don't lose parametricity.
Odomontois
@Odomontois
Tutorial says you have node-level caching for transmitted data. So I assume you won't allocate boxed data that is referenced by several messages, that were sen't from the same source in different transfer s
So my question is: how would this cache be cleared
And how single node GC will interact with caches on other nodes
Chris Gibbs
@atacratic
@Odomontois do you mean the cache of unison terms, indexed by their hash? I guess a simple strategy of kicking elements out of that cache when they get old would work. It's a different thing to the set of terms that are known in the local codebase. And the term for a given hash is immutable.
Rúnar
@runarorama
The cache is just an LRU list and a hash table. It's cleared by removing the least recently used objects. GC is separate and is a local gc process. At the moment we piggy-back on Haskell's garbage collector.
There's not going to be any interaction at that level between nodes.
i.e. Unison does not implement a distributed memory other than that hashes are an address into a kind of "global virtual memory"
Type propagation stuff sounds familiar, but would like to know more - is it that each http route handler is treated like its own program? What about state that persists between requests? Error rail sounds cool - would be interesting to compare with Abort ability.
Chris Gibbs
@atacratic
Interesting to think about what the Dark partial type propagation stuff would look like in unison: categorize todos for a patch by which connected component of the term graph they're in; stop and run your program after propagating only through one component.
Chris Gibbs
@atacratic
I guess the 'error rail' is a bit like implicitly inserting
...inserting Optional a ->{Abort} a conversions.
Paul Chiusano
@pchiusano
@atacratic just noticed, prettyprinter inserts () and Pair imports, but I think those probably aren’t needed as the parser converts tuple syntax directly to them… Pair constructor might sometimes be used directly but I’d say a simple fix is to just always use that qualified
Paul Chiusano
@pchiusano
re: type propagation, in Unison, you aren’t forced to propagate a change to “your whole codebase” before you can run anything… only to the dependents you actually want to run :) This comes more or less for free with the codebase model we have.
Chris Gibbs
@atacratic
@pchiusano thing 1: ha, ok, will do simple fix! Thing 2: awesome! 😁
Paul Chiusano
@pchiusano
@atacratic 😎
Tony Morris
@tonymorris_gitlab
Have you considered using lens on e.g. some parts of the syntax tree?
Paul Chiusano
@pchiusano
@atacratic am excited for this PR adding color to the view output :)
Chris Gibbs
@atacratic
@pchiusano yeah, this one has been very gratifying! 😁
Simon Hafner
@reactormonk
With an algebraic effect system (that's what unison has from what I've read (?)) how do you implement sequence?
Rúnar
@runarorama
with algebraic effects, sequence is id
Rúnar
@runarorama
x : '{State Nat} [()]
x = '[put 10, put 11, put 123]
and traverse is just map
Simon Hafner
@reactormonk
Makes sense.
How do you deal with cases where the ordering of effects matters? E.g. State with ExceptT
Rúnar
@runarorama
Those cases don't exist in Unison. {State s, Error e} means that a program can manipulate state of type s or throw an error of type e at any time.
whereas monad transformers represent monad products, you can think of Unison as having monad coproducts.
Rúnar
@runarorama
So I guess {State s, Error e} is essentially ExceptT e (State s)
Whereas to get the semantics of StateT s (Either e), you'd have to handle a State s into Error e.
Stacy Curl
@stacycurl
How do you compose interpreters ? can you perform partial interpretation, i.e. of a subset of the effects ?
Rúnar
@runarorama
interpreters/handlers are just functions
You can handle a subset of the effects, and even just a subset of the constructors of a given effect
so like you could handle State gets, but leave puts alone
Stacy Curl
@stacycurl

ZIO has something similar but it’s implemented (last time I lurked) by deferring until all effects have been handled, you can’t observe anything interesting about a partially evaluated effect type.

I think internally something like `ZIO[State with Error, A].contramap[State](state => state with error): ZIO[State] is happening.

Simon Hafner
@reactormonk
So algebraic effects are more like imperative programming with guard from arbitrary effects via function tags?
... in terms of side effects. Still got immutable structures etc. by default
Rúnar
@runarorama
algebraic effects are semantically like free monads or tagless final monad coproducts or the like
syntactically they're like imperative programming with function tags
you can think of Unison's "abilities" as being syntactic sugar for a free monad coproduct
Arya Irani
@aryairani
... and in that Slack, we've released an alpha version of Unison to whoever's interested! Come check it out.
Bruno Berisso
@BrunoBerisso

Hi everyone

I'm starting to play around with unison but I'm a bit lost... Is there some docs about the REPL? I was able to get it running without problems but I'm not sure what it does, looking at the commands it doesn't seems to be a "normal" REPL

Maybe I'm missing some of the docs? Is there a basic example-like tuotorial to get something going quickly?
Thanks

Paul Chiusano
@pchiusano
Hi @BrunoBerisso we are moving discussion over to Slack, join link is tiny.cc/unisonslack and if you join the #alphatesting channel there we've got link to documentation for getting started that covers all this! :)
Bruno Berisso
@BrunoBerisso
Awesome thanks
Paul Chiusano
@pchiusano
👍