« first day (2140 days earlier)      last day (2791 days later) » 

user5957083
12:00 AM
O_O
 
user5957083
Sweeet
 
@BenjaminGruenbaum I just wanted to thank-you for your time. Even if I dont agree with you I learn alot. I guess that's why I learn something :)
 
if you don't want that to happen, don't click the link
 
user5957083
Ok
 
user5957083
clicks
 
12:00 AM
I told you why I feel this way, but you fail to understand any sentence of mine. So I am tired of typeing them.
 
typing*
 
true
 
it's important, this is the internet
 
false
 
@Oleander sure, but there is no matter of agreement - it's objective and it's literally how it is defined by the language in the language specification.
 
12:00 AM
actually, where's JanDvorak?
 
whats up guys. I need some input on something i am working on. i have a jsfiddle ready.
 
great, share the fiddle
do you also want us to subscribe to your channel?
 
I wanted to know how could i write this as a better object literal - jsfiddle.net/breezy/dqjpkus4 - i am still trying to understand it.
any input would help
 
define 'better'.
 
@BenjaminGruenbaum I used formal logic based on the idea behind 'Hilbert's paradox of the Grand Hotel' to disprove the idea a few hours ago. Just thought the discussion was interesting as it forced me to understand the spec. Haven't verified it yet, but I'll let a college check it in a few days. I'll keep you posted :)
 
12:06 AM
I would solve this problem differently, but I don't have much to say about the code in your way.
 
@Oleander I actually have a math degree you know - the pseudoscience stuff doesn't work here. There is no relation to the halting problem, at all. The fact a promise does not always resolve and knowing if it resolves is reducable to the halting problem is irrelevant since no one checks for it that way.
 
i feel like my code is separated into different areas. for example, i am defining variables outside the object, should i run everything inside the object i created?
 
<input />
 
@Luggage
 
@BenjaminGruenbaum Mine is in this particular field :)
Algorithms and logic
 
12:07 AM
2 hours ago, by Luggage
that you are trying to outsmart yourself?
 
@Oleander what's your alma mater?
 
@BenjaminGruenbaum The important part is that we tried and we kept civilised about it. I'm not really interesting in how is right or not, it's more the discussion it self.
*who is right
 
So I was right.. troll.
 
Hello!
 
Howdy
 
12:08 AM
@BenjaminGruenbaum Not sure what that is.
 
@Oleander there is no question of who is right, there is an objective language specification and it defines things a certain way.
@Oleander what university?
 
@BenjaminGruenbaum Aha. Chalmers.
 
@BryanBarrera you can put those variable on the object, and in the function refer to them as this.variableName
 
@BenjaminGruenbaum Yours?
 
Hebrew University.
I think it's ranked ~30th best in math, but I'm really not sure - not that that's relevant.
 
12:10 AM
// @BryanBarrera
var showItems = {
    name: 'Jimbo',
    sayName: function() { console.log("Hello " + this.name); }
}
showItems.sayName();
 
Can i try to explain myself in pseudocode to ask for some help ?
 
Was ranked ~25 in CS.
 
@BenjaminGruenbaum Nice. World rank?
 
I'm getting a master's degree (taking forever) in TAU now.
 
I have a high school diploma from a public school in the US... what does that get me?
 
12:11 AM
@Oleander world rank is ~30 in Math and somewhere top 100 in CS, not that that's a big deal.
 
@Luggage - awesome man. thanks for the direction. I will try that out.
 
@Luggage It's not your deegree that matters, it's your attitude towards knowlage
 
I love knowledge.
 
@BenjaminGruenbaum That's really good.
 
/me walks in with an almost sure entry in Cambridge University for CS
pretty lucky :P
@Oleander tell companies that
 
12:12 AM
@towc I do. It works.
 
tell my parents that then
 
well.. it works after you ahve experience..
and I got lucky there.
a long time ago.
 
I wouldn't say I don't have experience
 
... at resizing linux file partitions?
;)
 
that's my main jam, yup
well, clearly I better not drift off from web dev too much
 
