« first day (698 days earlier)      last day (4236 days later) » 

1:00 PM
@kbok Is that obfuscated code or something?
 
@Neil Think so. If that is what he wants. I'm having lots of trouble understanding what is really wanted.
 
@TonyTheLion Well, he didn't ask about readable code. He just wanted no loops.
 
@Neil #define i int. That should make it quite clear it's obfuscated code.
 
@R.MartinhoFernandes Don't you normally obfuscate the program?
 
@Neil No, I'm really more comfortable with this coding style. :)
shrinking suggestions welcome, this is going on twitter.
 
1:01 PM
@kbok Ah ok. You have strange programming style then.
 
@Neil not actually sure how you'd do that? Care to give an example?
 
@Neil It's because I'm french.
 
@kbok There are several extraneous spaces
 
@TonyTheLion union { int *bigarray[10000]; int* multiarray[100][100]; } ??
 
@R.MartinhoFernandes I don't know how to remove the spaces after int and return.
 
1:03 PM
@kbok That explains it then. Only french programmers use main.
 
@kbok seriously?
 
@Neil ah, but I don't see reinterpret_cast here.
 
@kbok There's ) { and a r ! that can be easily removed.
 
@thecoshman No, I wanted to make it short enough to fit into a comment and unreadable enough to not be of any help.
 
@TonyTheLion Just guessing, though. The guy who wrote that question seemed to want to convert one to the other
 
1:05 PM
@kbok yet you chose i and r for int and return?
 
@thecoshman Um yeah, because that's short and unreadable.
 
Produce the most cryptic code possible, come back and try understand it in 6 months
 
@R.MartinhoFernandes thx
 
@kbok ¬_¬ I am getting at your choice of letters, surely m and n would be more unreadable, as they are similar in look, yet have equally little relation to what they are being used for
 
0
Q: Point to specific value of an array

Floriki have an array, int* array, with more than 10.000 int values, but i want to point to each 100 position, it means that I will have int ** matrix, where: matrix[i][j], I want i from my matrix to point to array[i * 100], how can y substitute the address ? here is what I've done: u_int8_t **matrix ...

Solution thus far is to loop through the entire array.. again, is it not possible to use a union?
 
1:07 PM
whoa. c++/c again
 
@Neil If the point is... Wait, what is really the point?
 
@R.MartinhoFernandes Asking if there is, in fact, a smarter solution
@R.MartinhoFernandes As for the point, I haven't the foggiest.
 
Well, accessing multiarray[1][1] and bigarray[101] might be fine as there's no aliasing violation. But I don't see how that gives a benefit.
 
@Neil thinking of the standardised time thing. Having anything other then a small unit like seconds is stupid. other then earth, there is not sensible way to have a day or year. You should just takes seconds, and from there have things like a gigasecond. Of course, for the sake of vast periods of time, you might want to start saying a terasecond is called a 'year' but the names of these large units is meaningless
 
@thecoshman Haha, your sense of scale needs calibration.
 
1:11 PM
@R.MartinhoFernandes It's not fine to read an inactive member.
 
One gigasecond is >30 years.
 
@thecoshman I don't like seconds because it's based around a day
 
@R.MartinhoFernandes still, the point stands
 
If anything, we make a new unit based on a large multiple of the Planck time
 
@Neil indeed you could take a new way of defining a small unit, but it would be moot
my key point here, is that for some sort of galactic time, you would only have one unt, just like metric distance only has meter
 
1:13 PM
@LucDanton What if I do auto x = &multiarray[1][1]; auto y = &bigarray[101]; *x; *y;?
 
Well fuck. I got variant<int, recursive_variant&> to compile but the destructor attempts to destroy the referred variant now.
 
and of course, my 'galactic' time I basically mean metric time
well... not really...
 
@Neil just invent a new unit name like 1 fob or something.
 
Planck time is 5.39106(32) × 10-44 s, so we'll have a Nesh second to be 10 x 10^44 Planck units
 
@R.MartinhoFernandes I suspect that those still count as reads in C++. It might work in C though, I think &p[i] is an identity for p + i.
 
1:15 PM
Hey guys, here is a quick question for you. If I am simple code to fix a simple issue, and it works in my local machine, in the dev environment, and the qa environment but mysteriously does not work in the production environment, what should I do?
 
But it's right clever anyway. (I don't mean that in a bad way.)
 
The code fix is very simple.
 
> If I am simple code
wut?
 
If I am pushing
 
@kush fix it?
 
1:15 PM
@kush Get a new job
 
sbi
@TonyTheLion He means he his coded in a simplistic way. Not at all like our robot.
 
