« first day (486 days earlier)      last day (4454 days later) » 

9:14 AM
can some explain what the operands do in ln -fs
 
did you try man ln already?
 
sbi
@thecoshman man!
 
yeah... I think I might be getting screwed over by an alias, again
 
Xeo
@thecoshman ln -s is a symbolic link instead of a hardlink
For -f, dunno
Ah, "-f, --force remove existing destination files"
 
huh... is it me, or is there no 'even if the link exists, just make it anyway'
 
Xeo
9:18 AM
-f
 
that should overwrite existing links?
 
@thecoshman keep in mind that if the link is to a directory, repeated ln -sf dir/ target might not do what you expect (creating new links inside target/target/target... etc. You need to pass ln -sfn dir/ target to avoid the target if it already exists. -n is for --no-dereference
@thecoshman replacing would be better term.
 
@sehe erm... I am wanting to take /opt/folderA/myfile.txt and have a link in /opt/folderB so if I am not mistaken, I need to do ln -sf /opt/folderA/myfile.txt /opt/folderB/myfile.txt
 
Lol how'd my cheesy wordplay on object orientation get so many stars... 8) I could add she is a sealed class. And that is final (to translate)
@thecoshman ln -sfv /opt/folderA/myfile.txt /opt/folderB/ would do nicely
 
though I get the feeling I need a -T
 
9:26 AM
@thecoshman ln -sfv ../folderA/myfile.txt /opt/folderB/ for that matter
 
so, target should be folder you want the 'link of the file' to be placed, not the full name for what you want the link to be called
 
You don't need the -T (just try it. By the way, adding -v is a nice addition in my experience, since you'll easily spot your fuck-ups)
@thecoshman Both are fine. That's why I demoed the other style. Can considerably simplify your scripts (no need to go ln -sfv "$SOURCEFILE" "/opt/folderB/$(basename "$SOURCEFILE")" just to get the same filename)
 
but the fact the target file name is specified shouldn't stop it working
 
Anyway, if you really want, you can do ln -sfv quran.pdf bible.pdf without problem too
@thecoshman Will not. Not should not. These are computers, they don't have moods
 
Is there anything wrong with stuff like this:
//////////////////////////////////////////////////////////////////////////////
// Foo definitions
//////////////////////////////////////////////////////////////////////////////
 
Xeo
9:38 AM
@Pubby Is there anything wrong with just // Foo definitions? :)
 
@Xeo Less noticeable.
 
@Pubby Why would you want that to be noticeable?
 
@KillianDS Otherwise everything runs together and I can't make apart sections
 
Quiz time!
for (unsigned i = 10; i >= 0; --i) { /* how often does this loop loop? */ }
 
Forever?
 
9:48 AM
@Hoxieboy Nobody knows exactly what functional programming is. Even less so object-oriented programming.
@Pubby Right. It was part of an exam I designed, and almost nobody got it right :(
 
Xeo
@FredOverflow It's mean. :/
 
We still gave points for 11, but some even said 10 :(
 
@FredOverflow What about this one?
for (unsigned l = 0; 1 < 10; ++l) { /* how often does this loop loop? */ }
 
Xeo
If you want to loop 10..0, you really need the "goes to" operator: for(unsigned i=11; i --> 0;){ ... }
 
9:50 AM
lol
@Xeo Doesn't that loop from 9 to 0?
 
Xeo
Oh, right. Damn loops.
 
@sbi someone is playing around? getting to know the room management options? Not everybody has been room owner for years :)
Oh shit. Now I notice that SpK got replaced by user874747
 
@Pubby Looks easy. 10 Times? Oh wait, the middle l is actually a 1 :) That's really mean :)
 
sbi
@sehe Yup. And those two messages are seconds apart.
 
@sbi That would be suspicious unless a room can't remove himself as a room owner, I wouldn't know about that.
 
9:52 AM
@sbi And what benefit would it gain user874747 to remove his old account from the list of room owners?
@sehe Rooms can be room owners? That's bizarrely recursive!
 
sbi
@FredOverflow "Sockpuppetry" was exactly my first thought. Interesting that you came to the same suspicion.
 
@FredOverflow I meant room owners can't removes themselves
 
sbi
@sehe Of course he had to wait 2mins to point out this error...
 
