« first day (10 days earlier)      last day (4941 days later) » 

2:07 PM
k thanks all
 
@Raynos Going to JSON is generally pretty straightforward, so it's hard to imagine doing a terribly bad job. It's going from JSON that can be problematic, because so much type information is absent.
 
@Raynos - what are you using it for? There are new serializers built into .net 4
 
@NickCraver I've had good luck so far with the new serializers
 
aye, same here
 
@NickCraver The system is stuck on .net 2.0 I saw those. Pity I cant use them
 
2:19 PM
Is it the general view that shorter code is more appealing than larger, more robust code?
 
appealing to whom :D
to users, it's the robust that will win every time
 
@sworoc: to "voters", I guess ;)
 
@AndyE depends what you mean with robust code. You can wrap all your mallocs in out of memory checks if you want (C example. you guys think of a javascript example). You need to find a good balance.
 
Pol
Do somebody know why tooltips plugin are not working inside jquery-ui window?
 
Tom
Guys, would you hate me if I attempt to make a preprocessor for javascript that adds things like strict typing?
 
2:21 PM
Well, I'm specifically talking about a comment left on this answer:
3
A: How to list the properties of a javascript object

Andy EAs Sam Dutton answered, a new method for this very purpose has been introduced in ECMAScript 5th Edition. Object.keys() will do what you want and is supported in Firefox 4, Chrome 6, Safari 5 and IE 9. You can also very easily implement the method in browsers that don't support it. However, ...

 
@Tom Yes
 
Which suggests that my answer, while good, isn't as "performant" as the accepted answer. Only the accepted answer doesn't deal with several IE-related bugs.
 
@Tom you will probably not find js a joy to work with if you have strict typing
 
@AndyE - that code is way too long, I suggest a minifier
 
Tom
@Raynos Alright. Then I won't. :(
 
2:23 PM
just use ===, it helps a lot of places
 
Tom
@sworoc, why's that?
 
