« first day (453 days earlier)      last day (4478 days later) » 

3:05 PM
@bamboon no, but there is in the Boost library; a whole big complex sub-library for images
 
@AlfPSteinbach ah ok thanks. I heard of the boost one, but hoped for a solution in c++11
 
@bamboon well, dealing with bitmaps is a specific task. C++ aims to keep it self as broads as possible, it tries to not get bogged down with defining things that are platform or problem specific. This is partly why C++ doesn't directly support things like 3D graphics, you have you use a library such as openGL
 
@thecoshman he said bimap, not bitmap (unless that was a typo)
 
the boost image library is so generic it hurts sometimes
 
@jalf thanks jalf
 
3:10 PM
I think he meant bimap
 
now, I know why everybody is talking from images
I do indeed mean bidirectional maps
 
@jalf well, I thought he meant bitmap, as did Alf by the looks of it, and he seems to have agread with alfs suggestions... but no he seems to agree with you saying bimap, so I'm not sure what he is after :S
ah, well there we are
 
@thecoshman well yeah because I refered to the boost part, as boost has a bimap, too. ^^
 
@bamboon well, alf mentions the fact that boost has a sub-library for images, so I assumed you where in fact after image related do-dads. oh well
 
What is the Great Placement new Conspiracy?
 
3:14 PM
@thecoshman yeah, the image part from alf confused me but as the boost part satisfied me, I was like ok"thanks"
 
@bamboon boost bimaps - or in fact all multi-indexed containers are too much convenience and too litte performance for my taste
 
@sehe that is true, but you always pay one with the other
 
@sehe very handy for a LRU cache I needed to build recently though
 
by bimap, do we mean a structure to provide many-to-many relationships, like you might have in a database?
 
no
 
3:16 PM
if you want hardcore performance, it is always gonna be dirty
 
basically a std::map where you can index on value as well as on key
 
a bimap is a map where both the key and the values are key
 
or two maps glued together
 
this "basically a std::map where you can index on value as well as on key"
 
I see... dare I ask for a use case?
 
3:21 PM
Jan 4 at 1:26, by FredOverflow
room topic changed to Lounge<C++>: BREAKING NEWS: Array placement-new broken? Read all about it! 8720425 [c++] [c++11] [c++-faq]
 
and thought one could avoid the second loop by having a bimap
It just comes to my mind that that would be not good
 
@sehe what is 8720425
 
@SethCarnegie And welcome, name-twin
22
Q: Array placement-new requires unspecified overhead in the buffer?

Mooing Duck5.3.4 [expr.new] of the C++11 Feb draft gives the example: new(2,f) T[5] results in a call of operator new[](sizeof(T)*5+y,2,f). Here, x and y are non-negative unspecified values representing array allocation overhead; the result of the new-expression will be offset by this amount from ...

 
@sehe who is a name twin?
 
0
Q: Is there a word for someone with the same name?

seheIf a person shares my name, in Dutch there is the word "naamgenoot", meaning roughly 'member of the same name'. Similarly, 'classmate' is 'klasgenoot' in Dutch 'roommate' is 'kamergenoot' in Dutch I'm pretty sure I cannot call someone with the same name as mine a 'namemate' :) Do you know ...

@SethCarnegie I don't know :) I filed a question on that. Yay. My first question on En.SE
 
3:30 PM
AFAIK there is no word for some one who has the same name as you
 
"Samenamer"
 
@SethCarnegie that's not a proper word though is it
 
@thecoshman it is now
 
@thecoshman Allthough google fight suggests it might be a little more betterrer than 'name-twin' a casual inspection for the hits with '+"samenamer"' suggests none of them actually contain that word.
 
@SethCarnegie just using it once dose not suddenly turn it into a valid word
 
3:35 PM
Of course it does
where do you think all the other words came from
 
@SethCarnegie from people using it more than once?
 
I would say that name-twin is probably the most common way to say some one with the same name
 
I've never heard the phrase before, ever
 
@jalf the people here have used it multiple times
is that good enough?
 
I think that namemate deserves priority if only because of the isomorphism and consistency with roommate, classmate. name-fellow just came to mind
 
3:36 PM
namesake is someone with the same name
 
Was about to say it.
Just translated "homonyme" from french to english
And it gave me "namesake"
 
@TonyTheLion Nice. "We have the same namesake"? "Ours is a (single) namesake"?
 
