« first day (562 days earlier)      last day (4383 days later) » 

11:22 AM
oh fuck.
find subdir . -exec rm -rf {} \;
how did that dot get there?!
 
That's why you always first do just -print and only then the actual delete.
 
Hello.
That's why I use a GUI file manager which moves stuff into the trashcan first.
 
lol. GUI file managers do tend to prevent such things. Unless you do Shift+Delete...
 
In Mac OS X you can't do that. The only way is through the trashcan.
Or using rm of course, but that's the point.
Even my IDE moves stuff to the trash first. I'd be freaked if I'd delete a big file of code by accident before I committed it into Git.
 
well, a big file of code should be in git already ;-)
 
11:32 AM
And zsh wants a confirmation before doing anything like rm *, even with -f.
 
Trash? What's that.
 
@rubenvb I always tend to forget to do that and then I write hundreds of lines of code without committing anything. :P
@CatPlusPlus that stuff you have in your bellybutton.
 
I finally got GCC 4.5.3 (release) to build, needed an old CLooG-ppl thing though.
 
I once wrote a makefile that contained a clear target. I ran it and it deleted everything including the Git repository.
I felt horrible afterwards.
@rubenvb Got GCC to build? Impossible. Stop lying.
 
@classdaknok_t I will prove you wrong in about an hour. The Linux64 to MinGW32 cross is just finished.
Three more to go.
You can admire my GCC 4.7.0 and 4.6.3 release builds at the MinGW-w64 SF site.
 
11:37 AM
I'll never admire anything labeled GNU.
 
@classdaknok_t You just reclone in that case.
 
lol
FWIW, I'll try to get a fully working Clang build (with libstdc++) for 32-bit out as well.
That's some form of BSD, can you admire that?
 
@CatPlusPlus no, everything was gone including the .git directory.
 
You reclone from remote, silly.
 
lol
 
11:47 AM
It didn't have a remote.
 
that's silly.
 
It was just a local repo.
 
very stupid, in fact
 
What I'm trying to say is that you should have had remote.
 
I'm never going to use put the compiled stuff into the same directory as the source code again.
 
11:48 AM
Or just use a sane build system.
 
Keeping compiled stuff out of your source tree is a good idea even with a sane build system :)
 
who the hell would put the compiled stuff into the source folders?
 
@thecoshman someone who uses Visual Studio?
 
I thought VS put it into a build folder
wait, nope
ah, either way, it doesn't put it in the source folder
 
Doesn't it put it in <project-root>/somedir?
right next to <project-root>/solution-file.sln and <project-root>/restoffiles?
 
11:53 AM
the .exe is put either in <root>/ or <root>/build/debug/ fairly sure the latter
 
If I were do design a build system I'd put the compiled things by default in a random directory in ~/.<name of buildsystem>/. Of course you can change it in a configuration file.
 
I'd put the build in the directory where you ran the command, and refuse to do anything if that directory is the same or a subdirectory of the project file.
 
I put everything under build/ in project root, because anything else is meh.
 
I'd add to the compiler flags -o /dev/null if rand() == 42.
 
@classdaknok_t It’s a disgusting anachronism that rm doesn’t use the trash, though. One of these days I’m gonna replace rm on all systems I use …
 
11:57 AM
@KonradRudolph replace might be a bad idea. Perhaps alias is better. :P
 
well, alias does replace it for all intensive porpoises
 
But is .trash a core Linux/coreutils concept?
 
Today I'm going to think like a Java developer. I'm going to write a build system and use XML for configuration files. On top of that, the XML configuration files must add the right XML namespace declarations or it'll refuse to run! Also, I'm going to put things in millions of different namespaces!
 
Or is it something invented by Desktop Environments?
 
@rubenvb I don’t care
 
12:02 PM
.Trash should be WOM.
"Hey, I didn't lose it! I just can't get it back but it's still there!"
 
coreutils don't use trash.
 
Maybe they should?
 
What for?
 
40 mins ago, by Konrad Rudolph
how did that dot get there?!
 
lol
 
