« first day (1746 days earlier)      last day (3203 days later) » 

12:05 PM
@Maurize Heard of web sockets?
 
@catgocat just seen your 2nd link, thanks dude!
 
user3119231
@MadaraUchiha Heard of not allowed?
 
.. "Not allowed"?
You're allowed to DDoS yourself at 10 times per second, to a PHP script, but not use websockets?
!!wat3
 
that gif ...
 
12:08 PM
Does anyone feel like helping a n00b understand the "new Object" thing in JavaScript? I have this broken code as an attempt to make an object: pastebin.com/rsT837EG What I want to do is to instantiate a new myObject() everytime the module.exports is called. How would one go about doing that? Is it bad design to want many objects of the same type?
But that doesn't do what I want it to ^
 
you can use new on functions ...
 
@JohnSnow Object.create() accepts an object as a parameter, to be used as the created object's prototype.
 
.create is a constructor?
new Object.create(myObject);
??
 
@MadaraUchiha How is my code different from the one in this part: developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/…
 
I don't think this is right.
drop the new
 
12:10 PM
Apart from the 'new' part
 
@JohnSnow That's the problem.
 
Dropping the new will work just fine in doing what it's supposed to do; create one instance
 
@JohnSnow Export a function which, when called, creates a new object
 
Which means that I will receive the same object from the export
 
Then you can require() the module once, and create as many instances as you want by calling the function
 
12:11 PM
var myObject = {
        name: 'Object'
        type: 'Memade Object'
}
you're missing commas
and a semicolon (albeit that is not the error)
 
Oh, well I'm not in my real code
Sorry for broken example code
 
module.exports = function createMyObject() { return Object.create(myObject); };
 
var myObject = {
  name: 'Object',
  type: 'Memade Object'
}

module.exports = function() {
  return Object.create(myObject);
}
var factory = require('./myObjectThingy');
var a = factory();
var b = factory();
 
@JohnSnow : a tip, if you want to describe a function/object to be used as object, start its name in upper case ...
 
module.exports = Object.create.bind(Object, myObject);
 
12:14 PM
@MadaraUchiha That still returns the same object :/
 
@JohnSnow No, it returns a new object with the original object as its prototype
 
@JohnSnow No, it returns the same function
Every time you call that same function, you get a new object.
var createMyObject = require('./myModule');

var obj1 = createMyObject();
var obj2 = createMyObject();
var obj3 = createMyObject();
 
Then why does two objects created from it return true on both == and ===?
 
@JohnSnow Because you can't check object equality with ===
 
@BenFortune What do you use then?
I want to see if the reference is the same, I thought == did that
(then I just tried === for the heck of it)
 
12:17 PM
!!> var obj1 = {}, obj2 = {}; obj1 === obj2;
 
@BenFortune false
 
Wait
wtf IntelliJ, now they're false
 
!!> var obj = {a: 1, b: 2}, factory = () => Object.create(obj); var obj1 = factory(), obj2 = factory(); console.log(obj1, obj2, obj1 == obj2);
 
@MadaraUchiha "undefined" Logged: {},{},false
 
both objects have different refs
 
12:18 PM
So, calling a function will always call an new instantiation of one?
 
no, creation does
 
It will with Object.create
 
Oh, so that's Object.create specific?
 
calling a function doesn't always result in object creation.
no, using new does the same
 
That's not what I asked though
I asked if every time you call a function you call a new version of the function
 
12:19 PM
@JohnSnow Object.create takes an object P, and returns a new instance of an object with P as its prototype.
So every call to Object.create() creates a new instance by definition.
@JohnSnow No, calling the same function twice doesn't create two function instances.
 
Well, yes
@MadaraUchiha Ok
 
user image
4
life as a lemon ain't easy
 
@rlemon Looks pretty rad to me.
 
Liming it up'
 
first time i see a flexible lemon
 
12:23 PM
it's a kawaii lemon
 
@KarelG fell from the tree
 
does anyone have any good e-mail template/helpers?
i have never tried to use html in an e-mail and this is crazy
 
find a free template
email html is crap
you have to use tables and inline styles and shit
 
yeah, it's insane
 
I wonder how much of a monster people will think my project is once done...
 
12:28 PM
okay yeah, maybe a template is best :c
 
It inlines your CSS for you too
 
^--- TIL (didn't knew you could use anding as ^ in java)
 
@BenFortune thanks man. saved.
 
@KarelG What does @Raw mean?
I imagine Gordon Ramsey reading that code being like: "It's raw! I've seen cows moo less than that method!"
 
12:34 PM
@Neil "It's so raw it's still singing hakuna matata"
 
@Neil it's a custom annotation, which says that the method doesn't guarantee that the function satisfies the invariants defined in this class ( @invar annotation )
 
@KarelG Oh, I just thought it was a standard annotation that I wasn't familiar with :P
Carry on
 
i've json which has no keys like this --> {[
  "76",
  "77",
  "78",
  "79"
]}