SpK kept talking since then, though. It would involve two browsers at least
@sbi I'm at work
 
@sbi I was busy doing something else, I swear!
 
sbi
9:55 AM
@sehe I'm not sure how this is a reply to my message.
@FredOverflow Of course you'd swear.
 
Oh, "swear" has multiple meanings, nice catch.
Hm, there's "nice try" and "nice catch". Do Java programmers also say "nice finally"?
3
 
@sbi I thought you complained I was slow to respond. If you meant Fred, that makes sense: my message sent his parsing module into a recursive spiral
@FredOverflow that would make their use of English throwable
 
sbi
@FredOverflow Yeah, isn't it? — Except that I didn't even think of this when I wrote that... :(
 
Xeo
@sbi I'm trying to make a meme picture out of that, but I can't find a fitting image. "See spelling mistake... Wait two minutes before mentioning."
 
sbi
@FredOverflow Wow, your mind is certainly wired spectacularly strange.
@Xeo Today's only meme pic should be this, anyway:
 
10:06 AM
What is he holding in his hand?
 
I got a template question. Given a variadic list type: list<...> and a template template: template<...> class how can I put the list's elements as the template's arguments?
Should I just give list a meta function to do it?
 
sbi
3 mins ago, by sbi
@FredOverflow Wow, your mind is certainly wired spectacularly strange.
 
@Pubby the_variadic_class<the_list...>?
@sbi Looks like a tool used in baking cakes to me.
 
@FredOverflow Can you explain more?
 
@Pubby I don't even know what that tool is called in German, sorry :)
 
Xeo
10:18 AM
@FredOverflow I think he meant the variadic thingy
 
Why doesn't this work: template <template <typename... Args> class Func> and then use sizeof...(Args)?
 
Xeo
@Pubby Because Args doesn't exist.
 
@Xeo Anyway to do the same thing then?
 
Xeo
You match a template, not a specialization of it where number of arguments is known
 
void foo(void bar(int x))
{
    /* x doesn't exist here either */
}
 
Xeo
10:20 AM
@Pubby What do you want to do?
 
@Xeo I want to determine the number of arguments my template argument takes
 
Xeo
And what would the answer be for "variadic"?
 
ie foo<add>::num would be 2 and foo<id>::num would be 1
 
shit. So my line manager told me 'she needs a word with me'. I very much doubt it is to tell me I am getting a raise
 
@Pubby But the template hasn't been instantiated yet, so there's no way to know!
0
A: What does this -> ~T() do?

mikithskeggYes, I also cannot suppose anything else but calling destructor ))) Very fun mean

What a strange answer...
 
10:22 AM
Oh, the argument template wouldn't be variadic
I would have to specialize it or something?
 
Xeo
Yeah
 
Anyway to automate that?
 
Xeo
copy+paste :P
 
