« first day (848 days earlier)      last day (4098 days later) » 

6:00 PM
You know that *(new A()) kills a kitten, right? — FredOverflow 15 secs ago
 
And CatPlusPlus never got out of bed on this day. =[
 
Fuck, these loops are getting too complicated.
 
hmm
A &a = *new A;
boost::shared_ptr<A> p(&a);

is ideomatic C++
 
That won't clean itself up though, will it?
 
of course it will
@JohannesSchaub-litb No, it's compilable C++, I wouldn't call it idiomatic.
 
6:07 PM
Neither did he.
 
heh
I suppose he called ideomatic instead
 
you avoid both a raw pointer and use a smart pointer
 
@JohannesSchaub-litb That seems silly.
 
and can use the dot operator to access the members
 
Though I actually have a case where that might be useful.
 
user142019
6:08 PM
I don't see the point.
 
user142019
It's confusing.
 
No, you don't have a use case.
 
user142019
Just use -> and std::make_shared.
 
@R.MartinhoFernandes I do, though.
 
6:09 PM
lol, what did I do
 
user142019
Write bad C++ code.
 
no, unfortunately I don't write ideomatic C++
 
not surprised you'd recognize it so quickly :P
 
I do!
Look, I'll write it down right now.
 
user142019
Writing C++ code that isn't bad is impossible, though.
 
6:10 PM
I have a Rule of Zero pointer to my thing until I release it to the classes' holder.
In that case I could probably use a reference and have some ease of access.
 
every code serves its purpose. some code serves to increase the troll factor
 
user142019
I should complete a project.
7
 
epic fail.
 
I don't see any *new.
 
@R.MartinhoFernandes Well I mean, I could change it to that.
 
6:11 PM
@ThePhD That doesn't make it a use case.
I could change a lot of code into silly, pointless, obfuscated crap, but that doesn't matter.
 
the good thing is that it allows to have a null reference
 
user142019
Null references don't exist.
 
A &a = *new (nothrow) A[INT_MAX];
yes, they do
 
user142019
How.
 
user142019
6:13 PM
Also even if they do that's not a "good thing".
 
@DeadMG What if Add throws?
 
@R.MartinhoFernandes Yeah, just observed that the original was actually a smart pointer.
 
@Zoidberg They don't. Just ignore Johannes, he's just trolling.
 
no i am not trolling by all seriousness
 
user142019
let it be a troll
 
6:15 PM
By All That Is Serious In The World ....
 
what?
 
@DeadMG But +1 on no integer-based loops.
 
I don't think I can not-integer-based loop in that case.
 
@R.MartinhoFernandes Fixed the outer, not the inner.
also
FUCK TABS.
 
the std::vector is not visible to the outside.
I don't think anyways
 
6:16 PM
that comment was perfectly aligned in the entry text box
 
<3333333333333 TABBSSS
 
then is misaligned when rendering.
 
Shoulda used tabs, BRO. <3
 
user142019
Fuck tabs.
 
@ThePhD Doesn't matter. The point of iterators is exactly that of decoupling the containers.
 
user142019
6:16 PM
Use spaces.
 
@R.MartinhoFernandes How do I support getting rid of the integer on custom classes?
 
stab the tabs
 
@ThePhD Hint: std::vector is a custom class just like yours.
 
Do I just need begin() and end() or cend() and cbegin() on my class for range-loops to work?
 
6:17 PM
@R.MartinhoFernandes no, std::vector is a builtin Standard class template . it may have special intrinsic performance advantages
 
@ThePhD Just begin() and end().
 
Hokay.
 
Are begin() and cbegin() guaranteed to be of the same type for sets and maps?
 
user142019
Dude…
 
@FredOverflow They are now.
I think
 
Ell
6:18 PM
Damn I forgot why iterators are good again :p
 
@Ell They aren't; internal iteration is the next big thing now.
 
@JohannesSchaub-litb * new (nothrow) A[INT_MAX]; does one of two things: either allocates a giant gob of memory (in which case you'll end up with a valid, non-null reference) or else it dereferences a null pointer (in which case you end up with UB, not a null reference).
 
i.e., ranges.
 
Ell
internal iteration? o.O
 
user142019
I prefer .each or fmap.
 
Ell
6:19 PM
like... ruby >:D
 
That's silly.
 
@Ell You tell a data structure to do something for each element.
 
Not composable.
(And CPS-y)
 
Aww man
 
Ell
[1, 2, 3].each{|n| puts n}
 
6:20 PM
I'd have to add begin and end to all my structures...
 
@Ell Yeah, something like that.
 
That's so much wooork. Integers are already tehre and niiice.
Also I think I need to write a special move_vector ...
 
Because when exporting from DLLs I can't layer two things with special traits like std::vector<std::unique_ptr<>>
 
user142019
6:21 PM
……………………………………
 
@ThePhD Why?
man
 
@R.MartinhoFernandes Don't get angry with me it's the dll exports' fault! ;~;
 
I don't know what you've done to your DLL exporting, but it is fucked up
 
Ell
Write your own c++ library format instead of .dll
 
nobody else has such issues
 
6:22 PM
@Ell hehe, don't give him any ideas.
 
@DeadMG I have to export whole classes because in many cases I need the const static STUFF Mystuff.
@R.MartinhoFernandes Oh cmon guys, I'm not THAT insane.
 
@ThePhD Right... but you don't need to export static data members.
 
user142019
INSANE??!
 
if they are not odr-used constexprs, you don't need to define them anywhere, and if they are, then you can just define them in the DLL and merely declare them and link to the DLL's definition in the user.
 
user142019
6:23 PM
Stupid startroll GTFO.
 
... o_O;
Stars, stars everywhere.
@DeadMG I couldn't access Vector2::Zero or Vector2::One when we used that export technique we talked about before for just functions.
 
define "couldn't access".
 
Linker errors.
But maybe I didn't export const fields right?
 
yeah, you probably didn't export the definition from the DLL.
 
Why aren't the const fields in the header?
 
6:25 PM
@R.MartinhoFernandes They are.
 
Then why do they need exporting?
 
Should... const fields not be in header fields?
 
because the definition is in a DLL and the user is in a program linking to that DLL.
@ThePhD Nothing wrong with that.
 
butts
 
Argh, I can't go backwards to the commit that shows all the errors I have because I nuked it because it broke everyting.
I'll just have to create a minimal example, compile it, and then apply it everywhere once I figure out how to make the export-functions-only technique work...
 
6:29 PM
I learned more perl! :)
 
We are getting too many trolls lately.
 
Ell
Yeah
we need some internet pesticide
 
Any idea what's causing them?
 
I think we're too nice
 
Jealousy sucks. You people enjoy deleting my answer, amirite? — H2CO3 8 mins ago
lol
 
6:31 PM
why don't you make public the names of the starrers?
 
i think you accidentally a word
 
@LuchianGrigore lol
 
That sentence still makes no sense to me
 
NVM my friend!
 
hi all,first time here
 
6:34 PM
Feb 6 at 8:31, by thecoshman
New here? Do us a favour, and read this.
Also, welcome!
 
@ThePhD y so aggressive :P
 
@nicolagenesin asl?
 
What, I put it up and then opened my arms for a hug and said Welcome!.
That's about as friendly as it gets.
 
You could've stroked his leg
 
6:35 PM
Nothing screams friendly like a stranger stroking your leg.
 
*leg*
dammit
 
s/friendly/surprise sex
 
i am 23 m italy
 
:)) lol I can't believe you answered that
 
