« first day (485 days earlier)      last day (4455 days later) » 

12:00 AM
See you next time on the muppet show!
2
 
@sehe are you in australia?
 
@チョコレート人 cool, glad it worked in the end!
 
user868935
@sehe Thanks for everything.
 
XD sorry I had to know
 
@Hoxieboy The Netherlands. 1am here
 
user868935
12:00 AM
@je4d thanx for your help too :)
 
@sehe Ah well take care then, I've learned a deal here with you and your chat etiquette ;)
 
@チョコレート人 no problem ;)
 
Feel free to star that (the muppet show reference :) hehe
 
@sehe I've heard that one before...
and have a star.
 
Or my confucian wisdom a few lines back for that matter
@je4d thanks
 
12:01 AM
I should get going too.. just gone midnight here
 
@je4d this time I go, though :)
 
jeeze you guys, its like 5 pm here, your missing out on all this time :D
 
@sehe I'm not going to be around to verify it this time ;)
 
@je4d There is always chat transcripts
 
@sehe true, but i don't care quite that much
 
12:04 AM
yay first 4 lines of code finished
 
12:28 AM
Another "cover yer eyes" question:
1
Q: C++ Cannot call constructor ' ' directly

Wade GI'm working on some OpenCV code and developed it in VS 2008 on windows. I'm trying to run the code on Linux with g++ but I get the error "Cannot call constructor 'ImageProcessor::ImageProcessor' directly" for ImageProcessor and all of the other classes I have created. I've attempted to find a wa...

 
that's some ugly code
 
that's what I said when I met your mother! O_o
 
lol i know and the first answer for it is brutal
 
@DeadMG my mother hasn't the slightest about programming
she wouldn't have understood what you were saying
@sbi damnit, I'm unfortunately not in the UK at that time, but if that changes, it would be nice to come say hello :)
 
hey
hey, folks. What's the difference between hey.co.uk, 177.55.125.55 and waldorf.hey.co.uk?
one is domain name, other is ip address, other is server
right? but what is the relationship between them?
 
12:40 AM
'ello
So I solved my problem and then decided that the visual design is horrible and needs to be redone.
 
@hey I think the waldorf one has to be a subdomain of hey.co.uk
 
hey
no, it's actually a server
 
Also:
 
hey
what is the relationshiop between them?>
 
it can be whatever it wants to be
it's still a subdomain of hey.co.uk
 
12:42 AM
[d:\dev\test\d]
> nslookup hey.co.uk
Server: cache1.banetele.com
Address: 194.19.2.11

Non-authoritative answer:
Name: hey.co.uk
Address: 194.247.170.34


[d:\dev\test\d]
> nslookup 177.55.125.55
Server: cache1.banetele.com
Address: 194.19.2.11

*** cache1.banetele.com can't find 177.55.125.55: Non-existent domain

[d:\dev\test\d]
> nslookup waldorf.hey.co.uk
Server: cache1.banetele.com
Address: 194.19.2.11

*** cache1.banetele.com can't find waldorf.hey.co.uk: Non-existent domain

[d:\dev\test\d]
 
augh having trouble about the search iteration in my web crawler
 
12:59 AM
What is it with Javascript people and defining functions like`var function = function() { };` What's wrong with just function() {}?! (Also thank God for Comment Save else I would have lost all that to the evil escape key)
 
@KianMayne please convince me that that isn't spam?
 
@AlfPSteinbach Huh?
 
flagging things is generally frowned on in this <del>group</del>lounge, but i'm about to flag your message
 
thats a little harsh
he was making a commentary on how odd it is to define functions like that
while it is a bit off topic, it does not seem to be flag worthy
 
Steady with the flaghammer dude
 
user868935
1:07 AM
dictatorship not wanted here Alf
 
@EricFode i'm thinking of the link to the webstore
i hate spam
 
@AlfPSteinbach It's a handy chrome extension
 
@KianMayne is it free
 
i was thinking the same thing
 
