« first day (1478 days earlier)      last day (3464 days later) » 

12:00 AM
I'm glad that you think that. It's a competitive advantage to me that I can build systems faster in Java while those who don't understand it fret about how bad or ancient it is.
 
@BenjaminGruenbaum That's also interesting. I don't see the fascination in LISP, maybe I need to try one
 
"Build systems faster in Java" lol :D
@AliceYoung trust me, I understand Java pretty well, sometimes I get bored and answer a Java question here and there you can check my profile here.
 
I think not... you come off as a bit of an amateur.
 
Look who's talking :D
 
You come off as a bit of an elitist
I come off generally as an arrogant asshole
 
12:01 AM
@KendallFrey he just sounds like someone who hasn't left their comfort zone in a long time.
@AliceYoung you come here - start a debate about Java - while I raised several (tens) valid problems with Java (type system, features, etc) you mainly called me an amateur and bragged about your (not that big) paycheck.
 
@SomeKittens I havent even played in Beta 3
I might play tonight
I usually wait because they patch it a few times after they do a new beta
 
@copy clojure is... different - I think you'll enjoy Rick Hickey's lectures too if you like listening to lectures - the most famous one is "Simple Made Easy" - Zirak really enjoyed it too I think.
 
I've seen that, it was great
 
@AliceYoung again, I'm sorry if I come off as aggressive or offensive - not what I'm trying to do.
 
woo, 130 Kerbals in one vessel. I want to keep going, but I should probably figure out how to get them home instead.
 
12:11 AM
Haven't played that.
@SterlingArcher if it makes you feel any better - I think I'm mediocre at some of the most recent trends in programming. I've done FRP and deployed code with the paradigm but quality wise it'd probably look like someone using Angular for the first time. I don't have enough functional programming experience at all. I suck at low level stuff (the stuff copy is great with). I suck at working with bad code (although I've been actively working on that for the last two years). Lots of suck.
 
I love low level stuff
Never get a chance to properly do anything with it though
 
It just always feels like a lot of bookkeeping
 
I find low-level stuff orgasmically simple
jl is easier to understand than a for loop
(oh, shit, I feel an argument coming)
 
Well, jl doesn't replace a for loop does it?
 
not by itself
 
12:17 AM
Well, let's say you want to repeat an action 10 times, or 100 times.
 
move ecx, 10
jmp end
start:
...
end:
dec ecx
jnz loop
not efficient to write, but every detail is clear
 
Clearer than:
for i in range(10)
   ...

range(10).forEach(() => {

});

10.times do |i|
...
end
?
 
yes
take the second example
There are lots of subtleties about inline functions
 
Like what?
 
closure being a large one
 
12:23 AM
Where do you see an issue with the closure here?
 
there isn't one
 
Don't get me wrong, I appreciate you playing devil's advocate here, I just think pretty clear it's still a lot clearer than the assembly code.
 
but there could potentially be one, if the example was expanded
@BenjaminGruenbaum more readable, I agree
 
I'd like to remind you that => arrows have lexical this so that's not an issue here and it's the only 'hidden issue'.
 
Assembly code's information density is lower, so the amount of mental power needed to read one line of code is much lower
This is where you say there are more lines of code
yada yada
 
12:25 AM
It's not just that there is more lines of code
You have to usually remember a lot more state.
And code a lot more 'efficiently' because usually it's the lowest level and it won't be further optimized. For example:
 
not significantly more than high level code
 
valid_day_in_december = 31 >= x > 0
if valid_day_in_december:
   ...
 
in high level code, there are lots of potentially unnoticed ways that code can affect unrelated code
 
You don't mind using variables for this - but in assembly this would be a comment.
@KendallFrey it's true, but it's also true in assembly, in assembly I saw you relied a lot on convention and global state to cut corners for performance.
 
@Loktar if you play tonight, let me know
 
12:28 AM
There's a quote I heard somewhere...
> Complex behavior emerges from simple rules
 
:-)
 
being simple doesn't mean being easy
Working with nuts and bolts is simple, working with a prebuilt engine and transmission is easy
 
