« first day (2110 days earlier)      last day (2824 days later) » 

12:11 AM
brackets means an argument for the parameter is optional; still, says nothing about the types from the signature (though it's obvious here host should be a string and options is an object)
best look up the docs when in doubt; this seems to be related to the client itself, for the rest you can probably resolve from the official docs (because the client sources programmatically builds the list of valid commands, so it's pretty terse and hard to follow)
 
12:46 AM
@rlemon oold :P
but keep feeding me this stuff, I don't want to miss anything cool
 
@rlemon proof that the earth is flat
 
1:34 AM
anyone here an expert in TypeScript
 
@aditya 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.
 
sure
I was trying my hands on TypeScript. I don't know how to proceed with setting up the TypeScript repo code from github on my machine.
I was trying to solve an issue github.com/Microsoft/TypeScript/issues/3676. But I have no idea how to modify the code. I am not new to open source though. First time to language development - yes
 
1:54 AM
Hey everyone
Help would be extremely appreciated on this: stackoverflow.com/questions/38579853/…
 
@aditya So in Typescript, there are auto-formatting programs right? Like gofmt? Which one are you using? Do all of them exhibit this behaviour?
Might be worth looking into the source code for gofmt to see how/where it decides to override indentation, and then add an exception for ternary expressions like that so it retains the user's style choice.
Alternatively you could be really tricky and determine if they either a) Do not indent or b) Indent in some way, and if it's the latter case then re-indent to double-spaced indentation like the rest of the code to clean up messy indentation.
Which IDE are you using that's doing the indentation for Typescript?
VS Code?
Looks like this is close to where you want to be looking github.com/Microsoft/TypeScript/blob/…
 
2:23 AM
I guess @aditya didn't want help after all.
 
@SterlingArcher Impossible for that much tan the solar radiation will kill him with different variaties of cancer
 
@Abhishrek SterlingArcher is afk: home, gym, dinner, pokewalk
 
I need some help with angularjs directive and link functions
anyone think they could help?
 
I need some help with restoring sanity on this planet
anyone think they can contribute?
 
Yes
we eliminate the insane.
 
2:29 AM
@user125535 well then lets start by setting one rule
nobody will ask to ask a question
they will simply ask what they want to ask
 
I did a good :)
 
2:46 AM
What did you do
& it was your birthday?
Happy birthday bro
 
Lol thanks!
So I just went on a walk, trying to hatch eggs, and this big boy was walking too. We talked a bit, and I could kinda tell he was struggling. Walked at his pace, all he did was talk about Pokemon, but the guy was so excited to have somebody to talk to
 
@SterlingArcher happy birthday bro!
 
He told me Pokemon is helping him lose weight but it's hard, and having somebody to talk to on a walk helped him walk twice as far
 
It was your birdthday? Happy Birthday, brow!
 
I didn't walk as far as I wanted too but it was nice to know that just talking to the guy and walking with him meant a lot to him so I'm happy to do it :)
Thanks guys! :)
 
2:54 AM
** Brew!
@SterlingArcher try running with me ?
in Sept :D
 
@SterlingArcher that's nice!
@Abhishrek In India? :P
 
@littlepootis I'll be in states in sept
 
Ah, my parents are forcing me to go visit a conf or something.
 
I will never run in DC lol I've been harassed by too many crackheads
 
I'll probably be going to JSFoo 2017.
 
2:58 AM
@littlepootis thats a good set of parents you have
@SterlingArcher :-|
that is concerning
@SterlingArcher how long should it take to rent a place in DC
starting from scratch?
in weeks :D
 
Honestly I have no idea. It took us about 2 months to find a place but that's because we couldn't agree on a place. Prolly coulda had it in a few days
 
We are just trying to find a studio / 1 bedroom
near Annandale campus
same with the car
 
3:19 AM
Why is everyone wearing shorts? I hate shorts.
 
3:32 AM
@littlepootis you wont once you grow up a lil
 
3:42 AM
@littlepootis man you alive?
 
@user5600875 yep
I think so
 
@littlepootis i just watched that image.. thier shorts is so short.. my god
 
@Abhishrek i literally grew up a lil
 
in years of experience
 
3:59 AM
Why is my CV on hold? I've added education and work experience.
 
@littlepootis They're comfy and easy to wear
 
4:31 AM
Hi...whta's problem with my code here ...jsfiddle.net/w0orwyas/1
 
"PHY 101"
 
I get lang parameters and try to get cities en properties...cities is our object cities.en
cities.en is an array
 
