« first day (1718 days earlier)      last day (3224 days later) » 

1:00 PM
But maggi is just 5 INR. RIP Maggi
 
The link to promises is broken, could I please get another link or a decent blog/intro to it
 
@AwalGarg Hm. Oh well. I guess that's a 3yo for ya :-P
 
How come my function always returns true? jsfiddle.net/bwprh60g/1
 
Because validationUtils.notEmpty is a different function? :|
 
1:10 PM
validationUtils doesn't exist, from what you have there
 
Yes, I'm sorry
 
now it works, so what's your problem
 
if (textValue === "" || textValue === null) {
			return false;
		}
 
!notEmpty("") will return true, because that's the way the function's defined
 
so if you call with "", I don't see why it shouldn't return false
 
1:10 PM
not not empty. very confusing to read. you're probably using it wrong? :)
 
yeah, just have an isEmpty function
 
Honestly, all I would have that function return is Boolean(string)
 
if (...) return boolean else return !boolean is stupid.
just return (...)
 
And ' ' is still empty so you should catch that :P
 
@RoelvanUden space?
(hard to read in chat)
 
1:12 PM
Yeah.
 
then it's not empty :P
 
var isEmpty = function(textValue) {
  return !textValue || /^\s*$/.test(textValue);
}
console.log(isEmpty(''));
console.log(isEmpty(null));
console.log(isEmpty('  '));
Well, true, but that depends entirely on how you want to deal with spaces :P
 
@RoelvanUden return !textValue.trim()
 
I don't want to make a new string for the sake of testing it :P
 
@FlorianMargaine null.trim() oops
 
1:14 PM
@FlorianMargaine How does return textValue === '' || textValue === null; run the body when invoked? I mean the body of the invoking if statement
 
It returns a boolean to the caller. When the expression in an if statement results in a true boolean, that block executes.
:o
 
:o
 
:o
 
:o
 
1:20 PM
:o
 
:o
 
:o
 
1:25 PM
:o
@jAndy DUDE!
 
SUuuuuuuuuP
 
yo, stop abusing flags you mouth breathers
 
motherfuckers broke the chain...
 
I was the one who flagged
 
1:27 PM
leave
 
@uselesschien That's useless(chien)
 
But he broke the chain
:/
 
H8ers gotta h8
 
oh boy.. I hate life. I have to call a customer for "direct support" concerning software specific problems. This happens once in a year to me probably.
I hate talking to customers so badly
 
:o
 
1:28 PM
My problem is MongoDB
 
(sorry, using IE)
 
@Gemtastic yeah, mongodb is a problem
 
<3 PouchDB
 
I'm still trying to set it up.
And I have no idea what I'm doing
 
@jAndy how do I lower my fat %?
 
1:30 PM
I miss postgres
 
@BadgerCat liposuction
 
@BadgerCat fat_percentage--;
 
@BadgerCat Eat less, fatty.
 
Thanks all.
 
@jAndy ew, snake cased...
 
1:31 PM
@jandy I'm doing weight lifting already and my BMI is under 20.
But I can't see my abs yet.
 
Ew, why would you want that? That's gross.
 
why do you have to see abs ? Women in general have naturally a higher fat percentage than men
 
Say I want an object that is like an array but with normal object properties that refer to elements in the array. Should I use an array or an object?
 
Just let her be; don't judge
 
I want to see them, what's the problem?
 
1:32 PM
if you're not obese or fat or overweight, it's not really healthy to hunger or shred down until you drop so much fat to see something
 
@KendallFrey object implementing Symbol.@iterator
 
well, in short words females are VERY sensitive to low body fat percentages
hormone levels in particular
 
@FlorianMargaine I would still have to manually assign every index, right?
 
you can bet that any female "fitness model" on stage which looks lean and shreeded, totally fucked up her natural hormone levels
no menstruation, feeling awful, etc.
 
obj[1] = obj["foo"] = { blah }
 
