« first day (1816 days earlier)      last day (3132 days later) » 

user5020521
3:00 PM
@rlemon I'm already home thank you
 
user1596138
@Riccardo990 just take a look around
 
user1596138
@Riccardo990 I;m the sunshine in your hair
 
@SterlingArcher What a genius
 
user1596138
@Riccardo990 I'm the shadow on the ground
 
3:00 PM
@Riccardo990 are you really so oblivious
 
user1596138
@Riccardo990 I'm the whisper in the wind
 
@LanaKane will you be his hero baby?
 
And if he cuts through the ice... no biggie cause he's in a boat!
 
user5020521
@LanaKane don't take the piss out of me
 
@LanaKane will you kiss away the pain ohh yea!
 
user1596138
3:01 PM
I'm your imaginary friend
And I know I'm in your prayers
Oh I'm already there
 
@Riccardo990 Escape the backslashes in the regex
also, learn javascript
 
user1596138
@rlemon Are we thinking of different songs lol
 
@LanaKane ofc
 
user3119231
@Cereal thanks for an respectful answer. @Riccardo990 here you go :)
 
@Cereal That is where you went wrong in life, oh Cereal!
 
user5020521
3:02 PM
@Cereal I'm seriously tryina learn js else I wouldn't have tried so many examples
 
Cereally!
 
@Riccardo990 In any case, escape the backslashes in the regex
 
user1596138
lol. We Lonestar iglesias'd him
 
user5020521
@Cereal thank you I will try to escape them else I will escape
 
@LanaKane I'd pay for that mashup
 
3:03 PM
var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
  '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
  '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
  '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
  '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
  '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
 
@Maurize respectful? is it respectful to ask others to do work for you? is it respectful to ignore suggestions? I agree we don't have to be sarcastic dicks, but shit begets shit.
 
user5020521
@rlemon I didn't mean to ignore suggestions
 
user5020521
I simply didn't understand them cause I'm a f**** beginner!
 
@rlemon now now, I don't think any of us were dicks. Just sarcastic.
 
user1596138
I can be the dick. I'm always the scapedick
 
3:05 PM
were would imply past tense. Y'all are always dicks
 
@Riccardo990 "I'm a beginner" is not a valid excuse. you have google and documents to reference when we give you suggestions and terms to search.
also, the answer is in the same question you got the code from
 
user5020521
and I don't mean to piss you off it's not my intention my intentions were good wheen I came here
 
And btw, replying with "try it out yourself" to a friendly suggestion is friggin off-putting and rude.
 
I'm not pissed off, I just don't think you should be asking people to hand you a sandwich
 
@Riccardo990 If you knew what you were asking, you'd understand the responses here.
 
user5020521
3:06 PM
you know what guys? you're fucking right and I am a fucking prick beginner stupid son of bitch
 
user5020521
is this good for you?
 
user5020521
is this enough? I go to learn thank you
 
user5020521
:)
 
That'll do piggy, that'll do.
@rlemon You decided on codemirror yet?
 
user5020521
p.s. I won't piss you off till when I googled everything on the internet
 
user1596138
3:09 PM
I am constantly torn between not using AdBlock... And using Youtube
 
user5020521
but it's impossible to never ask a question
 
user1596138
Cause I won't do both lol
 
What they're trying to say here is:
 
Every person that mentions Node.js on Quora calls it a framework or a library... Why are they so dumb?
 
My dick
 
3:09 PM
@Nick sounds l ike a great quora question!
 
good lord please
 
We're not here to teach JavaScript. We're all (more or less) experts, and people come in every day asking questions that a basic knowledge of the language/google fu would answer.
4
 
Who flagged that? Fuck you.
 
@BenFortune flagged what?
 
Who flags self verbal abuse? Honestly.
 
3:10 PM
@SterlingArcher I'm not an expert, I just know the documentation url
 
@Nick because not everyone who calls himself "an expert" is actually one
 
I'm good at jQuery
 
@LanaKane oh my lol
 
@BenFortune Trust me. I'm an expert.
 
@Nick Seriously?
 
3:11 PM
because that's not valid JSON?
 
@BenFortune if it was true, it actually would be quite rare
 
@AlexanderSolonik is that valid JSON..?
 
@AlexanderSolonik Because it expects valid JSON
 
No, it is not.
 
user1596138
@SterlingArcher Hey I realized what I did lol
 
user5020521
3:11 PM
@SterlingArcher I believed what I've just said was enough for you
 
@Cereal That used to say platform
 
Right.
 
~_~
 
@Cereal Node isn't a framework; It's a platform that switches out the DOM api for various other API's, like the file system. If you think it's a framework, you're confused about what a framework is (Even them calling it one on their website is inappropriate)
 
user1596138
....
 
3:13 PM
@AlexanderSolonik and your problem is..? Like, mental one
 