12:15 AM
@Luggage Just keep in mind what knowlage really is. Knowing something without justification, is something else.
 
or I'm really going to end up transforming any machine I use into a toaster
 
@Oleander like ignoring those 10 lines in [resolve] that say that if x is an object with a then function then treat it like a promise and call that then and resolve with whatever value it resolves to - otherwise with x.
 
hey.. lots of programmers are bad at hardware / os-level junk. If you don't pick it up, just pretend to be too important to be bothered with that stuff.
and ask the knuckle-draggers
 
I like that way of thinking
 
@BenjaminGruenbaum Chalmers seems to be 82th place in the CS cat. so right behind :)
 
12:17 AM
1 message moved to Trash can
@KarmaDoe Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
So, beeing the following:

that.dosomething = function() {
that.serviceName = 'some::name';
for ( var i = 0; i < args.length; i++) {
utils.log(args[i].end);
that.Parameters.end = args[i].end
utils.log(args[i].other);
if (args[i].other == 'B') {
that.A();
} else if (args[i].other == 'D') {
that.B();
} else {
utils.log('NONE');
}
};
cb('Something.');
},


How can I make it complete A or B before begining the new loop ?
Can't modify A or B, only module available is 'bluebird'. node.js 0.10.15v.
 
@BenjaminGruenbaum Justification accordning to your own premisses, not someone elses
 
Hebrew University would be 82nd if @BenjaminGruenbaum left.
 
According to every promise implementation that conforms to the spec.
 
@BenjaminGruenbaum The other two are that it has to be valid and you have to belive it it
 
12:19 AM
@Oleander there is no matter of belief, it's the definition.
 
belief has no importance here
(or anywhere)
 
I'm talking about the general def. of knowlage
It wasn't related to this
 
@KarmaDoe is the order actually important or do you just want to wait for them all? Also, why is your code not indented? Why are you iterating with indices?
 
@BenjaminGruenbaum Do you understand the idea be hind subjectivity and why that has an important role here?
 
