« first day (903 days earlier)      last day (4061 days later) » 

3:00 AM
I can't tell you without knowing what PrintText does.
How does it use its font argument?
With what operations?
 
well
i guess it's just a general question
 
You want the smallest thing possible. For instance, if you only ever need one font, you wouldn't pass in a sequence of fonts!
@Grapes Then you get the general answer: it depends how the argument is used.
 
ok, if I create a unique_ptr
 
A function that will operate on a pointer will accept a pointer. Those that don't, wont.
 
is it GENERALLY a good idea to pass it around by ref?
 
3:02 AM
No. There is very little on the interface of a pointer that matters.
 
so you usually create a unique_ptr
and get it's value * then have functions that accept T
unique_ptr<T> and a bunch of functions that get T&?
 
I have a very important recommendation: don't write a program all in one go.
 
I am rewriting my raw pointers into smart pointers
so I already have the entire application
 
When you write a function, you shouldn't think too much about how you write the rest of the program.
Consideration like 'I usually create a unique_ptr' are not that useful in the context of writing the function.
It doesn't matter how often you create pointers, or vectors, or arrays, or whatever. If the function only cares about a T, have it accept a T.
 
ok, let me get a better example
ah
 
3:05 AM
@Grapes What makes you think I need more examples?
 
let's go back to PrintText
if it only had 1 line of sprintf
Should I then PrintText(*TestFont)?
 
@Grapes Where does the font thingy come into play here?
 
auto TestFont=make_unique<Font>(); PrintText(TestFont);
or should it be PrintText(*TestFont)?
let's say it sprintf's the Font's name
 
@Grapes So then the pointer has nothing to do with it.
It needs a font, make it accept a font and nothing more.
 
@Luc
sorry, I think I am not explaining myself very well
 
3:08 AM
You wouldn't think of having PrintText accept an array of font items, would you? It just needs the one.
@Grapes I understand the question very well.
Why do you ignore the answer?
 
I don't understand :( Sorry
 
Do you understand what 'nothing more' means?
 
I don't understand if it's std::unique_ptr<T>& or T&
yes..
 
Let's go for a bit of mathematical humour. I am a stock human with exactly two arms. Do I have one arm?
 
no..
 
3:10 AM
Yes I do. My left arm is an arm. Hence I have an arm.
I have exactly two arms. I have one arm.
That's very precise language. Those two statements are true.
 
