« first day (958 days earlier)      last day (4215 days later) » 

00:20
@SomeKittens I'm awake bro, I'm back up at fucking uni. Kill me now.
@phenomnomnominal stabystabstab
I feel like my entire existence is being assaulted right now
A banana can't be used to assault people
You obviously haven't tried very hard
@copy Wrong.
00:24
If the dude from glee was in front of you, and all you had was a banana, you would assault the shit out of him
That sentence could be misinterpreted
How would you refactor this code:
function isVisible () {
  if("webkitHidden" in document) return !document.webkitHidden;
  if("mozHidden" in document) return !document.mozHidden;
  if("hidden" in document) return !document.hidden;
  //worse case, just return true
  return true;
}
It's not DRY
I'm trying to come up with a good way to make it DRY.
["webkitHidden", "mozHidden", "hidden"].every(function(x) { if(x in document) return !document[x]; else return true })
With more newlines of course
@copy's allergic to newlines.
@copy I was thinking of determining the correct name on page init, and then using that name inside isVisible.
00:32
Sounds like a violation of the KISS principle to me, but I'm not sure
@phenomnomnominal Why the dude from glee? :(
@copy But you're testing those properties on each isVisible invocation. That can't be right. If a browser has say "mozHidden", then that's a constant, so it should be tested only once.
Sounds like micro optimization
It might make sense to get a general prefix though
I don't care about performance. It's about doing what makes sense.
If you're only using this one prefix, it sounds simpler to me to use my code, or your old code
00:39
If you invoke a function multiple times during a page visit, it doesn't make sense to test the same stuff that is a constant on every invocation. It makes sense to test it once and then re-use those results.
Not if it makes your code less concise
Anyone good with bash?
00:41
What does if [[ -n $1 ]] mean ?
I cant google for -n
herp derp
ok found it
@BadgerGirl, because he's not even crippled and he sits in that wheelchair, when I bet there is a fucking talented disabled kid in the states who would sing circles around him.
Oh you mean Artie? copy can assault him, I don't like him either.
We don't appreciate wheelchair humor in this room. Unrelated: youtube.com/watch?v=KfOiVS9pjsQ
<textarea type="text"> Right. I can HTML the bestest.
01:09
Why won't you look at me during
01:24
@XCritics wrong box.
 [28/May/2013:22:01:38 +0200] "GET /life/).value,m);c=Math.round(Math.log(Number(F( HTTP/1.0" 404 317 "http://copy.sh/life/life.js"
IE 8 seems to do weird xhrs
A lot of them
Every 3-5 seconds
The part after /life/ is from the minified source code
What the hell
Does minifying decrease load times, or is it just to make your code hard to copy or what
Decrease load times, and, in my case, also remove debug code
01:32
I wonder if the thunderbolt display is worth it for my retina
02:03
@XCritics no, it's not
02:35
@nileshgadgil 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.
Totally making rails my bitch
@XCritics you have the attention span of
Why you say that lol
You're just doing a bit of everything!
Yeah I a.d.d hard gotta mix it up or I my attention fades fast
Why do people dislike MVC
02:48
It's overly complex and never works in practice
Seems to work fine in rails or you talking large scale
Good morning
How are you guys?
I am doing good
03:16
@pheno You got a retina don't you ?
nah 2011
Gonna upgrade when the new ones come out
or do you mean phone
Which monitor you using
Nah comp
@XCritics I've got one. Nothing too special.
You said you were doing more than 1080 so was wondering
I got a past Christmas retina display
But real estate too small
Tbh I'd rather another 120hz monitor than thunderbolt but was wondering if anybody had one wanted to know if it was worth it
Oh nah that was a projector at uni
03:20
Oh lol
My dream would be MBP + 2 thunderbolts
0
Q: How can I prevent webpages from using JavaScript to sniff my system information?

Stephen HawkinsI'd prefer not to allow webpages to access my system information. If I use NoScript, Panopticlick is only able to see my User Agent string and HTTP_ACCEPT headers. Otherwise, it can sniff way to much information, including a list of my installed browser plugins. Is there a way for me to "sandbox"...

You're a fan of Mac than obviously ?
Yeah I really enjoy using them
You're crazy. I miss my Linux
03:22
I enjoyed programming on my Mac too
But I can't get 120hz on my monitor through the HDMI cable :(
I'm not fussy enough
I'm too busy to care about the minute details at the moment, I just want something that I can turn on and always does what I want
ish
That's why I use Mint. I've got a setup script that gets the environment tweaked to my satisfaction.
Yeah but you had time to setup that script right?
Yeah, did it over break a while back.
03:31
@phenomnomnominal is that done in something like css x.x?
You like the normal mac style keyboard for programming?
@XCritics that's done in PBRT
@XCritics, yeah I just use my MBP, i'm on the move a lot
oh no perifs
I have a playstation screen on my desk at home that i sometime use
good for 3d and shit
Playstation... Screen?
03:36
Oh looks neat
benq.ca/product/monitor/xl2420t this is my baby, if they weren't so expensive I'd use them as wallpaper in my room
I don't care enough about computers haha
I'd rather buy a new guitar really
What's cool is it can do that
My screen at work does that
it's very easy for reading code
Only thing I ever did on guitar was learn to play Come As You Are - Nirvana ( I think that's what it's called ), didn't interest my enough to continue learning, wasn't ever gonna make it big and wasn't fun enough to be a hobby
Programming / computer is my hobby
learning guitar isn't fun at first
03:42
Yeah, my one buddy was insane when we were in guitar class, he was playing Crystal Mountain by Death full sweeps not missing a cord, he tried to teach me how to 'sweep' my mind was blown trying to keep track of where my fingers are going, it's like walking down the strings
Yeah well that's just silly trying to teach someone to sweep first haha
yeah x.x
m59
m59
lol @XCritics I was at a baptism the other day with my guitar, picking around like I do when I'm idle, and I ended up playing Come As You Are
Such a good song
m59
m59
which really made me laugh since it was a church thing
pun
03:54
I thought that vim was a little more slow than using sublime text, but if you use :sp and :vsplit properly, it equals out it seems
m59
m59
04:19
Trying to figure out the pattern still
12.5 | 31.25 | 50 | 68.75 | 87.5
12.5 | 64.5 | 78 | 84 | 87.5

As in, how can I predict what row 2 number will match a given row 1 number other than what I have here
aww it broke the spacing :(
@m59 what's the problem?
m59
m59
Let's say row 1 had 25, I need to know what row 2 should have.
The pattern is there, I just can't figure it out.
Like, the increase is exponentially smaller the higher row 1 goes.
Rails 3 docs are bad, and they should feel bad
why is the first one on the second row 12.5?
m59
m59
They match at that point
and at 87.5
04:22
You need to do some curve fitting
m59
m59
got any resources about that?
m59
m59
woah
@m59 are you trying to figure out the shortest path?
you have two not linear functions.
m59
m59
04:24
@O0oO0oOO0ooO I don't know what you mean. Row 1 has corresponding correct numbers in row 2, I need to know by what means they are calculated.
so that I can calculate my own
You need to work out what those functions are
m59
m59
I'm afraid I don't see what to do on this site. I suck at math, but very willing to improve, of course.
m59
m59
lol is this calculus?
hardly
the first one is simple
it's function is y = 18.75* x + 12.5
m59
m59
04:35
can you give me that in baby steps?
I used to be afraid of calculus in highschool
m59
m59
I'm clueless.
@m59 could you please
it's a function
when x is 0
explain furthermore what are those 2 rows of data are used for?
04:36
y = 18.75 * 0 + 12.5 = 12.5
when x is 1, y = 18.75 * 1 + 12.5 = 31.25
etc...
you cant plug in any x and you'll get a value in the first line
you just need to find the function for the second set, and then you can just plug in that x as well
Rails is fun, does this make me a bad person
m59
m59
var mind = 'blown';
@XCritics I had the same feeling when I was using Grails
Seriously though, after using Coffeescript and javascript for a while, rails makes way more sense than it did when I first tried learning it when I had no concept of JS / CS
Ew java :P
ffs, that moment when I Think CTRL+Z is re-do and I close my terminal, and have to go through and delete all the .swp files vim makes x........x
Why would you "Ew Java"
04:40
Why wouldn't I :)
m59
m59
var java = 'Ew '+vomit+'Java';
what is best instead of java then?
If Java sucked then we must go back to C++ or C
how about .net?
04:43
Java doesn't suck but there are alternatives like C# or Node.js
ya I love c#.net
everything is inbuilt
you just need to call the method :D
m59
m59
@phenomnomnominal ok, I think I get the idea now, but where in the world did you get 18.75?
it's the difference between each value that you gave?
aka (87.5 - 12.5) / 4
m59
m59
or better said, what do I need to do so that when I see numbers like that, I can be like "oh, lets just do this number * x plus this number"
04:46
Just so happens that the first one is linear
the second one not so much
m59
m59
cuz that's crazy
when you see a sequence of numbers, you can check if the difference between each of them is the same
if it is, you know you have a sequence that follows a linear function
m59
m59
ah yeah
well, it's the second row that is the problem...
the first row could be any value
well, any value between 20 and 80 really. I just included down to 12.5 and up to 87.5 since that's where they met
Where are you getting your numbers from?
m59
m59
trial
04:56
what do they represent
m59
m59
row 1 is window width
so 12.5% would mean that element is 12.5% of the window
row two is a child element
semi-complex, but to keep the look correct, the child width has to be set by whatever crazy pattern that is.
but they're arbitrary and therefore not that valuable. why not use something like the golden ratio?
m59
m59
I don't know what that is, and I don't know why they are arbitrary or how I could possibly use anything else.
Nothing else can make the same look.
So, even when I was offline I was visible in this chat room. is it? (because when I joined I see myself faded and very back in list).
m59
m59
12.5 to 13.5 is going to be a lot bigger of an increase on row 2 than 86.5 to 87.5. I've just got to think of how it can be calculated with js.
05:01
the golden ratio will normally give a mathematically aesthetically pleasing look
m59
m59
@phenomnomnominal what happens is when the window width changes, so does the width AND height of the element, which must keep perfect squares on both sides of a rectangle. Since the height is 100%, if the squares don't get wider %-wise, then they end up taller than wide, so as row 1 increases, row 2 has to get bigger at the rate I have recorded.
or something like that
I think I can kind of experiment to find it if I can think of how to write a js function to return an exponentially greater value based on how close a number is to 87.5
05:32
hi
@markotom 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.
Re-factored roughly 400 lines of JS to CS, made 1 error successkid
I need to convert stuff like the string "\n" to stuff like an actual line break, how would I do it?
I feel so wrong attempting to give you of all people an answer, but I mean, couldn't you just regex replace?>
with a <br />?
.replace(/\n/g, '<br />')
I think, I'm terrible at regex
05:48
What was with all the 400 errors? Firebug refused to show it that far
@BenjaminGruenbaum have you tried splitting lines of text in a string by \n and append <br> on each element?
@Zirak someone was fucking around can't remember who
@Zirak you seem to be at a erm, higher likelihood to help me than the other kind gentlemen here
@phenomnomnominal also you
random screenshots
I'll get the ropes and spoon...
05:50
I have a string, that's literally "\n" that is, the character "\" and the character "n", escaped making it "\\\n"
I need a linebreak, and I need the conversion to be in code, that is:
@BenjaminGruenbaum, I have 10 minutes to submit a conference paper, sorry bro!
input "\\n" (or any other escape), and output "\n"
@phenomnomnominal good luck
tokens = string.split("\n");
new = tokens.join("<br>");
this is your technique only :D
If one more person says <br> in this room, I'm turning on gallery mode
05:53
<br>
What's your source of input, how do you output (text? html? console?)
Morning errybody
@Zirak File, I'm reading it using the fs module in node
It's for a compiler
Well, colour me stupid, but how about '\\n'.replace('\\n', '\n');
I tried that, right after eval , Aren't there tons of characters like this?
05:55
@BenjaminGruenbaum i have an idea
You can make a hash for all those escapes
it might be a quick and dirty way to do it but
There aren't too many
[[File:The river effect in justified text.jpg|thumb|right|{{hl|1=(?:\.) {2,}(?=[A-Z])}}]] In computing, a regular expression (abbreviated regex or regexp) is a sequence of text characters, some of which are understood to be metacharacters with symbolic meaning, and some of which have their literal meaning, that together can automatically identify textual material of a given pattern, or process a number of instances of it that can vary from a precise equality to a very general similarity of the pattern. The pattern sequence itself is an expression that is a statement in a language designed s...
Hmm, spec says
05:56
have you tried recompiling that string with "blah\\n" with an eval
closing quote character,
backslash,
carriage return,
line separator,
paragraph separator,
and line feed.
Hey just now I realized we can do like this too
newString = oldString.split("\n").join("word");
Disclaimer: I am not using BR here
would that work? i haven't tested
I might just treat those cases specially
You just need to change the keys around, and that's that
05:58
That's at least indicative of a better way less likely to exist

« first day (958 days earlier)      last day (4215 days later) »