« first day (557 days earlier)      last day (4407 days later) » 

8:02 PM
@stdOrgnlDave I should add that it's easy for me to be philosophical about it at the moment; right after it's happened to me, I'm often much less so...
 
@ScottW I reckon they get dirty quick
@stdOrgnlDave TL;DR "Anyone sick of writing a thoughtful answer" -- Yes, count me in
 
8:14 PM
is the robot activated atm?
 
Hi.
I'm sad. I forgot my father's birthday.
 
that suck
although I can totally empathise; I do that all the time
I don't have any cron jobs running in my head
 
I couldn't care less about mine, but other people do, and I care about other people.
 
so
is this a bad time to lambast you with my technical problems?
cause I could wait
 
No, it's okay.
 
8:18 PM
inside my A* code, I use a ray trace from point A to point B to see if it is navigable
then it returns the path
but when my unit follows the path and it looks ahead to see if it is possible, then it says the path is blocked
 
I didn't do anything dumb like move a unit in the way :P
 
Isn't the raytrace function the same?
Maybe you're not returning the proper path?
 
yes, the blocking function is the same
I checked the return path and it seems to be perfectly valid
 
Do you have a way to manually inspect the path, like drawing it as lines or something?
 
8:23 PM
yes, I can do that
good shout, actually
I do possess the means to draw lines in 3D space, didn't consider drawing the bounding boxes of the units and the path line to verify validity
good shout
 
Have done some reading on lambdas and those are really cool! I wound up writing one for our application as this is one of those "one-off" situations. Thanks! If I could set multiple answers as accepted, I would add this one as well! — Jon 5 hours ago
^ sigh :) no rep for that of course
 
eh, rep is not particularly meaningful
 
Ell
yeah - just look at how low rep i have and how awesome I am ;)
2
 
I'd have starred that if it had been delivered as one single message.
 
Ell
:D
 
8:29 PM
right
so expose the order to the UI... something I should have thought about how to do a little while ago
of course, an intelligent man would just return it from the issue function
 
Ell
@DeadMG are you working on a game?
 
yes
 
sbi
Is anyone here watching Madrid vs. Munich?
 
Ell
@DeadMG does it have a website?
 
@Ell No.
@sbi nah
 
sbi
8:37 PM
@DeadMG You are missing a quite exciting match.
 
I believe that there is little excitement to be found in such things
 
^ I feel like football
 
huh
weak_ptr has no operator==?
 
sbi
1 message moved to bin
 
how curious
 
8:38 PM
@DeadMG That would by definition be quite racy
 
guess it'll have to be a proper shared_ptr then
 
:) @sbi
 
sbi
@sehe No animated pictures, please.
 
Was gonna delete it. Thought it would be ok as a temp joke.
Perhaps I'm missing the rationale behind the rule (I know it would pollute the chat, be distracting and possibly non-safe-enough-for-work, am I missing something?)
 
there's no hash customization for shared_ptr?
I seem to recall having this problem with unique_ptr too
 
8:40 PM
@DeadMG I think there is.
 
VC10 is hardly the most conformant compiler in the world, so
 
sbi
@DeadMG It's not that I regularly watch. But this is about who will participate in the Champion's League final. I watch such matches once in a while. And this one is very exciting.
@sehe It was. I even gave you some time to delete it.
 
weeee C-string processing
 
sbi
Oh, the extension has already started.
 
@sbi We don't really get any good matches here
Unless you pay an inordinate amount of money for the Fox Soccer Channel
 
sbi
8:43 PM
@Collin I am watching the stream from a German private TV station. I am sure they won't broadcast to foreign IP addresses.
 
@DeadMG § 20.7.2.6 Smart pointer hash support defines it for shared_ptr and unique_ptr
 
@sbi that's what good VPN is for: getting in-country IP addresses for TV
Witopia has like 63 options around the world
 
sbi
@stdOrgnlDave The trouble is that those also tend to make your wires narrower. That's a problem with streaming.
 
