« first day (775 days earlier)      last day (4172 days later) » 

1:00 AM
everything else: don't inherit
 
I wouldn't for code that anyone else would ever see :(
 
@ThePhD I posted an arena allocator earlier. You could use that as a basic template.
 
@DeadMG actually, he should just use that.
 
yeah
that would also directly solve his problem, it must be admitted
anyway, that was about a bajillion times easier than I expected
I'll start using that now
 
@MooingDuck But then I don't learn anything, so just going to make a Pool first.
allocate() always requests number of 'T', right?
Not number of bytes?
 
1:05 AM
right
 
Okay.
 
I think
been a while since I did that
but if I recall correctly, the allocate and deallocate functions are different... I once had trouble with them
 
deallocate should just pass a pointer and maybe a size, right?
 
Roses are black, violets are black. I'm blind.
I prefer "evaluation copy"
 
"Borrowed it from a friend."
 
1:11 AM
@ThePhD It's a pointer and a count of T, I believe.
@ThePhD Borrowed it from (a friend)^20,000
 
"I wouldn't have paid for this game anyway"
"I'll buy it when it's 5$ on steam"
 
"Permanently in Evaluation period"
 
Ell
I wonder how the whole piracy deal will be solved
 
@Ell Never.
 
it won't be
 
Ell
1:13 AM
It will
 
@Mysticial Sounds like a really cranky woman
 
fundamentally, users will always be several steps ahead of content makers, because it's simply not technically possible otherwise
 
Ell
It has to be
 
@Ell How do you know that, yet wonder how?
@Ell For whom?
 
the only way it will possibly be solved is if content makers just accept piracy
 
1:14 AM
The only way to eliminate piracy is to do everything server-side.
 
not all actions can be performed on the server
you can't show a film to a user from the server, or play music
 
@Mysticial And that only solved software piracy as in computing applications
 
Ell
For the companies to make money, the rate of piracy increase must be at least slowed else everyone will do ot
 
@DeadMG Right, I forgot about non-interactive media.
 
Ell
Also ahh I think I just jammed winegum into a cavity in my tooth
 
1:15 AM
@Ell "or else" - ... nuttin really
 
@Ell That's not really true.
people cry about piracy, but when you look at the revenues for various industries, they've done nothing but gone up.
 
People pay for convenience.
 
there are more than enough people willing to pay for content whether they have to or not
 
Ell
Maybe. Well time will tell anyway
 
Four temperaments is a proto-psychological interpretation of the ancient medical concept of humorism and suggests that four bodily fluids affect human personality traits and behaviors. The temperaments are sanguine (pleasure-seeking and sociable), choleric (ambitious and leader-like), melancholic (introverted and thoughtful), and phlegmatic (relaxed and quiet). The Greek physician Hippocrates (460–370 BC) incorporated the four temperaments into his medical theories. From then through modern times, they, or modifications of them, have been part of many theories of medicine, psychology and...
 
1:17 AM
agree
 
@LuchianGrigore, Bit late now, but I think the main thing for me is that I feel the need to make any answer I give fairly large compared to the core idea, whereas I'd just give the idea in the comment, and maybe expand on it in edits.
 
if I was in power, I would legalize "piracy".
 
^ Phlegmatic would be the word
 
Ell
Do we have software patents in the UK?
 
@chris yeah, that was the main consensus over here as well.
 
1:18 AM
@DeadMG Monetize it, even. Just coordinate it better. Problem transformed into solution
 
Ell
@sehe monetize piracy? :P
 
@Ell Lots of people have done.
 
@Ell Well, that already happens on a large scale
 
@Ell Unfortunately, yes.
 
@Ell Just not always the content owners/creators who benefit. Yet
 
Ell
1:19 AM
Is this like rapidshare pro?
 
I think that as more of them wise up, more of them will benefit
but there are already plenty of ways to benefit from piracy
 
@Ell Do you think PirateBays are charities?
 
allocate() expects the data returned to be contiguous, right?
 
