« first day (444 days earlier)      last day (4725 days later) » 

11:00
@TonyTheLion The Tiger?
@thecoshman oh yes, that one :P
Xeo
Xeo
@thecoshman And the third personality, the Liger
sbi
sbi
@thecoshman Haha, ! had the exact same thought!
@Xeo Uh oh. Now that is a beast!
so you guys miss The Tiger in me?
sbi
sbi
@TonyTheLion Ooch, I just thought you're following OSX releases.
11:01
¬_¬ you use that pitcher too much...
@sbi oh, if I am, it was entirely unbeknownst to myself
lol\
I kinda like it, cracks me up
sbi
sbi
So, shall we put that list I wrote down into the newbie hints? With or without the Dick Rule™?
Q Q
m
||
@sbi with Dick Rule
@sbi I say INCLUDE ALL THE RULES
sbi
sbi
@thecoshman That's you. And what do the actual regulars say? :)
@TonyTheLion Ok. Anyone else?
11:04
@sbi yea my other me also says the same
@sbi ¬_¬ 'regulars'...
sbi
sbi
@TonyTheLion Ok, then I'm overruled by two other owners.
@sbi you might need to ping them
Xeo
Xeo
I'm fine with either. Really, the dick rule is common sense
sbi
sbi
@TonyTheLion I did 10mins ago. I'm not their mother!
Xeo
Xeo
11:05
But common sense doesn't apply to everyone, alas.
Include the dick rule +1; it conveys the spirit in which the list is.... erm... governed :)
Also, more fun is fun
@sbi you could be, on this chat anyways :P
sbi
sbi
@TonyTheLion Now look at that picture you posted. Does that guy look like a mother to you?
DICK RULE: BE A DICK = GTFO
4
@sehe in that case... we might need to a few more rules
Xeo
Xeo
11:07
@sehe "The more the merrier"?
Xeo
Xeo
@TonyTheLion "TITS OR GTFO" FTFY
hahah
@Xeo don't remember what TITS stands for?
sbi
sbi
@Xeo Yeah, right. Who wants to see dicks here?!
@TonyTheLion Boobs?
@TonyTheLion Trotters Independent Traders
11:08
lulZ
"TITS XOR GTFO" seems even more practical
reference that people who do not watch British comedies ... win!
@sehe "TITS, GTFO" FTFY
or perhaps "TITS; GTFO"
my understanding of ',' in C++ is lacking
**tits** :
Women's secret source of power over men. Having the right tits often results in social and economic gain.
Xeo
Xeo
@TonyTheLion multiline markdown 17 : 0 users who can't remember / read the newbie hints
it's 17 now
it was 16 yesterda
11:11
@Xeo ugh
sbi
sbi
@Xeo It was 16:0 yesterday, it's 17 now at the least!
Xeo
Xeo
@DeadMG fixed
I need an automatic counter
sbi
sbi
@DeadMG Damn!
how do I set all bits in a huge std::bitset to 1?
sbi
sbi
So this is it then:
1. Frequent users are likely to become owners, although actual ownership is by the discretion of the owners.
2. Frequency is determined by the frequent users tab.
3. We are lenient with kicking people off, but whoever falls off the frequent users list might be kicked off at any time.
4. Whoever behaves badly might be kicked off by the discretion of an owner (a.k.a The Dick Rule™). Bitching about removal according to these rules counts as bad behavior and might prevent you from getting back on the list.
11:12
ok, something else, anyone good at Discrete Cosine Transform type math?
@Xeo For a moment then... was wondering what the devil you needed an AtomicCounter for...
Xeo
Xeo
@rubenvb bitset::set() sets every bit
@sbi bitching about removal? two people seemed to agree with my post
@Xeo k thanks
11:13
@Xeo set ALL the bits!
sbi
sbi
@thecoshman Better?
@thecoshman OMG. Yawn.
KILL ALL THE MEMES!
@sbi half tempted to ask for more and more ridiculous things... but I will jsut settle for that.
@thecoshman How bout bitching about bitching about removal? :)
@sbi :(
@StackedCrooked meta bitching?
sbi
sbi
11:15
@thecoshman I have no idea what "jsut settling" refers to, but it sounds like fun.
@StackedCrooked then what else would we talk about?
sbi
sbi
@StackedCrooked You ought to do that at a room over at the mad house.
@sbi typo
sbi
sbi
@thecoshman Typical.
@sbi I tiep engilsh grate
11:18
@sbi I think people should retain the right to bitch about being removed.
Does any one use the desktop notification?
Xeo
Xeo
@StackedCrooked not bitch, but object
@Xeo Ok, that's what I mean.
@StackedCrooked sure bitch away, just don't expect to be made an owner again any time soon
@StackedCrooked They can bitch - on my ignore list :)
sbi
sbi
11:19
@StackedCrooked No. I think they have the right to object, but not to bitch.
@Xeo Damn!
Xeo
Xeo
The ape is slow today.
@Xeo ... today? :P
Xeo
Xeo
Must be the age. :P
ape age. ace!
@Xeo Or strict sequential processing.
11:21
@StackedCrooked coupled with a FIFO list
and bandwidth throttling. A.k.a. old age :)
@sehe the worst kind of throttling
Bitches
Did anyone try to implement any policy patterns?
11:27
'Do you want to leave Java'... if only it was that easy
@user800454: for the sake of it? no.
@user800454 In actual life, yes probably. What's the case?
sbi
sbi
@Xeo Or maybe that I was doing something useful?
@sehe the pattern is a really strong conecpt I can have diffent implmentaions kick in just by adding an argument when I instanciate a template. So the code is really easy to use. I was wondering how difficult this would be to implement in real life
Not at all. We usualy use traits/strategy/mixin by way of template arguments in C++. What's the concrete case?
There was an article on altdevblogaday about a policy based logger in C++.
11:34
@Nils policy based? what do you mean?
design
The concrete design is a little technical but it is in prociple a risk managament system, where I allow for optimization for realtime risks vs. end of day risks these needs different designs. But I can also imagine it on a lower level like for example the logger mentioned.
@thecoshman a logger you can customize by specifying different policies it should follow, as the name implies
There are numerous examples all around. Perhaps an early epitome of that is the (in)famous ATL library, but most of Boost uses policies all around the library (custom deletions, allocation, string comparison, regex flavour, buffering on streaming iterators etc etc)
@user800454 you seem to be veering to computational policies, I'd call that a Strategy, intuitively. Have a look at the many excellent Maths-oriented libs, such as Blitz++, but also Boost Graph Library.
They use strategies/visitors/... to plug in different traversal orders, evaluation functions (dynamic graph edge weights... e.g.) and I presume even different handling of floating point precision and error handling
11:40
I see so it is just a matter of keeping a common interface and then plug in the implementaion later as a template specialization?
sbi
sbi
@Nils have you seen this one?
@user800454 So I'd suggest starting with something more mundane (like e.g. the logging, or just the confirmation style for a UI). You'd get some exercise and see where the 'tough corners' are. Then move on to your subject
@sbi nice!
@sbi No, but it looks interesting, thx!
so... is it more then what I have done with my logger... you pass in a message and level. the logger will then look at the level to decided if it should ignore the message, display it console, write to file or use a custom callback function. All of which can be set for each level... so you could right to console the lowest level, whilst ignoring the highest
11:42
@user800454 Not necessarily a specialization, but yes that could be a mechanism. I'd be wary of the sense of 'postponing' the actual implementation of the algorithm guts which is subliminally reaching me in your wording
@sbi sites that look that dull often excite with the prospect of actually spending there time working on the product first and foremost
@sbi the logger is not tread safe a show stopper for me
You should very much design these to work well together (general 'driving' framework and the implementation plugin). It is just the regular wisdom: Early Integration, Ship Early, Unit Testing and Refactoring; If you postpone the 'actual' work to the end, you could find yourself with a lot more work than necessary
oh Christ... I knew I didn't like cold coffee... but I didn't think I would actually start to gag on just a last sip from my mug... I might actually be highly allergic to not hot coffee
@thecoshman The last sip might contain some sediment.
11:46
@thecoshman I had the same reaction to the first sip of my coffee at work yesterday. I had been out of the office for the holidays. I guess (a) the coffee machine had been sitting idle, boiling the same water (b) my taste had recovered during my leave :)
@StackedCrooked oh, I rarely go that extreme with my last sip, and not in this case, was just a tiny bit of nasty cold coffee
@sehe third cup today :P just really can't stand cold coffee
@user800454 What, the threading model is not a policy? That reminds me of an excellent example: Concurrent Data Structures (libcds)
LibCds implements lockfree data structures and has pluggable garbage collection schemes (including noop-gc for performance), threading models (Win TLS, pthread) etc. etc
Xeo
Xeo
@sbi I remember seeing you posting it on GameDev.SE before?
The nice thing is, they used template metaprogramming to cover all the combinations in unit testing. Really nice stuff.
@sehe when you say threading model, you mean threading API?
sbi
sbi
11:52
@thecoshman I don't think anything has been done to that project in a while.
Both, as far as I remember
just so I understand what you're talking about :)
Xeo
Xeo
@sbi > I haven't found much time to work on this in the last months (that's why there haven't been any new releases).
sbi
sbi
@user800454 All it takes is to create a thread-safe (preferably non-incremental) write policy.
@sehe ^
@Xeo :)
My own portable logging framework stems from 2004-ish and needed to work on AIX 5.3 (xlC++ 7.x IIRC)/Win32 so boost was out of the question. I had to roll a smart-pointer for the purpose, as well as a portable TLS wrapper... It had pluggable threading model, though, as well as pluggable everything. Shame about the platform requirements back then. I'd not use it again now, implementing this stuff on a modern compiler would be much more straightforward.
11:57
How many bits would a bit-set byte if a bit-set could byte bits?
Xeo
Xeo
@thecoshman I'm having trouble parsing that...
@Xeo have you tried a recursive regex?
lulz
I wonder, is there any meme originating from this room, that made it on the interwebs?
considering the quantity of memes and the quantity of generating interwebs, it's fantastically unlikely
Hmm, my bitset<32768*32768>s are exhausting my memory :(
12:02
yeah, they're only 740MB a pop
although 6 of em should just take: 32768^2 *6 /8 /1000000 = 805 MB of memory if I'm not mistaken?
no, they're 740MB each
sbi
sbi
48 mins ago, by sbi
KILL ALL THE MEMES!
@sbi nice one.. thread policy means lock averythig when you don't know the code.
no, wait, I forgot that they're bits, not bytes
is bitset defined to use packed storage?
12:03
@DeadMG yeah, idd, that's why I'm using bitsets ;-)
if they don't use a bit per element I'll need to pull up std::vector<bool>, and then @sbi will try to shoot me
also, approximating KB and MB as 10^3 and 10^6 is increasingly less accurate
it's 552 MB
so it should work if the bits are bitsize right?
so for vector<bool> it should work?
sbi
sbi
@user800454 Not in this lib. It defers the evaluation of the parameters until a message has passed all the filters. Then it formats it, and then it's written. (Incremental write policies allow mingling of formatting and writing for the sake of efficiency, but they're hard to make thread-safe.) All you need to do is to make the writing of the log messages thread-safe. For that all you need is a thread-safe writing policy.
hmm
I need to change my function ending syntax
sbi
sbi
@rubenvb I'm a piece-ful gorilla. I don't shoot anyone. I just rip their heads of.
12:07
@sbi well, as it stands, bitset is pretty useless to store lots of boolean values.
I'm probably doing it wrong, but hey... it's C++ for something
DAMN - *uck virtual destructors - lost 2 hours chasing a phantom memory leak - turned out to be due to missing virtual tag
it shouldn't be hard to write your own bitset
I mean, logically, it's just a giant array of char
What's wrong with bitset?
sbi
sbi
@Potatoswatter: If you're here because you were mentioned, this is where the fun started.
@Potatoswatter it's size is not num_of_elements*1bit
at least for libstdc++
vector<bool> is nice and tiny
sbi
sbi
12:11
I resolved to read more books this year, so I spent this afternoon searching through #Skyrim for a copy of The Lusty Argonian Maid to read.
:)
@rubenvb Compile time => bitset. Runtime => vector<bool>.
But vector<bool> is not nearly as tiny as bitset.
@Potatoswatter well, I can create and populate a vector<bool> of 32768^2 elements, but not a bitset with the same size...
@rubenvb Sure you can, why not?
Pretty sure I created a bitset of a gigabyte once for a prime number program.
@Potatoswatter not on my 4GB machine
6 `vector<bool>`'s take up ~700 MB (along with some other small stuff), a single bitset of the same size makes my machine crawl.
@Potatoswatter: whay C++ standard library are you using?
((2^15)^2 bits) / (8 bits/byte) = 2^27 bytes = 128 MB. What's wrong with that?
@rubenvb I was using GCC 4.2
12:16
@Potatoswatter I'm on 4.6 and it seems to not work as you (and I) expected.
hold on, it's cc1plus that's using all the memory
wtf?
Stupid compiler. Let's try Clang.
oh, dang. Clang has broken constexpr, I forgot
So what's happening? GCC won't even compile your program? You should report a bug.
yeah, clang++ compiles it
but it crashes at runtime, probably flaky windows support stuff
O_o I'm guessing something besides bitwise arithmetic is crashing.
sbi
sbi
I dunno, but creating a virus to fight virusses seems a bit, um, dangerous, no?
well you certainly can't allocate a 100MB bitset on the stack
@sbi seems like a great idea to me
12:30
@DeadMG There's no set limit on stack object size. It's set by the ABI, and often by a configuration flag in the executable file.
fundamentally, we need to use our most powerful weapons in this scenario, and if that's a virus, then it's a virus
@Potatoswatter Sure, but on Windows, its' 1MB by default, and on Linux it's only about 8MB by default
What better way to collect information about viruses than ride alongside them?
I know of no implementation that would commit 100MB by default
@DeadMG And both those platforms allow it to be increased arbitrarily, no?
I actually don't know about that
but more relevantly, you'd have to explicitly set the stack to just over half a gigabyte to explicitly support the creation of 6 bitsets of such size
if you were stack-allocating the whole memory of it
so you would have to explicitly do it yourself
12:32
Anyway… if you need such a large bitset, I think it's more common to make it a static/namespace scope variable.
A network virus can only spread if there are security leaks in the network. This counter virus needs to reach the hacker's computer. Which is likely to be well protected.
Unless you find a buffer overflow in the virus' phone-home signal. But that's not what I was thinking about. It just depends what you want the countervirus to do.
wait, you tried to put those bitsets on the stack?
guess that explains it. vector<bool> allocates it on the heap
@Potatoswatter arbitrarily, as long as memory is available. Since the stack has to be contiguous, sooner or later you'll bump into something else, and be unable to grow the stack
then it'll just crash
@jalf Haven't they worked out the ABI/OS tricks to make noncontiguous stack? Anyway, stack grows down from a high address and everything else grows upwards from a low address. Problem solved.
@Potatoswatter no afaik. Why would they, it's such a rare problem
@Potatoswatter and memory mapped files and executable images and libraries go somewhere in betweenish
problem not solved :)
12:42
@jalf I thought there was a security reason.
@Potatoswatter hmm, not that I'm aware. they randomize the heap layout, and the address executables are loaded into
but never heard of anyone making non-contiguous call stacks
having a hard time seeing how it could work, short of some major reengineering of, well, everythnig
@jalf Memory mapped at runtime should be allocated the same way as the heap/malloc. Executable images can go anywhere.
@Potatoswatter In practice, they don't. Afaik, OSes typically have a handful possible addresses they switch between
not sure why
anyway, point is that the address space is certainly not as neat and tidy as that
The stack starts from some set address and grows downwards, sure, but it's doing so in an address space pretty much littered with random junk
and the heap certainly doesn't start from the other end and grow upwards
I dunno. But I'd be surprised if any modern OS really couldn't give you a 200 MB stack.
ah, ok, bitset puts everything on the stack. That's maybe why the clang binary crashes. Still doesn't explain why GCC uses humongous amounts of memory.
Let's ideone the thing.
12:48
@rubenvb it kind of does. The compiler doesn't expect you to put huge chunks of memory on the stack. It certainly won't be optimized for that, and so it might just perform some optimization or something that scales very badly in that case
or it might just be a bug no one has fixed, because sane people don't put half a gigabyte on the stack ;)
damn
why is it I'm so dissatisifed with my grammar?
It doesn't put it on the stack. It puts it inside the bitset object, which you should put somewhere sensible.
well, in my defence, I didn't know bitset was stack-allocated.
12:50
it's a statically-sized container
@Potatoswatter yeah but he puts the bitset on the stack, so its contents will be on the stack too (indirectly)
the point of statically sizing containers is so they can go on the stack and such
So… make it static or use unique_ptr< bitset< gajizillion > >
yeah
@DeadMG because you need a break from it. Come back in a month. Work on a different aspect of your language. Toy a VM together - see your hello world compile. That will bring back the motivation (remember what its for)
12:57
what's the advantage of std::vector<bool> v(N) over std::unique_ptr<std::bitset<N>>?
@rubenvb the vector is resizable
@DeadMG You wish, hah! you my grammar had.
hmm, don't need that.
I'll have to access the bits by ->[] or something though
The vector has iterators.
ok, evil abomination-vector it is :)
is a std::array also stack-based?
12:59
@rubenvb You can just take a reference to the bitset and use that.
Xeo
Xeo
of course
@rubenvb Not stack based, the data is just stored within the container object.
yeah, well, that's what I mean. It's a scientific simulation program, I'm not going to write fancy classes and templates for this. Just +,*, and container stuff.
Xeo
Xeo
std::array<T,N> is basically and effectively a T elems[N];, just without all the C style array implicit conversion shit.
@rubenvb For a scientific simulation program, make it a global, namespace-scope object!
13:01
Oh my. I'm starring that!
wy should I use a frigging namespace in a one-file program?
@sehe True, I should just forget about it and work on processing the AST
@rubenvb You don't need to declare a namespace, use the global namespace XvD
Xeo
Xeo
3
Q: When has RAII an advantage over GC?

