« first day (323 days earlier)      last day (4847 days later) » 

01:35
Hey guys, can someone help me write a program ro access my MacBook Pro's built in WebCam?
*to
02:21
^ Surreal
@JShoe Did you try Google? Does Apple provide an API?
4
Q: Accessing iSight programatically?

Paul WicksIs it possible to access the iSight camera on a macbook programatically? By this I mean I would like to be able to just grab still frames from the iSight camera on command and then do something with them. If so, is it only accessible using objective c, or could other languages be used as well?

03:16
I've used the GStreamer library for this.
03:33
why isn't wpf supported for c++ .net?
03:45
@StackedCrooked Ouch
 
1 hour later…
05:07
What is cocoa?
A bean from which Awesome is made. ... Oh wait, you mean the framework? It's crap.
What's a framework?
Hello!
What's a framework?
05:15
Can I get it in english please?
Simply, its a bunch of libraries to do stuff, with some sort of API to allow you to control the behavior
What's an API?
haha it stands for application programming interface
So take C__
C++
there's basic language constructs
like for/if
then there are other features like stl
those higher level features aren't part of the core language
so in defining the STL, there is an interface
STL has a sort function, for example
and the sort function takes some specific input format
and will sort the list
so in the case of sort, it's just two iterators defining the range, but the point is that your applciation doesn't care how sort is implemented
so its in that sense that you are interacting with an interface
btw: if anyone else wants to opine, please do so
so a language has some core stuff, and then there are more complex functions that use lower lever functions, and the higher level ones are frameworks? and an API is how they interact?
the language has some core stuff
i guess, yes
05:22
Okay, thank you very much.
What's the difference between an IDE, and an Editor that can run it's contents? Or is that the only difference, that IDEs can run their text?
Editor, quite plainly, are about text editing.
IDEs come with functionalities that are not related to text editing, but also developing software projects.
It seems that IDEs are way better.
e.g. managing various files as a project 'whole'
@JShoe Well by definition they will be better at doing IDE-related stuff than editors. That's not saying much.
I don't see any reason to use an editor instead of an IDE.
Point taken.
I would really like a non-editor IDE.
A project manager I guess?
05:27
Huh.
:D Well thanks all!
 
2 hours later…
07:54
@sbi Morning baby
sbi
sbi
@ManofOneWay I'm not exactly a baby anymore. But mornin', anyway.
@sbi How are you today?
sbi
sbi
@ManofOneWay I slept almost enough for a change, which feels good. How are you?
@sbi Nice. How come you usually don't do that? I'm fine thank you. Trying to get started with an assignment
sbi
sbi
@ManofOneWay I got a bunch of kids, a job, a garden, a preference for wasting time in this room, and whatnot. How could I ever sleep enough with such circumstances?
08:03
@sbi prioritize! =)
@sbi Maybe sleep is more important than the C++ lounge
sbi
sbi
@ManofOneWay I do. This is what comes out of it. :)
Als
Als
@sbi: Hello Mister.
sbi
sbi
Hi, @Als,
Als
Als
Hows the weekend?
sbi
sbi
@Als Incredibly warm and sunny for September here.
And yours?
Als
Als
08:06
@sbi: It is monsoon over here, but festive time, so kind of good :)
Last week, we had days off on wed and thu, just had a working day on fri before weekend came in, So a bit lazy now :P
sbi
sbi
Wow. This is how statistics should be presented all the time. Heck, it would be fun just to watch this even if it wasn't dealing with sex, but, say, the kind of stuff kids build in the sand on the playground.
well. fancy, but who on Earth would be interested in sexual preferences of dour British persons? like, "darling, that's not quite my cup of tea"
3
sbi
sbi
@AlfPSteinbach It would be fun just to watch this even if it was dealing with the kind of stuff kids build in the sand on the playground.
09:05
@als: it seems the clc++m active mods are not so active, but your posting just came through
 
