« first day (761 days earlier)      last day (4173 days later) » 

Xeo
11:00 PM
@ThePhD My bet's on a buffer-overrun.
 
@melak47 Yeah, buffer overrun. I've blown up something important and the stack's not happy.
@Xeo Why u read my mind. :c
 
This is the sad truth. :)
 
@ThePhD I just did the same thing :)
 
Xeo
@ThePhD There aren't that many ways to smash the stack
 
The weird part is, -I'm- not even catching the stack smashing.
 
11:01 PM
@kbok I want to make it simpler than that, even. Just instantly install and make an icon on desktop without clicking a single thing.
 
DirectX is.
It throws an error when I try to use the ID3D11Device::CreateTexture2D
 
@Crowz You may be able to make a "portable" exe - like utorrent does. But I have to warn you, users usually get lost with that kind of stuff
 
@ThePhD there's ways to detect a smashed stack, and most Windows calls will try to detect it
 
How nice of them.
 
0
Q: Are volatile data members trivially copyable?

Lightness Races in OrbitWhilst writing this answer I realised that I'm not as confident about my conclusions as I usually would ensure before hitting Post Your Answer. I can find a couple of reasonably convincing citations for the argument that the trivial-copyability of volatile data members is either implementation-d...

Doesn't that depend on the data member's type rather than the volatile qualification?
 
11:02 PM
@kbok If I make an exe with java, does the machine running it have to have the java thing?
 
You have to give them an installer. It's like the old lady who prefers waiting in line than using the machine at the post office.
 
@Crowz java doesn't "make" exes
 
Ell
Is there a cross platform executable format? Like elf/exe combo?
 
@Crowz No, there is a bundler somewhere which put everything you need into the exe
 
@MooingDuck explain, MERLIN WITH YOUR BOOK OF SPELLS AND POTIONSSSS
 
11:03 PM
@kbok well, grandma wants her programs to b installed so they end up in the start menu and god knows where :D
 
Do it like minecraft. AppData/Roaming/.minecraft
 
@Praetorian That's another way to formulate the same question rather than an answer.
 
@Crowz java makes java bytecode, or something :p
 
@melak47 That's what I'm telling him.
 
@ThePhD ew ew ew ew ew no.
 
11:04 PM
@Crowz java.exe is a program that "interprets" .jar files. Java code compiles to .jar files.
 
@Crowz You can make a .exe out of a .jar file.
 
@MooingDuck Ah huh... so what do to make a runnable program?
 
Who needs that Program Files nonsense when you can do AppData/Roaming/, @melak47 ! If Minecraft can do it, we can too!
 
@Crowz Normally Java doesn't do that. You give them the Jar and they need to install Java to "run" your code.
@ThePhD it's a bad idea
 
@ThePhD I don't want shit to install itself into my appdata folder (nevermind without asking!)
 
11:05 PM
@MooingDuck There are ways, stop confusing him :)
 
@MooingDuck Would it be better to just rewrite my program in C++?
 
@Ell no.
 
Thankfully there are mods that install Minecraft in other places.
Saves you the agony.
 
@kbok not officially
 
@Ell .jar :p
 
11:06 PM
@Crowz no
 
@ThePhD thankfully, I don't play minecraft :)
 
Technically, most people have java.
Usually some application or something comes along by now and DEMANDS you have Java.
Because {reasons}.
 
@MooingDuck Not from sun indeed, but most installers aren't from MS either
 
This sounds like way more trouble than it's worth hah, I'll just give up on it
 
@kbok I hypothisize that the Java standard specifies .jar files.
@Crowz there's programs to compile .jar to .exe
 
11:08 PM
@ThePhD usually because it's a java application :p
 
@MooingDuck Oh yeah, but you can make a launcher from your jar which will auto-detect the java install / download the appropriate version then launch your app
 
@LucDanton Reading the n3159 issue that he's linked to, it seems that the answer to the question is - it is not specified
 
speaking of java and minecraft...
user image
6
 
@MooingDuck yup
 
I think I need to figure out how to detect a smashed stack.
 
11:10 PM
@ThePhD don't smash it
 
@melak47 A little late for that.
 
well..uh
 
"programming code" ? Is he from australia or something ?
 
@ThePhD how about fixing it, then running it again? :p
 
@ThePhD if you have linux: valgrind
@ThePhD if you have windows: expensive tools, or HAHAHAHAHAHA cry
 
