« first day (1523 days earlier)      last day (3427 days later) » 

4:00 PM
 
@rlemon Is that work safe?
 
IF YOU STAR RANDOM MESSAGES I WILL INDISCRIMINATELY KICK YOU WITHOUT WARNING
8
 
@Greg yes
unless your name is Bruce
 
Because apparently one pin is not enough
 
user2620028
lol
 
4:01 PM
@SecondRikudo Nope
 
user2620028
only thing i have starred in like a week
 
@copy ...
 
@SecondRikudo I don't have a good enough relationship with you to make a sarcastic remark.
 
5 mins ago, by rlemon
GOTO THE SANDBOX TO GET THE STAR HAT YOU TOOLS! don't spam the main rooms. FFS
 
@rlemon hahaha
 
user1596138
4:01 PM
@SecondRikudo This should be the welcome message
 
user2620028
he is so used to typing goto or it is a pun?
 
@someDoge I've noticed that starbots don't get a welcome message.
Maybe Cap isn't picking up on them unless they speak?
 
user1596138
Does anyone?
 
cap only welcomes when you speak (now)
 
user1596138
YEah it's a speaking thing now
 
user1596138
4:03 PM
I don't know why people don't just star everything on the current stars list if they want the hat lol
 
user2620028
uhhh considering that our normal star list has gone from like 1 - 5 stars at max now to up to 33 stars per item..... i would say it is already happening
 
@towc ok
@SecondRikudo two won't do any good, either.
@rlemon cap should welcome when one stars as well.
 
@AwalGarg cap should report people who star and don't have permission to speak in here
or who haven't spoken before
that could be interesting
make an issue for it
 
or that
 
4:10 PM
see what everyone else thinks
!!afk
 
Room Poll: Should Caprica report users starring messages too fast who haven't spoke before in the room? Star if you agree.
 
yes
 
Hey, are any of you familiar with Immutable.js or Lazy.js?
I have a question for you guys:
1
Q: Do Immutable.js or Lazy.js perform short-cut fusion?

Aadit M ShahFirst, let me define what is short-cut fusion for those of you who don't know. Consider the following array transformation in JavaScript: var a = [1,2,3,4,5].map(square).map(increment); alert(JSON.stringify(a)); function square(x) { return x * x; } function increment(x) { ...

 
> Immutable also provides a lazy Seq, allowing efficient chaining of collection methods like map and filter without creating intermediate representations. Create some Seq with Range and Repeat.
What they mean by that is that they don't create an immutable intermediate representation
The optimisation you describe might not be safely possible in JavaScript
Because of side effects
 
Isn't a Seq an immutable intermediate representation itself?
 
4:16 PM
Yes
Ah, no
 
user1596138
@AwalGarg I don't see a need. Now if someone wanted to do it during the influx of starring that would've been worth it but I think the worst is gone.
 
I'm not sure whether side effects would affect short-cut fusion.
 
user1596138
Plus I think rlemon had a star spam remover
 
The reason is that we perform fusion on pure functions like map and filter. The side effects are safely contained in the callback functions.
 
@AwalGarg I started to just kick new people who starwhore stupid messages
 
4:22 PM
@AaditMShah Well, if the functions have side effects, the order in which they are called is important. But you already figured out that the calls are reordered
 
@PeeHaa You can't kick people who haven't spoken yet.
 
@copy How is a Seq not an immutable intermediate representation?
 
@AaditMShah It is, but once you have it, more intermediate immutable representations are avoided
 
Oh, yes. That way it indeed does make a difference. However impure functions and lazy evaluation don't play very well.
 
@AwalGarg huh? Is that right because I am failry certain I kicked a few
Can you invite me to a room?
 
4:24 PM
@PeeHaa @SecondRikudo said so.
 
So it's best to assume that the callback functions are pure, or at the very least that the interleaving does not matter.
 
And say something so I can star
Still nothing ?
 
Did you get kicked?
 
I never seen that message so I either have super powers or people just already said something which I kicked
> You've been kicked from kick.
2
 
Ah, xenophobia. The fear of xenomorphs. Quite an understandable phobia! — Sterling Archer 1 min ago
I couldn't resist.
 
4:28 PM
@PeeHaa xD
 
@copy How are more intermediate immutable representations avoided? For example, consider Immutable.Seq.of(1,2,3,4,5).map(square).map(inc). Wouldn't this produce 3 Seq objects? 1 for the original data structure and 2 for the mapped data structures.
 
@AaditMShah No
It's lazy; once you grab the result, the maps are evaluated
 
