« first day (1110 days earlier)      last day (2691 days later) » 

6:00 PM
Nathan invoked undefined behaviour gasp
Computer took fire.
 
@JAL I'm thinking about self-answering a couple of questions on Retrocomputing that are more focused on writing NES software and emulators. Do you think that would be on-topic there?
 
JAL
@NobodyNada absolutely! We have assembly and emulator related questions already, and I think yours would make a great addition
 
awesome!
 
JAL
We could use some more canonicals, and it sounds like you have a wealth of knowledge the site could use
I also saw an answer of yours on Gaming.SE the other day, it was impressive
 
@JAL thanks!
 
6:06 PM
@JAL I liked the "why do we use i for loops?" question
 
JAL
@Adriaan Yeah that was a good one. There are some really cool questions on that site, I hope it gets more traffic
 
@JAL TBH: I'll only read things there if the title pops up in the HNQ list and looks interesting. That's how I browse any non-SO SE site
 
JAL
@Adriaan yes, we've been lucky to be on the hnq list. Also getting some good traffic from reddit and hacker news
 
I got interested in the NES a few years ago after I saw this video. I downloaded the guy's emulator source & couldn't get it to work, so I decided to write my own emulator.
I wrote it in Objective-C so it wasn't nearly fast enough, but last year I rewrote it in Swift.
It's still not a good emulator, but it was fun to write.
 
JAL
That's so cool! Is it on github? I'd take a look at it
I'd love to write a NES emulator at some point, but I can't even finish my damn 8080 emulator
 
6:09 PM
@JAL no; it's not on GitHub. I might put it up someday
@JAL Tip: Start with a simple game like Donkey Kong, and definitely not Super Mario Bros, which is probably the hardest game to emulate that doesn't use a mapper.
 
JAL
@NobodyNada oh yeah Donkey Kong was a launch title right?
 
@JAL I'm curious what kind of emulation they use in the new NES retro console
 
JAL
at least in Japan
@Machavity Oh yeah, same. I have one of those and it has a bunch of licenses in the credits. Haven't looked through them all though
it might be the internal emulator they use systems like the wii/wiiu/3ds, etc
 
Ars Technica was speculating it was really a 2DS under the hood
 
@JAL yeah, probably in Japan
@JAL I think they said it was a new emulator.
 
JAL
6:12 PM
Huh, interesting
@NobodyNada did you ever read this? Might be interesting to you Statically Recompiling NES Games into Native Executables with LLVM and Go
 
I want to get one of the new NES things and build a TAS playback system with an Arduino (it uses the same connector as a Nunchuck, so it's i2c)
 
JAL
yup, that would be a cool project
 
I've been writing some payload for an arbitrary code execution exploit on Super Mario Bros. 3. When it's done, it will allow me to load and execute whatever code I want over the controller port, so I can load in some test ROMs
Here's the run I started with -- I used his arbitrary code execution setup but gave it my own payload
 
@Jan @Tunaki Got it much faster now. Took about 20 seconds
 
Yeah about the same here
 
6:18 PM
in total?
 
@JanDvorak Just part one. coding 2 now
 
Oh that's total for me
 
I mean it will be the same since you can do them at the same time. I'm just solving each one separately so I have them for github.
 
same :)
 
\o/ there's a new What-If!
 
6:23 PM
brute-force is 13 seconds, for the two parts for me
 
Part 2 took me 53.85 seconds to complete in Ruby
> you could be eligible for a Nobel Prize—but only in the sense that anyone who's not dead is technically eligible.
3
 
Pushed, and done for the puzzle of the day :D.
 
stupid compiler is optimizing the answer away on me
 
It's not the compiler's fault. It's never the compiler's fault.
!!/blame
 
6:37 PM
@JanDvorak It's Gothdo's fault.
 
6:58 PM
Day 5 all done and posted
 
Posted where?
 
Why do people keep leaving opening braces on separate lines alone? It's normal in C#, but I still don't get it.
Thanks for the link, though
Here's my Ruby solution:
require 'digest'
def aoc5a input
  (0 .. Float::INFINITY).lazy.map do |i|
    digest = Digest::MD5.hexdigest(input + i.to_s)
    digest[5] if digest[0..4] == "00000"
  end.select(&:itself).take(8).to_a.join;
