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

Ell
2:04 AM
Emacs needs a rebranding
 
what you mean it's not just a text editor?
 
@ScottW +1
 
recompile for headphone support
 
headphone support will surely be one of our priorities too
 
@ScottW I am almost entirely positive that emacs doesn't use C++
 
2:09 AM
was just nodding off - what's up?
 
considering it uses scripting languages
@ScottW ooooooooh
nvm then definite recompiles for everything
 
ethink @sehe gave m ping
 
@JonClements ?
 
what is this cryptic message
 
I'm so confused
 
2:13 AM
@JonClements I did
 
was trgj
 
are you okay, @JonClements
?
or are you just on mobile
 
yeah, trying to play game of MTG at the same time
 
he's speaking Dutch
 
@jaggedSpire those are not mutually exclusive
 
2:15 AM
@sehe so they aren't.
 
and my keyboard input was stolen by the game somewhat
so err, am I needed?
 
did someone flag?
what was even flag-able?
 
nigger
This is an example of what would be flaggable
 
guys
I have a theory
 
1 hour ago, by sehe
@JonClements Hey... Quick question (meta came up empty negative). Is there a way for me to locate an answer of mine (using libcgraph) that seems to have gone missing? Perhaps the question has been deleted? Perhaps with a deleted account? There's no such thing as searching for user:85371 cgraph isdeleted:yes AFAICT
 
2:21 AM
oooh. okay
 
USB sticks
are actually 4d objects
 
@GregorMcGregor yet it wasn't present until just now
 
because the first time you put them in, they don't fit
then you rotate 180 degrees, and it doesn't fit again
then you rotate 180 degrees again, and it fits
 
@jaggedSpire Jon is prescient
 
they can only be 4d objects
 
2:21 AM
@orlp 2004 called they want their joke back
 
@orlp USB icon faces up, unless your computer fails at machining
like my old one afdjk
 
@GregorMcGregor don't you have some potatoes to farm or something :(
 
They're busy potating
 
such is the life of potatoe
 
user406009
@orlp Well, supposedly USB C will come to save us.
 
2:23 AM
you make me sometimes why I bother
 
I'm sorry. :(
 
I'm your "lovable" mod - take it our leave it I guess
 
> take it our leave
 
and amazingly people can choose their own words
 
sorry Jon but as lovable as you may be I'm not letting you take my leave
 
2:27 AM
trying a dvokak keyboard
 
> dvokak
 
lots of unlearning
 
I should do that. I have awful habits on qwerty
 
@ScottW what the fuck?
guys, a talking dog!
 
joun clemens
 
2:29 AM
@orlp dude I'm a talking pile of rocks and you're not surprised by me.
 
user406009
@ScottW Well, you would have to be pretty drunk to be using dvorak anyways ...
 
General Gregor MacGregor (24 December 1786 – 4 December 1845) was a Scottish soldier, adventurer and confidence trickster who from 1821 to 1837 attempted to draw British and French investors and settlers to "Poyais", a fictional Central American territory he claimed to rule as "Cazique". Hundreds invested their savings in supposed Poyaisian government bonds and land certificates, while about 270 emigrated to MacGregor's invented country in 1822–23 to find only an untouched jungle; over half of them died. MacGregor's Poyais scheme has been called "the most audacious fraud in history" and "the greatest...
The Hon. Gregor McGregor (18 October 1848 – 13 August 1914) was an influential Australian politician and trade union leader of the late nineteenth and early twentieth century. Born in Kilmun, Argyll, Scotland, McGregor worked in the Glasgow ship building yards prior to his emigration to the colony of South Australia in 1877. Initially working as a builder's labourer and a gardener, McGregor became involved in the union movement, rising to the position of President and Secretary of the United Builders Labourers' Association and President of the Trades and Labour Council, which inevitably led to...
 
if I had time to be drunk - blah blah
 
Ugly-looking dude..
 
need to do my time cleaning up voting rings and such
 
user406009
2:32 AM
Don't they catch that automatically nowadays?
 
@JonClements I'll vote 4 u iff u vote 4 me bby
 
"behind the scenes" there's a lot more going on that I can say
 
user406009
Well of course. The little people in the machines need to power the cranks which make SO go round.
 
> My little brother was erasing something on his homework and accidentally ripped the paper, and then I hear him whisper, "Thanks, OBAMA"
 
@GregorMcGregor but you're already voting for Trump
 
2:39 AM
@Lalaland and I'm the proactive smurf - love me or leave me :P
gawed
if you could see the flags raised... wow
 
user406009
Flags on here? I don't see anything anyone could object to.
 