12:03 PM
Replace rm -rf with mv, duh.
rm — remove file, but not really.
Then try to figure out how do you empty the trash.
Brillant.
 
Write a utility for that.
 
@CatPlusPlus Doesn’t work – what if I remove two files with the same name subsequently? I’d lose the first one
 
no, just rm -rf /.trash or ~/.trash
 
But rm moves files to trash.
 
trash could be automatically emptied upon reboot, for instance
 
12:05 PM
@rubenvb you cannot do that if rm is aliased.
 
How do you move trash to trash.
 
@classdaknok_t /bin/rm
 
@classdaknok_t Well you could use command rm or the absolute path
 
Also trash is a silly and annoying concept.
 
You'd still need to replicate the whole structure to solve the double file name issue.
 
12:05 PM
@CatPlusPlus Suggest something better
 
@KonradRudolph Use a back-up system!
 
@classdaknok_t I do
 
Use a brain.
 
@KonradRudolph Then what's the point?
 
but on the server? Hard
@CatPlusPlus I do. Now tell me you never made a mistake
@classdaknok_t “but on the server? hard”
 
12:06 PM
@CatPlusPlus because accidents never happen
 
@KonradRudolph I was first.
 
Maybe not never, but I backup important data. And not important data, well, whatever.
 
restoring from trash is designed to be a simple task. restoring from a backup is (usually) not a straight forward task
 
And I rarely delete without visual interface, anyway. find you can easily verify by doing -print instead of -exec on the first run.
 
actually, setting up a failsafe backup system is really hard anyway. On OS X I just use Time Machine … which sucks, by the way, but at least it works. But configuring your own rsync script correctly, and so that restore works hassle-free is really, really hard
all I’m saying is that the user interface idiom of rm is fundamentally broken
it’s a tool that is too easy to use wrong
 
12:08 PM
I don't use trash, and don't remember losing anything important.
 
this may ring well with the Unix crowd but it’s incontrovertibly Bad UX
 
coreutils is not concerned with UX. You can build better tools on top of it.
 
@CatPlusPlus How nice for you
@CatPlusPlus I’m all for that. But those “better tools” don’t exist
 
Write them.
 
lol
 
12:09 PM
bake them
 
CakePHP has a bake command.
 
Anyone know if electron chirality and/or helicity are conserved when you shoot them through a diffraction grating?
 
“write them” is a cop-out though … the shell has been around for decades
 
Use zsh.
 
@rubenvb this is a C++ room you know...
 
12:11 PM
@thecoshman I could try ;-)
 
@thecoshman so what?
 
I guess nobody cares enough to write them.
I certainly don't.
 
eh, I can’t believe that
 
@thecoshman Oh yeah don't you dare talk about anything but C++
 
fair enough
 
12:11 PM
(the “nobody cared” claim)
it’s just really hard to do it correctly, so that it works on enough systems
 
really, should just be Lounge<void*> :P
 
I'd disable trash on Windows, but am too used to Shift+Delete. :<
 
I’m not sure why somebody intentionally circumvents this safety net
just because it hasn’t bitten you yet
sounds a bit short-sighted
everybody makes mistakes, after all
 
I keep my code on remote.
I do backups of other important stuff.
 
see above; I do the same
 
12:14 PM
Everything else can be downloaded, recreated and whatever.
 
… where possible, at least
hmm
 
So meh.
Most of my hard drive on this PC consists of Steam.
The other part is code, most of which is cloned repos and the rest unpacked archives from other projects.
 
normal person: "oops, didn't mean to press delete, oh well ctrl+z. There, all fixed"
you: "oops, didn't mean to press delete. Now I have to search through my backups to get that file back"
 
Oh, and apps, download and reinstall.
I never press delete if I'm not sure I want to delete something.
Total Commander FTW.
 
I find it staggering that you can be so ignorant to the possibility for mistakes. You make back up's because your HDD could crash. You have a trash folder because you could accidentally delete something. Yes you could restore from back up, but undoing the delete is near enough instant and if your file is newer then the last back up, your changes are gone.
in other words, disabling trash is an idiotic move. All you stand to gain is hassle and a small bit of HDD space
 
