« first day (1049 days earlier)      last day (3914 days later) » 

user1804599
5:00 PM
Bobotie , also spelt bobotjie, is a South African dish consisting of spiced minced meat baked with an egg-based topping. Colonists from the Dutch East India Company colonies in Batavia probably introduced bobotie to South Africa.The first recipe for bobotie appeared in a Dutch cookbook in 1609. It is also made with curry powder leaving it with a slight "tang". It is often served with Sambal. It is a dish of some antiquity: it has certainly been known in the Cape of Good Hope since the 17th century, when it was made with a mixture of mutton and pork. Today it is much more likely to be ma...
 
@Telkitty猫咪咪 I actually can't read Chinese, I'm just curious.
 
@MartinJames I am closing all the doors, because the wind would make 'scary' sound with them if I don't ... also I double checked all the doors are closed
 
user1804599
@MartinJames I ate this.
 
@not-rightfold WANT!
 
@Insilico It is about ghosts and tomb raiders and evil spirits and prophecies and weird animals
 
user1804599
5:01 PM
deleteing a pointer that does not point to a newed object should terminate the program with a stack trace.
 
-1
Q: Game Development Discussion: Comparing the time and place for Java and C++

jt0dd[Let's stay on the topic of "Video Game Development" as much as possible, using different game type scenarios to explain the points within arguments for either side.] Research can easily be done to compare C++, C basic, and C#. The difference there is pretty obviously clear. C++ in most cases, w...

 
user1804599
As should dereferencing an invalid pointer.
 
@Telkitty猫咪咪 Sounds very Loungeish.., well, maybe not the tomb-raiders.
 
@not-rightfold IIRC deleting null is safe though
 
user1804599
And pointers should have an unsafe_dereference member function.
 
5:03 PM
@not-rightfold How would you implement such checks?
 
@not-rightfold Throw for it.
 
user1804599
@Insilico By keeping information somewhere. You need to do that anyway for delete to work.
 
@not-rightfold The memory allocator usually stores only just enough information to perform the bookkeeping when it's used correctly. It's not necessarily the case that it's enough to perform the kinds of checks you want efficiently
 
user1804599
@Insilico unsafe_* member functions if you care about that.
 
5:06 PM
@not-rightfold That information may not be available.
 
user1804599
Default should be safe, not performant.
 
user1804599
Unsafe code must look as ugly as possible.
 
@not-rightfold If the default results in slow-as-molasses performance, you'll see everyone turning off the default option.
 
user1804599
> slow-as-molasses
 
Which would completely defeat its purpose.
 
user1804599
5:08 PM
Yes a check and a branch is so sloooooow.
 
Besides, there already is a tool that will give you a stack trace on invalid pointer accesses. It's called a debugger.
 
@MartinJames current adverture is very cliche - 9 people tried to raid a long lost tomb of a mysterious queen - one did not want to go in the tomb after one dead from mysterious snake bite. Two dead when came close to the queens coffin because of this plant which caused hillucination. One dead from illness when opening a closet which was fore told by a painting on the wall. Then in the closet there was a painting about 1 of them was demon which needed to be killed if they were to make it out alive
 
What happens if the pointer has been returned by an OS call, or has been allocated by separate heap-manager in a DLL?
 
Would anybody want to help me with a design?
 
Just ask.
 
5:09 PM
I mean whenever I get access violations, VS points exactly to where in the code it has happened complete with stack traces and local variable values.
 
Unless OS happens to be broken at the time.
:v
 
Ah. So, I have this concept of rooms. I guess a better word might be screens - say, the main menu, an options, etc. Make sense?
 
Also it's not always that easy.
 
user1804599
@Pawnguy7 Go on.
 
@Telkitty猫咪咪 Sounds even more like the Lounge :)
 
5:11 PM
Fabulous and mesmerising.
 
@CatPlusPlus Pass the paracetamol.
I've stuck some tape over it. I will have to keep moving the tape until that thing scrolls off..
@Pawnguy7 Not really - sounds like a GUI main form.
Shit, I gotta move the tape.
 
I will try to state this as the functionality I want it to have. Each room should be able to set the current room - so, for example, if you press a button in said options room, you go back to the main menu. Note that this would be direct, I don't think nodes are required. Oh, and enumerated.
 
Cracked it - I just used a longer length of tape and stuck it on vertically - it is just wide enough to cover the cats' toy.
 
Use a GUI library, because writing one is tedious and a lot of work.
 
