« first day (456 days earlier)      last day (4718 days later) » 

15:00
Hiding news away is always good.
why would anyone say that functors "fit better into OOP" than a plain function does?
Because they're objects!
you know, I feared that answer. ;)
@RMartinhoFernandes I didn't know "bob" was a verb.
but yeah, I guess you're right
to bob or not to bob
15:01
@FredOverflow Well, it is :)
Xeo
Xeo
@jalf They're inline-able. That doesn't specifically fit to "OOP" but...
@Xeo yeah, I know why functors are useful. Was just surprised to find an answer on SO saying that they "fit better into OOP"
I'm going to call "censorship" to this idiom of hiding the news.
Xeo
Xeo
Well, they're classes
And, classes == OOP, right?
@jalf I hate these OOP people. Yesterday, I read a couple of chapters from Effective Java, and when it came to parameterizing sorting algorithms, the author started rambling about design patterns and concrete strategy objects and whatnot. I was all "What the hell is he talking about? Can't we just pass a lambda? Oh right, Java..."
15:03
especially considering that to the kind of person to whom "fits into OOP" is considered a positive thing, the same term is also redefined to mean "whatever looks most Java-like", and functors aren't very Java-like
classes != OOP
You're preaching to the choir.
Jawesome.
Xeo
Xeo
@Abyx Did I hide the sarcasm that good?
It seems method(unique_ptr<derived>) is incompatible with method(base &)
@angryInsomniac you need to dereference the smart pointer
or pass a pointer (ie change the function signature-
15:06
@angryInsomniac why would you expect otherwise? One is a unique pointer, the other is a reference
@jalf That particular aspect is wonderfully discussed in Why C++ is not just an Object-Oriented Programming Language
Xeo
Xeo
@FredOverflow lol, the name of the pdf. "oopsla"
@Xeo Well, he gave a talk at OOPSLA about it :)
Xeo
Xeo
Oh, then it's a German-intern. "Uupsala" (or however one would write that)
There's an entire conference of OO?
15:08
@Pubby What do you mean, "one"?
@Pubby sure, since 1986
@jalf ??
an == one
@Pubby There are plenty. If there's one thing OOP has been good at, it's generating conferences and the like
hyping up a community, basically
so no, there's not one entire conference of OO
OOP is an abstract factory object that creates conferences and hype?
2
Bleh, ninja'd
15:11
There are also conferences on Design Patterns, for example EuroPLoP.
@rubenvb not available in Germany
you've got to be kidding me... grrrr
sbi
sbi
@FredOverflow Where PLOP! seems to mimic the sound your applications makes when it collapses under all those patterns.
@rubenvb WTF is that?
15:13
@sbi I'm sure there's another pattern to prevent that, like the MakeCustomerBuyMoreMemoryPattern.
@RMartinhoFernandes a very popular children's show in Belgium
and The Netherlands, if I'm not mistaken
@FredOverflow Why buy it when you can get it for free? downloadmoreram.com
@RMartinhoFernandes I'm not gonna click that :)
@FredOverflow It's just a dumb joke.
It's "safe".
Xeo
Xeo
@FredOverflow It's awesome.
15:15
@rubenvb You're not. I hate it. With a vengeance. Though
@Xeo The 1GB, 2GB and 4GB download links are all the same?
@coder9 it looks like you are missing link flags. Common issues:
- linking to debug instead release libs
- linking to the wrong version of the libs
- And a common pitfall: mentioning the libs (eg `-lqt-mt`) _before_ the compilation units (*.cpp) on the command line.
Yay !!! no more bullet leaks :D
@sehe he used qmake. No need to muck with link flags
15:18
@angryInsomniac How did you do it?
@FredOverflow Er, ... it detects what you chose with, I don't know, JavaScript?
;)
@FredOverflow used a list of unique_ptr<bullet>
@RMartinhoFernandes Anyway, it downloaded 4 GB in just a few seconds. Awesome :)
@angryInsomniac That's a good solution.
15:19
Sorry @RMartinhoFernandes :D I promise to learn boost when I get the chance :)
@RMartinhoFernandes also it's in the cloud! In the cloud, everything is infinite, so 1, 2 and 4 gb are basically the same!
@rubenvb true. But, qmake get's it wrong sometimes. It uses pkg-config like mechanism and they might be pointed wrong. Only yesternight I had to add -lpthread at the end of a link line with qmake ...
@sehe for Qt internal things, or your own code that used pthreads?
weird , my chrome was somehow configured to use a proxy server. I am pretty sure I never set up that proxy.
In the morning it was fine.
It's the Mayan's faults
it's 2012 now. Anything can happen
15:30
lol.
but seriously, the only person who used this notebook while I was away, was my mom. I don't really think she even knows what a proxy is, let alone configure chrome to use one.
^ unsolved mysteries.....
O_o
16:19
is the term "meta-template" used at all?
or only "template meta-programming"?
@rubenvb I've never heard it before
damn
why?
I'll have to rewrite my comment now
I hate people who post answers to questions 3 seconds before I post mine. And their answers are exactly the same as mine. Which means they get accepted and I get totally ignored. :(
16:31
All you need to do is nitpick on the other answer, or add something extra to yours
or post your answer here :P
I once actually got accepted by literally copying a previous answer and changing the wording. All I did was add a screenshot to my answer, which instantly got accepted and upvoted. :P
a picture often says a thousand words.
Where is that answer?
0
Q: SoC required to build my own smartphone

netshadeI'm interested in what it might take to build my own smartphone. I've done some small amount of research, and know of a few existing development boards. Unfortunately, as far as I can tell, the available SoC's that would be roughly feature comparable w/ a modern smartphone (say, an iPhone 4) are...

haha
i think it's easiest to just ignore the SO rep count game. and it is a game.
well, rep is just like reallity
money and stuff
once you got a lot
you will get even more
16:39
Is it a good idea to use __builtin_acos as an implementation for my library's acos function? I know this is GCC/Clang only.
or is real down and dirty code equally performant?
@rubenvb just use atan
@rubenvb if you're really concerned that it might be a problem, write your own wrapper and use that. Then you can forward to one implementation or the other once you know which is faster
@AlfPSteinbach I want to bypass the C and C++ implementation
don't ask me why :D
then u need to decide: are you using the runtime, or are you not. if you are, then just use atan. if you're not, then look up in wikipedia for taylor series or the like
But if the compiler has a builtin, does it need the runtime, or does it generate freestanding code from it?
16:48
@Xeo i think we waited Long Enough now for solution of latest GotW. Hu is going to poke Herb?
@FredOverflow I don't understand. It's dead easy to create a "lambda" in Java. That's how the "action" things work generally.
Ell
Ell
hey guys
argh I can't for the life of me get wxwidgets to work on windows with mingw! Its painful!
@Ell Then try Visual C++. You also need Visual C++ for Boost Filesystem. So.
I answered a question. :-)
2
Q: C++ arrays with unknown size

