« first day (851 days earlier)      last day (3465 days later) » 

09:01
I usually test everything on Chrome because it has the best dev tools.. guess IE is useful for something
Have you ever used Opera Dragonfly?
0
Q: Unordered (hash) map for C

coderoddeI am still working on basic data structures for C. Now I came up with a hash map: unordered_map.h: #ifndef UNORDERED_MAP_H #define UNORDERED_MAP_H #include <stdlib.h> #include <stdbool.h> #ifdef __cplusplus extern "C" { #endif typedef struct unordered_map_t unordered_map_t; ...

0
Q: Using bind instead of promises or stacked callbacks

RivenfallI've seen tutorials about node promises and such but not using bind. I feel like I can do lots of things this way and keep everything clean: Updater.prototype.generateLocFieldForDocs = function(docs) { console.log('list obtained') async.eachLimit(docs, 10, this.generateLocFieldForDoc.bind(th...

@IsmaelMiguel no, but from what I understand some of its browser support is pretty poor going by caniuse.com
Because it's old
And was ruined when Opera decided to use Blink
I used ye old Opera years ago
09:06
I used it until 2014
I had to switch to IE
Opera became incredibly slow on Facebook
Opera mini was discontinued, I believe
Makes sense, it was the BlackBerry browser as far as I remember
And used on old Nokias, as the default alternative browser
09:10
It is the default browser
On my Android tablet, I use the non-Chrome default browser
on my iPhone I use a version of Chrome that has Ad-block
iOS Safari is just awful at everything else
Safari is the IE on Mac
there are so many web pges that have ads that rediret you to the iPhone store it's infuriating
Someone didn't though it through
someone just raised a help desk call in my company and the reason was this:
> Q3: Reason? Came back from "pregnancy"
(quotes theirs)
09:12
o.O
What in the world....!?
@DanPantry we have a company blog which is "gems from the help desk"
6
@Amelia /r/talesfromtechsupport style?
@DanPantry yes
I don't have such things
So where can I apply?
I kid :-)
09:13
@DanPantry lol
2
@IsmaelMiguel I work for a global company so we need a help desk for internal calls :\
But I've wasted almost 2 hours on a trip to re-attach a screen and a network cable
@DanPantry Where I work is just me, my boss and his wife
My favourite was the guy calling the help desk to ask about a fridge installation and why they had a bigger freezer than fridge in an office on the other side of the planet. The bloody thing was upside down.
09:14
@Amelia i'm fascinated by the fact that an employee called your help desk about a fridge
They placed a fridge upside down?
@IsmaelMiguel it's not even easy to do that; the bloody thing almost falls over if upside down because the top is bloody rounded
They literally spent 30 minutes balancing a fridge upside down, then called the help desk and complained
Holy mother of God!
09:15
There's no cure for human stupidity
What is wrong with people?
Not that i'm calling those employees stupid, it was probably monday morning sickness.
Clearly
Yeah......
The correct diagnosis was "not drunk enough yet"
4
09:16
The brain stopped working
Drunk?
@Amelia Ha
I've never been drunk
@IsmaelMiguel its an unwritten rule that to do any DIY you have to be inebriated.
I wonder how it feels like
@DanPantry "Hey guys, watch this"
09:17
I don't drink, either, but apparently thats one of the rules in the 'lad bible'
@Amelia "hold my beer"
@DanPantry I always do it sober
@DanPantry I would never give my beer to anyone
I just drink it all
> I've never been drunk
> No one is getting my beer
@Amelia how do you work on Osu!? just moderation?
Yeah, I've never been drunk
But beer is sacred
my ex was in the top ~2000 on Osu!Mania in the UK
@IsmaelMiguel s/sacret/sacred
09:19
@DanPantry ex-developer
Just wanted to make sure I wasn't missing something
@Amelia oh, apologies, I just checked your profile and assumed you were a mod on the forums or something
Technically still one
I still have mod powers
devs stay developers, because it's not like we don't know literally everything secret about the game anymore when we leave
I created the osu-web repo
@Amelia what exactly is there secret about a game where you press buttons? aside from private keys, but its not like you'll know those by heart
@DanPantry the entire anti-cheat system, source code, architecture, everything that goes on in private rooms
Anyways, I originally made github.com/ppy/osu-web (which is why it's in Laravel :p)
@Amelia I never realized Osu! was private source
I don't know why I assumed it wasn't
09:22
@DanPantry it's being open-sourced
checks first commit
> Showing 737 changed files with 33,614 additions and 0 deletions
lol
2
@DanPantry used to be closed source, old history was 800 commits from me, 200 from peppy, 300ish from nanaya
@Amelia didn't use git or didnt want to keep the old history public?
old history has amazon s3 keys in
I can see how this might be a problem.
i suppose when you're at 1300 commits, git filter-branch and/or git rebase becomes a bit.. out of the question
09:26
that and github's reflog isn't cleaned when force-pushing
You need to contact github to get them to do that
If you know the commit hash, you can find old commits after force-pushing
TIL
BTW.PhoneCall
Monking
Monking
Greetings
Moonking
09:33
For some reason I aws assuming that @Amelia was a SE employee lol
Monday mornings are weird
Oh wait, it's Wednesday already
@skiwi I wish
@Amelia Who doesn't?
if('\0' == "\0")
{
  $window=window;
  $show_msg=$window['Array']['filter']['constructor']('alert(arguments[0]);');
}
else
{
  $show_msg=create_function('echo $msg;','$msg');
}

$show_msg('hi');
What do you say about that polyglot magic?
What WAT
1
Q: Observable collection async update

user75534Is it good solution for updating ObservableCollection? Are there any dangers hiding in this code? namespace WpfApplication142 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() ...

Polyglot
The code was for everybody, not specifically for you
But there's no way to split message blocks
09:39
@IsmaelMiguel please god no
$window['Array']['filter']['constructor']('alert(arguments[0]);');
that scares me
That creates a new function
I will try something else that doesn't scare PHP
@IsmaelMiguel I have seen a lot of PHP in my lifetime. Good luck scaring me.
6
if('\0' == "\0")
{
  $show_msg=function(){alert(arguments[0]);};
}
else
{
  $show_msg=create_function('echo $msg;','$msg');
}
There
@Amelia Don't test me...
09:42
@IsmaelMiguel Do it
I'm going to assume alert is a PHP function and isn't doing some kind of nasty voodoo to invoke javascript's alert on the browser side
I havent' done PHP in so long
<?for($s=str_repeat(' ',$n).$s;$i++<strlen($s)+$n;sleep(1))echo substr($s,$i,$n),'
';
Not that I miss it, because I don't
sleep(1) in a loop
wat
@DanPantry Actually, it is a neat trick. PHP won't 'interprep' escape sequences inside 'single quotes'
Javascript does.
And so, it gives the same variable 2 different values, based on the language
neat trick should be synonymous with "hack"
09:45
@DanPantry That was for a PPCG question. Using that gave me -10 on the score (lower is better)
It's a neat trick
It is a neat trick, but I wouldn't want to see it in my code
@IsmaelMiguel does that segfault?
@Amelia No
@DanPantry And you won't
@IsmaelMiguel it crashed 3v4l.org
it only for example, main question about dangerous of updating ObservableCollection in such way. — user75534 2 mins ago
09:46
@DanPantry "hack" might be an understatement
I forgot to mention that it is to run on PHP4.1
Not sure if that means example code in that question
@IsmaelMiguel then never mind
I run on PHP 5.6 or higher :p
1
A: Fake Marquee Text

Ismael MiguelPHP4.1, 85-10 bytes Yes, this is a very old version, but it has a functionality I need. You can still run it in any more recent versions of PHP, but you need to set the variables yourself before running the code below. That helps me to reduce the size of my code a lot! It is really basic: <?f...

There
@SuperBiasedMan looks like an MVE
09:47
It has a polyglot to test the code (you can copy the polyglot into a PHP interpreter or a Javascript console)
@DanPantry Minimal Verifiable Example, right?
@SuperBiasedMan yes
(MVEs are off-topic at CR)
or at least as far as I remember
@Amelia Scared enough?
@IsmaelMiguel nope
<?for($H=-1;$H++<23;)echo$H?",
'":"'",$H=str_pad($H,2,0,0),":00',
'$H:30'";
09:50
@DanPantry I'd assume they're at least borderline, and this one definitely seems over the line as a very stubby-like one.
@SuperBiasedMan (from meta)
@Amelia Can we move this to The nth monitor? There's site business going on.
> Is it actual code from a project rather than pseudo-code or example code?
> Do I want feedback about any or all facets of the code?
> To the best of my knowledge, does the code work as intended?
@IsmaelMiguel I have work to do
Alright
There's lots of PHP on my PPCG profile.
You can check it later on, if you wish
09:53
@DanPantry Yeah, that clears it up, thanks!
10:12
0
Q: Finding Euclidean Distance in c++.

iwanmaidinI would like to create a c++ program that can help me to find the euclidean distance between 2 randomized vectors. This is what i got so far.This program can run but still fail to give me the correct answer. I hope someone could point out my mistake. Thank you in advance! #include <stdio.h> #in...

0
Q: Is this piece of C++ truly standards compliant?

dionadarTo "entertain" some students I advise, I have written the following piece of code: /* This is valid C++ */ auto main() -> decltype('O.o') try <%[O_O = 0b0]<% http://codereview.stackexchange.com/questions/102581 typedef struct o O; o*(*((&&o(o*o))<:'o':>))(o*o); if(O*O = decltype(0'0[o(0)](0))(0)...

@CaptainObvious Broken code: "This program can run but still fail to give me the correct answer".
@CaptainObvious I would say that this is off-topic
@IsmaelMiguel What reason?
Code Review is meant to improve readability and maintainability and everything related to make the life easier to the programmer
That code, is totally the oposite
And the asker just wants to know if it is compliant or not
He doesn't want a code review
I know that minified, golfed and obfuscated code is off-topic
Just because he's interested in different things than you are, doesn't make it not a CR
10:19
Hm. I don't know C++ at all so I'll refrain from getting involved.
That code is bolderline, in my opinion, with obfuscation
Have you seen his comment?
If it was clear, you wouldn't need to ask why the URL was there
(I wondered the same too, and was about to vote to close as a duplicate until I noticed the difference)
@IsmaelMiguel he didn't make a comment. @Morwenn and @SuperBiasedMan have made a comment
@SuperBiasedMan That's a label followed by a comment. — Morwenn 6 mins ago
This comment
Oh...
was made by @Morwenn
lol
(sorry for the tags Morwenn..)
... Right ...
10:22
No problem :p
But still, the code isn't clear
@IsmaelMiguel I'm pretty sure the intention of that question is produce code that isn't clear, but standards compliant.
On the other hand, it's made to be obfuscated.
That's off-topic
But Code Review might be a good fit for standard compliance.
10:23
Code that isn't clear to enough to be reviewed is off-topic.
Standard compliance is a valid question imo
However, the code is purposefully made to be unclear.
As long as he states that he doesn't care about clarity and/or he wants the code to be unclear, I think its' fine.
Minified code as well, and it is off-topic
If you feel strongly about it, VTC
But I think it's fine, and apparently so do Morwenn and Jeroen
The goal of that code is to be unclear, and it says that in the question. OP is asking for a review based on standards compliance.
How can you review it if you can't read?
10:25
questions that are unclear are off-topic, but unclear code is not.
@IsmaelMiguel I can read it.
If we turned away code that we could not read we would be out of a job
@Morwenn I can't.
@IsmaelMiguel then don't review it.
@IsmaelMiguel You have no experience in the C++ tag either
10:26
Now, the only thing I am on-edge about is that OP doesn't explain what his code should do.
@DanPantry One thing is not being able to due to lack of knowledge. Other is due to the lack of clarity in the code.
@IsmaelMiguel this question is clearly meant to challenge people who have a lack of knowledge.
@DanPantry Compile while being unreadable. And it achieves its goal.
@Morwenn he actually expanded on that, too
For challenges, theres PPCG
10:27
@SuperBiasedMan They're example code.
This is not a challenge.
This is a piece of code that he wants reviewed about whether or not it is standards compliant.
yes, the code is unclear. That's the purpose of the code. It is intentionally strange looking, but it compiles.
@DanPantry That's off-topic.
Alright
So, obfuscated code is on-topic
Let me throw the on-topic page at you.
Do I want the code to be good code? (i.e. not code-golfing, obfuscation, or similar)
Okay, then I'm wrong.
10:29
The xkcd Survey: Big Data for a Big Planet
6
However, I challenge the assertion that it is off-topic because it isn't 'clear'
Just because the code in a question is unclear doesn't mean that the question is off topic.
Now, if the question is unclear in what it is asking, well, that's a close reason.
There is nothing unclear about this question. The code, however, is obfuscated, and as @mast correctly pointed out is off topic
Wow, I got an error that the message is too long
I'm voting to close this question as off-topic because on the on-topic help section ("What questions are on-topic for this site?") one of the points of the on-topicness isn't fulfilled. Quoting: "Do I want the code to be good code? (i.e. not code-golfing, obfuscation, or similar)" isn't fulfilled and therefore, as per the documentation: "If you answered "yes" to all the above questions, your question is on-topic for Code Review.", but the refered question would have an answered with a "No", making this off-topic. — Ismael Miguel 1 min ago
It posted for me
Any hint to edit?
@IsmaelMiguel your comment posted
from what I can see
BTW.Work
10:35
Yes, I tried to paste the markdown
Anyone think I should change anything?
Why?
Why what?
oh boy that survey was fun
@IsmaelMiguel It's a bit long.
You don't want to tell a story in comments.
You want to tell what's wrong and just that.
I know, but I can't shorten it
10:38
Keep it civil, keep it short.
@IsmaelMiguel Yes, you could.
Time's up :/
How? I can delete and re-write it
@Morwenn I agree it's an interesting question, but it's not on-topic IIRC.
> I'm voting to close this question because it's content is in direct conflict with the on-topic rule "Do I want this code to be good code?", which does exclue golfed or obfuscated code.
Monking, btw.
monk @Vogel612
Greetings
That is a way better text
Should I delete and re-write?
10:42
you're just long-winded not wrong
anyways I'm off to enroll. BBIAB :)
@Vogel612 That, much shorter.
And much better
10:55
@Quill Just finished it ^^
Somebody will probably make a chart out of it.
We could even make it a community-challenge.
@Morwenn s/critter/critic
unless critter is some kind of portmanteau between codereview and -itter :P
@DanPantry Critter is indeed a name used for Code Review users :p
TIL
2nd monitor is so bad for productivity damn it

« first day (851 days earlier)      last day (3465 days later) »