« first day (775 days earlier)      last day (4172 days later) » 

user1182183
8:00 AM
with hresult: 0x8007007E
 
user1182183
says it can't find it while it's there
 
Have you verified that's the exact DLL version you need? Have you checked with the Dependency Walker?
 
user1182183
and the app works on my PC
 
user1182183
and thuis is a school PC, the pc has VC2010 (and the app is compiled for that) redist but not 2012
 
user1182183
and the DLL is made with VS2012 :P
 
user1182183
8:01 AM
@Insilico is there a standalone depency wakler? :P
 
@GamErix You don't have it installed with the Windows SDK (or Visual Studio, whichever one it is)?
 
user1182183
@Insilico this is school, they don't have fancy stuff
 
@GamErix You can run it on the exe on your own computer.
 
user1182183
@Insilico then I need to wait the whole day xD
 
user1182183
when I'm done with school : <
 
user1182183
8:04 AM
still 6h to go
 
@GamErix This is why I bring my own laptop to school. :-)
 
user1182183
@Insilico we;re not allowed to use them -.-' stupid school won't go with the technology
 
user1182183
even mobil phones are prohibited
 
@GamErix This is high school, I presume?
 
user1182183
@Insilico ye
 
8:08 AM
I wouldn't be able to do lots of school-related things without a laptop even in high school. :-/
 
user1182183
@Insilico if you would be so kind to walk with depency walker on this: code.google.com/p/gpb/downloads/…
 
user1182183
and this is the app that needs it:
https://code.google.com/p/gpb/downloads/detail?name=RouteConnector%20GUI%20Visualizer.zip&can=2&q=
 
user1182183
or could you at least run the app and make a screenshot of it?
 