@Nimphious. Hey thanks for the help man. I really appreciate it. It was dinner time here so I couldn't see your response.
I am using VS code to run my TypeScript programs. And the behavior with the indentation is observed while using ternary operators.
I will look at the code for gofmt as suggested. The link that you provided has been of help as well.
 
5:02 AM
any help?
 
@littlepootis I studied all that when I was like 12 (the amount of material the college will teach)
 
@Abhishrek why?
 
@Mostafa try cities[lang] instead of cities.lang
@Mostafa try cities[lang] instead of cities.lang
@Mostafa if lang is 'en', cities.en will do exactly the same as cities[lang]. cities.lang is undefined, because lang is not a property of cities.
@Mostafa you can google dynamic properties in javascript
 
5:57 AM
@hansottowirtz Thanks.
 
6:09 AM
Hello Everyone,
 
morning o/
nice tag, but looks like it needs some coffee :P
 
lol right but headache from angular and typeahead...
 
gosh, didn't manage to reset the typeahead state yet :(?
 
able to reset it can't use it again i have to type something it does not show directly hint on clink of on focus :-(())
 
hmm, you using something from Angular or? got any official docs, maybe I can spot something
 
6:24 AM
ui.bootstrap
<input type="text" ng-disabled="categoryAttributeOption.id" id="attributeProductOption" ng-model="categoryAttributeOption.attribute_option" placeholder="Select Type"
typeahead="attribute_option.id as attribute_option.text for attribute_option in getDropDown($viewValue, 'attribute_option', '', {'attributeId': attributeId })"
typeahead-on-select="changeAttributeDropdown($item, attributeId, attribute_metadata_type)"
typeahead-template-url="template/typeahead/typeahead-custome.html"
class="form-control typeahead" typeahead-input-formatter="formatModel($model,$label)" typeahead-on-down-arrow typ
 
Gitbub is up for me now (And gist.github.com too \o/).
I noticed I had unread notifications.
 
argh, you really need someone with Angular chops... think you can ask on SO for help?
 
there are many issues in github but does not get any solution
thinking about raising my issue
 
@FilipDupanović that Github issue.. wtf? You were kicked?
 
nvm that here, it's on GH
 
6:33 AM
<? what ?
 
*<?= "what" ?>
 
/* what */
 
it was an unrelated <!-- comment -->
 
You can kick people on github?
 
@cswl I kicked Bill O'Reilly on github. It was very satisfying. ( ͡° ͜ʖ ͡°)
 
@Neil too bad, he lives in a bubble and he wouldn't even have felt it
 
^ how I played frisbee the other day
 
@FilipDupanović It is harder than it looks
Always tends to fall to one side
 
6:44 AM
and ill winds whenever I was throwing >.>
 
Read that url as "The Cod In Glove" for some reason.
 
h aha h aha ha ha
 
@Nimphious still a better site name than www.expertsexchange.com
 
buwwwahaahaha
 
Yeah that'll do it.
 
6:49 AM
never realized how hard it is without logos xD
 
7:00 AM
If urls were case sensitive, situations like that could be avoided and the world would be a slightly more boring place
 
Or if it's that important, just use hyphens or something.
 
greetings!
 
You can just type your URLs as if they were case sensitive.
 
Yeah? Well your face can type URLs.
 
Let's not talk about faces. Faces drove me off twice already.
 
7:10 AM
A sound plan.
 
Facist
 
7:42 AM
Guys! I'm a bit confused. I've heard, that rounding in JS buggy, but how come Number('1234.235').toFixed(2) -> '1234.23' and not '1234.24'?
 
It has to do with floating point precision.
If you want a 100% precise rounding function with an input string expecting an output string, you should use a string-based rounding method instead of a floating point one.
 
@Eugene That's not buggy. That's pretty well defined.
 
?
 
Do you know why
!!> 0.1 + 0.2
 
@littlepootis 0.30000000000000004
 
7:46 AM
?
 
@Eugene rounding and removing digits are separate concepts
 
@Nimphious shouldn't it be ok up to a certain precision?
 
Depends on the floating point implementation and the ALU.
 
@FilipDupanović not if you're right at the border between two behaviors and expect to drop off to your preferred side.
 
@Neil does to fixed just remove digits? How is rounding done then? Math...?
 
7:48 AM
@Nimphious no, it doesn't.
 
No?
 
@Neil MDN says, that The number is rounded if necessary Like for example 2.35.toFixed(1); // Returns '2.4'
 
In my experience different CPU architectures often produce different funky results at the edges of precision for floats.
 
