Joel Uckelman on Wed, 4 Aug 2010 01:31:11 -0700 (MST)


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

Re: [game-lang] dice rolls


Thus spake Simon McGregor:
> >
> > =A0roll(nds,l) :-
> > =A0 =A0list(l) & size(l) =3D=3D n & forall(x,(in(x,l) -> (1 <=3D x & x <=
> =3D s)))
> >
> 
> This reads "l is a roll of NdS if l is a list of N numbers between 1
> and S", right?

That's exactly what I was intending it to say.
 
> > (I'm trying to write something GDL-looking, but not necessarily something
> > which is well-formed GDL. Basically, I'm writing something I would like
> > to be well-formed in the language we develop.)
> >
> > In roll(nds,l), I'm treating 'd' as a comma, in order that dice rolls
> > can be written using the standard notation. This is just syntactic sugar,
> > you could just as well write roll(n,s,l).
> 
> > There are comparison operators here, and numeric literals, and l is a list
> > variable (but maybe we don't need actual list variables---perhaps we can
> > already axiomatize all of the features of of lists...).
> 
> What would the difference be between these two cases? Does one
> correspond to incorporating lists into the language as builtins, and
> the other correspond to implementing lists in a library? Or is it
> another sort of difference?
>

Wha I'm getting at is that it's not clear to me how to have arbitrary-
length lists at all if you don't have them natively.

-- 
J.
_______________________________________________
game-lang mailing list
game-lang@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/game-lang