« first day (634 days earlier)      last day (4305 days later) » 

6:00 PM
@rubenvb Because it's easier to define an operator doing it for me
 
well, I certainly would not expose them as public const member variables
 
user784668
@ManofOneWay Why don't you want to use boost?
 
you prevent move assignment when you do that
 
Ah okey
 
@ManofOneWay that's also the reason you're wrapping it.
 
6:01 PM
@DeadMG So private non-const and getters instead?
 
indeedy
I'd also template it at least over the contained element for future re-use
if you can't figure out how to template over dimensionality
 
It wouldn't be a bitmap then would it?
 
also you forgot const operator() overload
@ManofOneWay Who cares? A bitmap is nothing more than a 2D array, whose contents happen to be boolean. You can re-use it for any other kind of 2D array for absolutely no cost. So why not do it?
 
To prevent anyone from using it differently than it should be used :)
Since it's a bitmap
 
/facepalm
 
6:03 PM
otherwise I've would called it a 2darray
 
it's a 2D array.
the fact that you happen to be using it to store booleans is irrelevant
 
I think it makes the code easier to read if you know the intent of the class, Bitmap2D tells me more than Array2D
would you disagree?
 
but exactly as much as Array2D<bool>.
except Array2D<bool> can be trivially exchanged for Array2D<float> or whatever you need
 
Well, I guess you're right
 
wonder if I can write an N-dimensional array class which does not use specializations
 
6:08 PM
Btw, you mean the const operator() for only reading the value?
 
@ManofOneWay Yes -- to many people "bitmap" means "bitmapped image", and might involve 8, 16, 24 or 32 bits per pixel. To that (large) number of people "bitmap2d" is, if anything, somewhat misleading.
 
@ManofOneWay yes
 
@JerryCoffin BitVector2d then ;)
 
user784668
@ManofOneWay What? Vector2<bool>?
 
I've already admitted defeat :(
 
6:10 PM
ugh
Should I obfuscate my email address from source code?
Are source files robotically scanned by spam whores?
 
user784668
@rubenvb Even if now they're not, it's likely they will be.
 
Is bla DOT bla AT bla DOT com enough?
 
3
Q: I can't assign from pointer to pointer to derived class and pointer to pointer to base class?

user1517994I'm getting back into C++ after several years of mostly Python, and am hitting up against a strongly-typed wall. I think I have a good handle on basic polymorphism and type-casting between pointers of base and derived classes (e.g. Can a pointer of a derived class be type cast to the pointer of i...

^ still one more close vote needed
 
@rubenvb If they're not yet, then yet is the operational word. Honestly, I'm pretty sure at least a few look for virtually anything that looks like readable text.
 
@FredOverflow Done.
Ha, all closers are Lounge regulars.
We're the QA Squad, I told ya.
 
user784668
6:14 PM
@rubenvb Good obfuscation: use Cyrillic A/E/I/O. They look identically to the Latin ones. Spambots will send mails to nowhere, people will be unaffected if you tell them not to copy+paste the address.
 
hmm
I'll trust Gmail spam filters. Haven't let me down yet.
 
Bots can decode DOT AT sillyness.
 
sbi
@rubenvb Just create some spamtrap address at some provider that does good filtering and use that. Why would you want to use your private email address for some project? I have about a dozen email addresses that I check regularly. And if we take aliases into account, I have several dozen.
 
So stop being silly.
 
filter (not . spam) emails
 
6:16 PM
You're making life for people difficult for no detriment to the bots.
Just like CAPTCHAs.
(Meh, fail English, too lazy to reword.)
(You know what I mean.)
 
Say it in Polish.
 
1
A: Non-static Data Member Initializers / Calling constructors of std::vector

