« first day (683 days earlier)      last day (4491 days later) » 

00:00
Orly?
interesting.
The cool thing about iTunes match is that you can uploaded pirated music. Apple just assumes that you legally own it.
@StackedCrooked I heard MS has something like that now. Anyways, you can do this yourself in a dozen ways. I understand the compellingness of one-click everything, though.
same with google
I can't bring myself to even revive my iTunes account even if only to access the albums I once purchased. That defines the very problem with iTunes
@StackedCrooked And then you sue Apple for hosting pirated music!
00:02
@Drise Isn't that US only right now?
Which Count?
greetings
They likely don't actually retain the song, they just match it to one they have in their library, if they have it, otherwise, they steal yours and make it part of their library.
Work is done for now... I can chat.. yay
I don't have many songs right now. I started my music collection from scratch a number of times in the past few years.
Lol, right my my collection is 843 files.
00:04
25k songs is approximately 100TB. If you gave everyone, even in the us alone, 100TB of storage, that's 3 billion TB
Best album I own is Satanic Panic in the Attic.
I have 4k songs, and I consider myself an audiophile. But I'm also relatively young.
so my collection is not very large
You can only be audiophile when young. Not when you're old and deaf.
I'm dying of old age.
Scott, my 4k of songs take upwards of 30GB
I can't wait until we get unique_ptr at work :( Working with variably-sized objects is just error prone. I guess I could make us a value_ptr...
00:06
My home ripped CD collection is in excess of 400Gb
@sehe O.o My harddrive is only 180GB
Oh yeah? Well all my MP3's fit on my phone!
:-)
@MooingDuck It's on a mirrored volume. On my 5-disk NAS. 2x(2x1.5Tb) + 1Tb system disk
So to round, 5k songs, 35gb is to 25k songs, 175GB. Oh shit. GB not TV, sorry
At my first C++ job in 2005 there was an AutoPtr class that acted similar like std::auto_ptr but it used a boolean member to indicate ownership instead of setting its pointer to null. This made it a safer alternative to std::auto_ptr.
00:08
@StackedCrooked runtime checks instead of compile time, but still safer. I like it.
@StackedCrooked Not really. How often did you make the check?
Still, 52.5billion GB
@LucDanton every assignment/copy I'd assume
@Drise Reality check. Not every US citizen uses it
@ScottW And they can dedup the storage. NetAPP, Solaris ZFS and others will do this without breaking a sweat.
@LucDanton The gain was that after you passed the pointer to another party you still had access to it. That undoes the multithreading use, but that wasn't relevant in the singlethreaded codebase.
00:10
@MooingDuck what year are you living in? I just bought a 256 GB solid state and a 2TB Mechanical
@ScottW I wiped my backup off Amazon S3 to save pennies. I figured I still have the CDs in the bookcase, anyways
@sehe worst case
@StackedCrooked I don't disagree it's a gain, I disagree it's safer.
@Drise Well. Worst case has no relevance to reality. In case 'worst case' is approached they change the T&C
std::auto_ptr makes it really easy to shoot yourself in the foot, the AutoPtr was much less prone to those errors.
00:11
t&c?
@Drise October 2008
@Drise Come on. Who's native speaker here? Terms&Conditions
more commonly referred as eula
I liked tits and cash though
@Drise Nothing to do with a License, really. It's a service
@Drise Me too. But since then, it has degraded to just tits
oh son of a... a coworker and I spent almost a full two days trying to track down a stackoverflow. Turns out whatever it was is fixed by a rebuild >.<
00:14
I need to find a woman. I have needs...
@StackedCrooked It should be safer because e.g. it could help you statically prove a particular algorithm or piece of the program is not incorrect, not because empirically your program happens to crash less often. That is a terrible way to approach correctness.
@MooingDuck when in doubt, make clean.
@Drise come to Vegas!
I'm not saying you're wrong. Just sharing my experience.
Not really my experience with AutoPtr, I rarely used it actually.
Just sharing random memories.
its just as reliable as rebooting
00:15
@MooingDuck You realize that you're building quite the reputation in the field of debugging mishaps, in this room, right?
E.g. a vector of std::auto_ptr will blow up very, very fast. With such an AutoPtr it needn't blow up as fast, and if you wanted to make sure that this is in fact expected you'd need to review, which is no better than using raw pointers.
@Drise I wasn't in doubt, I just assumed I had a bug in my code.
@MooingDuck frown
@sehe I'm aware
@sehe so long as it stays in this room
@MooingDuck To be fair, I have spent 30 minutes compiling and setting up test environments to reproduce an issue that had been reported. Turned out that the software/database deployment had gone slightly awry (in my defense, I couldn't know, and I did notice that the database had been changed yesterday afternoon). Similar stuff.
@MooingDuck Twitter, here I come!
00:18
@sehe heh
Full rebuild can sometimes fix strange issues, like a public member variable declared as const static int n = 4;. If you change the value and do a normal then it could still be the old value in the application.
full rebuilds take forever on my machine, so I have to avoid them. The last time I did a full rebuild of the whole solution, it took five hours.
Also, next time you need to track down a stackoverflow, try stackoverflow.com
CCache can be useful.
@StackedCrooked I love ccache to death. Or Scons --cache
00:19
I laugh at all the newbs who still take notes on pen and paper
@StackedCrooked Your example doesn't sound right.
@LucDanton Should be static const.
@LucDanton If declared in header, I guess. basically, any ODR violation, of course
struct foo { static const int n = 4; }; // declared in header as @sehe mentions.
Clients that use the value have a dependency on the header (presumably), so should trigger a rebuild. Clients that ODR-use the variable (somehow) will be relinked to the new object.
00:21
I ran into the issue one time and resorted to enum since. Later I tried using the static const int again and ran into the same issue again..
@LucDanton 'should' being the operative word
@sehe If a build system cannot handle header dependency, what's the point?
@LucDanton Don't ask me :)
It was Visual Studio 2005.
enum never failed me though.
Hopefully the header dependency model was not at hand then.
00:25
@StackedCrooked I doubt that struct foo { static const int n = 4; }; was allowed, at all. That should have been defined out-of-class, i.e. in the cpp
@sehe That is allowed, even in C++03.
A definition is required however. Well, sometimes.
For built-in types at least.
No, integral only.
00:26
But are you aware that this is a declaration with an initializer, and not a definition?
If the program requires a definition, you have to provide it.
Wokay, I learned the enum { constX = 42 } before that timethough :)
And of course such a definition does definitively not go into the header.
struct foo { typedef std::array<char, 4> n; }; // and use sizeof
@StackedCrooked sure. makes the value implementation defined, AFAICT
It that makes my code non-portable to weird platforms then I can be relieved.
I learned the enum trick from Scott Meyer's More Effective C++. It was presented as an alternative for static const int on older compilers.
00:33
There's BOOST_STATIC_CONSTANT or some such to make sure to use the most appropriate way.
Ell
Ell
November rain <3
@StackedCrooked I learned it on the job. I later read those books, and it'll have been reinforced
@LucDanton Ow. I hate boost macros like that, actually. Somehow reminds me a lot of MFC or something. Frameworks that change 'the language' into something not-so-widely-understood and ugly at the same time.
@Ell You need to adjust the clock settings
Ell
Ell
Haha
We're only September silly.
Ell
Ell
What?
Someone tell me its not actually september
Is it seriously september?
00:45
Eternal September (also September that never ended) is the period beginning September 1993, a date from which it is believed by some that an endless influx of new users (newbies) has degraded standards of discourse and behavior on Usenet and the wider Internet. The term eternal September is a Usenet slang expression, and was coined by Dave Fischer. The term is so well entrenched that one news server calls itself Eternal September, and gives the date as a running tally of days since September of 1993 (e.g., is "September , 1993, the September that never ends."). This server was formerly na...
There are more reliable sources for getting the current date than this site.
Ell
Ell
Oh phew
Like hovering over the time on your OS.
I was going to do something
but then I forgot what it was
Buying cookies?
00:48
no
Ok. I'm just as clueless as you.
hovering over time
how does that work
Endless 8
@DeadMG buying a hamburger? Only 15 minutes walk...
00:50
@Mysticial Aargg..
Watching the same episode, over and over again.
@DeadMG I know it. Solve SHA2
could be it, I did have some ideas about what to do in such respects.
Ell
Ell
@deadmg how's the job search?
don't ask, it depresses me
That hard?
Ell
Ell
00:52
I just dropped my cv at various places
Now need to apply everywhere online
It's hard to find a job that's really interesting and well paid and close to home.
Ell
Ell
That's why you so jobs you don't want to in the mean time to pay for yourself
*do
Ell
Ell
Haha
I need to cut my ratio of dumb jokes.
00:55
I'm sure you've all seen generic Memoize in C++11 before, but I find it a ting to behold:
template <typename ReturnType, typename... Args>
std::function<ReturnType (Args...)>
memoize(ReturnType (*func) (Args...))
{
  auto cache = std::make_shared<std::map<std::tuple<Args...>, ReturnType>>();
  return ([=](Args... args) mutable  {
          std::tuple<Args...> t(args...);
          if (cache->find(t) == cache->end())
              (*cache)[t] = func(args...);
          return (*cache)[t];
  });
}
Doesn't the cache need to be static?
Ell
Ell
Don't know what that does.
a cache of return values?
@sehe Oh god, that's a memoize function? It looks like a bunch of C++ to me.
Ell
Ell
Lazy list like?
@StackedCrooked No, because that'd tie it to the signature only. You want it to tied to the actual function pointer, or you'd be sharing cache among functions with equal signatures
00:57
But the cache goes out of scope every time the function is called.
@sehe Please don't.
Ell
Ell
I thought what @stackedcrooked said
@Ell smartfoo = memoize(foo); x = smartfoo(42, "bla"); y = smartfoo(42, "bla");
Ell
Ell
also static local variables freak me out
^ reads from cache on second eval
@LucDanton I'm just gazing at the code. But, indulge me, what is your complaint for this gimmick?
00:59
How does the cache persist between two function calls?
Function pointer, std::function, std::shared_ptr.
@StackedCrooked it's a shared_pointer, so is even refcounted if the lambda gets copied around
Ah, I see it now.
@sehe Why function pointer?
@LucDanton Ah. Did you ever get around to writing that article on when not to use std::function? I can see how true generic functors would be more generic (+ possibly more efficient)
01:01
@sehe Actually it's about std::function.
But I can really see the convenience of splitting ResultType and Args... instead of using (I think) boost::call_traits?
@LucDanton Typo. That's what I meant
It's still in my aims, but not done yet.
You don't like how using std::function leads to early type erasure?
That's what I would guess.
Ell
Ell
It does?
There's more than one reason, hence why I feel it warrants writing a thorough explanation.
Ell
Ell
01:03
When?
Ell
Ell
Can anyone here sing well?
There's also more than one don't-use-case (as opposed to use case), and I'm more concerned about std::function in the parameters than in the return type.
Used to be in a choir when I was 23-25 years old. But I don't think I'm a good singer.
Ell
Ell
meh I thought you were still a teen
01:07
I get that algorithms like the ones defined in the standard library should not take std::function since that would lead to loss of inlineability.
@LucDanton Phew. I just dug up this reference:
Jul 26 at 15:47, by R. Martinho Fernandes
@sehe Anyway, while Luc writes that rebuttal, I recently wrote an answer where I had to explain this.
Gonna read that tomorrow.
@Ell Scrapes throat. Why?
@Ell I didn't grow up.
@StackedCrooked That.
@sehe That is a working summary, yes. I feel like the details paint a picture of hell though.
Let me sing you the song of my people.
01:09
@LucDanton How poetic. You should co-author it @DomagojPandža - it will be epic
> Don't restrict your callers to std::function. Accept any kind of callable.
That's it? I expected something grandiose!
well
Ell
Ell
I'm hank Marvin!
it's a bit of a moot point, since std::function can be any kind of callable.
Ell
Ell
I'm also listening to apache by the shadows coincidentally
01:11
0
Q: Inprecision on floating point decimals?

