« first day (1013 days earlier)      last day (3921 days later) » 

5:00 PM
OMG this is ugly.. he doesnt needs those uglyness
can just direct add :P
 
I want to modify buffer to be 3 dimensional array. I want to store 2 more values in it.
 
m59
that doesn't sound like a 3 dimensional array
that sounds like 1 array with 3 values...
 
I want to make it 3-D array. Its just 1-D now
 
Do you know what 3-D means?
 
m59
buffer[str] = data_to_cache; is data_to_cache an array??
 
5:01 PM
I mean 3 dimensional array. I know what it means
 
The dimensions of an array has nothing to do with how many values are stored in it.
 
data_to_cache is some data returned from AJAX request
 
> I want to store 2 more values in it.
 
m59
buffer = new Array(); should be var buffer = []; first of all.
 
m59
5:03 PM
buffer[1] = []; there's another dimension.
buffer[1][1] = []; and another
 
git merge --no-commit
WHERE HAVE YOU BEEN ALL MY LIFE?
 
m59
but I'm about 99% sure now you shouldn't be doing this. @silverflash
learn json
is your data best described by numbers?
also, @Zirak, see what I mean now?
 
@m59 "learning JSON" isn't really a thing...
 
You gotta love Linus.
 
If I will use Json now. I will have to change full crapy code that someone wrote. Its 22 js files.
 
m59
5:06 PM
Ok, json doesn't exist. Cool.
 
> "Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged—the compiler knows the types anyway and can check those, and it only confuses the programmer." ~ Linux Torvalds
 
better?
 
@m59 No, its mixed number, strings etc
 
@Shmiddty lol no meteor JS
 
@Samithaఠ_ఠ astronomers.
 
5:07 PM
@OctavianDamiean Hungarian notation is very useful, just not for types.
 
m59
I dunno, how would you rather me tell him??
 
!!google joel on software hungarian notation
 
@rlemon use bufferdata
 
no no meteor JS
 
5:08 PM
@m59 "use JSON" is more accurate.
 
Indexing of JavaScript arrays starts from zero ? Right ?
 
@silverflash yes
 
@Shmiddty no no Jsut meteor JS
 
@Samithaఠ_ఠ you don't need to repeat yourself.
 
what is the best ? Node.sj or meteor js
 
5:10 PM
that's an objective question.
 
@Samithaఠ_ఠ Those are two different technologies.
What's the best? Firetrucks or brownies?
 
:)
got it
 
