! Short Notes jaspu needs "credential" datni needs s:du'u:du'u/quote/string of letters or numbers: liste - s/physical object/actual, enumerated list (as opposed to a description of a sequence, which is porsi, or an unenumerated grouping of items, which is cmima)/ - otherwise you can't use liste even for verbal lists! tadji - deserves a rafsi jbovlaste voting in error: mutpaprylu'a, ckulu'a, rejlu'a all usefull, all words for same type off "reference". Is "reference;with author and audience" useful/good? Except do any of them have different place structure anyways? Yes; places of document word should be associated with target. ! General Comments !! Theory Of Minimal-Length Word Use This document attempts to, where possible, develop jvajvo that completely and rigorously match the meaning of various computer terms as viewed by computing experts. As such, many of them are very long (although c.f. German) with baroque place structures. Before you object to this, please understand that they are *mostly not meant to be used*. It is my belief that a Lojban speaker should use whatever word has the place structure needed and does not introduce confusion given the context. There are not going to be very many times where it is necessary to say samterlutselmutpapri instead of se mutpapri. {la'o zoi lojban.org zoi samterlutselmutpapri lu la .lojban. mo li'u .e so'i drata la'o zoi ...paypal.com/... zoi fa'u la'o zoi ...teddyb.org/... zoi lu .e'u ko dunda li'u fa'u lu gubni datni la .camgusmis li'u la'o zoi paypal.com zoi fa'u la'o zoi teddyb.org zoi} is a contrived but reasonable use of samterlutselmutpapri because the whole place structure is being used. In everyday usage, though, things like {la'o zoi ...lojban.org/... zoi cu cinri mutpapri} is much, much more likely. If you only need on place, and inspeficity about the exact nature of the item you're discussing isn't likely to be a problem, use the shortest word that fits! This is especially hard, I expect, for English speakers. English has a ridiculous amount of words, and (much worse) defines "good writing" at least partly in terms of using the most specific word for the job. An English author would almost never say "A attacked B" if A is using a gun; they'd use "shot" instead. This is why my current draft (as of 1 Aug 2006) of {la nicte cadzu} has many instances of {xumjimcelxa'i} that need to be replaced with xarci or gunta. With fu'ivla, some of this doesn't apply, but there the likelyhood of the audience being unfamiliar with the fu'ivla imposes a similar constraint: if a more-well known word that is (at worst) not much longer will do well enough, use it! In summary, I assert that good Lojban writing uses the shortest, (usually) *least* specific word that doesn't introduce confusion, in the same way that good English writing uses the most specific word available. !! About mutpapri xorxes and I have had a long, running discussion over the years about some of these terms, with "web page" at the forefront of our arguments. xorxes has asserted that papri has the place structure we want, that is x1 is a web page in web site x2. I've eventually come to agree, *however*, the actual definition makes papri sound like a physical page specifically, and I can't get past that. If the BPFK wants to tweak the definition to make it mean something more like "document" and less like "page", I'll stop using mutpapri. ! About kliki I consider kliki the wrong word for many English uses of the word "click' in a computer context, because most of them suck in English, too. I don't click on a link when I'm using a text-only browser, for example. However, sometimes click/kliki really is the right term, as when a user is being instructed in the use of a GUI and you really do want to tell the user not just to activate a widget but *how*. Having said that, though, I don't use kliki here for two reasons: (1) I'm unclear on whether it's supposed to be a word for general widget activation (for which I think pilno is fine) or for specifically using the button of a pointing device and (2) I'm rather attached to the gismu algorithm, and am not terribly interested in gismu (experimental or otherwise) that don't use it, except for the Lojban-specific ones of course. ! Document Terms document - mutpapri (papri, with def'n changes) to focus on relation to other, superset works; vreji to focus on work's subject; cukta to focus on auther and audience mutpapri - mucti papri - document - smallest contiguous part of a set of documents, i.e. accessible without doing anything other then changing sensory focus mutpaprylu'a - mutpapri / cukta / vreji pluta - p1 is a [bibliographic] reference / ?? to document p2=mp1 from document p3=mp1 via document(s) p4=mp1 (sequence); (sa'a document- descriptive places start here in all versions) document referenced is part of larger work mp2 -- drop p4 due to relative uselessness? samymutpaprylu'a - skami mutpapri pluta - hyperlink - p1 is a hyperlink / a document reference that can be used by a computer program to find the referenced document ...(as previous) !! Web Terms samterlutmutpapri - skami te pluta mutpapri - web page - mp1=p3 is a web page / document containing hyperlinks in website / collection of hyperlinking documents mp2; links to documents including p2 with links including p3 via web sites includong p4 (use fa'u to associate elements of x3, x4 and x5) samterlutselmutpapri or se samterlutmutpapri - web site ralsamterlutselmutpapri - www - places as se samterlutmutpapri with r2 at the end; r3 is "best known" and "biggest" uebe - short for ralju samterlutselmutpapri uebe mutpapri - web page - uebe selmutpapri - web site - url - judri fi le uebe pilno le ti/dei samymutpaprylu'a - click a link/click here - pilno le ti pluta (short) surf to / go to url - catlu le .uebe se judri be la'o zoi ... Zoi surf / browse - kalsa catlu le .uebe !!! Web Application Terms search - sisku - x2 can be used to indicate what property the search is over, for example a text widget labelled "sisku lo ka ma cmene kei lo mutpapri" for searching page names OK / Continue / Cancel / Quit - see the WIMP section; for web applications sich as forum, the jmina forms are often correct Post (forum or similar) - jmina / co'u jmina ! Sessions logged in/on - ca'o se jaspu le skami vreji (be le du'u le se jaspu cu jarco lo ka djuno le drani se mipri) (vreji in RAM counts!) le samru'e lo nu pilno / galfi le skami login - co'a se jaspu logout - co'u se jaspu session - lo za'i se jaspu ! Hardware memory - sorcu le datni RAM - zasni sorcu le datni - keyboard - lerfu cupra tutci / lerpratci (jbovlaste has lercu'aca'a, which is fine, but I like this better) - t1=c1 is a keyboard / letter data entry device (most general) for producing letters / glyphs including c2=l1 by process c3 (t2 is subsumed by the definitipn and the x2 and x3 places, l2 and l3 are per lerfu and hence dropped) mouse / trackball / touchpad / pointing device - skami cuxna tutci / samcu'atci ? - t1 is a pointing device (most general) / computerised tool allowing agent c1 to choose widget / item c2 amongst widgets / items c3 on computer s1 which has purpose s2 left / right mouse button - samcuhatci zunle / pritu bo batke ! WIMP/GUI !! jvinu I might be taking a bit of liberty with the x3 of jvinu here; "point of view" is, after all, a bit fuzzy. If it bothers people, a more specific idea of containment could probably be made with jvinu + nenri. !! Words window - jvinu /samji'u - j1 is a window / dialogue box / computerized display / etc for data j2 on / in / contained by display area / desktop j3 with window generated by / running on computer s1 and display area generated by / running on computer s1 (s2 dropped because it is per-computer) desktop - ralju te samji'u - conceptually outer-most display area widget / button / menu item / etc - cabra / samymutca'a - c1=m1 is a computeruzed virtual / immaterial widget / button / menu item / etc (extremely general) for purpose(s) including c2 used by agent(s) including c3 being generated by computer s1, computer for purpose s2 menu (as a whole) - liste samymutca'a - probably covers some other widgets too; if the distinction is important to you, mail me and I'll figure something out menu (as list of items) - samymutca'a liste / liste lo samymutca'a (po'u [specification]) OK / continue (so many uses!) - .ie / co'u gasnu / diha / diha gasnu / .i'a (most geberal?) / jmina / others? Cancel / Quit - na gasnu / .ie nai / na jmina / fanmo / na ku Pause - deha / deha gasnu click - pilno / batke catke pilno click with left / right mouse button - pilno [le samymutca'a] tahi le nu catke le samcuhatci zunle / pritu bo batke (tahi tuha le zunle batke for short) double click - ze'i re roi batke catke pilno / (left button specifically) ze'i re roi pilno tahi tuha le zunle batke icon - sinxa [be foo] samymutca'a text field - selciska samymutca'a ! Text straight line / column / row of text - lerlihi - li1 is a line of letters / glyphs including li2=le1 (quote or list / set of lerfu) (other places of lerfu are per-lerfu and so dropped) line / row of text - pinta lerlihi column of text - sraji lerlihi delete - vimcu le pritu lerfu backspace - vimcu le zunle lerfu text editor - lerfu mutpapri galfi samtci word processor - selciska galfi samtci ! Miscellaneous log / activity log - plivei (NB: xorxes has used this for "log in", with which I utterly disagree) - v1 is a log / usage log / record of usage events including v2 (nu/qoute/du'u) which is a record of v3=p1's usage of resource p2 for purpose p3 (often unknown / not recorded in a usage log) recorded in medium v4 (v4 moved to the end on account of relative uselessness; x2-5 can be assoicated unsing fa'u of there's more than one of each, otherswise each is a non-complete description by default) sysadmin - skami jitro interface / user interface - pilno tadji / plitadji - t1 is an interface / method for p1 to use p2 for purpose p3 under conditions t3 (t2 subsumed by the pilno places, t3 last due to uselessness) GUI - pixra plitadji CLI - lerfu? plitadji ! Use Cases * double left click on the word processor icon, open the File menu and select "New File". ** ze'i re roi pilno le sinxa be le selciska galfi samtci tahi tuha le zunle batke .i ba bo pilno le cabra liste po'u la vreji / la'o zoi File zoi gi'e ba bo pilno le cabra po'u la cnino vreji / la'o zoi New File zoi * Surf to www.foo.com and enter your name in the "new user" text field, then click on "continue" ** catlu le .uebe se judri be laho zoi www.foo.com zoi gihe ciska le do cmene le selciska cabra po'u la cnino pilno / la'o zoi New User zoi gi'e pilno la jmina / laho zoi Continue zoi noi cabra ! ToDO monitor, screen, crash, reboot, power on, save, file, directory, screen capture, operating system, trackpad, trackball, cursor, domain, host, spam, account, cut & paste, highlight, back button, drag, install, enter text, header, footer, frame, numbered list, font, page layout, print, paper sizes, trash, delete, undelete, - --------------------------------------------------------------------- Computer Terms ; list->assoc Math Notes Math - The RPN Nesting Problem Math ; mooix root ; mooix TODO ; mooix ; mooix2 ; mooix 3 - --------------------------------------------------------------------- (define (list->assoc lis) (cond ;((and (proper-list? lis) (> (length lis) 2)) ((and (pair? lis) (> (length lis) 2)) (cons (list (car lis) (cadr lis)) (list->assoc (cddr lis))) ) ;((and (proper-list? lis) (= (length lis) 2)) ((and (pair? lis) (= (length lis) 2)) (list lis) ) (else lis) ) ) - --------------------------------------------------------------------- -GOAL: show examples in similar style for logic and other notations -replace mekso with bridi, but need some things -need a NU for math -use ca'e? for output, as opposed to symbols?: li pa su'i pa du li re = li? ni'ai sumji li pa li re du li re == li? sumji be li pa bei li pa du li re - ni + ce'u works, although not with li, but that's probably OK -- kpried doesn't like ni; ni'ai for now - le/lo + se to output place also - lo / le distimction might have interesting side effects? - so: li pa su'i pa du li re == le ni ce'u sumji li pa li re du li re == le sumji be li pa bei li pa du li re - need something else for theorem: su'u seems about right - need something else for symbols. Perhaps steal me'o? Also: le sinxa be lo su'u sumji li pa li pa. Or maybe just use la'e lu...li'u? -la'a expand li to include selbri - would probably need a terminator -not sure it buys us anything exvcept syllables - how deal with leading args? "li re sumji li pa li pa"? "li li re sumji"? -nesting, either with be or ni'ai: li pa su'i vei pa su'i pa du li ci = li ni'ai li pa ziljmina li ni'ai li pa ziljmina li pa kei ca'e du li ci = li te ziljmina be li pa bei li te ziljmina be li pa bei li pa du li ci -gets a bit hairy; perhaps better to make li'ai = li ni'ai and ma'e = la'e ni'ai or something -save us nothing over le ni -sumji: le ni sumji li pa le ni sumji li pa li pa -- le sumji be li pa bei le sumji be li pa bei li pa -would want new gismu, la'a also try to grab some single syllable cmavo -vei = li'ai (= le ni), ve'o = vei gi'ai -MOI for function names; fy moi'oi -what else turns things into selbri? -me - will it work here? - should Philosophy -disads: extra syllables. 1? + 1 for each bare number + 2? for each nesting (RPN or not) -adv: less things to memorize; ordering of bridi well understood -mekso fails at goal #1: if you read off a mathematical expression into mekso, you will *not* get the same calculation without a *lot* of effort -RPN is lost here (but see the consumption markers in the RPN notes), because RPN requires a fixed number of arguments, with the number known in advance, but the Lojban RPN implementation has always been a hack, because of the "exactly two arguments" thing. - --------------------------------------------------------------------- -is: mi klama gi'ai nu le do klama gi'ai nu le cabna == le nu mi klama kei le nu do klama kei cabna OR == le nu do klama le nu mi klama kei kei cabna -with regular RPN, this is solved by strict place structure requirements -no Lojban solution has yet presented itself -ex: (3 (1 1 2 +) 4 ((2 5 +) (2 7 3 *) +) *) -hell, just try: 1 7 (2 5 3 +) 4 * -the problem may *always* be insoluble with variable numbers of args... Yeah, pretty sure. Without parens or other tricks, anyways -we could mark how many arguments we're consuming. Parseable? Certainly parseable if we set a finite limit. Getting a bit pointless? -just use the ".i le ni'ai go'i" trick, but that gets complicated with multiple args -argument consumption markers -pretend zilsumji takes inf args, and last arg is always result -(1 2 (3 4 5 +) 6 7)+ 8 + 9 neg + -have words for 0 (gi'ai), 1 (gi'au), 2 (gi'oi) and addt'l (xei), and all (gi'ui) -li pa li re li ci li vo li mu zilsumji gi'oi xei ni'ai le li xa li ze zilsumji gi'ui ni'ai le li bi zilsumji gi'ai ni'ai le li so fatne? gi'au ni'ai le zilsumji gi'oi ni'ai le -seems to work -a bit clumsy, but no worse than 2 args required Old Notes -NU reverser? helps with RPN, also of general utility: mi klama lo nu gi'ai cabna do klama lo nu gi'ai -what it does is "everything preceding goes in the NU just declared" -this allows RPN: li'ai li pa li pa ziljmina li'ai gi'ai li pa ziljmina -li pa li pa selsumji le ni gi'ai li pa selsumji le ni gi'ai -need some clarity in "everything". probably "sentence". jcowan mentioned the gua!spi's version is like .i, which is prbably almost TRT -NU uses subsentence, which is sentence + optional prenex -it gets used in tanru-unit, which seems like it won't work here - terms (or whatever's at the front of sentence) = ... / subsentence LE? tanru-unit(??) NU gi'ai - BOGGLE: could just allow multiple selbri, if 2nd and up start with NU -no, bad lookahead on say "broda nu lo brode" -kpried's gi'ai: -li pa li pa te sumji gi'ai nu'ui le = le nu'ui li ... -li pa li pa te sumji gi'ai le = le sumji be ... (first unfilled place) -broda gau gi'ai lo brode = lo jai gau broda cu brode - --------------------------------------------------------------------- Introduction Through a number of discussions about and extensive attempts to use mekso, I have come to the conclusion that they don't work. ga'i I believe myself to have used non-trivial mekso more than any other Lojbanist to date, so when I say they don't work, I'm speaking from experience. sa'e They don't serve the purposes they were designed for particularily well, and Lojban would be better off without them. I repeat those goals here, from chapter 18 of the reference grammar: Design Goals Of Lojban MEX Its formal design goals include: 1) representing all the different forms of expression used by mathematicians in their normal modes of writing, so that a reader can unambiguously read off mathematical text as written with minimal effort and expect a listener to understand it; 2) providing a vocabulary of commonly used mathematical terms which can readily be expanded to include newly coined words using the full resources of Lojban; 3) permitting the formulation, both in writing and in speech, of unambiguous mathematical text; 4) encompassing all forms of quantified expression found in natural languages, as well as encouraging greater precision in ordinary language situations than natural languages allow. How Lojban MEX Lives Up To Its Design Goals In fact, it is not fair to say that mekso have failed at all of their design goals, because it's simply not true: goals 2, 3 and 4 are covered excellently by mekso. However, and this is the key point, *we don't need mekso for those goals*. I will now cover each goal briefly in turn: Goal 1 Goal 1 is the total failure point, and the motivation for the essay. It is absolutely not the case that a written equation of any complexity can be turned into mekso with "minimal effort". In fact, I don't think that anyone has ever done it successfully on the first try (i.e. without parse-mandated revisions). Some of this is due to the precedence issue, but I agree with the CLL that fixing that is the wrong solution: whatever we pick will be wrong at least some of the time if our goal is that mekso should act like mathematical symbols. Some of the problem may be lack of familiarity with mekso. The idea of a subset of the language being almost as hard to get comfortable with as the entire rest of the language wouldn't bother me if it had any benefit, but I can't see any except syllable count. Certainly a serious equation written out with mekso bears only a slim relation to the original symbols, so that not a plus. As for syllable count, my tests with non-trivial examples have yet to show even a 30% improvement. Representing different forms of mathematical expression is a place where mekso is ahead os any trivial changes to regular Lojban bridi in one, and only one, respect: Reverse Polish Notation. Whether supporting RPN in a *spoken* language is a good thing or not is, to put it mildly, arguable (when was the last time you heard mathematicians speaking RPN at each other? I've a B.Math and my answer is "Never, except when explaining what RPN is to someone."). In addition, whether mekso *itself* supports RPN in any useful sense is arguable (2 arguments exactly is... sad). None the less, RPN is something bridi math doesn't have, and a possible solution consumes a large portion of this essay. Goal 2 Providing a vocabulary of commonly used mathematical terms is good, and mekso succeeds, but all of the terms and operations mekso has, there are gismu or simple lujvo for. A few more math gismu would be nice, but that's no big deal: gismu space is huge. Certainly incorporating new terms is much easier without the overhead mekso imposes for importing brivla. Goal 3 If we can't formulate unambiguous mathematical texts using bridi, we might as well give up on Lojban now. Goal 4 For Goal 4, the CLL gives a few examples of "folk" numbers and arithmetic. These can all be easily encompassed without resorting to mekso. The Shape Of bridi mekso (Goal 1) For the most part, brime'o work just like you'd expect. For example, "1 + 1 = 2" is "li re sumji li pa li pa". If you want to have something more like an equation, try this: "le sumji be li pa bei li pa cu du li re" (the "cu" really is required ther, but you can put the "du" out front to avoid it). ni'ai The nesting of be/bei/be'o gets a bit confusing after a while, and in some cases wastes syllables. For that reason, I've coined ni'ai as a member of NU to mean something like "x1 is the numerical result of calculation [bridi] under system / interpretation x2". Eimi (other name?) has pointed out that this is identical to an idea that he has had, which is "x1 is the result / value / truth of the first empty / marked place in [bridi] under system / interpretation x2" (my defintion). Basically, "le ni'ai [brivla x2 x3 ...]" == "le bridi be x2 bei x3 ...": it's a transform of le + be/bei/be'o into a NU structure without the be/bei/be'o. I've also been using ce'u as the marker for which place to extract a value from, but I'm pretty sure this is wrong; ce'u seems more like something to be used in function definition, although I've been using xy and so on for that purpose. I think there probably needs to be something that is to output what ce'u is to input, but I'm going to keep using ce'u until someone who isn't as easily confused by ce'u as me takes a look. It is possible that with an output marker, du'u can be shoehorned to this purpose, I'm not sure. So with ni'ai, we get structures like "sumji ny le ni'ai pilji li re li pai li xy" for "n + (2 * pi * x)". As you can see, you spemd some syllables on ni'ai, be/bei/be'o, and li. There's little or no loss due to using brivla, as most (all?) of the mekso operators are 2 syllables. There seem to be about the same number of boi required in both methods. To li Or Not To li Grammatically, in something like "x = t + 2" it is perfectly legal to do either "li xy" for the first part or just "xy". In the first case, we are clearly talking about the variable x. In the second case, we are using the pro-sumti xy to stand in for the variable x. The second case is therefore somewhat ambiguous; many things start with "x". However, in mathematical texts confusion is unlikely to result, so it probably doesn't matter very much, just be aware of it. It sometimes saves some syllables, but not always (I prefer "sumji xy li ty" to "sumji xy boi ty", but that's a stylistic preference). Folk Math (Goal 4) Here it suffices to simply list the CLL examples and perform them with bridi. na'u Obviously, na'u is no problem, since it's for importing selbri. The CLL's example 18.1 is "li na'u tanjo te'u vei pai fe'i re [ve'o] du li ci'i" for "tan(pi/2) = infinity". In bridi math this might be: "le tanjo be le se pilji be li pau bei li re du li ci'i". These are exactly the same number of syllables. ni'e The CLL's example 18.2 is "li ni'e ni clani [te'u] pi'i ni'e ni ganra [te'u] pi'i ni'e ni condi te'u du li ni'e ni canlu" which is "Length ? Width ? Depth = Volume". A bridi math version, pretending we know what "ni" means and that we have an infinite argument pilji: "le ni'ai pilji le ni clani kei le ni ganra kei le ni condi cu du le ni canlu". There's a clear savings with bridi math here; the bridi version is 25 syllables, the mekso version 29. mo'e The CLLs example 18.3 is "li mo'e re ratcu su'i mo'e re ractu du li mo'e vo danlu" which is "2 rats + 2 rabbits = 4 animals", which is just "re ratcu re ractu cu te sumji vo danlu". Again, bridi math wins: 13 vs. 20. mo'e The CLL's example 18.4 is "mi viska vei mo'e lo'e lanzu ve'o cinfo", or "I see a pride of lions." Pretending I know what the x1 of klani means, that's "mi viska le cinfo poi klani lo'e lanzu". Odds And Ends There are a few other issues that need to be covered. Mathematical functions can be written out using me, so "f(x) + 1" is "sumji li pa le me fy be xy" or "sumji li pa le ni'ai me fy li xy" or similar. We need a way to represent functions as ideas rather than calculations, although we might not make the distinction very often. I suggest si'o for this purpose: "le si'o sumji li pa li pa" is "(the formula / the idea of) one plus one", "le ni'ai sumji li pa li pa" is "two", loosely speaking. We also need a way to talk about the symbols and words themselves. For the time being, la'e lu ... li'u will do nicely, although a NU might be nice. It's also possible that "se du'u [math]" is correct, but I'd like others' opinion on that. Combining these we have "zoi zoi 1 + 1 zoi poi se fanva fu la'e lu sumji li pa li pa li'u poi panra le si'o sumji li pa li pa cu sinxa le ni'ai sumji li pa li pa kei ku? po'u li re". I have no idea what, if any, difference lo vs. le makes in front of ni'ai. Suggestions welcome. RPN Issues Note: The solution for RPN I propose below is not in any way limited to math; it's a general afterthought NU system. Whether that's a good idea or not is debatable. Reverse Polish Notation is also know as postfix, and looks like this (assuming binary + and using "," to seperate arguments): "1,2+3+" for "1 + 2 + 3". RPN is the one major capability that mekso has that bridi math doesn't. It's worth noting that mekso's RPN is rather half-assed, because all operators have exactly two arguments. Even if it was full-assed, I have yet to talk to anyone who thinks that having RPN in Lojban is important in any way; RPN is for talking to calculators, not people. Therefore, please don't take the fact that I've put a lot of effort into making RPN work in bridi math as any sort of support for the idea of having RPN in the language: I think it sucks, and we should drop it. For those of you who are wondering why anyone would ever bother with RPN at all, the reason is that you never need brackets to indicate nesting. How that works is beyond the scope of this essay; ask wikipedia. Enough preamble. The problem with RPN outside of a calculator is that RPN requires that when we see an operator we pull off the stack exactly as many arguments as that operator requires, but in Lojban bridi skip arguments all the time, so RPN in the normal sense is totally infeasible; this is the reason for the 2 argument (and assiociated null operator and operand) hack in mekso, but that seems rather infeasible in bridi, so I've gone in a different direction. Argument Consumption Markers Instead of limiting the number of arguments (i.e. sumti) we can state how many we want to use. To fully simulate RPN we need to flip ni'ai backwards, to. This looks very, very strange to the practiced Lojbanist, but I belief it to be PEG parseable. "li pa li re te sumji gi'ui ni'ai le li ci se pilji" is "(1 + 2) * ci". The word gi'ui must come after a bridi. It takes two words after it: a NU and a LE. The expression evaluates to a sumti made from the LE, the NU, and the bridi, in that order. In other words: "[bridi] NU LE" == "LE NU [bridi]". Please note that gi'ui and all its friends work with *any* NU, so it is of general utility. If you want to say "I went to the store at the same time as you", but you don't plan the sentence out properly, you might find yourself at "mi klama le zarci" and realizing that you wanted to say "le nu mi ...". In this system you can recover by then saying "gi'ui nu le cabna le nu do klama". The word gi'ui is only one of a small series of words with the same basic purpose. It grabs the preceding bridi, including all arguments before the selbri. To create certain arrangements of nesting, however, we need versions that grab fewer front arguments: 0 (gi'ai), 1 (gi'au), 2 (gi'oi). For more than 2 but less than all, follow gi'oi with xei. For example, "(1 2 (3 4 5)+ 6 7)+ 8+ 9 neg +" (where "neg" is unitary negation) becomes "li pa li re li ci li vo li mu zilsumji gi'oi xei ni'ai le li xa li ze zilsumji gi'ui ni'ai le li bi zilsumji gi'ai ni'ai le li so fatne? gi'au ni'ai le zilsumji gi'oi ni'ai le", where "zilsumji" is defined as "infinite sumji, output last". Clumsy as hell, but it *does* work, and has at least some general (i.e. non-mathematical) utility. Subtraction And Division While I myself am inclined to grab new gismu for subtraction and division, it is possible to use sumji and pilji for this purpose. Please note that, as with all of this essay, we are pretending we have an infinite place version of both. Besides potentially being useful, this mini-proof is a good example of how to think about bridi math. Symbolic Proofs The key insight is that no matter where you put it, the x1 of sumji / pilji is the only special place, in that it's the result of the summation. Therefore, we start with whatever used to be the x1 place on the left of the equals and work until the order matches the SE transform we've created. se pilji x2 = x1 * x3 * x4 * ... x2/x1 = x3 * x4 * ... x1/x2 = 1 / (x3 * x4 * ...) x1 = x2 / (x3 * x4 * ...) x1 = x2 / x3 / x4 / ... @3 te pilji x3 = x1 * x2 * x4 * ... x3/x1 = x2 * x4 * ... x1/x3 = 1 / (x2 * x4 * ...) x1 = x3 / (x2 * x4 * ...) x1 = x3 / x2 / x4 / ... bridi mekso nibli -GOAL: show examples in similar style for logic and other notations -do ex. programming, function definition in particular -would want new gismu, la'a also try to grab some single syllable ra'u le pa moi te gismu be fi zo pilji .o nai zo sumji cu po'o frica lo drata te sumji lo ka ce'u jalge .i se ki'u bo va'o tu'a le cmavo -vei = li'ai (= be zo se le sumti poi pa moi se cau le se zei cmavo cu pa mei zunle zo du .i mi'o galfi te zu'e le sumti porsi cu mapti le se zei cmavo se pilji (pretend we have other word for division?) (is xy re legal?) xy xi re du le ni'ai pilji li xy xi pa li xy xi ci li xy xi vo li'o x2 = x1 * x3 * x4 * ... x2/x1 = x3 * x4 * ... x1/x2 = 1 / (x3 * x4 * ...) x1 = x2 / (x3 * x4 * ...) x1 = x2 / x3 / x4 / ... @3 te pilji x3 = x1 * x2 * x4 * ... x3/x1 = x2 * x4 * ... x1/x3 = 1 / (x2 * x4 * ...) x1 = x3 / (x2 * x4 * ...) x1 = x3 / x2 / x4 / ... Word Issues gismu It is pretty difficult to do bridi math without infinte place pilji and sumji, but that's a pretty minor change. Having gismu for infinite-place subtract and divide is a nice-to-have, just to save syllables and use in lujvo. I'm really unsure what the x1 of klani means. It seems unnecessarily hard, therefore, to say "the number of books on the table is 5" without using quantifiers (or kancu, which is distastefully agentive). Other than that, I haven't found anything that lujvo can't handle. What To Do With mekso cmavo Dump the whole lot, says I. That is, make them available for re-use. As far as I know, only Nick Nicholas and I have ever seriously used them, and neither of us have used them very much. In particular, it would be awfully nice for bridi math if we could use vei for "le ni'ai". I've also thought that ve'o for "gi'ui le ni'ai" would make RPN more useful, but that has some issues in itself. Examples Of bridi math The dots are syllable counts; I push the button for each syllable as I read. -GOAL: show examples in similar style for logic and other notations -do ex. programming, function definition in particular Vocabulary -plus or minus: absolute value: nacnilbra -subset: klesi -expected: mathematical expextation is tricky, because the expected value of a fair die roll is 1 + ... 6 / 6 = 3.5, which appears on no die, so kanpe is right out. It's really the average across possible outcomes. Something with cnano to make it "average" in this sense ("mean"?) should do nicely. -mean: selpi'ina'o: c1=sp1 is the mean / numeric average obtained by adding up and dividing the total by the count of members in set c3 -- c2 is "numeric", c4 is the standard mean calculation; selpilji is in there descriptively and so the other places are lost -median: mijna'o: c1=m1 is the median value / numeric value in set c3=m2 such that an equal number of set elements are >= it and <= it. -expected value: selpi'ina'o le cumki [ni'ai ], assuming ni'ai means something like "mathematical result of calculation..." - Example 1: Sigma Summation Semi-Symbolic f( 1 , 2 ) = sum from 1 to 5 of g of x, pretending there's no si'i (or could use whatever the mult sum is) bridi mekso le ni'ai me fy li pa li re du vei kupsumji le ni'ai me gy boi xy kei li pa li mu Old mekso li ma'o fy boi pa boi re du li na'u kupsumji vei ma'o gy boi xy ve'o pa boi mu Example 2: Set Theory Semi-Symbolic A inter B subs A subs A union B bridi mekso This is very likely how one would do this with old mekso, too. .a bu ku'a by cu klesi .a bu .i ri klesi .a bu jo'e by Example 3: Quadratic Formula Semi-Symbolic Iff ax2 + bx + c = 0, then x = ( -b ? sqrt(b2 - 4ac) ) / 2a bridi mekso go le ni'ai sumji cy le pilji be by bei xy le pilji be .a bu bei le tenfa be xy bei li re du li no gi xy du le ni'ai te pilji le pilji be li re bei .a bu le sumji be li ni'u by bei le ni'ai li re te tenfa ce'u le ni'ai se sumji le tenfa be by bei li re le pilji be li vo bei .a bu bei cy -- inf pilji/sumji, ordered for length .............................................................................................. Old mekso go li .abu bi'epi'i vei xy. te'a re ve'o su'i by. bi'epi'i xy. su'i cy. du li no gi li xy. du li vei va'a by. ku'e su'i ja vu'u fe'a vei by. bi'ete'a re vu'u vo bi'epi'i .abu bi'epi'i cy. ve'o [ku'e] ve'o fe'i re bi'epi'i .abu -- trying to preserve form ................................................................................. Example 4: From Feymnan (sp?) Semi-Symbolic r = I(xN)/xN ~= log_2(n)/N = I(N)/N bridi mekso ry du le ni'ai se pilji le me ga'e .i bu bei le pilji be xy bei ga'e ny le pilji be xy bei ga'e ny .i le se go'i cu simsa le ni'ai te pilji ga'e ny le dugri be ny bei li re .i le se go'i du le ni'ai se pilji le me ga'e .i bu be ga'e ny ga'e ny .................................................................................... 84 Old mekso ry du li vei ma'o .i bu boi xy pi'i ga'e ny ve'o vu'u vei xy pi'i ga'e ny .i le se go'i cu simsa li vei de'o re boi ny ve'o vu'u ga'e ny .i le se go'i du li vei ma'o .i bu boi ga'e ny ve'o vu'u ga'e ny -- could almost certainly be syllabically optimized ............................................................................. 77 bridi mekso With Magic vei ry du vei se pilji vei me ga'e .i bu vei pilji xy boi ga'e ny vei pilji xy boi ga'e ny .i simsa le se go'i vei te pilji ga'e ny vei dugri ny li re .i du le se go'i vei se pilji vei me ga'e .i bu ga'e ny kei ga'e ny -- vei == le ni'ai, no be/bei ...................................................................... 71 - Example 5: From Feynman, Again Semi-Symbolic = N * sigma i=1 to M of (-p_i * log_2(p_i)) -- I is info is message, is expected info Exmaple 6: Still More Feynman Semi-Symbolic f(t) = (1/2pi) * integral -W(v) to W(v) of g(omega) * e^( -2pi * I * omega * t ) d-over omega Example 7: Umm, Tensors, Or Something Semi-Symbolic inner-product( phi_1 t-prod phi_2 , psi_1 t-prod psi_2 ) = in-prod( phi_1 , psi_1 )_1 * in-prod( phi_2 , psi_2 )_2 for all phi_1 , psi_1 elements of H_1 and phi_2 , psi_2 elements of H_2 Example 7: Programming: Scheme Symbolic (define (fib n) (fib-iter 1 0 n)) (define (fib-iter a b count) (if (= count 0) b (fib-iter (+ a b) a (- count 1)))) Example 7: Programming: C Symbolic int fact( int n ) { int result=1; for( i = n; i--; i > 1 ) { result *= i; } return result; } - --------------------------------------------------------------------- (define mooix-root (mooix-obj BUILDTIME-VAR ) ) - --------------------------------------------------------------------- - pass $this in to procs being run by (mooix ...) - I think we get that from the environment? - ; TODO: is dir the right internal data bit?? For mooix-obj - dhould we provide access to dispatch-table items directly? (i.e.without going through a mooix obj) (thus far we don't) - explicate perl booleans -Current bindings (including this one) only allow symlinks to objects (i.e. directories); this seems dumb. Look at the other bindings and see if there's a real problem with symlinks to fields or methods - PERL: fieldfile-lang should collect obj/field info on the way up so it only needs to walk once -- enh; no advantage over recursion I don't think in terms of number of file accesses - PERL: last step of fieldfile-lang is filefile; if we pass the obj back that the field was defined on, fieldfile might be faster. Might as well look at the flag system too; no idea how much fieldfile-lang is contributing to run times, though - rewrite some or all so args is an assoc list; fieldfile-langs for example - --------------------------------------------------------------------- ; To make a mooix file, wrap a single procedure of one argument in (mooix ...). ; mooix coerces the values returned into the correct form. It accepts the following return values: ; A number - converted to a string ; A string - left alone ; A mooix object reference - converted to its ID string ; A list of any of the above - each element converted, elements seperated by newlines ; ; The first argument passed in by mooix is the mooix object the code is on, the second is the parameters the method was called with, as a list. ; The input parameter code coerces mooix objects and numbers into their Scheme types ; NB: all code that is passed or returns values used as booleans must respect Perl boolean conventions, to wit: FILL IN ; Need to be able to distinguish built-in methods from actual mooix object methods, so need both dispatch and can-dispatch funcs ; dispatch on strings, not idents, since files can start with . and so on (define (mooix code) ; The core bit: get inbound args, pass them to the given code, process the outbound args (process-return (code ; TODO: $this should be passed here (process-args) ) ) ; mooix objects are largely glorified wrappers to dispatch ; TODO: is dir the right internal data bit?? (define (mooix-obj dir) (letrec ((this ; NB: we use "this" in this def'n; I believe this to be legal due to the lambda, but not sure until actually run (lambda (method . args) ; base data selectors (cond ((string=? method "dir") dir) (else (dispatch this method args)) ) ))) this ) ) (define (dispatch this method args) (display ("In dispatch: " (this "dir") method args) (current-error-port)) (cond ; built-in methods ((assoc method dispatch-table) => (lambda (meth) (meth this args))) ; file methods/fields (else (file-dispatch this method args)) ) ) ; Call on-disk method or retrieve/set field value (define (file-dispatch this method args) (let ((file (this "fieldfile" (list method)))) (if (and file (file-exists? file)) (if (regular-file? file) ; Regular on-disk field or method call (if (file-execute-access? method) (file-field this method args) (file-method this method args) ) ; File is dir or symlink - return associated mooix object (if (and (directory? file) (file-exists? (make-absolute-path file ".mooix"))) ; "file" is mooix dir (mooix-obj file) (if (and (symbolic-link? file) (file-exists? (make-absolute-path (read-symbolic-link file) ".mooix"))) ; "file" is mooix dir (mooix-obj (read-symbolic-link file)) ; Not regular file, not mooix obj - badness (and (display ("Object " (obj "fieldget_lang" "name") " has no regular field or method or mooix object pointer named " file ".") (current-error-port)) #f) ) ) ) ; No such file - might be setting a new field (if (= (length args) 1) (obj "setfield" file (car args)) (and (display ("Object " (obj "fieldget_lang" "name") " has no field or method named " file " at all.") (current-error-port)) #f) ) ) ) ) ; Call a method from a file (define (file-method this method args) (let ((file (this "fieldfile" (list method)))) (let-values ( ((fromport toport pid) ; We pass the empty argument string just to avoid the shell (process file "")) ) (display (scheme->mooix-string this) toport) (display (scheme->mooix-string args) toport) (mooix-string->scheme (read-string from-port)) ) ) ) ; TODO: inline this? (define (process-return list) (scheme->mooix-string list) ) ; TODO: inline this? (define (process-args) (mooix-string->scheme (read-string)) ) - --------------------------------------------------------------------- ; Convert a list of scheme objects into mooix's string representation ; numbers, strings, mooix objects, ?? are OK (define (scheme->mooix-string slist) (display ; map the elements of slist into a list of newline-terminated mooix strings, which we then output (map (lambda (x) (cond ((string? x) (string-join x "\n") ((number? x) (string-join (number->string x) "\n") ; If x is a procedure, then either it's a mooix object or an error ((procedure? x) (let ((dir (x "dir"))) (if (directory? dir) (string-join "mooix:" dir "\n") (and (display "Procedure which is not a mooix object not a legal return value." (current-error-port)) #f) ) ) ) ) ) slist ) ) ) ; Convert a mooix string representation to a list of Scheme objects - numbers, strings, mooix-obj, ?? (define (mooix-string->scheme mstring) ; Read all STDIN lines, and map each into a Scheme object, returning the resulting list (map (lambda (x) (let ( (num (string->number x)) (mobj (string-prefix? "mooix:" x))) (cond ((not (equal? num #f)) num ) (mobj (mooix-obj (string-copy x 7) ) ) ; Return all others as strings (else x) ) ) ) (read-string) ) ; Retrieve or set a file-based field (define (file-field this method args) (let ( (num (length args)) (file (this "fieldfile" (list method))) ) ; Behaviour is based on number of arguments; zero means return the file, one means set it, more is an error (cond ((= num 0) (read-string file) ) ((= num 1) (display (car args) (open-output-file file)) ) (else (and (display "Non-method field " method " on object mooix:" (make-absolute-pathname (this "dir")) " passed more than one argument.\n" (current-error-port)) #f)) ) ) ; ********** ; Regular dispatch table methods follow ; ********** ; Returns #t iff the first argument is in the built-in mooix object method list (that is, in dispatch-table), else returns #f (define (can-dispatch this args) (if (equal? #f (assoc (car args) dispatch-table)) #f #t ) ) (define (get this args) (mooix-obj (car args)) ) (define (hybridgetfield this args) (let* ( (field (car args)) (file (this "fieldfile" args)) (dot (string-prefix? "." field)) ; True if not a symlink or dir (reg (regular-file? file)) (exe (file-execute-access? file)) (hybrid (this "test" (list (string-join "." field "-hybrid")))) ) (and file dot reg (or (not exe) (and exe hybrid)) ; NB: this relies on file fields and methods never being able to return #f as *data* - if that changes (and it seems a piss-poor idea to change it) this will need to be looked at again (this (car args)) ) ) ) ; Get the field named and return a boolean based on treating its value as Perl/ C true/false (TODO: empty string, no such file, and 0 are false, else true) (define (test this args) (let ( (file (this "fieldfile" args)) ) (cond ((equal? file "") #f) ((not (file-exists? file)) #f) (else (let* ( (string (this (car args))) (num (string->number string)) ) (cond ((and num (= 1 num)) #t) ((not (equal? string "")) #t) (else #f) ) )) ) ) ) - --------------------------------------------------------------------- ; 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. (define (fieldfile this args) ; 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. (define (parent-walk dir file mixin) (if (file-exists? (make-absolute-pathname dir file)) (make-absolute-pathname dir file) (let* ( (mixin-obj (this (car mixin))) (mixin-dir (and mixin-obj (procedure? mixin-obj) (mixin-obj "dir"))) ) (if mixin-dir (parent-walk mixin-dir file #f) (parent-walk (make-absolute-pathname dir "/parent") file mixin) ) ) ) ) (let* ( (pbits (decompose-path (car args))) (file (make-pathname "" (second pbits) (third pbits))) (mixin (string-match "(.+)_(.+)" file)) (dir (this "dir")) ) (and ; If implemented here, return #f immediately (not (this "can" args)) (or ; Check for the object itself defining the field - if not, walk up the parents looking for file or mixins to search (this "defines" args) (parent-walk dir mixin) ) ) ) ) ; Returns true if the named method is handled by this mooix Scheme interface or by a file-based method on the object (define (implements this args) (or (this "can" args) (let ((file (this "fieldfile" args))) (and file (file-execute-access? file)) ) ) ) ; Returns true if this object directly defines the field / method in question - no mixins, no inheritance (define (defines this args) (let* ((pbits (decompose-path (car args))) (file (make-pathname (this "dir") (second pbits) (third pbits))) ) (file-exists? file) ) (define (getfieldtext this args) (let ((file (this "fieldfile" args))) (and file (file-exists? file) (read-string file)) ) ) (define (fieldfile-lang this args) (define mooix-langs (string-split ((((mooix-root "abstract") "language") "languages") "list") "\n")) ; 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 (define (walk-parents this field) (let ( (parent (this "parent")) (entry (lambda (lang) (let ((file (this (if (not (equal? lang "")) (string-join field "." lang) field)))) (if file (list lang file) (list #f #f))))) (collect (lambda () (alist-delete #f (map (lambda (lang) (entry lang)) (mooix-langs)))) ) (if parent .... ( ) ) ) (let ( (alist (walk-parents this (car args))) (ulang ((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 ) ) - ---------------------------------------------------------------------