« first day (586 days earlier)      last day (4359 days later) » 

4:00 PM
anyhow, beside the point. those are server-oriented and usually mean 1-2 connections per peer (to the server). @DeadMG it's not the end of my world if you use boost::asio, just be warned that interfacing it with complex game logic is harder than writing a basic threaded socket class and using that
 
hmm did a google search for "first 64 person game" and three of the first four hits are about OgreBattle
 
typing on a tablet sucks
 
So much derp. I've made parser recognise tokens named 'something', and then made lexer produce tokens named "something".
 
@RMartinhoFernandes Try engraving
(going home)
 
Custom control, y u lose focus?
 
4:01 PM
@RMartinhoFernandes Touchscreens suck for typing
@sehe Bye sehe
 
I'm going to go try Tribes Ascend now. woot!
hope it's like the good ol' days
 
Also apparently tokens is "property '40'" for V8.
I don't even.
 
hmm, my fiance is trying to keep our entire wedding under $5000, but wants a specific videographer from Malasia.
 
Also MxFdD+O dice syntax sucks.
 
@MooingDuck Good luck with that. If you can convince her to buy a dress that costs 5000, you're doing well.
 
4:06 PM
@MooingDuck You might be fucked.
Actually, there's a 83% chance that you're fucked.
 
Needs so much context to parse properly.
 
@MooingDuck: A specific videographer from Malasia?
 
I don't even understand videos at weddings anyway - who's ever going to watch it?
 
you know, I should only offer one Renderer per OS, and one Window per OS
because I have neither the need nor the capacity to actually render into multiple windows
 
@DeadMG: If you need multiple "windows", you can use viewports
 
4:10 PM
multiple windows != multiple viewports
and also != multi-screen
 
Hence, "window".
Oh okay
 
but I don't, so I think I'm going to scrap that element of the API
 
ideone.com/lNi83 .. can someone conform that the time complexity of this algorithm is O(n^2)
 
you get one Window and can create one Render
 
@Atif: I think it has worse complexity than that
 
4:12 PM
@Atif Owch. I'd go for O(n^2m^2), since you repeatedly perform an O(m) search into other vectors.
 
find() is certainly not O(1)
But whether it actually affects performance depends on how big n is typically
Even O(n^3) programs can be pretty fast for small values of n
 
@DeadMG i do not understand how
the outer loop runs n times in worst case ... and the inner loop also runs n times in worst case
 
@Atif for each i, for each j, find in qlvector.
 
@Atif: So mqvector and mpvector are the same size?
 
@Atif O(nmp)
@Atif are any of mpvector, mqvector, qlvector guaranteed to be the same size?
 
4:15 PM
Naming vectors 'vector' is silly.
 
not same size ... but mqvector is smaller then mpvector .... mpvector has only 6 items (and its constant) .... mqvector has 3-5 items
 
@Atif: Are you planning to have more than ~5 items?
Like 100s of items?
 
mpvector has same size (6) and every mqvector for a given element in mpvector also has same size
nopes ... the items remain same
 
Optimising this for 30 items is a waste of time.
 
The vectors have fixed size? Then it's O(1)!
 
4:17 PM
@Atif so it's O(nmp), but your numbers are small, so nobody cares
 
Pragmatically speaking, if that's all you're working with then you really shouldn't worry even if it was like O(n!)
(which grows really fast, btw)
 
@Insilico I've had to do that :/ Comparing if two molecules are the "same"
 
Unless it's O(infinity and beyond).
 
@MooingDuck so n for outler loop elements, m for inner loop elements and p for finding the elements
 
@Atif yes
 
4:18 PM
@MooingDuck Hopefully it wasn't dealing with DNA molecules! :-/
 
hmmmm .. let me digest this ... brb
 
@Insilico whatever the user made (mostly via dragdrop), I don't think any user is patient enough to make that
 
In which case we get O(m+n)
 
DNA molecules are a special case anyway. :-P
 
@Insilico special case?
 
4:20 PM
@MooingDuck: Well, they are to me (as a bioengineer)
 
iheart.com is freaking out and playing ads over the radio dj.
@Insilico it was a program designed for biochem teachers to give homework with, so complex stuff was outside the scope of the program
 
Actually proteins are more interesting to me, but DNA is one hell of a molecule
 
@prjndhi What are you referring to?
 
@MooingDuck Aren't the ads for iheart.com different from the ones they play OTA?
 
@CatPlusPlus bozosort?
@Insilico yes
 
