« first day (1134 days earlier)      last day (3820 days later) » 

Ell
12:00 PM
oh wait of course it does, it doesn't use dynamic allocation
oh wait
 
user1804599
@FredOverflow short and ushort are going to be even more fun. :)
 
bcp is useless
 
@Ell Er, boost::any does totally use dynamic allocation.
 
Ell
of course it must use dynamic allocation
 
strictly, C++ plain does not support this mechanism.
 
Ell
12:00 PM
I was thinking of variant, forgive ne
 
but it turns out that exception handling actually does support what we need.
so I hacked it on.
obviously I suggest that the Standard might want to provide a more user-friendly version.
 
@DeadMG You should put that on your CV.
 
Ell
I want to see code now
 
@Rapptz What is bcp?
 
if I put every little thing I invented on my CV, it'd never end.
 
@FredOverflow Coriculum Variantum
 
@DeadMG But employers love to see concrete stuff.
 
@DeadMG @StackedCrooked this website is not available :(
 
bug StackedCrooked about it, he's right there.
 
@Rapptz seems useful
 
12:03 PM
and if the servers turned themselves off again to escape his ugliness
 
I wish.
 
@StackedCrooked Coliru is down. So we're insulting you for lols.
 
@StackedCrooked You lost DeadMG's invention! D:
 
@FredOverflow Only if it's a construction company.
 
12:03 PM
His code was so bad it crashed my server?
 
nah
 
> If a constructor is called without the new prefix, very bad things can happen without a compile-time or runtime warning, so the capitalization convention is really important.
 
It's running now.
 
it's online, but that link only gets me an empty editor :D
 
God damn it
 
12:04 PM
oh wait, there it is :D
 
@BartekBanachewicz Ha ha, someone is learning JavaScript :)
 
I am starting to regret this
this, get it? Ha ha
 
runtime library variance!
 
@FredOverflow Never mind :| turns out that filesystem uses every boost library known to man.
I thought bcp bugged out on me
seriously, filesystem includes so much shit.
 
@Rapptz How about TR1 filesystem?
 
12:07 PM
fuckshitballs I'm so smart.
 
have some cake to celebrate!
 
So smart
 
hm.
 
you know, it suddenly occurs to me that I probably wouldn't need that technique.
 
12:09 PM
0
Q: Is it bad style to supply boolean in find?

Sebastian SchmitzIn "Accelerated C++: Practical Programming by Example" chapter 6.1.3 is an example for the Function find from the Library "algorithm": We want to check if a char is in a string: bool char(char c){ string str = "asdf"; return find(str.begin(), str.end(), c) != str.end(); } He then expl...

lol
 
@ThePhD and why was copying vector a problem again? :E
 
hmmm
 
user1804599
@bamboon lol
 
you know, I always assumed that if you had something like std::vector<T>, it would always be impossible to refer to a std::vector of some thing that derives from T.
but it totally wouldn't be impossible at all.
you'd just need to use an external reference class.
 
Ell
12:14 PM
Just use value_ptr<T> right?
 
no.
 
Ell
Why not?
 
user1804599
$ chown clown:clown chown
 
because then it wouldn't be a std::vector<T>.
it would be a std::vector<value_ptr<T>>.
 
Ell
So? Achieves the same thing
 
12:16 PM
anyway I don't even know if referring to a std::vector of some type which is T or derived from T is even a use case that's useful.
 
Ell
For(auto& w : widgets) {w.update()} ?
 
@Ell You mean how in std::vector<T>, then they're all laid out sequentially in memory, no heap allocation or anything like that, whereas in std::vector<value_ptr<T>> it's full of potentially NULL pointers that point to some other random place in memory, destroying your cache?
oh yeah, and you'd also have to specialize std::vector for value_ptr<T> to meet the same interface, which is officially illegal?
 
Ell
@deadmg value ptrs can't be null can they? And you can't use stack allocation with runtime determined types anyway
Right?
 
right, but I never suggested doing that.
I merely suggested referring to an existing value of std::vector<T>, where T might be a more derived type.
 
Oh.
 
Ell
12:19 PM
In that case there is a finite and known number of derived classes?
 
bcp automatically adds all of Boost.Config, Boost.Preprocessor, Boost.TypeTraits, and Boost.MPL when it modulates things
 
@DeadMG that would require changing the source code of vector I think
 
Oh and guess what no TCO in JS
 
@StackedCrooked Nope.
 
I will now openly laugh at people saying it's somehow better than Lua
Openly and violently
 
12:20 PM
that's 245 headers..
wtf man..
 
