« first day (2357 days earlier)      last day (2585 days later) » 

user7480455
8:00 PM
but seriously how do you follow it it pretty amazing that you can
 
experience
 
user7480455
Yeah I am going to need alot more
 
Am I talking to a wall?
 
@007 How are you able to speak English?
 
user7480455
I did not realize there was so much in web dev
 
8:00 PM
Awal?
 
good lord, no
 
user7480455
Why yes... yes I do
 
@ndugger can you open a room with him? otherwise he's got you ignored
 
user7480455
no one is ignored
 
8:01 PM
like, if you don't have the option he's got you ignored
 
Why would he have me ignored? I'm perfectly pleasant to interact with
6
 
idk. just saying
 
lol
 
user7480455
It looks like if I stay with web dev... Iam going to have to learn more of it
 
but not java
 
user7480455
8:02 PM
not looking forward to it but thanks for the info...
 
user7480455
I will chat at you all later!
 
I'm invisible
 
Hi invisible, I'm Kendall
 
are you tho?
 
When he comes in here with a bug about how his java code won't run in the browser, because it's java, I'm just gonna straight up kick him
 
8:03 PM
Let's say I had multiple objects in an array. And I want to merge objects where obj.ID is the same. So like this:

[{ ID:12, Fet: "Donuts" } , { ID: 12, Fet: "Cake" }]

And merge the object's Fet property values into one object when the ID are the same
 
@BrianJ groupBy/reduce
 
[{ ID:12, Fet:["Donuts","Cake"] }]
But that list could be many objects, so wondering how could dynamically merge then by Id
 
groupBy and reduce (or flatten)
 
Ah ok any snippets of that approach?
 
const arr = [{ ID:12, Fet: "Donuts" } , { ID: 12, Fet: "Cake" }] ;
const grouped = arr.reduce((a,v) => {
	if( !(v.ID in a) ) a[v.ID] = [];
    a[v.ID].push(v.Fet);
	return a;
},[]).filter(Boolean);
crap.. why did I make it an array?
 
8:07 PM
!a[v.ID]
 
@ssube I make a point not to access the properties.
not that it's a big deal.. I just make a point to not access them when checking for existence
 
I like properties better than in :\
 
using in for iteration is not great, checking for property existence is fine imo
and is 100% safe
 
well, with a Map you don't have to worry
my avoidance is mostly just policy at this point
 
yea, I just am worried one day a object will have a getter and I'll spend days trying to figure out what the fuck is going on
better safe than sorry, and imo is perfectly readable
so literally no downside
 
8:09 PM
I see what you're saying
I think Map solves it better
 
sure does
but not everyone uses Maps yet
 
immutable.js maps are great for that kind of stuff
 
true. If they don't want to, your version works well.
If they do, you can polyfill map without any es6
 
If I use vanilla js then I use a plain object and in cuz who gives a fuck
 
@Meredith for heavily mutated maps, is it?
 
8:11 PM
Sure
 
immutable has a bunch of uses but that's not one
 
You can make them mutable if you want
 
you can, but you gain nothing in that example
 
& then you still get the nicer api
 
@BrianJ solve your issue? :D
 
8:11 PM
No reason to use native maps ever
 
the API is the same..
 
Unless you want to give someone cancer
Native maps have like 4 methods
 
Hmm ok that's look like a solution then..but this produces an array not an array of objects?
@rlemon
 
@Meredith which immutable method cleans up the insert-or-push logic?
 
4 mins ago, by rlemon
crap.. why did I make it an array?
 
8:12 PM
because that's the only big part of that code
 
change the accumulator seed to an object
remove the .filter
 
@ssube The point is that the function returns a map
 
const grouped = arr.reduce((a,v) => {
	if( !(v.ID in a) ) a[v.ID] = [];
	a[v.ID].push(v.Fet);
	return a;
},{})
 
And you'd never want to return a native map
Because that will give someone cancer
 
@Meredith why not?
 
8:13 PM
Cuz they cant do anything with it
 
returning a collection you build in the function is perfectly ok
even with mutable collections (as bad as they otherwise are)
 
If you return a native map, you can pretty much just get/set values
& there's a useless foreach method I guess
 
all you need to do here is get them
 
You're on the wrong wavelength dude
 
adding immutable maps doesn't improve the example at all
nor will it simplify consuming code
 
8:14 PM
now TS is stripping my JS pragma comments from just .js files and leaving them for .tsx files
 
