« first day (951 days earlier)      last day (4012 days later) » 

7:00 AM
ooh
weird
I don't get it
 
Why? that's expected
I have to go, but look at how bind is implemented in the v8 source
It's not because of the call to the native console log, it's every time you use bind like that
 
Obviously if you know what the source says, then you expect it! :P But if you handn't read the source!
 
It's implemented in the native level
 
yeah I just read mdn
> The bind() function creates a new function
makes sense now
 
It's not about the console.log, it's about the func.toString right?
 
7:02 AM
right
 
It's about func itself
try
 
it's just that bind creates a new function, it doesn't call func in another way
 
(function(){}).bind(window);
That's interesting ^
 
var func = (function () { console.log(this) }).bind('hello');
Yeah, I get it now
 
I guess the source "compiles" the new function
 
7:05 AM
Internally it becomes something along the lines of
function (){var c=h.concat(Array.prototype.slice.call(arguments));return a.apply(b,c)}
 
or at least, needs to do the binding in native code, so it returns a "native code"
 
0
Q: I want to get all content of a div using jquery

aliI want to get all content of a div using jquery. <div id="load_template_data" style="border:1px solid #000000; width:100%;"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">...

Holy shit
<div><html>...</html></div>
Never seen that before...
 
It's a template, that seems backwards but I can see how he got there
He should've used a script tag for that sort of thing, or a template tag
By looking at what he's doing, he's making an editor
 
Yeah I'm not used to seeing actual <html> tags in the template
 
I'm off, bye
 
7:08 AM
how much cool it would be to use <js: :js> tags alla php or alla ruby?
 
uncool
JS isn't a templating language like php, it's a real language
 
well it will be awesome imo
 
And besides the point, there are already a lot of templating engines in JS
 
yeah but i'm talking about native support ;)
instead of th fkn <script> tags ;)
<js require('src'); js>
ET_VOILA'
 
just no
Because that's not what PHP does either
You still have to have the script tags
 
7:13 AM
yeah, but php is another thing i mean, js absolutely need them IMO, more comfortable
 
@phenomnomnominal Can I have information about this exercise jsfiddle.net/vp28n/7 ?
 
@MirkoCianfarani the code is ugly, what else?
 
@MirkoCianfarani, you have the source code, what more information do you need?
@FlorianMargaine, :P come on dude, I did it in like 4 minutes
 
come on dude, you have 2 functions which both have 10k responsibilities :P
 
:D
@MirkoCianfarani, what do you want to know?
 
7:16 AM
@MirkoCianfarani hey :)
 
but I see on jsfiddle and I select the file but not upload the file.
I think the upload is specific for mp3.
I would like to know:
What do it do?
I see the possibile animation for this file.
hi @okok
 
Yes it is specific for audio files
 
;)
 
All it does is read the file and draw it's waveform
 
Because I tried for upload the file jpg XD
 
7:21 AM
You don't have to upload anything, it just does it on the client
 
now I try mp3
 
it just opens it and reads it
 
interesting
 
7:32 AM
use this for animations not js daneden.me/animate
 
eheheh I not know if there are the permission for "download" the exercise
Because I try in local and I analyze with Firebug and there is more error...
Type:
draw =->
or missing ) in loop for
@phenomnomnominal
:P
@okok thx for the suggest
 
np ;)
 
I state that I still do not use animations
 
it wont work in firefox anyway
 
@okok Weekend in Italy expected rain and lowering of the temperature
 
7:39 AM
@MirkoCianfarani here really bad weather :/ raining + sun
and yeah temperatures goes down :/
 
I bet the people are using more Chrome
 
true
i love to stole stack user's gravatar ids to test gravatar on my web apps lol
 
@MirkoCianfarani it's coffeescript...
 
eheh now I want not lose time for function the new exercise
because I have the error also in chrome...
Uncaught SyntaxError: Unexpected token > on draw = ->
coffeescript ? that is ? new JS? @FlorianMargaine
I prefer the normal coffee! :P
 
please, use google :)
 
7:47 AM
yeah!!! I read on coffeescript.org
I have one question.
 
coffee + croassaint + the coding love , special wake up
 
Why do not interrupt for create new programming languages​​?
 
There are too many languages!!!
 
#troll #whine #wtf
 
7:50 AM
python, c ,assembler, JS, ......
 
That's 4 languages
 
@ThiefMaster wot? :D
 
There are literally hundreds, if not thousands.
 
yeah now you want that I write all language that I know... @phenomnomnominal
 
@MirkoCianfarani ok, you ARE a troll. I first thought you are talking about all the *=>JS compilers like coffeescript and typescript. but since you really mention four languages with completely different audiences and purposes...?
 
7:52 AM
@phenomnomnominal Mirko sad me he is not so good in english, so sometimes it seems he is trolling or sayng no-sense things :P @ThiefMaster
@MirkoCianfarani here you can talk only about JS and js related languages :P
 
