« first day (491 days earlier)      last day (4457 days later) » 

2:00 AM
@DeadMG kiiind of, but not really. Evolution makes you care about your genes. Your children will have, on average, half your genes, so evolution will make you consider them half as important as you are. Your grandchildren? About a quarter of your genes. See where I'm going?
 
you know skacat knigi means download books :) so if you find out that this site doesn't suit your needs, just type in the google these words and you will encounter many other sites worth of seeing to download anything you like on Russian.
 
evolution makes you worry about the near term, because that's where you're able to track your genes, that's where you know which actions benefit them, and which actions don't
 
@DzekTrek alright I'll check them out ;)
 
@Insilico the shortest example that still illustrates the idea (value semantics in a tree structure) is in this answer:
1
A: Parsing Text to Make a Tree Data Structure

seheSpoiling the fun with an answer you can't use anyway if it's homework: A minimal implementation with Boost Spirit Qi: #include <boost/spirit/include/qi.hpp> namespace qi = boost::spirit::qi; typedef boost::make_recursive_variant< std::vector<boost::recursive_variant_>, ...

 
@jalf Building a sustainable society is plenty beneficial.
 
2:01 AM
everyone I gotta go teach python :P
bai
 
bai ! :) @Hoxieboy
 
you really need to read up on your evolution
 
and while it's true that my descendants will only share log(n) of my genes, there will be exp(n) of them
 
@Insilico although boost docs are bound to have better examples. If you like, I can spot a few nice cases in the Spirit documentation
 
Building a sustainable society is beneficial, but it's more beneficial to let others build a sustainable society, and leech off it
 
2:02 AM
@DeadMG Actually evolution fails horribly in case of sudden changes of environment
 
@DzekTrek XD
 
On the contrary, evolution just then begins to show it's best. @KillianDS
 
and if we'd be concerned about our genetic legacy, then that is an extremely good reason to fear our neighbors, and protect my people over your people
 
@jalf But someone has to do the building in the first place. Our sentience is more than enough to see this and act on it.
 
because the people around me have more of my genes than the people around you
 
2:03 AM
not really
 
yes really
 
your genetic future is going to depend on their diversity
 
@DeadMG sure, but I don't need the whole world for that
 
@sehe: Wow, I really should take a look at the Boost table of contents and see what other libraries people have come up with
 
sure, but you can't predict which regions of the world will possess necessary genetic traits
 
2:04 AM
look, there's nothing new to this. It's game theory. All the species of the world already act like this. Every biologist worth his salt has simulated it
 
@jalf Being sentient changes the dynamics somewhat.
 
@DeadMG I also can't predict which ones will posess harmful ones, which might weaken my lineage
@DeadMG not really
 
well, members of all other species don't possess any information about the ramifications of their actions
 
unless you program in a different goal, the results will be the same
 
they have to be individual because there's no way for them to act any other way
 
2:06 AM
@DeadMG They don't need to
That's the entire point in evolution
 
We don't need evolution for all that much anymore
 
@DeadMG You just said we did
you just said that evolution was what was going to make your logical superhumans care about their survival
 
@jalf No, I said that it was useful for some things.
there's a big difference between allowing evolution to dictate your general attitude and quite another to allow it to dictate how you go about it.
 
@DzekTrek Actually no, if your species does not adapt fast enough in sudden (and significant) environmental changes it has very good odds to go extinct, no rocket science here.
 
@DeadMG so you are saying that we have entered metaphysical libertarianism ?
 
2:08 AM
@DeadMG Yes, and? You're proposing that a sentient individual, concerned only with spreading his genetic material, would operate differently than a non-sentient individual whose behavior has been hand-picked through billions of years of evolution, to spread his genetic material
 
@jalf Of course I am. A sentient individual has many more options and much more information to consider than a non-sentient individual.
 
According to you, the only thing we'd care about sans feelings, would be spreading our genes, because we get that from evolution. If we want to do that, then we use the exact same mechanism as evolution. We don't care about the long-term future which we can't control, because relying on others to play along is counterproductive. In a perfectly idyllic community, it is logical for someone who only cares about propagation of his genes, to cheat and exploit that community
@DeadMG evolution does not rely on the individual consciously picking options
 
@KillianDS That's exactly what I said, and you said it otherwise, remember . |You - @DeadMG Actually evolution fails horribly in case of sudden changes of environment | | Me - On the contrary, evolution just then begins to show it's best. @KillianDS
 
@DeadMG @jalf @DzekTrek: Get your own room. :-)
 
@jalf But it isn't counterproductive. Other people will play along, because it's in their own best interests to maximize the long-term future just as much as yours.
 
