« first day (496 days earlier)      last day (4466 days later) » 

5:04 PM
Does anyone here use LibreOffice? The spell checker doesn't work for me at all
 
Does anyone here know where I can find the possible values that can be passed as the second parameter to mkdir? The man page of mkdir doesn't tell anything.
 
0
Q: convert text hex to real hex representation C++

user1231229I have the following file format | 00 00 07 09 | for example in a text file I need for a way to parse it so that each time I find a string between "|" convert the inside to real hex representation for instance | 30 | will give me 0 how can it be done in C++ (damn C# makes you so lazy and dump).

> C# makes you so lazy and dump
apparently he's right
 
user784668
Most current file systems have methods of administering permissions or access rights to specific users and groups of users. These systems control the ability of the users to view or make changes to the contents of the filesystem. Differences between operating systems Unix-like and otherwise POSIX-compliant systems, including Linux-based systems and all Mac OS X versions, have a simple system for managing individual file permissions, which in this article are called "traditional Unix permissions". Most of these systems also support some kind of access control lists, either proprietary (ol...
 
@Fanael I was talking about the function mkdir, which constants you can pass to the second argument in C.
 
user784668
@daknøk Have you read the article I linked to?
 
5:17 PM
Yes
It doesn't list them.
 
@daknøk The article has the numbers in it
@daknøk search for "Octal Notation"
 
user784668
@daknøk Ah. So you didn't. Try again, now for real.
 
Ahh I see, but the man page of mkdir gives this example: mkdir("/path", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH).
 
@daknøk so they have constants. Note the RWX for User, Group, and R for Other
 
user784668
@daknøk It's 0775. rwx for user and group, r-x for others.
 
5:20 PM
@daknøk in any decent IDE, you can right click those symbols and go to their definitions to see the full list.
(Does Vi or Emacs do that?)
 
@MooingDuck thanks! @Fanael you too.
 
@Fanael oh look, that command wrapped. oops
 
@Xeo is a dirty liar.
 
Xeo
Huh?
 
Him or the Clang SVN log
 
5:22 PM
<C-]> if you have tag file.
 
Clang still crashes on braced initializer lists
at least non-trivial ones
 
Xeo
initializer lists aren't finished
And I never said that
 
@Xeo I beg to differ
yesterday, by Xeo
@rubenvb Lambdas have been functional for a while now in Trunk, aswell as initializer lists (very recently)
 
Hey guys
 
Xeo
"functional" != "finished"
jeez
 
5:26 PM
@Xeo functional is at least: does not crash the compiler... at least in my book
lol
getting me all excited for nothing
 
Xeo
Well, what does you initializer list look like?
 
user784668
@Xeo "Functional" == "works". "Not finished" == "doesn't yet work".
 
it's for a map, using an enum class, one sec
 
Using the word "functional" is confusing in context of lambdas :S
 
@Fanael I sorta see "functional" as "works for most cases", but "finished" means "works for all cases"
 
5:29 PM
@Pubby most words are confusing when talking about C++.
@MooingDuck That's what I understood yesterday. Imagine my hollow disappointment today :(
 
user784668
@MooingDuck Then what about "finished but buggy"? It works for all cases, because it's finished, but it doesn't for some, because it's buggy?
 
@Fanael that's not finished
 
@MooingDuck unless you're never going to work on it any more
 
user784668
@MooingDuck Then nothing is. Every piece of software has at least one more bug than you think it does.
 
@SethCarnegie good call, my definition falls short
 
user784668
5:33 PM
Does somebody here know a good functional testing tool?
 
@Fanael testing in what sense?
A cattle prod is an effective tool to test if someone is alive, for example
 
Good in the sense of not being bad
 
user784668
 
as in, it compiles and runs the tests, and reports failures?
 
user784668
@rubenvb Yeah.
 
5:34 PM
libc++ has a truly advanced testing system like that: llvm.org/svn/llvm-project/libcxx/trunk/test/testit
it really fits the bill, while being as far from what you want as possible :P
Each file tests a certain paragraph of the Standard. The .fail.cpp or pass.cpp says if the test should fail or pass.
There's even Windows support :)
 
ouch

http://www.youtube.com/watch?v=LEFCQRwj28w
 
user784668
If they can roll their own bash script for testing, so can do I. But I'll use Python instead.
 
sbi
I'm still missing 110rep to 60k, no question in sight that would guarantee 10 upvotes, and I just don't find the time today to plow through half a dozen questions getting 2 upvotes for each.
 
user784668
@sbi What do you need 60k rep for?
 
@Fanael that was kind of exactly my point. It doesn't have to be featureful to be incredibly useful :)
 
user784668
5:43 PM
@rubenvb I never stated otherwise. Given my needs, something like libc++'s testit is good enough.
 
@Fanael lol, well, at first it was a joke :)
 
