« first day (2441 days earlier)      last day (2493 days later) » 

user1596138
12:00 AM
I have everything even the hosting for my old one lmao
 
@Luggage jesus
 
I've been 'let go' twice. once they escorted me off the premises thinking I was going to .. idk.. throw a wrench in a machine? it was a Kuntz electroplating and they layed me off a week after I started wearing a wrist brace. They thought I was a comp case. and then again in retail but they had no reason so had to pay me a fat compensation cheque
 
user1596138
Cause they call me like once a month with some completely stupid question lol I don't even bill them it's always like 5min
 
user1596138
!!afk
 
at Stratcom anytime you switch jobs you have to be escorted out lol
you lose access to everything right before you leave, it's always so weird
 
12:00 AM
@rlemon I was gonna say yeah, without good reason you typically get a solid check
Except in non-profits apparently
 
yup, and I had another job in 4 days.
basically got double pay for a month+
 
Noice!
 
damn
 
it really was the best thing that could have happened to me at the time
 
Me getting laid off was the best thing that happened to my career
 
12:01 AM
in Maryland, you can fire without cause and not pay a dime.
 
I got a 50% raise within 3 weeks
 
@Luggage yeah same in MI and NE
 
tl;dr I complained to the manager above me that the worker on my level wasn't pulling weight. I got fired. for 'differences of opinion' which I aggressively informed them wasn't a legit reason.
 
but I haven't worked at a place that's been total jackasses yet where they do that
there is usually a whole process that's followed before letting someone go
 
They'd rather pay you than a legal team AND you
 
12:03 AM
@Luggage @Loktar here we have a probationary period where that is true. it can be upto 6mo in some jobs.
otherwise they have to have reason, or you get at least one week for every year worked.
 
haha I just remembered another thing...
we were talking about using slack.. he took over our company domain name for slack
like he registered it prior, so we had to go through him
 
lol
what?
he owned your companies domain name?
 
no just on slack
 
ahh, okay
 
which was still stupid/weird as hell
so when he was let go we had to ask him to relinquish it, and had to have the slack team transfer ownership
 
12:05 AM
I ran into something similar today. I forgot that all of our companies contact forms actually use my email account for the smtp out
 
the compnay was like we're going to get slack, he was like HEY I ALREADY REGISTERD IT GUYS!
 
I changed my password a while back.
oops.
 
haha
 
yea, it was funny to other people. 😛 not to me
it was a weighted decision. make a dedicated no-reply address for the smtpout or just use my own. it was easier at the time to just use my own.
now I regret it
 
@JapanGuy Ah yeah well it wasn't a place I would stay forever but I wouldn't mind a couple years there
 
12:23 AM
So I had to write this theory test to qualify for a learner's license. I went in there all prepped up. Then I saw this police officer who asked me to take a seat, took a bunch of papers I was holding. And he proceeded to answer the questions for me. I was dumbstruck. I was given my learner's license 5 minutes later.
What the fuck
I might have accidentally bribed someone.
 
Hi guys, does anyone else know of a workaround for this? Thanks! stackoverflow.com/questions/44688040/…
 
@littlepootis Did you give him money?
 
12:47 AM
nope.
Why is it 47 C in Phoenix?
 
cause it's a bad place
 
thats hot
@littlepootis how is the driving going lol
 
got a class now. bye.
 
The valley of the sun
 
I remember we had temps in South Australia a few years back that were so high the petrol was evaporating from petrol stations
that's gotta suck, watching it just disappear lol
 
12:57 AM
@towc Although I'm not a front-end developer and just to kill your curiosity I don't know how long I would last but I'm pretty sure I will last more than your dignity — aqw alhadary 6 hours ago
wow I mean wow
> I will last more than your dignity
me being me, I laugh at that
but me also being me, I want to shut the fucker down
is that ban-worthy?
 
Ban worthy? Think what that would do to your... dignity!
 
I predict they'll be married within a month.
 
well played @Luggage
 
@towc to be fair, your comment was not really helpful.
 
well, it wasn't hurtful
 
1:01 AM
how do you feel about this
var removeDuplicates = arr.reduce((hash,b)=>(hash.has(b.title)?
hash.delete(b.title):hash.set(b.title,b),hash),(new Map()));
console.log(Array.from(removeDuplicates.values()));
 
I hate it.
 
it's because it has no for of loop right
 
complicated ternary === wurt?
 
That's a small part, but I use .reduce() all the time so I'm not biasesd against it.
 