Ahmed NematallahI'm trying to implement a program which gives you a sequence with a determined start, end and base, problem is that i cannot determine what will be the number of elements this is my code for a simple arithmetic progression generator float Arithmetic_squence[](float start, float end, float b) { ...

Ell
Ell
can I download visual c++ without the ide etc. ?
@Ell Yes, in the form of the Windows SDK
@Ell yes, I believe it's present in the platform SDK. but the SDK is also large.
17:01
This has got to be fast:
        inline constexpr int abs(const int number)
        { return __builtin_abs(number); }
        inline constexpr long abs(const long number)
        { return __builtin_labs(number); }
        inline constexpr long long abs(const long long number)
        { return __builtin_llabs(number); }
        inline constexpr double abs(const double& number)
        { return __builtin_fabs(number); }
        inline constexpr float abs(const float& number)
        { return __builtin_fabsf(number); }
(see full text)
Ell
Ell
:L
Are the built-ins declared as constexpr?
Otherwise that will not compile.
it works
At least if the compiler is conforming.
well, it compiles
and the int version works
@Ell It's not that large
Ell
Ell
17:03
@rubenvb i only have 1.9 gb of free space :s
@Ell ah, well, use the webdownloader then.
it might be more efficient
Hm, I'm going to take a shower and then see if there's an available table at the cafe up the street. On Sundays they have this really very tasty and very cheap steak, with "black and white" sauce. They also have decent beer.
Ell
Ell
i need to shift my whole ssd to a hdd anyways so
it should be good after that
yay for constexpr builtins!
how can I access MSVC math intrinsics?
Ell
Ell
o.O
17:09
Why did the "stilescrisis" comment, that a simple way to do something is for experts only, get an upvote? Are SO readers mentally retarded? I'm just asking.
@rubenvb I don't know - you should ask @StackedCrooked, really - it was on a version of his QtTetris test suite
pvmove /dev/sda1 /dev/sdc1 - continue working - 30 minutes later - done
And even bootloading is fine
Ell
Ell
@sehe for me?
can a float store all uint64_t values approximately as good as a double?
user142019
17:24
@rubenvb the standard (§ 3.9.1) says "The type double provides at least as much precision as float." so I guess it's implementation dependent.
Let's say I have IEEE floats
because I like deterministic
Is there any use in using templates like this, or am I being foolish?
http://pastebin.com/i6i9uxTV
17:41
@AlfPSteinbach Yes, and imho it's ridiculous to start talking about concrete strategy objects when all you're doing is new ActionListener() { bla bla bla }.
Xeo
Xeo
17:53
(Regarding your intrinsics question)
18:13
@Ell for me :) I use lvm2 to avoid getting stuck painted in corners with harddisk space planning. See e.g. this live-recorded incident from Dec 28th :)
Dec 28 '11 at 21:53, by sehe
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdc1             9.4G  8.9G   20M 100% /
Does C have 3 char types like C++?
I restored that by a sequence of online resize and growfs - never went offline. That's the joy of lvm2 (as long as you just stayaway from striped volumes and especially snapshots)
thank God the placement-new thing captions ended.
Look at what the developer did:
`#define FMOD(x,y) fmod(x,y)`
^ retarded.
Which developer?
just writers of some source code I pick at sites like planet source code etc.
Some are good, some are a bit weird.
Some writers name function and class names in their native language. E.g Hindi , Tamil etc. This drives me crazy.
class Billi : public Janwar << weird jargon
18:25
An object declared as type _Bool is large enough to store the values 0 and 1.
3
An object declared as type char is large enough to store any member of the basic
execution character set. If a member of the required source character set enumerated in
5.2.1 is stored in a char object, its value is guaranteed to be positive. If any other
character is stored in a char object, the resulting value is implementation-defined but
shall be within the range of values that can be represented in that type.
4
(see full text)
^ from N869
I hate it when people downvote your answer for no reason at all.
@IntermediateHacker doesn't "was" indicate something in the past? like, past tense?
oh yeah. damn, I feel like an idiot. :(
edited it. It's correct now. :)
maybe you misread. my mother one day ago misread my complaints about a bootleg record called "surfing the earth". she thought i meant Google Earth, that my copy was ungood, so she tried to mail me her working copy. alas, the mail program or firewall or something protested. she wondered if she did wrong?
18:32
@Xeo Yes, but that only mentions that the functions have intrinsics, and the subsequent intrinsic lists are only really SSE(2)/x86_64 functions
@AlfPSteinbach lol.
@RMartinhoFernandes C11 has three char types, but I believe the char16_t and char32_t are typedefs
@AlfPSteinbach Why do you insist on using Newspeak? That scares me.
2
@RMartinhoFernandes well, "c++" is partly newspeak, is not it?
@Xeo: but this pragma might enable me to do what I want: msdn.microsoft.com/en-us/library/sctyh01s(v=VS.110).aspx
18:37
@AlfPSteinbach If the idea is to have a language that can constrain the way you think, then Java seems to fit the bill just nice :)
^ "For yet another interpretation of the name C++, see the appendix of [Orwell,1949].''
Woah.
Wait, you're misunderstanding it!
(...) and it does not attempt to remedy problems by removing features. For yet another interpretation of the name C++, see the appendix of [Orwell,1949].
The initial stages of Newspeak consisted of removing words from the language!
He is saying that removing features is a way to constrain your mind, so he didn't do it.
can I multiline pragma's using `\`?
@rubenvb I believe you can. It would be impractical if you couldn't. E.g. for a pragma giving the linker a bit of a manifest (in Visual C++).
ok, Notepad++ syntax highlighting seems to think so as well :)
19:00
grrr. The #pragma intrinsic still needs the function declarations
I don't want to pull those in
Why does this say acosl has an intrinsic form while my compiler is saying it doesn't?
Ah wait, I see, they just cast the thing to double. Sneaky basterdz
Can I undeclare a function?
I need to fool MSVC in knowing its intrinsics
Hmm. It seems I can place them in a namespace __detail
hehe
Stupid MSVC
19:19
rule, Note To Self: when you type "afk", move away from computer immediately
7
sbi
sbi
@rubenvb I have found that, sometimes, the Internet works best for me if I type only after I have finished thinking. (Sometimes it's the opposite, though. I have yet to establish a pattern.)
@AlfPSteinbach It's best if you first move away from the computer and only then type "afk". :)
@sbi I can't seem to tell if you're telling me to stop barfing on the C++ lounge or if it's just a random comment on recent events.
sbi
sbi
@rubenvb Maybe I should have added a smiley, so that you would have known that I was serious.
@sbi Did you ever make a pencil that was stuck in a table disappear by using only a human head?
Cause that's who you are reminding me of right now
sbi
sbi
@rubenvb Did I what?
sbi
sbi
@rubenvb So how did I remind you of that scene? I'm not a clown, I'm a grumpy gorilla.
BTW, your comment about a table and a head reminded me of this one:
Wonder what I should do with the depression that's slowly forming on my desk in the shape of my head.
@sbi You're a scary, grumpy gorilla, who might've slashed his cheeks in a quite disturbing manner
sbi
sbi
@rubenvb Actually I'm not.
Today I served breakfast to two small kids (they loved it), built something in Lego for them, cleaned the apartment, cooked lunch/dinner for the three of us (again, they loved it), took them for a walk, helped my son advancing his paper model of Pettersson's farm, read a Pettersson/Findus story for the night, sold stuff for another son's model trains on ebay, did three machines of laundry + the dishwasher, tidied up the kitchen, and had two beer when the kids were in bed. Nothing scary, huh?
Well, maybe that two beers didn't help making you feel comfortable with my statements. :)
OK, I'll take your word for it.
Innocent unless proven guilty, or something like that :)
I'm such an intrinsic hacker. Watch my hackish code be hackish: github.com/rubenvb/KISS/blob/master/include/math.hxx
@rubenvb lol, I saw your question on that. Wait till you see some "real" HPC code... (It's usually completely unreadable.)
19:48
Why do you #define __builtin_ 8 times?
Copy&paste accident?
@RMartinhoFernandes He probably isn't done yet.
If systematic application of these techniques is not possible in your environment (you have to use code from elsewhere, part of your program was written by Neanderthals, etc.), be sure to use a memory leak detector as part of your standard development procedure, or plug in a garbage collector. - Stroustrup about RAII resource handles
lol @ "written by Neanderthals".
which compiler is working on win7 64bit ?
Ell
Ell
lots
20:08
evening all
would you ming tell me any one c-c++ compiler?
user142019
clang, gcc, msvc
Xeo
Xeo
0
Q: Why is 'X x; x();' allowed, when 'X' defines a conversion to function pointer, but not, when it defines a conversion to a functor?

Xeovoid f(int){} typedef void (*f_ptr)(int); struct Functor{ void operator()(int){} }; struct X{ operator f_ptr(){ return f; } }; struct Y{ operator Functor(){ return Functor(); } }; int main(){ X x; Y y; x(5); // works ?! y(5); // doesn't ?! } Live example on Ideone. Output: e...

@Potatoswatter: FYI, see above
AAAARGH, my router is killing me
20:26
Call 911!
Xeo
Xeo
Haa.. I post a nice question, get upvotes, and am already long since repcapped and it all goes to waste. :(
@Xeo look at this, here it suggests a candidate, though it doesn't take it
@Xeo oh what a waste of valuable rep :P
prog.cpp:13:10: note: candidate is: Functor Y::operator()()
Xeo
Xeo
@TonyTheLion Err, that's completely different
I explicitly didn't make X and Y functors
And it doesn't mention the operator() of Functor
ah right, I see
I don't really get the use of operator in a definition like this: operator f_ptr(){ return f; } ???
Xeo
Xeo
20:31
Conversion
X is implicitly convertible to an f_ptr
hmmm interesting
Xeo
Xeo
ARGH, I hate it when I reply to a comment and they just delete it! D:
@Xeo Hey, you got a badge.
Xeo
Xeo
I should draw a comic where I use those cheap badges as fuel or something.
"Oh, another one! throws into the fire"
Man, I'm being way too cynic and sarcastic today. I should go to sleep.
Actually, that sounds like a good idea, after being awake for 21 hours. G'night!
I would say I agree
20:42
I'm afraid that when the blackout ends, the Internet will finally implode with all the addicts coming back at once.
2
user406009
Wait, is it going to be a wikipedia blackout too?
Xeo
Xeo
Wait, what's on wednesday?
@EthanSteinberg Dunno. There's a petition and a campaign of donations.
Xeo
Xeo
Ah, that SOPA thing?
user406009
I know Rededit is going full out.
20:44
Reddit, Wikipedia blackout
@Xeo oh I thought you went to bed?
Right.
Does it look like 4 hours have passed since he said that?
there's always tvtropes.org :P
Xeo
Xeo
1 hour ago, by Alf P. Steinbach
rule, Note To Self: when you type "afk", move away from computer immediately
@RMartinhoFernandes no, few mins at most
@TonyTheLion Then he's not going to sleep any time soon.
20:46
@RMartinhoFernandes ah, so there's always "I'm going to bed, G'night" + 4hrs rule
Xeo
Xeo
@TonyTheLion Right, but believe it or not, I actually plan on sleeping tonight
@Xeo hmmm
user142019
Quote C++ spec in answer = instant up votes.
21:14
Hello, plain C related question. I' m pass in function matrix declared as described this dl.dropbox.com/u/609809/Screenshots/-6mz.png, i don't want also pass dimension of matrix, how determine it size, i need loop trough entire matrix inside function.
user142019
You cannot know the size without passing the size or without having terminating elements (like C-strings have).
You need the size somewhere... so you might as well pass it
@Mysticial what's HPC?
user142019
@rubenvb High-performance_computing?
So it's not possible to iterate trough each element of matrix without it's dimension ?
user142019
21:23
@diimdeep nope.
@diimdeep Well, think about it, without dimension and only a pointer, how will you know where the row/column of your matrix ends?
and it went quiet
user142019
Time to speak.
i don't well know C, maybe some magic can be accomplished
user142019
Maybe not. The only other way is using terminating values. C-strings do this and that's how strlen works.
maybe
i think about pack it in struct and pass that struct
struct matrix {
int rows, cols;
int **data;
};
maybe it's not worth it
user142019
21:36
That's possible.
user142019
21:49
I wish CPP was Turing complete.
is there function to find that in array of int all elements negative ?
or just use loop
user142019
Use a loop.
user142019
Ooh yeah got the announcer badge :)
22:19
@rubenvb Yes, it's High Performance Computing...
HPC code is pretty much the definition of code-smell. It's full of premature optimizations, manual loop-unrolling, vectorization, non-compliant hacks...
22:31
Aha. I see. I guess a better name would be WBHPC. Would-be HPC.
and that was a triple would be
yay for me
22:57
@WTP How is C++ not Turing complete?
@FredOverflow Dunno, but does undefined behavior count as "Not Turing Complete"?
@FredOverflow I suppose CPP is the C Preprocessor.
Suppose that a++ + ++a causes Earth and Venus to collide. Can an Earth-Venus collision be emulated with another Turing machine?
That requires special hardware anyway.
Yeah, I figured as such...
23:37
@Mysticial Not necessarily.

« first day (456 days earlier)      last day (4718 days later) »