« first day (2322 days earlier)      last day (2640 days later) » 

12:05 AM
1 message moved to Trash can
@TravisHallet Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
hey I'm trying to learn about svg and adding lines with js not sure I'm doing it right. Heres my code
function drawLine (row1, num1, row2, num2){
  var newLine = "";
  var div1 = "#"+row1+"-"+num1;
  var div2 = "#"+row2+"-"+num2;
  var pos1 = $(div1).position();
  var pos2 = $(div2).position();
  newLine = "<line style = 'stroke:blue;stroke-width:2' y2='"+pos2.top+"' x2='"+pos2.left+"' y1='"+pos1.top+"' x1='"+pos1.left+"'/>";
  $("svg").append(newLine);
}

drawLine("one", 1, "two", 2);
 
i think android studio on windows is retarted. Trying to reinstall it and see what happens.
 
12:23 AM
@William why don't you use it in eclipse instead? I've seen they do it as eclipse plugin in udemy.
 
not a bad idea
 
12:35 AM
wtf
!!> const random = { x: 5 }; random . x;
 
@Meredith 5
 
I had no idea that was legal syntax
 
It's not surprising is it
 
just discovered that font-size 6px is still completely readable in my terminal
I'll be dead before 25, that's settled
 
I guess I'm not surprised
But I've never seen it before
 
12:42 AM
what if you did ;)
something
  .doStuff()
  .doOther()
  .doLast();
same thing
 
Oh
shit yeah I do that all the time
 
if you've ever worked with arrays/strings and tried to keep it cleanish, you probably did this
 
> White space characters are used to improve source text readability and to separate tokens (indivisible lexical units) from each other, but are otherwise insignificant.
 
test
 
12:44 AM
Hey
 
@neeh Welcome to the JavaScript chat! Please review the room 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.
 
hey brian
happy testing neeh
glad your test works
I'd give you a congratulatory cookie, but I ran out
 
If I pass prop value to child component..is there a specific lifecycle method I should access the value?
I know I can access it in render but I want to use the prop value to set some local state in the component
 
hi guys quick question
var c = $(this).find('link').text()
$("#AllNewsBBC").append('<li>' + b + '</li>');
how would i add a link using the append function
the link is stored in var x
c
 
12:50 AM
compWillReceiveProps and compDidMount seem to be what's needed
 
I think removing the .text() part will do it
Also change the variable name in your append
 
i just tried that
when i remove .text()
 
Don’t do HTML, folks
 
[object Object]
the link becomes
 
not even once
 
12:54 AM
Oh lol
 
var c = $(this).find('link');
$('#AllNewsBBC').append($('<li>').append(c));
no htmls allowed
 
Yeah
 
i need it as a link inside the li
 
well except for that one bit with the <li>, but don’t concatenate HTML
 
Append a li then append the link to that
 
12:54 AM
like <li><a href="">
oo ok
 
So $('<li>').append($('<a>').append(c)))
or $('<a>').append(c).wrap('<li>') might work
frickin’ jQuery is a mystery
Fun fact: did you know nobody knows how jQuery works? John Resig unearthed some stone tablets containing its inscrutable minified source
 
Or just don't use shitty libraries
 
if you think understanding documentation is hard now, try it in Linear B
 
@Ryan try also $('<li><a></a></li>')
 
I feel like that returns the <li> instead of the <a>
 
1:01 AM
That is true
 
$(this).find('link').wrap('<li></li>').appendTo('#list')
 
ha, I knew wrap('li') wouldn’t work
why make it easy
 
might need to wrap after the append.
I think wrap might return the a not the li
 
Yuck, it does
but then you have an invalid intermediate state. Best go with .wrap().parent() or just the original nested .append().
 
or create a variable in between
 
1:06 AM
9 mins ago, by ndugger
Or just don't use shitty libraries
 
Unrelated: stupid ES6 wasting time with proxies when we could have :: bind by now
Like. What do proxies do. Nothing.
And why not just copy Python’s import syntax. It looks nicer.
these garbage things are a permanent part of javascript now
 
