« first day (1584 days earlier)      last day (3373 days later) » 

3:00 PM
B can't start its write if A is doing its read
 
@AndyProwl If can if there's no lock held.
 
There is a lock
Did you read the code :v
 
@R.MartinhoFernandes But I'm holding the lock
 
Oh.
Silly me.
Then what's the point?
 
I'd like to get rid of the recursive mutex
but I can't seem to find a way to do that
 
3:01 PM
As is it's essentially an atomic variable.
 
If it were an atomic variable, then the lock would not be held while the event is dispatched
 
You either snapshot or leave the recursive lock vOV
 
Yeah
I'm afraid I can't afford snapshotting here
 
Can you afford other threads waiting during the dispatch though?
 
Yes
 
3:03 PM
Then problem solved
 
Leave the recursive lock?
 
Meh :(
 
I don't get the problem at all. I'll just shut up.
 
Can't have everything
 
3:05 PM
At that stage of messiness, I usually resort to a single manager thread for the 'thing', and queue up requests to it.
 
@CatPlusPlus Common sense, for example, is particular difficult to come by.
 
@R.MartinhoFernandes It might very well be me not being good at this stuff, so if it sounds like nonsense feel free to point it out. It might help me
 
@R.MartinhoFernandes He wants the state to not change during the event, but doesn't want to make a copy for the event handler, but also doesn't want the recursive mutex that's needed for not copying to work (otherwise get_x in the event handler will deadlock)
 
Fuck locks outside queues.
 
Ell
time for sum maths
 
3:09 PM
time to change transformation to use matrices
 
what were you using before? o.O
 
Potatoes
 
@LightnessRacesinOrbit I stored it unpacked
but that has shown to be much less useful
 
user1804599
yummy
 
user1804599
potatoes
 
3:11 PM
@CatPlusPlus Yeah, I don't get the problem. At least one of those "don't wants" is completely arbitrary.
 
Both really, but they're mutually exclusive
(hihi)
 
@BartekBanachewicz Oh you character :D
 
@CatPlusPlus What happened to his shoulders?
 
Boneitis
 
@LightnessRacesinOrbit see the problem is that if for example I'll translate the sprite origin before rotating it, it fucks up everything
 
3:30 PM
@BartekBanachewicz why do you have a data type called Sehe
8
oh wait im guessing this is the polar bear thing
 
user1804599
Pascal is great.
 
user1804599
> I dont know how to convert it, please help. Haha
 
user1804599
Haha
 
@райтфолд how many languages do you know
 
user1804599
None.
 
3:32 PM
How about russian?
 
user1804599
I don't know Russian.
 
user1804599
Only Dutch and English.
 
I know, it was a joke about your username.
 
user1804599
I know.
 
We all know.
 
3:35 PM
@Pris :)
 
@Pris you so smart :/
 
3:46 PM
Koalas are a vulnerable species and may soon become endangered.
 
@sehe Any ideas on how I could work around that limitation?
Say, I want a list of letters separated by either commas or colons. I want the ones preceded by colons to... be different.
I.e., A,B:C,D,E would parse as { A, B, f(C), D, E }
I thought of just making it a list of letters preceded by comma or colons, but the first one (and only the first one) does not have to be preceded by anything.
 
@R.MartinhoFernandes if you want to mirror exact "matched" input, use qi::raw [ a % b]. It exposes a iterator_range and this has automatic transformations to container attributes :)
Otherwise a >> * (b > a) would seem obvious
 
What does * do?
I can only find it as unary in the docs.
 
Kleene star (sorry, missed a >>)
 
3:54 PM
@R.MartinhoFernandes wait, you don't want b to expose attributes all the time, just want to "switch" on it?
 
@sehe Yeah, I guess.
 
@R.MartinhoFernandes Because there's operator& for lookahead, operator! for negative lookahead
 
@BartekBanachewicz Right, that's a noob mistake ;P
 
Ah, that seems way more messier than just making the list by hand.
 
that's why we use matrices and/or quarternions
because it's the only way to maintain a local frame of reference when you're futzing about with rotations
 
