« first day (2377 days earlier)      last day (2587 days later) » 

8:00 PM
@Natarr the addClass method
 
$("#id").css("class");
it's bad?
 
<tbody>
    {rows.map(row => { // violates map contract, but is the closest fitting native array method you can inline
        if (!row.hidden) {
            return <tr>...</tr>;
        }
    })}
</tbody>
And yes, i see how a .filter() would work in this case.
 
Or even better, reject
 
it's a shame JS doesn't do functional pipelining, like Java 8, then there would be 0 cost to splitting filter and map
 
a filter() would no longer be as helpful if it was:
 
8:02 PM
@ssube |>
:(
 
@Meredith even with that, I don't think they can get to the level of lazy evaluation that the JDK does. JS requires the previous elements to exist in too many cases.
The Java 8 streams will only touch elements that will produce a result or can't be known not to.
 
// if your map had this, then you'd need a more complex filter(). or just violate .map
if (condition1) {
    return <A>;
else if (condition2)
    return <B>;
} else {
    return null;
}
 
Nah you can handle it like elixir
 
i.e., [... 1 million elements].filter().map().take(1) will only touch a few elements, until one returns
 
Just have 2 different structures
Arrays are eager, streams are lazy
 
8:04 PM
yeah, that'd work
 
@ssube it worked thanks!
 
generators
if (!hidden) {
    yield <Field />;
}
 
generators and streams go together like promises and observables
I wonder if you could implement lazy streams as generator-generators...
 
How would filter look like in this case?
 
tagged template generators
 
8:06 PM
someday I will understand how generators work
 
@Vap0r filter(item => !item.hidden).map(visibleItemsOnly => ...)
I've been toying with a thing recently where I don't use arrow functions in my functional methods, they all take library/utility predicates (truthy, falsey, reduceSum, etc) or functors.
it makes for extremely readable code (stuff.filter(truthy).map(pluck('foo')).reduce(sum)) but is kind of a pain
 
OK, Bartek
2
 
lol
 
damn burn
 
I am appropriately shamed.
 
8:09 PM
what has more characters? truthy? or x => x?
 
I <3 Bartek though tbh
 
@ssube should that work on a json structure as well?
 
Boolean
 
@ndugger which is more immediately obvious and triggers the hotspot compiler better?
 
your mum
 
8:09 PM
the hotspot compiler went into stack overflow when it tried to run on my mum
 
@Vap0r Btw just to be clear, you shouldn't have to iterate over maps (key-value maps not Array.map)
 
@Vap0r it should, any JS object
 
That's pretty smelly
 
ssube you are supposed to call other people's moms hot.
 
@Meredith so I shouldn't have to iterate over my object schema to dynamically generate the fields?
 
8:11 PM
I mean by definition if you have to iterate over it, then it isn't a map
 
ohh, is this?
 
So what should I be using?
 
ohh, object.keys. yea, don't do that if you can avoid it
 
A keyword list
 
It does not guarantee order
 
8:12 PM
it partially does now
as of es6
 
[{ key: 'a', value: whatever}, { key: 'b', ...
 
ohh, in the spec?
 
well, objects do, not sure about .keys
objects as of es6 guarantee keys will be visible in the order they were inserted, which is... essentially worthless
 
well, a map like you have so you have, but then list the fields you want in THIS form in an array.
 
it's raining so bad outside right now that I'm thinking about working late.....
 
8:13 PM
// all fields possible
userFields  = {
    name: { type: 'string' },
    age: ...
}

// fields for this form, may with additional options
userFormFields = [ 'name', 'age', ... ];
miniUserFormFields = [ 'name' ];
 
miniUserFormFields?
 
@idjaw it'll pass
like 20 minutes from now it'll be sunny
I got hit with it at like 2:30
 
I just wanted to show that it also lets you have multiple forms defined.
 
How do I do that dynamically? Or do I have to pass all that crap down the whole chain for this to work?
 
just loop over that array instead of object.keys()?
You can also do what @Meredith said and jsut make one array, but I use this method that I pasted.
 
8:17 PM
How does that array get generated?
 
you make it
 
OR: put an "order" property on the fields.
Or just hope that Object.keys() always returns them in the same order like you are now.
I probably do that here and there..
 
How does json-editor ensure order?
 
it has an order property
 
8:18 PM
Object.keys(obj).sort(sortingFn).filter(fn1).map(fn2);
just to be sure
 
I don't think order is in the real json-schema, it just allows it for this purpose
 
Jesus I'm shore glad my code is getting prettier
 
sure*
 
pictureofJesusWalkingDownTheBeach.jpeg
 
shore
 
8:19 PM
@Trasiva I wanted everyone to enunciate it shore
 
pauly shore
 
@Vap0r Gorsh, you're Goofy.
 
@rlemon spoiler bro
 
Lol
 
The fact that there's less women in tech isn't JUST a culture issue, it also has to do with the IQ bell curve differences between men and women. From what I've read, there are, simply put, scientific differences between how well men and women do in subjects like maths and science, vs other subjects.
 
8:20 PM
@rlemon But really though don't do this
 
also interest levels, ndugger
 
Array.sort is slow on nearly sorted lists
 
No more Bill O'Reilly at Fox :(
 
:)
 
🎉
 
8:21 PM
@Meredith I doubt for the number of items I'm iterating over that it'll matter
 
@Luggage I bet you interest levels are correlative to the IQ bell curve
 
/s
 
Kendall's just sad that he doesn't have someone else to laugh at in the US anymore.
 
Well, I still have people to laugh at
 
@Vap0r It is actually a non-trivial performance issue
 
8:21 PM
but comedy won't be quite the same
 
@Meredith what's the complexity difference?
 
@KendallFrey You still have Info Wars to enjoy.
 
I can only watch info wars when you edit out his nose
 
this is a new thing to me
 
8:22 PM
@Vap0r Depends on the size of the array cuz js uses different algorithms at different sizes
 
@KendallFrey ...seriously? You haven't heard of Info Wars?
 
@rlemon I fucking love this guy
 
@Trasiva lucky 10000?
 
@KendallFrey just watch the video I posted
 
@KendallFrey Apparently. Watch the video Lemon linked, then go binge on it.
 
8:23 PM
Did you miss the info wars vs Young Turks brawl during one of the presidential debates?
 
And please remember that one of his followers, without EMPIRICAL EVIDENCE went to the pizza joint at the center of Pizzagate and started shooting up the place. On top of which, Trump's a huge fan and listens regularly too.
 
@Trasiva yea I think if you're going to start with alex jones you need him no nose first.
 
@rlemon I agree, it's a lot harder to take him remotely seriously that way. I'd never seen this video, kudos.
 
there is a whole set of them.
 
Seriously though, this guy makes Bill look like a fucking saint.
 
8:25 PM
You mean this isn't satire?
 
@KendallFrey no
 
@KendallFrey Newwwwwwwwwwwwwwwwp
 
oh my god
 
@Luggage Say wut?
 
he legit thinks Hillary Clinton is an intergalactic demon?
i mean how
 
8:26 PM
He believes pretty much every conspiracy theory. His favorite to revisit is chemtrails.
 
@Luggage Ho. Lee. Shit.
 
about 3:00 is where it gets bad
 
i mean, he just appears to believe them, based on the actions he takes. kinda like a politition?
 
8:29 PM
@Luggage I just hit that, haha.
 
you can't see it there, but jimmy dore spits in alex jones' face (not a classy move)
 
> Is Trump gonna have babies with a goblin and hep the new world order like Darth Vader?
 
@Trasiva lol right?
 
@ndugger Oh god, my sides.
@rlemon I mean, it wasn't much of a fight. I'd have paid money to see that.
 
@Luggage that actually cracked me up
 
8:36 PM
!!afk 💣🚽
 
be safe
 
💩💣
 
🚽        🏃               🌮
3
 
Someone get that man a squatty potty
 
i can't see the emoji on the right
 
8:39 PM
es taco
 
At this point, I'm nearly convinced Alex Jones is suffering from some terrible mental disorder
 
his lawyers in a court case said it was all just a 'show' and you shouldn't take him seriously.
 
I think he's like Bill Oreily, who doesn't believe a word he says, but he does it for the views
 
so, you can take that for what it is
 
8:41 PM
Don't stigmatize mental illness
 
What the fuck does that mean?
As someone with mental illness, I want you to stigmatize it more
 
16 mins ago, by rlemon
@KendallFrey no
 
well, see that's debatable.
I believe it isn't satire. his lawyers wanted to win.
58 secs ago, by rlemon
so, you can take that for what it is
 
You keep doing that @ndugger it will lead to astigmatism
 
The good news is that Chaffetz won't seek reelection and O Reilly was fired from Fox
 
8:42 PM
I already have that too, @Vap0r
 
Also, if it's just a show, where does calling Ana a "little jihad" come from?
 
in my left eye
 
@KendallFrey wat, who? Ana Tudor?
 
His lawyers are just taking a leaf out of Trump's election playbook.
 
If I have a public facing endpoint that needs to be accessible by only clicking a link, and simultaneously needs to provide identification of a model...it by nature cannot be truly secure, correct?
 
8:43 PM
Sorry, didn't mean to stigmatize your astigmatism
 
@Allenph correct?
 
I accept your apology
 
@TylerH Kasparian
 
@TylerH ?
 
8:43 PM
@Allenph clicking the link fires a necessary event or you just want it to be a URL that is not published?
 
@KendallFrey you can see how some might not believe his lawyers :P
 
mm yeah lol
 
@TylerH My app sends a link to people. I need random people who do not have an account to be able to click the link and affect a model.
 
Hey @Luggage how should my handleChange event look like in InputField?
 
@Allenph random people with your app or random people like me who are trying to visit the link outside of the app?
or both
 
8:45 PM
The second one.
 
If it's just within the app then simply don't show it to people who shouldn't see it and you should be fine
 
@TylerH
It's not.
 
If you truly want the security for anyone then you need some kind of authentication from the app that pairs with the action of visiting the destination
like showing up to a party with an invitation vs without one
You can hear about the party but if you show up to it then the bouncer needs to check for an invitation
This is possible, I'm sure, but depending on your infrastructure may be way more complicated than the rest of what you're doing
 
!!afk 🏃‍♀️
 
!!afk home, poop, hangout
 
8:50 PM
@TylerH What about just a simple random token for every message?
 
@Allenph As long as that random token can be verified by the destination page
 
That's no problem.
 
Where is the link taking you? Another view within your app? Or a separate website by you?
 
It's safe to put IDs and the token in GET vars. At least I think.
@TylerH A view in my app.
 
Yeah it should be pretty trivial then
 
8:52 PM
Doesn't really matter where the link takes you though. I just need some kind of "I am who I say I am" and "I can't leave 9,000,000 models instead of just one."
Without a signup.
 
0
Q: How to remove Google Drive Ubuntu?

user251223I made my biggest mistake of my life and installed google drive on Ubuntu. Now I cannot uninstall it anymore. - I uninstalled the google drive package: sudo apt-get remove grive-tools sudo apt-add-repository --remove ppa:thefanclub/grive-tools I deleted the all the accounts under Online Accou...

 
hi
 
looking for some advice on this strategy
 
@Allenph I am Sam. Sam I am.
 
8:59 PM
!!afk 💩 🍺 🍁
 
We want to store credential sets for a user, so they can use those credentials to execute query's on different systems. Each user can have one or more set of credentials with each credential set linked to a specific URL
Any tips on how we can store the credentials without seeing them, like a hash of them and just return to the user when logged into our dashboard?
 
use a decoder ring and send them the codes.
damn that image is large.
 
soo large
 
@Loktar Rofl.
 
that's what she said
 
9:00 PM
sorry I have no real advice though :p
 
ah ok, like is there an API we could use to create the hash of each credential set? And only return the plain text if they are the owner of said credentials.
It's an internal app so won't be accessed by people outside the network
 
@Loktar in the modern world, just put a chip in her.
 
@BrianJ you encrypt them
 
Can someone tell me why I'm getting an undefined object after this function ends? I'm pretty sure I am assigning to the referenced object.
 
@parents: Have you ever felt the urge to ssh into your childs brain?
 
9:02 PM
take any data you need (user id, permissions, and expiration), encrypt it with an keypair, and use that
 
@ndugger is the hangout started already?
 
@Shrek ndugger is afk: home, poop, hangout
 
because you invited me for 6 -_-
Where is the link ?
 
is this a bad idea? module.exports = eval("exports")
 
yes
 
9:04 PM
@ssube so they enter their credentials, it gets sent to be encrypted as a keypair. We store that keypaiR in our DB. But how does the owner user decry-pt that keypair? If you had a diagram that would be sweet
 
not sure why the eval is needed now that I think about it
 
@BrianJ they don't. You don't need to store it either, unless you want to revoke it later.
 
@Shrek i think it's still an hour yet
 
-5 ?
 
The beauty of asymmetrical key encryption is that the data verifies itself. If you can decrypt it, you were the one to encrypt it.
 
9:05 PM
why do timezones exist -_-
 
because encrypted data appears random, there's no effective difference between sending a random session token and sending the encrypted payload
 
@ssube hmm do tell
 
@Shrek at least they're better than the old way
 
@KendallFrey we should all just be using UTC
 
obviously
 
9:06 PM
@BrianJ it's just how encryption works, the whole point is that nobody without the key can encrypt new payloads.
 
I'd not mind saying the meeting will start at
!!> Date.now() + 3600 * 1000
 
@Shrek 1492639639194
 
@ssube so where do we store the user's key?
 
@BrianJ You don't need to, but you can store them anywhere, since an encrypted payload should only be a few hundred bytes.
If you don't want to allow people to revoke keys, though, you don't have to store them at all.
 
what is the simplest manifest offline version of an app you guys have come up with?
 
9:08 PM
It's how github and most other services do their personal access tokens.
 
@ssube so they need to have access to multiple systems using different credential sets, from this dashboard
identified by their username on the dashboard, they should be able to view their credential sets
 
take a look at Amazon's IAM credentials or Github/Gitlab's personal access tokens, that sounds something like what you want.
 
^^ yup. Agreed. Don't re-invent
 
wait a sece
 
leverage what other proven solutions do
 
9:11 PM
are we talking about auth?
 
don't suggest JWT
 
I'm not going to
lemme read up
 
unless you're also using jQuery
 
speaking of auth...just did a MFA feature using github.com/speakeasyjs/speakeasy
 
@BrianJ What exactly do you want to achieve? Do you have an example that involves the entire process flow you want, what capabilities the user has?
 
9:13 PM
@ssube @Shrek so the use case. The user will be logged into our dashboard internally.
 
@BenjaminGruenbaum hmm, is there a reason why issues are disabled in the repo?
 
How the heck did the convo go into requiring device keys?
 
gimme a sec, I'll post the use case
 
@Shrek the initial question I read was about creating and handing out secret keys.
that might be off, though, depending on what exactly is going on
 
That depends entirely on his intended use case
he'll probably need to build his own PKI
handing out secret keys, what could go wrong :D
@ssube am curious why did you think I'd suggest a jwt?
 
9:15 PM
always hand out your secrets, then you can prove they haven't changed
@Shrek cause people do all the time whenever somebody says "token" or "encrypted."
 
lol its just a token god-damnit
 
like, you can encrypt data without making it a JWT
but for the average jquery user, that's a stretch
 
hahaha
 
I've been playing with a few variants on the encrypted-revocable-token concept for auth, so if you have any tips or articles on it, send em over.
 
@ssube What exactly are you trying to achieve?
 
9:21 PM
my use-case is about the simplest you can have, just need roles and basic shiro-style (foo:read,bar:*:read,write) permissions. I want to make stateless sessions and pass em to the user, maybe (but probably not) have a public key available to read your sessions.
gonna have a variety of clients hitting it, hence having some simple and user-visible (if not user-readable) token
my instinct was just to encrypt my JSON sessions, throw em in the auth header, and call it a day
 
Revocable becomes a problem here :P
 
that's a stretch goal
honestly, since I'm just writing a game, being able to revoke all tokens from before X is fine
 
We recommend using a JWT for what your are doing @Auth0
 
I'm planning on using the token part without the JW metadata leaking. :)
 
9:25 PM
so here it is
hope t makes a lick of sense :P
 
@Shrek I like the look of that library.
 
@BrianJ ugh
Please get a security engineer on this
What you need is a token to access the dashboard after the url has been entered. Talking to devices securely, depends who is talking to who?
 
yeah, that's a little much
 
Can the user talk to the device directly? As in without a server between them
 
or, can the dashboard make a request to the appropriate devices with its own credentials? Do you really need every user to make a request, proxied by the server, every time?
 
9:28 PM
> Can the user talk to the device directly? As in without a server between them
 
why not have the dashboard app poll the services for health, store that, and then just worry about which user gets to see which services?
 
It all boils down to that
 
2 parties >>> 3 parties, regardless of which 2 (here)
 
much easier to resolve aswell :P
also all the talk about certificates and pub keys
in ssube's arch
 
will be useless for this :D
 
9:30 PM
the device can send data to the server on https:// and that'll be decently secure
 
most of the time you don't need portable, encrypted sessions
I just care about users seeing and pasting them around
 
@ssube have a look at nacl.cr.yp.to (if you really feel like re-inventing the wheel)
 
our endpoints are https in the dashboard, What do you mean without the server between them?
 
Can Alice by means of some app talk to your device directly?
 
@Shrek I do not, not with security. I just don't want to fuck around with JWT and the awful libraries for them.
 
9:32 PM
@ssube you can use Auth0s :P, being our bread and butter, we take JWT & our libraries very seriously.
 
By " have the dashboard app poll the services for health, store that" do you mean the dashboard will have credentials for all Health Checks and only show to the correct users?
 
I haven't heard good things about the Auth0 one, any more than the others.
 
@ssube which library is it? Node?
 
has it been compromised yet?
this will be node+electron+browser stuff
 
so jsonwebtoken
 
9:34 PM
@Shrek you mean can Alice talk to the devices she needs to run the health checks on directly via an app?
 
@ssube can you give me an example of your user-facing scenario?
what will the user have to do?
 
JWTs advertise information I don't care about and so far all the libraries have attacks against them.
@Shrek think github's access tokens
 
Static (aka create once use forever)
 
hm. I'm not sure how often they'll rotate.
 
Why does the user need to copy them?
@ssube again, give a user flow.
There are specs to solve most of the problems in this case ;)
 
9:36 PM
oh and no @ssube no it can't make a request to the appropriate devices using the dashboard credentials..the other devices all have different credentials
 
simple use case, you have Alice the player, who connects via Electron app. Logs into the server, gets a token to use. You also have Bob the admin, who connects via a Node cli tool, and passes the token via ~/.foo/credentials or --token 0xABCDEF00
 
In MVC do you guys consider it acceptable to not make a seperate table for certain things? (I.E. Store emails or phone numbers in a bunch of places?)
 
@BrianJ yes
 
Or timestamps for that matter.
 
@Allenph what does MVC have to do with your DDL?
do you mean HTML tables or database ones?
 
9:39 PM
Database tables.
I mean...MVC has models.
 
@ssube re: JWT yes libraries have attacks against them but if you implement your application safely you are very easily safe from them. We have examples out there which help you do this. All of libraries we maintain are open and battle tested we also are the first people to release a fix should a vulnerability be discovered.
 
MVC does have models. You should not be using them to dictate your database schema.
 
And you "shouldn't" store a bunch of similar information in multiple tables/models.
@ssube Fine. Database design.
 
@Shrek then no she can't, the dashboard credentials don't match the other systems to check
 
@Shrek What does JWT buy me over a simpler method?
 
9:40 PM
I'm not recommending JWT to you :P
now on your problem scenario
 
ah, ok
 
The question remains the same. Is it acceptable to have a bunch of timestamp columns that have to be validated by a service method or something instead of a single table with all the timestamps in it and a mess of relational IDs.
 
I think we need to meet with the security team this week. I don't have enough wisdom on the subject tbh
 
if the user never needs to read them, something like iron should be fine
 
iron?
 
9:41 PM
@Allenph if you care about the timestamp for an entity, it should be stored with the entity.
 
@ssube Exactly.
 
@BrianJ that was for ssube
 
But in my models in my code, I want to avoid SQL errors being spat out, so I have to validate that the data I was sent is indeed a correctly formatted timestamp string.
 
@Shrek read, in the understand what it contains sense, never. Read in the ASCII-safe to copy and paste sense, often.
@Allenph I mean, you should be validating everything, but the timestamps usually can be generated on/by the server.
 
I really don't like users copy-pasting tokens :D
 
9:43 PM
@ssube Emails or phone numbers then.
In this case the timestamps need to be validated.
 
ah ok at a glance what do you think would be a good approach? considering the systems to check use different credentials from the origin dashboard
 
In a couple places in a very similar manner.
 
@Shrek What else would you suggest for the CLI, then? Everything I use has a dot file or something pretty basic.
 
PKCE (a cli is a native app :P), some type of password less auth and copy-paste as the last resort.
@ssube try heroku cli or webtask cli ;)
 
I've used Heroku's before, didn't pay much attention to the auth. I suppose at this point copy-and-paste isn't necessary, some credential file (potentially an unreadable one) would be plenty.
 
9:47 PM
which auth are we talking about?
 
this is for a side project I'm working on, trying to figure out a nice way to do user tokens
 
@FlorianMargaine o/ o hai!
you are looking gorgeous!
so room call?
 
@ndugger marketing
 
@ssube ndugger is afk: home, poop, hangout
 
so
how do we join the hangout?
fuck it :P
 
9:59 PM
@Shrek No, click the damn link in the damn email
 
is anyone here familiar with writing Chrome extensions? I did it many years ago and had a few general questions
 

« first day (2377 days earlier)      last day (2587 days later) »