« first day (476 days earlier)      last day (4477 days later) » 

3:00 AM
Ha, an actual useful answer!
 
I'm surprised.
Then again, it's @jalf, so it's not that surprising.
 
Yeah, penguin has patience.
 
Aro
Can you run a C++ application as a backend on a server and have it communicate with a webpage that displays everything in html5?
 
Aro
or is it better to do this stuff in java?
 
3:02 AM
It's never better to do anything in Java. There might be better-suited languages for the backend than C++, though.
Depends on what it is.
 
You could use FastCGI or something to interface with a web server.
 
Aro
better languages for the backend?
 
For server-y stuff, Erlang is usually worth considering.
 
But, wait, what are you trying to do? Do Web stuff with C++?
 
Cold. Fuck.
 
3:03 AM
@RMartinhoFernandes I think you mean ColdFusion.
 
FastCGI sucks.
SCGI/AJP are better.
 
@CatPlusPlus Probably. I don't do Web stuff with C++.
 
But then again, you'd have to generate HTML in the backend app.
You can have frontend and backend as separate apps.
 
Aro
I'd like to use mysql to store data and have a java (or c++ or ???) application running in the backend and it perform some kind of logic algorithm thing for a game or quasi-game and it communicates with a website (or more like be running on the web server) which displays stuff to the user and create the interface with javascript, css and all that stuff
 
Or not have a dedicated frontend app at all, and use WebSockets to connect to the backend directly.
 
3:05 AM
Oh, so a browser based game.
 
Aro
i mean, i can't just feed a C++ application for this stuff since it changes too often and install is a pain. Even a java applet would be a bugger.
 
I think you got it wrong.
 
Aro
Yeah I'm not so sure how much of a 'game' it will be, but it will use a lot of elements that a typical 'game' would use so it suits it.
 
MySQL sucks.
 
@CatPlusPlus Oh hell no.
 
3:05 AM
works fine for me
 
Only a coincidence.
 
what sucks is Oracle buying MySQL
and Sun
 
Aro
why would that make mysql suck?
 
Using MySQL turns your app into one big UB.
 
Aro
UB?
 
3:06 AM
It can blow up aaaany time.
 
@Aro Don't listen to him, he's got the harshest standards you ever saw.
 
Aro
I just want to be able to do what mysql lets you do.
 
The worst about MySQL is that it is not a real manly (read: ACID) database.
 
PostgreSQL is a good database.
 
Aro
I want to have a way to store a bunch of data
 
3:06 AM
MSSQL is good.
But a bit expensive.
 
Aro
I don't know how to use PostgreSQL. MySQL comes already setup on webservers everywhere. Why is it so popular if it's so bad?
 
And requires Windows Server.
 
@Aro I don't know. Ask Justin Bieber.
 
Xeo
I just noticed that Clang has delegating ctors
...
 
Popular does not equal good.
 
Aro
3:07 AM
I mean I can understand fads making bad things seem good ... but only for a while. Why is MySQL dominating?
 
@Xeo But not inheriting, right?
 
Xeo
Yes
 
Isn't it weird?
 
@Aro PHP dominates as well.
 
(Same with GCC)
 
3:08 AM
MySQL is only dominating silly shared webhosts.
 
@RMartinhoFernandes that's really old news, InnoDB is Acid
 
Aro
Isn't PHP good too?
 
I still wonder why, considering it's a piece of crap.
 
Xeo
But inheriting constructors are only really needed for some weird library wrapper types, imho.
 
Who are run by idiots in most of the cases.
 
3:08 AM
@Aro If you think that, you never used anything else.
 
Aro
why is mysql good for shared webhosts?
 
It's not. It's just people who run them have no bloody idea what they're doing.
 
Aro
correct i have never used anything else. I am new.
 
Mysql works and replication is a cinch
 
Really, use PostgreSQL and never think about MySQL again, and you'll be happier.
 
Aro
3:09 AM
honestly, I use it for the most simple of things and it has never caused me a problem. It's fast and it works. But, I'll look into PostgreSQL whenever I get to that point. But they're interchangeable, right?
 
Besides, if you want to use C++ backend, you won't be using shared web hosting anyway.
 
