« first day (1594 days earlier)      last day (3358 days later) » 

2:00 PM
Prolly. But it's really advanced stuff.
 
Just curious @BartekBanachewicz, what do you do for a living?
 
@Rerito I work in a gamedev company
Ah, GtkRadiant is still alive. Nice to hear.
 
user3010322
GtkRadiant?
 
Ok, I begin to understand a little more why there's so much "gamedev" puns here
 
@Rerito You need flow-control so that you do not piss out-of-bounds and generate a panFault.
 
2:05 PM
@ThePhD it's a level editor that id Software created for their games and opensourced
 
user3010322
Sounds kinky.
 
@ThePhD It's extremely easy to use
It was my first 3D tool, when I was in 1st grade in high school
 
user3010322
But is it The Dream™?!
 
the what?
 
I need to get to London soon
 
user3010322
2:06 PM
The Dream Tool, that does All Things Perfectly And Has Beautiful Clean Code.
 
@ThePhD the latter certainly isn't true
the former prolly ain't, either
 
The two way tickets from Paris to London is kinda expensive though
 
doesn't change the fact that a lot of games' maps were created in it
it has 0 harware requirements, works smoothly, and utilizes CSG
 
user3010322
CSG?
 
Constructive solid geometry (CSG) (formerly called computational binary solid geometry) is a technique used in solid modeling. Constructive solid geometry allows a modeler to create a complex surface or object by using Boolean operators to combine objects. Often CSG presents a model or surface that appears visually complex, but is actually little more than cleverly combined or decombined objects. In 3D computer graphics and CAD CSG is often used in procedural modeling. CSG can also be performed on polygonal meshes, and may or may not be procedural and/or parametric. Contrast CSG with Surface mesh...
it's really cool because to say make a room you start with a huge solid block and then cut out of it
you cut holes for doors and windows
like it was clay or something
then you run a simplifier on geometry and bam here's your nice game level
 
user3010322
2:10 PM
I think that actually answers a lot of my questions about how I should be constructing these 2D worlds.
 
user3010322
My current approach is a major crapshoot, but this looks like Gold™.
 
user3010322
 
@ThePhD :)
hmm actually we should start scheduling the jam
Basing on the jam poll responses, here's the Doodle. Just picking the day for now.
4
beh no owners around
 
Xeo
That's a lie.
I'm always and never around.
 
user3010322
Xeo never sleeps. Xeo is always watching.
 
user3010322
2:19 PM
Beware the eyes in the sky, carried on the wings of ice.
 
@sehe how would you add a member function to it then? (i would send a patch afterwards but that is another story...)
 
in JavaScript, 2 mins ago, by Nick Dugger
48 hours is winning the gamejam poll -- odd, I would have thought 24 hours would win.
in the meantime, JS room is planning their own jam
I've contacted nick already, maybe we can combine them into a superjam
@Xeo thanks
 
35 mins ago, by sehe
Free functions are the shit: rough draft (even with overassuming, exceedingly expensive "paranoia" DEBUG checks)
@gnzlbg What is the use of having the member function?
 
@sehe for an unsafe_mutate_in_place? first that you cannot do it with a non-member function without overhead
 
@Rerito Doesn't seem that bad, if you can pick dates, Easyjet: Final Price €86.96, CDG<>LGW
 
2:23 PM
/// Replace a \p key on the set \p set with the TotalOrderPreservingMutation \p m.
///
/// \tparam Set A std::set
/// \tparam Key The key type of `Set`
/// \tparam WeakTotalOrderPreservingMutation A mutation from the old key in the
/// set to a new key that preserves the order, that is: !(old < new) && (new < old)
/// \par Complexity
/// \f$ O(logN) \f$ where \f$ N \f$ is the number of elements in the set.
/// \pre The \p key must be a member of the \p set.
template <class Set, class Key, class WeakTotalOrderPreservingMutation>
 
Heh, CDG<>LGW makes me think if the pipe that connects the urinals in a backstreet pub.
 
@MartinJames I don't know when I'll book, but I've got a friend I haven't seen for a long time in London
 
@Rerito Oh - if you can pick you own dates, you can sure get good deals.
 
And since I'm planning to go with the GF, the price doubles!
 
