« first day (2613 days earlier)      last day (2349 days later) » 

7:05 PM
sheet metal mode is stupid
there isn't a simple way to just say bend 135 degrees at this intersection
 
in my drafting programs the rotate tool bends things
 
well I'm doing this in onshape
and there is ways to bend parts, but not how I would have thought.
you need to extrude the bend into it I think.
 
That's what I think. Especially if it's a printed part, you don't care how it'll get bent in a sheet metal bending tool (a brake?). This is my amateur inexperienced, opinion, of course.
 
@FlorianMargaine for realz now. There's a side project I want to work on, it'll basically end up being a binary I want to distribute. Wanted to dirty my hands with a lisp again. I'm halfway implementing it in Hy but the bootstrapping time is too high (after profiling, ~95% of the program runtime is init, even after compiling to pyc).
What're my options? Compiling common lisp seems like an option, but creates an enormous file. Clojure may be a possibility, but it's a jre dependency. I can live with a python dependency (especially considering setup_tools), but java is meh
@SterlingArcher shit, how are we worth the same amount of goats?
you must be worth the worse goats
 
groats
 
7:23 PM
I have an input to type a name and a + button on the side to add this name to a list. How would you call such a UI widget? insertion-widget, insertion-input, nothing sounds obvious to me ^^
I'm just trying to find the proper variable name or CSS class to apply on the wrapper but I'm scratching my head.
 
I'm so confused. moving on to the next design
putting in a curve should be easier.
 
It seems I am getting my first @action changing the state causing a rerendering causing the action to refire changing the state causing a rerendering loop
 
example?
 
@JacqueGoupil unless you're looking for a pre-defined class or want to use the existing name conventions, the name is up to you. I'd choose something super obvious like nameInput nameEntry or nameForm
 
because a render shouldn't call/trigger an @action
maybe a @computed, but that won't change any state
 
7:29 PM
the calling class is observing state, which seems to cause a rerender
 
@Webster Well, I'm using BEM for CSS, so I'll go for name-widget. This way I can have name-widget__input and name-widget__submit.
 
Bravo!
 
it's the state.layers = valid; that causes the rerender
 
dashes and underscores together make me itchy
why the double underline?
 
Oh well, my internship ends this week. I guess the next one stuck with it will refactor it if it's unclear ^^
 
7:31 PM
@FélixGagnon-Grenier and state is an @observable?
 
yes
state = observable({/*properties*/})
I'm thinking that maybe that state is trying to do too much. the rendering of the class depends on some of the properties of that state
 
I don't see anything glaringly wrong in your code. show the entire component
 
@Webster That's common in BEM-like CSS. __ indicates a child element of a component, -- indicates a state or alternative flavor. So you can have say list__item--disabled.
It's ugly, but it really helps structuring CSS.
 
its terrible for scanning, when every character matters 100% we shouldnt have to discern the difference between __ ___ _
 
I guess, but I never use single underscores in CSS.
Still, I didn't make the standard, I'm just using it. getbem.com
 
7:35 PM
@Webster that is literally the point of BEM
making it easier to distinguish your css
Block__Element--modifier
 
@rlemon lol. it seems the perspective of exposing that terrible component to public eyes apparently triggered a great many neurons to think, and I realized I was calling the action during rendering, whilst it could very well be called when user does the relevant interaction
 
Bowel__Evacuation—movement
 
@FélixGagnon-Grenier remember there is also @computed methods/properties
they are not actions, but change when state does
 
it apparently solves the loop, as the user interaction happens only once, which fetches the layers, so there is only two renderings (initial with empty state, and when layers arrive from http)
 
not sure it'll help, but maybe?
 
7:37 PM
yep, thanks! I have to keep that in mind, as it's a bit different from redux
I think the biggest changeset is that which narrator says in one of the first tutorials you shown me
 
did you watch the egghead.io course I linked you?
I think at least I linked it
 
yes!
it was something like "find the smallest state you can and then derive the rest from it"
 
it's not complete, but I found it really helpful
 
yes, now I've starting reading the actual api, for details such as defaults of types of observables
one notable very useful difference from redux as of now is the deep obseravble state of props
 
you can override that
state = observable.shallowObject(obj);
 
7:39 PM
yes. I am happy with it however, so I will keep it :)
I have had to resort to complicated comparisons with componentWillReceiveProps to see if some deeply nested stuff changed, whereas now it just changes
 
google music needs to not display album art when its open in the background on the lock screen
some album art is basically softcore porn
 
wake up my phone. bam! half naked girl. thanks google.
 
can't you configure that
 
if you listen to metal, some album art is hardcore porn
 