Aro
I mean whatever I plan to do in this web app with mysql i can just replace with postgresql right?
 
Portable SQL? lol
 
Aro
Oh? Is C++ too resource intensive?
 
last time I tried PostgreSQL was about 5 years ago, so I can't compare...
...back then, Mysql seemed to be much faster on my tests - dunno about today
 
3:10 AM
No, silly webhosts just won't let you run it.
 
@Aro Shared webhosts don't let you run arbitrary binaries.
 
No SSH, not even CGI, let alone background processes.
 
A C++ backend is an executable, after all.
 
Aro
oh, well I would probably just get a VPS
 
Yes, you should.
 
Aro
3:10 AM
and have to figure out how to host everything myself or something
 
Then there's a plus that you can pick your own database with no problem. :P
 
Aro
but what I don't understand is that there are more languages that can do the same task than I have digits on my fingers and toes and none are missing
 
Well, PHP is good at nothing.
 
due to every engineer thinks he can create a better language
 
Java, too.
 
Aro
3:11 AM
If I'm going to make a lot of algorithm logic stuff that takes input from a user, displays something and has to process everything in a very complicated way looking at a lot of stored data...
 
@CatPlusPlus PHP is good at escaping SQL for real.
 
Aro
I figure something like Java might be easier than doing that with AJAX somehow?
 
@RMartinhoFernandes Dreamhost is pretty lenient with that kind of thing.
 
C++ is good if you're a performance freak and don't mind writing silly workarounds.
@Maxpm They still kill background processes.
 
@Maxpm What do you mean?
 
3:12 AM
But yeah, they give you SSH access, at least.
 
Aro
could I do the same thing but with c++?
 
I can compile HelloWorld.cpp on a DreamHost shared plan and run it.
 
Aro
c++ application <--> javascript?
c++ <--> javascript <--> html?
 
Yes. You can use WebSockets.
 
It's probably more trouble than it's worth.
Not that "web" languages like PHP are any better.
 
Aro
3:14 AM
then what would you do?
 
Ugh. *Shudder*
 
Aro
i thought about php first
 
PHP is crap language, not web language.
There isn't much difference, but still.
 
Aro
but to store complex variables i'd probably end up using sql extensively
and php is a crap language like you said so i figured the code would get gross
and i need to make something that can scale
 
I'd use ASP.NET MVC and C#, but I'm a .NET fanboy, so...
 
3:15 AM
Well, Erlang scales. But it really depends on exact nature of the app.
 