They cap out between 512kilobyte/sec and 1megabyte/sec depending on where in the world you VPN into
SO I have a philosophical question for you
I wrote that piece of crap to answer a question
The jerk who asked the question can figure out how it works most easily by stepping through it
Should I bother to clean up the variable names and document it better?
 
Yup.
 
8:49 PM
no
:P
 
Even with better variable names its substring replacement in C, it's messy, no way around it
 
sbi
Always strife to write code as clean as possible. Especially so when you are in a teaching position.
 
@DeadMG weak_ptr is not a smart pointer, so you can't expect a smart pointer interface from it.
 
yeah, that I have observed
 
@sbi Here's a question for you. Has any of your kids developed an affinity for programming yet :) ?
 
8:51 PM
@sbi could you write that cleaner? :-\ in C code like that
 
sbi
@ScarletAmaranth Not so far. There's some more to hope for.
 
@stdOrgnlDave If you're talking about the "ideone" link you posted a while ago, then i reckon it's ok :)
 
I'm sure he can. One thing that pops out immediately is that there's a function that spans more than one screenful. That's easy to fix.
 
@sbi What's your kidcount again if that's not too of an impertinent question to ask :) ?
 
sbi
@ScarletAmaranth I got a lot.
 
8:55 PM
@RMartinhoFernandes you have a small screen. but, how does one fix that?
 
sbi
Now the first half of the extension is over, and still either team could score a goal. In the second half of the regular time the Bavarians were somewhat better, now it's even again.
 
@sbi So it would seem! :) What's your oldest one inclined to ? (I wonder just how much do kids take after their parents for I'm like an apple that fell way too far away from the tree :))
 
@RMartinhoFernandes I mean without removing whitespace returns...
 
@ScarletAmaranth you should probably be looking at the milkman's tree then :)
 
@stdOrgnlDave Well, you commented out some sub-functionalities that your big function does. I guess those would be good candidates for separate functions but meh, i reckon its fine.
 
8:57 PM
Yep, that's what I meant.
 
sbi
@ScarletAmaranth Regarding kids being like parents: If there's one thing all my kids have in common, then it is that every one of them is a completely different person. Regarding my oldest: It's a girl, and she's good when it comes to languages, writing, etc. Math and physics definitely isn't hers. :)
 
@sehe The damn post-man looks somewhat familiar ... :P
 
@ScarletAmaranth and @RMartinhoFernandes yeah, I know that, it's not really the point though - I could also replace those sub-functions with standard C library calls to an extent
 
I thought you asked if that could be made clearer.
 
@sbi It's pretty weird isn't it. Tho my sister is pretty much just like her (and by coincidence my) parents.
@stdOrgnlDave Well, you asked how it could be made cleaner :)
 
9:00 PM
Oh, well, I could certainly make it clearer by doing things like that, I suppose i didn't specify the parameters well enough
 
sbi
Now Real seems to be a bit better. And it's 7 more minutes until they would have to start to shoot at a goal.
 
OK, time to go, c'yall
 
Any live-stream of the match available ?
@stdOrgnlDave farewell
Do you know about any free german VPNs :D ?
 
sbi
No. But I am sure the guys at the URL I posted couldn't care less about your IP.
 
And what are ways are there to check my location :) ?
 
sbi
9:04 PM
@ScarletAmaranth Your IP.
 
@sbi Well, if it's hidden behind a proxy, then they'd have to go out of their way to get to my IP ...
 
sbi
@ScarletAmaranth As I said, those Russians couldn't care less.
 
@RMartinhoFernandes I added the pathing lines. Hilariously enough, it's actually ambiguous at first inspection whether or not the path line collides with the AABB, because of the camera angle.
I will need to add functionalities to change the camera angle to inspect the line more closely
 
@sbi I may be missing something here ^^ I blame the language barrier! :)
 
sbi
@ScarletAmaranth Sigh. I really don't like linking to this again.
 
9:06 PM
@ScarletAmaranth Sigh. The link he posted is not legal and doesn't care about legality. That's why your IP doesn't matter.
I can't make it any more obvious than that.
 