user784668
@rubenvb Yeah, but there's nothing wrong in using a simple tool for simple needs, is there?
 
@Fanael I never stated otherwise ;)
 
Hi. Is there a slick way to do the equivalent of range(n) in Python? Namely have a container containing a sequence of values {0,1,2,3,\dots, n-1}?
12
A: How to fill a vector with non-trivial initial values?

moogsYou can use the generate algorithm, for a more general way of filling up containers: #include <iostream> #include <algorithm> #include <vector> struct c_unique { int current; c_unique() {current=0;} int operator()() {return ++current;} } UniqueNumber; int main () { ...

 
sbi
@Fanael Nobody needs 60k. :) But would we be here if we thought that way? I have taken more than half a year to crawl through the last 10k (end of 2010 that took only 3 months) , and it'd be nice to not have to look at the numbers for another year, waiting for the first digit to roll over.
 
5:45 PM
Has a solution for example, but it is a bit cumbersome.
 
@FaheemMitha Boost.Range has irange
 
@CatPlusPlus I'm stuck with Boost 1.42 unfortunately.
Otherwise that sounds good.
 
Then copy Range over.
 
@CatPlusPlus I guess that's an idea.
 
5:47 PM
Ah wait, that's pretty much what you linked to :/
 
irange has been added in 1.43.
 
@rubenvb Right, except that I don't see easily how to squeeze a generator into a lambda. Doesn't it require state, i.e. a struct?
@CatPlusPlus So near and yet so far... :-)
 
@FaheemMitha a static inside the lambda should work, but only once per execution of course
 
int idx = 0; std::generate(xs.begin(), xs.end(), [&idx]() { return idx++; });
 
@CatPlusPlus or that.
 
5:49 PM
I'll see if irange is selfcontained. Maybe I can copy it.
 
Probably not.
Alternative idea: Boost.Iterator.
 
@CatPlusPlus : Can you post a complete example?
 
std::vector<unsigned> range(unsigned n) { unsigned i = 0; std::vector<unsigned> xs(n); std::generate(xs.begin(), xs.end(), [&i]() { return i++; }); return xs; }
 
@rubenvb : Since the lambda is defined exactly for that invocation, that should be ok, right? Can you show me how that would go?
 
user784668
@sbi I've taken more than half a year to crawl through the first 1k. And do you really have to look at the numbers? They're basically meaningless when having tens of thousands of rep or more. (I think that they're close to meaningless even when having 1 rep.)
 
5:51 PM
@FaheemMitha use @CatPlusPlus's solution. It's a lot better than meddling with statics
 
@CatPlusPlus Oh, I see. Ok, I'll give that a try.
@rubenvb : Ok.
 
sbi
@Fanael Do you really think you need to explain that to me? When I started to again answer a few questions a week some here were surprised I'd do this at all. :) And if you look at my rep graph you'll see that I seriously hit this chat room in Dec 2010 — because my rep graph considerably flattens around that time.
 
user784668
@sbi Yes, I do. It's not me who cares about the ten thousands' digit in the rep counter, mind you.
 
sbi
@Fanael Rolls eyes.
 
6:04 PM
@FaheemMitha With Boost.Iterator: ideone.com/QgwYh
Should be n += a; in advance.
 
@sbi hmm, my graph looks just like yours, but with smaller numbers in every direction. Though I'd guess that's pretty par.
 
sbi
@MooingDuck Except that a dent in my graph signifies four times as long a slack than one in yours. :)
 
