« first day (615 days earlier)      last day (4330 days later) » 

12:09 AM
@ChrisP What's wrong with someString.charAt(index)?
 
@FredOverflow
Maybe more memory i supose
 
Why? Isn't the string already in memory?
 
hmm
 
@ChrisP Wait, what exactly do you mean by "play with char of one string"?
 
I want something like String.split in javascript
 
12:24 AM
@DeadMG No it was quiet before Java came up.
@ChrisP So you want to implement or use various string tokenizing methods in various languages? I think it's unclear what you are asking..
 
I'm tired, doing hard work, and trying not to be sick
not a good combination
 
@DeadMG Hope you feel better soon... maybe get some sleep... take a nap and then get back to work...?
 
I've been sick for 18 months
I also hope I feel better soon
 
@DeadMG Dude! 18 months? Do you know what it is? Sounds like it could be serious...
 
no idea
and, well, it's mostly just uncomfortable
 
12:34 AM
Have you seen a doctor?
 
and I have no idea and nor did the doctor I asked about it
 
oh wow.. that sucks... sorry to hear that.
 
not as sorry as I am :P
 
yep... But I hate to hear news like that either way.
 
on the upside
writing more specifications for my glorious language
after that I'mma code some Lua scripts, me thinks
 
12:37 AM
well do try to enjoy that then :-)
 
@DeadMG Maybe it's a new disease. It will be known as Puppy's disease and you will be famous.
Like that Alzheimer guy.
 
nah, I'd prefer to have it known as "Woof-woof-bitch disease"
 
Nice! @PayPal to offer rewards for reporting security bugs. https://eff.org/r.a9d5 (Of course, making the Internet safer is its own reward.)
 
hmmmm
to have a global locale?
this seems to me to be a fairly stupid idea like any other global
 
Cheers mates... have to run along now. Talk later.
 
12:56 AM
bb
 
 
1 hour later…
1:59 AM
Hi guys. Does a list keep duplicates, unlike a set?
 
cpx
Yes it does if you're talking about std::list.
 
Yep. Just wanted to double check before I went on to try and use it.
 
almost nobody ever has a need to use linked list
 
@DeadMG so what would be the best container for objects that might have duplicates?
where you also want to keep the duplicates
 
 
1 hour later…
3:25 AM
anyone awake?
 
 
2 hours later…
5:00 AM
Evening!
Wow, sure is empty in here..
 
5:24 AM
yep
 
> If indexes are out of bounds for a UnicodeString object (<0 or >length()) then they are "pinned" to the nearest boundary.
Whyyyyyy?
You pay the cost of the check anyway, but get strange behaviour (hmm, like, huh, UB) instead of an actual error.
> If primitive string pointer values (e.g., const UChar * or char *) for input strings are NULL, then those input string parameters are treated as if they pointed to an empty string.
This is madness!
> Most UnicodeString methods do not take a UErrorCode parameter (...). Instead, such methods set the UnicodeString into a "bogus" state (see isBogus()) if an error occurs.
 
And there's a setToBogus() function too, just in case you want a bogus string for some nefarious purpose.
Really, it's like they made all those "convenient" design decisions noobs often think about.
Like PHP.
 
5:59 AM
> provides similar functionality as the Java String and StringBuffer classes
 
@CheersandhthAlf That is definitely not true.
Java String doesn't play around with bad inputs.
 
@CatPlusPlus what the hell? that's ridiculous!
 
well, the bogus state is the same idea as the error mode of C++ iostreams
 
@thecoshman Makes perfect sense: Diablo 3, wait 3 days.
@CheersandhthAlf The main difference is that you lose the existing data on the string. A stream doesn't hold data per se, so there's no loss when it becomes "bogus".
 
6:31 AM
@thecoshman Most things about D3 are.
I'm not really even planning on buying this anymore.
Also, I want Guild Wars 2. Like, now.
 
LOL at the image caption (tooltip)^
 