@Rerito Unconference-time would be best:)
 
2:26 PM
@sehe you want to perform the last three operations in place without copies. You can only do it with a member function, since the interface of the set doesn't allow you to do that.
 
@gnzlbg how so. What would make it unsafe except the non-const cast?
 
@sehe without the assertion to check that the mutation preserves the order, you basically screw up the invariant of the set
 
@Rerito Get GF to pay for it - price disappears:)
 
@gnzlbg Nope. Without the assertion, you basically say that you know what you're doing. Also, why doesn't my version satisfy the requirements? I think either you are me are missing something here
 
@sehe as a non member function it is safe, but, you restore the container twice, and make 2 extra copies. If you do it in place, you don't.
 
2:28 PM
> restore the container twice
what
 
The safe version is O(logN), while the unsafe one is O(1)
@sehe resort
 
> make 2 extra copies
of what
@gnzlbg I don't. Have you even looked at the sample?
 
@sehe which sample? the multi index sample?
 
Gosh. I'm done I think. I may be slow because sick, but this isn't just me here
I can't link to the same sample 3 times without feeling bad.
And no, not boost multi-index.
I'm pretty sure I'm missing a requirement though, because there's absolutely no reason why that couldn't be a free function. So perhaps mutation is something else I didn't think of
 
@sehe I just read the line you pinged me. I read the second line but somehow didn't get that there was a sample there, sorry.
@sehe not invoking undefined behavior was a requirement for me.
 
2:32 PM
I repeated it :)
 
Your solution looks nice tho.
 
@gnzlbg Tell me where my sample would invoke less UB when done as a member function
Free functions for the win. Extending by abusing inheritance is bad enough, but copy-pasting complete implementations seems even more iffy :/
 
> LET ME USE MY ENGINE YOU FUCKER. D:<
lol
 
@sehe as a member function you only invoke ub if your mutation is not ordering preserving, in your sample you get a const iterator, remove the const, and mutate it. For what I know the set might store a list of nodes with "const values" inside. Removing const on that is UB even when your mutation is order preserving (not that you can fix that with a member function if that is the case, but my code won't compile).
 
lol, don't mention the war...
http://www.dw.de/unexploded-wwii-bomb-found-near-dortmunds-signal-iduna-park/a-18282545
 
2:34 PM
@ThePhD How do you propose dividing in half when you want to use your engine?
 
@gnzlbg Except the objects aren't const. They're only const to the outside interface. How the hell do you suppose the container would be implemented otherwise? That would, by definition, invoke the same UB then
 
user3010322
@BartekBanachewicz Oh no, the request for dividing in half and the request to have my engine used are orthogonal.
 
user3010322
This reminds me that I need to get OpenEXR building in Visual Studio /cc @Borgleader
 
@sehe Node { Node* left; Node& right; const key; }; ?
 
So, since you can rely on the underlying storage not being const (like, mapped to flash ROM or sumtin), there's no issue casting away the const. Just know what you're doing. And do err on the safe side for DEBUG builds :)
 
user3010322
2:37 PM
> This release also includes improvements to cross-platform build support using CMake.
 
user3010322
Final fucking lee.
 
user3010322
Let's see how true it is.
 
@sehe i'm pretty sure your solution will always work, but the const cast stills makes me uncomfortable somehow
 
Oh well. You can't have comfort and optimal performance. That's a non-issue in my opinion
 
@ThePhD I dunno, if you can provide a runnable version for people I see no reason why you shouldn't use it. With opensourced game logic though, hmm.
 
2:38 PM
@sehe actually, i think the interface is just broken, if you need to do this...
anyhow thank you a lot for your solution, it is nice :)
 
@gnzlbg Yeah, indeed. Whatever was wrong with
1 hour ago, by sehe
@gnzlbg just make it a map. Or struct element { mutable value; key_type key; /*...*/ };
@gnzlbg :D
 
i mean, i have the same feeling with vector, not being able to resize/construct it without initializing elements, boost vector fixes that, but in Rust you can even change the length with unsafe get_len_mut if you need too
 
PS. just realized it needs to be std::forward<Mutator>(f) instead of std::move(f) there
 