@SterlingArcher Bitch-ass xenomorphs
I ain't got no xenophobia!
 
Then you should play Alien: Isolation
Speaking of, I should finish playing that/get unstuck.
 
@copy The results may be evaluated lazily. However when evaluated they still recursively fetch the next value to process from the previous Seq objects right?
 
4:38 PM
I don't understand the question, but it's probably an implementation detail
 
user1596138
in Sandbox, 5 secs ago, by someDoge
I uh.... I fixed the stars in here...
 
user1596138
I accidentally went too far..
 
user1596138
lmfao I was changing the script and all of a sudden it stops working... Because there are no more stars.
 
@ssube I desperately want to play that game with an oculus rift.
 
user2620028
4:39 PM
lol
 
I would poop myself.
 
user2620028
@SterlingArcher have you watched the last few southpark episodes?
 
@SterlingArcher uh, yeah, that would be terrifying.
@HatterisMad they have gotten downright brutal. It's kind of sad they have so much material for this season.
Politicians should definitely think "will this end up on south park?" before doing anything.
 
user2620028
@Ssube i have only seen the last 4 or so from this season. To be honest no where as funny as like the middle of the south park seasons. However they still seem to be poking the bear as much as usual.
 
4:42 PM
^this is how you test very large resolutions lol
 
@HatterisMad a few, I think the latest I saw was "The Washington Redskins Go Fuck Yourself Christmas Special"
 
@AaditMShah It's a good question, you will likely get a decent answer in a couple of days
 
And a few of the Lorde episodes lol
 
@HatterisMad It's definitely not the same generally friendly humor, and can seem less funny. It's a lot harsher and more focused on specific stupid shit happening.
 
user1596138
@AwalGarg Hahaha hey he does have me ignored!! Gguess I'll stop trying to help him
 
4:44 PM
It's still well done and all, they're just straight up calling people out.
 
user2620028
@SterlingArcher werent those the lorde episodes? lol
 
I'm not sure there may have been more :P
 
@someDoge What, awal does?
 
user1596138
@Sippy Yeah see tiny avatar in user list lol. I've wondered.. I have pinged him a lot recently and never seemed to get replies
 
@someDoge Lol
I'll never ignore you bro <3
 
user1596138
4:46 PM
Hey it's working, I haven't argued with him ;P
 
Solid logic lol
 
user2620028
@SterlingArcher yeah i didn't get to see the lead up into how stans dad was lorde.... i accidentally watched the double part episode backwards too cause i didnt realize it was a two parter :(
 
@HatterisMad watch it asap. it's so funny lol
the transgender bathroom episode was also hilarious
 
user2620028
@SterlingArcher damnit lol i think i started watching that one last night and then killed it and went to bed. Was that the one where cartman starts off by teasing butters with a fake oculus rift?
 
No that one was completely different but still hilarious lol
 
user1596138
4:48 PM
@SterlingArcher that was weird
 
@HatterisMad That episode is fucking confusing as shit
I had no problems with inception or the matrix but fuck that episode
 
It's inception, the matrix, total recall, and a couple others all mashed up.
 
lol google looks so weird at about 5456x3072 pixels xD
 
As long as you can sort-of follow, it's great.
 
@ssube I failed at that.
It was 2am
To be fair to me.
 
4:49 PM
Yeah, that's an episode you watch sober and awake.
(which is rare for south park)
 
Yeah lol
I usually watch the new ones when they come out before I go sleep
That one was just a mistake
I was just sat there confused for like 20 mins
 
user2620028
@Sippy i haven't seen past the point where the tech support guy calls eric and tells him he is stuck in an oculus rift lol
 
@HatterisMad Do it when you're awake xD
 
hmm, it is a bit buggy but still usable
 
user1596138
4:56 PM
@HatterisMad lmfao I need to watch that one still
 
lemme try to watch a movie at that res xD
 
user2620028
Cock magic was kind of funny
 
@HatterisMad Couldn't finish it
Was awkward as fuck even for South Park
 
user2620028
but they could have done so much better with the actual MTG part of the episode
 
user2620028
You know, if i programmed in js as much as i wrote in chat i am sure i would be a much better JS dev
 
5:00 PM
is there somewhere in github that I can easilly add a license to an existing repo?
 
@NickDugger the head of every source file
 
very good reaction time
 
user1596138
loser lol
 
user1596138
More like his instincts are to do pushups when hes scared
 
@ssube does a lack of a license indicate something is absolutely public domain, or should I play it safe and add MIT to it?
 