@RMartinhoFernandes Yeah i've just come to a conclusion that he did post a link :)
@sbi Haha, ta ;)
How is it with law in Germany, are you actually committing a crime or something of such sort when you download an illegal file ?
 
sbi
@ScarletAmaranth Isn't it a given that you commit a crime if you are doing something illegally?
 
@sbi You could break civil law.
 
@sbi Here in slovakia, it's technically not illegal to download a file. (Unless you market / share it afterwards. )
 
sbi
@ScarletAmaranth Except when it's an illegal file, of course — which is what you asked about.
 
9:10 PM
@sbi Even if you download copyrighted material here, you don't commit a civil offense of any sort. (For now.)
 
@sbi Many jurisdictions have "kinds" of illegality. Like infractions or whatnot. Not everything is crime. IANAL.
 
For instance, a friend of mine downloaded an mp3 from his dorm and his school and him received an email from a producer demanding the deletion of the file. Tho they couldnt file a lawsuit.
 
sbi
@RMartinhoFernandes So "illegal" isn't a synonym of "unlawful"?
Wow. Still undecided. Now they are going to shoot at a goal.
 
Who's playing?
 
sbi
37 mins ago, by sbi
Is anyone here watching Madrid vs. Munich?
Champion's League semi final.
 
9:14 PM
Ok. Football lulls me to sleep, so I don't watch much.
@sbi I take it as so, i.e., "violation of the law".
Consider tort. While a violation of the law, it's not technically a crime.
 
sbi
> A tort is not necessarily an illegal act
 
Shit.
I should write IANAL more often.
 
sbi
@RMartinhoFernandes This match is everything but putting you to sleep.
 
Or better, IHNIWITA.
 
sbi
Wow. The German goal keeper just caught a ball.
 
9:17 PM
@sbi But there's nothing at stake for me! Plus, I can't predict which matches will be good and which won't.
 
@sbi In the US (and probably the UK, since that's where most US law originated), law is divided into "civil" and "criminal". There are laws about both, but (for example) there are differences in how you can be punished for violating one versus the other (e.g., if memory serves, you can't be sent to prison for a civil violation, only for a criminal violation).
 
sbi
Wow, the German keeper caught again.
He's now caught balls by Ronaldo and Kaka.
Now Madrid's keeper caught one, too.
 
I don't want to be a party-pooper, but wouldn't people interested on game commentary be actually watching it by now?
 
sbi
Wow, this is really thrilling.
The Bavarians have won.
 
Tony is in Australia?
 
9:27 PM
lol
 
hmm
 
I'm a kangaroo now, am I?
 
I think that the pathfinding's block function is off
 
sbi
Well, I guess I'd better go to bed. I'll have to get up early tomorrow morning.
And then be in time to another divorce.
 