:(
 
10:36 AM
well, I still have a job at least
 
@thecoshman What was the talk about?
 
@FredOverflow not knowing finding out how shit gets done fast enough, basically
 
so efficiency
 
sbi
10:53 AM
@FredOverflow Easy flag weight.
 
-5
Q: To explain this in the aspect of computer programming

user1208608Please explain why one person has a family name and a name from the aspect of computer program.

lolwut?
 
sbi
@thecoshman Congrats. Sometimes, even that is a success.
 
@EtiennedeMartel Like people only buy chocolate on Valentine's day :)
 
sbi
@FredOverflow Two more votes for deletion, please.
 
Apparently I missed something yesterday.
 
10:59 AM
Hi. Since std::tuple is now in the standard, is there any reason to use std::pair?
 
@FaheemMitha std::map
 
Xeo
@FaheemMitha Yes, for std:(unordered_)map
Damn it, @awoodland. :P
Hm, so I thought I had a use for std::valarray...
 
Don't follow. Why not use tuple with two elements?
 
sbi
@StackedCrooked Be glad. And do not fail to upvote this.
 
Xeo
@FaheemMitha Because the maps internally use std::pair, and expose those on iteration.
 
11:01 AM
@FaheemMitha Using a pair more clearly declares your intent.
 
Unclear what the advantage of using pair over tuple is here. If map was to switch over to tuple what difference would it make?
 
sbi
32
Q: C++ valarray vs. vector

rlbondSo, I like vectors a lot. They're nifty and fast. But I know this thing called a valarray exists. Why would I use a valarray instead of a vector? I know valarrays have some syntactic sugar, but other than that, when are they useful?

@FaheemMitha You mean aside from rendering gazillions of lines of code out there incompilable and thus making the version of the standard doing this change the first one that won't be accepted in the industry?
 
@FaheemMitha massive breakage of old code
 
@sbi : Ok, fair point.
 
you can't just overload the begin()/end()
 
11:04 AM
@awoodland : Ditto.
 
so for the insert you could overload with tuple, but given that the rest is still tied to pair that's just confusing
 
So backward compatability, basically. But from an end user pov, which is actually what I was asking about, is there any reason to prefer pair to tuple?
They seem very similar.
 
Xeo
pair access: .first, .second. tuple access: get<0>(tup), get<1>(tup).
(granted, the tuple version also works for pairs)
 
@Xeo : Ok. So?
 
Xeo
however, the get<N> version suggests that there is more in the tuple
 
11:05 AM
@Xeo : "More in the tuple"?
 
@FaheemMitha Use pair when you need pair and tuple when you need a tuple :p
 
Xeo
@sbi Well, I thought I had a use for it for console IO and screen "painting".
 
sbi
@Xeo Have you read Jerry's and my answer?
 
@sbi We are the C++ delete task force!
 
Xeo
@sbi Yes
 
sbi
11:09 AM
@FredOverflow Good.
 
Xeo
I know that what I wanted to use it for wasn't the intent behind it, but the "slicing" part makes me want to use it. :P
I think I'd have to resort to some strange Boost.Range sliced usage for std::vector
 
Oh, "cupid" is a love god? I always thought "cupid" was a fictional contraction of both "cute" and "stupid" :)
 
@FredOverflow Did you come up with that yourself?
 
I have honestly thought that for years!
 
"You are so cupid!" :)
 
11:13 AM
 
@sbi when you owe money, any news that keeps your job is good news
 
@FredOverflow perhaps when they abandon Java, they will sigh "Finally! Nice!"
@FredOverflow uhoh meta police. nudity
 
sbi
@thecoshman Yep, I can relate to that.
 
Xeo
@sehe When Java is discontinued "Nice, finally!"
 
sbi
@FredOverflow That looks like it's by Caravaggio.
 
11:17 AM
@sehe Come on, how many angels wear clothes?
@sbi It is, I took it from the Wikipedia page on Cupid.
 
@FredOverflow Isn't that the definition of nudity? "How many bare-naked ladies wear clothes"?
 
Oh wait, sometimes Cupid wears diapers. Not very romantic, now that I think about it. It must smell really bad.
 
sbi
@FredOverflow Caravaggio's paintings always look like he was fond of boys. (Which he probably was.)
@FredOverflow Well, smelly diapers is a common result of love, you know.
 
Xeo
@sbi So the master has spoken. :P
 
sbi
@Xeo Fortunately, the parental mantra ("it's only a phase") fully fits this result. It will change, over time. (To be replaced by other nuisances, of course.)
 
11:26 AM
@StackedCrooked I think this is where I first saw the word "cupid":
"I'm With Cupid" is the fourteenth episode of The Simpsons' tenth season. It first aired on the Fox network in the United States on Valentine's Day, 1999. The episode takes place on Valentine's Day, and the wives of Springfield are jealous of the attention Apu gives to his wife Manjula. Angered by this, the Springfield husbands spy on Apu to sabotage his romantic plans. The episode was written by Dan Greaney and directed by Bob Anderson. Because the episode was to air on Valentine's Day, Fox wanted the episode to relate to the holiday, although the idea for the episode was pitched by G...
"couch potato" means "Sesselfurzer", right?
 
sbi
@FredOverflow I'm not sure they fully cover the same ground, but there'#s definitely a lot of common meanings.
 
Xeo
#define ignore_odr inline ♪~
 
sbi
I doubt your compiler would accept inline ♪~.
 
Plus that lets you only 'ignore' the ODR as long as all definitions are the same!
 