@Oleander I know, I was just stingey, and I really think you should give process.on('unhandledRejection', e => {throw e; } a shot or wait until we merge the automatic warnings proposal.
@Oleander I don't "not understand it", I disagree with the premise there is anything subjective here.
 
12:22 AM
@BenjaminGruenbaum So you belive that your view on the subject isn't subjective, just as mine is?
 
There is a cold cut definition of what's treated like a promise in the ECMAScript specification and in Promises/A+ - and that's it.
 
Note that subjective doesn't mean wrong, just different
 
@Oleander I don't believe that, I know it.
 
@BenjaminGruenbaum Order is important.
It's not indented because i fked up while i did, ctrl + k here.
 
Not in the context of conforming to a spec. right or wrong.
So.. unless you are making your own competing alternative to Promises, your opinion isn't important to solving any of your problems.
 
12:23 AM
@BenjaminGruenbaum Do you consider your view on somethings surrounding your self nonsubjective?
 
Your understanding is, of course.
 
I've worked with promises extensively (I have over 3k points in SO and over 500 answers) and I know all the guys who wrote those specs - that unhandledRejection thing in Node - I spec'd that myself and I'm a node and bluebird core collaborator. I know exactly what they meant - not that any of that matters since it's all written down in formal language and specified.
 
Case closed. Let's wait for the Jury's decision.
 
So even if subjectivity mattered and how I fealt about the spec had any relevance - I'd have a point because I know the spec from the people who wrote it and in a small few cases - I am those people, but it doesn't. The only thing that matters is the specification itself in this case.
@Luggage so what are you working on right now?
 
@BenjaminGruenbaum I think you are suffering from the Socratic Bystander's Fallacy Dilemma.
Watching TV?
or do you mean my job?
 
12:27 AM
A was talking about it a general terms
I let the main subject go a while ago
 
But there is nothing subjective about then.You can of course roll your own spec and language that's not JavaScript and define it as you please.
 
@BenjaminGruenbaum I was just interested if you ever see your view as non-subjective
 
Of course, when I debug code for instance my view is irrelevant in the face of new data that invalidates it.
@Luggage what are you watching now?
 
I don't know.. youtube is on auto-play. some guy is playing with an HTC vive
You want to know what I'm wearing too?
 
@BenjaminGruenbaum Just trying to get a feel for your view on your surroundings
 
12:30 AM
I'll give you a hint. It's not pants.
 
@Luggage is it pants?
 
close.
So, I think I'll be keeping mobx, btw. It seems a good fit to port from knockout to mobx/react.
 
But it does encourage a few practices that the react devs disagree with, like passing a whole object to a child component (to it can oberver it) instead of the individual properties
but i like how it's computeds, autoruns, etc map to ko constructs (though not always with the same name)
also.. I get the impression that the dependency tracking that KO and mobx uses is rare. does reactive extensions have anyhting liek that?
because it's one of the few i've seen that matches that from KO.
but my plan is to make most of my standalone components follow react idoms, and my "pages / viewmodels" go mobx style, using their recommendations for passing props for efficient re-rendering
 
1:04 AM
Hey @Luggage i did what you suggested, a little different. But now the 'Show more' function is not working as how I originally had it set. Here is the original fiddle - jsfiddle.net/breezy/whqohof7 and here is the new fiddle with your suggestions jsfiddle.net/breezy/dqjpkus4/1 . Can you see what I am doing wrong?
You will see in the new fiddle that only 20 items display, when there are 23 items.IN the old fiddle you will see that all 23 items display when i click 'show more'.. any input would be helpful.
 
put this at the top of the file: "use strict";
then run it and you'll get an error.
that'll enforce that you aren't referencing any undeclared variables. Which you are.
"use strict"; //goes on a line by itself, fyi
 
i see the error.
will look into it. thanks
 
also, you put all your instance variables into b, which it outside of the object, negating the reason you put them in there in the first place. Unless I misunderstand your intention, there.
 
i used an example online. i am trying to understand how to write a better object
i'm trying to use best practice and learn what the best way of organizing my code is.
 
whats with the new chrome asking about if I want to link the sourcemaps. Before it just seemed to work.
 
1:18 AM
@BryanBarrera
1. totalItems is undeclared (twice)
2. you read b.numberOfItemsToDisplay, but never write it again, leaving the original value forever.
3. instead of b just reference this.settings directly.
3b. If you do 3, you'll need to .bind() the functions
I would flatten out the settings, too. just this.numberOfItemsToDisplay
 
ok. i will look into those items. thanks for your help.
 
Country with 1.2 billion people wildly celebrates 2 losing medals. How embarrassing is that? https://twitter.com/tariqvaidya/status/768351955991273472
@Abhishrek @SomeGuy @AwalGarg
Also, this is exactly what my "talk" on monday was on.
 
1:42 AM
@littlepootis bronze and silver are not loosing metals
they are just not 1st place
 
In 2-sided sports, bronze is a winning medal and silver is a losing medal
 
@KendallFrey please explain I don't understand what you are saying
 
in 1v1 or teamvteam sports, gold and bronze medals are earned with a victory, and silver is earned with a loss
 
Interesting din't know that
so the person who tweeted didn't know what he was talking about then
is that what you are saying
 
no, that's different entirely
 
1:48 AM
ok thank you for explaining I somehow feel more knowledgable and more confused at the same time
 
Hey guys, do I need to use a promise for this

response = someAjaxFunction(some_param);
I had moved an ajax call to a reusable function, and now it's saying response.count is undefined. I'm printing the response in the console and it's firing after the error, so it's obviously the javascript not waiting long enough
 
how do you return from ajax?
 
return response;
:p
 
inside of a callback?
 
I don't want to install a whole promise lib for this
 
1:56 AM
^ yes you need a callback or promise unless you do synchronous ajax which isn't a good idea most of the tmie
 
@William ummm
 
    function openTicket(assigned_to, priority, short_description, description) {
    $.ajax({
        type: "POST",
        url: "/api/1.0/tickets/",
        data: "assigned_to=" + assigned_to + "&priority=" + priority + "&short_description=" + short_description + "&description=" + description,
        success : function(response){
            console.log(response);
            return response;
        }
    });
}
 
@taco yea that won't work
 
use fetch?
 
lol this is funny taco
 
1:57 AM
taco, is that you?
 
you are here a lot you should know that doesn't work
 
how's it funny :/
There's a reason I switched back to sysadmin. :)
 
your a regular aren't you taco and you bring stuff like this in here?
 
@taco you return from an anonymous function to some internal call made to success
 
yeah i know it wont work, i just never used promises/bluebird/etc much
 
1:58 AM
because the success runs at any point in the future
pass openTicket a callback function and use that as your success
 
ok thanks. I'll look into how to do that
@William yeah, I've been learning via osmosis. I mainly put my body against other developers bodies to learn things
 
let me know how that works out
 
hello
 
Mornin all
 
i have a question
 
2:01 AM
just ask cap isn't working I guess
 
@taco well, that has to be awkward.
 
In HTML5 Canvas, which way is better to drag an image to a specified position?
Translate it or Clear & draw the image at the specified position?
 
@littlepootis especially when i don't ask
 
i have this code

jQuery("table").html("").append(html);

that will append the result of html but how can remain the text in th?
 
@choz you can translate in canvas?
I always thought you had to clear and redraw
 
2:03 AM
yes, but I think he means translate the canvas itself.
 
Translate the canvas context object thing..
oh..
 
think of canvas as mspaint you control with js
 
So translate is actually translating the canvas? Not the image?
 
once something is down, it is an image
you have to clear the image and redraw to move that something
 
2:04 AM
I see..
Thanks guys.. let me play with it a little more time.. Still trying to understand how this works..
 
^ no canvas expert but I believe lemon is right
 
@user3793272 .append(html) what is html there?
 
like when you say context.fillRect(x,y,size,size) that doesn't give you a square object. it paints it to the canvas, which for all intents and purposes is an image resource
 
hye everybody...
 
@choz some code
 
2:06 AM
hwody
 
@rlemon Yeah i get that.. Im currently struggling where I need to rescale, rotate, and drag an image in a canvas. The image may not leave the canvas so that I set a boundary. And to rotate it to a certain angle at the center of the pivot of image in a canvas..
 
@user3793272 jQuery(..).html(content) overwrites
 
@littlepootis wait a sec i will elaborate it
 
Thanks, guys. Using a callback worked. I've been away from JS for a year, so I forgot all about cb's
 
pootis but it overwrite also the <th>
 
2:10 AM
@choz rotate the canvas, draw the image, rotate the canvas back
 
@William and the reason I still come here is because of (most of) you guys
 
Guy, one simple fast question. If I have 1000 pdf link, how can I print 1000 pdf with 1 click. Any recommended software that can read link from text file and then download it?
 
i just want to over write the <td> only
 
@rlemon For the third one, why would i want to rotate the canvas back?
Sorry, still kinda newb here..
 
well if you want to rotate an image 30 degrees, you rotate teh canvas then draw the image then rotate it back so the image will be rotated, not the canvas.
because you can't drawImage with a rotation, you have to rotate the 'scene' first
context.save(); // saves state
context.translate(blah);
context.rotate blah..
context.doyourstuff
context.restore();  // returns the translates change and good stuff
I mean you don't have to rotate it back or whatever
 
2:13 AM
<table>
<tr>
  <th>dont change</th>
  <th>dont change</th>
  <th>dont change</th>
</tr>
<tr>
  <td>result</td>
  <td>result</td>
  <td>result</td>
</tr>
</table>

i want to change the inside or overwrite the content of <td> only

this is my code

jQuery("table").html("").append("new result");

this is what ive done that was close to answer so far

jQuery("th").each(function(){
	var wew = jQuery(this).html();
	jQuery("table").html(wew).append("new result");
});
 
@choz They mean applying a rotate transform to the canvas's matrix, so that the thing you draw will be rotated, not to rotate the canvas element.
 
@rlemon Damn.. i got it now.. Thx alot..
Let me try on that..
 
@user3793272 .html("") overwrites everything in <table>.
So, you'll need to select the tds.
 
@user3793272 var td = $( 'td' ); td[0].textContent = 'First Cell'; td[1].textContent = 'Second Cell'; td[2].textContent = 'Third Cell';
 
@littlepootis what if i append more than just one row?
 
2:16 AM
You want to append rows?
Then, don't use .html().
 
Any idea guys.?
 
Use .append().
brb
 
@user3793272 $( 'table' ).append( '<tr><td>1<td>2<td>3</tr>' )
@user2514863 Try read a DOM tutorial followed by a jQuery tutorial.
 
@littlepootis

im using append in my code which is this one

jQuery("table").html("").append("new result");
@Sheepy but i want my <th> to remain
 
@Sheepy @rlemon Guys.. just clarifying.. For dragging an image in canvas, should I translate the canvas or clear and redraw the image on the specified position?
 
2:20 AM
@user3793272 Note that I did not include html, since you only want to insert a new row. The previous code I gave (the one on td) would modify the existing row.
 
@littlepootis but if doing that code my th will change also
 
@BenjaminGruenbaum Here's a formal-ish version of the proof; gist.github.com/anonymous/52f0564c84a3cf17ddc2c6b4a7fffa66
@BenjaminGruenbaum
Oops,
@BenjaminGruenbaum As a college of mine pointed out. A simpler version would be to just let you define the function g and then pass an object O that is included in T but not P.
 
@Oleander Does that essentially just says, "because .then may fail, you can't rely on then to fulfill the spec"?
 
@Sheepy .2 you mean?
@Sheepy I made a small mistake in .2. I'll fix that asap, just a sec
 
@Sheepy but i want to clear the html first before to display the new result but i want the <th> untouchable only the td
 
2:28 AM
@BenjaminGruenbaum Can't update the gist for some reason, here's another one: gist.github.com/anonymous/ecf9ae41e58e8d9a9d6de8ecdb3c340f
@Sheepy One of the suggestions to test if x is a promise or not was to run it. The halting problem proves that this isn't possible. I just have an example of when
*gave an example of when
 
I see.
 
@FlorianMargaine Regarding your promise answer: gist.github.com/anonymous/ecf9ae41e58e8d9a9d6de8ecdb3c340f
5h well spent. Time to sleep.
 
Jsfiddle is down?
 
2:52 AM
Oh, is it?
 
@Cerberus Welcome to the JavaScript chat! Please review the room 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.
 
Hah, a bot!
@CapricaSix Thank you, bot. I have told some users the same thing in the English room.
I do have a question. Does anyone know of a tool that can point out this error to the exact place, or at least that is more specific than just "line 2"?
> var state = 'closed';
var message = 'the house is ' state;
I had a very long line with bits like this, and I failed to spot the error after looking at it several times, because:
1.) Firebug didn't mention the correct error (it said "missing semicolon");
And 2.) it didn't point to or highlight the exact location.
 
