« first day (1827 days earlier)      last day (3122 days later) » 

12:00 AM
I would say that I never diet but I hardly ever eat two full meals a day anyway.
 
My body basically has two modes. Either fit or complete catastrophe. There is no leeway. The mass distribution is atrocious.
 
be both
 
I am having backache because of my massive boobs ... also I need to lose weight
 
Ell
@Morwenn man
how even
I eat as often as possible
food is heaven
 
@chmod711telkitty Boob competition: @Elim vs @chmod!
 
12:02 AM
Many things I used to like became boring the day I had enough money to purchase whichever I liked.
Oh, and now if I eat too much I have asthma too :D
 
food-induced asthma?
sounds fishy to me
 
It's not related to some specific kind of food. I guess that when my stomach is full it doesn't play well with my lungs and for some reason I have asthma.
It's the worst kind since it usually lasts a full day.
 
riiiiip
 
@TonyTheLion Crutches?
What happened?
 
Ell
Transcript :)
 
12:08 AM
@ElimGarak dis
 
Oh, poor Tony <3
 
 
Is Madonna Hagrid
 
TIL sehe is a Madonna fan :P
 
That is one excellent album. Bed side stories made me buy some of her albums (the rest of that album is... less interesting though)
 
Tonight I've been replaying that track ith Lang Lang and that track from Cydemind. I should move on and listen to something else.
 
Ell
Ah I need onions
 
@ElimGarak what.
 
You've never watched gamer poop?
 
no
And very gladly so
 
12:14 AM
Man, the stuff you're missing out on :P
 
ITT Late Night Lounge
 
Ell
Life workout Onions is a sad existence indeed
 
It's morning here, the sun is shinning bright
 
Onions are great.
Shallots too.
I want some now ._.
Actually I'll simply go to sleep.
 
hello
I approve
 
12:24 AM
I'm mad.
Minecraft story mode on the phone. Can't believe that shit is a thing.
 
Tight night wise guise!
Sleep well or whatever :)
 
"Blockbuster games" category -> Goat Simulator. Seriously?
 
@ElimGarak How do I lick a plane?
> Why am I a penguin when I should be a microwave?
 
12:48 AM
@Morwenn Good night
Woohoo, I massively simplified my comment parsing code in spirit :D
auto const comment_def = "/*" > ((*((char_ - "/*") - "*/")) % comment) > "*/"; successfully parses 3 + /* x/* yz /**//**//* /*.*/ /* .. */ */*/ */ 4
I wonder if I can make ((char_ - "/*") - "*/") simpler
 
Is there in stackoverflow a badge for good sense of humour... — Kaponir Jun 4 at 0:55
lel
I run into the weirdest things lately
 
@sehe Are you proud? :P
 
@Borgleader I can't tell. It's so hard to read :)
 
How would you have done it?
 
@Borgleader Looks good now that I've parsed it. Can you try whether natural precedence is right
auto const comment_def = "/*" > *(char_ - "/*" - "*/") % comment > "*/";
 
1:01 AM
@Morwenn enjoy your burrito
 
> Parsing succeeded
:)
I'm using one of the calc examples in spirit x3 as a base, and inserted comments into its grammar
 
That's better IMO. I mean, you can keep in mind the precedence for your own purposes, but this really helps readability of the EDSL
 
right, i wasnt sure what the precedence was so i put extra parentheses where needed
but yeah definitely better without
 
Yeah, IMO it should be named things then:
rule<struct tag> comment;
auto const comment_bod = *(char_ - "/*" - "*/") % comment;
auto const comment_def = "/*" > comment_bod > "*/";
 
hmm, one thing i like about the one liner is that, to me, the recursion is more obvious
 
1:23 AM
yeap. The intrinsic complexity is there. Organizing is a balancing act
 
@ElimGarak I'm woorking on itttt.
I'm basically preserving its state, so I can look at its code while I code Icicle 1.01.
I could make a mirror but effort.
Also list initialization is such a mystery.
Copy list initialization, anyway.
 
2:12 AM
hello non-functional people
 
Hi.
 
It's a) super sunny so I wanna go swim but b) very polluted so I'll die of cancer after 500 m outside. What do?
 
@GregorMcGregor Bath!
 
depends how much you want to swim & how much you want to die
Also, be optimistic. Think of yourself as a carp, you are used to the muddy water. You are adapted to the environment.
 
Optimally, I am a carp.
 