auto HumanTest=make_unique<Human>();
void MakeBaby(Human& ParamHuman)
OR void MakeBaby(std::unique_ptr<Human>& ParamHuman) {
 
A function which accepts an std::unique_ptr<T> p has acess to a T by dereferencing p (ignoring null pointers). It also has access to a p, which is a pointer and not a T.
A function which accepts a T or T& has access to a T and nothing more.
 
yes
I understand that completely
 
So that's your answer then.
 
but
if I don't pass std::unique_ptr by ref
i will lose that
 
3:13 AM
Lose what?
 
if MakeBaby function might need unique_ptr
not sure why it would
but it might change it's ownership
so I should always try to make it T&
and if I can't
use std::unique_ptr<T>&
 
Well, here's a spoiler: there are very few reason a function would even need to use a unique pointer.
The interface is just not that useful.
But yes, that's the right reasoning.
 
thanks
that's all I wanted to know :)
 
So really you should be surprised when/if a function needs to modify a pointer.
 
of course
AddChild would be a good example
it would take std::unique_ptr by value
and add it to a container of Humans
AddToContainer(std::unique_ptr<Human> HumanItem); add it to std::vector<std::unique_ptr<Human>>
other than that i'll do PrintHumansName(Human& HumanItem)
 
3:17 AM
Construction is indeed the mostly interesting part of the unique pointer interface.
 
@LucDanton Thanks, you've been super helpful!
 
user1357851
3:31 AM
trying to ask for some advise (Android App), but their room looks dead :p
 
user1357851
which reminds me this room is always alive :p
 
user1357851
database class, should I make the insert method static, because it does a writeable database open every time I call the function?
 
user1357851
making it to be associate with the database object does not seem to make sense
 
user1357851
yeah
 
user1357851
3:46 AM
Thanks, that's what I thought too
 
user1357851
but I was looking at some tutorials, none of them make it static
 
user1357851
so that's why I am not sure
 
user1357851
but there is static keyword in java
 
user1357851
android is written in java
 
user1357851
guess I just have to make all the class methods static
 
user1357851
4:03 AM
@ScottW just u & me here again, lolz
 
sooo I guess google won't let you look up "-> c++"
 
Can anyone tell me why my list iterator hates <ContainerName>.end()-1 ? I want to iterato to one before the list end, I was under the impression you could always do this !
 
@ScottW Looking through the Jedi Outcast source code hah
 
hah that post is pretty hilarious, hard to believe it's true though
 
4:16 AM
Oh it is
 
mayoclinic is very unscientific. Tumblr probably knows better about obesity
 
lol Tumblr is full of morons
 
user1357851
Gosh it is the pink pony ... I have never seen a guy with a pink animal avatar
 
Most of the internet is morons... tumblr is one of the worst places though hah
 
@Telkitty It's a G3 pony, even.
 
user1357851
4:22 AM
I know! Maybe NullPonyPointer is a she :p
 
@angryInsomniac FYI, .end() goes one past the end.
Also you can use std::prev or std::advanced(iterator,-steps)
 
GODDAMN IT, how would I get a google search of "-> C++"... is there a technical name for that arrow thing?
 
arrow operator
 
Arghh... why is it such a pain in the ass to wrap some D3D11 code in order to embed it into a WPF window T_T
 
@Rapptz Yeah , I know that and by that token end()-1 would be the end itself and it would stop one before the end (I sense a logical fallacy there) , however, I am also in the code trying to just add 1 to the iterator and start off another iterator from that point, it hates that too.
 
4:25 AM
so it just takes the value at a pointer's location and assigns it to something?
 
@angryInsomniac Use std::advance or alternatively use an index (unless it's std::list)
 
@Rapptz here is the question about this on SO stackoverflow.com/questions/15846898/…
it is a list
 
okay is there any reason why to use, for example, v->x instead of (*v).x = (value) ?
 
@angryInsomniac ideone.com/i0dkat
@Crowz Seriously?
Do you want to be writing (*v).x every single time?
 
It seems more clear to me
 
4:29 AM
@Rapptz I think I see the problem , what happens if the list is empty and we do a prev on the end ?
 
Undefined behaviour?
@Crowz Everyone knows what the arrow operator does. (For built in types anyway)
 
@Rapptz ideone.com/3wEBEb strangely, it works !
 
That's UB
Just because it "works" doesn't mean it isn't.
 
@Telkitty Just for the record, I watch My Little Pony: Friendship is Magic. And I'm a man.
 
Not manly enough!
 
4:32 AM
@Rapptz hmm ! checking
 
user1357851
gay man is man too
 
user1357851
just joking :p
 
fuckin' OpenGL is probably one of the most annoying things to debug
 
user1357851
@EtiennedeMartel too much singing
 
4:35 AM
But I like pretty shapes
 
@Telkitty How can you not like that.
 
user1357851
Oh gosh ...
 
user1357851
generally I don't like herbivore :p
 
user1357851
and excessive singing :p
 
@sehe I'm rereading 'Programming in Lua' and according to the author (one of the creators) they chose not to go with a preexisting regex flavour to keep the implementation size to a minimum. I also stumbled upon this interesting answer -- I recommend the grammar library plug at the end, too.
 
@EtiennedeMartel whyy
 
What? It's awesome.
 
error| 'Tags' is not a member of 'annex::tuple_size<std::tuple<int>, void>'
      ||      static_assert( tuple_size<Tuple>::value == sizeof...(Tags), "Number of tags doesn't match number of value types" );
Guess I got a very much broken copy of GCC.
 
that really is fantastic
 
This is and will always be the best MLP related video: youtube.com/watch?v=NVGI6mhfJyA
 
4:53 AM
And somebody went ahead and starred the MLP video.
 
user1357851
@Pubby thanks for the video now I am hungry. I only had donkey meat once, it was so yummy!
 
@Nican It's @EtiennedeMartel new star bait technique.
 
user1357851
Oh no pewbie plonked me :'(
 
@Borgleader That's how I rooolllll.
This whole thing is so fucking cheesy.
But I like cheesy stuff.
@Pubby This is awesome.
 
pretty sure this is getting emailed to a mailing list next time one of my coworkers leaves their workstation unlocked.
 
5:02 AM
This is surprisingly dark.
 
http://en.wikipedia.org/wiki/Transcranial_direct-current_stimulation
I want to get this
 
Well, Netbeans officially hates my friend.
 
user1357851
what are the beer bottles doing there?
 
Netbeans hates everyone.
 
5:13 AM
If you start off with:

if (someCondition)
{
}
 
@Telkitty Waiting to be emptied in the glasses?
 
and press enter, add else, press enter, add {, you end up with horrible indenting problems.
 
user1357851
@EtiennedeMartel 2 small bottles, 10+ cups? talking about empty arrays
 
Then if you add an ending brace because you don't see the one way to the left, you end up with two ending braces.
 
@Telkitty "small" bottle? That's probably about 371 mL. Considering it's beer pong, you can usually fill three cups with one bottle.
(well, "fill" is not the right word, but whatever).
Netbeans is worse than Eclipse. And that says a lot.
 
5:17 AM
I really wish we could just do the same things in C# instead of Java.
 
I used Netbeans for long time, never had that problem ..
 
Way better language, way better IDE.
 
I still use Netbeans.
 
And it's easier to do every single thing we do in this course.
 
5:17 AM
Never had a problem with it.
 
Too lazy to try Eclipse.
 
from my experience, you get bad indentations in any IDE, if you copy\paste or do some indentation manually
 
I've had problems with NetBeans, but just not that, since I use Egyptian braces and it seems to be built for those.
 
UIManager.getSystemClassandFeel()
 
5:42 AM
IntelliJ is what all the java duders at work use.
good point, I'm glad you made it.
 
lol
is there something wrong in this 1-line recursive function:
vector<vector<Node>> branchFork (vector<Node> path)
{
return new vector<vector<Node>(path) + (path.front().right!=null?branchFork(move(path)+path.front().right):null) + (path.front().left!=null?branchFork(move(path)+path.front().left):null);
}
 
yea, its unreadable.
 
well, it's not written English
 
if it were written in english it would probably be worse
 
it's a recursive function that return all paths in a tree, supposedly
 
6:03 AM
@KhaledAKhunaifer new?
Where's your pointer then?
 
has anyone checked out jedi outcast source code?
 
@EtiennedeMartel null, operator plus, so on.
 
@LucDanton Yeah. This actually looks like Java.
Or C#.
@Khaled, silly, get your languages straight.
 
user1357851
 
user1357851
you are not alone and there is an article for it
 
6:21 AM
Yeah, I know.
 
user1357851
6:35 AM
 
user1357851
7:01 AM
thought you went to bed
 
7:14 AM
Hello Genius People
 
7:26 AM
Hello friend
 
How are you all doing ?
 
I'm a bit tired...
 
user1357851
@ScottW like your dog, in a different colour :p
 
user1357851
 
user1357851
ok, not quite
 
7:35 AM
lol
so well i have an intresting problem
i am trying to learn how to create vm's from the very basic
 
@Darkyen sounds interesting
 
for the learning purpose i have constrained me on not using STL :P .(though will use it later )
 
@Darkyen That makes no sense.
 
so .. if i have a base class called Value , and i implement INTEGER & STRING out of it
how can i write a virtual function which allows me to get values out of both ? or is it not even possible ?
@Mikhail my english is pretty broken , apologies regarding that
class Value{
  /* Base class for all data-types */
}

class Integer: public Base{
    int payload;
    public:
     /* what can i do, to return the correct data type ? */
}
 
Return what to what, where?
 
7:46 AM
that doesn't make much sense
(you haven't shown Base and you haven't shown anything virtual in it)
 
user1357851
another mod without customized avatar :p
 
user1357851
why do you want the both version of those variables?
 
Random quote of the day:

I love Java's remainder operator. No need to create another fmod().
What is "std::tie(Lightness, Etienne)"? French for "Stephen's light-colored tie"?
 
Yes, exactly that.
 
And I thought Etienne is a fashion logo that designs men's tie.
And that all programmers wear ties to work.
tightens tie
 
user1357851
7:59 AM
negative, there are some really hot female hackers, they wear no ties to work
 
user1357851
tight skirt, maybe
 
Hm... Tight skirts with ties, formally hot.
OH GOD... Realized what "Etienne" meant.
 
Hiya folks!
@LucDanton, @Telkitty : Hiya! :D Hope you're all right! :D
 
@EtiennedeMartel <-------- std::tie(Lightness, Etienne)
Suck it, Sherlock Holmes. :D !!!
 
user1357851
@GamesBrainiac :D
 
8:03 AM
Anyone know of an interesting and data-structure that usually gets overlooked?
 
BitArray.
 
BitArray?
Whats that?
 
@GamesBrainiac I could've sworn I've seen a Stack Overflow or Programmers.SE question about that. Let me find it
 
Data structure that uses bits to store data.
 
@Insilico Hiya Sili! :D Glad you're doing great as well.
 
8:04 AM
Overlooked pretty well.
 
@tom_mai78101 Very useful?
 
@GamesBrainiac Depends on how you want to use it.
@GamesBrainiac For example, you're programming in C on writing a LED controller module for 8052 chipset. This BitArray would work out for you.
 
Hmmm, that does sound interesting
@Insilico Any luck yet?
 
799
Q: What are the lesser known but useful data structures?

f3lixThere are some data structures around that are really useful but are unknown to most programmers. Which ones are they? Everybody knows about linked lists, binary trees, and hashes, but what about Skip lists and Bloom filters for example. I would like to know more data structures that are not so ...

 
Dang it, I was mentioning Bloom filters.
Oh wait... wrong thing to mention.
Oh wait, it's right. No wait... Dang it.
 
8:09 AM
lol
Thanks both of you
This is plenty of interesting material to work on! :D
 
@LucDanton wokay, thanks for the 'official' LUA stance :) Call me conservative, but I don't really see this argument, but I guess my opinion is largely tainted by the fact that I have years and years invested in grokking /established/ regex implementations.
 
Trie looks really interesting though
 
@sehe To their credit they call it 'pattern matching' and it's not powerful enough to be regular.
 
@LucD I do find that SO rather meh. Make that, very meh, actually. It basically names 'advantages' of lua patterns that are to be had with the vast majority of regex implementations around anyway. The quoting thing, okay, that's a good argument (outside of perl or other languages with regex literals)
 
@sehe : What do you think of TRIEs?
 
8:15 AM
@LucDanton Yeah, I can see how it has merit, and might even appeal to 'newcomers' as superior'
@GamesBrainiac yawn. good morning. What do you think of diplomatic immunity?
No. Processors are bad at fighting
@LucDanton Let's also not forget, that there is likely no existing Regex engine that is actually regular (except maybe the archaic non-GNU versions of sed/awk?)
 
@sehe Not even at least regular?
 
@LucDanton :) of course, but usually an irregular superset
 
Well, Lua isn't.
 
@sehe Eh, you can't be as conservative as the Lua implementers.
 
@sehe An awesome thing to have. My father is a diplomat, so I enjoy the same right! :P
 
8:25 AM
12 messages moved to bin
@GamesBrainiac See. I just sensed that
 
@sehe Yoda, is that you?
 
FTR. I'm not sure I agree. Yes, DI a good thing to exist (making inter-judicial diplomacy feasible to an extent) but I can't agree it's so awesome to have. I, for one, would gladly skip on the opportunity to be in such a role that required the protection of DI
 
user1357851
canine talk, dog to dog :p
 
wut
 
user1357851
& no bear either right? ... and that weasle in the water ...
 
user1357851
8:30 AM
Zoo::Zoo(Animal *animals)
 
meh, a pointer
 
@Mysticial That's awesome
 
user1357851
yes a pointer to an array of animals
 
iterators...
velo
 
cipède
 
8:35 AM
(removed)
all that ` (as in è), aren't they redundant?
 
no more or less redundant than any other form of writing.
 
or maybe there are some words which differs only in "`"?
 
@Abyx not to me :)
@Abyx huh. You're not french then
 