@ThePhD Allocators?
 
@ThePhD Yep- unless you did some funky shit with not real pointers as ::pointer typedef.
 
Ell
1:20 AM
Well they get ad revenue but can't see how else
 
@Ell Simple: Promotion.
 
@sehe Yeah, I'm making a pool.
Because {reasons}.
 
there's no faster way to promote your shit than to give it away for free and let anyone share it with anyone else.
 
@ThePhD std::pool<blood>
 
@sehe std::pool<blood> ofmyenemies;
 
Ell
1:21 AM
Yeah but then you have to make money in ways other than having access to it
 
@Ell If you want convenience, you'll pay 25$/month for a UseNet account. That's pretty big money IYAM
 
IYAM?
 
@Ell Yep. One of the super-famous authors did it when he had a sequel coming out.
 
Where do you guys get all these crazy shorthands?
 
turned out to be a big profit-winner
 
1:22 AM
@ThePhD FYI, GIYF
@ThePhD By not growing longhand
 
Ell
Dim Pool(of Blood(of MyEnemies))
And hmm that's interesting.
 
ew, get out
 
VisualBasic... wat.
 
@Ell Wat? Because it smells of Lisp, while sucking more?
 
Ell
actuslly I bodged that up a bit but I ceebs
 
1:23 AM
Wow. Ell drunk, again?
 
Ell
@sehe I mean the piracy thing - it will be good when we get a system benefirtting everyone
 
Ell
I am not drunk :3
all I have had is leftovers of a teaspoon of burned away absinthe and sugar :P so the alcohol would have burned off anyways
 
damn
 
Ell
And like a cap full of jack Daniels. Really, nothing at all
 
1:24 AM
it was one of the really famous authors, like Terry Pratchett or something
 
Ell
Jk Rowling?
She makes le big bucks
 
no
 
As far as I know, It's not illegal to possess and use pirated content. You just can't distribute or profit from it.
 
male
@Mysticial Depends on where you live. Plus, everybody in a BitTorrent swarm is a distributor.
 
Ell
Hmm
 
1:26 AM
Oct 12 at 22:12, by Ell
Sues a common wgir
 
@DeadMG At least in the US. I'm not sure elsewhere. But even then, I'm not 100% sure on that in the US either.
 
Ell
@deadmg Thats a good point actually, I often forget you upload as well as download when torrenting
 
Oct 12 at 22:12, by Ell
Her evwtrrbovy
 
Xeo
@LucDanton That'd work aswell, I guess. Just some kind of "volatile" storage that can't be used outside the full-expression it was created in. I can't see any immediate disadvantage of going that route for whatever type the range is, but I may be overlooking something, like an optimization for forward-range or better.
 
@DeadMG Yes, which makes Bittorrent a bit more risky.
 
1:27 AM
@Mysticial There are firms which farm BitTorrent IPs.
 
Xeo
I'm just thinking that I need to go through every element anyways, so might aswell treat them all like single-pass ranges.
 
They log into the P2P network for that torrent and just mine IPs, then they ship them out to lawfirms if they want.
All for profit, of course.
 
Ell
Ahh that is embarrasing.
 

Ell Drunk

Oct 12 at 22:12, 2 minutes total – 25 messages, 5 users, 2 stars

Bookmarked 47 secs ago by sehe

 
Ell
Also I can't seem to spell
 
1:28 AM
@Ell ^ this is ^
 
@Mysticial that's good, b/c I have tons of that.
 
@ThePhD Yeah, I've heard of those. But they need more than an ip though. Just because someone is on a swarm doesn't mean they are distributing anything.
 
Mmmhmmm.
 
During my undergrad, you actually need to upload a complete file to the RIAA or MPAA becore they can go after you.
 
Still amazes me that someone was able to translate this:
In seconds, as well
 
1:29 AM
ah, here we go
Neil Gaiman
 
Oct 12 at 22:14, by Ell
I qwhllc lea e you in pea e nwo
 
