« first day (516 days earlier)      last day (4436 days later) » 

6:00 PM
@EtiennedeMartel In the destructor of a RAII class, supposedly ;)
Wait, am I still dreaming?
 
@FredOverflow Probably not. Unless you dream of being in the Lounge, which would be weird.
I know the Lounge is cool, but I don't think it's cool enough to dream about.
 
6:15 PM
@EtiennedeMartel You could have stopped after "I know the Lounge is cool" ;)
 
We're ALL cool.
 
6:29 PM
We all SUCK and this lounge SUCKS
 
*starts smashing couches*
 
@TonyTheLion hmm
 
@TonyTheLion (╯°□°)╯︵ ┻━┻
 
sbi
7:02 PM
ick!
 
Fishy.
 
Or something that resembles it.
 
sbi
Look at the barely visible text above. I believe it's simply "assorted fudge".
 
@sbi stop ruining our fun
 
sbi
7:08 PM
^above the label
Damn. Chatting with an Android touchscreen keyboard is no fun at all. Ah. I just found how go edit they last message.
Some progress at last.
^how to edit
Sigh.
 
But it's modern technology!
 
sbi
Apparently you cannot edit they next-to-last message.
 
Anyone recognize the pattern in "0 11 37 69 116 175 246 329 424 531..."? I'm stuck :/ I got most of a forumula for an answer, but I'm off in each chunk by that much. The number 12 is related I think, but I can't figure out how.
 
Have you looked at the deltas? 11 26 32 47 59 71 83 95 107
 
7:20 PM
hmm, if I change the 12 to a 1 it becomes 0, 0, -1, -3, -6, -10, -15, -21, -28, -36, which looks really familiar.... oh, deltas that's why it's familiar
 
though, probably not what you are looking for
 
deltas became 0, -1, -2, -3, -4, -5, -6, -7...
Thanks Fred
 
What 12 are you talking about? I don't see a 12.
 
the origional formula was based on teh variable who's value was 12
 
sbi
@Stacked: If I only knew how to do this from Android's Twitter client I'd paste the URL of a recent tweet of mine dealing with this.
 
7:22 PM
Is this a physics simulation or something?
 
sbi
@Fred No, it's Android.
 
@FredOverflow I'm trying to figure out the equation for mapping a set of numbers I have to another set of numbers for stackoverflow.com/questions/9720831/…
hmm, wonder if wolfram can figure out the equation for me
 
@MooingDuck Hmm... too abstract for my taste :)
 
It came up with a recurrence relation
 
7:27 PM
@CollinHockey I guess I'll look that up
 
std::shared_ptr is in memory.h right ?
 
@CollinHockey oh, yeah, it's based on a recurrence relation. I'm trying to figure out the direct relation.
recurrence relations being somewhat slow to calculate
 
@angryInsomniac drop the .h
 
@FredOverflow tried both ! boy do I hate this Qtcreator thing , its completely counter productive
 
@angryInsomniac Does Qtcreator support C++11?
 
7:36 PM
@FredOverflow hmm , good call , doesnt seem like it !
Argh , why do they make a library that is so insanely complicated to configure :(
 
Doesn't Qt have its own counted smart pointer?
7
Q: Smart pointers in Qt

AlexKRLike it has been written here Qt up to now has 8 specilized smart pointer classes. It looks like it is all you will ever need. However, in order to use any of these smart pointers your class must be derived from QObject which is not always convenient. Is there other implementations of smart point...

3
Q: QT smart pointer equivalent to Boost::shared_ptr ?

Ashika Umanga UmagiliyaGreetings , I have used Boost::shared_ptr in my previous projects and now I want to find a smarp-pointer in QT which does the same/similar thing. Since there are many smart-pointer classes in QT I was wondering which one to use. Is it QSharedPointer ? Regards

 
@FredOverflow we had this discussion earlier this day, you have to scroll back a little. but to summerize it, it doesn't support lambdas and such properly for me, also c++11 style braces like >> don't work
 
When I typed the list here I typo'd a number :/ The formula was (n-1)(6n-1)
 
@MooingDuck isn't that the formula for sum(n^2)
 
@bamboon It's very very close to it.
 
7:38 PM
@MooingDuck Oh, Wolfram already calculates the differences automatically, nice.
 
why do I have to log in to copy anything :/
 
@FredOverflow Why does the question mark at the end of the question title look so funny?
 
@bamboon that equation is n(n+1)(2n+1)/6
 
@MooingDuck log in where? copy what?
 
@MooingDuck crappy, new pro features
 
7:42 PM
@FredOverflow copy anything from wolfram alpha
 
of course, stupid me
 
@MooingDuck oh yeah, right, I knew the 6 was somewhere in there
 
Hm, I can't decide between Linux Mint Debian Xfce, Xubuntu and Lubuntu. I think I'll just have all three of them on my hard drive :)
Is Java the last "modern OO language" without closures?
 