7:42 PM
i know you can on the iphone
 
looking at the album cover while your mp3 plays is a hilarious mix of media and technologies
 
same with some of the weirder edm subgenres
 
its patching a hole that reactive animations didnt fix
what do people look at while listening to music?
 
@KevinB probably, hasn't been an issue before now
 
videos?
 
7:43 PM
work
 
@Webster code
 
digital tech hasnt completely figured it out
 
the road
 
well yeah we do stuff while the music plays
 
I almost only listen to music while working or driving these days
 
7:43 PM
the album cover is some serious default lack of anything better
 
with the phone locked I can change songs and pause, so they display the song title and the album art takes over my wallpaper (while in the lock screen)
I get it, makes the app 'fancy'
but man, some of that art is NSFW
 
especially blown up fullscreen
 
user1596138
lmao some super loud alarm at work just went off that yells "STAY CALM" over and over
 
user1596138
I was calm
 
7:46 PM
@Jhoverit It's a trap. Do not stay calm. Run.
 
RUN JHOVERIT, RUN!
 
run before people sex one another
 
user1596138
I would like to stay
 
user1596138
I was coming in from lunch anyway
 
user1596138
Wouldn't be the first time I was walking up to the building when everyone evacuated lol
 
7:49 PM
the perfect cover
 
Is it bad of me to start looking for other jobs because I got a shit bonus, or am I overreacting?
 
user1596138
I just turned around and got back in my truck last time lmao
 
user1596138
@BenFortune This is not condescending or anything I think it's a necessary question first. Why did you expect a better one?
 
@BenFortune depends on how well the company did. if the boss is pocketing a record year and you got a shit bonus, leave.
 
7:51 PM
@Jhoverit Because I went out of my way to do work that isn't in my contract, I also made them a lot of money
 
if the sales were not there, well the bonus can't be there.
 
user1596138
How bad are we talking
 
We're up at least 50% from last year
It's the same amount as last year, even though we have huge profits
 
well, same as last year with more profits is kinda lame, but not unheard of
 
user1596138
Were you more important this year
 
7:52 PM
that's pretty lame, well worth complaining about
 
if they made more and gave you less, I'd be pretty annoyed.
 
user1596138
Did you already get a substantial raise or anything?
 
@Jhoverit Without a doubt
A small raise, nothing life changing
 
rip a pedal off every 3rd rose, pay those fuckers back.
 
if they gave you a small raise to your salary, I'd expect a small raise to your bonus
 
user1596138
7:53 PM
Well it sounds like maybe your base pay is where the issue is and this stems from that?
 
user1596138
Idk your relationship with them tho
 
It's pretty close, we're a smallish team. I work directly with the ceo
 
user1596138
I just wouldn't really expect a big bonus for becoming more important and earning the company shloads more money. I would be wanting a base pay bump
 
a parking spot
 
Got one
 
user1596138
7:55 PM
Lol I just want more PTO if we're going to perks
 
a second one
 
yea maybe ignore the bonus, and use your new importance to negotiate some PTO
get your $$ in other places they'll feel more comfortable negotiating
 
power take-off
 
I mean, I'm the only one that can maintain the system I put in place, surely that gives me some leeway?
 
no, because that's a perceived threat.
 
7:56 PM
using that leverage makes you a threat
 
*if you bring it up
 
user1596138
^
 
they'll start looking for someone to "come on and do some knowledge sharing"
 
user1596138
Plus if you die they will move on right lol
 
explain you feel you're worth more, but understand if they don't have the bank to pay it out now. but you'd like an extra week paid time during the summer less rainy season
 
user1596138
7:57 PM
Like that's not real leverage. But you should be compensated more for earning them more money especially in a small shop I would think
 
the time when there's a sun above the clouds
 
Do they have a less rainy season?
 
@rlemon They could give everyone a 100% pay rise and not bat an eyelid
It's a small company, everyone can see the profits and revenue
 
that may be true.
 
a list of the concrete value you've added will help
 
7:58 PM
but most businesses don't look at it that way. they need to bank enough to cover costs if they make 0 sales next year
 
user1596138
Go argue why you are worth more not how they have it to pay you
 
but I wouldnt advise getting upset aboput anything that wasn't in your work agreement
they gave what they agreed
 
user1596138
Don't burn bridges, apply elsewhere if you can't get what you want
 
user1596138
At least go and ask tho professionally
 
big companies have salaries insured (here), smaller ones have to bank payroll for rough seasons
 
7:59 PM
I feel like I shouldn't go out of my way anymore though. They ask small tasks out of hours etc, which I thought would reflect on my bonus
 
user8705895
hi
 