there are other chat rooms for python or php or whatever you want, and you can create new one too
 
@MirkoCianfarani Thief is a moderator he is sayng you have to not troll :)
 
sorry all for this behavior
forget it for this situation...
 
7:55 AM
@MirkoCianfarani be carefull, funny it's funny you know i love gifs, just try to not exagerate :P
 
@okok thx
 
np
 
but now I going in the dungeon... :p
Excuse me...
But I are still beginner and I have to acquire many things about programming
 
@MirkoCianfarani ask me if you didn't understand what others says to you (chiedimi aiuto cosi non ti bannano- Ask me help so you'll get not banned )
 
jaaaaa @okok (adesso sono bannato per le domande...) bah... sarò attento per le stupidaggini che farò dopo
 
8:11 AM
@MirkoCianfarani :P i'm sorry, mi dispiace, be carefull ;)
 
@Zim84 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Hi, I have asked a question in the comments section in this question: stackoverflow.com/questions/16728438/… and got a first answer, but that answer doesn't really satisfy me. Can you provide me a real-life example of when Object.create() is getting used?
 
Anyone know why this data-bind value is not updating? Postal: <br><textarea rows = "5" type = "text" data-bind = "value: person_new_address.address() ? person_new_address.address().postal: 'unknown'" style = "width: 100%"></textarea><br>
 
@Zim84 the first answer sucks
@Zim84 just use obj.constructor.name
 
8:25 AM
person_new_address is a kb viewModel
nevermind
 
An interesting one :
1
Q: Error in JSON file

