Commit graph

16 commits

Author SHA1 Message Date
Sei Lisa
81906475ff Update copyright year 2021-01-05 23:27:21 +01:00
Sei Lisa
234b9b23a3 Bump copyright year 2020-04-23 00:38:20 +02:00
Sei Lisa
fe2dd9a721 First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
Sei Lisa
f243f3a3c1 New copyright year 2019-01-01 22:54:34 +01:00
Sei Lisa
d0d6d6744b Bump copyright year
The help text in main.py was still at 2015. Oops.
2018-03-23 16:36:45 +01:00
Sei Lisa
9e7a5d1cdf Change strategy for the checking of function input types.
Rather than assert that the types are correct, use the force type functions on the parameters:
ff, fk, fs, q2f, v2f, and the new fi, fl.

These functions have also been modified to ensure that the input type supports an implicit typecast to the target type and perform it, or emit ELSLInvalidType otherwise, rather than an assertion failure. fl in particular returns the original list if it isn't changed, or a copy if it is.

A couple bugs were found in testfuncs.py as a result, which have been fixed as well. A test has been added to ensure that the exception that caught these bugs remains in place.

The isxxxx functions are no longer necessary, so they are removed. Same goes for the painful cast handling process in foldconst, which was basically performing this task, and not necessarily well.

This approach is much more robust and should have been used since the beginning, but I didn't figure it out then.
2017-10-12 17:16:16 +02:00
Sei Lisa
fe574bb462 Bump copyright year.
'bout time.
2017-08-09 19:45:46 +02:00
Sei Lisa
c68a1f4ad6 Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
Sei Lisa
d4035b0723 Add incompatibility note on JSON. 2015-03-05 18:48:28 +01:00
Sei Lisa
e5cb37dfe4 For now, enable the RE 2015-03-05 14:42:02 +01:00
Sei Lisa
f730843762 More TODO tweaking. 2015-03-05 06:20:11 +01:00
Sei Lisa
62904dc02c BUG-6466 was resurrected; the previous RE is valid. 2014-08-13 13:31:10 +02:00
Sei Lisa
f03466629f Fix several bugs in lslbasefuncs; change InternalJsonScanMatching strategy.
Fix bug: add(Key, Key) is not valid.
Fix bug: llList2CSV was raising an exception always.
Fix bug in test program: llDumpList2String requires Unicode separator.
Patch test program to not output the passed tests.
2014-07-31 19:18:26 +02:00
Sei Lisa
e620c9f305 Additional notes on choices. We're changing it next to the latest one.
Preserved for the record.
2014-07-31 18:58:19 +02:00
Sei Lisa
4bff3aaf94 Thorough review of lslbasefuncs and associated files, adding new stuff.
- Scratch TODO item: Change shouldbeXXX to asserts.
  - shoudlbeXXX(x) has been turned into assert isXXX(x). Affects lsl2json too.

- New base functions:
  - compare (for == and !=)
  - less (for <, >, <=, >=)

- minus() renamed to neg() for consistency. Affects testfuncs too.

- add() now supports key+string and string+key.

- Allow integers in place of floats. That has caused the addition of three utility functions:
  - ff (force float)
  - v2f (force floats in all components of a vector)
  - q2f (force floats in all components of a quaternion)
  Used everywhere where necessary.

  Special care was taken in a few funcs (llListFindList and maybe others) to ensure that lists containing vectors or quaternions which in turn contain integer components, behave as if they were floats, because LSL lists can not physically hold integer values as components of vectors/quats.
  This also fixes a case where if a large integer had more precision than a F32 (e.g. 16777217), the product/division would be more precise than what LSL returns.

- Fix bugs of missing F32() in some places (llRotBetween, llEuler2Rot).

- Some functions marked for moving in an incoming commit.

- llList2CSV marked with a warning that it is not thread safe. That's a future TODO.

- Document llListFindList better.

- Make llListStatistics Use a more orthodox method to return the result for LIST_STAT_RANGE, LIST_STAT_MIN, LIST_STAT_MAX.

- Make llAxisAngle2Rot use more precision from llVecNorm, by adding an optional truncation parameter in the latter.

- Change order of some F32(Quaternion(...)) to not force so much instancing.

- Bugfix: llVecNorm did not return a Vector.
2014-07-26 20:54:01 +02:00
Sei Lisa
05d00e075b Initial commit. Status so far:
- Parser and output modules are thoroughly tested and working.
- Most LSL immutable functions are working; some not tested; llJsonSetValue not implemented.
- Parser recognizes the following flags that alter syntax:
   extendedglobalexpr: Allow full expression syntax in globals.
   extendedtypecast: Allow full unary expressions in typecasts e.g. (float)~i.
   extendedassignment: Enable the C assignment operators &=, ^=, |=, <<=, >>=.
   explicitcast: Add explicit casts wherever they are done implicitly, e.g. float f=3; -> float f=(float)3;.
  Of them, only extendedglobalexpr is useless so far, as it requires the optimizer to be working.
2014-07-26 02:43:44 +02:00