@KendallFrey ungh I just linked to that lecture don't give me that.
 
12:31 AM
yup
 
(It's also like the 5th time I linked to it here :P)
Also:
 
Never seen it
afaik
 
25 mins ago, by Benjamin Gruenbaum
@KendallFrey then you read what @ircmaxell wrote about it in his blog
 
maybe?
 
12:34 AM
nope
that might be where I heard it first
 
It's really frustrating to answer so many promise questions and still see people post these.
 
Last answer I posted, I felt the opposite
"Why don't other answers actually explain anything"
 
@KendallFrey yeah, that's how I feel - look how much code the other answers have
They all solve it with at 10 lines of code where 5 is more than enough, some do it with 20.
Filled with deferred anti-pattern :S
One answer even did .race :S
 
Yay controversy, Ima post an answer with .religion
 
12:57 AM
Can some one explain why the collision check in my ellipse is not working here: jsfiddle.net/9zru1kmz
im fairly sure my draw function is not drawing the ellipse in the correct place =/
i don't think i got the math wrong
 
math looks fine, probably you're not drawing in the right position. Looks like you have a y offset.
An ellipse is just the geometrical location of all points whose summed distance from two central points is equal - then again you got the math right so you already know this.
 
i think ctx.scale(); is the issue but i have yet to work out why
ah i got it
jsfiddle.net/75f32pd9 had to alter the x:y draw position to take scale into account
 
 
2 hours later…
Sim
3:23 AM
is anyone here?
 
yes
 
Sim
cool
im having an issue with wavesurferjs i tried using local but its stuck on loading
its not playing the audio im referring to example
is it just me or is there something wrong with the plugin?
i will ask some other time i guess :)
 
no idea
never used thatr
 
user2620028
3:45 AM
whats up guys
 
nothin`
chillin`
 
4:31 AM
crickets
 
heyy
 
@AndrewKim 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.
 
whoa
 
hello
!!default/?test=test or default?test=test
 
@Shea default/?test=test
 
4:44 AM
!!wtf or what
 
@CSáµ  for
@CSáµ  sex
@CSáµ  Cheater cheater your house is a heater
@CSáµ  All commands forgotten.
 
she's alive!!!!
 
m59
5:14 AM
hmm, no beforeEach in tape...
 
 
2 hours later…
6:53 AM
anybody alive?
 
yup
 
7:06 AM
bleh
 
@TommyDDD 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.
 
Guys! My device render spoof/emulator thingy in Chrome developer tools, got much better!
 
RegEx room seems to be dead
I have a file, which is indented. I want to capture (and remove later) 1 indentation. How would I do that?
just like that
I tried that pattern, which seemed like it would have worked, but nope
 
7:33 AM
hola!
 
it's dead until you talk @towc
 
@CSáµ  there were 3 users...
 
:)
 
SUNDAY MORNIN!!!
 
@AwalGarg :P
 
7:49 AM
@towc :PPP:PPPP:PPPPPPPPP
I <3 webworkers :D
 
@AwalGarg marry one
 
@towc Noep, I like someone else.
 
