« first day (692 days earlier)      last day (4261 days later) » 

3:01 AM
@Mysticial I'm voting to close that message and to close its star, too!
 
?
lol
 
damn it
my edit got ninja'd
:(
 
It's at 3 reopen votes now. And is the first one in the re-open list in the 10k tools. I shouldn't be too worried at this point.
 
He didn't even edit the grammar or bad code block
 
Normally, I wouldn't care that it's closed. But that question (and my answer) has too many votes for me to let it get deleted by the trigger-happy 10/20ks.
 
3:08 AM
@Mysticial very useful information in there
 
@Rapptz And that isnt a bad thing
 
@MohamedAhmedNabil Yes it is. I hate C style strings with a passion
 
@Rapptz std::string is more advanced than char arrays and work alot differrently. std::string is very complex and store data completely unlike char arrays. Teaching std::string then c-strings can cause confussion.
@Rapptz I dont really know why people are against introducing c-strings first
 
If I was a book author I'd say "These are C-Style Strings"
then move on and never discuss them again
 
@EtiennedeMartel btw, why should i talk about C++11. What IDE works with it?
 
3:11 AM
@MohamedAhmedNabil I thought we already told you that IDE != compiler.
 
@pyCthon It doesn't matter. You're not supposed to delete dupes - especially if there is a good answer. But people don't listen or don't care. They see, "oh, a question with lots of votes! I'm gonna delete it because I can!" sort of thing.
 
@EtiennedeMartel compiler is part of the ide. So excuse my unclear talk.
 
I managed to rescue this answer today - only by pinging shog.
 
@MohamedAhmedNabil Not necessarily, because you can use a compiler without an IDE.
 
@EtiennedeMartel I know, i spoke unclearly
 
3:13 AM
@MohamedAhmedNabil Still, best C++11 support is with the most recent versions of Clang and GCC.
 
-2
Q: How can we allocate memory of order 10^15 in C

sandyroddickI need to allocate memory of order of 10^15 to store integers which can be of long long type. If i use an array and declare something like long long a[1000000000000000]; that's never going to work. So how can i allocate such a huge amount of memory.

 
that's actually a small size for parallel computing problems
whats that blue gene Q monster at LLNLs 1.5 PB of ram?
 
Someone can totally pull that implied facepalm joke on that.
 
should i give the OP ideas lol
 
I'm gonna reopen that. As stupid as it sounds, it's a real question.
 
3:21 AM
Your 10k powers are going to your head! You might be abusing your powers for good!
 
@LucDanton That's a 3k power. :)
 
lol
What exactly is there more to add though?
wow it reopened
neat
 
tell the OP to use MPI
lol
 
@Rapptz There were already 4 reopen votes on it. I cast the 5th.
 
@Mysticial Someone doesn't seem to understand the concept of "order of magnitude"
 
3:25 AM
@Insilico Have you seen the GUID question?
 
@Mysticial The one that asks "how to iterate through all the GUIDs to brute-force a server"?
 
@Insilico yep, that means you have. :)
 
You'd think the ability to check that your numbers aren't completely crazy is something they teach in grade school, no?
 
I'm seeing a doctor first thing in the morning. This is terrible.
If I lay down I become dizzy up to the point of throwing up.
 
@Insilico some people have imaginary fingers you see they can count , some of these fingers are in other dimensions so their counting ability is superb
 
3:28 AM
I'm a biomedical scientist.
 
It's also in the same vein as people who bitch about NASA's budget. "$2.5 billion for a robot on Mars OMFG"
 
Is this a correct sentence?
buffalo buffalo buffalo buffalo buffalo
 
No
 
Yes it is
 
Need more buffalo.
 
3:29 AM
@Rapptz google it, it is
 
No it isn't.
You need 8.
You have 5.
 
@Rapptz You can take out some of them and it still works.
 