2:26 AM
also, you would not lose face if you die ... I mean it's so polluted, nobody would recognize you in the haze when you die
 
@GregorMcGregor I am not a mutant
 
17
Q: Why does it take seconds to obtain IP address via DHCP?

BorekOut of curiosity, why does it often take seconds to obtain network configuration via DHCP when the CPU is capable of processing millions of operations per second and ping to the router takes a couple of milliseconds? In my home environment with one WiFi router and about 5 devices, it is not rare...

Good question.
Good answer.
 
I have a question
 
how do we know you are not a mutant? for all I know you could be a giant mutant carp with fingers sending all those messages from a waterproof PC in a muddy river
 
An AVL tree doesn't necessarily reach the minimum depth a binary search tree with those elements could have, right?
 
even with tree rotations
 
@StackedCrooked You should watch Andrei's talk if you haven't. He's funny, and its interesting (imo)
 
Even with rice.
 
@Borgleader I've seen it.
He makes a good point about composability of allocators.
 
Indeed. I was very interested in that idea.
 
2:35 AM
And the lack of C++ support in this regard.
 
@TonyTheLion What happened?
 
Memory allocation is a major hurdle if you want a fast software. And there's no ready-to-use solution.
Replacing malloc with jemalloc/tbbmalloc is a good start though.
 
@StackedCrooked is tbbmalloc free to use?
 
@TonyTheLion Oh. Checked the transcript.
 
do you need a license?
 
2:37 AM
@Borgleader Yep.
@Borgleader AFAIK no.
It's GPL with runtime exception.
Which is confusing.
 
@StackedCrooked Nice, Ive been meaning to try all of TBB by Intel, but I havent taken the time so far (mostly because I dont have anything on which it would be worth using)
 
@LucDanton I don't know about that
 
I think jemalloc is better though.
suspect*
 
jellymalloc
 
tbbmalloc is intented to be a scalable malloc. Jemalloc seems to aim higher.
Recently saw a talk where Jason Evans explains he wants to add a clock to malloc.
If you have those kinds of ideas, then it means you care :D
 
2:41 AM
macloc
suck macloc
 
> This is because jemalloc's only sense of time has been in terms of allocation events, thus precluding work postponement. This talk will provide an overview of jemalloc internals, critically analyze several past approaches to cache management, and describe multiple opportunities enabled by wall clock awareness.
@Borgleader The tbb::concurrent_bounded_queue can serve a broad range of purposes.
The real power of tbb is in their task scheduler. For which unfortunately I haven't found a good use case yet.
 
@StackedCrooked Game engine :)
 
Maybe.
Dunno much about games actually.
When I took Japanese classes I sat next to a game developer.
He told how his first job was to implement a pathfinding algorithm.
You got x guys and y milliseconds.
Find the path for all the guys in that timespan.
I did an internship at that game company and I remember the boss could be very intimidating.
Decided not to work there :)
 
I see. I haven't done pathfinding in code, but I've learned about the subject back in University in my AI class
Too bad about the boss though, the ones Ive had so far have been nice.
 
It wasn't a bad experience.
It was only a three month internship and it was fun. At first I considered applying for a job there.
But once I decided to not apply and just finish the internship all the stress went away.
And the boss felt he lost his power and started talking normally to me :D
From the talks I've seen from cppcon 2015 the most interesting one was by Fedor Pikus.
It's in two parts.
His conclusions are interesting.
General purpose lock-free queues are so complicated that you should never try to implement them. Implement something specific to your application requirements.
std::queue + spin-lock is sometimes faster than lockfee queue.
Because lock-free queues manipulate multiple atomic variables (head, tail) using compare and swap.
And spinlock requires only one atomic variable.
I'm starting to think "lock-free" is the hoax of the decennium :)
 
2:58 AM
Well like in most things
it depends on the use-case
 
Most people need high-performance. Lock-free is about progress guarantees. It's a mismatch.
If you want high performance then it is better to focus on amortizing the cost of the synchronization, rather than focusing on lock-freedom.
@Borgleader Exactly :)
I should shut up now :D
@sehe Installed it.
(Let me know if something doesn't work.)
 
@StackedCrooked Its an old talk (from last year), did you watch it then?
 
Yep. I've seen that one.
 
What dyu think?
 
I think it was mostly about atomics.
It was a good talk.
But not really enlightening.
Well, talks almost never are enlightening.
Everyone is obsessed with atomics. I want to see a talk that brings us back to reason.
 
3:20 AM
Screw reason, I want performance :)
Muh cycles!
/cc @Mysticial
Infuse me with your knowledge, kthx
 