Oneboxer fails at UTF-8.
 
@CatPlusPlus Oh hah - ſo it ſeemſ !
 
I can't help but imagine this being said by Daffy Duck.
 
:) stvpeṉdovſ
 
7:16 AM
8 hours ago, by Chris P
SML/NJ (fuctional programming)
also i must implement the same problem in Java
 
7:41 AM
ooooh, I think I finally get what functional languages are, which probably means I have missed the point entirely
 
meh, I lost like 20 rep over night
recalc?
 
There are no recalcs anymore.
 
@TonyTheLion you don't have any lose of rep showing on your profile, your not just going mad are you?
 
Am I too dumb to understand boost::interprocess or is the template crap just very hard to read?
 
Boost.Interprocess uses a lot of templates?
What for?
 
7:50 AM
1
Q: boost::interprocess How to find a container with data in shared memory in another process

NilsI am learning about boost::interprocess. The examples shown in the boost documentation describe two ways how one can create containers in shared memory: Either by constructing it completely in shared memory using myManagedSharedMemSegement.construct<..>(..)(..) or by creating the container ...

 
template ALL the things
of course
 
for everything
maybe using clang would give me at least better errors
I think I probably just use googles protocol buffers and QSharedMemory
 
You create the string in the other process with an allocator that uses the shared memory.
 
