« first day (329 days earlier)      last day (4620 days later) » 

8:00 PM
So your angle variable is 0. What happens when you move forward?
Does it go to the right or not?
 
if i move forward it will go up in a straight line
it won't go to the right..
or the direction it is facing
 
@LewsTherin Then you have to swap sin and cos in your simple formula and try again.
 
So I just keep guessing? That's exactly what I want to avoid...I mean why the swap?
Sometimes it needs both cos and sin to be negative to work..why ? :S
 
Paste the formulas verbatim here, please. You never showed the code.
@LewsTherin Depends on your orientation of the Y axis. Does it go up or down?
 
8:03 PM
Slightly drunk IT guy I know thinks that if you can get access to an encrypted data stream, you will be able to crack it within a year
 
@FredOverflow it grows down
 
@KianMayne He could probably do it faster if he weren't intoxicated.
 
the commented formula is when the angle of the bitmap is 0 degrees but it is looking up at 90 degrees
but the ship heading is looking up*
 
@FredOverflow Haha I convinced him with the fact that single use codes would be used therefore even if you managed to crack it within a day
The encryption key would have changed
 
@LewsTherin If angle is 0, then sin(angle) is 0, so the ship cannot possible go up. Something I don't understand yet is wrong.
 
8:05 PM
Damn, totally forgot about move-only objects in my LRU cache. And the interesting part is that I'm going to need it mostly for move-only objects.
 
and you'd be too late
 
Als
lately, lot of my answers were being downvoted without any valid reasons and so i flagged one such answer for moderator attention and this is the reply that i get:
4
A: sizeof() applied to structure and variable

AlsBoth will and should indeed return the same value. From MSDN: The sizeof Operator The sizeof operator gives the amount of storage, in bytes, required to store an object of the type of the operand. This operator allows you to avoid specifying machine-dependent data sizes in your programs. siz...

 
@Als What were we expecting?
 
@LewsTherin What exactly do you mean by "the angle of the bitmap is 0 degrees but it is looking up at 90 degrees", I don't understand that.
What does it mean for a bitmap to "look up"?
 
The bitmap is looking at 0 degrees...but the way I draw the ship the point is facing up at 90 degrees
 
Als
8:07 PM
@RMartinhoFernandes: I was expecting, that if most people do the same(flag unreasoned downvotes) then the moderators will be forced to bring this up on meta or wherever it matters.
 
@FredOverflow when I corrected the ship to point the same angle as 0 degrees...then the formula changed again to the one that is uncommented
 
@Als Lasse is right. Mods can't do a thing about that. It's sad, but true.
 
@LewsTherin Can't you just orient all bitmaps in the same way, so they "look" to the right initially?
 
Als
@RMartinhoFernandes: Mods need to push for better reforms over downovting then, that was the intent
I know a mod cannot detect who downvoted, I aint that dumb as the mod commenting there might suggest
but being a mod they should have a moral responsibility to look up to where the real problems are.
 
@FredOverflow Yep, I can..that's why I changed it..but what If I made the bitmap and ship to look up at 90degrees initially
how do I derive the new formula?
 
8:10 PM
You can use the same formula, but instead of (angle), you use (angle - initial_orientation)?
 
You know what would happen if most people flagged unexplained downvotes? Mods would be flooded with those flags.
 
-90? I'm not sure that works...
Or what is initial_orientation
 
Or maybe that would be + instead of -, just experiment a bit ;)
 
Ah yeah..will try that now ..will see :P lol
 
@LewsTherin Let us know how that worked out for you.
 
8:14 PM
yeah, please give me a few ;)
 
Als
@RMartinhoFernandes: And then they will have to push for some reform
Or do you think the reform just happens on its on, especially on SO?
 
sin^2x + cos^2x == 1 ???
 
@LewsTherin still compiling? :)
Compiling
2
 
@Als No, they would probably shut up all the whiners.
 
yeah it is compiling but the when I changed the angle at 90 degrees it is looking at 0
 
8:15 PM
@JohannesSchaublitb Is that news to you?
 
Als
@RMartinhoFernandes: How many can they shut?
 
that doesnt make sense..it should be at 64 degrees
 
Als
I mean this is pathetic actually.
 
@FredOverflow i guess I heard it some day
lol
 
@LewsTherin Just normalize your bitmaps so that all face in the same direction, for example "up", and all your problems go away.
 