2:10 AM
@DeadMG So not only are you ignorant of how evolution works, you also don't know the basics of game theory
@DeadMG No, it is not. It is in everyone's best interest to spread their genes. Nothing more, nothing less
 
the only game theory I've encountered was predicated on the idea that there was no effective communication
 
it is extremely counterproductive to rely on others in a situation where others can benefit here and now from cheating you, and when they have no reason not to do so
 
which is not true between sentient beings
 
@DeadMG then you should encounter some more game theory. :)
 
@jalf Except that if all humans are the same way, then you all gain an advantage.
which is exactly the way that our society is going
 
2:12 AM
@DeadMG But everyone will gain a smaller advantage than they would if they exploited the others
prisoners dilemma
@DeadMG I thought it wasn't. If our society is headed in the right direction with feelings, that undermines your initial argument that they've failed to solve our problems
 
@jalf It's going in the right direction != it could go there a lot faster without them.
 
It's not worth it to gamble your future on 7 billion human beings all being loyal and honest with you
evolution figured out the optimal strategy long ago
 
yes, which is mutual co-operation in the long term
consider, for example, the cells in our body
 
help others, until they betray you. Then don't help those individuals. And your population will have some 10-15% such "leeches", but not much more than that, because the population as a whole is weakened then
 
why would any cell be a skin cell? It's just more likely to die than, say, a fat call or a brain cell.
 
2:15 AM
@DeadMG (1) because it's more likely to survive in a body than it is on its own
why would a kangaroo be a kangaroo, and not a dog?
the skin cell doesn't exactly decide what it wants to be
 
@jalf Exactly- because it's in the long-term interest of all of the cells to bond together permanently.
 
and moreover, all your cells contain the same DNA
hence, from the genetic point of view, it doesn't matter
 
@jalf That's just an approximation, there are individual mutations.
 
it has nothing to do with the long-term interest of all the cells. It has to do with the near-term interest of your DNA
or, not even that
 
right
 
2:16 AM
it has to do with the past success of your DNA
your DNA has, so far, been succesful by forming bodies such as yours
 
so consider human society as one being, where each human constitutes one cell of the "body".
 
Interesting subject, indeed! Please, proceed. :)
 
@DeadMG Does not compute. Human society does not share identical DNA
 
nor do our cells, there are random mutations
 
and you are assuming that our DNA is all we care about (we got that from evolution, remember?)
@DeadMG Cancer, yes. That illustrates my point nicely
 
2:18 AM
@jalf Is the vast, vast minority of them.
 
Cells with the wrong DNA are generally killed by our bodies, or they end up killing us
@DeadMG yeah, most of the rest of them get destroyed by the "normal" cells
the ones that contribute to the body's survival are the ones with identical DNA
 
on the scale at which we are talking about, each human is pretty damn identical.
the differences within our genes is trivial
 
@DeadMG But not completely identical. There are different degrees of similarity
and if we care about our DNA, then even the smallest difference counts
 
@DeadMG not a single one cell is similar to the other. Patterns of difference could be found in intercellular body cells.
 
My DNA is more valuable to me than yours, because you lack some of my DNA
If I'm being logical, then I'd rather spend my effort on the survival of those who share the most DNA with me
 
2:20 AM
who cares?
 
and that's the people around me
 
you can't survive without people whose DNA is different to yours
 
@DeadMG So? That means you need some foreign DNA to survive. It doesn't mean you need all foreign DNA to survive
 
on the scale of human beings, the genetic difference is miniscule and quite irrelevant
 
@DeadMG On the scale of evolution, it is very very significant
 
2:22 AM
just like the cells in our body survive better together than alone, we would be better served acting in unison
 
lol, here comes anterior commissure part. :)
 
yes, dream on. But that has nothing to do with logic
If you want to be logic, do the math, run the simulations, or ask a biologist who already did run the simulations
 
@jalf Technology superseded evolution some while back
 
or ask evolution, which has basically been simulating this exact thing for billions of years
and has found out that these slight differences in DNA do matter, if you want an optimal survival strategy for your genes
@DeadMG That makes no sense. You said that evolution was going to give us our impetus to survive
 
Technology is just a tool like everything else in our hands. On the other side, evolution is the truly engine of our progress.
 
2:24 AM
Thus, the traits that are favored by evolution will be the ones we care about
 
@jalf I didn't say it was going to give us our method.
 
survivability of our genes are what evolution favors
my genes
the individual's genes
ok, this is silly. It's past 3 AM, your argument makes no sense, and it's based in ignorance and contradictions. I'm going to hit the bed
As long as you are going to preach daydreams masquerading as logic, you're not getting anywhere. And you're not making logic look any prettier by violating it like this
"wouldn't it be nice if everyone were kind to each others" sounds nice, but it's not an optimal strategy if every individual has the goal of propagating their genes
and if we're logical, we're going to want the optimal strategy
 
