« first day (895 days earlier)      last day (4043 days later) » 

3:00 PM
@BenjaminGruenbaum Who, exactly?
 
@ShotgunNinja Lars Bak, JIT God
 
Java, apart the very first versions where it was interpreted, was never really slow in core computing. You just had to use the same optimizations tricks than in C or C++, think about where to allocate, and so on.
 
Lars Bak is a Danish computer programmer who currently works for Google where he has contributed to the Chrome browser by developing the V8 JavaScript engine. He now lives near Aarhus in Denmark with his wife and two children. Professional life Bak studied at Aarhus University in Denmark, receiving an MS degree in computer science in 1988 after which he became active in designing and implementing object-oriented virtual machines. Virtual machines After participating in the design and implementation of the BETA MjĂžlner System, in 1991 he joined the Self group at Sun Microsystems Laboratori...
2
 
he poeple say i have these tags
<div data-thread="101"></div>
<div data-thread="105"></div>
<div data-thread="1015"></div>
<div data-thread="1041"></div>

with jquery how can i find data-thread 105? i want to add a class to it
 
@dystroy Java, was very slow until it got really fast JIT (similar to Self)
 
3:01 PM
format it
 
<div>no</span>
 
JS was slow until... it got really fast JIT. Doing core stuff like for loops and working with arrays is almost as fast in JS and in C, benchmark it
 
@Shea NO U
 
@Connor $("div[data-thread=105]"), next time use google
 
@Connor $('div[data-thread=105]')
 
3:03 PM
@ShotgunNinja Haha, you troll.
 
@AmaanCheval shhhhhhhhh
 
@ShotgunNinja Python was written in 1991, heavily inspired by ABC. Java was written in 1995, and was intended to replace the C/C++ nightmare.
 
jQuery's cleverly-hidden off-by-one "feature".
 
@AmaanCheval I almost posted a third one, just because I thought three would be better than two
 
@Zirak mind blown
 
3:04 PM
@BenjaminGruenbaum Do people just love assuming things or is it me?
 
ahhh eff it
jQuery('div[data-thread=105]');
 
The java nightmare effectively mostly replaced the C++ nightmare. I guess that counts as a success.
 
@Shea I called him a troll because he answered "How do I get 105?" with "$('..104')"
 
@Connor api.jquery.com/attribute-equals-selector . Either you didn't google, or you did google, which is worse since it was really easy to find in google.
 
Later in the same year (1995), an insignificant language called Mocha was invented. It went through several name changes, and after the dust settles, they agreed on "JavaScript"
 
3:05 PM
oh lol
 
@Zirak Wasn't JavaScript called LiveScript initially?
 
@AmaanCheval You made me try $(..'104') in my console...
 
Not sure about the absolute first name; there was C++++ as well
 
@dystroy Hehe
 
@Zirak oh wait, Mocha was the development name and LiveScript was the product (like Longhorn and Vista)
 
3:06 PM
I meant 'div[data-thread=104]'
 
@dystroy And the C# blessing is now replacing the Java nightmare.
 
Wasn't javascript first used in Netscape server software ? I remember seeing this as a nightmare... I made some server software at that time...
 
Ushering in a new golden age of programming!
 
@ShotgunNinja Amen
 
@dystroy IIRC, the first purpose was to be inserted into the browser. Later on they developed Netscape Server (unsure about name) which used js.
 
3:08 PM
... It's one hour before the we and I still have work to do this week... I have to let you to produce something...
 
Gotta love the word "Enterprise"
Dude, you have two weeks to write the most influential programming language of the 21st century (thus far), chop chop :P
 
Will it be over prostitution if I write a nettuts+ tutorial? I have some good ideas from SO questions, and I could use the money right now...
At least enough for the extra monitor...I miss dual-screening so badly.
 
If you had three quarters, four dimes and four pennies in your pocket you would have $1.19. You would also have the largest number (11) and combination of coins possible without being able to provide change for a dollar.
 
!!is it okay to settle for a crappier screen?
 
3:21 PM
@Zirak Certainly not
 
user986408
are there design patterns for web socket applications? like with node.js?
 
Damn it, you're right...
!!will my plan consist of selling out?
 
@Zirak By all means
 
@skripted Whadya mean?
@SOChatBot Your truth stings.
 
@skripted Certainly. They just haven't been invented yet.
 
3:24 PM
!!should i really do this?
 
@Jan-StefanJanetzky Y U NO MAEK SENSE!? Could not understand shall i really do this? (perhaps you meant to execute a command? If so, prepend the command name with a /)
@Jan-StefanJanetzky No
 
!!should i do it.. now?
 
@Jan-StefanJanetzky I'm not so sure anymore. It can go either way
 
