« first day (878 days earlier)      last day (4298 days later) » 

06:06
@Mysticial Yup -- for general purpose use, it gets bad pretty quickly. OTOH, you can fit code to read/write/update FAT in something like hundreds of bytes, where (for example) NTFS uses somewhere in the vicinity of 1-2 megabytes of code, so for small embedded systems (for one obvious example) it's pretty much out of the question.
Is default FAT FAT16?
Since there's an option for FAT32 I assume it's FAT16..
06:20
0
Q: Will this specific example produce memory leaks?

Lemmonsclass A // blah blah generic abstracty whatever { public: A(); ~A(); }; class B { public: B(); ~B(); private: A* a[8]; }; B::B() { for(int x = 0; x < 8; x++) { a[x] = new A; } } B::~B() { for(int x = 0; x < 8; x++) { delete a[x]; } } I'm just curiou...

Moral of the question: just use RAII all the way.
or use noexcept
I don't get how that doesn't follow RAII though? Enlighten?
user1357851
If someone has been breeding maggots on chicken waste, then feed the maggots to chickens, will there be any potential bio-hazard (like virus/bacteria from the chicken waste can live in maggots and get passed on to the chicken)?
@Rapptz You would use an array of smart pointers, not raw pointers, if you were using RAII throughout the whole thing.
@Insilico So if you had to make it exception-safe with new you'd basically need to catch the exception locally and clean it up before it automatically rethrows at constructor exit right?
Maybe I'm a bit off on the automatic exception re-throw for constructors. But I've heard of it from somewhere.
@Mysticial You can certainly do that.
IIRC lots of std::vector implementations do precisely just that to implement exception safety.
06:26
It's funny how I completely avoid this problem in my pi-program by not letting anything own its own memory.
GC ftw.
http://stackoverflow.com/a/262984/180581
Guys, how does the compiler know it can avoid dynamic dispatch to static_cast<your_type *>(this)->foo()? Couldn't another type itself derive from your_type? What's special about CRTP that allows this optimization to happen?
@Mysticial Lots of these sort of problems can be avoided by using non-stupid ownership patterns
@n2liquid There is no dynamic dispatch because you're not calling virtual functions (assuming foo() is not a virtual function).
Not because CRTP does anything special with the compiler in particular
@Insilico Oh, right; so if it's virtual, it's all wasted
Thanks
Wouldn't using noexcept mean it won't throw?
06:29
@n2liquid Not necessarily. It depends on how good the optimizer is and if it can prove that the actual type will in fact be your_type.
@Rapptz Do you mean std::nothrow?
noexcept means it will call std::terminate or something stupid
@n2liquid But yeah the point of CRTP is so you don't have to make the functions virtual if static polymorphism is all you need.
@Pubby Yeah sorry
@Rapptz Well nothrow only prevents out of memory exception, not constructor exception AFAIK.
06:32
@Rapptz No, that's fine
There's no throwing happenign there.
It would just allocate a NULL if it fails right?
So the constructor and destructor will be called.
@Mysticial It would return a NULL on failure I think.
Yeah, that's what I meant.
So it would also destruct properly. But it'll crash if you try to use in the middle.
06:34
@Mysticial Yup.
deleting a null pointer is fine isn't it?
delete checks by default?
@Rapptz Yes. The C++ standard requires that.
@Rapptz This is what I meant ideone.com/MRbTLa
a and b leak
also applies to free()
That's unfortunate.
Moral of the story: never throw in your constructors.
06:37
I've never thrown from my constructors..
Throwing in constructors is a good thing though
I've done it before.
Moral of the story: don't use non-raii objects and expect exception safety
@ThePhD No, the moral of the story is to use RAII at all levels.
@Insilico This seems to imply that it makes it null
So yeah.
06:41
@ThePhD You must throw in your constructors if something goes wrong or you'll get a half-constructed object.
Which is not desirable.
Hm.
Lol
1000 PNG sprites in HTML5 canvas.
Renders in 7 ms flat.
Moral of the story: batching is sexy.
06:56
7 ms sharp on my comp.
2000 averages 13 ms.
Which is decent but not ultra good.
07:08
0
Q: API NEEDED FOR EXTRACTING EMAILS FROM SERVER