11:12 PM
Unfortunately using Visual Studio.
 
@melak47 I don't get it D:
 
@ThePhD you could find all places with pointer arithmetic and [] and put asserts around them
 
@ThePhD if you substitute a std::array for your regular array, it will tell you while debugging where you are going out of bounds :)
 
@MooingDuck I'm doing the 'comment one thing out one by one by one' dealio.
 
@Crowz it's funny because java sucks and minecraft sucks because it's made in java :D
 
11:13 PM
@melak47 I like minecraft. it's just HORRIBLY programmed
 
jsomething is the one that saved Minecraft.
Before it ran terribly on all compuers ever.
 
Minecraft taught me that even in garbage collected languages you can force it to "leak" memory.
 
Why does it matter how something is programmed?
 
ALRIGHT
I think I found
 
can't one of you make a c++ minecraft
 
11:14 PM
the buffer overrun
 
truth be told
 
then problem solved
 
@ThePhD just take a look at the obvious things. it's probably an index off by one :p
 
smash stack is a sign of le terrible unsafe codes
I usually "detect" them by not writing unsafe codes
 
@ThePhD complete sentences please
@Dave no
 
11:14 PM
@MooingDuck Sorry, I was excited. :c
 
why not
 
@Dave Years of hard work and I'd have to know lots of things that aren't publicly available. Also money. And copyright.
 
There are a lot of people who have made Minecraft C++ engines, just not with all the bells and whistles Minecraft has.
Really the biggest problem is how to handle the voxel'd terrain.
Also the server code is terrible.
 
@ThePhD "engines"? you mean servers?
 
No no, like
Cloned the idea in C++
 
11:16 PM
I could make a C++ Minecraft, but why the hell would I want to do that
 
Not fully, it's mostly just them doing Look at me, I can do VOXELS
 
Given my current options, making a C++ Minecraft does not look like a good choice
 
Make C++ Minecraft with hexes.
 
Everyone loves hexes.
 
11:18 PM
hexcraft
 
No, Hexc++raft
 
Hecsharp.
 
heh
 
Yay, lightweight C++.
 
11:21 PM
What language is best for sound manipulation?
 
python?
 
CSound?
Or is that just a wrapper around something...?
 
Xeo
@Crowz Any language that has a decent sound lib?
 
If you mean real-time sound manipulation, though
You'll need some serious performance
Woo!
Buffer overrun conquered!
I'm So good at this!
 
I just want to make pretty noises <3
 
11:24 PM
Hm.
 
Mostly just randomized psychotic riffs for my music
 
Arrrgggh.
 
Xeo
@ThePhD No, otherwise you wouldn't have had one in the first place. :3
 
What he said.
 
@Xeo I'm trying. ;~;
 
Xeo
11:26 PM
@Crowz drpetter.se/project_sfxr.html is pretty nice.
0
Q: Sorting a vector of structs having pointer

AnonymousBelow is my code: typedef struct { unsigned page; unsigned slot; } RID; //Below struct has the Key on which I want to apply the sorting struct LeafDataEntry { void *key; RID rid; }; //This is the sorting function I am using bool leadNode_Key_asc( const LeafDataEntry &a, const ...

MY EYES! Suffer with me. :(
 
@Xeo You're on your own.
 
@MooingDuck @Kerrek has a C++ Minecraft server, too
 
anyone here know perl well?
 
I made it working on windows
 
Is this worth being proposed for a proposal? Also, does it make sense to have this in standard?
 
11:28 PM
@Griwes no, it's unnecessary, promotes bad practices, and is dog slow
 
Xeo
@Griwes implicit conversions etc...
 
@Xeo Goggles on
 
My eyes landed on std::function used as a function parameter and I automatically agree with all criticisms.
 
@MooingDuck Oh, so explicit getters and setters are great practice and much faster?
 
Xeo
@LucDanton lol
 
11:29 PM
Nah, it's a sketch.
 
@Griwes That's a false dichotomy.
You suck.
 
Xeo
@Griwes No, getters and setters are a general plague. :)
 
@Griwes having both getters and setters is a bad practice, and using std::function in that way will have to allocate stuff on teh heap. At least explicit getters and setters are less confusing.
 
@MooingDuck std::function is implementation detail, I was asking more about the idea.
 