@BadgerCat all of them I guess? I still have a couple of oral exams, but I'm getting the highschool cert in 2 weeks, then ideally moving to slovakia wthin 2-3 days and working fulltime as a contractor
 
1:04 AM
a ternary and comma operator? Are you trying to make unreadable code?
 
well can you remove duplicate objects with higher order functions? and by remove remove completely
I'm trying to be cool
and short
 
That's only acceptable while golfing.
 
I'm trying to impress the SO crew
 
then write good code, not towc code
 
ouch
 
1:05 AM
really I'm just trying to be as short as possible any way to do it with higher order functions
 
wow now
I actually write good code
better believe it
 
you just don't post it anywhere?
 
reduce() typically merges similar items into one. The reason I suggest a for..of loop (or arr.forEach() would be fine) is that you loop without that type of 'merge'ing
 
because the multi maps approach is the only way I know how to approach this problem
 
It's semantics. you are looping, not reducing
using a map is fine.
 
1:07 AM
@Arrow const removeDuplicates = (items) => new Set(items);
 
ssube well, duplicates "by title" according to the code
 
no your are just removing the repeaters, i need them completely removed
 
if they aren't in the output, they are 'completely removed'.
 
you could easily do a filter with a Set of title-hashes you've already seen, or really any kind of loop (which I believe Luggage has suggested)
 
I need this[
    {
        id: 1,
        title: 'foo'
    },
    {
        id: 4,
        title: 'bantz'
    }
]
 
1:09 AM
anything except reduce
 
1 message moved to Trash can
@Arrow 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
 
Arrow your use of Map is fine. Just write it out readable.
 
if I write it out with a for people it's going to be cool. yesterday some guy bashed me for using the for loop he said i ain't with the times
 
er.. except I don't know why you delete().
you only need to "not add" when it exists
 
var arr = [{
    id: 1,
    title: 'foo'
  },
  {
    id: 2,
    title: 'bar'
  },
  {
    id: 3,
    title: 'bat'
  },
  {
    id: 4,
    title: 'bantz'
  },
  {
    id: 2,
    title: 'bar'
  },
  {
    id: 3,
    title: 'bat'
  }
]
 
1:12 AM
for..of is the newer feature, actually. It was introduced in es2015
Also readability Donald Trumps 'with the times' any day.
 
you are saying I don't need to delete
 
you shouldn't need to delete
 
If you are making a NEW blank map and then only adding unique items to it, then you never need to delete
And you are doing that thing I just said.
 
map.has can help with that
 
he's using has()
but then deleting it when he finds it and only adding it when it's not there.
So... if there are 2 of one title, it'll be missinng from the output
it outputs only those items with an odd number of occurrences. Fancy.
 
1:16 AM
it only outputs unique values
 
then why does it not output bar or bat?
 
because they are not unique
 
Add a third one of them then.
and it'll appear in the ouput.
 
but I don't want them to appear in the output
they only want unique titles
 
That's why you should test with a third one..
 
1:17 AM
if more than one remove all
 
since you don't believe me (for some reason).
 
ok
works as expected
 
bullshit. i tested it myself (After making that prediction)
3 'bar's. and it's in the output
 
hold on
 
Baby, I hold so good.
 
1:22 AM
i see my mistake
dam it!!!!
so you are saying not to delete, but to push
 
always push
 
I said that when I thought you wanted only one of each, not only those that appeared exactly once.
Different definitions of 'unique'
 
ya only those that appeared exactly once
 
then you either need to loop twice, or use two Maps during the loop.
 
which is what i have been doing. what I need to do is push them all into one hash
then return only the ones with one value in their array
right?
 