Xeo
The '♪~' is not part of the code :(
@LucDanton Meh, no macros inside the function body
 
11:33 AM
@Xeo Names of entities with internal linkage in a definition inside a header where that name is used as an lvalue :|
 
Xeo
The fuck?
 
const int internal = 0; inline void foo() { std::cout << &internal << '\n'; } in a header can easily result in an ODR violation.
 
Xeo
ah
 
Well, or so some claim. Some claim that it's at worst a gray area.
Is this chatroom still robot-less?
10
 
Xeo
Well, boo global variables, my free functions are pure. :)
 
11:36 AM
std::bind(foo, _1); in the same situation is problematic.
Do not mistake an SSCE that showcases the problem with the actual situation!
Ah nevermind, the Standard placeholders have external linkage (to avoid the problem no doubt).
Anyway, the point is that internal linkage entities don't have to be variables.
 
Xeo
Maaaan, I want views in the standard, dammit. And ranges.
 
@LucDanton is it mod-less, is what I want to know
 
Xeo
I mean, it's great to be able to rely on SSO for str.substr(2,2) and other small things, but sliced_view(str, 2, 5) would just feel better.
 
@Xeo boost::range::reversed has internal linkage btw :)
 
Xeo
Heh, thankfully I'm not using that in the function. Only sscanf. :P
@jalf Nope, @Shog9 still here
And I always need to remind myself that substr takes a start and a count
 
sbi
11:44 AM
@LucDanton Yeah, @RMartinho hasn't been here since Friday. I hope he's Ok.
 
Wasn't he updating his computer or some such? Does he have more than one?
 
sbi
@LucDanton I didn't know that. At least, if that is the reason, it's only his computer that's broken, not the robot himself.
@jalf I don't remember whether you were still here back then, but we actually locked the room last night to stop the madness. Not that this would keep out the mods, but it stopped the flagging wars.
It worked, so we might reuse the idea (thanks, @Xeo!) in the future.
 
Xeo
I hope we do not have to resort to that again
 
sbi
@FredOverflow Where's the contradiction in that? Love is both cute and stupid, after all.
 
You are confusing "contradiction" with "contraction".
 
11:51 AM
@sbi heh, silly
 
@sbi take a guess as to what my view on love is :P
 
and nah, that was after I left
 
sbi
@FredOverflow No.
@thecoshman Um, smelly diapers?
 
> tree check: expected class 'type', have 'exceptional' (error_mark) in strip_typedefs, at cp/tree.c:1178
I still got it!
 
sbi
@LucDanton You got what? A knack for producing nasty compiler errors?
 
12:00 PM
This is an internal error because I broke GCC.
 
sbi
@LucDanton Oh, you were that?
 
12:11 PM
I have to say, I just got rid of all the typename std::enable_if<...>::type and typename std::decay<...>::type in favour of template aliases (EnableIf<...>, Decay<...>) and cutting all those typename/::type does help readability, PascalCase notwithstanding. Thanks Bjarne & friend!
 
user868935
I hate pointers...
 
Pointers love you
 
Xeo
@LucDanton Pff, PascalCale...
 
user868935
lol
 
@Xeo Yeah, that was the one thing holding me back. Since I lacked imagination (and a robot) to think of an alternative I went with it.
Changing that is only a few substitutions away!
 
Xeo
12:16 PM
Why not simply enable_if?
 
user868935
@Pubby are you good with pointers?
 
Looks confusing.
 
@チョコレート人 Yeah
 
I will still have traits, e.g. EnableIf<is_member_pointer<T>>. I'm still not convinced of making the aliases look like traits atm.
 
Xeo
@LucDanton Make it passive! enabled_if, decayed :)
 
user868935
12:18 PM
@Pubby Well, my problem is I'm trying to average an array of numbers
 
Xeo
@チョコレート人 If you're using pointers for that, you're doing it wrong.
 
Also it might be a good idea to name that enable[d]_if differently, as its usage doesn't strictly look like using std::enable_if.
 
Xeo
Unless you're in C. And even then you're normally better of with indices
 
I.e. EnableIf is doing a conjunction of MPL-style boolean constants.
 
Yeah, dunno why you would need pointers for that
 
Xeo
12:20 PM
@LucDanton Hm, just to save you from typing &&?
 
user868935
Trying something new
 
Xeo
Oh, wait, traits, not bools
 