12:20 PM
Trash is as much hassle as restoring from backup.
Especially that in 99% cases "restoring from backup" is just "hg revert" in place.
 
bullshit man
 
@CatPlusPlus not everything is under version control
 
you just hit ctrl+z and your accidental delete is undone
 
I agree with @thecoshman.
 
For trash I'd have to go to the desktop, find the icon, double click the icon, find the file, make sure this is that file I want, and then restore.
Ctrl+Z is edit comment.
I don't use Explorer.
 
12:22 PM
Ctrl-Z is/should be universal "Undo".
people who think otherwise deserve to be shot
Dolphin, Nautilus, Explorer, etc. all use that.
 
See, I deleted a file to trash for testing, and now I can't find it.
Because some other things thought it'd be a good idea to use trash.
TC is way better than any other file manager in existence.
And not everything is and needs to be CUA.
Oh, also vim swap files. I can restore text files from those also.
@rubenvb And whose fault is that, hm? The only things I don't version control are things I don't care about.
Well, or otherwise backup.
But that other backup is for things I rarely touch and really is just for HDD failure case.
It's out of the way.
IOW, I know what the fuck I'm doing. And with that, I have to go to boring classes, bleah.
Stupid trash won't even tell me how much space it's hogging up.
1GB, gawd.
 
OMG! the 70's called, they want their epic amounts of disk space back
 
I've just wasted 2 hours of my life because i had #define CLASS_HPp instead of #define CLASS_HPP :-/ Someone fancy coming over to stab me in an eye with a fork ?
 
Yeah now if you excuse me I'm gonna make me 7 cups of coffee ...
 
Xeo
12:31 PM
@ScarletAmaranth If I do include guards (and don't use #pragma once), I just copy-paste whatever token I use.
 
@Xeo if i do include guards, I don't do them, my IDE does :P
 
@Xeo Yeah I'm scared to use #pragma, not sure how that's gonna work in android NDK, will have enough issues even without that :(
 
also, how come people tend to shy away from #pragma once
 
Xeo
@ScarletAmaranth It's the preprocessor that counts, not some library
 
Doesn't change the fact that I'm a giant twat ...
And those errors ... they couldn't be more cryptic ...
 
12:33 PM
@thecoshman it's not standard
 
@thecoshman They don’t work on modern GCC, no?
 
@jalf even in C++11?
 
Prototypes in .hpp didn't match with implementations even though they were the same and all that shit :(
 
… and it’s not standard
 
Xeo
@thecoshman Right-y, Visual Assist actually takes care of me for this. :) I just type #guard, <tab>, and there we go (automatically takes the filename)
 
12:33 PM
@ScarletAmaranth go on...
 
Xeo
@thecoshman Any #pragma is non-standard
 
I'm majorly annoyed :)
 
@Xeo TIL
 
Xeo
They are specifically for compiler-specific things IIRC
 
Aren't pragmas MEANT to be non-standard and platform specific ?
 
12:34 PM
@ScarletAmaranth Yes
 
Xeo
@KonradRudolph I think they do, now.
Atleast GCC 4.3.4 doesn't complain (it might just silently ignore it, though)
 
any one made use of cppunit? or any 'testing that a class behaves as I expect it to' system? I would say 'unit testing' but last time I called it that, it turned into a talk about what unit testing really is
 
@Xeo They used to but wasn’t it deprecated because GCC now handles include guards correctly so that a file with include guards isn’t read twice?
 
Xeo
Dunno, really.
 
@Xeo Well, 4.3 isn’t what I’d call recent ;)
 