1:26 AM
That can work. A Map or arrays.
that's the 'loop twice' method.
(or object of arrays, you don't need a Map, but a Map is fine)
 
i want to get around around looping twice,
think i can do it with reduce
 
well, good luck with that.
 
by currying it with an
object
 
ohh. um.
you are more advanced than I. I look forward to seeing this.
 
ok hold on ill be back
like the terminator says
 
1:28 AM
there are a ton of ways you can complicate the algorithm
it's going to be at least two passes, but you can hide one within Map's methods
 
1 pass with a 'good' and 'bad' map
 
ok going for it
don't wait up,
 
That's how I feel he or she should be writing out code at this level.
Not that the compact mess is ok at any level.
 
The only thing I'd change is making moreThanOnce a Set, since that's the textbook case for a set and you're already transforming and pushing items by hand.
 
yea, but a set cares about reference equality
 
1:38 AM
the single-pass/two-collection way isn't that bad, there's just not any great reasons to use it
 
this uses x => x.title equality
 
moreThanOnce.push(keyToTest); is pushing a string
 
because those are not output
ohh.. you meant set for that?
 
if you were pushing item, that would make sense, but it's already just a string
yeah
arrayOfKeys.includes is set.has :P
 
right, but meh.
I think the Map is even more odd to use.
could just be {}
Judge me if you want, but in my real code, I'd just use: _.uniqBy(arr, x => x.title)
ohh.. that doesn't do the 'exactly once'. I forgot.
 
1:41 AM
I've replaced almost all of my custom predicates with lodash ones, except where they don't have an equivalent.
As a replacement for collections, I don't like lodash, but as a library of functions to feed into the other methods, it's pretty dope.
 
There's very little I need in lodash that isn't now trivial with ES6/7
 
I never considered a a 'replacement for collections', just handy utilities for arrays (and sometimes objects)
@monners yea. i don't NEED it
 
I'm using... flatten (which I had written myself, which was silly), kebabCase/lowerCase/startsWith in predicate form, and a bunch of the is* checks
 
kebabCase?
 
kebab-case
 
1:44 AM
ah
 
using it to map ClassNames to config-keys
 
slugify
I abuse the shit out of _.chain()
// my worst:
const rows = _.chain(worksheets)
    .map(mapper1)
    .flatten()
    .groupBy(groupBy)
    .mapValues(rows => {
        return _.chain(rows)
        .map(mapper2)
        .reduce(reducer, initialValue)
        .value();
    })
    .map((values, key) => ({ key, ...values }))
    .sortBy(orderBy)
    .value();
 
2:18 AM
Day 2:
Drove: 5km
Kills: 0
 
nice
 
@towc ahahaha
 
when I look at jsx I wonder why no one came up with it before
lol
it makes so much sense
 
hi
 
2:34 AM
// While I love JSX, it's not terribly special. Similar can be done with something like:
ul({ prop1: 1, prop2: 2}, [
   li({}, "one"),
   li({}, "two")
]);
little bit of tasty syntactic sugar
 
2:56 AM
Anyone of you doing server-side rendering with react/redux?
 
var uniq=  arr.reduce(function(h){
return function(l,b,c){
if(!h[b.title]){
h[b.title] = {obj:b,count:0};
l.push(h)
}
h[b.title].count++
return l;
}
}(Object.create(null)), []);
is this as close as i am going to get without doing another loop
 
 
1 hour later…
 
2 hours later…
5:55 AM
@SterlingArcher Well god bless her for not typing while driving
 
6:30 AM
Damn, we need to shit more bricks because the supply is low, which leads to a -50% price cut instead of giving it for free!
 
6:41 AM
Hello Everyone, I have started to understand Angular4. In their services example there is the following code. Can anyone please explain me why 'import { Hero } from './hero';' is added in the hero service. I am getting a little confused. angular.io/guide/component-interaction
 
@Strikers you are declaring hero: Hero; For which you need the Hero class. This has to do with Typescript strict typing
 
so in that import basically does mean we are importing from existing code
instead we are declaring it with import statement??
 
yes.. You must have created a Hero class. An import is like a require..
 
no i haven't created a hero class
 
Hi, svg image is not coming when converting html page to pdf using jQuery
please anyone can help
@suraj could you please check
 
6:55 AM
@Strikers suggest you go through the guide from the beginning..angular.io/guide/displaying-data#creating-a-class-for-the-data
 
@suraj so he was referring to that class which is created in few sections earlier? I think i am getting it now. Thanks Suraj.
 
got a funny comment in my slack
> Karel. after deploy: WELD-001414: Bean name is ambiguous Still poo.
 
@KarelG :) . please check my question stackoverflow.com/questions/44670557/…
 
@abilasher you have put your question already.. People will check it and those who know will respond.. :)
 
7:05 AM
ok :) . i will not post it again
 
Guys, dumb flex question
I have 8 flex items in a flex container
I want that at certain resolutions there'd be two lines of 4 each, and in others 4 lines of 2 each
There's a fixed margin between flex items
Is it possible to achieve without resorting to tricks like width: calc(25% - $margin);?
 
7:21 AM
OMG THIS IS THE JS ROOM GO TO CSS PLEASE
Also, I don't know
 
@MadaraUchiha No. But why don't you want to use calc? It's easy to read and supported by all flexbox browsers.
 
Hmm, well, I guess with stylus constants it's not that bad.
 