@SomeKittens brownies. not objectively. (as long as they don't have any awful nuts in them)
 
@SomeKittens Apps Hungarian, I agree, not Systems Hungarian.
 
m59
var buffer = {
  "someIds": [1, 2, 6, 14, 19],
  "otherInfo": {
    "company": "Some Place",
    "year": 1998
  }
};

buffer.otherInfo.company //get the company

Isn't that much better than
buffer[1][0] // doesn't describe what I'm getting at all!!!

@silverflash
 
5:11 PM
Brownies are pretty darn cool, but you wouldn't want one showing up in lieu of real safety when your house is on fire.
 
@SomeKittens pro tip: don't start fires in your house
 
@SomeKittens If you throw enough brownies at a burning house, you might extinguish the fire.
 
@m59 Its complex :(
 
m59
Whaaaaat!?!?!
So if you changed the company name you would rather have to remember a series of numbers rather than some nice clean labels??
 
@Shmiddty But then I don't get to meet all those sexy firemen!
 
m59
5:13 PM
Those names are obviously awful, but come on dude...you have to get the point..
 
m59
If var people = [] contained 1000 people and you needed one of them named John, you would rather use people[768] rather than people['John'] ?
 
Actually, it is better. But, I cannot change it now. This is some other developers code and I am working on it because he is ill. If I will change from arrays to json, I will have to write whole thing again. It will take days. :P
 
m59
And how would you know which number he was? By sifting through 1000 values?
You must have some messed up stuff going on.
 
@m59 What if you have two Johns?
 
m59
5:15 PM
Man you guys are harsh today.
An ideal system really ought to be dealt with by id
obviously.
and if you knew anything about the dude, it would be the id.
rather than his name.
If all you have is his name and no id, then you probably did something else wrong.
 
This code I am working on is mess. I am PHP developer. I really don't even know what half of JavaScript code means. But, still I can edit it at least. Beauty of coding :)
 
@silverflash Now we know what your problem is.
 
m59
Well, in php, you would consider it an associative array, or an object.
 
Yes.
 
@MatiasElorriaga 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.
 
5:18 PM
@CapricaSix thanks!
 
m59
I don't hate php as much as I used to. It's no js, but it's not too bad.
Just kind of silly, I guess.
 
PHP is good if you dive deep. On surface there is lot of crapy PHP code outside.
 
Diving deeper into a sewer doesn't make it any sweeter.
 
m59
PHP is ok at best. Diving deep just means you realize more of how silly it is.
I'm not being biased. I like php. It's just not great when compared to js. I don't know other languages, so that's my only comparison. Maybe other languages suck hard compared to js too, and maybe php is actually good compared to them. I dunno.
 
When you dive deep in sewer, you get to a point where you can question the architecture of that sewer and then improve it. That is beauty.
 
m59
5:21 PM
lol
 
PHP is inconsistent and unintuitive.
 
m59
^^^^^^
dealing with objects in php reminds me of currently run-down buildings built in the 1800's that someone added electricity, plumbing, and air-conditioning to throughout the 1900's.
If you've been into a building like that, you know I'm talking about.
 
@Shmiddty But, the truth is even most of your projects are related to PHP in some way or another :P
 
@silverflash none of my projects are related to PHP at all.
 
m59
Don't you use node?
Like a prah?
 
5:24 PM
@m59 I wish.
 
m59
oh, yeah, me too haha.
 
What is stackoverflow made in ?
 
no clue.
 
@nearpoint 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.
 
HI!
 
5:26 PM
In what language most big non-microsoft technology website made in ?
 
@rlemon fixed
 
SO uses ASP.NET/MVC
 
@silverflash ASP.NET
 
@Darkyen ?
link?
 
m59
@silverflash you don't have to be defensive about it. We're not making fun of you or your preferred language. As I said, I like php. I just also recognize that it has flaws.
 
5:26 PM
sorry got pulled into a meeting
 
@silverflash Probably Java or PHP
 
I told non-mirosoft
 
node.js is coming up
 
m59
I've heard that java really sucks too.
 
!!color abcdef
 
5:27 PM
 
Java for large companies, PHP for smaller companies.
 
^^ that uses php
 
@Michael -_-
 
There are flaws in every language. That's why we are here, to improve them.
 
5:28 PM
u needed something else just making mid-point doesnt work
 
m59
How are you going to improve php??
 
Except for Facebook, which uses their own flavor of PHP.
 
node.js with html5 and css3 you can do all kinds of web apps
 
m59
Yeah, node is awesome.
 
:-|
 
5:28 PM
Facebook invented a special compiler that compiles all PHP code into native C code.
 
@Darkyen doesn't work :/
 
i broke it recursioon
 
how does that help them, the c code?
 
btw u need this
    grid[midy][midx] = avg + (m * Math.random() * jitter - (jitter / 2));


	grid[midy][x1] =  (grid[y2][x1] + grid[y1][x1]) / 2;
	grid[midy][x2] =  (grid[y2][x2] + grid[y2][x1]) / 2;

	grid[y2][midx] =  (grid[y2][x1] + grid[y2][x2] ) / 2;
	grid[y1][midx] =  (grid[y1][x1] + grid[y1][x2] ) / 2;
 
c is fast
 
5:29 PM
@silverflash no shit sherlock
 
ah so its c code running on the server instead of php
 
@Darkyen why set 4 points at once?
 
@nearpoint Yes, but the code is originally written in PHP.
 
can you comment your changes?
 
0
Q: How can I change this footer.php code to call a random image on reload? tia!

musenutThis comes from the footer.php file of a wordpress theme I would like to modify. I want one of five images to load on refresh instead of 1.jpg everytime. post->post_name; } ?> $(document).ready(function(){ var imgPath = '/wp-content/themes/nexus/img/page-headers//1.jpg'; $...

0
Q: Is this code likely to stand the test of time? (Add select box to DOM with JS)

TecBratThe reason I asked about standing the test of time is that I previously used PHP echo to create a string and placed it into a div with .innerHTML, but modern browsers were not passing the value of the select box. (Went back and tested wit IE9 and the innerHTML version worked.) file:js_selecttest...

 
5:30 PM
Everything is fasr. Java is fast too.
 
    x1,y1         x2,y1



    x1,y2         x2,y2
 
That's shit people putted all around that is not fast
 
u are just setting the mid point
 
@Darkyen that is why you call it four times. you only deal with the center point.
 
Java :P Its like matrix :P
 
5:30 PM
u need to set the
 
while(1); is slow in any language.
 
ahhh fuck
 
mid-points of x1,y1 and x1,y2
aswell :P
 
only in the square step
diamond step you set midpoint
I fucked that up
 
Java is horrible.
 
5:31 PM
thanks, hehe
 
Java has a JIT (just-in-time) compiler that converts the .class files of the application into native code.
 
/afk smoke
 
JIT is written in C
 
is there any kind of web app you cant do with node.js html5 and css3?
 
First, the .java. source files are compiled to .class files. Then, when the application runs, the .class files are interpreted on the fly. But when a piece of code is called enough times, then the JIT compiler compiles it to native code.
 
5:33 PM
why is this discussion happening anyways?
 
This actually gives Java the potential to significantly out-perform languages like C and C++ because the JIT can optimize the code based on how it's actually being called.
 
There would have been no Java without C.
 
It's sort of like an AI program that learns usage patterns.
@silverflash True, much of the Java syntax was based on C.
 
C with optimizations enabled should always out perform Java
 
5:35 PM
if it does not, you have bad code
 
@rlemon C or C++ ?
 
@rlemon Not necessarily, because it doesn't take into account how the code is actually used in production.
For example, you may not be able to predict that a certain function will be called a lot of times.
 
I have a friend of mine who is a C programmer. He has his own C libraries that include everything that can be done in Java and Python. He is amazing.
 
@Darkyen :( my god... I was going over all of those checks for negatives... without realizing the x2-x1 check already did it
clearly I've been at this too long
 
LoLoLoLoL
it happens :P
 
5:38 PM
if you write a desktop program in python, is it easy to make it work on OSX and MAC and Web?
 
and I had been trying to do the diamond and square steps in separate iterations. also a mistake
and probably half the lag.
 
nod
 
Is there a foreach loop to run on arrays in javascript ?
 
like how exactly do you do it, just compile the python code using different compilers for windows and mac?
 
Brendan Eich introduces the class keyword: youtube.com/watch?v=NJxB0Pp69IQ
 
5:40 PM
ahhh @Darkyen 2.9 mate!
love you so much right now
 
?
 
2.9 <3
 
2.9?
am worried about... the squaring.
 
yea i'll play with it
you got me on the right track at least
also... 2.9 is "less than three" ( <3 )
 
is "something - -" valid in javascript?
 
user1596138
5:47 PM
Anyone here good with small circuitry?
 
if I'm going to hold values to generate a string - best to use array or json objects?
 
@silverflash You can decrement and increment integers by using -- and ++ respectively.
 
@Michael Thanks.
 
@Jhawnisss depends
 
Note that something-- is different than --something.
 
5:48 PM
@silverflash According to the Crock it isn't but you can ignore some stuff the Crock says.
 
@Michael just remember there is a difference between ++i and i++
 
Hey guys
 
something-- first returns the value of something, then decrements it.
 
Just remember to remember the thing you had to remember.
 
@jbolanos We think alike xD
 
5:49 PM
@Michael I know both. I don't know javascript so was just asking if it was valid syntax in it.
 
:)
 
--something decrements the variable, then returns it.
@silverflash Oh ok :)
 
And to give 'em a fancy name, we're talking about pre- and post-increment and decrement.
 
^
 
gist.github.com/Zirak/3364309 (related to current discussion.)
 
5:51 PM
zap
 
Anyone working on some hobby project ?
 
I have 5 hobby projects :)
 
I currently have only one
I'm trying to use C library in a Lisp project.
Turns out it's not so bad after all
better than how most other languages handle it, for sure
 
I am working on a search engine for songs. Will allow to download songs at single click. I know its illegal. But, this will generate quite handsome money. Any one interested in working along ??
 
Alright, am I just brain damaged or does this entire function not make any sense (note: it's not mine).
$.fn.dataTableExt.afnFiltering.push(
	function( oSettings, aData, iDataIndex ) {
		var iMin = document.getElementById('min').value * 1;
		var iMax = document.getElementById('max').value * 1;
		var iVersion = aData[3] == "-" ? 0 : aData[3]*1;
		if ( iMin == "" && iMax == "" )
		{
			return true;
		}
		else if ( iMin == "" && iVersion < iMax )
		{
			return true;
		}
		else if ( iMin < iVersion && "" == iMax )
		{
			return true;
		}
		else if ( iMin < iVersion && iVersion < iMax )
		{
			return true;
 
5:54 PM
all but one of mine is about 2 years over due and 1 is just beginning but I think I'm going to dump it and go into real estate
 
@OctavianDamiean I think you should use paste bin :(
 
wat
 
@silverflash Yea, no.
 
@OctavianDamiean dunno what it's for, but I'd use the same style too. So many conditions need to be well split up
 
So I think my interview went well. They made me do a coding exercise I think that went well. I really hope I get hired.
 
5:55 PM
my phone interview went real bad
well, "bad"
 
@FlorianMargaine It's a range filter example from DataTables.
 
I would do this:
 
@powerc9000 Good luck
 
@silverflash thanks!
 
there was a misunderstanding, I thought it was remote work, she wanted me to relocate
 
5:55 PM
@powerc9000 Which company ?
 
sooo... ~~
the interview went for like 10 minutes max
 
@FlorianMargaine well, that doesn't mean it went bad.
 
return ( iMin == "" && iMax == "" ) ||
( iMin == "" && iVersion < iMax ) ||
( iMin < iVersion && "" == iMax ) ||
( iMin < iVersion && iVersion < iMax );
 
@silverflash it's called instructure.
 
Oh wait
 
5:56 PM
> You may now carry on with your life.
golden
 
It just means that you'll have to keep looking for another job. .)
 
@OctavianDamiean yeah it was actually a pretty good interview, quite casual et al
 
There
 
@OctavianDamiean I didn't look for any job, she contacted me because she saw my SO profile
 
You can't have a return keyword on its own line, because Javascript adds a semi-colon, and the function would end up returning nothing.
 
5:56 PM
@powerc9000 ok
 
@FlorianMargaine Oh, that's neat
 
is Michael just listing all of his knowledge on js?
is he teaching someone?
 
I should start looking into other jobs now
 
@Michael returns undefined, not nothing.
 
@Michael It's not about the condition style but about the conditions itself.
 
5:57 PM
maybe he's trying to look involved?
 
I want this one. but gotta have a backup plan
 
@Shmiddty Yeah
 
@Michael that wouldn't pass my code review
 
@rlemon I guess I just feel like talking today. xD
 
@Michael It's an important distinction. Also, if you don't include a return statement, the function will return undefined, unless called with the new operator.
 
5:58 PM
What's going on? Can you guys hear me? Am I deaf? - Can you hear me talking right now? Yes? - Yes.
@Michael That's good.
 
I get those jobs in which my interview goes worst and in which I do well, I don't even hear back from them again :P
 
@rlemon hello
 
Never mind, I should learn to read or call it a day or something.
 
@FlorianMargaine Why?
 
@FlorianMargaine You a freelancer ?
 

« first day (1013 days earlier)      last day (3921 days later) »