sumti Places Requiring Sets: Difference between revisions

From Lojban
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
Line 1: Line 1:


Robin's Palm Writings: Category: misc
{CODE(wrap="1]][[jbocre: 20:31]] <rlpowell> Now, get rid of gismu places that require sets: *fuck* yes.  But only the requirement, not the places.


Navigation: [[Robin's Palm Writings: misc|misc Index]] [[Robin's Palm Writings|Robin's Palm Writings Top-Level Index]]
[[jbocre: 20:33]] <Melvar> Do the places make sense without sets?


; Find the on-disk file associated with a field - #f if none such (meths local to this mooix Scheme interface return #f). Handles parent recursion and mixins.
[[jbocre: 20:33]] <rlpowell> vensa: Also, I *do* try to listen, and respect people's objections and stuff.  :Just be nice, and I'll be nice back.


(define (fieldfile this args)
[[jbocre: 20:34]] <rlpowell> Melvar: They make sense with any distributive group.


; This gets a bit complicated - we walk parents, looking for the file or for an object ref that matches the mixin (if any).  If we find the file, great: compose the dir (which we've been appending things to) and the file, and return that.  If we find the mixin, we walk that object and parents in the same way.  Once we've found the mixin, we do not ever return and try further parents of the original object.
[[jbocre: 20:34]] <Melvar> Exactly.


(define (parent-walk dir file mixin)
[[jbocre: 20:34]] <rlpowell> Which isn't just sets.


(if (file-exists? (make-absolute-pathname dir file]
[[jbocre: 20:34]] <Melvar> What then?


(make-absolute-pathname dir file)
[[jbocre: 20:35]] <rlpowell> In fact, most of them make *way* more sense with loi than lo'i


(let* (
[[jbocre: 20:35]] <Melvar> Huh? Masses, distributive?


(mixin-obj (this (car mixin])
[[jbocre: 20:35]] <rlpowell> Example: kampu: x1 (property - ka) is common/general/universal among members of set x2 (complete set)


(mixin-dir (and mixin-obj (procedure? mixin-obj) (mixin-obj "dir"])
[[jbocre: 20:36]] <rlpowell> Erm, yes?  That's their entire purpose?


)
[[jbocre: 20:36]] <rlpowell> Masses are for "the students surrounded the building".  Use that example as your analogical case and you can't really go wrong.  :)


(if mixin-dir
[[jbocre: 20:36]] <rlpowell> No one student is doing the surrounding.  The *set* of students certainly doesn't surround anything, because sets only have membership and cardinality.


(parent-walk mixin-dir file #f)
[[jbocre: 20:37]] <rlpowell> Lojban calls the non-distributive plural "masses".


(parent-walk (make-absolute-pathname dir "/parent") file mixin)
[[jbocre: 20:38]] == Sxem [[jbocre: ~sky@pool-71-178-129-174.washdc.east.verizon.net]] has quit [[jbocre: Ping timeout: 255 seconds]]


)
[[jbocre: 20:38]] <rlpowell> vensa: ^^ and that's why sets are kind of pointless.


)
[[jbocre: 20:38]] <Melvar> Have you contradicted yourself or am I not understanding something important?


)
[[jbocre: 20:39]] <rlpowell> The *only* attributes sets have are membership and cardinality.  This makes them almost useless to say anything with outside of math.


)
[[jbocre: 20:39]] <rlpowell> Melvar: As far as I know everything I said makes sense; what doesn't make sense to you?


(let* (
[[jbocre: 20:40]] == kpreid [[jbocre: ~kpreid@128.153.22.154]] has quit [[jbocre: Quit: Offline]]


(pbits (decompose-path (car args])
[[jbocre: 20:40]] <Melvar> It seems to me that once you called masses distributive, and another time nondistributive, or else I misassigned a response …


(file (make-pathname "" (second pbits) (third pbits])
[[jbocre: 20:41]] <rlpowell> You're absolutely right.


(mixin (string-match "(.+)_(.+)"  file]
[[jbocre: 20:41]] <rlpowell> < rlpowell> Melvar: They make sense with any distributive group. -- I meant non-distributive.


(dir (this "dir"]
[[jbocre: 20:42]] == jey''' [[jbocre: jey@69.59.129.28]] has joined #lojban


)
[[jbocre: 20:42]] == jeyk [[jbocre: jey@69.59.129.28]] has quit [[jbocre: Remote host closed the connection|Remote host closed the connection]]


(and
[[jbocre: 20:45]] <paldanyli> Why does kampu make more sense with masses than sets?


; If implemented here, return #f immediately
[[jbocre: 20:46]] <rlpowell> paldanyli: Because sets only have cardinality and membership.


(not (this "can" args]
[[jbocre: 20:46]] <rlpowell> They have no other properties.


(or
[[jbocre: 20:47]] <rlpowell> The only thing that's "common" to a set is, I dunno, the most frequent member or something?  It doesn't even really make sense.


; Check for the object itself defining the field - if not, walk up the parents looking for file or mixins to search
[[jbocre: 20:48]] <Melvar> The way I thought of it is that the concept of membership makes a set act as a distributive.


(this "defines" args)
[[jbocre: 20:49]] <paldanyli> It makes sense to me. We're talking about the members, no?


(parent-walk dir mixin)
[[jbocre: 20:49]] <rlpowell> Distributiveness is exactly not-helpful here; that's why you can't do "kampu mi .e do", because that distributes to "kampu mi" and "kampu do"


)
[[jbocre: 20:49]] <rlpowell> Yeah, the idea is it's supposed to be "common among the members of the set", but "among the members of the mass" works just fine too.


)
[[jbocre: 20:49]] <rlpowell> And "common to the mass" also.


)
[[jbocre: 20:50]] <paldanyli> That doesn't make much sense to me. How could something be common in a mass? Perhaps I think of masses differently than everyone else.


)
[[jbocre: 20:51]] <Melvar> Masses don’t have members, do they?


; Returns true if the named method is handled by this mooix Scheme interface or by a file-based method on the object
[[jbocre: 20:51]] <rlpowell> How could they not?


(define (implements this args)
[[jbocre: 20:51]] <Melvar> ∈ is not defined on them.


(or (this "can" args)
[[jbocre: 20:51]] <rlpowell> I mean, if sets have members, I don't see how a mass could possibly not; they're both plural abstractions.


(let [[jbocre: file (this "fieldfile" args|file (this "fieldfile" args]])
[[jbocre: 20:51]] <rlpowell> Umm.  Nothing mathematical is defined on masses; we made them up.


(and file (file-execute-access?  file]
[[jbocre: 20:52]] <paldanyli> Wouldn't be much use if masses didn't have members. But if the purpose is to aggregate their properties, using them to get at their members properties seems strange.


)
[[jbocre: 20:53]] <rlpowell> That's true for sets, too. :)


)
[[jbocre: 20:53]] <paldanyli> Not to aggregate their properties. Just to indicate the membership.


)
[[jbocre: 20:54]] <rlpowell> To me, a mass of something has all of the properties of its members, in proportion to their frequency.  So the mass of rats is mostly X inches long, but somewhat Y inches long.


; Returns true if this object directly defines the field / method in question - no mixins, no inheritance
[[jbocre: 20:54]] <rlpowell> That view is probably idiosyncratic, though.


(define (defines this args)
[[jbocre: 20:54]] == v1d [[jbocre: ~v1d@brsg-4dbbbef9.pool.mediaWays.net]] has quit [[jbocre: Quit: leaving]]


(let* [[jbocre: pbits (decompose-path (car args|pbits (decompose-path (car args]])
[[jbocre: 20:54]] == kpreid [[jbocre: ~kpreid@128.153.178.199]] has joined #lojban


(file (make-pathname (this "dir") (second pbits) (third pbits])
[[jbocre: 20:54]] == mode/#lojban [[jbocre: +o kpreid|+o kpreid]] by ChanServ


)
[[jbocre: 20:54]] <paldanyli> That was my view as well. Which is why kampu on masses confuses me.


(file-exists? file)
[[jbocre: 20:55]] <rlpowell> Well, something that is common to all of them is clearly a major part of the mass, yeah?


)
[[jbocre: 20:55]] <Melvar> kampu: p ↦ A ↦ ∀a∈A:p(a)


(define (getfieldtext this args)
[[jbocre: 20:55]] <rlpowell> I can't see most of that, sorry.


(let [[jbocre: file (this "fieldfile" args|file (this "fieldfile" args]])
[[jbocre: 20:56]] <Melvar> Wait a sec.


(and file
[[jbocre: 20:56]] <paldanyli> I don't think there's any reason that masses couldn't serve as sets, but it's not what I think of their purpose as being. It's confusing to me to make a set then "break it apart".


(file-exists? file)
[[jbocre: 20:56]] <paldanyli> Make a mass, rather.


(read-string file]
[[jbocre: 20:56]] <rlpowell> Right, but whether you use a set or a mass there, you're asking about the members, not the set or the mass.


)
[[jbocre: 20:56]] <rlpowell> So I don't see that it matters much.


)
[[jbocre: 20:57]] <paldanyli> Probably not. I can't think of a property of sets that wouldn't apply to masses.


(define (fieldfile-lang this args)
[[jbocre: 20:58]] <rlpowell> And this all is why I wouldn't suggest getting rid of sets; if it's this easy to argue about, it's not clear cut.  :D


(define mooix-langs (string-split [[jbocre: mooix-root "abstract") "language") "languages") "list") "\n"]]
[[jbocre: 20:58]] <Melvar> $kampu: p \mapsto { A \mapsto \forall a \in A : p(a) }$ approximately.


; Walk up the parents using the algorithm at !URL!. Returns an association list keyed on language code with each of the acceptably specific fields. The list has the fiels' complete file names as its data.  "" indicates no lang, just the plain field, which always wins
[[jbocre: 21:01]] == bbyever [[jbocre: c9672f14@gateway/web/freenode/ip.201.103.47.20]] has joined #lojban


(define (walk-parents this field)
[[jbocre: 21:01]] <paldanyli> I suppose the cardinality of a mass of masses would be in question.


(let (
[[jbocre: 21:02]] <paldanyli> Likewise its membership?


(parent (this "parent"]
[[jbocre: 21:03]] == zugzwang1d [[jbocre: ~zugz@193.52.24.4]] has joined #lojban


(entry (lambda (lang) (let [[jbocre: file (this (if (not (equal? lang ""]] (string-join field "." lang) field] (if file (list lang file) (list #f #f])
[[jbocre: 21:03]] <rlpowell> Hadn't thought about it.


(collect (lambda () (alist-delete #f (map (lambda (lang) (entry lang] (mooix-langs]
[[jbocre: 21:04]] == tom''' [[jbocre: ~tom@cpc1-linl7-2-0-cust44.sgyl.cable.virginmedia.com]] has joined #lojban


)
[[jbocre: 21:05]] == tom''' has changed nick to _wtw_


(if parent
[[jbocre: 21:05]] == rossi [[jbocre: ~rossi@HSI-KBW-109-193-128-041.hsi7.kabel-badenwuerttemberg.de]] has joined #lojban


....
[[jbocre: 21:08]] <Melvar> You could say I see sets as enumerable, but not masses.


(
[[jbocre: 21:10]] <rlpowell> Which I think is a valid POV.


)
[[jbocre: 21:10]] <rlpowell> I just don't know if that's how the language works.  :)


)
[[jbocre: 21:10]] == lindar [[jbocre: ~lindarthe@32.174.46.157]] has joined #lojban


)
[[jbocre: 21:11]] <rlpowell> I'd love it if you could summarize all this to the appropriate BPFK page, btw.  Perhaps the gadri one.


(let (
{CODE}
 
(alist (walk-parents this (car args])
 
(ulang [[jbocre: cadr args) "langauge"|cadr args) "langauge"]]
 
)
 
(and
 
; Try the user's lang first - otherwise just take the first one
 
(cadr (assoc (ulang "code") alist]
 
(cadr (car alist]
 
)
 
)
 
)
 
(define dispatch-table
 
("can" can-dispatch)
 
("hybridgetfield" hybridgetfield)
 
("get" get)
 
("fieldfile" fieldfile)
 
("test" test)
 
("implements" implements)
 
("getfieldtext" getfieldtext)
 
("fieldfile-lang" fieldfile-lang)
 
("fieldfile_lang" fieldfile-lang)
 
.!a!nd so on
 
)
 
)

Revision as of 17:14, 4 November 2013

{CODE(wrap="1]]jbocre: 20:31 <rlpowell> Now, get rid of gismu places that require sets: *fuck* yes. But only the requirement, not the places.

jbocre: 20:33 <Melvar> Do the places make sense without sets?

jbocre: 20:33 <rlpowell> vensa: Also, I *do* try to listen, and respect people's objections and stuff.  :) Just be nice, and I'll be nice back.

jbocre: 20:34 <rlpowell> Melvar: They make sense with any distributive group.

jbocre: 20:34 <Melvar> Exactly.

jbocre: 20:34 <rlpowell> Which isn't just sets.

jbocre: 20:34 <Melvar> What then?

jbocre: 20:35 <rlpowell> In fact, most of them make *way* more sense with loi than lo'i

jbocre: 20:35 <Melvar> Huh? Masses, distributive?

jbocre: 20:35 <rlpowell> Example: kampu: x1 (property - ka) is common/general/universal among members of set x2 (complete set)

jbocre: 20:36 <rlpowell> Erm, yes? That's their entire purpose?

jbocre: 20:36 <rlpowell> Masses are for "the students surrounded the building". Use that example as your analogical case and you can't really go wrong.  :)

jbocre: 20:36 <rlpowell> No one student is doing the surrounding. The *set* of students certainly doesn't surround anything, because sets only have membership and cardinality.

jbocre: 20:37 <rlpowell> Lojban calls the non-distributive plural "masses".

jbocre: 20:38 == Sxem jbocre: ~sky@pool-71-178-129-174.washdc.east.verizon.net has quit jbocre: Ping timeout: 255 seconds

jbocre: 20:38 <rlpowell> vensa: ^^ and that's why sets are kind of pointless.

jbocre: 20:38 <Melvar> Have you contradicted yourself or am I not understanding something important?

jbocre: 20:39 <rlpowell> The *only* attributes sets have are membership and cardinality. This makes them almost useless to say anything with outside of math.

jbocre: 20:39 <rlpowell> Melvar: As far as I know everything I said makes sense; what doesn't make sense to you?

jbocre: 20:40 == kpreid jbocre: ~kpreid@128.153.22.154 has quit jbocre: Quit: Offline

jbocre: 20:40 <Melvar> It seems to me that once you called masses distributive, and another time nondistributive, or else I misassigned a response …

jbocre: 20:41 <rlpowell> You're absolutely right.

jbocre: 20:41 <rlpowell> < rlpowell> Melvar: They make sense with any distributive group. -- I meant non-distributive.

jbocre: 20:42 == jey jbocre: jey@69.59.129.28 has joined #lojban

jbocre: 20:42 == jeyk jbocre: jey@69.59.129.28 has quit Remote host closed the connection

jbocre: 20:45 <paldanyli> Why does kampu make more sense with masses than sets?

jbocre: 20:46 <rlpowell> paldanyli: Because sets only have cardinality and membership.

jbocre: 20:46 <rlpowell> They have no other properties.

jbocre: 20:47 <rlpowell> The only thing that's "common" to a set is, I dunno, the most frequent member or something? It doesn't even really make sense.

jbocre: 20:48 <Melvar> The way I thought of it is that the concept of membership makes a set act as a distributive.

jbocre: 20:49 <paldanyli> It makes sense to me. We're talking about the members, no?

jbocre: 20:49 <rlpowell> Distributiveness is exactly not-helpful here; that's why you can't do "kampu mi .e do", because that distributes to "kampu mi" and "kampu do"

jbocre: 20:49 <rlpowell> Yeah, the idea is it's supposed to be "common among the members of the set", but "among the members of the mass" works just fine too.

jbocre: 20:49 <rlpowell> And "common to the mass" also.

jbocre: 20:50 <paldanyli> That doesn't make much sense to me. How could something be common in a mass? Perhaps I think of masses differently than everyone else.

jbocre: 20:51 <Melvar> Masses don’t have members, do they?

jbocre: 20:51 <rlpowell> How could they not?

jbocre: 20:51 <Melvar> ∈ is not defined on them.

jbocre: 20:51 <rlpowell> I mean, if sets have members, I don't see how a mass could possibly not; they're both plural abstractions.

jbocre: 20:51 <rlpowell> Umm. Nothing mathematical is defined on masses; we made them up.

jbocre: 20:52 <paldanyli> Wouldn't be much use if masses didn't have members. But if the purpose is to aggregate their properties, using them to get at their members properties seems strange.

jbocre: 20:53 <rlpowell> That's true for sets, too. :)

jbocre: 20:53 <paldanyli> Not to aggregate their properties. Just to indicate the membership.

jbocre: 20:54 <rlpowell> To me, a mass of something has all of the properties of its members, in proportion to their frequency. So the mass of rats is mostly X inches long, but somewhat Y inches long.

jbocre: 20:54 <rlpowell> That view is probably idiosyncratic, though.

jbocre: 20:54 == v1d jbocre: ~v1d@brsg-4dbbbef9.pool.mediaWays.net has quit jbocre: Quit: leaving

jbocre: 20:54 == kpreid jbocre: ~kpreid@128.153.178.199 has joined #lojban

jbocre: 20:54 == mode/#lojban +o kpreid by ChanServ

jbocre: 20:54 <paldanyli> That was my view as well. Which is why kampu on masses confuses me.

jbocre: 20:55 <rlpowell> Well, something that is common to all of them is clearly a major part of the mass, yeah?

jbocre: 20:55 <Melvar> kampu: p ↦ A ↦ ∀a∈A:p(a)

jbocre: 20:55 <rlpowell> I can't see most of that, sorry.

jbocre: 20:56 <Melvar> Wait a sec.

jbocre: 20:56 <paldanyli> I don't think there's any reason that masses couldn't serve as sets, but it's not what I think of their purpose as being. It's confusing to me to make a set then "break it apart".

jbocre: 20:56 <paldanyli> Make a mass, rather.

jbocre: 20:56 <rlpowell> Right, but whether you use a set or a mass there, you're asking about the members, not the set or the mass.

jbocre: 20:56 <rlpowell> So I don't see that it matters much.

jbocre: 20:57 <paldanyli> Probably not. I can't think of a property of sets that wouldn't apply to masses.

jbocre: 20:58 <rlpowell> And this all is why I wouldn't suggest getting rid of sets; if it's this easy to argue about, it's not clear cut. :D

jbocre: 20:58 <Melvar> $kampu: p \mapsto { A \mapsto \forall a \in A : p(a) }$ approximately.

jbocre: 21:01 == bbyever jbocre: c9672f14@gateway/web/freenode/ip.201.103.47.20 has joined #lojban

jbocre: 21:01 <paldanyli> I suppose the cardinality of a mass of masses would be in question.

jbocre: 21:02 <paldanyli> Likewise its membership?

jbocre: 21:03 == zugzwang1d jbocre: ~zugz@193.52.24.4 has joined #lojban

jbocre: 21:03 <rlpowell> Hadn't thought about it.

jbocre: 21:04 == tom jbocre: ~tom@cpc1-linl7-2-0-cust44.sgyl.cable.virginmedia.com has joined #lojban

jbocre: 21:05 == tom has changed nick to _wtw_

jbocre: 21:05 == rossi jbocre: ~rossi@HSI-KBW-109-193-128-041.hsi7.kabel-badenwuerttemberg.de has joined #lojban

jbocre: 21:08 <Melvar> You could say I see sets as enumerable, but not masses.

jbocre: 21:10 <rlpowell> Which I think is a valid POV.

jbocre: 21:10 <rlpowell> I just don't know if that's how the language works.  :)

jbocre: 21:10 == lindar jbocre: ~lindarthe@32.174.46.157 has joined #lojban

jbocre: 21:11 <rlpowell> I'd love it if you could summarize all this to the appropriate BPFK page, btw. Perhaps the gadri one.

{CODE}