EnableIf<Not<is_member_pointer<T>>, Not<is_function<T>>> vs typename std::enable_if<!is_member_pointer<T>::value && !is_function<T>::value>::type
@Xeo Yep.
 
Xeo
I wonder...
 
Now I incur a Not instead of ! but I don't mind. Also Or instead of ||.
 
Xeo
12:21 PM
lemme test something
 
@LucDanton : Template aliases do seem like a good idea.
Hmm, wonder if gcc 4.7 supports them.
 
It does! I'm using it. (Although it has to be a fresh-ish snapshot IIRC.)
 
Template aliases are always a good idea
 
@LucDanton : Well, I did a backport to squeeze of a late Dec snapshot. Though I suppose I could backport a later version. Are you using a local installation, or does your OS have a binary package?
 
@FaheemMitha Using a Debian package.
 
sbi
12:25 PM
> I find it telling that you are unable to make your point about not using expletives [...] without using an expletive yourself. FFS, this is how you speak all day — what's wrong about being honest about it?! And don't give me that "corporate filtering" BS. This site is full of expletives, and you will certainly already be filtered, never mind this language's name. [...] — sbi
 
Xeo
@FaheemMitha Clang also supports them
 
The unstable repos update it regularly, very convenient.
 
@LucDanton : Are you using testing/unstable?
 
Xeo
@sbi I can't click your name!! The message options overlay it. :(
 
@LucDanton : Ok, unstable, then?
 
sbi
12:25 PM
@Xeo Resize your browser window?
 
@FaheemMitha I'm on Ubuntu actually. Bringing in that package doesn't mess up with the install too much.
 
Xeo
I'd need to resize my display
 
@LucDanton : Actually 4.7 is only in Debian experimental.
@LucDanton : I did a rebuild. Which is a bit of a business. But it works very nicely on squeeze, somewhat to my surprise. I mean, considering what a complicated piece of machinery a C++ compiler is.
 
@FaheemMitha My mistake, unstable is the magic word to use in the apt/configuration file to pull the package from the repo.
 
@LucDanton : Yes, looks like this arrived in 4.7. Can anyone give me a code snippet to test it?
I forget the syntax.
Actually, I don't know the syntax, since I have never used it.
 
sbi
12:28 PM
@Xeo Sigh.
 
Xeo
:)
 
@FaheemMitha Perhaps something like this.
(Didn't try to compile though.)
 
@LucDanton Ok. I see the magic word is using. Though isn't that already being used for scoping?
 
using is being promoted to be the go-to tool to introduce a name into a scope, yes.
 
Xeo
Damn, we'd need something to be able to apply && and || to types to make EnableIf<is_member_pointer<T> && ...> work. :|
 
12:33 PM
E.g. using T = int; instead of typedef int T;
 
What's the best way to do type coercion on simple arithmetic metafunctions?
 
@LucDanton : So the use of e.g. using std::vector; is compatible with that of template aliases then?
 
@FaheemMitha Yes. That previous usage is now only one case of what using can do as a whole.
 
@LucDanton : Ok. That sounds sensible. Thanks.
 
Xeo
In any case, @Luc, you could get rid of those Not and could use && if you made is_member_pointer etc constexpr functions
 
12:36 PM
@Xeo SFINAE?
 
Dans les reves de l'artiste
Que la gloire n' a jamais couronne
Dans ce monde egoïste
Qui renie ce qu'il a adore
Dans ceux qui ont peur
Dans ceux qui ont froid :)
 
Xeo
@LucDanton ?
 
I don't know what the interaction between constexpr functions and SFINAE is.
What if I have template<typename T = /* metacompute */, typename = EnableIf<some_trait_function<T>()> ...?
 
Xeo
std::enable_if<is_member_pointer<T>(), ...>
template<bool B, class T = void>
using EnableIf = typename std::enable_if<B, T>::type;

template<class T>
constexpr bool some_trait(){ ... }

template<class T = /* metacompute */, class = EnableIf<some_trait<T>()>>
And you can use logical operators just fine with them
 
I'm not forwarding every trait there is to a constexpr function.
 
sbi
12:41 PM
What a prick.
 
Xeo
@LucDanton I just experimented with something else that seems to work on Clang
template<bool B>
struct bool_{
  static constexpr bool value = B;
  constexpr explicit operator bool() const{
    return value;
  }
};