@NickCraver lol (because I'm sure that was a joke :-P)
 
the whole language is built on not having strict typing, passing references to things and then type juggling
for example, there is only one alert / console.log function, not overloads
i'm not sure what you would do with anon functions either, js does a lot with variable parameter lists
 
Tom
@sworoc, you can give the exceptions like alert and log a type of Dynamic.
 
it may also be a pain to traverse a hash table to verify it is of type [specificObject], when it was created literally instead of with a constructor
 
2:26 PM
@AndyE I like small elegance. With that answer your enuminerating over a json object so you assume your not adding functions in there by accident
 
dunno, I guess you could give it a shot and let us know how it goes :D
 
Pol
Could someone suggest me tooltip plugin that works inside jquery-ui?
 
@AndyE in general cases your answer works. To the specific question your covering unrelated edge cases. Also its high in complexity to average javascript users
 
$(function(){
if(!$("#topbar a[href^='/users/logout']:first").length) return;

var today = new Date(),
UTCtoday = today.getUTCFullYear() + '-' + leftPad(today.getUTCMonth()+1) + '-' + leftPad(today.getUTCDate()),
url = ($("#topbar a[href^='/users/recent/']:first").attr('href').match(/^[^?]+/))[0] + '?StartDate=' + UTCtoday + '&EndDate=' + UTCtoday,
repNode = $('<span class="reputation-score"></span>'),
lsRep = localStorage.getItem("CurRep"),
pageRep = $("#hlinks-user .reputation-score").text();
woops that's not the link
 
@Raynos A "JSON object" parses into a native object, it's best not to assume these things.
 
2:30 PM
 
@AndyE I think it's a good answer, but went over the head of most people viewing the question.
 
I was looking at onbeforeunload and saw it mentioned that using it will prevent the page from being cached.
is there any way to allow the page to still be cached?
 
@sworoc: yeah, I think that's the problem. I guess the main thing is that it's there just in case the users have to come back to the page because the accepted answer doesn't work for them.
 
Yep, I know I've upvoted an answer that was six months old when it saved my butt!
 
@NickCraver does it work in Chrome?
just testing now :-)
 
2:34 PM
only in chrome, I would think
I have a full user-script version here, making some additional adjustments to display it as quick as possible
 
what are you doing?
 
putting today's rep in the header, but not doing the request every page load
 
ah
 
using local storage, only requesting when it changes or every 30 min
 
yeah, actually looked at the code (:
 
2:37 PM
work in progress just thought it'd be handy, yay scripts on a whim
 
Does nick develop on the SO site?
 
negative, I help out here and there :)
 
@NickCraver, that's basically how both scripts in github.com/rchern/StackExchangeScripts got started
 
I see.
 
@NickCraver: I like it, it's pretty great :-) Didn't even know I'd earned 75 rep today.
 
2:41 PM
what tool is used to load these scripts? what browsers do you have setup
 
chrome has built-in support for user scripts
 
(feel free to add it in if you want or as a standalone even, contributions more than welcome)
 
@rchern how do you load those scripts though?
 
just name it whatever.user.js, drag it into a chrome window
 
i guess i missed that, do you have an info link?
 
2:41 PM
@sworoc Chrome accepts userscripts as extensions, of sorts. For Firefox you'll need the Greasemonkey add-on
 
@KeeperOfTheSoul, what @YiJiang just said (:
 
Thats interesting. You can load your own scripts in the browser to interact with public javascript data on a page.
 
Sometimes I can be so behind the times!
 
Thats pretty neat. That has some great plugin potential on a page per page basis
 
@Raynos Technically speaking the GM architecture forbids that (I think) but there are ways to get around it.
 
Chrome GM scripts don't support unsafeWindow, which is a real shame.
 
so GM scripts dont have access to global state ?
 
You have access to the window and other DOM object, but not any script defined functions, variables or properties, global or otherwise
 
The work around in Chrome is to inject your script into the page by creating a script element.
 
2:46 PM
:(
 
Aw thats a shame. if other scripts make state global you should ahve access
 
@YiJiang: I mean to say "Chrome GM scripts..." (and I've edited it in :-p)
 
would be kinda cool to have a single place to find scripts for SE, hrm. not sure people would go for it though
 
/highlights
 
@sworoc Refresh before trying it :P
 
2:49 PM
@rchern: kind of like this:
35
Q: GreaseMonkey Script Ideas & Best of StackOverflow GreaseMonkey Implementations

ChesterThe past few days there have been some interesting GreaseMonkey scripts thrown around to improve navigation, searching, and overall user experience. I'd like to know what GreaseMonkey scripts folks have created or think would be a good idea for others to use going forward. If your suggestion is...

?
 
okay, I'm failing at this.... it says the extension is loaded in the extensions tab @rchern
 
Most of the GM scripts there use unsafeWindow, so they don't work in Chrome.
 
@AndyE, kind of. you're still going all over for the actual scripts though
@sworoc, refresh the page after you've installed the extension
 
/highlights
hmm, still not working for me after a new tab, load page, and refresh
This technology computer stuff is killing me
 
did you intsall from stackflair? uninstall and use stackflair.com/SEChatModifications.user.js
did you intsall from stackflair? uninstall and use stackflair.com/SEChatModifications.user.js
stupid user.js extension ):
 
2:53 PM
ah, ok
 
@rchern Double post
 
@YiJiang it's done that to me a few times as well
 
See if this gives any issues: jsfiddle.net/nick_craver/5K33F
See if this gives any issues: jsfiddle.net/nick_craver/5K33F
creating the elements ASAP in plain JS, goes and fetches an updated score afterwards if it's the first load or overall rep has changed
 
@NickCraver Okay, that's the second double post in a row
Think we might want to get a mod to look at this
 
wins
 
Tom
3:02 PM
Q: DOM wise, what is the difference between an element and a node? if any?
are they synonyms?
 
@Tom I believe so
 
@YiJiang - I'm getting 503's like crazy
 
@NickCraver /blame @MarcGravell is in order I think
 
@Tom A node could be an attribute node, or a comment node, or a text node. It is a DOM concept - the DOM consists of nodes of different types that are arranged in a tree. An element is an element node, which is one of the available node types.
 
@tom a node is anything in the DOM tree. an element is most visible things. I believe document is a node but not an element
 
Tom
3:07 PM
I see, thanks
 
Apart from text nodes. those arn't elements I think
Tomalak explained it better.
 
@Raynos You should be using explicit replies (with :{message-id}) when there are multiple people with the same name in the room
Makes it clear that you're replying to the correct person
 
@Raynos Attributes aren't element nodes either, just as comments aren't. They are all nodes nevertheless.
 
@YiJiang I didnt notice i missed the capital T
 
3:19 PM
32 messages moved to Chat feedback
 
coffe time :)
 
Tom
I have a javascript design question for you folks. If I have an object like this: function VertStructureNode(structureNode, prevSiblings, nextSiblings) { } I'm actually expecting the number of prevSiblings, not the objects. So, how do I make this clear? With my previous language I would just do prevSiblings<Int> - do I now have to rename the variable to prevSiblingsNumber ? Seems like this would make var names incredibly long.
 
hello, are most seamless (you don't get that post back feel) achieved via javascript
 
@Tom you could use "Count" instead of "Number"
 
Tom
@sworoc, that doesn't solve the problem of names getting very long though.
 
3:25 PM
seamless websites?
 
@Xaisoft Yes, AJAX and Javascript are used in most "seamless" scenarios
 
i don't know if seamless is the best word
lol
are there alternatives
 
@Xaisoft Flash and Silverlight also can make calls to the server, without a "postback"
 
@Tom the world is verbose
 
ok
 
3:27 PM
@Xaisoft However, AJAX is more tightly integrated with the page, if you are working with page elements. Flash and Silverlight are more like islands, that are separated
 
Tom
@Raynos, long variable names are okay?
 
if you had to pick one javascript developer/ blogger to follow or read, who would it be?
 
@Tom If you feel that all of the information is needed, then sure. You can always provide an alias with a local variable in the first line of your function
function(prevSiblingsCount) {
var preInt = prevSiblingsCount;
@Xaisoft the creator of jQuery, John Resig ejohn.org
 
@Tom Personally I use them all over the place. Together with my 80char limit half my lines are split over two. Its a design decision. My trouble is long lines and what to do with them
 
I turned off javascript and chat.stackoverflow stopped working? What if a user has to disable javascript at work or just disables it for no particular reason
 
3:32 PM
@Xaisoft - their loss :)
 
Tom
Right Raynos
 
"What if they just disabled JavaScript"....what if I just took the wheels off my car? probably wouldn't work as well
 
@Xaisoft It is rare for someone to do so, but support for JS is more widespread than Flash, or virtually any other presentation and scripting tool
 
@Xaisoft no javascript guys can do work without being distracted
 
Anyone know of a query parser for Javascript
A search query parser I mean, that can detect conditionals ("and", "or"), quotes, and parentheses
 
3:33 PM
@sworoc Well, given that most Flash content is embedded using Javascript nowadays... hmmm
 
the main reason I ask this is because it seems like we have to cover all the bases, like people still using IE6? I am tired of supporting IE6, but what if that is a large market share?
 
What happens if I leave a comma on the last property on my object in JSON ? Does it crash and cry like IE?
 
@Raynos sounds like you are iterating over a list, you could do a join with ","
 
@Raynos JSON's quite strict, I think, so yes, most likely.
 
@Xaisoft <!--[if IE6]> <style type="text/css" src="ie6acidtrip.css" /> <[endif]-->
 
3:38 PM
@Raynos Hmm... the answer is no, apparently
>>> JSON.parse('{"hello":"world","yes":"no",}');
Object { hello="world", more...}
>>> JSON.parse('{"hello":"world","yes":"no"}');
Object { hello="world", more...}
It does work
 
@Raynos - it will in the future, if it doesn't now
 
So much for my naive solution. Ill have to write a proper one
 
"JavaScript 1.8.5 note - Starting in JavaScript 1.8.5 (Firefox 4), JSON.parse() does not allow trailing commas"
 
Im looping over a dictionary. I cant find an elegant way of removing the ","
...
 
Tom
Actually, let me rephrase, what is the difference, inside an object, between:
var someMember; and this.someMember; ?
 
3:46 PM
Remember that you can use the fixed font button on the side to give your code samples the correct formatting
Backticks can also be used for inline code, like in the comments
 
@Tom var refers to a local variable. this refers to whatever this refers to.
 
Tom
@Raynos, this refers to an instance of an object.
 
@Tom In this case this can refer to the object itself if it is constucted with a new Constuctor() call. or it can refer to the window scope or anything else
 
var json = [];
for(var el in obj) {
 json.push("\"" + el + "\": \"" + obj[el] + "\"");
}
var final = json.join(", ");
 
Tom
@Raynos, alright, well yes it's constructed with a new call
 
3:49 PM
@Tom that's a crude go at it
 
Tom
@sworoc, what do you mean?
 
@Tom Inside some function in your object. your basically created a more local scope layer with var name; if it cant find the name it will look for this.name
@svoroc that was meant for me rather then tom.
 
@sworoc So a crude solution to the trailing comma problem would be to substring it away :P
 
oops, my fault
 
my crude solution is looping in the foreach statement and checking againts totalmembers
 
3:50 PM
is there a difference between for (var i = 0 .... and for (i = 0 ...
 
Tom
@Raynos, not inside some function of my object, inside the object itself.
 
@wcpro if i isn't delcared the latter adds i to the global namespace
 
thats what i thought, thanks
 
@Tom give me an example of the line of code var name; inside the object?
@wcpro also the latter breaks if strict mode is on
 
Tom
@Raynos
gist: 647151, 2010-10-26 15:51:45Z
 
3:53 PM
@Tom github is under maintance. upload it elsewhere
 
Tom
function InheriXample(firstParam, secParam, thirdParam) {
	this.prototype.publicStaticMember = true;

	var someVar = false;

	this.anotherVar = "hello";
}
 
Anyone know of a search query parser for JS, so I can parse query strings that include conditionals ("and", "or"), the not operatory ("-"), and parentheses?
 
@NudeCanalTroll no, sorry
 
Been searching for a while, you'd think it be a common problem but apparently it's not...
 
I can't say I've run across it personally before
 
3:56 PM
@Tom that function is contained in what? someVar is just a local variable. this refers to whatever the this scope is.
 
Tom
@Raynos, it is not a function, it's an object
 
you would think there would be something to automatically parse queryStrings, I agree
 
@Tom you use the function keyword. its a function
 
Tom
@Raynos, Javascript uses the function keyword for objects right?
 
@Raynos it's a function that is a constructor, calling it with new will instantiate an object
 
3:58 PM
Something called Lucene seems similar
 
@Tom if you do var obj = new InheriXample(bla, bla, bla); then you dont have access to someVar via obj. you can only access obj.anotherVar and obj.publicStaticMember
 
@NudeCT you could use something like adamv.com/dev/javascript/querystring
 
I think that's for query strings in URLs ("asdf.com/?key=val&key2=val2")
 
@Tom You cant access local variables of constuctor functions from within an instance
 
I need something for a query string like one you'd type into google
 
Tom
3:59 PM
@Raynos, so this.name is for public instance members and var name is for private instance members?
 
Hi to all
I can please ask one simple thing?
 
:)
 
go ahead and ask
 
@Tom what do you mean with public instance members and private instance members. var name is only available within the constuctor function and not on any instances
 
4:00 PM
thanks
 
Tom
@Raynos, var name is also available in sub functions of the object right?
 
i have made a script that search for a titles,but i would like make an 'if' like this..
if(title *= 'error'){
 
@Tom @Tom only if sub functions are declared within the constructor creating an obj and then obj.f = function () { return someVar; } breaks
 
search next title
how i can?
 
@Tomalek is going to hate me. I keep forgetting to click reply buttons
 
4:01 PM
var title = $("a.Title[href*='" + id_video + "']").text().toLowerCase();
there's any way?
thanks in advance
 
Tom
@Raynos what do you mean with function return someVar breaks?
 
@Tom your private variable is only available to any function you inline in the constructor. Say function constuctor() { var lol; this.a = function() { return lol; }; } the function obj.a does have access to the local variable. But this is because of how closures work
@Tom All private variables are emulated via closures. Go read up about closures.
 
Anyone can help me for 1 second? please
 
@Luca I'm reading your comment, one moment
 
thanks :)
and excuse for my insistance and disturb
 
4:06 PM
@Luca I think what you're looking for are CSS3 selectors, check here: w3.org/TR/css3-selectors/#selectors
 
Tom
@Raynos, I see, so these are correct namings (description wise)
gist: 647186, 2010-10-26 16:06:30Z
function InheriXample(firstParam, secParam, thirdParam) {
	this.prototype.publicStaticMember = true;
	
	this.publicInstanceMember = "hello";
	
	var privateInstanceMember = false;
}
 
@Tom Remember, all you have in javascript are closures, first class functions & prototypical inheritance. Your trying to emulate the private/public/static variable types using this
 
@Luca are you trying to get the title attribute from an element?
 
Yes
 
@Tom your private variable can only be used by the constructor and any method declared inline within the constructor. If you attach methods outside of the constructor function you do not have access to the private member
 
4:08 PM
@Luca Then try .attr("title")
 
@Luca $("a").attr("title");
 
Tom
@Raynos, I see, then its not really a private instance member.. thank you.
 
no,no :( i need only the function for select the next result(If var title contains 'error')
 
@Tom, if you want "private" variables you can use the following pattern:

function()
{
   var myprivatevar;

   function MyObject(p1, p2, p3)
   {
      var someVar = false;
      this.anotherVar = "hello";
   }

   MyObject.prototype.myfunction = function(p1, p2)
   {
      // do something
   };
}();
 
i think that i need the function .next();
but i don't understand how to adapt :(
 
4:09 PM
@Tom it is a private instance member if you define your entire class inside your constructor.
 
myprivatevar would be available in myfunction.
 
@Luca Why not try "each" to iterate through all titles
 
will be perfect,but also i don't know how to adapt (I'm newbie,excuse me ) :)
 
@Luca I'm not sure I really understand what you're trying to do, can you explain it a little more?
 
@Tom, scope is functional in javascript... when you declare a variable with "var" it exists within the function it was declared in, regardless of other scope ... and it will continue to exist in any other sub functions that are declared (as a closure)
 
4:11 PM
$("a").each(function() {
 if($(this).attr("title") === "error") {
  //match
 }
});
 
Tom
@dlongley, I understand that now. It's difficult to get used to though.
 
yeah, very different from more traditional procedural languages like C/Java
 
function select_title(){

var id = $(".not-viewed").attr("id");

var title = $("a.Title[href*='" + ID3 + "']").text().toLowerCase();

if(titolo *= 'error'){
// HERE NEED THE FUNCTION TO SWITCH TO NEXT RESULT
}else{
window.location.assign(title);
}
}
here the full code
 
its bizarre to think that: for(var i = 0...) will declare "i" for the entire function, not just the loop.
and closures are strange to get used to, but are really quite cool once you do.
 
@dlongley Well you could declare it in a self-executing anonymous function, but that would probably be overkill
 
4:14 PM
:)
 
and then,the script have to select the result switched
with window.location.assign
 
s/probably/undoubtedly
 
$("a.title").each(function() {
    if ($(this).attr("title").search(/error/i) == -1) {
        window.location = $(this).attr("title");
    }
});
@Luca The code I gave you might not work, because I don't know what certain variables are in your code. I don't know what "ID3" is, and I don't know what "titolo" is.
 
Tom
Is this a good example of prototypal inheritance?
gist: 647213, 2010-10-26 16:19:43Z
function InheriXample(firstParam, secParam, thirdParam) {
	this.prototype.publicStaticMember = "";
	
	this.publicInstanceMember = "";
	
	var privateInstanceMember = "";
	
	this.prototype.publicStaticMethod = function() {
		return "";
	}
	
	this.publicInstanceMethod = function() {
		return "";
	}
	
	function privateInstanceMethod() {
		return "";
	}
}

function InheriChild() {
	this.prototype = new InheriXample(); //inheriChild extends InheriXample
	
	this.publicInstanceMethod = function() {
		return "different";
	}
}
 
@Tom excellent
 
4:21 PM
very good
 
@NudeCanalTroll: Oh,excuse me..i have wrote wrong (titolo = title and ID3 = id)
 
Tom
@sworoc, is it needed to say this.prototype.someVar = ... or can I just do prototype.someVar = ... ?
 
@Tom, yeah ... and this might just be a matter of style, but you could declare your private instance method: var privateInstanceMethod = function() { return "";};
 
@NudeCanalTroll: But thanks,i will try as soon as i arrive to home. :)
 
@dlongley I would say it is a matter of style, I usually declare the function as Tom has
 
4:23 PM
Thanks
 
@Tom you need the 'this', otherwise you'll be talking about a global variable 'prototype' ... i'm not sure what that will do, it might actually modify 'window.prototype'
 
@Luca No prob, should mostly work, you might have to tweak it.
 
@Tom need the this in there, you are modifying the prototype of the current constructor
 
Tom
@sworoc, that's what I thought too, if you leave out this. it will point to the current instance right?
oh actually it won't
 
you can also do: 'InheriXample.prototype' if you want or if you are not in the constructor
which can be useful if you want to avoid deeply nesting your code
 
Tom
4:25 PM
@dlongley, alright, thanks
 
curious what y'all think about this and specifically the comments on the other answer. is this valid pattern matching?
1
Q: Js RegExp every other character

DaleI have random strings that are similar to this: 2d4hk8x37m or whatever. I need to split it at every other character. To split it at every character its simply: '2d4hk8x37m'.split(''); But i need every other character so the array would be like this: ['2d', '4h', 'k8', 'x3', '7m'] Your he...

 
@rchern /../g is shorter than /.{2}/
 
eh, true. i think .{2} is a bit more readable though
just curious about it being said this is an abuse of regex
 
its not an abuse, it's a pretty elegant solution.
regex is ridiculously fast in modern browsers anyway, no need to micro-optimize.
 
I think it's a valid pattern, well done
 
4:33 PM
@rchern You could do .split(/(?=(?:..)+$)/) :-P
 
> And what he wanted does not qualify as pattern matching. What you did with your pattern is abuse the way the regex engine searches for matches. While I do consider that clever (and I probably would have used your regex approach), that does not make it pattern matching
@Tomalak, says the person who wanted ".." because it is shorter than ".{2}"?
(;
 
@rchern No, absolutely not an abuse. A short regex carries expressiveness that a loop (or whatever replacement you could come up with) can never have
 
sounds like an esoteric semantic argument ... you are matching a pattern, any two characters.
 
@rchern Heh. :-)
 
just wanted to make sure i'm not passing out bad advice
thanks
 
4:35 PM
@ rchern i don't think you are.
 
@Tom What project are you actaully working on?
 
@rchern Some people just have issues with regex and think they have no use. You made a valid use of a tool to match a pattern
@rchern In my experience it is usually fear of the unknown / misunderstood
 
@rchern Just compare that competing suggestion. Regex of this complexity: see -> understand. for loop doing some math: see -> think -> understand ("Don't make me think" works for code as well)
 
@rchern Also, I like how RegExp is in the title of the question, yet somehow an answer with a RegExp would not be valid
 
@sworoc, it was actually a bit more unbelievable
there were some deleted comments
 
4:39 PM
@sworoc Yes, that and some overused quote of one Jamie Zawinski
 
the OP posted on my answer asking for a working example using .split(). i commented saying you couldn't use split. he then deleted his comment so i deleted mine. then he added a comment saying that my answer didn't answer his question then. he deleted that comment eventually too
 
@rchern But you can use split. :-) (It just makes no sense here)
 
@Tomalak, so post it as an answer. sometimes saying "can't" and "you shouldn't" are the same >_>
 
I've learned to preface my answer with "This is how you could do it that way, but it really isn't the best way", then provide them with the answer they asked for
Usually I include a "this is really the best way to do it" follow up section
 
@rchern No, the question is answered and accepted, also the fact that you can use split if you know your way around regex doesn't make this a viable alternative. :-P
 
4:45 PM
so does anyone in here have a use for/can think of a use for a TLS implementation in JavaScript?
 
gov
hi
 
hi @gov
 
gov
is there any problems if we have multiple document.ready in the same javascript file
I don't want to create new javascript in my prjoect and i want to merge with exisiting one , but that file already has document.ready
 
Tom
@dlongley, I think it would be great for Node.js
 
@Tom, server-side you mean?
 
Tom
4:49 PM
@dlongley, yes.
 
@Tom, i think they might already be using OpenSSL as a backend for that
 
@gov are you using jQuery?
 
gov
yeah
 
Tom
@dlongley, they do, but I heard there are problems with it - also isn't SSL different from TLS?
 
There is no issue with using this multiple places:
$(function() {
//i am ready
});
 
4:50 PM
@Tom, yeah, well, TLS is just the latest version ... and more aptly named
@Tom, since Transport Layer Security is an abstraction and doesn't need to be tied to a Socket.
 
gov
Thanks
 
@Tom, i have two use cases right now ... one is for providing a secure interface to applications that come with a mini-embedded server, and one is for using client-side certificates in the browser...
@Tom, but I'm wondering if there are some other ideas out there
@Tom, it could be used as a component to create a JavaScript browser, but that's more on the list of insane ideas.
 
Tom
@dlongley, client-side javascript apps could use it to send encrypted data to the server?
 
@Tom, yeah, but the JavaScript has to be delivered securely to begin with. This makes it useful for cross-domain requests (with the help of flash to handle the cross-domain issues).
 
@Tom sort of, it would be safe over the wire, but not protecting the data from the client-side user
@dlongley any idea how well it would perform?
Does anybody know if a lang like python has a TLS implementation, js could at least compete with that
 
4:54 PM
@sworoc, it actually performs quite well
 
I think it would be a sweet tool to have, honestly
 
Tom
@dlongley, I dont think you need flash for cross domain communication, see softwareas.com/cross-domain-communication-with-iframes
with HTML5
 
@sworoc, only about twice as slow as the native implementation
on my test machine
@Tom, if you're referring to WebSockets ... it gets tricky, you don't need flash, but since WebSockets provides its own protocol and framing you need to run SSL/TLS over that on the server-side in addition to adding it to the client.
@sworoc, well, if you want to check it out: github.com/digitalbazaar/forge
 
Tom
@dlongley, I am no expert, but I figured TLS/SLL is nothing more than encryption before sending and decryption when receiving
 
@Tom, i want them to come up with something more robust for raw socket access via JavaScript ... they can prevent intranet traversal issues by requiring a whitelist for private IPs like 10.* and 192.168.*... etc.
@Tom, it's a little bit more than that, but that's the basic idea.
 
Tom
4:59 PM
@dlongley, so why would the way of transfer matter? aslong as you can send and retrieve, so you have 2 options: 1. websockets 2. iframe hack (softwareas.com/cross-domain-communication-with-iframes)
 

« first day (10 days earlier)      last day (4941 days later) »