Is it only me or someone else thinks an outside mystical force is sending us willfully trolling people who succeed without us knowing and then laugh on the other side of the wire?
 
user1596138
@Nick pedanticity reaching critical levels.
 
No
 
@Nick gif
 
3:14 PM
I care
 
@Nick I took it from the site. Argue with the developers, not me
 
@Loktar names matter
 
aww I missed flags?
 
Also, who gives a shit?
 
!!define framework
 
3:14 PM
@AwalGarg framework (literally) The arrangement of support beams that represent a building's general shape and size.
 
Upside to developers: we're sticklers for details
 
@Cereal They refer to it as a runtime environment on the homepage, then as a framework on the about page; clearly written by different people
 
@Nick Kind of makes you think it doesn't matter, doesn't it?
 
Downside to developers: we stickler details so much it pisses off others
 
It matters to me
 
3:15 PM
fucking troll.
 
But you don't matter
Soooooooooooooooooooooooooooooo
 
@rlemon Codemirror supports inline syntax highlighting too, gonna make a PR later if you don't mind.
 
I matter to my mother
She tells me that I'm special
 
> framework /ˈfrāmˌwərk/, n.: a product with the business logic removed, but all of the assumptions left in
 
@BenFortune I'm replacing the entire input with a codemirror 'view'
don't bother
 
3:16 PM
Ah alright, I'll fix the easy star shit then :>
5 days until no job :c
Need to occupy myself
 
@BenFortune that's probably a social movement
 
Good day, I got an 'infamous for loop' problem, but my question got marked as duplicated. Problem is: I can't figure it out. question
 
"occupy myself"
 
@BenFortune occupy Red Robin
 
@BenFortune re-write watcher.js such that I can have 'pre watch' events. so I can watch for the chat to load THEN watch for other changes.
 
3:17 PM
 
@Jordumus because by the time the setTimeout is run the i is at the end
 
yea, I figured out that much. Now my problem is: how to solve this?
 
@tereško but that is just one definition. Maybe they meant something else via "framework"? Maybe not a literal usage of the word but just something representing "a system to build upon"? I'd argue such a thing can be easily called a framework.
 
91
Q: setTimeout in for-loop does not print consecutive values

IlyssisI have this script: for (var i = 1; i <= 2; i++) { setTimeout(function() { alert(i) }, 100); } But 3 is alerted both times, instead of 1 then 2. Is there a way to pass i, without writing the function as a string?

 
I checked the answer that was marked as duplicate, and tried it out, but never worked sadface :)
 
3:19 PM
try these
and then when you have tried it, come back and show us your attempt
 
also @Nick quora sucks. IQ of most people at quora is that of codepenisbetter
 
@Jordumus Uhh, It has to do with the index variable. All the nested functions are going to run with the value of i, when the function is run
so probably the last index of the array
 
There's no good es6 doc generators :\
 
-1
A: setTimeout in for-loop does not print consecutive values