sounds like you got UB on your hands
 
@TonyTheLion how? I mean the same binaries went to qa and prod
 
@LucDanton My point is, why would it be wrong to do it without pointers, but right to work around it with the pointers (after all x == y)? (I don't have a definite answer, but I believe neither is wrong)
 
@Neil except basing a scale of off the the smallest possible unit you can is silly
 
1:16 PM
@kush debugger?
 
can't step through the prod environment stuff :( don't have access
 
@kush That actually happened to me once. Only thing you can do is get around the problem somehow or get direct access to their machine so you can debug it there
 
@thecoshman It's not silly! It gives you a big resolution only with integers.
 
@thecoshman That seems to be the most reasonable time unit, the smallest time unit you can have
 
@kush there's obviously a bug in your code (very likely) so go back to your code and look to find the bug. There's no magic that's going to fix it, besides going and looking and debugging your code.
 
1:17 PM
It's like basing temperature on absolute zero..
 
@Neil That is one option I have considered but that requires blessing from management. I thought you guys might have come across it before and have built a better thing
 
@Neil Erm, that's fixing an origin for a scale. Not the magnitude of the units.
 
@kush A better thing?
 
sbi
@kush I see three ways. One would be to try to reproduce the conditions of the production environment until the bug reproduces for you. Another way would be to add logging to the code to iteratively narrow down the erroneous code. The last is to attach a debugger in production and see what's wrong.
 
@R.MartinhoFernandes Because there are things you're allowed to do when taking the address of storage that isn't quite an object, and because the definition of a pointer mentions something in the spirit of "a pointer is either null or points to an object". So if you derive such a pointer value without UB, then by definition you point to the right object.
 
1:18 PM
@kush you think we're some crew with magical tools eh? :P
 
@TonyTheLion I needed to do one thing. Set an object as nothing. Like they say "You had one job!!" and I fail
 
@R.MartinhoFernandes True, but it should be a practical unit of magnitude, so I say 10x10^44 because it's close enough to the second
 
Working from memory so of course there may still be some obstacle.
 
@kush you may have set it at the wrong place in the code, then this could be the cause of your problem.
 
Why should Kelvin use the units of magnitude same as Celsius? Convenience, really
 
1:19 PM
@Neil There is no such thing.
 
sbi
@TonyTheLion There's nothing magical about this.
 
@LucDanton The smallest detectable unit of time anyway
 
@Neil That only works for periods.
 
And it would still be somewhat arbitrary.
 
1:20 PM
@sbi I know, but I think he thought we had magic.
 
@LucDanton Then what would you suggest for a unit of time? Edit: Assuming it were to be a unit of time used for multiple planets in the future
 
Nothing. I don't care.
 
sbi
@TonyTheLion I have listed two other ways to find the bug.
 
:5347898 Would be hard to measure.
 
1:21 PM
@TonyTheLion I stepped through the code pointing to qa and the flow was exactly as I'd expect.
I must be missing something
 
@R.MartinhoFernandes lol!
 
0
Q: WebSocket Server implementation for mbed nxp lpc1768

mmomentThere is a library for a websocket client implementation on the mbed nxp lpc1768 hardware. Does anyone know a way to implement a server on this device?

close votes
 
@R.MartinhoFernandes As named by @Florik
 
Why is static const int Op_RegI = 'I'; equal to 3?
 
1:23 PM
@Neil I don't see you using plank length
@R.MartinhoFernandes ¬_¬ that makes perfect sense actually...
 
@ManofOneWay WTF kind of exotic system are you in.
@thecoshman But you see him using a multiple of it.
 
It would be ludicrous to use Planck
 
Just like you would use a multiple of second to mean "about 31 years".
 
@R.MartinhoFernandes no I don't
 
@thecoshman Erm, yes, you do.
 
1:25 PM
@R.MartinhoFernandes where?
 
FYI a metre is a multiple of the Planck length. Wait, guess my definition of multiple is not entirely accurate. Substitute that by something else appropriate :S
 
@Neil but for time it would be ok?
 
@thecoshman More okayer than second
 
@R.MartinhoFernandes but in the way a km is one thousand meters, it's not the same 'base' unit
 
@TonyTheLion I had to look for a bit to see what was wrong with the controller
 
1:26 PM
at least speed would be relatively simple to do in plank length per plank time
@R.MartinhoFernandes did I beat the robot? :D
 
You're a native speaker.
 
@LucDanton shut it
 
No planking.
 
@thecoshman Who cares? When talking informally to people what's important is that they're both familiar with the units, and the units have sizes appropriate to the scale at hand.
 
@R.MartinhoFernandes I'm not sure what's happening..
case Op_RegI:
tty->print_cr("%d", Op_RegI);
output: 3
definition: static const int Op_RegI = 'I';
 
1:28 PM
@thecoshman More seriously I'm mortally afraid of making any mathematical claim. I don't have the jargon down in English.
 
@R.MartinhoFernandes indeed, so talking about an egg taking a couple of million plank time to boil is kind of stupid
 
No, wait, nevermind.
 
@LucDanton :P
 
@thecoshman And talking about me having lived thousands of millions of seconds isn't (FTR, I haven't yet, I'm still young :P)?
 
on a bit of a side track... solar wind... strange notion
@R.MartinhoFernandes ¬_¬ let's make a new base unit of time, something that takes about one 'earth day' to pass. Thus, we live for about 180000 of them... and we can celebrate ever 100 days :D (in short, more cake)
Though I suspect the kilo-whatever it's called would hold more excitement
 
1:31 PM
@thecoshman "Hey how long do I stick it in the microwave?" "Oh just 6.469272 x 10^46 Planck units." "Well what if I set it to 9.703908 x 10^46 Planck units?" "Nah, no problem.."
 
@thecoshman What kind of day?
Just kidding. Let's not go there.
 
@LucDanton which ever one get's more cake :P
@Neil o_0
 
Should be mean solar then!
How silly, I've made sure to make variant<T&> work except that apparently the destructor destroys the referred object. I don't get how I've not noticed before.
 
wow, the shortest measure of time yet recorded is over trillion plank time, well over
 
Plank time makes think of planking
I wonder if people that are planking think in plank time?
wait wut?
 
1:46 PM
the might think in trillions of plank time...
 
I am not trying to rant, I honestly want an answer. What is happening to this site? I used to ask questions and get good answers. Lately I find people berating the OP because the terminology wasn't perfect even though it is obvious what the intent of the question is.
 
stop ranting :P
 
@steveo225 because internets
and because lots of shitty questions and people I guess are tired of shitty questions, so small things set them off
 
@steveo225 Apparently the nice people left or turned into grumpy old chumps.
 
<---- Grumpy fuck (old is a matter of perspective)
 
1:49 PM
:)
 