you could store much of the sql complexity in stored procedures and views anyways... (shouldn't be in client code)
 
Aro
so there's basically microsoft and there's everybody else, right? Everyone else uses Ajax or whatever and microsoft uses asp.net
java and the java virtual machine or .net and all that stuff
 
AJAX is not related to ASP.NET.
 
Aro
doesn't asp.net do similar tasks?
 
3:16 AM
@Aro Everyone uses AJAX.
 
Personally, if I were to make a website, I would take the opportunity to learn Python and Django.
 
@EtiennedeMartel Ah, Ted Dziuba.
 
Aro
i thought the javascript/php/mysql thing was like asp.net?
 
Besides that, my experience with PHP is that it gets the job done. Very messily.
The more proficient you become in PHP, the more you despise it.
 
nope - js/php/mysql is rather platform independent
 
3:17 AM
@Aro AJAX is a client-side JavaScript thing. ASP.NET runs on the server. Like Spring, CGI, ColdFusion, RoR or Django.
 
Stop mentioning ColdFusion.
 
ColdFusion.
 
I just decided this week that I do not like web development.
 
Who does.
 
@CatPlusPlus Please...?
 
3:18 AM
Web developers.
 
Aro
I thought AJAX was a way to get javascript to do client and server side things ... like by using javascript to communicate with php which was server side and could communicate with mysql since you could put your login/password stuff in the php file since, unlike javascript, it wouldn't be run on the client
 
@Maxpm Not really.
 
Aro
i honestly don't know much about spring, cgi, coldfusion, ror or django although I have heard of cgi and coldfusion for sure and probably django.
so that asp.net comparison didn't help, sorry :(
what I like about web development is that it gives you a window anyone on almost any device in the world can view
 
Actually, now that I think about it, web programmers probably hate PHP as much as I, and web designers probably just use Dreamweaver.
 
@RMartinhoFernandes I'm only kidding.
 
Aro
3:19 AM
I wouldn't want to write a complicated program on it but a simple way to display output and receive input ...that would be awesome
and that's what I'm trying to do
 
@CatPlusPlus I do.
 
@EtiennedeMartel You're crazy.
:P
 
@Aro Not consistently, though. IE is always a pain, to put it simply.
 
@Aro No, AJAX is a way to send an HTTP request to a server without having to reload the whole page.
With that, you can, for instance, only refresh a small part of the page with data received from a Web service.
 
Web 'designers' should mostly stop existing.
 
3:20 AM
I find I fight HTML and CSS more than I code with them.
 
@CatPlusPlus Hell no, I don't want to be stuck having to make the fucking markup look the same on every browser.
 
Use simpler layouts.
 
I'm not a hipster.
 
Aro
Honestly, I say just forget IE.
 
@Aro IE9 is great.
 
Aro
3:21 AM
Every other browser, at least a few which are better than IE, all do it the same way.
 
One-column flow layout works everywhere with no effort, and is more readable than anything your precious image-happy designer will come up with.
 
Aro
Yes it's great but it does things against standards. It's annoying.
 
@EtiennedeMartel Too bad most IE users don't use IE9.
 
Aro
that too
 
Firefox sucks. Safari wasn't updated in a while. IE became good with IE9. Opera is great. Chrome is great.
 
3:22 AM
IE quirks mode is a huge WTF.
 
/*
after hours of consulting the tome of google
i have discovered that by the will of unknown forces
without the below line, IE7 believes that 6px = 12px
*/
font-size: 0px;
 
They have quirks modes to simulate quirks modes.
 
@EtiennedeMartel Like this?
 
@RMartinhoFernandes Yep. Honestly, the fun in the Web development is the backend.
 
Mmhmm.
 
3:23 AM
Once you have to start outputting HTML, then it gets messy.
 
Xeo
@RMartinhoFernandes That's from the quote thread, right?
 
@EtiennedeMartel If that fun involves talking to a database to send results back to the client, count me out.
 
Aro
As of today: It is my opinion that Firefox sucks, IE is ugh...they make it good once in a while but then it gets bad. Plus I think IE is ugly. Safari is bad. Opera is good on my phone and in low resource environments.
 
@Xeo It's from the "best comment" thread.
 
Xeo
@RMartinhoFernandes As I said.
 
3:25 AM
@RMartinhoFernandes It almost reads like a poem.
 
@Maxpm With some work, it could make a good haiku.
 
Hmm. ConceptClang sucks. It still uses the old concept + concept_map scheme. I was expecting to see the new syntax, dammit!
 
I feel bad for web designers, though. They have to deal with clients.
 
> "I don’t like the fact that you sent me a contract; it makes me feel bound to pay you."
Pure awesome.
 
3:35 AM
I love how every step is backed up by his own experience.
 
Xeo
Anyways, I'm out for today. G'night everyone.
 
See ya
So, yeah, the problem isn't Web development per se, the problem is the clients.
 
And the platforms.
 
Yeah. Like in non-Web stuff, actually.
 
OMG.
> (...) the tricky part here is that you cant use the same integer twice also, the last digit from the right needs to be divisible by 0, and so the fifth place has to be 5, (...) (from stackoverflow.com/questions/9138188/…, emphasis mine)
 
3:42 AM
I could eat the hell out of a potato.
 
What.
 
I can't stop laughing.
 
@RMartinhoFernandes This is gonna work just fine.
 
I do not perform well under pressure.
 
3:43 AM
@RMartinhoFernandes > yeah, thats why the last place has to be 0 haha..
 
I love it when I cancel a link in VS and then VS outputs something about an "internal error".
 
Xeo
Cancelling a link in VS is... dangerous. Sometimes, it's just better to let it finish.
 
> I asked a client to send me either a PDF or a picture of her website idea. She sent me a PDF, containing a picture of another PDF.
Yo dawg, I heard you like PDFs...
 
Needs a wooden table.
 
> We’re a pretty forward thinking company - with pretty tech savvy employees. As you can see, we use Mozzarella Firefox.
4
Well, that's a new one.
 
Xeo
3:57 AM
@EtiennedeMartel Mmm, mozzarella!
 
Is that a woodland creature made of cheese?
 
It's a kind of pizza.
 
Xeo
Err
Wtf?
 
No. errno.
 
Xeo
Mozzarella is an Italian Traditional Speciality Guaranteed (TSG) food product. The term is used for several kinds of Italian cheeses that are made using spinning and then cutting (hence the name, as the Italian verb mozzare means "to cut"): * Mozzarella di Bufala (buffalo mozzarella), made from domesticated water buffalo milk * mozzarella fior di latte, made from fresh pasteurized or unpasteurized cow's milk * low-moisture mozzarella, which is made from whole or part skimmed milk, and widely used in the foodservice industry * smoked mozzarella Fresh mozzarella is generally white, but m...
It's a kind of cheese. A very tasty cheese, imho.
 
3:59 AM
@Xeo "Mozzarella Firefox" is a pizza.
Obviously, it has mozzarella in it.
 
And firefox.
 
Xeo
So, I'm really off now. Really.
 
Or red panda. Or whatever it's called.
 
QTVector , is it QT vector?
 
user406009
4:08 AM
Quick question: Are templated functions "automatically" declared inline?
 
no, I need QTVector
what part of lib is that?
 
@EthanSteinberg Yes.
 
Never saw that.
 
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra. Found it.
 
user406009
Second simple question: What is the point of extern templates? Can anyone point me towards a blog or something explaining them.
 
4:11 AM
@EthanSteinberg It's simple. It's a way to let you pre-instantiate the templates in some TU.
Speeding up compilation, mostly.
In one TU you template class foo<int>; for example, and in all others you extern template it.
 
user406009
What happens if you forget to link it to a TU with that template?
 
user406009
A linker error?
 
user406009
When would extern be used?
 
Basically extern template means: "do not instantiate this template in this TU, I've done it elsewhere."
 
user406009
4:14 AM
Yeah, so what would be an example use of extern?
 
user406009
It seems like this would increase coupling as you are requiring that another TU use that template.
 
Oh, if you only need the template in one TU it's worthless.
But let's say you use vectors of chars in many TUs. You could use extern template class std::vector<char>; to avoid generating an instance per TU.
You could have one dedicated TU just with template class std::vector<char>;, and the only instantiation would happen there.
 
user406009
I see. Not quite as unique as some other C++11 features, but still useful.
 
Yeah, it's not semantic or anything. It's really just a build optimization.
It's been supported for ages in many compilers as an extension (VC2.0 had them!), so they ended up adding them to the standard.
 
quick
tell me one good spot at microsoft
I want to apply
for a work
senior .net developer?
 
Aro
4:30 AM
janitor
if you're really smart it will be like good will hunting. if you are not smart at least they have expensive toilets
 
Is there a way to specify additional #includes in a file generated by protobuf?
VC++ fucks me in the ass if I don't include stdafx.h.
 
they are offering me a job at any spot
I have no idea what spots do they have. :D
Microsoft is one of the best IT companies in the world. :D
I would like to work in building VS12c :)
 