7:39 AM
this got dv'ed to -8 in one minute lol stackoverflow.com/questions/44693064/…
 
How to use AWS S3 video upload in nodejs
 
@AsadLink 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.
 
sure
 
@AsadLink Grab the AWS SDK
 
No
 
7:46 AM
Yes
 
In nodejs I'm using AWS S3 image upload & it's working fine
but I'm same use as video but it's not working
any idea?
 
Well, then let me look into my big book of solutions under the problem description "not working"...
 
\o
 
Ok
 
@AsadLink The book says to come back with a better problem description
@TGMCians Hey :D
 
7:52 AM
Hmm
 
@OliverSalzburg Hey :)
 
@OliverSalzburg I have a closet full of it...
 
oliver ignores me now :(
/me slaps oliver
why why! :(
 
> question: "Not working". Preferred answer: "Can you come with a better description". Actual response "why?"
 
@OliverSalzburg are you there?
 
7:59 AM
I hide in the shadows
 
ooooh, you're a ninja!
 
no. you're rude. You ignore @OliverSalzburg :'[
 
why you hide in the shadows?
 
I'm dying of cringe please stop
 
HAMMERTIME!
 
8:01 AM
just saw this on HN: blog.teller.io/2017/06/12/…
 
@AsadLink So people don't see me prefix all my variables with $
 
@OliverSalzburg you are the B word :(
 
le security whiz in me was active
even the vid shows it uses plain HTTP
 
@OliverSalzburg Hmm
 
> How many times have you thought to yourself “Damn, I really wish my bank account had an API”?
0
Also, it has HBCI. So, yeah
 
8:02 AM
keh yeah
 
@ARr0w please don't
 
@littlepootis don't what? :$
 
but oliver, you may like this article cus you're a german
we're both beer lovers
 
@OliverSalzburg yeah I know your thought
 
( i hope <.< )
 
8:04 AM
@KarelG I don't have time to read!
 
Where can I buy these bricks and is there jQuery support for them?
 
i made someone cry enough to ignore me <3
oh well i gotta live on with that <3
 
@OliverSalzburg Is any book to read nodejs
 
@OliverSalzburg TL;RD archaeology students were creating a beer based on a recreated 5000 years old recipe. Some succeeded, some failed (manioc as base ... eww). At last " The ancient Chinese beer looked more like porridge and likely tasted sweeter and fruitier than the clear, bitter beers of today "
can I have a brick as reward? :D
 
shits brick
 
8:11 AM
* clonk *
 
@CapricaSix are you there?
 
@KarelG Well, I did read the title ;D
 
@AsadLink what do you need from the bot?
 
@suraj I have asked question in nodejs but there is no perfect solutin
solution
@OliverSalzburg any idea to nodejs book
 
I don't read books anymore. Thus, I have none to suggest
 
8:20 AM
@OliverSalzburg Okay
 
nodejs.org/en/docs , devdocs.io/node try to learn to read api and official docs
 
@suraj Thanks
 
I also don't trust anyone who has enough spare time to write a book
 
Does anyone have a simple example on how to link a wasm file? I used this http://mbebenita.github.io/WasmExplorer/ instead of emcc to generate the .wasm file. Tried to load it with fetch like explained on the mozilla MDN https://developer.mozilla.org/en-US/docs/WebAssembly/Loading_and_running but I'm getting this error ? Uncaught (in promise) TypeError: WebAssembly Instantiation: Import #0 module="env" error: module is not an object or function
at <anonymous>
Looking at this github.com/WebAssembly/binaryen/issues/670 seems what I'm trying is not yet possible ?
 
@OliverSalzburg are you freelancer work or as a employee
 
8:25 AM
@AsadLink I serve as the CTO of the company of which I am a founding partner
 
Oh great
 
So it's a bit of both :P
 
Hmm
So where are you from?
 
8:41 AM
@AsadLink You can check my profile
 
Anonymous
Who's selling the bricks?
 
Anyone here really good with React? Got a question about keys
 
@OliverSalzburg If you don't mind can you please add me on your Room for Oliver Salzburg and Rene Koch
 
@AsadLink Why?
 
@OliverSalzburg If I asked some question and some errors on my code to copy and paste
 
8:52 AM
@AsadLink You can do that here where everyone can help
 
@OliverSalzburg yeah exactly
@OliverSalzburg I am showing your Oliver Salzburg and Rene Koch room someone push on code
so I guess
 
I'm feeling a communication barrier between us
And it's not in my pants before anyone suggests it
 
Right
@OliverSalzburg Here is my AWS S3 image upload code
import User from '../users-model'
const AWS = require('aws-sdk')
import config from '../../../config/config'
import moment from 'moment'


/**
  * Setup
  *
 **/

let defaults = {}

const handler = (request, reply) => {
  var originalBlob = request.payload
  var regex       = /data:image\/([a-zA-Z]*);base64,([^\"]*)/
  var matches     = originalBlob.match(regex);
  var base64Data  = matches && matches.length && matches[2] ? matches[2] : '';
  var buf         = new Buffer(base64Data, 'base64');
  var newName     = (new Date()).valueOf();
 
@AsadLink Why are you using import and var in the same code base?
And why are you using import in a NodeJS project anyway?
 
9:08 AM
Yeah I'm not good in nodejs
 
i use it in node projects
i followed a tutorial where the guy used babel
and just never went back lol
 
Hmm great
 
@littlepootis an hour
 
watch the video
 
lol i love these vids
people can be so dumb
 
9:15 AM
@hsimah A mistake
 
why?
 
Because you followed a tutorial and never followed up on if what the tutorial shows is actually sane
And also because it isn't sane
 
ok, helpful answer there
 
If you're just starting out, don't transpile your perfectly readable and debuggable code
Of course, if you wait 4 hours for all the frontend devs to wake up, they will tell you that it's perfectly fine ;)
This room is a source of varied opinions
 
@littlepootis no access to youtube
 
9:20 AM
so its just the debugging aspect? or is there more to it. i read about it a bit (not lots mind you) and it seemed that if it worked then there wasnt much issue with it.
ive only changed to it in the past two days, so maybe there are headaches ahead, but i havent found any issue debugging the transpiled code - yet
 
@hsimah You make your own decisions. If you ask me, I'm telling you it's stupid and the benefits don't outweigh the problems
If you ask someone else, you get a different opinion :P
 
yeah, but do you have any other reservations other than the debugging aspect to it
im not trying to argue, youre the first person to say its not a good idea so id like to know why is all
 
I think you should ask someone else for a different opinion
 
You're introducing additional complexity into all aspects of development and I just don't see the advantage gained by doing so
 
fair enough
im still playing around with it, at work im still using much older tech lol
but at home, where i am now, i dont mind the speedbumps with riding the bleeding edge
 
9:25 AM
It's not the bleeding edge. It's taping a shitty spoiler to your otherwise perfectly fine car, making "vroom, vroom" noises and believing you're riding a Porsche
 
lol!
 
what's the context of that opinion ?
using babel as newbie in js?
 
@KarelG Node + Babel
 
node + babel, why would one do that
any gain ?
 
I refuse to list anything positive about that :P
 
9:36 AM
why ?
Node runs on chrome's V8 engine, which supports most of the recent ES syntax anyways ...
babel is only useful for client side scripts
 
@Alex 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.
1 message moved to Trash can
@Alex 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
 
@CapricaSix where is alex
 
@AsadLink she is a bot. Alex put up unformatted code which the bot removed.
 
i wish there was an ergonomic keyboard for mac with mac keys
 
1 message moved to Trash can
@Alex 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
 
9:45 AM
@suraj okay
 
what's a nice way of transforming [ key1, value1, key2, value2, etc... ] to { key1: value1, key2: value2, etc... }?
(hopefully that formatting is okay)
I'm sure there there are questions about this on the site, but I could quite figure out what search terms to use to find them
 
1 message moved to Trash can
@AsadLink 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
 
what's a nice way of transforming
```
[ key1, value1, key2, value2, etc... ]
```
to
```
{
key1: value1,
key2: value2,
etc...
}
```
?
 
@Alex A simple for loop that everyone instantly understands
 
it's even faster if you increment the loop step with 2
 
9:48 AM
Or a fancy functional approach that all your coworker will marvel and wonder about
 
...
 
@KarelG "SyntaxError: expected expression, got end of script"
 
I accidentally pressed enter :|
!!> let a = ['key1', 'value1', 'key2', 'value2', 'key3', 'value3']; let o = {}; for(let i = 0; i < a.length; i += 2) o[a[i]] = a[i+1]; o;
 
@KarelG "value3"
@KarelG {"key1":"value1","key2":"value2","key3":"value3"}
 
here you go
but please check the array first (is it even?) and don't use let if you're not using babel
 
9:53 AM
What about duplicate keys btw?
 
@OliverSalzburg "Whoops"
 

« first day (2441 days earlier)      last day (2493 days later) »