@KendallFrey youtube.com/watch?v=OAgD1zQYo7M sadly I haven't put mine together yet
I should start it this weekend..
 
How much does one of those cost
 
@towc Persona =(
 
1:10 AM
you scrolled a long way up
just for me? :D
 
Just for you. =)
 
<3
let's have kids
firstborn is either Haskella or dead
 
I’m going to go now
 
you don't have a say in it
 
@towc What if it's a boy?
 
1:11 AM
dead
duh
 
sexist
 
Haskus
sounds like a dog
what do you suggest?
 
I wouldn’t mind being named Haskella
 
You know Haskell is a real man's name, right?
 
but really though what kind of name is haskell
 
1:12 AM
@Meredith A given name
 
@KendallFrey oh, good point
 
yeah but it sucks
 
well then, Haskella and Haskell it is
 
Like do you know anyone named haskell besides haskell curry
 
No, just Haskella
 
1:12 AM
Or Scala and Haskell
 
damnit I want to be called haskell
 
You already committed to it
 
I'm so changing my name to Haskell
 
apparently there's a cinematographer named haskell wexler
 
need to find an interesting surname though
 
1:13 AM
how about curry
 
Haskell Copot doesn't sound anywhere near as compelling as it could
 
Haskell Currypot
 
That would work
 
Haskell Monads
oh, interesting
I'd have thought that there would be many people names Monad/Monads
but nope
Mr Monad sounds like one of those typical semi-british family names
 
If you change your name to Monad you should name your children Return and Bind
 
1:15 AM
who the fuck would name their kid monad
 
@Meredith towc
 
"what does your name mean"
"uhh no one really knows"
 
I’m monoid because I can’t come up with any good Haskell-type puns. Those types have never been my strong suit, though.
 
> a way to build computer programs by joining simple components in robust ways.
 
XD
rofl
2.9 you kendall
 
1:16 AM
How about Quaternion
 
how about Whimsbury
 
Octonion is better
 
Quaternion Haskell Whimsbury
 
Onion is better
 
whats a mathematician's favorite appetizer
 
1:17 AM
your mom
 
octonion rings :)
& quaternions > octonions
octonions literally have no practical use
 
someone please star “I’m monoid” it’s the best thing I’ll achieve in life
thanks
 
I could really fuck everyone up and call myself Haskell Dotnet
with a french spelling
 
that would be ironic
 
I knew a Donnet family I think
yeah, donnet is pretty common
 
1:19 AM
i knew a donner family
 
Donnet is indeed pretty common in this language. Anyway, it’s run time for me, see you all o/
 
I could just shift it and be Haskell Matei
Matei is actually a fairly common surname in my country
 
also are octonions even rings
 
@Ryan ye bastard
 
<3
 
1:21 AM
!!tableflip
 
@towc That didn't make much sense. Use the !!/help command to learn more.
 
But they're not associative under multiplication
 
uuuh "Lambda" is apparently an accepted family name
although it would sound overly cooked
Haskell Lambda
Sir Lambda Haskell sounds better
lambda sounds more like a first name than a family one
 
that kid would get made fun of so much
 
1:23 AM
I'm thinking of changing my own name here
 
you would get made fun of even more
 
and I may enjoy every step of the way
ya know "this is who I am. Fuck you"
 
though if you want a greek letter for your first name
i suggest beta
 
heh
nah
that's a girls' letter
lambda is neutral
but I'm so fond of Haskell as a first name now
 
how about μμ haskell
 
1:26 AM
I might as well use emoji at this point
 
well they use greek letters for names in greece
 
@Meredith that's like the worst one you could pick
 
i dont know of any countries that use emjois
@KendallFrey Yeah i did it on purpose
 
well, there was that kid in sweden named like spam stuff
 
1:27 AM
The naming law in Sweden (Swedish: Namnlagen) is a Swedish law which requires approval of the government agency for names to be given to Swedish children. The parents must submit the proposed name of a child within three months of birth. The law was enacted in 1982, primarily to prevent non-noble families from giving their children the names of noble families. The Swedish Tax Agency administers the registration of names in Sweden. The law has been revised since originally enacted; in 1983, it was made possible for men to adopt their wife's or partner's name, as well as for women to adopt their...
the kid is 25 now 0.o
> a prohibition on one-letter naming
if I use unicode, that's 2 bytes, right?
 