end
 
what is that?
is that room for ruby?
 
7:05 PM
Hmmm...
 
@JanDvorak I do it because my eyes appreciate it.
 
@JanDvorak what that site for?
 
@JanDvorak definitely a lot shorter than the C++ code.
@Sami They are Christmas themed program challenges.
 
@NathanOliver not really, except the braces and the thousand imports
 
Nice
 
7:10 PM
@JanDvorak Well you have 7 active lines and mine is 10.
 
https
 
How do you count that?
 
If you get rid of the require, def and end it is only 4 lines
@JanDvorak How many lines do you consider it?
 
I'd say yours is less than 7 "real" lines
 
Are you not counting the variable declarations?
 
7:14 PM
I'm not sure what should be counted. But I believe the braces shouldn't, at least not the opening ones :-D
 
Of course, the Java beauty beats you all github.com/Tunaki/advent-of-code/blob/master/…
 
Yeah I do not count the braces. In essence I have
 
Part 1 is a one-liner :p I could make Part 2 a one-liner, but didn't feel like doing the hack
 
Hi!
 
for (std::size_t i = 0; found.size() != 8; ++i)
    std::string hex = md5(input + std::to_string(i));
    if (hex[0] == '0' && hex[1] == '0' && hex[2] == '0' && hex[3] == '0' && hex[4] == '0')
        if (isdigit(hex[5]) && hex[5] < '8')
            if (found.insert(hex[5]).second)
                builder[hex[5] - '0'] = hex[6];
@ChrisHappy Hi
 
7:17 PM
@NathanOliver you say not here
no codes here & no Q
 
@Tunaki That is a hell of a line
 
^ that what you say to me
 
@Tunaki Java8 foo
 
@Sami Sami there are exception to every rule and this is one of them. A few of us are doing this so we are talking about it. We are doing it in the down time in the room so it hurts nothing.
 
Hey @Nath
 
7:19 PM
@NathanOliver My one-liner are one hell of a line :p
 
It reads easily though, why I like it :)
 
[fail] I have a question. I can't seem to get why my question is a duplicate. It's here: stackoverflow.com/questions/40981329/…
 
yeah and mine hurts
 
JavaScript gurus ------------------^
 
7:21 PM
Where is our vertically challenged giant when you need him
 
@ChrisHappy Not sure it's a dupe, but I personally find it unclear. What do you mean by "combine a variable and function parameter"? I'm not sure what the expected output is
 
@Tun
I keep trying to click enter to select the name....
 
You can't assign to a return value of a function, but you can have a hashmap (plain object or ES6 Map)
 
I was wondering if a function will return a variable name of a string and a function parameter.
 
Oh I tihnk I'm starting to get it. But shouldn't the last example be magicFunction(3) = 3; //word3 = 3
and not word2?
 
7:25 PM
....Yeah...
Okay, edited.
 
In this case, I see why it was closed as duplicate. You're trying to refer to a variable by its name (like word + dynamic_thing) and let it store a value.
 
A function return value can be used as a key into some hash, but I suspect you can skip the "function" part.
 
Which seems to be what the linked dupe is doing "refer to a variable using a string containing its name"
Have you tried the answers in the linked question @Chris?
 
Okay, but that wasn't what that question asked... Wasn't the topic if such a thing was possible?
 
BTW guys that CSS Q from earlier was closed again. It is on meta now.
 
7:30 PM
Well it does. In your case, you have var someString = 'word' + magicParameter;
 
A more "manual" way to do it would just to have function combine (var) { //use var here }, but I was wondering if your could combine the two and still use the variable...

Doesn't someString = 'word' + magicParameter;`output a string, not the value of the variable?
 
user4639281
There is a simple answer to what youre asking.
 
'word' + foo appends the value of foo to the string "word". If you want the concatenation to refer to a variable, you need a pair of square brackets and something to stick them to.
 
user4639281
But im on my phone so its hard to explain in this medium
 
@Tunaki We have another really good one: stackoverflow.com/questions/40981854/…
 
7:34 PM
@TinyGiant okay...
 
@NathanOliver sigh
 
(Finally getting the "vertically challenged giant"....)
 
sometimes it makes you wonder
@ChrisHappy :)
 
