« first day (1591 days earlier)      last day (3359 days later) » 

Use a vendor debugger
 
stupid gcc accepts template<class = void> void f(); template<class = int> void f(); ...
 
@LightnessRacesinOrbit it's ill-formed
 
according to?
 
8:05 PM
@LightnessRacesinOrbit the standard; what do you think? the universe? the universe doesn't care.
 
more specifically, bub
 
@LightnessRacesinOrbit [temp.param]p12 (n4140), 14.1p12
 
give a damn number
 
there's no std::minmax_element?
 
n4140 is not a standard
 
8:06 PM
Oh there is.
 
Okay, that's a good proof.
 
@LightnessRacesinOrbit it's as close as we mortals get, in either case the wording for that section hasn't changed - and clang correctly rejects it
 
I correctly reject your mum
 
That's C++14 though?
 
it's in C++11 too
 
8:08 PM
@CatPlusPlus the same applies to c++11/03
I can't check c++98, but I bet the wording is there too
gcc correctly rejects the equivalent declaration when it comes to template classes, jftr.
 
yeah it's the same in C++03
 
I'm not just making stuff up.. that's DeadMG's job
2
 
pizza is suspiciously late
 
-9
Q: JP Morgan Interview for C++ senior software

user1079341Anybody aware of what questions they target in JP Morgan,mumbai india for the C++ interview for laterals? Thanks in advance

lol
 
WHY CAN HE NOT USE COMMAS PROPERLY AND DELIMITED BY SPACES FFS
FURTHERMORE, BOTH MUMBAI AND INDIA SHOULD BE CAPITALISED
AND THERE IS NO SUCH JOB TITLE AS "C++ SENIOR SOFTWARE"
GRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
ok I feel better now
 
8:13 PM
Hi people :)
 
@LightnessRacesinOrbit well there is... but it's not a position filled by humans
 
@Theorem Who said we're high? I'm not high. I'm not paranoid either--and which of my enemies told you I am?
Oh, and hello. :-)
 
@JerryCoffin haha :D
 
@Mgetz ;p
fuck it i'm editing that question
 
@LightnessRacesinOrbit Software turns senior after 3 years in production.
 
8:16 PM
@JerryCoffin What is actually storage class in C++ ?
 
@Mgetz thanks
 
do we have a question that deals with people who try to use std::enable_if as a default template parameter, for multiple "overloads" but run into redefinition problems?
 
@Theorem next time you think about asking a question about C++... see if that site has the answer first
 
8:20 PM
@LightnessRacesinOrbit LRiO, there, is. No need to, be upset
 
@MgetzSure
 
@Theorem actually is not a storage class in C++. Storage classes are extern, static, register, mutable, and, on recent compilers, thread_local. At one time, the C standard also treated typedef as a storage class, because it happens to fit nicely in the same syntax.
 
it's ok my pizza's here
 
@LightnessRacesinOrbit enjoy :)
 
8:23 PM
-3
A: Do we need a canonical question about C++ initialization?

Lightness Races in OrbitI don't think we need a canonical duplicate. We need people to read their C++ books. We do not need Stack Overflow to become a C++ book. Minimal understanding and prior research are both expected and required here, and this is one of those times when it's a shame the associated close-vote reason...

lol
You got downvoted?
 
hi guys I have a problem
I am using fopen() to open files and it does not open files greater then 4GB
when I use error open/ fopen64 I get the following error error C3861: 'open': identifier not found
what is going on?
 
@savi Try asking on Stack Overflow. Your chance of getting a (useful) answer there is much higher than in here.
 
ok thanks
 
@savi The compiler is feeling lazy and doesn't want to deal with big files right now? Give it some nice herbal tea and a day or so to rest, and chances are it'll feel better. Oh, and a massage, manicure and pedicure--I hear compilers like them really well. In case it wasn't obvious, yes, compilers are female.
 
std::toosmall
 
8:32 PM
so I tracked the problem to not opening the stream with std::ios::binary - derp. "in particular, on Windows OS, the character '\0x1A' terminates input" <- guessing this happened to me.
 