Yeah dude come back when you're on the right wavelength
You're off topic right now
 
I am growing to hate tsc.
 
What are the benefits of it?
 
type checking
 
oic.. @BrianJ yea I can't think of a way to do it without a second loop. jsfiddle.net/etgq4r1L *with my method
 
8:16 PM
The typescript language, i like
but I am missing babel as a compiler
 
tsc is not great. It's API is fine, but writing your own runner is ugly as hell
not sure what to do until they make tsconfigs work better
 
Why are you trying to do all this stuff yourself?
 
Hmm @rlemon so that second approach create an object in the array for each ID and pushes the Fet values to a sub array in the object for Fet property?
 
as opposed to what? hiring a dev?
 
Lol no. As opposed to whatever @ssube was suggesting as an alternative to "writing your own runner"
 
8:18 PM
I am not doing anything 'myself'.
 
the "alternative" is running the tool itself
 
Well shit I don't know what I'm talking about, just know that you've been butting your head against this for a couple of hours
 
@BrianJ the first loop groupes all of the objects into one large object with their ID being the key. easiest way I can think to group the Fets by ID.. then you loop over the ID's so you can create sub-objects for the larger array and return them
 
It doesn't seem, at least to me, that it should be this difficult to include babel into a project?
 
so.. I guess I have to convert all these files to .ts or it'll think my import Custom-JSX-thing from 'foo'; is unused and remove it
 
8:20 PM
@Luggage OH
I have a fix for at least part of that
 
Oh?
 
just export a dead symbol and actually refer to it
 
I think it's removing the comment because it's right above that line
 
a noop function, useless const, whatever
 
ohh, that's a crappy fix. :)
 
8:20 PM
yep
it's a dumb tree shaker
 
@Vap0r babel and typescript aren't really that hard.. but I have a project with 100's of files, using every babel feature in the book, with some not-quite-standard imports and am converting ot ti TS
so don't let my experience scare you
 
yeah, I was fine until I started using remapped imports and my own JSX factory
 
@ssube danke, didn't have to format
at least, not yet
can sudo now
 
Fair enough
 
I have one mapped import and it's working fine in ts
a webpack alias / TS "paths"
 
8:25 PM
@rlemon sweet :) what if the objects had an extra property , where the property value matches if the I'd matches so..

[{ ID:12, Fet: "Donuts", Name: "DX" } , { ID: 12, Fet: "Cake", Name: "DX" }] Would that map the Name values during the loop?
 
What I don't get about typescript though is its' practicality. I don't have issues with types in javascript. Or at least I don't think I do, maybe it's something I deal with everyday and just don't know better?
 
@BrianJ no
 
/** @jsx XSLFO.createElement */
import * as XSLFO from 'jsx-xsl-fo';
XSLFO.noop; // So typescript will stop throwing my fucking code away.
 
@Luggage so, I haven't smoothed out my bundling process yet, but webpack can handle those just fine?
 
when it throws away the import XSLFO line it throws away the comment above it, too.
 
8:27 PM
@Luggage it wouldn't matter either way, because comments don't count as references and it would be undefined.
I imagine they could fix that if they wanted, though
since they are clearly parsing the comment
 
// webpack.config.js
resolve: {
    extensions: [".js", ".json", ".jsx", ".ts", ".tsx"],
    alias: {
        'shared': path.join(__dirname, 'src/shared'),
    }
}
// tsconfig.json
"paths": {
    "shared/*": ["src/shared/*"]
},
 
dope I'm gonna use that
 
wooo, finally all compiled and my react+custom reports worked.
 
@Luggage ok I was on my mobile will check the code
 
I'm not happy about this noop thing, but I'll live, for now. I plan to covert these all to .tsx soon anyway.
 
8:33 PM
my files are tsx and it was still optimizing out imports
 
well.. it's not quite that.
it's when I pass .js files through tsc that it suddenly doesn't realize it's used.
ohh.. maybe it's not that, exactly.
 
right. I had the same problem with tsx.
the comment isn't a real reference, it drops the import
 
yea, i was never considering the comment a reference
I thought that it was only applying my "jsxFactory" option to .jsx files
I'm not so sure anymore, but I don't care..
 
it's something they should fix in the compiler, imo
 
It is.
 
8:35 PM
but the workaround is small, obvious, and reliable, so...
 