rezathe real solution is here, but you need to be familiar with PHP programing language. you must mix PHP and JAVASCRIPT orders in order to reach to your purpose. pay attention to this : <?php for($i=1;$i<=3;$i++){ echo "<script language='javascript' > setTimeout(function(){alert('".$i."');},3000)...

what the serious fuck
 
3:21 PM
srs fk
 
user5020521
@Cereal thank you it works now and I'm sorry about the nuisance
 
Good lord what is this filth — Sterling Archer 9 secs ago
@rlemon dude wtfffff
 
ikr
 
@rlemon Does something like this not work:
let chatBody = document.querySelector('#chat-body');
const loadedFn = e => {
	if(e.target.id === 'loading') {
		chatBody.removeEventListener('DOMNodeRemoved', loadedFn);
	}
};
chatBody.addEventListener('DOMNodeRemoved', loadedFn);
 
> you need to be familiar with PHP programing language. you must mix PHP and JAVASCRIPT orders in order to reach to your purpose.
sigh
 
3:22 PM
@BenFortune problem is timing. it is a race condition for different users.
for instance, I do not see #loading in my dom once my script is injected.
some users cough India cough see it for a while
 
@SterlingArcher that comment is not constructive
 
@Riccardo990 \o/
 
@rlemon A race condition? I am all ears
 
@AwalGarg no
 
please someone help.. after i deobfuscate a code.. there is a ton of regex and mini-functions that unravel the full functions. whats the process for understanding this? rewriting it by running the mini-functions manually?
 
3:23 PM
var images = $(".images");
images.forEach(function(image) {
  setInterval() {
    refreshBackground($(image));
  }, parseInt($(image).data('interval') * 1000);
}
@Jordumus ?
 
@AwalGarg That's not a race condition, that sounds more like a buffer overflow
 
@KendallFrey 10/10 not constructive, but I'm overdue for being a dickhole on Main
 
I just put it in a IIFE and it works!
 
ok :( I have time to put but ok
 
the forEach didn't work for some reason cereal, tried that one before
Thanks for the suggestions! Riemon, your answer helped me :)
 
3:24 PM
best answer is to use .bind and pass i to the closure
imo
 
@SterlingArcher People like you are why the internet sucks
 
@rlemon Well then can't you just start your script if #loading isn't found?
 
user5020521
@Cereal I don't know that emoticon assuming that is an emoticon :)
 
If found, add the listener
 
3:24 PM
People like me are why your mom sucks
 
@BenFortune no because maybe DOM isn't even ready yet?
 
@BenFortune I was pissing around with something like that and it wasn't giving me consistent results.
 
Feel free to bitch and moan here:
0
Q: Is Node.js a Framework?

NickI keep seeing recruiters, developers, etc. refer to Node.js as a framework. In my opinion, this is out of ignorance for what Node really is. Often times, in job descriptions, Node.js is grouped in as a library among Angular, React, etc. Generally, I see it as being entered by someone that doesn'...

 
I'll re-visit it this weekend
 
3:25 PM
@Riccardo990 It's this
 
user5020521
ahahahahahah slim shady you are crazy @Cereal
 
@Nick What are the differences between a runtime environment and a framework?
 
!!afk shutting down quora
 
user5020521
don't you know EMINEM?
 
user5020521
3:26 PM
slim shady marshall mathers
 
would the real slim shady please stand up
 
0
A: Is Node.js a Framework?

rlemon Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. source Node is a runtime or environment. It is not a framework. People (I feel) often get this wrong because frameworks like express are ubiquitous with node.

 
user5020521
oh shit I just got up
 
> As an asynchronous event driven framework, Node.js is designed to build scalable network applications.
Is this confusing to anyone else?
 
3:28 PM
@BenFortune whats confusing about it
 
user5020521
@KendallFrey I have that lp it was released in 2000's
 
@bushdiver I don't know if it's referring to Node.js being a framework, or "an event driven framework" being designed to build scalable network apps.
 
user5020521
15 years ago as of 2day
 
@Nick looks to me like node is both
 
I'd argue that Node is the platform; they introduce 'frameworks' or API's on top of it, but Node, itself, isn't a framework.
 
3:30 PM
I'd agree
 
To me a framework is a library or API that you build your entire program structure on
 
user1596138
@Nick What does V8 do
 
user1596138
It compiles JS to native machine code
 
Node is that, because you build your program entirely as event-driven code
 
user1596138
So Node is a framework as far as core functionality goes, it is just JavaScript run through V8. The extra bindings are C++
 
3:32 PM
With that logic, C++ is a framework as well, then
 
C++ is a language
 
user1596138
So you are treating Node as one thing. In reality there is the JavaScript portion (which is clearly a framework at some level) which goes through V8 and becomes machine code, then there is the actual OS level bindings which are written in C++.
 
the STL is a framework
 
Yes, I'm just shining light into the holes in the logic
 
@Nick the analog for C++ would be the STL is a framework, I would think
 
3:33 PM
V8 is a runtime, Node is a standard library
 
user1596138
The bindings/whatever you want to call them that connect it to the OS itself are certainly not a JS framework nor JS at all.
 
Node is both a framework and a runtime environment, much like .NET or Java
 
user1596138
^
 
"framework" is usually used for overarching library
 
So you're saying that it's a framework, but it's probably not the kind of framework that I'm thinking of?
 
3:34 PM
stdlibs are a special kind of framework/library
 
I can't read your mind, so I don't know what kind of framework you're thinking of.
 
@ssube see: everyone fucking calls jQuery a framework
 
imgur.com/gallery/C4Eq3He this entire post is a trainwreck and I love it
 
smh
 
the stdlib is usually the only library that the runtime is actually aware of
 
3:35 PM
It's different than angular, in that there is no angular runtime
 
other libraries/frameworks sit completely on top of the runtime
 
@ssube which is (often) how node works
 
Is that the deciding factor between lib and framework?
 
node being the runtime and express (et al) being the framework
@SterlingArcher usually it is IoC
 
@ssube The runtime need not be aware of the stdlib. In many cases, only a small subset of the stdlib is tightly integrated with the runtime
 
3:36 PM
@rlemon often, yes
 
Sorry, IoC?
 
!!wiki IoC
 
IOC commonly refers to the International Olympic Committee. IOC may also refer to: == Computing == IBM Open Class I/O processor Inversion of control (IoC), a software design pattern Indicator of compromise, an artifact likely indicating a computer intrusion == Game == Invasion of Chaos, a booster pack in the Yu-Gi-Oh! Trading Card Game == Religion == Indian Orthodox Church (IOC) officially known as Indian (Malankara) Orthodox Church == Other == Icon of Coil Immediate or cancel, a type of order used on some stock exchanges Indian Ocean Commission, generally COI, but according to Worl...
 
ugh
 
yeah, most of the stdlib should be normal code, but a few spots (typically around threading) will have to bind tightly to the runtime
 
3:36 PM
!!wiki inversion of control
 
In software engineering, inversion of control (IoC) describes a design in which custom-written portions of a computer program receive the flow of control from a generic, reusable library. A software architecture with this design inverts control as compared to traditional procedural programming: in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the reusable code that calls into the custom, or task-specific, code. Inversion of control is used to increase modularity...
 
that's what makes the stdlib special. Other libs don't get any tight bindings to the runtime/kernel
 
@SterlingArcher bro
 
3:38 PM
The Haskell stdlib is an example of one that's noticeably independent of the runtime
 
drinks and hangouts tonight?!
 
many Haskell stdlib functions are one-liners
 
@SterlingArcher mars attack. A nice movie
 
@KendallFrey fun fact, all of js is a one-liner
 
@KendallFrey where as .Net's stdlib is super closely bound to the runtime throughout
 
3:40 PM
Yeah, there aren't a lot of large self-sufficient libraries
@rlemon You know what I meant
Haskell is a one-liner too
Haskell has the best significant whitespace system I've encountered to date.
 
@KendallFrey Hangouts later?
 
It has significant whitespace, but it's not required
 
Like.. In six hours
 
@rlemon sure
before that is fine too :P
 
Not for me.
 
3:42 PM
My day so far has been kinda shitty
WCF is a bitch
 
take a shower, then
 
tonight I'll be fixing my gaming system and moving it to the basement
 
@rlemon I'm down
 
so you can all watch me do that
 
I don't wanna cook dinner so I wont have to clean shit up lol
more time to rest my spinals
!!afk vape
 
3:44 PM
!!afk luncharoo
 
Microsoft just announced their own laptop, the "Surface Book", and it's fucking beautiful.
 
> 13.5-inch display
 
anyone know a place i can do geolocation push notifications so i can do push notifications to my east and west coast subscribers?
 
ugh
how the hell does anyone work on such a small display
 
I've never downgraded my display size
I don't think I could work on 15" again
 
3:46 PM
17" or more
even 17" is kinda small
 
yeah
wouldn't want anything smaller than 20 for a desktop
 
my laptop right now is 17.5" and it is kinda too small
 
23" is my minimum for a desktop
 
I need to re-work my workstation so I can hook up my 24"
 
I can work on whatever for a laptop
 
3:48 PM
@BenFortune for desktop, 2*24" , I'm too used to it, can't see myself going smaller.
 
Because it's not permanent
 
I can't remember what my 15" screen resolution was, but it was at least 1080p
 
@rlemon 2 monitors at the minimum too :P I'll never go back to a single monitor
Got 3 and my tv hooked up to my PC at home
 
With Windows 10, I could go back to a single monitor
I'm actually using two single-monitor machines right now
 
@BenFortune That looks awesome
Workspaces make single monitor much better
 
3:50 PM
@Cereal But dual-monitor workspaces
 
@rlemon probably you got used with wide screens
 
@Loktar youtube.com/watch?v=xkNp5b6m4u8 not bad for new atreyu
 
sucks that I can't use RDP full-screen on one desktop though
 
@BenFortune I thikn I'd prefer 1 4k monitor + workspaces
I mean, I say I think, but I know I do. I had that setup for a bit
 
@Cereal 4k, snap and workspaces. Perfect
 
3:52 PM
more monitors > more pixels
except for gaming
 
I had a triple monitor setup on one computer, and another with a 4k monitor with arch + awesome wm. I barely touched the triple monitor setup
 
I have a triple monitor here, but theres really no point to the third one
 
how about one ultra-wide monitor
 
dat windows surface... i don't believe that 12h battery life claim
 
@KarelG I do. My macbook air pushes 10, and it's years old
 
3:54 PM
i believe it, but not while playing games or other such nonsense
 
@Cereal That laptop is pretty insane, it has a battery and intel gpu in the tablet bit, then when you add the base(keyboard) you get a nvidia gpu and another battery
 
12 hours of JS chat room
 
New Atreyu album isn't bad at all
 
yeah, that 12h got reached by an economical use of it: no WiFi, low screen brightness, ...
but that's not an average use of notebooks
unless they invented a new battery
 
@SterlingArcher dude I thought the first gu y they showed had beast chest hair
 
3:57 PM
mmmm sushi
 
turns out it was his beard youtu.be/xkNp5b6m4u8?t=3
 
Haha
Gonna give it a listen on the way home, assuming it's out on spotify
 

« first day (1816 days earlier)      last day (3132 days later) »