@FredOverflow I hate it when everyone comes up with their own version of stuff that already exists !
 
@angryInsomniac I don't know whether Qt predates Boost or the other way around.
 
7:44 PM
C++'ers, I need your help!
Does anyone know the answer to this question? superuser.com/questions/401182/…
 
@FredOverflow boost definitely predates Qt , but the real problem I have with this thing is that it is so insanely hard to configure, I cannot get a simple console program to work
with errors like hash_map is not part of std
 
@angryInsomniac Are you sure? Qt's initial release was 1992.
@angryInsomniac Well, it isn't :) There never was a hash_map in the standard, and there never will be.
 
@FredOverflow so that means it works in visual studio because of VS libs ?
 
@angryInsomniac If hash_map works in VS, then it's a Microsoft thingie.
@JohnDibling I stopped reading after "How Can I Create A Dump" and giggled.
 
@FredOverflow argh the insanity
 
Xeo
7:47 PM
<hash> is a VC extension
 
lol, please comntinue reading :)
 
@angryInsomniac "In Visual C++ .NET 2003, members of the <hash_map> and <hash_set> header files are no longer in the std namespace, but rather have been moved into the stdext namespace. "
 
@JohnDibling What does "and I's like" mean?
 
@angryInsomniac microsoft fixed that almost 10 years ago, what are you compiling with?
 
@MooingDuck I am using VS 2010 express and std::hash_map works fine
 
7:49 PM
typo, meant "i would like" -- fixed
thanks for pointing that out
 
@angryInsomniac in what header?
@Xeo MSVC10 doesn't have a <hash> header
 
#include<hash_map>
 
Xeo
@MooingDuck Well, I meant the hash stuff
 
How about #include <unordered_map>?
In computing, unordered associative containers refer to a group of class templates in the standard library of the C++ programming language that implement variations of hash table. Being templates, they can be used to store arbitrary elements, such as integers or custom classes. The following containers are defined in the current revision of the C++ standard: unordered_set, unordered_map, unordered_multiset, unordered_multimap. Each of these containers differ only on constraints placed on their elements. The unordered associative containers are similar to the associative containers in C++...
 
@angryInsomniac the docs say that your wrong, I'll test it
 
7:51 PM
@MooingDuck Well , I hit compile and it works ... every time :P
 
@angryInsomniac oh, I found it in the docs! "When compiling with /Ze, which is the default, the compiler will warn on the use of std for members of the <hash_map> and <hash_set> header files. "
@angryInsomniac stop ignoring the warnings
@angryInsomniac "works just fine" = "it runs, but tells me not to do this" apperently
 
@JohnDibling: do you want a core dump?
 
hash_map isn't mentioned anywhere in the standard, I just checked.
 
@JohnDibling I wrote an answer, dont know if it helps you
 
@MooingDuck not ignoring anything , I get no warnings whatsoever
 
7:53 PM
@angryInsomniac Even when you do a "rebuild"?
 
lets see
 
@angryInsomniac Trust us, there is no such thing as std::hash_map. You want std::unordered_map instead.
 
@angryInsomniac for that to be true, you would have to go into the settings and specifically turn down the warning level
 
@MooingDuck havent done anything of the sort :P
anyways , it works for the time being , so I dont really care :P
 
Maybe you have #define hash_map unordered_map somewhere? :)
 
7:55 PM
@angryInsomniac you're right, I get no warning either, docs are wrong. Interesting
 
@MooingDuck told ya :P
 
@angryInsomniac it's still wrong, use unordered_map instead
 
@MooingDuck why ? my target platform is windows and this program is not meant to be rigorously tested , it only needs to run the executable properly , thats about it
 
@bamboon: thanks
 
"boost definitely predates Qt , but the real problem I have with this thing is that it is so insanely hard to configure, I cannot get a simple console program to work
with errors like hash_map is not part of std"
 
7:58 PM
@Fred: I want to see call stacks. I think that means I want a core dump?
 
@MooingDuck I dont see your point !
 
@JohnDibling I have no bloody idea. I'm not the one who answered your question.
 
@angryInsomniac those errors will probably go away if you use unordered_map instead
 
@angryInsomniac The point is, don't ever use a non-Standard extension if you can avoid it, because doing so invites errors.
 
@FredOverflow: Right, that was for @FredLarson. :)
 
8:00 PM
@JohnDibling Oh, stupid chat system :)
 
@DeadMG hmm , ok ! well I just gave up on Qt for the time being , too much hassle for not enough return , going to hack together something using irrlicht
 