I might eventually have to build src/reports with one tsconfig and src/charts with another
charts are react, reports are not
they just need to support the babel jsx pragma and be done with it.
 
and treat it as a real AST node with a reference
 
well, once it knows that <Foo /> means: myCustomThing(Foo, ...); from the pragma then the import will no longer be unused
so it'll naturally fix
The only reason it doesn't NOW, it that I have to keep jsx: "preserve" on
 
ohhhh
I see
 
8:47 PM
super weak self-answer
 
hey @rlemon a bit confused how to add in the extra property value for matching ID's
This is what I came up with but the Name property take the ID property value ^
 
My react application has a dashboard that would have a component that loads all notifications. I was about to build a page that allowed for CRUD operations on notifications but realized that since this is a SPA that doing another data loading operation could be expensive
My question is this: would it be more react-y to load all the data once, and then be able to use that same object on multiple "pages"?
 
no
 
It seems to make sense but I want to make sure.
darn
 
load the data intelligently
 
8:53 PM
There is nothing about an SPA that makes data more expensive
 
then you don't care where it gets used
 
@Luggage I mis-worded it I guess. What I meant is that loading data for each page would be considered expensive and (I think) unnecessary due to the SPA nature, correct?
@ssube how do I do that?
 
the only thing expensive would be loading data for ALL pages, even those you don't visit
 
Well I wasn't planning on doing that so I guess it doesn't matter what I do with my data?
 
@Vap0r the simplest way is just having an object that keeps track of what is already loaded and makes the requests
you can write that in a dozen lines
 
8:57 PM
@ssube absolutely. Just so I have an idea of what you mean......
 
most robust, the mobx/redux centralized state management/event broker pattern
that is, a controller :)
 
My app has a dashboard that loads resource data, notification data, and work order data. If I were to navigate from there to the notification CRUD page, provided I'm not expecting the data to change rapidly I can just use the same notification data object from the previous page, correct?
 
I prefer to load data I am about to edit fresh
 
Good point
But that's what was meant by intelligent loading right?
 
hmm so instead of this adding the property to the object matching the ID, it creates a new object just for the Name property. Any hints as to how I should be doing this?
 
9:01 PM
Obviously I would have different business rules and I would have to consider how often each dataset is updated and what operations I'm about to perform on said data, but the basic concept of contextually fetching (or neglecting to fetch) data is what intelligent data loading is referring to?
!!afk I'm hourly
 
9:29 PM
I'm out have a good one
 
9:53 PM
@KendallFrey 😬 imgur.com/gallery/r6Hjo
these pics make me wanna play, but then after 3 hours and my ship looks like shit and doesn't get to orbit I rage quit
how are people that good with the attachment system
 
they have a lot of spare time
and no job
living with parents etc.
 
you should make something like this for your car
 
user2620028
10:12 PM
what do you guys think about keyless entry / keyless start
 
had it in a rental once.
it was okay, but it wasn't something that made my life easier by any means
 
user2620028
push button start?
 
yea
 
user2620028
did you have to put the key fob somewhere special to make it work?
 
nope
 
user2620028
10:15 PM
or did it just work by presence or some other feature
 
proximity
maybe seat pressure to make sure I was in it?
didn't test that
 
Keyless entry is awesome. Keyless start is useful on the odd cold morning. Push-button is meh
 
remote starter is not what I was thinking with keyless start
 
user2620028
@luggage i don't mean remote start
 
I'm thinking push button with a keyfob as the 'key'
 
user2620028
10:17 PM
push button or other means
 
Ohh like key fob stays in pocket?
 
yea
 
user2620028
like fingerprint? or rfid + push button or something like that
 
It's nice but not life chanigng
 
user2620028
just cant think of a way that sounds easier than just keys
 
10:17 PM
if the car came with it I'd use it
 
You just walk up and open the door. The cars knows you have the remote on you
 
user2620028
the only reason im seriously thinking about it is it would cost me a lot of money to get the key starter working in my car
 
but I wouldn't pay to upgrade to it
 
user2620028
@rlemon at this point for me it is much cheaper to install push button or something along those lines than it is to restore keyed ignition
 
then go for it
imo it isn't more or less convenient
 
10:19 PM
Are you carbed?
 
user2620028
yeah im just trying to think of the least annoying solution at this point tbh
 
user2620028
@luggage yes
 
Push button on a carb sounds hard
It operates the choke and all?
 
user2620028
@luggage its already wired up with a push button, its just not attractive
 