Ell
Lol at "Im Larry"
 
Ell
One does say things one regrets when drunk
 
@LuchianGrigore So do I, along with pretty much the entire Otaku population.
 
Xeo
1:31 AM
@Mysticial non-japanese otaku population, I'd say. Also, "otaku" is kind of an insult in Japan, IIRC.
 
Ell
I think I will be tasting the first money made by my programming skills, charging first years to automatically do their maths Hwk
 
Xeo
@Ell You know you're not helping them with that?
 
Ell
Yeah I Know :/ there's still a moral diallema for me
I most likely won't do it. I would probably be expelled if I got caught anyway
 
Just do a walk-in into some semi-big company.
 
Ell
But I just want some money :L
 
1:33 AM
You won't get rich at a big company, but it's stable money.
Which is fine for fresh graduates.
 
Ell
I'm at sixth form atm. I'm wondering if many people get jobs at 18/19 years old, programming
 
@Xeo After the 'Otaku Murders' in Japan took place, Otaku became a really hard insult in Japan.
 
I hear there's a lot of demand for programmers these days. I don't know how true that is, but it sounds good for us.
 
To be passionate about anything to any degree is actually slightly frowned about in Japan, but to be an Otaku is especially frowned upon - even feared
 
Ell
I could work my way up the leader I guess, or possibly an apprecnticeship
Or even start my own team
 
1:35 AM
That's started to gently abate in recent years, but the stigma is still there, thick in the air.
 
o/
 
All because that one Psychopath. =l
 
AFAIK it's not possible to capture local variables in a lambda using move semantics, right?
 
Xeo
Nope
Only with evil auto_ptr-like things
Which moves on copy
 
@StackedCrooked Wait. So if I'm reading that correctly, anything object produced inside a lambda can't be moved out?
 
1:37 AM
That's what I wondered. I could write a wrapper that implements copy assignment in terms of move.
 
Xeo
@Mysticial No, it's about moving stuff into the captures.
 
@Mysticial No, I mean capturing local state into a lambda.
 
Ell
I think I'm gonna sleep now anyway. Nighty night all
 
Xeo
@StackedCrooked Why assignment?
 
What's "capturing"?
Something I should probably know...
 
Xeo
1:38 AM
[x]{ std::cout << x << "\n"; } copy a local x and keep it in the lambda
 
@Xeo Not sure, int a = 0; [a](){}; // is this copy assignment, or copy
 
ah
 
Xeo
@StackedCrooked Captures are copy-constructed when the lambda is created
What works is going through the bind-route, but eh. :|
Might aswell just write a local functor to do the job.
 
So even if you're passing an intermediate r-value, you can't avoid the copy-constructor?
Is that required by the standard?
 
@Xeo Or a wrapper that implements copy like this? myObj = std::move(rhs.myObj)
So it copies by moving.
 
1:41 AM
@Mysticial Are you talking about capturing rvalues? I don't think that makes sense.
 
@Pubby I don't think I have my terminology correct. :P
So no, I don't know what I'm talking about. :)
 
@Mysticial I think it was omitted because of some technical problems. It's planned to be included later. (IIRC this was mentioned on the Going Native videos.)
 
@StackedCrooked interesting...
 
@Mysticial It was a Standard defect- fixed before C++11 was published.
 
I wonder if it's possible to write an adaptor class to do it
 
1:43 AM
I believe that VS2012 includes the necessary fix.
effectively, it was said that if the argument was an lvalue, then the lvalue reference was preferred, even if overload resolution involved creating an rvalue from the argument- which should obviously be bound as an rvalue.
 
@DeadMG I seem to remember that too
Night all
 
I know SQLite is popular, but I hate it.
 
Is it just me or are the badge scripts really slow today?
 
So what happened to LWS?
 
1:49 AM
LWS?
 
It hasn't been up for like a week or two now
@Mysticial, LiveWorkSpace
 
It is now known as DeadWorkSpace
 
ah
 
not to be confused with Dead's Work Space.
 