Exactly and then I want to restore it since all the data is in shared memory.
I mean I like the idea of just being able to put stl containers into shared mem. But you can't you need boost containers and then you also can't just easily convert between stl and boost containers :(
 
am I right in saying, that with purely functional functions, you can basically do looks up tables for all the functions, such for a given set of inputs, you only ever nee to calculate the result once? If the same inputs are used again, you can just return the value from the look up table
 
7:56 AM
Yes.
That's called memoization.
 
yeah... I think I'm getting this functional fo-shangle
 
Hi guys, may I drag your attention to my unanswered question ?
http://stackoverflow.com/questions/11143348/crop-insert-in-a-2d-image-array-memory-allocation-problems
 
@Anarkie ¬_¬ newbie hints
 
@Anarkie Smells suspiciously like you're accessing columns array with that of the row index and vice versa
If it crashes when width is not the same as height and when they're the same it flips it
Yes, I think that's your problem. :P
 
so my assumption of x being columns and y being rows is wrong I guess, I will do further investigations...
 
8:05 AM
@Anarkie Not that it's wrong. It's arbitrary
You're forgetting that in programming, the computer has no idea what you intend to do
If you say x is columns, fine, but you must always access it that way
Anyway, I responded to your question
 
The thing is in x,y coordinate system x is horizontal and y vertical so logically arranging x for columns and y for rows makes sense. And and I tried to keep it this way always, I will check for mismatches again, and thanks for an answer!
 
No problem. I sincerely think it's that. It's good that you stick with your instincts about what you think it should be
 
@Anarkie if you are getting what looks like the xy co-ordinates reverse whilst looping, it's probably because you're loops are the wrong way around
 
Again, it's completely arbitrary, but better you program it according to how it makes sense to you
@thecoshman Good point
 
if you want to read left to right, top to bottom, you need your out loop to think in rows, increasing the y and the inner loop will handle each row, increasing the x
from the sounds of it, you have your out out loop going through the x and the inner goings through the y, which will read down an entire column, and then move over to the next column
 
8:15 AM
on hte final insertion loop when I change the columns and rows, it places to where I want of course, but that wasnt my intention, and I checked, if the crop is happenning like I wanted then I assume the insert should also work like I planned :(
 
word of warning, this is base just on what you have said, I've not actually looked at your code
 
Can you dereference char pointers in constexpr functions?
I don't feel very confident this should work:
0
Q: Compile time consistent hash of char types

GeoffroyI want to implement of sort of Symbol the same way ruby does. For this, I created a user defined literal which returned a std::hash of the std::basic_string<T> corresponding. The code was great, but as I read somewhere the hash function may not be consistent over several executions of the...

 
@CatPlusPlus ooh... well, if you can grantee that the char* points to a constant value, it would make sense
 
String UDLs are weird and silly.
 
@CatPlusPlus Yes.
 
8:36 AM
@RMartinhoFernandes Wut? What the heck. This is the tipping point for me.
 
@thecoshman yup. That's also why the equivalent of std::transform is called map in functional languages. It maps a series of inputs to their outputs. So it could basically look up the result in a big huge table, instead of evaluating the function.
 
@ChrisP For a moment there, I thought you had [heard my advice] and asked a simple /learners/ question.
@ChrisP Please get your account fixed and your act straight. If you come into this room again and spam it with off-topic questions like that, just because you have been banned from the main site, I'll have it flagged. No need to spam the chats too, you know. I don't think that moderators will understand how your account needs to be unblocked when you also spam the Lounge<C++> and PHP rooms.
I'm pretty sure that is not what you want, and I'm pretty sure you are smart enough to avoid it. Thanks for your your attention
 
allegedly my raspberry pi is out for delivery today
 
if I want a function like foo(typeA a, typeB, b) and I want it be callable with either both, neither or just one of the two (four combinations) is there an easy way, or do I just need to do overloads? assuming there are sensible defaults that I can use
 
foo(optional<typeA>, optional<typeB>)?
 
8:49 AM
@RMartinhoFernandes Yesterday was not the first time this particular user has been both (a) asking offtopic (mysql) questions (b) unconstructive rambling/complaining about his account being question banned. He also did so in the C# and PHP rooms. @DeadMG already subtly told him
2 days ago, by DeadMG
We are not an alternative form of the "Ask Question" button.
 
@thecoshman you mean so I can call foo(), foo(a), foo(b) or foo(a,b)?
 
It doesn't necessarily make sense though, it depends what you want with 'callable with either'. So maybe the overloads are the best.
 
@jalf exactly
I think I will need overloads
 
What about foo(b, a)?
 
@Flexo What will you be doing with it?
 
8:50 AM
should only need two overloads though, if you can specify default values for the parameters
 
I can except a fixed order of the parameters
 
Alternatively, perhaps it shouldn't be a function at all. Could be an object where you can call setA(a) or setB(b) if you want them to be specified.
depends on what it's for
 
@thecoshman Use a language with keyword arguments. :.
 
R foo(A a = a0, B b = b0) and R foo(B b) should cover all the combinations, I believe
 
@sehe my plan was to use it as a low power media player and usb over IP extender by the tv
when I own my own flat I'll use one to replace the thermostat on the central heating maybe
 
8:54 AM
@jalf default values have different ABI from overloads, though
 
@CatPlusPlus What he wants is: he how does the server understand that JS has been turned off because it then sends across the entire content -- and how can he use urllib to emulate that. — Thrustmaster 2 mins ago
Why are you here and why are you talking nonsense to me. :.
 
@ecatmur yup, but he didn't say anything about that. It's callable in all four forms, which I assumed was the only requirement
 
@CatPlusPlus kyrostat :P
 
Oh gods you're making a silly API.
Also, who gets up early is really fucking tired even though it's just 11AM.
 
@Flexo Sounds like fun
 
Ell
9:09 AM
morning all
 
hi
 
Ell
have you ever dreamed code?
 
I wouldn't call it that. But yes "of course" :)
 
@Ell I have.
 
Ell
it was weird, I dreamed about my code and fixed something, but it turns out the code in my dream was slightly variated on my actual code so I have solved nothing xD
anyway, will doing stringstream.str() end on null terminators?
 
9:14 AM
no
 
Ell
right kk. I can't figure out why, but my stringstream.str().size() == 0 after 31 bytes of data have been transfered into it
 
@Ell It is always that way. Regardless, sometimes the 'lucid' associations around your code make you see ways in which to simplify. One important step in software design, IME, is always "What do you want the code to look like". If you could dream up anything you wanted, how would the ideal code for this task like?
@Ell std::flush?
@Ell Also, show some code?
Not unlikely: check oss.good() before/after writing. Optionally oss.clear()
* s/like/look/ ^
 
Ell
right kk, Ill look that stuff up
 
Ell
@RMartinhoFernandes it will? I'm not entirely sure how to check if all the data is going into the stringstream - I was just using that. I know the correct amount of bytes are being received, not sure if it's going in. I'll show some code, gimme a sec
receiving data just doesn't seem to work
also, anyone read about that bromium microvisor thing?
 
9:29 AM
@RMartinhoFernandes Really?
std::ostringstream oss;
oss << std::string("funny\0string", 12) << std::endl;
assert(13 == oss.str().size());
 
Oh, I took that to mean assert(oss.str()[13] == '\0').
 
@RMartinhoFernandes That's what I'd have guessed. However, it does pan out to have size()==13 Yup me too
 
Oh, I forgot the newline.
 
So the length is actually undefined, depends on the newline behaviour...
But it didn't stop at \0, which is what likely concerns @Ell
 
Ell
9:45 AM
why is assert a macro?
 
@Ell so it can print out the textual form of the expression it tests (and so it can avoid evaluating the expression at all in release builds)
 
Ell
ohh I see thank you
 
the PNG site is ironically ugly
 
Ell
yeah :L
 
Ell
9:57 AM
hmm it seems if I use a vector<char> it receives all of the data
 
> You can match specific columns with \%c or \%v
You wouln't believe how much time I spent getting those Vimdoc links correct
 
Ell
ha
 
10:16 AM
@StackedCrooked lonely on mumble. Everybody's working
 
sbi
Would one of you guys want to teach Advanced (haha!) C++ in Berlin? :) I just had to decline an offer.
2
 
It's a bit far to get there by bycicle
 
sbi
@sehe It's a bit far even for me. I suppose I'd need about an hour to ride to there from home.
 
any hoops, time to stroll down to annual review
 
to the slaughterhouse
 
10:30 AM
What is considered "Advanced C++" anyway ?
 
Fair enough.
 
@sbi why haha? What they want taught isn't really advanced?
 
sbi
@jalf From what I understood, it's master students who have had a C++ course as part of their bachelor — with differing results. :-/ The task is to teach them more advanced concepts.
The course has recently been changed from Java to C++.
The description lists things like "API programming", "image processing", "network programming", "PDA programming", "GUI programming", "design patterns"(!), "server programming" etc.
 
@sbi What does it have to do with "C++ itself" ?
 
10:40 AM
ah
PDA programming? How 90's :D
 
Lol PDA.
 
@sbi Btw, I hope you realize that you need to introduce them to singletons while teaching design patterns.
 
sbi
@ScarletAmaranth For one, this needs to be done in C++. However, a verbal comment accompanying the offer also said that they'd be glad to forgo all this if I could only manage to raise them all from their allegedly wildly differing level of C++ knowledge.
 
ah ok
 
sbi
@ScarletAmaranth Shrug. When teaching C++, you also have to teach about delete and stuff they later shouldn't use.
 
10:42 AM
@sbi was going to say, it sounded pretty horrible as written
 
@sbi ctor() = delete; Look, delete is useful! :)
 