5:02 PM
super quick noob question. how do I copy objects from one array to another based on matching one of the objects properties like obj.type = type1
 
@turtlefeet 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.
 
ahahaha this is so much fun XD
@UnityUsers Try stretching your browser across all 4 workspaces and see how different sites react to it. XD
cc @SecondRikudo @erikroyall ^^
 
All, I am struggling with something. Any of you with some ASP.NET MVC and Angular experience?
1
Q: How can I get an environment specific URL into my AngularJS controller?

CodeWarriorSituation Our web project in production has a root URL like so: http://example.com. Our local dev instances (don't ask me why) default to a URL like so: http://localhost/SubDir where SubDir is a placeholder for the actual virtual subdirectory in IIS. This is not the problem. As much as I woul...

 
@AwalGarg I disabled workspaces on my machine
I don't find it useful.
 
@SecondRikudo enable them, and try it :D
22 mins ago, by Awal Garg
user image
^
 
5:05 PM
@PeeHaa You can't kick people who haven't spoken
Trust me, I tried.
 
@SecondRikudo Can mods do it?
I thought they had to do it when there was that swastika attack
 
@NickDugger lack of license, iirc (ianal), means full copyright and shouldn't be on github.
 
@ssube ah... I should fix that then
 
You should check with your legal counsel and do what they say.
Chances are, adding a license header (some IDEs can do it for you) is good enough.
 