3:56 PM
@R.MartinhoFernandes Then there's qi::match to expose a boolean (which you could assign to a qi::local for "action at a distance" in a later subexpression. Slightly related qi::eps(condition
 
@LightnessRacesinOrbit it's not
@LightnessRacesinOrbit the point is that it won't work
 
Oh, qi::local sounds like a good idea.
 
@R.MartinhoFernandes I don't know what { A, B, f(C), D, E } meant, but I think I might have answered a similiar question on SO once. Lemme browse
 
origin information has to be applied after the rotation
 
Alright then you know best
@BartekBanachewicz Yes, I know.
 
3:57 PM
@sehe A vector where C was transformed by a function (because it's preceded by colon).
 
that's why it has to be separate from translation
I am now wondering how to store it though
as another matrix, or as an enum, or vector
 
@BartekBanachewicz As a matrix.
No offence but this is on page 3 of your 3D graphics book
(You don't want to be creating that matrix again on every repaint)
 
user1804599
As a string containing English text.
 
"rotate 84 degrees along X, and 21 degrees along Y, and 3 degrees along Z, in that order, then translate by (3,5,1) metres"
note that you need to store a matrix for the rotation, to get that first part right
otherwise you're going to end up gimbal locking yourself, and long before that your rotation operations will just be meaningless (due to lack of reference frame, as I said before)
consider if you performed the following operations: rotate 90 degrees around X, rotate 90 degrees around Y (or Z; I forget; and it may depend on your [cack]handedness), rotate -90 degrees around X. If accomplished by adding to a vector (rot_x, rot_y, rot_z), what do you get at the end of it?
 
@LightnessRacesinOrbit That's not really a problem
 
4:03 PM
(0,90,0), is the answer, which is not what you want
 
@LightnessRacesinOrbit remember that I'm in 2D world
rotations are vastly easier here
 
@BartekBanachewicz now he tells me
if you're only doing 2D graphics, what's the problem?
 
@LightnessRacesinOrbit everything I said before still stands
 
@BartekBanachewicz for example?
 
@LightnessRacesinOrbit the origin stored as matrix is necessary
 
4:05 PM
@BartekBanachewicz why?
 
@LightnessRacesinOrbit well could probably be just a vector
 
@BartekBanachewicz yes
Is there any problem here other than that you accidentally did translation before rotation-about-self?
 
@LightnessRacesinOrbit I can't get the thing to work for some reason
 
In OP's defense, people shouldn't be migrating stuff to meta if it's painfully obvious that the OP isn't interested in constructive discussion. They don't want their time wasted, neither do we. — BoltClock ♦ 3 mins ago
the title of the question started with Meta -
 
okey
fucking finally
 
4:12 PM
The guy's name is "PublicEnemy".
 
@LightnessRacesinOrbit I suppose there's no downside to using a matrix
 
Now that sounds someone who's interested in a discussion.
 
@EtiennedeMartel Ok yes he's a troll. But questions about the reputation system are much more on topic in meta than SO proper.
 
user1804599
> When you are in school and you ask a bad question, do you get banned from school?
 
user1804599
4:15 PM
that'd be nice
 
0
Q: Meta - Reputation for basic posting

PublicEnemySome people say questions like this should be on meta, but how can I put on meta without 5 reputation? I mean, often some people get down voted for posting something like this on stackoverflow, when it should be on meta. Thanks

he made another one
have fun
 
user image
7
@LightnessRacesinOrbit seems fitting
 
Oh - that moron. Had enough of it an hour ago:
http://meta.stackoverflow.com/questions/286181/community-feedback
@BartekBanachewicz lol, Lightness dodges In Orbit.
 
@BartekBanachewicz lack of frameworks probably means no.
 
Ell
@BartekBanachewicz lol
 
4:23 PM
@thecoshman um, I'm fixing that particular problem right now, you know. Also there are other, like Helm or Lambdacube.
 
@BartekBanachewicz it's a cyclic thing.
 
I should bump up Hate version number and push that version to master actually
 
wait... wrong term
 
@thecoshman um, so
 
@sehe I am using a local now, but it seems to always have the default value.
I thought qi::eps[_a = true] would be enough to initialise it.
Oh wait.
 
4:30 PM
@BartekBanachewicz haha
 
I like this way of adding functionality
 
I misunderstood locals.
 
I'm doing a project, and if I need anything, I just add it
I think I'd like to implement timers now
like "setDelay" and "every"
 
@Borgleader user's deleted now
 
@LightnessRacesinOrbit Which account/s :)
 
4:34 PM
hm now I'm glad I already hierarchized library state
makes it easier to add more things right now
 
@BartekBanachewicz That is a word?
 
Conjunction: that
  1. Introducing a clause that is the subject or object of a verb (such as one involving reported speech), or that is a complement to a previous statement.
  2. Introducing a subordinate clause expressing a reason or cause: because, in that.
  3. (now uncommon) Introducing a subordinate clause expressing an aim, purpose, or goal: so, so that.
  4. 1833, Parley's Magazine, volume 1, page 23:
  5. 2009, Dallas R. Burdette, Biblical Preaching and Teaching (ISBN 1615790853), page 340:
(8 more not shown…)
Adverb: that (not comparable)
  1. (degree) To a given extent or degree.
  2. (degree) To a great extent or degree; very, particularly (in negative constructions).
  3. (obsolete outside dialects) To such an extent; so, such. (in positive constructions).
Noun: that (plural thats)
  1. (philosophy) Something being indicated that is there; one of those.
Wow, what a terrible set of definitions
 
yolo
 
@LightnessRacesinOrbit Ahahahahahaha Bill the shitzard
aw man, the cache update and its just user134123094812304981-203481-20 now
 
> honest people like me and you
 
4:48 PM
@Borgleader Is that PublicEnemy again?
 
Recursive mutex with the coarsest possible granularity ever. Well done Andy.
 
@MartinJames Yep.
Justice has been served.
 
A what
 
@MartinJames Yes, he made a new account with the same name it seems
 
Also gaah why is Linux packaging a mishmash of arcane formats and crappy undocumented tools
How do people maintain entire distributions with this shit
 
5:00 PM
posted on February 16, 2015 by Scott Meyers

O'Reilly has updated the Effective Modern C++ Sample Page to include a new book excerpt. This time it's Item 7: Distinguish between () and {} when creating objects. This is the published version of an Item I originally posted in draft form in a blog post about 11 months ago. Enjoy! Scott

 
What extension would you give to a C++ source file whose sole fate is to be #included into other, auto-generated source files, both .hpp and .cpp?
 
.hpp?
 
Ell
.hpp
 
@LightnessRacesinOrbit Is it also generated?
 
What if I have one that contains declarations and another that contains definitions? For them both to be .hpp is confusing
@R.MartinhoFernandes No
 
5:02 PM
id also use hpp. But then again I name my normal headers *.h so there's a distinction
 
(I think eventually I'll use templates instead but bear with me)
 
how about .inl
glm uses that for inlining
lol where's rightfold at
 
Gee, I really hate this EDSL bullshit.
 
@LightnessRacesinOrbit I'd probably use .hpp for the one with declarations, .inl or .ipp for the one with definitions.
 
@AndyProwl alright thanks
me too
 
5:08 PM
I used .inl before in ogonek, but those were actually generated bits to included in non-generated .cpp/.hpp files instead.
Now I'm changing to just generating the whole .cpp/.hpp at once.
 
This troll is persistent and equally terrible
 
Ell
I just use .hpp or .h++ for any header
Whether generated or not
 
.gen.hpp
 
@AndyProwl Yeah, well.
That's that.
 
5:17 PM
I wonder how many more accounts it'll take before he gets bored
 
by PublicEnemy
 
@sehe is there a way to modify an attribute after it is synthesised?
 
PubicEnemy.
 
Alternatively, how do I convince spirit to pass a local to the attribute's contructor?
 
ahhhhh I'm tearing the living shit out of my entire framework
I hope I can keep my new ideas in my head long enough for this to work
no chance of getting it down on paper, frankly
 
Ell
5:30 PM
Why no
Not?
 
Ugh, this is a rather ugly hack, but it works :|
 
@Ell I don't know
I should do really
design first, code later and all that
but feel like I can't get my head around it unless I do it in terms of code changes
I'm doing it wrong
 
Ell
just write down what's in your head at least
 
How do you guys usually design stuff? UML?
 
lol no
 
5:36 PM
I mostly use something that looks like UML for quick sketches and for communication
 
design's the hard part... for implementing stuff, you just ask on SO :]
 
Only a few diagrams for documentation purposes
But I never start with a UML diagram
 
Ell
I draw sequence diagrams sometimes
 
I like flow diagrams
 
user1804599
@Pris It depends on what I design.
 
5:42 PM
hey folks
whats up?
 
@Nooble Your Friend's here, come say hello
 
lol why don't you say me hello? @AndyProwl
 
@Mysticial do you know a way to divide a 64-bit signed integer by a 32-bit signed integer without using 64-bit instructions?
 
@R.MartinhoFernandes sure. With semantic actions everything is possible
I was still gonna find that answer I recalled. In the man time I've gone home and gone to orchestra rehearsal with the kids
I'm a bad planner
 
Had a wisdom tooth removed today
It's so shit
 
5:54 PM
did you get knocked out?
 
@sehe AFAICT _val is not populated yet when the actions run.
 
It is
Muhahaha I'm so bad at UI
it took me minutes to find a search box in both the SE app and mobile site
 
@sehe I have a semantic action to multiply a field in it by two, and the field's value seems always to be the initialisation value.
 
@Pris Well, what did you expect? Getting punched hard enough to shake your wisdom tooth out would almost guarantee a knock out punch.
Hehe.
@YourFriend Hey there :)
 
user1804599
Should I optimise while true { } to just destroy the current fiber?
 
6:06 PM
I meant being put under... was the only pleasant part I remember about getting my wisdom teeth out. After that bit I remember having a reaction to the pain killers they gave me and vomiting several times... acidic stomach content over freshly ripped open gums is always a good time.
 
@AndyProwl How dare he impersonate the king!?
 
@R.MartinhoFernandes On x86, the normal 32-bit divide takes a 64-bit input in EDX:EAX and divides that by a specified 32-bit input. Be aware, however, that it produces only a 32-bit output so if the divisor is small enough that the result won't fit in 32 bits, it'll overflow.
 
@R.MartinhoFernandes sounds very much like your semantic action supposed automatic attribute propagation as documented. Use %= to assign the rule whole keeping automatic attribute propagation
And urffh the mobile main site is potentially wise than mobile chat experience. Found this which is slightly related though not what I was looking for:
3
A: parsing a simple repeated text macro with Boost.spirit

seheFully working demo: live on Coliru What this adds over a naive approach is that raw values are optionally ended at ] if the state is in_group. I elected pass the state using an inherited attribute (bool). This implementation allows nested sub-groups as well, e.g.: "[w1/[w2/w3]2/w4]3" #defin...

 
user1804599
lol LLVM generates different code for !!(x & 1) and x % 2 == 0 where x is an integer.
 