The floating point behavior is well defined. Some compilers don't really care too much, but there's only so much a compiler can ignore.
 
7:49 AM
Especially oldschool ARM stuff was all whacky.
 
Though in your defense, 95% of the time that I want to shave off digits, I want to round if necessary
 
@Nimphious Not if they are FP-strict. A CPU should be, or at least by default.
 
Should being the operative word.
Loads are not.
 
linky?
 
x86 for the most part will though.
 
7:50 AM
@Eugene I could be wrong about that. I don't have the docs in front of me
 
At least I don't know of any x86 chip that isn't consistent.
 
well, blessed be the IEEE 754 standard, otherwise most of us would be out of work :P
 
@Neil I usually used it, because it should round the number and convert to string, but the example I provided first time, works in a very weired way.
 
Is a duplicate ID OK if it's an empty string?
 
All hail determinism.
 
7:51 AM
2.235 is one of those numbers
!!> 2.235 + 0.001
 
@littlepootis 2.2359999999999998
 
Neumann never believed in floating point types. He thought we should have an integer representing the number and a second indicating where the decimal point of that number is
 
Not 2.234 or 2.236 or 2.335.
I don't know how this works.
 
Yeah, if you want a 100% consistent result you should do it string-based instead.
If it's not that important though then who cares.
 
Or use a library that allows you to do Decimal math.
 
7:55 AM
That too.
 
think it's some blasted curve
 
But why .235?
 
Because bits, man. Blame the bits.
 
@Eugene How did you find that out?
 
Accumulating floating point errors may result in values that are not are accurate as possible. Sometimes they are just a bit off.
 
7:58 AM
Hence difference between floating point and decimal
 
@Neil well, this is exactly how floating point numbers work, just in binary.
 
@littlepootis what?
 
Don't use floating point if accuracy is relevant
 
even in decimal you can have rounding errors
!!> (1/5) * 5
 
@JanDvorak 1
 
7:59 AM
Damn, crashed by browser trying to find all the "inconsistent" floating point numbers.
 
@Neil impossible for prices and such
 
!!>var i; for(i=1; (1/i) * i === 1; i++); i
 
@JanDvorak 1
 
@Eugene Don't use floating point numbers for prices. Use integers.
 
In Java, irrational numbers resulting from a division operation of a BigDecimal will throw an exception (unless rounding mode is indicated)
 
8:00 AM
!!> (1/49) * 49
 
@Nimphious 0.9999999999999999
 
Store them in cents, not dollars.
 
@JanDvorak 49
 
I kind of miss that in javascript
 
@littlepootis that's US-centric
 
8:01 AM
@JanDvorak then tenths of cents
 
@JanDvorak I mean, whatever floats your Reserve Bank.
 
Or whatever you want to call it. You should never have to deal with cents to 8+ significant digits
 
rule of thumb... if it can't be expressed in Satoshis, find someone else to code it :P
 
Satoshis are a fine way to express them. If only their value didn't fluctuate like my interest in JavaScript.
 
sadly, nothing we can do about it anymore... people are investing kaaaaching and expecting kaaaaching in return and our beloved Satoshis have to suffer for it :(
 
8:10 AM
@littlepootis not an option
And this is big limitation for a programming language.
 
Lycanthrobug - a bug only appears in a certain environment, particularly one that is hard to replicate.
 
cents are indivisible, so if you can use cents, that would be awesome
 
@Eugene You SHOULD NOT use floating point numbers for representing currency. I don't care if it's an option for you or not.
 
Yeah, what kind of numeric keypad do you mean?
 
8:12 AM
@littlepootis lol. In every store you can see prices on shelfs like 3.55, 0.99, etc.
 
> <form ng-submit="submitForm()">
@Eugene You can add that period later..
 
I have javascript code that interfaces with the glass panel sitting over my numpad, but there's no telling if it can be fit with your keyboard.
 
Don't tell me you've never been told not use fp for currency.
 
Nope.
BigDecimal in Java, float in PHP iirc
 
Sounds like a great advice for javascript code ;-)
 
8:14 AM
BigDecimal in Java doesn't sound like something that would do FP arithmetic.
Float in PHP probably does.
 
<form ng-submit="submitForm()"> ddio not work for me!
 
JavaScript's Number does it too.
 
on device
 
@littlepootis it does
 
BigDecimal is a format to represent arbitrary precision decimal numbers.
 
8:16 AM
@Eugene you can do without FP arithmetic, up to the point when displaying values to the customer... unless someone is moving a lot of kaaaaching (finances)
 