@AlfPSteinbach Yeah..chrome webstore
All free
They're just Chrome extensions
 
1:09 AM
hm it looked like something out of a commercial (or the rubber face man movie) but ok
 
Things are taken seriously here
TOO seriously
 
lol
 
The Truman Show is a 1998 American satirical comedy-drama film directed by Peter Weir and written by Andrew Niccol. The cast includes Jim Carrey as Truman Burbank, as well as Laura Linney, Noah Emmerich, Ed Harris and Natascha McElhone. The film chronicles the life of a man who is initially unaware that he is living in a constructed reality television show, broadcast 24-hours-a-day to billions of people across the globe. Truman becomes suspicious of his perceived reality and embarks on a quest to discover the truth about his life. The genesis of The Truman Show was a spec script by Nicco...
^ the rubber face man movie
 
user868935
....
 
@AlfPSteinbach Love that film! Why is it rubber face man? :L
 
1:13 AM
jim carrey <- rubber face :)
 
user868935
"Meanwhile, back in chat... A young coder waits for the room to get back on topic... Lets see how things play out...
 
Who's this young coder of which you speak?
 
i want to meet this young coder he seems to be able to meta anything
 
user868935
Anyone
 
he is even meta !!!
 
1:15 AM
._. me gusta
splice jim carrey's face onto lady gaga's, and then replace the "poker face" lyrics with him screeching
that gave me nightmares for a week
anyways, back to coding
 
user868935
人々が牛のうんこね。。。
 
Man on the moon is my favourite Jim Carrey film
@チョコレート人 Google Translate says that means "I shit of cow people. . ."
 
@KianMayne XD
 
user868935
google translate is highly inaccurate
 
user868935
it butchers languages
 
1:28 AM
What does it mean?
 
It's something very rude in Japanese.
 
user868935
can we talk about c++? lol
 
OK, what does ++i++; evaluate to?
Just kidding guys ;)
 
user868935
Does anyone know how to take the words from a txt file and split each word into a vector array?
 
So like
Each word corresponds to a vector?
Wouldn't you need a collection of vectors?
 
user868935
1:39 AM
If I had "This is a file" in a text file, the vector will store each word into its array. so if print vector[1], the screen will display "is."
 
Oh
So split the each word into an element of a vector
 
user868935
yes
 
I'm probably not the best person to ask
 
@チョコレート人 The following is from Josutti's book "The C++ Standard Library"
   // stl/ioiter1.cpp

   #include <iostream>
   #include <vector>
   #include <string>
   #include <algorithm>
   using namespace std;

   int main()
   {
       vector<string> coll;

       /*read all words from the standard input
        * - source: all strings until end-of-file (or error)
        * - destination: coll (inserting)
        */
       copy (istream_iterator<string>(cin),      //start of source
             istream_iterator<string>(),         //end of source
             back_inserter(coll));               //destination
 
user868935
this compiles?
 
1:43 AM
Meta-info: your question caused me to Google up "Josuttis read words", find a full PDF of the book instead of just discussion, and download that PDF (which unfortunately is probably violating copyright, i.e. illegal)
@チョコレート人 what does your compiler say?
 
user868935
1:53 AM
@AlfPSteinbach it compiled, but how do I display which element I want?
 
@チョコレート人 define your requirements in more detail, then implement them
 
user868935
@AlfPSteinbach I had to change "cin" to my ifstream "readFile"
 
I'm now a fanatic. Yay.
 
user868935
@AlfPSteinbach Im lost on that...
 
user868935
3-(・_・)ーE
 
2:02 AM
@Moshe fanatic of c++? :)
 
@チョコレート人 oh, you just want to read any specific file. then you use i/o redirection in a command interpreter. like command "josuttiprogram <myfile.txt".
Depending on your OS you can alternatively pipe the text, which early Unix users found more natural.
In Windows you can do that by command "type myfile.txt | josuttisprogram".
In *nix you can do that by command "cat myfile.txt | josuttisprogram"
 