Xeo
@chris Noone knows.
 
1:50 AM
a desk somewhere in the UK
 
I preferred it over ideone, at least you can edit your code after submitting and had the latest versions of GCC and boost.
 
Xeo
@StackedCrooked As I said, a local functor is likely less work and far cleaner.
 
Functors seem to be the new hip kid in town.
 
'new'?
As in over a decade old?
 
They are new on a geological scale
 
1:52 AM
I've always ignored them in the past because boost::function and boost::bind were good enough. Inlineability was never an issue back when I was creating desktop applications.
 
boost::function is a functor and so is the result of a call to bind.
 
I know.
Ok, I meant to say, user defined objects with operator() defined are the new hip kid in town.
Without type erasure.
 
still pretty old..
 
Not new, not hip. You're seeing what you want to see.
 
They are older than boost.
I don't particularly want to see anything. Maybe it's because I've only recently started to realize their usefulness.
Lambda are a little disappointing.
 
1:57 AM
Is there a std::heap implementation?
 
@StackedCrooked Ah, I thought so before. I don't really mind nowadays. But I've written quite the backing library that has a lot of the dream features I want.
 
Or rather, a std::sorted_array type deal?
 
I don't get why external HDs are cheaper than internals these days...
Something is definitely messed up.
 
@LucDanton Interesting. Did work with @R.MartinhoFernandes on wheels? Or is it an different library.
@Mysticial See here at the 33 minute mark.
 
We've shared some ideas, then implemented them separately, and compared results before. Not for everything though.
 
Xeo
2:00 AM
@StackedCrooked Well, they're getting fixed for C++14, it seems.
 
Ah, that's good.
 
@StackedCrooked lol, even the committee is confused.
 
Xeo
including polymorphic lambdas, full return type deduction and being able to specify an initializer for captures.
@Mysticial Yep, Bjarne totally thought it was possible at first.
 
Does return type deduction mean returning closure types?
 
Fuck it. Let's just use Java from now on. :)
2
 
Xeo
2:02 AM
You can kinda do that already with nested lambdas
 
For one-liners...
 
Xeo
Aye
But yes, you'd even be able to return closures from normal function (templates)
Without needing to go through std::function
Implementing operator->* for a type gets so fucking easy with that
 
I could scratch a lot of my library if/when that comes. And I'd gladly do it.
I'd also ditch the lazy-eval EDSL I think. After some graphs benchmarking perhaps.
 
Xeo
auto operator->*(){ return [this]<class... Ts>(Ts&&... vs){ return (**this)(std::forward<Ts>(vs)...); }; }
(assuming an appropriate T& operator*())
 
@Xeo Was that the entire committee in the video? Or is it much bigger?
 
2:06 AM
operator->* isn't unary!
 
The positioning of the ... in variadic templates. Is there a rule to that? Or is it something that just needs to be memorized?
 
Xeo
@StackedCrooked There's an easy rule - put it after the name of what you want to expand, and before the name of what you want to be a pack.
(More seriously, it just makes sense where to put it, imho.)
 
Ya.
 
Xeo
@LucDanton Eh... yeah, I kinda skipped something there.
I knew there was a reason that thing was a template!
 
2:11 AM
Guys, for things like std::less_than and friends,
you have to create an operator () for it?
 
Xeo
template<class Ptmf>
auto operator->*(Ptmf member){
  return [this, member]<class... Ts>(Ts&&... vs){
    return (get()->*member)(std::forward<Ts>(vs)...);
  };
}
Hopefully I got it right this time.
also, screw std::bind when we finally get those polymorphic lambdas~ Is there any need whatsoever for std::bind after that?
 
