« first day (2493 days earlier)      last day (2454 days later) » 
00:00 - 22:0022:00 - 00:00

12:34 AM
just because you pay them doesn't mean they're easy.
 
1:05 AM
@Arrow that totally sounds like you are talking about escorts :P
 
lol, someone's got to stand up for American women. :p Man, I have never seen it this dead on a Saturday.
 
never seen one of these before
interesting idea
 
interesting an aquarium cooling system
anyone know anything about proxy cashing?
 
adversarial neural network, computers have been beating people at games for a long time.
I don't even really find it to be that amazing. Have AI figure out faster than light travel given our current understanding of science. That would be impressive.
 
@Arrow AI doing any science whatsoever would be ridiculously amazing.
 
1:36 AM
@Mosho tsm! Tsm! Tsm!
 
wut?
 
The sticker on the PC - which is a league of legends top team
 
@KendallFrey also true. but I read somewhere that they were already doing that in Australia with lasers or something.
 
Am drunk arc fuck but also have dinner with my gramps in 10 hours
Wonder how it will go
 
> drunk arc fuck
sounds electrifying
 
1:38 AM
@rlemon I'm done with exams btw
where do we eat
 
In Poland, if possible
If not, go to the Vietnamese place that just opened near ciytrus
 
2:17 AM
Guise how to battle alcohol
 
@KamilSolecki Uranium ammo and a tank can take care of pretty much anything
 
2:30 AM
@KendallFrey am missing yranium
But will turban fish do
Fish tan k*
 
now I want to know how you got "turban" out of that
 
Notnow
 
You need to get off the internet
 
No kwnadall
I am the internet
Is lithgy outside
Light
I have dinner with mygrandpas in 10 hours
Help please
 
Can you get drunk off two spoons of tequila?
 
2:37 AM
Jagermeinster
 
(I am a banana)
 
Say, tablespoons.
 
Threatening nuclear war on Twitter feels like a terms of service violation
 
LOL
 
2:55 AM
Nuclear bombs are dangeorubs
Bam all gone
Even 007
I need sleep
Bye amercia
 
3:20 AM
wtf
wait..
that's not right
puu.sh must just suck at capturing this game
 
4:15 AM
Considering things are going the way of The HandMaid It might be safer to move to Alaska and live with man eating bears.
 
Alaska is a wonderful place.
Have fun!
 
5:11 AM
@Tobiq sorry was afk the other day. yeh i made alot of progress. There was a major bug that updated everyones game after every action of every game. Thats why our game was fine until someone else hosted their game and it updated ours to look like theirs and we couldnt move or anything, hopefully all fixed now :D
 
const Programmer = (obj) => while (obj.alive) tired ? obj.drink("Coffee") : obj.task("code");
 