8:17 PM
@Als The best way to get a reform is not through pissing people off. Identify a problem, make it clear, think of a solution and present.
 
I don't see the advantage in allowing different facings.
 
If you go through the "piss them off to the point they can't stand it any longer" path, you will likely get burned instead of seeing a reform.
 
@JohannesSchaublitb It makes total sense once you realize that all points (cos(a), sin(a)) lie on the unit circle.
 
Als
@RMartinhoFernandes: Problem is already identified and solutions are only picked by So honchos so I don;t see how you go about it in any other way.
 
@Lews And If you want to start a bitmap with a different angle in the game, just set angle to the appropriate value.
 
8:18 PM
And what is the problem? People?
 
nope formula didn't work
 
Those formulas have worked for ages in all kinds of games. Something in your design is wrong, you are overcomplicating things.
 
Ah I'm confused
 
Als
@RMartinhoFernandes: Problem is people are not required to justify their downvotes
 
Ok..allegro units is 256/360 * angle in degrees
 
8:20 PM
is it actually defined that sin(x) has to use unit circle?
 
@Als Well, that is not going to change. That has been established several times before. :(
 
oh wait, NVM! im thinking bullshit
 
@JohannesSchaublitb What else would it use?
 
so since the triangle drawing on the bitmap is facing right at 0 degrees
if i rotate at 90 degrees it should look up yes?
 
Depends on the coordinate system. If y goes down, then no, it should look down.
 
8:21 PM
the way it is facing in the picture above ^^
You are right it looks down..but how...
how does y axis affect the degree
 
as opposed to:
 
I think it does..so 270 is up then
 
270 or -90, yes
 
That clears some stuff up
yep -90 works
and 270 :D
wow it is crazy that such a little twist can affect that much
 
Most graphic libraries allow you to specify whether Y should go up or down. For example, OpenGL allows that. Not sure about allegro, never used that.
> It's the little things that kill.
 
8:25 PM
I am not sure if it does will check to see if it can
 
haha 90s Grunge
 
im more of a m&s person xD
 
math&sex?
 
ha ha I wish lol :P
Mumfords & Sons
folk and all that
 
> it's about ecstasy, heroin does not tear at your brain and is rarely in little pink pill form.
 
8:27 PM
@LewsTherin What is that, cigarettes?
 
How stupid.
 
@FredOverflow very funny xD
 
> hey dumbasses its the little things that kill nothing about a little pink pill
 
but no like the best band ever
so to try the formula let me try and get it
 
Als
@JohannesSchaublitb: I didn't knew types can have static members object of the same type.
What would be the use of such an construct? rather how can it be put to use, an example?
 
8:29 PM
will sin be used to find y or cos be used to find x?
 
@Als Maintaining a singleton instance!
:)
 
@Als i've seen types like struct String { static const String empty; };
which is useful if String is reference counted
 
Als
@RMartinhoFernandes: But that is a pointer or reference to the type not object of the type.
 
@FredOverflow Jesus... the normal formula actually works!
 
or struct Range { static const Range invalid; };
 
8:30 PM
lol random and meaningless video, what's with the cheerleaders? :)
 
@Als Things like class vector3d { static const vector3d origin; static const vector3d x; static const vector3d y; static const vector3d z; };
 
@LewsTherin It does? Cool.
 
@Als consider my favourite example: struct A { static A lulz; } A::lulz;
 
@FredOverflow yeah with that angle..but to move down the both sin and cos must be negative ....
 
Als
@JohannesSchaublitb: how does the first example work practically, what is the empty string for
 
8:31 PM
for using empty strings
 
Als
@RMartinhoFernandes: ah..right..seen that somewhere sometime...
 
lol
so that you can share the same string object for all empty strings for example
 
Als
@JohannesSchaublitb: Hmm..example pls....I do not understand half of the things you usually say lol
 
and don't need to create new string objects everytime again
 
8:32 PM
@LewsTherin Just don't lose too much sleep over the positive/negative thing. It's one of those mysteries that simply cannot be explained ;)
 
Als
@JohannesSchaublitb: Ah, Excellent example, like a placeholder string
 
Als
@JohannesSchaublitb: nice, thanks :)
 
@FredOverflow I'll try not too...maybe you are right...its like having a bad OCD or something
 
