« first day (1859 days earlier)      last day (3315 days later) » 

19:00
@Ell can you get the native window handle from it? :v
Ell
Ell
@CatPlusPlus isn't there some way I can put state into the displayCallback?
if it's type is IO ()
There are libraries that use the IO monad to store mutable data
convert your pointer to an integer, then convert that integer to a X/Y position, then move the window there. :D
Ell
Ell
> An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a a box, which may be empty or full.
Not sure, never used it.
Ell
Ell
is everything a box in haskell? :L
Everything is a monad, every monad is a box.
More or less :P
It's just a standard mutable variable
Well, with automatic sync
Ell
Ell
19:06
Will using globals be easier?
It'll be MVars in Haskell anyway
Ell
Ell
okay
I'll use a global mvar
if that makes any sense
Just partially apply the callback
Why are you using GLUT anyway?
It's gonna be a pain in the ass
IIRC it's translated literally from its C api, which is very bad in Haskell
Ell
Ell
19:09
The coursework was written by the professor using GLUT
Of course
Ell
Ell
it's available in the haskell platform I think also
Apparently
Yo guys
Try adding something to pastebin
What for
19:13
Just put random stuff and hit submit
Ell
Ell
> Duplicate entry '2147483647' for key 'PRIMARY'
Actually just going to any paste triggers that
Ell
Ell
> #OpISIS- Expose & Destroy By Anonymous RedCult ....
19:13
> Duplicate entry '2147483647' for key 'PRIMARY'
lololol
Fuck Anonymous.
inb4 relational model broken
Ell
Ell
oh its [u?]int32 max
Databases are so simple
Ell
Ell
lol
19:14
called it
@Columbo you can't win with one pawn.
@R.MartinhoFernandes huh
@sehe Or can't you
Not in chess, anyways. Not without adversary cooperating too
@R.MartinhoFernandes Oh. You mean only Anon uses pastebin
Ell
Ell
@sehe I thought it was something to do with anonymous bringing pastebin down to prevent isis from communicating or something :V
surely not. Anonymous lives by pastebin
19:18
> Note: users familiar with VSTU will notice that the solution file and the project files are not prefixed with UnityVS anymore.
Thanks UnityVS
Where were you when pastebin overflowed?
> Microsoft Open-Sources Visual Studio Code
Ell
Ell
> Microsoft Open-Sources "Visual Studio: Code"
Good eve @all!
@Mysticial holy crap click on your notifications!!
that is making me twitch
19:23
@Puppy hm, the way the requirements of Compare are described here, I don't see a case NaN fails any of them: en.cppreference.com/w/cpp/concept/Compare
Who wants to draw every chess position with K+P vs K?
@rlemon Dude, that was 3 months ago. I have more now.
wKe6, wPe5, bKe8, black to move, white wins
@Mysticial how do you have 15K total there but +73K? spent it all on bounties/downvotes?
@Mysticial I .. just .. you masochist
19:26
@rlemon I'm not a masochist. I'm a sadist. I enjoy tormenting everyone.
:twitches:
@melak47 For all a, equiv(a,a)==true
@Puppy yeah, but check the definition of equiv.
NaN is not equivalent to itself.
@Puppy Is that guaranteed?
19:28
> equiv(a, b), an expression equivalent to !comp(a, b) && !comp(b, a)
@fredoverflow Yes
@fredoverflow Yes (at least for IEEE754 floats, which is basically all of them)
Then what's the point of std::isnan?
user406009
Some languages due have NaN == NaN though.
user406009
@fredoverflow Code clarity.
19:29
So the compiler doesn't optimise out your comparison
Plus that
Well idk actually if it's optimisable
Maybe not
user406009
@CatPlusPlus Isn't that illegal without ffast-math?
@Puppy but comp(nan,nan) is always false, so !comp(nan,nan) && !comp(nan,nan) is always true. so equiv(nan,nan) == true.
user406009
@melak47 Yeah, some important identities are violated for NaN.
user406009
It's horrible.
@Mysticial And I hate you so much for that <3
user406009
19:30
It's enough to make a mathematician cry.
A notion of isnan does not imply that there is a reasonable way to value compare with NaN.
@Puppy Can you pretend that a float array is actually an unsigned array and sort with unsigned comparisons?
don't do nan checks
@fredoverflow alias violation
user406009
@fredoverflow You need a union.
user406009
19:34
And even that is UB.
that's still UB
@fredoverflow you need memcpy
Okay so memcpy to unsigned array, sort, memcpy back?
user406009
@fredoverflow Just write a custom comparitor. That explicitly checks for NaN before using operation<
well, you could do, but I doubt that it would produce a meaningful ordering.
19:35
or just don't store NaNs
user406009
Oops, NVM. I thought Puppy responded to me.
@Puppy IEEE754 numbers have bitwise ordering, IIRC.
Oh wait, I forgot about the sign.
if you reinterpret them as signed integers
Nope, signed integers use two's complement, floats don't.
You would get the negative numbers in reverse order.
user406009
Wouldn't you still get strange results with denormalized floating point numbers?
19:36
A weak order on floating points considers all positive NaNs to be equivalent and all negative NaNs to be equivalent (also, they are partitioned by signaling and non-signaling NaNs if you try a total order).
user406009
Perhaps?
@Lalaland No, their bit representations are bigger than 0 and smaller than normalized numbers.
@fredoverflow I don't think this is relevant, gonna check
Wait, I got it. This sorts all NaNs to the front:
auto it = std::partition(v.begin(), v.end(), std::isnan);
std::sort(it, v.end());
user406009
@fredoverflow Nice.
19:39
@fredoverflow Good one.
@sehe I didn't know you cherish redundant information. ;-)
I wonder if I should rename it to firstNonNaN...
@fredoverflow anything's better than this :D
@Columbo hmm?
@fredoverflow gg
19:40
What about realBegin?
@sehe Referring to the king, were you?
Nope
user406009
@fredoverflow I wonder if it's more efficient to do this in two steps with partition + sort or with sort + custom comparator.
@decltype_auto Or I could simply not worry about temporary variable names and write:
std::sort(std::partition(v.begin(), v.end(), std::isnan), v.end());
@Lalaland std::partition does n checks for NaN, whereas custom comparator does 2*n*log n checks...
user406009
@fredoverflow Yes, but data locality might help the sort + custom comparator approach.
19:42
How about you write a benchmark?
@fredoverflow It seems that you need this proposal into the standard :p
user406009
Yeah, that's the only way to really determine.
@Columbo king + pawn simply can't win (unless you have promotion at your disposal, but then it's hardly king + pawn anymore, right).
@Columbo So I'd assume you didn't win win one pawn and a second on the clock left, because a second is deffo not enough to cram the endgame into
hola
@Moshe Long time no seen
19:43
@sehe So what? The rules don't care about such practical issues
Yeah how's it going?
@sehe But the potential of being promoted suffices
@fredoverflow I like realBegin because it's a glimpse of maths in that technical code. :)
@Columbo Really. Then why would the opponent accept defeat?
@sehe Of course.
I.e. you still could win by promoting, eventually
@sehe He didn't. He ran out of time
:oP
19:44
Ah. So, you both ran out
That's why it's so delicious!
@sehe I almost ran out, he really did
I had one second left when his clock went 0s
// nansort
std::transform(v.begin(), v.end(), v.begin(), [](float) { return std::numeric_limits<float>::quite_NaN(); });
What's better than a british speaker
@Jefery a british microphone? idk.
@fredoverflow yup confirmed. (result is -1, -5, -10, -inf, 0, 0, 1, 5, 10, inf)
user1804599
19:50
Ugh, FOSS software but commercial binaries.
@Columbo so, why didn't you run out (hint: I clearly don't know this rule, so, just spell it out :))
@melak47 quite nan
@Elyse ?
> The code is open-source but you need VS to compile VS.
@sehe much float.
@Morwenn lol
user1804599
> Merge branch 'master' of dl.dropbox.com/u/2939773/git/vulture
user1804599
lol
19:52
what
@milleniumbug share git repo in dropbox public folder...genius!
aaaah I see
eg. K+B vs K is draw "for" the underdog due to no mate potential if his time funs out, K+P vs K is loss, even if the P on the a, or h-file and the defending king is on that file in front of the P , which is "just" a technical draw.
@milleniumbug then use https url as remote. lol
Git in Dropbox tends to break
19:54
@sehe Basically, each player has their own move clock. You start at a fixed time for each player and then the clock runs during your move. If it goes to zero, you lose.
@Puppy derp. That's not the question
then what's the confusion?
The question isn't "How do chess clocks work". The question is "Why does the clock not matter in this situation"
because the other guy ran out first.
it's a Critical Existence Failure.
you get to zero first, you lose, regardless of the other circumstances involved.
@Puppy IDGI, in that case it shouldn't be relevant that there was only a pawn
19:57
the rule isn't intended to decide games in as of itself
it's supposed to keep the game moving
@Puppy: That's not accurate, it depends on whether the opponent still in time has mate potential.
I suppose it means that @Columbo was able to prevent capture of his remaining pawn long enough and quickly enough to let his opponent run out. Which shouldn't be too hard given you maintain opposition
@decltype_auto We're reaching the relevant info here, I can smell it. Interestingly, in this case it's obviously not possible to still mate in that remaining second, which confused me for a moment.
Simply put: king + pawn cannot mate. It has to promote first, and this intuition made it clearly impossible (to me) to win before time runs out.
@Puppy Thanks for that aspect, it's also relevant
@sehe Yep.
@sehe but that pawn could be promoted to Q or R and then mate. That's mate potential.
:D
20:01
As a last reserve, go kamikaze and build up some traps as the opponent runs towards <30s
@decltype_auto Yup but not in a second. Was my point (of confusion)
@sehe You'd be surprised about what can be done with premoves on chess.com ;-)
premoves?
@sehe Move with a piece while the opponent is thinking, so that if that move is legal once he had his turn, it's immediately applied
cool. I like that a lot
Very cool. Multiple premoves even. I think that would seriously improve ones strategy game in general
@sehe The realism of that potential doesn't count. E.g. only a noob would ever move his King to d-h file when defending from the front against an a-pawn, thus that that would ever become mate is highly unlikely as well.
@sehe something perhaps half nice. I don't want to benchmark vs an optimized c++ version :)
@JohanLarsson Bake it with some tests and I might give it a go
Premove - lol 1.d4 e6 (+ premove c5) 2. Bg5 c5 3. Bxd8
20:08
@sehe go as in?
Verb: give (something) a go
  1. (idiomatic) To try or attempt.
