« first day (841 days earlier)      last day (4101 days later) » 

10:00 PM
I've managed to beat vector by about 18% with lockless pool and hard case of a lot of constructs/destructs (that was best improvement case)
 
user 0m0.087s vs user 0m0.097s xD
 
Where can I find libc++ status?
 
@JohannesSchaub-litb I need a full statistical analysis on that. :-P
 
@JohannesSchaub-litb that's a good improvement
 
using that test but with for(int i = 0; i < 10000; i++)
 
10:01 PM
> some people get a bit excited and run off telling people they should all use Haskell, and that all other languages suck, but they are in no way representative of the wider community.
 
@FredOverflow Well, I see @Zoidberg has been rather active.
 
user142019
No, I don't say all other languages suck.
 
user142019
Erlang, for one, doesn't.
 
Has anyone ever combined Perl and Erlang into Perlang?
 
user142019
Yes.
 
user142019
 
user142019
More useful may be Erlang::Port, though.
 
user142019
Control+V. I need to sleep.
 
@doug65536 but I'm doing automatic rehashing. i believe that unordered_map is not allowed to do that?
 
Someday I'm gonna combine all C languages into "Objective C#++--".
 
10:06 PM
@JohannesSchaub-litb: that's right. There's required to be a way to prevent rehashing until a given average bucket size is reached.
 
@JohannesSchaub-litb really? didn't know that. rehashing is the only non-trivial part of a hash table implementation :)
 
@FredOverflow It will have everything including the kitchen sink.
 
@rici ah i see
 
@doug65536 How is it non-trivial? Just create a new hashmap with double the capacity, insert the old elements, and then swap. Five lines of code, max.
 
why is 42 so ubiquitous, is it just because of hitchhikers guide?
 
10:08 PM
@FredOverflow i think moving is better than swapping
or is it equivalent?
 
@JohannesSchaub-litb Well, somebody has to take care of the old garbage.
> Knowing C++ forces you to know how a computer works and executes code.
 
yeah, I figured @FredOverflow meant move the objects to a temporary new hash table container, then swap the temporary hash table with this, am I right?
 
@doug65536 basically, yes
 
the objects in a a++ unordered associative container are separately allocated. Pointers to them are required to stay valid despite rehashing.
 
and std::swap is 3 moves, so all moves
 
10:11 PM
rehashing is just about rethreading links
 
@FredOverflow can one also rehash in-place?
 
@doug65536 I didn't say std::swap, I said swap. Every container should have an overload of swap.
 
@FredOverflow right, sorry habit
 
23.2.5 paras 14 and 15
 
@JohannesSchaub-litb awesome question
 
10:12 PM
Well, Hyrule Historia is pretty cool.
 
@rici Oh, right std::unordered_set is implemented with forward_list, didn't think of that.
 
"The insert and emplace members shall not affect the validity of references to container elements, but may invalidate all iterators to the container. The erase members shall invalidate only iterators and references to the erased elements."
para 15 is the one that requires predictability of rehash
 
fatal error: 'iostream' file not found
#include <iostream>
         ^
:(
 
What compiler are you using?
 
user142019
Haha.
 
10:14 PM
Your install is borked.
 
Clang
I was using ruben's person build
 
user142019
Use GHC.
 
guess I'll stick with MinGW
 
@Rapptz I found an experimental clang+mingw that uses the mingw windows API headers with clang
 
10:16 PM
clang+llvm-3.1-i386-mingw32-EXPERIMENTAL ?
 
I just wanted to use regex
funny enough boost/regex isn't working either.
failure to link on my part I guess
 
did you compile it?
boost::regex is one of the libraries that require compiling and linking the library
 
I'm sure I linked it properly.
I guess it's my code.
 
@JohannesSchaub-litb room in downtown munich is sparse.
 
@Rapptz this is the name of one I compiled a couple of days ago: boost_regex-mgw47-d-1_52
 
10:24 PM
mine's libboost_regex.a
 
2
Q: std::function vs template

Red XIIIThanks to C++11 we received the std::function family of functor wrappers. Unfortunately, I keep hearing only bad things about these new additions. The most popular is that they are horribly slow. I tested it and they truly suck in comparison with templates. #include <iostream> #include <...

 
I hit an error (building the entire boost) so I directly built regex... perhaps I skipped something, worked perfectly though
 
-1
Q: what is difference in "~/" and "../"?

user576510In code I often found ~/ or ../ with paths but unfortunately I am not clear what are these and what is difference in them resulting wrong paths and some time incorrect paths. Can you please guide what they are, there difference ? THANKS

Whoa.
 
@LightnessRacesinOrbit the unfounded std::function reputation is from a major bug in vc 10 and below
 
Ell
Std function is for storing functions
 
10:33 PM
Can you set glu.lookAt() to the location of the mouse cursor on the screen?
(OpenGL)
 
user142019
That makes no sense.
 
user142019
gluLookAt is in 3D space, mouse position is in 2D space.
 
@Zoidberg You know what I meant though
 
@doug65536 well, the example in the link is 131 vs 6000 with gcc-4.7 for me
 
user142019
@Crowz Not really.
 
Ell
10:36 PM
If you have the mouse in a fixed plane
 
@Zoidberg I mean, to move where the camera is looking with the mouse
 
user142019
Oh mouselook.
 
user142019
Like Minecraft.
 
Like pretty much any first person games haha
 
@LightnessRacesinOrbit how is it even possible for std::function to be slow? it's all metaprogramming
 
10:39 PM
It's not.
It has type erasure.
 
what part is runtime.
 
The type erasure part.
 
user142019
That's usually implemented by getting the offset of the mouse from a specific point P (usually the center of the screen), then updating the camera, and then setting the mouse position back to P.
 
Ell
The whole point of std function is that its runtime isn't it?
 
user142019
The whole point of std::function is that you can store any functor with the same signature for the () operator and call it.
 
@LightnessRacesinOrbit That's an audit.
 
ah yes :)
1
Q: First class object is modified when doing a addition