user2620028
@luggage electric choke
 
10:19 PM
Ohh, ok
 
user2620028
yeah i actually need to remember to remove the manual choke lever tonight XD
 
user2620028
it still has the manual choke lever and switch and whatnot but its obviously not hooked up to anything
 
My only carbed car took skill to start some days
 
soooooo today I met Mathieu "p01" Henry
he's the guy behind many awesome js minification demos
 
10:21 PM
Did you make out?
 
part of me wishes we did ;P
he has a family
 
I know which part
 
user2620028
@Luggage right! lol im installing remote start on it, but i think its going to take some ingenuity to get it primed some days
 
turns out he recognized my name :D
which was like super cool
he works for microsoft now apparently
(btw, this was at a conference in Oxford)
 
!!Afk bar
 
10:24 PM
he remembered some of my pens, it wasn't completely random. He didn't say he loved any of them, but he seemed interested to talk about stuff
tbf I might be the only "Matei" with somewhat of a reputation in programming
also, had anyone ever heard of glitch.com ?
I'm going to use it so much now
host and easily edit nodejs apps with a browser remotely. As in, they host it and run it, for free
 
10:51 PM
also, TIL that there's support for #RRGGBBAA and #RGBA, which is great 😃 (#fff7 is semi-transparent white)
 
@towc It think it should be #AARRGGBB and #ARGB
 
why? The syntax for rgb and hsl has alpha at the end
 
#RRGGBB * x%
 
Because the alpha bits are stored in the first byte
 
does that matter though? the machine could read the bytes the other way?
and won't it need to read the whole thing to determine the colour and opacity anyway?
 
11:06 PM
Neat manatees aren't endangered anymore
 
@Meredith Neat!
 
Means we're one step closer to legal manatee hunting
 
Less neat...
 
ahahhaah sea cows!
 
So these takis I got are criminally underseasoned
But I can't find a way to complain to them so I can get a free bag
 
11:10 PM
if you write to them in crayon and pretend you're 5, they might send you free stuff?
 
Maybe
They don't have an email or anything
Gotta mail them or call them
Or tweet them I guess
Like seriously takis are supposed to be bright red
But these are so pale
They're not spicy at all
 
I read pale and thought you were talking about people
Then you said they weren't spicy
I was so confused
 
Classic ndugger.
 
I've just had a box of thin mints is all
 
You guys know those red waxy potatoes
 
11:19 PM
I think so
 
Why do they even exist
 
I prefer sweet potatoe fries to regular
 
I don't tbh
Not a fan of sweet potatoes
 
Block me then
 
lol, that escalated quickly
 
11:22 PM
How do you block people on here
 
/me blocks ndugger
 
Alt+f4
 
Ew
 
i worry about your health @Meredith
 
11:25 PM
I saw it on reddit dont worry
 
oh in that case
i worry about your mental health @Meredith
xD
 
I have a terrible headache
 
do you guys ever watch simply sara on youtube
It's a cooking channel
 
No
 
11:28 PM
Holy shit. Someone please take that cake away from her
 
She was in a coma once
 
Lol
 
Then her recipes suddenly got "healthier"
 
Less butter?
 
Less mayo
The pizza bake episode is making me sick lol
 
11:31 PM
Mayo pizza?
 
Nah she took 3 cans of biscuits
Cut them up, mixed them with pizza sauce and cheese
And baked it
 
I don't know if that sounds bad
 
I mean I'd eat it
But for some reason it really grossed me out when she was mixing t
 
Probably her massive hands
 
She's lost weight I think
She used to breathe really heavily
 
11:35 PM
Lol
 
This is a classic one
 
Gross
 
Did you ever have heelys
 
they look fun
do they come in business shoe versions?
 
Idk let's see
Man they could've sold so many when pokemon go came out
But they missed their chance
 
11:48 PM
I never had them
We were too poor
 
I never had them either
Doesn't look like they have nicer shoes
Just sneakers
I'd rock some combat boot heelys
 
Lol
 
Maybe I could make my own
 
Do it
 
Reads first paragraph - wait, "fail and error"? They meant "trial and error", right?
 
I guess their point is that they didn't put in enough effort for it to count as trying
idk
Like when your mom "tries" to lose weight
 
Hehe - "and now I'll just eat some nice, pure, butter! this is a great weight loss food"
 

« first day (2357 days earlier)      last day (2585 days later) »