how would you do it? reinterpret_cast?
 
user1804599
vector_view
 
@rightfold Basically.
 
user1804599
It should be read-only, though.
 
user1804599
Otherwise you can add a B to an std::vector<D>, which is bad.
 
user1804599
12:22 PM
Also data() wouldn’t work because sizeof(B) != sizeof(D).
 
yep, there'd be no way to implement push_back for vector_view.
and the iterators would have to be a bit more complex as well.
 
@rightfold ah, a different class?
basically a range
 
and the indexing operator's return addresses no longer give contiguity guarantee.
 
Someone tell me how to configure this networking shit :<
 
user1804599
$ rm -rf / --no-preserve-root
 
Ell
12:24 PM
I forgot how to configure network with files ages ago :/
@cat what os? Ubuntu?
 
I need to set up bridging with libvirt/KVM
 
linked here at least twice already
 
> In many modern languages, it is recommended that variables be declared as late as possible, at the first point of use. That turns out to be bad advice for JavaScript because it lacks block scope. So instead, it is best to declare all of the variables used in a function at the top of the function body.
Hey its like C only crappier!
 
user1804599
@StackedCrooked dupe.
 
12:32 PM
this has to be the most frequently asked science question...
I've heard it being asked at least 20 times in the past year :|
 
@Rapptz which one?
 
"Why do humans have different blood types?"
 
heh, for some reason I never wondered about that
 
it's commonly asked, it's pretty weird.
 
welp, logically we didn't evolve to share blood, so there's no reason why genetic mutations wouldn't introduce incompatible blood types.
the only complication would be during pregnancy and if I recall correctly, the mothers blood and baby's blood have to be strongly isolated anyway to handle blood pressure differences.
 
12:36 PM
blood types are just fancy names for combinations of antigens.
shit
sun's out
 
user3010322
@melak47 move-only type, duh. :P
 
Xeo
@Rapptz Out to hunt you?
 
user3010322
@melak47 "still" ? I already have.
 
yeah with the sunlight
 
user3010322
@Xeo It's catching up to him!
 
12:41 PM
I think I'm gonna give up on trying to set up this fucking VM and just use this crappy Ubuntu Server
 
user3010322
Hurry, Rappyz, I'll protect you!
 
user3010322
Jump into my bed. <3
 
uh oh
I wouldn't do that if I were you.
 
user3010322
I really wish some basic things
 
user3010322
weren't part of the std:: library
 
user3010322
12:44 PM
and just part of the language
 
user3010322
e.g. std::move and std::forward
 
user3010322
They're core language features, but somehow we convinced ourselves they need to be in a library and in a header =/
 
they're not core language features, rvalue references are.
 
user3010322
You can only get r-value references -- or preserve them -- with std::forward and std::move, unless you set up the conditions right that a return value or something or other becomes a candidate.
 
@ThePhD So basically, a whole bunch of situations.
 
user3010322
12:47 PM
A simple handful
 
by far and away the most valuable.
 
Xeo
@ThePhD static_cast<T&&>
 
user3010322
forward_cast wouldn't have killed anyone
 
Xeo
It's unnecessary
 
the only thing it would have achieved is replacing std:: with _cast
 
user3010322
12:48 PM
I suppose so.
 
Xeo
static_cast<T&&> is the basic feature behind forward/move
 
user3010322
@DeadMG And it would save me #include <utility>
 
meh.
 
Xeo
The only thing they do is remove/apply references correctly for some corner cases
Which is library-level
 
practically every other Standard header basically has to include utility.
I've been programming against rvalue refs for four years now and I've only once had to include utility and that was like, a week ago.
 
user3010322
12:49 PM
All I'm saying is those corner cases could have been perfectly handle-able by the core language itself.
 
Xeo
ew, relying on implicit includes
@ThePhD The core language doesn't need to get fatter.
 
user3010322
It needs to get fatter in the right areas
 
user3010322
For example, a not-shit typeid. :3c
 
user3010322
Aww, nobody's replied to your is_derived thread, @DeadMG. :c
 
user3010322
I thought someone would at least comment on the implementation.
 
12:51 PM
meh
it's the asylum.
 
user3010322
Or perhaps, someone's taking the idea and writing up a proposal on it.
 
@Xeo I never include <cstddef> to use size_t!
Works 99% of the time.
 
Xeo
is_derived what
 
but when I write a header file I include it out of principle.
 
user3010322
@Xeo Nothing!
 
12:53 PM
@Xeo Also, I rely on my own implicit includes :P
 
