lua-users home
lua-l archive

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



1) Sorry... ASSUME==assert. For some reason (C habits) I prefer having upper case for such. Also, at Lua4 there used to be some functional difference I think.

3) Isn't math.mod already the quotient.. Yes, perhaps they would be the same function in Lua style. :) I've just gone further by the needs faced, and also avoided changing current functions if possible. Anyways, there is some inconsistency there..

-ak

28.7.2004 kello 03:59, D Burgess kirjoitti:

 Questions:
  1) What is 'ASSUME' ?
  2) Agree that Lua needs round() to help tonumber() and it
     would be nice if this was in baselib.
  3) Should not div() return two values, namely quotient
     and remainder?

db
On 2004-07-28 at 10:34:29 Asko Kauppi <asko.kauppi@sci.fi> wrote:


Without 'pairs' and 'ipairs' I'd agree with you.
Now the border is fuzzy, but perhaps it needs to be somewhere..

Other globals I'd like to have (and I do, but as standard for everyone):

	function first(x) return x end
	function second(_,x) return x end
	function third(_,_,x) return x end

In fact, here's my whole libext.lua file, which is my "wish list" for
tomorrow:

	


If Lua starts carrying those things, this file will naturally demenish.
:)

-ak


28.7.2004 kello 03:15, Jamie Webb kirjoitti:

 On Wed, Jul 28, 2004 at 02:32:58AM +0300, Asko Kauppi wrote:
It's not the question it couldn't be done (I already did, with a
clumsy
for loop). It's a question on how cleanly it could be done. Sorry to
say :) but your example looks like Perl.. (no offense)

True, but wouldn't it also be a Perlism to include such a redundant
function? Possibly string.lines has a place in stdlib, but enlarging
the built-in libraries to help a few people avoid typing a one-liner
doesn't seem right.

-- Jamie Webb