« first day (563 days earlier)      last day (4389 days later) » 

11:00 PM
so then
the British government decided that they should order our ISPs to block The Pirate Bay
what a bunch of losers
 
as if I won't find a way around it through a proxy or someshit like that
 
Google Translate?
 
lol yeah
 
@DeadMG didn't I read that an higher European court already ordered that they were immune to that or something
 
11:03 PM
Anyway, I don't even use TPB.
 
eh, it's not common for me
 
If I want to find a torrent about X I just Google filetype:torrent X
 
but I could go elsewhere anyway
 
// vim: set ft=cpp:
 
11:07 PM
@SethCarnegie it highlights standard headers
 
@Abyx but not user-defined ones for some reason
 
@SethCarnegie just add an extension to your headers.
 
@SethCarnegie and it doesn't highlight when I open my GCC headers :(
 
@Abyx why on earth should I have to do that
 
11:08 PM
@Abyx in my case, I can't
 
@SethCarnegie and why do you have files without extensions?
 
@Abyx because I want to
Also it would be for template implementation files which are typically .template or whatever
 
@RMartinhoFernandes Errr.
 
@SethCarnegie ok, that's fine. but VS shouldn't highlight'em just because one or two users want such weird thing
 
11:12 PM
It's weird not to be able to tell the IDE what type a file is
 
Yeah. Use a manly editor.
> Readme added
The damn README is empty.
 
lol
@RMartinhoFernandes what's a manly editor that has good code completion
 
@SethCarnegie no one needs such feature
 
or are the two mutually exclusive
@Abyx apparently someone does
 
@SethCarnegie who?
 
11:13 PM
@Abyx What? That sounds like Apple policy.
 
@Abyx me
 
@SethCarnegie so what? write you own VS, if you need it
 
that would take too long
 
btw robot, I feel super-proud of myself
today I proved that a specialised heap allocator can perform faster than alloca
 
@SethCarnegie asking MS to add this feature would be longer
 
11:15 PM
lol
 
return std::swap(lhs.value, rhs.value);
Eh?
 
@EtiennedeMartel It’s valid!
 
@EtiennedeMartel valid
 
but thanks for spotting this, it’s of course a typo
 
I know it's valid, but, erm.
 
11:16 PM
lol
 
@DeadMG Oh, I saw that, it was right before I came to chat today.
 
@DeadMG faster? or just within margin of error?
 
Also, your move constructor does not set the other pointer's value to null.
 
@EtiennedeMartel fixed
 
@MooingDuck Eh. I just came back to it, and now I'm about 4:5 in favour of the arena.
 
11:16 PM
@EtiennedeMartel Yes, it did in the first version but why bother?
 
@KonradRudolph is that the non-owning smart pointer we discussed earlier?
 
@DeadMG you mean "another stack allocated in heap" ?
 
@SethCarnegie vim works fine for me, without any plugins. YMMV. Some people use ctags with it, and I've heard you could use libclang with it. Never tried.
 
@MooingDuck Well, “smart” … but yes
 
@KonradRudolph Because now your move constructor is just a copy constructor in disguise.
 
11:17 PM
@KonradRudolph apperently not
 
@KonradRudolph Why do you have a move constructor at all?
 
@EtiennedeMartel well, does it make a difference?
 
It makes it redundant.
 
@RMartinhoFernandes Why do I have a destructor? I prefer to be explicit. Also, this was an exercise in futility anyway ;)
 
@KonradRudolph Because now your users think they can move the damn ptr, but it doesn't move it. You're lying to your users (dun-dun-dunnnn)
 
11:18 PM
@EtiennedeMartel I don’t understand – how does this not move? Or rather, how is it different from moving a raw pointer?
 
@KonradRudolph I thought you were complaining about having to write some boilerplate yesterday.
Just saying.
 
@KonradRudolph Because moving moves the data from a place to the other; this copies it (that is, the data is still available at the old place).
 
@RMartinhoFernandes Yes. But not these few short functions. I was complaining about error-prone repretition
 
@EtiennedeMartel which exactly duplicates the behavior of T*
 