12:36 PM
Why does preprocessor have to be so stupid :( ?
 
@ScarletAmaranth Because it's C.
 
This is most annoyingful ...
 
Xeo
> GCC originally gave a warning declaring #pragma once "obsolete" when compiling code that used it. However, with the 3.4 release of GCC, the #pragma once handling code was fixed to behave correctly with symbolic and hard links. The feature was "un-deprecated" and the warning removed.
 
@rubenvb You've got a good point there ...
 
Xeo
I'd propose a standard #guard for C++17, but hopefully we'll have modules by then...
 
12:39 PM
I would welcome c++ without the sodding preprocessor ...
 
@Xeo wouldn't you still have the problem with in a module though?
 
Xeo
In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including: less code, avoiding name clashes, and sometimes improved compile speed. Example See the article on #include guards for an example of a situation in which one or the other of these methods must be used. The solution using include guards is given on that page; the #pragma once solutio...
I wish the onebox would honor #tag suffixes and show a preview of that
 
@ScarletAmaranth then don't use it (outside of includes)
 
@rubenvb I don't ... the key part is outside of includes :)
 
Xeo
@thecoshman I don't see why, if you only use headers for preprocessor stuff
 
12:41 PM
#pragma once can speed up compilation ? Under what arcane circumstances ?
 
Xeo
@ScarletAmaranth No preprocessor being involved to scan for matching #ifndef ... #endif.
 
that god damn plink has come back to haunt me
 
Xeo
Anyways, gotta run. See ya
 
god speed
 
@Xeo to meta with you!
 
12:56 PM
good riddance!
GCC finally installed
off to hear a debate now
“Are celebrity genome sequencing projects beneficial to science?”
 
Hi
Short question: in std::map one can define a custom Compare functor ( default is operator<()) but can I use it to compare equally values for which operator== would return false ?
No wait... now that I think about it, the answer is no and I'm dumb. Never mind.
 
Sure you can :)
as long as you define a strict weak ordering
It doesn't matter what operator== says
 
You can even use operator> if you like.
 
I'm not sure I wrote this right :
I have a std::map containg boost asio ip_address classes
 
objects
 
1:03 PM
and I realized that IPv4 mapped address (::ffff::127.0.0.1) would not compare equal to 127.0.0.1
 
"Objects". And what's the key?
 
that's the key.
 
Then what's the value?
 
Is that relevant ?
 
the value doesn't matter for this discussion, does it?
so what's the question?
 
1:04 PM
Suppose int if you must :)
 
The question is : if I define a custom functor for Compare
 
@StackedCrooked or bool
 
Will map["127.0.0.1"] yield the same result than map["::ffff::127.0.0.1"] ?
 
@ereOn That depends entirely on what your custom functor does ;)
 
@jalf :p Let's say my custom function does not care and compare those equally.
Well it would return false I guess, since something like operator<() is required.
 
1:06 PM
@ereOn you're supposed to implement a < operator, not a ==. So how would it compare them "equaL"?
 
That's the point :
 
If operator< is not defined then you get a compiler error.
 
I could always return false, as the two values are identical
 
@StackedCrooked not if you provide a custom comparator, which is the case here.
 
@ereOn Then you're set. a and b are equivalent iff !(a < b) && !(b < a).
 
1:06 PM
Will the map automatically test that A < B == B < B == false ?
 
If you implement it so that !("127.0.0.1" < "::ffff::127.0.0.1") && !(":ffff:127.0.0.1" < "127.0.0.1"), then as far as the map is concerned, they are equivalent, and will be considered the same key
 
Neat !
 
Why doesn't the map require you to return an enum { LT, EQ, GT } or something instead?
 
Thanks, I was really wondering about this.
I guess because just providing operator<() is sufficient ?
 
of course, if your comparer breaks the ordering for some other arguments, it'll end up failing horribly :)
 
1:08 PM
(But I agree it may be less efficient in some cases)
 
@classdaknok_t why would it? It's ugly and would complicate the implementation
 
std::vector<std::pair<...>> ftw!
 
I Derived privatly from Base class. and when I create a Base pointer that point to a Derived object I get this ERROR. error: 'Base' is an inaccessible base of 'Derived'.
 
@jalf I have seen other frameworks do it, but yes it would complicate the implementation.
 
user784668
std::vector<void> ftw!
 
1:09 PM
can someone tell the problem
 
@classdaknok_t You could implement a compare function in terms of operator<.
 
@AlexDan sure. The problem is that Base is an inaccessible base of Derived
 
@AlexDan if you are using private inheritance you cannot do that.
 