user868935
@AlfPSteinbach I'm on windows. something like readFile >> word?
 
@チョコレート人 Two of the three commands given work in Windows' standard command interpreter. Can you guess which two? Or just try them?
 
user868935
2:17 AM
@AlfPSteinbach I don't how understand how you implement them into code
 
@チョコレート人 You don't. You type them at the command interpreter. In Windows Vista or 7, click the start menu, type "cmd" (without the quotes), hit return. Then just type commands
 
user868935
Figures. I'm not trying to do DOS operations
 
user868935
My files are called from a menu, and depending on which file is called, I want the text in whatever file to put each word into a vector element
 
@DzekTrek I got the StackOverflow Fanatic Badge
 
@Moshe Nice. Congratulations. :)
 
2:33 AM
@チョコレート人 i'm sorry but i don't understand what you mean. i hope it works ok anyway
 
2:44 AM
The third "cover your eyes" question today (or perhaps including the end of yesterday):
0
Q: List of a list, assignment operator fails

Ramy Al ZuhouriThe code was too long, so I put in on pastebin and I put here only most significative parts. (here is the entire code) I have create a class List, it works fine as long as I don't try to create the list of a list, I make an example: List<List<string> > l; l.push_back(List<strin...

^ I answered yet another question, yay!
:-)
 
Hi, I'm looking at this answer:
16
A: "unpacking" a tuple to call a matching function pointer

Johannes Schaub - litbYou need to build a parameter pack of numbers and unpack them template<int ...> struct seq { }; template<int N, int ...S> struct gens : gens<N-1, N-1, S...> { }; template<int ...S> struct gens<0, S...> { typedef seq<S...> type; }; // ... void delayed_d...

 
user868935
@AlfPSteinbach Ok, I have a text file that says "I am a cat." The end result is to place each word into a vector array since other files will vary in word count. So the end result should be this: The vector wordArray[0] being "I," [1] being "am," [2] being "a," and [3] being "cat."
 
Specifically, the first two lines:
template<int ...>
struct seq { };
I assume the <int ...> corresponds to a parameter pack, but it is not named. I have the draft standard open here, but don't see a clear description of how this fits in. Is this just a catchall for any parameter pack?
 
@チョコレート人 ok
@FaheemMitha it declares the main class template seq
@チョコレート人 is your question how to run the program with your file as input?
 
@AlfPSteinbach But without an associated parameter pack name.
@AlfPSteinbach : No, just trying to understand the syntax for the moment.
 
2:53 AM
@FaheemMitha i don't think you need a name for the parameter for the general declaration. after all it's not used. :)
 
Trying to familarize myself with variadic templates. I don't do much C++.
@AlfPSteinbach : Ok. My question was about allowable syntax. So, the name is optional?
 
as I read it, it just says that seq is a class templated with one or more int values
 
@AlfPSteinbach : OK.
 
sorry about my english
 
@AlfPSteinbach : Not sure what you are apologizing about :-)
Thanks for the assistance.
 
user868935
2:59 AM
@AlfPSteinbach yes. I dont want use user input to put words into the array. I want to use the file with text to populate each element with a the words from the text file.
 
well, then you can use one of the commands I listed earlier
 
Just an informal question - would anyone here find a g++ 4.7 backport to Debian squeeze of interest? An official one doesn't exist, but it is not that hard to do - I did it. With no help from the Debian maintainers, I might add.
Though I imagine lots of people do a local installation. I personally like packages.
That is a backport of the snapshot in experimental, that is. Since 4.7 has not been released yet...
 
3:31 AM
^ My niece saw something strange on the sea bottom
 
Before I discovered boost::bind, I was a sad person.
 
Xeo
4:00 AM
-6
Q: How to add 0 to INT buffer[3] = { 1, 0, 3}; to get 103 but not 1 coz 0 counts as buffer end

