« first day (1225 days earlier)      last day (3088 days later) » 
00:00 - 21:0021:00 - 00:00

21:00
0
Q: Busiest time in mall

user1229441 The mall management is trying to figure out what was the busiest moment in the mall in the last year. Each data entry includes a timestamp (seconds in Unix Epoch format), an amount of people and whether they entered or exited. Example: { time: 1440084737, count: 4, ActionType: "E...

@Phrancis That's because you didn't create it yet.
Add self.score = 0 to your __init__.
Modify score += 1 to self.score += 1.
#ThereIFixedIt
Hmm ok thanks guys I'll try that
Anybody got any C++ questions?
No?
Well okay.
@user2296177 There must be 200 zombies out there. Go find one.
I have a C++ question, why is it so damn convoluted
:^)
21:08
@DanPantry Do you want to turn this into a C++ vs JavaScript?
What's convoluted about C++?
the war of all wars.
I was joking
^^
though if C++ had rust's borrow checker and modules, it would be the perfect language
basically, C++ would be a better language if it was Rust. and not C++.
What's a borrow checker?
21:09
the borrow checker is the mechanism in rust's compiler that prevents you do use-after-free, happens-before that sort of thing
@user2296177 See docs.
basically the borrowck is the thing that checks at comipile time for concurrency errors, the docs will explain it better than I can.
@DanPantry C++ will throw a compiler error in your face.
For use after free, yeah
But not for all things
Unless it happens at runtime.
21:10
lol warnings
In that case you got exceptions.
@Phrancis warnings should be treated as errors in C++ anyway
that's why you always compile with -Wall
@Phrancis Sorry, it should throw an error, not a warning.
IIRC anyway.
It'd probably do it for very basic ones
Oh well, as Dan said, treat them as errors to prevent complications.
21:11
@DanPantry I compile with that and pedantic errors too.
but in larger programs I don't think C++ has the semantic depth to notice it
In case -Wall doesn't already have them
@user2296177 s/pendatic/pedantic
2
though then again, C++ has const so I guess it has the things that Rust does
Just Rust is immutable by default instead of mutable by default
@Mast lol
21:12
brb
@Mast TS
@Mast Thanks
@CaptainObvious Since I already answered the question, perhaps someone else can address the answer invalidation.
@Jamal Fixed.
By the way, is it even normal to return a traditional array in Java?
21:19
Is it considered ok in Python to use classes only when it fits, e.g. for a type of object that's too complicated to represent by one of the normal types?
@Phrancis As long as everything is encapsulated in functions.
If something is too complicated, it definitely should have a class.
Complicated things go in classes to make them less complicated.
Perhaps you should tell us what exactly you're thinking about :-)
Board = NewType('Board', Dict[int, Cell]) # a simple type
@Mast Abstraction solves so many problems...
@Phrancis You just created a new type AFAIU. You no longer need a class.
is NewType like a record?
21:25
However, I would hesitate making it a type.
Why don't you make it a class and give that class functions?
Like any proper OO?
You could even do both, now I think about it.
Give the class a field which is a new type.
@Jamal well it depends on the use case.
@Phrancis What do the recent PEPs say about it?
For collections that don't change size it's quite appropriate
also oil processing is really annoying
@Mast Haven't really checked, kind of winging it :)
I like your approach/idea I might try that
@DanPantry NewType is essentially an alias for whatever thing you define it as
At least, AFAIU it
@Jamal I can't speak for java but i'd say probably not... the user either wants Collection for mutable stuff or Iterable for readable, but non-modifiable, stuff
21:34
484 is about Type hints, which may be relevant (including 482 and 483 by the way). 435 is about Enum by the way.
I've had 484 and 435 open
:-)
I didn't know those were referred as the PEPs
Usually you refer to specific ones, but I guess this works.
@Phrancis sounds like you need... a PEPtalk
7
21:40
badum-tsh
@DanPantry Killing it with the bad jokes
I mean my name is very close to Dan Puntry. you should expect this.
7
Don't get us started about the fish jokes.
21:43
i have no regrets
Meh, he wasn't around for that so he won't get it
Or she, apologies
Now I'm tempted to get started about the fish jokes anyway.
You have a bad influence on me @DanP
Please don't, fish puns stink =D
a whole new level of bad has been unlocked
@Mast Please do.
21:45
I love puns.
@arda haha
Feb 7 '14 at 22:58, by Jamal
A fish, a monkey, a mug, a robot, and a rabbit walk into a bar...
Don't feel orcaword about it...
This chat is almost as entertaining as C++.
almost?\
21:46
oh crap
This chat is way more entertaining than C++.
I mean.... C++ can hardly be considered entertaining ;-)
This is @Phrancis's opinion:
HI MONKEY
> We should dolphinitely scale back on the fish puns
21:47
And behold, our sage monkey arrived. Master of Puns.
@rolfl Give us some puns, please.
But we already graduated. :-P
Yeah.... the caviar of puns.
So he won't bother the team with them. Time to bother us with them instead.
Monking Jamal... long time..... probably too long.
21:49
After all, we are only unofishal punsters. You've been recognized for it.
> Never trust unlicensed puns, always check they're ofishal
Returning []array things in Java makes a lot of sense and is normal, when it makes sense ;-) ... often though, programmers don't have that much sense, so they return List<...> instead... when [] would have been better.....
then again often when they return [] they actually should've returned Collection or Set
@Mast I saw the puns
My pet peeve is things that return List<Integer> ......
21:52
Why's that?
Unboxing?
@rolfl Oh, I also need to send you my updated resume (new skills and employment change).
@user2296177 try removing a certain element from that list
I was curious about [] since it doesn't work in C++ and assumed it was the same way in Java.
that's only the start. usually they're just slow as heck though
@Jamal why would it not?
0
Q: Filter sheet by multiple columns