Avoid obvious waste. Shift computation in space and time. Change the rules of the game to your advantage.
At least that's what I learned from a book called Network Algorithmics. Maybe it can be applied to gaming as well :)
@Borgleader I assume you've seen this?
I also recommend you to get Scott Meyer's PDF On C++ in embedded environment.
 
@StackedCrooked Rapptz linked it to me a while ago but I havent taken the time to read through it yet.
 
It's a very good read.
 
Yeah I really should read it
 
@Borgleader First make it work. Then make it fast :)
 
3:35 AM
Although I do know some of these patterns from experience
and reading Game Engine Architecture
 
"Time moved slower in the 80s. When you're 30, a year is a 30th of your life. When you're 50, it's a 50th of your life." Clarkson logic
i lol'ed
 
Would you say its a bad idea to put a user control in a user control just to get rid of a project dependency ?
Totally hijacking the thread assuming you know c#
 
3:55 AM
wtf is "Visual Studio 2015 Update 1 CTP" - a preview of the actual "Update 1"?
 
oh my god
its been a while since i watched Top Gear's super market sweep
I havent laughed this hard in a while
 
@DavidKron That should be fine.
(I don't know anything about C#.)
 
Was just double checking my ocd reactions
 
4:14 AM
TIL about cactus stacks.
 
5:33 AM
Hi!
 
@Jefffrey Oh for fuck's sake why is moderation so hard to understand
No, you're not as important as moderators, you never were, you never will be, get fucking used to it
 
@StackedCrooked My solution to branches is to just not branch. :)
 
No pesky ifs.
 
Straight-line code FTW. And high trip-count loops FTW.
Of course that isn't very nice in terms of binary size, but who gives a shit?
 
Binary size doesn't matter when deploying on a server rack that has E5 :P
I'm not very familiar with branch elimination though.
I always end up with checks scattered through my code.
 
5:45 AM
Most Pi programs are about 200 - 300kB in size. Each of the y-cruncher binaries are about 3 - 7 MB. ahaha
How's that for software bloat?
 
Do you do things like replacing && with & etc.?
 
~bloat~
As if executable size matters
 
@StackedCrooked No. More like massive inlining and unrolling.
 
Massive unrolling is better than compactness?
 
Granted, the program is also significantly more complicated than most others.
 
5:47 AM
all we need is more digits of pi
 
I suppose if the massively unrolled code keeps getting reloaded then just stays hot in cache.
 
@StackedCrooked Massive unrolling worked great in the pre-Haswell days. Things are changing though.
Haswell, to say the least, is not fond of massive loop unrolling.
 
I heard there are bios options to configure cache prefetch aggressiveness.
I think you can tell it to prefetch the next one or two cache lines on each load. Or something.
 
Though coincidentally, the Haswell tuned binary is still the largest one. That's mostly because of the AVX2.
 
Using AVX2 increases code size?
 
5:49 AM
Indirectly.
Say you have a simple scalar loop.
 
But to vectorize it, you need to do extra stuff like data shuffling and transpositions - all of that adds overhead and code-size.
 
I see.
 
Some of the methods that I use to vectorize have code size of O(N^2) to the SIMD width.
That's part of the reason.
It's also not very scalable and I start running into problems with AVX512.
 
Calculating PI seems like something that SIMD is made for.
 
5:53 AM
Not really. Carry propagation is not vectorizable.
At least not directly.
 
The transformations needed to make it vectorizable are one of the cases that grows O(N^2) in code size to the SIMD width among other things.
N^2 with my current method. If things get any larger, I'll need to start playing with methods based on parallel-prefix sum the Kogge-Stone adder used in hardware.
 
Transformations to get a more SOA-like layout?
 
Though I don't anticipate AVX512 to be wide enough for that to happen.
@StackedCrooked Yeah.
 
Suppose you have a large array and you want to get the sum of all elements.
 
5:57 AM
Right now, nearly all the AOS <-> SOA transformations are done using brute-force NxN matrix transpositions. (4x4 with AVX2, 8x8 with AVX512)
 
IIRC reduction is harder to vectorize.
 
That's where the N^2 comes from.
Not only do you quickly run out of registers, but there's only one execution port that can do data-shuffling. And if the transposition is too large, the CPU's OOE won't be able to overlap the shuffling with actual computation.
And it all goes downhill from there. Especially in cases where you also need N memory access strides.
@StackedCrooked Reduction is easy to do actually.
It's the AOS<->SOA stuff that's a mess.
Carry propagation is even worse.
 