CPLUSPLUSI have an int buffer[3] = {1, 0, 3}; // i want pass it to int (not int*) so function will return *buffer; to int... but returned value will be 1 coz buffer has 0!!!!!!! and 3 will be removed if i do like this buffer[3] = {1,2,3}; return *buffer; to int and returned value will ...

Somebody give the last close vote please
 
Done.
What the fuck happened in that question?
It's a total mess in the revision history.
I would just have flagged the whole thing instead of editing it to make it somewhat readable.
 
If I need to pass boost::bind to a function as an argument, should I use a boost::function or declare the function as a template and accept the templated type as boost::bind ?
wouldnt the templated version be more efficient ?
 
It's the same.
boost::bind does not return a boost::function, if that's what you want to know.
 
doesnt boost::function do some memory management on heap behind the scenes ?
 
Well, it does store the functor somewhere.
But I think it's done through type erasure, so there's probably some new involved.
It's probably not significant.
 
4:12 AM
Yes its done through some magical type erasure :)
 
It's not magical, it's just inheritance.
 
Yes, but somehow..I like calling it magical
 
Yeah.
The big advantage of using boost::function over templates is that you don't need to template the fucking function.
 
Yup...I got completely floored when I first discoverd bind and function
 
Yeah, it's great.
Still not as good as what you can do with C#, though.
 
4:16 AM
No idea about C#, but its definitly func passing functions in Python and erlang
*fun
 
4:28 AM
@EtiennedeMartel: or Python
class Foo:
def bar ():
pass
foo = Foo()
foo.bar # bound member function
 
Xeo
@EtiennedeMartel The big disadvantage is that you can't inline the call and might even have dynamic allocation overhead, in addition to the indirection overhead.
 
@Xeo: you are taking about c++ or c# ?
 
@Xeo: I don't think you'd be able to come up with a common denominator for free functions, member function and function objects, then implement binding etc. without that cost.
 
It hast to be C++ :)
 
Xeo
@AndréCaron Indeed, but I never said that you could. :) I just think that people shouldn't get too std::function happy
 
4:55 AM
So, is it possible to define and use templated classes/functions inside a templated class?
 
Xeo
Sure?
 
@Xeo So that is a yes, then? :-)
 
Xeo
Yeah, why wouldn't you?
Unless I misunderstood you
 
@Xeo : I dunno. I'm not that familar with C++.
@Xeo : Is the question unclear?
 
Xeo
Well, if you mean
template<class T>
struct X{
  template<class U>
  struct Y{};
};
Sure, that's entirely possible
Though the out-of-class definitions look a bit weird
 
5:10 AM
@Xeo : Yes, that's exactly what I mean. Thanks. Sorry, I should have provided an example.
 
Xeo
template<class T>
struct X{
  template<class U>
  struct Y;
};

template<class T>
template<class U>
struct X<T>::Y{
};
 
@Xeo : Is there some reason you can't just define everything inside X? Or is that convention about putting structs header files, and member fn declarations in cc files?
 
Xeo
@FaheemMitha First thing you need to learn about templates: Everything goes into the header.
And you sure can define everything inside X, I just wanted to show how an out-of-class definition would look like
 
@Xeo You can do explicit instantations in cc files.
Using template<>.
 
Xeo
No, it's template bla<int, float, bool, ...>;
 
5:13 AM
@Xeo : Ok. You're right, it does look weird.
@Xeo : Yes, I meant template whatever.
Sloppy, sorry.
 
Xeo
It's just that explicit instantiations are often not very useful. There are specific cases, like IOstreams or basic_string for char and wchar_t, but that's about it
 
Thanks for the assistance.
 
Xeo
np
 
@Xeo : Dunno. That's how I've done it in the past. I don't like sticking everything in the header. I had some reasons, though I forget now what they work.
If you are instantiating types, which I usually am, there are not that many types...
 
user868935
5:41 AM
If i have a had: string dog1 = "Im a dog," how can I put each word of the string into a vector array?
 
6:02 AM
How would you take user input constantly in a command line C++ program, while still outputting to the console?
 
Don't.
 