I remember some kid in middle school's middle name was J
 
let's see how the law handles unicode :D
 
Or at least that's what he claimed
 
@towc possibly 4
Also, have you heard of Emojli?
 
by the brit who does the interesting videos?
tom scott I think?
 
1:32 AM
What about the name ..,.,,..,..,,,.,.,
Where . is a quiet clicking sound and , is a loud one
 
oh, that's a thing actually
some tribes in africa do that, so the govs around need to keep track of that
want me to find a source?
 
Yeah one sec
 
@towc .,..,.,.,.,....,.,,,.,.,. ,..,,,.,.,.,., ...,.,.,.,., ,.,.,.
 
!!! is a dance-punk band that formed in Sacramento, California, in 1996 by lead singer Nic Offer. Its name is most commonly pronounced "Chk Chk Chk" (/tʃk.tʃk.tʃk/). Members of !!! came from other local bands such as The Yah Mos, Black Liquorice and Popesmashers. They are currently based in New York City, Sacramento, and Portland, Oregon. The band's sixth full-length album, As If, was released in October 2015. == Background and history == !!! is an American band formed in the summer of 1995 by the merger of part of the group Black Liquorice and Popesmashers. After a successful joint tour, the two...
great movie btw
 
@littlepootis looks right
 
1:44 AM
A pope vs trump feud is everything
 
> We define abstraction as selective ignorance
wow
I guess that's what it is
 
@Meredith do you do android development
 
No
 
Darn
 
What's up?
 
1:47 AM
Just trying to figure out the apis
 
ask nicely
 
@SterlingArcher arguing with the pope on twitter: img.buzzfeed.com/buzzfeed-static/static/2017-02/22/11/asset/…
 
2:29 AM
me: graphic design is my passion professor: we won't use paint in this course me: https://t.co/v8TRH8x27d
 
2:44 AM
 
2:56 AM
!!> undefined && false
 
@Mosho "undefined"
 
this surprised me just now
and I thought JS couldn't surprise me anymore
 
What's surprising about that?
 
You weren't aware of truthy/falsey values? wat
How did you not know?
 
of course I knew, but I casually expected the logical and expression to return false in that case
it makes sense after I think about how it works in JS
 
3:04 AM
My assumption is that undefined && anything is undefined
 
but my natural reaction was surprise
 
Don't worry I was surprised that obj . key is valid
Even though no shit it's valid
 
if I was worried I wouldn't share :P
 
&&, || always return one of the operands
 
I think it turns out I almost never use && with something that isn't a boolean
as in <boolean> && <boolean> && <something else>
almost never happens so I never had to consider it
it would just as much sense for conversion to happen by using the operator
as an implementation
 
3:12 AM
@Mosho you haven't used that with react? like <bool> && <component>
or <bool> && {mything}
 
yeah that's what I mean I do 99% of the time
 
Is that an acceptable pattern?
 
ahh alright
 
{ someFlag && (
    <MyComponent/>
) }
 
was going to say man you're missing out :p
 
3:12 AM
Cuz I've done that before but felt dirty cuz it's kinda hacky
 
yeah it's the standard practice pretty much
 
^
 
Sweet
 
but even if the first was just falsey and not boolean
it would still be alright
I only noticed it now because I wrote a test and said expect(...).to.be.false
 
3:40 AM
this is something else
"there are more transcendental numbers than irrational numbers"
Also I like that he defines as irrational numbers as numbers that can't be written as fractions
Watch this
pi/2
 
4:27 AM
AMD Ryzen is out, AMD says it is better than expected, and is available for pre-order.
Except the pre-order is unavailable in my location :<
 
what motherboard sockets support amd ryzen?
 
AM4.
 
will check it out later.
 