1:35 PM
:(
 
Do what you want yo
 
:o
 
I guess adding properties to an array is the easiest way
but I don't know if there are any gotchas to adding properties to arrays
 
hello ↲== unicode &#8626
but when i use \u8626 it shows 蘦
 
Girl abs never looks as nice as guy abs
 
1:38 PM
@Gemtastic like boys tits never looks nice as girl's tits
 
@BadgerCat Anyway, if you really want to get a fat percentage below 10%, consult a physician. The obvious way is cutting calories and increasing your protein intake, but it's best to actually track your hormone levels through bi-weekly blood tests from a sports doctor. (For most checks, he can have your results the very next day)
 
@FastSnail My tits look fabulous
 
haha I was going to say that @FastSnail
 
hahahahahahaha
 
@FastSnail \u is hex
 
1:39 PM
@Kippie I want 15-20%
 
This conversation went fucked up places. If someone wants to see their abs, don't be an ass about it... I'm looking at you, @jAndy
 
Is that really dangerous?
 
@BadgerCat Probably not going to see many abs at 15-20, though
 
Don't get your hair cut, you'll regret it and feel awful
Come on
 
I mean, they might become a bit visible, but they won't pop
@NickDugger Getting your hair cut means you lose your powers. That's what bible study told me, at least
 
1:40 PM
touche'
 
@NickDugger Yeah really. I'm sitting here like, plenty of athletes have abs
Don't think they're dying
 
@FastSnail That's true too, but it's unrealistic for a girl to expect abs; they don't form like they do on guys.
 
@BenjaminGruenbaum Do you know why Bluebird.join with a .then handler adds all the promises to the first argument as an array? Do I need spread?
 
Is treehouse for beginners only?
 
Thighs of thunder and butts of steel are the girl's strengths.
 
1:42 PM
I mean is it worth it
 
@BenFortune yes, you need .spread
 
Am I the only one here that thinks "boy tits" sounds pretty fucked up? I mean, "manboobs" or even "bitch tits", sure. But "boy tits"? That's just plain weird.
 
Well, I don't want super defined abs like guys.
 
I wanna learn WebGL
 
@BenFortune Are you looking for .all? Using .join is for when you want the last argument to be a function: join(a,b, function(a, b) {... })
 
1:43 PM
@BenjaminGruenbaum I have something like Promise.join(p1(), p2(), p3()).then(...)
 
@KendallFrey this is how i look it unicodelookup.com/#%20%E2%86%B2/1
but when i escape with u it doesn't work
 
@BenFortune then you're using join wrong, pass what you have in the then as the last argument to join
Or use .all
 
Am back
and much better with brakes :D
 
@FastSnail And I told you why
 
literally was just braking for past 1hour :D
 
1:45 PM
you see?
practice
 
Is new Map() more performant for lookups/retrievals than objects?
 
mhmm
 
@KendallFrey ok it's decimal .then how should i escape it ?
 
I'm confused, what kinda brakes are we talking about here?
 
@Gemtastic car brakes
 
1:46 PM
I'm talking about objects with millions of entries
 
see some of us have no lives and hence no real friends.
 
@FastSnail I have no idea what your question is
 
@MadaraUchiha why the heck does your object have millions of entries ?
 
@Abhishrek Well, then carry on. I thought it was something fun code-wise
 
@Abhishrek Game, millions of entities
 
1:46 PM
@MadaraUchiha Tree ?
 
Server-side.
 
Is tree applicable ?
if not well i hope they are
 
@MadaraUchiha Yes it has been designed so adding and removing objects from a map is faster than object literals (from a book I read)
 
@MadaraUchiha dont trust map
benchmark it, (lesson i learnt)
 
@BenjaminGruenbaum That makes more sense, am I right in thinking that .then only allows one parameter?
 
1:47 PM
Well, to be fair, a Set is more suitable
 
@Abhishrek Maps are great, shutup.
 
@afonsomatos They are great
 
@BenFortune two, but not a big deal
 
@BenFortune yes
 
The Map is likely to have only in the thousands area
 
1:48 PM
but you never know how fast the first implementation is
 
@BenjaminGruenbaum he means resolve's callback
 
@MadaraUchiha no, both use the same implementation.
@MadaraUchiha if you have millions of properties then you can roll your own DAST.
 
^ see what i meant
@BenjaminGruenbaum DAST ?
 
@BenjaminGruenbaum So... the only advantage of map over object is the ability to use non-string as key?
 
Map will have more consistent timing, though, since it won't try to optimize into a fixed structure
 
1:48 PM
@FlorianMargaine .then(success, fail)
 
!!wiki dast
 
A Dastaar (Punjabi: ਦਸਤਾਰ, dastāar, from Persian: دستار‎) or Pagṛi (Punjabi: ਪਗੜੀ) or Pagg (Punjabi: ਪੱਗ), is an item of headgear associated with Sikhism and is an important part of the Sikh culture. Wearing a Sikh turban is mandatory for all Amritdhari (baptized) Sikh men. Among the Sikhs, the Dastaar is an article of faith that represents honour, self-respect, courage, spirituality, and piety. The Khalsa Sikh men and women, who keep the Five Ks, wear the turban partly to cover their long, uncut hair (kesh). The Khalsa Sikhs regard the Dastaar as an important part of the unique Sikh identity....
 
@MadaraUchiha it will be optimized, but yes.
DAST = Data structure.
 
@LOL
 
@MadaraUchiha objects can totally have non-string keys, some of the helpers just don't encourage them
 
1:49 PM
@KendallFrey i'm making a typing app.https://dry-sea-5830.herokuapp.com/game.html

i have a array 'X','Y','Z',' ','\U8626'];
i want to show that arrow but it shows different one
 
