Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Greg Pfeil
    @sellout
    Alright, so I don’t understand how to implement Operator[S, O].arity(op: O): Arity[S].
    Because (I think) I want to stay agnostic about S at this point. I.e., if I’m using this operator alone, I can use Unit, since it’s single-sorted, right?
    But if someone else wants to use this operator in some larger ABT that contains this as one sort among others, then some other type for S is useful. No?
    Emrys Ingersoll
    @wemrysi
    @sellout I should have a PR shortly for updating scala-abt to scalaz-7.2.x which cleans up all the monadtrans types quite a bit
    @sellout Regarding Operator I'm still a bit fuzzy on this as it has been 6-7months since I last looked at it, but wouldn't you just create another instance of Operator for the same O with a different sort if it was used in some larger ABT?
    Greg Pfeil
    @sellout
    @wemrysi You could, but then you’re duplicating the work that pulls the Vector[Valence[S]] part out of Operator. I think the part that gets the Valences and the part that gets the sort for the current node should be different type classes. Then you only implement the sort part for each ABT that the particular type is going to be a sort for.
    Greg Pfeil
    @sellout
    For context, I happened to implement my O as a pattern functor with the Valence as the carrier. I.e., Foo[Valence[S]]. So the one half of arity is just foo.toList. And that is happily S agnostic.
    Emrys Ingersoll
    @wemrysi
    Any idea if that will always be the case? i.e. you have a version with is sort-agnostic, but will all versions necessarily be?
    Greg Pfeil
    @sellout
    You mean will Os created by other people be sort-agnostic? I don’t think necessarily.
    And maybe I’m wrong to think mine even is. I haven’t looked at this stuff in a year, either :/ I’m trying to write up an test/example for the repo.
    Emrys Ingersoll
    @wemrysi
    Yes, sorry. I guess I'm just wondering if some implementation helpers for Operator that allow reuse in cases like yours would be an alternative to separate type-classes? Not sure if one is better or not.
    Greg Pfeil
    @sellout
    @wemrysi We don’t have anything like the ast structure in dml-typed-abts, yet, right?
    Greg Pfeil
    @sellout
    @jonsterling General ABT question, because I feel like I have an odd case … We’ve eliminated general Let/Var from QScript, and have a more restricted form that has a single binding, but then has two branches, each of which is expected to refer to that binding exactly once. (This is for representing a join, where the binding is the common history/provenance, and the two branches are the diverging tails that need to be unified).
    So, there are two questions here – two branches referring to the same binding, and then is the exactly-once requirement somehow enforceable?
    Greg Pfeil
    @sellout
    I guess I have to set up the Slack bridge for this channel …
    Dave Rostron
    @drostron
    Appears so
    Alexandr M.
    @disfenoid
    Hi everyone, this chat is probably dead, as i see, but maybe someone can provide examples of using scala-abt?
    Greg Pfeil
    @sellout
    Calling @wemrysi