« first day (2200 days earlier)      last day (2749 days later) » 

7:00 PM
the people who spend time publishing style guides are not the people who worry about consistent, usable projects
they're the "software craftsmen" who have had 14 different SV jobs in the last 2 years
 
SV?
 
silicon valley
/venture capital
 
aah
 
@bitten Hate that about it
 
thankfully i've never met one of those people
 
7:02 PM
Sorry had to go afk for a sec i feel better now
I raged when I read that
 
@bitten we used to have a couple here, but they got offended that nobody thought they were special and ragequit
 
@ssube heh, i just find myself tweaking a few rules here and there
 
Go write a brainfuck interpreter for fun: codewars.com/kata/526156943dfe7ce06200063e
 
@Shmiddty Define "fun"
 
I did that once. It was kind of fun.
 
7:04 PM
I didn't need to ping you for that my bad
 
@ssube sad
@Shmiddty it's stuck on "Loading description..."
 
It's fun like chess is fun
or something
but easier
 
@Shmiddty chess is actually fun.
 
 
@bitten try reloading
 
7:06 PM
from this post, where SO makes their dislike of PHP official
 
Is there a place where I can take short-term project-based jobs?
 
@Shmiddty maybe codementor?
 
like "work on X for y months"
 
nowhere public and good. ODesk and friends are public and lousy, otherwise you go to a contract firm and they send you out.
 
if you can sift through a lot of requests
 
Preference question... if I'm developing an entire UI, complete with context menus, should I pass in context menu options as properties on a component, or should I make ContextMenu components that can target components by ID?
this is React, mind you
 
What about context menus that can appear 'anywhere'? (e.g. in an editor)?
 
they usually only appear inside a single widget/control
 
Does that change my question/approach?
 
I don't know.. I guess not..
 
7:20 PM
I would make a base class with some common ContextMenu stuff (styling, mostly) and then derive that for each individual menu
 
You don't inherit in react, you compose.
 
My question is mostly...
<Foo contextMenu={ ... }/>
vs
<Foo id='bar'/>
<ContextMenu target='bar'/>
 
class MyComponents extends React.Component differs (without begging)
 
yea, you only inherit from that, not make your own base classes
anywho..
 
@ndugger I would use the latter, since IMO a context menu is a popup for some parent
@Luggage sure you can
 
7:23 PM
@ndugger second option for sure
declarative > all
 
That was my original idea, glad it's the popular option
 
why set a target though?
why not just nest it under the parent that uses it?
meh whatever anyway I prefer the 2nd one
or vice versa wrap the parent with the context
 
That's probably better, instead of doing DOM-y things
 
that would probably be the approach I used
I'd make some base context menu, whatever it wraps you have it for
 
//just a thought
<AttachMenu component={Foo} contextMenu={...} />
 
7:25 PM
I don't want to wrap the component int a context menu, because the context menu already has menu item components as children
 
nah.. i don't like my thought
 
<Contextual>
  <Foo ... />
  <Menu options={...} />
</Contextual>
// like that?
 
<Menu.Context>
<Menu.item label='Parent'>
</Menu.Context>
oops
 
yea.. that's basically the same, but better, @ssube
 
how do you link two components in React? do they have to be children?
 
7:27 PM
@ssube yea
that's how I would do it something like that anyway
 
<Menu.Context>
    <Menu.item label='Parent'>
        <Menu.Item label='Child'/>
    </Menu.Item>
</Menu.Context>
that's what I currently have
so it would be
 
@Basj have you seen Discord?
 
cv-pls stackoverflow.com/questions/40225766/… (no repro/too localized)
 
Wouldn't controls like an editor need to be aware of and decide when to open it's own context menu?
 
<FooComponent>
    <Menu.Context>
        ...
    </Menu.Context>
    ...
</FooComponent>
 
7:29 PM
@Luggage unless the container listens for right-clicks on the one child and handles that
you need somebody listening for an event, and that's probably the level the menu should be declared at
 
If the child is an editor, it may need to provide context to the menu, like the selected region. Also, maybe the editor has areas that don't have a context menu?
 
@ssube @SterlingArcher Why did summoners war request SU access? :/
 