@nicolagenesin Oh la la~
 
6:36 PM
[Finished: 'official' 1 test case failed (6 of 36754 assertions failed)]
 
this isn't mIRC dude :))
 
Almost there.
 
Holy cripes.
36754 assertions.
 
@ThePhD I am not running the whole test suite.
 
Holy Cripes @__@
 
6:37 PM
Hi guys :)
 
way to ruin the mood...
 
does somebody know some good software for dynamic analysis for C++?Duma?Valgrid?
 
@ThePhD This thing takes forever to run :(
 
@R.MartinhoFernandes Multithread execution over test-running-slave computers.
 
Meh, I don't run the whole thing often enough.
 
6:40 PM
I'm wondering if there exists a study on the repartition of the different versions of c or c++ used in today's software
 
Aww.
Well, if you ever do,
 
There is little enough coupling that I can run just the tests for one part of the library at a time.
 
call it the UnicodeCore.
 
kind of like tiobe but for intra-versions of a language
 
When I change normalization stuff, I am pretty sure I won't break any segmentation code and vice-versa.
@Teybeo TIOBE is not have use in software, but Google hits.
 
6:41 PM
And put a picture of a hebrew-accented emblazoned dragon in pitched combat with a shiny high-durability plastic robot wielding a whip made of omalauts!
 
[Testing completed. 2 of 33 test cases failed (7 of 45627 assertions failed)]
^ That's the full thing.
 
@R.MartinhoFernandes yeah i know, it was just for an example :)
 