@EtiennedeMartel The distinction only makes sense when the object owns something – which isn’t the case here. I still think it makes no difference
 
11:19 PM
Well, it's not trivially copyable!
 
@RMartinhoFernandes =default on everything?
 
@RMartinhoFernandes No?
 
Assert it and you'll see.
 
@MooingDuck I should actually do that, yes.
 
so
I'mma go write some code that makes some potential fields
 
11:20 PM
@RMartinhoFernandes Ah. Good point
 
wish me luck, cause I've never done this before and it's gonna be fail-tastic
 
lol
Well, good luck.
 
the rationale for writing everything out was just to see whether I could get the interface right, by the way
but as @RMartinhoFernandes noted, I failed at that (trivial copying etc.)
 
@KonradRudolph you didn't
 
@DeadMG Potential fields? Like Overmind used for its muta micro?
 
11:22 PM
@MooingDuck That’s what I noticed – but did I get anything else wrong?
 
yes
 
I thought those things had to be trained and shit?
 
struct no_deleter { template <typename T> void operator()(T*) const {} };
struct no_cloner { template <typename T> T* operator()(T* t) const { return t; } };
template <typename T> using ptr = value_ptr<T, no_cloner, no_deleter>;
// TADA!
 
no
that's neural networks
they have to be trained
potential fields are relatively simple, although I'm sure I'll find a way to cock them up
 
Does anyone know if a string sent to a window with WM_SETTEXT needs to live as long as the window does, or does the window make a copy?
 
11:25 PM
@RMartinhoFernandes Are you talking about this? mr-edd.co.uk/blog/value_semantics_for_polymorphic_types
 
@KonradRudolph Mine.
 
Anyway, part of the reason for this class was not to have a conversion from T* to ptr, not even explicit
but yes, that’s a weak reason
@RMartinhoFernandes nice
anyway, I really need to get to bed now
 
@KonradRudolph I'd still add ==s against normal pointers.
 
good night y’all and thanks for the feedback
 
So you can do ptr<T> p; if(p == &something) {
 
11:27 PM
@RMartinhoFernandes Hmm, that seems safe enough
 
@KonradRudolph not even explicit? How would you give this ptr a value?
 
There's a factory function.
 
@RMartinhoFernandes oh, k
 
@MooingDuck ptr<int> px = raw_ptr(&x)
ok, off
 
@KonradRudolph iterator_traits?
 
11:32 PM
shpoilshport :p
it will be done
 
hmm, access denied. That's always bad
especially when running on admin on Win Xp and getting an "access denied" on installing a dll to the user directory.
ah, because the dll is already there and in use
renamed dll, problem solved
 
@MooingDuck I've always hated that error message for files in use
seems like they would have a more helpful message
 
@SethCarnegie I hear for newer versions they say what is using the file, but I haven't upgraded from XP yet, and neither has my work.
 
iterator_traitor
 
how often does it happen that people edit messages to be different after they get starred, I wonder?
 
11:40 PM
I'm regretting my decision to not sleep.
 
your bed should still be available
 
If I go to sleep now, I won't wake up in time for classes.
 
same thing - reading chat, writing bad code, and not going to sleep
 
Hmm, I don't like one thing about my value_ptr.
It doesn't have value semantics for moves.
 
thats a bit of a crippling problem
damn
not sure: how much to weigh the forces
I need to implement a proper clustering algorithm
 
11:54 PM
@DeadMG It's not that crippling.
Moves work, but by moving the internal pointer from one to another.
It just never calls a move constructor of the type.
 
how is that not value semantics?
 
Isn't that better?
 
I was investigating if I could get rid of the null state.
Moves are the only thing requiring it.
 
nah
moved-from objects are in an unspecified state
you don't need to have an actual null state if the moved-from object is null
all you have to do is say "UB if you access this value without assigning something to it first."
it's pretty evident to everyone that, in general, you can't depend on a moved-from type to hold anything meaningful anyway
 
yeah definitely
 

« first day (563 days earlier)      last day (4389 days later) »