Giter Club home page Giter Club logo

raysilent / lslforge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elnewfie/lslforge

16.0 11.0 8.0 328.34 MB

LSLForge - Eclipse plugin to assist with LSL scripting for Second Life. This repository is used for development, pull requests and bug reports.

HTML 4.02% Batchfile 0.08% Shell 0.24% CSS 0.01% Java 44.26% XSLT 0.09% Haskell 50.59% LSL 0.71%
lsl eclipse-plugin second-life linden-scripting-language secondlife syntax-highlighting

lslforge's Introduction

LSLForge

An LSL Script Editor/compiler for Second Life's Scripting Language.

LSLForge is a fork of the popular LSLPlus editing environment, to provide Linden Scripting Language (LSL) support in Eclipse.

Description

LSLForge is a plugin for the Eclipse platform. The plugin allows editing, "compiling" (gathering code included in modules), executing, and unit testing your Second Life® Linden Scripting Language (LSL) code.

Because it is an Eclipse plugin, when you use LSLForge you can take advantage of many of the useful features of Eclipse. Integrated support of a source code control system such as Git, CVS and Subversion comes for "free", and there are many other features — task list management, integration with bug tracking tools, etc. You will of course need to make sure you get the appropriate plugins to use these features.

Forks Purposes

  • raysilent: This is a fork where the most activity is happening, which is maintaining the latest LSL definitions for functions and constants of LSL according to the recent Release Notes, also bug fixes, and keeping the Eclipse Plugin Update Site up-to-date.
  • elnewfie: After all the tests are accomplished, the repo is merged into the elnewfie's original repo, to avoid confusion.

Changelog

  • 0.1.9.8

  • 0.1.9.7

    • Fixed bugs (Thanks @PellSmit)
    • New functions and constants:
      • llGetDayLength
      • llGetDayOffset
      • llGetMoonDirection
      • llGetMoonRotation
      • llGetRegionDayLength
      • llGetRegionDayOffset
      • llGetRegionMoonDirection
      • llGetRegionMoonRotation
      • llGetRegionSunDirection
      • llGetRegionSunRotation
      • llGetSunRotation
      • llReplaceAgentEnvironment
      • llSetAgentEnvironment
      • llTargetedEmail and its constants:
        • TARGETED_EMAIL_ROOT_CREATOR
        • TARGETED_EMAIL_OBJECT_OWNER
      • ENV_NOT_EXPERIENCE
      • ENV_NO_EXPERIENCE_PERMISSION
      • ENV_NO_ENVIRONMENT
      • ENV_INVALID_AGENT
      • ENV_NO_EXPERIENCE_LAND
      • ENV_VALIDATION_FAIL
      • ENV_NO_EXPERIENCE_LAND
      • ENV_THROTTLE
      • ENVIRONMENT_DAYINFO
      • INVENTORY_SETTING
      • SKY_CLOUD_TEXTURE
      • SKY_MOON_TEXTURE
      • SKY_SUN_TEXTURE
      • WATER_NORMAL_TEXTURE
      • (Bakes on Mesh related):
        • IMG_USE_BAKED_HEAD
        • IMG_USE_BAKED_UPPER
        • IMG_USE_BAKED_LOWER
        • IMG_USE_BAKED_EYES
        • IMG_USE_BAKED_SKIRT
        • IMG_USE_BAKED_HAIR
        • IMG_USE_BAKED_LEFTARM
        • IMG_USE_BAKED_LEFTLEG
        • IMG_USE_BAKED_AUX1
        • IMG_USE_BAKED_AUX2
        • IMG_USE_BAKED_AUX3
  • 2018-09-16 LSLForge 0.1.9.6 (Windows, Linux (Thanks @Trapez), macOS (Thanks @PellSmit))

    • Animesh Functions and Constants:
      • llStartObjectAnimation(string anim)
      • llStopObjectAnimation(string anim)
      • list llGetObjectAnimationNames()
      • integer OBJECT_CREATION_TIME = 36
      • integer OBJECT_SELECT_COUNT = 37
      • integer OBJECT_SIT_COUNT = 38
  • 2018-09-14 LSLForge 0.1.9.5 (Windows, Linux (Thanks @Trapez), macOS (Thanks @PellSmit))

    • Experimental hot deploy of the newly selected native executable
    • "Generated" comment at the end of *.lsl file (easier to check what was copy-pasted) (Windows only)
  • 2018-09-10 LSLForge 0.1.9.4 (Windows, macOS Only)

    • Fixed Tuple*.java disappearance (Thanks @PellSmit)
    • Upgraded Haskell (Thanks @simon-nicholls)
    • HTTP_USER_AGENT
    • OBJECT_RENDER_WEIGHT
    • key llName2Key(string name)
    • key llRequestUserKey(string name)
  • 2017-02-10 LSLForge 0.1.9.3 (Windows, Linux (Thanks @Trapez), macOS (Thanks @PellSmit))

    • ATTACH_FACE_TONGUE misspelled
  • 2017-01-07 LSLForge 0.1.9.2 (Windows, Linux (Thanks @Trapez), macOS (Thanks @PellSmit))

    • OBJECT_ATTACHED_SLOTS_AVAILABLE
    • llGetEnv("region_object_bonus") (in comments)
  • 2016-11-13 LSLForge 0.1.9.1 (Windows, Linux (Thanks @Trapez), macOS (Thanks @PellSmit))

    • OBJECT_GROUP_TAG, OBJECT_TEMP_ATTACHED added
    • Bug fixes (Thanks @PellSmit):
      • #35 (negative out of range index)
      • #6 (backslash in string)
      • #26 (multiline string bug)
    • Bug fix #37 (cannot Run -> Run as -> Launch in LSL Sim)
    • Bug fix some null pointer exceptions during recompiled
  • 2016-11-08 LSLForge 0.1.9 (Windows, Linux, macOS)

    • JSON_APPEND, CLICK_ACTION_ZOOM (seems to be absent in the SL viewer, use 7 instead) added
  • 2016-10-22 LSLForge 0.1.8 (Windows only)

    • XP_ERROR_REQUEST_PERM_TIMEOUT missing added
  • 2016-10-20 LSLForge 0.1.7 (Windows only)