KUMAIL RAZAI am creating Spam filter for rich content emails(TEXT AND IMAGES BOTH) , I need to extract all emails html from any server so that i can use it as my dataset through which API i can do this ?

^^ GIMME TEH CODEZ!!!!
user1357851
lolkitty's time (aka the hour before the bulk of ppl here wake up) ...
user1357851
3
Q: C++ const correctness with string literals

FelicsAccording to the C++ standard a string literal type is array of const char auto constStr = "aaa"; char* nonConstStr = constStr; //Error here, cannot convert from 'const char *' to 'char *' char* stillNonConstStr = "aaa"; //Why I don't have error here? Can you please explain me why on the 3rd l...

dupe
Are you sure?
Looks like a C++11 change.
yes
C++11 just made char* illformed
wow there are a lot of similar questions
7
Q: Are string literals const?

peoroBoth GCC and Clang do not complain if I assign a string literal to a char*, even when using lots of pedantic options (-Wall -W -pedantic -std=c99): char *foo = "bar"; while they (of course) do complain if I assign a const char* to a char*. Does this mean that string literals are considered to...

Also TIL C had const in C89
user1182183
07:33
1
A: Install gcc 4.7 on CentOS

ck_Tru Huynh of centos.org has built the redhat developer toolset 1.1, for centos and it contains gcc 4.7.2 So you could simply use his repo and install just gcc, instantly. cd /etc/yum.repos.d wget http://people.centos.org/tru/devtools/devtools.repo yum --enablerepo=testing-devtools-6 install de...