I don't have any tests.
3
 
@LucDanton Hey, what is your persona in the chat, per se?
 
ITT DeadMG sucks.
3
 
6:43 PM
My tests are builtin.
I either throw, assert, or crash on error.
Mostly throw, because it violently gets my attention.
 
Not the same thing.
 
my colleague always does "return -1;" on error
i so hate it
 
@R.MartinhoFernandes Well I'm not writing a normalization library: my stuff depends on a lot of runtime factors that can't be duplicated into test suites, so instant-throw is the best I can do.
 
When I run my test suite, I can be sure all of those 45627 expected behaviours are still correct. I don't need to manually hit them.
@ThePhD Can't you like, implement your own IDevice interface for testing?
 
... Uh.
What? x3
 
6:47 PM
When I looked at D3D I saw that as a neat advantage over OpenGL (there is nothing you can mock there!).
 
OOH
The software drivers and WARP drivers and debug drivers
 
I mean, isn't most of the interaction done through some abstract ID3DDevice thingy?
 
Well yeah, it is.
And those are the places I throw.
 
Just make your own class FakeDevice : public ID3DDevice and use it for tests.
 
... What would I test, though...?
 
6:48 PM
With enough engineering, it can be made reusable.
 
DepthStencilState?
RasterizerState?
 
@ThePhD Dunno. What do you want to test?
 
Uh. If anything, I'd want to test if Models load properly, if images load properly, if I can handle different file types, etc. etc.
 
Doesn't sound like anything that can't be automated.
The only difficulties are really interactions with systems like D3D.
 
Yeah... I guess I'd have to like
 
6:52 PM
Everything else can be isolated. Unless you have singletons.
 
@R.MartinhoFernandes You would have to implement the entire direct3D API to verify that the results are actually intended.
 
take a picture of the backbuffer
and then compare
"Are these pixels where they are supposed to be?"
But really, that's a lot of work for something my eyes can do manually.
 
You are missing the point. Your eyes cannot do that for 3000 scenarios in ten seconds. But even if we ignore the rendering bits, there is a lot of stuff that needs no renderer around for testing.
 
Ell
It's not that much effort
I don't think
 
@R.MartinhoFernandes Well yeah, for like a physics engine and stuff.
But right now I'm just making sure this renderer is amazing and also writing a basic rendering algorithm for my shader.
Plastic Shaders, go!
 
user142019
6:57 PM
HEY GUYS
 
user142019
Wazzup!
 
7:08 PM
if I'm writing a new language, is it a good idea to parse f[x], f.x, f(args-tuple) as binary expressions? (parse to BinaryExpression AST node)
 
You're making one too?
 
@R.MartinhoFernandes sorta
 
@Abyx I wouldn't do it for . since it doesn't really take expressions on both sides.
Unless it does.
 
@R.MartinhoFernandes well, f[x] could be (expression1)[expression2], and f.x is a syntactic sugar for f["x"], so yes, they have expressions on both sides
 
user142019
JavaScript II
 
7:15 PM
@Abyx Oh, I thought f.x was like C++ (i.e. expression DOT identifier)
 
Alright, I seriously need to buckle down on input.
TIME TO DESIGN A GOOD FRAMEWORK.
 
user142019
@R.MartinhoFernandes not necessarily.
 
user142019
expression . template identifier < template-params > :P
 
@R.MartinhoFernandes if C++ had reflection, we could use string literals to access members
 
Ell
7:17 PM
Someone should write objective-lua
 
lua sucks.
 
user142019
There is Objective-J.
 
user142019
Which is a superset of JavaScript. xD
 
@Abyx Objective-C too. Sounds like a good fit.
 
lol
also lua already has objects
 
7:20 PM
does someone of you use C++Unit?
 
user142019
I only use Catch when testing C or C++ code.
 
user142019
It's simple and works well.
 
user142019
And I like simple things that work well.
 
@Zoidberg It's a bit quirky on the assertions sometimes.
 
7:21 PM
c++ doesn't work well?
*unit
i'm new to software engineering
 
Ell
does anyone know of davide leibe hart, or james quall?
 
user142019
@nicolagenesin everyone is.
 
Ell
@Abyx but it just has tables and prototypes and shiz
 
user142019
@Ell yes: you.
 
@nicolagenesin avoid new
 
7:24 PM
@StackedCrooked why?
 