@littlepootis can you provide some examples of solution you are proposing. Say, person inserted into form field 1234.235 and when he leaves field (aka blur) the value should be rounded for example to two decimal places. Expected result 1234.24
 
@Eugene You'd use something like this if you care about precision. mikemcl.github.io/decimal.js
If you're dealing with currency, express them as integers.
new Decimal(2.235).toFixed(2) // 2.24
 
!!> US_DEBT = 18152809942589; (Number.MAX_SAFE_INTEGER / 100).toFixed(2) > US_DEBT
 
@FilipDupanović true
 
so unless someone is moving shitloads of money, you don't have to deal with FP
use cents, they're indivisible
ok, that's probably broken in bazillions of ways
 
8:22 AM
What about Zimbabwean Dollars :P
 
I could probably safely work with Zimbabwean dollars... you mess up everything and a carton of Coca-Cola can cover everyone's losses
 
hahahaha
 
just make sure to have the goods first for coverage
 
You can't work with Zimbabwean dollars. I've bought them all.
 
whoa! you must have had a lot of walls to cover
 
8:33 AM
All in all it's just another brick in the wall
Why don't radio stations play pink floyd? Are the songs considered to be too long or something?
 
I think the current generation of audiophiles are unfamiliar with them
 
@littlepootis okay. Will try, that out. We in the project use mikemcl.github.io/big.js. I wonder will it suffice.
 
there are other libraries to choose from
 
@Eugene It lacks stuff like basic arithmetic operations.
 
Probably also not as precision focused as the decimal lib.
 
8:40 AM
@FilipDupanović pink floyd was like the quintessential programming music too, at least for me
 
Okay. Thanks. Will play with it and see what comes of it.
 
@Nimphious yup, you're right about that
 
Then, I was heavily influenced by my older brother
 
@Neil constant brick in the wall? :D
 
Flink Ployd reminds me of driving and manual labor because of when and where my dad listened to it when I was a kid.
 
8:42 AM
I wish my house was built out of immutable walls.
 
Classical guitar and solo piano is my coding music usually.
 
I made a lot of money selling those Zimbabwean dollars $1000 a ton.
 
lol? Immutable walls?
 
Wait, your music codes for you?
 
@JanDvorak you probably don't really wish that. Your house would move without being elastic to the ground I think.
 
8:43 AM
@Nimphious a fine choice indeed, Sir!
 
@JanDvorak it only helps
 
All in all it's just an immutable brick wall
 
I mean, immutable in my local continental plate reference frame, of course
 
Hi all
 
For some reason, I heard the John Cena theme song when I read your name @XtremeCoder.
 
8:44 AM
lately, I've been listening a lot to scores from Ghibli's movies soundcloud.com/lostchick/sets/studio-ghibli
 
The Ghibli soundtracks are phenomenal.
 
I only listen to free as in freedom music.
 
Although at least some of that is probably nostalgia bias, but meh.
 
^ yeah, sort of rekindles all that goodness from the first views
 
HUUUUURGH.
 
8:46 AM
1 message moved to Trash can
@XtremeCoder 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
 
Good bot.
 
@Nimphious thank you, kind nymph
 
brings out the tears, but they're tears of joy, joy I say :')!!!! soundcloud.com/ritsuchan/…
 
...
Are you serious?
 
1 message moved to Trash can
@XtremeCoder 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
 
8:47 AM
@XtremeCoder do you learn?
 
@XtremeCoder please post it to hastebin or something dude.
 
though, as the years go on, I'm super pissed at MTV
had to discover lots of great stuff that never hit mainstream years later
 
Did you really trust MTV's music taste?
 
@XtremeCoder ask your question first don't put all code
 
8:50 AM
XtremeCoder, is that like extreme ironing where you hang by a rope over a precipice with your computer and you code in perl?
 
MTV was all I had before Napster and bootleg CDs
 
@Neil Sounds hardcore.
 
Youtube ;-)
 
Man it's so refreshing to be able to use youtube without ads.
 
I'm not saying I didn't enjoy most of the music played there, but, say, I discovered Pixies when Fight Club came out
 
8:52 AM
@Nimphious oh, I know. The scariest thing about that is that you'd be coding in perl
 
Getting YT red for free with a google play music subscription is a pretty sweet deal.
 
all hail subscriptions \o/
 
Hey guys need some help for this stackoverflow.com/questions/38582401/… . Thanks in advance
 
!!nudge 15
 
@MadaraUchiha Nudge #1 registered.
 
8:56 AM
!!nudge 8
 
@SagarNaliyapara Nudge #2 registered.
 