5:07 PM
@AwalGarg how did you stretch your browser like that on all four workspaces? (And what's the use of it?)
 
can anybody just give me a quick pointer to that question? I feel like it's a really easy answer, but I haven't been able to put it into proper words for good search engine results.
 
user1596138
@NatNaydenova there is none..... he's bored..
 
@turtlefeet array.filter(filterFunction).reduce(createNewObjectFunction)
 
@NatNaydenova Stretch it like you stretch any other window, and adjust from all the 4 workspaces a bit. The use is to have fun, and possibly test how your css layout works on very large screens.
 
Is the clearest way to do it.
 
5:09 PM
I hope my uncle isn't mad that I turned down one of his recruiters.
 
@SecondRikudo How does this function insert the matching objects into the other array?
 
@turtlefeet Oh, you want to copy them to another array?
A new one or an existing one?
@Sippy mods cannot kick users who haven't spoken either
I just checked.
 
user2620028
@Awal I was about to tell you that you need hobbies and find some real fun Then i realized i was debugging css animations and i died a little inside
 
I declare the var, but it's not defined as an array before the objects are copied.
 
@HatterisMad what
 
5:12 PM
@SterlingArcher If he is a good boss he should understand that it is better to not have an employee who is dissatisfied from the get-go. That never works well. Employees should want to work there.
 
@turtlefeet In that case, just .filter on the first array
 
and that returns the matching objects?
 
user2620028
@Awal you said that why you were stretching your browser window over your workspaces was because you said it was fun and you could debug large resolutions, so i was going to tell you that you need to find something to do that is actually fun
 
.filter returns a new array with only elements that pass the filtering function
 
so newArray = oldArray.filter()
 
5:13 PM
!!> var original = [1, 2, 3, 4, 5, 6, 7]; var filtered = original.filter(function(el) { return el % 2 === 0 }); console.log(original, filtered);
 
@SecondRikudo "undefined" Logged: [1,2,3,4,5,6,7],[2,4,6]
 
@HatterisMad well... what could be fun for me could be boring for you... no?
 
@turtlefeet ^^
 
user2620028
@Awal absolutely :P
 
@SecondRikudo Intewesting.
 
5:14 PM
As you can see, original is kept, and a new filtered array is assigned to filtered
 
Is this javascript or jquery?
 
user2620028
@Awal do you get off on cross browser, screen resolution fine tuning layouts?
 
@HatterisMad sometimes (read: rarely)
 
@CodeWarrior he txted me saying I made the right move staying where I am to learn
He's so cool <3
If anybody is looking for private sector high security clearance jobs in the DC area please ping me!
 
@SterlingArcher Dammit. I want one in the UK?
 
5:17 PM
@SterlingArcher Good guy. Working for family members can also be hard. Sometimes they feel that their close association with you can let them ask more of you than other employees.
@SterlingArcher What is the job BTW? I used to work in the Intel sector as an image analyst (before I started doing software).
 
Well it's not for. My uncle owns a recruting firm, so he'd be placing me, not being my boss
 
Ahhh. Gotcha
 
my search isn't returning great references for this. how do I evaluate each object for certain properties? something like newArray = oldArray.filter(function() { object.color == purple})
 
If you're interested, I could send you the email to the recruiter who sent me the job? She's a great woman and my uncles recruiting firm was deemed one of the top 100 firms in the east coast
Or send her yours, maybe.
It's a place called Definitive Logic in DC
Looks like they're looking for Java/JavaScript developers
> · U.S. Citizenship with the ability to obtain DoD top secret security clearance
· Ability to quickly obtain at least IAT Level I DoD Approved 8570 Baseline Certification
Not sure what that last one is lol
 
Naah. I was just curious. I live in Hawaii now. Security aspect aside, the time difference would put me coming into work at like 3 AM.
I havent heard of that either. I have an inactive Top Secret with SCI, but I dont know anything about IAT...
 
5:21 PM
@SecondRikudo my search isn't returning great references for this. how do I evaluate each object for certain properties? something like newArray = oldArray.filter(function() { object.color == purple}) <sorry for doublepost>
 
I need help with an Ajax call that includes hashmarks. Is this the right forum?
 
@SeanDuggan 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.
 
@turtlefeet Array#filter accepts a function.
That function should return a boolean
 
If I don't replace the hashmarks, everything at and past them disappears, presumably marked as a comment.
 
For elements where true was returned, the value is copied to the new array.
 
5:23 PM
You live in Hawaii?
So jelly
 
For elements where false was returned, the value is not copied.
 
I hate the reduce function.
 
If I do replace them, I get a URL like "/(F(CLyp4896DbLYZx1GKGE-Huw3ni9LYO3ozWopRrfsRcq753xwmaZZt07sNIm-Pok7NEvJmSOPz-n‌​‌​Lzmy26sFjOPI5HgJi-xEnXnA5cyC4nI0Of2kNDQafin-Pl_XUfS0ywWuiohNxqEPNvCUZREzJQ3Amuw‌​41‌​))/Logs/Log/LogGridBinding?gridParamName=LogGrid&eventId=0&blId=undefined&mis‌​sion‌​Id=0&autoRefresh=false&showChildren=false&significanceLevel=Informational&s‌​earchV‌​alue=%23hash&tagPhrase=&exportCols=&missionId=0&quickSearch=%23hash"
 
@SecondRikudo what's the format? Is the function run against each object? so I should run something like this.color == blue ?
 
@turtlefeet I would imagine something like
 
5:24 PM
@SecondRikudo newArray = oldArray.filter(function() {this.color == blue})
 
@turtlefeet it comes as a param, so return it.color == blue
 
original.filter(function(element) { return element.color == blue; });
 
If I plug that directly into the browser, I get my C# function, LogGridBinding, and the hashmarks are transmitted. If I use the extant grid.ajaxRequest function, they get passed as blank strings.
 
this is not bound. The element is passed as the first parameter to the filtering function
filter iterates over each element in the array and runs the function with the new parameters for each one.
 
What is this trend that pressing the tab key on some sites (like mdn) presents a secret menu for quick accessibility to things? Is this for accessibility for people using screen readers or something?
 
5:25 PM
@SterlingArcher I lived on Oahu when I was in the Army for about 6 years. Had to move back tot he mainland when I got out to find intel work. I transitioned to software and have slowly made my way back over here (now on the big Island) doing telecommute work.
@SterlingArcher It is expensive, and it can be hard to concentrate on work, but it is turning out alright.
 
By telecommute you mean you bluetooth all your work while surfing?
 
@SecondRikudo currentTracks = tracks.filter(function(element) { return element.genre == "Hip-Hop"; }); is working great
 
@turtlefeet While you're at it, read on Array#forEach, Array#map, Array#reduce, Array#some and Array#every
They all use the same concept of accepting a function to do something on an array, and they are all very very useful.
All of these functions are IE9+
 
@SecondRikudo Do you have any preferred reference sites? I used W3 and the MSDN but neither are great for javascript array stuff.
 
@turtlefeet MDN and devdocs.io
devdocs.io uses MDN but is much much much more searchable
So I recommand that
 
5:30 PM
@turtlefeet Ignore w3schools, if you can. They're generally wrong.
 
@SterlingArcher I wish. I don't surf, but I do kayak, and snorkel. Now they just need to bring out more waterproof electronics and I would be set. To be honest, the big problem is the lack of technology out here. There arent any real computer stores (Microcenter, Frys), there is only one cable provider (Oceanic Time Warner) and their service is spotty at best.
 
@turtlefeet w3 or w3schools? There is a difference.
 
schools
 
@turtlefeet Yeah, don't use that.
 
but I'll check out the other site
 
5:31 PM
Like, at all.
 
thanks for all the help, much appreciated.
 
w3 is the spec, and is right, but not a ton of help (especially if you're not familiar with the topic)
w3schools is just an ad site using their name to show up on google
 
@SecondRikudo Is there an advantage of using Array.forEach to filter instead of Array.Filter ?
 
@turtlefeet Array.filter is more semantically correct.
Array.forEach is generally used for side effects
Think of it this way, for things you'd normally do for (var i = 0; i < arr.length; i++) {, you want a forEach.
Because filtering is such a common task, it was given its own function.
 
It also may be optimized in the future.
 
5:40 PM
@SterlingArcher ping
 
@SecondRikudo I see. Is there a major performance different between using the filter() function or iterating over the array with a loop or forEach?
 
imgur.com/gallery/IVcFk waited for about 45 seconds before I realized...
@rlemon hi :D
 
@turtlefeet Functionally not really.
 
@turtlefeet The loop might be faster, but you should test it.
 
user1596138
Using Node to check whether a server is alive.. Suggestions?
 
5:41 PM
.filter is built on top of .forEach
 
It probably won't matter.
 
@someDoge HTTP server or otherwise?
 
My arrays won't be bigger than ~10,000 elements.
 
But note this @turtlefeet, the difference in performance will be negligible.
 
Theoretically, if your callback to filter has closure over a lot of surrounding scopes, it might be faster to use a loop, because the callback probably can't be inlined then.
 
5:42 PM
If you have DOM interaction or AJAX, the bottleneck will be there.
 
But that's the kind of micro-optimization you should prove you need before trying.
 
user1596138
@SecondRikudo Eh checking with HTTP seems enough for me
 
user1596138
But other aspects matter...
 
user1596138
 
No DOM interaction, everything is on the JS side
 
5:43 PM
@SterlingArcher i'm going to hell for laughing at that
@SterlingArcher how's the progress?
 
@rlemon Because you weren't before?
 
user1596138
I'm also turning the server on but that I already have API for
 
wry grin Is there additional information I need to add for my question?
 
@turtlefeet Still shouldn't matter much.
 
@rlemon slow, I've been lazy :(
 
5:46 PM
@SecondRikudo With arrays below ~10000 elements, probably a difference of a few ms right?
 
I'm basically been doing pushups and no weight squats when I get home from work and then passing out
 
@SecondRikudo either chrome has some really clever opt, or that benchmark is off.
 
@SecondRikudo How do I interpret these results?
 
@turtlefeet More is better
 
5:47 PM
huh, nope, the for loop is actually just massively faster.
 
user1596138
@rlemon you do stuffs with the things do you think this is good enough? gist.github.com/Jhawins/4ea07f0a11351c74fce8
 
@SecondRikudo I mean how do I calculate what impact this has on my specific case, as in ms in difference?
 
@turtlefeet You don't. Benchmarks won't tell you anything about how functions will behave on your specific case and circumstances.
Try the one that looks best
If you notice it's getting slow, find the bottlenecks and fix them.
 
Can I see how long it takes in ms for an array of 10,000 elements?
 
I doubt the looping mechanism will be what makes your app go slow though.
Premature optimization === dead kittens.
 
5:49 PM
forEach is actually pretty slow, but doesn't matter xD
 
because even though it says 94% faster, if one case takes 1 ms, and the other case takes 5 ms
 
17 secs ago, by Second Rikudo
Premature optimization === dead kittens.
Just use .filter
 
@SecondRikudo @turtlefeet check out jsperf.com/map-filter-vs-foreach/3
making the three almost exactly identical only makes the difference more noticeable
I feel like v8 must be inlining when it sees the loop with calls, but can't for the callbacks.
 
@ssube I have a feeling that ES6's TCO will change that benchmark dramatically.
 
#ants
!!afk lunch time
 
user1596138
5:52 PM
@SterlingArcher I saw that earlier and almost sent it to you!
 
@SecondRikudo TCO?
 
@AwalGarg Tail-call optimization
 
ahh
 
Basically the compiler transforming recursion into a while loop under certain conditions.
 
yeah, I read about it in an article recently.
 
5:54 PM
Does v8 not do tco now?
and how will tco help callbacks?
 
hi
hello @Loktar
 

« first day (1523 days earlier)      last day (3427 days later) »