Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Nesting #3

Open
jez0990 opened this Issue · 5 comments

2 participants

@jez0990
Collaborator

From my email to Dominic:

For me the next priority would then be to ensure that the API is sane for nested
posets, where the set elements are posets themselves.

Hmm, sounds complicated, but I guess I can think of examples of posets
that overlap,
like, you have js files and modules that relate one way, and then the
expressions in the file
can be a poset too... but that is a bit abstract, is there a simpler example?

Your example really isn't that abstract. If a database engine could store posets nicely then your example is no longer a fs use-case and starts to sound very practical for managing code (and navigating around with a ZUI!)

Another similar example would be to manage pure FP modularity within a system. Instead of hard coding functions together (which is effectively an inline hash), the poset dictates the dependencies between its elements and makes swapping API-compatible functions in/out much easier. This approach would then scale to systems of systems of systems...

A final and more tangible but s example could be where you want to built an application for curating a module ecosystem. The modules would be in a poset, tags would be in another poset and curations in a third. To manage the interrelations between these posets you might as well use an "overlay" poset such that the other three are nested as mere elements (modules < tags < curations, modules < curations). This meta relationship describes how the nested posets share sets - e.g. you can curate a module or a tag

@jez0990
Collaborator

More fs-related examples:

  • network shares
  • .ISOs, .ZIPs etc
@dominictarr
Owner

I don't quite understand what you are talking about here. Well, I can't visualize it, I mean.

It sounds like "dependency injection".

Hmm, I think I understand the module curation one. you might say, moduleX > moduleY, but moduleZ doesn't compare - because it's for a different problem. Different people would have created all these different curations,

what sort of operations would you do on nested posets?

@jez0990
Collaborator

Yes! That "FP modularity" thing is most definitely "dependency injection" - hadn't read about that before. It's using posets to dictate the entire progam structure.

Interestingly, I just watched this Mark Miller lecture http://www.youtube.com/watch?v=w9hHHvhZ_HY that Crockford prompted me to look up at the end of his own "monads vs gonads" lecture. It covers highly related concepts but from a distributed security point of view with SES and 'use strict'. I think you'd like it. Except both he and Crockford are talking in terms of promises rather than lazy streams!

Operations on nested posets could be:

  • "execute()" :D
  • "expand" a subposet (so that its elements now appear in place of it, within the poset above) & "collapse" (...the opposite)
  • all of the traversal operations could take a parameter to traverse into to N levels of subposets (and if n is 0 then keep going!)
  • probably a bunch more once things become asynchronous (though I suspect I'll actually have to get around to doing a few PRs before that will happen ;))
@dominictarr
Owner

A promise is much like a lazy stream that only fires once.

Hmm, I think the uses for nested posets will be a lot more clear (for me) once we have experience working with poset apis in multiple contexts.

@jez0990
Collaborator

This is where my vaguely pragmatic thoughts are at, roughly: http://jez0990.iriscouch.com/misc/5eed24b63c5ea69774d5e3df270000c1/subposets.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.