Difference between revisions of "User:JB Kraft"

From Second Life Wiki
Jump to navigation Jump to search
Line 3: Line 3:


I'm a professional programmer/musician. I'm mostly here for the code and somewhat for the insanity :) I'm literate in most major languages with a bias to C++, Python, Smalltalk and Lisp and I'm a *nix head from way back; yeah BL (Before Linux). Don't ask me anything about Windoze.
I'm a professional programmer/musician. I'm mostly here for the code and somewhat for the insanity :) I'm literate in most major languages with a bias to C++, Python, Smalltalk and Lisp and I'm a *nix head from way back; yeah BL (Before Linux). Don't ask me anything about Windoze.
== FireFox ==
Add SL search engine to firefox search bar. Save this file in $FIREFOX/Profiles/$YOUR_PROFILE/searchplugins and restart FF.
<lsl>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">">
<ShortName>SL Search</ShortName>
<Description>Search SL from Firefox</Description>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAAAAAAEtLSwtDQ0MoQUFBXj8%2FP9U1NTXWNzk25Dg6N%2BU1NzXkOjo630BAQIYAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAFGRkYTPT09RUBBPeKDil34tLdw%2F93ac%2F%2Fl33H%2FyMNs%2F6OiZP1DRTnoPj4%2ByAAAAAAAAAAAAAAAAAAAAABfX18ERUVFIUhKQt%2FAzHP%2BtL91%2BoCIZtlXW0zMSExC41dZSeqsr3H3z9Bz%2F0BDOeNAQECyAAAAAAAAAAAAAAAAVVVVBjw8PMKxw3n8madt9kNEQcA7PDu0iZFi9cbOfP%2BVm2X8PT8846CpcPeMl2P3Pz8%2FuEFBQW8AAAAAAAAAAE5OTglCREHErcl6%2F0hORNs%2FPz%2FHVl5N5cjZev%2FL2nn%2Fytl4%2F1xjTfNIS0X5orV6%2FT09Pa9BQUFgQ0NDKgAAAABLS0sLRkpFy7DThP9qeWbwYnBX8E1SSfrJ5on%2Fx%2BGI%2F3WCa%2Fd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</Image>
<Url type="text/html" method="GET" template="http://secondlife.com/app/search/search.php">
<Param name="q" value="{searchTerms}"/>
<Param name="s" value="All" />
</Url>
</OpenSearchDescription>
</lsl>


== SL ==
== SL ==

Revision as of 12:10, 27 March 2008

c'est moi

CV

I'm a professional programmer/musician. I'm mostly here for the code and somewhat for the insanity :) I'm literate in most major languages with a bias to C++, Python, Smalltalk and Lisp and I'm a *nix head from way back; yeah BL (Before Linux). Don't ask me anything about Windoze.

FireFox

Add SL search engine to firefox search bar. Save this file in $FIREFOX/Profiles/$YOUR_PROFILE/searchplugins and restart FF.

<lsl> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">"> <ShortName>SL Search</ShortName> <Description>Search SL from Firefox</Description> <Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAAAAAAAAAAAEtLSwtDQ0MoQUFBXj8%2FP9U1NTXWNzk25Dg6N%2BU1NzXkOjo630BAQIYAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQAFGRkYTPT09RUBBPeKDil34tLdw%2F93ac%2F%2Fl33H%2FyMNs%2F6OiZP1DRTnoPj4%2ByAAAAAAAAAAAAAAAAAAAAABfX18ERUVFIUhKQt%2FAzHP%2BtL91%2BoCIZtlXW0zMSExC41dZSeqsr3H3z9Bz%2F0BDOeNAQECyAAAAAAAAAAAAAAAAVVVVBjw8PMKxw3n8madt9kNEQcA7PDu0iZFi9cbOfP%2BVm2X8PT8846CpcPeMl2P3Pz8%2FuEFBQW8AAAAAAAAAAE5OTglCREHErcl6%2F0hORNs%2FPz%2FHVl5N5cjZev%2FL2nn%2Fytl4%2F1xjTfNIS0X5orV6%2FT09Pa9BQUFgQ0NDKgAAAABLS0sLRkpFy7DThP9qeWbwYnBX8E1SSfrJ5on%2Fx%2BGI%2F3WCa%2FdLUEj8jaJz%2BoKVbfVBQUGVQUFBVkNDQygAAAAATExMCkhNR8644pX%2FWWVb4LbbnPrC66T%2FyPOk%2F8jyo%2F%2Bx1Jn%2Bttyd%2Fq7SlfxFSUbSQEBAkkFBQVdCQkIrAAAAAE9PTwhMUkvQv%2Bqj%2Fz0%2BPepKUkrTSk9K93uScu9WX1L7iqN%2F90dMRvhSWE77PDw870BAQKVBQUFlQkJCNAAAAABZWVkFUlpR1bvjqvk%2BPj70yeqj%2FkdMQuCTpnr2TFJD6azBivpDRUD0qL%2BI%2BVNbSOhAQEC0QUFBdEFBQUAAAAAAX19fBIOajVtFR0bIREdD4s%2F2qf9ARD7fzOec%2Fl9pUO2uxIz6aXRX8XWEZ%2B%2BNpHr4Pj4%2BvEBAQINBQUFIAAAAAAAAAABZWVkFPz8%2FsYGafNTJ8LT%2BPUE%2F2s%2Fxpv9eaVPrl7CE9oigefdOV07hrtWg%2FzU2NsJAQECGQUFBQQAAAAAAAAAAampqAz4%2BPre32rL1p8ag%2BD9DQdXN%2B7z%2FWWRW5nqTd%2B6jy538PUA%2F0a7eqP5ETETGQUFBY0JCQi4AAAAAAAAAAGpqagM8PT3D0vrN%2FnyQeuhITknLz%2F7K%2F01XTd9ofGrguOq0%2Fjs9PL2QsZXbVGFXi0JCQixFRUUXAAAAAAAAAABqamoDS1JMpNT91f9da17BVmJYt9D%2Bz%2F9GTUbPW2tex7rzuf86PTurQUFBVUNDQyZJSUkNVVVVBgAAAAAAAAAAf39%2FAk9UUX211rrCWWlc12uAcKjM%2FM%2F%2FQklDq05YU3yt3LLnWWhc2UNDQyRHR0cRQEBAAwAAAAAAAAAAAAAAAAAAAABfX18EX19fBE9PTwhsfnVTrtC0w1lpXNRDQ0MiRkZGE05OTglVVVUGX19fBAAAAAAAAAAAwA8AAIAHAACAAwAAgAEAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADAAAAAwAAAAMAA%2F%2F%2FAAf%2F%2F4AP%2F%2Fw%3D%3D</Image> <Url type="text/html" method="GET" template="http://secondlife.com/app/search/search.php"> <Param name="q" value="{searchTerms}"/> <Param name="s" value="All" /> </Url> </OpenSearchDescription> </lsl>

