« first day (2494 days earlier)      last day (2453 days later) » 

8:01 PM
It's even better when you have not only the CDR from all your crit items, but when you're at 100% crit with pretty good damage, high AS, so your Q is up every 2 seconds.
 
Hello! I have a question about Object.freeze().
I'm trying to write some Mocha tests in a NodeJS project. Somewhere, an object that's supposed to have the same value throughout the test suite is being mutated, causing some of my tests to fail. But I don't know where it's being mutated.
So I ran Object.freeze(myImportantObject) at the top of my test suite.
This changes the behavior of my tests - the object is no longer mutating...
But I'm not getting a TypeError when the object is mutated, so I'm still in the dark as to which piece of code is misbehaving.
Why isn't my frozen object throwing an error when it's mutated, and how do I be sure that it does throw?
 
Are you in strict mode?
I believe the TypeError throws silently unless strict mode is enabled
var o = Object.freeze(obj);

o === obj; // true
Object.isFrozen(obj); // === true

// Now any changes will fail
obj.foo = 'quux'; // silently does nothing
// silently doesn't add the property
obj.quaxxor = 'the friendly duck';

// In strict mode such attempts will throw TypeErrors
function fail(){
  'use strict';
  obj.foo = 'sparky'; // throws a TypeError
  delete obj.quaxxor; // throws a TypeError
  obj.sparky = 'arf'; // throws a TypeError
}
 
I tried putting 'use strict'; at the top of my test file, but I still don't get an explicit TypeError. Do I have to do something special to enable strict mode in NodeJS?
Or does Object.freeze behave differently in NodeJS?
 
Can you show a reproducible example?
A short one please
 
If I knew which code was causing the bug, I would have already fixed my test cases >_<
 