as in profile/benchmark?
what else :)
I expect it to be somewhere between eally slow and retardedly slow
I'm almost done reading the explanation about how smoothsort works. It's incredibly clever and incredibly not intuitive.
20:11
pretty happy with how it reads though
will probably change
> smooth, adi.: incredibly clever and incredibly not intuitive
user1804599
Hi! :)
no heavy lisping in that one :)
@sehe Hey bby, y'know what else is smooth?
no?
20:13
your face
cat's fur
What do you guys think about microservices?
@sehe Contravariance.
Ok, that was random.
@Morwenn good example, actually
20:18
@Jefery On the other hand, the other ones look like they took a bullet in the head.
Who cares about smoothness if one can be fancy, said exp(1/z)
@Jefery today we use YT for gore. I remember I used to browse the GNLE and be mesmerized by this kind of gore
The Grote Nederlandse Larousse Encyclopedie (abbr. GNLE) is a Dutch-language encyclopaedia based on the French Grand Larousse encyclopédique, which appeared from 1971 to 1979 in 25 volumes. The project of publisher Heideland-Orbis (Hasselt) was larger in scope than its example, as well as the then existent Dutch encyclopaedias Winkler Prins and Oosthoek. Due to the cooperation with the publisher of the Larousse they could appeal to the extensive know-how of the French encyclopaedia and supplement it with the help from Dutch and Belgian experts. The encyclopaedia contains 500 000 lemmas, 106...
Good night @all; gotto eat my spinach.
have fun Popeye
user1804599
@Jefery Why the ring around her head? That bitch think she's holy or something?
20:22
That's the laser-guided targeting system
a broken system, missed
Ok, now time to steal the smoothsort implementation and add it to my library.
@Jefery Testing an early prototype of kevlar
Not perfect yet
user1804599
@TonyTheLion can I borrow your jimmies? I need something to rustle.
user1804599
20:37

