« first day (542 days earlier)      last day (4389 days later) » 

6:00 PM
meh, I'm m/f[(earless)(ull-hardy)]/
 
Ubuntu is nice, but I don't like Unity, and it doesn't come prepackaged with a C toolchain. Somehow.
 
@Maxpm o_0 dang
 
who wants a C toolchain?
 
well, I am assuming he means C++
 
I mean C and C++.
And it's surprisingly difficult to install one.
 
6:02 PM
It is?
I think you need to define "surprisingly difficult".
 
wait... hard to install a text editor and gcc/g++
 
apt-get install build-essential vim
Incredibly hard.
 
At least that's surprising. I guess.
 
@CatPlusPlus I had no idea build-essential existed. Which I think is their responsibility.
 
If you try to use g++ without it being installed, you get packages in which it's available.
Also, what's their responsibility?
Informing you about all possible software you might want?
Maybe in form of a clippy?
"You look like you could use a compiler!"
 
6:05 PM
Weren't we just helping some idiot who couldn't manage to install VS Express despite knowing it was the right solution, and ended up concluding Dev C++ was the way to go on Windows?
 
@CatPlusPlus I searched for gcc and installed it, but not successfully. I don't remember the exact circumstances, but I think it was an issue of dependencies.
 
Maybe a PICNIC.
 
It either installed the wrong libraries (32-bit vs. 64-bit) or did not think the right ones were installed.
@CatPlusPlus Oh God.
 
> Parts of PHP are practically designed to produce buggy code.
Oh, interesting.
 
build-essential is a virtual package, so it just pulls gcc + dev libs. packages.ubuntu.com/oneiric/build-essential
 
6:07 PM
@CatPlusPlus So I've gathered.
@RMartinhoFernandes Where are you reading this?
 
"A fractal of bad design." Ha.
 
> I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us have the slightest clue what we’re doing. Combine with Sturgeon’s Law, and I have a lifetime’s worth of stuff to gripe about.
Sounds like me.
 
@Potatoswatter Yes. The same guy who said that none of the bignum libraries on the internet worked. I eventually walked him through the process of comping more than one file with DevCPP, because he couldn't do that on his own.
 
Sounds like you guys had some fun.
 
6:15 PM
@MooingDuck He obviously couldn't have used DevC++ to any useful level.
 
> PHP’s parser refers to e.g. :: internally as T_PAAMAYIM_NEKUDOTAYIM, and the << operator as T_SL. I say “internally”, but as above, this is what’s shown to the programmer when :: or << appears in the wrong place.
This can't be true, right?
Tell me this is a load of bollocks.
 
This one is in TDWTF.
 
OMG.
It's on wikipedia.
 
it's totally true
 
I'm going to my happy place.
 
6:21 PM
It shows internal token names on errors.
You know, that mechanism that has no backtrace functionality.
 
I refuse to believe that.
It can't be that broken.
This is all an elaborate prank the entire world set up for me.
 
There's no other logical explanation.
So, stop it, now. I have seen through your charade.
 
> === compares values and type… except with objects, where === is only true if both operands are actually the same object! For objects, == compares both value (of every attribute) and type, which is what === does for every other type. What.
The foo()[0] was my favourite thing to point out and they had to go and fix it. :<
 
Is that about returning arrays?
 
6:28 PM
Yes.
 
I.e. f = foo() and then $f[0]?
 
For the longest time $array[0]() worked, but func()[0] didn't.
 
lol
I like how the devs reject feature requests because they "make for messier code".
Like, this is PHP we're talking about.
> If an exception is thrown while evaluating a constructor’s arguments (e.g., new Foo(bar()) and bar() throws), the constructor won’t be called, but the destructor will be.
 
> Appending to an array is done with $foo[] = $bar.
That's something new.
 
6:36 PM
you didn't know that? I did
 
Could be I don't remember, but I've always used array_push.
 
OMG you know PHP?
And when I thought that article couldn't surprise me anymore...
> preg_replace with the /e (eval) flag will do a string replace of the matches into the replacement string, then eval it.
Why the fuck is there a regex flag to eval the result?
What kind of broken mind can generate such crap?
 
