Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scripting IDE

Noddingham Protagonist
Junior Member
Join date: 21 Jul 2003
Posts: 6
07-30-2003 09:12
Not sure if this is the right place or if this belongs in Feature Suggestion. But,...

What would the chances be of creating and releasing an off-line script editor. If such a thing exists, please excuse my ignorance at this point and stop reading.

If such a thing doesn't exist, I think it would be great if it did. Now I realize that it would be hard to 'see' the effects of apply an Impulse force to an object, however for what I'm sure amounts to more scripts than not, being able to check to make sure the script executed correctly (syntactically, at least) would allow people to do work on their SL projects even if they were unable to be in SL at that time (at work, lunch break with the laptop, no WiFi, whatever). So basically what you would have would be the parser and interpreter for the scripting language, and just be able to check that scripts executed ok, and possibly have an output section so you could check variable states.

As I said, if this already exists in some form, please excuse me and point me to it and I will go stand in the corner quietly.

Thanks,
Noddingham
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-30-2003 10:21
.. i started writing one a long time ago, and it kind of got shelved, i can start up again if enough people would find it useful. I was doing it in java(since it SL will be going mac and linux soon enough) but i can do it in a c language if people want. ok so if you really want an offline editor post here, also tell me what you want in it(features) kay - o?
_____________________
i've got nothing. ;)
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-30-2003 11:05
Add me to that list, too, please.

And also put down my vote for C++ over Java. Don't like Java and don't want to install a JVM on my machine (C# would be better, then I could even help out. ;))

Let's see, features:
- MDI
- object hierarchy with multiple scripts per object, so we can test link communications and interactions.
- multiple objects opened with executing scripts at the same time, for testing inter-object communications and interactions
- ability to send "chat text" that can be picked up by scripts listening on channel 0. Be able to specify whether the chat should be sent as owner or non-owner, or multiple non-owners
- better debugging would be nice.
- a few basic, untextured prims for testing some visual effects would be nice, but not necessary.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-30-2003 16:22
Personally Nada, please keep working on a Java version... IMO, youll definately have less complaints by the linux/mac users in the long run. (Just make sure your using non-operating specific, standards compliant Java code).

I would love an offline IDE, notepad is just waaaayyy to basic for me to be editing complicated things in (and no colourcoding eiather lol).

-Chris :D
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
07-30-2003 17:06
grim... so you want me to make a single version of SL? heh, i was thinking it would be more like a syntax checker, and code beautifier(this feature could be toggled), with some frills that aren;t in LSL right now, like dummy statemnts(like the listen event) and things like that. anyone else?
_____________________
i've got nothing. ;)
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-30-2003 17:59
Ooh ooh! Feature request!

Have it do something like the VB code checker does, like have it fill in default values, for example:

if you type in:

"listen(" (without quotes)

It will auto-fill (auto-selected, for quick delete if this is not the correct behavior)

"integer channel, string name, key id, string message)" (w/o quotes)
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Ian Linden
Linden Lab Employee
Join date: 19 Nov 2002
Posts: 183
07-31-2003 10:46
Phoenix developed a basic LSL-mode for emacs, which by necessity is covered by GPL so we could release it. However, right now it has a bug that causes it to occasionally go into an infinite loop. Any elisp wizards out there? I'm pretty sure fixing it would take far less time than writing an editor from scratch.
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
08-19-2003 08:55
Just thought I'd try to revive this thread.

Also, it occurred to me this morning that if someone were good with REgEx (I'm not) they could probably write a custom language definition for UltraEdit. That would at least give us an out-of-world script editor with syntax highlighting.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Rade Galatea
Junior Member
Join date: 22 Apr 2004
Posts: 7
05-07-2004 09:00
I would love that LSL-mode for emacs. Please release it, I will do what I can to try to fix problems with it.
Siobhan Taylor
Nemesis
Join date: 13 Aug 2003
Posts: 5,476
05-07-2004 09:42
*bumpity bump*

Just for the hallibut
_____________________
http://siobhantaylor.wordpress.com/
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
05-07-2004 16:04
Im working on an LSL IDE and Runtime Environment, but dont expect to see it done soon :p
==Chris
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
05-09-2004 02:04
OOOOH Chris! Can I help with that? Pretty please? :D
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
05-09-2004 02:09
From: someone
Originally posted by Ian Linden
Phoenix developed a basic LSL-mode for emacs, which by necessity is covered by GPL so we could release it. However, right now it has a bug that causes it to occasionally go into an infinite loop. Any elisp wizards out there? I'm pretty sure fixing it would take far less time than writing an editor from scratch.

YO PHOENIX!!!!
I lurves j00.
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
05-09-2004 02:18
From: someone
Originally posted by Eggy Lippmann
OOOOH Chris! Can I help with that? Pretty please? :D


Sure, but it's done in Java, still want to? ;)

Plus, I dont know how things work when you have more then one dev on a project... isnt there some CVS thingy we have to use?

Trust me, I can use the help. The main reason I started on it was because I really want to learn more about compilers and Java :D
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
05-09-2004 03:51
Well of course it's in Java. I wouldn't know how to pop a window open in C if the code fell on my lap and kissed me. Besides I dont have a C compiler for windows.
How's it going, where do you want to take it, and how can I help?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
05-09-2004 16:50
From: someone
Originally posted by Eggy Lippmann
Well of course it's in Java. I wouldn't know how to pop a window open in C if the code fell on my lap and kissed me.

LOL!! Mind if I use that as my sig? :D

From: someone
Originally posted by Eggy Lippmann
Besides I dont have a C compiler for windows.
How's it going, where do you want to take it, and how can I help?


Its really lazzes-faire right now... I need to take a good few hours planning it out. This weekend/week hasnt been pleasent for me, the horrible cold I caught last monday hasn't let go of my trachea.

I basicly want to take it to the point where the program runs scripts just (or practically) like SL does, but without the cool 3D stuff :D. The IDE will mimic the scripting environment of SL as much as possible.

I think Im getting ahead of myself though, I really need to plan more before I start to ramble :)

When/where/how would be a good way to get in touch?
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
05-09-2004 17:16
Haha well its not like you needed my permission for the last time you quoted me in your sig :D
You have my email, and I believe you're also on my icq contact list, though you never show up.
All my contacts are on my profile anyway.
I am on MSN, ICQ and AIM every day. I hardly ever open yahoo though.
I think due to the time zones the best way would probably be email.
And its "laissez-faire" ;)
Upshaw Underhill
Techno-Hobbit
Join date: 13 Mar 2003
Posts: 293
05-10-2004 14:08
Whomever is still working on one be sure to add me to the list of beta testers :)