user1804599
@Rapptz I always include <cstddef> to use std::size_t.
 
Xeo
@Rapptz I have nothing but "ew" to say to that.
 
Why would I include <type_traits> and <utility> if all of my headers implicitly include it anyway?
 
user1804599
If I have foo.hpp and foo.cpp, and the latter includes the former, and the former includes <vector> and I need it in both, I also include <vector> in the latter.
 
@rightfold Yeah that's what I meant, I don't include <vector> because it'd be pointless.
 
Xeo
12:54 PM
hm, admittedly, I don't do that for class-related header/cpp files
Since in that case, I know exactly what will be in there.
 
2 mins ago, by Rapptz
@Xeo Also, I rely on my own implicit includes :P
shakes head
 
user3010322
I
 
user3010322
have
 
user3010322
done it!
 
Shit. 8 AM.
 
12:57 PM
Someone kept calling me a stalker earlier ;-;
 
Also, Super Mario 3D World is fun.
 
You call it Stalking, I call it Information Science
 
user3010322
Did you finish your paper? :v
 
user3010322
I think I've sped up my compile times by a good chunk with all the changes I've made.
 
boost regex takes 30s to compile a single regex
._.
 
user3010322
1:03 PM
It's probably stupid fast?
 
In Debug mode?
 
no
 
I never compile in debug mode.
 
user3010322
Rapptz lives his life on the edge.
 
1:05 PM
The debug symbols make my executable big and I never use gdb to begin with.
 
user3010322
True, gdb is a smoking pile of crap, so.
 
user3010322
Why ask for a smoking pile of crap with every compilation? :3c
 
user3010322
typeof<void>() <33
 
user3010322
I love life.
 
what...
 
user3010322
1:13 PM
It's my error-state for runtime_type
 
dotnetfiddle looks similar to Coliru
 
user3010322
@StackedCrooked It's based off jsfiddle, IIRC
 
Yeah.
It has autocompletion.
 
@StackedCrooked Everything on the internet looks the same
 
user1804599
I am hungry but I lack food.
 
1:20 PM
Same problem ^
 
user3010322
@TonyTheLion I'll feed you, baby. <3
 
did you read my email?
 
user3010322
I'm going to send a reply. :D
 
I'm honored <3
 
user1804599
I'm bonered <3
 
1:21 PM
lol
 
user1804599
I’m wearing an xkcd-shirt.
 
user3010322
I have a vector, inside of a std::list, inside of an unordered_map
 
user3010322
Shit just got complicated. o.0
 
Fuck. VMs.
 
user3010322
:c
 
user3010322
1:24 PM
Are they really this unwieldy?
 
user3010322
I thought they were just OSes. What's holding you back?
 
KVM/qemu/libvirt barely documented mess
 
user3010322
I thought you got Windows machines with Hetzner?
 
user3010322
And that you could use Hyper-V?
 
I can either just use Ubuntu Server or try installing Gentoo on bare metal again (I'm gonna destroy something if this shit doesn't boot again though)
Windows is 25€/mo extra
 
1:27 PM
@CatPlusPlus to get ubuntu to boot at all on any of my computers I've had to specify the NOAPIC boot option for a long time :p
 
user1804599
@CatPlusPlus Destroy PHP.
 
This isn't shitty laptop
I'm gonna pay 1€ extra for an IP I'm not going to use and I blame Linux
 
@CatPlusPlus neither is this desktop
 
user3010322
I don't understand why Windows is 25 euro extra a month...
 
user3010322
Seems a bit... silleh.
 
1:28 PM
SPLA licensing
 
user3010322
I know it's a proprietary operating system and costs money, but the last hosting solution we agreed upon for LoungeChat cost the same between Linux and Windows @CatPlusPlus. I don't know why Hetzner's getting a big head.
 
Most hosts move the licensing cost to the customer
 
user3010322
"move", as in "make exorbitant profit from", sure.
 
can't you just send them your windows server whatever license key you got from university? :D
 
user3010322
1:30 PM
@melak47 I'd just like a bare-metal piece of hardware I can network-install whatever I want onto.
 
"it's a matter of national security education. move along, nothing to see here"
 
user3010322
Or a simulated virtual bare-metal piece of hardware that I can network-install whatever I want onto.
 
@ThePhD you're gonna network install windows over the internet? :D
 
user3010322
@melak47 Doable, especially if the target is a fat VPS host with a great connection.
 
ESXi is 25€ setup
And I have no patience left
 
user3010322
1:34 PM
Have you been at this for the last 6 hours? o.0
 
