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

18:00
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.
18:07
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
18:08
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.
18:09
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.
18:10
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.
18:11
@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
18:13
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
18:15
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
18:16
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
18:16
Use spaces.
@R.MartinhoFernandes How do I support getting rid of the integer on custom classes?
@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?
18:17
@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
Ell
18:18
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
Ell
internal iteration? o.O
user142019
I prefer .each or fmap.
Ell
Ell
18:19
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
Ell
[1, 2, 3].each{|n| puts n}
18:20
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
18:21
……………………………………
@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
Ell
Write your own c++ library format instead of .dll
nobody else has such issues
18:22
@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
18:23
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?
18:25
@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...
18:29
I learned more perl! :)
We are getting too many trolls lately.
Ell
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
18:31
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
18:34
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
18:35
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~
18:36
[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 @__@
18:37
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.
18:40
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.
18:41
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
18:43
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
18:47
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...?
18:48
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
18:52
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
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
18:57
HEY GUYS
user142019
Wazzup!
19:08
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
19:15
@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
Ell
19:17
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
19:20
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.
19:21
c++ doesn't work well?
*unit
i'm new to software engineering
Ell
Ell
does anyone know of davide leibe hart, or james quall?
user142019
@nicolagenesin everyone is.
Ell
Ell
@Abyx but it just has tables and prototypes and shiz
user142019
@Ell yes: you.
@nicolagenesin avoid new
19:24
@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?
19:26
"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
19:31
@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 :)
user142019
19:32
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
19:35
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.
19:36
@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!
19:40
@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.
19:42
Tortoise* are great tools
Definitely on my list of great windows-only apps
user142019
The only great Windows-only application is regedit.exe.
Ell
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.
19:43
@nicolagenesin Fructose; I like the name
user142019
@nicolagenesin Catch or QuickCheck.
@Zoidberg already bookmarked ;)
oh wait
@MooingDuck Hey!
user142019
I'll wait.
19:52
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
19:54
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
19:56
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
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 (4326 days later) »