4:23 PM
@MooingDuck Only in the worst case. :-)
 
@Insilico ever look at the average case?
 
Ouch forgot about that
 
@Insilico O(n × n!)
 
@MooingDuck i am refering parallel processing algorithm
 
@MooingDuck You mean bogosort?
 
4:24 PM
@prjndhi what parallel processing algorithm? Nobody else mentioned anything like that.
 
in book they directly write that complexity is O(m+n)
 
@RMartinhoFernandes bozosort, bogosort, stupidsort, slowsort....
 
@prjndhi What book?
 
@prjndhi what algorithm has that complexity?
 
What the heck is everyone talking about?
 
4:25 PM
@RMartinhoFernandes Not sure. This is Lounge<C++>, after all.
 
@RMartinhoFernandes That's what we're trying to figure out
 
You know there are some books that are just utter shit. cough Schildt cough.
 
@MooingDuck sleepsort
 
@DeadMG hey, that's linear time, it scales very well.
 
very much so
 
4:31 PM
But with large constants.
 
@RMartinhoFernandes shush you
 
they give an example
 
Scary title ahead!
0
Q: delete MyClass *Array[10]

user1415587I got really stuck trying to deallocate memory using delete without it being in a for loop. MyClass *Array[10]; cout << "Step 1 - Allocation" << endl << endl; Array[0] = new MyClass(); Array[1] = new MyClass(); Array[2] = new MyClass(2, 4.6); Array[3] = new MyClass(*Array[...

 
@prjndhi you realize that nobody knows what algorithm you're talking about? The one you said was O(n+m)?
 
What you mean by 'it doesn't work?'???... — Vite Falcon 52 secs ago
My eyes.
 
4:32 PM
delete MyClass *Array[10]
Where's the eyebleach?
 
@DeadMG the more I think about sleepsort the more I think it isn't linear time, because the OS has to schedule those events in some sort of (probably-nonlinear) structure internally that we've merely hidden away.
 
Someone teach the OP in that question to use std::vector
 
when i will find it i will give you ,but i would want to know in which condition it occur?
 
@prjndhi in which condition does what occur? That complexity? When given an O(n+m) algorithm.
 
@prjndhi It's kind of hard to tell you in what condition something would occur if we don't even know what you're talking about
 
4:36 PM
@MooingDuck Probably quite true.
 
@MooingDuck You don't say!
 
it is true
 
Evening. Or anything appropriate.
 
@prjndhi What is true?
 
@Cicada Morning to you too!
 
4:38 PM
without having algorithm could not say why this complexity occur
 
@Cicada Happy Mother-fucking Day?
 
@Cicada Morning. :-P
 
It's not mother's day today
At least not here
Too localized.
 
watch video, nubbins
 
4:39 PM
also not here
 
It's not mother's day anywhere today, in fact.
 
@prjndhi The complexity of the code we were discussing at the time was O(nmp)
 
I wonder if I should start handing "My code is full of the newz and now something bad" questions by simply recommending a book.
I mean, clearly the OPs of such questions aren't learning proper C++.
 
> proper C++
Implying it exists.
 
@Cicada: In the real world, unfortunately, not much.
Now if you're talking about "C/C++" code, oh there's lots.
 
4:41 PM
I know I know.
 
:-) / :-(
 
Last summer I had to port a "C++" application to CUDA
The only "C++" thing in the code was new and delete
All the rest was pure C
 
@DeadMG: why not std::array?
 
what is the mean of :: operator?
 
The guy even reinvented the concept of constructors
 
4:42 PM
@Insilico Well, I do what I can to not put more of that out there.
 
MathOp GetAMathOp(MathOpType opType)
{
if (opType == MathOpType::Add)
return &AddOperation;

if (opType == MathOpType::Subtract)
return &SubtractOperation;

return NULL;
}
 
@prjndhi scope resolution, gets members of a namespace/class
 
in this case what is name space?
 
@prjndhi Let Me Wikipedia That For You
A namespace (sometimes also called a name scope) is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An identifier defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace. Languages that support namespaces specify the rules that determine to which namespace an identifier (not ...
 
namespace std {
     class string {
          ..
     };
}
std::string myname;
@prjndhi it's a way of "grouping" classes and functions and stuff. (Everything except macros)
 
4:44 PM
that mean MathOpType is namespace
 
@prjndhi In this case MathOpType probably a class
Since :: can be used to access members in a cass as well
 
@prjndhi or a class
 
Arrrrgh, people recommending shared_ptr over unique_ptr again.
 
Sharing is caring.
 
opType == MathOpType::Add means check class MathOpType's Add memeber .is it true?
 
4:47 PM
I don't know, it depends on the exact type of MathOpType::Add
It's probably an enum, but I'm not sure
 
yes it is enum
 
In that case it checks if opType has the same numerical value as MathOpType::Add
Now, I'm not sure why the code doesn't just call AddOperation() instead of returning a pointer to it.
 
@Insilico might not have values to add yet, like a parser
@Insilico or otherwise needed delayed execution
 
@MooingDuck: Probably, although you can do that with just the enum itself too
 
@Insilico oh, right
@Insilico it seems to be constructing a MathOp from the pointer for some reason
 
4:52 PM
why does it have to be so titsing hot
I'm better adapted to the cold
this is goddamn England not Australia
 
You're a husky?
 
woof woof
 
England
Isn't it supposed to be raining?
 
@RMartinhoFernandes You couldn't tell from the gravatar?
 
(Actually it's pretty hot here too)
 
4:53 PM
Cavalier King Charles Spaniel
 
@MooingDuck back to the question .. why is it not O(nmpq) as n for the outer loop, p for find in the outer loop, then m for the inner loop and q for find in the inner loop ...
 
my dog once stood still in the snow and we couldn't find her for ten fucking minutes, you'd think that black isn't the best camouflage on snow but apparently it really is
 
Black snow.
 
@Atif Exactly what I said originally, except I had n == p and m == q.
 
It y u 30º.
 
4:55 PM
@RadekdaknokSlupik That's Celsius, right?
 
@Insilico unfortunately.
 
Ouch, that is quite hot
 
I wish it were 30º Fahrenheit.
Or 30 Kelvin.
 
@RadekdaknokSlupik That is quite cold.
 
@Atif when you consider both finds, it's O(np+nmq), each the first find isn't inside the second for loop.
 
4:57 PM
@Insilico I have a radiator.
Not an airco.
 
Ah, okay.
 
@MooingDuck @DeadMG yes the find would be p and q in worst case scenario .... so since n is the biigest number here ... it would eventually be O(n) which is linear .. correct ???
 
@Atif that's not quite how algorithmic complexity works
 
If the sizes are fixed it's O(1).
 
@Atif No, you only get to eliminate those which are constant
 
4:58 PM
good night bye
 
oh okay ... so it would be O(nm+nmq) but its still linear right ?
 
@prjndhi nite.
 
yes
 
@Atif "linear" doesn't really apply when you have more than one variable, but it's the same concept yes.
@DeadMG you can drop nonconstant as long as they are significantly smaller as N approaches infinity: O(n^2 + n) -> O(n^2) for example.
 
@Atif n*m is linear only if one of the variables is constant, strictly speaking
 
4:59 PM
@RMartinhoFernandes n,m are fixed but p,q are found on run time
 
@Atif it's not about runtime vs compile time, but if they are bounded. (Are they always less than 10?)
 
@MooingDuck Sure, but that can only work for n. O(n^2 + n) == O(n^2), but O(n^2 + m) != O(n^2).
as when m approaches infinity, then it becomes the major term
 
@DeadMG ah, true (assuming no relationship between n and m)
 
alright understood ... so time complexity is O(np+nmq) ... space complextiy would be O(nm) since we are generating some result for for each element of the mpvector (so it would be n) and each element of the mqvector (which would be m)
 
you have to keep the highest value expression in every variable
 
5:06 PM
@DeadMG I think if n>m, then you could drop the m in the case of O(n^2 + m)
 
@MooingDuck No such relation is stated.
 
@DeadMG agreed, sorry, my mind moved to tangent speculation
 
as you adequately put it, I am always right ^^
 
@MooingDuck yeah always less then 10
 
5:10 PM
@RMartinhoFernandes keke
 
@Atif so the algorithm by itself is O(nm+nmq), but with your inputs will always be O(1).
 
@MooingDuck thanks ... the space complexity would be O(nm) for storing the answers into another vector
 
@Atif I didn't look at that so I can't say, but sounds roughly right
 
Great, someone noticed that stupid bot fucked up.
 
@MooingDuck alright
 
5:14 PM
@CatPlusPlus Sorry for that alcohol induced utterance. Deleted it.
 
@StackedCrooked Lol.
 
@RMartinhoFernandes Apparently that change had been the only change, and checked in with " (i just improved some detail on the topics)"
Interesting "note"
 
@MooingDuck I know. I had tried to fix it, but the bot reverted my fix.
 
> This bot undid someone undoing some vandalism
Lol.
Also what's with people still trying to make silly edits, they're caught like 10 seconds [citation needed] after they're done.
You'd think everyone would know by now.
 
I didn't notice the page wasn't scrolled all to the bottom.
 
5:22 PM
@CatPlusPlus 10 seconds? The bot reverted it practically immediately.
 
Ell
hi guys
 
how did Bjarne Stroustrup implemented de c++ class object?
what did he use? :)
 
Xeo
@tree That question makes no sense.
 
@tree CFront, written in C/CFront
 
@Xeo It does. But it makes a rather dodgy kind of sense
 
5:27 PM
@Ell ewa
 
@Xeo makes no sens to someone who dont know the answer
 
@tree no, the question makes almost no sense because it's grammatically incorrect.
@tree what sort of implementation do you think a C++ class object has?
 
C++ has no class objects. You are looking for Python or Objective-C or something like that.
 
Xeo
@sehe I've tried, but I can't find any straight question in that sentence, disregarding the grammatical errors. What is a "c++ class object" here, "implemented" in what way? In Code? The compiler structure? The parser?
 
@tree: Why not pick up a book written from the horse's mouth?
 
Ell
5:30 PM
what do you guys think about using Interfaces for every class? e.g., never have String S, always have IString S? Or is that what templating can solve?
 
Quick question: Is this book a good book to continue learning C++ from? It's for a college "Intro to OOP, using C++".
 
@DiscreteGenius @tree Guys ->
1169
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
Right, that link to the definitive guide again.
Lol
 
@MooingDuck That's only one tiny aspect of the answer. The question is most likely: how do classes work, under the covers?
 
5:31 PM
Unfortunately, I'm forced to use this Deitel/Deitel book. How bad is this book?
 
@MooingDuck It was a not-so-subtle attempt to get people to pick up a C++ book to learn... actual C++.
@DiscreteGenius: It's not a bad book
 
@DiscreteGenius Well, genius, if it isn't on there, put it on there. The votes will show what people think of it. This chat draws only a fraction of the C++ public
 
@Ell Interfaces only make sense in C++ when you need classes with virtual functions. In which case, the base class is the interface
 
Lol "forced to use this book".
 
5:32 PM
They have a Microsoft Surface computer at the school I'm going to next year.
Piece of lagging shit.
 
@MooingDuck Interfaces generally only make sense when you need classes with virtual functions.
 
@RadekdaknokSlupik The Surface computers I used were actually quite snappy
 
@Insilico the one I used was quite laggy. Not even zooming in a photo went smoothly.
 
I wonder if I've ever consciously written an abstract interface in C++? I don't recall ever doing such.
 
Yeah I did.
 
5:34 PM
Perhaps it was a newer model or something I used
 
@Insilico @sehe Thanks
 
@MooingDuck So you've written a C++ abstract interface subconciously? or unconciously?
 
@sehe It even draws the non-C++ public.
 
@Insilico I wrote pure virtual base classes, but I never thought of it as an "interface". I guess it is an interface though.
 
Ell
well isnt that what interfaces are in java/c# etc. ?
 
5:38 PM
@Ell: Java != C# != C++
 
@Ell yes, but they're usually clearly defined as an interface, and begin with an I. I was not consciously aware I was writing an interface at the time.
 
In C++, an interface is a convention. In C# or Java, it's a language feature.
 
std::function objects can replace virtual methods and can lead to a more flexible design.
 
Ell
@Insilico I know - I was stating that in java and c#, interfaces are defined as a pure virtual class
 
@StackedCrooked say what now?
 
Ell
5:39 PM
map<string, std::function> yay!
mystr["length"]()
actually that doesnt work does it?
 
@Ell sure it does, as long as you also pass this
 
@Ell: Try it out and see. :-)
 
lol the only nice part of Windows 8
 
Ell
haha is that real?
 
yeah. Kudos to Microsoft for telling people to google the error.
 
5:40 PM
@MooingDuck Instead of declaring pure virtual methods that must be defined in the subclass you define a number of std::function objects as member variables in the base class and require the subclass to provide them to the base constructor.
 
@Ell I would enum the functions, and use a static std::array<enumfunc, std::function>, which is much faster, and effectively how vtables usually work.
 
@RadekdaknokSlupik I can of course still access the core dump, right?
 
@Insilico probably writes it to a log file or something.
or to NVRAM
 
Anyway, dinner time.
 
5:41 PM
Maybe there's a magic key sequence that lets me see it
 
Ell
have fun :)
 
I'm confusing In silico with Ell every time.
 
@StackedCrooked that makes your objects huge, but that would work. virtual works better.
 
@RadekdaknokSlupik Yeah I'm too damn lazy to upload a proper Gravatar
 
Xeo
5:43 PM
@Insilico I do remember your random Gravatar to be a brownish one before, though. What happened?
 
Let me go and ask the network administrator to change the IP address. :-)
@Xeo: I don't have an email address assoicated with my account, so it's using my IP to generate it
 
