« first day (1626 days earlier)      last day (3327 days later) » 

7:00 AM
You can avoid it by having it be only part of the implementation (i.e. .cpp files) but if it's in the .hpp files you're out of luck.
 
@Rapptz So... I'd have to #include "boost/any.hpp" only in the cpp?
 
@Cinch When you want to link SDL statically, you need to link all its dependencies too.
 
@Rapptz link, but not include.
 
@Rapptz It is about 12 mb final executable, 4 mb ram.
 
 libraries.extend(['m', 'dinput8', 'dxguid', 'dxerr8', 'user32', 'gdi32', 'winmm', 'imm32', 'ole32', 'oleaut32', 'shell32', 'version', 'uuid'])
my old code for static linking SDL2
 
7:02 AM
For non-unix a.k.a. Windows.
 
What’s libversion?
 
Using GCC we can avoid some of these but Windows 8-9-10.
 
Hm.
Damn it, it seems that I cannot use Boost.Any if it's a header file since it is a templated header.
 
@LucDanton It's version.lib!
It's filesystem related stuff.
 
25 secs ago, by Cinch
Damn it, it seems that I cannot use Boost.Any if it's a header file since it is a templated header.
 
7:03 AM
Perhaps I should try dynamic_cast<> as a solution instead?
 
7 secs ago, by Cinch
Perhaps I should try dynamic_cast<> as a solution instead?
 
@ParkYoung-Bae I have a templated function called unpack that basically forwards its arguments to the cast for boost.any
So basically I can't remove unpack from the header file if I want it to stay templated, right?
 
Did the committee already accepted any draft for gui?
 
@VictorLopez They really shouldn't.
 
@Cinch It can be anywhere as long as the definition is visible from where you use it
 
7:06 AM
Hello kind people
 
@ParkYoung-Bae But the definition uses Boost.Any.
Therefore I can't decouple the two... which means, let's roll my own.
 
I have a question concerning code design
 
Oh.... @sehe !!!!
Where was that code you so humbly offered this one?
 
I have no idea what you're saying tbh
 
@Cinch There should not be any trouble by not using Boost.Any as long as the structucre is SOLID.
 
7:08 AM
@VictorLopez No no no.
 
But what if it's GASEOUS
 
That's not the problem
I can't decouple Boost.Any from the unpacking/casting.
And that function is templated.
 
@ParkYoung-Bae Even worse, PLASMA.
 
never mind, I can't formulate my question properly
 
@Cinch No, you're getting it wrong, why in the first place your implementation would need Boost.Any?
 
7:09 AM
|> "Earned It" by "The Weeknd" on "Fifty Shades Of Grey (Original Soundtrack)"
what a recommendation
thanks Pandora
 
@VictorLopez Because I'm trying to pass generic data along with my messaging system.
 
@Cinch The higher the language, the easier it becomes to understand the meaning.
 
@VictorLopez I've been studying C++ and I don't intend on doing any other language for some time.
 
@Rapptz Thanks Pantoona!
 
@Cinch Create interfaces and implementations for your structures, you don't really need to handle variable data types.
 
7:12 AM
lol
 
user1804599
I want to build GH pages from something in develop branch.
 
@VictorLopez I thought about it and I remain by my stance that many of the designs that I come up with are inherently flawed and will cause refactoring.
Now I'm going to try roll my own.
 
80
Q: Type erasure techniques

Xeo(With type erasure, I mean hiding some or all of the type information regarding a class, somewhat like Boost.Any.) I want to get a hold of type erasure techniques, while also sharing those, which I know of. My hope is kinda to find some crazy technique that somebody thought of in his/her darkest ...

 
Let's bikeshed on function try blocks
 