@AwalGarg >:(
 
btw, I switched from 4 spaces indentation to 2 spaces... good or bad?
 
bad, pythong will hate you
 
7:52 AM
fuck python, see which room you are in
 
@AwalGarg I've always found it hard to read with 2 spaces
 
@towc I am also finding a bit of difficulties... but I have a low res screen and even moderate lines of code go out of screen when I have to nest functions.
 
@AwalGarg :/
 
@towc I think I can use tabs and set the tab width to 2 spaces in ST. Then convert them to 4 spaces when required...
 
i don't like 2 spaces, except maybe for css
 
7:58 AM
...hold on that was fast
SUBLIME ROCKS!!!
@SublimeText y u no open source?
 
@AwalGarg yeah, fuck it, because your beloved editor is written in it... why not fuck everything then.
 
@CSáµ  lol I was talking about JS for now :D
 
@CSáµ  yeah! Let's fuck everything! I'm up for it
 
@AwalGarg cool
 
btw, fucking everything sounds like a good idea... where to start?
 
8:02 AM
@AwalGarg from awal?
 
@towc every "thing"
 
@AwalGarg he's a user, not a person
 
@towc You know no better, Awal is a person, he is love, he is life, he is the savior of all hot girls. He is above every one, and the Dark Lord!
 
@AwalGarg (love,life,savior)===thing
 
@towc (love,life,savior)!==fuckable thing
 
8:06 AM
@AwalGarg fuck love, fuck life, fuck the savior: I've heard those quite a few times in my life
 
@towc what is heard is not necessarily true. I have heard that @Zirak is a human, doesn't mean he is...
 
let's fuck zirak then
 
first take permission from @FlorianMargaine
 
dang
 
8:31 AM
!!>(love,life,savior)!==fuckable
 
@CSáµ  "ReferenceError: love is not defined"
8
 
yeah...
gold
 
4 die in flight simulator due to a plane crash
That's irony if I've ever seen it
 
8:46 AM
I am using this regex to filter urls.
(https?:\/\/\S+)
But this also selects links like this:
http://example.com/test-link.html<div>
In above link <div> is an html tag. Can you please suggest modification. Thanks in advance.
 
8:58 AM
@mwaseema please don't spam all the rooms with the same question
 
@mwaseema there are literally thousands of examples of url regular expressions out there
I'd be willing to bet you could find your answer there, and it would likely be a lot more accurate than any regular expression I could give you
 
9:19 AM
typeof love;
for(var i=0; true; i++) {
    baby.dontHurt(this);
    if (i === 1) {
        break;   // no more
    }
}
5
 
@Neil wait... you can break a for using break?
wooooow
 
9:59 AM
0
Q: Chat https redirects to http

Second RikudoYes, yes, I know https isn't officially supported. If you go to a chat room link like https://chat.stackoverflow.com/rooms/1 (note that there isn't a room name), it would automatically redirect the page to the canon URL (with the room name included). However, that redirects to the http:// versio...

Anyone else noticed this? ^
 
@towc Not sure I get that statement
Was that sarcasm?
 
@Neil no, it was just me learning something new
 
@towc maybe it's automatic for me since I come from c++ background, but yeah
generally better not to use break though
It's a glorified goto
 
10:19 AM
Nyan cat anyone?
 
@Neil yup
 
@SecondRikudo why is https not officially supported?
oh hello everyone btw
 
I want to check if event.offsetX is supported. Can I do this without first creating an eventListener for the mouse? Can I directly look at the mouse object? How?
 
10:37 AM
@Schoening there isn't any mouse object. It is the event info object.
 
Thanks @AwalGarg ! Probably able to find the property from there
 
@Schoening I don't think one can... you can still try.
 
Hmm alright. Otherwise I check if modernizr can check for this.
 
> When an event occurs, an event object is created and passed sequentially to the event listeners
I think this means that you can't.
You can create a event listener, fake mouse movement, store the event object, and remove the event listener.
 
@AwalGarg The metas are a problem.
You can't have a catchall certificate like meta.*.stackexchange.com
 
10:42 AM
@Schoening I found the solution!
 
:o
 
do the following in your console:
console.dir(new MouseEvent("move"))
(and learn to play in the console, it is fun and worthy :p)
 
@Schoening You don't need modernizr to check if MouseEvent is supported or not
 
o_O Looks like I can do this for just about any kind of event!
This is kinda cool man...
 
@AwalGarg Not all browsers support it though, but yes, you can.
 
10:45 AM
@AwalGarg thanks. Where did u find out about it just now?
 
@Schoening rape your console, it has everything... just that it doesn't like to speak itself.
@SecondRikudo if they don't support it, then they don't have it, right?
 
@AwalGarg trying to access any meta.* except for Meta Stack Exchange or Meta Stack Overflow over https will result in an error.
The scary THIS ISN'T SAFE browser error.
The rest have https, but StackExchange doesn't officially support it (so if there's a bug, they aren't obliged to fix it), although they're working on it.
 