It is like, you should almost never do it, but if you need it, just open an unsafe block and do it. The STL feels like "people should not do it, so lets make it impossible for them to do so if they need to".
 
As part of their 30 year anniversary celebrations, Ryanair are hosting a flash sale on selected flights across Europe including Oslo, Dortmund, Stockholm, Bordeaux, Cologne and more - with tickets starting from £6.99. Bring you own H.E.
 
2:41 PM
@sehe i'll stick to the slow one without const_cast, for high performance i will benchmark yours and test it with high optimizations enabled tho :)
 
@gnzlbg That's what I'd do indeed. Whatever I did, I'd surely not duplicate the container implementation just to hack the interface. It's worth the const cast if you were going to do the exact same thing in the class implementation anyways
 
user3010322
Acrobat X's OCR stuff is really great.
 
user3010322
Way better than the others.
 
user3010322
Actually allows me to search books, god bless. ;~;7
 
@sehe THE GREAT MUTATOR ARRIVED
 
2:43 PM
Good naming is important. Always naming it F gets boring anyways
 
@gnzlbg const_cast does allow you to. Which I consider to be a superior alternative to a whole block, since unsafe { … } doesn’t tell you which bit of the whole block is the unsafe bit.
 
@gnzlbg most of the time you can use the Uninitialized storage bits of the standard library to achieve similar results. But yeah. Abstractions hide details that you might need for optimal results.
@BartekBanachewicz That's a silly name for a car
 
@sehe it's 2015' R8
 
@LucDanton but const_cast and write to a read only variable is UB, and since the interface doesn't expose it, you don't know if you are doing so with a std::set.
 
2:49 PM
@gnzlbg The allocator controls that.
 
@gnzlbg except the object is not const. It cannot be, because how would the container be implemented
@LucDanton That's more accurate indeed.
 
@LucDanton Not really, a set is just Nodes, and they can be implemented like Node { Node* l; Node *r; const Key k; };
 
Similarly why I think it’s imperative that the vector interface only deal with the sequence and nothing more.
 
@BartekBanachewicz OK, drool. Now think about service bills:(
 
Hi folks, still banned to my tablet. New laptop will be delivered tomorrow :-P
 
2:51 PM
I meant that when I mentioned flash ROM as an example
 
you can store the key as a const value in a node, in fact, why wouldn't you?
The interface ensures that it will never change.
 
@πάνταῥεῖ inb4 DOA
 
> The quattro AWD system has been revised with an electrohydraulic multi-plate clutch on the front axle, replacing a viscous unit. This revised system routes 100 percent of power to the rear wheels under normal driving circumstances, and up to 100 percent of the torque available can be routed to the front axle if needed.
aww
 
@gnzlbg That doesn't make the object const. It's undefined to cast away const from an object when the actual object is const. Think of writing to a string literal (which is indeed mapped into read-only memory page)
 
Hah, foiled by interior const once again. My plan was to have construct hooked up to only construct non-const things. I actually have that problem for variant, sort of.
 
2:53 PM
@gnzlbg Invariants are on a higher level than that. The ordering invariants e.g. depend on a lot more than just the keys being const
 
user1804599
How do you merge changes from a branch in Git into the work tree without commits?
 
Is this UB?
int main() { const int a = 3; (*const_cast<int*>(&a)) = 2; return 0;}
 
Yes.
 
Xeo
@thecoshman Did you get an update on the ACCU situation, btw?
 
then doing so on a value on a node is UB too.
 
2:53 PM
@Xeo the which what?
 
otherwise i got const completely wrong understood
 
user1804599
I want to discard the branch and all its commits while merging without creating any new commits.
 
Xeo
@thecoshman Didn't you also send out a mail to ask for funding for ACCU in Bristol?
 
@MartinJames yeah feeling a bit like in a Schrödinger experiment. Still sick also :(
 
@gnzlbg Not really. The compiler couldn't optimize those away in just the same way as const int a = 3; there (it's UB to reenter main so it can be considered a static global and put into text segment)
 
2:55 PM
@Xeo oooh, lol. something about it not really being done, case not closed, but berried under a huge pile of ungiven fucks
 
@sehe Forget it’s int and then it’s dynamic initialization, so no it’s not a static global.
 
user1804599
Should I use git merge --squash?
 
> The V10 model will start at roughly $186,111 and the V10 Plus at roughly $211,377.
 
@sehe The thing is, the compiler can do something assuming it is never going to change. Will it bite you? probably not. Would it bit you if you add concurrency, who knows, its UB, it can bite you.
 
@LucDanton yeah. constexpr would be required for non-primitives
 
2:56 PM
Yeah but that’s more of an as-if.
 
@gnzlbg By now this is maturing into an excellent question for SO. You have a good knack for those, IIRC.
@LucDanton Yup. Mmm. I can't see how an implementation would place "any key" into truly const objects at runtime. I guess, Hell++ could do it and still be conforming
 
I don’t remember off-hand the particular paragraph that foiled me both for variant and that const Key but I really have to go to the shops. I’ll get back to you @gnzlbg.
 
@πάνταῥεῖ I am mostly recovered, but Anne is sicker than a really sick thing. I can hear her exploding downstairs even with my phones on.
 
btw it’s no accident that Rust ditched interior (im)mutability, it was a very good decision precisely for that kind of stuff
 
Also, chat server died?
Hello...... ?
 
2:57 PM
@LucDanton This gun' be good. Deserves to be answerified on SO then
 
I think that the solution to this problem is to allow functions in the STL containers that allow users to break the container invariants. They should be named unsafe_... and people shouldn't need them often. But not having them is not pragmatic.
 
@MartinJames Not for me
 
How about union a { has_interior_const foo; int i; }; btw? ;)
 
