« first day (909 days earlier)      last day (4264 days later) » 

07:00
hahaha
I like you more and more, Denys.
@Esailija Do you think you really can reduce the number of signs of my answer using coffee script ? coffe script, like go, is less verbose but only for real programs...
I may propose to you someday.
2
@dystroy not sure, I can try
@Esailija you're writing CS now?
nope
it's still unreadable to me
can't follow freely floating text
07:01
@dystroy does it actually reach =?
@GottZ just try it
seems like the check within the for will stop the execution as soon as it matches
@GottZ my gottz, you're right, my last optimization broke the "=" again...
yup. tried and failed
@dystroy meh, too verbose keywords
=D
07:11
@GottZ fixed. It's too long now, if I find the time I'll reduce it.
s=a=1+new Date%100;while(a){a=s-prompt();alert("+.="[a>0?0:a?1:2])}
could be enhanced
but does what it should
i think some parts of yours are smaller
for(var r=1+new Date%100,u;u=r-prompt(u>0?'+':u?'-':''););alert('=')
lol. one char smaller
oh. you use var
yeah you can remove var
right? -4 characters?
why not
because of the test u?
if you reexecute
07:15
Hello
then whut? r is global. true. but how does this matter?
I have a very small question how can I add a class to a word that starts with a specific character? ( jquery )
@Duikboot you can't add a class to a word
you can only add classes to elements
if you test u before assigning it or defining it, it's an error
I currently set up something like this:
07:16
@Duikboot what you can do is look for the word and wrap it with a span that has your class
@dystroy oh right
But know I have to ' add a 'class' to the #name and #john element so I can style it.
it's not an element
it's a word
an element is something like <span></span>
yes I know but I have to
convert my word into a class
But I don't know how :D
1 min ago, by Florian Margaine
@Duikboot what you can do is look for the word and wrap it with a span that has your class
replace with your word with <span class="stuff">word</span>
07:17
But the word will be different everytime ( its for styling my hashtag)
from a tweetfeed.
then use a regex and loop over the results.
hmm but I think I got the same problem then?
Im looking for a way to generate a class from the #blaeh word.
start by trying to wrap your word with an element
that's a necessity before you're able to go further
for(s=a=1+new Date%100;a;a=s-prompt(a>0?'+':a?'-':'='));
remove that semicolon ;)
07:20
would not work without it
also it fails at displaying =
:/
for(s=a=1+new Date%100;a;a=s-prompt(a>0?'+':a?'-':'='))
SyntaxError: Unexpected token }
for(s=a=1+new Date%100;a;a=s-prompt(a>0?'+':a?'-':'='));
undefined
:8813726 you dont get it. this is about number of chars. not about correctnes
oh. i know why its not working. screw me..
user1125394
why do you need to write unreadable code
5
Q: Guess my Number - Code Golf