UU
Kronocide Korvin
Registered User
Join date: 19 Jun 2005
Posts: 3
06-24-2005 06:47
An LSL mode for Emacs would be teh w1n! How can you code without one??
Helen Quatro
Cephalopod Overlord
Join date: 6 Sep 2005
Posts: 24
11-05-2005 19:29
Was the LSL-mode for emacs by Phoenix ever released? I would love to have it.
Reinhard Neurocam
Registered User
Join date: 29 Oct 2005
Posts: 3
LSL emacs mode?! where is it?
11-29-2005 11:34
It seems that more than 2 years ago(!), Linden has spread the rumor of an LSL-mode for emacs, but has anyone here been able to locate it already? If so, could you please put a link to it into this forum.

If not, this reminds me of the empty promises and baseless rumours spread for some 2 years already about the release of a GNU/Linux SL-client... seems like a pattern to me :(

Hoping for the best,
Reinhard.
Adam Marker
new scripter
Join date: 2 Jan 2004
Posts: 104
11-29-2005 12:36
Try asking for the Emacs thingy in the "Hotline to Linden" forum. They've been reasonably good about finding other things (like the lex file).
Phoenix Linden
SL's Angel of Death
Join date: 3 Dec 2002
Posts: 168
11-29-2005 13:45
It could use some TLC, but here's what I have:

;;; lsl.el -- Major mode for editing lsl files

;; Author: Phoenix
;; Created: 2002.10.27

;; Copyright (c) 2002 Linden lab

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.

;; This program is distributed in the hope that it will be
;; useful, but WITHOUT ANY WARRANTY; without even the implied
;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
;; PURPOSE. See the GNU General Public License for more details.

;; You should have received a copy of the GNU General Public
;; License along with this program; if not, write to the Free
;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
;; MA 02111-1307 USA


;; To install lsl-mode, put lsl.el in your user elisp directory. I
;; recommend adding the following code to your ~/.emacs file.
;;
;;(add-to-list 'load-path "<path-user-elisp>";)
;; (load "lsl.el";)
;; (require 'lsl-mode)
;; (setq auto-mode-alist (append auto-mode-alist
;; (list
;; '("\\.lsl$" . lsl-mode)
;; )))
;;
;; In addition, here is a sample mode hook. You may want to do other
;; customizations or not even bother with a hook.
;;
;;(defun phoenix-lsl-mode-hook ()
;; (setq indent-tabs-mode nil)
;; (setq-default tab-width 4)
;; (font-lock-mode 1)
;; (font-lock-fontify-buffer)
;; (message "phoenix-lsl-style function executed";))
;;(add-hook 'lsl-mode-hook 'phoenix-lsl-mode-hook)


;; simple stuff for lsl mode. All modes should define this class of
;; stuff.
;;

(defvar lsl-mode-hook nil)
(defvar lsl-mode-map nil "Keymap for lsl major mode";)

(if lsl-mode-map nil
(setq lsl-mode-map (make-keymap))
(define-key lsl-mode-map "{" 'lsl-electric-brace)
(define-key lsl-mode-map "}" 'lsl-electric-brace))

(defun lsl-electric-brace ()
"insert a brace"
(interactive)
(insert last-command-char)
(forward-char 1)
(indent-according-to-mode)
(and (eq last-command-char ?\})
old-blink-paren
(save-excursion
(funcall old-blink-paren))))


;; provide good syntax highlighting
;;

;; minimal highlighting provided by:
;; (regexp-opt '("integer" "float" "string" "key" "vector" "rotation" "list";) t)
;; (regexp-opt '("for" "do" "while" "if" "else" "jump" "@.*";) t)
;; (regexp-opt '("default" "state_entry" "state_exit" "touch_start" "touch" "touch_end" "collision_start" "collision" "collision_end" "land_collision_start" "land_collision" "land_collision_end" "timer" "listen" "sensor" "no_sensor" "control" "at_target" "not_at_target" "at_rot_target" "not_at_rot_target" "money" "email" "run_time_permissions" "changed" "attach" "moving_start" "moving_end" "on_rez" "link_message";) t)
;; (regexp-opt '("TRUE" "FALSE";) t)
(defconst lsl-font-lock-keywords-1
(list
'("\\(float\\|integer\\|key\\|list\\|rotation\\|string\\|vector\\)" . font-lock-type-face)
'("\\(@.*\\|do\\|else\\|for\\|if\\|jump\\|while\\)" . font-lock-keyword-face)
'("\\(at\\(?:_\\(?:\\(?:rot_\\)?target\\)\\|tach\\)\\|c\\(?:hanged\\|o\\(?:llision\\(?:_\\(?:end\\|start\\)\\)?\\|ntrol\\)\\)\\|default\\|email\\|l\\(?:and_collision\\(?:_\\(?:end\\|start\\)\\)?\\|i\\(?:nk_message\\|sten\\)\\)\\|mo\\(?:ney\\|ving_\\(?:end\\|start\\)\\)\\|no\\(?:_sensor\\|t_at_\\(?:\\(?:rot_\\)?target\\)\\)\\|on_rez\\|run_time_permissions\\|s\\(?:ensor\\|tate_e\\(?:ntry\\|xit\\)\\)\\|t\\(?:imer\\|ouch\\(?:_\\(?:end\\|start\\)\\)?\\)\\)" . font-lock-builtin-face)
'("\\(\\(?:FALS\\|TRU\\)E\\)" . font-lock-constant-face))
"Minimal highlighting for lsl mode";)

;; more highlighting provided by:
;; (regexp-opt '("PI" "TWO_PI" "PI_BY_TWO" "DEG_TO_RAD" "RAD_TO_DEG" "SQRT2" "NULL_KEY";) t)

(defconst lsl-font-lock-keywords-2
(append lsl-font-lock-keywords-1
(list
'("\\(DEG_TO_RAD\\|NULL_KEY\\|PI\\(?:_BY_TWO\\)?\\|RAD_TO_DEG\\|SQRT2\\|TWO_PI\\)" . font-lock-constant-face)))
"Additional highlighting in lsl mode";)

;; max highlight provided by:
;; (regexp-opt '("STATUS_PHYSICS" "STATUS_PHANTOM" "STATUS_ROTATE_X" "STATUS_ROTATE_Y" "STATUS_ROTATE_Z" "AGENT" "ACTIVE" "PASSIVE" "SCRIPTED" "PERMISSION_DEBIT" "PERMISSION_TAKE_CONTROLS" "PERMISSION_REMAP_CONTROLS" "PERMISSION_TRIGGER_ANIMATION" "PERMISSION_ATTACH" "PERMISSION_RELEASE_OWNERSHIP" "PERMISSION_CHANGE_LINKS" "PERMISSION_CHANGE_JOINTS" "PERMISSION_CHANGE_PERMISSIONS" "INVENTORY_TEXTURE" "INVENTORY_SOUND" "INVENTORY_OBJECT" "INVENTORY_SCRIPT" "ATTACH_CHEST" "ATTACH_HEAD" "ATTACH_LSHOULDER" "ATTACH_RSHOULDER" "ATTACH_LHAND" "ATTACH_RHAND" "ATTACH_LFOOT" "ATTACH_RFOOT" "ATTACH_BACK" "LAND_LEVEL" "LAND_RAISE" "LAND_LOWER" "LAND_SMALL_BRUSH" "LAND_MEDIUM_BRUSH" "LAND_LARGE_BRUSH" "LINK_SET" "LINK_ROOT" "LINK_ALL_OTHERS" "LINK_ALL_CHILDREN" "CONTROL_FWD" "CONTROL_BACK" "CONTROL_LEFT" "CONTROL_RIGHT" "CONTROL_ROT_LEFT" "CONTROL_ROT_RIGHT" "CONTROL_UP" "CONTROL_DOWN" "CONTROL_LBUTTON" "CONTROL_ML_LBUTTON" "CHANGED_INVENTORY" "CHANGED_COLOR" "CHANGED_SHAPE" "CHANGED_SCALE" "CHANGED_TEXTURE" "CHANGED_LINK" "TYPE_INTEGER" "TYPE_FLOAT" "TYPE_STRING" "TYPE_KEY" "TYPE_VECTOR" "TYPE_QUATERNION" "TYPE_INVALID";) t)
(defconst lsl-font-lock-keywords-3
(append lsl-font-lock-keywords-2
(list
'("\\(A\\(?:CTIVE\\|GENT\\|TTACH_\\(?:BACK\\|CHEST\\|HEAD\\|L\\(?:FOOT\\|HAND\\|SHOULDER\\)\\|R\\(?:FOOT\\|HAND\\|SHOULDER\\)\\)\\)\\|C\\(?:HANGED_\\(?:COLOR\\|INVENTORY\\|LINK\\|\\(?:S\\(?:CAL\\|HAP\\)\\|TEXTUR\\)E\\)\\|ONTROL_\\(?:BACK\\|DOWN\\|FWD\\|L\\(?:BUTTON\\|EFT\\)\\|ML_LBUTTON\\|R\\(?:\\(?:IGH\\|OT_\\(?:LEF\\|RIGH\\)\\)T\\)\\|UP\\)\\)\\|INVENTORY_\\(?:OBJECT\\|S\\(?:CRIPT\\|OUND\\)\\|TEXTURE\\)\\|L\\(?:AND_\\(?:L\\(?:ARGE_BRUSH\\|EVEL\\|OWER\\)\\|MEDIUM_BRUSH\\|RAISE\\|SMALL_BRUSH\\)\\|INK_\\(?:ALL_\\(?:CHILDREN\\|OTHERS\\)\\|\\(?:ROO\\|SE\\)T\\)\\)\\|P\\(?:ASSIVE\\|ERMISSION_\\(?:ATTACH\\|CHANGE_\\(?:\\(?:JOINT\\|LINK\\|PERMISSION\\)S\\)\\|DEBIT\\|RE\\(?:LEASE_OWNERSHIP\\|MAP_CONTROLS\\)\\|T\\(?:AKE_CONTROLS\\|RIGGER_ANIMATION\\)\\)\\)\\|S\\(?:CRIPTED\\|TATUS_\\(?:PH\\(?:ANTOM\\|YSICS\\)\\|ROTATE_[XYZ]\\)\\)\\|TYPE_\\(?:FLOAT\\|IN\\(?:TEGER\\|VALID\\)\\|KEY\\|QUATERNION\\|STRING\\|VECTOR\\)\\)" . font-lock-constant-face)))
"Maximum highlighting in lsl mode";)

;; set default font lock behavior
(defvar lsl-font-lock-keywords lsl-font-lock-keywords-3
"Default lsl mode highlighting";)

;; indentation
;;

(defun lsl-indent-line ()
"Indent current line as best we can based on hints we can find"
(interactive)
(beginning-of-line)
(if (bobp)
(indent-line-to 0)
(let ((not-indented t) cur-indent)
(if (looking-at "^[ \t]*}";)
(progn
(save-excursion
(forward-line -1)
(if(looking-at "^[ \t]*{";)
(setq cur-inden (current-indentation))
(setq cur-indent (- (current-indentation) default-tab-width)))))
(while not-indented
(save-excursion
(forward-line -1)
(if (looking-at "^[ \t]*{";)
(progn
(setq cur-indent (+ (current-indentation) default-tab-width))
(setq not-indented nil))
(if (looking-at "^[ \t]*}";)
(progn
(setq cur-indent (current-indentation))
(setq not-indented nil))
(if (bobp)
(setq not-indented nil)))))))
(if cur-indent
(progn
(if (< cur-indent 0)
(setq cur-indent 0)))
(setq cur-indent 0))
(indent-line-to cur-indent))))


;; syntax table
;;

(defvar lsl-mode-syntax-table nil "Syntax table for lsl-mode";)
(defun lsl-create-syntax-table ()
(if lsl-mode-syntax-table
()
(setq lsl-mode-syntax-table (make-syntax-table))
(set-syntax-table lsl-mode-syntax-table)

;; treat underscored words as words
(modify-syntax-entry ?_ "w" lsl-mode-syntax-table)

;; make c++ style comments
(modify-syntax-entry ?/ ". 12b" lsl-mode-syntax-table)
(modify-syntax-entry ?\n "> b" lsl-mode-syntax-table)))

;; entry function
;;

(defun lsl-mode ()
"Major mode for editing lsl files for SecondLife"
(interactive)
(kill-all-local-variables)
(lsl-create-syntax-table)
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(lsl-font-lock-keywords))
(make-local-variable 'indent-line-function)
;;(setq indent-line-function 'lsl-indent-line)
(setq major-mode 'lsl-mode)
(setq mode-name "lsl-mode";)
(run-hooks 'lsl-mode-hook))


;; provide this mode. User will need to require this mode in their
;; environment
;;

(provide 'lsl-mode)

;;; lsl.el ends here
Zar Zadoq
Learning the Second Life
Join date: 8 Nov 2004
Posts: 21
Thank you for the lsl.el emacs lsl mode!!!
12-01-2005 22:47
Ahhhhh, I feel so much cleaner now..... :)
Reinhard Neurocam
Registered User
Join date: 29 Oct 2005
Posts: 3
thanks for the emacs-mode!!
02-01-2006 14:28
haven't tried it yet, but for that post alone you deserve a lot of TLC... :)
1 2