« first day (1504 days earlier)      last day (3437 days later) » 

user1804599
12:00 PM
numpy.concatenate mutates the input and fucking returns it instead of None
 
@Rerito just ask
also my friend is being interviewed ATM
I feel kinda weird about that
working with a friend seems weird
 
Xeo
1 message moved to bin
 
Just for you @AlexM. :p
 
Xeo
no gifs
 
Ell
changing to orthographic seems to have fixed it
also I made the top a triangle fan instead of an ngon
 
12:03 PM
So, I want to keep track of moving objects in an N-dimension space (of course, for practical applications, N will likely be 2 or 3)
The data structure should serve queries like "give me the objects within that range of this position"
 
you need a structure that allows for N-dimensional range queries
like a K-d tree
 
Ell
@Rerito quadtree maybe idk
 
yes, I need efficient lookup and efficient update
 
yes, you received your answer
 
so I figured out something like R-trees
 
12:06 PM
@Ell Looks awesome.
 
The remaining problem is the update policy. Should an object move, it might break the tree ordering
First idea : two different trees : one for static objects, the other for the moving one
 
or a self-balancing tree
have you actually tried anything?
or are you in the pursuit of the ideal solution(TM) before writing anything?
 
It's just a brainstorming for now
 
just erase the node from the tree at the old position and insert it at the new position
 
Ell
@R.MartinhoFernandes .blend file is here mediafire.com/download/yekkaypojfl5l2t/robot.blend
it's made of quads apart from the very top and bottom faces which are made of triangle fans
 
12:09 PM
@Puppy of course that would work, but it might be a pain in the ass
 
Ell
if you open it in blender you won't be able to see it unless you zoom in a lot because it's measured to scale
 
might being the keyword
 
it isn't.
 
If the objects "move too much" for instance
 
Ell
also you'll probably have to change your clip distance because when you zoom in that much it might be cut off
 
12:10 PM
you need to insert new objects and erase dead objects anyway.
so just re-use that functionality.
 
in any case it makes sense for a self-balancing tree to be updated often
 
simple, easy, job done.
 
that's what they're optimized for anyway
 
go away, code it, and actually have a problem
 
what kind of solution do you want?
 
12:10 PM
@Rerito break their little legs, show 'em who’s boss
 
I was thinking to keep a hashtable of the objects on the side
to perform a "bottom up" approach
 
you were thinking of a lot of things
 
Ell
@R.MartinhoFernandes I can give it to you in a different format if necessary
 
here's the steps you should follow
1) Write code.
 
Ell
but I'm going to manchester at 4ish so ask before then :)
 
12:11 PM
2) Ask on stackoverflow.
 
@Ell Blender is ok. The guys can export it to whatever they want.
 
Ell
Cool :) Do tell them the bit about zooming in & clipping plane though. Unless they want to just scale it up and do their own thing with size values. It's to proportion so
 
Cannot work on it right now @AlexM.
The idea behind the question is more to me than just "will it work ?". One might say it's for the beauty of it
 
I don't know if it will work
I'm not going to code your solution to see if it works
I can't even understand it
"keep a hashtable of the objects on the side to perform a "bottom up" approach"
 
Of course you're not going to code that's not the point ! :)
 
12:14 PM
what the hell does that even mean
 
Your objects are stored in the tree, ideal for looking up etc.
 