@Mysticial A simple for loop will be auto-vectorized.
But I have no idea if that code will be optimal.
 
If you have infinite parallel capability, reduction is log(N) latency.
Binary collapsing sum tree.
Carry-propagation is also log(N) latency via parallel-prefix sum. (see Kogge Stone Adder)
In terms of vectorization, N would be your SIMD width.
A reduction of M elements using a SIMD width of N would be O(M / N + log(N)).
 
At work we use GPU for packet filtering. I wonder if the SIMD on Intel CPU could compete with that.
Well, it can't obviously.
But it may be good enough.
 
6:12 AM
Give it a few more generations. I'm interested to see how far Intel can go with SIMD. Since they seem to have every intention of making it as wide as a GPU.
Obviously, you're also gonna need the programmers to keep up. But you kinda already need specialized programmers to fully utilize a GPU.
 
Intel DPDK has an example where they 8 packets at once.
They must first check if they are all valid.
Then they start with some cool stuff.
 
And it's only SSE.
 
Ah, didn't notice.
Well, the function name starts with simple :)
@Mysticial One guy from the company researched for about a year and did the job.
@Mysticial Interesting.
A brute-force threaded solution might also work. Suppose you receive packets that can have 30 different possible destinations. Then you could dump all packets on a ring buffer and have 30 consumers. Each consumer simply scans for its type of packet.
 
If Intel can get their SIMD gather/scatter to be as efficient as a modern GPU, all bets are off. I can see them winning.
 
Nice.
 
6:21 AM
Based on what I'm reading, AVX512's gather/scatter in Skylake will not be at that point.
Suppose you have data that's stored AOS, and you need to load it into registers as SOA, there are two (obvious) ways to do it. O(N) gather-loads. Or O(N*log(N)) shuffles.
Intel's docs imply that the latter is at least twice as fast as the former for either Skylake and/or Knights landing with AVX512.
That says a lot.
 
The N*log(N) one is faster?
Shuffles are good. Or gather-loads really suck?
 
Yeah. It's definitely the case on Haswell with AVX2. And Intel's docs imply the same on AVX512.
Gather-loads (and scatter-stores) suck.
 
AVX512 is not yet available, is it?
 
And to be fair, the silicon needed to make a gather/scatter efficient is not trivial.
@StackedCrooked It isn't. But Intel has already released a number of programming guides for it. And they explicitly recommend doing in-register shuffling over gather/scatter.
 
It's a pity that using it requires such specialized knowledge.
 
6:29 AM
Yeah...
 
I suppose a compiler can never transform C++ into highly efficient intrinsics?
 
Right now (on Haswell), gather-loads are only useful if you're doing a randomized table-lookup.
If it's anymore structured than that, it's faster to do it either scalar, or vector with in-register shuffling.
@StackedCrooked That's a long-shot for now.
 
Maybe if they could make a DSL.
Even JavaScript will have SIMD in its next standard.
 
The good thing is that AOS <-> SOA transpositions will be rare in properly designed algorithm.
You do it once for the input and once for the output.
At least that's what I try to do in my Pi program. It gets a bit more compliated with the carry-progation.
 
Do you think the structure of network packet headers lends itself well to SIMD?
A group of 8 Ethernet/IPv4 packets forms a matrix.
 
6:34 AM
It will require a transposition since a packet is in essence, a struct.
 
8 rows of header fields.
Yep.
So the shuffles can do that?
 
Yeah. Basically, you transpose the matrix.
You either gather-load the same part of each packet. Or you load each of the rows into a SIMD vector and transpose it.
Right now, the latter is much faster for CPUs.
 
Stupid question.
But why do you need the transposition?
 
Lemme draw a diagram.
So here's your memory:
{ 0, 1, 2, 3}
{ 4, 5, 6, 7}
{ 8, 9,10,11}
{12,13,14,15}
The numbers are the addresses.
 
6:39 AM
And each row is a packet.
 
So it would be source mac, destination mac, source ip4, destination ip4, source port, destination port etc..
 
And assume that each packet has the same data layout. (identical structs)
yeah
 
If you want to process all the source macs at once, you need to load {0, 4, 8, 12} into a vector.
And for the next thing, you need, {1, 5, 9, 13}, etc...
Approach 1, is to directly load them using gather-loads.
Approach 2 is to load them contiguously, {0, 1, 2, 3} as one vector, {4, 5, 6, 7} as the 2nd. Then do an in-register transpose.
In this 4x4 case, the in-register transpose needs 8 instructions - all of which are single-cycle throughput.
 