lib64/crt1.o In function `_start':
 
The first one is an adjective. So you can remove it.
 
Buffalo of the city Buffalo ,Bully, Buffalo of the city uffalo
 
3:30 AM
i need a extern " c.. some where right?
 
@Mysticial 5 is just kind of odd.
 
@Rapptz So is the rest of the English language.
Or rather, all human languages.
 
The buffalo from buffalo buffalo other buffalo
that's 4 if you remove the words in between
 
James while John had had had had had had had had had had had a better effect on the teacher
 
Hm..
 
3:32 AM
Correct?
 
I think the shortest you can get is 2 buffalo. Subject, verb.
 
I can't think of a combination with 5
 
Stop arguing and see this
James while John had had had had had had had had had had had a better effect on the teacher
 
That one isn't really good compared to the buffalo one
It has implies italics and quotation marks
 
Look its like this. Buffalo buffalo
 
3:34 AM
@Rapptz buffalo(city) buffalo(animal) buffalo(verb) buffalo(city) buffalo(animal)
that's 5
 
Buffalo of the city buffalo
buffalo ( bully)
Buffalo of the city buffalo
 
I know.
 
I can actually read, surprising I know.
 
Buffalo buffalo buffalo buffalo byffalo
 
3:35 AM
@MohamedAhmedNabil You need to capitalize the 4th one.
 
Damn it. Semantic satiation
Buffalo looks weird now
 
@Mysticial Will Will will the will to Will
 
That code yesterday that parses english text to numbers had a typo I noticed today.
I spelled "forty" as "fourty"
 
Will(asking) Will(name) will(verb) the will(noun) to Will(name)
did I get that right?
 
@Rapptz that's dewty :P
@Mysticial yea XD
 
3:39 AM
I don't think that makes sense.
What does will as a verb mean?
 
@Rapptz I'm not sure either...
 
@Rapptz it mean (to will)
@Rapptz I found it bit.ly/UwHX0I
 
Why did you send me a LMGTFY link
 
@Rapptz So you dont have to do it yourself :D
 
Will means "to desire"
Supposedly..
"Will Will desire the will to Will"
 
3:43 AM
will 1 (wl)
n.
1.
a. The mental faculty by which one deliberately chooses or decides upon a course of action: championed freedom of will against a doctrine of predetermination.
b. The act of exercising the will.
 
That says noun.
 
The act of exercising the will.
The act itself
is a noun
v.intr.
1. To exercise the will.
2. To make a choice; choose.
I rule you all with my english skills. MUAHAHAHAHAHAHA
gtg
 
You used a noun and an intransitive verb.
o.o
 
3:56 AM
Hmrh.. 3 Wii U bundles.
 
4:47 AM
/usr/local/include/gcc47/c++/limits:1405:35: error: template argument 1 is invalid
/usr/local/include/gcc47/c++/limits:1479:44: error: template argument 1 is invalid
any ideas?
 
Template argument 1 is not valid.
 
I've a predicate like this
template <typename CharT>
struct Predicate{
    typedef std::basic_string< CharT, std::char_traits<CharT>, std::allocator<CharT> > StringT;
	Predicate(const StringT& seps): _seps(seps){}
	bool operator()(const CharT& c){
		return (_seps.find(c) != StringT::npos);
	}
	private:
		StringT _seps;
};
is there any way to make it one liner ?
like binding std::find with seps ?
so I'll remove this class and use that one liner solution instead ?
my job is to get a functor that returns boolean value whether the given character is present in that string or not
 
For the record you can just use std::basic_string<CharT>.
I suppose we should assume C++03, since you're not using a lambda?
 
@LucDanton for some network sencitive application I need this whole thing because sometimes I use uint16 etc .. So I keep it as a good practive
 
How does that matter?
 
5:00 AM
@LucDanton Ya My compiler doesn't support C++11 yet
@LucDanton Well few days ago I wrote an endian parser where It matters. So from then I started to write like this
 
That's still no excuse not to use std::basic_string<CharT>. Same effect, less characters. What's not to like?
 
@LucDanton well I'll explain that . but please come back to the original point
 
Boost.Phoenix has lazy versions of the Standard algorithms. They do happen to work on ranges, too, to make it more convenient.
 
@NeelBasu I think you're mistaken. The definition of std::basic_string is: template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> > class basic_string;
 
As such, find(seps, arg1) != seps.end() should do the trick.
 
5:05 AM
@JerryCoffin then it was a problem somewhere else ehen I tried to use basic_string with quint16
 
@NeelBasu Instead of std::find, why not use std::string::find_first_of(seps) != std::string::npos?
 
@JerryCoffin Ya thats okay too. how will I bind ?
I meant I need to pass that as a Predicate to find_if
 
@NeelBasu I'm suggesting you use find_first_of instead of find_if.
 
Thats not my issue What I want is the Predicate.
right now I've written a struct for it. and I want to make it an one line functior
and I'll remove that Predicate
@JerryCoffin I an repeating find_if to capture all occurences.
 
@NeelBasu Why are you trying to write a predicate for find_if to turn it into find_first_of? You can use either string::find_first_of, or std::find_first_of, but to find any of a set of items, find_first_of simply fits the task better than find_if.
 
5:11 AM
template <typename CharT>
struct Predicate{
    typedef std::basic_string< CharT, std::char_traits<CharT>, std::allocator<CharT> > StringT;
	Predicate(const StringT& seps): _seps(seps){}
	bool operator()(const CharT& c){
		return (_seps.find(c) != StringT::npos);
	}
	private:
		StringT _seps;
};

int main(){
	std::string str = "Hallo World | I am here ! Where are You ?????? This is where the Line ! ends";
	std::string::const_iterator begin  = str.begin();
	std::string::const_iterator end    = str.end();
 
Basically, you're trying to fit the proverbial square peg into a round hole, and then asking why the hammer to do that needs to be so big. Use a round peg instead.
 
This is what I am doing
 
I managed a demo.
Wasted some time on that BOOST_RESULT_OF_USE_DECLTYPE silliness. No idea how make that work for C++03, where there is no decltype.
May be the case that Boost.Config will do the right thing for C++03, I can't test.
 
#include <iostream>
#include <algorithm>
#include <string>

int main(){
std::string str = "Hallo World | I am here ! Where are You ?????? This is where the Line ! ends";
std::string::const_iterator begin = str.begin();
std::string::const_iterator end = str.end();
std::string::const_iterator it;
std::string seps = "|!?";

for (it=begin; (it=std::find_first_of(it, end, seps.begin(), seps.end())) != end; ++it)
std::cout << "Position:" << it - begin << "\n";

return 0;
}
For the moment, it just prints the position of each separator. I think the rest is fairly straightforward.
 
THanks I am looking
boost::phoenix have a find ?
I didn't know
 
5:39 AM
I'm still looking for a use-case for boost::phoenix. I like it, but I can't find an excuse to use it :P
 
6:20 AM
Moaning.
@StackedCrooked The good thing is, you only need tiny spots to use it usefully
Did you see my examples in answers? Shall I link one?
@LucDanton Huh. You mean there is something that'll manage the right BOOST_RESULT_OF_USE_DECLTYPE for you? Boost.Config doesn't really ring a bell
Jul 26 at 15:38, by sehe
    auto foo = arg1 + arg2; // truly polymorphic 'lambda'

    std::cout << "Bye" << foo("Hello world", 5) << std::endl;
    std::cout << foo(3, 100) << std::endl;
 
@sehe I recall that I need to use that flag for Boost.ResultOf to defer to decltype in C++11 mode -- by default it does not due to some compiler using a pre-Standard specification of decltype. But I don't recall what happens with C++03.
I'm hoping that Boost.Phoenix really does use the ResultOf protocol correctly and everything is taken care of.
 
@LucDanton Oh, I always type it up :)
@LucDanton It does
 
@sehe LWS doesn't!
 
@LucDanton Because it specifies -std=c++11/0x which requires the flag. I always type it - but not when c++11 isn't enabled, obviously!
@LucDanton For gcc, the following also works (on my versions, which is 4.6/4.7 I think):
#ifdef __GXX_EXPERIMENTAL_CXX0X__
    #define BOOST_RESULT_OF_USE_DECLTYPE
#endif
 
1 hour ago, by Neel Basu
@LucDanton Ya My compiler doesn't support C++11 yet
 
6:29 AM
@LucDanton Oh. In that case, I can assure you that Phoenix pervasively supports the ResultOf protocol, yes. I've been using that way before c++11 became my standard /cc @NeelBasu
 
6:59 AM
Moooorning
 
Ohahahaha:
> "MODS ON THIS SITE IS HORRIBLE MODS HORRIBLE DOWNRATTING"
 
So I have this very strange problem. There is a function is_Mach() which is used like so n->is_Mach(). Is seems to return a bool. However, I'm not able to find the method anywhere. It should reside in the class of n which is of type Node. But the method is nowhere to be found. The Node class doesn't inherit in any way either. Is it possible to create some macro that could create this behavior?
 
@sehe haha, I took part in that rollback war.
 
It's not locatable with ctags either, as all other methods are
 
@Mysticial Retaliatory action :) I can't see what he flipped out about. Probably some comments saying that this is "Primary school arithmetics"?
@ManofOneWay Run it through a preprocessor? cpp $CPPFLAGS myfile.cpp
 
7:14 AM
#define DEFINE_CLASS_QUERY(type) \
bool is_##type() const { \
return ((_class_id & ClassMask_##type) == Class_##type); \
} \
type##Node *as_##type() const { \
assert(is_##type(), "invalid node class"); \
return (type##Node*)this; \
} \
type##Node* isa_##type() const { \
This must be it right?
 
@ManofOneWay By the way, it looks like you're committing a typo: is_Mach -> is_Match?
@ManofOneWay Yep it is.
I was just going to say: token pasting
 
No, it stands for is_Machine
Machine Node basically
@sehe Thanks =)
 
@ManofOneWay Looks like a fine example of this:
6
A: Attribute & Reflection libraries for C++?

SkizzThis is what you get when C++ meets Reflection: Whatever you choose, it'll probably have horrible macros, hard to debug code or weird build steps. I've seen one system automatically generate the serialisation code from DevStudio's PDB file. Seriously though, for small projects, it'll be easie...

 
@sehe haha indeed
I mean come on:
#define DEFINE_CLASS_ID(cl, supcl, subn) \
Bit_##cl = (Class_##supcl == 0) ? 1 << subn : (Bit_##supcl) << (1 + subn) , \
Class_##cl = Class_##supcl + Bit_##cl , \
ClassMask_##cl = ((Bit_##cl << 1) - 1) ,
This is horrible
 
@ManofOneWay As long as it is (a) hidden (b) works, it might be defendable.
 
7:25 AM
It's there to avoid virtual query methods of is_<Node>
Sure, performance is super important in a compiler. But this code is totally messy
 
@ManofOneWay You're working on a compiler? Or just browsing for curiosity?
 
@sehe nice...
 
@sehe I'm doing my thesis at Oracle, working in one of the JIT compilers for the HotSpot VM
 
@ManofOneWay Oh cruel. No surprise to find such code there. However, they have the best excuse for needing optimizations like these.
@ManofOneWay Also, you might not be (legally) allowed to share these snippets, FYI
 
@sehe It's open source, to it's no problem. You can find the code at openjdk.java.net/groups/hotspot
 
7:29 AM
@sehe If someone asks, I never saw them.
 
@Rapptz 80% of the books I have on C++ aren't even about strings. Why would I see so many books to learn it? I learned it once. Although I have finally 'read' (scanned) Accelerated C++ the other week.
@ManofOneWay Is the hotspot compiler part of the open source? Amazing. I never imagined
 
@sehe You could write an entire book about C++ strings easily
 
Morning all
 
@Neil Who, me?
 
@sehe Yes. HotSpot is the VM and it has two compilers.
 
7:35 AM
@ManofOneWay Darn. I thought there was the 'free' VM and the 'Hotspot' VM for enterprise server thingies. TIL!
Anyway, afk
 
@ManofOneWay so it's twice as fast right?
 
Am I the only one who hates the term C/C++?
 
oh hey, look what I found in our code base 'AbstractConfigurationManager'
 
@LuchianGrigore me!me!
 
@LuchianGrigore It has some valid use cases, but for the most part it is just wrong. Valid use case example 'I like the C/C++ style syntax' ... I think that's about it
 
7:38 AM
Bah... So it's the same as saying "I like Java/C++ style syntax"...
fugly if you ask me....
 
mawning
 
indeed
personally, I think rather then point out that 'C/C++' is not a language, you should rant about how lists are written in English
 
the social part of me wants to go see some friends, but they're all miles and miles away
 
speaking of which, if you end a list with 'et al' do you say ' things and et al' or just 'things et al'?
@TonyTheLion and the honest part of you?
 
I think the latter
@thecoshman also
 
7:41 AM
et == and
afaik
 
@TonyTheLion hmm... what about the murderous psychopathic part of you?
@LuchianGrigore makes sense :P
 
et al means "and other"
@thecoshman we shall not discuss that part of me.
 
ah, well the latter makes perfect sense then
@TonyTheLion :P
 
@thecoshman you could have just used Google...
cause that's what I did
I'm not having a good day today.
 
@TonyTheLion this place has a better danslation unit
 
7:43 AM
oh wait, that's every day
 
@TonyTheLion again? same shit?
 
same shit, different day
 
oh, btw
user image
3
 
lol
ugh
 
@LuchianGrigore that's a starin
 
7:44 AM
ugh, I'm supposed to unzip this large file and it always files
at the same place, unzipping it
WTF
 
script?
 
not a script, ordinary zip file
 
@sehe No, not you personally, unless you personally think you could write an entire book about c++ strings
 
@LuchianGrigore well, it's not that bad. At least there will be more beginner C++ questions for me to farm rep. on
 
¬_¬ use a script to do it
 
7:45 AM
what script?
unzip file.zip
 
@BartekBanachewicz get your close as dupe votes on the ready!
 
Yay! I got starred twice.
 
very advanced :P
 
@BartekBanachewicz The school year is starting. So there should be a lot more homework questions to snipe.
 
@LuchianGrigore star whore
 
7:46 AM
I'm going for the full package - first it was rep whore, now star whore... next up - badge whore
 
@Mysticial well, I linked to the Luchian's image about it
 
wait... how the fuck am I 3rd in the homework tag...
oh...
someone retagged that...
 
cause you don't normally answer shitty homework questions
 
@Mysticial you mean the rep whore tag
 
7:49 AM
so I answered a homework question... and it got a few upvotes... lol
 
oh speaking of which. I'm whoring for reopen votes on that. :)
@LuchianGrigore yeah, silly things happen when things get massively upvoted.
 
oh man I can hardly wait for the b'fast
 
questions with bad grammar are so off putting!
 
7:51 AM
I'll wait for the next C++ question on the multicollider and after I get some upvotes, I'll tag it sex. That way, I'll be the first on SO for sex.
 
I need my om nom noms!
 
lol
@thecoshman why haven't you had b-fast yet?
 
@TonyTheLion today is Friday, traditional day of waiting far too long to have a cooked b'fast at work
 
We already told you why this is a bad idea, but of course you can learn it for yourself. — Bartek Banachewicz 4 mins ago
 
7:52 AM
@thecoshman wut?
 
the guy just tried to edit my answer and put his ingenious thought in it.
 
@TonyTheLion you lol a fiar bit
 
hah, nice function
 
@TonyTheLion tl;dr no, no I have not ha b'fast
 
@thecoshman lol
73 pages worth of "lol" from me :) I'm proud of that achievement :)
 
7:54 AM
anyone got experience with webmoney ? :O
 
Nope.
 
@TonyTheLion Hi, how're ya?
 
@Mr.Anubis what do you mean by webmoney?
 
withdrawing money from webmoney account is serious pain in ass :(
 
13 mins ago, by Tony The Lion
I'm not having a good day today.
 
7:56 AM
@Mr.Anubis Do what I do and don't withdraw money.
 
ah, ok.
@Mr.Anubis "HQ: Moscow, Russia" no shit.
 
@Neil I need to , you got experience with it?
WebMoney is an electronic money and online payment system (transactions are conducted through WebMoney Transfer). WM Transfer Ltd, the owner and administrator of WebMoney Transfer Online Payment System, was founded in 1998 and is a legal corporate entity of Belize, Central America. Originally targeted mainly at Russian clients, it is now used worldwide. The company claims to have more than 11 million users. As of December 17, 2010, Steam accepts WebMoney as a payment method. An unrelated Japanese company provides a similar online payment system using the same name. However, the Japanese...
 
never heard of it
 
They are asking me to upload passport now to withdraw fund to my bank account, now how do I upload it when I don't have one Oo
 

« first day (692 days earlier)      last day (4261 days later) »