Ell
@R.MartinhoFernandes for good measure, here mediafire.com/download/164za9blazq4b3p/robot_large.blend is one 100x scaled (I'll stop pinging you now)
 
They move, one idea is to just delete them from the tree and insert them regarding to the new position
 
Ell
@Rerito what would be the key?
 
@Rerito yes, and that will work
now go do it
 
12:16 PM
Since it would be R-tree (more likely), the key would be a Bounding box
(so if N is the dimension of the space, 2.N values for the upper and lesser bounds of each dimension)
 
@Ell What does 100x mean? 1unit = 100mm?
If you could scale to 1unit = 1mm, it would be great.
 
Ell
scaled 100x in each axis
 
Fuck you, German.
 
Ell
@R.MartinhoFernandes well. both scenes have units
 
Xeo
@R.MartinhoFernandes lol
 
Ell
12:19 PM
if you open the first scene and zoom in and click on the object you'll see the dimensions listed in mm, not unitless
I could make a unitless one if you wanted
 
@Ell Ah, no, that's ok.
 
Ell
it's just tiny is the only problem :P
 
Didn't know you could set the units in the file.
 
@AlexM. I'm on it, but only on my spare time ... And I'm slacking here instead of working (I am sure I am not the only one doing that :p )
 
@Ell Well, the thing is meant to be tiny.
 
Ell
12:21 PM
Yeah
 
Gonna print 36 of them.
 
Xeo
> "Hitchhiker's Guide to the Galaxy, The", allusion to
lol
 
Can probably fit them all in tonight's batch.
 
Ell
@R.MartinhoFernandes I hope they're right :P
Now I feel pressure :L
where 1 unit = 1mm
it looks much bigger when you open it in blender now so no zooming or anything required
 
Now I just need to find a way to puncture holes of the right size on the board.
 
12:26 PM
woot, Rome 2 TW 75% off on Steam
gotta get it
 
@R.MartinhoFernandes are those rubber legs for circuit boards?
 
actually the whole TW series is 27,49€
so it might make more sense to get that instead of just Rome 2 for 14 eur
 
the usual price for Rome 2 TW is 60eur?
owch.
 
@BartekBanachewicz No. They're bases for these i.stack.imgur.com/SGRwK.jpg, for this board i.stack.imgur.com/m01DD.jpg. They're meant to stick out from below.
 
oh right
 
12:30 PM
@Puppy yup
14 eur is ok, but 27 for the whole series is a steal
 
can safely say would not pay
 
Why does std::make_exception_ptr take its argument by value?
 
exceptions are always thrown by value
 
I already have Rome 1 and Medieval 2 but I don't have Empire, Napoleon, Shogun 2 and Rome 2
so it's a good deal
 
@AlexM. Empire and Napoleon really suck, though.
 
12:31 PM
so I've heard
 
Shogun 2 kinda sucked too
 
that I've not heard
 
it had many of the same problems as AC but none of the upsides.
 
I only heard that it's the best TW since Shogun 1
 
went back and replayed Shogun 1, and honestly, it's a rose-tinted-glasses thing
 
12:32 PM
Do you have games/things to tide you over until the Winter sale? Other deals then.
 
I'm not convinced that the TW series was ever that good.
 
Thanks Steam
 
@Puppy I liked the atmosphere the most
I was used to bland strategy games like Age of Empires
when I saw the first battle in Rome TW, with the general speeches and actually everything
I was like "holy crap"
 
eh, they were no Starcraft or Total Annihilation
 
12:33 PM
@CatPlusPlus Steam’s way of telling you it loves you too.
 
@CatPlusPlus wish there was a checkbox somewhere for me to click on, to turn off f2ps
something like "No, steam, I do not want to play free to play games."
 
@AlexM. You've heard it firsthand from Puppy.
 
fuck, I have a project and VS crashes every time it tries to load it.
 
Must be real good
 
// should I take param by ref here?
template<typename Exception>
auto MakeExceptionalFuture(Exception e) -> std::future<void> {
    std::promise<void> prom;
    prom.set_exception(std::make_exception_ptr(e));
    return prom.get_future();
}
 
12:36 PM
ah corrupted solution settings
@StackedCrooked No, just move it into make_exception_ptr.
 
Ok. I'll do it! :P
 
going for a super hard walk this weekend, not because the track is hard to find but need to cover 45km distance within 30 hours time
 
@StackedCrooked && and forward.
 
@R.MartinhoFernandes Why doesn't make_exception_ptr do that?
 
Do what? Write your function for you?
 
12:39 PM
no, take by reference.
9 mins ago, by Puppy
exceptions are always thrown by value
is why.
and the exception system has the leeway to move the exception as many times as it likes
 
@StackedCrooked why are you using auto there?
 
in other words, if you're throwing, there's no cause to get bitchy about removing every single move.
 
@Puppy But that doesn't matter.
 
Ell
@chmod711telkitty wow
that sounds more like a jog
 
@rubenvb because auto is cool
 
12:40 PM
@Puppy There's no real gain in using move instead of forward, and there's no cost like in other scenarios, since it's already a template.
 
there's no real gain in forwarding either
 
Ell
@rubenvb cos trailing return type more natural
 
@StackedCrooked It would be cool there is you dropped the -> ... part.
 
there's no particular gain in either case here.
 
@Puppy Bullshit, and you know it.
 
12:41 PM
@Ell Not really? That depends?
 
I definitely don't know it.
I always take by value unless I have a compelling reason to take by ref.
 
I did some jogging last time I went bushwalking, mainly because everyone else on the team was super fit and walked fast
 
Maybe make_exception_ptr takes E because E&& would be problematic for overloading?
 
@Ell no return type is even more natural
 
@StackedCrooked No. That's irrelevant.
 
12:42 PM
Ok.
 
You have a parameter that you use for nothing other than passing along to something else.
Forward it.
 
E&& could be a little faster, but that seems silly in the context of throwing exceptions.
 
Ell
@BartekBanachewicz hmm sometimes
 
@Ell only explicitely type outer APIs :P
 
@StackedCrooked why should throwing an exception be allowed to be slow?
 
12:44 PM
Dammit, I need to move forward.
 
lol like it matters
 
Ell
@BartekBanachewicz also maybe sometimes you forget to return :P
 
@StackedCrooked Well, if it could, then it doesn't seem silly because you don't want an extra throwing point.
 
@Ell then it will break build on the usage. No problems there
 
Ah, good point.
 
12:44 PM
My Fingerspitzengefühl tells me that you just haven't found the place where it's aliased. And it's likely actually something like STLPort, or EASTL, or STXXL etc. Or indeed, std::vector. Heh. You could even drop namespace bpstl = std; in some strategically placed header and you don't technically change those lines of code... — sehe 11 secs ago
 
Yet, the committee decided on by-value.
 
@StackedCrooked Not on your function.
 
@R.MartinhoFernandes I definitely do not see what advantage forwarding has in this case.
 
Was that an arbitrary choice then?
 
It's cheap to make your function transparent. Not doing so is sloppy.
 
12:45 PM
Every choice is an arbitrary choice
 
@StackedCrooked The Committee didn't know shit.
 
Also don't assume committee is more competent than you :v
 
Rome TW had an amazing soundtrack youtube.com/watch?v=PmEhDAQTgH8
 
@CatPlusPlus Like the "Every choice ..." part :)
 