Additionally, there would be transitions. Rooms would be able to ask if it is transitioning in, or transitioning out, and get the percent as a [0.f, 1.f] range. The room base provides these times (both out and in). This can be used to, for example, fade out before the room switches.
 
5:18 PM
1 message moved to recycle bin
 
@R.MartinhoFernandes To be honest I think it depends on the setting and the people you're telling this to. If everyone was a friend and it was a pretty casual setting I definitely wouldn't even care in the slightest. Or.. at work really but some people are uptight about stuff so it depends heavily on the person.
 
For an idea, here and hereis what I had. Though I don't know why I had separate transition functions (for the percents), that should just be one.
 
You really like Managers.
 
It seems that way, yes.
 
It's usually called a "window", not a "room", btw
 
5:21 PM
I just found a memory leak in that.
 
Yes, there probably is.
 
Also gist works better for multiple files
 
I didn't plan multiple files at first.
 
@R.MartinhoFernandes: I think "that's a stupid idea" is borderline at best, even with explanation of why you think it's true. If at all possible, I'd generally try to stick to something closer to: "I wonder if that couldn't be improved by ...", and then go into more detail about what would make it better. Even if the final conclusion really ends up as throw it out and start over, it's likely to be better received if you make it sound like you're using their idea and just suggesting improvements.
 
So anyway. I can do most of the things this did, in main. My question is, how do I give them the same information. Mostly for setRoom.
 
5:23 PM
How are these rooms?
This looks like a State Machine
 
I think that is a pretty accurate description.
Are state machines bad?
 
@Pawnguy7 No - you're using several now.
 
No? I'm pretty sure all games have them
 
@R.MartinhoFernandes Out of curiosity would you phrase it like that in Portuguese?
 
5:26 PM
Anyway, I can easily pass in something with the transition issue, but I am not sure the best way to make setRoom.
 
@Pawnguy7 Send/Post the room a message, on a queue. You could give the messages ID numbers like, say WM_PAINT.
 
@Pawnguy7 Seriously, use a GUI library.
 
^ this
 
@MartinJames Strongly-typed signals, not integer-typed ones thanks.
 
user1804599
5:28 PM
@Borgleader second, duh.
 
@CatPlusPlus Yeah, I was just trying to reinforce the 'use a GUI library' point :)
 
Ugh Firefox suddenly jumps to 100% CPU.
I don't know why. :<
 
The idea was to make a snake clone that was well designed.
 
Yay for 3 day weekends.
 
user1804599
@CatPlusPlus Chrome does that when I edit attributes in Magento.
 
5:30 PM
@CatPlusPlus If it's an update thingy, I'll know shortly when my box starts to misbehave badly.
 
This code looks pretty bad IMO. Rule-of-zero. Implicit conversion operator. Equality and less-than operators as member functions.
 
@Rapptz WOW!
 
@Rapptz Is that a pokemon?
 
user1804599
@StackedCrooked C++.
 
5:33 PM
@Jefffrey Yes.
@StackedCrooked That guy's last article was pretty shit so I'm not surprised
 
@StackedCrooked Why is he implementing copy-constructors and assignment operators if they are trivial?
 
WTF, that's beautiful
 
@EtiennedeMartel Ignorance?
 
This guy is filled with madness.
 
Did you guys discuss the [[pure]] proposal?
 
5:36 PM
> The Boost library has a macro BOOST_STRONG_TYPE that creates a definition of a similar class, but macros are ugly and difficult with interactive debugging.
You've missed the bit where they generate correct class.
 
Ah yeah you did.
This proposal looks pretty bad.
 
Oh, nevermind, it has explicit ctor.
 
> An extract from the forthcoming book Reliable CPP
Well then.
 
@Rapptz I imagine it's about bringing the concept of "pure code" in haskell to c++?
 
5:39 PM
You can now buy badness!
 
Well.. it's not what I had in mind tbh
 
The benefits of [[pure]] will be really limited in C++.
 
@R.MartinhoFernandes For the real world? Yes. For SO? Ha ha no.
 
Mathematical functions aren't [[pure]] for example.. I think because they set errno for floating points
 
Yes.
libc needs to die.
 
5:41 PM
What do you think of this?
 
and.. well if your mathematical functions aren't pure then you have issues :v
 
Heh - nailed the 'Debugging the undebuggable' area of concern: 'Unfortunately many C-style strings with char*'.
 
@Pawnguy7 Bad code. Too tired to evaluate design.
 
@CatPlusPlus Care to explain what you see that is bad?
 