@Fanael What does std::vector<void> mean?
 
@StackedCrooked a vector of voids.
 
user784668
1:10 PM
@StackedCrooked What do you think?
 
But that won't compile unless you specialize std::vector.
 
You can't.
 
@Fanael I don't know.
 
The only thing it could hold and keep track of is size().
 
First, void is not a user-defined type. And second, it violates the other requirements of std::vector.
None of those is allowed.
 
1:12 PM
@classdaknokt : yes but why. I create Derived Object and it works fine. but why a base pointer can't point to a Derived class if it inherist form it Privatly. thanks
 
@AlexDan Being a private base means that the rest of the world is not supposed to take notice of it.
 
@AlexDan because if you inherit privately you are not supposed to know of the inheritance outside of the classes.
It's similar to accessing a private member; you cannot do it outside of the class.
 
@AlexDan if the base is private, users of the class can't see that it is derived from the base class. And so they can't convert a Derived* to Base*
That's what private inheritance means
 
Thanks a lot
 
@jalf You can use C-style casts.
@AlexDan no problemo.
 
user784668
1:15 PM
@classdaknok_t Blasphemy!
 
@CatPlusPlus First time running Unity what that indicator-appmenu thingy removed. The menus are now attached to their windows, but that happens even when the window is maximised, so the top bar becomes wasted screen real estate. So it's more of a hack than real customisation.
Mmh I thought I could maybe try to add support for recursive variants but it's kinda weird.
 
Does anybody know a good article on template templates?
Or a book that covers them.
 
template templates ?
 
C++ Templates: The Complete Guide covers them.
 
or is that a typo ?
 
1:21 PM
@ereOn this hell:
template < template <typename T2> class T>
void foo() { ... }
@RMartinhoFernandes thanks, I'll check it out!
 
;)
 
There's nothing hell-ish about it.
 
It's the same thing as a function that takes a function as an argument.
 
Mmmh, if I do variant_type v = u; where the variant type is <int, std::string, recursive_variant_> then it's not a copy, but if I change the last param to recursive_variant_& then it's a copy.
 
a function that takes a function that takes an int as an argument as an argument
 
1:27 PM
@RMartinhoFernandes Ah so if you have template<template<class T2> class T> void foo(T& t) {…} you can do foo<std::vector>(some_int);?
 
you could have fun chaining that up :P
 
user784668
A function that returns pointer to itself.
 
@thecoshman I suppose you can also have variadic variadic variadic variadic template template template templates then?
 
@classdaknok_t Would need to be something like template<template<class, class> class T, typename U> void foo(U&);.
 
think, std::vector<std::unique_ptr(foo)>>
 
1:28 PM
You can't have a template in a function parameter list, e.g. void foo(std::vector&); doesn't make sense.
Also std::vector is a template with two parameters, so template<class> class T doesn't match.
 
@LucDanton but foo(std::vecotr<bar>&) does
 
@LucDanton I see.
 
Sometimes I use template<typename Container> void foo(Container &);
 
@thecoshman Yeah sure. void foo(double****&); also makes sense, as well as void foo(std::nullptr_t); as well as... and so on.
 
@LucDanton AFAIK the second template parameter for std::vector is optional
 
1:29 PM
@thecoshman Lol, how is that relevant?
Oh, I see the context now.
 
@thecoshman I'm still not sure what you meant here but just in case: std::vector<bar> is not a template.
 
@StackedCrooked everything is better with context :D
 
@thecoshman except for starred messages.
 
771
Q: How can I pass the string "Null" through wsdl (SOAP) from AS3 to ColdFusion web service without receiving a "missing parameter error"?

billWe have an employee whose last name is Null. He kills our employee lookup app when his last name is used as the search term (which happens to be quite often now). The error received (thanks Fiddler!) is <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode>...

Anyone saw this?
 
@EtiennedeMartel I feel like sawing it.
 
1:31 PM
@EtiennedeMartel Yeah, you.
 
@LucDanton oh, you where more saying that template that is not templated 0_- can not be used in a function signature
 
@thecoshman Yes, and in the original signature T is strictly a template (since it was declared as a template template parameter).
 