@jalf Alleles!
 
@DeadMG @jalf Nice talk indeed!
 
2:40 AM
In mathematics, the Fréchet derivative is a derivative defined on Banach spaces. Named after Maurice Fréchet, it is commonly used to generalize the derivative of a real-valued function of a single real variable to the case of vector-valued functions of multiple real variables, and to define the functional derivative used widely in the calculus of variations. Generally, it extends the idea of the derivative from real-valued functions of one real variable to functions on Banach spaces. The Fréchet derivative should be contrasted to the more general Gâteaux derivative which is a generaliz...
 
you guys were still arguing? -.-
@DzekTrek It might take a while to learn the russian alphabet
 
Well it's basically very easy, it's not Chinese alphabet you know. :)
 
@DzekTrek thankfully ;) the chinese alphabet is like 3000+
and thats SIMPLIFIED, the traditional can go up to 15000
 
Just look more carefully en.wikipedia.org/wiki/Russian_alphabet , and try to remember 5 letters a day. That way you will certainly remember them, and will learn it much faster and better.
 
lol wow even handwritting
 
2:53 AM
Yep! :)
 
B = v, I think I'm going to have fun with this XD
I think the best learning strategy would be to get a piece of paper, and test myself by writing the alphabet in order
each time I learn a new letter
 
Of course, definitely do it. That way you will make yourself more experienced. :)
 
sorry I had to go afk for a bit
 
np, but now I have to go afk to sleep :)
see you later @Hoxieboy
 
