« first day (2413 days earlier)      last day (2760 days later) » 

17:00
it could.. but there are differences
Everything is currently executed in a static context. So FormFunctions.<funcName>([params])
What would the differences be?
@BenFortune I found the problem to be IE didn't like that the element wasn't in the DOM. I am using a library called wijmo and it was (and still is) failing inside there, but now I know why!
@SvenTheSurfer Well that's sort of a given...
@Vap0r probably none for your use case.
@Zirak are those commonjs vs es imports slides public?
@rlemon ok cool. Would I export default function, or would I export default class FormFunctions? And wouldn't all my functions have to be labeled static?
17:03
@BenFortune sure, but I didn't realize chrome and Firefox just ignored that.
@Vap0r if you're not instantiating a class ever, no need to export a class.
@rlemon ok thanks!
export default function foo(context) {
  return {
     method1(obj) {
         // use context and obj
     }
    method2() { ... }
    method3() { ... }
  }
}
@SvenTheSurfer Oh I get you now
import foo from './foo';
const formControls = foo(context);
17:05
wtf is this shit
I got deftones
@SvenTheSurfer Repro'd with jsfiddle.net/xg11qvcL
You're upset that a buzzfeed quiz got something wrong about you.
neat. Appreciate the pseudocode. I'll have to find out the implementation of this method because if the context can be expected to change between formFunction requests I should probably move the context to each function. If it isn't going to change then I like your implementation much better.
Gracias
Well no I do like deftones but they're not an indie band
ahh, if the context changes between, then just export the utility functions
    export function blah() {}
    export function blarg() {}
    export function hooplah() {}
    export default { blah, blarg, hooplah };