sbi
@jalf Ah, IME one shouldn't overestimate such formal descriptions. If the students afterwards feel like you treated them fair, that they learned a lot, and that your programming exercises were fun, nobody is going to complain about it.
 
// Added the line below in order to *delete* item...
Again, useful. :P
 
sbi
@ScarletAmaranth Last time I had to teach C++ was 2009. There was no such syntax back then.
I'd feel good to recommend you, @jalf, but you'd have a hell of a commute once a week. (Also, while I think they'd agree with someone teaching in English, I somewhat doubt you'd stand a chance fighting the university's bureaucracy without speaking German. :-/)
 
-1
Q: Eckel Vol1, pg283, Incomplete type specification, what is the compiler doing?

paleywienerstruct X; struct Y { void f(X*); }; struct X { //definition private: int i; public: friend void Y::f(X*); <SNIP'd> }; "struct Y has a member function f() that will modify an object of type X. This is a bit of a conundrum because THE C++ COMPILER REQUIRES YOU TO DECLARE EVERYTHI...

It's awful. Awful, I say.
 
10:48 AM
@sbi haha. looks pretty idiomatic
 
@sbi Yeah, I'll pass. :)
 
damn guy didn't show up! I must have passed my review meting then :D
 
They forgot to tell you you're fired.
 
oh, better get my layer :P
lol code reviews man, you might want them
 
> and to think I might have given them some cash.
No sense of humour detected.
 
sbi
10:59 AM
@thecoshman Where does your layer law around?
 
It's a background layer.
 
@sbi ಠ_ಠ
 
@CatPlusPlus I cleaned it up a little
 
@sehe You must be really bored.
 
@thecoshman Your ... layer?
 
11:05 AM
how to run a c/c++ prog with more than one file?? please help
 
@CatPlusPlus No. I'm basically just curious how easy it was for the OP to get it right. Finger exercises
@alaminhosain Please read the newbie hints. You're pushing all the wrong buttons. Stack Overflow is for your questions
 
sorry then, but i have tried first there. the did not get the question..thats why um asking here if anyone can help...
 
@alaminhosain I don't see it.
Your question is exceptionally unclear (you don't even say whether you mean multiple header, source or input files).
You appear to be using Turbo C.
You call it c/c++ - that language doesn't exist.
You barge in and blurt an incoherent question. That's impolite.
You say "please help".
We might help if there is an answerable question. On the main site: Stack Overflow
But why this shit code give me correct answer in my compiler? :(...its horrible. — al amin hosain Jun 7 at 15:45
^ seriously
 
multiple source files under one single program and um using GNU compiler dev c++ on windows 7 os...is that clear now??
 
@alaminhosain Somewhat better. Sooo... why don't you post it on the main site? Perhaps, include what you are using now. I promise I'll answer
 
11:15 AM
main site did not let me post remarking some quality measures...thats why um here..
 
Oh our collective heart bleeds for you.
 
@alaminhosain So read the hints you have been linked to:
75
A: What can I do when getting "Sorry, we are no longer accepting questions/answers from this account"? (the answer is here, in this post)

ArjanWhy am I getting this message? As stated clearly in the about links on every page, the Stack Exchange web sites are question and answer sites, not help forums. This implies that all posts are expected to have some value for later visitors too. To enforce that, and to prevent help vampires making...

> How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account?
Read carefully under that heading ^
 
sbi
@alaminhosain Those measures for assuring quality questions are in effect here, too. Only we aren't as polite about enforcing them as the main site is.
 
@sbi In fact, we might actually answer questions regardless of such a question ban. Provided that they are short, well described, on-topic, polite and answerable.
 
sbi
@sehe "Provided that they are..." of a certain quality. Yes, I believe I said so.
 
11:20 AM
@alaminhosain By the way, so you lied as well (you didn't post it on Stack Overflow first):
12 mins ago, by al amin hosain
sorry then, but i have tried first there. the did not get the question..thats why um asking here if anyone can help...
@sbi I thought you meant we informally enforce the question bans here, or something.
 
I wanted to post...but they gave me the message with some quality standards
 
sbi
@sehe I tried to say we informally enforce the quality requirements.
@alaminhosain See, they have quality standards in their messaging.
 
Inconceivable.
 
I have expressed the problem um facing at present....
 
11:24 AM
So did we.
 
Ell
ooh my first std::bad_alloc
 
@sehe answer now, I posted
 
@alaminhosain You a hint: you're language comes across as rather hostile. I'm suspecting a language barrier, but I'm sure you understand "answer now" isn't very polite?
 
sbi
^ "your"
 
@sehe sorry pal, I am learning...I really did not mean that. please answer
 
11:35 AM
wow! 10 downvotes and I'll have 3333 rep
 
Ell
lets get downvoting then!
ooh luncheon time :D afk for a while
 
@alaminhosain "If you want, you can answer now :)" -- FTFY
 
11:49 AM
hi guys I have issue in STL copy algorithm so anybody can help me?
 
@sehe ffs ¬_¬
 
@Armaan you haven't told us what the issue is
 
@jalf Are you celebrating midsummer in Denmark?
 
@jalf: Thanks for reply. I am going to paste my code here.
last line of sorting giving me error
 
@jalf Or is it called Johannesdagen och Sankt Hans there?
 
11:53 AM
Not really. Not in the way you do in Sweden. We have Sank Hans tomorrow
 
@jaif: I have copied necessary portion of my code so you can see data type of it
 
@Armaan Please ask it on StackOverflow instead
 
Okay
 
We don't mind people asking short, quick questions here (although we may or may not answer them). But if it's more than a few lines of code, ask it as a question on SO
 
it is giving just data type error but to check that you may need my some type structure so I have posted here so I can get quick answer
 
11:55 AM
Hello there
 
1 message moved to bin
 
@Cicada Ohai
 
@jalf How do you celebrate Sank Hans? =)
 
@Armaan This chat isn't your "quick answer" support. We're not here to answer questions. If you want a quick answer, ask on SO. There are literally tens of thousand of people there, looking for questions to answer. This chat is for chatting. And we might sometimes decide to answer a question, but we might not, and we might not do it quick
@ManofOneWay Bonfires :)
 
@jalf Sounds like our Valborg :)
 
sbi
11:59 AM
Hi @Cicada!
Are you at work, @Man? :)
 
@sbi It's midsummer holiday today! :)
 
</lunchtime>
 
sbi
@ManofOneWay I suppose some Swedes still work, no? I mean, you do have buses and trains running, and people want to buy bread and newspapers tomorrow, don't they?
 
Ell
</lunchtime>
 
@sbi Some people work of course, but it's basically only some stores, traffic and hospitals
And police etc
:)
 