Tiny the saviour
 
Maybe Tiny thy saviour?
lol
 
7:38 PM
Everyone is waiting to read his precious words.
:D
 
user4639281
Ill be on my computer later and will give a better explanation. The answer is "sometimes"
 
The master has spoken.
 
LOL
 
@TinyGiant Okay, thanks!
 
Let us dissert upon the meaning of "sometimes", as poor plebers that we are.
 
user4639281
7:41 PM
Lol. In cases where the variable declaration results in a property definition on the object context, it can be accessed prgramatically through the object context. In other situations where this does not happen, you cannot.
 
@JanDvorak sounds like DIY advice. Apply enough glue so the brackets don't come off
 
user4639281
That is inherently unreliable though, and probably shouldnt be used in production code
 
Okay, so.... no, unless you truly are a poor pleber and really desperate.
 
user4639281
Iĺl be able to fill in the gaps a bit more later
 
k
Although the function of my question is similar, isn't the topic of the question different? Or is that still defined as a dup?
 
7:58 PM
Remember, you were Time's Person of the Year in 2006. That being said, so was I.
 
Did anyone here ever noticed encoding problems with the message that come from Jobs? Both in the inbox and in the Jobs message section? Specially on replies?
 
I've never used that portion of SO.
Ever since I signed up for Monster and Indeed, I keep getting job offers and phone calls from recruiters. I regret everything =w=
 
8:12 PM
@Tunaki Do you agree with reopen here?
 
@SotiriosDelimanolis was closed again
 
@Compass my stuff is not public (I think) so the recruiters that do contact me, had to put in some efforts ...
 
Mine is no longer public AFAIK
still doesn't stop calls
 
Thats because you are in the databases now.
You've been cached and there is nothing you can do about it
 
I reject your reality and substitute my own. equips toast to face
 
8:22 PM
Consider yourself ... cached
 
@Compass You can't, your in read only memory now ;)
 
Toast.
 
8:43 PM
Wouldn't this question belong on meta? stackoverflow.com/questions/40982095/… :-)
4
:-)
Good evening, btw.
 
Good evening... yeah lets move it to meta :D
 
Almost made me move it to meta =w=
 
@Olaf \o
 
That was my first reflex, too. Good to see I was not the only one :-)
 