@Cerberus + for concatenation.
var message = 'the house is ' + state;
 
@littlepootis Gracias.
 
@Cerberus Try grunt jshint
 
2:56 AM
I did find the error.
 
Well, it almost pinged @Cerbrus
 
But it took me too long.
@choz Hmm what is Grunt? Is that different from jshint.com? I tried that, but it gave me the same imprecise info as Firebug did.
I'd have liked for it to highlight the space between ' and state.
 
Yeah something like that..
 
Or say "you may have forgotten a +".
 
@choz Why grunt?
Those build tools suck.
 
2:59 AM
@choz Ah, OK.
 
Just run ESLint on your code.
 
If you use strict mode, that'd help alot
 
Or automate it using scripts (npm or otherwise).
 
Lint didn't spot the error at all!
 
@Cerberus Actually after I read that it said `'missing semicolon', it does make sense to me..
 
3:00 AM
Wait, I used jslint, not eslint.
 
Errors aren't accurate.
 
If you're used to it, they are..
 
@choz Right, I understand now why it said that. But it just didn't help me much, because it didn't seem to make sense before I understood my error.
 
They technically are, but they aren't always helpful/
You don't need a linter to spot an error, just try running it.
 
@littlepootis True.
@littlepootis How do you mean?
@littlepootis Actually, ESlint does highlight the correct location!
Thank you very much!!
I will use this from now on to test my scripts.
 
3:06 AM
Nice
 
! It even underlines the error as you type!!
 
hello
can i ask a question?
 
@Cerberus Doesn't you editor have syntax highlight?
 
Also, if you're using something powerful, like vim, you can install a plugin that auto-lints your file.
 
<table>
<tr>
  <th>untouchable</th>
  <th>untouchable</th>
  <th>untouchable</th>
</tr>
<tr>
  <td>result</td>
  <td>result</td>
  <td>result</td>
</tr>
</table>

i want to change the inside or overwrite the content of <td> only

this is my code

jQuery("table").html("").append("new result");

this is what ive done that was close to answer so far

var wew = jQuery("tr:first").html();
jQuery("table").html("").html(wew).append(html);
 
3:16 AM
@Sheepy It does, but the highlighting didn't spot this?
What editor would you recommend?
I'm used to Notepad++.
But I'm not a programmer at all...
I don't even know Javascript.
 
syntax highlighters can't spot this
 
@littlepootis Ah, cool, is this Vim?
 
yep
has everything you'd find in IDEs
 
I'm installing Eslint for Notepad++ now...
@littlepootis I've no idea what that means, but it looks impressive!
 
@Cerberus I'm using NetBeans with vim plugin. But I'd use WebStorm if it's not so expensive.
 
3:23 AM
Ah, is Webstorm better than any other editor?
 
@Sheepy Whats with this webstorm stuff ive heard so much about.. is it any better than sublime or vim?
 
@Cerberus Not really
 
@Cerberus There are many kinds of better. But IntelliJ does make very intelligent IDEs.
 
Oh, Valve turned 20 yesterday
I was wondering why everyone got free hats
 
Any great discounts?
 
3:29 AM
Dark Souls "Test of Sanity" III is at -33%
 
@Sheepy OK noted!
Is that for Java only?
It seems Eslint doesn't exist for Notepad++.
But I can use the online tool.
 
3:45 AM
@Cerberus No. Their Java editor is free, which I also highly recommend. But they also make editors for other languages. WebStorm supports JavaScript, CSS, HTML. There are also IDEs for PHP, Python, perhaps C#, and some others.
 
Ah OK, but those aren't free?
 
4:14 AM
nope
 
@Yeeee Welcome to the JavaScript chat! Please review the room 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.
 
Hey so if you can and look at the codepen, the issue is after I refresh the page my add object doesnt appear, how can I use local storage to save items that are being added?
 
4:55 AM
@littlepootis who da hell is that guy - and is it seriously okay to shame other countries' spirit publicly for apparently "famous" people? what kind of idiotic country has such leadership?!
 
@AwalGarg well, dude has a point
 
No, he doesn't.
 
statistically speaking, 2 medals per 1.2b people is an abnormality
 
5:12 AM
I am sure 10 or even 50 medals per 1.2b people is extraordinarily larger, right?
 
what
 
and yeah, 50 medals is a lot, especially if like half are gold etc.
 
HELP PLEASE
 
if you count medals per capita, india is last place by a gigantic margin
people who speak their mind, especially if they're famous, are always welcome and refreshing
 
5:19 AM
Guys!
Does anybody faced similar issue before?
http://stackoverflow.com/questions/39137036/same-code-base-but-differnt-database
 
@user6571640 Welcome to the JavaScript chat! Please review the room 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.
 
especially if they have a point
 

« first day (2140 days earlier)      last day (2791 days later) »