▲▲
From today's Fun Things: singular HUD element not rendering on Linux
Literally everything else works fine
user1804599
-1
Q: Is anyone familiar with Embarcadero c++. I Have The Strangest Issue

CAllenI am using Embarcadero XE7 and for the life of me I can't figure out why these errors happen. The error is that when adding something to the project, It does not go to a new line. It starts after the first letter/symbol of the previous line then jump to a new line. The picture with the white line...

@Elyse haha newfags can't Sierpiński triangle
@CatPlusPlus check for DRM :)
user1804599
20:42
Also plugging in wireless XBox360 receiver creates 4 slots instead of only 1 for each actually connected gamepad so that's fuuun
@sehe It's unfortunate you can only test it once
And the singular pad goes into slot 4 because why not
I like how you hear the italian reporter on the background
I so don't want to make another game that uses controllers
20:47
On Channel 4
What a fucking pain
That feeling when you have a problem and you remember you wrote a tool to solve that very kind of problem years ago :D
Never had it
Evening loungers. When did the C++ emipre strike back? The last Empire strikes back was for me in 1980. Even Bjarne was happy with C back then; not counting a few ugly macros.
20:57
I just relied on overflow to end a loop. I feel evil.
quite evil indeed
@Morwenn that's fine iff unsigned
for (unsigned i = 1 ; fibonacci(i) <= fibonacci(i+1) ; ++i) { /* ... */ }
that seems very inefficient
It's memoized.
21:00
Calvin & Hobbes is 30 years old today.
@Morwenn regardless
I'd be curious what the optimizer can "see through" this
stream it
@sehe I only needed to compute the Leonardo numbers < 2^64 once so it doesn't really matter.
Does smoothsort use leonardo numbers ?!
Yes.
The implementation I found only had them precomputed for 32-bit architectures.
21:04
lewd
So if you plug-in 360 wireless receiver while the game is running, d-pad is reported as buttons 11-14
I wrote a recursive memoizer for unsigned integer functions a few years ago, so it was the appropriate time to use it :p
But if you restart the game, it'll be reported as axes 6 and 7 and those buttons will not work
software.txt
@Morwenn precalculation is preferable to memoization here
@Jefery lol
21:06
@Puppy Yeah, but I used the memoizer to precompute them. Otherwise I would still be waiting .____.
I went to see King Crimson live yesterday.
Hi, I'd like to implement a barrier mechanism (C++, Python or strictly BASH scripts). I have two linux containers and one process running on each of them. One directory (let's call it /shared) is mounted on both containers. What's the best solution to implement a barrier? I was thinking about waiting on a file or something similar. Is there a solution that allows to sleep on a file and wake up when all processes will show?
user1804599
I want std::set-sort.
user1804599
std::multiset<T> set;
std::move(begin, end, std::inserter(set));
std::move(set.begin(), set.end(), begin);
Nov 7 at 19:38, by Tony The Lion
Please read the rules. Thanks a bunch.
21:11
@Elyse You'll have stray elements at the end if there are duplicate elements in the original sequence.
user1804599
Fixed.
@ElimGarak Noted, sorry ;)
Ell
Ell
@Elyse set is sorted already isn't it?
user1804599
The point is using a set to sort a sequence.
yeah that's why it's "move to the set and back"
user1804599
21:15
It's like bubble sort.
user1804599
But different.
for every X "it's like a X, but different"
@milleniumbug except for X, where it's like X, but not different
It's like your mom, but different.
Trust me, you don't want your algorithm to run in O(mom).
yeah you don't want algorithms to run on your mom
21:23
So: the smoothsort implementation I found is faster than heapsort when a collection is almost sorted, and almost always twice slower otherwise.
It shows that it's more adaptative than a regular heapsort, but...
@sehe Unless the optimizer uses the closed form(Answer:42), I'm sceptic of any clever optimizations.
@CaptainGiraffe you know, closed form is not gonna be most efficient here.
It will be always more efficient if you generate the fib sequence on the fly (incrementally) and inspect the deltas from there
user1804599
I implemented a sorting algorithm once.
user1804599
As a C preprocessor macro.
user1804599
Using Boost.Preprocessor.
user1804599
21:28
It ran at preprocessing time.
@sehe Yeah, that's why I included the very particular result, from a very particular computer as a disclaimer. :)
lo
@Elyse you mean you wrote an O(1) bubble sort?
I suspect that because of integer calc advantage that memoized naive will beat CF on most platforms.
Perhaps if you cheat by precalculating the magic numbers for the sqrt(5)s and keep it in integer domain?
user1804599
@thecoshman It was similar to quicksort.
Ven
Ven
21:30
meow
Q: What was the "law" that allowed one to look at numbers of some statistics and see/detect the statistics is man made instead of actually measured?
Ven
Ven
@Elyse can you write an unbounded loop with the preprocessor?
user1804599
No.
Ven
Ven
:'(
user1804599
21:30
A C preprocessor always terminates on finite input.
@sehe Thanks.
@sehe Did you look up the closed form while I looked away or did you know CF fib by heart?
user1804599
@Ven It's a blessing, not a curse.
Man, I need skeptics.SE for the Czech Republic.
Ven
Ven
@Elyse XD
user1804599
21:32
Nontermination = bug.
@Elyse Isn't this c++ land?
user1804599
A C++ preprocessor is typically called a "C preprocessor". Try again later.
user1804599
And the only difference is that C and C++ have different tokenisation rules.
Mea culpa, I was thinking of messing with the compiler.
user1804599
For example, C++ has raw string literals, a few more keywords, and a few more operators.
21:34
I've nearly killed myself today again
Ven
Ven
why'd you do that?
this time thanks to idiots on the highway whose car was standing w/o any lights or warning triangle in the unlit section of the road
right at the end of a downhill section
user1804599
@BartekBanachewicz I take it, you did a robot?
i really nearly fucking wrecked shit out of their car and them (were standing next to it)
and myself in the process
user1804599
Did you alert the police?
21:38
"Guys, I want to report an attempted murder by me. Possibly, vehicular manslaughter."
Also please remove speed limits from highways
@Elyse uh no
i went straight home
@BartekBanachewicz You should have.
i guess they did put on some lights by now
@BartekBanachewicz So was it as @ElimGarak supposes that you are a dangerous driver or was there circumstances?
21:43
it was dark, with light rain, at the end of a downhill ride and they had literally 0 lights and were 80% on the right lane (a bit to the side)
i've noticed just by the reflection of my headlights, stomped on the brake and ran away to left lane which thankfully was empty
Tricky situation. Thanks ABS tech. I would imagine @ElimGarak is happy with that explanation.
@CaptainGiraffe Wasn't serious, but cops would turn it around to your speed had you brought it up on report.
And poor visibility + bad weather is just yet another reason why they'll suggest it is your problem that you didn't ride slower.
user1804599
I wonder what happens when you don't enter the vault in the beginning in Fallout 4.
There's contributory negligence from both parties
user1804599
I guess you either get blocked and can't move out of a certain area, or the bomb drops anyway after some time and you just have to start over.
21:50
@Elyse Bomb drops immediately when you leave the bounding box. First thing I tried. :P
user1804599
Ok. :p
Fuck the future >:(
user1804599
But you can stay inside it as long as you want?
@TonyTheLion just popped in for a sec to show a coworker the awesomeness that is SO chat edit history
I recently got a comment "you can overload operator* member function and return something else than a reference to this by (*this)". I'm adamant this is untrue. Would you mind providing me with ammunition?
21:56
@CaptainGiraffe this is a pointer, so overloaded ops don't apply, at least not in this case.
You could do **this though. But then what the fuck.
@EtiennedeMartel That is the exotic/funny approach.
@ElimGarak yeah i was riding about 120kph

« first day (1859 days earlier)      last day (3315 days later) »