Ell
@BartekBanachewicz it won't
 
12:46 PM
@StackedCrooked It was not a choice about the function you just wrote.
 
@Ell show me an example
 
Ell
oh wait.
an auto example
I'm bad
 
@R.MartinhoFernandes I see. And what if it was implemented like this:
template<typename Exception>
inline auto MakeExceptionalFuture(Exception e) -> std::future<void>
{
    std::promise<void> prom;
    try { throw e; } catch (...) { prom.set_exception(std::current_exception()); }
    return prom.get_future();
}
 
Ell
@BartekBanachewicz yeah nvm my bad
idk what I was thinking
 
@Ell auto is even safer here :P
 
Jez
12:48 PM
GAHHH
i hate TFS so much
stupid checkout mechanism. so when i go to my "pending changes" window, i see... a bunch of files with no pending changes, because I changed them back.
why the heck does anyone still use it?
 
no return in a non-void function should be a hard error anyway
-Werror.
 
In this case the forwarding advantage disappears if called as MakeExceptionalFuture(Exc());
 
@StackedCrooked Why does it?
 
Just to improve my knowledge, what does the -> std::future<void> means ?
 
@Rerito Trailing return type.
 
12:49 PM
@Rerito it produces just a notification of its end?
 
@R.MartinhoFernandes Because the exception argument is constructed in place? (And then thrown by value. Would std::forward eliminate a copy here?)
 
@StackedCrooked Why is that inline?
 
Thx, googling it right away ...
 
@Columbo Because MakeReadyFuture has a non-template overload which needs to be inline. In order to not forget the inline there I put it everwhere... :/
 
@StackedCrooked Er, technically it is moved. Copy elision can eliminate all of it, but then it always can.
 
12:51 PM
@Columbo Why not
 
Let's put it another way: if you're writing generic code why are you making more assumptions than you need?
 