Why
If you cant think of an answer, then please, dont say "dont"
 
Oh, I know the answer.
 
Then why
 
Because console is not designed for this.
It does more harm than good.
Want async UI, don't use CLI.
 
6:07 AM
Personally, saying that in the first place would have been much better than simply answering "Dont"
 
user868935
Ok, so I split my string into a vector. but some on my strings have multiple lines. those strings just output the last line when I run it through a vector. How do get my vector to read multiple lines?
 
user868935
6:29 AM
nevermind. I fixed it. lol
 
user457812
6:43 AM
Oh wow, I just found something I wrote for my old intro to C++ course that is just offensive to every part of my brain
 
7:01 AM
@CatPlusPlus depends on which console. Terminals, ok, they weren't designed for it
Most modern day consoles are defined as GUI windows capable of displaying fixed font text. And those applications are perfectly capable of doing async, event based input output. It is just that all that is non-portable and as such the C++ standard doesn't provide an API for it
So rather than 'don't' I'd say, reconsider whether you need it and where you need it. Then dive into *NIX ncurses (which would be what you'd use in Python too, I guess) or Win32 APIs (just leave conio.h alone :))
 
@sehe I'm having trouble figuring out how to use external libraries now :(
So how would I use a library like libcurl? I guess coming from a python background doesn't help much in this area, I tried looking up how to use them, but I have vague, very vague ideas...
 
user868935
So glad to be where I want to be.... YAY!
 
:)
ok, actually more straight to the point: Is there a standard way to read an html file from the internet using C++
^answer to above, Hoxieboy, no, there isn't a standardized way of doing this, you need a 3rd party resource to do this
 
Bob
7:43 AM
Hi
Anyone that could tell me the difference between a login shell and interactive shell?
I am reading on Bash and environment variables, Mac OS X
 
Why is it that whenever I come here, the last message is an unanswered boring question, or everyone is busy debating about something like Haskell. :(
 
Bob
That would be considered relative
 
11
Q: Interactive vs non-interactive shell

user2914What are interactive and non-interactive shell? Questions: Create a user john who should not get an interactive shell. How can we do this?

Actually that doesn't look that useful
 
3 mins ago, by IntermediateHacker
Why is it that whenever I come here, the last message is an unanswered boring question, or everyone is busy debating about something like Haskell. :(
Damn, I hate O' Levels. :(
 
This chat needs more haskell discussion
 
7:55 AM
@Pubby It was more fun when we were discussing Java.
at least I knew the language.
 
So go learn haskell?
 
3 mins ago, by IntermediateHacker
Damn, I hate O' Levels. :(
^ no time.
 
There is always time for haskell :(
 
...no motivation.
I mostly do game development. I doubt Haskell will ever help me there.
 
sbi
8:42 AM
ah, PHP/MySQL, the herpes simplex of the web.
I'm contemplating to post this in the PHP room. :)
 
1
Q: Can I use the `brace-init-list` to initialize a struct which contains `std::string` field?

kevAs far as I known, std::string is a non-POD type. When I define a struct which contains std::string field. Can I still use the brace-init-list to initialize the struct? The code bellow works. Compiler gives me no warning. Am I missing something? #include <stdio.h> #include <string> ...

Any aggregate/POD persons in the room to clear the confusion?
 
Xeo
Reeducating people.. fuuuun
@FredOverflow Aren't you that person?
 
Well, we have a 1:1 tie, and someone needs to break it :)
 
Xeo
Didn't I? :)
Spiel, Satz, und Sieg!
 
@sbi : What does this mean? It doesn't sound complimentary, though.
 
sbi
8:46 AM
 
9:08 AM
@sbi I'm quite sure someone of the php crowd would do that himself. Awesome quote
@Hoxieboy 1. download 2. install (or build) 3. use (include headers) 4. compile 5. link 6. profit
 
Xeo
@sehe You forgot the mystery step
 
@Hoxieboy note that steps 3. and 5. require you to reference the necessary include and library paths.
@Xeo he'll find them. The mystery is usually in the indirect dependencies :)
@Hoxieboy On a debian box, you'd usually do sudo apt-get install libcurlpp-dev and add -lcurlpp at the end of your compile/link command.
 
@sbi : Eww.
 
morning all
 
@Pubby indeed, also:
> vote up good questions and answers to help get us out of beta – xenoterracide♦ Dec 9 '10 at 12:57
wtf.
 
9:21 AM
@sehe ?
Oh, nvm.
Dunno what that comment was all about
 
@Pubby It was all about the time around Dec 2010, I suppose
 
It's nice to get this when trying to run hello world:
Unix system call “mkdir” failed:
Permission denied (13)
 
@sbi I live 5 hours away from London, but I end up going there semi-regularly still - remind me nearer the time and I might be around
 
9:40 AM
@sbi sounds great, but just a little bit too far out of my way :P
 
9:57 AM
0
Q: Can constexpr function evaluation do tail recursion optmz?

Johannes Schaub - litbI wonder whether for long loops we can take advantage of tail recursion for constexpr in C++11?

 
so yeah, I decided to search through all files on server... could take some time... even then, I don't think it is gonig to give me full folder path
 
I'd wager the Standard makes no requirement on how an implementation has to compile/translate a program/TU, other than they're free to put limits on what they can do. But I wouldn't wager much.
 
@thecoshman Eh. Context?
 
ls -rlr / | grep .dtd
stopped it tough, as I realised, I am going to need to know where theses files it finds are :P
 
@thecoshman updatedb + locate|mlocate|slocate are made for this
@thecoshman Also, find / -iname '*.dtd' is bound to be faster already
Both of these will print the full path. Tack on -ls to find and it will give you the long ls style listing (full path + mtime etc)
 
10:07 AM
@sehe can you tweak this so that it doesn't spam with 'cannot read dir messages
 
sbi
12 hours ago, by sbi
@DeadMG :) Anyway, think it through well before you commit. Right now it looks like I'd have time to kill during the day on 7th, 8th, and 13th.
@thecoshman :-)
 