1
Q: Why is Twitto not secure?

marcofI've come across Twitto, which basically is a web framework that fits in a tweet. It is so short that I can post the code here : require __DIR__.'/c.php'; if (!is_callable($c = @$_GET['c'] ?: function() { echo 'Woah!'; })) throw new Exception('Error'); $c(); It basically searches for a file ...

love the comment
 
@MooingDuck oh .. ok :)
 
8:17 PM
@JohnDibling: I've done a "kill -10 <pid>" before. That kills the process with a bus error, giving you a core dump.
If the process was in an infinite loop, you might be able to figure out where from the stack trace.
 
hmm, if I type an equation into wolfram it doesn't give me the reverse association/equation? bummer
 
@FredLarson that is a good one...I will try to remember that.
I always thought of kill -9 as like a level 9 kill. For when you really need it. -10 should be more deadlier then. I don't know if I've ever used anything other than KILL and HUP.
 
8:54 PM
instead of number arguments, should be different commands: shoot, nuke, implode
(the last one employing future technology)
 
@CheersandhthAlf how does an implode bomb work in your eyes?
 
@bamboon e.g. you let a small black hole fall into a planet? i would think the inhabitants then saying: "that sucks!"
 
haha science comedy
 
ok, tip: when media player covers minimize button of Firefox in Windows, [Alt Space][N]
 
sbi
@CheersandhthAlf I always do that. However, I think it isn't N in English Windows versions. ICBWT.
 
9:08 PM
@sbi i'm running english windows 7. and playing foo fighters "wasting light" album (2011)
 
that one got a grammy right?
 
sbi
@CheersandhthAlf Oops. Sheepish grin.
 
@sbi you mean, admitting that you also prefer keyboard :-)
^ I always think this is the best version of "Lazy"! :)
 
sbi
@CheersandhthAlf Oh, always I freely admit that. (Although I'm not as fanatic about not using the mouse as some here seem to be.)
 
The first guitar solo is so slow you'd think they'd got Erik Kllapton in there
 
sbi
9:15 PM
@CheersandhthAlf Your late typing skills really make me shudder.
 
haha lowest score of the day
-5
A: Fast way to calculate n! mod m?

cdeszaqAssuming that the "mod" operator of your chosen platform is sufficiently fast, you're bounded primarily by the speed at which you can calculate n! and the space you have available to compute it in. Then it's essentially a 2-step operation: Calculate n! (there are lots of fast algorithms so I w...

It started with one upvote, then when I read it, I was like WTF?!?!
 
@ScottW It rocks but I wish they could stop including the 70's pop star pictures
 
sbi
9:34 PM
@CheersandhthAlf I think in Iron Sunrise by Charles Stross a future technology bomb is dropped into the system's sun, rather than into a planet. This wipes out the whole system, and, IIRC, threatens neighboring systems as well.
 
@sbi Iron Sunrise that was the book where at first you thought the aliens were humans?
 
sbi
@CheersandhthAlf Uh?
 
@sbi maybe i'm confusing with other book. i seem to remember a book about some winged beings discovering something heading towards their planet at same time as war is brewing on-planet?
 
@sbi The threat to neighboring system is just the deadman's switch of the victims.
It's not a direct consequence of the bomb.
 
sbi
9:38 PM
@CheersandhthAlf Seems like a familiar plot, but I can't place it right now. It's definitely not Iron Sunrise, though.
@RMartinhoFernandes Yeah, I'm currently reading the back cover, thinking I should have sticked a few more "IIRC" into that. :-/
 
Iron Sunrise is a 2004 hard science fiction novel by author Charles Stross, which follows the events in Singularity Sky. The book was nominated for both the Hugo and Locus Awards in 2005. Singularity Sky depicts a future where human societies have been involuntarily taken from Earth and widely distributed across the Milky Way galaxy, seemingly at random, in the wake of a technological singularity which has led to the onset of strong AI, in the form of the Eschaton. The events in both novels take place consecutively some time after the immediate aftermath of the singularity. Plot summar...
@sbi Thanks, must bai :-)
 
sbi
@CheersandhthAlf Do read Singularity Sky first, though!
 
I liked Singularity Sky more.
 
sbi
@CheersandhthAlf Ah, Ok.
@RMartinhoFernandes I think it was the same with me (IIRC!), but I still liked Iron Sunrise, too.
 
9:42 PM
@Pubby i'll vote to reopen because i think it was closed too fast
still needs 3 votes
 
sbi
@Pubby I'd consider it if you explain (preferably in a comment to the question) why you think it should be reopened.
 
@sbi I added "Voting to reopen as he's posted actual code and improved his question."
 
sbi
@Pubby Ah, improved question. You have my vote then.
 
my close vote stays
"In C++ but must use C" is not OK for C++-tagged general questions
 
I didn't know there was a close option for that
 
9:47 PM
"too localized"
 
Is there any reason to prefer const int* over int const*?
 
The second one is better.
Because I say so.
 
The robot has spoken.
 
sbi
10:10 PM
@Pubby Wouldn't that need to be:
"The robot has synthesized speech."
 
"Robot voices" became a recurring element in popular music starting in the second half of the twentieth century. Several methods of producing variations on this effect have arisen. __TOC__ Vocoder The vocoder was originally designed to aid in the transmission of voices over telephony systems. In musical applications the original sounds, either from vocals or from other sources such as instruments, are used and fed into a system of filters and noise generators. The input is fed through band-pass filters to separate the tonal characteristics which then trigger noise generators. The sound...
 
sbi
@Pubby You mean except for it being written the way it is usually spoken?
 
@sbi Perhaps "The robot has commanded"?
 
"by your command"
 
 
sbi
10:16 PM
@Pubby We don't take no command from any squeaking brass guys.
 
@Pubby Wut, that's not me.
 
sbi
> Ironically, Ricks Perry & Santorum are two of the strongest arguments for abortion I've ever seen... — Darren Nash
6
I literally laughed out loud when I read this.
 
10:37 PM
anyone here know how to do memoization in C++
 
@JohnSmith Well, memoization is just a concept. What are you trying to do?
 
Create a memoized recursive factorial function
 
@JohnSmith Take the pseudocode, and convert it to C++. It's not that hard.
 
hard for me lol
 
What have you tried?
 
10:40 PM
storing things in vectors and arrays
but not sure how to store, not sure how to best retrieve
it's a huge mess
and i don't see many resources on google showing how it's done for C++
almost always python
 
Store in map?
 
not sure how to do that
is map a datatype?
 
Yeah
 
why map
how to store/how to retrieve for memo?
 
It's an associative container
 
10:47 PM
@JohnSmith for memoizing factorial function use a vector, because arguments are integers down to zero. The pseudo pseudo code is: if argument is less than vector size, use the value in the vector, and otherwise recurse.
remember to also update the vector. :-)
 