user1182183
(left click on a road, then use Midle mouse button on another piece of road and click "calc" then take a screenshot :p
 
user1182183
however I warn you, it needs 500 mb of ram
 
user1182183
8:10 AM
(displaying a 6000x6000 image)
 
@GamErix I'm pretty sure you don't need 500 MB to RAM to run depends.exe on it.
 
user1182183
@Insilico ye but to run the app :P
 
user1182183
if you can do that you would help me save some time <3
 
@GamErix depends.exe just looks at the executable binary. It doesn't run it.
 
user1182183
@Insilico I know :D
 
8:11 AM
Happy anniversary Pong! (en.wikipedia.org/wiki/Pong)
 
user1182183
I tried universal extractor on the vcredist_x86.exe but I get an empty directory as output
 
user1182183
-.-
 
depends.exe tells me it needs "msvcp110.dll" and "msvcr110.dll".
And of course "kernel32.dll".
 
user1182183
oh I forgot the school has XP....... -.-'
 
user1182183
could you compile the DLL with c++ 10?
 
@GamErix Why didn't you say so in the first place? -__-
 
I wonder if this is legal and if so what is the effect of the using statement>
 
user1182183
@Insilico I'm sorry I forgot VS11 doesn't support XP :(
 
@GamErix It does (at least you can target XP with it now, you can't run VS11 on XP)
 
@Nils I'm not positive. I don't remember the last time I used that construct (if at all).
 
8:17 AM
@jalf VS2012 Update 1
 
user1182183
@jalf I got the DLL's in the app;'s directory and the DLL compiled with C++11 refuses to load
 
user1182183
could any1 compile this in C++ 10? :$
 
It compiles w/o warnings, if I try it w/o the using construct it says the method does not take 3 args.
 
user1182183
it doesn't use any c++11 features so it should work
 
@GamErix The issue isn't the C++11 features. The issue is the runtime library used by VC++12 programs.
 
user1182183
8:19 AM
@Insilico ye then you can select to use VC++ 10 runtime libraries, or not? :o
 
user1182183
at least the other application does work on XP here and it's compiled with VS2012
 
user1182183
(but was made before in VS2010)
 
@GamErix I have no idea how to do that. I haven't tried out VS2012 for anything serious yet.
 
user1182183
@Insilico then you can open the project in VS2010? :P
 
user1182183
it should compile
 
user1182183
8:20 AM
it's really small and doesn't use anything special
 
The machine I'm on now doesn't even have VS2010 either. :-/
 
user1182183
aw :x
 
user1182183
Any1 here in this room? :P
 
user1182183
has VS2010 (at least VC++10)? :D
 
@jalf Could you have a quick look at that code?
 
8:22 AM
@GamErix Me. Express.
 
And quite frankly I don't want to even if I had VS2010 on this machine. Too lazy. :-)
 
@MarkGarcia yep, I consider that to be VS11 too ;)
 
user1182183
@MarkGarcia could you try opening and compiling this: code.google.com/p/gpb/downloads/…
 
user1182183
it's a DLL and doesn't use MFC so it should compile in express
 
@GamErix My pleasure
 
8:23 AM
@nils: it just pulls the `drawRect functions from the base class into the derived class' namespace, so they will participate in overload resolution
without it, drawRect(3,3,3) won't compile
 
using BasePainter::drawRect; pulls all overloads?
 
from BasePainter, yes
 
Is it legal to call a pure virtual function in the BasePainter?
 
normally, name lookup happens without looking at the signature. If you try to call Painter::drawRect, then it will try to find a drawRect function` in Painter, and if a function with that name exists, it'll end the search, and never look in the base class. Even if the function it found has the wrong signature
 
@GamErix Oh no! Error!
Error 1

error MSB8008: Specified platform toolset (v110) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets 518 6 RouteConnectorPluginDLL
 
8:26 AM
you're not calling a pure virtual function
 
Man.
I clearly have no idea what I'm doing.
 
drawRect(x,y,z,w) will still call the one from the derived class. But drawRect(x,y,z) will no longer fail, because it will find the one in the base class
 
user1182183
@MarkGarcia try selecting another platform? :D else edit the .vcxproj with notepad
 
user1182183
and change 110 to 100
 
But doesn't matter, I'm going to fire this code off with all the confidence and arrogance of a Ship heading straight for an Iceberg.
 
8:28 AM
@GamErix Sorry. No admin rights. School computer.
 
@jalf But just having BasePainter w/o having an implementation of drawRect(x,y,z,w,h) would not be legal right?
 
user1182183
@MarkGarcia do you need admin rights to edit the project file which you just downloaded? :o
 
@GamErix No. It's the MSBuild file that I can't.
@GamErix It's on Program Files
 
user1182183
@MarkGarcia if you have VC2010 express then just open notepad and open the vcproj file from my project , there you should be able to change 110 to 100 and it shouldn't give that error :#
 
@GamErix Oh sorry.
 
8:31 AM
@Nils well, remember these are two completely separate issues. The using statement is only used at compile-time when the compiler has to determine which function you're referring to in the function call. All the pure virtual stuff takes effect at runtime and determines what happens when you actually call the function in question
 
@GamErix Built it.
 
user1182183
@MarkGarcia yay "D
 
user1182183
sendspace.com ? :P
 
user1182183
or solidfiles.com is better
 
@GamErix Debug or Release?
 
user1182183
8:34 AM
@MarkGarcia release :$
 
@jalf Yeah makes sense, thx for the explanations :)
 
@GamErix
http://www.solidfiles.com/d/94f3e221e1/
http://www.solidfiles.com/d/8e93c62fb1/
http://www.solidfiles.com/d/a53ce51708/
http://www.solidfiles.com/d/0545b2eb90/
 
user1182183
thank you :D
 
@GamErix Your welcome.
Could someone please consider pinning this:
http://chat.stackoverflow.com/transcript/message/6448065#6448065
 
user1182183
starred it, all I can do I think :P
 
8:41 AM
It helped me a lot, you know.
@GamErix Did it work?
 
user1182183
@MarkGarcia yep
 
user1182183
it runs nicely ;D
 
@GamErix Good thing.
 
user1182183
 
user1182183
route calculation works :P
 
8:52 AM
Wooohoooo, my own version of std::unordered_map is exceptionally bad !
 
how unsurprising.
 
4.2 seconds
That's the best I could do using really, really bad open addressing. :3c
 
@ThePhD Now that's standards conformance at its best.
 
Now 3.9 seconds.
Woo, progress.
 
user1182183
I also progressed with my dijkstra plugin
 
user1182183
8:59 AM
in one year from 2500 ms to 32ms
 
user1182183
xD
 
3.6 seconds.
I think this is the best I'm going to get.
3.5 ....
The majority of the performance hit is in std::basic_string::assign
I can't trick it anymore than I have.
3.5 seconds is as good as it gets.
 
9:44 AM
what allocator?
 
meh, I can't find the place in the standard where it states that the ordering of two of the same elements in an unordered_map is undefined
it should be somewhere under 23.2.5
in N3485
 
10:05 AM
it's kinda in the name
 
@JohanLundberg Oh, that's cool. It seems the original implementation I linked you to has a couple dependencies on libc++ (namely a couple of macros). Sorry about that.
room topic changed to Lounge<C++>: Way too much blood flowing around here. [c++] [c++11] [c++-faq]
Back to the usual abnormality.
 
Xeo
@TonyTheLion In an unordered_map, you won't have two elements with the same key. :)
 
I think the ordering is even consistent in a mulitmap?
 
potato
 
Xeo
10:17 AM
In an unordered_multimap, I think they're in the order of insertion.
 
0
A: Is the order of items in a hash_map/unordered_map stable?

Tony The LionIn the N3485 C++ ISO standard draft, under section 23.2.5 [unord.req] point 6 it says: An unordered associative container supports unique keys if it may contain at most one element for each key. Otherwise, it supports equivalent keys. unordered_set and unordered_map support unique keys. ...

my question came in relation to this question and my answer
 
Xeo
@TonyTheLion After reading the question, I kinda think your answer is just way off. He's asking about if an element, after it was erased, is inserted again, if it will appear in the exact same place in the container.
(Or rather, not a single element, but a bunch of elements.)
 
@Xeo ok, right. Well I've deleted my answer.
 
@Cheersandhth.-Alf Not anymore.
class non_aggregate_pod { int x; };
 
Can we tell VS's debugger to not step into stupid things like shared_ptr::get()?
 
10:29 AM
@kbok There is a way, actually
I don't remember off the top of my head, but I think you can blacklist classes and namespaces
 
Cat has really useful things to say these days, comes in says "potato" and disappears again.
sarcasm
 
He's broken.
 
Potato
aaaaaand: blood
 
@kbok We need to attach a debugger to him and see where the problem is. :P
 
he is a bug
 
10:36 AM
ohhh
I see, things are falling into place now.
I thought that, the insect, however was the bug around here
lol
 
@DeadMG No, @Cicada is
 
slow
poke
And don't forget the coffin beast
 
I thought it was an owl
 
10:51 AM
wut?
@JerryCoffin is not an owl
he's a wasp
 
bzzzzt
 
Sometimes this place is really like a zoo
 
White Anglo-Saxon Protestant?
 
lol
no, the animal
you know the thing that stings
 
What's the difference with a bee?
 
10:53 AM
gawd
wasps are more aggressive
bees are generally rather mellow
 
Ah, the mean bees. I see :)
 