user1596138
Clock the hours lol
 
user1596138
You'd have the money already..
 
@BenFortune that specifically is worth mentioning
 
yea, complain about things that are in your control. like your hours worked.
 
7:59 PM
> Hey, we've been working overtime. I felt like it should have been in the bonus, but since it isn't, do we need to be clocking those hours?
like hey, this work will cost you, but fairly
 
I wouldn't even mention bonus, I'd just say I can't work excess overtime without compensation anymore.
 
idk the company or how well that would go over
 
I also don't want to sound super ungrateful, what's the best way to bring it up?
 
17 secs ago, by rlemon
I wouldn't even mention bonus, I'd just say I can't work excess overtime without compensation anymore.
 
Plus I'm not gonna lie, I don't really like working there anymore
 
8:00 PM
> it's cutting into my life, and causing me stress.
 
say you're concerned about the overtime
 
user1596138
You know them better than we do, small shops don't follow a standard lol
 
user1596138
I say bring it up tho
 
nobody can get too mad about overtime, work/life balance, that whole category of complaints
if they do, you're in a sweatshop
 
but seriously, shy away from the word bonus. makes you look ungrateful (even if justified)
 
user1596138
8:02 PM
^ Yea that's why I said talk about base pay and stuff. I mean a bonus is just a gift tbh
 
eh, depends on the bonus
 
user1596138
There's no objective entitlement to it
 
user1596138
It wasn't profit sharing or anything
 
bonus is just that, a bonus. we have bonuses here and profit sharing.
 
the terms are up to you and the company and some get weird. I've seen ones that guaranteed some amount after a profit threshold.
 
8:03 PM
I'd sooner complain about profit sharing than a bonus
 
usually the threshold being 0
 
Yeah, I'll bring it up. Thanks guys
 
we don't have either of those things
 
user1596138
I have just randomly gotten money since Loke has got me for all the crazy shit we take care of here
 
I got a few random raises at my last place, their pay structure was a mess
 
user1596138
8:04 PM
I asked for my raise tho
 
one year it was $2k, the next was $12, then back to something less
 
we get 1 week of vacation that we can use whenever we want, and the entire place shuts down for half a week at 4th of july, half week for thanksgiving, and a full week in december
 
haha. I know I got a raise when I see it on my pay cheque
 
user1596138
Sort of demanded. I basically asked if I should be looking elsewhere when I move to Indiana or if my career will keep advancing lmao
 
that's pretty good vacation
 
8:05 PM
my boss is bad with telling people that kinda stuff
 
i took a full week off last week, and in two weeks i get another week
i forgot to use my vacation, so used it all at once
 
user1596138
I leave Thursday until EOY
 
but I do get 4 weeks PTO per year
which is super nice
 
was really nice, they didn't call me to fix shit a single time, all the automated recovery shit i put in place worked
 
user1596138
If they have to call me to fix shit somebody else fucked up cause the UI code will be static from here to them lol
 
8:07 PM
@KevinB it has begun
 
user1596138
Today is first day I wrote anything but JS in months lol
 
lol, I've been doing 3d modeling all day
 
usually i get calls about "How do i commit this code to production"
 
\o/
 
@Zirak I'm so ok with robots taking over the pagers first
 
user1596138
8:08 PM
I had to output some C# vars lmao
 
but those people are gone now
so....
yeah none of that
 
user1596138
@KevinB Its nice to not have permission for any of that haha
 
back then, they'd commit code to staging, and i'd do all of the pushing to production
they didn't have any of that permission
 
user1596138
We do everything through VSTS
 
but when i went on vacation, i had to let someone else do it
and they'd always screw something up
 
user1596138
8:10 PM
When we come back from the holiday they've put everyone into small supposedly permanent teams...
 
user1596138
And the teams can decide to do whatever they want be it scrum whatever really.
 
user1596138
I am not excited
 
y
 
user1596138
Idek
 
user1596138
We had everyone just like randomly floating around because te scrum master left 2 years ago and they didn't replace them
 
8:11 PM
@SterlingArcher can help you out
 
user1596138
So this month they got a scrum master and eliminated scrun.
 
he's certified
 
100% guaranteed scrub lord
 
user1596138
lmao well now it's just clusterfuck or whatever ig
 
user1596138
My PO works from Michigan or something and I have never worked with her
 
8:12 PM
the pc buzzword for clusterfuck is "agile"
 
i don't even know what it'd be like to actually work on a team. like, even when we had two devs here we never worked on the same projects, it was still as if i weren't working on a team. The dev before last just pushed all his work on to me, the last one was great, just didn't want to work on coldfusion
 