17:10
@SvenTheSurfer Seems to happen if you don't set a type for your input
@rlemon then my import would look like this, right?
import FormFuncs from './foo';
import { blah } from './foo';
import AllTheThings from './foo';
import * as StillAllTheThings from './foo';
That's entirely too useful
it's important (for me at least) to note that import syntax is not destructuring. it looks similar... but it isn't.
export default { foo: 1 };
import { foo } from './module';
this doesn't work.
Since I didn't know that I'd say it's important for me too.
17:15
Lol, Zuckerberg went back and got his degree
Something I don't understand though. export function blah () is allowed, but export blah = () => {} is not
@BenFortune Sorry, I don't fully understand. Your fiddle seems to work without any problems in IE.
there are a few good articles on named imports and exports. I'd take a gander at them
@SvenTheSurfer I had it throwing the error
@Vap0r anonymous functions don't have names m8
17:17
@rlemon Dude you just blew my mind I don't know how I never picked up on that before. I thought they were equivalent. One way I'm running a named function, and the other I'm running what is basically a pointer to an anonymous function?
s/pointer/pseudo-reference/, but mostly yes
Awesome
@Vap0r if you'd have thought about it without lambdas you'd have seen export function() {}
which ofc doesn't do shit.
@Vap0r now with that said....
export const blah = _ => {};
^ that should work fine.
that makes sense.
Should that be an underscore?
I use underscore to denote a garbage var.
in this context _ and () are serving the same purpose.
17:21
I didn't know you could put just anything in there.
function foo(neverGonnaUseThisVar) {
  return "NeverGonnaCareAboutIt";
}
foo("Never gonna run the code, and have it matter");
it's a regular param, just never used or cared about. it might have something in it if you pass something to the fn. but I don't use it so meh
What's this called? I don't understand why an underscore would be allowed there and not some other character. I'd like to read more about this so I don't keep asking you questions about basic stuff and looking like an idiot the whole time.
Mainly the latter
> it's a regular param
const blah = a => {};
const blah = _ => {};
are the same.. except i know in my own code _ is an unused var.
I wish underscore wasnt a thing
Like the library
I don't use it but I still associate a _ variable with it
@Vap0r I wouldn't think too much on it. it's a practise some people follow and others think is silly. use () => {} if it makes more sense to you
17:25
In elixir you can't read from the _ variable
Huh that's crazy I didn't realize _ was a valid var in javascript all by itself which is why I was so confused.
Which is nice
It's a lot less confusing
@Vap0r all symbols are tmk
even unicode
!!> var 💩 = 123; console.log(💩)
@rlemon "SyntaxError: illegal character"
ohh piss off cap
17:27
!!> var [ = 123; console.log([)
I could never get emoji's working in js
@Vap0r no
@Vap0r "SyntaxError: expected expression, got '='"
sorry, I was way off with "all symbols"
I am using jsTree to create a tree structure. I am using "contextmenu" plugin to make changes to the tree structure, but I want to capture any change made, highlight that node and also create list of all the nodes to say "Pending" and then send an email notification for a person to verify the changes and to actually make the changes.
Not sure how to go about doing all of that since I am new to Javascript?
!!> var ಠ_ಠ = 123; console.log(ಠ_ಠ)
17:27
@Meredith "undefined" Logged: 123
It seems to me it's rarer for a symbol to work.
@Meredith niice
symbols that double as operators don't work
ASCII punctuation and symbols, mostly
The rule is that unicode letters, $, and _ work
and #
17:29
@BenFortune savage
I don't think # works
!!> # = 123
@Meredith "SyntaxError: illegal character"
My bad
@BenFortune should i not ask the same question in here?
@CatFox the question is rather broad, asking in here is probably the better place to ask.
I thought that AFTER I posted on the forum :/
because then we can tell you to make a demo and be more detailed.
i have a demo going, but it's on a protected server
@CatFox yea, but the post you made is a broad post.
17:31
!!> \u1F601 = 'foo';
@BenFortune "foo"
Chrome doesn't let you use zero width spaces in variables apparently
whitespace generally isn't allowed
but that unicode spec is damn near unreadable (and I enjoy reading specs)
My bad I was testing zero width space not zero width joiner
@CatFox stackoverflow.com/help/mcve your question as it stands is way too broad
I'd read that and then see how you can improve it
17:34
!!> var a‍ = 5; console.log(a)
@Meredith "ReferenceError: a is not defined"
There we go
Chrome console you smart
!!> ; = 123;
@rlemon "SyntaxError: illegal character"
17:36
😬 unicode doesn't wanna work for me
It needs to start with $, _, or a letter
@CatFox A good start would probably be jstree.com/docs/events
!!> foo; = 123;
@rlemon "SyntaxError: illegal character"
17:38
!!> ℘·· = '🍔';
@ssube "🍔"
ID_START is oddly specific
that particular character is grandfathered in, because that's a thing for letters now
Weird
can you stab someone with an apple?
yes
17:41
it's not very effective
freeze it first.
Is there a list of characters with ID_START?
@ssube Unless you stab them anally
@rlemon Will do, thank you!
17:42
@Meredith Sort of. Table 2 describes the ranges that are allowed in it, those map to Unicode's "general categories."
Man
I'm so glad I don't do shit like that for a living
right
if i created my own node module "hellothere", and i want people to run it in their command line to know their installed version .. $ hellothere -v ?
is there a node way already created for that? or an npm package to install for that?
commander
probably a dozen others as well.
You can do it without a library pretty easily too
17:45
I use nopt for parsing args and do everything else myself
if([...process.argv].includes('-v')) console.log(require('./package.json').version);
that sounds good..
I've used commander, command-line-args, some other similar one, and just parsed argv myself.
depends really on how much work you feel like doing yourself.
i thought there might be a native node way without libraries too
const [,,...args] = process.argv;
17:47
@BenFortune that looks good
done
@JoeSaad Don't use that
why not?
Because it's bad
even if you wanna do it yourself. check it out
17:51
is there a conventional popular way?
No
Everyone does it slightly differently
you can parse out argv, or get a library that does it for you
alright, i'm looking on those two packages then.. thanks everyone
the only "convention," such as it is, is not to break POSIX shells
@rlemon it seems to me that commander, i have to specify the version number there manually
it doesn't seem to read from package.json
17:56
hm. I am looking for a way to automatically include just the bits of core-js I need for IE11.
@JoeSaad program.version(require('./package.json').version)
Cmon, use your initiative
what initiative?
we rolled for initiative this morning
yeah that's why i liked your initial answer but then you told me not to use it
it's his turn now
17:57
My thoughts
i liked that:

if([...process.argv].includes('-v')) console.log(require('./package.json').version);
There's so many things wrong with it.
whoa now
@BenFortune That's a thing?
@Meredith Which part?
17:59
oh ok
@JoeSaad you're going to have to like.. you know.. tell it what to do with each command entered.
Ahh. I got it. I'll compile my code with babel-transform-runtime, grep for "babel-runtime/core-js" and that'll show me all the things I'll need to polyfill.
ohh FFS.. I was using app.use(new googleOauth20.Strategy(...)) instead of passport.use
took like ten minutes to see it
typescript would have told you. :)
the error was quite descriptive. app.use expects valid middleware.
I forgot I needed to pass that to passport and not express directly.
brain fart + they both use .use
18:14
how do i run the "bin" of my npm package locally before pushing it to a repo?
without doing link, is that possible?
you mean how do you run a .js file in node?
!!afk enjoy
node yourfile.js
Consider that question a hint
ohh, nevermind.
18:15
like, yknow, everything does
yeah, so i don't need the link
ok
put the js file in a zip, upload it to your apache server via ftp, then ssh into it and compile it via visual studio, then you can debug it in notepad++
@ssube you got it
sorry
thanks
Down 5lbs guys :)
Just from dieting
@SterlingArcher I'm down 5lbs from drinking more water.
18:17
I ate an apple today
I had a nice BLT sans the B for lunch
I wasn't in the mood to sit there and fry up some bacon over my lunch
lettuce, tomato, salt, pepper, and a bit of butter
good stuff
Are you ok
    import dotenv from 'dotenv';
    dotenv.config();
    const server = require('./server').default;
    const { PORT = 8080 } = process.env;
    server.listen(PORT);