SL

I run a scripting/gadget biz in SL under the handle Kwerks but mainly do custom work. Feel free to give me a buzz if you have something on your mind. The lab is in Alleni/66/190/31.

JIRA

Some viewer patches I have lobbed at the JIRA

Load/save script files to the editor from local disk
https://jira.secondlife.com/browse/VWR-5206
Autosave scripts in case of crash
https://jira.secondlife.com/browse/VWR-5215
Line number gutter for script editor
https://jira.secondlife.com/browse/VWR-5283
Toggle comment selection for script editor
https://jira.secondlife.com/browse/VWR-5304
Preference panel for the script editor
https://jira.secondlife.com/browse/VWR-5318

LSL

Escape XML
http://wiki.secondlife.com/wiki/EscapeXML
Texture Cycle
http://wiki.secondlife.com/wiki/Texture_Cycle
Voting Script
http://wiki.secondlife.com/wiki/Vote_Simple
Color Cycle
http://wiki.secondlife.com/wiki/Color_Cycle
PHP5 class for the XTEA impl
http://wiki.secondlife.com/wiki/XTEA_Strong_Encryption_Implementation#XTEA_LSL_.3C-.3E_PHP

Offline LSL Syntax Checker

I use this to do a quick syntax check on LSL files from my normal editors (emacs or TextMate) when I am offline. To build this you must have the viewer source installed and built on your machine. I built it on OS/X so Linux will probably be fine and I have no clue how to make it go on windows. If you get it to run on windows send me the instructions and I will post them here.

<lsl> /*

* lslcheck.cpp
* macview
*
* Created by JB Kraft.
*
* A small utility to use as a syntax check for LSL scripts outside of 
* Second Life. I built this on OS/X. YMMV.
*
* Building:
* - you need the source code for the viewer installed and compiled on your 
*   machine
* - create a makefile or project or whatever you do and compile this code and
*   link it against libapr-?.a, libllcommon.a
*
* Command line:
* ./lslchecker [FILES...]
*/
  1. include "linden_common.h"
  1. include "lscript_bytecode.h"
  2. include "lscript_error.h"
  3. include "lscript_rt_interface.h"

const std::string ERR_FILE = "out.err"; const std::string DAT_FILE = "out.dat";

/**

*
*/

void usage( ) { std::cout << "lslchecker [FILES]" << std::endl; exit(0); }

/**

*
*/

std::string trim( std::string str ) { std::string::size_type ndx = str.find_last_not_of(" \t\r\n"); str.erase( ndx + 1 ); return str; }

/**

*
*/

void check( std::string fname ) { std::cout << fname << ": "; if( !lscript_compile( fname.c_str(), DAT_FILE.c_str(), ERR_FILE.c_str() )) { // spit out an the output from the error file std::ifstream err( ERR_FILE.c_str() ); if( err.is_open()) { std::string line; while( !err.eof()) { getline( err, line ); std::cout << trim(line) << std::endl; } err.close(); } else { // couldn't read it? std::cout << "!. see file: " << ERR_FILE << std::endl; } } else { // it's good std::cout << "ok" << std::endl; } }

/**

*
*/

int main( int argc, char **argv ) { if( argc == 1 ) { usage(); }

for( int i = 1; i < argc; i++ ) { check( argv[i] ); } return 0; } </lsl>