nurdglaw 2014-02-08: Is anyone using tcljs? I'm doing a home project to scrape some data off the web. No sooner had I got my system working to my liking, than the website came up with a new version that makes extensive use of JavaScript. Rather than eyeball the page sources and emulate what they were doing in the way of setting up links, which I did fairly successfully for version 1 of my program, I thought I'd try and execute the JavaScript and work with the generated HTML.
So, I downloaded tcljs. It said to download spidermonkey, so I did that. I built SpiderMonkey and tried to build tcljs. Hmm, where's Linux_ALL_DBG.OBJ? I downloaded and built an older version of SpiderMonkey. Still couldn't build tcljs - it couldn't find libfdm.a. Delved into the Makefiles, and identified a SpiderMonkey Makefile to builld it that didn't seem to have been executed. Executed it. Wahay! I can now build tcljs, although it needed some work to build the dox.
make test fails big time with a core dump, but maybe that's not going to be a big problem. Oh dear, it is a big problem:
$ tkcon % package require TclJs % set i ::js::interp % $i interp {print "Hello, World"}
core dumps.
I've just tried sending "var i; i=0; i+1" to a JavaScript interpreter and that doesn't coredump, and I've also sent the scripts from the website to an interpreter and that didn't coredump either, so maybe I can live with it, but it looks like I've got a problem somewhere (in addition to my less than adequate knowledge of how to write JavaScript).
I'll have a go at building tcljs on top of the current SpiderMonkey, and report back here how I get on. In the meantime any help or hints about the coredump would be much appreciated.
Standard disclaimer: I don't use the wiki much, apologies if I've put my question in the wrong place. Please correct me gently.