user1804599
So I have to make my website build system copy the files to a temporary directory, compile them, checkout gh-pages, then copy the results back. :[
 
7:14 AM
Mmh is there a recipe for mixing explicit specializations (e.g. std::hash spec.) and SFINAE (e.g. do_hash function template that 'does the right thing')?
 
Function pointers?
 
What if in the end the graphical_object class is just that?
 
Why function pointers?
 
@райтфолд we all saw that
 
A graphical_object.
The implementation will be your decision. OpenGL, DirectX.
 
7:15 AM
...Perhaps it's best to just parameterize type.
 
But what are your final data structures? For handling a buffer object, fine, for handling a data type that can be integer, float, double, really fine, but in the big picture, what will they achieve?
 
@VictorLopez Final data structures?
 
In what cases is boost.any useful ?
 
@Cinch Sure. You application is an application after all, what will it integrate?
@Cinch And for which platforms?
 
@VictorLopez Fine.
I had an idea for a game which had the tools to create, well.
> I'm thinking of creating deep interactions between subsystems within the game.
Exactly that.
The idea was that you may have many different variables and things being sent around...
The nature of certain skills or spells would be of an entirely different nature
Some might be based on time intervals of such
Some might be closer to models of chemical interactions.
Others might try and use velocity.
 
7:19 AM
@Cinch Solid data types, for example, no, they can't be different nature, what is the component that will be receiving those parameters?
 
What if you have a spell that wants to do different damage based on your name and how many times it was invoked?
 
@Cinch They still can share an interface
 
@khajvah I thought about this.
Oh, gee.
I might have to post this again.
 
You can't do universal_object because the compiler is not God but you may define a finite set of structures like humans, what do humans do?
 
7:20 AM
@Cinch What you want is duck-typing in c++. Better to share an interface.
 
The point was to make the system unbiased in terms of the information structures it might send and receive.
 
@Rapptz Basket, balls
 
Just use void* m8
It's what the C people use.
 
@Rapptz Yeah, but I don't know how to do that safely.
And then I don't know how to wrap that inside of a class.
 
The delegation of that is on the user's hands.
 
7:22 AM
I know how to cast a void* but not do that in such a manner that it will know whether it successfully cast or not.
 
By requiring some stupid interface you shut out everything in the standard library.
 
Apply manipulations
 
@VictorLopez What does this mean?
 
@Cinch for each object apply the manipulation.
 
@Rapptz You wot m8?
 
7:23 AM
@Cinch Cathedral does it boost or weaks?
 
@khajvah It's the truth.
std::string is not polymorphic with MyDumbInterface.
 
@VictorLopez Uh... weaken?
idk.
That's not the point.
 
He's just storing data.
 
It is not just storing data, there are some functions I think.
 
It's literally all he's doing.
 
7:25 AM
For example, Cathedral would enable your characters to have strong resistance against X
Does it apply for players or foes?
 
@VictorLopez Both, one or the other, or neither.
Or better yet, it can be locally erased with another local environment.
Temporarily.
What if I want half-strength as well?
Variable strength?
 
@Cinch Focus in the game.
The design is important.
Rules are designed to be followed.
 
@VictorLopez The focus is that you want a generic system that can be deep enough to allow for natural and deep interactions.
 
Are you advocating against the use of condoms
 
i.e. A basic rule would be something like water puts out fire.
 
7:27 AM
Or am I misunderstanding "natural and deep interactions"
 
@Cinch Ok, but under which rules?
 
@VictorLopez Well, any. You've seen this type of interaction in classic JRPG games.
Something more advanced would be to raise your heat level such that it can boil water on contact.
Therefore the power curve of fire vs. water varies based on another variable.
 
@Cinch Yes! But those rules are specific. Call it "X skill".
 
And what if we want to apply the heat levels in the environment? Say I want a spell to absorb heat from the environment to counter cold or to store and release it as necessary to increase the heat levels of others?
 
RULES.
 
7:29 AM
Savage yet again perfectly encapsulates corporate work :\
 
And then I want to have different heat interactions with materials, such as metal, fabric, or liquids.
Eventually it will get to the point where manipulating the state of the environment while managing your own capabilities will lead you to victory.
 
You're creating a video game, it has rules, there can't be options out of scope because the compiler will not handle them.
 
@VictorLopez And yet I want to push boundaries.
 
It's not the storyline it is the game design.
 
@VictorLopez I can create a general interface for such things.
But then along comes a new design:
 
7:31 AM
The mechanics. You can say anything about fire beating water.
 
@VictorLopez The mechanics are not what are important. We're talking about how to structure the code.
 
Let's start easy. Sonic the Hedgehog.
Which rules do handle the movement?
Think about the environment first, what is the gravity value?
 
@VictorLopez What's your point? I'm not going through this exercise.
 
@Cinch Yes, you're going and you will.
 
Fine.
Most likely AABB collision rules with gravity set to a certain value that is changed based on X Y and Z.
Speed is determined by user input as well as patterns.
The system is rigid and defined and that's all good and dandy.
 
7:34 AM
@Cinch The funny thing is, some 9 hours ago you wanted me to get though your exercise that looked exactly the same.
 
Gravity is -0.21875 added to speed per frame
 
@Griwes I'm actually doing it though.
 
@Griwes inb4 what's your point
 
That means -13.125 in 60 frames. You can't violate that.
Talking about pixels and knowing that the MegaDrive resolution was 224 pixels in the Height parameter.
There is air drag if you decide to press RIGHT
while jumping.
 
fucking hangover. It is hard to work when your stomach is fucked up.
 
7:38 AM
When Sonic hits something else you can A: let sonic decide what to do with colliding object or B: let colliding object decide what to do if it gets hit by sonic.
And those are rules.
One by one, and it is upon you to decide which rules will you apply.
Because it is your game.
 
@khajvah Well, there's a solution. Don't get wasted a day before work, ???, profit.
 
@Griwes Tried that. It is boring.
 
There is no God algorithm and you have to decide those rules. We all would love it to be an all in one solution for everything but the sad truth is that every object will be bound to strict rules.
 
...
That's not my problem, though.
I need an alternate method of type erasure in C++.
I was just explaining the system it might become a part of for convenience.
 
@Cinch But the gravity value in Sonic The Hedgehog!
 
7:43 AM
Gravity value can't be a bool unless you do bitwise operations and if you do, why bother using floats?
 
Oh my god
The first article where lvalues and rvalues make complete sense.
 
Go deeper, don't think about lvalues or rvalues, think about bytes.
00000000 is a byte.
How many booleans you can have in a byte?
 
@VictorLopez Okay, I think you're just pulling my leg now.
 
I am trying to do my first program in Eclipse, I am on Luna and have installed CDT, do I have to explicitly install compiler?
or installing CDT only will do'
 
@Mahesha999 I believe it has its own internal compiler already.
Also Eclipse's parser is terrible from what I remember.
 
7:47 AM
What the hell is going on
 
sizeof(bool) is 1, one byte but you can | the value to store one bit inside that bool
 
@Cinch What internal compiler is that?
 
since after creating project of any simple type it gives me error like "Unresolved headerfile.h"
:(
 
@khajvah I think it was some sort of MinGW
 
00000000 | 00000001 is 00000001
 
7:48 AM
@Mahesha999 ...Not very informative.
 
so just felt those headerfiles are not simply there
@Cinch?
 
@Mahesha999 "Unresolved headerfile.h" can have multiple meanings depending on where the header file is and how you configured your setup
i.e you could have not included your header search directory.
Or you didn't link to a library.
Or you're just using the wrong function "call" because it doesn't exist.
Or you named your headerfile .hpp
 
@Cinch lol no you don't
 
@Griwes I don't like the dependency on Boost.Any so I'm going to code my own replacement.
 
7:50 AM
@Rapptz Eternal something or other.
 
@Cinch You are going to fail.
Like many before you.
 
well installing CDT, restarting eclipse and going straight to create project of type titled "C++ HelloWorld Project" should run printing Hello World?? without needing explicit configuration?
 
@Cinch I actually can't think of any reason why one should use boost.any
 
Because your C++ skills are nowhere near being enough for redoing anything sane.
 
@khajvah Neither can I right now if I can use my own.
@Griwes Thanks for being constructive, man.
 
7:51 AM
Opaque api he was talking about before.
 
Also lol, Boost.Any is not what you want, man.
What you need is Boost.TypeErasure if anything.
 
@Mahesha999 When you create a project, there is place to choose the compiler. If your compiler is alright, it should work
 
When you don't have the datatype but the real fact is that you don't understand what a uint8_t really is.
 
@khajvah I used it once. Deep in the intestines of a map from types to values.
 
Are they called opaque pointers?
 
7:52 AM
It's huge.
Too big.
 
What's huge?
 
my dick
 
It appears that Boost.TypeErasure is a superset of Boost.Any.
 
@khajvah your hangover
 
I guess, it was a long time ago since opaque pointers, when messing up with Android.
 
7:53 AM
@Cinch LOL
You appear to have no actual knowledge whatsoever.
 
I'm literally at the Boost.TypeErasure page and it looks to be a directory instead of a doc.
 
@khajvah needs proof
@Cinch I suppose you found it by now?
 
He has the knowledge but he wants to implement a variable datastructure to handle multiple objects into one simple interface.
 
@sehe Do you really want a proof?
 
@sehe No, I'm reading up on type erasure first as a concept.
 
I'd love a link though
 
Also yeah, it kinda "contains" boost.any
 
@khajvah I didn't say anything like that
4
A: boost::any replacement for the code below

seheJust for fun, I thought I'd create a minimalist any implementation: ////////////////////////////////////////// // my_any.hpp #include <memory> #include <stdexcept> struct my_any { my_any() = default; template <typename T> my_any(T const& v) : _storage(new storage<T>(v)) { } my_any(m...

 
But saying Boost.TypeErasure is a superset of Boost.Any is like saying that C++ is a superset of C.
 
@Cinch But yeah, type erasure is the trick
@Griwes Still would be true
 
7:55 AM
@Griwes ...
The point is to ELIMINATE dependencies.
 
That makes no sense.
 
@Cinch Can't, unless you separate interface/implementations.
 
Boost ain't a dependency, it's a necessity usually.
 
And create a proxy object for them.
 
@Griwes That's what the coke addict said
 
7:56 AM
heh
 
@VictorLopez Which has been done, yes.
 
lol
 
I do want batteries included for Flexiglass though.
 
:22379930
 
:22379930 Oh gosh, do we get the trolls now because of that flag?
 
7:57 AM
@sehe Sure, I could do without boost, but kill me if I'd want to.
 
:D
 
@khajvah am getting Cross GCC and Microsoft VC++ as Toolchains, does that mean the corresponding compilers are already present?
 
Think about the design first and solve the inner problems, audio, video, input, then, create objects that composite from these.
 
> You can only counterflag messages that have been flagged
 
@VictorLopez I already did.
 
7:58 AM
keep it going SO
 
I got nowhere within the first two months because I knew so little.
I'm literally doing mini projects.
 
anyway
I've hated this guy for so long, but now I found out his IP and will DDoS him
127.0.0.1
 
@Mahesha999 If eclipse is not dumb, yes. Plus, you should know what compilers you have already installed
 
@orlp LOL
 
7:59 AM
Question:
 

« first day (1626 days earlier)      last day (3327 days later) »