t3chb0tIt didn't take long and the last filter for a single column at a time isn't enough anymore. I needed a more advanced filter that can filter by multiple columns. I've wrote another function that now looks like this. This time I use an additional column A where I put true/false as a result of the ...

21:55
[] in Java is basically ** in C++
@Vogel612 Do you mean just *?
no because Arrays are references
Arrays will decay to pointers, not to pointers of pointers
arrays are more like pointers than references.
correct, but returning an array returns a pointer to an array behind the scenes
@user2296177 A pointer to a pointer is **.
So Vogel is right.
21:56
Huh? I know that a pointer to a pointer is **.
but you can't really compare the semantics either way..
well java Arrays are Objects.
maybe that makes it cleaner
so you have an Object and within that Object there's a raw array
for C++ purposes the closest match is either a class with an array in it (which as you mention correctly decays to a pointer)
or just a pointer pointer
which makes 3d arrays even more confusing
aside from that the array elements often are objects, just to make your day worse
@Vogel612 I see what you meant now, for some reason I thought you meant arrays in C++ were **
Been a long day.
0
Q: Record data structure in Java

user298519Person.java public class Person { // private to prevent being accessible by // stating "person.name", "person.age", "person.friend" // and instead making setters and getters private String name; private int age; private boolean friend; public Person(String startNam...

@CaptainObvious I don't know what is going on here.
JAVA i guess
@CaptainObvious WAT?
22:09
I'm glad they explained what private meant in a comment above the use of private.
Though, I thought that was our job
@Vogel612 There are array references though.
Without any pointers involved.
Well, in the sense that it's a reference and not a pointer.
@CaptainObvious Interesting how the person has a friend attribute.
> // TODO Auto-generated method stub
a friend to who? according to that object model, presumably everyone.
A boolean friend?
22:14
So, do you still have to do it or is it auto generated?
Who's that?
A Bolian.
close enough
Reminds me of the chief orc in LotR.
@Mast his head looks like an easter egg container
but painted blue
Yea, they all have those ridges over their head.
22:16
Talking of easter eggs...
I like easter eggs in software.
The out-of-universe explanation must be something like 'cutting the mask in half makes it easier to put it on'.
They typically aren't implemented anymore, though.
like do a barrel roll in google :D
Or play pacman on the streets of your home town.
Oh.
But that wasn't a real barrel roll.
The squid in Assassins Creed II.
That's a fairly recent one.
Just Cause 3 has a couple, according to rumour.
22:21
Wow, I solved a problem with jQuery, instead of creating more problems!
4
The Abstergo logos in FC3.
Plenty of easter-eggs.
I heard that Windows Remote Desktop has one that was never discovered.
Ask Google Now "When am I".
Don't have an Android.
@skiwi lol
your problem is now that you're using jquery
I asked Bing that: deathclock.com
@Mast I would be morei mpressed if he didn't have to say 'question mark'.
@DanPantry Cortana automatically assumes a question mark.
@Mast it doesn't
@arda Mine does.
22:26
Cortana, from what I remember, it may or may not put a question mark depending on your voice tone
It sends to you to deathclock.com
Not exactly what I had in mind.
@Mast Well, that's a blast from the past.
I like the sadistic mode.
3
/r/nocontext
> I am sorry, but your time has expired!
Have a nice day.
And it isn't even Friday.
Man this is fun... repl.it/D3Ao
Current board:
1_ 2_ 3_
4_ 5_ 6_
7_ 8_ 9_

1_ 2_ 3O
4_ 5X 6_
7_ 8_ 9_

1_ 2_ 3_
4_ 5_ 6_
7_ 8_ 9_
Eh.
The display is not superb, but I suppose that's kind of moot for a console app?
@DanPantry Kinda like when I was learning SQL not too long ago. Yet, with no exams, I made a 100% in that class.
@Phrancis Either you display something or you don't display something.
Don't half ass it. Whole ass it instead.
22:35
I'm open for UX suggestions... I think my display is practical (or will be, once there is user input asking which cell they want to play next...)
Turn it into a User Experience question.
But, yeah it's ugly
@Phrancis Perhaps that will make it better. Currently it's just confusing :-)
I might get more into ASCII art after the thing actually works... since the display is just a method of the board, it'll be easy to change
I'm trying to decide whether to improve my computer-bombardment algorithm, or to make a WPF UI next.
I think I'll do the algorithm.
22:37
When given the option to make a UI, or something else, always choose something else.
2
@Phrancis And you aren't even a hard core C++ programmer.
> Most of the hard core C++ programmers I know hate user interface programming. This surprises me, because I find UI programming to be quintessentially easy, straightforward, and fun.
@Mast um ever heard of Java GUIs? ;D
Granted, I agree GUIs are pretty easy, it's just repetitive and largely tiresome, almost like busywork
True.
WPF GUI's are anything but tiresome.
They are usually easy to make, but they can be a horrid pain to figure out how to do certain complicated things (just like anything else).
I guess I need to create an array of known points of a (potentially) uncompleted ship and use that for future moves.
If there are no points in the array, do a random move.
Otherwise, use the points to figure out what direction the ship is (or might be) facing and continue the attack.
23:02
0
Q: EntityFramework UnitTest Opinion

userHello i am quite new in testing :) So plz dont slate me :D I just want to ask what can be done to make this could smaller in nice and easy way. Any ideas and help will be nice :) Tests works i just need opinions :) Tests using System; using Vegan.Test.TestClass; using System.Collect...

> So plz dont slate me :D
> using Vegan
:x
ingredient.VegeOrVegetarian = VeganType.Both;
twitch
I feel like that question is shaming me for not being either vegan or vegetarian
Assert.Fail("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);
That's not doing what you think it's doing, buddy
23:13
Yeah, does C# have Assert.Throws?
Well, the testing libraries do
Zak
Zak
@Mast I recognised that without even having to see the source ^^
23:43
0
Q: A simple fully connected ANN module

SnateI've written a simple module that creates a fully connected neural network of any size. The arguments of the train function are list of tuples with a training example array first and an array containing its class second, list that contains a number of neurons in every layer including the input an...

00:00 - 21:0021:00 - 00:00

« first day (1225 days earlier)      last day (3088 days later) »