« first day (1925 days earlier)      last day (3248 days later) » 

00:01
@Lemony-Andrew JavaScript
What Polymer is missing is "JavaScript"
React takes HTML, which is a very poor language, and embeds it into JavaSCript, which is a very rich language.
Polymer, on the other hand, takes JavaScript, which is a rich language, and tried to express it with HTML, which is nowhere near as rich
The result is blah
00:03
@rlemon lol
@MadaraUchiha I like your view on that! It has potential for being better though, their WebComponent templating, I'd say, could use some tweaking and then it would be on the same grounds as Angular if not better.
@Lemony-Andrew Angular isn't really "better"
At least angular 1 isn't.
I'll admit to not having looked into Angular 2 yet.
@MadaraUchiha Angular 1 can do more, without as much hassle, than Polymer. That's why I'd say it's better
@Lemony-Andrew I hate using frameworks to begin with
Frameworks help you make the easy case easier, and the hard cases harder.
> that's why he was called Han Solo HA!
m59
m59
00:06
I used to be such an Angular fan-boy.
But man... I hate it so much.
When you reach 1, 2, 3, 10 use cases where Angular borks on you, you're already so deep in technical debt you can't switch
m59
m59
^^^^^^^^^^^^^^^^^^^^
and really, Angular is just a giant bork in the first place.
That's why I opt to use small and useful libraries, rather than big and clumsy frameworks.
@MadaraUchiha I don't know if what I do would be considered "bad practice", but I really only use whatever the native DOM API's fo everything I do.
@Lemony-Andrew I sometimes do that too
When a library is overkill
But in those cases I create my own abstraction over the DOM
If DOM is a big part of your application, you should have an abstraction for it, like anything else that's a big part of your application.
00:08
The only thing I guess that's hard is keeping multiple different areas that are interdependent, in which case I'll look for something for data-binding. And I like the idea of reflux for that.
If Database is a big part of your application, you usually have an abstraction for it.
@Lemony-Andrew People tend to see React (for example) like this magic pill
It's not. React has a very specific usecase
It's when you don't want to know about how changes in state trigger changes in DOM.
@MadaraUchiha yeah it would be horrible for what I'm working on this very moment
When you have a lot of moving parts that can affect each other, or that other sources that affect how your app behaves
That's when React shines, because you just pass in the new state and React magically makes it all work.
I've seen people use React for goddamn static pages with 0 interactivity
That's just silly
That is a blatant shame
React isn't a magic bullet, just like Angular isn't, just like jQuery isn't.
Common Lisp is the answer to all.
00:11
jQuery is so large lol
I'd like to say a prayer to any JS developer who learned jQuery prior to vanilla JS.
jQuery isn't bad for learning, I appreciated it for it's simplicity before learning the basic DOM Apis.
jQuery ruined me.
jQuery really isn't "Horrible", it's pretty great. Just too large for small use-cases.
I learned jQuery before knowing any proper Javascript, coming from a background of managed/unmanaged C++, C#, Python, and Java.
When I was put in a situation where I couldn't use it, I didn't know what to do.
00:15
I've said it before, jQuery is good for RAD(Rapid Application Development) or if you are working in a team. can you do without? ohh hell yes, easily.
^ Exactly
the largest problem (aside from the silly api choices) is that jQuery is horribly abused
I'm working on a very interactive library atm of my own and JQuery would have simplified it a lot more, but it's not worth how large it is.
horribly...
I have a question that is more so a java question i suppose though. Is there a good way to go though an array of strings that were scanned into the array from a file line by line and check for /* comments */ and strip them out while leaving the array or a copy of the array in the same order?
00:16
@Lemony-Andrew it isn't so much (anymore) how large it is, rather how slow it is
for regular use? no
high performance shit? yes
jQuery.animate is not that good
I've never noticed a big performance drop with JQuery on my own, but I'm gonna take a guess and say it has something to do with the fact they do a lot of string parsing
Or I'm completely wrong, I haven't looked at it's source in detail
as far as sized is concerned, your profile picture is like 40kb
if you wanna complain about jQuery size....
It's like 100kb + last time I looked
it really isn't that big of a complaint, when you think about it.
in this chat alone how many pictures are loaded?
pictures are a shitload larger than your average script
Yeah, but then nothing is really a large download then
00:19
and we have no problem using them
well things are
if you're looking at a few meg you have issues
Rarely, given a framework or library
a few hundred kb... not so much
Ay anyone know where I can find some nice premade keyframe animations?
http://www.google.com/search?q=nice+premade+keyframe+animations
first link
Ayyy
LOL
00:24
@Lemony-Andrew you can use the google command
that rick ross head
!!google nice premade keyframe animations
@rlemon I tried using lmgtfy and it went directly to the search lol
google "Who did 9/11?" --steel --beams
00:25
no
!! chips or fries?
@Lemony-Andrew fries
I have this condition, but because sometimes variable of url is null, then this condition fails, how can I fix it? if ( !url.match(/^https?:\/\//) ) { }
check if empty string or if nan
before match
!!tell Shafizadeh mdn and
if( foo && !foo.match(stuff) )
@rlemon tnx
lolwut
but really, read the article
won't take long
how does one code without knowing operators
smokers cough you don't
00:27
Did I miss hangouts?
there are no operators in machine code
@Shmiddty we could get another going?
your moms a machine code
drum roll
@rlemon tnx
00:28
@neet_jn and so are you
yea
YOU'RE A ROBOT AND YOU DON'T EVEN KNOW IT
@neet_jn be quiet before I replace you with a very small shell script.
@Shmiddty Time to give in the towel then, bai gais, inocode nymoar
!!s/small/*small*/
00:29
@Shmiddty @neet_jn be quiet before I replace you with a very $1 shell script. (source)
is it dollar or ampersand?
@Shmiddty @neet_jn be quiet before I replace you with a very &1 shell script. (source)
delete-user neet-jn -method="death" -crime="jerk"
@Shmiddty @neet_jn be quiet before I replace you with a very small shell script. (source)
00:30
or should very also be italicized? hmm hmm hmm
@rlemon I'd mostly be swearing at FO4 for being a buggy POS
lol
When you realize you forgot to save #ihavebeen #damned
01:33am... on a saturday. I guess it's time to stop working
pansy
...
this game is so buggy
00:49
I want to join a hangouts lol
there isn't one
pls mom
Nothing interesting happens during a hangout, anyways. You'll see a horse smoking, others looking at it.
pootis
your avatar is breath taking
01:02
can't believe someone made a site for it: needsmorejquery.com
@littlepootis idle banter
idle banter is the whole point of people talking
LOL
that final comment
im dead
@towc lmfao that's just great. Wish it wasn't just a picture but an actual site
had you never seen that image?
Never lmao
01:03
@towc nope
@littlepootis lol makes sense
01:55
The results are in. You decided you like the Galaxy Explorer app. Now we’ll build it. http://bit.ly/1PbNzf6 https://t.co/23JS38DNSZ
oh my gawwwwwwwwwd
damn
this thing is going to revolutionize porn
I'd guess VR will have the edge there
lux
lux
Is it possible in JS to inspect the body and headers of an incoming HTTP request even if the client didn't initiate the request? For instance, let's say a server redirects to your website, is it possible to obtain a JSON payload from the body, taking into considering the client never initiated the request but was redirected to, or is the only possible mechanism to retrieve data from an unsolicited redirect is by inspecting the URL alone, such as parameters passed (i.e. /order/123)?
@lux 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.
lux
lux
I can give context if needed.
02:02
Needed. Node.js?
lux
lux
the front-end is powered by something simple, http-server, but interacts with the node backend that could be on another server, or same machine diff port.
Backend accepts authentication from anothe system, then redirects to the front-end
A request is a request, regardless of whether a browser triggered it from a redirect or not
the server should see them the same
and what do you mean by backend/frontend?
two different sites?
lux
lux
Agreed, but how would the client accept the json in the redirect without having initiated the call. Im used to using libs like axios or request
I'm not seeing what JSON has to do with it
lux
lux
yes, front-end is detached from server, they only speak through an API
02:05
what
you're confusing me dramatically
please explain the structure of what you're dealing with
lux
lux
Are you familiar with promises initiated by javascript http libraries, such as deferred in jquery or axios
I'm somewhat familiar with promises in general
I just read the saddest and most heart wrenching short story of all time
I hope this dude isn't real
lux
lux
Now in these cases, the browser initiates the request to the backend for data, using such an http lib
02:07
backend is a site, or just the http server?
lux
lux
its a node server connected to an abritary data store: mongo, couch, postgres, whatever
lux
lux
ok, now the pattern is typically client --> server , server does work ---> back to client with data
now
the backend server has the capability to perform a redirect if it receives a request
not a request from the front end described above, but from another system
just understand that the backend node server is performing a redirect to the http-server (front-end), and it wants to pass data
something <--> server <--> client
lux
lux
yes
02:12
something tells the server to give a redirect response to the client?
lux
lux
i think the only way to get data from that redirect is by inspecting the URL for search params
lux
lux
yes to your last question
8 mins ago, by Kendall Frey
and what do you mean by backend/frontend?
still confused
lux
lux
the front end sits on port 80
thats it, its a web app written in react
if you push buttons, it fetches data from a remote server
02:14
node something <--> node http server <--> browser?
lux
lux
Yes, essentially, but the setup doesn't matter necessarily, I could spin up a java backend using jersey rest services, but the question remains, if a server redirects to a given website, is it possible for that site to inspect the payload of the HTTP request. Now we understand if the client itself initiates the request, it has much greater control, but what about if it was redirected to? I'm pretty sure it can only inspect incoming URL paramters (i.e. /foo/bar/124)
What you're asking makes no sense
a request is the same whether it's from a redirect or not
lux
lux
yes, but not after layer 7 when its passed to the JS engine in the browser
either JS has the capability to obtain the raw http request, or it doesnt.
a request is never "passed to the JS engine in the browser"
it's passed to the http server
lux
lux
why in quotes? is the javascript enginer mythical? lol
jQuery.ajax()
very common to have http in js
02:28
you don't process the request on the client
you create a request on the client, process it on the server, create a response on the server, and process it on the client
lux
lux
I'm obviously referring to this from the browsers side, but semantics aside, if the browser were redirected to, there is no way to obtain the raw http response (uninitiated), unless the response was provoked by the client itself, correct?
what the fuck
That's gibberish to me
"if the browser were redirected to" what
"the raw http response (uninitiated)" what
"response was provoked by the client" what
lux
lux
you have not heard of a redirect?
have you not ever interacted with HttpResposne objects?
never called an api?
used ajax?
It sounds like you havent
I know what a redirect is
I know what a response is
I can use REST APIs
I can use AJAX
What I can't do is decrypt your questions
2
Hey guys, do you know of any open source tool which is like the embed feature of jsFiddle? Basically, I want to use this to embed in an internal website and the code in it cannot be hosted on jsFiddle, jsBin, Plunkr, etc.
I am not really sure what do I search in google for this. :-|
02:54
@SterlingArcher .
@neet_jn I finally found it. That will be the second saddest story of all time, after you read this one: i.imgur.com/82d7gw1.jpg
03:49
@RahulDesai Well you could potentially combine two things together. What I would imagine is taking the Ace Editor and then taking whatever code someone writes in the editor and calling eval over it. But, of course, you'll want to make sure someone doesn't do any fishy things in their code like attacking your site.
https://ace.c9.io/#nav=about < Ace Editor
No idea what the link mark-up is here
accidentally knocked it over. I fix!
@Shmiddty lol what's that from
Fallout4
Haven't played it! I don't play many games because broke
04:51
@rlemon Wow, nice! That was oddly fast
@KendallFrey Happy birthday! :D
05:04
hi
@KevinB Alo
05:21
@Lemony-Andrew I got it for free :)
Which is good because the game is buggy as all get out
Aw man that's not thrilling to hear for a franchise that had such charisma
hi
@NNem how's it goin
@Lemony-Andrew It's still fun. Just buggy
@Shmiddty Want to lend it to a friend :P haha
05:32
It worked! Thanks
hahaha
05:48
I'm so drunk, I somehow managedh to code same tile interaftion in my game
da fuq
someone i know is interested in programming and is looking for a good place to start. what's the intro/tutorial that you point someone like that to?
@KendallFrey happt bithday buddy!
@NathanJones FreeCodeCamp
@KendallFrey Happy Birthday
@RahulDesai lol that's great
I saw it earlier but not the details
"America is great" -fin
07:30
@FlorianMargaine I dint understand your last comment there. What did I open your eyes about? lol
07:43
Hi
I'm trying to select the div having the class repeat. so I have tried this.
but it shows [Object object]
why it fails to show the html?
tried alert($('div.repeat')) also
got that using ``.html()
several reasons
first, [Object object] is the correct thing
Goal of the day: Build IE8 support for a site :(
That's the result of casting an object to string
which is what happens when you try to alert it
I'm so adding a notification to fucking update the browser
try a console.log
@ivarni tell whoever tells you what to make that they're pissing away money
07:48
@phenomnomnominal thanks..
@ivarni do you have analytics?
@phenomnomnominal They know, analytics report >5% so they want support
it's just a couple of hours but it's boring
and annoying
Does that translate to >5% of money?
Nope
alert($('div.code').html())
give the inner pre tag
07:50
I said I can do full support in 8 hours, or partial in 2 and they said to spend 2 hours so that's what I'll do.
what about the div tag?
The "please update your shit" notification I am going to add for free...
ahhh
donno why I am getting undefined..
crl
crl
08:09
Is it also fine to place <script> in <html> after </body>?
@crl It never occured to me to try, but I guess if it works it's fine?
I'd test to make sure the body gets parsed first though
crl
crl
it works, but it looks awkward
then don't do it :p
crl
crl
even outside </html> it works, yea I won't dothat
@m59 The more I think about it, the less viable my solution sounds
At best you might be able to do something like createIsolatedUIComponent(), but that's not much better than isolate().
So, let it be :P
crl
crl
08:29
isolateCreatedUIComponent() nah jk idk the story
08:45
imprisonUIComponent()
09:29
guys, a quick question: I tried parseInt('a') and it returned NaN. So why it doesn't print true when I do parseInt('a')===NaN?
Nothing is equal to NaN, try isNaN(parseInt('a'))
man, you rock! Thank you so much!
For fun just see what NaN === NaN gives you :)
:D interesting
09:54
@PDKnight Nah, if you want interesting try typeof NaN
crl
crl
10:30
wow I need chrome 49... destructuring and default params
what's the difference between chrome canary, dev and beta channel? I can't figure out which versions they are currently
ok got it
!!dev or canary?
@crl canary
crl
crl
10:49
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.13 Safari/537.36 ah :)
Hmm how do you hide the device view toolbar below address bar when using the console?
got it
11:05
Looking at :
class Aaa { constructor (x) { this.x=x;} go() {alert(1)}}
var p1 = new Aaa(5);
p1.go()
why , if I run every single line in console , it doesn't work ? (Uncaught ReferenceError: Aaa is not defined(…)
but If I run it as a block , it does work ?
Think about the class's scoping and how the console evaluates code.
crl
crl
if you mean in console, you could do var Aaa = class Aaa {... because it uses window, but it's just for testing
If it were a constructor function . it would have worked , line by line
regarding classes' scoping , I guess i should read about it
Oh.... MDN : "This name is only visible in the scope of the class expression itself"
^ is this the reason ?
var is function scoped, as are function declarations. But let and const are block scoped. What is class? Block scoped or function scoped?
11:16
Then find it elsewhere or experiment
crl
crl
> function Doge(){}
> new Doge() // fine
> class Cat{}
> new Cat() // nope, so block scoped I guess
it's weird because I thought it was equivalent to a function, but one defined block-scoped only so
Thank you guys , like always
crl
crl
11:35
.offsetHeight is read-only right? ya
Well I'll be damned, just adding the html5-shiv fixed 95% of the IE8 issues
long live server side rendering
crl
crl
or you could transpile the client-side code
cappuccino-project.org/learn/objective-j.html why would anyone think this is a good idea. "hey, know what everyone loves? you know what's a top-notch, thought out language? Objective-C. It's time we put it in the browser."
There is no client-side code
crl
crl
the <script> I mean
11:36
Well that's a lie, there's 90 lines or so but most of the problems were CSS related
crl
crl
I don't put no js, no more IE issues
Well I enjoy building rich webapps but I don't do it for sites that are mainly static. This time it payed off :)
crl
crl
there should really be a event.mouseDown property, like event.ctrlKey, .altKey
13:01
13:20
any idea why when you change something like "spacing" it remains a string when passed over to the opts object? codepen.io/towc/pen/mVXMaO?editors=0010 line 95
Hello, is it at all possible to have some help loading data from a .json file?
@TomKealy 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.
@TomKealy what's your problem in more detail?
If I have a JSON file in the same folder as my html, how do I load the data into a JSON object so I can access the data via a function?
!!tell TomKealy mdn XMLHttpRequest
13:32
@TomKealy XMLHttpRequest
um, it's even simpler than that: the data, and the page are on my laptop
Still, you'll have to use that.
@tom some browsers (like chrome) won't let you.
ok thank you ever so much
I've sorted it!
14:00
14:14
@Lemony-Andrew Hi Cay, life no hand you no lemons.
U wot m8? Resto or Cay or Lemony?
14:50
chrome canary has everything right
49
yes, everything
sweet, proxy

« first day (1925 days earlier)      last day (3248 days later) »