no - flags in general
 
General McGregor
 
objection!
 
Playing Phoenix Wrong?
 
2:44 AM
let's be real
 
Fun event: Windows for whatever reason decided I no longer had the permissions over a directory in my git repo. When I tried to checkout another branch, git deleted everything. Fun.
 
flags are only for "immediate i intervention"
 
the best candidate for mod is right here
 
As usual rebooting fixed the issue
 
rip
 
2:45 AM
f*ing autocorrect
 
wish I worked in a linux environment still
 
@nick ~if you believe in yourself, anything is possible~
 
so who wants to run for mod in '16?
 
it's possible but meh
 
@JonClements not I
 
user406009
2:47 AM
We should elect Cat as mod!
 
@JonClements vote for me
 
haha!
 
Jon Clements is the hero we thought we deserved, but not the one we wanted to need.
 
can you step down as mod/refuse to become a mod?
I'd assume so
 
but who would turn down all that glorious power?
 
2:49 AM
it's a voluntary position
 
Cat
 
true
 
u;sand err, there is obviously some power as a mod
 
what's the record for longest room owner time for Cat, BTW?
before he noticed and removed himself
I think it's time for me to retire from cyberspace for the night.
 
what was gpomg pm
f* kb
one sec
back
 
2:57 AM
I have an extra keyboard if you need one
actually don't even get me started
 
really, don't.
 
luve and leave the rrom foor a bit
 
he loves his mechanical keyboards
 
@VermillionAzure I might make a variant of your concept
 
2:59 AM
bbuab
 
toodles?
 
k bb
 
on a scale from 1 to 10, how hard would a cat plot to murder me if I hypothetically called it toodles?
note: this is not Cat, but an otherwise anonymous cat.
 
@Toodles
 
user406009
Well, it wouldn't ever know you called it toodles.
 
user406009
3:01 AM
So the question is invalid.
 
awh
but it's so much more fun to imagine it plotting vengeance for the indignity
 
redis.io/commands/expire I just spent a couple hours trying to implement this before I realized it was already done
kids this is why you read the full API
 
@jaggedSpire mines are superior.
 
Ell
How do I break screen addiction
 
@Ell break screen
 
3:14 AM
 
Who linked this thing again? I can't find it anymore (perhaps it was on mumble then)
0
A: C++ user input restriction with proper repetition without "goto"

seheHere's an idiom I like to use: int i; if (std::cin >> prompt("enter an integer: ", i)) { std::cout << "Read user input: " << i << "\n"; } else { std::cout << "Input failed (too many attempts). Eof? " << std::boolalpha << std::cin.eof() << "\n"; } Here, prompt is a smart input manipula...

GINORMOUS overkill right there.
 
@sehe ...
 
Ell
Its nice
 
Are there some x86 intrinsics to scale color range of an 8 bit image?
 
3:17 AM
@orlp I wanted to figure some of these things out myself. It gets unpleasant at allowing generic messages
 
@Mikhail could you rephrase that?
you have an 8 bit per color channel (I assume) RGB image?
then what exactly do you want to do?
 
I'm trying to change the histogram of a grayscale 8 bit image, quickly
 
yeah, but what kind of transformation?
 
Python looks like:
U=np.minimum(U,rin[1])#Overflow protection
U=np.maximum(U,rin[0])
s=np.array((rout[1]-rout[0])/(rin[1]-rin[0])) #Can't cast it back to original type due to rounding problems, I think
U=s*(U-rin[0])+rout[0]
 
not certain what U is
 
3:20 AM
its an image
 
rin?
 
range in
range out
 
what are descriptive names
 
so you first want to clamp each value in the image onto [rin_lo, rin_hi]?
then scale that range to [rout_lo, rout_hi]?
 
something like this
 
3:21 AM
@Mikhail could you write the function with clear variables for a single pixel?
 
I can write it, but its going slow
 
yes
but then I can help you
 
Poor pixel is single
 
right now I'm not 100% sure what you're trying to do
also, what is the output domain?
still 8-bits?
 
yeah
 
3:22 AM
@GregorMcGregor all my variable names are single letters
 
All mine are married words
 
user406009
The GPU could probably do this quite efficiently, but that might be overkill.
 
user406009
The pure C++ solution should be fast enough without any "fancy tricks".
 
in the code posted, s is a float, so doing float*unsigned char
 
user406009
Well, you shouldn't need floating pointing arithmetic for this.
 
3:25 AM
silly, you name your strings s and your floats f
 
As opposite to 'a couple of pixels'
 