RovThe code below, which is giving a correct output of the addition, changes x value of the first object b after doing it. class numbers{ public: int x; numbers(int i1){ x = i1; } numbers operator+ (numbers num){ x = x + num.x; return(x); } }; int main()...

are you sure? the same user posted this
 
Yes, I am sure.
 
Ell
Does std::function need language support?
 
No.
 
10:43 PM
@LightnessRacesinOrbit It says "This item is not reviewable." for me.
 
@Ell No. Look at boost::function.
@R.MartinhoFernandes I'm sorry to hear that :(
 
It's because it's an audit for you, and only you can pass it.
 
oh I see!
so it's pretending to be that user, and that user is real?
 
Yeah.
It's all lies.
 
mean
and I should probably Reject the edit instead of skipping it (leaving it to be passed/failed by an actual newbie) then
 
10:44 PM
Right.
See, now it reads "Review audit passed" stackoverflow.com/review/suggested-edits/1447943
 
is there a way to return an initializer_list?
 
or is it only temporary?
 
The storage is temporary.
initializer_list has reference semantics.
 
I'm asking because uh
 
10:46 PM
Return a proper container instead.
 
yeah I don't want to do that
that's why
 
Why not?
You can't cheat!
 
because then I'd have to include
every single container ._.
 
Unless the storage is static, don't return an initializer_list.
 
10:47 PM
@Rapptz Not every one of them, no. You can pick one, or if you want to be generic then let the user make the proper includes.
 
I don't know how to be generic in this case
 
templates...
bedtime.
 
In an ideal world you'd probably return a range, not a container.
 
@LightnessRacesinOrbit Thanks, you have taught me a new language feature I didn't know about.
?_?
 
I hate nightmares
 
10:48 PM
template <typename Container>
Container get_it() {
    return Container(begin, end);
}
 
user142019
@CatPlusPlus ok.
 
@LucDanton oh hey, that makes more sense to me
 
I return deferred-evaluation ranges in ogonek, but that is painful. You have been warned.
 
Yeah same warning as well.
 
Why is returning initializer_list bad though?
 
10:50 PM
Because it has reference semantics.
It is the moral equivalent of returning a reference to a local variable/temporary.
 