sbi
12:03 PM
@ManofOneWay Oh yeah, I suppose the police will be needed tonight in Sweden. Oh, wait. Midsummer night was last night, right? Sorry, I messed this up.
 
@sbi What about you, are you at work?
Yes, many people drink heavily today
 
sbi
@ManofOneWay Since we do not have a holiday today, I will have to work.
 
@Ell Invalid xml!
 
Ell
oopsie :L
 
Actually, I wouldn't mind working today. You get a lot of extra $$$!
 
Ell
12:05 PM
yeah it was the solstice yesterday wasn't it?
 
It was indeed
 
You weirdos and your solstice-knowing abilities
 
Ell
I think solstice and equinox are two of the most awesome words
 
Nah, I think it's Ainur or Istari
 
Ell
sounds not enough exotic syllables :L
 
12:11 PM
solstice is lacking many exotic syllables
 
12:33 PM
I do not want this kinda login — Amol Pujari 19 mins ago
Please go away and learn English and then how to write questions properly.
I swear, SO is getting crappier by minute.
 
Not everyone has the same access to education.
I'm not disagreeing with you though.
 
@Cicada Hill0 I no the Good British righting
 
Contrived
 
@Cicada derived
 
12:49 PM
@CatPlusPlus It does really strike me, indeed, that over the last 48-72 hours we have seen at least 3 incidents with crappy-question-askers making their way to chat, 'because they were no longer allowed to post at the main site'
 