Asus is the only motherboard maker who have listed spec and open mb pre-order for the moment.
 
 
1 hour later…
5:51 AM
Hello guys.
Can anyone help me out with this?
http://stackoverflow.com/questions/42396959/downloaded-document-getting-corrupted-using-blob-method-in-angularjs
 
Hello
var Arr1 = [{"value":"1286"},{"text":"Baghbor"},{"value":"1289"},{"text":"Bajali"},{"value"‌​:"1284"},{"text":"Barnagar"},{"value":"1287"},{"text":"Barpeta"},{"value":"1291"}‌​,{"text":"Jalah"},{"value":"1285"},{"text":"Kalgachia"},{"value":"1288"},{"text":‌​"Sarthebari"},{"value":"1290"},{"text":"Sarupeta"}]; I have array like this. now I want to get all values of attribute text from the above json
"text"
 
6:24 AM
!!> let a = [{"value":"1286"},{"text":"Baghbor"},{"value":"1289"},{"text":"Bajali"},{"value"‌​:"1284"},{"text":"Barnagar"}]; let b = a.filter( o => Object.prototype.hasOwnProperty.call(o, 'text')).map(o => o['text'])); b;
 
@KarelG "SyntaxError: missing ; before statement"
 
!!live
 
@KarelG You do not have permission to use the command live
 
!!> let a = [{"value":"1286"},{"text":"Baghbor"},{"value":"1289"},{"text":"Bajali"},{"value"‌​‌​:"1284"},{"text":"Barnagar"}]; let b = a.filter( o => Object.prototype.hasOwnProperty.call(o, 'text')).map(o => o['text']); b;
 
@KarelG "SyntaxError: missing ; before statement"
@KarelG ["Baghbor","Bajali","Barnagar"]
 
6:26 AM
@PavanAlapati good morning and check above snippet ----^
 
6:47 AM
Hello All
 
@KarelG thank you
 
@KarelG what is 'o=>' ?
 
the arrow function ... => ... is a anonymous function
 
6:55 AM
it's from ES2015
you can read (<args>) => {<doSomething>} as function(<args>) { <do Something> }
but since there is only one argument, you may leave out the bracket
same for the body ( doSomething ). If it has multiple statements, you have to use {}
 
ok
@KarelG thank you. today I learnt new concept from you
 
Anyone tried using Mithril.js before?
 
@PavanAlapati Not sure if you have to write a js scripts for all browsers, but ensure that those browser requirements supports it. Eg IE doesn't support it
 
I just started using it and I am having some weird issues. I have this string variable. I then changed its value to another random string like from "foo" to "bar". But it still shows me Foo.

I tried clearing the cache and everything, but it still returns the old string that doesn't exist anymore on any of my files.

I am following this tutorial by mithril
http://mithril.js.org/installation.html
 
@KarelG ok
 
7:04 AM
And this is where I get stuck
 
yes not supporting in IE
 
1 message moved to Trash can
@Carnal Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
// mycomponent.js
module.exports = {
    view: function() {return "hello from a module"}
}
This is where I am having problems, I changed the return value to "something else" but it does not change when I view it on the browser.
 