@Mysticial I resemble resent that remark. My answer is highly useful. Maybe not useful to him, but writing it made my day (a little) more enjoyable. :-)
 
@JerryCoffin :)
 
Moronic builds that can address 2GB of RAM, but only 4GB of file:((
 
@MartinJames wut
 
@MartinJames More fun: something able to use 4 GB (or more) of RAM, but only read files up to 2 GB. :-)
 
8:38 PM
"OK, we've almost got the std lib done now, but what about the files? The OS filesystems can handle exabyte files", "Meh, use size_t. 4GB is enough for anyone".
 
user1804599
hi
 
@MartinJames I still think we should go back to the MULTICS view of things: there are no files. All disk storage space is just mapped to addresses, and if you like, you can give a name to some range of addresses.
 
@райтфолд oh no, it's pink zoidberg!
 
I can switch to another pink avatar just to piss everyone off.
 
posted on February 23, 2015 by Ankit Asthana

Xamarin has quickly become a popular way for creating cross-platform mobile applications promoting true code-reuse while allowing developers to create native* (native here means natural to the platform) user interfaces, providing them access to full spectrum...(read more)

 
8:43 PM
@JerryCoffin and then you land on the disk with an off-by-one error on some pointer? :D
 
Daisy is a particularly stupid dog
 
@melak47 Could happen, in about the same way something you write to memory now could end up in the paging file. Just think of the entire disk as a huge paging file (and apply normal memory protection to it, just like we do now).
 
in PHP, 37 secs ago, by Jimbo
Oh crap, we've got both JavaScript and C++ guys in here.
2
^^ ahaha
 
@JerryCoffin how's this work though, is the entire disk's memory mapped to some address range? so if you write some crap to whereever, you completely destroy your filesystem?
 
time for a PHP room invasion
 
user1804599
8:49 PM
Yes.
 
Yes.
 
@Mysticial Oh, it's Pantaloona:(
Hmm.. not done a PHP drive-by bombing for ages.
 
@Feeds that blog post is incomplete
 
That was a very unprofessional invasion, I have got to say.
 
it was stupendously ineffective
 
8:54 PM
I didn't even see any PHP insults :/
 
I pulled my weight but the other Loungers were just sitting around
 
@NikiC I tried to make feeds do it. But it doesn't work anymore.
 
@Mysticial huh, how did that work?
 
user1804599
I may need a context-sensitive lexer.
 
in PHP, Aug 21 '14 at 22:45, by Feeds
PHP sucks.
^^ That was me who did that. It doesn't work anymore.
 
user1804599
8:55 PM
If I allow any expression as x in %x { … } instead of just identifiers.
 
user1804599
But I don't think I will allow it. It complicates shit.
 
@melak47 Current systems (e.g., Windows, Linux, Mac OS) all have paging files right now. Have you run into problems with destroying file your file systems with them?
 
@райтфолд Oh no, you don't
 
user1804599
Nice.
 
user1804599
%awk { # embed your AWK code here! }
 
user1804599
8:57 PM
Just make sure the curly braces match up. :D
 
@райтфолд But what do you do if they don't match up?
 
user1804599
Then you probably get a syntax error at the end of the file.
 
user1804599
But my intention is to allow any pair of brackets.
 
user1804599
E.g. %awk 『 … 』.
 
so if your code doesn't have matching brackets you just can't use it?
ah, I see
 
user1804599
8:59 PM
This is generalised, not AWK-specific.
 
user1804599
It's quasiquoting like in Scala and ES6.
 
@райтфолд It's not that simple. Your parser has to be able to parse the code inside the braces well enough to figure out (for example) which parts are inside of strings, so something like print("}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}") isn't treated as closing every block you currently have open.
 
user1804599
@JerryCoffin no, you have to match up the brackets. Won't parse the contents.
 
@JerryCoffin you can't go writing past the end of a pagefile though...I think?
 
user1804599
If it turns out to be a problem, you can use a different pair of brackets.
 
9:01 PM
@melak47 Of course not. Keep in mind that from your viewpoint, you're just writing to memory. If you try to write memory you haven't allocated, you get an exception just like always.
 
user1804599
It's only with '%' <identifier> <bracket> … <matching bracket>.
 
@JerryCoffin well okay I guess :p
 
@райтфолд Can "bracket" be more than one char? e.g. {{ and }} if I anticipate unbalanced curlies?
 
user1804599
Maybe, not sure.
 
user1804599
I'll do it with one first.
 
9:03 PM
@райтфолд In that case, it's completely broken. You're better off not going it at all.
 
user1804599
One thing is certain: < and > will definitely not count as brackets.
 
user1804599
@JerryCoffin No, it works fine.
 
lol - I made it onto the PHP starboard:)
 
@райтфолд Where "it works fine" translates to: "I haven't a clue of the problems yet."
 
@MartinJames And probably didn't even realize the joke behind it ^^
 
user1804599
9:04 PM
I changed my Twitter picture and banner!
 
user1804599
Multiline comments are similar: they start with --<bracket> and end with --<matching bracket>.
 
user1804599
Which is very nice:
 
@райтфолд Multiline comments should be a specialization of your earlier syntax instead ;)
 