1 hour later…
10:32
afternoon all
11:03
@Tony Hi
hello...
@FredOverflow Hi
anyone?
Hey -- is anyone Powerful with Emacs? I have a simple question regarding the creating of a minor mode or override function.
oof, sore and tired. And people say exercise is supposed to be good for you
help with my code : codepaste.net/g3wpnd ?
@MrAnubis what about it?
it showing error
error: 'Z' was not declared in this scope
unable to figure out what is problem
11:17
problem -> doing complexity dance that you shouldn't
@MrAnubis at a guess, I'd say the problem is that ´Z` was not declared in the scope where you use it
How about this:

template <typename T, typename U>
void func(typename a<T>::template b<T>::template c<U> *Z)
{
Z->intc = 20;
}
(How do you put a code block here?)
why don't you ask this question on SO?
@KerrekSB Indent four spaces or use "fixed font" button
@AlfPSteinbach I think I did that. I indented like crazy. Where's that button?
11:20
@jalf thought i could easily get help here with in seconds
@KerrekSB It only appears for me when moving the text cursor around with the arrow keys.
@KerrekSB: your code won't compile
i mean not working
@MrAnubis Compiles fine...
@MrAnubis What does it do wrong?
@MrAnubis you should read the newbie hints, on the top right in the starred messages
@LucDanton Hm, I can't see any buttons... what do I have to do to reproduce?
11:21
@MrAnubis as soon as a question involves reading more than 1 line of code, it's probably easier for everyone if you ask it on SO
@KerrekSB More than one line in the box, move the cursor inside it.
Or typing also does it apparently.
by asking here, you force us to visit a thirdparty pastebin site, and thus prevent people from easily seeing the code you're asking about
@KerrekSB i am using gcc
int main()
{
  shift * enter:
}
your compiler?
11:23
Ahhh
@MrAnubis GCC 4.6.1
same as mine
template <typename T, typename U>
void func(typename a<T>::template b<T>::template c<U> (*Z))
{
    Z->template c<U>::intc = 20;
}
@jalf That too is true
The fixed font button appears dynamically
@AlfPSteinbach Found it!
Thanks!
Not sure why manually adding four spaces didn't work, though...
11:25
seems to work for me
Maybe it doesn't work if you edit a post after the fact? Hmmm... never mind, will test next time.
@MrAnubis Your code is opaque to me - *Z is already of the inner-most type, and c<U> is just a simple struct type.
btw. has anyone tested C++11 std::nested_exception?
@AlfPSteinbach I have.
@AlfPSteinbach hm, never heard of it. What's it for?
11:27
@LucDanton so, i mean, how do you use it? catch as std::nested_exception or as the other type or what?
I will check but I probably reverted to Boost.Exception though.
similar to how .NET exceptions have a InnerException member?
I can confirm it's not in my codebase anymore.
no one can help?
@MrAnubis i thought i did
11:31
IIRC std::throw_with_nested does the magic.
catch(whatever const&) { throw_with_nested(translated_exception_type {}); } will nest, translate and throw in one go.
@Alf : still i can see error
And catch clause for either the original whatever type or translated_exception_type will match that.
btw why would you prefix the parameter name with typename?
@MrAnubis Is there any way to get you to be more explicit?
anyone know what the difference is between declaration and definition when it is mentioned in the Standard?
11:33
@KerrekSB : i am not vry good at english
like when talking about a template declaration and the definition
@TonyTheTiger They're not the same thing. The most important rule of thumb is that you can declare any number of times, but you usually define only once.
Also it helps to remember that a definition also counts as a declaration.
(Don't ask me about explicit template specialization.)
Your Comeau C/C++ test results are as follows:

Comeau C/C++ 4.3.10.1 (Oct 6 2008 11:28:09) for ONLINE_EVALUATION_BETA2
Copyright 1988-2008 Comeau Computing. All rights reserved.
MODE:strict errors C++ C++0x_extensions


In strict mode, with -tused, Compile succeeded (but remember, the Comeau online compiler does not link).
Compiled with C++0x extensions enabled.
@TonyTheTiger the declaration tells the compiler that a symbol exists. The definition tells the compiler the contents of the symbol
void foo(); declares a function. The compiler knows that it exists, so you're able to call the function
@LucDanton so in the header file you declare something, like a class and then normally you'd write out the definition in the .cpp file
11:36
`void foo() { sleep(42); } is a definition. It tells the compiler what the function actually does
oh I see...
makes sense
but normally you'd declare and define a template in the same place right?
yeah
@TonyTheTiger For functions, yes. But types get defined in headers most of the time.
struct blah; /* <- declaration only */ struct blah {}; /* <- definition + declaration */
11:38
oh ok
hi
what's new?
spending more of my life jerking around with incomplete types, declarations and definitions instead of creating code
@TonyTheTiger We have a FAQ entry on that:
39
Q: What is the difference between a definition and a declaration?

MaciekAs title says, the meaning of both eludes me.

@AlfPSteinbach regarding the discussion we had on usenet some time ago stackoverflow.com/questions/605497/…
0
A: Accessing inherited variable from templated parent class

Johannes Schaub - litbThe error message that GCC gives shows that your version of GCC still had a bug that is only resolved in GCC4.7 trunk versions. Older versions, including GCC4.1 will happily accept following code template<typename T> struct A { void f(int) { } }; template<typename T> struct B : A&...

11:43
@AlfPSteinbach then i assuming that the problem i was having due to compiler , thanks
@DeadMG oh... a bit of a circlejerk then
note that X is defined here, not merely declared: enum A { X };
something like that
I'd really like to use some type deduction, but the compiler bitches, so I have to move all of my class declarations and definitions around to make it work
@MrAnubis no, don't assume. check. what are the differences?
and I can't even use a typedef for my most commonly needed types, because it's incomplete in it's own body
11:45
@JohannesSchaublitb thanks. i hate it when the rules are so subtle. i can't remember them. someone(TM) should devise simpler rules!
Are we talking about DeadMG++ again? What's new there?
not much is new there, I'm focusing on implementing compiler right now
and what's new there is that C++ sucks such a truly tremendous amount of donkey dick, it's amazing that anyone ever wrote non-trivial templates in it
Note that for A::b, if A is a class, that A doesn't need to be a complete type
not that that's actually new
it can still be incomplete. in the process of being defined
11:47
@DeadMG it is possible that the world of problems that one may solve programmatically, is somehow a little non-trivial, i.e. that it's about inherent problem domain complexity rather than suckability of the language at hand
class A {
    template<typename T> ... foo() { ... }
    typedef decltype(null()->foo<SomeType>()) someType; // ERROR
}
"look over there" is not a complex thing to think
for a->b, the type of a must be complete
rather, the pointee type of a
yeah- but I can't refer to foo any other way because it's non-static
i think that was a recent SO or usenet question
you can take its address
not helpful
11:49
&A::foo<SomeType>
then you can filter out the return type from the type of that member pointer
I guess that I could, actually, take it's address and then
yeah
@Alf: You see? It's not complex at all - C++ just sucks
but that type you would get is not necessarily the same as the type you get with decltype anyway
but I need to use the deduced type in a class which is the type of a member variable of the outer type
or you can introduce a late return type auto dummy() -> this->foo<SomeType>(); and afterwards get the address of &A::dummy. filtering out the return type of that should give you the exact return type
no, wait, no I don't
11:52
a similar question popped up in usenet or SO and the solution was just to delay the definition of the nested class
@JohannesSchaublitb : can you please help with this code codepaste.net/g3wpnd ?
2
A: Type deduction on parent class from nested class

Johannes Schaub - litbYou can define the nested class later class Outer { static Outer* null() { return nullptr; } template<typename T> ... SomeTemplateFunction() { ... } class NestedClass; }; class Outer::NestedClass { std::vector<decltype(Outer::null()->SomeTemplateFunction<SomeOther...

@JohannesSchaublitb : error : z is not declared in the scope
yeah
that only works if I don't need the nested class to be, say, the type of a member variable of the parent class
then you are SOL
11:54
yeah, that's what I thought
you should specify that requirement in your question too :)
Als
Als
@AlfPSteinbach: Yes it came through, but no responses yet.
note that you can still have the member variable static
didn't know I had it till just now
or have it as a pointer
11:54
yeah, that's not gonna happen
nor is that
lol
or you can manually do the transformations that the compiler will do
@Als : can you please help with this code codepaste.net/g3wpnd ?
upon the type you get by inspecting A::function
which includes removing const and volatile from non-class / non-reference types at the toplevel
yeah, except I have like, two hundred uses
not sure whether there's another transformation. that's the only transformation AFAIK
11:56
after having to go through and change them all once, even this is easier than having to keep change that
Hello everyone! Are you having a nice relaxed Sunday morning?
I was wondering if you guys could help me, im a graduate in computing and this week I have a technical test in C++ for a graduate position at a company. Has anyone had any experience of these tests and what could I expect in them? The test is 2 hours long
@JohannesSchaublitb I added S.O.L. to Wikipedia's disambiguation page; today's "good act". :-)
12:01
Im guessing by the name technical it will be all practical testing and no theory?
@sqlmole impossible to say. C++ means completely different things to different people
and people tend to test you in the bits they consider important
@AlfPSteinbach haha
@jalf all i have been taught in C++ is creating console applications and using the STL. The most advanced stuff I created was a Binary Sort Tree but I also know alot of software developing theory in abstract classes, polymorphism and sorting
Im hoping that will be what they are wanting, I hope they will go easy on me as I am a graduate
impossible to say. There are some so-called C++ developers who consider STL to be a dirty word
and others who feel that if you know how to use the STL, you're 90% there
I have one concern though, I have only used Visual Studio 2010, but they say they will use VS 2005 in the testing centre. Is there any major differences ?
12:06
I'd say that you're more 90% there if you can write the STL
yes
VS2010 has a completely redesigned UI, for one thing, and some C++0x features for another
oh fuck, I think I forgot my card's PIN again
@DeadMG they havent really redesigned it. They've re-implemented the same UI using a different technology stack
apart from some more rounded corners and less grey colors, 99% of it looks the same
I never used VS2005, but VS2010 sure looked an awful lot different to VS2008 to me
but maybe that's just inexperience of the functional parts of it before VS2010
anyway, if you know VS2k10, 2k5 shouldn't be too hard to figure out :)
Cool
Heh I found this test on google acuit.com/Test_C++.htm
Why would you use a CPtrArray instead of a CObArray in an MFC application?
I closed the tab
that quiz is only about one single library, basically, and it's a dead one today at that
12:12
what does it mean when an object has internal linkage?
In the field of translation, a translation unit is a segment of a text which the translator treats as a single cognitive unit for the purposes of establishing an equivalence. The translation unit may be a single word, a phrase, one or more sentences, or even a larger unit. When a translator segments a text into translation units, the larger these units are, the better chance there is of obtaining an idiomatic translation. This is true not only of human translation, but also in cases where human translators use computer-assisted translation, such as translation memories, and also when tra...
this doesn't apply to a C++ translation unit?
@Als a response usually takes at least 24h. patience... :-)
it was linked in one of the answers from the link you provided @Mat
Mat
Mat
@TonyTheTiger it applies to C++ in the general sens, a C++ translation unit is simply all the source code used to compile a given object file.
12:19
oh ok
so why does this not work?
dest.begin() == dest.end() since the vector is empty
Use e.g. std::back_inserter(dest) instead. You may need to #include <iterator> for this.
Mat
Mat
@TonyTheTiger what does that have to do with linkage properties?
@Mat nothing, linkage was a separate question
@AlfPSteinbach - is there a better example for the dynamic_cast<void*>? I can't find any platforms where that's any different so it's hard to explain why it might be
(better than that)
12:31
With or without MI?
Why can you not have a Virutal Constructor?
user142019
Hello.
@sqlmole - virtual constructor just doesn't make sense
you have to call a constructor for all types in the hierarchy
so what would it do?
user142019
@sqlmole why would you want a virtual constructor?
im doing a technical test, as i have a job interview in 3 days for a graduate c++ developer
12:36
virtual destructor is needed because you might not know the most derived type at destruction time
my answer is that a constructor needs to exist in a object and if it does not exist then the object is not there and therefore it cannot have a virtual copy
but at construction time you always know the most derived type because you just asked for one
@TonyTheTiger in short, think of it as the symbol's scope at link-time. External linkage means that it is visible to other translation units (as in, code in other TU's can link to it). I can't remember the exact definition of internal vs no linkage, but I believe internal linkage means other code in the same TU can link to it, but other TUs can't see it. No linkage means that it's not even visible to the rest of the TU (think of a local variable which only exists inside a function, for example)
but if you want to be sure, look it up in the spec. Should be fairly easy to find, since they're so specific terms
and it's good practice :)
you use virtual when you don't know what else might have derived from it, but when you construct you always have to know that
0
Q: Input vs Output Iterator - naming conventions

Tony The TigerI am just trying to wrap my head around what an InputIterator and OutputIterator in C++ actually are. Now, until now, I always assumed that the definitions I have always known of Input and Output also applied to iterators. So that means that Input is "to place into something", meaning you can...

here's a question for you guys to ponder :P
it's confused the hell out of me so far...
meh
12:40
I had that confusion recently when I needed names for my input_channel/output_channel >.>
@woodland so the virtual constructor would be used to prevent the original constructor creating derivitives and thus wasting memory?
@sqlmole - no you can't construct something if you don't know what it is you're constructing so it doesn't make sense
2
@LucDanton oh, well, glad I'm not the only one being confused, lol
@LucDanton channels? What are you writing?
@awoodland if you want different addresses try a little multiple inheritance?
12:42
@jalf CSP-style channel
@AlfPSteinbach - good thinking
@LucDanton oooh neat
how far are you with it?
@awoodland a virtual constructor cannot be created as to construct an object you must know what it is your object contains?
the world needs a proper C++ CSP lib
12:43
is that better?
@awoodland I guess I should have pinged you with my suggestion.
@luc - suddenly that MI question made sense - I assumed it was related to a previous question
@jalf Done with the interface. The day I use it semi-seriously will be the day I work on the implementation though. It's there, but it's not supposed to be efficient.
@sqlmole see the FAQ for "virtual constructor"
@LucDanton I thought you had renamed those :-)
12:45
@LucDanton got an example of the interface?
@KerrekSB Yeah, they were in_channel and out_channel at some point. input_channel and output_channel was the change.
@sqlmole - basically though that's it - if you don't know exactly what it is you're making you don't know how big to make it or how to initalise it
@LucDanton Does that help dispel any remaining clarity?
@jalf Here's how I use them in my unit tests.
so you absolutely must call new with the most derived type, which means that it's always known at compile time
12:47
@KerrekSB The silly thing is that I wanted to put things in an in_channel; while now I use an input_channel for my input.
@sqlmole and a copy constructor is used when you know what is contained in the object however there is attributes like pointers that you want to preserve in that object when you copy it ?
would it be bad style to use lambda to write error-checking before the relevant function call?
@AlfPSteinbach dunno, it's worth a try :)
oooooooh
@LucDanton I just realized how nicely move semantics play into CSP libs
I played around with trying to write something similar some years ago, but got stuck on the lack of move semantics
Yeah, I originally had a single channel<T> class but ownership was a headache.
Notice that out of the C++11 box you get std::promise and std::future (also std::shared_future), which works for one value.

« first day (323 days earlier)      last day (4847 days later) »