Second Life® Group

The official group for LSLForge Editor tool is LSLForge Users. General announcements, questions and answers.

Installing

  • Java 8 JDK is currently used for generating the plugin. You may find that you need to update to Java 8 or later in order to use the plugin.

Eclipse Plugin

Incompatible Versions

  • WARNING Doesn't seem to work in:
    • Eclipse IDE 2021-09 R (4.21.0)

Compatible Versions

The following Eclipse Distributions were found working:

  • Eclipse IDE 2020-12 (4.18.0)
  • Eclipse IDE 2019-12 (4.14.0)
  • Eclipse IDE 2019‑06 (4.12.0)
  • Eclipse Photon (4.8.0)
  • Eclipse Oxygen

NOTE: Oomph seems to restore LSLForge native setting despite attempts to overwrite the field. The only workaround for now is to check [X] Skip automatic task execution at startup time under Oomph > Setup Tasks in Preferences.

Platforms that used to work but not tested recently:

  • Eclipse Neon (4.6.0)
  • Eclipse Mars.2 (4.5.2)
  • Eclipse Mars.1 (4.5.1)
  • Eclipse Luna (4.4.0)
  • Eclipse Juno RC2 (4.2.2)

How to Install

To install a plugin into Eclipse, choose Help > Install New Software. Click Add... and enter the link for location:

  • For the tested and reported to be working releases use elnewfie's master repo:

    • https://raw.githubusercontent.com/elnewfie/lslforge/master/eclipse/
  • For releases that are currently being tested use raysilent's master repo:

    • https://raw.githubusercontent.com/raysilent/lslforge/master/eclipse/

    (In case of bugs please report right to the https://github.com/raysilent/lslforge/ repo.)

  • Alternatively you may switch to a development fork and try a specific version since 0.1.8 (including work in progress branches):

    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.8/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.7/eclipse/ (Reinstall if you already have the version)
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.6/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.5/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.4/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.3/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.2/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9.1/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.9/eclipse/
    • https://raw.githubusercontent.com/raysilent/lslforge/0.1.8/eclipse/
  • For even older version, clone the whole repo and link your Eclipse to a particular folder under eclipse\archive.

If you don't see any items for installing, try to uncheck "Group items by category"

Run eclipse -clean to force it to forget cached downloads

Checkbox 2 items:

  • "LSLForge"
  • One of the native parts according to your environment.

Install, accept and restart Eclipse

Switch to LSLForge Perspective and create a new LSLForge Project

Known Issues

  • *.lslp files compilation issues although everything is correct. It may happen when a lot of $import keywords are used and at some point the compiler gets stuck. What may help is:

    • Adding a fake *.lslm module along the project, it could be called Fake.lslm. Opening it and adding a space, then removing it and hitting Save will force the project to be recompiled
    • Forcing recompilation of a module that is referenced by *.lslp file by opening it, doing some fake change, and hitting Save

Tips & Tricks

Importing Modules

This demonstrates:

  • How to use folders when importing modules (dot notation)
  • How to import a module with a paramater

Modules/Debug.lslm :

$module (integer DEBUG)
// pragma inline
bug(string place, string message) {
  if (DEBUG) llOwnerSay("["+llGetScriptName()+"."+place+"]: "+message);
}

Script.lslp :

integer DEBUG=TRUE; // has to be a variable
$import Modules.Debug.lslm(DEBUG=DEBUG) de;

do() {
  debug("do()", "This is a call of 'bug' function from 'de' module");
}

Referencing Modules From Other Projects

Imagine you move Modules folder to a separate project called ModulesProject to use it from different other projects. In the main project that uses ModulesProject, place a checkbox along its name under Project settings > Project References.

ModulesProject directory tree becomes part of the project's tree. It will still be imported as $import Modules.Debug.lslm without any additions.

Native Executable Compilation

If LSLForge is behind from the newest LSL definitions of functions and constants, you may compile an executable for yourself, by git cloning the source and digging into lslforge\haskell\src\Language\Lsl\Internal\FuncSigs.hs and/or lslforge\haskell\src\Language\Lsl\Internal\Constants.hs and following the already existing examples. You will need to compile the code now with Haskell compiler and specify newly built file in Eclipse LSLForge Preferences. This should be enough for a while. Continue reading for details.

Requirements

To compile the native LSLForge binary, you must have the cross-platform Haskell Stack tool installed.

  • Since LSLForge 0.1.9.7 Stack >= 1.11 is required.

Stack can then ensure that the correct compiler and dependencies for the project will be automatically downloaded and installed for you.

To install Stack, please visit the Stack Homepage and follow the instructions. It is likely that you can find a package available at many package managers e.g. chocolatey, homebrew and pacman, but check before installing that their stack version is up-to-date.

Configure Stack if desired:

  • STACK_ROOT environment variable if you do not want stack files appear under C:\sr (Windows).
  • To configure downloaded programs location, open Stack's root config.yaml and add a line local-programs-path: <path> with the path desired, after that commands like stack ghci will download files right into that folder
  • To configure where stack install will place the files, add the following line to config.yaml: local-bin-path: <path> with the path desired. This folder may be added to the PATH environment variable. (The reminder will be given after stack install copies the file there).

Compiling Haskell native LSLForge binary

In a terminal, change directory to the project's lslforge/haskell subdirectory.

Run stack upgrade to upgrade to the latest version.

You will need to enter stack setup if you have a freshly installed Stack, or don't have the relevant compiler already set up. (Stack will tell you if you need to run this additional step.)

Now run with admin terminal stack install in lslforge/haskell folder to build and install the LSLForge binary in one step. (Weird access denied errors are due to Antivirus.)

Post-compilation

If your stack install is successful, an executable will appear at %APPDATA%\local\bin folder for Windows, or $HOME/.local/bin for other platforms (look at the message after install) - unless you changed the local-bin-path parameter in config.yaml to override default location.

To test the newly built file, you can specify it in the existing LSLForge Eclipse installation under Preferences > LSLForge settings. This will not make any new definitions show immediately, but they will after restarting Eclipse.

If you enable Eclipse Error Log View, it will print out current version of the executable in use, as well as its actual location.

Building for Publishing

Running Tests

  • cd to lslforge/haskell
  • Windows
    • set LSLFORGE_TEST_DATA=../testing/data - enough to be set just for the terminal session.
    • stack test
  • Linux / macOS
    • LSLFORGE_TEST_DATA=../testing/data; stack test

Version Number Change

  • TODO: Automate this task

  • lslforge\haskell\LSLForge.cabal

  • lslforge\eclipse\lslforge-feature\feature.xml (all instances)

  • lslforge\eclipse\update-site\site.xml (all instances)

  • All instances in every feature.xml and MANIFEST.MF files under lslforge/eclipse.

Compile Haskell Executable & Move to Eclipse Plugin Source Location

Switch to lslforge subfolder.

  • Windows
    • Run all_compile_haskell_win32_as_admin.bat
    • eclipse\update-site\clean.bat
  • Linux
    • stack install --executable-stripping
    • codegen.sh
    • copy_linux.sh
    • eclipse/update-site/clean.sh
  • macOS
    • stack install --executable-stripping
    • codegen_mac.sh
    • copy_mac.sh
    • eclipse/update-site/clean.sh

Eclipse Plug-in Compilation

  • Move existing plugin files from eclipse\ to eclipse\archive\x.x.x\ (keep index.html).

  • Eclipse for RCP and RAP Developers - Using Luna SR2

    • Use empty workspace
    • Import projects from lslforge\eclipse\ (without copying)
    • If you see artifacts in the update-site's project folder (features, plugins, artifacts.jar, content.jar), run clean.bat or clean.sh to delete them.
    • Double-click update-site\site.xml and select Build All
      • Generated files are:

        • features
        • plugins
        • artifacts.jar
        • content.jar
      • Move generated files to eclipse\

      • Copy index.html (static file) to eclipse\ if it is missing.

  • Test generated update site with a fresh installation of Eclipse using Local path for plugin:

    • If you don't want fresh Eclipse, uninstall existing LSLForge plug-in and carefully remove every folder from the Eclipse cache.

      Run eclipse -clean to force it to forget cached downloads.

    • Start with a fresh workspace.
    • Help > Install New Software
      • Add.. update site, providing Local location of eclipse folder as a source.
      • Install newly made LSLForge plugin.
    • Restart Eclipse.
    • Switch Perspective to LSLForge.
      • Create new LSLForge Project.
      • Create *.lslp files and see Error Log View.

lslforge's People

Contributors

elnewfie avatar pellsmit avatar raysilent avatar simon-nicholls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lslforge's Issues

Solving plugin not working anymore after Eclipse 2021-09 update

I had this issue after updating/reinstalling Eclipse to latest. Eclipse would show the startup screen, then vanish though staying in memory till terminated in Task manager. Or at best after a new reinstall, Eclispe would start but show a blank tab when opening a file in LSLForge editor. It seems the solution was to uninstall the default latest JDK 17 and replace it by the older JDK 11. I had also to edit eclipse.ini and update the JDK path after -vm, else Eclispe would block at next launch. For info i used https://adoptium.net/?variant=openjdk11 . Maybe it also works if selecting the older JDK 11 in the Oomph setup but
I have not re-tested.

There are some error messages in myWorkspace.../.metada/.log . It seems some other people had also issues on other plugins after updating Eclipse. Maybe it is related to a certain "ToQuery" which was mentioned in my error logs. For instance dotnet/efcore#19708 but I don't know beyond that.

Feature Request: copy-and-paste of all nodes

https://code.google.com/archive/p/lslforge/issues/13
Posted on Mar 12, 2012 by Happy Lion
First of let me thank you for taking this up and bringing it back to life. You've done a fine job!

Now for the suggestions. Unit Tests are a great idea, and I understand the pull-down menus help weed out typo mistakes. But currently it takes too long to enter stuff, especially if we want to create multiple tests that are very similar to each other, covering different starting variables for example.

Having cut-and-paste of the various nodes would help a lot!

Wrongly autocasting float variable value

Definition of float variable allocating an integer value gets autocasted by LSLForge to integer.
Autocasting at this point is different to SL inworld.

float a = 3;
// when using a in an operation, it is treated as integer value by LSLForge
// using float a or float a = 3 _and_ another line a = 3 stops optimizing -
// keeping the float a =3; line so that Mono later autocasts the value to float (3.000000)

see
#1 (comment) and following
#1 (comment) is a possible way how to handle this

at least this behaviour needs to be stated (esp. as Mono/LSO inworld also do autocasting to integer)

Update to compile under recent Haskell Platform

https://code.google.com/archive/p/lslforge/issues/24
Posted on Aug 22, 2012 by Quick Kangaroo
What steps will reproduce the problem? 1. Install Haskell-platform >=11.0 2. cabal install

What is the expected output? What do you see instead? Expected: completed build of Haskell LSLForge Actual: irreconcilable package dependencies, varying depending on specific installation

What version of the product are you using? On what operating system? current git head (0.1.2)

Please provide any additional information below. As far as I can tell, it is difficult (impossible?) to compile on recent OSX, as the suggested ghc is 6.10.4. But versions prior to 6.12 had issues on OSX with generating 32bit executables. More recent versions do not support the older versions of dependencies required by LSLForge, for instance: haskell98-1.1.0.1 requires array ==0.3.* but LSLForge requires array ==0.2.*

0.1.9.1 release

@Trapez we need you with Linux again!

git clone https://github.com/raysilent/lslforge.git --branch 0.1.9.1 --single-branch

LSLForge compiles lslp to lsl much too often even without code changes

https://code.google.com/archive/p/lslforge/issues/41
Posted on Mar 31, 2014 by Happy Wombat
What steps will reproduce the problem? 1. closeEclipse with a lslp left open / reopen Eclipse 2. find LSL Forge evaluate lslp code that was open last time Eclipse was closed 3. look at the optimized lsl that got refreshed+timestamped

What is the expected output? What do you see instead? no recompiled of lsl when there are no changes instead most of the code gets recompiled just to have a changed first comment line stating compile date

What version of the product are you using? On what operating system? LSLForge 0.16 patched, Eclipse Kepler, Java 1.6

Please provide any additional information below. see https://code.google.com/p/lslforge/issues/detail?id=3#c12 this is a pita with Git...

Comment 1

Posted on Mar 31, 2014 by Happy Wombat
same when just opening a lslp that has an already compiled lsl - only opening and viewing code should not alter files in a way that git sees differences

I know, changes of modules are a critical point - but then it would be better to have some additional info or popup to request recompile. What if I want to keep the 'old' lsl instead of making use of a modified module...

LSLforge does not recognize multiline strings

https://code.google.com/archive/p/lslforge/issues/49
Posted on Jul 2, 2014 by Grumpy Hippo
The script below is valid LSL. However, LSLforge throws an error because it does recognize multi-line strings. This appears to be an oversight, as it allows vectors, rotations, lists, and function arguments to span multiple lines. For right now, I'm writing out the multiline string as a list of strings within a call to llDumpList2String() with "\n" as the separator.

default { state_entry() { llSay(0, "testing... 1... 2... 3... Whiskey Tango Foxtrot"); } }
https://code.google.com/archive/p/lslforge/issues/8

Posted on Jan 18, 2012 by Happy Giraffe
Editor doesn't obey color for multi-line comments

Global string variables with backslashes get doubled in .lsl

.lslm :

'string bad_string = "//\onies!";

default {
state_entry() {
llOwnerSay(bad_string);
}
}'

.lsl :

'string bad_string = "//\onies!"; // Heh, it's not showing in the comment, but trust me.

default {

state_entry() {
    llOwnerSay(bad_string);
}

}'

0.1.9.3 help wanted

Guys (@Trapez, @PellSmit), we need help compiling Linux and Mac executables to fix a typo.

Please use the following branch:

git clone https://github.com/raysilent/lslforge.git --branch 0.1.9.3 --single-branch

Breakpoints are bypassed (Juno JRE 7)

https://code.google.com/archive/p/lslforge/issues/32
Posted on Mar 27, 2013 by Helpful Giraffe
What steps will reproduce the problem? 1.Set a breakpoint 2.Run in debug mode

What is the expected output? What do you see instead? --Halt on the first breakpoint and switch to the debugger. --Breakpoints are bypassed even though the debugger may be launched.

What version of the product are you using? On what operating system? --Version v0.1.4, Eclipse Juno x86, JRE 7 build 17 x86

Please provide any additional information below. --There seems to be some information about this online indicating that other plug-ins run into the same issue. However, there is no definite client solution identified. --The debugger is set to launch on halt/break --The "turn off all breakpoints" button is not depressed

Unit Tests do not recognize utf8 characters

https://code.google.com/archive/p/lslforge/issues/12
Posted on Mar 12, 2012 by Happy Camel
What steps will reproduce the problem? 1. Make a llDialog() call with utf8 character: e.g. llDialog("whateverUserKey","▶",[],100); 2. Run test on NORMAL, with the following expected call: call:llDialog - avatar (key): "whateverUserKey" - message (string) : "▶" - buttons (list) : [] - chat_channel (integer): 100

What is the expected output? What do you see instead? Test should PASS. Instead, Test FAILS, "unexpected call: llDialog("whateverUserKey","%B6",[],100);

What version of the product are you using? On what operating system? Eclipse SDKJ 3.7.2.M20120208-800 LSL Forge 0.1.1 lslforge_part_win_32_x86 0.1.1

OS: Windows Vista Professional 64-bit

Please provide any additional information below.

Test also fails if "%B6" (instead of "▶") is used in the expected call string for the test.

'global variable XXX not found' error at nested import

In case of nested import like bellow,
LSLForge reports an error saying 'global variable A not found'.
I fixed it but need more test.
Wait for a while.

----------A.lslm ---------------
$module (integer A)
----------B.lslm ---------------
$module (integer A)

$import A.lslm(A=A);
----------C.lslm ---------------
$module (integer A)

$import B.lslm(A=A);
----------D.lslm ---------------
$module (integer A)

$import C.lslm(A=A);

make replacement of LSL Constants optional

https://code.google.com/archive/p/lslforge/issues/42
Posted on Mar 31, 2014 by Happy Wombat
I compared LSL scripts memory usage of

lsl code which LSLForge optimized/with replaced constants (TRUE, FALSE, etc.) to the same script with manually 'unreplaced' constants and did not find differences - at least not after the very first script init was done.

To me it looks like MONO handles those constants quite good http://wiki.secondlife.com/wiki/LSL_Constants_vs_Globals

In this case, not replacing constants at least improves script readability and should give no issue unless the line gets too long - so make it optional... maybe call it obfuscation ;)