In C++, the tan() function is not referentially transparent. That's how fucked up C++ is.
 
5:43 PM
@Pawnguy7 The design works (a stack of states, each state managing the input/update/draw stuff).
The actual implementation is shit.
 
Init(), no defined ownership.
Singletons.
 
It's in "pseudo-code" but it should get the idea across.
 
Stringly-typed.
 
Yeah I'd use enums or something other than strings, but the basic idea is there
 
Really the state doesn't have to be a class.
 
5:46 PM
What else might it be?
 
A function that returns a new state.
Still needs some cheesing, because function returning itself is an infinite type, but eh.
 
@StackedCrooked why is it bad that equality operator is a member?
 
@A.H. Not inherently bad but it's usually defined outside of the class (though there are cases where I do it inside the class)
 
> That’s often quite inconvenient, but with std::vector you don’t even get the choice
 
Your error is on line 42. — Jerry Coffin 23 mins ago
 
5:48 PM
Yeah std::vector allocates always all the time nevermind what you're doing.
You're just shit out of luck if you don't want to allocate.
Also tumblr
 
@Mysticial 10 actual processors ? :O
 
@A.H. it's not idiomatic. (basically it's a noob flag.)
 
but wouldn't that be better than friend functions ?
 
A state having a base and being a class (or object) makes sense to me. I don't know what makes it an inconvenient grouping.
 
I seem to remember SM tables with rows of five 'somethings'. One was an action instance to call the 'run' method of, two others were possible next states to switch to, depending on whether the run method returned true or false. I can't remember what the other two somethings were.
 
5:52 PM
What we need is a fractal stack.
 
/r/cpp is still discussing singletons
 
reddits so lame.
 
Is the argument against init() and... cleanup() to just use the constructor and destructor?
 
there's a cleanup() function too?
 
@Pawnguy7 Yes.
 
5:54 PM
Wow and I thought init was bad.
 
I think their example had one.
 
Problem with init/cleanup is that it means that it's acceptable for an object to be in some invalid state before init and after cleanup.
While in practice, it's best to say that any object shall always remain in a valid state for the entirety of its existence.
 
Good point.
 
tbh I wouldn't look at gamedev code online, especially C++
 
5:56 PM
Most of the shit code in our engine is Wii-related legacy.
 
I just searched "screenmanager C++". It was in the top five, as well as one from SO.
 
Even though we no longer support the Wii, some of things in the engine, such as our resource manager, were designed that way because of the Wii's limitations.
 
Managers
 
Yeah, also naming.
That's another problem.
 
I call it ResourceCache. It doesn't actually manage anything other than contain them.
 
5:58 PM
In short, we've got good intentions but we don't have the manpower and/or time to fix all those issues. Such as the ridiculous amount of singletons.
 
I just discovered that Markdown lends itself rather nicely to literal programming. Duh.
 
Anyone has experiment with Boost.Log yet? I think I'll toy with it a bit.
@KonradRudolph Happens all the like in Haskell-land :) Not just Markdown though.
 
@LucDanton Well it’s pretty obvious actually but I never thought about it until just now, when I wrote an answer that interspersed code with explanation, and I noticed that this is actually a literal program
 
Having a stack of states is a good idea, though. Not quite sure how to implement their "pause" though.
 
Why pause?
 
6:02 PM
Do you mean a Menu state or what?
 
A pause menu, say. What happens to the now-not-top stack should be defined by itself, but traditionally, it is probably not doing anything besides drawing itself.
 
So?
I probably wouldn't implement GUI as separate states, though.
Just set time scale to 0 and display a modal window.
 
Checkboxes?
 
I don't really know what you mean @CatPlusPlus
 
What about checkboxes?
 
6:04 PM
That sorta has different state (ticked, not ticked, indeterminate)
 
Is indeterminate it's initial state?
 
no, well depends.
 
Now that I think of it, that wouldn't really work.
 
Wouldn't be very friendly to say "you didn't do this" when they did and just left it unchecked. Unless I am not thinking on the same page.
I have never seen that before.
 
6:06 PM
..really?
 
Are those your privileges?
 
@Rapptz I meant major game states, not GUI state.
 
@LucDanton lol
 
Really, I'd call game states "scenes".
 
That famous menu "scene"
 
6:08 PM
Yup.
 
SFML has SFGUI but it sucks.
 
I plan to rename them now. I think rooms was a GM throwback.
 
You can try some other OpenGL GUI library
 