I think to save myself a headache I'll just default to vector
fuck the user
:(
 
Ell
Haha moral
 
initializer_list<int> get_it() {
    return { 1, 2, 3 };
}
// equivalent to:
initializer_list<int> get_it() {
    int[] array = { 1, 2, 3 };
    return { begin(array), end(array) }; // assuming magical access to initializer_list ctor
}
 
Is the C++03 idiom of accepting an output iterator acceptable?
(I can understand if you'd rather want to use the return value.)
 
@Rapptz Does this example make it clearer?
initializer_list is just a pair of pointers (or pointer+size or whatever).
 
10:52 PM
yeah I guess
 
Also auto x({1, 2, 3}); is UB aswell (if it compiles at all)
 
Ell
Output iterator? as in to write to?
 
@Ell See e.g. std::transform.
 
2
A: What is the difference between p and a?

Anton KovalenkoIf we define "difference" as the result of subtraction, there answer is zero: assert((p-a) == 0); ...until you assign some other pointer value to p (which you cannot do with a, because it doesn't name a pointer variable: it names an array which decays to pointer in appropriate contexts).

> If we define "difference" as the result of subtraction...
snickers
 
Ell
Why do I have to be such a bitter person? -.- resent is the worst feeling ever
 
11:01 PM
@Code-Guru 'a' is defined in column 7, 'p' is defined in column 13. that's the difference
 
What's that nonsense about sin not being a function if not restricted in domain
 
The domain is that of the real numbers.
@LucDanton Nevermind. I was confusing "functions" with "injective functions".
 
randn = System.Random() //System.Random is a .net class, don't worry about what that means for now.
lol, someone posted that on a boo mailing list.
I'm sure no one knows System.Random is a .NET class there.
 
@doug65536 lol
@CatPlusPlus Do you mean arcsin?
 
11:07 PM
2 hours ago, by doug65536
for example, sin isn't a function unless you restrict the domain to -pi to +pi
 
Yah...that's not correct.
 
No shit
 
In Abrahamic contexts, sin is the act of violating God's will. Sin can also be viewed as anything within individuals that violates the ideal relationship between them and God. Some crimes are regarded as sins and some sins are regarded as greater than others. In this nuanced concept of sin, sins fall in a spectrum from minor errors to deadly misdeeds. Catholicism regards the least corrupt sins as venial sins—which are part of human living and carry little divine consequence. Conversely, sins of great evil are mortal sins—which bring the dire consequence of going to Hell if unrepented ...
Relevant.
Or maybe not.
 
@doug65536 just wanted to let you know that i posted a bounty for my question . . .
 
@R.MartinhoFernandes I wondered when someone would go that direction.
 
11:10 PM
It explains why sin would not be a function, but it does not explain the pi bits.
 
@R.MartinhoFernandes For every sin there's exactly one punishment...sounds like a function to me.
 
That's the punishment function.
 
Wait...that would be the punishment function...
jinx
 
sin is Fourier transform of punishment
It doesn't matter when but how often~
 
All I get from that is that you like punishment. Not that there's anything wrong with that.
 
Ell
11:15 PM
Bdsm
 
Black Dragon Scale Mail.
It's been a long time since I played NetHack.
 
Is that a scale mail made ouf ot black dragons?
 
So... is it good?
 
Play ToME
 
11:16 PM
No I mean the item.
 
Grants immunity to disintegration. Useful if you plan to incite the anger of the gods: they are keen on using disintegration rays.
Don't ask how useful it is to incite the anger of the gods.
 
Never crossed my mind.
 
Dragons with anti-magic fields are awesome. Or so I tried to tell to the magic-wielding PCs in one of my games.
 
Wow
 
Ell
11:21 PM
Anyone play castle of the winds?
 
Sweet, merciful biofuel level finally rising up.
 
Ell
minecrsft
 
Earlier: "How big should we build the boiler?" "Very big!"; Later: "Mmmh, how come we're losing so much biofuel"
 
Ell
What does the boiler do?
 
11:23 PM
It boils water.
 
@LucDanton They weren't annoyed for long. The barbarian chopped the thing in half in one round. He had a knack for doing that with bosses. Damn dice.
 
Ell
Mineceaft has steam?
 
How long has it been since you've last logged on? We've added quite a bit
 
Ell
Even the mods?
Erm quite a while, a wee?
I've had a busy week :o
 
11:24 PM
Well, those did in fact change a bit, yes. But it's not like we've already used all the preexisting features.
 
Ell
How are the bees? :3
 
Yours? Nobody touched a thing I assume.
 
Ell
The underground ones
Ohh okay
 
Amongst the new feature is that there's a tree breeding system now. Supposedly it's very similar to the bee system (same mod). And in fact you used bees to cross-pollinate species.
Just sayin'.
Anyway, wheat is still not as potent as saplings for biofuel. We need subsidies!
 
Ell
Is that bad? Remember I'm a n00b
 
11:28 PM
Well now we're making saplings.
 
Ell
I mean, the bees
Can you get the golems to do what you want?
 
No. It's a new feature that works on top of the previous, but it's unchanged.
 
Ell
Or are there set modes?
 
They have only one functionality and behaviour.
'Get stuff in that chest' sort of thing.
 
Ell
Oh kk
 
11:30 PM
A site called "javagaming.org"... so, minecraft?
 
To clarify, one per type of golem. There are like 4 of them.
 
Ell
Oh my God how much do I have to disagree with a girl when she calls herself ugly until I can give up?
 
itsatrap.jpeg
 
user142019
Just say that she's ugly.
 
user142019
Problem solved.
 
Ell
11:33 PM
Aghh Jesus christ its been like half an hour
 
user142019
Dump pic of her on /b/ and point her there.
 
Ell
Haha
Which one is /b/ again?
 
user142019
@Ell Random.
 
user142019
/b/ is the board.
 
What is old speak?
@CatPlusPlus meow
 
11:41 PM
<3 Dilbert
 
11:53 PM
@Ell Either kiss her or agree with her.
 
@Ell lol
 
@Borgleader that's gonna be me someday
anyone here do web design at all?
 
@Crowz I HAVE
@Crowz but the meow meow and his master mght not lke tht
 
what? Haha
 

« first day (841 days earlier)      last day (4101 days later) »