user1182183
And I thought It would be easy to get GCC 4.7, yet errors prevent from everything -.-'
07:52
mawning
@Telkitty I think you have some serious problems with yourself
Morning
user1357851
@BartekBanachewicz did I make you allergic to cute kitties?
good morning :-)
@sehe What a dick :/ keep on posting!
user1357851
Would love to greet people with good mornings, but it is actually dinner time here. Hungry people = angry people & I still have not had my dinner yet
08:01
just had breakfast =) it's 9am here
Seems that #4 submission was faster
That would be prolly the tests :/
I bet these fuckers cheated with C implementation
WHAT the hell C version is threaded :/
@GamErix Thats the role of errors
Also, uh, preallocation is a bit off, if there are 25M elements
user142019
Ohai.
08:25
@BartekBanachewicz How is using C cheating?
@Mysticial I meant they could profile for real tests
It's like winning a gunfight with a sword and calling it cheating.
But C's fast enough to be the gun in this situation
@BartekBanachewicz What, you can't do that in C++?
Xeo
Xeo
@Mysticial Ahaahahaha
Sorry, completely out of context, but if only you knew. :)
08:27
@Mysticial Tests aren't public.
Xeo
Xeo
Also, mornin
@BartekBanachewicz What can C do that C++ can't?
I think we are off the point here
Yeah, I think so too.
C++ is superior, that's obvious for anyone intelligent
I was just referring to this particular benchmark page
08:28
@Xeo Morniiiin!
So if someone beats you with an inferior language, you should feel bad.
You didn't spend a lot of time sleeping.
Like... 5 hours by my count.
Xeo
Xeo
Yeah, at most
Gotta get to work, though :P
Work is for scrubs.
Nah, I was just accusing the C implementers of having knowledge C++ guys don't have. After all ripping C impl. and putting into C++ would be lame
C implementation is fucking unreadable
Xeo
Xeo
08:30
Aaaaand it seems like we got us a nice amount of snow here.
:|
So you'll stay home? :D
@BartekBanachewicz So you're saying that C is awesome and C++ isn't.
:P
Xeo
Xeo
lol, no
08:30
teheheheee
Xeo
Xeo
Btw @Mysticial, got was I was getting at with my laugh wrt "winning a gunfight with a sword"? :)
~performance~ :p
I am going to take a shower. Cya latehz.
same
3:30 here
Showers are for scrubs.
morning all
08:31
Real men jump into lakes with a tub of soap.
@ThePhD aye, you do need to scrub yourself in the shower
user142019
evening
morning
Also
HOOOOOOTSSS!!!
damn where the hell is my key I have been waiting 17 seconds allready
08:43
@sbi but do you not think that the younger ones at least are best of knowing it's better to not talk to strangers at all. Yes they need to start learning how to judge who they can talk to, but isn't that the benefit of 'but tell us if they talk to you' as you can then explain to you child how this situation is different. I do think though, you mainland Europe folk seem to have avoided this fear of strangers that swept rationality away from English, Irish and Americans.
@BartekBanachewicz giving your GF's jubblies a squeeze?
@TonyTheLion you spelled it right wrong
Pointers ... you pass objects around by reference to memory rather than copying objects — Sayse 2 mins ago
ehhhhhh
meh
noobs
user142019
@CatPlusPlus MacVim is free, noob.
@Xeo here, too. about 20cm. But sun is shining..
user142019
08:46
And TextMate too, by the way.
@Zoidberg it's not free when you include the donation to Uganda.
user142019
@Pubby You are not required to do that.
user142019
You have freedom.
You aren't require to pay for other text editors either
user142019
But that would be ~~illegal~~ or ~~bad~~, according to some.
08:49
And letting poor african children starve isn't?
user142019
That's not illegal.
Can somebody explain me what the mid-child in a ternary-tree is for?
user142019
Well, it's a ternary tree so a node has three child nodes, and coincidentally you have a middle when there are three entities.
user142019
(Seriously what kind of ternary tree.)
user142019
This is like asking what the left child node of a binary tree would be for.
user142019
08:51
Who knows, depends on the kind of binary tree.
A search tree
¬_¬ stupid questions be stupid
user142019
@thecoshman No shit Sherlock.
ah... why did I wait so long to do that
I accidentally put my birth year as 1998 on Steam and now it thinks I'm 14 forever.
:(
08:55
@TonyTheLion what you up to around Easter time? I'm heading over again
user142019
@bamboon mid is equal.
@Rapptz don't be silly, Steam knows your age is transient. Your birthday however is set in stone :D
@thecoshman when is Easter?
user142019
@Rapptz your typing skills show you're 4.
This would be quite impressive typing for a four year old.
user142019
08:57
@TonyTheLion April 8.
user142019
According to Wikipedia®, The Free Encyclopedia™.
@TonyTheLion AFAIK the last weekend this month... for a more sensible time frame, I am off work 28th to 5th, so will be in England within that time frame
the 28th being a Thursday if it helps
@Zoidberg actually Easter date is not fixed, and this year it's 31 March
user142019
@TonyTheLion oh right.
user142019
Wikipedia says 2012.
user142019
08:59
And I still have to get used to the fact that it is not 2012 but 2013.
@thecoshman ah ok, well I'm around at that time, so you're welcome to pop by
@Zoidberg ok thanks, that makes sense but I then somehow don't get the first example here en.wikipedia.org/wiki/Ternary_search_tree
@TonyTheLion bet it would freak you out if I just turned up at your office and pounced on your :P
but let me know in advance because I'm leaving on holiday on the 6th
@TonyTheLion oh, where you going?
09:00
still an option, and the easiest! — arash kordi 21 secs ago
noobs
@thecoshman USA
@TonyTheLion oooh, sorry to hear it
Hi everyone. I have a question in mind
user142019
> Tony y u suck at formatting.
user142019
Y U NO INDENT
@MostafaShahverdy Stack Overflow
09:05
int x()[2];   // Pop quiz: What is this?
@thecoshman Oh :D that is kind of discussion :)
user142019
@FredOverflow the worst syntax ever.
user142019
@FredOverflow A semantical error.
@Zoidberg Yout get 25% of the points :)
@Zoidberg Both of which...? Correct!
I know that C++ is good for performance, but I haven't tried building any big projects with it
how should I start that
?
09:06
¬_¬ what do you mean
@MostafaShahverdy Exactly like you would build any big project. Just use C++ instead of another language.
user142019
@MostafaShahverdy by ditching it and using Haskell instead.
But there are some frameworks witch makes things easy in php for example
user142019
lol PHP
you will need to something to actually make, a repository to store your code, a build system. etc.
user142019
09:07
@MostafaShahverdy What do you want to create?
@MostafaShahverdy yeah, but PHP is a flawed language. C++ can stand up on it's own
user142019
You cannot just have some generic framework without a goal.
consider I want making a big web based CMS
@Zoidberg by christmas, you'll be used to it ;)
@MostafaShahverdy then you should probably use a more appropriate language
user142019
09:08
@MostafaShahverdy In C++. ಠ_ಠ
C++ can fit this
user142019
I'd just write my own web server for that and use libpq for the database or something.
@thecoshman lol
it can yes... but to a man with a hammer, everything looks like a nail
@MostafaShahverdy Also, "C++ is good for performance" is an over-generalized, potentially misleading statement. C++ is not magically faster than other languages; you have to invest a lot of time learning the language and then applying that knowledge to turn the appropriate knobs to 11.
09:09
Apache can handle that @Zoidberg
user142019
No, Apache cannot handle anything.
user142019
Apache is the worst web server ever.
@Zoidberg calm down, you are starting to spew crap again.
@Zoidberg So what is better than that ?
user142019
Nginx, for example.
user142019
09:10
@thecoshman no, it's true. :P
Anyway, webserver or web CMS is not my problem, I need a framework
are there any good one available ?
@Zoidberg only better when dealing with high load. for small sites, they perform equally well. Besides, there is a reason why Apache dominates
driving test today, please shoot me
user142019
But I hope you're not using CGI, because then even PHP would be faster. :)
@Zoidberg youre right :D
user142019
09:11
@thecoshman because the PHP tutorials say install Apache!
@TonyTheLion I am currently unarmed.
@Zoidberg because the only other option, for a long time, was MS's fuck stain, because no one else could make something worth considering.
Still, Nginx is probably a smarter choice, future proof and what not
@DeadMG meh. You could have saved me my misery
user142019
@MostafaShahverdy there is Wt but I'm not sure it's good.
@FredOverflow, You're right, I don't say that C++ magics, but at least I know that it acts better than PHP in performance
user142019
09:13
Also.
user142019
epoll + HTTP parser + libpq + router = web framework
@Zoidberg this I have seen, But I don't think to be good
Forget web application
that was jsut a sample
user142019
What the hell.
There are a lot of big projects using C++ out there
desktop applications
user142019
There is no such thing as a framework that's good for everything.
Xeo
Xeo
09:15
Hm. Guys, seems I need a better example for a (partially) restricted overload set for the blog post. The fizz buzz example is drawing too much attention and distracting from the actual goal / content, it seems. :| /cc @R.MartinhoFernandes @LucDanton
Hmmm, there is no need to fit everythings, Just something that each on you has used before, and tested for some special purposes ..
@MostafaShahverdy I have never used a C++ framework, I have never needed to. I have used libraries though, that provide functionality for me. What exactly are you looking for? something to hold your hand and make you work in a set rigid way that may not actually solve your problem? or just some of the work done for you, say talking to a DB?
@Xeo oh on Reddit?
@TonyTheLion he did a guest blog on robots blog
If there was a PHP programmer here, he would understand me better. There are a lot of frameworks in PHP witch cover MVC, So programming would be really faster.
Xeo
Xeo
09:20
@thecoshman And it was reddited :)
framework is not a library, It is a manner of coding making
Xeo
Xeo
@TonyTheLion Yeah, STL seems to get kinda hung up on it. :(
there are libraries in framework
have look at this: yiiframework.com
¬_¬ frankly, I don't give a damn
Frameworks are hand holing, trying to make a language usable. You should not be looking to frameworks as your only way of working. Think what exactly it is you wish to do, dare I say 'a bit of design'
@Xeo yea I just read his comments, he seems to think you're abusing SFINAE
Xeo
Xeo
09:23
@TonyTheLion Aye, it wasn't my intent for the (silly) fizzbuzz example to draw so much attention.
@thecoshman do you ever?
@TonyTheLion about PHP? hell no!
@Xeo did count on the ability for the internet to be stupid, did you?
@thecoshman lol
@thecoshman this is STL (the guy from Channel 9), this is not the Internet
@TonyTheLion linky?
@TonyTheLion STL is being an idiot?
09:26
@thecoshman You're right for a bit of design , but I when you want to be fast using framework is nesecary .....
Xeo
Xeo
@thecoshman No, just getting hung up on the wrong parts of the post. :)
user142019
@Zoidberg sometimes you just want something that works, and no more ...
@Zoidberg hey! don't steal my video!
@Xeo he should be able to comprehend you explaing that though
user142019
09:28
@MostafaShahverdy well, write that.
I want to be fast with C++ now :D what do you suggest ? :D
user142019
Learning C++.
@MostafaShahverdy frameworks get in the way more the they help
@Zoidberg This is not my answer, you mean anyone who knows C++ well, can make software fast?
@MostafaShahverdy yes. If you know C++ you can write complex things with relative ease
09:30
Sure, you just have to learn the language. Which takes 1-10 years.
@thecoshman are there any for C++ at all ????
Any what?
Any developing frameworks
@FredOverflow you know, any
Any any
WTF is a developing framework?
09:31
you ask for a framework one more time, and you are on the naughty list!
Qt is a framework. Just learn Qt and shut up.
2
@MostafaShahverdy C++ is not for creating silly web apps
@FredOverflow lol
@TonyTheLion many webapps are created with C++ by google each day
user142019
@FredOverflow it's a framework that develops!
user142019
09:33
@MostafaShahverdy lolwat.
user142019
Google Web Search is written in C++ because of performance reasons. And they didn't use a framework.
user142019
For 99.999999999999999999999999999999999999999999999999% of web sites it's overkill.
user142019
Google does most things in Java and Python, IIRC.
Thats what I said before and all of you ignored me!
09:34
@Zoidberg smart science people will say that's all of them :)
user142019
@thecoshman not enough ellipsis.
@MostafaShahverdy maybe they ignored you because you're asking annoying questions. We're here to chat, not to answer questions, that's what Stack Overflow is for.
Where are the 0.0000000000000000000000000000000000000000000000001 % ? URL please...
user142019
@MartinJames google.com
Ok, sorry ;)
have fun everyone
09:42
and then it went silent...
a grateful silence
@Rapptz What the FUCK have I just watched.
Ugh
He's posted that shitty yiiframework link at least 4 times
@AndreiTita a funny video
Time to sleep
Sleep is for the weak.
user1357851
09:50
yeah I rather being weak than being an idoit
user142019
@ThePhD Bring Me the Horizon. ._.
Wot? I wake up, log on and the Lounge is discussing PHP web frameworks?
user142019
PHP: terrible.
Web: terrible.
Framework: terrible.
@MartinJames you're still dreaming...
Oh, wait. I should read it all...
Oh - it's some PHP troll. It's not Cicada puppet again, is it?
user142019
09:53
@MartinJames waste of time.
@Zoidberg OK, I'll go with that. I'll go make coffee and do washing up instead.
@Zoidberg ...
user142019
@thecoshman …
Maaan
first missions were great
(shut up, I don't have an ellipses key, and fuck finding the actually one)
09:56
and graphics is even better
………
i mean, clothings
Dotdotdotdotdotdotdotdot
DamageOverTime
and the lights!
user142019
@thecoshman I just sent you one for you to copy and paste.
09:58
C
B
A
0
A: What is a smart pointer and when should I use one?

SaqlainIn simple words a Smart Pointer is a C++ object that acts like a pointer, but additionally provides control on Construction and destruction, Copying and assignment and Dereferencing. One can implement its own smart pointer but many libraries also provide smart pointer implementations with differ...

^^ Late answer to big question. Can we get someone to evaluate it?
user142019
It tells the truth.

« first day (878 days earlier)      last day (4298 days later) »