« first day (494 days earlier)      last day (4462 days later) » 

6:00 AM
@RMartinhoFernandes Unrelated but beds have head in English, too. Also in French, except there's a special word just for it.
 
user1182183
@Luc I think your code will work for the linux version of my plugin, but how about the windows version (VC++2010 highlights using line = std::string; etc.. in red)
 
@RafalGrasman using A = B; is typedef B A;. It's new C++11 syntax.
 
@RafalGrasman That's 100% Standard, genuine C++. However, this is also C++11. So there's that.
 
user1182183
ah C++11.. xd yeah I'm not at that stage yet, however old C++ not 11 syntax is not broken in C++11?
 
6:05 AM
Outside of corner cases (and some new keywords), it's fine. Those corner cases are really rare btw.
 
user1182183
Ah good, then switching to it shouldn't be a problem hopefully.
 
wait, i had an idea: would it not be better if one had to type at least fifteen characters per chat message?
 
Don't tell me you never named a variable decltype.
@CheersandhthAlf What for?
 
@CheersandhthAlf No.
 
Oh, wait, I think I missed some sarcasm in that.
 
6:06 AM
12 to go
 
user1182183
nah, to make the point in your simple "no" you would just add 13 dots. ;P
 
Or thirteen                 magic whitespace characters.
 
user1182183
yeah, alt+25 what was it again?
 
What happens if you do that in a comment? Do they come to your house?
 
user1182183
alt 255 ;x
 
6:09 AM
@LucDanton Lots of people use tricks to hack around the 15-char comment limitations. AFAIK no one was ever approached about it.
 
Maybe nobody has been left alive to warn us.
 
user1182183
they should warn, not always, but they should. Rules are for breaking but too frequently and actions need to be taken ;P
 
Strangely, I can't send a message made of only EM SPACEs.
 
user1182183
EM, and that's the shortcut for..? :p
 
Part of the system knows it is whitespace, so it doesn't let me send a message with nothing but that. But part of it doesn't know because it doesn't collapse it...
@RafalGrasman It's not a shortcut. It's "EM", as in the name of the letter "M". It refers to the fact that the space character has the same width as the letter "M".
 
user1182183
6:13 AM
ah ok :)
 
user1182183
btw Luc, one more problem with "for(auto&& lineu: lines)" and "std::copy(std::istream_iterator<std::string> { stream }," , what's the old way? :]
 
user1182183
ah wait
 
user1182183
I think my replace did something wrong
 
The for loop is like a traditional iterator loop: for(std::vector<line>::iterator it = lines.begin(); it != lines.end(); ++it).
 
okay if jon skeet can use git then maybe i can 2, so i can use bitbucket like
 
6:17 AM
The {} initialisation syntax there can be replaced by parenthesis and something to avoid the most vexing parse, like std::copy((std::istream_iterator<std::string>(stream)), // redundant parentheses on purpose
 
should i go for mercurial or general git, considering use of visual studio express?
 
user1182183
@R. thanks will change to that :)
 
For the std::copy change the T { expr } syntax to T(expr).
 
@sbi you missed out on the puppeteers disappearing. only the General Products representative was left, and he 2 disappeared about an hour ago
2
 
@CheersandhthAlf I usually recommend mercurial, but I'm mainly a command-line user, so I don't know about Visual Studio.
@LucDanton And beware of MVP!
@CheersandhthAlf Wait, what?
 
6:18 AM
Also a line& line = *it; at the top of body of the loop line may help.
 
Oh, the "puppeteers" are the mods?
I like the puppeteers :(
 
@CheersandhthAlf VS SouceSafe :)
 
@StackedCrooked no no no
@StackedCrooked oh, you're joking, right?
although i do think that the previous decade's frowning on locking of files was misplaced
 
I have friend who once ended up in a job where VS SourceSafe was used. It was a horrible job for various reasons.
 
i think much time is wasted on merging changes nowadays
 
6:21 AM
Much time?
Merging is super fast nowadays.
 
user1182183
Hmm I think I need to change to C++11 Lol.
 
@RMartinhoFernandes with incompatible changes to same file?
 
@CheersandhthAlf I've used Perforce at previous job which uses file locking. It was not a bad system.
 
@CheersandhthAlf Proper planning can reduce those a lot.
 
@CheersandhthAlf aye - sometimes good team coordination (pseudo-ownership) helps
 
user1182183
6:25 AM
Hey Isn't there any C++11 variant of MS Visual C++ Express? Can't seem to find it...
 
Is there any container like a map but where the values can be different types?
 
std::map<K, boost::variant<A, B>>?
 