I'm not
 
would omitting them lead to ambiguity?
 
8:40 AM
btw, in Russian we had "е" and "ё". in present days we don't use "ё" anymore. because that dots doesn't add anything
 
I can only say etymology and pronunciation rules
I'm not French either.
But in general, language all have their historically grown idiosyncrasies and consistency rules, and they convey information. All languages could be vastly simplified but they couldn't be without loss of information
 
languages are too complicated =(
 
Jul 31 '12 at 15:11, by Luc Danton
I remember on a webpage that was advocating the careful use of accents for uppercase letters (related to the French layout, don't ask) such ambiguous phrases as LE FOUTRE C'EST SALE. I did not expect that.
 
oh, so it can be ambiguous
 
nice memory
 
8:48 AM
uhm anyway I don't know what that "fourtre" or "sale" is
 
Believe or not 'foutre' has not been used that much in this chat.
 
so it looks same way to me, with and without accents
 
@LucDanton lol
Jul 31 '12 at 15:13, by Etienne de Martel
@R.MartinhoFernandes Because "Étienne" is ugly. "Etienne" is not.
^ I think it doesn't depend on his name, at all, let alone the spelling thereof :)
 
Yeah, it would sound different.
 
9:02 AM
@sehe Noooo.. The wonderful fashion logo, Etienne...
 
@tom_mai78101 you mean Étienne
@Darkyen So, it doesn't throw?
 
@sehe Yes, I can't spell accented letters.
 
It sounds just like it sounds.
 
Me neither, it's copy&paste
 
@sehe Or do you mean @EtiennedeMartel?
Forget chatting, gotta go work. FAST! Bye bye. have a day!
 
9:08 AM
I'm not touching that code.
 
I hate when I forget messages while moving
Anyways, gotta pay some attention here, afk
 
:-)
thanks btw sehe
 
Mmm. The lack of Phoenix v3 is a minor issue compared to the other bugs fixed since that version. Who/what forces you to use that version? You realize that Boost Spirit is header only, right? I'd say look at BCP once. (PS. I had to fix a bug in 1_41_0 tst.hpp in order to get qi::symbols to compile in the first place -- eek!) — sehe 17 secs ago
 
9:39 AM
sleep for a while, might solve 1,2 & 4
unlikely ime, maybe eat then sleep
 
OK, what's here.. Haytienne/Atienne/Eatienne is soliciting sex and "Zoidberg is correct"? has reached 9 stars. Normal Saturday, then.
..except there is nobody here.
 
I'm here, you blind bat
although I'm just off again to make myself some brekky
 
9:54 AM
Fatty Kim has nuked all the other loungers!
OK, it's brekky time. Cheese butty and coffee, here I come.
 

« first day (903 days earlier)      last day (4061 days later) »