@Mikhail would this function be correct for a single pixel value?
def scale(x, in_lo, in_hi, out_lo, out_hi):
    # Clamp input.
    if x < in_lo: x = in_lo
    if x > in_hi: x = in_hi

    # Scale input.
    in_range = in_hi - in_lo
    out_range = out_hi - out_lo
    factor = out_range / in_range
    return out_lo + (x - in_lo) * factor
 
looks about right
 
user406009
U = (rout[1]-rout[0]) * (U - rin[0])/(rin[1]-rin[0]) + rout[0]
 
user406009
Just reoder the operations slightly.
 
3:27 AM
thats fine but then there is division, for example
 
user406009
Also be careful that you need to do the above calculation with 16 bits.
 
and you want to do the implementation in Python?
or C++ (or C)?
 
Hoping to do C++
 
so you get a vector of uint8_t
and output that as well
 
Something like that, probably auto ptr = vec.data()
 
user406009
3:29 AM
Actually, it's an interesting question of whether or not 1 integer multiplication + 1 integer division is faster or slower than 1 float multiplication.
 
Or weather or not MMX has this instruction, because I assume its really common.
 
the simplest fast implementation would be to compute a 256 element lookup table
 
Hmm, thats a really interesting idea
I should give it a shot
 
until you go SIMD you can't beat that I think
maybe with SIMD you can
@Mikhail how modern in your CPU?
 
Skylake
Came in the mail yesterday
 
3:32 AM
disgusting
I would never do that
 
@Mikhail just for shits n giggles I might help you write something ridiculously fast
 
I'm still stuck on Haswell for now.
Can't find a suitable laptop yet.
 
@Mysticial Have you checked out Cray's new laptop offering?
 
@Mysticial there is no 8-bit gather right?
cause that'd be perfect for this
 
Granted, I won't be able to update my main desktop until Skylake-E. Since I'm already running the highest end Haswell-E.
@Mikhail Not yet. I've only looked at the MSI and ASUS Skylake laptops so far.
 
3:35 AM
Looking forward to Skylake-E as well!
 
@orlp Not even AVX512 will. Gather is difficult enough already. Forget about 8-bit granularity.
 
@Mysticial could you imagine how fast though
 
If your lookup table fits into two 512-bit vectors then you can use all-to-all byte-granular permute in AVX512-VBMI.
 
64 chars looked up at once
 
Last time I asked about gathers in AVX it was a catastrophe apparently
 
3:36 AM
@GregorMcGregor It is. There is literally no benefit to using it unless you're doing something like a parallel table lookup and then immediately using the loaded vector for vector instructions.
 
@Mysticial @Mikhail is doing a 256 -> 256 element mapping
 
GPU master race with very good gathers
 
@GregorMcGregor fuck you and your 4x larger die size
 
#represent
 
@Mikhail I HEARD IT'S TO DIE FOR
2
Speaking of which I'm thinking on making a coliru-like site for CUDA and OpenCL so I can finally put demos in my answers
 
user406009
3:40 AM
Why is gather useless? Is the CPU good enough at out of order processing to process the loads in parallel if you did them normally?
 
using Amazon's machine?
 
the GPU instances on AWS are a bit too expensive for my taste
 
Using CPU emulation
 
with CUDA?
 
Yes you can link CUDA programs with gpuocelot which translates the calls into OpenCL
So you can have CUDA on CPU
or something
but anyway it can run PTX
 
3:44 AM
@Mikhail how do you want it rounded?
truncate or round to closest?
 
Whatever is faster
 
in this case equally fast
 
truncate
 
There was an article somewhere (written by Intel) that said that if you using the 2-vector all-to-all permutes for small lookup tables will be around 2-3x faster than a gather.
If we assume 8-byte granularity and that the permute is single-cycle throughput, we're talking about 2-3 cycle throughput for the gather. That sounds pretty impressive.
Too impressive. So either gather is really fast, the all-to-all permute isn't really single-cycle, or there's something else that we won't know about until we see the damn chip.
 
@Mikhail can we assume that the input size is a multiple of some integer?
 
3:49 AM
@Mikhail Have you tried benchmarking the gather on your Skylake?
Based on the what I've read about, even though it doesn't have AVX512, the vector unit is pretty much the same but without the top half. So all the latencies and throughputs that you see on Skylake with 256-bit vectors will probably be the same with 512-bit - except for maybe the gather/scatter.
 
Wellp, it seems my custom hoodie is around $50 + shipping. Not that bad.
 
On Haswell, the gather performance throughput is proportional to the # of lanes that need to be fetched since it's not a true gather. But you can probably do a similar benchmark on Skylake to see if that's still the case.
If a 128-bit gather of 2 doubles is the same throughput of a 256-bit gather of 8 floats.
 