Yeah but packets need to be identified on a combination of the mac, ip and port numbers. I don't see how the transposition helps with that.
 
6:43 AM
If you went with 4 gather-loads, it'll take much longer since gather-loads are probably around 10 cycles on Haswell? IIRC
@StackedCrooked If you have all 4 of them in the same vector, they can't talk to each other since vector operations only work vertically. (with few exceptions)
 
does it take a genius to figure out that the dirt outside the fans hinder the air flow & thus reduce their effectiveness in cooling down the cpu?
 
I should have a look at the our GPU code. It's probably doing something similar.
@Mysticial Ah.
 
Basically if you have 4 independent packets, you put one in each vector lane since they won't need to talk to each other anyway.
Basically, the transpose in this case is the AOS <-> SOA transformation.
 
Oh I see it now. (thanks to this)
 
IOW, I suck at explaining. :)
It'd be easier if I had a whiteboard.
 
6:48 AM
No. I just don't know enough.
 
Of course the 4x4 case has been beaten to death. It's a solved problem already.
 
MS paint, you buddy
 
It can be done in 8 shuffles. It gets more complicated when the dimensions are different.
 
mac is 6 bytes. ip is 4 bytes. and sometimes there's filtering on certain offsets in payload
Kinda a dirty job :)
 
The worst one in my Pi program atm is 21x8. Currently, it's done sub-optimally.
@StackedCrooked Yeah, things get uglier once you start messing with the dimensions.
 
6:52 AM
In the end our speed is bounded by the network interface. We only need to be fast enough to keep up with it.
But while we are planning to support 40Gbit/s the 100Gbit/s interfaces coming soon.
Then we'll have to switch gears probably.
 
Multi-thread it. lol
 
I think we could do that. We have loads of unused CPU power.
 
Which of course has its own set of problems... hehe
 
If you had to calculate a TCP checksum in software. Would you use special tricks like prefetching with hints on how long the data should stay in cache?
@Mysticial Actually I think currently context switching is a major bottleneck.
 
A packet checksum is sequential in memory. So that shouldn't be a problem unless you run out of bandwidth.
 
6:57 AM
There's way to much thread-based pipelining going on.
 
Depending on how the packet gets written into memory, there might be some other things to tweak. But they're probably so obvious that it's already been done.
 
Even for only 10Gbit/s I found than checksum calculation and payload copies can kill the throughput.
 
If the card is DMAing the packet into uncachable memory, then you'll want to use streaming loads to read it.
 
Probably because other threads are also competing for bandwidth.
 
Can't you offload checksums to the NIC?
 
7:00 AM
For the new network cards we can.
But there's some old systems that don't do it.
Yesterday I discovered I made a huge mistake. I misunderstood my own async code. The result was packets were being processed and being overwritten with new data form the network at the same time.
This leads to weird results.
Like everything is perfect. But one packet in a millions has a wrong checksum.
memory corruption usually leads to segfaults
 
ow
 
but if the packets get overwritten it only leads to strange parse results
occasionally..
Good thing the software is not yet released.
This must be my worst bug ever.
On the plus side the corruption did reveal some bugs in the parsing code.
It was a good stress test.
 
7:27 AM
At least you found it.
That's all that matters right?
 
Morning.
 
evening
 
@StackedCrooked Avoid copying. Also, IIRC, some OS did split their packets processing and passes the header and the payload separately. Thus header copying does not involve payload copying.
 
7:41 AM
Geezus! Ubuntu! They expire bugs on inactivity. FFS. It is their inactivity!
 
7:55 AM
Switching circuit theory is the mathematical study of the properties of networks of idealized switches. Such networks may be strictly combinational logic, in which their output state is only a function of the present state of their inputs; or may also contain sequential elements, where the present state depends on the present state and past states; in that sense, sequential circuits are said to include "memory" of past states. An important class of sequential circuits are state machines. Switching circuit theory is applicable to the design of telephone systems, computers, and similar systems. In...
TIL ^
 
The real reason why young men with guns use them in #massshootings: http://www.whosay.com/l/dsEb8tm
 
@Elyse yole says T<U>(x) is not ambiguous because Kotlin has no comparison chains.
 

« first day (1827 days earlier)      last day (3122 days later) »