« first day (443 days earlier)      last day (4487 days later) » 

11:00 PM
@refp Even if you're just reinforcing what you already knew, you can subtly embellish that fond of knowledge by memorizing the bits that are adjacent. I use it to know where it ends: where I actually run out of my depth. Knowing what you don't know is the real art, as ancient wisdom has it
 
sbi
@RMartinhoFernandes Here's a good one. :)
 
:)
I'm too tired to write an answer now. I'll leave it to the puppy.
 
user142019
I hate documenting code.
    /**
     * Returns the number of nodes in the tree.
     * @return The number of nodes in the tree.
     */
 
@sehe " knowing what you don't know will make you truly enlightened "
 
user406009
pdf2ps still running at 100% of one core ...
 
11:03 PM
@refp Which draft? Linky?
 
sbi
@DeadMG: I'd upvote that answer if it gave some advice about dumb pointers, boost::scoped_ptr, those array pointers boost provides, etc. :)
 
lol
 
Ell
ugh
 
/*
* Will count and return the number of nodes found in the tree reference passed as argument.
* @return The number of nodes in the tree
* */
meh! ( oh, there we go )
 
Ell
this chat is incredibly irritating on a phone
 
11:05 PM
@sbi Done
 
@RMartinhoFernandes which draft of what?
 
user142019
@refp it takes no arguments. But the rest is good. I'll also add that it counts the root node too.
 
@refp The txt C draft you mentioned in the message I referred to.
 
@WTP I was just trollin', writing the same thing differently is a superb way of doing more work than neccessary.
 
user142019
@refp at least this looks like I put effort into it.
 
11:07 PM
@RMartinhoFernandes open-std.org/jtc1/sc22/wg14/www/docs/n869 it's mad old, but who cares really? ;-)
@WTP I hope you give me cred in the comment?
 
Gosh yeah, that's old.
You can find txts of some old C++ drafts too.
 
user142019
@refp added * +1 to refp.
 
user142019
:p
 
@RMartinhoFernandes it's not like the definitions of how the standard lib functions work will change that much anyhow, so it's all about the use case
 
Btw, C11 is out :)
 
11:08 PM
2
Q: Which kind of pointer do I use when?

sbiOk, so the last time I wrote C++ for a living, std::auto_ptr was all the std lib had available, and boost::shared_ptr was all the rage. I never really looked into the other smart pointer types boost provided. I understand that C++11 now provides some of the types boost came up with, but not all o...

 
Damn, Feeds was fast this time.
 
is "Feeds" a bot?
 
yes
 
user142019
C99 has _Noreturn. Guess what, people found that ugly. "Okay, new header! #include <noreturn.h>. Contents: #define noreturn _Noreturn seriously wtf.
 
if so; god damn it.. I started to write one a few nights ago, but got caught up with work related code instead.
 
11:10 PM
@WTP You're serious?
 
you know, maybe I'll just steal Lua's syntax for functions and lambdas
I hate many things about Lua, but it's clean and simple syntax isn't one of them
 
Oh god, it's true. <stdnoreturn.h>.
 
user142019
@RMartinhoFernandes I'm death serious.
 
@sehe find me an interesting question!
 
> The header <stdnoreturn.h> defines the macro noreturn which expands to _Noreturn.
Great.
 
user142019
11:12 PM
Why the hell then not just noreturn instead of _Noreturn?
 
user142019
C sucks.
 
user406009
That's how C rolls. Rule #1. Never add new keywords that are not reserved.
 
@WTP Because noreturn was not reserved, but _Noreturn was.
 
user406009
So they have junk like _Bool and what not.
 
nothing is serious about death.. it will track you down no matter if you want it or not, and then leave you cold to rot in away. kind of like the Joker, and you consider him to be serious?
 
11:13 PM
@EthanSteinberg _Noreturn is a keyword.
 
user142019
Also has _Generic, _Alignas, but hey alignof why not _Alignof?
 
@Eli Lubuntu great for a light desktop (lxde - not as pretty as some of the others, but doesn't use much memory, and it's fast)
 
@refp WHY SO SERIOUS?
 
@DeadMG why so....... ARRRRRRRRRRRRRRRRRRRRRGH NULLLLLLLLLLL POINTAAAAAAAAAAAAAAAAH!
 
They add keywords. They just add them only using reserved names to avoid conflict.
 
user142019
11:14 PM
@refp why not?
 
user406009
C++ chooses instead to complicated the grammar, and make the keywords not really keywords.
 
@WTP It's _Alignof.
 
user142019
Is en.cppreference.com reliable?
 
@WTP I'm hunting null pointers with my cross bow, please stay silent or you will fill them with gibberish data
 
@EthanSteinberg I don't care about the compiler writers. I don't write compilers.
 
user142019
11:15 PM
@RMartinhoFernandes Wikipedia said something else.
 
@RMartinhoFernandes I do! :P
 
I fcuk, I feel a lot of trollin' coming up... I think I should have a NULL POINTAAAAAAAAAAAAH
/* a smoke */
 
@DeadMG Well, I don't write C++ compilers.
 
I most certainly don't
 
I wrote history with your mother last night.
 