@StackedCrooked Nice, lol
 
I used to not be grumpy, but the internet has turned me into a very bitter man
I blame this room :P
 
blame @sbi
 
oh yea, and quitting smoking
 
I get that, but SO was my haven from the internet of crap
 
1:50 PM
well, now it can be your hell :P
 
sbi
C:\dev\<project>\trunk>svn blame @sbi
svn: E125001: '@sbi' is just a peg revision. Maybe try '@sbi@' instead?

C:\dev\<project>\trunk>
2
@ManofOneWay Can't blame @sbi.
 
@steveo225 On the other hand, it won't hurt to level-up your terminology.
 
@StackedCrooked It isn't just mine, sometimes I just like to read other's questions and answers to learn.
 
@TonyTheLion will be better in the long run
 
One of the long-term side-effects of exposure to SO is that one turns into a pedant.
 
1:55 PM
@StackedCrooked I think that only applies to the Lounge.
 
@StackedCrooked No, it doesn't! You're wrong! I have references that claim otherwise.
 
@EtiennedeMartel I can't speak for anybody else, but I tend to loosen up and be at least a bit less pedantic in the lounge (though I doubt there's any hope of my ever being "not pedantic").
 
@JerryCoffin If the lounge has a reputation to be full of pedants and you say that in this room you tend to loosen up then what does that tell about you? :)
 
A long term side effect of @CatPlusPlus and @DeadMG exposure is that you instinctively start thinking everything sucks
also indendation for curly braces is terrible
 
@TonyTheLion that theory sucks
 
2:06 PM
@thecoshman you suck
 
@thecoshman it sucks donkey cock
 
you're terrible and you should feel terrible.
 
@StackedCrooked It says 1) I'm so pedantic that even when I loosen up, I'm waaaay more pedantic than anybody should be, and 2) I'm so good at it, that everybody wants to imitate me anyway. Either that, or I still instinctively oppose any crowd, even one that does things I'd otherwise do without question.
 
@TonyTheLion Your feeling terrible sucks
 
and it's someone else's fault
 
2:14 PM
@thecoshman It's your fault @TonyTheLion's feeling terrible sucks
 
@Neil meh
¬_¬ I get the filling that flipping tables and 'meh' is kind of catch phrase
 
user406009
This(stackoverflow.com/questions/12407984/…) question is very interesting. What actually happens if thread A deletes an object while thread B is in a member function locked on a mutex waiting for thread A to complete?
 