user142019
@nicolagenesin because fuck new.
 
@Zoidberg thank you.Do you know some good stuff for static and dynamic analysis?
hahahah love this chat
 
@nicolagenesin Nice avatar btw.
 
user142019
clang has a static analyser but C++ support is bad (at least, it was the last time I used it).
 
user142019
I don't know what you mean by dynamic analysis, but maybe something like Valgrind?
 
7:26 PM
"WTF, I change whatever and the test still passes?" was running the wrong test
 
a lot of people told me to use cppcheck within Jenkins for static analysis
I have to do an university project,we are seven people.We have to find a software for dynamic analysis.But we don't even know what it is
sry,i ve written in 1microsec
 
user142019
Ask the professor or look it up by Googling it.
 
I'm going to sleep. Good night!
 
user142019
Goodbye.
 
The professor hasn't a mouth,and we don't understand what dynamic analysis is
night Martinho
 
7:31 PM
@R.MartinhoFernandes I forgot to thank you. If you weren't mentioning ligatures here, I wouldn't ace my graphics exam. Now I have A :)
 
There was a question "what's a ligature?"
 
@nicolagenesin I recommend catch for unit testing in C++.
 
And I remembered it solely from here :)
 
Wow, cool.
 
user142019
7:32 PM
QuickCheck is awesome.
 
@FredOverflow bookmarked.And some good stuff for system testing?
 
user142019
But it doesn't work well with impure functions. :)
 
the easier is,and better is for us
we are new to this
~new
 
How much experience do you have with C++?
 
@Zoidberg You know, it's like you discovered what "pure" means a few days ago and now you try to shoe horn it into every discussion.
 
user142019
7:35 PM
QuickCheck is teh eazy.
 
@FredOverflow 3 years,university formation
 
user142019
C++ or C with Classes?
 
@nicolagenesin We use that at work. It's good.
 
user142019
Cool.
 
7:36 PM
@EtiennedeMartel I'm pretty sure he has known what "pure" means for a very long time :)
 
@EtiennedeMartel classic lobster
 
user142019
 
user142019
lol
 
lol you have fans?
 
user142019
It's a trap crab!
 
7:40 PM
@nicolagenesin Translated: "none" :-)
 
@JerryCoffin what?I don't understand
catch is marked as developer preview,we can't use it.Must be stable
 
@nicolagenesin Move along. Nothing to understand here.
3
 
fuck
I love TortoiseHg
 
user142019
I don't.
 
user142019
CLI pwnz.
 
7:42 PM
Tortoise* are great tools
Definitely on my list of great windows-only apps
 
user142019
The only great Windows-only application is regedit.exe.
 
Ell
what about the many games?
 
@Ell apps
app = software \ { game, maybe-more }
 
If you have to choose between CppUnit, Aeryn, Cute, Fructose, Google Test?
 
user142019
Yes I'd totally call an NTP daemon an app.
 
7:43 PM
@nicolagenesin Fructose; I like the name
 
user142019
@nicolagenesin Catch or QuickCheck.
 
@Zoidberg already bookmarked ;)
oh wait
 
@MooingDuck Hey!
 
user142019
I'll wait.
 
7:52 PM
I am using GitHub repository for my project.The GUI I am utilizing is SmartGit and I would have a script that,before committing and pull it on the remote rep,verify with aspell if its orthograpically correct.By now I have to do every time

aspell --mode=tex --lang=it check Namefile.tex
Is there a way to automatize this?
 
user142019
@BartekBanachewicz You can bump a post by editing it.
 
user142019
@nicolagenesin set a hook.
 
user142019
If the command fails (i.e. doesn't return 0) then the action (commit, push, whatever you want) will fail.
 
i love you
 
user142019
7:54 PM
I love myself too.
 
my english isn't good,so its hard to search solutions to my problems
 
user142019
Where are you from?
 
The solution is improving your English.
 
@Zoidberg Lol. I am now going to keep it on the front page until I have it answered
 
@Zoidberg italy
 
7:56 PM
0
Q: Incomplete types questions

user1861174I have read Containers of incomplete types. I did not know previously, that one can safely define incomplete types in C++, and, when I search SO, I found mostly questions about some error, a incomplete type caused. Now I would like to know exactly: What are incomplete types in C++ and how are ...

 
@StackedCrooked doing it
 
Great!
 
LOL
> Please repost properly, so that we can close each question as a duplicate individually
that one was nice :)
 

« first day (848 days earlier)      last day (4098 days later) »