Xeo
hoooome
 
6:14 PM
Lol at that comment thread at the other answer there:
Thank you! I like it too. I should upvote that too. Oh wait :/ Cheers — sehe Aug 23 '13 at 9:54
 
Ell
has anyone used mathjax before here?
 
@JerryCoffin Ah, yeah. I'm interested in SIMD, though.
 
No one ever
 
user1804599
@Ell Yes.
 
user1804599
It works very well.
 
6:18 PM
Why would you ever use a double bang? Like (!!(x&1))
 
Ell
I want to know how to give it a string of latex and get back an element that I can insert under a div
 
user1804599
to convert to a Boolean
 
user1804599
it's shorter than static_cast<bool>
 
Ell
I'm not sure if I can do that though. It looks like it always scans elements and replaces their contents with the typeset maths
 
@Pris but don't. It's effectively lazy code and obfuscation
Not too mention it misbehaves with overloaded operators.
 
user1804599
6:19 PM
Use !!~~ instead.
 
Much betterer
 
@райтфолд Fill a bug report.
 
afternoon
 
user1804599
@wilx Why?
 
@JerryCoffin I should have been clearer (blame my boss :P). I need to divide four 64-bit dividends by four 32-bit divisors.
 
6:22 PM
@райтфолд If you think it is wrong?
 