How should i loop through it now ??
 
how can a loop through that be infinite ?
 
12:36 PM
var Ids = JsonConvert.DeserializeObject(id);
 
It's an array...
Also sounds like a C# question
 
public JsonResult Getfile(String id)
        {
            var Ids = JsonConvert.DeserializeObject(id);
        }
 
@Simply Not even sure how that is interpretted
 
sry, yes it is C#
 
Might be converted to a string and used as a key in an object with no value
 
12:38 PM
@AwalGarg not yet, I'm still trying to fully comprehend and looking at how other pms do it. AND, I'm rewriting the whole spec, in a formal way.. I mean without telling readers how much Zirak sucks.
 
@Simply are you wanting to loop over it in JavaScript or C#
?!
 
in C#
 
@Simply It should be converted to a JArray
 
$.each(json,function(elem){console.log(json[elem])})
 
accedentaly asked in js SECTION
 
12:39 PM
@Simply then ask in the c# room
 
lol k
 

C#

General discussions about the c# language, Squirrels | gist.gi...
 
but do it with jQuery anyway
doesn't matter the language
 
wow, was searching for that
 
12:40 PM
!!google phpQuery
 
!!google javaQuery
 
It looks like JSPerf's.. back!
 
omg im so excited
 
12:41 PM
!!google goQuery
 
@BenFortune That didn't make much sense. Maybe you meant: google
 
!!google jQuery for haskell
 
more pls more
 
12:41 PM
all the queries
 
!!google lispQuery
 
gimme all the queries
 
!!tell rlemon sandbox
 
@rlemon Please go and play in the Sandbox
no
 
12:41 PM
lol
 
rekt
 
this won't allow people to understand these languages. A good understanding = better development in that language
 
also I'm not testing commands.
 
no, you are just giving me all the queries
is there a fortranQuery?
 
Needs moar ASMQuery
 
12:45 PM
@BenFortune isn't that how c++ was born?
 
@rlemon Haha, I guess so
Chrome have changed the tab loading icon, and it's freaking me out
 
Who's the guy maintaining JSPerf? Mathias?
 
What's the deal in Node with db connections? Do you want a new connection for each thing you do?
 
@uselesschien no one really :D
 
@erikroyall Could be any second now. For a permanent solution, https://github.com/jsperf/jsperf.com/milestones/v2 must be completed.
@BenjaminGruenbaum umm
 
12:53 PM
no one, really.
 
user3119231
what you think about this?
 
What do you call a sleeping werewolf?
an unawarewolf
 
@Maurize WebSockets are great and do all the things.
 
user3119231
@BenFortune That is because I am reading this article. :)
 
12:59 PM
s/coz/why
 
Finally, getting acquainted with callbackhell
 
Just wrote some ES5... .bind(this) is just the worst.
 
why do you say that?
 
give me arrows or give me death
 
@JohnSnow No.. you want to pool connections and pull a connection from the pool to do a thing, then release it back into the pool. This drastically reduces the overhead to fire off simple queries.
(Which is how every sane environment manages its db connections)
 
1:01 PM
How do you make a pool?
Never mind
 
Uhh, a shovel and a source of water
 
you need a liner
 
is a websocket connection automatically closed on tab close?
 
One would hope
I turned off adblock. I've seen 7 ads in a row on twitch, and zero gameplay
 
1:04 PM
And then you turned it back on?
 
I need t oget a new one. I was using ublock, then I opened the browser console, and it turns out ublock was error so much, opening the browser console crashed firefox
 
hey guys
 
@Dannehkown hey is for horses
 
Hi guys, can i change the local file path to a local link?
 
What
 
1:06 PM
yes you can
 
@Dannehkown What are you talking about?
 
@uselesschien that is kinda rude don't you think?
 
Now for the fun part of figuring out how to get this asynch hell to work :')
 
@rlemon but that's what she said.
 
@uselesschien was that seriously a homophobic remark o_0?
 
1:07 PM
ex file:///C:/Users/dsa/Desktop/HTMLzxcasd/home.html ill change it to something like location.episode.1 so that even if i move the folder it can still find the file
 
do you need to repeat every derogatory thing you hear?
 
ah, the homophobicest person I've ever seen
 
@uselesschien's mother is a dirty filthy whore, is what my school teacher once said, she likes it on all fours.
It's ok, it's what my teacher said.
 
oh god
 
No harm done, right?
 
1:07 PM
@uselesschien you had a strange teacher
 
@uselesschien don't make homophobic or sexist remarks. thanks.
 
Let's keep this room inclusive to people of all genders and sexual orientations kthnx.
 