user1804599
--[ add space before the bracket here to turn the two into single-line comments!

--]
 
user1804599
@NikiC no, because comments must be ignored by the lexer, whereas %…{…} isn't.
 
9:09 PM
@райтфолд hm, maybe
 
user1804599
I could make %{…} a multiline comment.
 
@Pris Meh - with gravity that low, why bother with wheels?
 
@Puppy How so?
 
she enjoys licking windows and furniture
 
9:14 PM
I watched Naruto: The Last yesterday.
 
user1804599
lol, this political party got 51.2% of votes
 
@Puppy Use a full-screen console interface - that'll fool her.
 
user3010322
I hate my life.
 
user3010322
I hate doing things just to get credit.
 
user3010322
These programming classes are draining my brain.
 
user1804599
9:17 PM
I hate your life as well.
 
@ThePhD Which classes are that?
 
user1804599
@ThePhD I hated that I was better at things and did things better and quicker but got equal amount of credit as noobs got.
 
user3010322
... Oh my god C doesn't have references.
 
user3010322
I have to decay my arrays to pointers.
 
user3010322
WHY ME.
 
user1804599
9:18 PM
lol
 
user1804599
At least you don't get tortured with Java, JavaScript and R.
 
user1804599
and ANDROID
 
user3010322
@райтфолд I'm doing Java in CS 110. In CS 240 it's C. In CS 438, it's R/Java/C/Whateverweuse
 
user1804599
haha
 
user3010322
I think for CS 438, even if it'll take me longer than others, I'll doo all my stats / math crunching in C++. Just have to figure out how to compile DLib.
 
user3010322
9:20 PM
There's no MANDATE I have to use Python and R and Matlab.
 
user3010322
And quite honestly I've had enough R to last me a good while. :v
 
λ 0.9999999999999999 == 1.0
False
λ 0.99999999999999999 == 1.0
True
This is funny for some reason.
 
user1804599
No, it means you using a shitty non-CAS.
 
user1804599
Use a CAS.
 
user3010322
CAS?
 
user1804599
9:21 PM
0.99999999999999999 is a horrible approximation of 0.999….
 
user1804599
Fuck float being the default.
 
user1804599
1.0 should be a rational literal, because decimal-to-rational conversion is lossless.
 
user1804599
Unlike decimal-to-float.
 
user1804599
So many languages get this so horribly wrong.
 
1.0 is a Fractional
 
9:23 PM
@райтфолд it could be worse--once upon a time, I had a teacher who directly told me that if I did everything perfectly, the best grade I would get in her class was a B (in the theory that what should be rewarded was effort, and she was sure I could complete all the assignments and tests too easily to deserve an A).
 
user1804599
It is interpreted here as a float.
 