int main(){
  constexpr bool_<true> b1{}, b2{};
  bool_<b1 && b2> b3;
}
 
Yeah, I have Bool and Int to mirror Boost.MPL's bool_ and int_.
Also Min.
 
Xeo
Then add a constexpr conversion operator to those and you can use them like constexpr functions
 
E.g. EnableIf<Bool<sizeof...(T) == sizeof...(U)>> is convenient.
template<bool B> using Bool = std::integral_constant<bool, B>; being the trivial implementation.
 
Xeo
Yeah, but alas conversion operators need to be members. :(
Inheritance might be an option
 
12:45 PM
I don't see the need for your wrapper.
Please note that the fact that my EnableIf accepts MPL-style boolean constant is a feature.
 
@sbi I'd be willing to take a bet that he just had a flag declined on that answer
 
I could have gone with template<bool B> using EnableIf = typename std::enable_if<B>::type;
 
sbi
@awoodland I don't follow. What?
 
However I feel like going from typename std::enable_if<trait<T>::value>::type to EnableIf<trait<T>> instead of EnableIf<trait<T>::value> is a bigger win.
I don't remember what Bjarne & Co used in their slides.
 
@sbi I suspect he flagged it NAA and had it declined
 
sbi
12:48 PM
@awoodland Oh. Why do you suspect that?
 
Hello..
 
And that's also why I'm sticking to PascalCase so far, it helps distinguish the EDSL-like helpers (Not, Or, etc.) from the traditional traits. Although I could go the way of Boost.MPL.
That would mean using not_ though :p
 
@sbi just a hunch - there's a rhetorical question in the answer and they seem to get flagged a lot - the comment looks like a last ditch "trying to justify the flag"
I'm speculating obviously
 
good day all
 
hi
... that fell flat
 
I want to add dynamic types to some part of my C++ project, so that I can get and set my object instances in real-time from strings. I am thinking in XPath terms but don't want to use XML since it is to inefficient.
I was looking at boost spirit or ANTLR both seems good bit is a little unclear to me how the semantics will perform actions on my objects when for example I want to find the 4th element in a std::vector m_vec that is a member of my class A
class A
{
public:
vector<string> m_vec;
};
 
@Damian what's the underlying problem?
 
I want to get to teh vector from a string "A.m_vec[3]"
this should then return the string in the vector
 
like a scripting language?
 
@awoodland Yes, like a scripting language.. or XPath
 
1:13 PM
Going to need something to store and map the member names to e.g. pointers to member (or perhaps a functor that returns the appropriate member given a instance).
 
I'd embed python and use Boost.Python or SWIG to expose C++ on the Python side then
(assuming it's very general and not just one vector)
 
Luabind has similar functionalities to Boost.Python for Lua I think.
 
@awoodland I don't want anything big since it is just for getting out values to the user and allow him to set values and arrays
 
@Damian how general do you want the "A.m_vec[3]" to be then? That looked pretty general to me when I saw it
 
@LucDanton So the grammar of that would be Python if I use Boost.Python for Lua
 
1:16 PM
Uh, Python if you use Boost.Python, Lua if you use Luabind.
 
@awoodland Sorry, to make it clear I am not after full blown multi-line scripts.. just one liners that find value in objects
 
117
Q: What's the best C++ JSON parser?

Sam BakerI've seen the C++ JSON links on www.json.org but would like some feedback on which parser people prefer - for reliability, speed and ease of use. Thanks, Sam

would something like that fill the hole?
If everything is (roughly) the same and simple you can just build a map of names
 
@awoodland OK, JSON is find for defining the data in the objects, but my problem is that I want to dynamically set and get values from string inputs (expressions)
So when I changethe data definition I want it to
decouple the dependency.. so that the user can use strings and querry objects and some run-time type system will find out how to find the data in the data object
 
I'd avoid that middle road personally - either keep it very simple, not much more than a map, or use somebody else's solution (e.g. embed Python)
@sbi - I flagged that user you said looked odd in the other chat room suggesting a mod looked for irregularities - see stackoverflow.com/users/940096/spk now
 
@awoodland So add metadata via maps to each object, OK, but then how do I access them from a command line string?
I need to define my own language
 
1:25 PM
you need a global map
and then that finds objects
which have a local map
 
is it possible to contruct a variadic pack from vector? (not possible I know since templates require const expression but any algo to do that if it was possible)
 
If you already have a pack, yes.
But since the size of an std::vector is not part of the type then in the general case no.
 
@LucDanton suppose I get 10 args sequentially (one by one) , how do I construct a pack which at last contains 10 args
 
When you say you get them one-by-one, is that at runtime (e.g. generic programming) or compile-time when doing TMP?
 
@LucDanton compile time
 
1:30 PM
Then you can use Boost.MPL to construct a sequence using e.g. mpl::push_back or do a moral equivalent.
 
@LucDanton no boost please
 
Well that is the problem I am having C++ templates are parsed and optimized at runtime.. I need to add a dynamic type system
at run-time
 
@MrAnubis Obviously pick 'or do a moral equivalent' then...
I don't like it when you say "no boost please provide the code kthx".
But perhaps you meant to ask "what does the moral equivalent look like"?
 
@LucDanton I don't have boost here that why was saying that
@LucDanton yes some what :)
 
@Damian can't you just use virtual methods?
 
1:32 PM
Then get it?
 
@MrAnubis Perhaps, but that's hardly my problem.
When I mention Boost, it's not so that you use it.
 
@CatPlusPlus to me?
 
I mention it because since it's ubiquitous it's part of the common language.
 
@awoodland virtual methods relates to polymorphism, but you are right the vtable will termin at runtime what is called
determine
 
@LucDanton Thanks , atleast I can go to MPL now:)
 
