« first day (1838 days earlier)      last day (3107 days later) » 

12:00 AM
@JerryCoffin Nice
 
@nick pfff
 
Still the problem of removal remains
 
but what about the children
 
uh the instance of Functor for pair is totes weird
 
@Jefffrey in most cases, you can (and do) handle that by just marking items as invalid (and usually counting that toward the log(N) total before you do a cleanup).
 
12:06 AM
@jaggedSpire hello, this is dog
 
@Borgleader wtb
 
so one thing I don't get
 
@Borgleader such fluff
 
is how StateT manages to get its Functor instance require only Functor
 
that is true majesty right there
 
12:07 AM
@jaggedSpire plz dont die though
 
oh fuck wait
runStateT doesn't have Monad requirement
 
@Borgleader don't worry, I'm still okay
 
Ell
CISA passed then :V
 
@Ell shit
 
@Borgleader A Samoyed? We had one of those when I was a kid (yes, once upon a time, I was a kid, and yes, mankind had tamed a few breeds of dogs by then too).
 
12:08 AM
HOLY FUCK IT COMPILED
 
lol
 
@JerryCoffin Seems like yes
 
instance (Functor m, Monad m) => Applicative (StateT s m) where
now this is weird
 
@BartekBanachewicz Do I really need to?
I have no idea what that code does
 
12:11 AM
@Jefffrey it's a specialized monad transformer that's supposed to express nested closures by monadic stack building
 
@Jefffrey It compiles
Apparently
 
he he
 
where "supposed to" is key because this is kinda advanced for my puny skills.
 
@BartekBanachewicz What's a "nested clojure" again? Just a closure in the scope of another?
 
There used to be a guy walking 2 Samoyed everyday when I used to jog in the park in the evenings.
 
12:12 AM
@BartekBanachewicz You should take a note from Cinch handbook and use less fancy words
 
local a = 5
function f()
  local b = 3
  function g()
    local c = 4
    return a + b + c
  end
  return g()
end
@Jefffrey kinda
 
It's a bit sad because I watched as the dog grew older. Then one day he walked with only one. Then a week later he's back with 2. Only to found it out a week after that, it's a new one.
 
Ell
Bartek how quickly could you write dijksras algorithm in Haskell?
If I said do it now
How long would you take?
 
lol, Ell, don't worry about it
 
However long it takes for Google to return results
 
12:13 AM
@Ell I'd need to get up and fetch my Cormen
 
You are a good programmer
 
Let's not get ahead of ourselves
 
then I'd just slap ST on it and copy it straight from the book
the getting up and reaching for the book part is the hard part
 
Ell
@Jefffrey meh, not by this rooms standards
@BartekBanachewicz how about just the Wikipedia page?
 
Dijkstra's algorithm isn't very hard
 