Wouldn't that not accomplish the purpose of learning though?
 
Um, okay. I guess if you don't mind doing it?
 
6:12 PM
@Pawnguy7 No, with stuff that complex, learn from something that already works.
 
yes
 
@MartinJames How complex is it? Soley the idea of states, not form elements.
 
@Rapptz They're all bad, one way or another.
Just pick one that works.
@Pawnguy7 You don't have to reinvent the wheel to know how it works.
 
@Pawnguy7 Oh, right. You can do your own state machines, no problemo. Don't try to write a GUI library, (especially if you think checkboxes can have more than two states:).
 
6:14 PM
@Borgleader That seems to be pretty much what he's asking for, but "just use std::unordered_set or std::set" seems to be a better answer than what he's asking for.
 
0
Q: How to improve my linked list implementation?

user2342783I'm wondering how to improve the speed of adding elements to my list or just how to speed up the whole list implementation. Function which adds new elements first checks if object would be unique. If not it will just check if the new data is better (the lower value the better) that the old one an...

 
@Insilico i just posted that ;) look above where it says code review
 
@MartinJames Tri-state checkboxes can be useful. Probably not in a game.
 
@Borgleader hehe. Weren't we just talking about how linked lists were bad for lots of things about an hour ago?
 
@CatPlusPlus If it has more than two states, it's a RadioGroup, not a checkbox.
 
6:16 PM
@MartinJames No.
 
I didn't think they could have more than two states, so I am a bit confused. " (especially if you think checkboxes can have more than two states:)."
 
@Insilico I wouldn't know I only got here about 30-40 min ago
But yes, they suck
@JerryCoffin Indeed.
 
Consider folder info with a checkbox for something, that also reflects the state of items within the folder.
If every children has the things set, checkbox has state true. If nothing, false. And if some, intermediate state.
 
Now that you say that, that sounds similar to some installers I have seen.
 
Tri-state checkboxes are not uncommon.
 
6:18 PM
@Chad - I'm not allowed to use ANY of the STL containers. But I have written own vector class recently. — user2342783 38 secs ago
Oh FFS.
 
And radio group has different semantics. You can have a radio group with 2 elements and it won't be necessarily equivalent to a checkbox.
 
A checkbox either has a tick in it, or no tick. If you want to expand the meaning of either state, that's up to you. If the element displays anything more than 'tick' and 'no tick', I don't call it checkbox.
 
That reminds me. I was looking into particle libraries earlier today. As I understand it, you cannot define any new functionality, only mix and match with what they already provide. Does this sound correct?
 
GUI elements don't exist in vacuum, and have a meaning behind them.
 
@MartinJames I guess thats why someone would call it a tri-state checkbox
 
6:21 PM
Tri-state booleans are not that uncommon either.
 
I just witnessed an answer accept (via AJAX refreshes) for the first time ever
 
@LightnessRacesinOrbit I didn't know answer accepts get pushed to the browser. Is that new recently?
 
@MartinJames Checkboxes can have more than two states.. lol
 
@Insilico Maybe.
I don't think SE publishes a changelog, so all we have is the big fucking mess of meta
 
@CatPlusPlus I'm taking my tablet into space so its GUI elements will exist in a vacuum!
 
6:25 PM
This answer is fairly comprehensive, mind you
 
Just need to work on a battery that'll work out there.
 
OK, that's enough checkbox-trolling for now. I have to walk Bailey down to the club to get my car back, (again). Then it's gonna be beer O'Clock. BFN, have fun :)
 
No matching entry on there, though
 
@MartinJames Later.
 
TIL voting to close used to cause automatic downvotes upon closure
22
A: Which new close reasons carry automatic downvotes?

KevinI took a few questions (one for each closure reason), and compared the time of closing to the time of a close vote in the asker's profile. If there was a downvote at precisely the same time as the closure, I assume it's the automatic downvote from the closure. Here are my findings: Automatic dow...

 
6:33 PM
-3
Q: Should we mark C and C++ questions as duplicates of each other and potentially merge them?

Shafik YaghmourThis was brought up before for a specific set of cases in this thread Should these related C and C++ questions be marked as duplicates?. It was theoretical since none of the questions were actually marked as duplicates and it did not seem to illicit much discussion, probably because the answer in...

haha
 
Oh I just downvoted that.
 
@BoltClock dammit, you beat me to it
 
SAM
:)
 
evening
 
6:41 PM
@Rapptz Nothing like linking a question to chat, going to the toilet and coming back to a crap answer on that question. I'm surprised it didn't trigger an automatic low-quality answer flag
 