stumpedIf the size of a float is 4 bytes then shouldn't it be able to hold digits from 8,388,607 to -8,388,608 or somewhere around there because I probably calculated it wrong. Why does f display the extra 15 because the value of f (0.1) is still between 8,388,607 to -8,388,608 right? int main(int argc...

the only difference between a template and std::function is that one abstracts at compile-time and the other at run-time.
Wth is @autoreleasepool?
I once used that in Objective-C.
@Mysticial "floating point" - "decimals"; paradox there. At least seems like clueless in the wording
@StackedCrooked Oh, it's subjective objective C?
01:12
Yes, that weirdo language.
Ell
Ell
This charming man <3
Do you all have crazy track-switch bots now? Please don't start vaguebooking and posting pictures of your food. Please
What the hell are you talking about?
It's a typo for track-suit bots.
He wants robots to look stylish and bespoke.
01:21
I like my explanation better.
Ell
Ell
It's a song I'm on about
@LucDanton Me too
Ell
Ell
by the smiths
ooooh
apparently, Clang does contain a bunch of super useful functions
it's website just sucks
@DeadMG tell us! Something useful for getting a working Wide compiler?
01:25
yep
I actually, for some strange reason, think it just might work.
but first I require le piss, you know?
Ell
Ell
a slash
wow math.stackexchange.com looks really bad with javascript disabled.
Looks like just pure TeX
mathml, IIRC
mathjax
Ah that's it. Now go take a piss :)
01:32
back from piss
It looks a lot like LaTeX though.
but yeah I had to enable a site called mathjax.com
it's a tex extension
Ell
Ell
"why don't you stand like a regular man, then you can pee in the urinal can"
"If you really wanna know why I'm sitting strong, I just can't stand, touching my dong"
(I sit down when I pee)
courtesy of Tim and Eric
more accurately, "Why don't you stand like a regular man, then you can pee everywhere except the urinal can"
Ell
Ell
Haha I don't like urinals, they smell. I just don't use the bathroom
I wait until I'm home
01:38
there's nothing wrong with urinals because they're intended to not require accuracy on the part of the user, in general
it's regular toilets with the seat up which are more problematic
Ell
Ell
Yeah when people manage to take a dump on the floor somehow
@R.MartinhoFernandes @LucDanton were you aware of this WikiBook: More C++ Idioms, which appears to be written by the same guy from the cpptruths blog.
I've landed on some of the pages when searching in the past but I can't really claim to know the work.
It looks like it could be well worth the read. Perhaps even to join forces. After all, isn't a 'cookbook' style modern C++ guide what the lounge has always (verbally) craved?
> citation needed for allegations of drug use by protocol authors
01:44
BTW. The link with the blog has been confirmed: New book on modern C++ idioms -- Sumant Tambe (2007)
@Mysticial lulz
K gents - I'm going to sleep. Night
Ell
Ell
Nighty night
night
hmm
Clang wants me to give it lots of location data about where things are being included from
02:19
yo dawgs
02:30
this room is full of puppies
hmm
must admit, I thought that once I had looked up std::cout, then asking Clang to ADL it wouldn't be so hard, since it provides an ADL function, but it's surprisingly less easy than I imagined
@DeadMG overall, is it easy to do stuff using libclang?
@mfontanini no.
I'm not using libclang
02:41
arphh
I mean, for one thing, libclang is a crappy C API, and for two things, it doesn't offer the functionality I need
@DeadMG I thought these guys wrote Clang in C++?
but what are you using then? just clang's source code?
Oh, wait, it's an ABI thing, right?
@mfontanini yep
02:43
nice
they provide a method for ADL, but for some reason, it takes expressions as arguments
I thought that ADL was based only on the types of the operands
anyone familiar with apache/django/python and caching? i posted a question in python chat(which is deserted)
@notbad.jpeg you can always post on SO :P
and I used their API to somewhat successfully look up std::cout, and I can get the type of std::cout, but I can't seem to go from std::cout to an expression
@notbad.jpeg Good for the Python chat.
@DeadMG that's weird
02:44
@mfontanini i did, I meant "linked" my SO question into caht
chat*
> If you come into the room and ask PHP question, because we're the only active room at the moment, nobody will answer your question. Even if they know the answer. Unless someone feels like being extremely nice that day. While we all know and use more than one language, we primarily do C++. You might have a chance of getting Haskell or Python questions answered, but know that you're taking a risk.
@notbad.jpeg Straight from the Code of Conduct.
You could wait a while. I mean, you've asked the question 12 minutes ago...
@notbad.jpeg So first, you pissed on the Python guys by dumping your link, and when nobody there replied, you came to piss on us.
@notbad.jpeg Which is exactly what you're doing (but with Python instead of PHP).
lol sorry, usually the guys here are serious wizards and know python as well
02:46
@notbad.jpeg usually?
I don't recall seeing you, and I'm technically a regular.
We are dark wizards. We like to kill kittens and stuff.
yeah, i've posted about python or sql in here and people moved over to that chat to help me out
Ok guys, who helped him? You've set a bad example.
@EtiennedeMartel lol
twas over a month ago... but i see us inferior python coders aren't welcome in this chat :'( so ill head back to my safe place
02:48
But anyway. I guess you're not exactly breaking any rule, since you did not really ask a question, and you're not annoying yet.
@notbad.jpeg I like how you assume things based on things I never said.
well, let's be honest, if you thought python was better you'd probably be over there helping noobs like me to promote the language
The thing is, even though some of the people in here might know python, your question is very specific to memcache + django.
Yeah.. I know Python.. but not django.
@notbad.jpeg Ask on SO proper?
@notbad.jpeg That would be true if I wasn't too lazy to actually bother learning Python.
alright, well thanks for considering helping me even though i broke the CoC lol. But i'm gonna go keep debugging while i wait for my question to get some feedback
02:51
And I never really needed Python anyway, so.
@notbad.jpeg That's the best you can do. Also google a lot.
everyone needs python.
Except .NET developers.
I only use Python for quick scripting that take a lot of LOC in C++
02:53
but thanks for the tips on the chat so that i dont piss off anyone who's not trying to get interrupted in here ;)
cya
Yeah, mainly parsing some stuff or doing some http stuff.
you know, I can't possibly expose every expression that I might encounter to Clang.
03:19
What category do stuff like ios::app and ios::out fall under?
Under ios_base openmode
@Rapptz is their a list containing them, like ios::out and ios::app
@Rapptz because i looked alot and cant find one
en.cppreference.com
@Rapptz found it
@Rapptz Im going to learn C++ from many books (C++ without fear, Accelerated C++, and C++ Primier) Each time starting from the begining to ensure i have full mastery of the language. Do you think that it is a good plan?
03:37
I learned via practice, to each his own.
I wouldn't read beginner books every time though.. that's kinda redundant.
@Rapptz I found that each book has its different view on the language,
@Rapptz C++ without fear , isnt the best book, Im starting with it, It is forcing me to go out and find answers for myself
@Rapptz C++ Primer is a book to make a very strong foundation, And Accelerate C++ makes you apply C++ in the best and most consice way possible

« first day (683 days earlier)      last day (4491 days later) »