@sbi :(
 
9:29 PM
@sbi owch
 
@sbi You're divorcing again?
Ow.
 
get some good sleep
 
sbi
@RMartinhoFernandes Well, this one's been in the making for 1.5 years, so it's not exactly a surprise.
 
@sbi May not be a surprise, but undoubtedly stressful nonetheless -- definitely hope you sleep well.
 
(Rhetorical) Question: why would anyone sane want to stick their toes onto a motherboard?
 
9:31 PM
@RMartinhoFernandes warmth
 
sbi
@JerryCoffin I don't expect any stress, actually, but, yeah, I might have a glass of port or two before I go to bed.
 
@MooingDuck Oh, I thought there was technology for that. What's it called... Ah! Socks and shoes!
@sbi Is port expensive in Germany?
 
@RMartinhoFernandes pft, who wears socks/shoes inside their own home?
 
sbi
@RMartinhoFernandes This one's <€10. I have no idea whether you would like it or spit it into my face, though.
Anyway, I'm off. See you!
 
@MooingDuck Someone with cold feet.
@sbi I wouldn't like it. I can't stand wines.
 
9:33 PM
@sbi G'night.
 
@sbi Good night.
 
night
ok
the A* is definitely not working correctly
returning some definitely sub-optimal paths, for one
 
@RMartinhoFernandes I Have No Idea What I'm Talking About, Really?
 
@DeadMG I remember when I made a pathing algorithm as part of a homework (it wasn't key to the homework, it was just making the homework cooler). I spent more time on that assignment than any other in college and never got the fool thing working.
 
9:45 PM
@RMartinhoFernandes No, because it isn't available on TV for most
@RMartinhoFernandes That was somehow very tough to google
 
@sehe Erm, @sbi posted a link to a stream that worked for everyone. He deleted it afterwards, which is why you an't see it in the transcript.
@sehe I made it up on the spot, never seen it before.
 
@MooingDuck Who wears socks/shoes inside their own home PC (FTFY)
@RMartinhoFernandes Ah. Props to me for cracking it then, lol
 
@sehe I usually keep my feet on the little power adapter thingy. That's not quite in my computer...
 
ok
perhaps my ray casting code is simply broken
when following a broken path, the unit span there for a while, but then decided to move right through a compatriot
 
@DeadMG words known: +1
 
10:06 PM
@MooingDuck Hey, I remember doing that this winter. I don't know what the adaptor was from anymore. Hmmmm
 
This is probably a dumb question, but does taking the address of a variable prevent it from being in a register? Or, how does the compiler put things whose addresses are used in registers
 
yes
you force it to actually be addressable
 
Uh, not that I don't trust you, but can you provide some source for that claim
it makes sense and everything but I've never seen you before so
 
well
you can google it in the same way i would
;)
 
what to google
maybe I should google "what to google"
 
10:10 PM
Don't type Google into Google!
 
@RMartinhoFernandes Yes, it’ll break the internet, Jen!
 
@RMartinhoFernandes so do you agree with Scarlet
I don't see how it could be any other way
 
No, the compiler actually
 
@SethCarnegie "C++ register keyword"
 
returns you a random value
 
10:11 PM
Anyway, yes, taking the address usually prevents it from being in a register.
 
c++ register keyword does nothing ...
(compilers optimize away anyway :))
 
@ScarletAmaranth incorrect, it forces you to not take the address of the variable
 
Ah I did not know that
 
NO WAY :D
 
that's cool, thanks
 
10:12 PM
Of course some optimizations can skip the need for the address.
@MooingDuck No, it doesn't.
 
@RMartinhoFernandes Thanks :P
 
@RMartinhoFernandes "ANSI C does not allow for taking the address of a register object; this restriction does not apply to C++" ....oh
@ScarletAmaranth I stand corrected
 
" However, if the address-of operator (&) is used on an object, the compiler must put the object in a location for which an address can be represented. In practice, this means in memory instead of in a register."
 
Consider int f(int* x) { return 2 * *x; } int main() { int im_in_a_register; return f(&im_in_a_register); }.
 
that settles it then
 
10:13 PM
If the compiler inlines f it can skip the address taking and put im_in_a_register in a register.
 
@RMartinhoFernandes your wording/context seems like you're showing an example where I'm wrong, but that doesn't apply to what I said. Are you responding to Scarlet?
(Also, I already admitted to being wrong)
 
@MooingDuck I'm responding to @Seth's original question.
Taking the address does not necessarily prevent registerisation. It makes it less likely, but it can still happen.
The "as-if" rule, as usual.
 
Yeah, thanks
@MooingDuck I wonder why they lifted that restriction from register in C++
 
@SethCarnegie because compilers are generally better at juggling shit in and out of register ... :)
 
@ScarletAmaranth that doesn't apply to the rule of not taking the address of a "register" variable much.
 
10:19 PM
@ScarletAmaranth it doesn't seem like making it less restrictive would help
usually the less you can do, the more it can do
 
Meeh, whatever, i have never used the keyword in cpp since it does virtually nothing.
 
@ScarletAmaranth I used to, before I learned it does nothing. The inline keyword still works sometimes (in MSVC9 at least)
 
fuck
why is erase() still broken in C++11?
 
@MooingDuck Yeah it sometimes does :D But more often than not, compiler ignores that too :)
 