12:14 AM
@Ell (nobody is by this room standards, so it's fine)
 
doesn't it have ready impl
 
But doing it from memory is silly
 
@Ell ueh wiki has a ready impl as well
 
Wiki pseudocode is p much done thing
 
I dunno Ell really I've written Dijkstra so many times it got genuinely boring
 
Ell
12:15 AM
Well actually I wrote an implementation of it but I couldn't test it because my neighbour generation code was incorrect
 
@CatPlusPlus yeah
 
lol you didn't even get test cases?
 
Hmm, it runs on O(n^2)
 
@Ell If you want to get good at algo you need to fucking crunch it over and over
 
That's anticlimactic
 
Ell
12:17 AM
@cat well I was using dijksra to solve some problem
 
I had a friend who coded an AVL implementation from memory at 2am
it's 250 lines
 
Ell
It was almost certainly the wrong approach :V
 
he got it exactly the same every fucking time
 
It runs faster with a queue
 
And those idiotic contests actually required you to write the AVL because it basically cracked 50% of the problems
 
12:18 AM
A* will be better iff you have a good heuristic
 
Also Bellmann-Ford
 
And you can get better with custom methods if you have domain knowledge
 
A* is mostly used on regular grids
 
@CatPlusPlus That's true for any algorithm
 
It doesn't have to be a grid
It runs on a graph
 
12:19 AM
IKR
> mostly
 
@Jefffrey Prove it
 
eh
You'll have to trust me on this one
 
fmapClosure :: forall a b m. Functor m => (a -> b) -> ClosureM m a -> ClosureM m b
fmapClosure f (RootClosure a) = RootClosure $ fmap f a
lol ok this was fucking easier
 
I guess not
Nevermind
 
time to go to the grocery store /cc @Nooble
 
Ell
12:30 AM
What the hell Haskell why are you alive still
Die
Stop rebuilsingggg
 
asks Ell: why the hell is Haskell running pell-mell through this Dell?
(Yes I know it's not a Dell)
 
Ell
It won't uninstall
 
@TonyTheLion One particular rent made the news when a local business took over the lease of Prada for 40% less
@Elyse Not sure that applies to "hateful" behaviour as long as it is "justified" by the Quran so to speak. It's just about the quality as far as I understand.
 
12:46 AM
I think I should buy a (cattle) farm. Damn Americans wants some Australian beef, Indonesian wants some Australian Beef, even Chinese are after Australian beef. Cows are everywhere, yet beef price is so hefty. Also Chinese buys a lot of Aussie milk too. With the increasing world population & scarce of land, farm in Australia is the way to go IMHO ...
 
-3
Q: CUDA - master's thesis topic

user5495718Little English. So sorry. I am a master student. I'm looking for a thesis topic that can be done with Cuda. These issues do not have enough technical knowledge. So there is no original idea. It does not mean anything to me. As a result of my research I could not find an original idea. I would b...

rip
 
lol
 
@GregorMcGregor I'm trying to decide if this is worse than the HFT question from this morning
 
Which one?
 
10 hours ago, by Borgleader
-6
Q: how to make windows application in C# for stock trading

Suyog PatilI dont know c# programming. How make an application in windows for connection my broker API and fetch stock data. After that do the calculation on it and create signal. This signals are converted to order and send to broker application using their API.

 
12:50 AM
lol
I don't know programming. How to application?
 
@Mysticial that guy should be very, very thankful he's too incompetent to make an app
this way at least he still has his money
I need a name for a programming language
 
"Thin"
 
Narrow
 
you guys are just trolling puppy
 
12:56 AM
@orlp What characteristics does it have?
 
@Jefffrey statically typed, meta-programmy, inferred typing, native (not interpreted)
 
I don't have any clue on the object model yet
 
I don't know, probably some metal name
 
hrm
I might call it Kwik
(dutch for Mercury)
and it sounds like Quick, which is hopefully is
 
1:01 AM
I'd call it Robert
 
I kinda like that
 
Nice
 
(German for glorious)
 
@GregorMcGregor liar
you'd call it Gregorlang
 
GregoX
 
1:01 AM
Gregorlang by Gregor McGregor
 
Use GregoX to write the fastest Gregorithms ever
 
The Rev. James is my friend.
 
You realize that you're 1 letter away from Martian James
 
Marvin the Martian > Martian James
sorry
 
@GregorMcGregor It's been said before, yes:)
 
1:03 AM
Gregor "Don't call me Greg" McGregor
 
I have a Marvin t-shirt, coffee cup and cereal dish.
 
G McG
stage name: MC G
not only is he a G, he's also a MC
 
Ell
Eh
 
Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor
 
1:04 AM
@GregorMcGregor if you ever decide to go into hip-hop
 
now gzip it
 
you have to promise to call yourself MC G
~/programming/ λ echo "Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor Mc Gregor" | gzip | hexdump
0000000 8b1f 0008 1f66 5630 0300 2f73 4d4a 2fcf
0000010 f052 564d 1f70 2c74 002e fbf3 124c 009d
0000020 0000
0000022
 
Can you try with just Gregor McGregor
I wanna know the entropy of my name
 
there's always overhead though
~/programming/ λ echo "Gregor McGregor" | gzip | hexdump
0000000 8b1f 0008 1f9a 5630 0300 2f73 4d4a 2fcf
0000010 f052 764d 3307 00b8 e5fb a646 0010 0000
0000020
~/programming/ λ echo "Gregor McGregor" | hexdump
0000000 7247 6765 726f 4d20 4763 6572 6f67 0a72
0000010
in this case the string is so short the gzip format overhead makes it larger
 
Well an empty string gzips to 22 bytes
Gregor McGregor to 32 bytes
So let's assume that's 10 bytes worth of data
From 15 characters with 6 repeated
fair enough
 
1:12 AM
-6
Q: microseconds since unix epoch to human readable time

eagandale4114Im working on a system that gets current time from its GPS module. It gives me the time in microseconds since unix epoch as a unint64_t along with position data and I need to convert it to human readable time. In reality I only care about HH:MM:SS, year month are irrelevant for this. Ive seen qui...

 
1:24 AM
does the size not depend on the compression method?
 
1:35 AM
:)
Or, just a short but really good talk.
 
@StackedCrooked Oh I saw that.
Guy came off as awkward to me.
 
Really?
 
Yeah.
 
I don't see how he's any more awkward than the other ones.
 
1:38 AM
iunno if awkward is the right word.
Probably nervous.
It seemed like he doesn't give talks often.
 
@Ell Fabrice Bellard is p godly
 
The language needs strong typedefs though.
 
Ell
I've never heard of him until now
@Rapptz yeah I got this impression too
it doesn't seem as if he is talking to the audience
it's like he is reading off a script
 
@StackedCrooked operator @= ?!?
 
1:41 AM
@Borgleader It's a placeholder.
 
@Ell Yeah lol
Probably why the talk is 11 minutes :v
 
Ell
@GregorMcGregor oh cool
 
I'll watch the rest of it tomorrow, i skipped through a bit
time to sleep
 
1:42 AM
holy fuck firefox sucks
 
@Mysticial are you familiar with this cool trick?
 
clicking on anything opens shit in a new window
 
-1 UB
 
@Borgleader It's basically a BOOST_STRONG_TYPEDEF but stronger.
 
1:44 AM
@orlp The first version of my Pi program (v0.1.0) had like 20% performance gain from that when SSE2 was absent.
 
@Mysticial fistp?
doesn't fistp do effectively the exact same as this?
 
fistp is a 18+ instruction
You can find it in the Mature Extensions of the Intel Manual
 
I wonder if my CPU has the extreme fisting extension
 
Actually, come to think of it. I picked up SSE2 after I started using that trick. So I don't have an SSE implementation that doesn't use it.
 
round(double):
	movsd	QWORD PTR [rsp-8], xmm0
	mov	rax, QWORD PTR [rsp-8]
	ret
 
1:46 AM
I understand approximately how the trick works
but I don't fully understand when it breaks down and how
 
The trick will probably be defunct when AVX512DQ rolls around.
 
@Mysticial well, if you have to support old(ish) hardware with fast speeds (e.g. games), I'd say it's still going to be relevant for a good while
 
numbers are things that make you go numb
 
numb and number
 
1:49 AM
@jaggedSpire too
 
@orlp The trick is actually a lot more flexible than it looks. By adjusting the constant, you can round to arbitrary places behind or in front of the decimal place.
 
@Mysticial you can also choose between ceil, floor, regular rounding, banker's, truncate :)
 
@orlp yep
 
wow Mysticial's pi program full of UB
smh
 
How can you be sure it's not computing Pi by accident
 
1:51 AM
@orlp So AVX512 won't completely make it useless.
 
but I haven't checked how it interacts with the bad guys of the floating point world (denorm, nans, infs) and the outer reaches of the range
 
Ell
if he is optimising I suppose he chooses to rely on certain UB of certain compilers
 
user406009
@GregorMcGregor You can verify individual digits.
 
@Rapptz I don't do it with unions. I do it with SSE/AVX intrinsics.
 
Ell
oh wait that is Implementation Defined I guess
 
1:51 AM
Even with unions, it's basically allowed by all mainstream compilers.
 
that's what they all say
 
@Lalaland Still a coincidence. Remember, with UB, you can never be sure.
 
S M H
M
H
 
@orlp The biggest issue I have with that rounding trick is that fast-math has a high chance of breaking it.
 
well it's UB
and then you have -OUBfast
so UB^2 is quite a dangerous game to play friend
 
1:54 AM
I believe it's completely defined in C99 with the following assumptions:
- IEEE floating-point
- 2's complement integer
I'm not 100% sure though.
 
yeah but this is
C PLUS PLUS OH EXS
@Mysticial I don't think it's defined per se. Wouldn't it be in that IB category?
 
@Rapptz IB in C99. But assuming the two bullets I gave, then I don't think there's any room left.
If you do it with SSE intrinsics, then there really is no room at all for UB. But the compiler may decide to move things around with fast-math.
 
But what if I use SSE extrinsics instead
 
Then your mom will be so fat that she'll grow an event horizon.
 
Critical mass ... That's very mature of you ...
 
2:04 AM
> missed opportunity for "refined"
 
@Mysticial dug up an old function I wrote using the trick: coliru.stacked-crooked.com/a/c3ed08ca78364b99
 
Reliable UB can be useful.
 
@Mysticial I wonder if you could use that approximation in shaders, and whether it'd be faster
 
For graphics, you don't need all that precision.
There's an SSE instruction that will do the int32 <-> float conversions.
It's int64 <-> double precision that needs the trick
 
Ell
2:21 AM
I need a dank nasheed
the lounge is asleeeep
 
I feel like going to bed, but it's only 9:30PM
does anyone know if there's a recommended dup target for questions asking "why is my program with UB doing funny things?"
 
user406009
@Ell All the US/China/Australia people are still awake.
 
user406009
And of course Elim. Cause Elim never sleeps.
 
user406009
He only waits.
 
I get the feeling that this isn't it:
50
Q: What exactly do "IB" and "UB" mean?

cHaoI've seen the terms "IB" and "UB" used several times, particularly in the context of C++. I've tried googling them, but apparently those two-letter combinations see a lot of use. :P So, I ask you...what do they mean, when they're said as if they're a bad thing?

though it would be a nicely snarky thing to link to
 
Ell
2:31 AM
DOes @Chimera ever come by?
 
seems correct as far as I can tell
 
Ell
ah my eyes
my eyesss
 
@Ell it burns us?
 
Reaper, Daredevil and Scrapper completed, thanks anet
 
user406009
That's actually quite good font rendering.
 
2:38 AM
@LucDanton already
 
there have been too many questions along the lines of "Why is my program with UB doing goofy things?" recently.
 
user406009
Probably because compilers don't treat UB well.
 
@GregorMcGregor Elite spec costs reduced from 400 to 250, my Necromancer has world completion so started at ~210 hero points already
Daredevil is what I’ve been playing most. Scrapper I did for the hell of it (I love it in WvW).
 
user406009
Sometimes I think we should remove UB.
 
wait 3 specs in 1 week :/
 
user406009
2:40 AM
Force all previous UB to become straight crashes.
 
for 45 euros
 
@GregorMcGregor i.e. 1/3, but including the one character I have world completion on. At the other end there’s my brand new Revenant with 0 hero points.
 
user406009
What do you guys think? Would you use a --crash-on-UB gcc/clang flag?
 
Before the reduction you’d need to pick up 400 hero points, considering there are ~210 in Tyria and 400 in the jungle.
 
@Lalaland Compiler-inferred UB already often generates UD2 instructions
 
2:43 AM
@Lalaland only in debug
 
@GregorMcGregor The hero point challenges were kinda fun to figure out. I think anet made them more forgiving though. So even if you don’t need as many it’s not like I’m bored. Now I actually want to try Tempest/Berserker.
 
@LucDanton What are hero points
 
in conjunction with good test coverage
 
@GregorMcGregor Plays the same part as skill points did re: unlocking skills (duh) but also traits.
I guess the changes make those hero point challenges in hard to reach places kinda pointless
 
3:01 AM
@Lalaland That's not possible. Detecting UB at compile-time is the halting problem.
 
user406009
@Mysticial You add bounds checking/overflow checking everywhere.
 
So run-time checks? Congrats, you've just reinvented Java.
 
user406009
Well, theoretically there would be a way to turn them off.
 
user406009
But the default user experience should have them on.
 
Then you've reinvented Swift.
 
3:03 AM
UBsan exists
 
Ell
agh I may need to recompile my kernel
but whyy
 
user406009
Gentoo does get quite annoying.
 
user406009
All that time compiling.
 
Ell
chromium worked just fine and I haven't changed my kernel and now it complains that it needs USER_NS
something ain't right here
I might revert to an earlier snapshot
 
3:24 AM
@Rapptz you used Ninja, right?
do you write the files by hand, or how do you generate them?
 
generate
 
@Rapptz yeah, using what?
do you hand-write generator scripts (in like Python), or?
 
Ell
I write mine
 
@orlp I have a bootstrap.py script
 
@Rapptz got a publicly viewable one?
 
3:32 AM
ninja comes with a ninja_writer.py script
to help you make one
 
yes
time to rewrite my python library
to be async
and drop 2.7 support
let's see how bad asyncio sucks
cause it seems pretty complicated lol
at least to me
 
oh, Sony's press conference. Might check it out.
 
user406009
@Rapptz But what about all those darned Python 2 users?
 
user406009
Who are too lazy to switch to Python 3?
 
3:39 AM
I already convinced most of my library users to use python3
cause of unicode woes
so now I'm tackling the async woes
 
user406009
Are you talking about this library: github.com/Rapptz/discord.py ?
 
yes
asyncio seems fancy
 
fight, fight! ... Firework is waiting for the last straw ...
 
lol china vs usa
what are they gonna do, throw rice cakes at the american destroyers?
that'll show them
their islands are illegitimate and they know it
 
user406009
I would be much more worried about stuff like trade sanctions.
 
3:51 AM
Sewage from toilet probably ... from 1 billion people that's quite a substantial amount ...
@GregorMcGregor Depends on which side you take on
 
@Lalaland Considering the Chinese economy is slowing down very fast, not a good idea for them
 
user406009
I highly doubt that we will see any conflict between the US and China anytime soon. The economies are just too interwoven with too much trade between then.
 
War creates demand ...
 
user406009
Unless of course Trump is elected president. He might be stupid enough to start something.
 
That's not impossible, you know ...
 
user406009
3:54 AM
I am highly considering betting against him on those political betting sites.
 
user406009
I mean, if he wins, then we are sorta screwed anyways.
 
The truth is there is a lot of inequality in the US & more in China. This world isn't about fairness unfortunately.
 
user406009
Well, at least inequality is supposedly decreasing in China.
 
@Lalaland you elected George W Bush ... Twice
 
3:57 AM
 
user406009
@chmod711telkitty To be fair, he should have lost the first time around. He only got in office due to stupid shenanigans in Florida.
 
asyncio seems confusing
 
@orlp throw ball{};
 
4:21 AM
@Lalaland once can be an accidence, but twice ...
 
4:32 AM
when you are using precompiled headers, is there any reason not to simply #include (nearly) every standard library header?
 
4:48 AM
maybe if you want to use specific versions of a header in some compilation units, and you're not sure which ones include the one you want to compile differently? The internal include guard in the included header would prevent it from being included multiple times, even if certain preprocessor directives had changed
so

#include "stdafx.h"
#include <depends_on_defines>

the contents of the stuff in `<depends_on_defines>` might quietly depend on the preprocessors defined in stdafx.h, rather than at the point of inclusion in the client file
even if you don't explicitly mention <depends_on_defines> anywhere in stdafx.h
 
is there any such header except cmath?
 
@jaggedSpire Noooo curly braces
 
@jaggedSpire that's C
not C++
 
I'd assume that also applies to ctime in addition to time.h, but I'm not rock-solid on the variations allowed by the c++ versions of the c headers
 
I'm aware, but unsure how deliberate the absence of gmtime_s is.
I'd like to say they should be identical, except with everything also present in the std namespace because of this but I'm not entirely sure that's the only word on the matter. :\
 
The contents of cassert/assert.h depends on whether NDEBUG is defined--and it can be included multiple times in the same TU, with different definitions to change its effects over the course of a single TU.
 
I guess cassert can be exempt
 
are there any other exceptions to the standard libraries have their own include guards rule?
 
5:07 AM
let's say we don't include any header with these definitions
 
@orlp rekt
 
although...
what if, say, #include <A> includes #include <cassert>?
 
@jaggedSpire Essentially all the other standard headers are required to be idempotent anyway (though exactly how they achieve that isn't specified).
 
@JerryCoffin neat. Also, TIL about "idempotent"
thanks
 
@jaggedSpire Surely.
 
5:12 AM
well, I need to go to bed. Talk to y'all later.
 
@jaggedSpire Later.
 
morning
 
5:59 AM
pretty cool feature of ninja
 

« first day (1838 days earlier)      last day (3107 days later) »