Comment 1

Posted on Mar 31, 2014 by Happy Wombat
one point where the constant replacement indeed is useful:

llRequestPermissions(g_kOwner, PERMISSION_CONTROL_CAMERA | PERMISSION_TRACK_CAMERA); is replaced by llRequestPermissions(g_kOwner,3072);

here some profiling would be needed to see if this improves any momory usage but esp. server time usage

Would be great to have a replacement/optimization for this case too: if (_perm0 & 2048 && _perm0 & 1024) { (was: if ((perm & PERMISSION_CONTROL_CAMERA) && (perm & PERMISSION_TRACK_CAMERA)) {)

Cannot Run -> Run as -> Launch in LSL Sim

It's possible I'm doing something wrong, but I keep getting an error when trying to run/debug an LSL script. I'm choosing Run -> Run as -> Launch in LSL Sim

An internal error occurred during: "Launching Example".
Could not initialize class lslforge.debug.LSLSimInteractor$ContinueCommand

The simple script is:

integer foo()
{
return 1;
}

default
{
state_entry()
{
llSay(0, "testing");
integer value = foo();
}
}

LSLforge improperly handling hexadecimal integers

https://code.google.com/archive/p/lslforge/issues/44
Posted on Apr 29, 2014 by Grumpy Hippo
Given a hexadecimal value in your LSL scripts, LSLforge will automatically convert it to an integer value. However, this is bugging up some code I was testing.

Namely, the hex value 0x80000000 is being converted to 2147483648, but when entered into a script in SL or InWorldz, such as llOwnerSay((string)0x80000000); the integer value reported is -2147483648.

This is with the 64bit Linux version of LSLforge. A friend of mine suspects that LSLforge (or maybe Eclipse) is converting it to a 64bit integer, when it should be 32bit.

Comment 1

Posted on May 10, 2014 by Swift Horse
In my environment, it makes -2147483648 because my CPU is still 32bit... Line 62 of Type.hs,

data LSLValue a = IVal Int | FVal a | SVal String | VVal a a a

I guess you can fix it to replace Int to Int32, but I can't confirm it...

Comment 2

Posted on May 16, 2014 by Happy Wombat
no issue on Win7-64 with Version: Kepler Service Release 2 Build id: 20140224-0627

java.version=1.6.0_45 java.vm.info=mixed mode java.vm.name=Java HotSpot(TM) 64-Bit Server VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Sun Microsystems Inc. java.vm.version=20.45-b01

using 32bit LSLForge win executable from my own repo https://github.com/RayZopf/LSLForge_patched/blob/master/lslforge/haskell/dist/build/LSLForge/LSLForge.exe compiled with 32bit GHC, http://www.haskell.org/ghc/download_ghc_6_10_4#windows

Attachments
Issue_44-hex_integer-SL.lsl 231
Issue_44-hex_integer-LSLForge.lsl.lslp 219
Issue_44-hex_integer-LSLForge.lsl.lsl 336
Comment 3

Posted on May 16, 2014 by Grumpy Hippo
Yeah, it's not going to show up on 32bit builds, even if you are running them on a 64bit system, because they still execute in 32bit mode. It'll only show up if you use a 64bit LSLforge build on a 64bit system.

Issue_44-hex_integer-SL.lsl.txt
Issue_44-hex_integer-LSLForge.lsl.txt
Issue_44-hex_integer-LSLForge.lslp.txt

LSLForge Native Executable Problem

When starting up Eclipse with LSLForge 0.1.9.8, I get the following error message:

image

When manually entering that URL into a web browser, the page does not seem to exist.

https://code.google.com/archive/p/lslforge/issues/6

*Unit Tests break when specific string is entered in .lslt (both test run and test editor fail)
https://code.google.com/archive/p/lslforge/issues/6
Posted on Nov 23, 2011 by Happy Horse
What steps will reproduce the problem? 1. With a function similar to this one: string InterpretSpecialCommands(string specialcommand,string Username,key Userkey) 2. Create a test that tries to call the function with specialcommand as in the following line: Shout:8,au4gp734ga34GQ§H$§$a48gö847agfugfgaweugiöeurigfiuerhlösehrgheriusleughlsehrkgjshgjhskdfgkjesrhgkjserhlgkjserhgkjsehkjrghlkejrhkejhlksgj 3. Try to run the test -> test does not even start 4. Close the test file and try to open it again -> exception

What is the expected output? What do you see instead? Running the tests

What version of the product are you using? On what operating system? LSLForge 0.1.0 win32

Add "No Optimize" pragma

https://code.google.com/archive/p/lslforge/issues/53
Posted on Aug 8, 2014 by Grumpy Hippo
There have been several cases where LSLforge's optizer has broken my code in some way. Usually, these breakages are with individual functions.

I would like to propose the addition of a 'No Optimize" pragma, which would block the optimization routines from being run on a specified variable or function, and maybe a state or event if practical to implement.

Support OSSL (OpenSim) library

https://code.google.com/archive/p/lslforge/issues/56
Posted on Oct 9, 2014 by Quick Kangaroo
OSSL is intended to be a superset of LSL, so should generally be simple to support without impact to the LSL support. In addition to the minor syntax difference (statements may not be parenthesized), I have several suggestions: 1. LSLForge obviously lacks templates for os* library functions. Rather than simply adding them to LSLForge, it might be a good idea to add a preference, possibly as a project parameter, pragma or file name pattern. 2. OSSL allows library functions to have multiple argument patterns. For instance, osTeleportAgent has three syntactically distinct forms (see http://opensimulator.org/wiki/OsTeleportAgent ) 3. it would be nice to have .osslp/.osslm/.ossl file extensions supported, both to distinguish them in your version control and deployment system and perhaps as a way to enable ossl extensions.

we could, of course, fork development to produce an osslforge, but it feels to me like a bad idea.

0.1.9.2 help wanted

Guys (@Trapez, @PellSmit), we need help compiling Linux and Mac executables

Please use the following branch:

git clone https://github.com/raysilent/lslforge.git --branch 0.1.9.2 --single-branch

State change in function

https://code.google.com/archive/p/lslforge/issues/30
Posted on Mar 11, 2013 by Happy Hippo
What steps will reproduce the problem? 1. Create a function that uses the 'conditional' hack to change states, like this:

bugstate() { if (TRUE) state otherState; }

What is the expected output? What do you see instead? Expected output: a warning about changing states in global functions. Observed: The error "state changes not allowed from this context" - LSLForge Problem This prevents the .lsl script from being assembled.

What version of the product are you using? On what operating system? Linux Mint

Please provide any additional information below.

Comment 1

Posted on Apr 17, 2014 by Swift Horse
LSL wiki says: User-defined (global) functions cannot change a script's state. The compiler will throw the error 'ERROR: Global functions can't change state'. Note: Previously, global functions could change state in the body of a simple 'if' statement; this "workaround" no longer works. (from http://wiki.secondlife.com/wiki/State) So it's not a issue.

Comment 2

Posted on Apr 17, 2014 by Happy Hippo
That wiki remark was added on 6 june 2010. I appears to me that in practice the LL wiki is not correct on this.

At the moment, april 2014, this 'hack' still works. Disabling it would break a lot of existing code, so it's unlikely LL will change this in the near future without explicit reason.

Comment 3

Posted on Apr 18, 2014 by Swift Horse
I remember it didn't work in beta grid before, but it seemed my misunderstanding. It worked today in main grid. And I found for, while and do while statement allow this hack. Are there any other cases? It's very strange to inhibit state changing in function, it's not a technical problem, but this is not a place discussing it. There are 3 points to fix it.

How LSLForge should work
How to change LSLForge compiler
How to change LSLForge debugger
For 1., we need to research all cases to allow state change in global functions. (It's a troublesome task to implement such a buggy spec.) For 2., I made some patches for LSLForge compiler but I don't understand to show warnings yet. And 3., I haven't read around LSLForge debugger yet, need some time to learn it.

I'm not sure when I can finish it, but not impossible. Wait for a while...

Opening eclipse from SL throws an error

https://code.google.com/archive/p/lslforge/issues/33
Posted on Apr 1, 2013 by Happy Wombat
What steps will reproduce the problem? 1. Open a script in SL 2. Press the Edit button (after configuring the SL External Editor to be eclipse

What is the expected output? What do you see instead? I expect to open the script in eclipse, instead get: Could not open the editor: Invalid Input: Must be IFileEditorInput

What version of the product are you using? On what operating system? I'm using the latest lslforge on Eclipse Helios on win 7 (64 bit)

Please provide any additional information below. Error stack is: org.eclipse.ui.PartInitException: Invalid Input: Must be IFileEditorInput at lslforge.editor.LSLMultiPageEditor.init(LSLMultiPageEditor.java:246) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2674) at org.eclipse.ui.ide.IDE.openInternalEditorOnFileStore(IDE.java:1225) at org.eclipse.ui.internal.ide.application.DelayedEventsProcessor$1.run(DelayedEventsProcessor.java:106) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

Comment 1

Posted on Apr 1, 2013 by Happy Wombat
The problem also occurs in eclipse 4.2 Classic

Comment 2

Posted on May 9, 2013 by Helpful Kangaroo
Due to the way Eclipse requires everything to be in a project/workspace, simply invoking Eclipse will not work. Will keep this issue open though - we really want to fix this in a future release, but unfortunately it's not a simple fix, so it might be a few releases before we can get to it.

Newfie
Comment 3

Posted on Jul 27, 2013 by Helpful Camel
Does this mean it's impossible at this time to actually save a file in eclipse and have it automatically update the script in Second Life?

Comment 4

Posted on Jul 27, 2013 by Happy Wombat
Sadly, that's exactly what it means. Thus, I'm reduced to cut and paste for getting files from eclipse into SL. I miss the convenience of being able to open the file in SL, press the Edit button at the bottom of the window and have the file duplicated in eclipse - that was an extremely convenient feature of lslPlus.

Comment 5

Posted on Jul 25, 2014 by Happy Elephant
Is there still no solution for this issue? Why am I able to open a .txt file with Eclipse via right-click, Open with, then select eclipse.exe ? It's a newly created text file in my Downloads folder and not apart of any project/workspace.

Feature Request: Additional options besides Nice, Normal etc.

https://code.google.com/archive/p/lslforge/issues/16

Posted on Mar 12, 2012 by Happy Lion
I'd like to test the end-result, e.g. a function call that includes a llWhisper() or llMessageLinked() to another script somewhere else. Under some conditions, I want to make sure those llWhisper() or llMessageLinked() calls are not made.

Currently, to test that, I have to do Normal or Exhaustive. This means keying in every single call along the way leading up to this and every one proceeding after this.

We need a nice-plus: (1) Nice, but we can flag selected calls as must be there. (2) In addition, we can flag selected calls that must not be there (perhaps include wildcats for parameters)

This would speed up Unit Testing entry without sacrificing meaningfulness.

LSL modules not always found

https://code.google.com/archive/p/lslforge/issues/39
Posted on Jan 14, 2014 by Happy Wombat
What steps will reproduce the problem? 1. create LSLProject 2. create a folder inside project 3. create scripts and modules, use modules create another project, put subfolders in, throw some modules you want to use in and make that projetct a reference

What is the expected output? What do you see instead? at least LSLFore should reliablely find and use modules in the same dir as the script using the module and go for subfolders too to get modules Instead I get error signs where my $import line is, stating module could not be found Also when I move a used and found module out the same folder script is in, script.lsl creations goes off/ script.lsl tab vanishes - but no error sign at import-statement line - instead getting an error in error log, stating script.lsl not found

What version of the product are you using? On what operating system? lslforge 0.1.6 Win 7 64 bit eclipse.buildId=4.3.0.M20130911-1000 java.version=1.6.0_45 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.standard.product

Please provide any additional information below. Restarting Eclipse "solves" the problem as the module (in same dir) then is found at next edit, for modules in referenced projects (and there in root!) editing preferences of current project un/rechecking referenced project helps Also helping is moving/having module at project root as this is the thing letting recognize LSLForge the module always

Comment 1

Posted on Mar 15, 2014 by Swift Horse
This bug is introduced in 0.1.5, side effect of 'LSLForge Native Executable Multiple instances would run, one for each open project. Modified now to share a single instance globally.' It is not good idea because each native process keeps .lslp files and .lslm files in each project. If you want to share the native process among the project, need to switch .lslm/.lsl context. It seems not easy.

Comment 2

Posted on Mar 17, 2014 by Happy Wombat
I see... then probably better leave it that way and work around as described - also I was told that editing+saving modules helps too.

Bug - llGetSubString and llList2List make wrong result on negative out of range index (when Optimizations are enabled)

(1)

// OutOfRangeNegativeIndex.lslp
default
{
	state_entry()
	{
		string s = llGetSubString("0123456789", -11, -11);
		llOwnerSay("s = " + s + ", length = " + (string)llStringLength(s));
		list l = llList2List([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], -11, -11);
		llOwnerSay("l = [" + llDumpList2String(l, ", ") + "]");
	}
}

was converted to

(2)

// OutOfRangeNegativeIndex.lslp 
// 2016-11-11 13:40:30 - LSLForge (0.1.9) generated
// OutOfRangeNegativeIndex.lslp
default {

	state_entry() {
    string s = "0";
    llOwnerSay(((("s = " + s) + ", length = ") + ((string)llStringLength(s))));
    list l = [0];
    llOwnerSay((("l = [" + llDumpList2String(l,", ")) + "]"));
  }
}

But result of (1) is:
[20:31] Object: s = , length = 0
[20:31] Object: l = []

and (2)
[20:32] Object: s = 0, length = 1
[20:32] Object: l = [0]

It is a bug in InternalLLFuncs.hs

Please allow circular dependencies.

https://code.google.com/archive/p/lslforge/issues/21
Posted on Jun 11, 2012 by Happy Lion
Forbidding circular dependencies makes it very difficult to properly modularize some code. Take, for example, two different components on a HUD that loosely depend on each other's data, but are implemented in two different lslm files. It can be worked around in hackish ways, but that breaks the idea of clean encapsulation.

Since it's all going into the same .lsl output file anyway, is there any particular reason that circular dependencies are disallowed?

Comment 1

Posted on Jun 13, 2012 by Helpful Kangaroo
Currently modules are implemented in the LSLForge executable, and does not do any circular module detection. A reworking of the compilation process is underway, and this is definitely on the list. A fix will be included in an upcoming release.

Comment 2

Posted on Jun 5, 2013 by Happy Lion
Not trying to be a pain or anything, but... :)

How is this feature coming?

I looked into trying to implement this and send you a patch, but... I am too dumb to grok Haskell, hehe.

Thanks for all the work that you do on this plugin!

Preparing for 0.1.9 release

An error occurred while collecting items to be installed
session context was:(profile=_Users_corysia_eclipse_cpp-neon_Eclipse.app_Contents_Eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_linux_x86_plugin_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_linux_x86_plugin_0.1.8.jar
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_linux_x86_64_plugin_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_linux_x86_64_plugin_0.1.8.jar
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_macosx_x86_plugin_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_macosx_x86_plugin_0.1.8.jar
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_linux_x86_feature_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_linux_x86_feature_0.1.8.jar
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_linux_x86_64_feature_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_linux_x86_64_feature_0.1.8.jar
Artifact not found: https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_macosx_x86_feature_0.1.8.jar.
https://github.com/raysilent/lslforge/raw/master/eclipse/lslforge_part_macosx_x86_feature_0.1.8.jar

Running Script in SIM not working - LSLForge.exe arguments error

https://code.google.com/archive/p/lslforge/issues/37
Posted on Jan 12, 2014 by Happy Wombat
What steps will reproduce the problem? 1. open a script within LSL Project 2. choose Run as - Launch in LSL Sim 3. look at the given Console

What is the expected output? What do you see instead? A Sim should be started, the script should run - instead: LSLForge.exe: in element tag sim-descriptor, In a sequence: in element tag source_files, In a sequence: in element tag scripts, In a sequence: in element tag item, Missing opening bracket: Expected </ but found & in file input at line 1 col 8300

What version of the product are you using? On what operating system? LSLForge 0.16 eclipse.buildId=4.3.0.M20130911-1000 java.version=1.7.0_45 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.standard.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product Win 7 64bit

Please provide any additional information below. The col # the Missing sing appears differs from script to script (e.g. 8578 with the given Dialog example)

Comment 1

Posted on Jan 14, 2014 by Happy Wombat
identified the problem:

if a folder inside a LSLForge project holds "&" this will break Run/Debug execution it does not matter where inside the project this folder is ...

workaround: avoid special signs in any folder/file name if not possible, create another LSLForge project to use Run/Debug there

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.