Als
godamn why do people hate me so much there were 3-4 wrong answers there but they hit me hard....never see the same rush to upvote my answers eh...
 
8:34 PM
@FredOverflow have you ever worked with shaders ? or some cool lighting effects
 
@LewsTherin I have a book on shaders, but I never tried the stuff. My graphics card didn't support shaders back then, and now I'm simply not too interested in shaders anymore.
But I did the obligatory particle engine with blending ;)
 
Als
People downvote for any reason they can think of, including that their dog is barking a Mod says that @RMartinhoFernandes
but they would not want to do anything to change that.
 
@Als There's nothing workable that you can do for that.
 
@FredOverflow that sounds pretty cool...I'd love to have some lovely effects for a game..the only thing that draws me to game programming...
But when I watch videos on Shaders on youtube all I see is blobs
 
What is a blob?
 
Als
8:37 PM
@RMartinhoFernandes: I am not saying Mod can and they are not doing it but Something atleast needs to be done?
 
@Als Yeah, but what?
 
Als
BLOB- Binary Large Object
 
i bet some of the boosters do those template heavy libs so at work they can say "code is compiling" :)
 
A blob is a metaball.
Metaballs are, in computer graphics, organic-looking n-dimensional objects. The technique for rendering metaballs was invented by Jim Blinn in the early 1980s. Each metaball is defined as a function in n-dimensions (i.e. for three dimensions, f(x,y,z); three-dimensional metaballs tend to be most common, with two-dimensional implementations as well). A thresholding value is also chosen, to define a solid volume. Then, :\sum_{i=0}^n \mbox{metaball}_i(x,y,z) \leq \mbox{threshold} represents whether the volume enclosed by the surface defined by n metaballs is filled at (x,y,z) or not. A ...
 
For my OTP generator, I need a dictionary with LOTS of words in
 
Als
8:38 PM
@RMartinhoFernandes: you got parse error with that?
 
@FredOverflow lool
http://www.youtube.com/watch?v=5pCvF_BTseA
 
That's quite impressive.
 
some crap like that...
youtube.com/watch?v=Pm_gg7geX_c I want to create effects like those
like the blinking text
at 0.27
or from 1:27
 
Als
@RMartinhoFernandes: see this one....
 
8:39 PM
it looks so damn cool
 
Als
1
A: single virtual inheritance

AlsVirtual Inheritance was basically introduced to solve the classical problem of Diamond shaped Inheritance. Consider, the following classes: class Base {}; class Derived1: Base {}; class Derived2: Base {}; struct MostDerived: Derived1, Derived2 {}; MostDerived class here has 2 instance of Ba...

 
wish I was smart
 
Als
Yup I an rep-whoring :P
 
Sorry, I'm too busy to upvote answers :P
I'm currently swimming.
 
Als
haha
 
8:41 PM
@FredOverflow
http://www.youtube.com/watch?v=Pm_gg7geX_c
start to watch from 1:27 i don't think he uses shaders
 
Through a sea of template errors.
 
Als
damn.....@RMartinhoFernandes, you should its a good one
damn now i would have to sell my own answers it seems
 
@LewsTherin Of course it doesn't use shaders, that game is from freaking 1983!
 
Als
:P
 
@Als I promise I'll look at it later :)
I don't upvote answers without reading them. On principle.
 
8:42 PM
@FredOverflow wow that looks so real
 
ha ha yeah vector graphics rofl...how do I create that effects...additive blending?
look at 2:23! wow
 
Als
@RMartinhoFernandes: Nah, i m kidding you don't need to upvote, i was just happy with myself for answering that.
 
but it's too honest. real water is more like "wuuush"
 
I'm not sure what "effects" you are referring to, I already have a headache from watching that video.
 
Real water is wet, isn't it?
 
8:43 PM
the "glowing" or "pulsing" effect...really? can't stop watching it
 
@JohannesSchaublitb Right, maybe you should invent the "wooshy shader" ;)
 
lulz
my friend is a sunrise avenue fan
they're finnish
 
Ok, I have a move-only automatic object. I need to capture and return it from a lambda. How do you I do that?
 
not possible to move-capture
 
So, I need to write a specialized function object for that?
 
8:50 PM
 
yay, I'm back
 
i'm back too
 
woo
 
so no one came up with any sure-fire solutions to my problem while I were away, I guess?
 
8:51 PM
I donno, I haven't come up with one...
 