I'm really not a fan of this.
but I need to load the env configs before the server is loaded..
ideas?
I can just load a config file the normal way I suppose.. but that's less fun
18:24
@rlemon There's a preload thing
I'm giving a presentation on Meteor next week
Is it too late to kill myself?
no you've got an entire week
bonus points if you do it in the meeting
> And here's a con of meteor :shoots self:
@SterlingArcher That'd probably portray it very well
18:38
@SterlingArcher I'll give you a thousand dollars to do it.
@rlemon Yea, but that's so hard to prove when it's the case.
read the article - it isn't hard to prove, it's hard to take seriously.
proving a file was never viewed, and that the pc does have a virus is easy
getting a court to pay for the forensics is hard
Not to mention the (understandable) prejudice from the accusation.
I bet it's easier if you don't run AV at all.
18:50
@rlemon you had showed me earlier what to do with my FormFunc functions. What if I were to have like 20 form functions? Is there an easier way to export those than specifying export default {each, and, every, function, i, need, etc...}?
man browserstack is slow and shitty
20 functions in the same file is probably too many
I prefer named exports and import *
and you can do export Func from './func'
so you can just have a folder with utils and one index.js which exports them all
import the folder
^
much easier to work with
@ssube these are all validation functions now. We have like 3 password validation functions, 2 email functions, and a bunch of others.
18:52
then have a file with the password stuff, a file with the email stuff, etc
that's a nice natural split
foo.js
export default function foo() {}
bar.js
export default function bar() {}
index.js
export foo from './foo';
export bar from './bar';
app.js
import * as fns from './folder';
or export default {email: [foo, bar]}, if you wanna get real fancy
That's insane dude I've learned a bunch about import/export today. I didn't know it was so versatile
import {email} from './Validation'; if (email.every(fn => fn(value))) { /* valid emails only */ }
like I said .. go read on named imports/exports
there is a lot to take in, but it is worth it
18:54
they can make your code so much cleaner
@rlemon HOW HAVE I NEVER HEARD THIS ONE TILL NOW
dank chiptune music is better than pantera
//kick
and I like chiptunes
18:56
Pantera is dope
and that's a good album
well, what I've heard of it
What do you guys think about index.js files with a bunch of require()s? Or do you just set the sources as an entry point?
@rlemon yep! Scatter them to the winds zirak.me/modules-slides
@Vap0r ^
@Zirak ty
@SterlingArcher listen to more Pantera?
19:01
@jake why not both?
@rlemon The horse gif is great
boop -> mlem
The hangouts thingy sounds nice, but "evenings" and "afternoons" isn't well defined
@rlemon I was just wondering what the accepted solution is. Just got into WP. I made my first plugin the other day. chat.stackoverflow.com/transcript/message/37277907#37277907
there is no accepted solution. everyone does their own thing
giving the option to only export a fn in the module is nice tho
19:08
@rlemon @ssube @Zirak thanks for the help and resources guys. I guess I have some reading to do. Bossman says we have to port the code over first, then we can mess with some of that but he likes the separation of each validation function into its' own file within a "validation" folder. Probably end of month next month.
Stoked!
don't forget export * from ...
// validation/validation1.js
export function validation1() {... }

// validation/validation2.js
export function validation2() {... }