user1804599
It's perfectly fine.
 
@райтфолд What source language?
and also is x signed or unsigned?
 
user1804599
C++.
 
Xeo
@райтфолд Is the code equivalent in terms of the number of operations?
 
user1804599
6:27 PM
@Xeo It's completely equivalent except one does checks equality with 1 and the other one checks inequality with 0.
 
@райтфолд That's not necessarily true if x is signed.
also from memory, some ISAs have special instructions for comparison to zero.
 
@R.MartinhoFernandes I believe all the SSE/SSE2/AVX division instructions are floating point operations. If your 64-bit integers have 53 or fewer significant bits, you could use floating point division. If you don't want that, you could (theoretically) compose your own division out of more basic blocks, but even doing 4 items in parallel, I'm pretty sure it'd end up slower than normal 32-bit DIV/IDIV instructions.
 
@JerryCoffin Yeah, I feared that.
 
@JerryCoffin There are integer SSE ops, but I don't believe they support mismatched sizes.
 
user3010322
6:37 PM
There were new integral add instructions gievn for the next level of AVX.
 
user3010322
But they're for like 128 bit numbers.
 
@Puppy Almost none for integer division.
 
@Puppy There are integer SSE ops,but not integer division.
 
ah, division specifically
I somewhat glossed over that part
 