@sehe OK, reloaded page.
 
2:58 PM
AFAIK there isn't a single function that can break a containers invariant in the STL, and the committee was against the uninitialized constructor for vector.
 
@LucDanton I don't follow.
 
@gnzlbg I want them on the allocator side of things tbh. Separation of concerns!
 
@LucDanton I think that is only UB if you mutate a when foo is active via a const cast.
Anyhow i prefer the recursive variant implementation of Eric Niebler in range-v3.
 
@LucDanton So after c++11 decimated the allocator interface, we'd get raw_inplace_assign, etc. ?
 
@gnzlbg Then what if my allocator allocates everything in such a thing, allowing me to bypass const?
 
3:00 PM
Oh that way. That's basically my whole point. The memory cannot be const, because node-based containers will have to allocate and initialize that very object
 
Here it is, it uses a recursive union:
https://github.com/ericniebler/range-v3/blob/master/include/range/v3/utility/variant.hpp#L65A
You need to cast the const away somewhere, e.g., suppossed you build a const arena:
const Arena<bytes> arena;
const_cast_away_arena_allocator alloc(arena);
std::vector<T,...> v (10, alloc);
 
I'm a bit flustered why a range library has a variant implementation. But that's probably my short coming
 
you would need to cast the const away in the allocator
@sehe He doesn't want any external dependencies, so he basically reimplemented a whole chunk of boost using C++11 and concept checking.
 
That’s a fool’s errand!
 
In my last project I included range-v3 for the utilities, i'm not using the range stuff.
variant, meta, concept checking, ...
tuple algorithms
 
3:03 PM
oh man The 100 is just the best thing ever
 
it compiles so much faster than MPL, Fusion, Config, ...
 
@gnzlbg lol, and boost is a weird thingy?
 