You can build a text-parsing event-dispatching pipeline around WebSockets, or make structured objects represent messages from WebSockets, and have a Mediator object handle dispatching them to the network or to other components... It depends on what you need WebSockets to do.
ARCHITECTURE RAAR
 
@ShotgunNinja hey, that's what I do!
 
3:26 PM
!!should I just shut up about software design and architecture?
 
@ShotgunNinja Yes, absolutely
 
user986408
@ShotgunNinja yea .. something like that! .. i'm looking for papers on architecture of web socket applications because i need them for a thesis
 
T~T
@skripted I don't believe I know of any solid architectures built around WebSockets currently. Ask again elsewhere.
 
@skripted The subject is too fresh to have renowned academic sources on them. You can take a step back and look at socket architecture generally, there're certainly resources on that.
 
user986408
@Zirak good point! thanks
 
3:34 PM
There's always a better solution than a regular expression but the regex one will make you look smarter
 
Ok, so I'm not terribly good at JS, and have looked through a lot of similar questions on SO like this. However, can't figure this one out. It's a problem with variable scope I imagine:
 
anyone know what might cause IE9 to break when there are 2 ("#ele).on('click'); events on the page?
 
`for (var i=0; i<len; i++) {
infoWindows[i] = "hello";
}`
 
by breaks I mean exeicute one and not the other.
 
oops
Well, I have variable within a for loop, and then trying to call it from a anon function, but it is undefined.
google.maps.event.addListener(markers[i], "click", function(e) {
var infoBox = new InfoBox({latlng: e['latLng'], map: map, content: infoWindows[i] });
});
 
3:40 PM
@blackairplane remove the ` and press ctrl + k
 
@blackairplane declare the varable outside the function at the top of the script, then it will be scoped for any functions inside it
 
I declared it as var infoWindows = [];
outside of that function
so the array is being added to properly, but it doesn't pull in that google function I just posted.
 
alert(infoWindows = []); is it undefined?
errp.. alert(infoWindows)
if it's not undefined it should be something like [Object, object]
 
yes, that returns properly right before the google function calle
call
alerts properly*
 
you using the googleloader? to get access to the maps?
 
3:44 PM
correct.
 
Hey all
 
that function is working properly, and if I just change the variable as var=infoWindow = 'hello'; it works within the function
 
oh I see
so it's not getting any data?
 
but only breaks when I try to call that array iteration
correct
 
can i see your loop?
 
3:47 PM
wow you are pretty forward
just met the guy and you already are trying to get at the loop
2
 
Anyone spare in the room to help assist with a javascript if statement i'm having trouble with please?
 
that might be more useful
 
@Loktar Have you played the Hitman games yet?
 
@AmaanCheval no :?
pretty big series and I've never played it
 
Yeah, me neither. I just bought the collection
 
3:50 PM
gaah. my traffic volume for this month is all used now D:
now surfin with 64kbit/s
 
Has anyone had experience with "Splits"? I have an attribute which contains multiple values, separated by a comma. I'd like to know how to extract one value out of the multiple..
 
@Jan-StefanJanetzky Hey! That's slower than what I get :D
 
@Tron everybody here had experience with splits. What's your precise question ?
 
Thanks dystroy.
 
!!> '1,2,3,4'.split(',')[0];
 
3:52 PM
@AmaanCheval i went from 7,2 mbit to 64 kbit.. that sux.
 
@AmaanCheval "1"
 
@Jan-StefanJanetzky HAH!
I don't even have the option to go that high
 
I'm replacing text with images based on the values
 
its two days now untill i get my 5 gb back filled up
 
3:53 PM
However, as you can see within the example, i cannot get it to work when there are multiple values
I'm guesing (relatively new to JS/jquery) that a split may help here
 
in 8 days i get a visitor. a so called "Telekom Techniker" untill then i will be forced to use my phone for home surfing
 
@Jan-StefanJanetzky Blergh
 
@dystroy - Did the link work ok for you?
 
@Tron Seems to work alright for me
Oh, no, it doesn't
Just realized that the 3rd should have images too
 
I fixed it but I don't know how to save my version on codepen...
 
4:00 PM
I think forking it should do it
 
@AmaanCheval - Thanks for looking. It's just the third version which has multiple values
 
Should lean to use codepen... I spend a few seconds fixing the code and the rest of the time battling against the interface and the code editor bugs (looks as buggy as jsfiddle.net...)
 
@dystroy thanks!
My network connection sucks right now
That's a little advanced for me. What does the "1" reference?
 
@Tron prettier code : codepen.io/anon/pen/BqlcJ
The "1" ? It the letter between the k and the m.
 
@dystroy I don't really think it's as bad as JSFiddle, but I like TinkerBin the best
 
4:08 PM
tinkerbin waste screen space too. For ordinary tasks, is there better than jsbin.com ?
 
@dystroy haha, right, thanks. What's it stand for? (apologies, i'm limited on JS knowledge) Additionally, on my original code, was there a way of adding a split somewhere which would have made it work? (Just wanted to see how close i was...)
 
Well, long ago I always used drunkenotter.com to test things live and pastehtml.com to share them
(I still use an edited version of Drunkenotter, which doesn't update live, and saves things in localStorage if I screw it up)
 
@Tron You could have used yourattribute.split(',') which makes an array and use an old-fashionned loop, yes. My first version isn't so different, apart the cleaning of the ifs.
drunkenotter.com feels clean but... no separate css or js ?
 
@dystroy I would have had many ifs for the different countries, which I was fine with having for a learning curve at least. But just needed to know how fix the multiple values :)
 
Well. Now you learned the map trick, use it instead of the if.
 
4:14 PM
@dystroy Nope
 
And then substitute the location variable in
 
Is it me or is this a total confused mess ?
0
Q: Sharing methods and properties between "classes"

JohanI have a "base class" in javascript that I call "main" in my example below. I want to use some methods and variables from the main class on all child classes that I create. I have made two examples below with my current ideas. I suppose the the latter is preferred since I will create some instan...

 
It's a total confused mess.
 
@dystroy, actually, just tried that, and it doesn't work haha. codepen.io/MattiusHolden/pen/Ahevc
 
hey hye hey
 
4:19 PM
omg Kirsty
I thought I scared you away
 
loll :P
nah
i just been uber busy with work and holiday
 
D: mustachify dun work on you
 
LOL
it suits me!
i look like some porn star
can i ask a thick question here, i got a customer who sent me a psd to work with to html
and ive got the font etc
but when i code it to html it looks well different!
am i doing something wrong lol
 
What do you mean?
 
Are you coding it by hand or using some tool?
 
4:22 PM
well the psd has gave me has a font
and i click on it in pS
and it changes it like the whole look
but its still the same font
and im using the same size, and font-family in the css,.. and it looks well different
 
You mean, it looks different within PS?
 
Do you have it loaded into your Windows Fonts?
 
it says its a vector based output?
yeh @shea it kinda changes how it looks in PS
 
@Tron @Shmiddty omg shut up, I'm already helping
 
4:24 PM
@Shea Obviously you're a bit of a twat.
 
ok boys boys
 
@Shea thar speeks teh epenis -- jk
 
Language
 
its like the font weights sharp in photoshop
so it maybe something to do with that
 
@Tron Obviously I need to ignore you while a girl is in the room....
 
4:25 PM
you know.. in photoshop you can change the weight of a font with a handy bar
 
PS should warn you if the font doesn't match
 
you cannot take that weight into html
 
oh thats poo
grr
 
@Shea That makes no real sense. I suggest you stop talking to me and carry on helping Kirsty ;)
 
I'm at the SO JS chat.
Are there any cute girls there?
Because if there are I wanna HELP them.
 
4:26 PM
so basically the person whos made the psd aint really took into account html?
 
@Tron Oh I like this
I think we got a bad ass here
 
all i know is its a gotham rounded light at 12pt and sharp in PS
so i can get the gotham rounded... check
the 12pt makes it fecking huge in css
 
@Shmiddty one cute girl currently reads a book next to me.
 
and sharp dont go?... damn
 
@KirstyHarris The PSD is probably 300dpi, whereas the internets is 72 dpi
 
4:28 PM
@Shmiddty just checked the psd is only 72
 
then I got nothin
 
@KirstyHarris tell the designer to eat some html specs.
 
LOL
i darent tell the customer that
 
he shall give you a web font for achiving that goal
 
hes already screwing over the price hes paid enough for it
 
4:29 PM
you cannot implement the impossible
 
Sometimes you just have to tell the customer to eat a "html spec"
 
will you tell all customers to download that certain font?
 
i best go back to him then
well no, i mean all i got is a PSD
 
there are web fonts in css3
 
4:29 PM
thats got certain fonts ....
so basically im fucked then
in laymans terms
 
srsly. if a customer tells me to turn a PS design into html i will mostly show him my dirty finger. usualy designers tend to use non-free fonts, shadows on everything etc.
 
well this has a font that has sharp
ive just gone back to the customer and said look... its not possible
 
just an example of how you could implement custom fonts
 
yh... im going to suggest those to him
 
@Jan-StefanJanetzky was just gonna say
Not impossible, just not in his price range
Or anyone's
 
4:33 PM
lol
 
Last resort would be spritesheets, but that's a lot of work
 
i just dont want it to look shite.....
no.. dont wanna go that far
 
@Shea have fun with unicode :D
 
Yeah, that's way too much
@Jan-StefanJanetzky exactly
Would need to be ascii
 
naa... feck that...
 
4:35 PM
@KirstyHarris in this chat you are allowed to say FUCK
 
also the person has put the directional navs on the slider on the outside of the wrapper
and i dont think u can do that neither... fucktard alert
 
so.. srsly. do as i said. tell him to eat some html5 specs
 
lol
gonna make me look like a right nob this
 
0
Q: JSON error, cannot find cause

RolandI have this JSON file : JSON ; and I tried to lint it before going further with adding more to it, but I keep getting some errors and I cannot find any at this point as my eyes are a bit tired :) Can anyone see any extra curly braces or commas at the indicated lines ?

 
@Shmiddty Help me :(
 
4:39 PM
Uh
With what?
 
!!/info mustache
 
@Shea Command mustache, created by God but hasn't been used yet
 
!!/forget mustache
 
@Shea You are not authorized to delete the command mustache
 
4:41 PM
Oh, it's been made official?
!!/mustache 0 Jan-StefanJanetzky
 
I think we killed the bot
oops
:/
where's lemon
 
I forget how to regex >.<
!!/help
 
it dead I tell you
@doorknob killed it
 
Oh, you're right
 
!!/live
 
4:44 PM
@AmaanCheval And on this day, you shall paint eggs for a giant bunny.
 
!!/mustache Shea
 
lol
 
too cool for school
 
!!/mustache Shmiddty
 
4:45 PM
Hah, looks like you don't have a face.
 
gotta be the glare on my face
ya, that's definitely it
 
What face?
 
One of these days I might put a real picture up. But how do you mustachify someone with a full beard?
 
@AmaanCheval you're one to talk
 
4:47 PM
:P
 
Finally! Somebody who figured that Node.js sucks hard
 
!!/mustache IvoWetzel
 
beautiful
 
Now thats a stash.
 
4:48 PM
I like it
 
!!/mustache SOChatBot
 
@IvoWetzel transcript ? BTW, it seems to me that many people always said that node.js was stupid..
 
@IvoWetzel apparently I downvoted that nearly a year ago
 
js is slower than anything else thats out there... lol I can think of LOTS of things that are slower.
 
4:49 PM
at the time, I must have thought he was serious
 
@Loktar JS is slower than Coffeescript! I read that on the internets!
 
haha Im sure people have said that :(
lol this guy is just a douche. His viewpoint was already established before even trying node Im sure.
 
you mean he was really serious?
 
idk.. I cant really tell
 
But he has a point... I mean... clearly... Node.js sucks, right?
 
4:52 PM
well yeah because it uses javascript
 
exactly!
 
no one uses node I mean.. who the heck would use node??
 
See, once who think about it, it becomes quite clear.
 
*yeah I think Im going to leave this chat.. probably join c# or java room or something
this guy opened my eyes.
 
close it ?
0
Q: obfuscating javascript code like this sample

VishI want to obfuscate code like that has been done here. I have only seem this type of obfuscation before with Google and other big companies. Can anyone suggest how this code has been obfuscated. Also it is better than using eval which can trigger antivirus on computers. function app() { var vb =...

 
4:53 PM
!!Would you use Node.js?
 
@IvoWetzel Certainly not
 
See!
 
@IvoWetzel i commented that vid. all he did was adding me to the block list. i cannot comment or interact with him anymore.
 
@Loktar cakephp is the new trend. Use that !
 
lol friggin @SOChatBot
@dystroy heh I still use php :?
although I've been using smarty and rolled my own super simple mvc
 
4:55 PM
 
 
(note that it's based on an old slow version of Go)
 
!!Would you touch yourself when caught in an infinite loop?
 
I just had to see...
 
yeah I saw that yesterday @dystroy pretty cool
 
4:55 PM
@ThiefMaster Certainly not
 
friggin java stuff being so fast :?
 
that one suits him better
 
im having trouble understanding why dynamicaly added content wont trigger events with jquery, some people say live is depreciated and even when i try it gives this [16:57:23.542] TypeError: $(...).live is not a function @ localhost/js/files.js:4
 
java is fast. It's very fast. The biggest problem is you usually buid stupid heavy algoritms with it and use stupid heavy redondant libs. But it's really, at the core, very fast.
 
never heard of vert.x
looks interesting
 
4:58 PM
@dyst
@dystroy I've seen the numbers, and used various versions of java through out the years. It just really does not seem fast to me. Does it seem fast to you ?
 
@qbert65536 have you seen the various implementations of javascript and their version histories?
 

« first day (895 days earlier)      last day (4043 days later) »