@jalf what problem?
 
aren't memory barriers fairly efficient?
I mean, I know they have overhead,
 
@TonyTheTiger depends on what you compare them to. They have to lock the memory bus, and wait until all pending writes have been flushed
 
OK guys
I have to head
thanks a lot dudes
 
I'm using mem barriers now, but trying to find a more efficient solution
@FredOverflow A portable standard way to issue a read from a specific memory address. I don't need the returned value for anything, I just need the load instruction to take place :)
 
8:54 PM
oh I see
 
@jalf prefetching?
 
so I guess the problem is that just a load which is not used might be optimized away by the compiler...
 
@FredOverflow no, to prevent instruction reordering. Basically a more specialized memory barrier
@TonyTheTiger yeah exactly
 
Couldn't you just cast to volatile or something?
Or does the C++ memory model not offer the same volatile guarantees as the Java memory model?
 
@FredOverflow that was my original idea, but the consensus here was that because the object being pointed to isn't actually constructed as volatile, the compiler may ignore the volatile qualifier, and so it can optimize out the read
 
8:57 PM
hmmm post a question on SO
 
Are you implementing a lock-free algorithm or something? :)
 
@FredOverflow yeah, pretty much
trying to synchronize some operations in my STM lib as efficiently as possible
I have one thread updating a timestamp, and then reading a counter, and another thread incrementing the counter and then reading the timestamp. And it's pretty important that these two instructions aren't reordered with respect to each others. The first thread must be as efficient as I can make it. The second thread is less important
 
which is the one that should be more efficient?
 
well, it hardly matters. One thread writes to x, then reads from y, the other thread writes to y and then reads from x
So I guess it's symmetric enough that it doesn't matter which of the threads is made efficient
 
Opinions on twofish
?
 
9:02 PM
but it's ok for one of the threads to do more work, if it can speed up the other
two fish or not two fish
that is the question
 
@jalf You're building your own transactional memory system? Cool.
 
@FredOverflow didn't you know? I've rambled about it here a million times ;)
 
I must have missed it, my mind is too occupied with type classes.
 
hehe
but yeah, I am. The basics work fine already, although still trying to optimize where possible.
do you know haskell's STM?
 
Do you have a practical application for your STM system?
@jalf No, I'm still at the basic Monad stage ;)
 
9:05 PM
ah
well, I'm currently stuck trying to efficiently implement a few extra features inspired by Haskell's implementation
retry and orelse
 
But I guess you could ask @Johannes about most things concerning Haskell and get a reasonable answer.
 
@jalf :|
 
I've had a primitive implementation of those forever, but they really suck in terms of performance.
@FredOverflow Not really. Just "replace all locks", I guess. I'd love to have a more specific use case I could try it out in though
@FredOverflow don't suppose you have any suggestions? ;)
 
4
Q: List of C++ name resolution (and overloading) rules

knm241Where I can find a list of the rules that a C++ compliant compiler must apply in order to perform names resolution (including overloading)? I'd like something like a natural-language algorithm or flow chart. C++ standard of course has this set of rules but it is build up as new language stateme...

hmmm
 
@jalf There was this Channel9 video where they posed the challenge of writing an operating system that was based on STM. How about that? ;)
 
9:12 PM
sounds like a challenge
 
@FredOverflow hah, I think I'll start with my plain user-mode C++ implementation. ;)
 
@TonyTheTiger I'm glad with my copy of the Josuttis-Vandevoorde book :)
 
@RMartinhoFernandes Heheh indeed
 
then maybe we can get a STM lib into the standard. And then, I'll take over the world. And write an OS ;)
 
Why is it always about taking over the world?
The world sucks.
 
9:15 PM
@RMartinhoFernandes well, somebody needs to fix it then
 
And you want that task?
 
Is it currently computationally infeasible to crack AES-256?
 
That's commendable.
 
@RMartinhoFernandes well, if I can get finish my lib and then get STM into the standard, I think I'd be capable of practically anything
 
Personally, I'd rather stick with "try to make it a better place". I'll leave "fix it" for the fools and the godlike.
2 hours ago, by Kian Mayne
Is it possible to crack AES encryption within a reasonable amount of time
 
9:24 PM
@RMartinhoFernandes TMAI I've just gone in circles looking up encryption algorithms
 
@FredOverflow no im haskell noob
 