skynet ignores the inline keyword for nukes, it knows better
 
10:21 PM
@DeadMG in what way?
 
because you have to manually know whether or not you need to increment the resulting iterator
if you do it = container.erase(it), you can't increment it afterwards if you want to keep iterating safely
so you still have to juggle the fucking thing like a hot potato if you don't want your code to break
 
Also, I was going to ask, the only reason that using the heap is slower than using the stack (besides caching issues) is because of the complex management that must be done when you allocate and free memory, correct?
 
@DeadMG ah, that
@DeadMG remove_if?
 
whilst iterating?
 
@DeadMG oh, you're doing more than just erasing during the iteration? Then yes, it gets tricky
 
10:28 PM
how much slower is it to build a to-delete list while iterating and then delete that afterwards?
 
@Datalore More like, how much massively easier is it?
which is exactly what I just did
 
ah I see, that was what what jumped into my head and I was wondering if there was a better way
unless your iterator isn't bidirectional, couldn't you do "it = erase(it); it--;" and then continue normally in your loop?
 
what if the new iterator is begin()?
 
@SethCarnegie I'm not sure about the caching issues but take a look at the following link, under "Common heap performance problems." msdn.microsoft.com/en-us/library/ms810466.aspx
 
man, I just used a raw delete
I feel so unclean
 
10:35 PM
@SethCarnegie Yeah, heap allocators are supposed to be very general, and thus very complex.
 
@RMartinhoFernandes so if I allocated a large block of memory on the heap and I used it as a stack, it would generally be just as fast as using the real stack
 
Also, being general makes it hard to optimise, because optimising one scenario pessimises others.
 
that is, just because it came from the heap doesn't contaminate it and make it slow
 
@SethCarnegie Yeah, that's what many GCs do.
 
Ok, cool, thanks
 
10:37 PM
Hmm, I am never sure how to set an istream’s error state – is this correct?
1
A: Operator>> Overloading

Konrad RudolphEssentially your operator >> is way too complex, and doesn’t even handle errors properly. You shouldn’t read the value into a string to begin with – read it directly into a number. Furthermore, after each read operation you need to check (and potentially set) the stream’s state. istream&am...

 
@SethCarnegie yeah, it's memory like any other
 
@KonradRudolph I just realised that or and not and and are much harder to read than ||, ! and &&
thanks to your answer
 
@SethCarnegie Only because of crappy syntax highlighting
otherwise they are vastly superior
well, “vastly” is obviously vastly exaggerated
 
Well, if you're used to seeing c/cpp syntax, you find || / && quite natural. But i agree with Konrad, or and "and" read better.
 
no, ! groups well because it touches what it negates
for me anyway
 
10:41 PM
eh
I think it's a bad thing to introduce keywords unnecessarily
 
I think and and or are just as readable but not not
but in fact I just use std::logical_not instead of ! or not
it's much more readable
 
std::logical_not -> You find this more readable than ! ? :D
 
@SethCarnegie I actually think that not has the most decisive advantage. From experience, a single ! is too easy to miss.
 
@KonradRudolph for example
if (std::logical_or(std::logical_or(std::logical_not(in >> re >> pm), std::logical_and(pm != '+', pm != '-')), std::logical_or(std:logical_not(in >> im >> i), i != 'i')))
{
    in.setstate(ios::failbit);
    return in;
}
from your answer
don't you find that very readable
 
@ScarletAmaranth I think he’s taking the Mickey
 
10:44 PM
I comprehend it without even trying
 
You comprehend that ?! :D
 
you don't even have to read it to understand it
 
I still can't quite figure what it does :)
@SethCarnegie Sorry i can't quite agree with you on that :) I think i'd rather stab myself in an eye with a fork than use that :)
 
@SethCarnegie that looks wrong to me, namely that you read in twice?
 
@MooingDuck I just copied Konrad's code and converted the operators
oh, you mean for short-circuit evaluation
 
10:47 PM
@SethCarnegie Yeah and you made it unreadable :)
 
well screw evaluation
it's overrated
 