they're all dumb
but i think we just have to admit it, we're not really different from "them" ;-)
 
PHP is a piece of crap from hell so people who call themselves programmers can create websites security holes.
 
@CheersandhthAlf No really, I feel the need to assert my difference from them.
 
6:44 PM
@RMartinhoFernandes just think about it. by your current standards, a week ago you were pretty stupid, writing (now you realize) shitty code.
And so it will be in another week.
And so on.
:-)
 
@CheersandhthAlf Sure, but I wasn't designing a regular expression engine for use in a very popular programming language and coming up with the craziest thing possible.
 
That's irrelevant.
 
There's stupid, and there's... that.
 
how to indicate tag then?
[[[test]]]
[test2]
nah
 
[tag:blah]
 
One interesting effect with a pre-moderated group is that many people can answer the same question without seeing each others' answers. Then one discovers that the answers differ in surprising (define: surprising) ways... Case in point, half an hour ago or so, [groups.google.com/group/comp.lang.c++.moderated/browse_frm/….
However, with Wil Evers, the new moderator, my latest two postings were approved and propagated within minutes!
 
wow, that was the most intense php bashing session I have ever seen :P
 
"preg" is short for "pregnant": PHP is pregnant with potential.
oh yeah
am i being ironic or what. even i don't know
 
@CheersandhthAlf I'm surprised more people aren't mentioning that passing an object by reference and by value are very very different concepts, and one is not simply an "optimization" of the other, as he suggests.
 
7:00 PM
@thecoshman I'm still not through it all. I need to take breaks every once in a while. I always thought the cat's aversion was a bit exaggerated, but now I don't think so anymore.
Ok, this one gets the cake: en.wikipedia.org/w/…
 
i get just the logo?
 
Yep, that's PHP.
Using that magic query parameter gives you the PHP logo.
 
@RMartinhoFernandes fyi, the 'now' at the end is sort of redundant
wait, is that some sort of built in magic value that makes a page just render the logo?
 
@thecoshman Yep.
Apparently it needs source modification to be removed.
 
@RMartinhoFernandes (ノಠ益ಠ)ノ彡┻━┻
 
7:08 PM
I'm flabbergasted.
 
My first Steve Yegge video, opinions on this guy?
 
who the hell thinks that something like that is a worth while feature
 
"In 2007 the interpreter had an integer overflow vulnerability. The fix started with if (size > INT_MAX) return NULL; and went downhill from there. (For those not down with the C: INT_MAX is the biggest integer that will fit in a variable, ever. I hope you can figure out the rest from there.)"
4
 
7:15 PM
Does std::ostringstream have a max buffer size? It cuts off at 1004 bytes. I use it like this: ideone.com/dc8Kb.
 
without looking at the code, it sounds like you are inserting a nullvalue and then handling the result as a nullterminated string
 
item.binary does sound fishy.
 
@daknok_t where does it cuttoff in the string? Right after something? In the middle of one of your string literals? Or always at the 1004th byte no matter what's there?
also the item.binary and item.function things, as R.Martinho says
 
@MooingDuck in the middle of <code> Wait, here's the output: gist.github.com/2353782
item.binary and item.function don't contain null characters.
item.binary is the binary that contains the function (e.g. a program or a library), and item.function is the demangled name.
 
You could add a stream.exceptions(/* I forgot about the magic value */); to have a quick-and-dirty way to check if the insertions fail. (But please remove it once the issue is solved.)
 
