From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-x235.google.com (mail-we0-x235.google.com [IPv6:2a00:1450:400c:c03::235]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 79CED7869E for ; Thu, 13 Mar 2014 09:51:11 -0700 (PDT) Received: by mail-we0-f181.google.com with SMTP id q58so1108065wes.12 for ; Thu, 13 Mar 2014 09:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=dxQcJ/3o48TuDZ2r5YyIzyjBBxOFPMnpEYv7hr2kM1g=; b=Y9Bl8CS6aTg8FrPt2J0/Lh2fSvsHDbwNo1Ipgf9PzzYt99VAx7Vzlnm7OwWzGEPVoW aIiFiStSEimb8+JLaBBebqo3Q43oiwKKWuCqGc3QVzlbZfYZuPtK1ug2XyDFnaZvbP2S nLToy4aPkU0XE67sg5AAEEuiYgoaKGg8mz05VUoui1/DKCpWUY/wHWC3d0BEP0Uu0HfG +GKqE0vBSWWfS3gT5nFq5Wp7oe4IAOSAJn8TNSvZhUhAqaDTdZLwHmI56GEt4GFtBTDI B25w11jOowh2F7JmPP9MInYx7GdPKCGrZlZWRUDgUbzqZbsoR6y9M5yOlhXx/KWSoGn6 gh7Q== X-Received: by 10.194.174.135 with SMTP id bs7mr35371wjc.94.1394729385693; Thu, 13 Mar 2014 09:49:45 -0700 (PDT) Received: from toaster.adamthompson.me.uk (toaster.adamthompson.me.uk. [2001:8b0:1142:9042::2]) by mx.google.com with ESMTPSA id uq2sm6979973wjc.5.2014.03.13.09.49.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 13 Mar 2014 09:49:44 -0700 (PDT) Date: Thu, 13 Mar 2014 16:49:41 +0000 From: Adam Thompson To: Karl Dahlke Message-ID: <20140313164941.GQ13789@toaster.adamthompson.me.uk> References: <20140213104345.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VouvK5X/VR+fp5FT" Content-Disposition: inline In-Reply-To: <20140213104345.eklhad@comcast.net> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: Edbrowse-dev@lists.the-brannons.com Subject: Re: [Edbrowse-dev] Dynamic Menus X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2014 16:51:11 -0000 --VouvK5X/VR+fp5FT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 13, 2014 at 10:43:45AM -0400, Karl Dahlke wrote: > Yes, they work now! > It's not intrusive; if they give you any trouble at all then just > comment out the call to rebuildSelectors() in html.cpp. Well done for getting this working. > Bring up jsrt, select a state, > and You get two different sets of colors to choose from below, > depending on whether the state is A through M or N through Z. > This is how a lot of real world sites work. Yeah, all works as expected on my machine. > Fun? Sure it was fun, always fun to program new and interesting features. Agreed. > Expedient? Without doubt. I'm Trying to support more websites. Yep, and this got in before the release which is a good thing. > Forward looking? Well maybe. Just a little. > My tags continue to be the representation of the page, js independent, > and then the render selector function is part of a post scan, > to see which js objects have changed, > and map those changes back to the html tags, and report same to user. > Maybe it's a prototype for where we want to go. Yeah perhaps. > Oh by the way, scanning the tree of js objects with a 100% js function, > and doc writing the output in some ascii string, > and converting that back into tags, > that nifty idea is dead on arrival. > Writing a prototype is a great way to see what works and what doesn't. > It doesn't work because I don't have a good way to embed pointers to the > js objects in the ascii output stream. > Oh maybe a way %p but not a good way, > and I need each html tag to point (t->jv) to its corresponding js object. > And there are other ways that it doesn't work so well, as Adam has noted. I hadn't thought of the pointer thing, as you say prototyping is always a good idea. > My first post-scan function isn't really too bad. > It plods along, but none of the code is hard to follow. > See rebuildSelector and rebuildSelectors in jsloc.cpp. When I've got a bit more time I'll do this. > If you have a moment, look at these and we can think about how > it might scale up to a more general post-scan of any changes on the page. > Also the newSelect() function in jsrt. Yes, sounds interesting. Unfortunately my spare time is somewhat limited at the moment, so I doubt I'll be able to seriously look through the code for at least a week. > Meantime it's a little code that helps a lot. > It's kind of cool to pick the state and have new colors appear > in the submenu below. Agreed, and it seems to run quickly as well. > One more observation, with jspool = 2, smallest it can be, I ran into a site > wherein things stopped working properly, > but they worked fine with a larger jsppool. > So I think sometimes we run into memory errors that aren't reported to us, > and so we don't shut down js as we should. Yeah. > Adam mentioned this in a recursive situation. > So sm js continues to hold mysteries. I think the recursive situation is slightly different since I ran with jspool=8 and jspool=128 and got the same limit, so it looks like smjs has some other setting controlling internal stack size (or maybe just a recursion limit somewhere). It'd be cool if we could alter this as well. Also, once it stopped recursing, I could re-run the function again without doing anything to js. Would it be useful if I put a "Recurse" button in jsrt? Cheers, Adam. --VouvK5X/VR+fp5FT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTIeGlAAoJELZ22lNQBzHOI0AH/172XTGvu/B3LcSv0jSMuNNF nwW0sSZZogbKq3HIYwZxTltoU0z5fIIQX6v76/IPTKtFvazMqPLC7q5+ufDl7/sh 60L0rkHYS03Q0AH7TltbzR5V1oHwU322thW55JvZZ+/bhTHSgPURq5moOJDcxHlE QceJkcq7IedKBCR+sNzxqBK81acGOrctFc/odebnhL0eU807uwZMb4SVM1+a1gLV 4USbuWv1wpPyrb9cbex7KAEzA0+n1BBDTWlpBRLyd2+W4CvfXpxol+rQYE2JgR0m +3Gj6WghVhJX7On0LGHm+CjyazdFkEuhKaJ7L/FzvJL2Q2qfH9KgjRJ++k9E3pQ= =zJcV -----END PGP SIGNATURE----- --VouvK5X/VR+fp5FT--