whereas a wasp will attack
 
Bees are awesome. They make honey.
 
honey is yum
0
Q: Open Source Project about mass data control(C++)?

user1862910Please give some advice !Thank you very much!

 
@TonyTheLion Bees will attack too.
 
10:54 AM
please close this crap
@R.MartinhoFernandes but only when you pester them
wasps don't need pestering
 
Yes, they do.
 
shush
 
They don't go out looking for people to sting.
 
this expresses the sentiment rather nicely :P
 
As someone that grew up in a beekeeper's house, the bee part does not match my experience.
 
10:57 AM
oh
 
@TonyTheLion White Anglo-Saxon Protestants re generally more aggressive
 
system() is a linux call, right?
 
no
 
Everytime I was stung by a wasp I was doing something I shouldn't (why do kids think prodding their nests is a good idea?).
 
Standard C
 
10:59 AM
ah right
 
for no apparent reason or purpose
since there's fuck all useful you can do with it
 
@R.MartinhoFernandes because kids, obviously
 
Xeo
@R.MartinhoFernandes I was stung once because I decided to turn my head when something touched me on my cheek. Turned out it was a wasp. :|
 
"Oh look wasps! Let's kick their nest!"
WTF was I thinking.
 
silly robot
 
11:00 AM
I once had a wasp relocate itself up my sleeve
 
relocate itself lol
 
@TonyTheLion Even sillier if you consider that I was fully aware of what such beasties were capable of: my father had three beehives right outside our door.
 
yea
I guess you were bored that day?!
 
You know what's cool?
Speck means bacon, which means there's bacon in today's lunch.
 
user1182183
hm any online irc clients which you guys recommend?
 
11:13 AM
No.
 
No.
btw robot
you want to check over my hash_map codes?
 
user1182183
yea let's wait for the other 99 "No."'s xD
 
user1182183
ah found one
 
user1182183
wsirc.com , slow on this pc, or that website is slow, but it works
 
Let me see if this is working first. I can have a quick look before lunch.
 
11:16 AM
@R.MartinhoFernandes You get served Lunch where you work?
 
@TonyTheLion Yes. Mit Speck.
@DeadMG Show 'em.
 
@R.MartinhoFernandes how convenient
 
