[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lojban-beginners] Programming in lojbanistan



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.