inline doesn't inline, it just makes ODR go away
 
@R.MartinhoFernandes Ok, I shall introspect
 
@CatPlusPlus ... you're jokes
 
@Columbo *your
 
12:52 PM
What does that even mean
 
@rubenvb **you're
 
Forwarding assumes nothing about the argument, and just lets make_exception_ptr do its thing.
 
@Columbo uh
 
@StackedCrooked The thing is: making those extra assumptions doesn't actually make writing the function any easier, so you shouldn't make them.
 
Wow, you were all so rude to @Randomman159, completely unprovoked. You should be ashamed of yourselves.
 
12:55 PM
@CatPlusPlus Just realized that that's not a valid sentence. Let me rephrase "You kiddin'?"
 
No I'm not kiddin'
 
@CatPlusPlus Okay den
 
@LightnessRacesinOrbit Where's he at?
 
@rubenvb Scared away.
 
@LightnessRacesinOrbit It's always the same two people.
Bartek and Puppy.
 
12:57 PM
Nov 24 at 7:05, by Rapptz
Honestly I think most people work with types assuming they're Regular
 
@Rapptz Even the Robot joined in this time. And Alex.
 
A similar topic came up earlier this week :v
Nov 24 at 7:23, by Luc Danton
I honestly think that (Semi)regular would fade into the background if templates were sanely type-checked. Imposing default constructors on producers is a way to relieve consumers from doing that type-checking by hand.
^my take
 
Ell
@R.MartinhoFernandes it assumes it's not a value, right?
 
@CatPlusPlus Then I suppose you know that for this matter function templates are covered by the ODR the same way inline functions with external linkage are.
 
Why do you care if it's inline?
Seriously who gives a shit
 
12:58 PM
No one.
 
is there a way to stop a long-running custom command in Sublime Text? Cancel Build doesn't help
 
I was just wondering whether I missed something again, and the inline was necessary.
 
@Columbo Maybe, I don't write C++ and try not to remember every stupid detail, still doesn't matter
 
@CatPlusPlus ... I just thought you implied something earlier, but you didn't. Nevermind.
 
1:01 PM
Now a probably stupid question..
 
OMG stop the internet
 
@Abyx Did you do Ctrl + Break? Because doing that doesn't work sometimes so you have to reconfigure the keyboard shortcut to something else. Doing it manually works though (Tools > Cancel Build)
 
How about this alternative:
template<typename T>
struct MakeReadyFuture {
    template<typename TT>
    MakeReadyFuture(TT&& tt) { prom.set_value(std::forward<TT>(tt)); }
    operator std::future<T>() && { return prom.get_future(); }
    std::promise<T> prom;
};
 
Not enough singletons
 
1:01 PM
I wish I knew stuff about promises and future.
 
Promises get broken and future will be shit
hth
 
@LightnessRacesinOrbit What?
 
@Rapptz @LightnessRacesinOrbit the fuck. I wasn't rude to him
 
@LightnessRacesinOrbit I had a misunderstanding from lack of context, and I was never rude.
 
Does "broken promise" refer to the fact that the promise object has been destructed (broken) or that the promised result failed to be delivered?
 
1:03 PM
No
 
I see.
 
@StackedCrooked Unspecified in the main.
For one thing, "failed to be delivered" is too vague to be meaningful, since any promise is "failed to be delivered" until it's delivered, and clearly we don't consider all promises broken until they are fulfilled. However, if the promise object is destroyed before a result is provided, then clearly the promise has been broken because it can now never be fulfilled.
Therefore, I'd personally say a strict combination of both. However, as I said a moment ago, I don't believe there's any such "official" definition for the term.
hth
 
Xeo
broken_promise is for an unfulfillable promise
 
Nerds
 
Xeo
and is only set when the promise is destructed before being given the value
 
1:08 PM
@Rapptz Cancel Build is not even active, probably because it's not a build but just a command
 
not sure what you mean then
you mean a plugin command?
just unload it, i.e. reset the program and make sure it doesn't get loaded
 
i don't even know who you are any more
 
Xeo
> When an asynchronous provider is said to abandon its shared state, it means:
— first, if that state is not ready, the provider
— stores an exception object of type future_error with an error condition of broken_promise within its shared state;
 