brutal
 
Visual Studio Centurion rockz
 
@EtiennedeMartel Code generation is tweakable with plugins.
 
4:39 AM
What is coldfusion anyway?
 
Oh dear...
 
What is it anyway? :D
 
user406009
In computing, ColdFusion is the name of a commercial rapid application development platform invented by Jeremy and JJ Allaire in 1995. (The programming language used with that platform is also commonly called ColdFusion, though is more accurately known as CFML.) ColdFusion was originally designed to make it easier to connect simple HTML pages to a database, by version 2 (1996) it had become a full platform that included an IDE in addition to a "full" scripting language. , versions of ColdFusion (purchased by Adobe Systems in 2005) include advanced features for enterprise integration...
 
lol, it's CFML? :D
I didn't know that CFML was called ColdFusion
 
CFML stands for "ColdFusion Markup Language".
 
4:43 AM
Why did they call it ColdFusion anyway? It is not cold, and especially not fusion?
@EtiennedeMartel well, how many of us, the programmers, know what c++ abbr. stands for? :)
 
@DzekTrek Because it sounds cool.
I'm working on a small game engine for educational purposes, and I'm naming it Ebola.
 
I see. My language would be called Antrax then, so it can sounds scary and frightening. ;)
 
lol - nice name
 
@EtiennedeMartel lol :)
 