@sbi I said all my numbers were smaller in every direction :D
 
@CatPlusPlus holy crap man
 
6:09 PM
@sbi What happened October 8 '11? You lost like 600 rep!
 
@rubenvb oh, makes sense
@CatPlusPlus you've got like double the rep gain of sbi and myself over the last 6 months
 
sbi
@MooingDuck I dunno. Maybe I handed out a bounty? Or some question I had won a lot in was closed/migrated? A rep recalc?
 
Aargghh screw mkdir, imma use Boost.Filesystem instead.
 
why can't temps be passed as non-const references?
 
user784668
6:12 PM
@MooingDuck They can. T&&.
 
@daknøk did I hear a rumour that was going to become "officially blessed" at some point?
 
@Fanael but why not to const T&?
 
@awoodland why?
 
There's a proposal, I think.
 
@awoodland I heard that as well
 
user784668
6:13 PM
@MooingDuck They can be bound to const T&.
 
sbi
@MooingDuck Mhmm. I can't even see this from the graph.
 
@daknøk Boost.Filesystem will be in the next TR was the rumour I'd heard
 
@awoodland that would be really awesome.
@CatPlusPlus that is really awesome.
 
@Fanael let me try again. Why does the C++ say we can't pass rvalues to a function expecting a T&?
@sbi It's in the programmers exchange thing, you had a drop I saw
 
6:14 PM
Er, rvalues do bind to const T&.
They don't bind to T&.
 
@CatPlusPlus er, yeah, that (wow, I can't pay attention to what I'm doing)
 
@CatPlusPlus Thanks.
 
user784668
@MooingDuck Now that's a good question!
 
sbi
@MooingDuck That was a decision made by Stroustrup very early on. He tried to protect you from yourself. If this was allowed, you could pass a temporary to a function taking a T&, the function would change the temporary, and then those changes would simply get lost.
 
@awoodland I heard that a few years ago for C++0x
 
sbi
6:15 PM
@MooingDuck On Oct 8th, 2011? I can't see it.
 
@sbi oh, then added a form for explicitly taking temporaries.... good ideas
 
sbi
@MooingDuck Only that T&& wasn't added until 30 years after that decision...
 
user784668
@MooingDuck Funny, "then".
 
@sbi the important thing is it happened
 
oh hai
 
6:18 PM
@TonyTheLion we didn't say the passphrase to let you in yet!
 
sex
 
user784668
porn
 
@rubenvb k, now all is well
 
there, @TonyTheLion is free to enter
 
user784668
@MooingDuck Er, what?
 
6:18 PM
32 secs ago, by rubenvb
sex
 
nak
No thank you
lol
 
user784668
45 secs ago, by Fanael
porn
 
cya guys, I'm gonna sing and not get drunk cause I'm driving
 
sbi
@MooingDuck Oh, that's at programmers!
 
:Cantus redirects here. For other meanings of "cantus", see Cantus (disambiguation) A cantus (Latin for 'singing', derived from 'cantare'), is an activity organised by Belgian, Dutch, French, Baltic and Afrikaans student organisations and fraternities. A cantus mainly involves singing traditional songs and drinking beer. It is governed by strict traditional rules. The use of this dates back a few centuries and was inspired by German student organisations; however some of the songs that are sung date back to the Middle Ages. Cantus probably shares same roots with Commercium, Sitsit and T...
cheers
 
6:20 PM
so how popular/good is Ogre? I haven't heard of it until about a year ago. I'd been considering using irrlicht for a upcoming project.
 
oh thanks for saying letting me enter :P
 
6 mins ago, by Mooing Duck
@sbi It's in the programmers exchange thing, you had a drop I saw
 
nak
@MooingDuck I know someone using Ogre to develop a strategy game, its very early stage still
 
sbi
@MooingDuck I took this for a convoluted way to says "StackExchange". Sorry.
@MooingDuck Nothing unusual to see here, so I guess it must have been a recalc after some immensely popular answer(s) of mine were deleted.
 
