« first day (521 days earlier)      last day (4432 days later) » 

12:00 AM
@RMartinhoFernandes Whoops.
 
> Proofreading properly is somehow psychologically impossible until it's been submitted.
Almos ten minutes and no answers yet? ELU.SE sucks.
 
@RMartinhoFernandes I wouldn't be surprised if most ELU users lived in uncommon time zones.
 
What's an "uncommon time zone"?
UTC +8:45?
UTC+08:45 is an identifier for a time offset from UTC of +08:45. UTC+08:45 is used as a time in Australia (Central Western Time, or CWT). It is used by some roadhouses along the Eyre Highway in Western Australia and South Australia. Although it is no longer an official, government mandated timezone, the boundaries where it commences and ends are clearly defined and are usually shown on road maps of the area. UTC+08:45 is used in 5 places in Australia, including Border Village, Caiguna, Eucla, Madura and Mundrabilla. See also *UTC+09:45 External links *[http://www.timegenie.com/utc.ti...
I doubt many ELU users live there.
 
There is a useful answer now, in any case.
 
I agree with the comment more.
 
12:20 AM
> The use of 'be' rather than 'have' to form the perfect of some intransitive verbs ("I am come", "I am become" etc) is archaic in Modern English, and used only for special effects.
lol
 
@FredOverflow what, like, cool lasors?
 
See, told you.
It's all about the ominousity.
Something.
 
bloody hell
 
Who set that topic?
 
am I the only one who can see the similarities between templates and virtual functions?
it's like, goddamn obvious
Alf
 
12:24 AM
uh, my chrome horizontal scroll bar scrolled with the winow when I scroll vertically.
 
@DeadMG It is?
Humble me.
 
well
in one, you program to a pre-defined interface, with implementation details hidden to you, and in the other, you program to a pre-defined interface, with implementation details hidden.
 
Unless it's something so obvious I didn't even consider it as something interesting.
@DeadMG Oh, that.
 
@DeadMG I think that applies to every function doesn't it?
 
Yes, I'm sure people noticed. That's one of the reasons for concepts.
 
12:26 AM
I know, right?
 
anyone good at solving constraints?
 
but apparently, this POV is utterly radical on Programmers
 
So, what led you to think you were the only one?
 
"also true that std::vector isn't object oriented at all (in fact, Alexander Stepanov may not directly criticize OO, but makes very clear that he never uses OO-like things such as inheritance or virtual functions)" from Jerry Coffin, who I usually consider educated in such matters
I have another recent answer/comment thread where I espouse this opinion and get a billion disbelievers
let me see if I can find i
aah, most of it got censored thanks to that prick SK-logic
 
@DeadMG You're a misunderstood genius.
No wait, not quite that one.
NO! NO! I won't fool myself into searching for the right trope.
That was a close one.
Pretend it's the right trope.
 
12:36 AM
is there a way to pass into C++ a set of equations and have it return a number of valid solutions?
 
lol
 
equations containing conditionals
 
@JohnSmith many ways. all require a lot of programming though. it depends on your equations and what kind of solutions you want. e.g., is it simply n linear equations in n unknowns?
@JohnSmith for conditionals it might help (or not) to check out the simplex method, invented during or after WWII I think.
 
It's a few equations that look like [(if a>1, 1,0) + (if a>2,1,0) +... if (f>5, 1,0)] > 18
yeah I am aware of simplex method but I only have experience with excel Solver
i dont know how to have it quickly count solutions in C++ etc
 
I think you can reduce that to 2^6 = 64 equations
 
12:42 AM
@JohnSmith I've never seen an equation like that before I don't think outside of excel
 
well remember my dice question i had uyesterday?
 
@JohnSmith are you trying to program the combin equation?
 
how about defining aVal = (a > 1? 1 : 0) and so on
 
I am trying to count number of sets of nontransitive dice
in a non-naive fashion
 
12:43 AM
then "aVal + bVal + ... + fVal > 18"
 
i have a brute force program for verification but it will fail for high N
i need a better method for high N
nontransitive dice are such that dice B beats A, C beats B, and A beats C, like rock paper scissors
(on average)
so for instance
 
@JohnSmith that would be (N-1)(N/2) relations wouldn't it? That's a lot real fast
 
112555 122366 144444 (A<B<C<A)
112555 122367 134444 (A<B<C<A)
112555 122367 144444 (A<B<C<A)
112555 122377 134444 (A<B<C<A)
112555 122377 144444 (A<B<C<A)
112555 123366 144444 (A<B<C<A)
112555 123367 144444 (A<B<C<A)
112555 123377 144444 (A<B<C<A)
112555 133366 144444 (A<B<C<A)
112555 133367 144444 (A<B<C<A)
112555 133377 144444 (A<B<C<A)

11 possible valid sets of dice
but when the faces go up to 30 it's going to be infeasible
 
lol
 
12:45 AM
Isn't the total number infinite?
 
This is the problem I am working on
 
Grab any given set and multiply the faces by n.
 
you'll see what I mean
 
lol
 
12:47 AM
What something like this?
 
for three dice that can have face values all the way up to N for each side, there are many ways to have valid nontransitive sets
but counting them brute-force would take forever
 
@JohnSmith I'm still trying to figure out how this becomes a set of equations with solutions :/
 
because say I take an arbitrary die for my A
I can write constraints for what B and C can be
 
based on the equation for comparing whether B die beats A die etc
ok nevermind guys
 
12:50 AM
@JohnSmith oh good, you still make no sense to me, and I'm becoming more and more interested in helping :/
nevermind means I can go home now
 
@MooingDuck P(A beating B) > 0.5, P(A beating C) > 0.5, P(C beating A) > 0.5.
 
@RMartinhoFernandes but that should be true for any N yes?
 
@RMartinhoFernandes any odd N?
 
Proof: Make A and B the same dice.
The difficulty is in counting the solutions without computing them.
 
12:51 AM
@RMartinhoFernandes ah, that too.
@RMartinhoFernandes combin isn't it?
 
right
The equation for comparing two dice typically involves analyzing counts of faces against what they're larger than
 
N!/(N-R)!
 
but calculating every possibility brute-force is going to take forever
there is a way to count solutions without needing to calculate what they are
and that involves some sort of mathematical constraint or equation
I have N=7 solutions printed out from my brute force program and am trying to find a better way to count them
For instance B=[2 2 2 5 5 5] beats A= [1 4 4 4 4 4] because half the time I roll a 2 which only beats A when they roll a 1, and the other half of the time I roll a 5 and beat A no matter what, thus 1/2*1/6 + 1/2*6/6 = 7/12
 
@JohnSmith so given B you're trying to calculate the odds of rolling higher on average than A?
and that's on a five sided die?
 
@MooingDuck Nope, the odds is not the goal. The goal is the total number of dice sets where the odds are > 0.5.
 
12:56 AM
well I don't know; right now I am wondering if the best I can do is a (idk the right term here but) O(N) algorithm where i iterate through all possible dice for A and then based on A determine how many B's and C's I could make
 
It doesn't matter if those odds are 0.6 or 0.7.
 
@RMartinhoFernandes oh. Yeah, that's totally calculable
 
generating the sets in C++ is trivially fast; the problem is the iterating/counting
even for N=30 the size of the dice array is only in the magnitude of low-millions
 
@RMartinhoFernandes calculating the number of dice sets should be trivial. Calculating the number where odds are exactly .5 shouldn't be tricky, and then half of what's left?
 
12:59 AM
1623160 possible dice arrangement for N=30
 
How do you know that half of them have >0.5 odds?
 
@JohnSmith still five sided die?
 
it's calculating the number of sets such that you have a chain of victories (i.e. greater than >.5 prob)
 
The problem says six-sided.
 
6 sided dice at all times
3 dice, 6 sides
but the numbers on the sides can go from 1 to N
 
1:00 AM
@RMartinhoFernandes in his sample he says he rolls a 5... oh, miscommunication
 
order of the faces/dice does not matter
 
@JohnSmith oh, six sides but the values are 1 to N? Harder
either way, I'm going home
good luck!
 
And it's not combinations, btw. Repeated sides are allowed: 1,1,1,1,1,1 is a valid die.
 
1:17 AM
Damn, the goblins have way more arrows than I have meatshields for.
 
lol
 
It went rather well. Except the militia commander is now extremely unhappy because all his 17 war dogs died...
 
@RMartinhoFernandes Yes [1,1,1,1,1,1] is valid
any way to use an equation solver to count solutions?
although, it may still be too slow
 
1:34 AM
Build a quantum solver
 
What do you guys use for mounting disc images in windows nowadays? I used to use daemon tools and more recently magic disc.. is there something that's all newfangled?
 
I tried a few, but I tend to use VirtualBox running Ubuntu, then just copy stuff onto a shared folder.
Not a great solution if you don't already have the VM, I admit.
 
@CollinHockey I still use daemon tools. I have heard of nothing better, and I don't find it lacking
 
^ same, for .ISO at least
 
alrighty
 
1:41 AM
I guess the difference being that I'm dealing with other FS images a lot more these days
 
1:59 AM
eugh
 
argh
bittorrent y so slowcakes
I wish to participate in your copyright-infringing goodness
 
2:10 AM
can anyone help me with this dice thing?
 
@JohnSmith is that Euler?
 
yes
 
@JohnSmith Euler is hard man
 
yeah
 
@JohnSmith I still think my solution would work
 
2:18 AM
?
which
 
calculate the number of sets whos odds of winning are exactly 50%, and half of what's left is the number of sets whos odds of winning is greater than 50%
assuming I understood correctly and that's what you're trying to calculate
and the number of sets who's odds of winning are exactly 50% is the sets who's values add up to n*n/2, which can be trivially calculated in O(N) time. (It can probably be calculated in O(1), but I didn't bother to figure out how.)
 
I am not sure it works quite that way
the cycle has to be complete for a given set of dice; all three must be >.5
which means you may have two that are but not the third etc
and they're all dependent on conditional probability
 
@JohnSmith so we're back to "I have no freaking idea what it is you're trying to do"
can you just link the euler page or something?
 
i did earlier; one moment
 
@JohnSmith ooooooooh
I wouldn't even know where to begin, that's way beyond my skills
 
2:31 AM
I have the brute force solution for N=7
but I don't see any patterns in the data
 
2:44 AM
Any good alternatives for pastebin?
 
3:03 AM
ideone, we usually use
 
3:18 AM
@DeadMG Not that I would ever do such a thing, but I imagine a solution where you run uTorrent on an EC2 micro instance, and download into an S3 bucket mounted with FUSE/s3fs would allow you to connect to the swarm at the best possible speed then download over HTTP as fast as your link can carry it.
You know... for your Linux ISOs.
 
lol
unfortunately, downloader bandwidth is not the limit, and I won't get more through EC2 than from home
 
3:45 AM
anyone know of a good book on basic cryptography that I could read in a couple days?
 
@MooingDuck No, it's not.
I told you that before.
 
well, I figured that the number of sets are exponential, so it's going to be a bitch at best to brute-force it
so there must be some more intelligent algorithm
 
I heard the handbook of appllied cryptography is decent
 
3:50 AM
yeah
 
zzzz
 
no way, that shit gets way unreadable after the first level
even if you think it's readable at one
 
lol
Now seriously, why not an array of 8 and bitwising the bools?
 
because as we previously discussed, initializing the array is going to be a fuckwad
 
3:51 AM
Oh, right, the initialization, nevermind.
I don't want to see the constructors then.
 
heh heh heh
no, you almost certainly do not
it's going to involve manually setting every co-ordinate of the AABBs of every subnode
which is a mere 48 parameters to pass
 
Please don't tell me about it!
 
which have to be co-ordinated manually, of course- no type or error safety here, just many floats, many places to put them, and so many things to go wrong
 
could anyone tell me what the correct use of qsharedpointer would be?
 
this would be so much easier in HLSL
and that is the first time I have ever had that thought
 
4:05 AM
is it like a qpointer where you can pass it as a raw pointer or do the param. for a function specify that it takes a shared pointer ?
 
4:22 AM
ok
just wrote the constructors :P
 
user406009
@chikuba Just use a boost::shared_ptr or a std::shared_ptr. Boost/std c++ > qt most of the time.
 
C++ > Qt > Java.
 
4:43 AM
hmmm
interface: detect collisions with box, or return collisions on insertion of box?
 
Good question.
Do you need all the collisions?
 
gonna go with detect collisions with box
uh
yes
 
Then perhaps you should return them.
 
I decided to handle collision and insertion separately, because there are some cases, e.g. frustrum culling, where I want to handle collisions with an entity that isn't actually in the octree
you know
it occurs to me that I could really use a 4D ray for collision detection in the physics
so that I can catch collisions that occur during the timestep, instead of just going to occur later
but I guess that as long as the timestep is often enough, the reduced granularity of not being able to detect mid-timestep collisions won't be that big a deal
 
you know, there's a small chance this code might actually execute correctly
unlikely, I know, but technically possible
 
0
Q: Auto-detecting type of current array with RTTI and put it in sizeof()

user1131997How can I auto-detecti type of current array with RTTI ( probably, may be another stuff could be used ) and put it in sizeof() operator and another operators? Thanks, Best Regards

 
user406009
@DeadMG Are you recreating the quadtree each tick?
 
user406009
5:17 AM
I always wondered how you were supposed to use them with dynamic geometry(or if to use them at all).
 
recreating is kinda a waste, don'tcha think?
just remove the old box and add the new one every time a unit moves
 
5:33 AM
you guys seem very talented
 
what makes you say that? :D
 
i admire a person who is good at something
I have never heard of a quadtree
 
I'm doing the 3D version, an octree
 
hmm, cool I am vaguely familiar with 3d
 
shouldn't have eaten
feel like I'm gonna chuck it back up
 
5:47 AM
@DeadMG Dude, static array. gist.github.com/2131755
 
except that doesn't deal with the problem of initialization.
 
@rvalue Now initialize it in the constructor.
 
Constructor of...?
 
(There's no default constructor)
 
the Octree class
 
5:49 AM
You can do it, just not in VS.
 
Was just basing it on the structure of your pastebin
apols
 
@user1220811 That's an illusion.
 
I don't thin the problem is intractable; you're going to need to either initialise each subtree lazily or define an arbitrary maximum depth.
Replace Octree subtree[8]; with Octree* subtree[8]; or your smart_ptr<Octree>/boost::optional<Octree> equivalent of choice.
You of course can't initialise it statically without constructing an infinite number of them.
 
instead, I had unique_ptr<Octree[8]>
 
I did a custom spatial partitioning scheme for my last game, and solved it with polymorphism; the base class was a single bounding box, on adding $threshold objects it'd have its parent replace it with a quadtree.
 
6:04 AM
eh, I didn't find that a big deal
the bounding boxes which straddle subnodes have to be stored anyway, so just use that until the split is necessary
 
It let me use different partitioning for different layers, which was a big benefit for the scenery
Most of our culling was done by points, since the objects were small relative to clip space
bigger stuff gets custom clipping in its layer
 
0
Q: Why memory functions such as memset, memchr... are in string.h, but not in stdlib.h with another mem functions?

user1131997I wonder, why such function as: -memset -memmov -memchr -memcpy Exist in string.h header file, but not in stdlib.h file, where are another standart memory functions as dynamic memory allocation: malloc, calloc, realloc, free. Maybe it would be better to unite them in one header? What do you thi...

 
6:44 AM
stomach y u haet me so much
 
good question
kill it with fire, IMO
 
get some maloxx. That stuff works
 
mallocs?
 
7:21 AM
 
Oh, hey, Nedroid.
 
8:02 AM
@KonradRudolph Ohai, didn't read before going to work :) Ok, any more luck with the parser? Could it be an exception occurring during exception handling? Does running inside gdb help? Try gdb 'catch assert', 'catch throw'?
 
8:26 AM
0
Q: What's the Best Way to handle file and image loading exceptions?

IntermediateHackerWith an exception that there is no solution or alternative to, for example failing to open an image, I usually do something like: try { img.load_from_file("my_image.png"); } catch( const image_loading_exception& e ) { /* Could Not Load Image: 'my_image.png' ! */ string err = "Cou...

 
What would you want to do? You can retry if I/O itself failed, but if the image is not an image or is corrupted beyond recognition, there's really nothing to do.
 
yeah.
guess displaying an error message is the only thing to do then.
 
Or default to a placeholder depending on what the thing is.
 
@RMartinhoFernandes you mean like how web-browsers show that small 'broken image' icon?
 
More good news everyone. I'm renaming Rebind to Bind and introducing a Rebind.
 
8:33 AM
@IntermediateHacker Yes.
@LucDanton Hm. Good news?
 
@LucDanton Lol.
 
Oh, sarcasm.
 
What? No.
 
@RMartinhoFernandes why didn't I think of that? Waiting for your answer.
 
But I do like to pretend there's a general interest in this room for whatever I name my things.
 
8:35 AM
Rebind was already confusing, and now you're making it do something else.
 
Well, Bind<Template, Sequence> is Template<A0, A1, ..., An> where the Ai are the types in the sequence and Rebind<Specialization, Sequence> does the same to a template specialization as opposed to a template.
Does that make sense or what?
 
I think that's what we were confusing it with at the time.
 
Btw I did announce that renaming because you did rightfully pointed out that Rebind could have a better name.
 
So, yes, I think it is better now.
 
Good!
 
8:40 AM
Speaking of announcements, my dorfs are now the proud owners of 500+ nuggets of raw adamantine.
 
Is that a lot?
 
As much as 500 bars of any other metal.
 
Oh yeah, good point.
 
A question... Anyone know of a way to determine what encryption a SSL socket is using on my local network?
 
But 500x more awesome.
 
8:43 AM
What's a good name for a metafunction that extracts the template parameters out of a specialization? ParametersOf seems a bit generic, but on the other hand it's in the meta namespace along Bind/Rebind so it seems fitting.
 
I have so much, I don't mind that the doctors are stitching up patients with strands of adamantine.
 
@LucDanton I think that's fine.
 
@RMartinhoFernandes ಠ_ಠ
So you'll have dorfs in adamantine armor with adamantine stitches. Did they ask for this?
 
"The last stitches you'll ever need."
 
8:45 AM
lol
 
Just figured out that what dorf medicine needs next is prosthetics.
 
There's crutches.
 
You can't run the Olympics with crutches.
 
We're talking about DF here. Sure you can.
 
Thank you Mr Patrick, I enjoyed my three day weekend :D
 
8:52 AM
> Seeing a giant, retarded troll, holding a mitten as a weapon, finally broke my poor miner. He instantly went melancholy, and trundled off to his bedroom, troll in tow, constantly bashing him with a soft mitten before overexerting itself and passing out every twenty seconds. The miner crawls into his bed and falls asleep, being woken only by the troll trying to bash his skull in with it's mitten. This went on for around ten minutes before I finally abandoned the fort.
2
 
9:04 AM
-1
Q: JavaScript accessing form elements using document.forms[].elements[]

thecoshmanvar loc_name = document.forms['create_<?php echo(htmlspecialchars($window_ID)); ?>'].elements['location_name']; alert(loc_name); This just gives me the message 'undefined' where as... var loc_name = document.forms['create_<?php echo(htmlspecialchars($window_ID)); ?>']; alert(loc_n...

huh... just got popular question for that... yet it is vote -1
so even though a good number of people have found there way to it... it isn't really a good question :S
 
haha, best comment I've seen in a while
> If I was riding a bicyle why would I need to wear a motor bike helmet - in case one day in the future the bicycle sprouts an engine
 
lol
FUCK YOU MARKDOWN!
holly shit, I am in the top third of people rep count wise with only 1k rep! how many shitty accounts are there?
 
around 24 squillion
I suspect the majority has 1 rep
people who sign up and never ask/answer anything,or who ask a single question that got downvoted, or posted a single answer no one read
how do you pronounce 'locale'?
 
9:23 AM
not sure if 'locale' is English
drop that 'e' and it would be
 
mawning
 
morning
 
@thecoshman it is, at least in software. It's the setting for language/culture/date formatting and such
 
@TonyTheLion not much
 
9:27 AM
in the wikipedia article on Locality of Reference it describes different types of locality, and one of them is this:
 
never been sure if it's pronounced just like "local", or what
 
> Equidistant locality: it is halfway between the spatial locality and the branch locality. Consider a loop accessing locations in an equidistant pattern, i.e. the path in the spatial-temporal coordinate space is a dotted line. In this case, a simple linear function can predict which location will be accessed in the near future.
what the heck does that mean though?
 
@TonyTheLion um, any context?
 
@TonyTheLion erm... I think this sounds like extrapolation...
 
I guess it means what it says. Taking into account both spatial and temporal locality
 
9:28 AM
In computer science, locality of reference, also known as the principle of locality, is the phenomenon of the same value or related storage locations being frequently accessed. There are two basic types of reference locality. Temporal locality refers to the reuse of specific data and/or resources within relatively small time durations. Spatial locality refers to the use of data elements within relatively close storage locations. Sequential locality, a special case of spatial locality, occurs when data elements are arranged and accessed linearly, e.g., traversing the elements in a one-dimen...
 
but yeah, I would imagine it is pronounced 'local'
or I suppose 'locally'
 
> loop accessing locations in an equidistant pattern
I have no idea what that's supposed to mean?
 
but I think saying 'local' with an american accent works best
 
I hear the Interwebs have dictionaries these days.
 
9:32 AM
@LucDanton lies
 
well, not all of us are fluent in IPA
/ləʊˈkɑːl/
 
ooooh yeah
 
gee, that's helpful
 
yeah, that is said like local
 
9:32 AM
Well, my comment is broadcast.
9 mins ago, by thecoshman
not sure if 'locale' is English
 
or more, 'low-cal'
@LucDanton and now I know it is :D
 
@jalf How fluent are you in rhymes though (UK pronunciation here)?
 
couldn't resist!
 
9:34 AM
it is 'low-cal'. I just didn't recognise it out of context
the 'cal' part is a harsh sound like with 'cat'
 
@LucDanton ooh, handy
 
@jalf That being said, I have no idea how good Wiktionary is or isn't. There's always Google.
@thecoshman Can you comment on the pronunciation given by Google?
 
@LucDanton sounds like a very camp way of saying it. It is over emphasizing that 'ca' part, probably to help demonstrate how to say it
@TonyTheLion damn you, now I can't help but respond to people in this way
 
@sehe Figured this out yesterday, I got an abort signal when throwing any exception whenever I compiled with -static-libgcc (which I had for some other reason). Removing this compiler flag makes the signal go away.
 
@DeadMG out of context, this is meaningless drivel; but when looking at the preceding posts, it becomes a time less classic. "cocksickle"
 
9:45 AM
@thecoshman lol
ok for those smart people amongst us
0
Q: Locality of Reference - English explanation for equidistant locality

Tony The LionI am reading the Wikipedia article on Locality of Reference, and I cannot help but find the explanation given for Equidistant Locality to be rather cryptic. I cannot really make much sense of it, and I wondered if anyone could make an attempt to explain it in plain English? Equidistant local...

 
lol, that really got under your skin didn't it :D
 
it pisses me off when I cannot understand something
 
@TonyTheLion LOL
there was a troll in the article
 
@TonyTheLion must... think... of... ridiculously... confusing... riddle
 
If I can't understand it, I wonder how many people reading it do actually understand it?
it's fucking cryptic
wikipedia's trolling me
 
9:51 AM
just a wild thought... what if you effective rep score for permissions was your accept % of you actual rep count.... so for me it would 95% of 1232
oh, and OMFG I WANT TWO MORE REP!!!!
 
what gives two rep?
an edit?
 
1 upvote, 8 downvotes.
 
> I learned obj c on the train into work this morning - it's not hard - but it stinks - it's a verbose, archaic language - i'd rather write iPhone apps in T-SQL ASCII art.
 
Well, 8 downvotes to give. Downvotes you get may be -2, I don't remember.
 
9:54 AM
@LucDanton I would have to get an up vote first though wouldn't I?
 
@IntermediateHacker lol, that reminds me I have to learn ObjC
 
@TonyTheLion why? Just for the giggles and shits?
 
what's T-SQL ASCII art?
 
@thecoshman nope, for business
@IntermediateHacker fuq knows
 
@thecoshman Well it's all commutative.
 
9:59 AM
@LucDanton well, I didn't mean I would have to get the up vote then do down votes. I meant, in order for that to work, some one will need to give me an upboat
 

« first day (521 days earlier)      last day (4432 days later) »