It rolls right off the tongue.
 
4:46 AM
@EtiennedeMartel My small game engine for educational purposes (yes, I also have one, what a coincidence ;) is called ICE. GCC gave it the name.
 
@RMartinhoFernandes Well, game engines are a good excuse to learn low level stuff.
 
@EtiennedeMartel and certianly pain in the ass. :) I have implemented one game engine two days ago, and I said to me, no more crap with this. :)
 
user406009
Trying to write a game engine right now. It is pain.
 
Everyone's doing it.
 
user406009
Just wondering, @DzekTrek what did you use for drawing?
 
4:50 AM
ideone.com/Hw8qQ just one single file out of many
What do you mean for drawing? graphics handling?
I used opengl shaders
 
user406009
Yeah Opengl is what I am using too. I see that you also chose to use shared_ptr's for the game objects.
 
user406009
Really not a fan of abusing dynamic memory(even when you have a specialized object pool) like that, but I guess its better than the alternatives.
 
There's no reason not to.
 
@EthanSteinberg yes :)
To be honest
 
@EthanSteinberg You can always specify a custom deleter.
And allocate the data managed by the shared pointer with your own allocator.
 
4:53 AM
I made that engine just for the exam, I was in a hurry
you know what's it like ...
This is one of the initializations deployed for shaders ideone.com/xlzh0
I am beginning to work a little more deeper with OpenID ? Has anyone of you used it before?
 
Fortunately, no.
 
I am an OpenID user. I never worked as a consumer nor a provider though.
 
user406009
I only heard that it sucks. But most web programming seems to suck anyways.
 
Tututu.
 
@RMartinhoFernandes :) Who didn't. I heard of it just a few weeks ago, but it got my intention for showing me sparks of the web world without usernames and password. ;)
 
5:05 AM
Is it me or does Google hates references with a passion?
 
@EthanSteinberg Well, it depends from the point of view and point of realization of some web page.
 
@EtiennedeMartel It's not you.
 
Fuck them.
I mean, I can somewhat understand avoiding the use of exceptions... but references? Really?
 
protobuf is very very annoying.
 
I find it badly documented.
 
5:07 AM
@EtiennedeMartel I believe their rationale is that with pointers you make it clear at the call site that the argument is being changed.
 
I believe that they're tools.
 
(The people, not the pointers)
 
user406009
References do have a lot of gimicks that pointers do not have.
 
user406009
And pointers have enough special cases as they are.
 
5:10 AM
They're not gimmicks, they were designed to protect you against yourself.
 
Yeah, I'm dangerous, baby.
 
