<stis>(n (u '(7 4 1) (c '(3 5 7))) (u '(1 2) (c '(1 2 4 5))))) <stis>$3 = #<(7 1 2) ⊔ (3 5 4)ᶜ> <stis>(with-lset-operators (c (n (u '(7 4 1) (c '(3 5 7))) (u '(1 2) (c '(1 2 4 5)))))) <stis>scheme@(guile-user) [1]> <mark_weaver>stis: I haven't read the whole backlog, but personally I don't know what "set complement" means without reference to a universal set. <stis>mark_weaver: X-A u X-B = X-(A n B) <stis>so when you take the complement of a you do X-A <stis>and then can algebraically in all set operators finally arrive at <mark_weaver>okay, so X looks like the "universal set" that I was referring to <stis>okey, just to say that you can let X be a variable and dudce that your final expression is <stis>then you can fill in your world interpretation of the final result <stis>so you donot need to define the universe from beforehand <mark_weaver>okay, then you are working not with sets, but with symbolic expressions <stis>so the complemetn is a specially marked object, a struct <mark_weaver>but obviously then you cannot ask questions like "is the complement of set A the empty set" <stis>this is not especially tricky, just that the knowledge that this can be done is missing <stis>the cool thing is to make this work for ordered sets <stis>the you use expresion of the type A u c(B), B-A=B <stis>in stead of just c(B-A) (that would destroy the order information <stis>the example above that I posted is preserving the order in a predictable way <mark_weaver>I'm not familiar with the term "ordered set". usually I hear the terms "total order", "partial order", etc <stis>e.g. X u B defines X is befor B and that applies to both the complement part and the normal set part of X and Y <stis>but just as a product space kind of order, there need not be any cross issues beteen the complemetn part and the normal part of the representation <stis>the posted code is well documented, read it and you will see how it works <stis>an ordered set is a set that is totaly ordered, e.g. <stis>list sets defines a total order on them, srfi-1 does not reserve the order, I needed to create a new version of union. <stis>srfi-1's intersection does indees preserve the order <stis>e.g. in A n B, B just removes the elements in A and does nor reshuffle <mark_weaver>does the SRFI-1 specification require that, or might it simply be an accident of the implementation? <mark_weaver>I suspect that the SRFI-1 set operations are meant to work on (unordered) sets. <mark_weaver>since the word "set" by itself usually implies "unordered" in mathematical discourse <stis>no you are right, better then to define a ordererd set operator in that library <stis>and not use srfi'1 references <stis>er in the code i'm writing directly <stis>he order in which elements appear in the result is the same as they appear in list1 <stis>so lset-intersection is okay <stis>lset-difference is the same. Then fine I just needed to rewrite union <nalaginrut>paroneayea: well, I just added MVC to Artanis, and controller works now *paroneayea rotating between the things he's procrastinating on <nalaginrut>one may pick it up easily if one has already familiar with rails <nalaginrut>but just similar, many things are different from rails ***michel_mno_afk is now known as michel_mno
<lloda>do we have non-capturing groups in (ice-9 regex)? (?:abc) doesn't seem to work. <ijp>lloda: I don't think so <ijp>lloda: iirc the regexp syntax is emacsish, so you probably need to add a tone of backslashes <ijp>i.e. "\\\\(?:abc\\\\)" <lloda>ijp: capturing groups work without backslashes, you need then for literal parens <lloda>web tells me (?: ) is a PCRE feature :-/ <davexunit>someone should make a cool talk about Guile and be a presenter at Strange Loop 2015 ***michel_mno is now known as michel_mno_afk