Federer again lost in us open against djkovic :(
 
You're talking about some sport?
 
@RMartinhoFernandes yes , who doesn't knows Roger Federer , i hope you watch tennis
 
No, I don't watch tennis.
 
Als
9:35 PM
hmm
 
i very like playing tennis , and i am superstar in tennis in our local
:)
 
Als
I got downvoted again without any reason
 
What else is new? ;)
 
Als
:( And the answer i felt happy answering
 
@MrAnubis Ah, no tennis court around here. And I guess I'd suck at it.
 
9:37 PM
do you want me to upvote your answer?
 
I'm very clumsy. Part of the package.
 
Als
@MrAnubis: Not for the sake of it.
I think I am going to stop posting answers.
 
That's sad :(
 
Als
Not that I was a huge contributor anyways, but I guess its just too much of an overhead for me
I post, get downvoted without reasons and then i feel bad about it
i think i can do without all that trouble.
 
eh, don't worry about that. Plenty of stupid people who'll downvote things for no reason
 
9:40 PM
@Als What? I think your 22k+ Internet dollars disagree that you weren't a huge contributor.
 
since you get 5 times as much rep from upvotes as you lose to a downvote, it usually works out in your favor anyway
 
@Als : newbie's like us really need help all the time , so you should keep answering to help us
 
Als
@jalf: I don;t mind justified downvotes really, but unreasonable ones hurt especially if u feel u have answered something pretty well.
@RMartinhoFernandes: :( You know i have been cribbing about the unreasonable downvoting for some time now, I guess it just gets over me
 
@Als Look at it the other way. Unreasonable downvotes can be ignored. That's just people showing their ignorance. Justified downvotes sting because they show that you were wrong about something ;)
 
Als
@MrAnubis: Thanks, actually you will never be short of peeps helping out here, no one is indespensible in this setup
 
9:43 PM
I am!
Who else would know what everyone ever said around here?
Next time you need a quote from someone to use against them, don't ask me.
:P
 
@Als what does peeps means?
 
Als
@jalf: Being wrong and learning something from it helps but just no explanations help no one.
 
Als
@RMartinhoFernandes: Naah you are the official keeper :)
 
You need to learn to "not give a fuck".
2
(Not talking about girls here.)
 
Als
9:45 PM
@RMartinhoFernandes: :) Yeah, I think i need to stop a bit and take a pause, get over this whole stupid thing
rather read something useful and keep myself updated
I will be here though.
 
Ok, so, apparently, I don't understand this rvalue ref thing as well as I thought. I need help!
 
Something's not quite right here: ideone.com/MgWXn.
 
@JohannesSchaublitb Do type classes describe types or type constructors?
 
9:50 PM
ive no idea im soo sorry :(
i only know about "* -> *" thingy
I think the "*" is called "kind"
 
Yes that's kinds.
 
a "* -> *" is a function
 
@JohannesSchaublitb No, that's the kind of a type constructor.
 
A function is a -> b.
 
9:51 PM
Maybe
xD
 
@FredOverflow You can have type class instances for types and for type constructors.
 
is "*" a type class?
 
No, it's the kind of types.
 
In class Functor f where, f is a type constructor, right?
 
9:53 PM
ah that thing
 
@FredOverflow Yes.
 
What would be an example of a type class describing a type? Numeric?
 
class Maybe X where ...
 
Yes, class Num t for example.
 
and then X can be Int for example
 
9:53 PM
There's no standard class Maybe.
 
@JohannesSchaublitb Maybe is a type constructor, not a type class.
 
data Maybe a = Just a | Nothing
 
@Fred where did you get the idea that @JohannesSchaub knew about this thing? Or he trying to pulling our collective legs?
;)
 
9:55 PM
I honestly have no idea about this :(
 
Is Maybe an instance of Functor, or is Maybe t an instance of Functor t? Or both? Or neither?
 
@RMartinhoFernandes we met up in #haskell some time ago...
 
@JohannesSchaublitb Strange, I always thought you were a Haskell guy.
 
I guess he has been thinking I'm lurking there all time
 
@FredOverflow instance Functor Maybe where ....
 
9:55 PM
haha I tricked you xD
 
So, Maybe is an instance of Functor.
 
@RMartinhoFernandes I'm still not sure about Johannes :)
 

« first day (329 days earlier)      last day (4620 days later) »