!!fudge 14
 
@Nimphious That didn't make much sense. Maybe you meant: nudge, fuddu
 
fuddu lol
 
Now I'm curious
 
8:57 AM
Aren't we all.
 
!!fuddu
 
!!fuddu
 
@Neil You are a lame person
@FilipDupanović You are a lame person
 
lmao
 
I deserved that
 
8:58 AM
h aha h ha hah ha
 
I assume it's because you didn't get the arguments correct or you don't have privelages for it or something.
 
lame @Neil @FilipDupanović
 
!!help fuddu
 
@Nimphious fuddu: User-taught command: You are a lame person
 
"oooooo, what does this button do?"
 
8:58 AM
Or maybe it's literally just that.
 
I am in middle school all over again
 
it's ok @Neil, you have a degree
 
I will do what worked for me in middle school. Self-pity, activate!
 
there's no Latin class anymore
 
Sub rosa and degustibus, the only two things I remember
 
9:02 AM
@Nimphious the minister for magic?
 
you said fudge
Cornelius Fudge
nvm
 
Oh.
 
!!afk 2nd breakfast
 
De gustibus non est disputandum
 
9:03 AM
I found the computational vocabulary a few years ago obta.uw.edu.pl/~draco/docs/voccomp.html
 
@SagarNaliyapara nudge
 
Thanks @CapricaSix
 
interrumpere! MALLEUM TEMPUS
 
interrumpere?
I think not.
 
That is almost Italian
Not sure if it is latin though
 
9:06 AM
caeusm! MALLEUM TEMPUS *
 
dunno, doing my best with Google
 
caesum?
 
that's how you do languages, though you may end up with a D
sounds like "cease!"
 
morning guys.
 
9:08 AM
o/
 
does anyone know whats the benefits of Object.create
or is it just sugar.
 
@MadaraUchiha nudge
 
@Ming I do.
 
@JanDvorak is the only benefits to allow stuff like writable: false parameters?
 
9:10 AM
no.
 
mostly used to setup the prototype chain (simplest, most common case)
 
like this?
let President = function(name) {
	this.name = name;
}

var p1 = Object.create(President.prototype, {name: {value: "Donald TRUMP", writable: false}});
console.log(p1);
console.log(p1.name);

var p2 = new President('Hillary Clinton');
console.log(p2);
 
Object.create(null) is sometimes useful, though frankly I don't really give as much damn as I should.
 
why does p1 output {} but p2 output { name: 'Hillary Clinton' }
 
@JanDvorak that's equivalent to just {}, or?
 
9:13 AM
@FilipDupanović no.
!!>Object.create(null).hasOwnProperty("hasOwnProperty")
 
@JanDvorak "TypeError: Object.create(...).hasOwnProperty is not a function"
 
oh, it would copy all the prototype props
 
whats the benefits through. of using Object.create
 
hmm, have to read up again... I mostly used it to avoid calling the constructor and to override behavior for tests
 
When you're already using let and therefore tied to a version of javascript that supports classes? None lol
 
9:16 AM
Object and Reflect so meta
 
-1
A: How do you require variables without a prefix

ZazSeeing as nobody has yet offered a solution that doesn't involve specifying each function you want to import, here's a solution that is perhaps not ideal, but works: const helpers = require("./lib") for (let k in helpers) { eval(`var ${k} = helpers.${k}`) }

Fucking hell
 
> > fucking, hell
> Wolfram|Alpha doesn't understand your query
> Showing instead result for query: ur job
 
Goddamn flabber nuggets.
Who does this.
 
import java.*
 
9:32 AM
Flipps a bunch of tables.
I finished 32 minutes ago, screw this I'm going home.
 
10:11 AM
Hello!
I am developing a system with a server+mySql and a angularjs client side.

Atm im making a realtime rickshaw grap page, and i was wondering about which of these following methods are best.

Call a get method from the Page to the server to get the latest data
Or
Make a listener so the server "push" the latest data to the webpage?

Thanks!
 
@SpaceChimps 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.
 
The server is written in Java and Spring.
 
10:26 AM
@SpaceChimps Push should be preferred over polling
Although, depending on the tools you use, the push may internally actually be implemented with polling. And if the push is implemented with persistent connections, that can be a new problem altogether
So there isn't really a "best" approach
 
Roger.
Thanks for sharing your opinion (Y)
 
Hi all
I am trying to ceil a number to 30 or 60 (related to time, minutes)
How can I do it efficiently?
 

« first day (2110 days earlier)      last day (2824 days later) »