@RMartinhoFernandes Is that a reply to me?
 
@FaheemMitha it certainly is an answer to your question
 
I guess it must be
 
6:26 AM
@RafalGrasman The current release (VS 2010) supports a few features. The next release will support a few more, but it will still be far from complete.
@FaheemMitha Yes.
 
@RMartinhoFernandes : Thanks.
 
@FaheemMitha an alternative is to store std::map<K, C*> where A and B are subclasses of C, but this solution is more restrictive than Martinho's solution
 
user1182183
@RMartinhoFernandes I think the code by Luc is too new for Visual C++ 2010 Express xD even after the changes it has some errors
 
I assume the std has no equivalent of variant?
 
@RafalGrasman note also that it's missing keyword throw (i guess just a typo)
 
6:30 AM
@FaheemMitha No.
 
@RMartinhoFernandes : Right, I figured.
 
@CheersandhthAlf Good catch. I don't get how that happened.
Oh wait, it's still valid code. That's dumb.
 
user1182183
@Cheers it's missing it where? ; o
 
@RafalGrasman Line 60, with std::runtime_error.
@RafalGrasman I'm sorry about that :( What are the remaining issues?
 
user1182183
Well no error there
 
user1182183
6:32 AM
hmm well,map_type to_pairs(vector_type const& lines)
{
map_type result;

//for(auto&& line: lines) {

for(std::vector<line>::iterator it = lines.begin(); it != lines.end(); ++it)
{
 
user1182183
lines.
 
user1182183
is in red
 
user1182183
if(stream >> key)
>> is in red? What the hell?
 
user1182183
@RMartinhoFernandes vector_type const& lines
 
Did you add line& line = *it; at the top of the loop body? I'm not saying it's related, but there needs to be a line.
 
user1182183
6:34 AM
well ok that solved the >>
 
user1182183
now the lines.
 
user1182183
no suitable user conversiont from <something long> to <something long>
 
Then there are: list initializations of vectors, calls to std::move, a lambda, and I guess that's it.
 
std::move(expr) can always be replaced by simply expr in this case.
As for the list initialization, well.
 
The lambda can be desugared into an explicit functor object.
List initialisation can be desugared into initialisation from arrays or calls to push_back.
 
6:37 AM
That's horrible.
 
user1182183
 
@RafalGrasman Ah, make the ::iterator part be ::const_iterator.
@LucDanton That's exactly why we love the new syntax.
 
I say, it's not new when it's been 5 months already!
 
user1182183
line& line = *it; , * "Qualifiers dropped in binding reference of type "line &" to initialiser pf type "const line"
 
line const& then.
 
user1182183
6:40 AM
ok going to try to solve 2 for(auto) myself and some char to string regarding ( "foo") ;p
 
@LucDanton It's the new one because it's not the old one.
 
It's terrible, this visibility bug has completely sapped the will to code out of me for the day.
 
And the day just started.
 
@LucDanton Play some DF.
 
Hi. What's the best way of simulating the python list comprehension
 
6:45 AM
@StackedCrooked Not that kind of day.
 
[x for x in foo if x not in bar] where bar is a subset of foo?
 
Boost.Range probably.
 
@RMartinhoFernandes Heh, I may. For now I'm fixing up some food.
@RMartinhoFernandes Did you read when I wrote about my rebind TMP helper earlier?
 
@RMartinhoFernandes Ok. sehe mentioned that yesterday.
 
@LucDanton I think so, but I fail to see the relevance, so either I don't remember, or I did miss it and sleep deprivation is starting to kick in.
 
6:47 AM
@RMartinhoFernandes Oh no relevance no.
 
user1182183
for(auto const& pair: map)
to
for(std::map<pair>::const_iterator it = map.begin(); it != map.end(); ++it)

Seems not to work xD Hmm what did I forget? :P
 
As usual though I'm not so sure about the name.
 
@RafalGrasman The dereferencing. What you did with line const& line = *it;.
 
@RafalGrasman It's not an std::map, it's an std::vector.
 
user1182183
oh
 
6:48 AM
You named a std::vector map?
 
Bite me. It's an std::vector<std::pair<std::string const, std::vector<std::string>>>.
I.e. it preserves order of insertion.
 
user1182183
for(std::vector<pair>::const_iterator
<pair> argument list for class template std::pair is missing ; o
 
Uh, you may have a using namespace std; directive somewhere in your code.
You can rename pair to pair_type or something though.
 
user1182183
Yeah I have
 
Heck, std::vector< ::pair> might work, too. Depending on where you put the typedef blahblah pair;.
 
user1182183
6:52 AM
typedef std::pair<key_type, value_type> pair_type; is above the function
 
user1182183
below the using namespace
 
Then you probably mean std::vector<pair_type> instead of std::vector<pair>, no?
@LucDanton It reminds me of uncurry, but it's not really like it.
 
@RMartinhoFernandes I see what you mean. It' not tied to std::tuple though, you can do rebind<std::vector, std::deque<int>> for instance.
 
What would the result of that be?
Vector of deques?
 
user1182183
Hmm Luc from_pairs(map_type const& map) function if probably the last one with anything not compatible with old C++ , Can you update it ? :P
 
6:57 AM
std::vector<int>.
 
Ah, I see.
 
@RafalGrasman What else than the for loop is problematic?
 
It just replaces the outer template.
 
Are there any work-arounds for faking template aliases in 4.6.2 or should I try to install 4.7 (I'm reluctant to do the later for fear of the install turning into a time-sink)?
 
@RMartinhoFernandes Yep. It's hackish in that respect.
 
user1182183
6:58 AM
I changed the first auto for loop to:
for(std::vector< pair_type>::const_iterator it = map.begin(); it != map.end(); ++it)
{
pair const& pair = *it;
but 'pair' is highlighhted again with the same error
 
Make it pair_type const&.
 
user1182183
and I moved using namespace std below all your functions
 
@kfmfe04 No, you can't really fake it. What OS are you on?
You can probably find prebuilt binaries of a recent 4.7 snapshot.
 
@RMartinhoFernandes I am running Lubuntu oneiric
 
Okay, I installed TortoiseHg for Mercurial DVCS, and now it wants to know which of its merge tools is the bestest?
 
user1182183
6:59 AM
for(auto&& value: pair.second) seems a bit special
 
There is kdiff3, docdiff, and internal::merge, apparently?
 
ok - lemme google around for a 4.7 snapshot
 
@CheersandhthAlf I like kdiff3.
@kfmfe04 @Luc knows how to install it with a package.
 
@RafalGrasman for(std::vector<std::string>::const_iterator it = pair.second.begin(); it != pair.second.end(); ++it), then std::string const& line = *it;.
 
7:01 AM
How did you people survive without range-based for?
 
@LucDanton any links/hints on how I can install a 4.7 snapshot on oneiric (amd64)?
 
@kfmfe04 There's a gcc-snapshot package, but the one available through the oneiric repos is somewhat dated IIRC.
@RMartinhoFernandes If I had Boost.Range and a lazy-eval EDSL I would have stuck to algorithms I think.
 
@LucDanton - ok I will search on that (all I need is the template alias functionality in 4.7) - ty
 
user1182183
@Luc u mean & value = *it, not line, right?
 
@kfmfe04 I personally bring the gcc-snapshot from the unstable Debian repo.
 
7:03 AM
@LucDanton "I find OOP philosophically unsound. It claims that everything is an object. Even if it is true it is not very interesting - saying that everything is an object is saying nothing at all." -- Stepanov
 
@LucDanton thx for the tip!
 
@RafalGrasman Correct.
 
@kfmfe04 At first, template aliases look like one of those features that "are good to have, but not that interesting". Once you start using them they quickly become something you can't live without.
 
@StackedCrooked I think it's a shared sentiment -- I have seen the quote before, but I wasn't attempting to refer to it :)
 
@RMartinhoFernandes I need them and also inheriting constructors so that I can have my strong typedefs.
 
7:05 AM
@RMartinhoFernandes interesting - at the very basic level, it will at least allow me to wrap an external library appropriately. At first, I thought typedefs are "nice", but now I find them indispensable for writing clean template code...
 
@StackedCrooked No mainstream compiler implements inheriting constructors so far :(
 
@LucDanton It was funnily similar to saying that everything is alive dilutes the meaning.
@RMartinhoFernandes I know. Are there non-mainstraim compilers that support it?
 
user1182183
update_key(pairs, "plugins", ( CharToStr("foo"), CharToStr("bar") ));
update_key(pairs, "filterscripts", ( "quux" ));
 
user1182183
These are the last 2 failing lines now
 
user1182183
CharToStr doesn't seem to fix my prob
 
user1182183
7:06 AM
value_type is a vector, how I'm going to supply that? ;p
 
@StackedCrooked In both cases it's not the first time that the meaning of a term has been expanded beyond the point of usability either :(
 
hello, world!
 
Everything is a file?
Everything is a list?
:D
 
@RafalGrasman You need to build it separately. value_type v; v.push_back("foo"); v.push_back("bar"); update_key(pairs, "plugins", v);, etc.
 
user1182183
7:07 AM
aah soo oki thanks going to test it out
 
I'm sure that after this small exercise you're starting to crave C++11 already.
@StackedCrooked I think there's a difference here. "X is a file" is a useful property: it means you can do file stuff on it. Same goes for "X is a list". "X is an object" means you can...
Since in Lisp everything is a list, even the code itself, you can manipulate the code as a list. That's often tauted as a killer feature of Lisp.
 
I find it crazy that backporting to a C++03/C++11 hybrid took more time than writing the original C++11 in the first place.
 
why are we talking about C++ ? :(
 
user1182183
@Luc ok you code works nice :P Now i'm going to make some checks to prevent double adding and I see this code doesn't add 'filterscripts' if it doesn't exists so I'm going to add that aswell. Thanks again ;)
 
TortoiseHg: "Error 123] The filename, directory name, or volume label syntax is incorrect: 'D:\\dev\\test\\tina\\misc\\continuous_cam_display\\data/real_bg?.jpg'" he he it doesn't like Unicode
 
7:15 AM
Sigh.
 
My father has used the Ubuntu One (cloud for personal files) client for Windows and reportedly it completely ignores files with Unicode in their names :|
 
user1182183
No unicode support is awfull
 
Are there cases where file names aren't UTF-16 in Windows?
 
Shit, dorfs are out of food and out of booze.
 
user1182183
maybe they all are but as longs as they are within the ASCII range you can just parse them like that..
 
user1182183
7:17 AM
@R. if ur getting some, get me a KitKat xd
 
@RafalGrasman Point being if it's guaranteed that the names are in UTF-16 then doing a UTF-16 <=> UTF-8 conversion from the one system to the other is relatively painless. But I'm not familiar with Windows.
 
user1182183
@luc stackoverflow.com/questions/2050973/… Kinda the answer for you :P
 
@RafalGrasman Thanks.
 
@LucDanton depends on the file system. with ntfs (default) they're all UTF-16
 
user1182183
@Cheers I doubt there are many windows systems that still use (ex)Fat(32)
 
user1182183
7:23 AM
However I Never will get rid of my Win98 Copy :P
 
@RafalGrasman think about file shares
 
user1182183
ah yeah Fat is still used for USB drives too, forgot that totally!
 
What's the (usual?) encoding for those?
 
user1182183
but speaking from my experience FAT (ANY!) uses 8bit encoding
 
user1182183
because when I had a DVD player,
 
user1182183
7:25 AM
it didn't seem to correctly read
 
user1182183
weird chars
 
user1182183
but windows somehow didn't too on win98
 
user1182183
don't know how it would be on a Vista/7 pc
 
user1182183
maybe they fixed the UTF names on fat now
 
That wouldn't simply be ASCII, is it? It's going to be codepages...
 
7:27 AM
So, it seems I have made a repository for a little test program with some useful reusable code :-). How do I clone it and place on BitBucket so I can place it on the Lounge's wiki?
 
Some conspiracy theorists are crazy. One claims that Oman has a secret advanced army called the 'Royal Guardians of the Sultanate' which is on par with armies like those of China & the US. Lol... i bet the Sultan himself will laugh at this one.
 
Or should I do something else to achieve that?
 
user1182183
@IntermediateHacker Hmm, as long as no war will touch me and my friends & family & relatives i'm fine with it.
 
@CheersandhthAlf BitBucket has instructions, but possibly only for the command line version (which you aren't using, right?). Have you searched through that already?
 
user1182183
also from wikipedia:
NTFS allows any sequence of 16-bit values for name encoding (file names, stream names, index names, etc.). This means UTF-16 codepoints are supported, but the file system does not check whether a sequence is valid UTF-16 (it allows any sequence of short values, not restricted to those in the Unicode standard).
"
 
7:28 AM
Can you remind me what tool you're using? Is that TortoiseHG or something else?
 
@LucDanton yes, it's the Tortoise
and mercurial
i now created account at BitBucket
and "project"
 
@RafalGrasman same here. As long as there's no war I'm happy. But unfortunately in my case there are two US Battle Ships and Iranian Destroyers a couple of kilometres from Sohar Beach, so I'm a bit nervous. :(
 
@CheersandhthAlf Go to bitbucket and create a repo. Then you just add the bitbucket repo (URL is there in the project page) to the list of remote repos and push to it.
 
I can choose "I'm starting from scratch" or "I have some files I want to import"
sorry?
 
@CheersandhthAlf Option B.
 
7:31 AM
i didn't understand that
 
user1182183
@IntermediateHacker give them all the oil they want and then they go away xd
 
@RafalGrasman yeah, lol. :)
 
user1182183
@IntermediateHacker Me and My frien were last time playing a game, It was Empire Earth 2 as I remember.. and we were playing America in CO-OP, VS French BOT, then after we got to the 'newer' age, the french got the oil but they couldn't use it.. then he made me really laught.. "Frenchmen listen: we are coming for a peace-mission,.. nah just the oil" xDD
 
@CheersandhthAlf If you open the TortoiseHg workbench, there's a "Push" button somewhere. You will need to enter the URL of the bitbucket repo, and then press "OK" or something.
 
user1182183
7:35 AM
ByTheWay, would anyone here be interested in reviving a "dead" game? (need a multiplayer lobby) xD
 
user1182183
It's a game in C/C++ and the Source code has been obtained fomr the Ex-Activision developers :P
 
user1182183
I'm good in talking to people ^^
 
user1182183
(It took me 3 years to get that source code but anyway, that's a little detail :P)
 
No help I could have provided would have been of the caliber of Martinho's.
 
user1182183
If you ever heard about the game Dark Reign 2, you know it's a good one, well. It has something special that keeps me attracted to it (and many of my friends too) :]
 
7:41 AM
@RMartinhoFernandes I'm stuck on the URL thing. Found the Push button but it only says "no URL has been configured". And no place to configure that URL?
 
user1182183
no options menu?
 
THere is "File -> Settings..." but it just now produced a "TortoiseHG Bug Report"
I think this must have been made by Unix folks: no unicode support, no asking for URL but instead just saying it's not configured, and bug report.
 
user1182183
maybe the program doesn't have enough rights to read /write from/to the config?
 
@CheersandhthAlf I think it's a textbox right below the history.
 
Welp, I'm done eating, so that much mean DF time.
 
7:44 AM
Hm I think I from command line instead ;-)
 
Anything looking like this?
(Yes, it's a terrible, terrible, terrible interface where you input the URL split across a dropdown list and three textboxes...)
 
user1182183
Design your own? : P
 
@RafalGrasman I'm happy with $ hg push.
 
The command line "hg" command first apparently worked, but now it's hanging on "searching for changes"?
 
user1182183
Ah true, can be used :)
 
7:48 AM
@RMartinhoFernandes no, not like that
 
1
Q: How to connect to repository using TortoiseHg workbench?

RabiI am noob at things like these. At work team leader installed Mercurial in my PC. And created folder. After doing several things he connected my folder with folder in his PC. I forgot what he did. Now I need to connect my home PC to that folder. If there is a tutorial for this?

 
user1182183
I'm not really an expert at those things but I use RapidSVN, and when something locks up I just disconnect, close the program, reopen and reconnect..
 
@CheersandhthAlf Seems like what I remember :) Now if you press "Push", it changes the middle section, right?
 
7:51 AM
@CheersandhthAlf I guess that it doesn't like the fact that there are no commits in the repository.
 
I followed the tutorial and pressed Commit earlier?
 
@CheersandhthAlf Your screenshot above tells otherwise...
 
apparently
it's buggy as hell
 
@CheersandhthAlf It's your aura.
 
Oh wait it's the wrong tab
you can see the committed files in the output pane at bottom
 
7:54 AM
Ah, ok.
 
anyway, i guess i have to wait till tomorrow to get some code over on the wiki
gotta do other things now
:-(
 
Ah, sorry, my mistake. I remembered wrong.
 
Yay! The command thing finally started doing things!
"remote: added 1 changesets with 30 changes to 30 files"
 
It's the "Sync" button you needed to press.
 
user1182183
Oh my, just opened my mailbox.. TOO MUCH O_O
 
7:57 AM
@RMartinhoFernandes I happen to have some troubles to shoot with DF D:
 
@LucDanton Sure, ask away.
 
$ ./df
./libs/Dwarf_Fortress: error while loading shared libraries: libSDL_image-1.2.so.0: wrong ELF class: ELFCLASS64
 
Oh wait, I thought I had a 32-bit libSDL. But while I do have a 32-bit libSDL.so, I don't have a 32-bit libSDL_image. What's that?
 
user1182183
Is that a 2D game?
 
user1182183
7:59 AM
<DF>
 
@LucDanton Oh, 64-bit. That's a known issue. There's an article on the wiki.
 
@RMartinhoFernandes What I don't get is that it runs on my other machine.
Eh, I guess I installed it at some point.
 

« first day (494 days earlier)      last day (4462 days later) »