Of course you are, you're a C++ programmer. You are genetically designed to shoot yourself in the foot.
(And I don't mean "you" in particular. I include myself and every other C++ programmer in that bunch.)
 
user406009
Nah, we don't shoot ourselves in the foot. We blow the whole leg off.
 
@EtiennedeMartel The word you were looking for is "we".
:P
 
Yeah. Maybe.
I don't know, I'm tired, and I'm this close to ditching protobuf.
 
5:15 AM
Yeah, but ditch it for what?
 
That's the thing.
XML or JSON are both overkill for my needs.
And I'm not sure I want to roll my own solution.
 
protobuf is super cool. If only it didn't generate ugly C++ code...
 
Yeah, I can live with it, I'm going to hide that deep in my vcproj.
 
user406009
How is JSON overkill? The whole specification is like less than one page.
 
Thing is, if only I could make the generated .cc file include stdafx.h...
 
5:17 AM
@EthanSteinberg Yeah, but he'll probably need to write all the json<->objects translation stuff himself.
 
You can write a protoc plugin to generate better C++ code, though.
@EtiennedeMartel You can disable PCH for those files.
 
@CatPlusPlus Hmm. Didn't think of that.
 
user406009
@RMartinhoFernandes Theoretically, with boost::pheonix and lots of time and a really nice optimizing template friendly compiler, template meta-programming could do it for you.
 
I opted to get rid of PCH entirely.
Too much trouble.
 
user406009
boost::spirit style type introspection.
 
5:18 AM
GCC likes to segfault under PaX when PCH is involved.
 
@CatPlusPlus With my codebase, that's not an option.
 
Not being able to initialize arrays out of initializer_lists sucks.
 
Oh, what the hell, I turn off pch for the file and it still blows up.
 
user406009
Sorry, not boost::pheonix. Boost::fusion. Really need to get some sleep.
 
5:25 AM
I feel like VC++ is trolling me.
 
5:37 AM
"There is no try-catch in C or C++" " C++ has exceptions (cplusplus.com/doc/tutorial/exceptions) they're just seldom used."
?????
 
@Pubby Oh, hey, wrong stuff on cplusplus.com. Who knew?
 
Oh, cplusplus.com didn't say that, it was just linked in the comment
 
@Pubby Where is that?
 
-1
Q: What is the right use of try...catch?

RohanI am pretty confused of how/when to use try..catch. I generally work with PHP and Java codes and I do use try catch but I often get confused. What I mean is, should I use try catch for whole piece of code or the only those part of code which are prone to throw exceptions(Like DB Queries, file par...

 
5:40 AM
@Pubby WTF is going on in those comments?
 
user406009
Well C++ exceptions are usually either abused or underused. They are "seldom used" correctly.
 
How are exceptions abused?
 
@CatPlusPlus Use them as returns.
Wow, that was a five-language-tags-question.
 
Exceptions really do get bad press.
 
5:59 AM
Fuck off, I #included the generated file in another one. Ha.
That'll teach VC++ to mess with me.
 
6:18 AM
Lol.
 
7:17 AM
Alright, I just caught up on GoingNative Day 2. Did I miss any general wisdom from this chatroom?
 
They asked my/Xeo's question!
 
@RMartinhoFernandes which question?
-6
A: What's the correct way to override == and != to handle null comparisons

Matt ShermanIt's a bit of a hack, but you might try wrapping it in a try-catch, catching the NullReferenceException specifically.

lol
 
The one about the plan for modules.
The answer was "There is no plan."
:(
 
user406009
Well the answer was more like "There are 4 plans. All of which suck."
 
"(...) 4 plans plus the ones that were born while we answered the question."
 
7:22 AM
Oh, hey, crtdbg.h breaks on MinGW.
Why am I not surprised.
And why won't you people test your damn compiler with -std=c++0x.
 
user406009
They do talk about modules throughout the talks though.
 
If the language hadn't enough annoying bits, the tools have to get in the way at every possible opportunity.
 
@EthanSteinberg Yes, it's not like they don't want them. It's just that they don't have anything solid yet.
Btw, my g++ just gained 70 rep.
 
7:45 AM
2/4.6.2/../../../../i686-pc-mingw32/bin/as.exe: CMakeFiles\goblin-camp.dir\src\Game.cpp.obj: too many sections (36141)
Assembler messages:
Fatal error: can't write CMakeFiles\goblin-camp.dir\src\Game.cpp.obj: File too big
2/4.6.2/../../../../i686-pc-mingw32/bin/as.exe: CMakeFiles\goblin-camp.dir\src\Game.cpp.obj: too many sections (36141)
Fatal error: can't close CMakeFiles\goblin-camp.dir\src\Game.cpp.obj: File too big
Ahahaha, I broke assembler.
 
"too many sections"? What?
Ow.
How the heck can you have so many sections?
 
Generated assembly file has 50MB.
 
Did you go overboard with tuples or something?
 
I didn't change anything, it's working version.
 
I'm not sure what to say.
 
7:56 AM
@RMartinhoFernandes If I run one form A from constructor of another form B, then form B becomes parent of first form A, right?
 
It did a section for every function.
 
@MrAnubis Not sure what you're talking about.
 
@RMartinhoFernandes in C#, windows form
 
Oh. Not sure.
I think you need to pass the parent explicitly as a parameter somewhere.
I'm really not the right person to ask about GUI code.
 
@RMartinhoFernandes you are all the time
 

« first day (476 days earlier)      last day (4477 days later) »