Samenamer is slang for namemate
everyone knows it
 
@sehe I think the use is more "We're a namesake", but not sure
 
@SethCarnegie ... grin
 
3:38 PM
I thought it was always used as in "A is B's namesake"
or vice versa
 
"I was named after my grandfather. I am his namesake." - usage per Wikipedia
 
i.e. there's no equality
 
@TonyTheLion "namesake" carries the connotation that it was named after something that came before it (and is possibly no longer here) right?
yeah
 
@TonyTheLion "We're a namesake" makes it sound a little 'important' pretentious for my taste. Anyways, do get all your good contributions up for voting at the question: english.stackexchange.com/questions/54502/…
 
> Namesake is a term used to characterize a person, place, thing, quality, action, state, or idea that has the same, or a similar, name to another
> In the United States, the term is often used for a person or thing actually named after, rather than merely sharing the name of another.
US has to be different, has usual :P
 
3:39 PM
No, it's the rest of the world that's different
 
yeah, I think namesake is more named-after
and @seth you can't just keep farting the mash of letters at people and expect people to take it credibly
 
"farting the mash of letters" LOL did you just make that up?
 
I meant to say farting that mash, but yes.
I write all my own jokes don't you know
 
where the word "geek" originates from:
 
@TonyTheLion where's my reading glass -_-
 
3:46 PM
donno
 
some help you are :P
 
@thecoshman see what you did? "You repelled/chased/drove away my namesake"
 
@sehe erm... your welcome?
 
Thank you :)
(for welcoming)
 
@sehe erm... your welcome... again
(I could do this for a while :D )
that just looks like a big nose smiley, rather then a laughing smiley followed by a closing brace bracket
 
user784668
3:56 PM
@thecoshman it's a parenthesis.
 
@Fanael woah, how long have you been waiting for someone to make that mistake :O
 
@thecoshman It's what I'd look like with a big grin. I gotta shave someday
 
user784668
@thecoshman 6.678E46 tp
 
@sehe me too. Takes a lot of effort to both to do it
 
How portable is this? #define $(x) foo<x>
 
user784668
4:03 PM
@Pubby non-portable
 
@Fanael +1
 
Yeah, but how non-portable?
 
nondigit: one of
    a b c d e f g h i j k l m
    n o p q r s t u v w x y z
    A B C D E F G H I J K L M
    N O P Q R S T U V W X Y Z _
digit: one of
    0 1 2 3 4 5 6 7 8 9
 
user784668
@Pubby it depends on the compiler devs and the phase of the moon.
 
@Pubby dose it mater? don't do it
 
4:08 PM
§ 2.11 ...
It does allow for 'universal-character-name' and 'other implementation-defined characters' except in the first position. So: not portable.
 
Oh well. I'll use a different character.
 
user784668
I actually think that there would be less problems with macros if they were required to contain a $ in their names.
 