+1 Lots of people (myself among them for a long time) think they are coding C++ while they are actually coding C. They just don't know ... and should be educated. — d-stroyer Aug 22 at 11:06
 
What's "SRO" in the context of this question? That's not a programming acronym I'm familiar with.
 
Scope Resolution Operator
 
Oh okay. I've never seen that as an acronym before.
 
user1804599
They should terraform the Moon.
 
6:43 PM
terraform it how?
there's nothing really existing there that's useful to terraform.
 
user1804599
Well, move it from here to there.
 
Except Nazis.
 
@not-rightfold What's "it", "here", and "there"?
 
considering that the Moon is a quarter the mass of the fuckin' Earth
 
@not-rightfold The should lunaform the earth.
 
6:43 PM
moving enough mass to terraform the Moon would have serious complications.
for example, the shift in the Earth's fuckin' gravity.
 
user1804599
I don't care how they do it. I want to live there without anyone bothering me. No more morons except me!
 
then there's how virtually all of that mass would be blown into space
 
@Insilico Tried to fix it a little
 
@not-rightfold Are you willing to spit up the cash to do it?
 
user1804599
I don't have the cash, but if I did, sure.
 
6:46 PM
Would set an interesting precedent. Will Moon be its own sovereign entity? Or would it be a colony of some Earth country?
 
@not-rightfold There are easier ways -- lots of room here on earth where you can be left alone for years at a time, if you really want.
 
user1804599
I also had this idea of completely surrounding the Earth with panes that I can rotate so I can let people pay me if they want sunlight.
 
@JerryCoffin Nice to know people have thought of this way beforehand.
 
user1804599
Or covering the Moon's visible surface area with giant pixels.
 
6:51 PM
Can't get the 'trivial example' of Boost.Log to link :|
 
Not entirely sure why someone would go out of their way to copy the <title> tag of one of their older questions and paste it into another newer question as an edit
-1
Q: iphone - unrecognized selector sent to instance - Stack Overflow