7:20 PM
Whoops, I also have to escape < and & as HTML entities, I see now (though that's irrelevant).
 
@daknok_t Or for XML you could use CDATA
 
It's HTML5. :)
 
I hate the concept of breaking HTML 3
 
@LucDanton or just check the state of the stream at the end
 
@MooingDuck That's saner, thanks.
 
7:22 PM
I'll try that.
 
@RMartinhoFernandes Alright, done with the switch. Less preprocessor, yay!
 
@MooingDuck That only tells you something went wrong.
Enabling the exceptions tells you where.
 
@RMartinhoFernandes that's still better than not checking, but yes, I prefer the exceptions.
 
Aw sweet, this claim is back: apple.com/why-mac/better-os/#viruses
 
@LucDanton no exceptions. :/
 
7:28 PM
Can we discount the effect of null-termination by making sure that s.size() matches the output?
 
I did stream.exceptions(std::ios_base::failbit | std::ios_base::badbit | std::ios_base::eofbit); before streaming and caught the exception and std::cerr'ed it, but there's no output in stderr.
 
@daknok_t then you did something wrong?
 
@LucDanton stream.str().size() and the size is 1821, which is correct.
Then the problem lies in the Mongoose server…
Yep, changed mg_printf to mg_write and it works now. Thanks for your help, anyway. :)
Stupid C library…
 
Is it not a concern that the document contains NULs?
 
sbi
Godammit! While the robot was away, I was able to sneak in a few highly starred messages on the starboard. Just this morning, I had 14 stars there! Now that he's back again, he's taken over the starboard in no time and has 14 stars, too. He needed almost thrice as many messages for it, though, and that's where his positronic brain shows: lots of mediocre stuff, rather than two or three real gems. (Yeah, that meant to say "Welcome back, @RMartinho!")
 
7:37 PM
@LucDanton Doesn't matter. Can an std::string hold '\0's? If it doesn't, I need to use something else. It must be possible to emit null bytes using my framework.
 
@daknok_t No, std::string is fine. I'm curious about the resulting document (HTML?).
 
sbi
@daknok_t Of course it can. Just do not expect c_str() to work with this.
 
@sbi Mongoose expects a buffer of type void* and the size of the buffer, not a C string so that's not an issue, is it?
@LucDanton HTML document's may not contain null chars, but e.g. binary fails might.
 
@sbi Erm. Ok, thanks for the welcome. I guess.
 
can I get plink please
 
7:39 PM
@daknok_t I see. Does the latter rely on browser behaviour?
 
Like this:
 
sbi
@daknok_t As long as you need to serve a C API which is aware of '\0' (i.e. that takes a pointer and the buffer's length), you're fine.
 
std::string response_string =
// TODO: Get headers from response.
"HTTP/1.1 200 OK\r\n"
"Content-Type: text/html\r\n"
"\r\n";
response_string += response.get_body();

mg_write(connection,
    response_string.c_str(),
    response_string.size());
 
@thecoshman What for?
 
@RMartinhoFernandes god damn it, so my sound has been eaten by something during upgrade
 
7:40 PM
@sbi I don't know about before, but now c_str() is the same as data().
 
thanks
 
sbi
@thecoshman Whoa! What are you doing here at that time?! You used to log off at beer'o'clock!? Are you still at work?
 
@LucDanton No, it's all HTTP and HTTP allows null characters.
 
sbi
@RMartinhoFernandes Doesn't matter for my argument.
 
@daknok_t Oh I thought you were computing a document for local purposes. Alright then.
 
7:41 PM
@sbi Good to know. :)
 
@sbi good god man! who do you think I am?
 
@LucDanton I'm writing a web framework for fun.
 
sbi
@thecoshman You're the cosh man, and you always log on when you come to work, and log off when you go home, because your being at work is boring, and your being home must be a lot more interesting, since it, usually, doesn't leave you time to hang out here.
What happened? You angered your girlfriend and she dumped you, and now you don't want to sit at home all by yourself and be gloomy?
 
Gah, another header where I forgot to include <functional>.
 
@sbi I have been around for a few years don't forget :P well, at least before I left uni
Been upgrading my linux box now that I finally have a work network card for it, been stuck with windows for a long time
more recently, I have been doing lots of house renovation, thus little time to idly chat
any hoops, time to restart, damn you lazy kernel!
now then, that didn't take long at all
 
7:53 PM
Mmmh, if I time my EDSL vs Boost.Phoenix a simple program gets compiled faster using mine. If I time my variant using my EDSL vs my variant using Phoenix using the same expression, then suddenly the compile time explodes with my stuff. Fun times.
 
I like explosions.
 