To control your life
 
how WFP does it.. just for comparison: wpftutorial.net/ContextMenu.html
 
did it? I don't remember seeing any crazy permissions
 
7:33 PM
That would be like <Foo contextMenu={} />
 
@BenFortune no repro
 
> [3:32 PM] Sorry if it’s me who broke everything
lmao
 
@KendallFrey NEW VIDEO youtube.com/watch?v=Bwic3hJ4q1A
IT'S GOOD
 
"new"
 
> [3:34 PM] Who put goldfish in the server?!
 
7:35 PM
HEY FUCK YOU OKAY
7
WATCH THE VIDEO
 
I did
3 days ago
when it was new
 
HEY FUCK YOU OKAY
7
It was good wasn't it?
 
Yes, I think so
I barely remember it
 
Then watch it agaaaiiinnn
 
7:37 PM
@Zirak LOL
that ending omg
 
I laughed
 
> i wish i had aids
6
 
> Your wish is...what?
 
- Sterling Archer 2016
 
Then the fucking make a wish foundation LOL
I'm crying
Man, the star list is super appropriate today
And yet somebody flagged me for posting a gif of a golfer accidentally hitting a bird
 
7:46 PM
yea, "accident".
That golfer had murder in his heart.
 
don't they all?
 
@SterlingArcher Had to hide it from PETA
 
damn.. inspecting children is problematic in react..
 
Ok I laughed at that vid
 
s/in react//
 
7:48 PM
People for Eating Tasty Animals
oh dear, I googled PETA
> While beer aids longevity and strengthens bones, milk causes obesity, diabetes and cancer, PETA says.
I'm no expert, but...
 
Ugh
PETA
 
I drink beer and have none of those things.
so, it checks out
 
They say they don't like pets. So they want to kill them all
Not a joke
 
Hey, is it safe to run my Arduino at slightly over 5V? I have a "5V" power supply that I measured at ~5.8V. The ATmega328P can handle up to 6V, but I'm not sure about other components on the board.
 
@rlemon I don't mean connecting it through the regulator, that requires at least 6V
 
@SterlingArcher Is there really anything more beautiful than this?
 
The idea of it?
 
user1596138
@KendallFrey Lmao rugged-circuits.com/10-ways-to-destroy-an-arduino scroll to Method 5
 
user1596138
8:03 PM
They went as far as to put in a cutoff for >5.5V
 
@KendallFrey yes
 
user1596138
So I would assume mid 5s she'll probably survive..
 
@Jhawins I'm aware of that. v>6V = bad; v<5V = good; 6V>v>5V = ???
 
@SterlingArcher they go all the way to the floor
 
user1596138
@KendallFrey the better question is how do you not have a 5V psu available lol
 
8:07 PM
phone charger?
 
5V isn't exactly a common voltage for high-power adapters
 
user1596138
How much power do you need lol
 
more than the regulator can handle
 
user1596138
You don't have a computer power supply laying around
 
user1596138
5V many many watts lol
 
8:11 PM
@Jhawins Not one that's currently idle
 
@KendallFrey omg omg omg ^
 
> I mean... she knew who you are. She swiped right. Soooo..... there's that
 
@SterlingArcher He butchered whatever chance he had
 
user1596138
@KendallFrey Well..... That'd do it lol
 
On the other hand, tinder, so who knows
 
user1596138
8:14 PM
@rlemon I am finding somewhere in town with Poutine for dinner.
 
user1596138
i am excited for my bottle of wine to DDoS the US https://twitter.com/Pinboard/status/790506694002507777
 
what's with all the ddos lately?
psn is down... all of the other things are down
 
IoT
 
bad code causing problems?
 
8:18 PM
while(1) attack();
 
Basically people using insecure devices as attack vectors
 
it's like old DNS magnification attacks, but with CCTV cameras and DVRs that don't protect their web UI
 
Nothing new except a bazillion new insecure devices
 
this is why you don't give hardware to stupid people
 
fantastic
 
8:21 PM
hahaha
 
> less than 15 steps before he ran out of breath and surrendered
this is why you smoke with cigarettes or do bad things, kids
 
> smoke with cigarettes
the fuck else you smoking with
 