user1596138
Yea the UI team here always gets split up
 
user1596138
Me and Jason anyway
 
user1596138
My team has me as the only front end and then 2 mediocre visas for the BE
 
the other person i work with currently runs all of our social media and manages advertising, and does any graphic/design work i need
but i still do all the coding
she just does the photoshop work
I hate design
 
user1596138
8:16 PM
I just do the modern front end code lmao
 
user1596138
We let the other people handle the jQ spaghetti that they just want tweaked
 
user1596138
We do everything with React and modern build tools
 
i do both
:p
manage the old jq projects, angular js, react,
we even have a really old project on yui
pre-jquery
a lot of these apps need to just be scrapped
 
Hey ya'll, i'm looking for the format of a JS design pattern that leverages/ builds a global var across multiple files. Every file should start with something like:

MyGlobal = MyGlobal || {};

Then I can safely presume it's at least initialized and access like `MyGlobal.Whatever = ...`

But it gets upset on the first half of the || operator when `MyGlobal` is initially undefined. Anyone know what the correct syntax to achieve this is or what this design pattern is called?
 
don't do that
globals are bad
you can do something similar by exporting part of many modules, then importing and re-exporting them from a single module
 
8:19 PM
if you're trying to set it on window, set it on window
 
that module will, effectively, export your global without making it an awful global
 
Well the whole point is I'm only polluting the global namespace with a single variable that has different properties attached to it
 
why do you need one at all?
 
building a library of utility functions that I can access from anywhere on my site, same type of access as jQuery or Underscore or any other 3rd party lib
 
sure, but why a global vs something more contained, like a module?
 
8:24 PM
i mean, i can see doing it with a global if you're not doing any compiling.
but in that situation, just use window. it's not like you'd be using it in a non-browser scenario anyway, and if you are, then it should be packaged up as a module.
 
honestly, just lack of familiarity with modules - i know I've seen that pattern in the past - not sure i'm going to need the finness of a module - getting the global namespace down to a single variable is already a big win
 
fair enough. What Kevin said is probably the answer then.
module re-export makes that sort of thing (grouping utils) much nicer and are worth using if you can
 
If you want an example though that does use the combination of both (exporting or setting global) look at jquery's source.
though there's probably better examples
underscore?
 
I really want to figure out how to compactly assign a value if one isn't already set. Sorta like this:

var i = null;
var j = i || 10; //j is now 10

https://stackoverflow.com/questions/1011317/replace-a-value-if-null-or-undefined-in-javascript
 
moment?
if you're doing it as properties of an object, you can do that no problem
 
8:29 PM
|| will set it on falsy, which isn't quite unset but close
unset will be falsy, so it will work
 
if its coming from an argument, default args ftw
 
@KyleMit I think the trick is to not do it compactly, but readably
unless you're codegolfing
and if you're hacking something together, just don't think about it
 
foo.j = foo.j || 10
but j = j || 10 would be a syntax error
 
that's pretty idiomatic for defaults if you don't have es6 available
 
it is such a trivial example tho, depending on how the actual code is structured there may be better ways
 
8:31 PM
TIL metaphilosophy is a thing
 
var i = null;
var j = i || 10;
given this example, I don't see any better ways
 
Object.assign(empty, defaults, options) is a nice pattern when it makes sense
 
i don't see the point of that example though. the i || is pointless.
i is no longer the global, it can't be anything but null
 
ah, okay - not golfing or anything - just looking to guarantee that MyProperty exists before assigning more stuff to it and if it does exist, then not overwriting it
 
@KevinB I think the assumption is that he doesn't know the value of i without checking it
 
8:32 PM
my point is that if it isn't defined, what you are doing is a syntax error
so you'll have to instead set it on the global directly
in this case window
 
@KyleMit really depends on the context
 
window.j = window.j || {}
 
window.j = 'j' in window ? j : {}
 
@towc no
 
no
 
8:33 PM
less compact, but less error prone version?
 
haha
 
window is not a pojso, don't use in
 
less compact...
 
stop forcing ternaries in where they are not preferred
 
@KevinB, yeah, I think throwing it in window probably makes sense anyway according to global concerns above and then also allows me to do the || check
 
8:34 PM
if the value is coming from an argument tho you could just default it
function foo(i=10) {}
foo(); // argument i is defaulted to 10
 
user1596138
Lol what exactly are you meaning to do with this
 
user1596138
Since it is an obj property
 
@KyleMit if it's global, it's already being thrown into window. using window directly just means you can't use it in a non-browser environment.
 
user1596138
I don't get it
 
user1596138
var i = null;
var j = i || 10; //j is now 10
 