I just had a presentation :(
 
Is there any reason why std::array couldn't use a variadic argument constructor?
 
Xeo
It wouldn't be an aggregate anymore.
 
What's an aggregate again?
 
2:15 AM
@Xeo That's hard to parse for my tired brain..
 
Xeo
@Pubby It allows T x = {the, members, come, here};
 
@Pubby It can't have constructors in order to not violate POD requirements.
 
Xeo
Which doesn't involve any roundtrip through initializer_list or constructors.
 
@StackedCrooked IIRC that wouldn't violate POD requirements
 
2:16 AM
std::array<std::string, N> is no POD.
 
Xeo
@StackedCrooked PODs can actually have constructors in C++11, IIRC.
Many things have become PODs, actually.
 
@Xeo I didn't think so. At least if std::is_pod is reliable.
 
Okay.
I think my Pool
Isn't so bad, for a first try.
Just a few tune ups, and I'll post it for you all to yell at me about it, like you all always do. :3c
 
IIRC constructors are allowed for POD, as long as there is a 'defaulted' constructor as well. However, the value initialization syntax e.g.. POD() won't value-initialize the members anymore once you have a constructor. (This might have been a compiler bug, I'm not sure.)
 
Nothing like a 24/7 bloody nose in 0% humidity...
 
2:20 AM
o_O
Why such a vicious bloody nose?
 
Weather is too dry.
 
Xeo
> A trivial class is a class that has a trivial default constructor (12.1) and is trivially copyable.
 
Originally, I was only bleeding on my hands. But now my nose has started too...
 
Dang.
Gotta get some moisture.
Jump into a tub or something.
 
Xeo
Where "trivially copyable" says that basically all special members must be trivial.
 
2:22 AM
@ThePhD I already have 2 strong humidifiers going.
 
@Mysticial i got such symptoms from old terminals once, 1986. i think due to static electricity. worth considering.
 
Um.
Well I'm not sure what to help you.
 
But they aren't enough when the weather is dry enough.
 
Well, tub idea still stands.
 
Wait, I have a POD but not an aggregate I think
but that link says that's not possible :S
 
2:23 AM
I'm trying not to get too much blood all over my homework.
And I'm also not gonna open the two HDs I picked up today until the weather improves a bit.
 
@Xeo > All POD classes are aggregates, or, to put it the other way around, if a class is not an aggregate then it is sure not a POD
 
@Pubby a POD is an aggregate
 
Way too much blood flowing around here.
3
It wasn't nearly this bad last year.
 
Xeo
Oh wait, I misread the "trivial" requirements.
 
@Xeo uhm, all PODs are aggregates. or they used to :-)
it's a three-tier hierarchy of types: POD <- aggregate <- general C++
in C++03 only the first two could be initialized with curly braces initializer
 
2:27 AM
So std::is_pod<foo> is returning true, but I can't do aggregate initialization :S
 
Ah, I was just about
to ask that question
Thanks @Pubby
 
Xeo
@Pubby What does foo look like?
 
Then again
Hmm...
Does std::is_pod cover aggregates of PoD types?
Like std::pair<int, int> ?
 
std::pair is not an aggregate.
 
std::pair<int, int> is, or should be.
 
2:32 AM
@Xeo I might ask it on SO proper. It has a std::array member and a templated copy constructor for conversions.
 
Xeo
std::pair is never an aggregate thanks to user-defined constructors.
 
Oh.
Well then, they invalidates my idea...
 
Actually, it probably isn't considered a copy constructor.
 
Xeo
@Pubby Yeah, that's one way to trick the POD requirements.
Having a trivial copy constructor, but having a non-trivial constructor that is used for copying.
And with that user-defined constructor, you don't get an aggregate.
 
2:34 AM
So it is not a POD and I'm tricking std::is_pod?
 
Xeo
By the current standard, it counts as a POD.
 
Is there a type trait for detecting padded bytes?
 
Xeo
Like how?
 
Ok, so there are PODs that are not aggregates
 
Like, std::real_sizeof ?
 
Xeo
2:35 AM
Do you want to know if the type contains padding?
 
My pool should take a Deleter type, right?
 
Padding could be in the middle of the object so I don't see how that is helpful
 
Test:
 
Well, maybe a special Destructor type.
 