I wish KVM-over-IP didn't cost 30€/mo + 150€ setup
 
user3010322
KVM?
 
Then I wouldn't have this fucking problem
 
@ThePhD do your templated swizzlers take up extra space in your vectors?
 
user3010322
@melak47 No.
 
user3010322
1:38 PM
The only thing I haven't done is communicate the zero relationship with a proper function or swizzle name
 
user3010322
I thought about xx0 or xyz0 or xy0w, but
 
user3010322
That doesn't work with 0yzw
 
wut
 
user3010322
@DeadMG Hurry up with Wide, I want dat 3DScene identifier. :c
 
user3010322
@melak47 If you have a Vector2 v2;, I wanted to make it become a Vector4 with some kind of swizzle syntax.
 
user3010322
1:40 PM
the initial thought was v2.xyz0, where '0' represents a component you don't have
 
user3010322
Or want to nillify
 
I allow v2.xyxx or whatever
 
user3010322
It didn't work out.
 
user3010322
Do you just return a std::array ?
 
if you want xyz0, just construct a v4 from v2 :p
@ThePhD I return a vec<T,4>
 
user3010322
1:42 PM
Oh, right
 
user3010322
Your thing is fully templated.
 
user3010322
How do you handle cross-products & friends ?
 
user3010322
free-functions?
 
yeah
 
user3010322
Or do you program the generic free functions and let compile-time optimizer fish out all the cases for you?
 
1:42 PM
I mean, what else
 
user3010322
@melak47 Individual Vector2, Vector3, and Vector4 classes.
 
cross product only really exists in R³ anyway :p
 
user3010322
@melak47 And R7, and R2 with z = 0.
 
@ThePhD I have specializations for those, because of swizzlers
@ThePhD vec<T,2> can upconvert to vec<T,3> with z = 0 :D
 
user3010322
Oh. So in the end you're still doing all that work. xD
 
user3010322
1:43 PM
Also, I lied
 
user3010322
Turns out I was thinking ahead.
 
user3010322
On Vector2:
 
user3010322
Swizzler4<0, 0, 0, 0> uuuu;
Swizzler4<0, 0, 0, 1> uuuv;
Swizzler4<0, 0, 1, 0> uuvu;
 
?
seems like you already allow up-swizzling
 
user3010322
I can do v2.xxyx already. xD
 
user3010322
1:45 PM
Yeah, I forgot I allowed it. :v
 
user3010322
I even allow down-swizzling too, apparently.
 
I made swizzle members which only have each of xyzw once special to allow assigning to them
 
user3010322
I have special case swizzlers for those
 
how do you make your swizzlers not take up space?
initialize them with a pointer, reference, ??
but that'd have to be stored..
 
user3010322
They're defined inside of the specialized vec<T, x>
 
user3010322
1:47 PM
But you could probably take a more general approach rather than do what I did.
 
? how does that make them not tale up space
 
user3010322
union :B
 
oh, right.
I seem to have blocked that memory :p
 
user3010322
Haha.
 
user3010322
Well, to be honest you could drop the unions altogether
 
user3010322
1:48 PM
and use something like declspec( propert() )
 
user3010322
to get the same effect
 
is it technically UB to have a union and access different members after one of them was written to if they're all the same type? :E
 
user3010322
Or you could define functions xxyz() and just do the work inside of the member function.
 
__declspec(property()) needs functions anyway
 
user3010322
@melak47 Hard to know. I mean, it's std::array, and it's all the same types...
 
user3010322
1:49 PM
But the UB doesn't word itself like that
 
user3010322
It says "if you read write to one member, and then read from another"
 
user3010322
Not "if they're not all the same type..."
 
user3010322
Oho~
 
user3010322
But that's a special case: it's char
 
user3010322
1:54 PM
I'm gluing together 1, 2, 3, 4 floats
 
user3010322
And then combining those with arrays and shit
 
> Two POD-struct [...] types are layout-compatible if they have the same number of nonstatic data members, and corresponding nonstatic data members (in order) have layout-compatible types C++03
 
user3010322
Well, std::array IS a POD... (when given a PoD) ...
 
but an array type != a struct of the same number of same types, right? :/
 
user3010322
For all intents and purposes, it has been.
 
user3010322
1:57 PM
But, they are 2 distinct types, yes.
 
I mean, std::array has one data member, struct {float x,y,z,w;} has 4
 
user3010322
True.
 
user1804599
@melak47 no.
 

« first day (1134 days earlier)      last day (3820 days later) »