« first day (1861 days earlier)      last day (3094 days later) » 

12:00 PM
or the querySelector doesn't
I can't tell
 
ok @Zirak let me try
^\d{1,6}\.\d{3}$
this was working
 
Ok, for some reason calling .serialize causes tinyMCE to save, whereas formData() doesn't
 
@Zirak this is what my current code
var decimalRegex = /^\d{1,6}\.\d{3}$/;
$(".dec").focusout(function (event) {
    var inputtxt = event.target.value;
    if (inputtxt.match(decimalRegex)) {
        alert('Correct, try another...')
    }else {
        //output.text('Wrong...!')
        alert('Wrong...!')
    }
});
 
ok?
 
123456.333 - right
123456.1111 - wrong
123456.1 - wrong
 
12:10 PM
Hi guys!!
 
If I've read that correctly
Hi @LightFlow
@Zirak i found that site a few weeks ago when i started on regex's in php, so awesome
 
One quick question, I saw an example of socket.io and I noticed that in this file: github.com/socketio/socket.io/blob/master/examples/chat/public/…
the javascript files are included at the end of the body
is there a particular reason for that? :P
 
I can guess at reasons, they'll likely be wrong tho
as I'm newb
 
@djsmiley2k actully that is what i want
but if i enter only number instead of decimal
 
maybe the page loads faster if the javascript files are included before the closing body tag
 
12:16 PM
@Mahadevan allow just a number too?
 
on focust out i need to get three number
so you mean to say i want give \d alone
@djsmiley2k
or 0-9 @djsmiley2k
 
Give example of what you want.
 
for example
if i enter the value 123456 if i click outside the text field ie focus out it should add 3 zeros
by default
 
oh right
 
and one small twist here :)
 
12:19 PM
seperate if statement and regex, to check for /^\d{1,6}$
and if you get that as true, then append .000 to the number/string
 
I don't know how you'd append the extra digits
I'm just an ewb.
 
ok buddy let me try
 
http://stackoverflow.com/questions/33826424/call-opener-function-fro‌​m-frame
Linking to a github page =/= code in question
 
:)
@Cerbrus
 
12:24 PM
@Cerbrus great commit messages
 
> 123
123
 
Hehe
 
@Zirak you optimized switcheroo yet?
 
12:38 PM
Sooooo anyone know if tinyMCE will output a format compatible with Atlassins's 'wiki' style?
 
It won't.
 
@AwalGarg Optimised? What needs to be optimised?
 
all the things
 
Don't ya remember, it crashed on me when I had couple hundred tabs open :/
 
!!> undefined = 1; return undefined
Damm you Caprica
Q: is it no longer possible to redefine undefined in Chrome?
 
12:41 PM
I think that was fixed a while ago
 
Well, that sucks, it kind of ruins my plan for world domination
 
any one here can help me with express session ?
 
undefined was writable only until ES3. ES5 defines it as read only, and strict mode throws on redefining it.
I am afraid, you'll have to find out some other way of world domination.
@jcavandoli possibly, but not until they know what to help with.
 
@AwalGarg that for me?
 
yes
 
12:46 PM
yeah, just come to that realisation myself :(
/me ponders if theres some script/regex magic/something he can throw at it instead
 
ok, thanks :) I'm having trouble with data stored in session, they seems to disappear outside of the route scope
I'm retrieving the session from a socket.io room scope with the help of socket.request.headers.cookie
(from the MemoryStore)
and some data are not in the session as expected...
but I can always access them in the "normal" route process, in req.session.myData ..
any idea?
 
Hey guys, I've got a question: does anyone know how to visualize oscillator with Audio API? I read Mozilla's Audio API Reference - https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API, but the problem is just in the line

source = audioCtx.createMediaStreamSource(stream);