@DzekTrek k bye :9
woah wrong face
:(
 
3:18 AM
lol
 
what about holy mormon underwear?
 
there's such a thing as a holy mormon?
 
is there such a thing as holy?
 
well, there are a lot of misconceptions about holy mormon underwear
 
3:24 AM
this site tries to set the record straight:
 
> In addition, while mormons believe that masturbation is not an appropriate activity, they learn this in their church classes, not through their underwear.
Must be hard for young males.
 
lol
just because their church classes teach them that doesn't mean they follow those rules
 
Why do they need to learn it in their church class?
I'd imagine one just sort of figures it out himself
 
yeah, that's the problem- they don't want the guys figuring it out themselves :P
 
Perhaps they're not taught to think by themselves.
 
3:30 AM
Is there some kind of de facto "rule" about when to use class or typename in template parameter lists?
e.g. template<typename T1, typename T2> class A; vs. template<class T1, class T2> class A;
 
they're exactly equivalent, except template templates which can only use class
 
@Insilico I always use class because it's shorter to write (or rather, because I was taught that way).
 
I know they're exactly equivalent.
I've always used class to denote that the type must actually be a class type, but that doesn't seem to be universally recognized
I just wondered what others think of it
 
typename T works a lot better than class T
 
@DeadMG: How so?
 
3:39 AM
Is there a difference?
Actually, I know there isn't.
Well, for naming purposes I guess "typename" is always correct.
 
because typename starts with T
 
But T doesn't always start with a T.
 
3:58 AM
struct?
 
no
 
lol just testing you
>.>
 
What a twist!
 
I think you will find that I have strong domain knowledge in the area of C++
 
?
 
4:01 AM
@DeadMG How did you gain this knowledge? From perusing the standard? From StackOverflow? Books?
 
mostly from Stack Overflow
the Standard is way too legalese for normal human consumption
 
I learned lots on SO as well. But mostly from asking questions.
My Q/A rate is nearly 50%.
 
ah
I had a tutor for the first few basics, so I had to ask relatively few objective questions
of course, in fun style, the first class I ever wrote was actually a template, since I happened to ask if the language had that capability as one of my first questions
 
@DeadMG Wow.
 
what? :P
 
4:08 AM
Lol.
 
I came from years of Lua and wasn't a big fan of static types at the time
 
@DeadMG That's not normal :)
 
so parameterizing on them was my next logical step
 
You must be predisposed to C++.
 
as a general concept, of course
there's always FUUU HEADERS
but apart from that, we do make quite a good pair
 
4:09 AM
Hard to avoid headers.
Esp when using templates.
 
yeah
 
Random, what does the MG stand for at the end of your name @DeadMG?
 
I've long forgotten
 
XD
 
Recently I created a proof-of-concept ICP/RPC library to demonstrate at work as a replacement for the current RPC code. It's all nice, but compiling the single source file takes around 22 seconds.
So templates and headers can be nasty.
 
4:11 AM
yeah
that's one of the reasons that I wanted to invent Wide
which I'm going to go back to, after I've taken a short break
LL parsers just aren't powerful enough, and LR parsers just generate the most butt-ugly code I have ever seen, and POD restrictions and Ughâ„¢
so parsing irritates me
 
How far is Wide currently?
 
I have most of the language features specified in my head, and a couple are specified on paper
and I'm still thinking about (some) of the library design
but once I've got that, and solved my irritating parser problem, I should be mostly ready to go
 
Cool.
 
I've been thinking about writing my own parser algorithm and generator
 
Writing your own compiler is a challenge that Steve Yegge once wrote about.
According to him, it's one of the most educative things a programmer can do.
 
4:16 AM
yeah, I've learned quite a lot from the process
 
@DeadMG Actually you should do that. Esp if Bison truly is as bad as you say it is.
 
@StackedCrooked It's not really Bison's fault.
what I need as a parsing algorithm is a mid-point between LR and LL
it's a fundamental property of LR that you can't generate good code from it
and, of course, LL blows
anyway
once I get my fill of DirectX, I'll be all raring to go :P
 
> Gentle, yet insistent executive summary: If you don't know how compilers work, then you don't know how computers work. If you're not 100% sure whether you know how compilers work, then you don't know how they work.
> You have to know you know, you know.
That's quite a statement.
 
lol
hmmm
my interface for my Window class is mostly full of std::function member variables
 
That's good.
Better than virtual methods.
 
4:31 AM
true
hmmm
now I have a question of ownership
the problem is that in my code, the Window class is owned by the caller
 
When I was was working on my xulwin experiment, I found the decorator pattern to be very useful.
 
but of course, the OS or user can request it's destruction at any time
so I'm not sure whether to say that the window is owned by the operating system, or owned by the caller
 
I would think the caller owns it. Can the OS really destroy it bypassing the caller?
 
well, I'm not entirely sure if it can destroy a single window without terminating the whole process
 
Ah, Facebook running "sandboxed" in Safari!
 
4:36 AM
but, of course, if you click the x in the top right corner or some other similar method, then the caller don't really have much choice about destroying the window
 
The caller has all the choice. It might troll you and open 19 more windows.
 
yeah, that's what I figured
so I've chosen to interpret it right now as a request from the OS to close the window and then let the caller handle that as it likes
 
@DeadMG it can
@DeadMG good idea. in Windows that's the WM_CLOSE message. a request
 
@AlfPSteinbach I know that it can send the WM_DESTROY message at any time. But that's different to calling DestroyWindow
 
@DeadMG WM_DESTROY is just a notification that DestroyWindow has been called and that you, window, is among the walking dead
 
4:39 AM
ah, WM_DESTROY and WM_CLOSE, I got your roles mixed up
 
Just about all ways to request "close window" end up as WM_CLOSE, which the window then can honor, or not
 
so more accurately, I should name it OnDestroyRequest, rather than OnDestroy
 
Why not OnClose and OnDestroy? (For WM_CLOSE and WM_DESTROY respectively.)
 
could do
what about WM_QUIT? is that for "You are dead." or "Please consider dying."?
 
would doing both cause an error?
 
Als
4:49 AM
wtf is this downvoted?
7
A: How references are internally stored in c++?

AlsReferences are just aliases internally the compiler treats them same as pointers. But for the user from usage perspective there are several subtle differences. Some of the major differences are: Pointers can be NULL while references cannot.There is nothing called as NULL refere...

 
@Als Because it's wrong.
references are not objects in their own right
conceptually, they do not occupy memory, or even exist
and they are only implemented as pointers when the compiler cannot resolve the lookup statically
 
Als
@DeadMG Well, All u said is correct but I don't see what's wrong in the answer
 
well, what's wrong is that the compiler has absolutely no obligation to even have a representation of references
so stating that they are pointers under the hood is not correct
 
@DeadMG WM_QUIT is just a way to make GetMessage return false/0, and pass a process exit code. After a WM_QUIT the program can just continue, if it wants. For example, sometimes you want to pop up a message box after the main message loop.
 
Als
@DeadMG Well your argument is incorrect too because the standard doesnt mention anything about implementation of references.
 
4:56 AM
Discussing reference implementations is about the same as dicussing vtables. In practice they are there, but in theory it could be done in some other way.
 
@Als Of course it doesn't. But the question asks for internals. And the internal, compiler-specific fact is that references are practically explicitly designed to be optimized out in many cases.
 
Als
@DeadMG That doesn't tell for sure how they are implemented, You can't say anything at all, its just a mere speculation.
 
@Als It is a fact that references do not have to follow the same rules as the rest. It is a fact that in many, if not most, uses, they are optimized out and simply do not exist. That's not speculation.
 

« first day (491 days earlier)      last day (4457 days later) »