user3010322
Isn't division like the hardest thing to implement in hardware?
 
user3010322
6:39 PM
I know there's mul and add and substract for SSE, but I never actually thought about division SSE...
 
user3010322
Hey there's integer division (for not-64-bit-stuff): stackoverflow.com/questions/16822757/sse-integer-division
 
You just gotta stop dividing things
 
@ThePhD Of the four basics (add, subtract, multiply, divide), yes, division is almost certainly the most difficult. OTOH, it's a lot simpler than some of the things the x87 included (sine, cosine, arc-tangent, etc.)
 
Divide and conquer.
 
0
Q: "Naming" template class instantiations

KazadeIn my game engine, I've created a pretty funky component-based entity system which allows me to define entity types as a combination of components, specified as template arguments, e.g: typedef Entity<Locateable, Collidable, Renderable /* etc */ > SomeEntity; This works fine, until I need to u...

lol
 
6:41 PM
@ThePhD That's not really integer division--it's stuffing integers into floating point numbers, then doing floating point division.
In theory, it could support inputs larger than 32 bits (up to 53 bits, to be exact).
 
As so often you're so cryptic. — πάντα ῥεῖ 21 secs ago
 
user1804599
Time to implement garbage collection.
 
@Puppy The use of "pointlessly" kinda betrays your point of view.
 
user1804599
Glad I haven't implemented pinning yet.
 
it wasn't intended to be a secret
 
6:55 PM
Also, no, the point of ECS is to avoid ridiculously deep class hierarchies.
Replace inheritance with composition, you know.
 
user1804599
And the point of your mother is to prevent world hunger from disappearing.
 
user1804599
I don't know how to implement pinning though.
 
user1804599
Good thing I don't have to implement it yet.
 
user1804599
I could move objects to a separate heap before pinning them.
 
Ell
I don't really see the point of ECS
 
6:58 PM
@EtiennedeMartel I'm totally for that. I just don't see how regular member variables don't qualify as composition.
 
Ell
I can't think of any ridiculously deep class hierarchies
 
@Ell Gamedevs.
 
user3010322
@Ell Take one look at the Unreal class tree.
 
@Puppy Because then you can't really be data driven.
 
Ell
idk what data driven means either
I've never seen any game code bases though so vOv
 
6:59 PM
@EtiennedeMartel Sure you can. The data is expressed right there in your source code. In fact, I don't really see how that guy's design permits any kind of data driving.
 

« first day (1584 days earlier)      last day (3373 days later) »