// validation/index.js
export * from './validation1';
export * from './validation2';
19:25
Always something.
can't call super.someGetter
makes sense, super is weird
I've mostly stopped using getters and setters, they seemed to complicate things more than they helped
still. Another thing that worked in babel and not in TS.
It's getting hard to defend against @ndugger s if this keeps up.
Fortunately. i just search and I only do this ONCE in my code.
it's not an especially common pattern, I don't think
So, I can deal with it, but it's still another small thing that took too much time.
plus all of ndugger's complaints are based on "it tells me I'm wrong", so I'm not worried about that :P
19:36
mobx is all about getters and setters.. so, while I can't imagine ever inheriting a parent with a mobx observable, it could happen.
I take that back. I can imagine it easily.
@KendallFrey youtube.com/watch?v=0V2qAO2Bf7g lol god dammit
@Luggage I'm not sure what happens if you inherit an observable and your class is also observable (and it seems odd that only one would be).
Does it observe everything or do they get mixed up?
you should just get all the props.. but i don't know hwo the special $mobx property deals.
i don't know, is the answer.
Who knew JS was complicated?
obama
fuck progress, let's go back to putting everything in the global namespace
19:40
@KevinB thanks
I put all my variables in redis
@rlemon I love that show.
so do our developers
@Luggage variables are bad /s
still, better than my last gig, those developers refused to even use redis because "the latency was too high"
19:42
was the redis server in china?
this third party we're working with stores everything in separate global vars. not even a namespace, just 15 global vars.
all prefixed with a seemingly random number
a "magic" number.
it was in the same rack with a fiber connection and ran through OpenStack's network
so it was sub-ms
they were just really bad developers
Did they use mongo instead?
no, actually. One of the most senior ones wrote his own distributed cache that used Akka threads to chat between boxes with a bastardized form of RPC.
It broke, immediately.
19:43
Most developers are bad developers. I can be a bad developer.
Ah. Not invented here?
We told them to use Redis, the VP told us to fuck off, most of us quit (simplified ad absurdum)
> screw redis, i'll make my own. and use jQuery for my front-end "framework".
@Luggage nope, management's special friend who always knows best
the "senior" developers just happened to have worked with the CEO 3 gigs ago
hey, networking is how the world works.
From now on, we'll call those people "kushners"
> This fuckin' kushner made his own redis replacement. It sucked.
lol
that's pretty much how it went down
I'm curious how that company is doing, but everybody whose contact info I have has quit.
not just my team, either. I don't think I know anybody who's still there.
19:48
Hehe. I still have occasional contact with the shitty place I left 1 year ago. They are years behind in simple migrations of new users from companies they bought.
and one of the intelligent ones (but, I suspect, lazy or broken) left. I found out recently.
After I found out, I disabled access to a data center. No one told me. I don't even want to be in control of these servers for a company I don't work for, but they are so incompetant, i think they forget they even have them
are they paying for them?
yea.
The contract runs out in a couple months. They've been 'trying' to move them for over a year.
that happened so many times at my last place
Judging from previous experience, any server/functionality will be moved in the 24 hours running up to the deadline
every file sharing servers (for clients to dump their rosters on)
they did it with sharepoint and exchange a few times, iirc
19:51
and will be broken after that for days/weeks
I just have loyalty to my users. That won't last forever, though.
They need to get off their ass and take over development instead of paying some contractor for a rogue project.
yeah, I could have let so many things break when I left, but I couldn't do that to my team or some of the devs.
and the ones that I wished ill on had already broken their own stuff :D
Yea, unless I'm shit-canned I'll try to ease any transition just for co-workers or other innocents.
i've been layed off once, and came back in 1 day unpaid to help co-workers.
the really telling sign that my last place is fucked (sooner or later) is the number of people who quit and are brought back on contract. Usually 6 months and twice their original pay.
Lol did you work for the government?
every system and service is a spof
19:57
twice? I should have asked for more.
spof?
single point of failure
no backups, no docs, nothing
oh. wow.
I at least have backups.
So you did work for the government.
19:58
though.. only because the data center does machine snapshots. I have been trying to discuss backups for the migrated server.
I didn't.
healthcare. it's like the government only worse in every way.
same
@Luggage I was joking with ssube. Everything he describes was endemic to the FDOT
lemme tell you. The private insurance companies are as bad or worse than the government.
I worked in healthcare too
ohh yea, I love stack traces that don't contain any of my files.
19:59
wellness programs for insurance companies

« first day (2413 days earlier)      last day (2760 days later) »