user844382Consider this simple class that demonstrates RAII in C++ (From the top of my head): class X{ FILE *fp; X(){ fp=fopen("whatever","r"); if(fp==NULL) throw some_exception(); } ~X(){ if(fclose(fp)!=0){ //An error. Now what? } } } I can't...

13:03
Seriously, this paradigm has powered Fortran for millennia.
Fortran code makes my eyes bleed.
Much like Boost
Yeah, well, it's fast. No need to mess with the memory layout.
I'll stick to Matlab (and if necessary, like now, C++)
Matlab = fortran without teh fast.
13:05
it has awesomely fast matrix ops
you just need to line up the dimensions of your inner loop, make it a matrix multiplication and bam, 10x speed up (true story)
although it has its suckiness too :)
@sbi Hello, I have no opinion one way or the other regarding room ownership.
oh, I could tap into OpenMP
although vector<bool> could mess with that if it's evil enough....
is libstdc++'s mersenne twister good? Or is it slow or buggy and should I just use GSL?
@rubenvb 10x speedup relative to its regular crappy speed, sure
matlab is slowish even when you do it right. It's just not incredibly slow, as it is when you do it wrong
Did anyone try out the parallel memory allocator from Google? code.google.com/p/google-perftools
13:22
@user800454 you mean tcmalloc? Yes, loads of times
Policy design is just a way of postponing in the implementation of the algorithm, allowing for simpler use, optimization for special cases and turning on and off functionality.
@sehe that Concurrent Data Structures (libcds) link is interesting, I love lock free algoritms.
13:37
@user800454 I think I largely agree with this lovely, no-nonsense description.
@rubenvb vector<bool> is simply incompatible with openmp, if I remember correctly
@sehe dang, how about unique_ptr's and bitsets?
user142019
Please do not talk about me while I'm away. :p
@rubenvb I'm finding out
@sehe yes, TCMalloc. How does the Google performance tools compared with their claims in real-life?
@WTP with regards too...?
13:49
hmmm, 4,5 million pseudorandom numbers are... a lot.
user142019
Last night two guys talked here about me. @sbi and someone else.
@user800454 in real life I get approx <10% performance gain especially in concurrent scenarios. Never seen a degradation. But it doesn't play well with valgrind
user142019
(Don't take it too seriously.)
@user800454 Seen much higher improvements with synthetic benchmarks, though
could the bind be slowing me down or is there no better way than this: en.wikipedia.org/wiki/… ?
13:54
@rubenvb I was 'sort of' wrong. See ideone.com/p46mO : is an interesting benchmark
so it may be a bit of a long shot... but by any chance does/did any one here frequent the programming forum on newgrounds?
@sehe isn't that just completely optimizing everything?
@rubenvb So, openmp is compatible with std::vector<bool> but ... vector<unsigned char> is roughly 5.6x faster with quadcore.
@rubenvb how could it? I'm accumulating all elements using xor
and doing nothing with the result?
It's taking a long time :) Ah, I'm compiling -O0
13:58
that's not really representative IMHO.
Duh. Tell me something.
heh, interesting. void foo(); void bar() { return foo(); } is legal. But if bar is a constructor instead, it doesn't compile
@sehe vector<bool> is ONLY faster when memory bandwidth or cache is critical.
13:59
I guess it kinda makes sense, in a way. Just not very generic. Means I have to treat the ctor as a special case
@jalf well... obviously... assuming foo is a member function, you can't call it till after the object is created can you
@thecoshman nah, I mean if a function is declared to return void, then inside it you can have return someFunctionWhichAlsoReturnsVoid()
@Xeo: yeah that's my code. I was using ideone as pastebin only. You're not supposed to be running it there for any benchmark.
but you can't do that inside a ctor
@jalf year... that makes sense, because the outer function will return the value of what ever the inner function returns... so if the inner function returns a void, the outer function can return that void
I think you are having a bit of a brain fart @jalf
Xeo
Xeo
14:01
@thecoshman It doesn't return anything, by definition
Same with a constructor
I guess it is just simplistic parsing, the return type of that function is void, thus it matches the retrun type of the outer function
@thecoshman yeah, but it just seems kinda odd that functions which return void are treated differently than constructors which return.... uh, nothing
a ctor can't call member functions can it
but in both of them, you can simply do return;
@thecoshman yes it can I believe. In the constructor body, the object is fully initialized (ie all members are available)
14:03
class test{ test(){ foo(); } int foo(){} }<-- legal?
@sbi TBH I don't really care. Ownership is really just about setting the topic from time to time.
yeah, regular member funcs are safe. Virtual ones, less so :)
@thecoshman if you put the foo declaration before the constructor I guess so.
@rubenvb Order is irrelevant inside a class.
@CatPlusPlus that
14:05
@rubenvb When outputting volatile cumul and compiled with -O3 -fopenmp, the vector<bool> case (13.9s) is 2.6x slower than std::vector<unsigned char> (5.3s) (see updated code ideone.com/p46mO)
@CatPlusPlus k, nvm then. I leave such things to the compiler to judge :)
@sehe that's quite acceptable really. I gain 64x more entries per N*N "matrix"
vector<bool> is rather aggressive space optimisation, do you really expect it to not be slower? Tradeoffs, tradeoffs.
4
wait, you used vector<bool> for performance reasons? It's there to save space, not to speed things up
64x? My point is you might be better of coding your bitmatrix as a vector<unsigned char> so openmp will understand better how to do the loop scheduling. Of course this means more coding.
@jalf The way I remembered it did not work iwth openmp, which is what I was checking.
@sehe but a smaller total size, which is scientifically relevant for me here. bool = 8 bits, N² means 8x8=64 times more space
14:08
Yay, another random downvote from a singleton lover.
@rubenvb coding your bitmatrix -- not more space :)
So, vector<bool> sucks. What else is new.
@CatPlusPlus point them to this if they think they can provide a solid reason why singletons are great
16
Q: Purpose of singletons in programming