The number of shitty questions is too damn high!
 
1:20 PM
0
Q: restrict suspended/banned askers from chat

PotatoswatterLounge<‌C++> frequently answers questions that are appropriate for the main site, and drive-by asking is a persistent problem. Lately there has been an increase in people coming to the room because they were suspended from asking questions on the main site. Likely they find the chatroom by Goo...

 
@Potatoswatter sorry bud, it's a no from me
 
I loathe you all.
-ath+v
 
Hmm. I rewrote part of git history to change my e-mail. So now my local branch and remote have diverged. What's gonna happen when I push? :)
 
@Cicada it'll be rejected ;)
if you force it, it'll overwrite the old history
 
@Cicada Divide by zero. That's what she said by the way.
 
1:25 PM
and then anyone else who might have pulled from the old history gets all the problems
 
scratches head
 
has anyone else pulled from the remote branch you want to push to?
 
@Cicada When you rub your hands together, does it make a chirping sound?
 
@Potatoswatter Is this a trick question?
 
@jalf In theory no
 
1:28 PM
@Neil Just philosophical… what is the sound of a Cicada scratching its head?
 
@Potatoswatter It makes no particular sound, I have no hands
 
And from me. We can flag, we can bin. We can ignore. We can troll.
What else do we need?!
 
@Cicada Ah, woops.
 