1:33 PM
Some time earlier I said "I'm using Boost.MPL-style boolean constant". But I'm not actually using Boost.MPL. Those that are aware of what Boost.MPL does (whether they have it installed or not) will know what I'm talking about then.
So, I'm mentioning Boost to better communicate, not to advocate its use.
 
@LucDanton sorry if my answer weren't appropriate to you
 
@LucDanton then don't mention it ;-) (ups I also did!)
@LucDanton The "B" word.
 
@Damian I'm not going to explain what ranges or TMP integral constants or bind (as general concepts) are whenever they come up.
 
Hi I need to concatenate two strings in a batch file. Can anyone tell how to do it?
 
@LucDanton open your eyes.. there are other solutions than the "B" word
 
1:36 PM
@Damian The point went completely over your head.
 
One of the strings is stored in variable %1
 
@bubble batch programming ha ha .. just a sec
 
i need to store the second part of the string in another variable and
 
then produce the third variable containing the concatenated strins
 
1:37 PM
Will this work ?
@Echo Off
Set _root=C:\Test
Set _Out=C:\Test1\tmp
If NOT Exist %_Out% MD %_Out%
For /D %%A In ("%_root%\*") Do (
PushD %%~fA
For %%I In ("*.lst") Do (
Copy *.CLI "%_Out%\%%~nI.cli"
Copy *.PEN "%_Out%\%%~nI.pen"
Copy %%I "%_Out%\%%I"
)
PopD
)
 
user784668
boost::noncopyable disallows assignment, right?
 
@Damian where is the concatenation part
 
so MPL is just adding functional programming paradigm to C++?
 
@Damian Absolutely not.
Boost.MPL is for TMP.
 
@bubble Ups.. was wrong.. just a sec
@bubble Will this work? "copy /b file1+file2 file3"
 
1:44 PM
In TMP, when is it preferred to use inheritance?
 
i donno much about batch programming but my variable names are %1, %2
are you trying to copy files or something?
 
@LucDanton template meta programming.. thank you..
 
@Pubby If you have access to template aliases you can use that instead. Otherwise, it's used a lot.
 
mawning
 
@LucDanton Yeah, I've just been using aliases. Can they do the same things?
 
1:47 PM
@Pubby Only when single inheritance is involved.
Or sometimes you do use single inheritance but introduce new members. Then you can't use an alias for that.
 
there's also CRTP
 
Are there even plans to make boost::variant move-enabled :|
 
Roses are red,
violets are blue
vodka costs less
than dinner for two
 
user784668
lol
 
Roses are red
Violets are blue.
Moody’s could never
Downgrade you.
(relates to finance... sorry)
 
1:56 PM
lol
 
@Damian I'm so stealing that
 

« first day (486 days earlier)      last day (4454 days later) »