( see caniuse.com/#feat=arrow-functions ) To overcome that, you have to babel
 
Ohh.
Does this mean ES6 isn't supported yet?
 
mpm
7:09 AM
Hi folks, which NPM package has the best fetch implementation for nodejs ?
 
umh it does. But to have full ES6 support, most of us uses babel
 
mpm
fetch sorry
 
(yet babel doesn't cover all ES6 :P )
 
Hey guys trying to console.log my redux store but for some reason it keeps telling me the state is null, I've moved the reducer into the component just to see if I can get the state to show gist.github.com/LiamDotPro/073566376e2cfa6e93224c1b064d9f7c
 
Sorry, I'm currently scouring through the woods here atm.
 
7:11 AM
@mpm node-fetch is pretty much the only one
 
@RakeshNallam Welcome to the JavaScript chat! Please review the room 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.
 
So I have to download babel
ohh
Okay. Let me try that
Arigatou
 
mpm
@Mosho thx let me check that out, if anybody has other suggestions ?
 
> it's pretty much the only one
 
7:13 AM
I have WebPack,
Does this mean I still have to use babel
 
I am using ng-repeat in a JSON response ... I need to exclude some properties like lstUpdtTS and vendors I'd while doing searching search as I am not displaying them in UI... Any inputs would be appreciated
 
@lix read the documentation again, that is not how to use connect
 
I just noticed I've also added the store as a provider and it's running the middleware in between so I'm definitely missing something @Mosho
 
yeah, you're missing a lot of things
connect does not accept a reducer, and does not return a store
 
oh right, I've been following this egghead.io/lessons/…
I downloaded a redux minimal application to get started
but I don't really understand how it all works, guess I just need to keep reading and trying stuff
 
7:17 AM
randomly copying and pasting things and expecting it to work is the worst practice there is
I haven't watched the lesson but I highly doubt you got it from there
 
Oh not the minimal setup no, I've just read that it's pretty tricky to get this stuff setup when you begin and it can be easyier to use something with it all ready there
I'm starting to learn that's not really the case
 
guys if i have a multiple dynamic dropdowns displaying the same datas, is it possible to put validation that won't let the user to submit/insert if there are chosen datas that are the same from the dropdowns?
 
yeah, you would have to either validate the form, or limit the options available after picking a value in each dropdown
JS is more than capable of doing that
 
7:32 AM
appears a bad UI "multiple dropdowns with same datas"
 
its a survey system and those dropdowns displays the question
and im trying to create a survey atm
 
Anyone fancy a game of chess?
 
would the validation be with the submit button?
 
I used to play chess online using my desktop while playing against a master AI on my phone. I copy my opponents move on desktop and use it against the master AI on my phone. Then I copy the master AI's move against my opponent on desktop.

And that's how I won so much games back then. lol.
 
@ranger you can validate the form before it's sent by listening to the submit event. Just return false if there are validation errors. Or make a button, listen to click, validate and if OK, submit form
 
8:34 AM
o/
 
\o
 
how are you all doing?
 
good good
* nips from coffee* had a long work day yesterday
 
I'm tired :(
 
8:38 AM
* protects my cup of coffee *
 
But it's payday \o/
 
don't you get paid at the start of month ?
easier to manage if you ask me
 
I'm not in control :P
Last thursday of every month
Don't ask
 
I was just shakin' head man
 
haha
 
9:03 AM
I don't understand this syntax: const { cos, sin } = Math; . What is this called?
 
@Charly Destructuring
 
^--
 
ES6 thing?
 
yes
 
Ok thanks
 
9:06 AM
shortcut for Math.sin or Math.cos
 
The support is pretty bad...
 
babel
some js devs are even implementing ES7 stuff D:
albeit it has something useful
exponential operator ** which turns x ** y into Math.pow(x, y)
 
The MDN should have a column "Node" in its JavaScript page's compatibility tables. I don't want to have to use a different documentation for when the code I'm typing will be used on the server instead of the browser. Sometimes the code I write is for browsers AND servers...
 
keh, good point
but i just fire up node CLI and try it
 
9:24 AM
i have did set up webpack with bable for writing code in es6 i came from php background , i have a html form with few fields any one know how can i write validation class in es6 for the same ????
 
@BenFortune oh, handy. thanks
 
i don't want to use react just plain html form with es6 validation calsses . any idea how can i start .. i search for the same on net but did not get any proper artical which i can implement .
 
es6 is a new tech ...
search for "HTML5 form validation" or "js form validation" (Actually I advise to use both)
enough articles around those subjects
 
@Charly Supported by Chrome, Edge, Firefox, Safari. Opera, Node. That's bad support?
 
@KarelG am trying this because i just want to learn write some code in es6 , so i though of doing form validation . in past i have done validation with both (html validation & js validation )
 
9:33 AM
things shouldn't be new. just integrate the new ES5/6 syntax
 
okey will give a try , txs
 
@AbhiAdr just check this es6-features.org/#Constants
 

« first day (2322 days earlier)      last day (2640 days later) »