From lojban-beginners+bncCLr6ktCfBBCWrZztBBoE8VMQnA@googlegroups.com Thu Apr 14 08:45:47 2011 Received: from mail-gw0-f61.google.com ([74.125.83.61]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1QAOjk-0005RB-0A; Thu, 14 Apr 2011 08:45:46 -0700 Received: by gwb11 with SMTP id 11sf3946104gwb.16 for ; Thu, 14 Apr 2011 08:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:date:from:to:subject :message-id:mail-followup-to:references:mime-version:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type:content-disposition; bh=vZ9FetAN6clBW5FEJEhUrYkjbMZOoijGPomWzf3rHVA=; b=J5dWt5I6Wv0xDXgKv3eYaLeL4gMtjTUu/usjUri6ClzXqL6Jccy7cxXAvq0vEQQuh4 XdGgkGFGyyfJhCFRL8ZwUYeGNt5ps0rTrJT71Uo6igLAsOPWNrSRVoLDnz4wy1D789A6 Vpnmx+4F6Ldfwq2IO4rI+6qESQPYjv/KnJsb0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id :mail-followup-to:references:mime-version:in-reply-to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type:content-disposition; b=OjTcmiwgWqq9SVxN8Pt1cqZz2O8dFPI+jVk4An9w4w2mm0ys88tCmEhRBbCsm2Ulvd OQpndYu6WpJF1o35xzxhrnS2sm0IevvfgLsaJ1w9zZUgmB0sV8HwCdIjs2ylGyijkAC0 rJHbLIquq5C16F9OCp6ZOv0fncwk5mH7REjPE= Received: by 10.91.66.8 with SMTP id t8mr234167agk.10.1302795926308; Thu, 14 Apr 2011 08:45:26 -0700 (PDT) X-BeenThere: lojban-beginners@googlegroups.com Received: by 10.231.8.234 with SMTP id i42ls756396ibi.3.p; Thu, 14 Apr 2011 08:45:25 -0700 (PDT) Received: by 10.231.53.14 with SMTP id k14mr350307ibg.7.1302795925301; Thu, 14 Apr 2011 08:45:25 -0700 (PDT) Received: by 10.231.53.14 with SMTP id k14mr350306ibg.7.1302795925197; Thu, 14 Apr 2011 08:45:25 -0700 (PDT) Received: from mail-iw0-f172.google.com (mail-iw0-f172.google.com [209.85.214.172]) by gmr-mx.google.com with ESMTPS id b26si417841ibq.0.2011.04.14.08.45.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2011 08:45:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.214.172 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) client-ip=209.85.214.172; Received: by mail-iw0-f172.google.com with SMTP id 39so2475371iwn.17 for ; Thu, 14 Apr 2011 08:45:24 -0700 (PDT) Received: by 10.42.65.196 with SMTP id m4mr1224983ici.397.1302795923838; Thu, 14 Apr 2011 08:45:23 -0700 (PDT) Received: from sunflowerriver.org (c-68-35-164-105.hsd1.nm.comcast.net [68.35.164.105]) by mx.google.com with ESMTPS id uk4sm1197130icb.21.2011.04.14.08.45.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2011 08:45:22 -0700 (PDT) Date: Thu, 14 Apr 2011 09:45:18 -0600 From: ".alyn.post." To: lojban-beginners@googlegroups.com Subject: Re: [lojban-beginners] Programming in lojbanistan Message-ID: <20110414154518.GB19800@alice.local> Mail-Followup-To: lojban-beginners@googlegroups.com References: Mime-Version: 1.0 In-Reply-To: X-Original-Sender: alyn.post@lodockikumazvati.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.214.172 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) smtp.mail=alanpost@sunflowerriver.org Reply-To: lojban-beginners@googlegroups.com Precedence: list Mailing-list: list lojban-beginners@googlegroups.com; contact lojban-beginners+owners@googlegroups.com List-ID: X-Google-Group-Id: 300742228892 List-Post: , List-Help: , List-Archive: Sender: lojban-beginners@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline On Thu, Apr 14, 2011 at 11:03:28AM -0400, .arpis. wrote: > I can't imagine this hasn't been discussed, but I haven't found any > resources about the lojban terms that would be used to talk about > programming (and what variables/keywords/etc should be). > > -- > mu'o mi'e .arpis. > My PEG parser, genturfa'i, is written using lojban variables. I discuss the ones I use and how they map to English here: http://wiki.call-cc.org/eggref/4/genturfahi#english-translation-of-lojban-words The actual source code is here: http://bugs.call-cc.org/browser/release/4/genturfahi/trunk With a representative example (i.e., mixing English and Lojban to maintain naming conventions developed in English but really masquerading as language features) being: http://bugs.call-cc.org/browser/release/4/genturfahi/trunk/cfisisku.scm In general, I have found that naming conventions can't quite use the same set of tricks you might in English. Instead of using plurality (e.g., word, words) I use a series: valsi, pavalsi, suhorevalsi, rodavalsi. I've found it useful to use the rafsi form of words for temporary variables: cme = (get-cmene sumti) val = (get-valsi sumti) And I generally have used conventions that I hope make sense (though as I say in my documentation, they only have truth value in my program), so {lerpoi} is a character buffer, {nilcla} is the length of something, sezvati is an index (though I use zva like one might use 'i'), jalge/jag for a return value, cfari/fanmo for beginning/end,rest of a collection object, &c. In general I have found the experience very rewarding and I tend to be much more literal in my variable names; it has changed the way I think about my programs. -Alan -- .i ma'a lo bradi ku penmi gi'e du -- You received this message because you are subscribed to the Google Groups "Lojban Beginners" group. To post to this group, send email to lojban-beginners@googlegroups.com. To unsubscribe from this group, send email to lojban-beginners+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/lojban-beginners?hl=en.