@RadekdaknokSlupik really? I don't have problems telling the avatars apart.
 
Xeo
@Insilico Oh, I thought an email address was required
 
@MooingDuck Me neither, except when I'm looking at them with only half an eye.
 
@Xeo: No, an email is not required.
5
Q: My profile has no email address. What is my Gravatar based on?

arxThe Gravatar URL uses an md5 hash of the lower-case email address. So I'd expect my Gravatar to use MD5("")="d41d8cd98f00b204e9800998ecf8427e" However, my Gravatar actually uses "dfc87203d5c57e2ad21acc178eead605". Where does this value come from?

 
5:44 PM
Come on, not even an account is required.
 
@RadekdaknokSlupik Actually it is to ask questions on Stack Overflow, I think
 
Ell
I don't understand how hashes work, like, logically. How can you compress x data into x-1 bytes?
 
@Ell: It's not a compression scheme
 
Ell
or 1024mb of data into ...20 bytes?
but how is each hash different? that is impossible!
 
5:46 PM
@Ell: It's not. The pigeonhole principle prevents that
 
@Ell multiple strings can result in the same hash.
 
Ell
I understand there are collisions
 
You cannot revert them.
They are extremely lossy.
 
It's just that the likelihood of finding duplicates is very slim (depending on the algorithm)
 