In this instance Boost.Phoenix still takes 5 times as much time as when using a hand-written polymorphic functor :(
 
0
Q: Global variable for the server instance in C++

RussellWhen looking at some existing code for a web server, I see that there's a main.cc file and another server.h and server.cc pair for the server class. // main.cc #include "server.h" int main() { foo::server = new foo::Server(); server->Serve(); // runs forever } // server.cc namespace foo...

Yikes.
 
template <typename T>
using Invoke = typename T::type;
 
@RMartinhoFernandes What on earth is that?
 
7:57 PM
Is this so obvious we didn't think of it?
 
@Maxpm I think it's a neat little gem.
I'm wondering why I didn't think of it before.
 
Oh god at the very least it comes in handy when writing an alias.
 
What does it do?
 
@Maxpm typename T::type obviously!
 
Invokes a metafunction.
 
7:59 PM
The use of using and typename on the second line confuse me.
 
It's new type alias syntax.
Which is neat and better.
 
What sort of member is type?
 
I'm torn between Type<foo> or Invoke<foo> though. First one is consistent with other aliases but looks dumb.
 
struct foo { typedef xxx type; };
 
7:59 PM
Duh.
 
damn you all and TMP wizardY!
 
Invoke<std::remove_pointer<T>> does look neat.
 
@LucDanton I though of Type first too (just like ValueType!), but I think Invoke is better.
 
I don't see the point.
 
@RMartinhoFernandes I'm using TupleType as well these days. And for added confusion convenience, there's tuples::TupleType too!
 
8:01 PM
@Maxpm That means you don't TMP enough.
 
@RMartinhoFernandes No, I don't.
I rarely use C++ these days, actually.
 
@RMartinhoFernandes I steel that for fasebook
 
The point is that that typename you see here is refactored once and for all for every use of ::type (in a template context).
 
> Are you human? (sorry we have to ask). Tell us how much is 8 + 9 by entering 17 above.
 
Improves readability, saves typing, improved love life, etc.
 
8:03 PM
@RMartinhoFernandes Lol.
 
@LucDanton All in one small package.
 
@RMartinhoFernandes better question: what color was Napoleon's blue horse?
 
Kingdom of Loathing has a test before you can enter the chat, and there's a question "what colour was someone's favourite black horse?".
I guess there are people who fail that.
 
@RMartinhoFernandes I suppose it would be wise to mechanically check each instance of typename tbh.
 
8:06 PM
@LucDanton I already purged that from my type_traits.h++.
I'll grep the rest when I come back from dinner.
See y'all.
 
OMG A BLUE HORSE <3
 
@RMartinhoFernandes Ewwwww, a + in a file name.
 
8:24 PM
argh, I can't stand this unity! gnome fall back here I come!
 
@thecoshman isn't it possible to configure a different window manager (or whatever it's called)? i would like to do that anyway. i don't like Unity.
 
On the login screen you can pick e.g. Gnome instead of Unity.
Or Gnome Shell. I forget how either is called though.
 
@LucDanton Thanks, I'll try that!
 
Shell isn't all that different from Unity.
 
It's not great under my three monitors though.
 
8:28 PM
not sure what new one I want to go with, but for now I want Gnome 2 back
@CheersandhthAlf when you install 11.10 (and seemingly when you upgrade to it) gnome is not installed
 
Unity is a layer over Gnome.
 
@LucDanton it was over gnome 2, I thought it was now over gnome 3
 
Ye, also Gnome 3 has a mode where it sort of looks like Gnome 2. I thought you were talking about that one. Doesn't look too great though.
 
from my understanding, gnome 2 shouldn't used any more, because you are missing out on 'features' that Gnome 3 has. But Gnome 3 looks like unity, aka sucks
 
Wait, I'm dumb. The 'mode' I was thinking about is simply Gnome.
So no, Gnome 3 doesn't look like Unity. Gnome Shell does.
 
8:33 PM
now that I have noticed it has finished installing, time for classic gnome
 
Unity is awkward, but usable.
 
@CatPlusPlus Unity was working fine up to the point where I want to use my computer for more then the web
 
@Maxpm I've started using .c++ and .h++ since a few weeks ago.
 
and now I have find out how to remove the panels... again ¬_¬
 