1:11 PM
lol
 
@R.MartinhoFernandes Can't it interfere with an overload for make_exception_ptr(std::exception_ptr)?
 
@CatPlusPlus You sure love butts.
 
Xeo
> ~promise();
Effects: Abandons any shared state (30.6.4).
@Lightness ^
 
~marriage();
7 Effects: Abandons any shared state (30.6.4).
 
1:15 PM
@LucDanton That reminds me of Dick Tucker the secret agent
 
@CatPlusPlus misrepresentation is fun
 
user1804599
Is there a name for this operation x? gist.github.com/rightfold/9e6b8df1063844ac4769
 
Yay for Fingerspitzengefühl ! — sehe 7 secs ago
 
"operation x"
 
1:19 PM
@rightføld wat
 
user1804599
google.nl/search?q=operation+x doesn't yield anything useful.
 
@rightføld wtf of an operation is that
 
@rightføld dupe
 
user1804599
@Jefffrey one that takes two vectors and returns a vector.
 
@rightføld constructed how
 
1:21 PM
How nice - patriotic education in a Ukrainian school. No, there is no nazi in Ukraine
 
user1804599
The result? That is what I am trying to figure out. :P
 
lol
 
@rightføld are those binary?
 
@Abyx You do know most of those symbols have their origins elsewhere?
 
@rubenvb I know. so?
 
1:24 PM
@BartekBanachewicz A x B = B << (A==1?0 : A), obviously /cc @rightføld
 
@Abyx Just making sure you're not implying something that's not.
 
lol
 
@sehe yeah, looked like power-of-two to me
 
@rubenvb you wanna say that those guys are not nazi? ok...
 
user1804599
@BartekBanachewicz no, but always between 0 and 1.
 
1:25 PM
@BartekBanachewicz but of course the operation is horribly underspecified. Guy needs to learn about implicit definition :)
 
@rightføld it looks like you are performing a matrix product and "linearize" the output
 
I thought of that myself, but then the following question came up: If I'm able to alter the contents of a variable by writing code, isn't that considered to be compile-time alteration, instead of run-time? — AutomEng 1 min ago
o.o
 
@rightføld then produce more example data
 
They have a NATO flag too.
They're clearly NATO as well as Nazis.
 
@R.MartinhoFernandes yeah, they love Europe and Europe (USA) helps them
 
1:32 PM
0
Q: Is there a name for this type of bitwise operation?

Lightness Races in Orbit[1 0] x [1 0] = [1 0 0 0] [1 0] x [0 1] = [0 1 0 0] [0 1] x [1 0] = [0 0 1 0] [0 1] x [0 1] = [0 0 0 1] Despite the clear pattern, I've not come across it before and am wondering whether it has a name.

 
user1804599
:v
 
That's just cartesian product with bitwise and.
Don't think there's a specialised name.
 
It's the "I'm going to steal your rep" product
 
@LightnessRacesinOrbit To go along with the "I'm going to steal your rep" avatar
 
"You have no power here"
 
1:37 PM
@Borgleader :D
Man, the Goa'uld Kali was hot
 
@LightnessRacesinOrbit Claim it as your invention and name it after yourself!
 
@StackedCrooked the Lightness Product
 
excellent
 
Sounds like Mr Burns @StackedCrooked
 
Hmm I seem to be having Friday trouble locating std::swap in libc++
 
1:52 PM
@rubenvb <utility> in C++11, <algorithm> otherwise :) (en.cppreference.com/w/cpp/algorithm/swap)
 
@Rerito Can't locate it there.
 
template<class T>
void
swap(T& a, T& b) noexcept(is_nothrow_move_constructible<T>::value &&
is_nothrow_move_assignable<T>::value);
 
@Rerito 1, that's a declaration, 2, that's in the comments.
Ah, it's in type_traits, go figure
 
We have perhaps the worse delivery management system ever
it's such utter shite
 
oops, my bad, but there is a definition further
 
1:57 PM
and having to suffer it through a shitty remote desktop doesn't help things at all.
 
@Rerito No, it's in <type_traits>. Near the end.
 
I can't even cdwithout lag!
 
got it :)
 

« first day (1504 days earlier)      last day (3437 days later) »