Think of it as an encrypted, 0.00000001% JPEG xD
 
Xeo
5:47 PM
Hashing is not compression, it's a one-way transformation
 
Ell
I just dont understand why it is so slim, the chance of collision?
 
@Ell: In a nutshell, changing even one bit causes something of an "avalanche" effect that causes the hash to turn out completely different
 
@Ell because we have good hash functions
 
That might be a completely wrong way to explain hash functions; don't quote me on that
 
@MooingDuck and we have MD5. :P
 
Ell
5:48 PM
I just don't comprehend how it is possible :L
 
@Insilico no, that's good
 
Ell
also, what is the programme that generates the images from a hash?
 
@Ell prime numbers!
 
Ell
how about... sha-3!
 
Ell
5:49 PM
Prime numbers are magical
 
Ell
hmm I just went on that site, but I swear you didn't used to have to sign up
 
@Xeo Just like lossy compression.
It's just very very very lossy.
 
Ell
is there a gravatar equivalent for ssh pubkeys?
 
What?
Ooh.
Yeah, it's called Gravatar.
 
Ell
5:51 PM
Ugh I really don't want to sign up
 
You mean, a way to make images from ssh public keys?
 
Ell
yeah
 
Sure. Hash the key and use the same algorithm as gravatar :P
 
Ell
like gravatar does with md5 hashes
 
@Ell you can pass any string to Gravatar.
 
Ell
5:52 PM
are they 4096 bytes? ssh things?
 
Like this: http://www.gravatar.com/avatar/Scott%20is%20fucking%20hungry.?s=128&d=identicon&‌​r=PG
 
@Insilico I don't think TC++PL is a particularly good book for learning the language.
 
This is cool.
 
Ell
5:54 PM
man, good user experience really makes my day
 
@FredOverflow I didn't suggest the book for learning C++ as a beginner
 
The women at the school today asked me if I wanted to attend summer school, where they teach the basics of programming. :P
 
(removed)
 
I'm hungry.
I'm listening music.
@Ell That sucks.
 
Ell
right my username is already taken, I am not signing up!
 
5:57 PM
k, found a new gravatar for a few minutes
@Ell are you sure it isn't you?
 
Ell
@MooingDuck you mean, have I already signed up? maybe o.O
 
@Ell I've had that problem in the past
 
Ell
I have too :L but no its not >.<
 

« first day (586 days earlier)      last day (4359 days later) »