damn VS won't accept my uniform initialization
fuckers :(
 
items_per_bucket does not seem like a good strategy to me.
 
11:26 AM
well
 
At least not as the only one.
 
originally it was std::array<iterator, items_per_bucket>
but I had to change after Jerry informed me that iterator isn't guaranteed to be default-constructible
 
I would use a load ratio (count/buckets) instead or additionally.
 
well, it seems to me that if the load ratio is < items_per_bucket, then I have no need to rehash to maintain my performance guarantees
as finding is, at maximum, O(items_per_bucket), which is constant
 
But in well-distributed inputs, you get most buckets full before you rehash.
 
11:29 AM
and ideally, I would do here, as well
but I can't guarantee constant insertion if I don't rehash when one of the buckets is full
huh
 
Sure, but constant slow insertion/search is not desirable either.
 
I actually got a warning from VS which actually represented a bug (didn't check for empty when finding)
@R.MartinhoFernandes So you think I should rehash sooner?
 
is assert(ptr != nullptr); after an allocation a valid way to verify the allocation succeeded?
 
Allocation with what
 
Xeo
11:33 AM
Depends on the allocation scheme.
 
Also, no.
 
An ideal table would have 1 item in each bucket. As is you can easily get five per bucket, in most buckets (for a good hash and non-degenerate input).
 
@TonyTheLion No.
 
allocation using new object()
 
most allocators throw std::bad_alloc if they fail.
 
Xeo
11:33 AM
With new T();, no. With new (std::nothrow) T();, yes, with malloc, yes.
 
including regular new.
 
No, assert is not a good way to check for allocation error in any case.
 
any new
 
new throws
If you use nothrow or malloc, you probably suck
 
@R.MartinhoFernandes But if I wanted to compute the load factor on each insert, that would be O(N).
 
11:35 AM
@DeadMG Erm, just add a count variable?
 
no, wait, I can just ask the list for the size.
 
But assert is for always-true invariants, allocation succeeding depends on runtime environment heavily
 
ok thx
 
Asserts are removed on release
Don't do error checking with it
 
11:37 AM
right
 
Someone on std-proposals arguing for adding a function that always results in undefined behaviour.
 
Xeo
lol?
 
what's the use in that?
 
Xeo
11:37 AM
Linky?
 
@R.MartinhoFernandes I actually thought it made a certain amount of sense.
 
@Xeo It's something about assert and optimization.
Lunch now.
 
@R.MartinhoFernandes so i discovered
 
@TonyTheLion Basically, you define assert like cond || undefined_behaviour() in release mode.
then the compiler's optimizer can optimize on the basis that cond always holds.
whereas right now, it's defined to be nothing in release mode, so the compiler cannot optimize on such a basis
 
Compilers already have builtins for hints like that
Standardise that
 
11:41 AM
man
why does the Standard define so many implementation details in the interface of unordered_map?
 
As if anyone there cares about alternate implementations
 
lol
 
@DeadMG There is no need for such a function, though.
You just say: when NDEBUG is defined and the condition does not hold, the behaviour is undefined.
As ever.
 
11:56 AM
Classy
+1 for another astounding answer, showing understanding of what goes on underneith the Spirit interfaces. [Oh, and Vim g~iw much? :)] — sehe 7 secs ago
 
underneath
peasant
@R.MartinhoFernandes So now I rehash whenever load_factor is above 0.75, or when a bucket has over 5 items. That sound good?
 
is it bad to rely on implementation defined details?
as in on compiler specific implemention details, such as where the vptr in the object is located in memory in relation to the object?
 
@TonyTheLion Yes.
 
12:04 PM
More often than not it indicates flaws in the design.
 
It might limit you to that implementation, and that can be a pain.
 
right
 
That's the reason of all the compat crap in Windows. Shitty apps depending on implementation details from years ago.
 
makes sense
 
I like the idea of the kamikaze function... I once tried to implement one using dividing by zero... and the compiler was really clever at detecting my attempt, forbidding me to compile...
 
12:09 PM
why would you want a kamikaze function?
sounds like you are doing something essentially wrong if you have a need to have that
 
I was trying to determine if the code I was executing was really the code I had under my eyes
it occured it was not
 
why not just use a breakpoint
 
__debugbreak() dude
 
it works in release mode ?
 
yep
 
12:19 PM
and if no debugger is attached, what happens ?
 
what's wrong with std::terminate if one wants to terminate
 
crash
 
oh
std::terminate seems promising also ;-)
but what was the idea behind the guy who made the proposal to the standard comitee ? he had arguments ?
 