smoke without cigarettes
 
@TheGenieOfTruth Welcome to the JavaScript chat! Please review the room 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.
 
ok yeah... crack pipe.. sure.
 
8:24 PM
:O That welcome message looks like you just thought of it
 
@SterlingArcher it was hard to run with all that racial oppression
 
it's 2016, I vape my crack now
 
Question, JavaScript: How do?
 
What a world we live in
 
8:24 PM
@TheGenieOfTruth keyboard, type
 
I try
gtyreidkmfnghuiekrfgjmne
 
@TheGenieOfTruth Bash head on keyboard, run, repeat
 
in 2017 I'll have the first onboard lung-integrated vape system
 
8:24 PM
try moar
 
Trying again
 
@TheGenieOfTruth do or do not, there is no try
 
ith8tsdkfhr
 
!!afk writing a draft proposal
 
while(1){do}
 
8:25 PM
@TheGenieOfTruth now you're getting it
 
Uncaught ReferenceError: ith8tsdkfhr is not defined
argggggg
 
@TheGenieOfTruth oh yeah, what's up with do expressions now-a-days?
 
do notation considered harmful
 
Not actually sure what it does
 
8:27 PM
do is eval, it's the work of the devel
 
I am scared of what we will see in 2020
 
Basically, it's an expression that you can put statements into. like let crap = do { if (stuff) value else otherValue }
 
aye
eval D:
 
You use it to use statements where you couldn't
 
eval = evil
 
8:28 PM
@Zirak wat
 
That's do expressions
 
that's not a thing, never has been, and the proposal got shot down very fast (but not fast enough)
it was unanimously considered the worst idea ever, iirc
 
The worst idea ever was the Double Decker Couch
 
I don't think so?
 
The worst idea ever was ASI
 
8:30 PM
The worst idea ever was bad
That's all I kno
 
It's a stage 0 proposal IIRC but I can't find any discussions
 
@rlemon nah, implicit type conversion
 
TheGenieOfTruth, 2016 - "That's all I kno"
 
hrm
 
they came up on the mailing list and got rekt
 
8:30 PM
I'd call them even
 
this isn't some ass backward language like perl or scala that needs in-statement flow control
 
@ssube Can you find a link?
@ssube I'm kinda intrigued by them
 
ignoring that they have 0 use cases that normal syntax can't handle (usually more clearly), they have a million technical problems
 
Like what?
 
I can't even find a link to anybody recognizing the proposal as legitimate
the only place it shows up is people whining that it was left off the stage 0 list
 
8:34 PM
github.com/rwaldron/tc39-notes/blob/master/es6/2014-01/… seems legit, I can't seem to find anything else though besides a babel discussion and a tweet
And seems like v8 did it codereview.chromium.org/1399893002
 
gross
 
I can't seem to find a discussion about it though, which is weird.
 
wanting to use do expressions is just a smell that your functions are doing too much
they do nothing that a function doesn't do better
which I imagine is why they've gotten so little traction
 
They're sort of an IIFE sugar
 
and IIFEs are going away
 
8:37 PM
How exactly are they going away?
 
block and module scope got rid of the last few uses for IIFEs
 
meh, not really
 
what's left that you actually need an IIFE for?
the jQ style onload stuff can be done better with a module, private scope is done with modules
 
Creating intermediate values is one of the main reasons I use IIFEs
Not everything is logically a module, but you still sometimes need the "privacy" of one, and blocks don't have a return value
Also, think about the RHS of a const declaration: How can you do branching logic?
 
call a function that makes the decision and returns the proper value, which is a Good Thing because you're isolating the logic and can test it (and since JS aggressively inlines, it doesn't matter)
 
8:44 PM
Also, a do expression is indeed a different way to write things which hasn't been explored in this landscape
 
if you want to put a ternary or do on the right side of a const, your function is doing more than one thing
@Zirak it's been explored in other languages and has a bunch of problems, not least being the ambiguity
 
@ssube Feature detection?
@ssube Care to elaborate?
 
const feature = do (if (features.x) true; else false; ) vs const feature = hasFeature();
@Zirak look at ruby
the postfix if and unless nonsense
 