LewisThe puzzle is as follows: Create the traditional 'Guess my Number' game in as little keystrokes as possible. The player should input a guess between and including 1 and 100, and the computer should reply with either + (meaning the player needs to guess higher), - (meaning the player needs to gue...

user1125394
ok
07:25
how can I execute these lines in sequence $.get("../html/header.html", function(data) {
$("#header").append(data);
});
$.get("../html/smsSettings.html", function(data) {
$("#smsSettings").append(data);
}); setProperties(jsonResponse.availableSettings);
Damn, this is exactly what I need but then in jquery
0
Q: Hashtag detection from a chunk of text, in PHP

user653480I am looking to create a php script that detects twitter style hashtags from a chunk of text. So it would search for #then_a_word.

Braces should only appear on the right if () {, not on the left
@dystroy for(s=a=o=1+new Date%100;a;o=s-prompt(o>0?'+':o?'-':'='))a=o
this prints =
@DimitriM 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.
@GottZ pretty. your shorter than me by 1. I was looking in that direction but thought this would be longer.
07:35
the only thing that bugs me is new Date
i'd love to get rid of this
though i guess there is no way.
Date.now?
hm... no
is longer since you need ()
Trying now something like this:
var test = "hello my #name is #john";
var matchedString = test.match('/#([^\s]+)/');
console.log(matchedString);

But doesn't seems to work :/
@Duikboot, I made something similar recently:
text = text.replace(/[#]+[A-Za-z0-9-_]+/g, function(hash) {
txt = hash.replace("#", "");
return hash.link("http://twitter.com/search/%23" + txt);
});
07:36
@GottZ I'm down to 54 \o/
@Duikboot why not \w instead of ^\s?
And now I reall need to work...
O, I meant @Duikboot in my earlier message.
@DimitriM my problem is that I have a group of get calls
I need to call a function after these get executed
@dystroy me too.
bye
07:48
“ Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. ” - Rick Osborne
Rao
Rao
07:58
can anybody tell me what is wrong in this code? window.onLoad = doAjax();

function doAjax(){
$.ajax({
url: "db_fetch.php",
dataType: "json",
success: function(json){
var dataArray = JSON.decode(json);
dataArray.each(function(entry){
var i=1;
if(entry.valueName==true){
$q('p'+i).css( "display","block" );
}
else{
$q('p'+i).css( "display","none" );
}
i=i++;
})
}

}).complete(function(){
setTimeout(function(){doAjax();}, 10000);
});
}
1 message moved from PHP
Rao
Rao
pls help me with this.. window.onLoad = doAjax();

function doAjax(){
$.ajax({
url: "db_fetch.php",
dataType: "json",
success: function(json){
var dataArray = JSON.decode(json);
dataArray.each(function(entry){
var i=1;
if(entry.valueName==true){
$q('p'+i).css( "display","block" );
}
else{
$q('p'+i).css( "display","none" );
}
i=i++;
})
}

}).complete(function(){
setTimeout(function(){doAjax();}, 10000);
});
} whats wrong with this code?
@Rao Change window.onLoad = doAjax(); to window.onload = doAjax;
Rao
Rao
@uınbɐɥs ok, still shows error, " ReferenceError: $ is not defined

$.ajax({ "
@Rao include jquery
08:09
@Rao Which variable is jQuery using? If it's in $q, change $.ajax to $q.ajax
There once was a girl from Nantucket,
Who had a nice fancy bucket.
She mopped up the floor
And went to the door
To answer it.
2
Rao
Rao
@NullPonyPointer now that i included the jquery this is the error im getting.. pls check this link, nagendra.0fees.net/admin.html and nagendra.0fees.net/cng.html Im trying to update cng.html using ajax, whenever admin.html's coconuts are drag n dropped on to the guinnysack
user2157210
Morning
user2157210
i just read coconuts
2
Rao
Rao
@Nexxpresso @NullPonyPointer @uınbɐɥs this was the original thread stackoverflow.com/questions/15960299/…
08:20
Morning @Nexxpresso
Optimization is king
user2157210
so i have to implement a shit ton of algorithm to solve a rubik cube?
@Nexxpresso Yup
solving rubik cub is a trick
no need of intelligence
user2157210
if id implement gods algorithm it would take shitton of computing power
user2157210
08:42
// complicated string analysis to shorten solution...
const string Cubex::Efficient(string a)
{
  string s = a;
// to be continued some day..........
  return s;
}
user2157210
i see
user2157210
complicated string analysis
user2157210
string s = a return s
I'm gonna go ahead and assume that's a joke :p
user2157210
08:43
its in some used programms sourcecode
user2157210
seems like they never continued that one
An Irishman, a homosexual and a Jew walk into a bar. What a fine example of an integrated community
We0
We0
Yesterday the Jews in my office ate all the bacon
user2157210
08:58
they ate all your bacon?????
@CherryDT I'm glad it helped :)
We0
We0
iDead serious
@We0 Sorry, I really like Bacon
We0
We0
then we joked, what is a Jews biggest dilemma
free bacon
I LOVE BACON
Also, it's hard to get here because of the religious people
We0
We0
09:04
fat greasy bacon is best hangover cure
In general fat greasy stuff
user2157210
@BenjaminGruenbaum are you guys allowed bacon?
We0
We0
true
@Nexxpresso Allowed? I'm Agnostic, I'm not religious
user2157210
whatever
09:05
I'm only Jewish by ethnicity :P
We0
We0
Jews aren't technically
but new age Jews dont care
Mhmm, I should eat the rest of my Berner-Würstel. :D
It's not 'Kosher' but that sucks :P
user2157210
Are people who follow the jewish religion allowed to bacon
user2157210
so they are not
09:06
@Nexxpresso no
We0
We0
btw, what countries you guys from
@We0 It's not about being 'new age' , I'm not Jewish by religion, just ethnicity
@We0 Guess :P
user2157210
HINT HE IS A JEW
user2157210
where is he from?
09:06
Jewish is a religion though
We0
We0
Oct i am guessing Germany
Also an ethnicity
user2157210
Oct is from Austra
user2157210
Austria
I don't pray to Imaginary god and stuff
user2157210
09:07
Y u no?
We0
We0
Guess where I am from
user2157210
Afghanistan
launched Operation Enduring Bacon and is Oscar Mike
We0
We0
probably
Like I said, I'm really not religious, I don't own one
user2157210
09:20
it is just about hats at all
user2157210
i was talking about a fucking hat
@BenjaminGruenbaum ...but not other religions?
People are people first, before they are a part of a religion, a group, an ethnicity, a gender or anything of the sort. Respect different people of different creeds.
user2157210
I dont care about any religion or ethnics so i cant fucking be racist in that kind
user2157210
holy shit
09:23
@DaveRandom Other religions too, but there is a different law for anti-semitism
@BenjaminGruenbaum, is @Nexxpresso being a douche again.
@phenomnomnominal Yeah, I have no idea where that's coming from -_-
user2157210
I sure am being a little bit annoying but not in the way he opposes
user2157210
If you totally misunderstand me and calling me out for anti semitism
why do people not understand that when you're being racist or offensive, it doesn't actually matter what you think, it matters what the person hearing it thinks.
09:25
@BenjaminGruenbaum That needs rectifying. I'm all for learning from the mistakes of the past but not at the expense of equality. You have to be careful or you can end up with stuff on the statutes that serves no purpose other than to try and make people feel ashamed of something they had nothing to do with.
@phenomnomnominal It doesn't even matter what I think, it's about being fair to people. If he were dissing Muslims or Christians I would have found that as offensive and had a similar response.
yeah exactly, and he doesn't get to say "I wasn't being offensive"
Although interestingly it only became actually illegal to keep a slave in the UK some time in the last 10 years, I forget when. But obviously selling slaves has been illegal for a very long time, so the other was implied - but it's loopholes like that that get some very nasty people out of legal trouble :-(
declares an end to Operation Enduring Bacon and prepares Operation Bacon Digestion
@DaveRandom I'm not sure I agree with 'had nothing to do with' . I don't blame Germans today for Nazism, I like germany and visited it quite a bit (5 times!) and enjoyed it a lot. I have German friends and stuff. However, I'd get why they'd make such a law
@OctavianDamiean Was it a success?
09:28
We've successfully defeated the bacon in a 20 minute battle, now we have to begin with stabilizing the situation in the country.
@Nexxpresso: You, again. Why are you always causing trouble? Would you stop?
3
Enduring bacon? No-one endures bacon, they enjoy it. I'm tempted to flag that as offensive.
(Recent discussion about Jews notwithstanding, they are excused from the bacon table)
@DaveRandom There's a back story to this.
The battle started yesterday evening.
Why don't all of your simply change the topic to something else?
Like JavaScript or lolcats.
We're now talking about bacon
@ThiefMaster good idea
There's always a place for a conversation about bacon
I've always been talking about bacon by the way, didn't even get involved in that other discussion.
and @DaveRandom Bacon got them into that conversation in the first place >.>
I'd read up but I have a feeling I don't want to.
09:31
You can't blame bacon for that ...
@ThiefMaster I just don't appreciate racism here, this is a constructive room and I'd like to stay one. I won't let talk that belittles a group of people out of racism or religious discrimination slide by for no reason. No matter what that group of people is.
Changing the subject is hardly a good approach to fighting racism and bigotry. But I agree that this really isn't the forum for it.
It's making me hungry anyway
the bacon, not the racism
I'm gonna get some :)
I'm actually trying not to eat as much junk in these last few days though
Bacon is not exactly junk, it is just that it's fat.
09:32
levenshtein('bacon', 'junk'); // 5
^^ not even remotely junk
53 messages moved to Trash can
@DaveRandom Ah, the levenshtein distance diet, how is that working for you :)?
@BenjaminGruenbaum Quite well. Pretty much the only things I'm not allowed to eat are Jamaican dishes
@BenjaminGruenbaum Oh DUDE! I love the design of that website.
09:36
Yeah, it's pretty swell
Very simple, but it works
The oblique navigation delimiter makes it so dynamic.
The colors are also pretty good, even though I think that the orange might be a tad too much.
I got someone yelling at me "Don't use browser detection, use feature detection!" For checking which browser is being used -_-
Context: I'm giving users different installation links based on the browser they use
yells Yea, use feature detection for that, totally. :D
09:40
People like to yell for stuff that's not good in some cases, but always
like eval , I got yelled at for using it quite a bit :/
When asked what I was doing with it I said "executing code I have to get from the server and store in localStorage because how a browser extension works"
Then comes the "oh"
I'm so going to steal from that design ...
I'm native Romanian, I'm allowed to do that.
Holy, IE11 has __ proto__ , this means cross-browser __ proto __
That sucks :/
Is it really possible that they actually did something right?
09:43
Nope, I don't like __proto __ , just need Object.create and Object.getPrototypeOf
cross browser, once no one ever uses ie6,7, 8, 9...
@phenomnomnominal in 5 years
But cross-browser is good.
Settable proto, aside from the object creation case makes no sense :P
5 years is so far away. IE6 came out in 01, people still use it. IE7 06...
09:47
Only if your audience is in China, that's the only place IE6 is still widely used
0.8% of users on our site use it.
How many users do you have in total?
@phenomnomnominal what site is that?
trademe.co.nz
200000 unique page impressions a day
2.1% IE7
Cute site :)
09:49
Haha dick.
@phenomnomnominal So you keep supporting IE6 for 1600 users?
Is that really worth the effort?
@phenomnomnominal Especially that oldfriends.co.nz
by support, we just don't remove the old code
Oh that's fine then.
09:50
We actively support over 1%
Yeah, that's fine
I am creating dynamic checkboxes, and in JavaScript I need to make sure only 1 of them is selected at a time, any idea ?
@BenjaminGruenbaum, perhaps you can tell that that site hasn't been touched (or thought about) in several years
I thought you're actively developing something new and want to support IE6.
09:50
@phenomnomnominal What a shock :P
We'd all kill ourselves
lol, exactly, not writing ES5 code, or code you can shim to look like ES5 sucks
This is the bit I work on: touch.trademe.co.nz
09:51
One of the amazing parts about JS is how dynamic it is, there are only really a bunch of features you can't simulate in ES5 using ES3
@MuhammadRaja So you actually want radio buttons?
@phenomnomnominal I likey
200000 must be a stat for the touch site
@BenjaminGruenbaum not about ES6 though...
@phenomnomnominal That's very mobile-oriented.
09:52
@OctavianDamiean, It's solely mobile oriented
I can only think of 3 more features the language needs , coroutines (generators ES6), proxies (observe objects transparently ES6) and value types (for infinite precision numbers and stuff ES7)
We do sniffing (gag) and redirect
@FlorianMargaine That's right, not at all
@OctavianDamiean true, let me give it a try, ta
09:53
@BenjaminGruenbaum, operator overloading
@phenomnomnominal That's pretty much a part of value types
What's a value type?
> Variables that are based on value types directly contain values. Assigning one value type variable to another copies the contained value. This differs from the assignment of reference type variables, which copies a reference to the object but not the object itself.
oh right, duh
In JavaScript that's Number and String (and null,undefined and Boolean)
user1125394
09:55
when you write foo.bar=function(e){/* code here */}; <- ; or not?
Everyone on earth apart from MS would call them "primitive types"
@c'c What's the question?
@DaveRandom It's not primitive at all (in JS it's primitive value types in the spec)
@c'c Yes, always. It's an assignment statement
@BenjaminGruenbaum, what does that have to do with operator overloading?
user1125394
do you put semi-colon after lambda functions
user1125394
09:56
ok
that's not really a lambda
@phenomnomnominal Allowing operator overloading for value types is a must , if your value type is an integer with infinite precision you need operator overloading
user1125394
function(e) {} ? ah yes not a lambda
@c'c Lambda means it is a single expression and not just an anonymous function, but that's beyond the point
Lambda is the half-life symbol
that's all I know
09:59
I'd argue operator overloading is only needed/useful for value types :)
@OctavianDamiean PUPPETS
In C# when adding events you use +=, I don't like that
Imagine:

« first day (909 days earlier)      last day (4264 days later) »