I have no qualms about any character in a file name.
Maybe POO, PILE OF.
 
8:38 PM
@RMartinhoFernandes doesn't windows though?
 
@RMartinhoFernandes +1 for not following the conventions.
 
@thecoshman Yeah. But I think + is allowed.
Also, I'm tired of three letter extensions.
 
Why does Thunderbird's "Search the web for..." default to Bing? I don't want Bing. I want Google. Or possibly AllTHeWeb.
 
@RMartinhoFernandes but three characters are better?
 
Why do you search the web from Thunderbird?
 
8:39 PM
@thecoshman Why?
Because you're using MS-DOS?
 
@CatPlusPlus Like, I double-click on "attain" and want its definition.
 
@RMartinhoFernandes You can always use .C and have it break hilariously in various places.
 
@RMartinhoFernandes Heh, I have a typename foo<T...>::template bar<U...>::type.
I'm going to leave it in.
 
@RMartinhoFernandes don't use any extension at all.
 
8:41 PM
TMP question: What's the benefit of the second example here?
 
@CheersandhthAlf I had a similar problem with skype for a couple years. All links would open in firefox. Never did figure out why, I've never had firefox as the default browser..
 
@daknok_t I like to have that metadata visible. Also, I'm not that revolutionary. I am a nostalgic at heart.
 
@Maxpm it works with C++<11.
 
@Maxpm also works with types
 
@Maxpm The factorial? Next to nil. It's just a display of cool.
 
8:42 PM
@MooingDuck Aha.
 
@Maxpm but mostly the C++03 thing
 
@Maxpm and works with templates that want ::value.
 
@daknok_t Are you referring to the constexpr?
 
@Maxpm C++<11 is C++ before C++11, so I'm referring to the template approach.
 
@daknok_t What do you mean? A template that expects its arguments to have a ::value member? Is that a common practice?
 
8:43 PM
@Maxpm yes
 
@Maxpm Type traits usually work like that.
 
@Maxpm ::type is the one that is used if the result of a meta-computation is a type.
Sometimes a metafunction can have the two.
 
@daknok_t I'm pretty sure I tried the first example on C++03 a while back and it was fine.
 
@Maxpm No constexpr.
 
@Maxpm C++03 didn't have constexpr so it shouldn't have worked. Forgot to enable -pedantic?
 
8:45 PM
> @daknok_t Are you referring to the constexpr?
 
@daknok_t You wouldn't need it.
GCC would just blow on your face after the parser mistook constexpr for a type name.
 
@RMartinhoFernandes you would if you want to use the result at compile time (e.g. pass it as a template parameter).
 
@daknok_t Oh, I meant you wouldn't need -pedantic.
 
@RMartinhoFernandes Maybe the compiler sees constexpr as a language extension when C++03 is used, and just gives a warning.
Clang does that sometimes and that reminds me of enabling C++11. :)
 
@daknok_t But that's an error, anyway.
 
8:47 PM
@RMartinhoFernandes there really should be an option -Penantic which just makes it print, "don't you mean -pedantic?"
3
 
C++11 feature, language extension, constexpr, templates, whatever… Pedants…
 
Penants.
 
god damn upgrade messed up my desktop, nothing feels right any more
 
pwned
 
1337 h4x0rz.
 
8:52 PM
WTF is that about?
 
@RMartinhoFernandes about Alice 2.2.
Like this chat room but you'll learn less useful things.
 
We had to do Alice for two months in my comp. sci. class.
 
lets see what this e17 is like then ¬_¬
 
@RMartinhoFernandes Yay, now I have tons of Invoke everywhere.
Not too be mistaken with invoke. Oh well!
 
8:56 PM
:)
 
Obviously Invoke works at the type level while invoke is for values. Makes sense.
 
@thecoshman My experience with Xfce has been nice.
KDE has improved a lot since I last ranted about it.
 
@Maxpm did it suck?
 
Anytme a website says "check back often for updates" you're GUARANTEED it's a dead website and a dead product.
 
Seen the logo's font, it probably did.
 

« first day (542 days earlier)      last day (4389 days later) »