@DeadMG Attach dialog
 
unhandled exception happens.
 
12:23 PM
0
Q: Despite violation of the One Definition Rule, how is it possible for compiler/linker to choose alternate inline constructor?

Dan NissenbaumReferring to What determines which class definition is included for identically-named classes in two source files?, in which there is a deliberate, clear violation of the One Definition Rule, I am still confused how it is even POSSIBLE for the compiler/linker to have the option of selecting one d...

hmmm
 
-1
A: Despite violation of the One Definition Rule, how is it possible for compiler/linker to choose alternate inline constructor?

Cheers and hth. - Alfdefining your constructor in the class definition is equivalent to using the keyword inline and an out-of-class defintion of it inline does not require/guarantee inline expansion of machine code. it hints about that, but that's all. the guaranteed effect of inline is to allow the same definiti...

^ Maybe I shouldn't have provoked the idiots last night. Harumph.
 
@Cheersandhth.-Alf This is the only valid answer ("it's UB" not being one)
 
Xeo
@TonyTheLion The OP there... man.
 
@Xeo I think he's trolling.
UB is UB, what the fuck do you want more?!
 
The question is actually "How does the compiler works"
 
12:38 PM
yes, well, that's not obvious from his question, I guess he should rephrase his question then
 
Hammering UB again and again is not going to help anyone here, everybody in this thread understood this already
 
how would a compiler implement this UB or whatever is a better way to phrase it
 
@TonyTheLion: as a practical matter, it can help save much time to understand what's going on. both for avoiding UB unpleasantness in the first place, and for identifying UB and getting things fixed. — Cheers and hth. - Alf 4 mins ago
 
@Cheersandhth.-Alf Capitals, man, capitals.
 
I was always under the impression that trying to understand UB is rather pointless
it's UB for a reason.
 
12:40 PM
^ Getting to know the standard does not guarantee you predictable results all the time. Once you did a mistake, no diagnostic is generally required so it's best to know what happens in UB situations and why
 
but the question is, at compiler level, does a specific implementation make guarantees about what happens when UB occurs?!
I thought the whole point of UB was that implementations don't have to specify what happens when UB occurs
 
Imagine if you were to dereference null pointers and it decreased the counter of a shared pointer instead. That would be legal, but it's not actually the case. The fact that NPEs break in a consistent way helps you fixing your bugs, even though there's no guarantee in the standard
 
I'm not sure that that specific behaviour would be something to rely on when debugging null dereferences, even on a specific implementation.
 
@TonyTheLion They don't, but it can't hurt to know what they actually do
 
hmmmm
 
12:44 PM
Let me rephrase
If your app crashes with a message of the likes of "can not read at address 0x00000000"
There's good chances that you dereferenced a null pointer
It's not in the standard though. It's UB. It is useless knowledge?
 
right
I see what you're saying
 
It's very unlikely that it happened because of an ODR violation for instance
 
@kbok Sometimes it can.
 
Xeo
Y'know, I'm surprised there is no std::is_aggregate trait.
 
but the point is, it could also be that next time you have a null dereference the program carries on and does something completely different
 
12:47 PM
@Xeo Is it useful?
 
@R.MartinhoFernandes Only if you're silly
 
Xeo
It tells you whether you can initialize stuff with aggregate initialization.
 
Is that useful?
 
@TonyTheLion It could, but I see things the other way around. Not error->expected behaviour, but more observed behaviour->probable error
Which is, I think, what the OP is trying to achieve
 
@kbok It can hurt you when you know what they actually do, but they decided to do it different this time. I am not arguing against your main point, I am just saying that you cannot really trust what you know about UB.
 
12:51 PM
@R.MartinhoFernandes Sure. You always have to keep in mind that the only expected behaviour is the one that is written in the standard.
 
What the...
0
Q: #define line of code to something else

B_o_bIs it at all possible in c/c++ to do something like to following: #define (_asm int 3;) (exit(1)) So that everywhere in my code this line will be replaced at compile time. I know this is bad practice but is it possible. cheers

 
There's foggy regions, too, like the bugs in MSVC. You have to know how it's implemented since you know it doesn't respect the standard.
 
bugs in MSVC are no different to bugs in any other compiler
 
@DeadMG Yes they are. They get closed as WONTFIX.
5
 
12:54 PM
#define _asm exit #define int (1) #define 3 et voila! — kbok 26 secs ago
Entering full troll mode ^
@DeadMG There is more of them. Also what the robot said.
 

« first day (775 days earlier)      last day (4172 days later) »