Mysticial getting his hopes up. :P
 
@GregorMcGregor dat answer edit:
> you can use a high_resolution_clock which may sometimes provide higher resolution (although it can be an alias of steady_clock).
Can we spell weasel
 
@ElimGarak I actually don't care that much about the gather/scatter performance. All my use-cases are doable using in-register permutes.
 
3:55 AM
@orlp Yeah, also in my implementation I align the memory to some boundary.
@Mysticial I don't know how to do that...
 
@Mikhail Build a small lookup table. And loop gathers over it.
 
@Mysticial It is single-cycle (at 500 MHz).
 
@JerryCoffin Where are you getting that from? Knights Corner Xeon Phi?
 
@Mysticial Pulling it out of my ass the air.
 
ah
 
user406009
4:00 AM
Aren't you limited to extremely small lookup tables with the permutes though? You only get 128 bytes at best.
 
The Knights Corner Xeon Phi had a gather that had throughput somewhat proportional to the # of cache lines that were hit.
@Lalaland Yes. But apparently there's enough demand for even that. Intel's article seemed to imply that the purpose of the 2-vector all-to-all permutes was to do small lookup tables. Granted, I've already found ways to abuse them for other purposes.
 
user406009
Is there an efficient way to somehow use two permutes to get a 256 byte table? I can only think of branching or cmove.
 
Yeah, two permutes and a blend.
You build two 2-vector lookup tables using 4 512-bit vectors.
Take the bottom 7 bits of the 8-bit index and permute on both pairs. This gives you two 512-bit vectors.
Then blend them using the remaining bit of the index.
And you have your 256-element lookup table.
This method generalizes to larger tables at a cost of O(N^2 * log(N)).
 
in the meantime
here's my kinda crazy non-SIMD impl
the crazy part is the lutN tables
it probably costs time rather than save, but I thought it was a cute idea to save one shift
 
4:30 AM
Cool, thanks I'll try the LUT approach. It seems like LUTs are one of those hidden tricks that normal people don't often know about.
Anyways, I got to teach tomorrow. bye
 
user406009
@Mysticial Isn't it O(N) work? You start withN/128 lookup tables. Then you proceed to perform blends. Every time you blend, you cut the number of lookup tables in half.
 
Or, as with my approach, you get this ~9 line main. This is called declarative programmingsehe 12 secs ago
hehe. Subtle allusion to the guy's "pro tip" about procedural programming
 
user406009
1/128 * N * ( 1 + 1/2 + 1/4 + 1/8 + 1/16 ...) < 1/128 * N * 2 = O(N)
 
user406009
Where N is the size of the lookup table.
 
user406009
(Counting the number of blend operations)
 
4:34 AM
@Lalaland O(N Log(N)) if the data size is fixed. O(N^2 Log(N)) if the data size is N.
Basically you're emulating an N muxes each of which require N x log(N) transistors.
@orlp I'm surprised that doesn't blow your stack.
 
@Mysticial who says I ever ran it
@Mysticial either way, it's only some kb
 
Someone is up late ...
 
@chmod711telkitty who
 
my kindle ran out of battery because I hadn't recharged it in weeks okay?
it's sort of my fault but I'll never admit it
 
user406009
Hmm, I still don't see where that logn comes from. The sum simply equals N/64 blends.
 
4:41 AM
@sehe pretty
 
In electronics, a multiplexer (or mux) is a device that selects one of several analog or digital input signals and forwards the selected input into a single line. A multiplexer of 2n inputs has n select lines, which are used to select which input line to send to the output. Multiplexers are mainly used to increase the amount of data that can be sent over the network within a certain amount of time and bandwidth. A multiplexer is also called a data selector. An electronic multiplexer makes it possible for several signals to share one device or resource, for example one A/D converter or one c...
A blend is basically a 2-to-1 mux. For a 2^N-to-N mux, there are N stages. That's where the log(N) comes from.
Wait.
I could be wrong. Lemme double-check.
Maybe I'm confusing the log(N) with the latency rather than the gate count.
 
user406009
Yes, there are log(n) stages, but the total sum is o(n). I guess it becomes important when you can parralize every blend.
 
user406009
But we can only parralize a couple of blends.
 
user406009
If we had a way of parallelizing any number of blends it would be nlogn.
 
I stand corrected. The total gate count for a 2^N-to-N mux is O(N). But the latency is log(N).
So O(N) instructions to do a table-lookup if the data size is fixed.
 
4:56 AM
@sehe What happenned
oh that guy. vOv I won't push further
 