1:08 PM
@uselesschien You're young. Be a role model.
 
We only hate you if you jQuery, soz.
 
1 min ago, by uselesschien
ah, the homophobicest person I've ever seen
I'm not homophobic at all. And that was a joke.
 
@BenjaminGruenbaum Don't hate on plants if and when they become sentient
 
@uselesschien not a joke you can make here
now you know
and knowing is half the battle
 
Yep, no harm done.
 
1:09 PM
Tone is hard to interpret from text. Please err on the side of caution.
 
@rlemon somehow I managed to read it as "bottle"
 
Or, if you're extremely funny then it's ok, but really funny.
 
like Zirak
 
@rlemon @BenjaminGruenbaum feel free to use kick and move messages - don't always need spam/offensive flags here :p
 
To err is human. To forgive is divine.
 
user3119231
1:10 PM
I know, this is a idiotic question, but is this correctly? var connection = new WebSocket("ws://10.50.40.29:8080", "protocolOne"); and is this even possible: var connection = new WebSocket("ws://localhost:8080", "protocolOne");
 
New ad here
I think you'll like it
 
@JonClements I didn't spam flag, offensive flag or mod flag. I ignored the flag - I prefer talking to people before involving moderation systems. I think @uselesschien wasn't doing anything wrong intentionally. As always, thanks for the concern :)
 
OMG THAT IS PERFECT
 
@Maurize Chrome won't let you do that without setting specific permissions
 
@Loktar @FlorianMargaine look what @phenomnomnominal found chat.stackoverflow.com/transcript/message/24720919#24720919
 
1:11 PM
Afaik
 
It's true, we just do everything better in New Zealand
 
@Benjamin I know - just pointing out there's plenty of ROs here that have tools available they can use to handle minor situations is all mate.
 
sent a mail memo to coworker : *It was already discussed, the system will not be in temporal state, since it is not shared. Only undo the changes if the user doesn't want to save it*

Now facing to his input the day after : created temporal state by copying literally ALL objects (that big EF) THEN only commit changes if the user wants to keep it.
 
@JonClements yup, completely agreed. Sadly, we can't cancel flags or take any moderation actions in these cases on our own. Everything automatically gets propagated.
 
sometimes co-workers gives you an urge to kill them D:
 
1:14 PM
!!afk 7-day ban
 
@Benjamin I know... and people tend to pile on as they don't realise the context - bother checking it's being handled etc... and them boom... suspension... so it's much better to discuss/kick... that way it's handled locally and in context... if that fails and the unwanted behaviour continues, then use spam/offensive flags or in extreme cases a custom mod flag.
 
i'm now questioning if your name would suit well today
 
Anyone maintaining this library anymore? github.com/qTip2/qTip2/issues
 
@KalaJ you can check its contribution history yourself
 
Seems like no? lol
 
1:18 PM
@JonClements lol busy morning
 
@rlemon lol - never a dull moment
 
@Pops it's been another year - have 6-8 weeks passed already? — Benjamin Gruenbaum Apr 11 at 15:49
@BenjaminGruenbaum is so sassy
 
:D
lol, unaccepted.
Seriously, they can just display:none all the non-mod flags.
 
@benja : just noticed your meta. Since i cannot see these flags, it doesn't have an influence of me. But i got a small sense of impatiency
 
1:28 PM
@uselesschien without telling how much zirak sucks?! blasphemer.
 
@AwalGarg uselesschien is afk: 7-day ban
 
wait what
 
14 mins ago, by uselesschien
!!afk 7-day ban
 
wtf happened?!
 
My guess is a joke on the previous conversation, scroll up :P
 
1:29 PM
yes he isn't actually banned
 
if he's banned, he wouldn't be able to add that message ;)
 
just read benji saying erik didn't do anything intentionally wrong... i am gonna ignore that
@argentum47 new day === new day. oh wait, not in javascript, no.
 
he told a joke. we informed him it was not an appropriate joke for the room. He said okay. We moved on. You all should as well.
 
eh, that "joke" isn't even a joke IMO
 
1:32 PM
ahem, moving on.
 
Well according to the current structure of website, I'd suggest to use PHP here instead of MySQL. As migrating it to NodeJS will take some time, if you are fine with that you can go ahead. — Krishnandu Sarkar 1 min ago
 
Soo... Anyone knows any god read on thread pools in node?
 
@BenFortune lol
 
1:48 PM
@BenFortune Thanks
 
hi
Can d3 is used to make squares PATH ?
like in this its making lines
can it make square also
 
A square is made out of lines
 
but using <path>
 
good morning
 
i wrote a logic where i can add line to draw square using live coordinates of mouse
but using <path> it seems a lil hard
any ideas ?
 

« first day (1746 days earlier)      last day (3203 days later) »