user2727854view Controller if([sender tag]==0) { NSLog(@"%@",[exterior currentTitle]); ChildViewController *child=[[ChildViewController alloc]init]; child.passedData=[exterior currentTitle]; [child handleSwipe:child.passedData]; [child handlePinch:child.passedData]; } else if([sende...

 
user1804599
@BoltClock Because said someone is a moron.
 
@BoltClock lol
 
@not-rightfold Seems like there was a Simpsons episode where Mr. Burns does that to the town...
 
I mean it would make sense if he was trying to repost his older question but
 
6:54 PM
Not really.
 
user1804599
And I want a Dyson sphere.
 
@not-rightfold Hah. "so I can let people pay me"
 
user1804599
@Insilico Yes, of course.
 
user1804599
Somebody needs to pay me, otherwise the Earth will freeze.
 
@BoltClock I've had someone ask a question, accept an answer, and then ask the exact same question minutes later.
 
user1804599
6:55 PM
And many plants depend on light.
 
@not-rightfold Or we can shoot you and your panes. Seems to be cheaper in the long run.
 
@Insilico Did they paste the "0 down vote favorite" bits as well?
 
user1804599
@Insilico If I had the money, I'd also have a giant army.
 
@BoltClock The "0 down vote favorite" bits?
 
6:57 PM
$ nm obj/debug/main.o | grep get_logging_enabled
                 U _ZNK5boost3log12v2s_mt_posix4core19get_logging_enabledEv
$ nm -D libboost_log-mt-d.so | grep get_logging_enabled
000000000017ffa6 T _ZNK5boost3log11v2_mt_posix4core19get_logging_enabledEv
^they're not the same :|
 
@Insilico Yeah. When you highlight a question's content for copying, if you're not careful you'll copy those bits for some reason
 
Compiled with a different GCC?
 
@CatPlusPlus Shouldn't be the case, I'll rebuild just in case.
 
@BoltClock Oh! No I think the poster I was talking about managed to avoid copying other page elements.
Lemme see if I can find it
 
user1804599
I wonder how much energy is needed to accelerate a 50kg object from 0km/h to 16Mm/h in half a second in two meters.
 
user1804599
7:01 PM
I forgot the formulae from high school. :<
 
@not-rightfold Just use the formula for kinetic energy.
E_k = 1/2 m * v^2
 
user1804599
Does that account for acceleration?
 
Plug in 50 kg, the velocity, and you get the energy. That's how much energy you need to put into the object to make it go that speed.
 
user1804599
Oh wait duh right.
 
The acceleration part is irrelevant.
 
7:05 PM
I don't know what to name the particle thing if not manager...
 
user1804599
Hmm. 493.8Mj.
 
Make sure you get the units right and everything, of course.
 
user1804599
@Pawnguy7 What does it do?
 
user1804599
If it emits particles, call it a particle emitter.
 
Um... it collects particles, and updates/draws them.
I don't plan to have emitters.
 
user1804599
7:11 PM
Why do you need a class for that? :V
 
Don't want to manage a list per particle type, and the updates in the open, I guess.
 
user1804599
Call it a particle collection.
 
> BOOST_LOG_DYN_LINK If defined in user code, the library will assume the binary is built as a dynamically loaded library ("dll" or "so"). Otherwise it is assumed that the library is built in static mode. This macro must be either defined or not defined for all translation units of user application that uses logging. This macro can help with auto-linking on platforms that support it.
 
Feels... hardcoded, but I don't think a library-like system would really be able to do certain things specifically.
 
^this is set when building Boost but I have to set it when linking against the result :(
I'm still not sure why the define affects the end symbol tbh.
 
7:17 PM
@Pawnguy7 So it's like a manager
 
Exactly :D
 
I don't know how else to do it.
 
You can usually fix that by allowing some relevant object to own an std::vector<Particle>
Except, it wouldn't be a manager
 
What do you imagine would own it?
 
7:20 PM
Maybe a Level
depends on your application
When you update a level, you update the particles owned by the level
When you draw a level, you're drawing the particles in that level
 
It still feels wrong to not have a base class.
 
the actors, the map,
 
@Pawnguy7 More experience will solve that problem for you.
 
@Pawnguy7 What services do you have that need to be shared by all classes?
 
I suppose there is nothing in common now that particles don't draw and update themselves. More of just a way to put them in a list at this point.
 
user1804599
7:27 PM
Is Eiffel good?
 
It just feels... backwards. I feel it is going against polymorphism and inheritance. Though neither of those really apply here anymore. Or, like, with my packets. I still think it made sense there.
 
@not-rightfold Define "good". It has good points (e.g., built-in support for DbC) and bad (support for unsafe contravariance).
 
And making a bunch of different overloads seems to violate DRY.
 
You need to stop thinking in terms of classes
3
It's literally your poison
 
It isn't a bad sign if something has 20 overloads?
 
7:30 PM
A template could fix that
 
Overloads for what?
 
well, I hope so.
 
Let's say, for sending various types of packet data over a socket.
 
then a template that uses sizeof(T) could solve that
or maybe not.
I'm thinking of endianness.
 
My initial plan was, each packet would overload, say, getData().
I still don't know why that is bad.
 
7:38 PM
because nobody who wants to handle a packet can deal with the data of any packet.
the code that uses that data is strictly dependent on the type of the packet sent.
there's no use case for getData().
 
At the rate I'm going at these mod flags I won't be getting any sleep for another 3 weeks
 
@BoltClock Sleep is a disease caused by excess blood in your caffeine system.
16
 
I need to answer more questions with the concurrency and multithreading tags. My StackCareers profile says I specialize in "arrays"
What an achievement
 
@MohammadAliBaydoun That may be open to some improvement (maybe ).
 
@JerryCoffin I will ameliorate my image as an Array Specialist
Strings? I can do that
 
7:45 PM
I have a silver badge for
 
@DeadMG I can see that. If that is true, though, the id is similarly useless. So, the overloads would also prepend an id to the data before sending?
 
Sequential Data Arrangement Analyst
 
@Pawnguy7 Yes.
 
Is there a good way to map types to... in this case, an int? I feel having a centralized location to find the ids would be good.
 
type_index (but why are you doing this)
 
7:50 PM
I don't know how else you would do it.
 
you can map a type directly to some code with a template and lots of template specializations
 
Templates are not exactly what I am good at :D
 
C++ without templates is C with classes and other stuff
 
I can make a vector<Stuff>. That about documents by template usage. They are very useful, I just don't have the knowledge to use them for such things.
 
7:57 PM
@Pawnguy7 Just use boost::variant. The index into the type list is your int id.
 
Boost seems to be the Jquery of C++.
 
well, not exactly.
but those guys did already invent LOTS of helpful things.
and you would be wasting your time if you did not re-use them.
 

« first day (1049 days earlier)      last day (3914 days later) »