Btw, I really think there should be one big article about all the features of dev tools and how and where to use them. Yesterday only, I discovered the iframe trick and now I am thinking why the hell did I not know this for so long!!!
@SecondRikudo oh I was talking about the mouseevent constructor
 
@AwalGarg Oh
They shouldn't have it, no.
 
@SecondRikudo yeah that is what he was trying to detect... so I think it is a valid solution. /me thinks :P
 
10:51 AM
@AwalGarg Try :)
 
@SecondRikudo works for me... but in chrome and ff... not sure about rest of the browsers :D
 
my awesome spritesheet:
my design skills tho
(no, the thing on the green thing is not what you may think it is)
 
hold on... he should have asked this question on the main site... I would have got rep!! :(
 
@AwalGarg You can ask and answer it yourself
 
I want javascript to have the pcre regex implementation
@SecondRikudo haha right... would see if I can write something good :D
 
10:56 AM
@AwalGarg Why? What are you missing?
 
@SecondRikudo posix classes
 
Meh
Translation table in here ^
I personally find [a-z] more readable (And obviously shorter) than [:alpha:]
 
@SecondRikudo [:punct:]
 
!!> "!".match(/[\p{P}\p{S}]/)
 
@SecondRikudo null
 
10:59 AM
Touche.
 
:D
print and punct are the only two posix classes I like and have used. Others are meh..
 
arrow keys to move, space to shoot, and if you leave the tab it freezes
still need to decide what the main character should be
should it be a kitten shooting other stuff or a thing shooting kittens at something or a thing shooting at kittens with something?
 
@towc kitten shooting kittens at kittens
 
hmmm
doable
an old kitten shooting baby kittens at zombie kittens?
 
zombie kitten shooting zombie kittens at zombie kittens
 
11:08 AM
that's probably too much
btw, this is the github thing: github.com/towc/kitten
if anyone (not likely) is interested
 
@rlemon why is the canvas performing so much worse when I am spreading out the sprites on the entire canvas? codepen.io/anon/pen/lyswr
 
la la la - was bored. (sorry!) :)
btw, how many of you use advanced jQuery selectors? By Advanced I mean, things like: $("[data-trigger=selectForVault]:not('.disabled').selected")
 
"advanced" lol
 
@NeerajKumar Yeah, don't do that.
 
@AwalGarg dude you need to fix your attitude.
@SecondRikudo why?
 
11:14 AM
:D
 
any particular reason? except performance.
 
oh wait... you are that guy right?
who came yesterday...
 
@AwalGarg Exactly!
 
@NeerajKumar $('[data-trigger="selectForValue"]').not('.disabled').is('.selected')
 
@NeerajKumar kk, I take my lol back. Sorry.
 
11:15 AM
@SecondRikudo aah makes much more sense. Thanks!
 
@NeerajKumar This moves a lot of the work done to the NodeList (or whatever jQuery uses), and saves you the performance penalty of hitting the DOM multiple times.
 
@SecondRikudo Yea, I was afraid of that. But this completely skipped my mind.
 
Hey guys, is it possible to add and remove a css class before navigating to another page?
 
@Oleg Yes, why?
 
@SecondRikudo How? I'm at lost... my animation keeps running when I hit the back button from the page I navigate to (on iOS).
 
11:30 AM
@Oleg So?
 
So?
 
@Oleg Why do you care if your animation keeps playing when you navigate?
 
I want to add a click/touch event to an anchor element that would bounce the anchor slightly.
No problem with the actual implementation.
It bounces and I go to the page that's specified in the href.
But when I click "back", I return to the previous page and my anchor keeps bouncing...
If I listen to "onbeforeunload" event, and remove the CSS class that does the animation, the animation is cancelled immediately (barely runs).
I could add a timeout, but I'm afraid that there might be cases where the page cancels the timeout if navigated too quickly (e.g. from cache).
 
11:51 AM
:D progress
updated git: 5c64569.5minfork.com
 

« first day (1478 days earlier)      last day (3464 days later) »