AVX512 has the following 2-vector permutes:
- vpermi2q (8 bytes x 16)
- vpermi2d (4 bytes x 32)
- vpermi2w (2 bytes x 64)
- vpermi2b (1 byte x 128)
If we assume these are implemented using straight-forward muxes, the 2-to-1 mux count would be:
- vpermi2q : 64 x 16 x 15 = 15360
- vpermi2d : 32 x 32 x 31 = 31744
- vpermi2w : 16 x 64 x 63 = 64512
- vpermi2b : 8 x 128 x 127 = 130048
 
So the transistor count (and therefore die-area) grows linearly as the granularity gets smaller.
vpermi2b will only be available on 10nm chips. Makes sense given how big it needs to be.
 
bby u kno what else grows linearly
@Mysticial I want 3d chips already
 
@GregorMcGregor just solve one very simple problem
heat
 
5:03 AM
bby heat isnt a problem if u know what i mean
 
Goodnight number 2: electric boogaloo
 
jaggood night
 
 
2 hours later…
6:52 AM
@CatPlusPlus I just realized there's "IT" in my title ;_;
std::is_trivially_incompetent
3
 
7:12 AM
> A former Vatican official, who was stripped of his post early this month after acknowledging publicly that he was gay and in a relationship, on Wednesday renewed his criticism of the Roman Catholic church, accusing it of homophobia.
lol isn't it funny? God killed everyone in Sodom and Gomorrah for sodomy, and he says that being a sodomite is ok.
 
It's not that funny.
 
The ones from Gomorrah where killed because they did gomorry.
 
Xeo
@AndyProwl Nope. Just the conference itself
 
@Abyx it's pretty hilarious
 
MeetingC++ is the one that used to be named boostcon, right?
 
7:23 AM
well it's kinda complicated. it's good that Christianity is collapsing, however Islam is steadily taking over. I'd side with Christianity, however it looks so hopeless =\
 
how is Islam "steadily taking over"?
 
It seems to me like both are losing credibility fast, but that is not really a surprise. Sociologists have been predicting this for a century (and more).
 
@GregorMcGregor they even managed to create the Caliphate
 
@Abyx Side with rationality.
 
It's not because we are getting more exposed to the radical morons of Islam that they are taking over anything, just that the media is more farreaching nowadays
 
7:26 AM
and even those Muslims who are escaping from IS, they are moving to Europe and spreading Islam culture there
 
A spider can fart in a cave in the most remote island of the pacific and that still can make news the next day because internet
 
Yeah, they can spread it and annoy everyone. Won't get them far, though.
 
@Abyx Yeah OK, some bigots should definitely be calmed down, but EU is afraid of being pointed at as racist
I've seen some videos taken in the UK is p impressive
 
0
Q: Are we allowed to beat someone up because of he has talked to your sister or daughter?

Hüdaverdi Alperen DemirokAre we supposed to beat a guy up and/or send him death threats if he talks to your sister, instead of warning him politely in the first place? Does Islam say anything about it, or is it made up later on?

 
Karl Popper's paradox etc
@ElimGarak lol early morning Islam.SE => good day ahead
 
7:29 AM
@ElimGarak dat userpic
 
> Is it haram to wear loose trousers or jeans
is it haram to do anything at all
p sure c++ is haram though
 
0
Q: Is it haram to write C++?

Elim GarakI've been writing computer software in this foul language for over a decade now and I am starting to fear for my soul. What advice do you have for me?

2
 
@ElimGarak meh, another question without attempting to read a textbook/manual
 
"In some places the standard even mentions nasal demons. Should I repent and use a managed language instead?"
 
@ElimGarak You could have made an effort to make it look somewhat legit.
 
7:36 AM
@R.MartinhoFernandes :effort: :(
A better question would probably involve haram because of spending time in the Lounge<C++> while at work, in the company of bisexuals.
Well, this is a first. Bethesda will not be releasing modding tools with Fallout 4, at least for the foreseeable future.
 
@ElimGarak 404
 
> Here are some similar questions that might be relevant:

Is chess haram?
 
@sehe I deleted it, will use the second idea after work. I'll need to invest more time to make it legit, as Robot suggests.
 
Clever community vigilants should be aware of your account by now :S
 
Luckily, the stackexchange accepts @mailinator accounts. :P I think the other one will have some legit bites.
 
7:53 AM
what the fuck
the internet surprises me once again
 
Looking at the Fallout 4 artwork, they've invested a lot of time into 2077 America. Lots of prewar illustrations. I suspect the story will involve traversable flashbacks.
 

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