Xeo
@thecoshman :(
 
Compilation considerations is why I’m not moving to a constexpr variant.
 
@sehe in that project im on my own, i can do whatever i want
 
Xeo
3:04 PM
my boss told me he could get me a 500eur partial funding, would need to supply the rest
 
@gnzlbg ah
 
Oh, it’s 3.8.7 as it turns out. I thought it was its own thing.
 
Assuming implied §
 
> If, after the lifetime of an object has ended and before the storage which the object occupied is reused or released, a new object is created at the storage location which the original object occupied, a pointer thatpointed to the original object, a reference that referred to the original object, or the name of the original object will automatically refer to the new object and, once the lifetime of the new object has started, can be used to manipulate the new object, if:
> — the type of the original object is not const-qualified, and, if a class type, does not contain any non-static data member whose type is const-qualified or a reference type, and
Just one bullet points of many, but it’s the relevant one.
This fucks up a lot of stuff!
 
i just did a silly calculation, how much does a millisecond stop for IO cost me
 
3:05 PM
off to the grocer’s
 
I'm a weird critter. I like being close to the metal. But this amount of legalese still gives me the jeebies
 
I actually have no idea whether changing the variant member of a union thingy counts as storage reusal.
 
the grocer's.
 
10cents per millisecond stop
 
@sehe I was cleaning my glasses!
 
3:07 PM
:D
 
It's a nasty flu this year. Took three days to fully evolve. It's day 4 now :-/
 
You too. Three of us down here.
And my dad called off the birthday visit. Poor daughter
 
I'm ill too, and some colleages, where are you from?
 
Pantha is in DE, I'm in NL
 
i'm in second day :/
Im in Aachen, its close to NL
 
3:08 PM
38 mins ago, by sehe
Gosh. I'm done I think. I may be slow because sick, but this isn't just me here
 
@sehe sorry, it seems me too :D
 
^ lol, I called it
@gnzlbg That's indisputable fact
 
need more coffeine
 
OK, my interwebs are officially fucked up.
 
@gnzlbg Actually, in fairness it seems you have given this more thought than I have
 
3:11 PM
I'm even slower, because my old notebook screwed up, and I'm writing from my tablet :-P
 
@sehe It is like the 3rd time i arrive at this problem since christmas. I'm always like, "why the fxxx are the iterators of a set const?" And then its like, "there was something", till i finally realize "i wrote a function for that!", and then i look at it and say, "this sucks".
 
Of course the iterators are const... :(
 
yes, why would you want to mutate the key, since you already have it right? :D
it is the same as the one you have!
but they forgot that set requires a WeakTotalOrder, not Equality
 
I'd opt for the multi_index_container in a heart beat if it really mattered. And I would have zero qualms about const_casting on the flat_set unless I was on very specific hardware and ditto compiler
 
@πάνταῥεῖ Never had the flu, ever
 
3:13 PM
@gnzlbg No. They didn't forget. They just didn't separe key and object. By design
@Rerito You're an alien
 
I mean, maybe this won't work when they conceptify it.
Of course it would, find uses WeakTotalOrder to find stuff.
 
Meh try reboot
 
@BartekBanachewicz lol
 
vim as image editor anyone
 
3:16 PM
i'm an emacs user but hate it
must be the only one
 
this looks like a perfect file format for game jams anyway
I have to add support for it to hate
 
@BartekBanachewicz is that the GOTY on linux for 2015?
 
@AlexM. look at the link above
I could do pixelart graphics for that 2D mmo
Also fill out the doodle guys
also hi @R.MartinhoFernandes
 
Hi there! I was answering a question and now I have a doubt: I'd say that C allows "undefined references" as long as the symbol is found during linking (like, I can use printf without including stdio.h, as long as I link with libc), on the other hand C++ requires a declaration for each symbol.

This is the idea, but it doesn't sound quite right... What would be the correcting phrasing of the sentence above?
 
Chrome royally sucks at playing GIFs
just grinds to a damn halt
 
3:27 PM
@StefanoSanfilippo it's not "undefined references", it's the opposite - undeclared definitions.
 
I think I'm going Portuguese I think I'm going Portuguese I really think so..
http://meta.stackoverflow.com/questions/286931/the-tabs-on-the-user-profile-pages-are-showing-up-in-portuguese
 
WTH. SO introduces help-vampiring on behalf of their askers?
It is curious that in Portuguese StackOverflow, all the tabs are in English - meta.pt.stackoverflow.com/questions/2486/…Victor 21 mins ago
hehe
 
Okay. I got it.
Suppose there is an implementation of an arena allocator that uses a big unsigned char[size]; as backing storage somewhere in the program.
Suppose the std::set implementation does use a const Key subobject in their internals.
 
@sehe If he wasn't isolated on the Arctic circle, I would blame robot for it.
 
Now what if during program run a node is constructed in a place where there was another node, that was destructed?
My reading of the Standard is that this is a reuse of storage (because the backing arena is the same during both constructions), ergo UB is near.
 
3:35 PM
Officially that might be construed reusing space after const object was destructed?
 
As an aside, assume that variant members count as reusing storage (because I still have no clue about that). Then there can be no library implementation of optional<Key> that doesn’t exhibit UB if you do o = a; o.reset(); o = b; for similar reasons.
 
I don't really care for this kind of legalese. I mean, unless that uchar[size] backing was in a data segment with special properties (e.g. a static pool of XML element names, as flyweights, I can see it happen), I wouldn't worry about it.
I know that it's important that the standard wording be accurate, so I'm grateful people will go these lengths to ensure that it is.
 
oh for fuck's sake
 
Hi to you too
 
I really wish my boss would stop saying "ah yeah, that'd do it" every time someone finds the cause of some bug. When he doesn't understand the bug, or its resolution. It's REALLY fucking winding me up.
 
3:38 PM
Imo the wording is fine. It’s const subobjects that should (possibly) be deprecated.
 
@LightnessRacesinOrbit Dilbert!
 
'I have 4096 asteroids' - tough game!
 
It's like he's going out of his way to make it seem like he has a clue
 
Speaking of wording, because references are not objects I think objects with reference members are fine. I find that funny.
 
I just wish his bosses knew it was all an act grrrrrr
 
3:39 PM
@LucDanton Mmm. I admit I hate them. And avoid them. Not so sure about deprecating them. Again, it seems you have been over this a lot more than me. You may be right!
 
But we all do so why he does it to us is beyond me
 
@LightnessRacesinOrbit At the very least it's highly probable he has no clue what you're typing into a chat window right now. Best to verify that you are using SSL here, and not on a Lenovo laptop :/
 
@sehe it's not like that's suddenly a very first unsocial, rude or otherwise controversial thing he (or anyone) has said here
 
yay, v1.1.00 released
only two months late
 
user3010322
@sehe Why not Lenovo?
 
3:44 PM
@ThePhD Superfish
 
user3010322
Super...fish?
 
My c++ assignments are so expletive easy
 
all assignments are
how's your tic tac toe going, more importantly
 
Ah.
Berlin again.
 
user3010322
Wow.
 
user3010322
3:46 PM
Buaha. Buahaha.
 
user3010322
Bloatware gone wrong.
 
user3010322
Good thing everytime I get a PC I wipe it with a fresh install and then manually install just the BIOS and Driver bits myself.
 
user3010322
Sucks for the common users, though.
 
@AlexM. I finished yesterday at 5PM with the extra credit done
Got stir fry as reward ^.^
 
I was more about whether or not you've done it properly
and if you stopped making your players inherit mysqldatabaseconnectors
 
3:48 PM
> uni assignment
> properly
pick one
 
@R.MartinhoFernandes 'Sunny, 9C'. Must be a shock.
 
Didnt fix the design cause professor didnt care but I need to make sure poor design doesnt happen again in the future
 
@DonLarynx that's not as easy as saying "I won't design shit badly from now on"
 
Well I wont design shit badly from now on.
 
that's a first step.
Now you only have to design 1000 shits badly
 
user1804599
3:49 PM
Transducers are funky.
 
@BartekBanachewicz not a problem in C++ :(
:)*
 
@DonLarynx college is a huge fap isn't it
^ take your designs there whenever you have something working
you'll get answers
 
@AlexM. what grade are you in? And thanks I will
 
I'm finishing up college in a couple of months or three
 
O same, do u live in murica?
 
3:52 PM
no
my parents are so focused on me finishing college I'm not sure what they'll focus on afterwards
maybe it'll be like "ok, try not to die now, good luck" or sth
 
@MartinJames Not as pretty, though.
 
@R.MartinhoFernandes Oh - the skies cleared?
 
user3010322
@AlexM. "We've done our job, later Alex!"
 
user3010322
"We'll be in Hawaii if you need anything."
 
@ThePhD Yeah - was thinking that. "OK, you graduated, now sod off".
 
3:56 PM
@MartinJames Nah, but the place itself is full of breathtaking vistas.
 
@R.MartinhoFernandes Snow, ice, fir trees?
 
@MartinJames the funny part is
I don't depend on them for anything lol
so I can't really sod off
they have to sod off
because I've already done it
 
have I said yet
the 100 is fucking epic
 

« first day (1594 days earlier)      last day (3358 days later) »