user406009
UB?
 
Is writing inline before a getter/setter/short method necessary or will be compiler discard it anyway?
 
Xeo
search on SO, tons of questions on that
 
2:18 PM
Thought it would be easier to ask here
 
Xeo
But short version: The compiler can do what it wants, and inline is only really useful to deal with ODR violations
(i.e. when defining a non-template function in a header that is expected to be included multiple times)
 
@EthanSteinberg Depends what the rest of the member does. Note that the question gives no mention of synchronization at all.
 
@ManofOneWay methods defined in the class definition are implicitly inline.
 
one more time everybody, clearcase is shit
all I need to do, is put a label on 'this' revision... and it takes FOR FUCKING EVER TO DO!
 
@thecoshman you flip a lot of tables in any given day.
 
2:27 PM
@TonyTheLion oh great, now I notice I spelt 'feeling' wrong, thanks a lot
 
@EthanSteinberg is the object thread A deletes, shared between both threads?
@thecoshman no problems :)
 
> Can I see where bar is deleted?
@user2k5 delete bar; I don't get it, what do you expect to see... — Kolyunya 20 mins ago
lol
 
@thecoshman I pity you.
 
@Neil have you ever had to suffer it?
 
@thecoshman Yes, I think I told you once. I like to forget it. It was a traumatizing time
 
2:33 PM
@Neil it makes me cry
 
What do you guys think of using continue in loops?
To decrease the indentation level
 
@ManofOneWay real men use recursion.
2
 
@thecoshman Clearcase once asked me to sign my name in blood on a code submission. It made me chant to the dark lords. I don't want to have to go back to that..
 
Scumbag Tony: 3 weeks at company - upsets employees with spam emails.
 
@TonyTheLion You are spamming your co-workers?
 
2:37 PM
@StackedCrooked unintentionally.
@LuchianGrigore real men? What's that anyways? Have you looked how guys dress these days? Sometimes I wonder about their masculinity.
 
@TonyTheLion How'd that happen
 
@sehe He sent unwanted email with the best intentions.
I guess.
 
@TonyTheLion they must use loops...
 
@TonyTheLion do you have a crew cut?
 
2:40 PM
@Drise I was actually thinking about that strip when I wrote that. :P
 
You're not allowed to extend std, right?
like namespace std{ void foo() {} }?
 
@LuchianGrigore I'll pretend I didn't hear that.
 
Just making sure.
 
@TonyTheLion These days? You think this is new?
 
@LuchianGrigore I respect you too much as a person to take heed to that blasphemous remark.
 
2:43 PM
WTF? Javascript room has more people in it than this room.
 
@thecoshman nope
@JerryCoffin no I didn't think it was new. It's just very obvious now, comparing to say 10 years ago
 
@Chimera Javascript is the future! *cue creepy music*
 
@Neil lol
 
@LuchianGrigore There are some several restrictions on what can be done, yes.
 
@TonyTheLion I don't see a lot of difference, but maybe I just don't pay much attention any more.
 
2:45 PM
Ok - this is illegal right?
0
A: string comparison with user build string-like type

user396672The conversion doesn't work because operator == for strings is a templated operator (function template), not an overload (see, for instance, http://en.cppreference.com/w/cpp/string/basic_string/operator_cmp for operator == declaration). For function templates argument types must match parameter...

 
@LuchianGrigore can you go to prison for it?
 
@LuchianGrigore Yes.
 
why is it illegal
 
@TonyTheLion Well, it's illegal to park in a bus-stop, but you'll most certainly not go to prison for it.
 
2:46 PM
Because of the `namespace std{
string operator << (string const s1, string const& s2)
{
return s1+s2;
}
}// namespace std` thingy
freakin formatting!!!!
 
@TonyTheLion You're allowed to add specializations to std (over user-defined types), but not overloads (and that doesn't look like a specialization to me).
 
He says it compiles fine. If that compiles, I'd be worried
 
@LuchianGrigore Btw the explanation in your answer is shoddy. Overload resolution still takes place for int.
 
@Neil You really need to add a link to remind us how much Javascript is the future.
 
@JerryCoffin You mean, jQuery
 
2:49 PM
@LucDanton implicit conversion. Which overload are you talking about?
 
@LuchianGrigore When using operator==.
 
@sehe Do I? I didn't realize -- but I'm often uncertain what I mean.
 
@LucDanton haven't thought about that.
 
@JerryCoffin Awesome!
 
2:55 PM
JavaScript: a future facepalm, today!
 
WATMAN!
 
JavaScript is just bearable IMHO
there's worse things
 

« first day (698 days earlier)      last day (4236 days later) »