8:36 PM
well, not without defining window
 
Also, var will clear the JS error as well it looks like

var MyGlobal = MyGlobal || {};
 
user1596138
This is shorter than the c# example in the question already
 
var will also overwrite the global.
so it won't do what you want
 
user1596138
@KyleMit window.MyGlobal = window.MyGlobal || {}
 
user1596138
Thats what you're doing and will work
 
user1596138
8:37 PM
Or do you mean scoped stuff not globals
 
it has to be an object property if you want to access it at the same time as declaring
 
user1596138
e.g.
function() {
  var thing = thing || 10;
}
 
var MyGlobal = MyGlobal || {}; is identical to var MyGlobal = {}; regardless of whether or not MyGlobal existed before.
 
user1596138
@KevinB No, you just threw an exception
 
user1596138
Or do I misunderstand?
 
8:38 PM
var MyGlobal defines MyGlobal as undefined. next it does the expression when that line is reached
hoisting
 
!!> var MyGlobal = MyGlobal || {}
right, I'm jailed
point was to show that there are no errors if that's the whole code
 
user1596138
Oh right
 
user1596138
Then I don't udnerstand the question at all it's already been answered lol
 
it has been answered
lol
 
user1596138
Well he answered it in his initial message
 
user1596138
8:40 PM
Thats why I was confused
 
we can still argue about it a bit more
there's barely enough drama in this room rn
 
user1596138
!!unban towc
 
@Jhoverit I'm afraid I can't let you do that, Jhoverit
 
user1596138
Thats not votes is it
 
bah, dw
 
8:41 PM
@KevinB, they don't seem quite identical, this will incrementally build a global object

var MyGlobal = MyGlobal || {}
MyGlobal.msg = "Hi"

// sometime later in a different file
var MyGlobal = MyGlobal || {}
MyGlobal.newProp = 2

// {msg: "Hi", newProp: 2}
 
const AlwaysDefaultsToTen = new Proxy({}, {
  get(obj, name) {
    if (!(name in obj)) return 10;
    return obj[name];
  }
});
:D
I'm just going to keep making ridiculous proxy examples until I find a real use case for them.
 
lol
 
that doesn't seem right
 
AlwaysDefaultsToTen.a = 1;
console.log( AlwaysDefaultsToTen.a, AlwaysDefaultsToTen.b ); // 1,10
 
var MyGlobal should get hoisted to the the top of whatever function you're in, and any time within that function that it is accessed, it would point to the new one you defined
also... var MyGlobal would make something that isn't a global if you're not running in global...
 
user1596138
8:45 PM
@KyleMit What would you expect it to do?
 
user1596138
Ah I get it. I'm so lost at the value of this lol
 
user1596138
!!afk tasks
 
@Jhoverit, everything used to be inside of an IIFE that dumped to a single variable that was called elsewhere within the app. Trying to split up that file into multiple smaller ones and still build the same object at the end of the day. All the code will be called from elsewhere once that object is loaded
thanks for the advice all, i have a couple different routes to go down window.prop or modules that should cleanly build this object
 
@KendallFrey ugh. finished the rest of the designs without bends. now back to these two
sheet metal mode is confusing as hell
 
Are you actually using it for sheet metal designs?
 
8:55 PM
well they'll be printed, then if they pass sent to a metal fabricator to be made from sheet metal
but I think they'll use the 2d drawings.
 
I just witnessed a car skid to a stop to avoid hitting small children at a crosswalk. I was frantically waving for them to stop from my bike 😩😩
 
@SterlingArcher yeah, wave at them to distract them so they don't realize there are kids on the road
 
you may need a printed and separate sheet metal design
 
well after asking mr.google sheet metal models is the only way to get the bends that I want
 
is that a challenge
 
8:57 PM
bullshit. you can make any shape without.
I'd put 100 internet bucks on it
 
@Luggage ok, make me a mandelbulb
 
heh, I can pm you the drawing kendall
 
There's a way to improve my earns and goods in life knowing just javascript?
 
if you can make the shape I'll try a little harder to get you that part :D
 
@BrunoGuerra 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.
 
8:58 PM
@BrunoGuerra yea, get a job writing it
 
@rlemon lol
 
wrong window
 
@rlemon even better, get a job reading it
 
@BrunoGuerra i mean... that depends on what you mean by 'knowing javascript'. If you're good at javascript, then presumably you're good at programming in general
 
One does not simply write javascript
oh wait yes they do
 
8:59 PM
and therefore problem solving
 
@KevinB You haven't met my father, I see
 
get a job discussing and arguing about it all day
 

« first day (2613 days earlier)      last day (2349 days later) »