@sbi erm... what sort of face is that?
find / '*.dtd' | grep .dtd
 
Man, that concept talk at GoingNative had me interesting in changing all the typename std::enable_if<foo::value, bar>::type to template alises in the style of EnableIf<foo, bar> to cut out noise.
But now I'm not sure if I should accept a type or a bool? Boost.MPL goes around that by providing both enable_if and enable_if_c where the _c suffix denotes that it accepts a constant expression rather than a type.
But that concept talk used PascalCase for those aliases, e.g. EnableIf<foo, bar>. What do I use for the bool version?
 
is this enable if snafoo all an attempt to get rid of #ifdef stuff?
 
No.
Another possibility is EnableIf<Bool<a && b>> I guess, which is something Boost.MPL also has with bool_.
Meh, I'll go with that for the time being.
 
10:42 AM
@thecoshman typo! snafoo should be sfinae
 
@sehe ¬_¬
 
@thecoshman erm yes: 2>/dev/null
sfanoo?
 
it's ok, dropped that hole validation thing from build, who needs to validate shit
 
hole? shit? shit hole :)
 
wait, that was a typo :D
 
Xeo
10:45 AM
Arrrrgh... tokenizer, Y U NO WORK?!
 
too many tokens jams the slot
 
Xeo
I have a string "player=2" with = as a dropped delimiter, and the boost::tokenizer iterators don't spit anything out. -.-
 
@Xeo we'll be better able to spot the error if you show us the code, not what you think it should do :)
 
Xeo
Currently typing up an example on Ideone
Yaaaay.... Ideone boost version is too old. -.-
 
@Xeo who cares, we can copy an paste anyway. Need link though
 
Xeo
10:52 AM
This should be equivalent of what I'm doing
 
erm my boost version is too old (on cygwin) at work :)
 