@Abhishrek I found this
Diethylaminosulfur trifluoride (DAST) is the organosulfur compound with the formula Et2NSF3. This liquid is a fluorinating reagent used for the synthesis of organofluorine compounds. The compound is colourless; older samples assume an orange colour. == Use in organic synthesis == DAST converts alcohols to the corresponding alkyl fluorides as well as aldehydes and unhindered ketones to geminal difluorides. Carboxylic acids react no further than the acyl fluoride (sulfur tetrafluoride effects the transformation —CO2H → —CF3). DAST is used in preference to the more classical gaseous SF4, since as...
 
@BenjaminGruenbaum .then(function(/* one parameter only here */) {})
 
And maps keep the order of insertion, so when you are using the spread operator, it will return a new array in order.
 
@ssube They can't have object keys...
 
@afonsomatos maps are defined not to do that
 
1:49 PM
@MadaraUchiha lol. D-AST
 
@FlorianMargaine oh that, then that's true in bluebird (since a function can only return a single value).
 
@FastSnail That's because you're using the wrong escape code. Use the right one
 
!!> var foo = {}, bar = {}; bar[foo] = Math.random(); console.log(bar[foo]);
 
@ssube "undefined" Logged: "function random() {\n [native code]\n}"
 
@ssube actually, they're always in order.
 
1:50 PM
@ssube "undefined" Logged: 0.1716961276245531
 
In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of source code written in a programming language. Each node of the tree denotes a construct occurring in the source code. The syntax is "abstract" in not representing every detail appearing in the real syntax. For instance, grouping parentheses are implicit in the tree structure, and a syntactic construct like an if-condition-then expression may be denoted by means of a single node with three branches. This distinguishes abstract syntax trees from concrete syntax...
 
@ssube Wrong. It is defined to do that (at least in javascript)
 
Also, since ES2015 object iteration has a specified order.
 
From MDN: A Map object iterates its elements in insertion order — a for...of loop returns an array of [key, value] for each iteration.
 
@MadaraUchiha can so
 
1:50 PM
So there's that.
PSA: Both Maps and objects in JS have a defined iteration order. The statement "object keys are unordered" is no longer true in ES2015.
2
 
@BenjaminGruenbaum that kind of breaks the whole point of the map data structure :(
 
How does a DAST help me here? I don't have a syntax
 
user image
2
 
@ssube no, still have fast lookup. Also you're preaching to the choir.
 
A normal binary tree might help
 
1:51 PM
@MadaraUchiha a data structure, not an abstract syntax tree.
@MadaraUchiha that's an example of a data structure.
 
Now if you tell me what you're trying to do I might be able to help.
 
@MadaraUchiha if these are game objects, can you use one of the spatial tree data structures (quadtree/octree)?
 
But 99% I'll tell you to dump it into a database.
 
@BenjaminGruenbaum Know of Agar.io?
 
1:51 PM
@MadaraUchiha sure
 
@BenjaminGruenbaum Data structure to hold all the food
Assume milions
 
quadtree
 
What ssube said.
 
And adding/removing 10 items per second at least.
 
has a lot of really wonderful lookup/storage properties, being partitioned already
 
1:52 PM
Also, @copy actually worked with it in JavaScript.
Or Mongo, which uses a quadtree. As much as I hate mongo it might fit here
 
@BenjaminGruenbaum Would it be faster than holding it in memory?
 
@MadaraUchiha You hold it in memory and occasionally persist
 
@MadaraUchiha it'll be in-memory anyway.
 
since a quadtree gives you very well-defined rectangles, you can store those pretty easily
A quadtree is a tree data structure in which each internal node has exactly four children. Quadtrees are most often used to partition a two-dimensional space by recursively subdividing it into four quadrants or regions. The regions may be square or rectangular, or may have arbitrary shapes. This data structure was named a quadtree by Raphael Finkel and J.L. Bentley in 1974. A similar partitioning is also known as a Q-tree. All forms of quadtrees share some common features: They decompose space into adaptable cells Each cell (or bucket) has a maximum capacity. When maximum capacity is reached, the...
 
Also, Mongo already uses quadtrees.
And like I said, we had a long discussion about quadtrees here with @copy so he can probably tell you what library or implementation to use in JS.
 
1:54 PM
it guarantees similar-size records, regardless of how many entities are in a particular space
you can also roll your own in an hour or so
 
@ssube Interesting
So basically, it's a good representation of the game map
 
quadtrees are great for a 2d game map, octrees for a 3d one
 
Yes, like I said, you should talk to copy since he actually used them a lot in JS.
 
I like to set a minimum leaf area and unbounded capacity, so the tree self-optimizes down to the smallest 10m or some game space
(unbounded but still capacity-aware)
 
whaa, maybe i'm being blind, but how come Derpy.hook(); returns Uncaught TypeError hook is not a function etc.
 
1:59 PM
@AaronHarding return new D
 
@FlorianMargaine line 46?
 
@AaronHarding y
 
@FlorianMargaine giggity
 

« first day (1718 days earlier)      last day (3224 days later) »