No, you asked if it's worth a proposal. If you are at the idea stage then the answer is still 'no'.
 
11:30 PM
@Griwes why do you think we need a properties class? What's the use-case?\
 
But meh, we are following "explicit for teh rulez" now, it seems.
 
@Griwes why does assigning one property to another execute the getter of one and the setter of the other? Violates rule of least surprise.
 
Not going to waste my time to try to come up with use case.
Again, sketch.
proposing for a proposal != creating formal proposal, in case you didn't notice.
 
Answer is still no. Because you are at the idea stage it's not even clear that you have a good idea.
 
@Griwes You're ultimately just creating public access to the value anyway. Making the variable private does nobody any good if you give public access to its value anyway.
 
11:32 PM
@MooingDuck a.b = c.d;
@JerryCoffin Ough. It's not for general get/set as it is, but for doing something before returning/setting.
 
@Griwes I'd rely on the implicit conversions there, instead of making them explicit then. But I see the point .
 
For something like this to be useful, it needs to enforce something other than what the base type would provide. For example: ideone.com/X7uara
 
@Griwes I think it makes more sense to have explicit functions rather than hiding them behind what looks like a variable.
@JerryCoffin that's what the std::function types are for. It is usable in teh way he describes.
 
@MooingDuck If something is really a variable, better to make it look and act like one.
 
@JerryCoffin His type is for adding enforcements like that to an existing member variable, but it still looks like the original variable.
 
11:36 PM
@MooingDuck My main motivation behind this was a guy that came to ##C++ few days ago and told us that he uses explicit getters / setters, because somewhere during the development he might decide that he needs some checks etc.
 
@Griwes good, that is the correct action for him to have taken.
 
@MooingDuck Yes, I realize -- the problem is you're delegating things so widely that as it stands, this contributes virtually nothing. If you're going to delegate to the "enforcer", it should at least be a template parameter so the code can be inlined.
 
But it has left him with lots of quasi classes.
 
@JerryCoffin oh there you go, that's a better idea
@Griwes it should avoid quasi classes.
 
Wait, from the beginning. He was writing quasi classes.
Because one day he could need the getter or setter.
 