Xeo
Argh, damn typo on ideone
Okay, on Ideone I get atleast the value. Not in my code. The key is dropped in both cases. -.-
 
@Xeo Aha. it is UB. Mine segfaults now
 
Xeo
Damn, I had a hinch just now when Clang displayed what I wanted...
I think I'm missing something though, why would such a simple use be UB?
 
I'm not sure. I never use tokenizers, reading up now
 
Xeo
10:57 AM
The documentation of boost::tokenizer is seriously lacking though
Okay... with a for loop, it works. Wtf.
 
@Xeo then it is canned. Apparently iterator's operator ++ invalidates the reference returned by operator*
 
so... can any one give me some logic as to why you would have the entire contents of a function inside consisting of a trace message then a try block, with a finally for another trace? There are no errors to catch... (Java btw)
 
Xeo
@sehe Seems like it, making copies of the strings works just aswell.
 
@thecoshman (Java btw) no one will be able to 'give you some logic'
 
Xeo
> The type returned by begin and end. Note: the category of iterator will be at most ForwardIterator. It will be InputIterator if the Iterator template parameter is an InputIterator. For any other category, it will be ForwardIterator.
 
11:03 AM
@Xeo seriously lacking, indeed.
 
Xeo
But man, I just want a simple config loader lib...
 
Now, it isn't all that strange that references to iterator-state are returned for efficiency, but they could have documented that pitfall
@Xeo Boost Property Tree.
 
Xeo
The documentation made that one sound not-so-simple. :(
 
11:20 AM
stupid fucking clearcase
4
the bane of my life
I challenge you to find a worse source control
 
@thecoshman Easy. Serena Dimensions. We're supposed to start using it here. It is just not workable
 
SourceSafe?
CVS?
 
why do companies insist that if you pay for something it MUST be good
 
@CatPlusPlus bad but less painful than those 'enterprisey' things that want to rule your life
@thecoshman They can pay for it :)
 
@thecoshman Shared folder?
 
11:26 AM
@sehe is enterprisey another word for ball wrenching?
 
@Xeo: lunchbreak reduced to a 1-minute ini parsing tutorial for you:
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <iostream>
using boost::property_tree::ptree;

struct demo {
    int player;
    void load(const std::string &fname) {
        ptree pt;
        read_ini(fname, pt);
        player = pt.get("demo.player", 2);
    }
    void save(const std::string &fname) {
        ptree pt;
        pt.put("demo.player", player);
        write_ini(fname, pt);
    }
};

int main() {
    try {
        demo ds;
        ds.load("demo.ini");
 
@StackedCrooked better then clearase
 
@thecoshman Yes, except if you are a Java programmer. Presumably because they are eunuchs by then
 
fucking markdown
@sehe eunuchs?
 
@thecoshman so I make a spelling mistake?
 
11:28 AM
@sehe well... that's so bad I can't even start to guess
 
Xeo
@sehe Thanks, I'll take a look at it later today, gonna get some sleep now..
 
A eunuch (; ) is a person who (by the common definition of the term eunuch) has been castrated, typically early enough in his life for this change to have major hormonal consequences. Less commonly, in translations of ancient texts, "eunuch" may refer to a man who is not castrated but who is impotent or celibate. Castration was typically carried out on the soon-to-be eunuch without his consent in order that he might perform a specific social function; this was common in many societies. The earliest records for intentional castration to produce eunuchs are from the Sumerian city of Lagas...
@thecoshman If you're gonna rank words @thecoshman doesn't know a typo, we'd all be making as many typos as you do :)
 
11:46 AM
Good Day people
 
Welp, I did have one bug in my code where I used typename = typename std::enable_if<foo, bar> apparently. How odd.
 
@sehe oooh, one of those fellows
that must be the first time I have ever seen it written down :P
 
@awoodland Mmh, this really seems like two questions/discussions folded into one: one about 'interface', one about protected.
 
@LucDanton the I mostly just included the "protected" bit in there as an incidental example
 

« first day (485 days earlier)      last day (4455 days later) »