thecoshmanThis is admittedly a rather loose question. My current understanding of singletons is that they are a class that you set up in such a way that only one instance is ever created. This sounds a lot like a static class to me. The main differnce being that with a static class you don't / can't insta...

@rubenvb It is quite acceptable, to state the obvious again.
@thecoshman That post has link to Jalf's article in the comments.
14:09
@CatPlusPlus I was just checking my memory of prior experience with vector<bool> + openmp. Valid cause. Outcome: it's ok (now, note that is OpenMP 3.0 + GCC 4.7.0)
but now to find a way to put my rng in that parallel for loop...
Really? A video?
The video looks stupid. But it's the best I can do for now.
With writing text in text editor?
14:11
yeah, lol.
And wiggling your mouse around text like a maniac?
Just write it as text.
not to mention the low quality.
is there nothing better for a parallel rng? stackoverflow.com/questions/3405526/…
Yay, spelling mistakes.
Really, this is just silly.
It's all those stupid programming casts with any justification for making it a video removed.
You can't copy code from video. You'd think people would understand that.
damn. I've got half a mind to delete the damn video now.
14:14
Just half?
I don't know who has the other half then
WHO WAS PHONE?
@CatPlusPlus ?
Nevermind.
damn, my drawing at 3:35 is idiotic.
14:20
Sorry, but the entire video is. It's not a material for a video.
that's it. i'm deleting it.
wonder why I made it.
deleted.
@IntermediateHacker mmm can't say that is a bad idea. On the bright side: your language has 0 defects according to google-code
@sehe seriously? you reviewed it?
1
A: C++ for C# Developers