Aquarius24When i am using below code : { "info":[ { "name": "Adam", "address": "Park Street" } ] } It is parsing perfectly but adding on further code like: { "info":[ { "name": "Adam", "address": "Park Street1" }, { //<-----...

I didn't really find relevant details on this "messy white space" thing, even on jslint.com
 
hey, what's the difference between a normal answer and a community wiki answer?
cause sometimes i flag as community wiki my answers but dunno the difference :D
 
8:43 AM
you don't get rep for community wiki
 
oh gosh, and i can't turn it to "normal" ?
@FlorianMargaine
 
@FlorianMargaine You talkin' me ?
 
0
Q: Showing jQuery UI tooltip on focus of text box

RobHFirstly, here's a link to the fiddle. Basically my situation is that there is a requirement to show tooltips on textboxes on some forms being created for a website to allow employees to update their personal information (among other things). The customer likes the idea of the tooltip being dis...

 
can't understand how is needed yet jquery UI sincerily :/
actually css framework provides almost same jquery UI features :/
in a lighter way also i guess
what's a nice feature for a website?
 
9:02 AM
this website has tons of nice features: nexxpresso.de
 
where this guy gone? He was always used to be in this room.. right?
 
@Mr_Green I think he comes in 'later' due to timezones.
 
@FlorianMargaine lol can you make bot learn Nexxpresso with the "Notepad punctualization" please :D
 
ohh
 
@phenomnomnominal, in your coffescript code, $-> is at the start of what I assume is the main. $ is for jquery, -> is for function, but I'm not really sure what they mean together in practise. Are you performing a jquery on the result of you main?
 
9:11 AM
@StaceyAnne $(function () { ... }) is a shorthand for $(document).ready(function () {... })
$ -> is the CoffeeScript equivalent
 
@phenomnomnominal, thanks. google is complete and utter crap at searching for special characters.
3
 
9:24 AM
I have to say that always surprises me
But when you search for jquery stuff, either search the jQuery API, or search jQuery.ready instead of $.ready
 
Me too, how is no one there working on it?
 
OR RTFC, that also works
 
9:46 AM
Why would anyone downvote this? stackoverflow.com/a/16731985/1348195
@room ^
 
Look at you Mr 10k!
 
@BenjaminGruenbaum your jsfiddle demo doesn't didn't work
 
@AlexandreMorgaut Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Yeah, thanks, I really don't use onsubmit= ever :)
 
9:50 AM
nor do I
but your answer is kinda useless now
since it's the same code as OP
 
He changed his original question
 
you changed your answer
 
I'm just saying that both questions/answers were edited...
 
9:53 AM
and that right now, your answer is useless
and that you got 28 rep for a useless answer :D
 
I don't care about the rep, I cap anyway, I just don't like answering something, and then OP changes the question
 
@BenjaminGruenbaum, I always forget that :: is short for .prototype. in CoffeeScript.
 
Yeah, I don't use it a lot though
When you define something in a class not in the constructor, it already adds it to the prototype in CS no?
(maybe not, that was just my initial intuition)
 
I'm shimming some fullScreen stuff:
HTMLElement::requestFullscreen = do ->
    if HTMLElement::requestFullscreen then this.requestFullscreen
    else if HTMLElement::mozRequestFullScreen then this.mozRequestFullScreen
    else if HTMLElement::webkitRequestFullscreen then ->
      this.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)
    else if HTMLElement::webkitRequestFullScreen then ->
      this.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)
@BenjaminGruenbaum, yeah, unless you put @ infront of it, then it's static
 
I wouldn't call that static
 
10:04 AM
Well, attached to the "class"
 
That's not what one would call static though, right?
 
I don't know, what would you call it?
 
Prototype method?
 
Oh, no I mean this:
class Blah
  constructor: (@bang) ->
  protoFunc: -> # I'm a function on the prototype
  @classFunc: -> # I'm a function on the Blah class
 
Oh yeah, that's what I figured too
 
10:08 AM
class Blah

Blah::classFunc ->
this is the equivalent? ^
 
Nope
Blah::protoFunc
Blah.classFunc
 
That makes sense
 
I thought the @ would be for prototype methods, i.e. "instance methods"?
 
10:09 AM
classFunc is adding a function to the Blah function we'd use in JavaScript
 
It's the other way around
 
@FlorianMargaine in the constructor it is
(for per-instance methods
 
how confusing
 
Yeah inside the constructor
 
Like if you need closure on a method for every object
 
10:09 AM
It makes more sense if you look at the JS
 
@FlorianMargaine I don't think it's confusing at all, that was my first guess at how this works, I didn't read the manual, and @phenomnomnominal just told me it's true
 
var Blah = (function() {
  function Blah(bang) {
    this.bang = bang;
  }
  Blah.prototype.protoFunc = function() {};
  Blah.classFunc = function() {};
  return Blah;
})();
 
I guess @ does something with this?
 
I see where you're coming from though
@FlorianMargaine @ is this
It's just a shortcut for writing this.
 
10:10 AM
oooh
I see, class Blah doesn't translate to function Blah
 
makes sense if CS wants to implement the constructor functionality correctly
 
Hey Everyone, Does anyone here us sass/compass?
 
@Jack , I don't get that guy, he changed his question twice, not able to isolate it. I don't understand why people ask these sort of questions anyway. I should've just deleted my answer when he edited his question and stayed away from it :/
@Jack , I should start avoiding these 'shorter' questions anyway, they're not that interesting to answer and SO is filled with better ones
 
10:13 AM
@Connor, I've done a bit of SASS, but I prefer LESS
 
@phenomnomnominal is that because less is javscript?
 
How exactly is it JavaScript?
 
@phenomnomnominal well, isn't it compiled with js?
 
And how do you think SASS works?
They're both just node modules
Or is SASS a gem?
 
@phenomnomnominal yeah sass is ruby
 
10:16 AM
Oh well doesn't matter, I just prefer the LESS syntax
 
k cool
 
Could this be a JavaScript bug on various websites, or a Chrome thing?
0
Q: Why does middle-clicking on a link also load in the current tab?

BaumrFor some websites (e.g. try these main menu navigation links), pressing down with the mouse's click-wheel not only opens a new tab, but also loads that link in the current one. Why is that? This happens in Chrome (on Windows 7), but not in IE9 (funnily enough). When using the right-click con...

Can you replicate it?
I've seen it plenty of times before, but never investigated
 
@Darkyen :D
 
@AaditMShah I can recommend you books on nested stack automatons. I don't know if any of them are available freely
 
10:30 AM
@phenomnomnominal hmm. the syntax really doesn't differ that much, does it?
 
@GNi33 sass gives you more rope to hang yourself with
 
Nice analogy
 
isn't that a common saying?
 
Yeah it is
!!look into TypeScript or Dart?
 
@phenomnomnominal look into TypeScript
 
10:37 AM
Dart isn't gaining much traction, if you want to learn something, learn Ruby
 
yep
Ruby is nice
 
The only reason I'm interested in Dart is to see how they did operator overloading
 
how do you set a shell variable content with a file content?
does anyone know?
 
$0 $1 ...
 
@TemporaryNickName, I don't think you have EVER asked a question about JavaScript in here.
 
10:37 AM
arguments
 
$VARIABLE=$(cat file)
@BenjaminGruenbaum looks like we understand things differently :P
 
I didn't know what he was trying to do, chances are neither because he is probably using windows
 
Why would this match?
!!> /(.)[^\1]/.test('aa')
 
@Zirak true
 
why would this not?
 
10:39 AM
@Zirak \1 and such don't work inside range brackets
 
...really?
 
!!> /(.)^\1/.test('aa')
 
@BenjaminGruenbaum false
 
wait, maybe that's just me being stupid
 
^ outside of a char class means "beginning of string"
 
10:40 AM
@Zirak because it is pretty much same as .[^\1]
 
Inside it means negation
 
yeah yeah
 
@TemporaryNickName No it's not, (.) creates a capturing group, \1 refers to it
 
. means you want to match anything except new lines
 
10:41 AM
The \1 has a special meaning
 
@Zirak remind me, can you do negative lookaheads in JS?
 
!!> parseInt("10",10);
 
@Mr_Green 10
 
Lookaheads? Yes. I know it's (.)(?!\1)
Just wanted to slim it down by a character
 
@Zirak Don't you have to say (?= somestuff) in order to start a capturing group?
 
10:42 AM
!!> /(.)(?!\1)/.test("ab")
 
@BenjaminGruenbaum true
 
!!> /(.)(?!\1)/.test("aa") //
 
@BenjaminGruenbaum true
 
@TemporaryNickName No, that's a definition group or whatever they call it
 
oh my bad
 
10:42 AM
^ Matches the second 'a'
 
@BenjaminGruenbaum - It would be nice if you could recommend some books for me.
 
(.) >> Capture expr for use with \1, etc.
 
!!> /(.)(?!\1)./.test("aa") // This is what you need @Zirak
 
@BenjaminGruenbaum false
 
!!> /(.)(?!^\1)/.test("aa")
 
10:43 AM
@FlorianMargaine true
 
M-x ediff-regions-wordwise
nice.
 
@BenjaminGruenbaum - BTW you're correct. You can implement prototypal inheritance in any Turing Complete language. Even brainfuck if you've got the patience.
 
@AaditMShah Even Game of Life, you can implement prototypical inheritance in Game Of Life
 
Even CSS3
 
@BenjaminGruenbaum - Spartan Universal Computer/Compiler
 
10:45 AM
I'd argue it's harder in game of life, in CSS3 you already have it :P
 
CSS3 is Turing Complete?
 
@AaditMShah lemme ask my friend for a sec
You wanted nested stack automatons, right?
 
@BenjaminGruenbaum - Yes.
 
device orientation API is the best
 
10:48 AM
@AaditMShah what's a nested automaton?
btw
 
@BenjaminGruenbaum - You know about Pushdown Automatons (PDAs) right?
 
@AaditMShah yeah
 
@BenjaminGruenbaum - A nested stack automaton is a PDA which operates on a stack of stacks.
 
@BenjaminGruenbaum, I'd like some syntactic sugar for { hello: hello, bye: bye }
 
So expression evaluation in a nested stack automation is easier than in a PDA.
 
10:50 AM
@phenomnomnominal I feel you
 
But I can't think of what it might be
maybe just hello:, bye:
except that it's ugly as fuck
 
@phenomnomnominal - If you want to return an object like { hello: hello, bye: bye } from a function you could always use a constructor instead.
 
(@hello, @bye) ->
True.
 
@AaditMShah Ok, he talked to someone, he says the wikipedia article has a link to an article by Aho from 1969, that's where you should start
 
@FlorianMargaine sass is saddist
it could be made less ugly and much better
 
10:52 AM
@BenjaminGruenbaum - Thank you so much.
 
@AaditMShah he said it's a pretty esoteric topic, and he hasn't heard anything about it before, that dude is a total bauce in computability research, lots of publications. Let me know if it's interesting :)
 
for(;[a]=r=readline();)print(a,r.slice(-1),r.lastIndexOf(a)+1)
^ somebody shrink this please!
 
Guys how Javascript application (looks like native apps) on smartphone works? Do technologies like PhoneGap or Titanium SDK convert JS code into Android app or phones already have Javascript interpreter or compiler running on them already?
 
@BenjaminGruenbaum - Definitely. The Wikipedia link leads to an article which must be paid for.
 
@TemporaryNickName do smartphones have browsers?
 
10:55 AM
@BenjaminGruenbaum ya
 
@AaditMShah are you a student? Most educational facilities have subscriptions to these sort of papers
 
@BenjaminGruenbaum - I'm an IT student from India. I doubt my college has any such facility but I'll inquire about it.
 
@BenjaminGruenbaum NVM, I figured it out
 
(duplicate)
0
Q: cant return value out of closure

rtpHarryI cant seem to get this value to pass the isValid value back out of the ajax call in the snippet below: function isShortUrlAvailable(sender, args) { var isValid = false; $.ajax({ type: "POST", url: "/App_Services/ShortUrlService.asmx/IsUrlAvailable", ...

 
BTW I figured out most of public networks including my university blocks websocket protocol in their network somehow and they only allow wss://.
 
10:58 AM
@AaditMShah If you can't get it in a week, remind me on a weekday (not Sunday) and I'll see if I can grab the pdf from you. I have a subscription at the university but I have to physically be there
 
It is weird because ws is sharing the same port 80 as HTTP but how do they possibly block websocket in their network?
 
@TemporaryNickName for one they can just read the header...
 

« first day (951 days earlier)      last day (4012 days later) »