because I don't know, what to put instead of "stream" :/
Is there somebody who can help me, please? :(
 
I locked up on the 'loading chat' page again
should be all working now
 
1:03 PM
@rlemon When someone asks a crappy question on Stack Overflow and never comes back
 
@BenjaminGruenbaum you can, but I didn't put it in our repo
yet
 
1:27 PM
..
also no serverside rendering
yet :D
 
where
 
well, yeah
didn't say there would be :P Uri came to me yday and asked to take a look
but server side rendering isn't ready
 
but!
there's a readme on the GH repo :P
 
1:31 PM
guys kindly please check the url correct or wrong
i have updated code
for example
123456 if i focused out it will 3 zeros
123456.000 -- true

123445.00 -- false
1234.0 --false
 
@Mosho Happy happy (late) birthday!
 
needs more jquery
 
thanks
 
@Mahadevan all I see is a syntax error on the first line, so I didn't parse any further
 
what was that
could you please tell me
 
1:34 PM
Uncaught SyntaxError: Unexpected token var
 
variable declaration is not the expression to put inside an if expression statement
 
@Mahadevan Look at your console
 
i am checking that
 
@Mahadevan you probably should read this: eloquentjavascript.net
 
sorry guys i am not getting any thing in console
what is wrong here
$(".dec").focusout(function (event) {
    var nondecimalRegex = /^\d{1,6}$/;
    var inputtxt = event.target.value;
    var decimalRegex = /^\d{1,6}\.\d{3}$/;
    if (inputtxt.match(decimalRegex)) {
        //alert('Correct, try another...')
    } else if (inputtxt.match(nondecimalRegex)) {
        $('input#dec').blur(function () {
            var amt = parseFloat(this.value);
            $(this).val(amt.toFixed(3));
        });
    } else {
        //output.text('Wrong...!')
        alert('Wrong...!')
i want to know one thing if i enter some wrong value it was showing alert as wrong but why i am geting NAN
in the text field
 
1:37 PM
there are a lot of things wrong there
 
:(
 
you really should start by learning javascript
the lack of it is starting to show through
 
:(
 
or you will end up as another feckless "jquery programmer"
 
actually i am trying to figure out what is wrong
 
1:39 PM
guys, please :( why are you so quiet about my problem? :(
 
@PDKnight lot of questions go totally unanswered here; it's pretty normal
 
anyone familiar with U-Boot?
 
@Mahadevan what errors do you see in console? Have you tried adding breakpoints and seeing if the values for the variables are what you expected them to be?
 
@PDKnight people only answer if they find the problem interesting/know the answer immediately
 
you need to have someone who's (1) present in the chat that (2) knows about your problem domain and (3) is willing to help
 
1:40 PM
@Mosho that's even worse :D
 
I'm trying the MutationObserver object, and I can't udnerstand why it doesn't work: pastebin.com/iDQurBgQ . I would expext to read an output in the console every time I change the input with id "foo", but doesn't work... What's wrong??
 
I was actually typing up an answer right now
 
@Mosho You're publishing company code on GitHub as a public repo without permission when your contract says you can't and then documenting it there when you don't document internal code.
 
@BenjaminGruenbaum yeah :P okay I'm moving it to bb
 
@ErroreFatale The mutation observers listen for changes of the DOM. The current state of form elements, however, is not reflected by the DOM. Use the Events given by the form element (change, blur, etc)
 
1:42 PM
I just hope to god there are no credentials there. I'm not telling Gilad or anything but I really hope he doesn't find out :P
 
@PDKnight If you look at the fourth bullet under Creating an audio source, you'll see "Taken directly from a WebRTC MediaStream such as from a webcam or microphone. See AudioContext.createMediaStreamSource()." If you're not using WebRTC, that's probably the wrong function to use
 
@BenjaminGruenbaum well, you knew already
that makes you an accomplice
 
Right, and I asked you to move it elsewhere :P
 
@rlemon I must intercepta change of the "value" attribute of the input. When the user modify the input by hand the event "change" is thrown, but when the "value" attribute is changed programmatically as far as I know there is no event fired. That's why I want to use MutationObserver...
 
How are you generating your audio? If it's from an <audio src="..."> element, you want createMediaElementSource
 
1:45 PM
1 message moved to Trash can
 
@ErroreFatale then listen for attributes observer.observe(target, {attributes:true});, but I am still not convinced you need to do this. every other website manages to listen for values changes without MutationObservers
I'm also not convinced this will work in every browser
 
@apsillers Thank you, I'm going to visit the link now!!! I'm using an oscillator to generate audio :)
ah, well, it's the mozilla's api reference, nvm xD
 
@tereško actually i am not getting any error that's what i worried
:(
 
breakpoints \
 
@PDKnight Okay, if it's an oscillator, your source should be from AudioContext.createOscillator, not AudioContext.createMediaStreamSource()
 
1:48 PM
@apsillers I've created the oscillator, but I don't know how to visualize it :(
 
@rlemon a button must be enabled only when a certain input is not empty. To check if the button can be enabled each time the input state is changed according to me would be the most elegant solution. But if you have an other solution...
 
@tereško initially i have one parameter inside the function unnecessarily i have removed that
 
.... sorry, a little detail: one input that must be checked is updated programmatically (the user can search something using a number, but not necessarily the data will be find)
 
$(".dec").focusout(function () {
    var nondecimalRegex = /^\d{1,6}$/;
    var inputtxt = event.target.value;
    var decimalRegex = /^\d{1,6}\.\d{3}$/;
    if (inputtxt.match(decimalRegex)) {
        debugger;
    } else if (inputtxt.match(nondecimalRegex)) {
        debugger;
        $('input#dec').blur(function () {
            var amt = parseFloat(this.value);
            $(this).val(amt.toFixed(3));
        });
    } else {
        alert('Wrong...!')
        $(".dec").val("");
    }
});
 
do you know how to use breakpoints?
 
1:51 PM
yes
i have to press f12
or i can use debugger
 
@ErroreFatale change/blur/paste/etc events still should work fine. we've been picking up form changes for a long time before MutationObservers existed in JS
 
inside the code
 
@PDKnight Ah, I thought you had visualization code and your problem was specifically that you didn't know how to use createMediaStreamSource
 
@BenjaminGruenbaum alright, gone from GH, uploaded to our account on BB
 
@rlemon no, they are fired only when the user change the state of the input, and not when the state is changed programmatically....
 
1:52 PM
ugh, fuck you elinux foundation! STOP CHANGING HOW THE DAMN BOOTLOADERS WORK!
 
Thanks :)
 
@rlemon no worries. The bootloader soon will become a part of systemd anyway.
 
@ErroreFatale do you know where element.value is being set?
 
@BenjaminGruenbaum I think I found a bug in bluebird :(
worse: a regression
 
@FlorianMargaine great, please let us know. What's up?
 
1:54 PM
@tereško this is for a beagle bone black, they keep changing how their uboot is configured, and they're making it increasingly difficult to force boot from the microsd by default.
 
@BenjaminGruenbaum no way, I fixed it myself
you think I'm the kind of guy who shares code? Who does open source?!
 
@FlorianMargaine :D make a pull request.
 
@BenjaminGruenbaum ah, I didn't actually fix bluebird
 
Yes, in different part of codes... that's why a centralization would be more elegant... enablig and disabling the button in different parts of codes is error-prone and not mantainable
 
I just used a workaround
connectAsync callback only provided one argument :/
 
1:56 PM
@ErroreFatale adding in more cruft via mutationobservers probably isn't the most elegant :/ but ohh well. use the attribute option and hope for the best
I still think you're approaching it wrong
 
@apsillers I propably explained it bad... I've got the visualization code and code to create an oscillator, but I can visualize audio only with source like something.mp3, not oscillator variable :(
 
@FlorianMargaine that's not a regression, that's a breaking change that made us do a major version bump.
 
@BenjaminGruenbaum ah :)
 
That's intentional, you can pass a multiArgs argument to get the old behavior. There's a changelog on bluebirdjs.com you know :P
 
there's bluebirdjs.com now?!
 
yeah I'm on it already
@BenjaminGruenbaum github.com/petkaantonov/bluebird/issues/307 is stupid
 
can you please now whether my code is correct
 
> Unfortunately, if a function is changed to return two or more results instead of one, it breaks the compatibility of the promisified version.
sigh
 
@Mahadevan how your number should look like?
 
2:09 PM
@PDKnight there few combination
 
AngularJS Q.
I currently have hard-coded HTML for some directive inputs that look like this:
<div definition="Account.Account_Name"..
But I want to ng-repeat the properties after Account, such as
<div ng-repeat="a in acsvm.fieldsToShow track by $index" definition="[acsvm.fieldsToShow[{{$index}}]]"..
I keep getting syntax errors as I cannot get my [acsvm.fieldsToShow[{{$index}}]] to interpolate back into the variable such as Account_Name. acsvm.fieldsToShow is a string array with the property names.
 
for example
123456 if i focused out it will 3 zeros
123456.000 -- true
123445.00 -- false
1234.0 --false
12345.12 then zero should at the end
12345.1 then two zero should at the end
 
@Mahadevan so you think last two examples should be true as well?
 
you are talking about this two
12345.12 then zero should at the end
12345.1 then two zero should at the end
yes
true in the sense
when i focused out it should 12345.100, 12345.120
like this
 
okay, wait a minute
 
2:14 PM
sure
 
@Mahadevan anyway, what it user types words, not numbers?
 
so many new faces here I see
 
Okay a dumb question: what generally happens on the server when a user logs out? I usually use wrappers around account systems
 
@GNi33 so freaking jealous man. I hope it was a blast!
 
@Mosho can you write a 20 line file that walks me through the structure of our build? Just basically what part does what and why.
 
2:28 PM
ah okay then that makes things more complicated... I want to make an onLogout() hook on a Node application
Meteor accounts :\
 
As of last night, I am coffeescript-free. All ES6 (and a few es5 files when I didn't feel like hand-converting from coffeescript)
 
What's ng? Angular?
@Luggage So you have seen the light? That's good, repos in es6 are way more readable than ones in coffeescript (imo)
 
I say the light long ago, but I had a 100% coffee project and I hand-converted most of it
lovingly crafted
each curly braced added with precision.
 
I am still trying to get es7 async functions to work on my project :\ it's very much more readable and manageable
 
2:31 PM
@Loktar more songs for you
 
yea, i plan to use async functions, too
@ton.yeung ES7 is still very loose, but a few of the more useful bits are availabl ein babel already
async, decorators, rest spread
 
By chance, is the project you plan to do it on open source? (plans to steal)
 
No, but it should just be some babel config which I have no problem sharing
 
!!s/ES7/kendall's mom/
 
@Cereal @ton.yeung kendall's mom is still very loose, but a few of the more useful bits are availabl ein babel already (source)
 
2:35 PM
Oh sweet. One thing I still don't get: after webpack/babel creates all the assets and everything, how are they hooked into an index.html? Do you just assign an arbitrary path, concat all the files, then include that one script?
 
you still use a <script> tag, like normal
that's just how you ALWAYS add scripts. things like require.jd just add <script> tages proramatically
I use one really simple tamplate that webbuilds that includes the name of the script it made (with the hash)
webpack will bundle it all into a single file.
 
Do you have to include the webpack config as json into the index.html? I was trying to do that with node. Never works out :\
 
I've been using it this week
 
@corvid I use this index.html and the HtmlWebpackPlugin : gist.github.com/luggage66/3db6ae164f9a9b881aa9
 
That's a huge help, thanks Luggage
 
2:38 PM
just the style and elements for a loading animation. The rest of the app is one script tag and one placeholder div
 
@Mosho why does config.js have merge conflics?
 
@BenjaminGruenbaum We convinced him to convert the whole project to tabs.
 
<<<<<<< in files.
@Luggage :/
 
j/k :)
 
@BenjaminGruenbaum hmm, in the new homepage?
don't see them locally
 
2:40 PM
@Mosho no, I'm trying to understand how the build works :v
 
@ton.yeung It's about the same. I don't use anything special in ST3 though
 
@BenjaminGruenbaum ah
 
@rlemon I want it...
 
no one can really tell you. it depends on your needs. I suggest just learn a bit of both, choose for yourself and deal with the consequences later
 
@BenjaminGruenbaum what config.js?
 
2:43 PM
grep for <<<<<<
 
I see it
I'm looking at the online repo
if it's client/config.js
 
as in '<<<<<<<' is committed to the repo?
 
can be trashed
 
I've only used express, actually.
express is the 'safe' bet in a way, since it seems more popular and it's easier to find help (I assume)
but i'd have to read up on hapi to see what it brings to the table
yea, but MEAN is just one stack and not really the special
 
@Mosho are there any other files that can be trashed there?
 
2:47 PM
Then go for it. they both seem to use similar callbacks, so you could probably reverse the decision
 
@BenjaminGruenbaum yeah, the 3 files starting with 'config'
and wat.json :P
 
What about config.js~HEAD :D ?
 
I detect similar frustration that I felt when someone committed stuff they shouldn't to the work SVN repo
 
@BenjaminGruenbaum yeah
 
Can you extend a function without overwriting it? In this case, I am trying to extend a transform function on a collection without conflicts.
 
2:48 PM
@corvid what do you mean?
 
var old_transform = transform; transform = function() { … }
 
@copy What if the transform added a key that was overwritten by my transform function?
 
Same thing
 
either replace transform with a compatible version or make a new function (that can call transform())
especially if it's not your 'class'.
 
@BenjaminGruenbaum do you have a moment?
 
2:50 PM
@SterlingArcher I do, sweety.
 
:)
 
Well, anybody really. lol
 
@SterlingArcher Sure, I'm trying to understand a huge chunk of undocumented code anyway :P
 
^ fun fun lol
 
2:51 PM
someone mosho'd all over his codebase
 
Basically I'm trying to figure out why you cant have an arrow function generator
 
hm.. thought you could.. lemme try..
 
Anybody using firebase here ?
 
ohh.. hm..
 
2:52 PM
@SterlingArcher no particular reason - every language feature has overhead.
Building a feature isn't free.
 
Oh, so there wasn't a blocking reason behind it besides that?
I thought there was some conflict between the two concepts that made it so lol
 
using the full function syntax isn't that much of a burden.
 
No, let me find you an article about it:
 
@Luggage that's true
 
2:53 PM
But only plebs write 'function' now :P
reading, thank you
 
it still has it's place.
 
nope, wrong one.
@SterlingArcher nono, it's about lexical binding, not about being pleb
blogs.msdn.com/b/ericlippert/archive/2009/10/05/… probably this one @SterlingArcher
 
Is there a good explain like I'm 5 what lexical binding is? I've always had issues understanding binds, and lexicality when it comes to like element binding this and whatnot
 
There's another ericlippert post about that, which is odd because he's a C# coder :P
 
stackoverflow.com/q/33829680/871050 @BenjaminGruenbaum know anything about that?
 
2:57 PM
lexical scoping is my jam, man
 
Basically, this gets decided by "who calls the function" and you can't deduce it based on the source code of the function alone unlike every other variable in JavaScript (well, except arguments and other quirky stuff).
 
Seriously, lambdas are my favourite new spec feature.
 
What this does is called dynamic scoping, arrow functions don't do that - this is deduced from the enclosing scope.
 
Even better than classes
 
but really, it's just like a special argument.
 
2:58 PM
@MadaraUchiha I'd just write a C# API and call into that into node.
 
argument -1
 
Oh, so by being lexically scoped, you can look at the code and know the program scope
 
yes
 
Whereas this being dynamic, you may not know until it hits runtime
 
@BenjaminGruenbaum That sounds like an answer to me
 
2:58 PM
@MadaraUchiha yes
 
just arrow functions. functions on 'classes' still have have a this passed in
 
@SterlingArcher exactly, it can't be determined in "analysis time".
 
You can also think of it as automatically .bind(this) at time of declaration
 

« first day (1861 days earlier)      last day (3094 days later) »