[Agner Fog's tables](www.agner.org/optimize/instruction_tables.pdf)
why doesn't that link?
 
Xeo
2:36 AM
missing http://
 
thx
 
@Xeo I can do it with by checking sizeof.. But I believe a better method may exists.
 
I was wondering because a comment I was submitting wasn't linking.
 
Xeo
Kinda annoying, since you explicitly tell markdown that you want a link.
@StackedCrooked Nope, not until we get compile-time type introspection.
I mean, it'd still check with sizeof, but atleast you could generate the sum of the members automatically without having the user supply them.
 
Hmm, so I changed my constructor to be a conversion operator and it seems to work now.
 
2:41 AM
Is there a std::has_destructor type?
 
Are there any differences between the conversion operator and constructor in this case?
 
Ooh, there it is.
 
has_virtual_destructor?
 
std::is_destructible, std::is_trivially_destructible, std::is_nothrow_destructible
 
Ah.
 
2:43 AM
I wonder why the naming is dfiferent
 
I think I'll settle on std::has_trivial_destructor
 
is_virtually_destructible
 
@ThePhD Are you sure?
 
For my Pool, I don't want to bother invoke a destructor on int, float, etc. I probably don't even want to invoke it on std::pair<*,*>
There's no point destroying those.
I just want the memory where they were to be lazy-marked invalid.
 
I don't think you understand what a destructor does :|
 
2:45 AM
No point invoking cleanup where there's no real reason to do any kind of cleanup.
 
If you invoke a destructor on int then it's nop
 
A destructor destroys things no?
 
@LucDanton Alright.
 
Xeo
@Pubby Different from what?
@ThePhD You absolutely do want to invoke a destructor on std::pair.
 
@Xeo One uses has the other uses is. I'm just pointless nitpicking.
 
Xeo
2:48 AM
The has_... form is pre-C++11
2
Q: Writing code that works when "has_trivial_destructor" is defined, instead of "is_trivially_destructible"

HostileForkDuring the refinement process of the C++11 standard, it seems that is_trivially_destructible was considered a better/more-consistent name than has_trivial_destructor. This is a relatively recent development, as my g++ 4.7.1 still uses the old name, and it's been fixed to be compliant with the st...

relevant question :)
 
... Blergh.
I will have to pop() all elements from my Queue,
and then push() them all back in when I make a change?
Gross.
Maybe I should just make a whole new priority_queue
Or just roll my own not-so-retarded-one.
 
Xeo
room topic changed to Lounge<C++>: flower power [.love] [and] [peace]
 
I want gcc 4.8 already :(
 
How do you detect word size? sizeof(long), sizeof(void*), ...?
 
okay so the PODs have changed dramatically, instead of inventing new term for the new thing
 
2:54 AM
I almost just tried to upvote my own answer...
 
the FAQ doesn't say what one can do with PODs
someone (TM) should write that...
 
I was reading a question, that had a pretty long answer with benchmarks... I was about to click upvote after reading half of it - then I realized... wait, this looks like my own writing style.
 
@StackedCrooked "Plain ints have the natural size suggested by the architecture of the execution environment" points to int, although I don't expect that to be the only correct answer, if it is.
 
On my system (x86_64) sizeof(int) yields 4.
 
@StackedCrooked Yeah, they broke that trend on 64-bit.
I figure making int 64-bit would break too many legacy applications.
 
2:57 AM
@Mysticial some people maintain that in order to have intelligent conversations, they're forced to talking to themselves. i've used that excuse :-)
 
@Mysticial lol... you almost upvoted yourself without realizing it? xDDD
 
@Borgleader Yes I'm serious. I was following through the "related questions" links.
Came across a good performance question.
Scrolled down a bit, it had a pretty long answer.
I didn't recognize my own writing...
It was one of those lost-and-forgotten questions that didn't get any attention. So I guess that's why I forgot about that question/answer.
 
Allllrighty.
Pool implementation #1 is a go.
 

« first day (775 days earlier)      last day (4172 days later) »