Would anyone know how its possibile i or j would be -2 in this situation?
if (array)
	{
	for (var i = array.length; i--;)
	{
		for (var j = array[i].length; j--;)
		{
			var x = array[i][j].x;
			var y = array[i][j].y;
 
err
the code scares me
why are you checking with the --?
 
5:26 AM
no idea lol
it was already like that and i figured it was the equivilant of just ++ but the other way
should i change to this?
for (var i = 0; i < array.length; i++;) {
            //For every chain, check each stone
            for (var j = 0; j < array[i].length; j++;) {
 
5:40 AM
is this the right way to do this ticket counter?
@Shrek
 
void 0 isn't that always false?
 
it returns undefined if there is no such index
if its undefined
 
void 0 is always falsy
!!> void 0
 
@Shrek "undefined"
 
you could just rewrite the code to
 
5:53 AM
13
Q: Checking for a numerical index in a javascript array

jkushnerIm receiving json data that is aggregated by numerical indexes. When Im in my forloop, for example, the index might start at 1, which means in my forloop an error would occur because 0 doesnt exist. How do I check if a numerical index exists in the javascript array?

 
const ticketId = 'ticket'+data.id;
if ( this.counter.free[ticketId] ) {
     this.counter.free[ticketId] = 0;
     this.counter.paid[ticketId] = 0;
}
See so much more readable?
 
i don't want the index to be created for data.type==1 if type is not 1
your code is not working
 
6:14 AM
does this make sense to anyone, its baffling me
console.log(array[i].length); //Returns 1
            for (var j = 0; j < array[i].length; j++) { //Crashes because cant get length of undefined
 
6:24 AM
wtf is the obsession with void 0?
void 0 will always be undefined
and since you are uisng ==
the falsy check will always be true
 
i don't know . i got it from here .stackoverflow.com/questions/17245397/…
 
6:44 AM
@Loktar tell your people to calm down, they can take their fishing poles to Sea World, marry their sisters, and put mayo on their cereal. Let them know that their way of life is not in danger. :p
 
7:50 AM
@BenjaminGruenbaum thanks thats an intresting read
btw benjamin that node js site u help me set up is working perfectly now as far as i can see if u wanted to see it without all the bugs it had last time :)
 
8:04 AM
Great, glad I could help.
 
I'm learning about lxc
and it seems cool
I might stop breaking my debians soon
I'll no longer be me
 
Good day guys :)
function FilterOnClicked() {
    document.getElementById("loader").style.display = "inline";
    var input, filter, table, tr, td, i;
    input = document.getElementById("searchid");
    filter = input.value.toUpperCase();
    table = document.getElementById("myTable");
    var rows = table.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {
        var cells = rows[i].getElementsByTagName("td");
        var j;
        var rowContainsFilter = false;
        for (j = 0; j < cells.length; j++) {
When my function is triggered, the th is gone
 
Hello
 
hi kamil
 
8:19 AM
Hi @KamilSolecki haha what's up
 
wait ignore me i got that wrong
 
Oh @RachelDockter it's fine :) I tried to put id on tr inside the tbody but it doesn't work either
 
Paz
8:32 AM
Question, Should I learn AngularJS or Angular 4?
 
what is angular ive seen it alot, ive gathered its just like jquery but abit different or something
 
@towc good luck with that
 
I bet I can easily break the distro through lxc as well
the files are shared anyway
rm -rf still does its job
 
I know of this cool trick that'll help you not break your debian.
 
use windows? :P
 
8:36 AM
Ubuntu
 
8:59 AM
@towc and while you are at it, do install games :P
 
@KamilSolecki online minesweeper is all I need
I can still feel those oats with blueberries in my mouth (FIGURATIVELY)
can't wait 'till I go back
this family trip hasn't been great. At all.
romanian diet apparently makes you very very fat as well
 
9:26 AM
What do you eat there?
 
 
2 hours later…
11:03 AM
@towc look into some of @FlorianMargaine's work
 
11:27 AM
@BenjaminGruenbaum do u have any experience with socket.io? atm im sending info to every single client and checking client side if they are who i want the info to be sent to. Its not sensitive info so its ok but i feel like that could make a person lag alot
 
@RachelDockter what you're doing is called "broadcast"
If you only have a few clients it works - otherwise you might want to consider a system that scales. Those systems can be as simple or as complex as you'd like.
At Peer5 we have hundreds of thousands of open websocket connections all the time - so we have some pretty advanced tricks to get things done. You should be fine with setting up a simple protocol.
Take a physical piece of pen and paper and draw circles for clients and the server and figure out how data should flow.
Of course in a chat for example - broadcast is required (everyone needs to see everyone else's messages).
 
hmm now its getting a little tricky
do you think it would cause alot of lag to broadcast everything?
ik it would depend on how many broadcasts your getting but in general would it take a ton to make a performance difference?
 
I don't know what your use case is, you're going to have to benchmark and see.
I'd recommend a good networking book but that's objectively not easy math. I'd check out socket.io books maybe there are good ones.
I'd default to send messages only to other users who need them rather than to everyone, though.
 
yeh thats a good idea. The thing with mine is every detail about every game is getting published to everyone for the slight chance that they are spectating. Thinking about it now it should have a spectators list and only publish it to them
im gonna try find a socket io book
 
11:53 AM
If you can recommend it (or recommend against it) when you're done reading let me know - I'm looking for good reference material
 
Socket.IO Cookbook by tyson caderhead looks good, some good reviews too. im trying to find an online version
 
12:36 PM
does anybody know how to redirect page with given data using ctx.render? ctx.render doesn't actually redirect page
 
12:58 PM
hya
anyone here wanna help me out with naming?
i could go for "Bob" but im not so certain about it
 
Definitely Bob.
 
its about an Html api
i need to provide a name for all html tags
such as <a>, <button>, <table>, <body> etc
i could do any of those but none feel really appealing
(on a side note, <a> would probably be an Hyperlink instead of an Anchor since Html5)
 
@Wietlol the official terminology is BOB (Bound object boundary)
You should call them that.
Bound object (as in a host object provided by the browser to JavaScript) - the boundary is in that it's written in HTML typically and not from JS (although you definitely can create these from JS)
 
Google says "wtf" when I enter "Bound object boundary" in the search bar
@BenjaminGruenbaum i dont really understand what you are saying
i need to think of a name
nothing can change that
if I just use the element name itself such as Table, Button, Body, etc
then it gets annoying with other people writing stuff with the same names
So i really want to have a prefix/postfix but one that isnt annoying by itself to write each time
a prefix will probably be best because of intellisense
 
You seriously thought that my reply to use "BOB" as the name after you and @MadaraUchiha joked about it was serious?
 
1:09 PM
I suppose that "Html"-prefix is the best of it
@BenjaminGruenbaum well, there was some kind of terminology on it
iirc
 
@JinxerAlbatross Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@Wietlol I was kidding
 
in any case, i still need to get a nice name
 
Don't prefix or rename native HTML elements
That would annoy people very much most likely, can you namespace them instead?
 
1:11 PM
i can
they are
 
I'd rather type L.div instead of LDiv a hundred times
 
but you include them by namespace
 
Although I don't know what your real use case is
 
so that'd be div instead of L.div
porting html to another language
more specifically, Java
so i need a nice Api
I could do Html.Div
and such
but i dont see much difference between Html.Div and HtmlDiv
 
You want to port the dom or HTML?
 
1:13 PM
dom
 
If the latter, porting HTML from where?
 
:D
on compiling, it generates js code
 
Then use the DOM terminology, you'd need to port createElement and not "div" anyway.
That sounds awful :P
 
it actually works already
this is what I used so far as testing code
but now, I want to include the already existing dom elements
its like TypeScript, but then Java syntax
 
Why did your write your own Java DOM API? There are tens :P
Also, why would anyone ever want Java syntax? I'm doing Java these last few weeks after not doing it for a few years and... ew.
 
1:15 PM
because mine assumes you compile it to javascript
 
Also, have you heard about Kotlin?
Literally a JVM language that compiles to both JS and Java
 
so, none of the functions i declare in those classes really exist
i dont like kotlin syntax
what you dont like about java?
does make sense though
:p
 
1:33 PM
is there a way to go to the index.html page without specificly going to the file location of /index.html
my websites home page is www.x.com but when i click a home button it will say www.x.com/index.html
its still correct and works but id rather it not be there
 
Routing
 
I don't think she is talking about routing
I think you need to set the href to "/"
 
.htaccess? no?
 
I really don't think she's talking about URL rewriting either
 
1:49 PM
@RachelDockter <a href="/">
 
oh haha that was easy
yeh i just put / instead of /index.html
 
Depends on how your server's setup.
set up
 
 
2 hours later…
4:19 PM
cc @SterlingArcher @rlemon
 
4:32 PM
@SterlingArcher prntscr.com/g7z07r ? its brancing out
 
@Tobiq SterlingArcher is afk: golfing
 
Hi
 
What do you guys feel about when your boss tells you he wants results first and we can refactor the software later?
 
I would say "ok, you are the boss"
 
I keep on saying we should have it perfectly layed out at the start
seriously its a waste of time having to refactor everything at a later stage. Imagine having spaghetti code starting with 100+ classes
 
4:36 PM
I know but business people love seeing results first.
 
@Asperger thats normal.
 
ya
 
I saw bosses saying you can write horrible codes as long as it works
 
@Tobiq yep I feel they kind of dont care if the code is crap and makes it hard to fix bugs or even add new features
 
Should spend your time getting a working result, and then when it's finished, you can inspect and refactor the code as a whole, instead of making premature refactorings
 
4:38 PM
they say time is money but then the team spends hours or days trying to fix things or add news things xD
 
It doesn't mean you should write shit code, from the start. Just don't waste time trying to perfect/optimise it.
 
@Tobiq ya but I mean even simple things like mvvm or some other pattern is seen as a waste of time...
I really prefer planning out every aspect of the app first. Like 80% planning
 
Why does my collection.findOne return promise instead of single result?
I'm using native MongoDB driver on NodeJS
 
@Shrek Common pattern. Also, because checking == 0 is faster.
 
checking just if its truthy or falsy should be the same
 
4:42 PM
@Tobiq hows your water thingy doing?
 
@Shrek I use it because it's faster to read (visually), write (using keyboard) and execute
 
if (foo) {} is almost the same as if (foo == void 0) {}
 
@KamilSolecki codepen.io/tobq/pen/Kvvdrp I haven't really done much, been working on WEBRTC communication
void 0?
 
Guys do you have any idea about my above question? I'm trying to finish a job and I have a really close deadline..
 
@Arrow I have no idea what any of that is, but you seem to be more in tune with them I guess 😋.
 
4:46 PM
@Tobiq nice. Still needs more water feel though :)
 
@jason Havent worked with mongo. Try googling "Why does my collection.findOne return promise instead of single result"
Also, just check the documentation.
 
in documentation it says it returns a cursor
 
Aren't you supposed to resolve promises like "x.then(data=> ... )", a guess.
 
yeah but it's not supposed to return promise
 
@KamilSolecki like this, right: jsfiddle.net/loktar/Xd3nP
@Loktar, why are the molecules grouped
 
4:54 PM
Hard coding in webassembly is really fun. Anyone tried it yet?
 
the lisp-like stuff?
jesus christ
 
yep
So much control, I love it.
 
insane
 
5:19 PM
Hi, could you give me some tips on how to wait for an execution of Javascript(Node) loop?
 
5:37 PM
I have an identity problem :/
 
5:55 PM
@jason here:
for (var i = 0; i < 10; i++) console.log(i);

console.log("I waited"); // code to run after waiting
 
ok thanks
 
user5738123
hi guys
 
@jason did it work for you
try changing "i < 10" to "i < 1e100"
 
Any good resources about mongodb?
 
6:33 PM
I'm following the documentation but it's not easily understood :\
 
@KamilSolecki @SterlingArcher prntscr.com/g80bys
 
@Tobiq I solved it in a different way
There was a problem at somewhere else
 
@jason honestly I was joking, you didnt even give any information
 
Yeah I knew
I didn't care about your code at all
 
"Hi, could you give me some tips on how to wait for an execution of Javascript(Node) loop?"
What are you expecting someone to say
fix your program?
 
6:39 PM
Yeah, but I was hopeless. I couldn't find enough documentation about it
And I used my chance here
 
is it possible to write regular html in a react component?
 
@Tobiq seems better :)
 
usually it would spread out
maybe its the surface tension holding it together
i dont know
 
@Tobiq That's a solid
 
I keep getting you and @SterlingArcher mixed up.. sorry
 
6:45 PM
lol
 
kendall is one of a kind
one could even say
special :P
jk ily @KendallFrey
 
you can spell today!
 
ugh dont remind me please
was at gramps birthday today
feeling like a bag of mashed potatoes
 
I'm going to add gravity, and see what happens
 
You should add energy to the initial state, to see if you can get a liquid
 
6:50 PM
its a screen shot
so it looks solid
Does this look sensible?
I'm giving up on liquid, built this for somethinglese
 
7:07 PM
I need some help with openid
 
7:50 PM
are there sets in javaacript?
 
@TheCoder Set
 
var mySet = new Set(5) ?
 
@TheCoder google "javascript set"
 
I am but the example isnt working
Uncaught TypeError: undefined is not a function
at new Set (native)
 
8:13 PM
Are you trying this in IE8?
The state of common lisp can be sad sometimes :(
Thankfully there is cffi to get the big guns out whenever necessary
(example: there is no fork() in stdlib)
It's just (cffi:defcfun ("fork" fork) :int) to make the link with the C function, but still.
 
Array.prototype.set = function(val){
    if (-1 !== this.indexOf(val)) this.push(val);
}
does that turn array into set?
 
but you can just do new Set(array)
 
I'm asking, is that the only difference
-1 === ****
 
8:30 PM
@Tobiq no, but it makes for... of loops slow in Chrome
Also, what's with the yoda conditional?
 
??
Are for of loops slower?
and Idk; felt like it, I did.
 
Only if you modify the array prototype :P That's also just at the moment and not a real think :P
You can just do .includes
Also, a set isn't implemented internally as an array. Do you know what a hash function is?
 
yes
.includes, as opposed to indexOf?
 
A Set in JS (vs your array) would add a new element in O(1).
(amortized)
 
push is O(1) too, right.
its an array.
 
8:34 PM
Yes, but .indefOf is O(N)
 
oohh
 
and removing from an array is also O(N)
 
so it checks for hash collision, as opposed to checking via iteration?
i get what you mean
 
I wasn't trying to be mysterious about it :D
 
they should've made it closer to array
for simplicity / portability
.size, .add, .has
 
8:40 PM
They should have not added Map and Set without giving people the ability to specify a hash function.
You can't define .equals on objects in JavaScript. For two objects to be equal in a Set they must be the same reference.
Makes sets pretty useless for those who are used to using them in languages like Python
 
9:05 PM
Who does Meteor?
I try to get a very simple file upload working in meteor, but it just won't work

I tried with fs.writeFile(path,fileData); didnt work, when I defined a subfolder in server for the path; without a subfolder, but just the name of the file als the path it happens nothing.

- I tried with fsCollection, it doesnt work
in lib/common.js:
Images = new FS.Collection("images", {
  stores: [new FS.Store.FileSystem("images", {path: "~/uploads"})]
});
in client/main.js:
'click .save_project_btn': function(event, Template) {

      var file =document.getElementById("bild").files[0];

      var reader = new FileReader();
      reader.onload = function(fileLoadEvent) {
        Meteor.call('file-upload', file.name, reader.result);
      };
      reader.readAsBinaryString(file);
}
in server/main.js:
Meteor.methods({
   'file-upload': function (fileInfo, fileData) {
      Images.insert(fileData, function (err, fileObj) {

      });
   }
});
I get this error:
Exception while invoking method 'file-upload' Error: Path must be a string without null bytes.
    at Object.Future.wait (C:\Users\meteorhater\AppData\Local\.meteor\packages\meteor-tool\1.5.1\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:449:15)
    at packages\meteor.js:213:24
    at DataMan.dataManSize [as size] (packages\cfs_data-man.js:167:103)
    at setData (packages\cfs_file.js:155:29)
    at EventEmitter.fsFileAttachData [as attachData] (packages\cfs_file.js:130:5)
 
@Zirak .
 
@BadgerCat .
 
9:36 PM
I could've sworn you could add strings to numbers, like this
1 + "2";
1 + (+ "2")
wow or 1 + + "2" .......
Jesus christ javascript..
 
@FlorianMargaine, @copy DaaS
Also @copy sorry if I was defeated
 
9:56 PM
was hoping for Death as a Service
2
 
https://t.co/crpIHi0kZF
 
00:00 - 22:0022:00 - 00:00

« first day (2493 days earlier)      last day (2454 days later) »