MuhammadBelieve me pick a good book on C++ (there are much more, just do a search) and start learning...

0
A: C++ for C# Developers

scardazziSyntax differences are strong, but the semantics are pretty much the same since both are object-oriented languages. However, when it comes down to the platforms, they have critical differences which I advise you to check, otherwise you'll have trouble tackling on some issues like memory managem...

What.
I don't know what he's smoking, but it must be strong.
14:30
feel free to upvote my answer whilst you're there
"However, in practice the main purpose of singletons is to make people feel less bad about having global variables." - that gets an upvote from me
@Eloff sadly the other part of his answer deserves a downvote
these guys are writing comic books to raise funds for free quality education for children.
@jalf The db pool example? What's wrong with that?
Can't you just have a global for the pool? Why a singleton?
14:37
also, I sure hope that you never want more than one pool
@Eloff I meant his claim that the purpose of a singleton is to make it easier to later create more than one instance
but the pool example too
I'm too tired to discuss Singletons again.
You might only need one pool
@FredOverflow factories or static class also work well
but it's certainly not a universal rule that having more than one pool is going to be an error
14:39
true, there could be uses for that I suppose
Anyway the whole singleton pattern seems to me another way of saying that the designer of the class knows more about your problem domain than you do. I don't like that (but then I don't like private variables/methods either.)
wow, libstdc++'s mersenne twister is a lot faster than Windows' rand().
@Eloff not just that he knows more about the domain than you do, but more than you will ever know
and that's a pretty ballsy claim to make, and it's practically always wrong
@jalf agreed
that's a pretty good way of putting it, btw. Thanks for that one :)
@IntermediateHacker mmm I'm looking at it now. Funny how test.cs has inconsistent line-end characters, and a trailing unbalanced } bracket ...?
Also, the .sln file is missing.

« first day (444 days earlier)      last day (4725 days later) »