« first day (2399 days earlier)      last day (2774 days later) » 

12:03
@BenFortune been linked like three times now :p
Maybe we should switch rooms with them
> Instead use some of the ES6 features, which lead to concise code src
IMO that's not a concise code. but keh
/help
12:24
hey guys
How do I check if the response ffor an ajax request is an array or not
in plain javascript
@CaptainHere Array.isArray
Is it faster than jquery's $.isArray()?
@CaptainHere Yes
Awesome. Thanks
12:26
@CaptainHere: The asnwer to "Is it faster than jquery's <something>" is pretty much always "yes"
@OliverSalzburg ... why even bother, jQuery? o.O
So, actually, I was lying, they are equally fast, as they are equal ;D
@Cerbrus Because he asked
well not if you factor in the loading of jquery bit
though i'm guessing there's more jquery used
@OliverSalzburg I mean, why does jQuery bother copying it?
I'd assume jQuery is already loaded, so the question is legit
probably for historical reasons
12:28
@Cerbrus Ah, sorry. Legacy compatiblity, I guess
As the file name implies though, it's deprecated
They use Array.isArray internally as well
Deprecation isn't mentioned in the docs though. Maybe they will deprecate it in 4.0 ;)
@OliverSalzburg tbf, you don't count in the jQuery wrapping
@KarelG What wrapping?
the xhr response isn't wrapped in a jQuery object
if you want to use $.isArray, then you have to wrap it
morning everyone
evening
12:43
you're from the future, eh?
don't have the burrito for lunch
i'm you from the future warning you
I learned my lesson last time after buying those "tamales" in that alley in Southie don't worry
-18
Q: Is there any reason to use if?

M.P.Is there any reason in Javascript to use ifand else? I use Javascript for half a year now and I don't see any reson.