@thecoshman This is annoying if you want to do something like:template<class T, template<class> class ContainerType> struct Stack { ... };. It doesn't work with Stack<int, vector>.
 
@StackedCrooked will it work with variadic templates?
 
Sorry, little error.
 
1:33 PM
If it helps, std::vector is the template, and <char> is a list of parameters to pass to the class template to produce a class.
 
Say template<class T, template<T, class...> ContainerType> struct Stack { ... }; if I get the syntax right. Or whatever. :P
 
Yes, that will match (modulo fix). As well as template<typename...> class T.
 
not sure of the proper words for this, but are you trying to 'implement' a template class where one of the types in the template is a template that has not it self been implemented with a type?
 
@classdaknok_t Dunno. But template<typename T, typename Container> struct Struct : ContainerType<T> {}; might work.
 
@thecoshman yeah, you pass a template as a template parameter to another template.
 
1:35 PM
Note that another way to make std::vector 'match' template<typename> class T is to use an alias: template<typename T> using vector = std::vector<T>; then vector can be used.
 
@StackedCrooked No.
You can't pass template arguments to types.
 
@StackedCrooked no, that won't work (assuming with ContainerType you meant Container). Container is a type, not a template.
 
can't you use the first template type as the 'type' passed to another template eg
template <type T, std::vector<T>>funkyThing
and call it with
funkything<int> funk
 
Just declare as template<typename T> and later on use std::vector<T>.
 
"Template template argument has different template parameters than its corresponding template template parameter." meh
 
1:38 PM
However you can do template<typename T, template<typename...> class Template = std::vector> and later on use Template<T> which will default to std::vector<T> is that's what you want.
 
Is this right? At least it compiles.
 
Yes.
 
Yay my first template template!
It will just pick the default template parameters for Ct, right? Aka std::allocator<T>.
 
No.
Try it: write Ct<T> somewhere in the template.
 
@classdaknok_t that is some mad shit right there :O
 
1:43 PM
@LucDanton Works fine.
template<class T, template<class U, class...> class Ct>
class Stack {
public:

private:
  Ct<T> container_;
};
 
No idea if this is conforming.
 
template<class T, template<class U, class...> class Ct>
using stack = std::stack<T, Ct<T>>;
// also compiles
 
I would have thought that the arity of Ct is fixed when it matches something but now I'm not sure.
 
@LucDanton both clang and GCC compile it with -pedantic, so I guess it's conforming. Or both compilers have a bug.
 
I would never trust the compilers for that right now.
 
1:46 PM
Nope.
 
No, not even then.
 
clever shit based on what you just posted :P
 
TIL: clang parsing C++ is as fast as reading a binary AST from disk.
@thecoshman wow, that is very some advanced shit.
 
no idea what you would want to use such a thing for
@classdaknok_t ok mr done lots of template magic before, no need to be mean :P
 
@thecoshman template<class T, template<class U, class...> class Ct> using stack = std::stack<T, Ct<T>>; stack<int, std::vector> LESS TYPING!
 
1:51 PM
@thecoshman If you want to implement a stack in terms of another container.
 
@StackedCrooked std::stack<int, std::vector<int>>.
 
I know.
 
As you know the Standard container adapters do not use template template parameters. Instead it's e.g. template<typename T, typename Container = std::deque<T>> class stack. So know that you're starting to know how template template parameters works, know when they're not necessary.
Similarly it's not template<typename T, template<typename> class Allocator = std::allocator> class vector.
 
One of those "know"s was a "now".
 
1:53 PM
Know, know.
Status: won't fix.
 
> So know that you're starting to
Know it's too late.
 
erh; no, no; no, no, no, no; no, no, erh; yes!
 
Will keep typo for backward compatibility.
 
That's knot nice.
 
know it's a feature
 
1:57 PM
"It's a big no no." Is that double negation?
 
No no.
 
@LucDanton This is the answer :D
 
C++ y u no have standard ABI.
 
Greeting g = Greeting(mood, timeOfDay);
 

« first day (562 days earlier)      last day (4383 days later) »