« first day (1112 days earlier)      last day (4062 days later) » 

20:02
What a dark thing to do.
That's very shady of chrome to do.
This is black hat behavior.
It was the flowchart.
@Fanael Cygwin is good enough for me. Git works there.
20:04
Maybe I did it wrong, I don't know. Never happened to me before.
@CatPlusPlus Why do you think so?
@wilx Maybe read next few lines too
@CatPlusPlus It might be but how big is it? If Git has won, and I think it pretty much did, then supporting something that few people use will stop being profitable. They do it for money.
Git has not won, there's nothing to "win"
@StackedCrooked A desatured action for sure.
20:06
There are large projects on Mercurial and they are unlikely to switch to Git just because
Esp that the two are functionally practically identical
@CatPlusPlus new users?
How would you implement a CPU-cap on a process? (I.e. limit a process to use max 90% CPU usage.)
I don't know why I even discuss this, I don't care either way
Space!
A loop that pauses and unpauses the process repeatedly?
@StackedCrooked XY problem? Why do you want to do that?
20:08
@StackedCrooked Yield 1 in 10 of its time slices
Maybe
@wilx How do this cause the XY problem? Oh, wait.
I was confusing with the AB problem.
Why do you care about capping CPU on your app side?
ABA? That's something from threading issues that I have never understood what it was about.
@wilx I can happen if you try i++ without synchronization.
@CatPlusPlus Actually, it's just something I was thinking about.
The problem that triggered it is not CPU-bound but diskbound.
My computer became very slow when performing a large backup while still trying to use the computer.
I wondered if there could be a way to give me priority over the backup process.
In the end it's easier to schedule the backup when I'm sleeping.
Consumer HDDs don't have very good IOPS rating
20:12
But it got me thinking about ways to cap CPU .
There's I/O priority, but it probably won't do any difference anyway
You should just not try to use the HDD that's being backed up, and backup to another HDD
Just googling IOPS..
I/O operations per second
@StackedCrooked Run it with nice -n 20 or such?
I really need an SSD on my home comp.
20:14
@StackedCrooked you know, the FLOPS thing just with IO ;)
CPU is not really a problem on multicore anyway. But HD is and many processes seem to perform blocking disk IO occasionally.
So everything becomes sluggish.
Maybe if they always used non-blocking IO a la nodejs it would be better.
user1804599
Ugh.
user1804599
Did .empty() empty the vector or return whether it was empty?
user1804599
Ah, the latter.
20:23
I think returns whether it is empty.
Is it clear()?
user1804599
Dat pun.
@Rapptz warning, I think the master branch is hilariously out of date (IIRC). Assuming you are referring to github.com/sehe/spirit-v2-json/tree/nowide
@rightfold hint: if it's const, it probably doesn't mutate
named pipes are cool
@rightfold woah. I didn't even notice.
haven't really found a use for bash coroutines though
20:25
@sehe *if?
@StackedCrooked actually, I think it requires a compare-and-swap in unsynchronized setting
@caps I seem to be doing that more and more lately.
@caps that's what I said :/
@sehe yep, compare-and-swap is the basic solution to ABA (iirc)
@StackedCrooked Rather compare and swap is prone to ABA, right, unless you guarantee ordering of acquisition/release (loosely borrowing the terms from the c++11 memory model)
20:29
Ah, you're right.
user1804599
Meh.
user1804599
Forgot to increment the program counter in my VM and it looped forever.
But I think CAS is sufficient for i++ though.
@Pawnguy7 Doing what?
@wilx Ugh. I love cygwin. But if there's one thing I'll never do, it's use Cygwin git. I mean: it has none of the special cases right (line ending awareness gets double fucked up) and sucks performance wise /cc @Fanael
@StackedCrooked Depends on the memory model.
20:31
@caps Typing "it" in place of "if", or vice versa.
@sehe Of course if is. ;)
I also like cygwin.
cygwin++
I mean, try CAS with std::memory_order_relaxed and see how you fare :/ Even with memory_order_acquire/memory_order_release it's easy to get into ABA with more than two threads (or by just using the flags wrong)
It just sucks that I can't build a C++ program with Intel Threading Blocks on Cygwin because the one of the TBB build scripts doesn't recognize Cygwin as a valid OS.
20:33
It's not a valid OS. It runs on the Windows kernel. It can't be a valid OS :/
@sehe Yeah, I refrain using code like that unless I can have it reviewed for correctness.
You don't want to use Cygwin compiler
The Cygwin compiler?
@StackedCrooked I even refrain from using it if someone could review it. I'll only consider using memory model fuckery if my life depended on the extra performance
guys i feel embarrassed to ask help from stackoverflow because the problem i having seems really easy but I can neither understand the problem nor find it. anyone can help me via private? it is about pointers and memory i think
20:34
It compiles your Cygwin.
Into PHP
@sehe That too of course.
@user1046403 You should be embarassed :) Sadly, I can authoritatively announce that we are not interested in pointers unless you mean abolishing them or mocking their use
So how much do you pay
Try using an AbstractSharedPointerRefrenceSingletonFactory.
20:38
@user1046403 You think?
Hey, that's a plus. Many don't
I think I'm going to ask help from stack
@user1046403 I would create a small self-contained program that reproduces my problem. Then I would post the source code along with my question on StackOverflow.
I wish more even had a brain.
@StackedCrooked Or on [CodeReview]
user1804599
20:39
Code Review, noob.
If it's a question about a bug then it can be on SO.
@rightfold What's the magic combo?
user1804599
Meh.
user1804599
Figured pc can just be a pointer instead of an std::size_t.
user1804599
@sehe [codereview.se] :v
20:39
@StackedCrooked lol. It can, but you know how that ends
@rightfold that's impressively long shorthand
I think code-review should be allowed on SO as well. CodeReview has very small active user-base compared to SO.
user1804599
@sehe Better than [Code Review](http://codereview.stackexchange.com/). vOv
@StackedCrooked It usually is
@rightfold Meh. Too long for my taste.
user1804599
Is “Stack Exchange” a pun on “stock exchange”? :V
Unlikely. More likely something with Expert Sexchange
user1804599
20:41
Is “Stack Exchange” a pun on “Microsoft Exchange”? :V
-6
Q: Fold Code Review back into Stack Overflow

wilxIt seems to me that this site should be folded back into Stack Overflow. This site is little known, and because of a lack of reviewers, it does not serve its purpose well. Instead, requests for code review should be marked with, say, a review tag on Stack Overflow. Anybody who does not want to se...

@sehe One trick would be to introduce a bug in the part of the code that you want reviewed. Then you can post it on SO as a question :D
@StackedCrooked Damn. I wish I had so much spare time to come up with useful schemes like that
"Why does this segfault?"
:D
user1804599
I still don’t know why my code from yesterday segfaulted with -O2.
20:42
@StackedCrooked "Because it executes the code you wrote"
user1804599
I don’t know which if the UBs caused it.
@rightfold Which code?
I feel bad with how many segfaults I used to get due to bad bounds checking.
@rightfold lol. None of them. UB doesn't "cause" things. UB "allows stuff to happen"
:lol: "Yeah sure you posted a request for code review, but we don't actually want to review your code"
20:43
I have segfault in my genes so all my offspring segfaults as well.
Shit Exchange
3
user1804599
Oh wait, it’s a pun on Experts Exchange.
@rightfold :lyao: is also a wellknown manifestation of UB
user1804599
20:44
Duh.
@rightfold Slowpoke
3 mins ago, by sehe
Unlikely. More likely something with Expert Sexchange
user1804599
@sehe It was a pain to write, so it should be a pain to debug.
I isn't a pain to debug. Actually. I'm done debugging!
user1804599
Especially the SIGILLs were fun.
user1804599
And debugging with 0xC3.
20:47
user1804599
A UB-free solution would be nice.
user1804599
@sehe Ga je die dame op afstand bedienen?
@sehe Hello, beautiful lady.
It bugs me that TeamViewer's stock photography pleases me.
I feel manipulated
@sehe Manipulated by your cock.
20:48
Not really. Just my brain
user1804599
Same thing.
error C2440: '=' : cannot convert from 'GLuint' to 'GLuint' well fuck you too
user1804599
@sehe Debug yourself.
Do you say billiards like "billyerds"?
@rightfold True. But not in the way you suggest :_)
user1804599
20:53
Ugh.
@Borgleader Ah this is in a template, right. I've seen this before. Happens quite often with MSVC
user1804599
GCC y u function address relative to IP.
user1804599
I need absolute address as a void pointer. :(
@rightfold -fPIC
@rightfold nm -C or objdump or pstack
@sehe Yes its a template
20:54
@Borgleader I never understood the case I tried to fix. It was "funny", like this
template <ShaderType type> // enum class ShaderType: GLuint
class Shader
//...
id = gl::CreateShader(type);
user1804599
@sehe can’t hardcode it, silly.
@sehe I'll look for an SO question later, if none pops up I'll make my own
@rightfold don't need to. Take the addresses, fixup with base address (gdb: show sharedlibraries or something) or pstack - which will already to the decoding
@StackedCrooked Reference. Mmm. you thought of that
Xeo
Xeo
20:56
@StackedCrooked template vs non-template
ok so running my program without gdb segfaults but somehow gdb stops that?!
user1804599
	leaq	12(%rsp), %rdx
	movq	_ZN14bound_functionIvIEE4callEv@GOTPCREL(%rip), %r12
how am I supposed to find out the problem now
Evening lads
Xeo
Xeo
(non-templates are preferred)
20:56
@A.H. UB. Try valgrind
user1804599
@sehe ^ still relative :V
@Xeo Oh dammit.
Xeo
Xeo
@sehe *grins*?
@Jefffrey I made a pun
Congrats :/
20:57
Well.
@sehe memcheck?
First time it happened without me knowing it :D
@Pawnguy7 What was it?
@Xeo I fixed it but my ninja edit got lost. This happens to me a lot on Windows Chrome (I can see the edit locally, but it disappears after a second or less)
Xeo
Xeo
yea
20:58
@A.H. just valgrind will do. Or efence or similar
valgrind kills the segfault too
35 mins ago, by Pawnguy7
Is it clear()?
@A.H. Doesn't matter. The point is, it may report your memory error
@Pawnguy7 Hmm. Wow. Like clear() in void clear(), eh?
@A.H. You don't need it to segfault, right (just kill(getpid(), 11)) instead, you need to know where the UB originates
20:59
@Jefffrey std::vector::clear(), I think.
I never looked it up, but I think it exists.
==16782== possibly lost: 480,086 bytes in 2,451 blocks
==16782== still reachable: 965,019 bytes in 6,775 blocks
@Pawnguy7 yes.
user1804599
Buuh.
@A.H. irrelevant. You're not looking for the leaks. You're looking for unitialized data or out-of-bounds addressing
user1804599
21:00
Isn’t there a built-in function that will return the mangled name of a function as a char const*?
@Jefffrey ever had harddrive issues on a Mac?
@A.H. Or -Wall -pedantic -Wextra -Weffc++ and -fsanitize=undefined etc. Basically: pay the code debt
@rightfold Yes.
user1804599
@sehe Well, fuck.
user1804599
Otherwise I would use dlsym. :F
2
A: How to find out the type of a variable?

seheIn GNU ABI, there is a helper to demangle the name() of a typeid Disclaimer In case it wasn't obvious, of course the GNU ABI only supports demangling names from the GNU ABI (and probably not even wildly varying versions). #include <cxxabi.h> #include <stdlib.h> #include <string> template

Oh wait, the reverse...
21:01
@Pawnguy7 Nope. And my network problems seems to be solved by installing the last update.
user1804599
@sehe Type ≠ function.
@rightfold You can, of course. How could you require this runtime? Seems like nm would do, even runtime :) Just fork/exec
user1804599
I want to acquire a void* to a function implementation at runtime.
user1804599
I cannot use dlsym and extern "C", since I’m in a template.
user1804599
I can use dlsym if I can acquire the mangled name somehow.
21:03
@Jefffrey Ah. I know somebody who has one, they think it has harddrive issues. I haven't seen it, but I was curious. Perhaps I should look at it. Or not. Hrm.
@rightfold just reinterpret cast? As long as you only reinterpret it back to the exact same type you're fine
user1804599
So reinterpret_cast<void*>(&call) where call is a static function should be fine in GNU++11?
user1804599
Can I safely use the result as the operand of a near absolute jump instruction?
template <typename R, typename... A> void* woot(R(*f)(A...)) { return reinterpret_cast<void*>(f); }
@rightfold LOL. NO.
@sehe qt is generating a shit ton of warnings
21:05
2 mins ago, by sehe
@rightfold just reinterpret cast? As long as you only reinterpret it back to the exact same type you're fine
user1804599
@sehe well, that’s the point. :v
user1804599
It works only without optimisations enabled.
user1804599
The zeros in 0b01001001, 0xB8 + 6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, have to get filled in with the address of the function implementation.
@rightfold You want to use gcc inline assembly, I think. But that's very tricky in generic code. Well, if you know the signature of the thing you're calling thunking for. Or if you can specialize for all supported signatures. Anyways, consider a dynamic thunking library (they exist)
@rightfold Why didn't you tell me you were defying sanity with selfmodifying code. I think it goes without saying that you need to use inline assembly here to get any chance of working code
user1804599
@sehe Can’t use inline assembly as I need to store the machine code in a buffer.
user1804599
21:08
@sehe code generation*
ooh I did something really silly and now my bitmaps load
@rightfold well, you can copy the code into a buffer, right? Just use the inline assembly, surround with #pragma (-O0) or ((no_optimization)) (whatever the incantation is) and copy from there
well 2 bitmaps out of the bitmaps in the world
@A.H. Hint: do silly things more often
@sehe seems to work !
21:10
@A.H. Still screwed:
13 mins ago, by sehe
@A.H. UB. Try valgrind
user1804599
@sehe How would I acquire a pointer to the code generated by the compiler for the inline assembly?
@A.H. UB. It doesn't respect you
user1804599
Tonight is UB night.
@rightfold Same method: &function_using_inline_asm (you just stated it works when not optimizing)
user1804599
Oh, you mean this:
user1804599
21:10
std::memcpy(data + 12, reinterpret_cast<void*>(&call), 8);
// …
static R call(Args... args) {
    bound_function* self = nullptr;
    asm volatile("movq %%r15, %0" : "=r"(self) : :);
    return self->function(args...);
}
Just a declspec(naked) function
Mavericks is the best operating system (from Apple of course) of all times.
@rightfold I have no clue. I'm not qualified to read that
user1804599
I copies a pointer to a function that uses inline assembly into a buffer.
user1804599
call is a trampoline, as is data.
user1804599
21:12
I use R15 to store a pointer to the bound_function. XD
user1804599
0b01001001, 0xB8 + 7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, copies this into R15. The zeroes are replaced with this.
@rightfold That was my idea. The point is: leave as much work to regular compiler work as possible. When in need, disable optimizations locally
user1804599
It works fine in -O0 mode.
user1804599
I’ll try to disable optimisations in call and the conversion operator.
@rightfold I think I meant the same with 'thunk'. There's libraries that do this on all platforms. I forget the names, but they used to be quite popular and frequently advertised on SO
user1804599
21:14
libffi.
user1804599
LLVM.
user1804599
But those are practical, i.e. not fun.
PS4>Xbox one
Thoughts?
anyone else having trouble pushing to github?
user1804599
@sehe Still manages to fuck up if I disable optimisations locally. coliru.stacked-crooked.com/a/5c4d215e6e698e3f
user1804599
21:16
I’ll figure it out.
maybe I should just ask on stackoverflow how to load bitmaps?
@Domecraft Similar hardware, similar game library, similar corporate bullshit. As far as I'm concerned, PS4 == Xbone.
user1804599
It segfaults at 0x16, which is funny.
@Code-Guru E_INSUFFICIENT_ARM_LENGTH
@A.H. Lol. That's the worst question ever
@sehe /scratch head
21:18
@sehe well I will provide my code
@A.H. All of it ?! If you have reduced it by so much, the problem usually manifests itself
the problem seems to be that whoever came up with that format deserves a spanking
@sehe I have no idea what you mean by that =p
@Code-Guru you have short arms
well, I can't fetch or pull either...getting a timeout
21:21
@Code-Guru I can't push all the way up to github. I was answering your question
@sehe or just being a smart ass...as usual =p
@Code-Guru You will sit on the naughty step for 37 minutes
and it's too early for me to get your poor attempt at a pun
@sehe everything looks right
never too early for puns
21:22
even ill conceived ones?
Hmm. The linker whines that it can't find WinMain despite my project being a DLL.
Is there another setting I need to set?
@EtiennedeMartel /SUBSYSTEM might be IIRC (*>8 years(
well, I can push to sourceforge, either, so it must be a problem on my end ;-(
Xeo
Xeo
@EtiennedeMartel /subsystem:console
Is there a valid antonym of deforestation?
21:25
I think it's something else.
@Pawnguy7 leave-it-the-fuck-alone?
Um... I am not cutting down trees.
I am making them where they didn't exist before. Ever.
I'm suggesting that as the antonym ;-)
Not using that, then :D
@Pawnguy7 forestation ?
21:26
reforestation would be planting again where trees used to be
@A.H. that was what came to mind, but I don't know if it is a word.
Not to mention I read it as fore - station.
@rightfold finally found this library I vaguely remembered: There's Detours (commercial) and EasyHook(free)
17
Q: How can I hook Windows functions in C/C++?

Clark GaebelIf I have a function foo() that windows has implemented in kernel32.dll and it always returns true, can I have my program: "bar.exe" hook/detour that Windows function and make it return false for all processes instead? So if my svchost, for example, calls foo(), it will return false instead of t...

well spellcheck didn't mind it
Ooh.
Afforestation.
@A.H. clearly, trivial typo of skin
21:28
hrmm...apparently i can fetch over https, but not over git or ssh
But nobody will know what it means :\
@Code-Guru are you using windows?
maybe a port is closed on the campus network
no, I"m on Linux
@Code-Guru is there an application proxy server? Look at ssh -o ProxyCommand with connect.c
Oh wait.
21:28
@Pawnguy7 Re-forestation ?
Palm trees aren't a forest.
8
A: SFTP over double server hop

seheIn essence, without the GUI or other conveniences: ssh -o ProxyCommand='ssh myfirsthop nc -w 10 %h %p' mydestination You can make this default by editing the config file, by default ~/.ssh/config Host mydestination, mydest2, mydest3 ProxyCommand ssh myfirsthop nc -w 10 %h %p This then allow...

I'll look at that later. Time to go tutor some calculus and make me some money!
@Code-Guru ^ updated link to self advertise
Xeo
Xeo
21:31
I'm hungry :(
Eat a club sandwich.
@EtiennedeMartel Do I spy pork rectum there :/
dammit every time I take a second look at the bitmap format I realize that I have no idea why my code works !
@sehe you know how that looks?
@sehe Those are onion rings.
@EtiennedeMartel Amazing. Anything looks palatable when fried
Club and sandwich!
(to death if need be)
21:33
A club sandwich, also called a clubhouse sandwich, is a sandwich with toasted bread. It is often cut into quarters and held together by hors d'œuvre sticks. It has two layers separated by an additional slice of bread. The classic ingredients for a club sandwich are turkey, bacon, lettuce, tomato, and mayonnaise. Other common club sandwiches generally vary the bottom layer, for example a "chicken club" or a "roast beef club". Variations might include ham (instead of, or in addition to bacon) and/or additional cheese slices. As with a BLT sandwich, the club sandwich is usually served on...
@sehe I'm unclear how that helps. I'm trying git fetch origin where origin is a my personal github repo (i.e. I have RW access over the git protocol).
@sehe I got your joke, but I still feel like I have to put that here.
@Code-Guru If http is allowed, you can (often) tunnel your ssh over https (the "CONNECT" proxy protocol)
> held together by hors d'œuvre sticks
Making it sound all expensive
@sehe k, I'll give it a try
@sehe well they are usually expensive
user1804599
22:02
@sehe I think I might be able to use && on a label instead of a function.
Never not reenter atmosphere vertically dl.dropboxusercontent.com/u/26824/temp/…
user1804599
Wait, nevermind. That won’t work because arguments.
@rightfold pretty sure that's a gcc extension, then. Also, that's what the inline assembly was most useful for anyways: well defined ways to get addresses of labels
user1804599
Hmm.
user1804599
Using inline assembly to get the address of a function. :v
22:12
@CatPlusPlus forgot to engage Smart A.S.S.?
user1804599
Wait wat.
I was on lander autopilot (which made that vertical reentry :v)
user1804599
> std::memcpy(data + 12, reinterpret_cast<void*>(&call), 8);
user1804599
Why did this even work.
user1804599
I should have passed a pointer to the pointer.
user1804599
22:14
I’m so confused.
I'll leave you to wonder. Good night!
@sehe You're right everything is too slow with LL & expressions.
morning scrubfaces
morning grumpy
22:24
@sehe The EasyHook answer looks like an advertisement from a team member
@CatPlusPlus whut are you doing, why not just take parachutes? much simpler than a powered landing :)
Well I did turn it off when it didn't deploy parachutes at 1000m
parachutes deploy at 500m :v
Hi. ... new here. What is the joke about belgium¿?
dunno.
22:37
All I was told was that Belgium is the size of Belgium.
user1804599
@Orangeman555 something about house prices.
Oh. So it has nothing to do with chocolate. Ty
@Orangeman555 long story
@DeadMG hai scrub
user1804599
22:49
@rightfold Clang likes to insert ud2 here and there.
my favourite hash is sha1
I once had a function with a bunch of ifs all returning something and no return at the end, since all the cases should've been serviced by one of those ifs. That ud2 saved me some debugging.
user1804599
Nice.
user1804599
@Raindrop sha1 is a weird hash.
user1804599
It’s quite small.
user1804599
22:51
Depends on your needs, of course.
user1804599
-1
Q: Rendering engine - creat and research

foliein the last days I had a huge desire to know how a rendering engine, to the point of creating a own, but when I search on the subject, my results are migrating to other browser rendering engine. So what is my question, if someone could give me a 'light' on the subject. hugs

user1804599
ughwtf
wat
@Griwes You should do something like else throw "bad"; or else abort(); or such instead, IMHO.
Yes, I should've.
22:54
TIL that struct A { static const int x = 1; }; const int& y = A::x; is not a valid code. It must be struct A { static const int x; }; const int X::x=1; because of that const int& y = A::x; That binding to const int& makes A::x "odr-used" and it can't be initialized in class scope.
But it was quick and dirty prototype and, heck, all data should've been matched by either of the ifs.
...if I haven't done some stupid thing before those ifs.
Bottom line is, generating ud2 is kinda nice.
@R.MartinhoFernandes you probably will need to review most of the parts of stdlib there
// should forward or move be used when calling bar(..)?
template<typename T, typename U>
void foo(pair<T, U>&& p) {
    bar(std::forward<T>(pair.first), std::forward<U>(pair.second));
}

« first day (1112 days earlier)      last day (4062 days later) »