Please tell me that's a troll o.O
in my college they taught us to avoid if whenever possible though
@Cerbrus He'd probably love ternary statements lel
12:48
x = y === true ? 'TRUE' : 'FALSE' — M.P. 8 mins ago
@Cerbrus hmm.. I wonder who upvoted it
> primarily opinion-based
Lmao
hahahahah
12:49
@Cerbrus w-what does that even mean?
Aw killjoys deleted it.
That's far funnier than it should be
yea...
hahahaha
IA
12:50
Didn't we just yesterday talk about coding without conditionals?`
an god
i read that as infromation architect
who decided to ban if & else statements because of reasons
There's the full thing :D
12:52
The guy arguing for functional programming as well
This post is just too good to be true
functional programming is crazy
im reading javascript allonge and he made an example where using functions he recreated a linked list
cant they leave it open for "historical reasons"?
well a node of a linked list anyway
s/historical reasons/shits and giggles/
@derp they do something simmilar for a module at our university
12:53
i never really got recursion during uni...:S
only starting to get more comfortable with it now
Algorithms module where you have to create linked lists and perform set methods using only functional programming
Hello guys.
oh okay, i can sort of see how you would do that
It sounds awful, but it was quite simple once you knew where everything was going
emphasis on sort of
you don't happen to have a link do you?
12:55
Also I've seen your stuff before your a good programmer
aww shucks
@lix You're
I'll see if I can find it in my old folder
Get a room.
12:56
His a good programmer what?
@Cerbrus But why would you need for loops when while loops accomplish the same thing?
^x^
@lix incorrect assumption
@lix syntactic sugar :)
Man, check out the 𝚫V on that little guy.
12:59
TWR of at least 2.65
@BenFortune so I deployed my code on ITG to test sending XHR with contentType: 'application/json' to my Express service and ended up with a 401 response
That was on reddit this morning :D
If I post with url-encoded I don't get that 401
@Luggage you ever written a webpack plugin?
Nope.
13:00
any idea why I get a 401 with json content type and not with url-encoded?
if you make it easy for me (share code on github as you work on it) then I'll happy help, though.
I'm doing the cli first.
which is just command-line-args wrapping around swatchy.js
swatchy will be a function that takes in arguments and passes back a string of new css
Hello guys. I am trying to make an ng-repeat from a JSON object that I get from my database. I can log the data from the JSON object just fine (http://prnt.sc/f6lkuk), so it is definitely on the scope.
However, I am not sure what I am doing wrong with trying to repeat them from my index.html

Here is my app.js : https://gist.github.com/themaawaa/4b6fe1f654d33187b558dee1a054c17c

Here is my index.html :
https://gist.github.com/themaawaa/c0a7c760ef63c420dd6f61c516bc6105
@MaartenWachters Your vars aren't matching up, fix that first
res -> result
@BrianJ I wouldn't know without any code..
Wow thanks Ben
That might've been one of my most stupid mistakes -.-
13:05
Yay for no validation. Long live JavaScript w/o Linters.
does someone know how Chrome determines if an input is candidate as autofill input?
@RoelvanUden There's no validation for angular syntax in HTML though.
The JS is valid.
@KarelG Change event without any keypresses?
Just a mismatch between the js file and the html file
That's why real men use TypeScript and React :-P
13:08
No thanks, I'd rather not be a "real man" and enjoy JS's leniency about types :D
not trying to convince you, but you still get that in TS.
Eh, I much prefer to code knowing the compiler has got my back, and drop down to the : any type for JS-like voodoo. But that's just me.
(Or, you know, number | number[] | string | string[] kind of types)
const foo = { any: 'damn', thing: { i: 'want' } };
welll...if its a const
13:09
or let or var
looks like foo is set to that object xD
it is?
well you can't reassign foo
it's just that chrome sometimes adds a yellow background color (autofill) after entering some data
foo = {something: 'else'} should error
13:10
Did you know TS can "compile" your JS for validation too?
then make it let..
you know this.
im just pointing out the irony xD
That it happens if you use the down arrow and select one of the options in a regex matched input (eg firstname) OK but entered text ?
There is no irony, just an arbitrary choice of using const in my example instead of let
Are there any languages where they use symbols for datatypes?
13:11
i am trying to use const more often.
Hello everybody
I only use var on our legacy front-end code
how to send an Array using FormData()
@lix like, a symbol instead of string, int, that kind of stuff?
as is the fashion. (to only use it in old code, never in es6+)
13:12
Yeah
@AbhishekKumarPandey formData.append('foo[]', 'bar')
@Cerbrus The internet is a brilliant place
13:14
🚂 === integer
emojicode's documentation is rather... cryptic
I'll ask my 13 year old cousin, he's bound to know
thanx @BenFortune
> A boolean value can either be true or false. A true value is created using 👍 and a false value is created using 👎
🐋 🔡 🍇
🐖 🐷 ➡️ 🔡🍇

🍉
🍉
Great way to extend the string class
This is what did the ancient Egyptians in.
emoji.
13:19
We've gone full circle
🍇 🔪 until 👍 🍉
So the hieroglyphs we found are actually an ancient programming language?
no, just tweens papyrusing each other
I'm just messaging my social media friend that I found his way into learning programming
is it a virus written in emojicode?
here run this
computer dies
13:23
Check out the cookie monster game, the code looks nuts
@MaartenWachters your avatar looks pornographic at some small sizes.
At least he's honest...
Did you read that super long reddit thread with 80% of the people posting just complaining there homework questions got deleted?
Oh yea, that...
I feel like most of the people complaining on that thread don't actually try before coming straight here to post
13:26
!!s/complaining here//
@rlemon I feel like most of the people don't actually try before coming straight here to post (source)
:o
@rlemon why did you save that comment to the bot?
!!s/complaining//
@lix !!s/ here// (source)
you clearly haven't figured out what happened yet
foo
!!s/foo/bar/
@rlemon bar (source)
13:28
Ahh I get it now
Anyone know what's wrong with my webpack config? I just got project from my college and he runs it on mac, it works perfect but on my windows, I get something strange 3 of my files do not compile because of backslash instead of slash !D:\wamp64\www\lets-book-booking-system\resources\frontend/app\app.jsx
@Luggage It"s just a man eating a meatsub
Hi. please advise me:

I want to build a web based formula editor like MathType or MathMagic for windows?
Is there any idea?
Not even eating , just showing it off
@SKMohammadi Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
13:36
@SKMohammadi i remember coming across a js equivalent of latex
hold on
hey guys
How to shift 5 values from an array
@SKMohammadi jsMath i think it was called
hey guys
how to google
@derp is it visual formula editor?
13:37
@CaptainHere look up splice
No one webpack?
That can do what you seek.
@WorkingPig you may need to escape it
ie //
@Luggage Thank you sir. You are awesome
@derp it should not matter? I mean it works fine on mac
13:39
@WorkingPig use path.resolve
@BenFortune ow! Yea that's it thanks!
@SKMohammadi nah its just a js library to display math symbols
@derp i want to implement an library like this ...
Use mathjax
oh yeah i think mathjax superceded jsMath?
13:42
It's pretty good, it's the one math.SE uses
If I set window.location.href = 'xy', shouldn't that be seen in the address bar of the browser?
but yeah, you should be able to implement something like the that using this library
MathJax is only a latex or mathml processor. it not have formula editor like this : drive.google.com/open?id=0BzzyAfXAknZjUWNNSlJFSVhKcUU
can't see that due to permissions
@konyv12 your looking for html push states I think if you want to change the address bar without refreshing
@konyv12 yes, but it's a relative address, like ./xy
and yes, it'll refresh, like the user typed it and hit enter
it would be without refreshing, as it's after a user has logged in
@derp ok. so look at this: easytex.ir/blog/Untitled.png
@Luggage github.com/rlemon/swatchy-cli 😃 I'm bad at writing tools :P
but there is the one, if you feel like watching
grabs his code-judging monocle
*monocle ?
probably
I started using it not long ago, super simple to implement and use
cheers
13:48
@konyv12 🍻
The library 'history' provides a thin but helpful wrapper / light abstraction of the html5 history api.
i haven't used it but it looks cool
14:10
Anyone with a JS hammer around?
@rlemon Oooh, what's this?
a thing
it does stuff
trying to figure out how to turn it into a webpack plugin right now
Looks simple enough
At least it's not gulp
authoring webpack plugins doesn't look simple enough :P
at least, not given the docs I'm reading
confusing as fuck man
sometimes, naming variables/files accurately seems so difficult that I start to question my grasp of the English language
@corvid High key the hardest thing about programming
Anyone here worked on JSQMessagesViewController ?
@Nitesh Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
14:25
acting FBI director is testifying (started at ten) "Chat is disabled for this live stream." well that's no fucking fun :(
cc@KendallFrey
I saw that but I don't know what exactly he's testifying about
can someone please tell me how to solve this thing? nathansjslessons.appspot.com/lesson?id=1080&lang=en
counter += arguments.length
There you go solved it for you
user7480455
Good Evening All!
14:30
1 message moved to Trash can
@iLiveInAPineappleUnderTheSea Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
you don't read the info ...
Define a function named accumulator that takes one argument and returns a running total of all the arguments it has seen
anyone knows good guide for setting up angular build process only with webpack?
var accumulator = (function (x) {

    var myv = 0;
    return function(){
    	myv = myv + x;
        return myv;
    }

}(x));
that wording sucks.
I'd assume it wants a list of all the arguments it has seen.
user2620028
look at the other example
user2620028
14:31
seems they might actually want a count
yea, but the wording sucks.
it does want a running sum of the first argument.
had to reread again
They want a sum
14:31
it says it wants a list of arguments.
Just run it to see the tests
Put a switch-case in there and be done with it
TDD ftw
Spotify sucks so hard
@Meredith What makes you say that?
If your connection drops you gotta reload the page to get it to play music again
I only use the desktop application and the Android app. Those have enough problems as well :P
14:34
whats wrong with what i did. i get x is not defined
@iLiveInAPineappleUnderTheSea You didn't define x
The android app is fucking balls
I have a 128gb SD card in my phone, Spotify takes like 40 seconds to open
Gotta take this into my own hands
Just kidding I'm not moving to sweden
@BenFortune My usual gripe is getting some horrible suggestion on radio, so I tell to to never play that shit again, which is prompty confirmed with "Okay, we'll never play songs from <that artist you like> ever again"
The out-of-sync-with-everything issues with their applications are unworldly
I can see why there looking for a new machine learning guy as well
My suggestions on spotify literally never change genre
14:40
@Meredith my country is on the list (antwerp) aaaand ... no jobs for there. * why put that as option anyways ... *
I could listen to heavy metal and scremo for two months predominately but now it's learn't indie thats all I get
Their daily mixes are pretty good
@BenFortune Yeah, but all their mixes are shit if you dare to like an artist who picked a name that isn't unique
@Meredith there's a spotify in Boston, its location is super convenient
@KarelG I thought you lived in poland
14:42
@corvid lmao
it's too catholic
Yeah lol
Hey guys, can anyone help with this?gulp
[11:38:15] Using gulpfile ~/Sites/clients/**/gulpfile.js
[11:38:15] Starting 'default'...
[11:38:15] Starting 'phpcs'...
[11:38:15] Finished 'default' after 14 ms

events.js:141
throw er; // Unhandled 'error' event
^
Error: Execution of Code Sniffer Failed
show me some gulpfile.js
paste in another site if it's long, please.
that's subjective
14:45
true
@BenFortune actually can confirm I found a pretty good daily mix
It was working before, not anymore
It started with Chunk! no, Captain Chunk! can't go wrong there
before what?
Hate that guy's whiney voice
14:47
@Luggage Something unrelated to my changes. I reverted back to the first commit, gulp throws the same error.
really? I think it's really good melody wise. totally distinct in comparison to the screamo parts of the songs
You clearly haven't read the first SO topic that you have posted in your question. The voted answer there (that one with the big green check icon) clearly answers how to solve this problem. How did you miss that? — KarelG 12 secs ago
ok. if it's not a generic gulp mis-use, I probably can't help. I have no knowledge of angular, elixer, laravel.. (your specific stack)
@Luggage :...(
What about elixir
14:50
nathansjslessons.appspot.com/lesson?id=1080&lang=en .. if this is supposed to be a self invoking function how will they call it with a value when i submit? i dont understand.. can someone please help
@iLiveInAPineappleUnderTheSea the self-invoking function returns another function that you can later call
I think I 🍬 where I should have 🍦 lol
@Vap0r You monster
how will they first call it
14:54
That's an example from the site. Why would anyone do such a thing?
@iLiveInAPineappleUnderTheSea this is a common area of confusion, but i don't follow your specific confusion. Can you re-phrase?
var accumulator = (function (x) {

    var myv = 0;
    return function(){
    	myv = myv + x;
        return myv;
    }

}(x));
@iLiveInAPineappleUnderTheSea no
Use the parameters in the returned function
@KarelG ARE YOU FAT SHAMING US?
Also, that's why it's a percentage of weight lost, so skinny folk that need to shed pounds aren't flat out wrecked by us fatties who can drop 20lbs in 2 months
Guys my car won't be ready till next Thursday:(
14:57
@rlemon :(
@SterlingArcher I could probably win if I tried, since I'm like 18 stone
eh ... I'm only enthusiast about that amazon gift card
@rlemon they are still installing the zoom.
if i would participate, then it wouldn't be a fair competition. RIGHT ?
If I stopped drinking beer I'd lose like ten lbs in two weeks
14:58
@rlemon Obviously ran out of blinker fluid
my fat % was 14% when I did my medical check last March :|
it worked but the question said "Define a function named accumulator that takes one argument and returns a running total of all the arguments it has seen." @BenFortune
that's OK for me. I'm not going to become those fugly "chested" guys with barely fat

« first day (2399 days earlier)      last day (2774 days later) »