@Fanael too late for that though :(
 
user784668
@thecoshman yeah, it's about forty years too late.
 
nice link that
 
4:13 PM
@sehe Cool, thanks.
 
my point is, that it is very often not necessary to keep all indexes in synch while building/modifying the collections. This is where the additional cost is incurred.
I have taken a preference to explicitely updating (reverse-)dictionaries whenever the need arises.
This also handily sidesteps a whole lot of template complexity (tag structs...) that isn't as obvious to the average programmer. I do like those, but it clutters the code nonetheless and I don't like it
That said, there are certainly situations where constantly-updated indexes are the best thing too have, and I'd use Boost Multi-Index there without any hesitation
 
4:38 PM
Hi guys
@RMartinhoFernandes - Limits of the primitive data types isn't compiler specific. Correct ?
I believe it depends on the architecture of the machine.
 
user784668
Oh well.
 
user784668
My answer got accepted, but it didn't get upvoted.
 
can you forward declare a template function?
 
@TonyTheLion ideone.com/HvUBJ
 
right
 
4:45 PM
:2349484 make it constexpr!
 
is it me or is moving operator()() outside the header unnecessary in this case
0
Q: Forward Declaration & Functors

Jordan Jetson// backgammon.h #ifndef BACKGAMMON_H #define BACKGAMMON_H #include <ctime> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> namespace Backgammon { typedef boost::mt19937 Generator; typedef boost::random::uniform_int_distributi...

the fact it's a template class, only makes that harder.
imo
 
@Mahesh It depends on both. Ultimately the compiler can just emulate some other machine and use whatever sizes it wants.
 
Ok.
@RMartinhoFernandes I don't have spec handy. Can you please quote from the spec ?
 
The spec doesn't say what the sizes are derived from.
It simply states minimum sizes and the relations between types.
 
@sehe - that EL&U question is #4 in the network wide "hot questions" list now!
 
4:50 PM
what does it mean when you say "C++ templates are duck typed" ?
 
Anybody tried to load native dlls installed in winsxs from .Net code?
 
@TonyTheLion sounds like a play on "duct tape"
 
that would make it an insult though I think
 
In computer programming with object-oriented programming languages, duck typing is a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test, attributed to James Whitcomb Riley (see history below), which may be phrased as follows: :When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. In duck typing, one is concerned with just those...
 
4:53 PM
@TonyTheLion It means that as long as the types have the needed functions, it works.
 
this makes sense with that sentence
don't know why the brought in the ducks
 
No need for common base class or anything.
 
wow never heard it called that before
 
> there is no such thing as a null reference (you can construct one, but doing so is considered a hack).
 
4:56 PM
In the Haskell room.
WTF.
 
euh, no
I didn't think that constructing a null reference in C++ is allowed?
 
user784668
@TonyTheLion you cannot, doing so is a great example of undefined behavior.
 
"there is no such thing as a null reference"
 
2
Q: Using explicit/raw pointers in c++

LamiaI read that using raw pointers in C++ is bad. Instead we should use auto_ptr. In the below code I am populating a vector in foo() that is created in the main(). Am I doing it right or is there a better way to do without using explicit pointers. #include <iostream> #include <vector> #...

look at the last line in the first answer
 
user784668
4:57 PM
WTF?
 
user784668
That person doesn't know what she's talking about.
 
@RMartinhoFernandes it does say "you can construct one"
 
What is this called? std::nullptr_t&& ref = nullptr;
 
r-value reference
 
I would say r-value reference to a nullpointer
 
user784668
5:03 PM
Bonus question: assume that null pointer bit pattern is all zeros. Now, what should I do when I want to access the memory at 0x00...00 (happens sometimes in very low-level code)? Is it the "I'm writing non-portable code anyway, so just access it and hope the compiler doesn't do anything funny with it" thing?
 
What? NULL is guaranteed/defined to point to nothing
 
@Fanael can't you just get a pointer to whatever address you need it to point to?
I don't see what a nullptr has to do with it
 
@Fanael: I think having the pointer be 0x00...0 and having that be a valid address which you might want to access to points to a broken platform (compiler)
 
If 0 is a valid address but your compiler treats it as a null pointer, you're hopeless. Get a decent compiler.
 
//How's this syntax look?
parser foo {
  production(A,
    choice(N(A) >> T(+) >> N(B), { std::cout << V(3); })
    choice(N(B),                   ;)
  );
};
 
5:09 PM
@RMartinhoFernandes Thanks for the info.
 
user784668
@Grizzly but it happens in reality. That's sad, but true.
 
@Fanael: Out of curiosity: Any examples?
I typically don't work that low level
 
user784668
@Grizzly almost everything on x86. 0 is a perfectly valid address (when there's no OS, that is), yet almost all compilers on this platform define null pointer to 0.
 
sbi
@Pubby Is that smiley intentional? And is it valid syntax?
 
Hi @sbi
 
sbi
5:14 PM
@TonyTheLion Hi!
 
@sbi It's technically macro syntax. The smiley is the most important part!
 
@sbi How's your day been?
 
sbi
@TonyTheLion Busy. And yours?
 
@sbi hard
 
There we go, talking about sex again. You really have no cure.
2
 
5:15 PM
what?
and now some asshole starred it :)
 
sbi
@TonyTheLion You were just telling us of your hard-on.
@TonyTheLion That was me. :-{
 
@sbi I was telling you I had a hard day
not a fucking hard-on
lol
 
sbi
@TonyTheLion So it was a non-fucking hard-on?
 
@sbi I suspected as much
@sbi offs
 
user784668
5:17 PM
I had to check in a dictionary what a hard-on is.
 
sbi
@TonyTheLion So you intentionally called me an asshole?!
 
there seems to be no reasoning with you guys, just all sex
@sbi yes :)
 
@Fanael: Writing a new OS on x86 doesn't come up too often
 
@Fanael wtf
 
5:19 PM
@Fanael Google Images would probably not be a good idea in this case
 
sbi
@TonyTheLion I love you, too.
 
@sbi :P
 
user784668
@Grizzly I believe I have seen some old x86, like i386, used in embedded devices. But it's possible that I'm mistaken.
 
In the essence of it, we're all assholes, in our own twisted kind of way, aren't we? :P
 
user784668
Guys, please. I know what it is; I just didn't know what that specific phrase means. I know, my English sucks.
 
5:21 PM
@Fanael oh right
@Fanael are you not a native English speaker then?
 
@Fanael: Would you want to access that address though?
 
user784668
@TonyTheLion No, I'm not.
 
ah ok
ok, is it me, or does it sound a bit iffy when someone says they got a job in "Kazachstan", when they live in Britain?
 
user784668
@Grizzly some memory-mapped registers may lie there, firmware may left some interesting data there, and so on. Of course it's probably not the best address to choose for such things, but then again, all systems have their quirks.
 
sbi
@TonyTheLion That is one hell of a daily commute, that's for sure. :)
 
5:24 PM
@sbi yea.... true
 
sbi
That said, I once met someone who lived with his family in Spain and hacked for a compiler vendor in Ireland. He flew to Ireland for a day 2 or 4 times a month, and worked from home the rest of the time.
Anyway, the kids are ravenous, so I'd better feed them before they start to eat me. :)
 
@sbi oh yea, well Ireland seems reasonable, but I wouldn't go work in Kazachstan, that's for sure
 
user784668
@TonyTheLion why not?
 
sbi
@Fanael Damn!
 
@Fanael because I just wouldn't go work there, not sure if it's safe and all that
 
5:28 PM
@TonyTheLion You're xenophobic!
 
user784668
@TonyTheLion Would you go work in US instead?
 
nothing against Kazachstan, don't get me wrong, but just not my thing
 
@Fanael perhaps, but I ain't qualified, already checked
 
Admit it, you don't know how things roll in Kazachstan, and you're prejudiced to think it's not safe and all that.
 
user784668
5:29 PM
@TonyTheLion What happend to "not sure if it's safe", then?
 
@RMartinhoFernandes maybe I am prejudiced
just let me have my prejudice for once, and stop breaking it down
 
We all are.
 
@Fanael I"d go to an area I know is "safe"
 
so how does one win an argument on the internet? Is there some guideline, cause I seem to horrendously suck
:(
 
user784668
5:31 PM
@TonyTheLion I'm asking about US, not an area you know is "safe". US is unsafe as it gets.
 
@TonyTheLion Don't give up, and don't mention nazis. Basically.
 
@Fanael depends on how you look at it.
I've been there, was pretty safe to me
 
user784668
@TonyTheLion Usonians use raw pointers, unsafe blocks and unsafePerformIO! They do that every single day!
 
Do not mention unsafePerformIO in polite company!
 
> According to recent studies, arguing on the internet is now the second most popular leisure activity in the world, just below shopping and just above sex.
LOL
@Fanael lol
 
5:37 PM
@TonyTheLion That's posted here often enough to deserve a permanent pin.
 
hello
 
@Xaade probably
 
hmmm, im having a wierd problem
im getting a: no match for 'operator='
 
Sorry, we don't give marital advice here. At least not for free.
 
in this code:
 
5:41 PM
lulz
 
constantPool[index] = c;
 
what's the type of constantPool?
 
constantPool is a constant pointer, index is a short and c is a constant pointer
 
Pointer to what?
 
so constant pool has no operator= defined on it
 
5:42 PM
constant is a struct
 
so constantPool is of type const some_type*?
 
struct constant
{
byte type;
short payload;
byte* data;
};
constant * constantPool;
constantPool = new constant[constants];
 
user784668
So it's not a constant pointer.
 
The type of constantPool[index] is constant&.
 
user784668
It's a pointer to a struct called constant.
 
5:43 PM
You cannot assign a constant* to constant&.
 
user784668
@TheBreadCat Uhm, what? Have you considered using std::vector?
 
what's the Great Placement new Conspiracy?
 
@RMartinhoFernandes a reference?
 
@IntermediateHacker You're not in it.
 
I don't get it.
 
5:44 PM
@TonyTheLion Yes.
 
@IntermediateHacker it's a conspiracy about placement-new
 
@IntermediateHacker Because you're not in on it.
 
@RMartinhoFernandes referencing what?
 
what's placement-new?
 
@TonyTheLion The object pointed to by (constantPool + index).
 
5:45 PM
google it
so it should be constantPool[idx] = *c;, since c is of type constant*
 
I see. but what's the conspiracy?
 
ok thanks
 
@IntermediateHacker ask @MooingDuck
 
@TonyTheLion Possibly, but that could be dangerous.
 
@IntermediateHacker: It wouldn't be a proper conspiracy if we just told anyone, now would it?
 
5:47 PM
constant has a byte* payload, but no copy constructor in sight.
Sounds like it's violating the rule of three.
@IntermediateHacker You're not in on it!
 
@RMartinhoFernandes damn, you're right
 
damn. I'm always left out of all the conspiracies. :(
 
oh yeah, i see it now, if the code i wrote before should had worked constantPool had to be a constant**
 
user784668
@IntermediateHacker They don't like you.
 
@RMartinhoFernandes: No a violation of the rule of three, since there is neither a ass. op nor a destructor either
so it's just broken
 
5:48 PM
@TheBreadCat no, actually because your struct contains a pointer, you need provide a copy ctor for your struct and overload operator= and create a dtor too
 
dtor?
 
WTF is the placement-new Conspiracy ???
 
destructor
 
@IntermediateHacker: Of course history might reveal the truth about the conspiracy
 
5:49 PM
@IntermediateHacker STFU or GTFO
 
user784668
@TonyTheLion s/or/and/
 
@Fanael lol
 
@IntermediateHacker It's all in the transcript. You can investigate if you want.
 
@RMartinhoFernandes that'll take ages.
 
We've been sloppy and didn't erase all traces of our doings.
 
5:50 PM
I see a new cat here, TheBreadCat :)
 
In fact, we didn't erase any traces at all.
 
user784668
@IntermediateHacker You're too lazy.
 
@IntermediateHacker: It really wouldn't, but we dpn't want to make it too easy, no whould we
 
@MrAnubis the internet is full of cats.... not hard to see a new one every so often
 
@TonyTheLion lol. OK then, I'll GTFO.
 
5:51 PM
@IntermediateHacker Because you don't have 1337 search skillz. Try searching the chat for "conspiracy".
 
just go to reddit.com/r/lolcats
 
In criminal law, a conspiracy is an agreement between two or more persons to break the law at some time in the future. Criminal law in some countries or for some conspiracies may require that at least one overt act must also have been undertaken in furtherance of that agreement, to constitute an offense. There is no limit on the number participating in the conspiracy and, in most countries, no requirement that any steps have been taken to put the plan into effect (compare attempts which require proximity to the full offence). For the purposes of concurrence, the actus reus is a continuing...
 
user784668
@IntermediateHacker Compile yourself with optimizations turned on, so that the strictness analyzer will have a chance to kick in and eliminate unnecessary laziness.
 
Or use $! everywhere.
 
5:52 PM
Considering the meassage anouncing name change is starred, its actually a bit to easy
 
user784668
@RMartinhoFernandes This could result in too much strictness.
 
Yeah, we've been very very sloppy.
@Fanael Luckily most noobs don't even come across it, unlike in C++ where noobs find dangerous features early on (like new) and then get enamored with them.
 
15 hours ago, by Grizzly
What is this? The grat placement new conspiracy?
 
user784668
@RMartinhoFernandes +1
 
5:54 PM
Shit, he's on to us.
3
 
@Grizzly no one answered you?
 
@IntermediateHacker: That was me giving it a name
Which was then adopted. So yeah, no one answered me
 
user784668
@RMartinhoFernandes Mind you, too much strictness can be fatal to you. Your very life is merely the process of evaluating all the thunks that got created as a result of your birth.
 
Yeah, I thunk too much.
(Sorry, that's a mandatory pun around here.)
 
5:57 PM
Is @MooingDuck 's comment to this somehow related?
 
@IntermediateHacker ::new (&x) T(22, Brown, true); is placement-new.
 
but what's the conspiracy?
 
user784668
@IntermediateHacker You do not want to know.
 
@RMartinhoFernandes: Again with the new girlfriend?
 
5:59 PM
.......I give up.
f*ck the placement-new conspiracy.
 
user784668
@IntermediateHacker Finally!
 

« first day (453 days earlier)      last day (4478 days later) »