8:55 PM
`stackoverflow.com/questions/40982981/java-recursion-program =w= apparently my comment was construed as "off-topic" by the OP.
 
-1: too many latin words. — Shog9 ♦ 14 mins ago
 
You know, if I could get away with actually wearing a piece of toast on my head, I think at that point I'd say I'm comfortable with life.
 
@Compass Wait.... you don't wear a piece of toast on your head?!
 
8,561 need review 980 reviews today
8
 
I imagine I am wearing the piece of toast.
Actually wearing it requires me to substitute my reality with my imagination.
 
9:00 PM
Do you have a preference of shape?
I hear star-shaped piece of toasts are better for the health.
 
I prefer the classic toast shape, square on three sides, and loafy expansion on the top.
 
psh. I wear a tinfoil hat and let the microwave radiation it picks up toast the bread for me.
 
This allows for easy re-application of bread as it is consumed or expires.
 
roomba @rene?
 
yeah, do we have to wait for that?
 
9:05 PM
i.imgur.com/JDGp3rg.png Why does the description start with "to refer to..."? The tag excerpt starts with "Do not use this tag to refer to...". What happened to the "Do not use this tag" part?
 
I'm out of votes anyway :)
 
@Gothdo it gets stripped off automagically
it is a feature
 
@Gothdo time to put a meta post to stack overflow about tag issue with stack overflow
make sure to use the meta stack overflow tag
I'm sure you'll figure it out. If you don't, at least the downvotes don't hurt
 
@rene Is it documented somewhere?
 
I tried to find it last week and I failed
 
9:08 PM
speaking of , can someone with tag wiki editing privileges rewrite the "do not use this tag for meta-discussion" part of that tag's excerpt in all caps?
 
@dorukayhan I doubt that would change anything. People just don't read tag excerpts.
 
@Gothdo but it would give us a very strong reason for downvoting meta questions posted on the main site like there's no tomorrow. "how the hell did you not see the warning that you shouldn't use this tag to talk about stack overflow the site?"
 
@dorukayhan done
 
bah
this year my immune system is really FUBAR
 
9:18 PM
hey magisch
not feeling fine?
 
this week one of the coworkers in the office came in despite having influenza
Apparently I caught it. And tonsilitis. And bronchitis
 
@Magisch that is not responsible at all
 
was at the doc today in the morning, got heavy duty antibiotics and 3 weeks of note
 
not only is it hurting you, because you shouldn't be working with this, but you contaminate other people...
 
now I'm sitting here and my brain feels like putty
 
9:20 PM
:(
 
Yeah sick days are to keep the company moving
 
Hatschiiii ... :p
 
costs less to give out free flu shots than it does to make up for sick people
 
bad thing is my company really discourages sick days
 
Wow.
 
9:21 PM
Something I'd even consider reporting to higher-ups frankly
 
If you stay under 3 days for a whole year you get 50 euro extra a month for the next year
pff as if anyone would care
 
Today I was planning to use a vacation day for jury duty, and found out I get extra leave just for jury duty.
 
@Magisch They are hurting themselves in the broader view :(
 
I'll be at 25 days of sick leave this year because I got shafted three times this year by heavy infections
 
@Compass Oh, that also exists here. I was invited once, and couldn't make it =/
 
9:22 PM
thats 5 more days and they could fire me for it
 
fire you?
you can't fire someone if they prove they are sick
 
yeah more then 6 weeks sick leave in a year is considered an undue burden on the company and they can fire you for it
and they do here
 
heck
 
Europe is weird :/
 
Isn't like that in France
 
9:25 PM
Here, we get 10 days of sick leave, and it rolls over.
Here being United States, at least for my company.
Keeping employees happy keeps their productivity high.
 
It sucks because if someone sneezes in my face I'm almost certain to get sick because my immune system is FUBAR anyways
 
Working from home is also encouraged when sick if possible so you don't infect the other 1000 software engineers.
 
and I'd rather not have 2+ cases of pneumonia and 2-3 cases of bronchitis a year it's already permanently reduced my lung functionality
 
Just 41?
What a slacker. Professional slacker.
 
9:29 PM
Yep
@Joncle accused me of that too.
 
on the slightly humorous side, the doc I always go to was like "You shouldn't be here AGAIN this early" today
 
That sucks :(
 
@Magisch take care :)
Time for me to sleep. Ciao
 
Can anyone tell me what that mean?
 
???
 
9:32 PM
I'm gonna go back to bed
see y'all tomorrow
 
I don't understand the question
 
cya Magisch
@Sami It's basically a help page about quoting someone else's work, and how to do it properly.
 
Aah so if i ask a Q in another place & try to add it to my A i should insert the link?
@Tunaki
 
@Magisch get well!
 
@Sami it means that if you use text or code that are not written by you, you are required to give proper attribution, which includes name of the original author and the source
 
9:36 PM
So edit my Answer please
 
@Sami do I need to edit your answer?
 
ok
 
If that OK means that you now expect something from me I think we have a misunderstanding.
 
Now i don't expect anything
 
=w=
 
9:40 PM
That is good, because I wasn't planning anything ...
 
Yes, it would.
 
I always liked the part where my entire understanding of Java was shattered when I realized it was pass by value and not pass by reference.
 
@QPaysTaxes nah, it means it sees a reference as it is passing by and just ignores it
:-P
 
it's passing a reference by value :p
 
9:56 PM
yw
 
We'll call it pass by reference but we'll call the pointers references, but we'll be passing the values of those references, so it'll actually be pass by value!
 
While pointers are references, pointers themselves are passed by value.
It's analogous to giving someone a copy of the telephone book versus telling them where to find the telephone book.
Telling someone where the phone book is would be passing a pointer by reference.
 

« first day (1110 days earlier)      last day (2691 days later) »