user142019
11:16 PM
#define nullptr 0 happy debugging with your function overloading!
 
Contextual keywords don't hurt users of the language.
 
can't help myself, but now I'm off.
 
@WTP #define int float
 
your mother's so fat, her mass causes her electrons to overcome the Pauli Exclusion Principle
not that any of you peasants know what that is
 
user406009
@define while if
 
11:17 PM
If you want to go the "swap keywords" route at least make it hurt.
@DeadMG I know!
 
user142019
@RMartinhoFernandes doesn't compile when template<int N> ….
 
Two fermions cannot share the same quantum state.
 
indeed
 
Oh, I got it right.
 
bosons are three "spins" I believe
although my QM book didn't go into it in a great depth
 
user142019
11:19 PM
bosons have an integer spin
 
however, I believe that only fermions actually end up having the exclusion property
 
Yes.
Bosons can share states.
Math allows it, I have no idea if nature confirmed it.
 
Xeo
class fermion{ std::unique_ptr<state> _state; };
class boson{ std::shared_ptr<state> _state; };
 
@Xeo Doesn't model it very well.
A particle with pair of fermions is a boson. Put that in the type system.
 
user142019
Isn't it that it must be unique within one system? You can have multiple identical atoms for example, can't you?
 
11:24 PM
no
it's unique everywhere
 
user142019
nice
 
@Xeo Perhaps the universe was written in C++ after all.
 
Xeo
@StackedCrooked In C++11?
 
no, no, no, that's the wrong way around
 
if anyone find any interesting questions, please let me know
 
11:26 PM
@Xeo The newer parts.
 
user142019
@StackedCrooked reminds me of brain in a vat. en.wikipedia.org/wiki/Brain_in_a_vat
 
every fermion having a unique state object does not imply at all that the state object's contents are, in fact, unique
 
are there any other bots besides Feed in here? I'm bored and I wanna write a tremendously over complicated bot (in )
 
@WTP That reminds me of the Sims.
 
user142019
@refp write a bot that answers all our questions.
 
11:27 PM
typedef boost::variant<std::vector<boson>, fermion> state; std::vector<state> universe;
@refp Write me.
 
@WTP don't tempt me.. I've already gone into troll mode since it's after 12 am, I will write you a bot that just spits gibberish.. it will be answers
@RMartinhoFernandes that will be too easy. all I need to know is just to send random code from the bot itself
 
Ell
declarative type system!
 
@RMartinhoFernandes that is what you are to me, a code-spittah.. though I made that decision just by reading your last message with the typedef
 
template <typename... T>
auto make_particle(T... particles) -> std::conditional<count_fermions<T...>::value % 2 == 0, boson, fermion>::type;
 
the above proves my point though..
 
user142019
11:30 PM
Write a bot that allows us to run C++ on your machine so we don't need to use ideone anymore.
 
There, my model is better than yours and no dynamic allocation :P
 
bringing geordi in here wouldn't be that hard
I am a model, I'm better than your code!
^ geordi, c++ eval bot (as used by ##c++ @ freenode)
but it isn't as fun as writing something completely new
 
user142019
Write a bot that we can ask for something about the C++ standard and it spits out the answer.
 
@WTP that's not something I can whip up in an hour.. parsing human written questions is not exactly easy
 
sleep:INeedSome()
good night everyone
 
11:36 PM
Bye.
 
user142019
bye
 
Ell
chocolate rain
 
user142019
Yummy chocolate.
 
Xeo
Another random Java guy being squashed by C++:
0
Q: How to correctly create a base class in c++?

softcleanI'm learning C++ by myself, "creating" a RPG. However, I'm stuck at point of creating a class named Item, which would be the base class for all game items (or if it was in Java, an interface). Here's my code: class Item { public: virtual const char* GetName() = 0; }; I read something...

 
user142019
They should teach C++ at schools. If you know C++, everything else is easy.
 
user142019
11:50 PM
Instead, they teach Java, because the other schools do it too.
 
user142019
I want to write something fun in C++ but I have no idea what.
 
sbi
@WTP Write a PacMan game.
 
Xeo
@WTP Write me a sandwich
 
Ell
use libgosu for super easy graphics, sound and input
its very easy to use!
 
user406009
Nowadays shared_ptr can almost replicate java object management semantics.
 
user406009
11:54 PM
So it's not as much of a shift as it was before.
 
I don't want people to use shared_ptr all over the place just because they came from Java.
 
sbi
@EthanSteinberg For several years I have taught C++ to students who had a year of previous exposure to Java. Believe me, there's a lot more they get stuck over than memory management.
Especially since C++, when used properly, needs very little memory management at all.
2
 
Xeo
@EthanSteinberg No, no it can not. Cycles anyone? Reference counting can never beat garbage collection in that regard, weak_ptr doesn't help.
 
sbi
:2259695 So? You got automatic memory management in all languages.
 
user142019
Sorry, I was wrong anyway. :p
 
11:59 PM
@WTP Nah, they teach Java, because the grammar and type system is much simpler and lends itself well to formal proof.
 
user142019
RAII is awesome.
 

« first day (443 days earlier)      last day (4487 days later) »