« first day (1847 days earlier)      last day (3087 days later) » 

2:00 PM
@Abhishrek why would I be thankful?
 
Hi all!
 
@rlemon if those things weren't in place the world would have more Indians .... everywhere
 
How can i pass a snippet of code like this :
var gulp = require("gulp");
var sass = require('gulp-ruby-sass');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('sass', function () {
    return sass('./src/sass/style.sass', { sourcemap: true })
        .on('error', sass.logError)

        // For file sourcemaps
        .pipe(sourcemaps.write('./', {
            includeContent: false,
            sourceRoot: 'source'
        }))

        .pipe(gulp.dest('./public/css/'));
});
trough JSON?
to an API
 
@rlemon the population below powerty line believes that children are the golden key to get above that line. so more children in poor families, resulting in more poor people, resulting in a poorer country.
 
first-try-well-formatted-code!!!!
give this man a cookie!! :D
 
2:01 PM
@Neoares ?
 
@AwalGarg The books need to update
also we need a census
 
what books?
 
@AwalGarg social science books cyclic poverty / chakriya berojgari
 
wait
is kamasutra an indian book, isn't it?
 
@Abhishrek HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
dude...
 
2:03 PM
@Neoares google how old it is.
 
our country can't update their C compiler from 1984 and you want them to update their stats lmao
 
@Abhishrek so it seems India is on regression :/
 
@Neoares manu smriti even encourages the male society to masturbate after 13 years of age.
 
crl
@MikeBoutin why you want to do tat?
 
@AwalGarg that has nothing to do with a census
census is controlled by government
 
2:05 PM
@crl to send to a REST API
 
@Abhishrek the point is, shit doesn't get updated here so easily
nothing does
 
books are controlled by eccentric assholes who are incomprehensibly ignorant
who think nothing new can occur unless they understand it and we are forced to call them teachers
 
!!afk lunch
 
How should I convince my boss we should move away from Meteor and use Node instead? Node seems a little more... minimal (in a good sense of the word)
 
away from meteor... to use.. node?
 
2:06 PM
is meteor a back-end?
I know nothing about it
 
crl
@MikeBoutin why serving gulp files on an api?
 
@corvid don't take that responsibility on your own head unless you are absolutely sure you have enough time to do so and you have a better team than meteors and really solid reasons to make such a change (suggestion)
 
@crl i'm making a simple application for my team to stock gulp recipes
 
@AwalGarg Node/angular and maybe mongo or something.
 
@corvid are you already using meteor?
Mongo is terrible, Angular is outdated.
You might actually be better off with Meteor, which is also pretty bad :D
 
2:07 PM
@Zirak DOGGIES!!! imgur.com/gallery/SRJRS
 
@crl i just need to stock them in the db
 
^^^^. the new meteor release is much better than whatever node thing you can use.
 
@BenjaminGruenbaum I don't really like mongo :\ What is the front end framework javascript people are using nowadays?
 
@corvid don't focus on frameworks focus on problems. That said - mostly React.
 
crl
@MikeBoutin in text it's ok
 
2:08 PM
@Abhishrek The main reason is because we have two projects, and one is much smaller and I think would benefit from less overhead. The main one -- not gonna rewrite that
 
@corvid ^
@corvid if the second project really can be re-written try react over angular
and backend - i have no clue
 
We're starting to use React at work; I think it's decent, but I'm not sold on which framework is the best
 
and
 
@crl In text? It's already text...
 
crl
so it's ok
 
2:09 PM
@BenjaminGruenbaum The application in question is almost purely data driven, so no routing or anything (which sounds weird I know). Does react handle that well?
 
1 min ago, by Benjamin Gruenbaum
@corvid don't focus on frameworks focus on problems. That said - mostly React.
2
 
@crl it won't pass lol
 
can anyone tell me why this http://jsfiddle.net/1z650vxn/ is not working pls?
 
no
 
crl
@MikeBoutin {"file": gulpFile}
 
2:10 PM
@crl ho i didn't tried this!
 
crl
if you want an object
 
thank you
 
Hey guys, does one of you know how to say in regex : "a word finishing by "/" "
 
/a word finished by \//
 
crl
/.*\/"$/
 