8:14 PM
> To make your code run in strict mode, add 'use strict'; at the beginning of the JS file or function containing the code and run it in an environment that implements strict mode (see for example this list: caniuse.com/#feat=use-strict).
 
I tried this example...
const testObject = {
  shouldBeImmutable: true
};
Object.freeze(testObject);

it.only('should not mutate', () => {
  expect(() => {
    testObject.shouldBeImmutable = false;
  }).to.throw(TypeError);

  expect(testObject).to.deep.equal({
    shouldBeImmutable: true
  });
});
... but this example test actually passed!
So I'm dealing with a very, very spooky interaction @___________@
 
Where are you defining strict mode?
 
In the example I just pasted, I didn't!
I don't think I need to in NodeJS?
 
You do
If you don't want it to fail silently
 
(You've kept on posting me docs on what to do in a browser environment. I'm not in a browser environment. This is a NodeJS env I'm running from the command line.)
 
8:19 PM
It doesn't matter, nodeJS behaves the same
 
I think my Webpack/Babel configuration is adding 'use strict' for me: github.com/webpack/webpack/issues/1267
 
9
Q: NodeJS Strict Mode

Sterling ArcherAre there any advantages to using "use strict" in NodeJS? For example, a global object is not a good idea to use, as all your requests will mutate said object (assuming the object in question should be unique to each user, of course). In this case, using strict mode would have been a good idea, n...

 
At any rate, the problem I'm having where my frozen object isn't throwing occurs whether I use strict mode or not.
 
Can you confirm it's actually adding the strict mode for you?
 
I am very, very confident that's not the problem.
The example I posted above worked without my explicitly adding strict mode, so yes, it must be.
 
8:21 PM
it.only('should not mutate', () => {
    'use strict';
can you add it there just to check?
The docs are pretty clear a silent fail means it's not running in strict mode, which is weird because the webpack babel-loader as you said should be adding it, which means it should throw your TypeError
 
I added 'use strict', and my example behaved exactly thew same way.
 
Again, my example works. The problem I'm having, unfortunately, isn't demonstrated by my example...
(I'm sorry I'm being a little snappy... I really do appreciate your help!)
 
Unfortunately I don't think I can be much more help, it might be a Mocha thing and I haven't used Mocha
 
I suppose that's possible...
When you asked me to give you a reproducable example, though, you made me realize that I hadn't tried isolating the piece of code causing the problem...
I'm going to try taking out individual test cases until I find the one that's misbheaving
So thank you for that! :)
 
8:26 PM
Good luck man, if you do isolate it, come back and try again. There are much smarter people here (not at the moment) that will probably be better to assist
Feel free to ping me if you find it, I'm curious now
 
Thanks! :)
If I find it, I'll let you know.
I was able to isloate it... I'm trying to test a React component that uses Redux. I'm using Enzyme for testing. When I mount() the component using Enzyme with a React-Redux <Provider /> wrapping around it, one of the values I'm including in the store is being mutated directly.
So there's a strange interaction with React and Redux going on...
And I'm guessing that wherever that interaction is occuring, it's silently swallowing the TypeError I'm expecting when I freeze the object xP
 
8:49 PM
@BadgerCat I see a badger cat hiding in the grass.
 
@Trasiva eeek
 
@BadgerCat How're you doing hot stuff?
 
I'm pregnant from sushi
 
Food baby! Whooo!
They're adorable until they mature, then they're just shit.
 
Haha
 
8:58 PM
You and Copy cause any trouble this weekend?
 
No, but we're flying out tomorrow
To Croatia
 
Oh neat
You guys going to meet with little Towc while you're there?
Maybe teach him how to not burn the place down with a simple meal?
 
haha
yeah
 
user7480455
Hi all if I want a return json to just update a partial view what should I add?
 
@Trasiva isnt he in romania tho? :P
 
user7480455
9:06 PM
currently in my code there is a json(new { redirecttourl
 
user7480455
but I just need it to refresh a partial view that has a last of values... any ideas
 
@KamilSolecki Slovakia I thought
 
oh. slovakia overall, but rn hes in romania :D
 
yeah, Slovakia
 
he went on vacation
with his parents
should be comming back in about 1-2 days
 
9:08 PM
:O
 
its an 18 hr drive to croatia from here, but I love that country
where exactly are you going?
 
Zagreb
but we will travel around
 
oh, I've never been to zagreb for longer :(
only drive through
the coastline is mean nice
tho
 
Where are you located?
 
Poland
4h drive to the Towc Mansion :P
 
9:15 PM
What city?
 
Częstochowa, but I study in Krakow
ever been to Polando?
 
never
but I want to go sometime
 
Its worth it, especially if you like sightseeing
we have some amazing cultural heritage
as for croatia, this is where I usually go: google.pl/maps/place/Viganj,+Chorwacja/…
amazing place if you like kite/wind surfing
 
user1596138
@KamilSolecki That looks like a pita to get to
 
user1596138
You fly everywhere?
 
9:19 PM
depends
 
user1596138
We don't have budget airlines
 
user1596138
So we drive. Everywhere.
 
croatia is a quick 20h drive
italy plane tickets are like 30$ so you take a plane
(if you find a deal, otherwise they are 70-120$)
austria is usually by car
 
user1596138
It's $200 for me to fly 600 miles
 
user1596138
Depends how close your destination is to an airport...
 
9:21 PM
also
and if you wanna drive around
 
is someone looking for places to visit?
 
HERE HE IS
 
Just off the top of my head, I hear Bratislava is nice any time of the year
 
tbh I am in need of going somewhere in a 1-2 months
so who knows
:P
Im thinking 4 day trip
 
oh, hi @BadgerCat
and yeah Kamil, I'm flying back on wednesday
 
9:23 PM
btw have you been to austria yet?
 
Family is like work. Except I like my job
I went to vienna once, and to another random city
it's interesting
 
I think I've only been in vienna once for a day
when I was little
cant really tell
 
@KamilSolecki Go skiing, you'll hate me forever
 
@Zirak already booked italy for winter ^^
 
Once you start you're hooked for life
@KamilSolecki Niiiiiice
 
9:25 PM
@KamilSolecki wrong choice
 
ive been skiing since I was 4
its my favorite sport
 
Dude I skid for the first time in January, it was flabbergasting
 
Giant Slalom is my favorite
 
Did a week in January and another one in March, both in Val Thorens
I envy you for having done it longer
 
@BadgerCat any more details? (Also, do you want to actually meet up or did you make other plans?)
 
9:26 PM
tbh I never went skiing in france
 
I'm mostly free from wednesday onwards. Ideally weekends, but it's fine if they're not
 
always either austria or italy
 
Can you recommend good beginner-intermediate skiing spots?
 
(poland too, but you cant call that skiing)
 
oh, which ones did you go to?
 
9:27 PM
@KamilSolecki it's much better. Mostly because it's not italy
from what I hear, they actually have nice skiing mountains in slovakia
 
@towc It's all the Alps, same mountain range, different language
 
@towc yes. there is a decent one called Hopok
its either in czech rep or slovakia
 
sounds slovak
 
@Zirak tbh if you choose the big ski spots, they can accomodate any skill lever
 
chopok (the c in ch is usually silent, so pronounced hopok)
slovakia, yup
 
9:28 PM
since there are blue green skiways that go down to the bottom
alongside red and black ones
worst part about skiing black is that If you wanna have fun it has to be early in the morning
like 7am
because at 10 its already destroyed by people
 
@KamilSolecki Any specific examples? I know of Val Thorens, Bansko and Mayrhofen
 
if you want black black, go at around midnight, that way it's so black you don't see where you're going. Most fun, but hardest difficulty
 
@KamilSolecki Same for many blues since so many people go through them
 
@towc wait, meeting
 
sure
 
9:31 PM
@zirak my favorite ones: zell am see, solden, val di fiemme,
madonna di campiglio
 
nah
 
user2620028
anyone here live in CA?
 
oohh
 
you wouldn't want to deal with italian "services"
 
Thanks, I'll keep them in mind
 
9:32 PM
@towc italian services are good as long as you aren't in the cities
rule no. 1: anywhere in the world you go, always eat where locals eat
@Zirak no problem. If you ever need help with anything regarding skiing (like picking skis, gear, etc.) hit me up
I'm riding these: skionline.pl/sprzet/…
 
when did
 
@KamilSolecki That's my rule anytime I go to someplace I'm not familiar with. Eat where the locals do.
 
90% of the time it works out better for me
 
@KamilSolecki thanks! Since I'm still a beginner I'll probably keep on getting most of the gear from the ski schools I'll be with
 
@KamilSolecki it's kinda creepy that you know the dates of my holidays and where I am and all, btw
 
9:43 PM
yeah sure! Although when you get skilled enough, you should buy skis as soon as possible, saves money in the long run
@towc I have slightly better than average memory
 
you and badger should team up
 
And invade yo home?
 
well, that too
I think badger wrote down the birthdays of pretty much every regular here
 
I tend to remember things without writing them down
but my short term memory is tragically bad.
like, absolutely terrible.
 
obligatory link to /r/IamVeryClever ?
 
9:46 PM
I still remember scenes from my 3rd birthday
 
i'm the opposite
 
@towc doesnt check out, sorry :P
if you wanna make me unproductive, task me with 4 things that should be done consecutively
in the next hour
I will do one maybe
that may be due to the fact that I am amazingly chaotic
which I try to battle constantly, but doesnt really work.
 
10:02 PM
@KamilSolecki I'm familiar with chaotic good and chaotic evil, but that's a new one to me.
 
in DnD terms its chaotic retarded
I think Im gonna enter that JSK13
 
I wish I had people to actually play with instead of talking shit ;_;
 
sounds like fun
play what with
ah dnd
never played. Did play some warhammer tho (although a little only)
i know a board game you would love
Its called Power Grid
requires strategic planning plenty of rounds ahead and lots of calculations
 
I played that one twice
Won both times
Wasn't a huge fan though :P
 
10:06 PM
Don't get me wrong, it's a great game
 
wrong people I guess
 
But it's competing in the Eurogame category
so much pure awesome there
 
what do you mean by eurogame category?
nvm checked, TIL
so you are more into roleplay, huh? :P
!!kinkykendall
 
Oct 16 '15 at 15:11, by Kendall Frey
I can do goatse
 
@towc We will be in Zagreb until September 15, then we will go to Budapest
Then idk
 
10:11 PM
budapest is awesome
 
@CapricaSix omg really, that guy had put some serious time into his craft
 
@Trasiva yo, you up for a game?
 
10:34 PM
> craft
@.@
 
11:13 PM
@monners do you use ngnix?
 
chlamyd? claim? hrm, my friend would like an explanation...
 
your friend wants an explanation for his stds
 
@FélixGagnon-Grenier admit, I think
 
hmmm, yah that would make some sense ;)
 
maybe it's because of his sexual activities
does he have a propensity to sleep with people who are known to incubate sexually transmitted diseases
 
11:25 PM
@Arrow I have, but I'm not expert
 
It is such a hard thing to learn, lot's of unanswered questions on SO
 
@Tobiq if you are bored, why dont you start in js13k
 
whats that
 
youll get a challenge
----->
10 hours ago, by Some Guy
PSA: http://js13kgames.com/ has begun. The theme this year is lost. Competition runs until September 13!
 
11:36 PM
go learn w3js
 
maybe
 
😈
 
w3 schools is only quality.
 
i feel like ill be up against men in the industry for 20 years
and have made actual games
 
@Tobiq It's the women you've gotta watch out for. They're better engineers.
 

« first day (2494 days earlier)      last day (2453 days later) »