11:38 PM
gah, I have two files that should be identical, except one of them has random capitalization. In reality, they're slightly different, and I can't find the difference :(
@Griwes what exactly do you mean by "quasi class"?
 
And because it's not trivial to change a.b into a.get_b() and a.set_b() over the entire codebase.
 
@MooingDuck Don't you have a diff that can ignore capitalization?
 
@JerryCoffin For some reason I never considered that my diff tools might have that option.
 
If he could just use value where possible, and later change that value type into some kind of C#ish property, it would make him write less dummy getters/setters.
 
@MooingDuck If you don't, you could run both through tr to convert them entirely to lower case, then diff with pretty much anything. Given the number of case-insensitive languages around, though, there certainly ought to be some case-insensitive diff tools to go with (and a quick check confirms that even WinDiff can be case-insensitive).
 
11:43 PM
@MooingDuck Nah. YAGNI applies here.
the vast majority of member variables which are like that do not genuinely require refactoring
so it's really quite a waste to set/get in advance.
 
It works!!!!!
<celebration/>
I can load PNG fiiiles!
WITHOUT LIBPNG!!!!!!!!!
WoooooooooooooOOOooOOooooOOooOoooo
 
Humpf
 
@JerryCoffin AHA! FOUND IT!
 
@ThePhD Congratulations!
 
@JerryCoffin (thanks)
 
11:46 PM
@MooingDuck Surely.
 
My personal projects always end up in a pile of steamy crappy code
 
Now the very last thing I need is Ogg Vorbis support.
 
@JerryCoffin on line 3684, I changed a 2 to a 1.
 
And I will have an arsenal of tools that rivals any commercial engine's loading power!
With none of the external dependencies!!
AND ALL WITH FREELY LISCENED DIGITAL CONTENT!!!
Weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee‌​eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee‌​eeeeeeeeeeeeeeeeeeeeeeee
 
What do you advise for a 2d array of bools ?
I have a class wrapping vector<bool>
 
11:48 PM
@kbok depends on if speed or space is more important, either vector<bool> or vector<char> or std::bitset
 
Why does the same ad play on YouTube so goddamn much?
 
Is vector<bool> slower than vector<char> ?
 
@kbok theoretically
 
@MooingDuck Hmmmm...I'd have guessed at line 42, so I guess those tools really are good for something!
 
Oh
I'll measure then, this is surely not the bottleneck anyway
 
11:49 PM
@MooingDuck You don't lose that much speed for having an internal array of like, char[] and then doing bitshifting, no?
 
But I need any speedup I can take
 
@Crowz Because the market for the wonderful political ads suddenly dried up.
 
@ThePhD not much, but some.
 
Hey guys can someone help me with my memory pooling system ? I have everything up and working, but "deleting" the allocated memory is creating a problem. Basically, even when I Statically allocate an object of the class whose dynamic objects are pooled, on destruction it calls its destructor, which ofcourse tries to free that memory as if it was allocated from the pool and then everything dies a horrible death. is there any way to fix this without having to put shitty check logic in deletion ?
 
Nov 8 at 13:21, by Tony The Lion
If you're new here, read the newbie hints. Thanks!
 
11:49 PM
@JerryCoffin I voted against Elizabeth Warren for the sole reason that she had too many damn ads
 
@MooingDuck What.
 
@MooingDuck lol
 
Xeo
@MooingDuck He's not new, though. :)
 
For some time, I ... wondered

Help Desk

For Turbo C/C++ and Dev-C++ questions
 
@MooingDuck am not new Duck just havent been here in a while, you infact helped me a few times
 
Xeo
11:50 PM
Hmm... Any idea when a copyable but not movable class (private / deleted copy ctor) might make any sense?
 
@angryInsomniac I don't understand the problem. Why would freeing memory cause everything to die a horrible death?
@Xeo no
@angryInsomniac oops
 
@Crowz Sounds like better reasoning than most people use.
 
Ell
@xeo value_ptr?
 
Xeo
@Ell ?
 
@JerryCoffin I like the other dude's policies better anyway so it worked out.
 
Ell
11:52 PM
Isn't that the thing that copies only?
 
Xeo
Err, no. It behaves like a value (deep copy / move), but the content resides on the heap.
 
@Crowz That kind of ruins the "sole reason" part, but who am I to quibble?
 
@angryInsomniac wait, I think you're misusing the pool. Objects allocated inside a pool should be blissfully unaware of the pool's existence.
 
Ell
Values move? O.O
 
11:53 PM
@Xeo When you really just need to relax and slow things down a little?
 
@Ell thats how value semantics works, yes
 
@JerryCoffin Wouldn't have voted otherwise
 
Xeo
@JerryCoffin Wut?
Oh, lol.
 
Okay guys, testing debugging in kdevelop.
 
Xeo
And I just noticed I wrote "copy ctor" instead of "move ctor"
 
11:56 PM
@Xeo That did leave me puzzled -- for a second or so, but certainly not much more.
 
@Xeo wait, yes. If the location of the object is "registered" in any way, that might be copiable (register the new copy), but not "movable".
 
@MooingDuck They are unaware, but the deletion of a pool managed object should call something like Pool.Free() right ?
 
It's a pile of crap.
Rebooting now, I need VS :(
fuckfuckfuck
 
@MooingDuck Why not.
 
@MooingDuck But moving doesn't change the object's location -- only the location of whatever owns it. I suppose it could make sense if the object has explicit knowledge of its container...
 
11:57 PM
If you can register new copy, you might as well register moved one while unregistering the old one
 
@angryInsomniac what? How would they know they're pool managed? I think there's a communication error somewhere
 
Xeo
@MooingDuck And how do you destroy those objects? That has the same problem if the object doesn't know about where its location is registered.
 
It's probably silly but oh well
 
@CatPlusPlus the incorrect location would be registered. It would have to reregister, which would effectively be a copy
 
@angryInsomniac Why would you free your own memory in a destructor? That's a bad, bad, bad idea.
 
11:58 PM
Unregister old, register new
 
Xeo
What the Cat says.
 
@JerryCoffin what? No, if I have a (where c knows the address of a), and then b = move(a), then that has to let c know that a has been moved to b somehow.
 
@MooingDuck They dont , ok i'll try to be a little more explicit, If I manage a bunch of Vector3D's using my pool (12 byte objects) , the Vect3D doesnt know where the memory is coming from, but it gets a vector , hums along nicely , when I cann a delete on said vector , I need to mark the corresponding location in my pool as free again
 

« first day (761 days earlier)      last day (4173 days later) »