Needs to be braces and not parens
 
That's a ton of syntax as opposed to one piece of syntax, though
Same with perl
 
8:47 PM
the parser ambiguity and messy postfixness are probably the biggest problems, but combine those with no usecases and it's not a very compelling feature
this is just a kitchen sink proposal, because JS doesn't have it yet, so it should
 
user4229770
Hello, i want to ask an opinion, i want to create an app with recipes and one recipe would have an image, is it good to store a string for embedded image in db or should i use file path and save image somewhere... ? :)
 
You didn't convince me, it seems like a "there's a similar feature in a different language which I don't like, so don't implement it in js"
It's not postfix or anything like that, it's an expression
 
@Zirak a) similar features have been implemented in other languages and are ugly and/or ambiguous, b) there are few/no use cases that a simple function can't solve (often better)
it's not sugar for anything
 
user4229770
How do You store images in Your applications ? :(
 
there's no problem or frustration it solves or makes better
 
8:49 PM
But you're really comparing apples to oranges. Nobody suggested implementing postfix syntax for every operator
It's an expression
It's unlike ruby
 
it's a generic way to attach any block onto the end of an existing expression
 
It's not to the end, though
 
thus complicating flow control (and the reading of it)
 
It's wherever an expression belongs. And that can be in an arrow function, or a template literal
And while you usually can break that out into different named functions, it is worth exploring the possibility of not doing that
 
why?
 
8:52 PM
Named functions have names, and names suck, and they're longer
If you can replace a bunch of two-line named functions whose name are irrelevant with inline expressions...
 
> and names suck, and they're longer
names are for clarity
 
What's brought to the table, really, is eliminating some of the statement/expression dichotomy. Statements suck because they have no value, and can't be used as expressions.
 
if declaring a function is too long, consider switching to ruby or perl?
 
@ssube And sometimes "clarity" is repeating your function or giving it a useless name
 
@Zirak so your whole use case is introducing ambiguity?
I'm not sure what point you're trying to make with that.
 
8:54 PM
@ssube How is it introducing ambiguity?
 
why would you want statements and expressions to be swappable?
 
I, for one, don't want statements :D
But we're past that point
 
uh huh
genericizing things just because you can isn't always a good thing
 
For instance, did you know that for loops have a value? That's weird. You just can't use that value because they're statements, and it's not in the language. But anyway.
@ssube You still haven't told me how I'm somehow killing children by introducing ambiguity
 
you're not killing children, I just haven't seen an actual use case for them yet that isn't more confusing than calling a short method
 
8:57 PM
How is it "introducing ambiguity"?
Also, allegedly not killing children
 
because flow control can now sit inside of any other bit of code
 
@ssube That can also be said of 100% of arrow functions
 
@Zirak I agree that arrows are unnecessary and don't add much value, but they also don't confuse anything.
 
@ssube It already can inside an IIFE
So now it can inside an IIFE + do expression
 
having to search the beginning and end of every expression for flow control, which can then have nested statements, which can have nested flow control, etc, does confuse things
you can suddenly create code that is much harder to follow
 
8:59 PM
How's var foo = something(); significantly less clear than var foo = do { ... } ?
 
it's like having an off ramp and a cloverleaf and a roundabout on the same intersection
 
They both contain as much branching logic as you'd like, you'll have to follow them anyway
 
@Zirak same reason ternaries are ugly, you're nesting some fairly different things
with the first form, you have a name that can tell you exactly what the method does, so you don't have to follow it
it's like a symlink to some other behavior that you note and move on, rather than parsing all the way through, if that makes sense
 
It's unlike how ruby and perl and kin do things which is flow control in the end of some expressions or statements, which I can agree to be confusing
@ssube okay, then var foo = (function () { ... })()
 
9:01 PM
@Zirak how is it different? You append do { ... } to the end of an expression and then have flow control in that appended block.
 
Also, ruby and perl people don't think they're confusing
 
@Zirak like I said, I don't think IIFEs have a place anymore either.
@Zirak they acknowledge that it introduced parser ambiguity, though
 
@ssube Because you're not affecting the expression, you're creating a value
 
@DntQuitPls in a folder, file path in db
 
You can't do things like return x if something
do expressions are just expressions
@ssube That it certainly does
 
9:03 PM
at least 90% of my argument against them is the ambiguity and my aversion to features that will help people write bad code
with a side of "what are they good for?"
 
I still don't get where's the ambiguity
 
now, bear in mind, I'd rather type a long name and autocomplete it a few times to keep my code readable (without following methods)
@Zirak just thinking about reading the code, you now have to watch the end of expressions for a do tail and read through it before you understand what is happening
 
No you don't
 
that's a fair amount of cognitive load to read what is essentially a nested function body
 
There's no "end of an expression", there's no "do tail"
You're treating it like the postfix ifs and such when it's completely different
You have do expressions where you can have expressions, and that's it
You can't suddenly change the syntax. If you can write 4, you can write do
 
9:06 PM
ok, there is some syntactic different I was misunderstanding
but I don't think it helps, tbh
 
Which means you can put them in template strings, and arrow functions, and JSX
 
the nesting of flow control complaint still stands
flow control, especially async flow control, is already confusing
why do we want to allow it in more places and make it easier to miss?
 
Because I've already seen several places of `foo ${(_=> crap)()} bar`
 
Because we like living on the edge.
and yea.. because JSX only allows expressions.
 
@Zirak I still hold that's a smell that has a good fix which is not do
 
// so the refactor is
`foo ${doesCrap()} bar`
function doesCrap() {
    crap
}
And don't pretend like you never had 2 line functions which do exactly nothing and they're absolutely nameless, because naming them is implementing them
 
yes, which is reusable and the name should tell you what it does (without reading the body)
 
Don't you lie to me Richard
(why can't I type...)
 
one of the only times I use an IIFE in my JSX:
{(() => {
    let lineFn = d3Shape.line()
        .y(row => y(row.percentage))
        .x((row, index) => x(index))
        .curve(d3Shape.curveMonotoneX);

    return <path d={lineFn(data)} stroke="black" fill="none" />;
})()}
It could be refactored.
 
@Zirak well, what can you solve with a do expression that you can't solve with a function (in a similar number of characters and better modularity)?
 
9:12 PM
Nothing really, you can desugar it into a function.
 
even arrow functions had some practical use, by binding this lexically
 
It's for the one-liners
@ssube Poppycock
That was a "what can we jam in" moment
 
regardless, I use it all the time
 
That and arguments
 
Would you jam it in a goat, would you jam it in a boat
 
9:13 PM
now, I think having unpredictable this was a huge mistake int he original language
 
Oh
my
God
i.imgur.com/yZFv1Pu.jpg . ahem cc @Loktar
 
so arrow functions shouldn't need to exist, but they do and are a useful patch
 
@ssube So call and apply are a mistake? :(
 
Those have value above and beyond this
 
call and apply are pretty useful for currying and all kinds of stuff
we wouldn't have been able to do rest parameters well without apply
I've been using the const foo = isBar() pattern for a while now and am pretty happy with it, especially when it comes to testing the logic (and sometimes you can even make your logic method static, which then allows you to take a predicate instead)
 
9:18 PM
That's one area where I adore python's implementation. this isn't magic: It's an argument. That's not a popular opinion among classical-OOPers, though
 
!!poe or Marvel Heroes
 
@Shmiddty poe
 
there's a weak argument that using a first-class function actually makes your code more flexible, since you can easily replace the function with a variable
@Zirak I like that too. One of the few parts of Python that I like.
 
hows the new poe map system?
haven't had a chance to play poe for a good while now
 
Star Trek is so damn ridiculous...
 
9:33 PM
prove it
 
I cite, as evidence, the episodes of Star Trek (TNG).
Mark Twain is currently standing on the bridge. Need I say more?
 
Is he a hologram?
 
Nope. The real one.
 
@SterlingArcher LOL
more like 30 years ago
then
> 30 days before presidental election
Hillary in a locker peeking
 
9:56 PM
there is a way to have a significant impact on elections: release a new Call of Duty game on the same day or day before
 
new WoW patch would probably have the same effect
 

« first day (2200 days earlier)      last day (2749 days later) »