Ogre is a singleton singleton singleton singleton abstract factory manager.
> OGRE uses a C++ feature called namespaces.
Wooo.
(Let's make fun of OGRE!)
 
nak
6:25 PM
lol
 
user784668
@CatPlusPlus You forgot about singletons.
 
I mean, just look at it.
> The root object is also your method for obtaining pointers to other objects in the system, such as the SceneManager, RenderSystem and various other resource managers. See below for details.
 
Gotta manage the stuffs.
I suppose the SceneManager manages scenes. Like, gets them contracts and that kind of thing.
 
> The SceneManager is in charge of the contents of the scene which is to be rendered by the engine. It is responsible for organising the contents using whatever technique it deems best, for creating and managing all the cameras, movable objects (entities), lights and materials (surface properties of objects), and for managing the 'world geometry' which is the sprawling static geometry usually used to represent the immovable parts of a scene.
DO ALL THE THINGS!
Root is funny, too, as it does literally everything.
 
user784668
6:28 PM
@CatPlusPlus Does it brew coffee?
 
Through a CoffeeManager.
 
"and for managing the 'world geometry'" I honestly can't understand what it means to "manage geometry".
 
> Additionally, because the manager uses the StringInterface class to issue commands/params, no change to the material script reader is needs to be made. As a result, if a plugin needs a special parameter set, it just creates a new command in it's Parameter Dictionary. - see ffmpegVideoSystem plugin for an example. To make this work, two classes have been added to OGRE: ExternalTextureSource & ExternalTextureSourceManager.
 
SceneManagerSingleton::Instance().Geometry().Manage(ManagementSkill::Little);
 
@RMartinhoFernandes That seems to be everything that doesn't move
 
user784668
6:31 PM
Can someone answer a question?
 
user784668
@MooingDuck It's already there.
 
@MooingDuck And what would "manage everything that doesn't move" mean?
 
Hi guyes don't you rememver the name of soft which helps to make eyes on photo alive? it's special soft ( not PS or corel ), can't find in google, may be you know the name?
thanks
 
6:32 PM
@RMartinhoFernandes holds it in memory, loads and unloads, renders/culls (I'm speculating)
 
user784668
@user1131997 What do you mean by "alive"?
 
@user1131997 Crazytalk?
 
@user1131997 It's "software", not "soft".
 
@Fanael this soft can make animation from static picture and make photo alive in this way
 
Irrlicht has pointers all over the place, but doesn't seem to be too singletoney.
 
6:33 PM
@MooingDuck Oh, so it's a variable (holds things in memory), a loader, and a renderer.
 
@CatPlusPlus are you simply making fun, or is there a library you prefer?
 
@CatPlusPlus better singletons than pointers.
 
Though it also has SceneManager thingy.
 
user784668
@daknøk Better pointers than singletons.
 
@daknøk You got that backwards.
 
6:34 PM
@daknøk Singletons usually come with pointers, because people don't realise you can dereference the pointer.
 
@user1131997 Sounds like crazytalk to me. No, thats the name of the software
 
@daknøk soft is a cut word of software
 
@CatPlusPlus so I should learn irrlicht over ogre for my project?
 
@user1131997 which doesn't read well.
 
Maybe we should use nails instead of variables to hold things in memory.
 
6:35 PM
I don't know, I've never done anything complex enough to require a 3D engine.
I'd probably look at UDK or Unity first, though.
 
@MooingDuck Irrlicht is simpler, I've used both.
 
@kendfrey It's pretty good, that you are listening to crazines, I can give you advice to stop using DOB
 
If I'm going to use an engine, then let's go all the way.
 
@user1131997 huh?
 
@CatPlusPlus hmm, I think I'll stick with free since I never finish my projects
 
6:38 PM
Both UDK and Unity are free.
 
this soft was exaclty specilized for making static pictutre in motion and recognizing eyes on photos and make blinking, I also have said , that it's very small program ( not PS or Corel editor ) and only specialized on it
 
Well, not open free, but I'm not going to be poking inside big engine anyway.
 
@CatPlusPlus wikipedia says you have to pay $99 + portion of profits for UDK. I'd like to at least pretend I'll finish some day.
 
> Use of the UDK for noncommercial purposes is free of charge. If you are going to use the UDK for any commercial purpose or in any way that is not specifically authorized in the end-user license agreement (EULA), you must agree to appropriate commercial terms.
Royalties start after you earn 50000$.
 
@user1131997 Thats what Crazytalk does. reallusion.com/crazytalk I don't know of any other similar software.
 
6:45 PM
@CatPlusPlus have you used UDK and Unity? Actually, better question: what would you recommend to someone just getting into graphics stuff?
 
11 mins ago, by Cat Plus Plus
I don't know, I've never done anything complex enough to require a 3D engine.
 
oh daknok was the one who said he'd used them
 
I stick to 2D and plain OpenGL.
 
@daknøk what would you recommend for someone just getting into graphics/3d?
 
But UDK/Unity look nice.
Though for learning 3D itself you probably don't want an enormous engine doing everything behind the scenes.
 
6:49 PM
@MooingDuck C++?
Irrlicht.
 
@CatPlusPlus I've used .net to do simple graphics, but nothing even as complicated as sprites :/ I learned a little openGL in colllege, but I seem to have missed some concepts
 
Then play with OpenGL, and save engines for later.
 
XNA is a good way to learn the basics of 3D graphics.
 
@daknøk excellent, that's what I'd downloaded and started the tutorials on. Seems lacking in documentation/tutorials though.
@CatPlusPlus I had a 100 polygon model sliding around, and was only getting about 40 fps. Apparently I did everything wrong.
 
Meh, performance.
 
6:51 PM
@CatPlusPlus 100 polygons and no animation or processing should do more than 40fps
@ScottW I guessed I was accidentally sending the full model and textures from RAM to the video card every frame. Not that I know what I'm talking about.
@ScottW ever since that class, I've wondered how modern video games do shoulders and other joints. Do they hardcode all the movements, and do it dynamically?
@ScottW I figure I'm less likely to make mistakes like that with a layer a little above pure openGL, so I found irrlicht
@ScottW not bones, the skins.
like, in Skyrim, when npc's ragdoll, their arms go flailing. But the shoulders look naturalish. I was wondering if they have to calculate where each polygon is in the shoulders every frame, and how they do that
@ScottW that explains the references to weighting models for skyrim
 
7:20 PM
@ScottW it gets a thumbs up from me
 
Just got a copy of C++ Coding Standards: 101 Rules, Guidelines, and Best Practices. :)
 
It probably sucks.
 
Why would it?
 
It's not on the list.
 
It is, intermediate № 5.
 
7:33 PM
Oh, different title.
 
-1
Q: inline function definition in C++ ?

user1002288This a C++ online test question. The test has been done. class Person { public: string const &getname(void) const ; } inline string const &Person::getname() const { return name; } A: the computer inserts the code of the function getname() B: the com...

 
7:49 PM
Lol, A, B, A, A, I choose A.
 
I choose "-1".
 
That's UB.
 
@RMartinhoFernandes oh hey, I just answered that
 
@RMartinhoFernandes there's no name declaration given anywhere either
 
7:55 PM
@daknøk jawdrop
 
I want to know why people allocate containers dynamically.
 
@awoodland I was going to fix that bu there was an edit pending confirmation so I can't edit until that goes through.
 
@CatPlusPlus Because they're stupid. There. Now you know.
 
@RMartinhoFernandes "Reproduced, but after adding spaces around the + it works as intended." so which moron wrote the PHP lexer?
 
@MooingDuck that got approved now
 
7:56 PM
@CatPlusPlus because containers put data on the heap!
 
@MooingDuck My workaround for that is to handcraft a link that leads to the old not-inline editing page (stackoverflow.com/posts/9436969/edit).
 
to use OpenGL, you only need the GL.h and GLU.hon windows?
 
@daknøk The scariest thing about it is people considering var_dump('0x02'+0); yielding int(2) to be valid behaviour. :<
You need WinSDK.
 
I have WinSDK
that's where I'm getting the headers from
I tried to use glViewport and my compiler is not so happy
with only gl.h and glu.h
 

« first day (496 days earlier)      last day (4466 days later) »