2:11 PM
@crl no i already tried it
 
@Baldráni /\w+\//
 
:26723023 export function submitRecipe({title, tags, code}) {
  return function (dispatch) {

    return request
      .post(config.API_URL + '/recipe')
      .set('Content-Type', 'application/json')
      .send('{"title":"'+ title +'","tags":"'+ tags +'","code":"'+ code +'"}')
      .end((err, res) => {
        // if it have a result
        if(res.body.status) {
          dispatch(recipeCreated());
          dispatch(initialize('recipeForm', {})); // clear form
        } else {
          dispatch(recipeSubmitError(res.body.message));
This is my function who send the data
 
@KendallFrey Thank you !
 
PSA: Do not upgrade babel until 6.0.2 is out; it has a ton of bugs
 
@corvid guess.
 
2:13 PM
> Hello Oliver!

JetBrains IntelliJ IDEA team values your contribution during IntelliJ IDEA 15 EAP. As a token of our appreciation, please accept one free year of the 'All Products' subscription!
Neat!
 
give it to me
 
Nah, I prefer to waste it by unlocking it and then still just using my WebStorm subscription for a year
 
I actually already have an intellij license
 
I actually only submitted like 100 bug reports for WebStorm
 
crl
@MikeBoutin JSON.stringify you monster
 
2:16 PM
@crl I tried it first too
First thing i tried
 
@MikeBoutin What's request?
 
Was readline integrated directly into process.stdout in Node 4.0 or something?
 
@MadaraUchiha superagent
 
anyone for a regex correction? jsfiddle.net/1z650vxn
 
@MikeBoutin Yeah, OK, and what happens instead of what you're expecting again?
 
crl
2:19 PM
lol dat regex
 
@crl ^^ copy/pasted regex, working into ng-pattern on angularjs but not like this :/
 
@MadaraUchiha when i send my data in json... it won't take it
 
@Julo0sS Yeah, don't do regex for that
 
theres my data:
{"title":"titre","tags":"tags","code":"var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var sourcemaps = require('gulp-sourcemaps');

gulp.task('sass', function () {
    return sass('./src/sass/style.sass', { sourcemap: true })
        .on('error', sass.logError)

        // For file sourcemaps
        .pipe(sourcemaps.write('./', {
            includeContent: false,
            sourceRoot: 'source'
        }))

        .pipe(gulp.dest('./public/css/'));
});"}
 
crl
seems valid
 
2:20 PM
@MadaraUchiha what do you suggest then?
 
@MikeBoutin JSON strings may not contain newlines
Therefore it's not valid JSON
 
crl
@MadaraUchiha oh
til
 
@MadaraUchiha how can i change new lines and tabs?
 
@Julo0sS Why not something like ^(\d{2})[\-\/]?(\d{2})[\-\/]?(\d{4})$ ?
 
proper JSON may also not contain any tab characters. The more you know ~~
 
2:21 PM
JSON.stringify don't handle this?
 
@MikeBoutin Create an actual object, and use JSON.stringify() it's basically for that purpose.
 
It don't
 
It kinda does...
 
@corvid well example I copy/pasted is supposed to avoid user from entering something like 32-10-2888
 
crl
!!> JSON.parse('{"ok": "damn\nson"}')
 
2:21 PM
@crl "SyntaxError: JSON.parse: bad control character in string literal at line 1 column 13 of the JSON data"
 
gulp your gulp and remove \n
 
!!> JSON.stringify({foo: `bar
baz`})
 
@MadaraUchiha "SyntaxError: unterminated string literal"
 
lol, only takes the first line
 
crl
thought of that too ^
 
2:22 PM
But that works in your terminal though
 
crl
yep
 
@Julo0sS Can any year be valid?
 
crl
but if you parse it back, no yes great
 
@crl Oh, no, it does
 
Thank you all guys!
 
2:23 PM
 
crl
Object {foo: "bar↵baz"}
 
@crl exactly it
 
If you treat \n as a literal backslash followed by N
 
it now works
thank you
 
@Cereal Uh.... huh
 
2:25 PM
@corvid with 4 numbers yeah (didnt try everything but looks so)
 
@Nick hmm, nice suggestion
 
@abdul-wahab 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.
 
> for your safety please do not open internet browser
 
@Julo0sS I think you might just want to use momentjs to be honest. Then you can just do something like moment('03-12-2014').isValid()
 
I like how they called it a bsod
@MadaraUchiha Oh, I have a question for you
 
2:27 PM
moment is a very complete and intuitive library
 
Mornin
 
@Cereal kids today don't know the pain of bsod
 
@Cereal Shoot
 
@rlemon I had a BSOD just yesterday
 
@Cereal where should I send my credit card details?
 
2:28 PM
@rlemon For a millisecond there, I honestly read BDSM
 
@KendallFrey I find they happen a lot less often now
windows 98/xp, bsod weekly. :P
 
@corvid well yeah but it's somehow "heavy" to just check dates that should only match one pattern isnt it? the only dates i'm gonna use are like this dd-mm-yyyy
 
crl
!!urban bsod
 
@crl BSOD Blue Screen Of Death. The screen that pops up on Microsoft when you did absoultely nothing wrong but they tell you that you did anyways. It usually makes you restart your computer.
 
They usually happen when I'm watching a video
 
2:29 PM
& pattern is working fine when I put it into a ng-pattern tag :(
 
@CapricaSix "usually"
 
@Julo0sS If you care that much, split by - and validate each field individually
 
I had tons of BSODs when I upgraded my laptop from vista to 7; it must not have upgraded properly
 
It would be cheaper and a lot more readable than a regex
 
Depends, if you're dealing with dates I'd definitely say it's worth having. At least to get you by for a while.
 
2:29 PM
@KendallFrey sometimes it makes you throw it out the window
 
Although, I'd likely try to run it through JavaScript's Date object, and see if I get any meaningful result
 
Let me just spend 6 years trying to find the screenshot
 
@MadaraUchiha http://i.imgur.com/ae8LQqN.png

She finished the quiz a few days ago, it's due today and this is the only question she didn't figure out
 
2:31 PM
Oh, if you want a good joke, set someone's screen saver to a BSOD
 
@MadaraUchiha I actually use "timepicker" from this : trentrichardson.com/examples/timepicker
 
Tried talking it through with someone else, but they both got stuck trying to find the length of the curve or something? I don't know
 
crl
conservation of energy (cinetic and gravitational)
 
it works fine when user "clicks" but user is allowed to enter manually into it, tis is why i need a check
 
@KendallFrey I like setting their desktop background to a picture of their desktop then hiding icons and minimizing the taskbar
 
2:32 PM
@Julo0sS Yeah, so who cares
Validate on the server one more time and be done with it.
Client side validation is for UX only anyway, and they get decent UX with a datepicker.
 
I like to set the background as someone else's desktop and then do what lemon does.
 
You aren't supposed to try the assholes who try to circumvent the system with client-side validation.
 
@Cereal That is a bit tricky one
But you have the conservation of energy which obviously comes to play
 
crl
Rust is a general-purpose, multi-paradigm, compiled programming language developed by Mozilla Research. It is designed to be a "safe, concurrent, practical language", supporting pure-functional, concurrent-actor, imperative-procedural, and object-oriented styles. The language grew out of a personal project by Mozilla employee Graydon Hoare. Mozilla began sponsoring the project in 2009 and announced it in 2010. The same year, work shifted from the initial compiler (written in OCaml) to the self-hosting compiler written in Rust. Known as rustc, it successfully compiled itself in 2011. rustc uses...
 
2:35 PM
So the car has 1300 * 49 / 2 joules of cinetic energy approaching the hill, and 0 at the top
!!> 1300 * 49 / 2
 
@MadaraUchiha 31850
 
Perhaps better, grab a screenshot of a desktop with a folder labeled "Secret Porn", then set that as the wallpaper with all the other shortcuts in place
Nothing is wrong, but they can't see that secret porn
 
@MadaraUchiha Yup, got that far
 
@Cereal I didn't understand the second sentence though
 
crl
now this = mgh
 
2:37 PM
The one with the half of the engine's energy and half of the car's energy dissipating
@crl I don't think that applies here
There was work done in the direction of gravity
The engine was running on the way up?
 
hello
 
@MadaraUchiha That's what it reads as. You use the minimum amount of energy to just barely go over the hill
 
@MadaraUchiha yes
 
and the transmissions was in 'P' for 'perpetual motion'.
 
The power output of the engine is needed to determine the length of the hill
 
2:40 PM
@argentum47 hangouts?
 
!!s/hill/drivers penis/
 
@Luggage The power output of the engine is needed to determine the length of the drivers penis (source)
 
i built canvas in html but in mobile canvas two line are automatically join after first line is complete
 
2:40 PM
@Luggage bam
 
@KendallFrey Am I understanding it wrong that 3.4kW * t = 31850J?
I probably am
 
need help
 
although it seems there's still not enough information
@MadaraUchiha yes, you're wrong
 
imgur.com/gallery/pSgsT @rlemon the motherload
 
initial energy is 31kJ, input energy after that is 3.4kW
 
2:42 PM
var onMouseUp = function (event) {
            var elements = (allElementsFromPoint(event.pageX, event.pageY));
            for (var i = 0; i < elements.length; i++) {
                if ($(elements[i]).hasClass("slide-canvas-layer")) {
                    canvas.removeEventListener('mousemove', onPaint, false);
                }
            }
        };
 
crl
energy = power (Watts) * time? right
 
7m/s is enough energy to go how high?
 
4
 
 var onPaint = function () {


            if (tool == "pencil") {
                ctx.beginPath();
                ctx.moveTo(last_mouse.x, last_mouse.y);
                ctx.lineTo(mouse.x, mouse.y);
                ctx.closePath();
                ctx.stroke();
            }
            else if (tool == "brush") {
                octx.beginPath();
                octx.moveTo(last_mouse.x, last_mouse.y);
                octx.lineTo(mouse.x, mouse.y);
                octx.closePath();
                octx.stroke();
 
all the remaining energy needs to come from the engine
 
2:43 PM
any solution?
 
@SagarLimbani please stop dumping code
 
@KendallFrey Uhhh, a little more than a meter
Ahhhh, I see where this is going
 
that doesn't sound right
9.8m/s gives you 1/2m, right?
 
You need to figure out how much energy it takes for the car to reach 20m
 
2:44 PM
Then break it up to energy from the motion and energy from the engine
 
then subtract the initial energy
and divide by the power
 
Right, so energy needed to get to 20m is mgh = 1300 * 10 * 20
 
and don't forget about the energy loss due to friction
 
!!> 1300 * 10 * 20
 
@MadaraUchiha 260000
 
2:45 PM
@Nick i want solution bro
 
@rlemon happy Friday @FlorianMargaine
 
@KendallFrey Right, they said half of all energy was lost
So it would take twice that
 
crl
@KendallFrey it's not taken into accoutn is it?
 
520000
 
@crl yes, it says half of the energy is lost
 
2:45 PM
@SagarLimbani good for you; don't spam your code
 
crl
o the half thing
 
Car has 31850J at the beginning
So
!!> 520000 - 31850
 
@MadaraUchiha 488150
 
crl
at the top (speed 0) kinetic energy = 0, that's all I can say
 
@SomeGuy fucking superconductive magnets, how do they work?!
 
2:47 PM
So engine would need to supply a total of 488150J
 
@rlemon yep, the other day I was thinking about that, while ending the 3rd book
 
@rlemon :D
 
Engine supplies 3400J/s
!!> 488150 / 3400
 
@MadaraUchiha 143.5735294117647
 
So that ^
 
crl
2:47 PM
seconds?
 
@nick i khow
 
Yes
1W = 1J/s
So 3.4kW = 3400 J/s
 
crl
1 calorie = 4.2 J
 
You get J divided by J/s so the result is in s
@CapricaSix @Cereal try that ^
 
Why would the car only be putting out 3.4kW though?
:P
 
2:49 PM
@KendallFrey To save gas, obviously.
It says so right there
 
that's ridiuclously low, no?
 
@KendallFrey for it to take 2:20 minutes to climb a 20m hill?
 
Can I get an explanation of what you two did so I can send her something other than a number? =p
 
that's pretty slow too
 
Yes, that is ridiculously low
 
2:50 PM
so w/e
 
> Kendall the Hedgehog
 
2:20 to climb a 20m hill? What the hell sorta incline is this hill?
 
@crl o/
 
@Cereal Right, so gravitational energy works according to m*g*h
 
This guy needs to understand the Oberth effect to get more energy savings
 
2:51 PM
This is why god teamed up with Moses to help Jesus create a supercharger.
 
@SterlingArcher He's running 5hp
 
m = 1300kg, g = 10m/s/s, h = 20m
 
hi guys am trying to get images from instagram API using some jquery code but I am geetting the error No 'Access-Control-Allow-Origin' header is present on the requested resource.
 
crl
mgh is an approximation though (with distance to Earth center not changing)
 
2:51 PM
So that would give you the amount of energy needed to lift that car 20m.
 
10m/s/s
 
Good lord, why is he driving a lawn mower up hills?
 
@crl Physics is an approximation.
 
@Neoares Yes, meters per second per second.
 
2:51 PM
I know
 
@SterlingArcher He's not, he's driving a 1.3t car
 
m/s2
 
word problems ftw
 
that's "a" :)
 
crl
indeed
 
2:52 PM
any way to do it
 
@KendallFrey yeah, a lawn mower
 
So the total energy required is
!!> 1300 * 10 * 20
 
@MadaraUchiha 260000
 
in C#, 6 mins ago, by GotaloveCode
 var myurl = "https://api.instagram.com/v1/tags/nofilter/media/recent?client_id=mash";
            $.ajax({
                url: myurl,
                type: "GET",
                crossDomain: true,
                dataType: "json",
                success: function (response) {
                    $.each(response.items, function (i, item) {
                        $("<img/>").attr("src", item.media.m).appendTo("#myimgs");
                    });
                },
                error: function (xhr, status) {
 
Now, we know that whatever we do, half the energy would go to waste (both from the engine and from kinetic energy)
So we'd need twice that
 
2:53 PM
@GotaloveCode did you google the error?
 
and
 
what
 
lots of suggestions about having to add it to the headers
like in php response header
 
So 520000J to just barely climb the hill
 
2:54 PM
not sure that is the way I prefer to handle it as it will be on a sharepoint public site
 
the headers come from Instagram
 
Now, we know the car starts with 7m/s worth of kinetic energy, so mvv/2
!!> 1300 * 49 / 2
 
@MadaraUchiha 31850
 
So the engine needs to add 520000 - 31850 = 488150 to be able to climb the hill
 
@GotaloveCode instagram.com/developer/endpoints re-read this page
the solution is explained
 
2:56 PM
Now the engine outputs 3.4kW of power on average
Which means that every second, it adds 3400J to the energy the car has
 
coughauthenticationtokencough
 
In es6, can you extend a class in a different file in the same way you extend an object?
 
So if we divide 488150 by 3400 we get the number of seconds the engine would run to reach that number.
 
but if you get it upto 88mph, it outputs 1.21 gigawatts
 
@corvid Yes.
 
2:57 PM
@SterlingArcher cough jsonp cough
 
That too
 
I don't think they ever send cors headers
 
!!> 488150 / 3400
 
@MadaraUchiha 143.5735294117647
 
they explicitly say use jsonp for ajax
 
2:57 PM
Hence the result @Cereal ^
 
@MadaraUchiha fantastic
 
@MadaraUchiha But how?
 
@Cereal Is that correct?
 
thanks @rlemon let me 1st go through it.though I have tried jsop as datatype and somehow its goteen past that error.will refer back once i've read your link
 
@corvid Classes are basically functions
 
2:58 PM
@MadaraUchiha She's in thanato class atm, dunno if she'll be able to check for a few hours
 
As long as the function (or class) you're extending from is found in the scope of the extending class, you can do it normally.
 
@GotaloveCode ditch jQuery for jsonp
it is completely overkill and may cause confusion
 
@rlemon jQuery actually abstracts jsonp for you
But it's not nearly fancy enough to justify it.
 
@MadaraUchiha I feel like he doesn't understand jsonp due to jQuery abstraction
jsonp is like 4 lines of code, and crazy easy to write yourself.
 
@rlemon Very possible, yeah.
 

« first day (1847 days earlier)      last day (3087 days later) »