user1804599
Because it needs a specific implementation of ==.
 
user1804599
Instead, it should've been interpreted as something sane, like Rational.
 
That's why you always want to put signatures on stuff.
 
user1804599
Or even beter, it should have just given an ambiguity error.
 
user1804599
9:24 PM
But then they'll cry because noobs wouldn't understand it.
 
user1804599
Conclusion: the monomorphism restriction is isomorphic to the map vs flatmap problem!
 
Did you hear they are going to change the Prelude? Maybe
 
@райтфолд Just eliminate decimal literals entirely.
 
user1804599
May 11 '14 at 18:48, by R. Martinho Fernandes
Fucking noobs
 
user1804599
Perl 6 is the only language I know that gets 1.0 right: it's a rational.
 
user1804599
9:26 PM
(I also had the idea independently, though, before I knew about Perl 6.)
 
@райтфолд Scheme does it
 
user1804599
I should learn Scheme.
 
user3010322
@JerryCoffin I've been trying to get an instance of SNOBOL on my machine to see how it deals with strings, but I haven't been able to get it to work just yet (admittedly, I've only spent 10 minutes trying...)
 
user1804599
COBOL does number funnily too.
 
user1804599
With picture clauses.
 
9:27 PM
all these young people in school
 
user3010322
What the hell.
 
i wonder what the average age of Lounge<C++> is
 
user3010322
true / false doesn't exist in C.
 
user3010322
What is even this language.
 
user3010322
#include <stdbool.h> // kill me
 
user1804599
9:28 PM
It does.
 
user1804599
You just have to include <stdbool.h>.
 
@Pris 12 prolly
 
@ThePhD I've built this one with no problems (that I recall, anyway).
 
user1804599
Or just use int, 0 and 1 like everybody else.
 
user3010322
@райтфолд typedef int CBOOL;
 
user3010322
9:28 PM
CBOOL true = 1, false = 0;
 
@Pris There's only one Lounge, with exactly one age, so "average" doesn't really apply here.
 
user3010322
How do you 0-init an array in C?
 
user1804599
@ThePhD ugh
 
user1804599
Don't break C++ code that includes C headers.
 
user3010322
9:31 PM
The usual int myarr[20] = {} isn't working..
 
@ThePhD In C they're named _True and _False (to use names reserved to the implementation) with true and false as aliases if and only if you include stdbool.h.
 
yes, it's shit and misleading and shit
 
user3010322
@LightnessRacesinOrbit Ooh, I HAVE to use the 0?
 
@ThePhD Yes.
 
user3010322
It is misleading, it makes me think I have to write 0, 0, 0, 0,0 ,0 ,0 ,0, 0, 0, ....
 
user1804599
9:32 PM
#ifndef __cplusplus
typedef int bool;
static bool const true = 1;
static bool const false = 0;
#endif
 
user1804599
XD
 
@ThePhD The rule is that any value you specify is initialized to that value. The remainder are initialized to 0.
 
_Bool stuff;
 
Feb 8 at 19:03, by Lightness Races in Orbit
@milleniumbug No I was wrong Blob pointed it out - the grammar is different
that conversation
@ThePhD yeah
cos = {1} doesn't initialise them all to 1
 
user3010322
@LightnessRacesinOrbit You wrote a self-answering SO question to this at one point I think...
 
9:34 PM
@ThePhD It was related. Actually I used that question's URL to find that conversation in the transcript, because I remembered referencing it :)
Feb 8 at 18:57, by Lightness Races in Orbit
In fact, you should do it that way. Giving just one member for the sake of it is misleading.
(this was before Blob taught me that, in C, you can't do it the nice way)
 
ergh... stupid dependencies not working
 
@thecoshman Perhaps smarter dependencies would help?
 
right, back to work
sigh
there must be a good way to do this shit
 
right
shortbread in at 21:41
 
9:42 PM
inb4 "my shortbread is burnt"
 
maybe I can use preprocessor magic
 
i need some good music to listen to
 
wow, just encountered a decent use case for raw string literals
fascinating
 
9:53 PM
@thecoshman inb4 "my shortbread conducts electricity"
 
user3010322
Hopefully these classes will pick up soon...
 
I have been reprieved! I was going to have to visit 'The Valuts', (~~shuder~~), to support the darts team. Sadly, the pub car park is full again, as are all the near parking spaces. I'm forced to drink cans of Directors at home instead of mediocre Bass down the town:)
 
lol
you know what's a terrible shame?
it's the end of the work holiday year, so my boss is forcing me to take seven working days off
 
@Puppy I can tell you're heartbroken.
 
absolutely devastated
 
10:00 PM
@Puppy 'my boss is forcing me to take seven working days off' - the bastard! Find another job immediately.
 
what's somewhat more concerning is that the time I want to take off is literally right after the end of the holiday year.
gotta ask my boss for a little flexibility here or I'll have to take those days at some inconvenient time
 
lol, I'm using a macro to repeatedly generate C++ code that streams C++ code to an IOstream
 
usually you'll be fine, especially if you have a plan to take it.
They tend not to like people building up all that time off
 
it looks so nasty
do you wanna see it
#define MAKE_VISITOR(visitor_name, func_name, return_type) \
		header << "struct " << #visitor_name << " : boost::static_visitor<" << #return_type << ">\n{\n"; \
		for (it = begin; it != end; ++it) { \
			header << "\t" << #return_type << " operator()(fields::" << *it << "::field_key_t& key) const\n\t{\n"; \
			header << "\t\treturn fields::" << *it << "::" << #func_name << "(key);\n\t}\n"; \
		} \
		header << "};\n";
yeahhhhhh
 
user1804599
I am in love.
 
10:04 PM
Oh, hang on 7 WORKING days... so that's 9 days off or, if you finish Thurs night, 11 days. Book your flights and beachfront apt. now.
 
@MartinJames Yes, if I finish at a tactically appropriate time, I can gain many consecutive working days off.
@thecoshman Yes, I figure that if my boss's concern is people not building up 300 days paid holiday, then it should be sufficient for him.
 
'seen 50 mins ago' you know who.
 
still no damn activity
wtf is he playing at
 
currently my plan is to ask for the 13th/16th off, and then the 30th forward.
 
@MartinJames what? it's 11 days off regardless of when he starts, isn't it?
 
10:08 PM
@Blob Ideally, you have to span two weekends.
 
@Blob If he works Monday and takes off Tues-Fri then he has to be back to work the following Thursday.
 
looked at the calendar thing and figured it out. wednesday, thursday, and friday are fine
 
just tried to press the "next track" button on my keyboard. the last time I used that keyboard was about 15 years ago
 
@LightnessRacesinOrbit Drunken recall
 
user784668
@MartinJames Jonjo Shelvey?
 
10:14 PM
there's a coding competition that requires me to "solve a problem". Any problem suggestions?
 
World hunger.
 
user784668
@Blob Halting problem.
 
@Fanael I doubt the people running this crap know what the halting problem even is.
 
@MartinJames not drunk :(
 
@LightnessRacesinOrbit Me neither, but I'm working on it.
 
LOL yet another reason for me to stay away from boost. Now seriously folks, I think your best bet is to simplify your code (for instance keep only the Term structure) until the template error vomit recedes to a more manageable level. Chances are it's just a typo somewhere. — kuroi neko 3 hours ago
way to make a fool of oneself in the comments
 
user784668
@sehe They're not wrong, errors are one of the reasons template magic is horrible.
 
> Rule number 1:
> [list of 4 rules]
 
'But when I create 10 threads to read device status, I will get wrong data in the socket receive buffer.....

'private static byte[] response = new byte[1024];'

Can we have another rule - STOP USING FUCKING STATICS
 
user784668
@MartinJames Stop using variables.
 
10:23 PM
@MartinJames dude's from java
so more generally, stop using java
 
user784668
@MartinJames Stop programming.
 
@Blob OK, I'm happy with that:)
 
has anyone here faced a problem?
i want to solve it
and get $$$$$ from this retarded competition
> Step 1: Design a code or computer program that solves a problem
 
I have, I must say, faced at least one problem in my life.
 
@Puppy Is it something "a code" can fix?
 
10:28 PM
"a code"? get out of here
 
@Blob Oh.. 'Application.DoEvents();' - the thing is doomed anyway.
 
the "age" field has a restriction:
> Must be between 2 and 2 characters.
 
I could technically get 20$ from that.
 
user784668
@MartinJames what
 
user784668
10:30 PM
@MartinJames is that what i think it is
 
@EtiennedeMartel Then do it.
or did you not actually purchase any device including DRAM in that period?
 
@Fanael Yup - calling it from all 16 threads.
 
user784668
@MartinJames ahahahahahahahahahahahahahahahahahahaahahahahahahahahahahahahahahahahhaah
 
/usr/local/include/boost/variant/variant.hpp:814: error: no match for call to ‘(const sg::fields::KeyToStringVisitor) (const sg::fields::sb::field_key_t&)’
../conf/fields.h:36: note: candidates are: std::string sg::fields::KeyToStringVisitor::operator()(sg::fields::sb::field_key_t&) const
../conf/fields.h:40: note:                 std::string sg::fields::KeyToStringVisitor::operator()(sg::fields::ts::field_key_t&) const
wut
 
user1804599
Cool, in Perl 6 you can quote strings with and .
 
10:33 PM
that is not cool
 
user1804599
So those shitty crapblogs that use such quotes don't break the code!
 
and so they'll keep using such quotes
great
when did fixing problems at their source go out of fashion?
 
@Puppy If I recall, I purchased a GameCube during this period.
 
@LightnessRacesinOrbit Is there a problem you're facing that can be solved by a kid on a computer?
 
@EtiennedeMartel There ya go then
 
10:37 PM
@Blob :(
someone fix my variant problem
 
@EtiennedeMartel If I'd lived in Canada, I'd probably be looking at closer to $100.
 
@LightnessRacesinOrbit get a shitty-code compliant compiler.
 
-.-
thank you to Coliru for helping me find the bug in testcase form (coliru.stacked-crooked.com/a/80b966125a88ff69)
/cc @StackedCrooked
completely missed that in the error message
cos fuck me there were 20 pages of error message
 
hmm.. I just had the most awesome idea (it's related to overloading on constexpr, though kinda awkward I'm sure it will work (with a standard complaint compiler))
 
@FilipRoséen-refp ...but there isn't enough room in this margin to write it down.
 
10:46 PM
> standard complaint compiler
sounds about right
 
@JerryCoffin I prefer doing it with written code, a demonstration is far better than anything else
@LightnessRacesinOrbit gcc is in this regard, but stay tuned
 
@JerryCoffin nice
 
@LightnessRacesinOrbit lol
 
@FilipRoséen-refp What's a standard complaint compiler? One that rejects any code because he doesn't like doing its job and keeps telling you how much it sucks to parse programs written in this shitty language all day, for free, ...
 
10:49 PM
IT COMPILES YAY
 
@AndyProwl a compiler that follows the wording in the standard
stop bashing me over my poor choice of words
 
@FilipRoséen-refp OK, you didn't get my stupid joke :(
 
@AndyProwl It was my last theorem quip (at least for a few seconds).
 
@FilipRoséen-refp complaint / compliant
 
@FilipRoséen-refp No, you made a typo. There is a difference.
 
10:51 PM
@caps I always make typos, the guys in here should be used to it by now
 
lol sorry if I found it funny
 
@FilipRoséen-refp It was a funny typo, though.
 
also "pool choice of words" is a poor choice of words for describing a typo
 
@AndyProwl Haha
 
@AndyProwl Me good choosing sound things to tell...stuff!
 
10:59 PM
@AndyProwl that was my joke..
 

« first day (1591 days earlier)      last day (3359 days later) »