refpSadly the standard says that members set to have a default value in the body of an object requires the use of = when declaring them. If your only goal is to not having to "explicitly" specify the type twice you could use decltype to provide some aid in your quest: class Obj { std::vector<i...

isn't that wording good enough, I can't see how people find it confusing?
or well, I could have written; "members explicitly set to have a default value (other than the default constructor of the member)", but heck..
together with the question (and the rest of the post) I find the text to be clear enough
 
Be as accurate as possible. The C++ tag is filled with pedants who will nitpick your answer to death.
 
@EtiennedeMartel that should be accurate enough.. according to me at least
 
user784668
@FredOverflow flip filter emails $ not . spam
 
6:21 PM
@refp Wait, did you went and downvote the opposing answers?
 
@EtiennedeMartel "opposing"? it doesn't answer the OPs question,
 
if I have a 3D array which is x,y,z, and I'm indexing into it by a,b,c then the index is a * y * z + b * z + c, right?
 
@EtiennedeMartel "this would have worked if the standard didn't say something else about the matter", I don't think that is a good answer, it's misleading to say the least
@EtiennedeMartel if you give me a valid argument against my down-vote, I'll happily revoke it..
 
@DeadMG Wiki has the full equation.
In computing, row-major order and column-major order describe methods for storing multidimensional arrays in linear memory. Following standard matrix notation, rows are numbered by the first index of a two-dimensional array and columns by the second index. Array layout is critical for correctly passing arrays between programs written in different languages. It is also important for performance when traversing an array because accessing array elements that are contiguous in memory is usually faster than accessing elements which are not, due to caching. Row-major order is used in C,PL/I; col...
 
@Fanael Ewww.
 
6:23 PM
Somewhere at the end.
 
@CatPlusPlus Yay, maths.
 
Nobody jumping at my triangulation question?
 
I have two questions. I'm going to share one with you guys.
How do I convince GCC to just do what I want?
 
user784668
@RMartinhoFernandes -fdo-what-i-want
 
@RMartinhoFernandes you will need to start every function by dereferencing (int*)0, it's a secret trick to make the compiler more efficient, don't tell no body
 
6:30 PM
I'm writing a new book, it's called "Fifty shades of Shut the Fuck up".
 
user784668
@TonyTheLion Shut the fuck up.
 
@Fanael Now say it 49 more times, but each time in a different shade.
 
user784668
@FredOverflow I won't write the book for him.
 
6:33 PM
@RMartinhoFernandes Bribe it.
 
@RMartinhoFernandes what_I_want& do_what_i_want_bitch_or_Ill_kill_you() { return all_I_want; }
 
@Drise Have you Googled for something like "mesh tessellation"? I'm certainly not going to try to go into detail here, especially if you haven't bothered to make use of the highly Googlable term I already posted...
 
@RMartinhoFernandes depends. If you want to have sex with it for example (you are a robot after all), just ask nicely, I'm sure the bitch doesn't get off much.
 
Meanwhile, in the JS room, someone was offended by the F word.
What a bunch of prudes.
 
@EtiennedeMartel I invalidated that one.
 
6:36 PM
@JerryCoffin I already have working code, but it's slow. And requires a ton of math.
 
@EtiennedeMartel Fuck
@rubenvb har har. Do robots even have sex?
 
@EtiennedeMartel Presumably you really meant "what a bunch of prudish fucks!"
 
user784668
@EtiennedeMartel What a bunch of pussies.
 
wimps
 
@rubenvb W. T. F.
 
6:37 PM
nobjockies
 
Manual memory management? Modern C++ does not need manual memory management. We have RAII. — FredOverflow 7 secs ago
 
@TonyTheLion Do you want to know?
 
@TonyTheLion No, they are offended by sex.
 
@RMartinhoFernandes What?
 
@RMartinhoFernandes no
@rubenvb robots have an "offended" module?
 
user784668
6:38 PM
@FredOverflow It's still quite manual.
 
@RMartinhoFernandes golden :D
 
so funny
 
@Fanael It's explicit in the static type system, but definitely not manual. When people say "manual", they mean "I have to write delete everywhere".
 
6:39 PM
@EtiennedeMartel I wonder how well my addition to the JS room will be taken.
 
@Fanael not with smart pointers it's not.
 
@Drise Oh oh.
 
user784668
@FredOverflow But with RAII you still write delete everywhere. Except it's spelled }.
2
 
@TonyTheLion In fairness, if you're writing JS, there are probably only two possibilities: either you prohibit all profanity, or you're never going to use anything else!
 
6:41 PM
@Fanael Nice.
 
but he didn't mention that which standerd he is going to use, so thats why I answered for C++ 99 standered. — Umer Farooq 1 min ago
^ ...okay...
 
Xeo
@Fanael And it deletes everything you want to
 
@FredOverflow lol
 
#define delete }
 
@EtiennedeMartel WWEHHFWJGHEQLKhgeanvlkhy What?
 
6:41 PM
@FredOverflow To be safe, I usually answer for C++60.
 
in JavaScript, 6 mins ago, by rlemon
I don't need a whole dishwasher to wash a fork.
 
user784668
@EtiennedeMartel IIRC that's illegal, for you can't #define reserved words.
 
greetings...
 
@Fanael You can if you don't use the standard library.
 
6:42 PM
Hm?
 
@JimNorton Ahoy!
 
What about #define public private?
 
@Fanael Correct -- some crimes can only be committed by the compiler.
 
@EtiennedeMartel UB
 
Doesn't make it any less evil, but well...
 
6:43 PM
I really enjoy that I can offer some assistance with C and micro-controller work.. hehe
http://stackoverflow.com/questions/11433835/microcontrol-port-for-lcd/11439024#11439024
 
user784668
@RMartinhoFernandes lol, really? Citation?
 
Or, #define true rand()?
 
@EtiennedeMartel I'll make my privates public if you'd enjoy that.
 
@Drise How goes it Drise?
 
@Fanael Find the citation for your claim and read it closely. It's the same one.
 
6:43 PM
@JimNorton It goes well. I got my first Nice Question! badge yesterday.
19
Q: Is it possible to read infinity or NaN values using input streams?

DriseI have some input to be read by a input filestream (for example): -365.269511 -0.356123 -Inf 0.000000 When I use std::ifstream mystream; to read from the file to some double d1 = -1, d2 = -1, d3 = -1, d4 = -1; (assume mystream has already been opened and the file is valid), mystream >&...

 
@Drise Congrats man!
I've been lazy... not answering or asking many questions lately.
 
Btw, on a side note, does anyone think Apple is a patent troll?
 
@Drise Hell yes!
 
@Drise Every large company is a patent troll.
The whole patent idea as it is currently implemented spawns trolls.
 
@rubenvb Well Apple has been a really ugly troll lately.
 
6:46 PM
@rubenvb That's largely true... some worse than others though.
 
You can't defend your patents without suing people that use them without license.
 
You wouldn't have to if you didn't patent things you shouldn't.
 
0
A: Microcontrol port for lcd

Jim NortonPlease make sure your start-up code configures the PINS on PORTC correctly. You must make sure that they are set to be either INPUT or OUTPUT pins as needed. The current code must have set-up code that properly configures PORTAto drive the LCD controller. You will want to do the same for PORTC. ...

A bit of my world
 
@RMartinhoFernandes naive.
 
@RMartinhoFernandes I don't think that's correct. §17.6.4.3.1/1 says you can't define a name from the standard library if you've included a standard header. §17.6.4.3.1/2 says you can't define a keyword -- but does not include the "if you include a standard header" part.
 
6:48 PM
@JerryCoffin But the whole section (17.6.4) describes "restrictions on C++programs that use the facilities of the C++standard library." (17.6.4.1/1)
 
Will gcc and/or clang convert recursive functions in c++ to iterative ones? If so, to which extent? Only simple methods?
 
user784668
@RMartinhoFernandes Oh, that's 17.6.4.3.1/2.
 
@Drise Because they know that product is stiff competition for them.
 
user784668
@ManofOneWay They will.
 
6:49 PM
@Drise well, that's nasty, but I bet not unheard of (in wholly different sectors)
 
@rubenvb But seriously. Lockscreen gesture patent? Global device search patent? These could be practically anything. Why don't they get a patent on a mobile device that can access the internet?
 
@Fanael To what extent? Is it able to handle all methods?
 
@RMartinhoFernandes Yes, and? Does that make "A translation unit shall not #define or #undef names lexically identical to keywords..." non-normative?
 
@JerryCoffin No, but it makes it a restriction on programs that use the standard library.
 
user784668
@ManofOneWay To some extent. It's hard to say. When in doubt, convert the functions yourself.
 
6:51 PM
@Drise I didn't judge the patents themselves, just the prevention of sales.
 
@rubenvb I just find Apple to be abusing the system to try to stomp out their competition. I find it unfair, and monopolizing.
 
@Drise the judge decided. If that's unfair, go to higher court, or lobby to change the laws. That last part is something no big player wants, cause they're all the same.
 
Because, frankly, if you don't use the standard library, shit won't hit the fan if you #define delete }.
(Assuming you know what to do).
 
Oh look, we patented a thing with a glass screen that you touch, and has a battery in the back, and maybe a radio or two. Oh lookie, you can't build one to compete with me because I got the idea first hurr hurr hurr!
 
@RMartinhoFernandes No, not really. The fact that the section in general as described as relating to the standard library doesn't change the clear meaning of the sentence, which contains no restrictions on the programs to which it applies.
 
6:55 PM
@rubenvb The appeals court overturned the injunction like 2 hours ago.
 
@Drise the slide to unlock patent has previous work against it: handheld.softpedia.com/get/System-Utilities/Enhancements/…
@Drise 2 hours? I thought it was partially overturned a couple days ago?
 
@rubenvb Erm. You may be right.
I also find it low of character for Apple. They feel threatened and instead of building something better, they are using the legal system, which I feel is cheating in a way.
 
well, for what other purpose are there patents then if you aren't allowed to defend them?
Note I also hate the way patents work and are given in the US
 
@rubenvb I just feel Apple's patents (at least from my observations in this case) are overly broad and give rediculous amounts of power.
 

« first day (634 days earlier)      last day (4305 days later) »