Oh, yeah map no good for factorial
 
what if I am using a value that doesnt exist?
i dont understand the vector argument
argument less than size of vector?
 
@JohnSmith that's a baffling question?
 
@JohnSmith what's the newest thing you remember from your programming class/book?
 
I dont take classes
Just a hobbyist
 
10:52 PM
@JohnSmith do you have some code you've started with so we can see how far you got?
 
all I want to do is say "Oh, you want to retrieve factorial(15)? We have that stored in this vector, here you go." or "Oh, it's not in this vector. let's calculate it and store it in vector"
it doesn't compile
so i am starting fresh
do i need a double vector?
 
no
 
or is single enough? can i do vector[45] withotu declaring the other elements?
 
@JohnSmith `if (wantedindex < myvector.size()) return myvector[wantedindex]; else {/*do calculation and update vector*/ }
 
my factorials are large so if this is contiguous memory here i dont want it eating my RAM
right but how is that being stored
 
10:54 PM
contiguous memory is the most efficient storage?
 
@JohnSmith a vector is contiguous memory
@JohnSmith also, your factorials are not that big, don't worry about it
 
@john: your vector will maximally have like 50 elements. what is 50! ?
 
(20million)!?
i consider that big
 
@JohnSmith that's only 500KB-4MB
 
i will be using modulus operator but point stands
 
10:55 PM
the run-time memory of a vector is pretty paltry compared to needing to use an arbitrary integer class to store such things
 
do i need to store in vector in order?
or can i just declare indices anyway i want
e.g. vector[24]=something arbitrarily out of nowhere
or do i have to declare room for it
 
@JohnSmith you have to make the vector big enough to hold index 24 first
@JohnSmith myvector.resize(20000000);
 
you have to check the vector's size and ask it to resize first if it's not big enough
 
@JohnSmith oh, okay
 
can i memoize with push_back?
 
10:56 PM
@JohnSmith yes
 
instead of resize?
 
@JohnSmith yes.
 
that just resizes under the hood
 
ah
how do i check if i have memoized something
if vector.size()<n?
 
@JohnSmith if you use push_back, then yes.
 
10:57 PM
ok i will give this a try again
thanks
 
what are you going to use these modulo-factorials for?
 
@CheersandhthAlf online contest would be my assumption
 
working on a project euler problem
not a contest
just for fun
i didn't know a thing about programming before starting it
good way to learn
 

« first day (516 days earlier)      last day (4436 days later) »