@Cicada you must have some very pointy stumps
 
@Potatoswatter I'm going to have to say, a cicada
 
1:30 PM
@Cicada and in practice? ;)
 
@jalf I'm going to assume that anyone who pulled from my branch (if someone actually did) shouldn't have done so :)
 
ok :)
Well, you're basically recreating history, creating a new commit to replace each old commit
which means that if anyone else has pulled from your old history, they'll see completely separate histories, and will have a hell of a time merging them back together
if no one else has pulled from it, you can just push --force, or whatever the flag is
then it'll just disregard what the remote branch used to look like, and set it to what your local one is now
 
Worth a try. Here it goes!
Looks like it worked! Thanks a bunch :)
 
Am I correct to assume that Qt's QXmlQuery class is a joke? An XPath class that's not able to return any matched QDomElements/QDomNodes is kind of like a printf() function that can't print, isn't it?
 
@Regexident Yes.
 
1:38 PM
@Regexident It's probably written by the same guy who came up with QThread. Yes, he's got a wicked sense of humor
 
At least you know which libraries to stay away from
 
@jalf: he then got to be the same guy who decided to use signed ints for indices, right? Or the one who though it was intuitive to obfuscate QRegExp.match() as QRegExp.indexOf(). Qt, oh how I hate ye!
 
Signedness is arguable
 
signedness is one thing. 64bit support another. ;)
 
when would you need signed indices?
 
1:48 PM
You don't.
 
So when you said it's arguable, you meant it's obviously false.
 
> ar·gu·a·ble (ärgy--bl)
adj.
1. Open to argument: an arguable question, still unresolved.
 
@Neil: the only scenario I could think of is support for reverse indices such as "-2" for "second to last item", which Qt doesn't have either.
 
@Cicada Who's arguing? Everyone is in agreement.
 
I am
 
1:55 PM
@Regexident I agree, but I would no longer call that indices.
 
There's no point using signed indices
However, since the most commonly used integral type is int, using uint makes ugly casts everywhere
 
You're not arguing. I'm in agreement.
 
Unless you consistently use uint everywhere (which I bet you don't)
 
Well it's one thing to use int because it's "prettier" and quite another to be correct about it
 
in RAII, what should I do if I have a raii encapsulation class that I need to return from a function. Does it, by necessity, have to exist on the heap? (and therefore stop being a raii class?)
 
1:58 PM
@Cicada: I'd argue that in 9/10 cases if you're using signed ints for indices in your code you're probably doing it wrong in the first place and "ugly" casts would be the least of your problems.
they'd actually rather be an indicator for the former
 
size_t?
 
@mrazza size_t, quite possibly the ugliest alias for an unsigned int I've ever seen
 
And?
 
Niel: isn't size_t 64-bit on x64?
 
Yes.
@David That's the whole point.
 

« first day (615 days earlier)      last day (4330 days later) »