@SethCarnegie yeah, the "quick failout" thing. yours always attempts to read four things
 
I find many layers of nested ifs much more readable than short-circuit evaluation
along with std::logical_whatever, they are a killer readable team
 
@SethCarnegie I like the idea of std::logical_whatever :)
 
whatever is a placeholder for not, or, and, etc
 
10:49 PM
Yeah i do realize that, but i like the ring of it.
std::logical_whatever ... shiny
 
too bad you can't put stuff in namespace std
 
@ScarletAmaranth I dislike std::logical_or since it doesn't behave like or. (and similar)
 
@MooingDuck I don't like the std::logical_whatever operators. But i do like the word " std::logical_whatever " :)
@MooingDuck Just the phrase, the std::logical_not / or is just baaad to me :P
 
@DeadMG lol did you make that just now
@MooingDuck they're handy for passing to algorithms sometimes though
 
10:59 PM
ah, fuck
I very very nearly just ran into that damn erase thing again
instead of coding this stuff manually, I need to re-write that LINQ-style stuff I had earlier
that would take care of this malarky pronto
aaand I refactored my code to produce the exact same test for A* and the unit following the order, and it still produces bad paths
there's no reason why raycasting twice from the same spot to the same other spot would produce different results
 
11:19 PM
I have an interesting template programming task ahead of me.
I have these classes that represent an entity sort of like a future.
And I want to write a template that will generically wrap a function so that any arguments it takes can be provided by these things.
But if it takes one of these things as an argument, I want to preserve it.
And the function's return value gets to be wrapped in one of these things (I call it an operation<T>) as well.
 
fuck
 
@Omnifarious if the function isn't declared to take those types, it can't take those types. I don't understand what you want there.
 
I found a bug in my octree, and I fixed it, and it had absolutely no effect whatsoever
 
Unless you want the template to simply wrap/unwrap the types
 
this I find exceedingly disappointing
 
11:24 PM
@MooingDuck operation<T> has a function that will pull out a T and a way to notify something when the T is ready.
When all the notifications have fired for the argument operation<T> objects, it will then pull all the values out and pass them into the wrapped function.
 
@Omnifarious and you have functions that aren't coded to handle those, and you want to alter them to handle those?
 
Yep.
 
@Omnifarious so it should simply stall until they are all ready?
I don't see why you need a magic template wrapper for that
 
Well... there's an event loop running.
The event loop will asynchronously tell call into the operation<T> objects which will then notify when they are ready.
 
@Omnifarious do the operator<T> objects have a blocking conversion operator?
 
11:27 PM
They have one that throws unless the notification has been fired.
 
@Omnifarious oh, and since there's an event loop you can't block right?
 
Yep.
 
such a class doesn't seem incredibly complicated.
 
Nope, it isn't too complicated. The main difficulty will be in the template magic that allows me to convert functions that weren't originally built with this in mind to operator<T> objects of their own with all their arguments set up as dependencies.
And that's mostly because I've never done anything like that before. I'm thinking of trying to cannibalize parts of ::std::function and the currying stuff in the standard library.
 
template<class RetType, class .... ParamTypes>
class function_optional {
    typedef RetType (fptrtype*)(ParamTypes...);
    fptrtype fptr;
    std::tuple<operator<ParamTypes>...> params;
    function_optional(fptrtype function, operator<ParamTypes>... p)
something vaguely like that I think
very vaguely considering my lack of experience with variadic templates
 
11:35 PM
chuckle nod Yes.
 
function pointers bad!
 
Though I'm going to have to do something a bit more complex because if a function already takes ::std::shared_ptr<operator<T> > then I just want to pass it in without waiting for it.
@DeadMG That too. I want to use ::std::function instead.
@DeadMG It's frustrating when that happens, but I always look at it positively. I didn't find the bug, but I did find a bug. And it's fixed now!
 
11:56 PM
I should study the way iostreams work enough to see if I could make a fast version
people keep saying it's theoretically possible, but nobody seems to have one.
 
I would like to see that.
 

« first day (557 days earlier)      last day (4407 days later) »