« first day (1037 days earlier)      last day (3911 days later) » 

7:00 AM
@Borgleader Pretty sure for rep, the big one to learn (and answer questions about) is C#.
Haskell -- fun, but too obscure to earn much rep, at a guess.
 
Yeah for sure, judging by the volume of questions C# is a clear winner, the come c++/python, and haskell is at the very low end
i might add prolog to the list at some point but that's even more esoteric
 
@Borgleader You skipped over a few more obvious ones like Java and Javascript. Actually, if you wanted rep, I'd guess Android would be a particularly good one: lots of questions and very few good answers.
@Borgleader s/esoteric/obnoxious/
 
Well for rep I should be covered with C#/C++/Python, but if that wasn't enough then yeah I'd go for those.
The problem with android is I don't particularly like programmin for it.
Javascript isn't so bad as long as I can stick with jQuery
 
Xeo
Mornin
 
@Borgleader I avoid anything related to web like the plague
 
7:11 AM
@Xeo And a fine morning to you sir.
 
When I first learned programming (in uni 4 yrs ago) it was procedural then the next semester we got into OOP and that changed my perspective a lot. I'm hoping Haskell will have a similar effect and make me a better programmer (lol). Prolog might have do the same to a lesser extent.
 
Xeo
@JerryCoffin VS already made sure that this is, in fact, not a fine morning. :s
 
@Xeo Okay, I'll rephrase. Allow me to wish you the best morning possible under the circumstances.
 
user image
13
 
lol
 
Xeo
7:21 AM
Even the installer doesn't believe you want to actually install that shit!
10
 
Apparently Java hates Japanese.
 
I made Pandora glitch
 
@chris Looks...highly questionable to me.
6
 
it's playing 6 songs at the same time :s
 
@JerryCoffin lol
 
Xeo
7:23 AM
Obtw, @Jerry, wise man - how many goats and virgins do I have to sacrifice for the VS installer to copy over the fucking C++ stdlib headers? :s
 
Install VS2013 preview
:)
 
@Xeo go gcc
 
@Xeo One virgin (if she's really hot) and I'll send you a laptop with VS already installed.
 
lolll
 
Xeo
7:46 AM
Or is anybody willing to zip his VS2012 VC/includes folder and send it over?
 
@Xeo Address?
 
@Tuntuni damnit now my uploading has been for nothing
 
@JerryCoffin you didn't say it has to he human
 
@StackedCrooked If he can come up with something non-human that I judge as "really hot", more power to him.
 
Xeo
8:00 AM
@Tuntuni Thanks a bunch.
> LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib'
OH COME ON
Wtf, I even have that lib in /lib/amd64
 
bad libpath thingy?
 
Xeo
Wait, that's 64bit only
 
no shit
 
Xeo
So, back to square one
 
are you building a 32 bit program ?
 
Xeo
8:05 AM
Ya
And /lib only contains the /amd64 subfolder :s
 
can you use this to get the 32bit stuff ?
 
@Xeo No problem. :)
@Xeo I think I have that, let me see how big it is.
 
Xeo
over 200MB, the amd64 folder atleast.
 
236 MB :/
Why can't you just install VS2012 though?
 
Xeo
I tried that.
It just doesn't copy over the C++ headers and libs
 
8:10 AM
o.O that's weird.
 
Xeo
Yeah, and it's starting to piss me off.
 
wow the C++ standard library is only 1.15 MB zipped?
 
Xeo
13MB or so unzipped
 
lol Boost is like 70 MB zipped
I would have expected the actual standard to be maybe 25 or so
 
Xeo
The stdlib isn't all that big.
restart...
 
8:15 AM
most of it are just includes of other things
 
Xeo
Let's see now if I can clean up the registry after uninstalling VS again
 
MinGW64 is ~35 MB of config/windows stuff and 8 MB for the actual standard library
 
Xeo
Also, fuck, MSE doesn't want to get activated.
 
for the longest time I thought <iostream> was the biggest header
but even <functional> is bigger than <iostream> in MinGW..
 
@xeo wouldn't it be funny if @Tuntuni modified the stdlib to add some subtle bugs? :P
 
Xeo
8:20 AM
latest-modification date on all of the files was 2012 vOv
 
@A.H. No, that would be mean. :'(
 
11 hours ago, by DeadMG
when VS fucked up for me, I didn't waste time -> I just reinstalled Windows right away.
@DeadMG ^ this must be the saddest and most twisted logic I've heard coming from a developer in months
 
@sehe the windows equivalent of turning it for and on again
 
Yeah, surely, no waste of time. At all
 
Xeo
8:22 AM
That's amazingly small from 230MB
 
7z
winrar got it to like 45~
and this wasn't even 7z's final form
 
Wow 17mb
7z sure is great.
 
So , I just noticed I have a non empty folder lib/amd64 AND I am on a 32 bit machine
 
Aw shit, I cut and pasted the headers.
 
why the hell is that there?
 
Xeo
8:25 AM
ermergerd, the test project compiles.
 
Cross compilation.
 
@Tuntuni you screwed up your headers?
 
@A.H. Almost. Got them back now.
 
I got gcc 4.8.1 and I am happy with libstdc++ , dunno why you guys are using VS
 
@A.H. It compiles my Windows code that GCC doesn't :p
 
8:27 AM
@chris I am on windows
 
@A.H. Yes, but AFAIK, most things that are for Vista+ aren't supported in MinGW.
 
@A.H. Check vcvarsall.bat in your VC folder. If you pass x86_amd64 as an argument to the script, it'll setup the paths so you'll be able to compile code for amd64 on a x86 system.
 
Or at least don't have proper headers.
 
Xeo
@A.H. I'm a sucker for the debugger.
 
@chris I think there are ways to transform .libs to .a
 
8:28 AM
@Xeo Same here. It's just so helpful.
 
or something
@Xeo actually I can't get gdb to work , so I am left with std::cout + shit loads of compiling
 
Xeo
Yeah, and that's bullshit.
@A.H. Anyways, thanks a bunch to you too.
 
I haven't debugged in ages.
 
np
 
Xeo
@Rapptz Your code must be perfect. :P
 
8:30 AM
@Tuntuni good to know
 
I usually debug when I get seg faults.. and.. well...
 
but I doubt I will be building for a platform unless I can test on it
 
I don't get those anymore.
 
@A.H. Mm. :) I also have the libs, etc. for ARM.
 
Xeo
Okay, now to find out why MSE is throwing a hissy fit.
 
8:32 AM
btw gdb says it can't find libgcc_s_sjlj-1.dll if anyone knows whats that about , I personally think its messed up that something that starts with libgcc ends with .dll
 
compile with -static?
 
STL's MinGW distro is quite nice.
 
anyway that should be in your bin directory
 
Comes with boost and loads of other libraries.
 
so I have no idea why it's complaining
 
8:33 AM
@A.H. I always had the annoying experience of that when opening exes until I found out to compile with -static -static-libgcc.
 
@rapptz mingw-build built it not me :<
 
@A.H. It's a command line option bud.
 
@Rapptz yes my program is compiled with -static
 
@Tuntuni But doesn't have a working <thread> and is slower at distributing new GCC releases.
 
What's the difference between libgcc and libc++? Are there any more of these? I never got around to organizing that in my head.
 
8:34 AM
but just
$gdb
gives that error
 
don't know what to say
 
@chris Do you use MinGW or MinGW-w64?
 
@Tuntuni gcc.gnu.org/onlinedocs/gccint/Libgcc.html , if I am not mistaken libc++ is the one clang uses
 
@Tuntuni Mainly the 32-bit one.
Since 64-bit executables caused problems for everyone.
 
@chris -w64 works on 32-bit systems too.
 
8:36 AM
@Tuntuni Oh, wait a sec.
 
@chris What's the latest version of GCC on MinGW?
 
Xeo
@Rapptz: Welp, I guess MSE didn't like the locale switch.
Reinstalling fixed it.
 
Can't say I'm surprised lol
If you have LaTeX or Python those are broken too
 
@Tuntuni mingw-builds has the latest
 
@chris IIRC, MinGW-w64 is the one that doesn't support <thread> (which is what STL uses) and they're at GCC 4.8.1.
 
Xeo
8:38 AM
nope, Python's working fine.
 
Well they broke for me
 
@Tuntuni 4.8.1. And I'm fairly sure I've been using MinGW.
 
@xeo Security essentials ?
 
I'm going to see if the other one I have does threads then.
 
Xeo
@Tuntuni One is a C++ stdlib implementation, and the other is a basic C runtime.
@A.H. ye
 
8:39 AM
@Tuntuni No.
 
@Rapptz Oh?
 
I have mingw64 and <thread> works fine
 
@Xeo well if it gives you any comfort , AVG thinks anything I am developing is malicious especially if I keep building it a lot
 
STL doesn't build winpthread for MinGW
 
@Rapptz I haven't yet used it. Awesome then. :D
 
8:41 AM
I haven't used thread here yet but I think it works :P
 
std::this_thread::sleep_for(1s)
 
@Xeo And libstdc++? stdlib implementation for GCC?
 
Xeo
Ja
 
Meh, my 64-bit executable version can't find a few libraries lol.
But a thread test did work.
 
@Xeo What's the name of Clang's runtime?
Ops
 
8:43 AM
@chris Its moments like these that make you appreciate static linking
 
I asked about GCC already :p
 
@A.H. Well, I mean if I have -llibname, it says "can't find -llibname".
 
Xeo
@Tuntuni Uses GCC's C runtime, IIRC.
 
@Xeo Aha. And what about VC's implementation? The runtime is msvcrt right?
 
Xeo
ya
 
8:47 AM
And implementation?
@Rapptz Not declared. :/
 
Xeo
@Rapptz meh, s for seconds :s
 
@Xeo C++14
 
Xeo
Didn't they assign s to std::string?
 
and seconds
it infers from the type applied
 
Xeo
right, overloading
 
8:49 AM
s is overloaded for all strings too
u16, u32, L
 
Xeo
I still think they should've waited for string_ref/_view
 
@Xeo string_ref?
 
const string
 
Xeo
non-owning view into a string
 
@Rapptz I suppose that's different from a const std::string&?
@Xeo So sort of like string iterators?
 
8:50 AM
Yeah. I just say const string to simplify it
 
Xeo
It's basically char const* + size or end pointer
So it's perfect for string literals.
And things like string_split.
 
another overnight hiking trip that did not kill me ... phew
 
Hm.. damn.
Need a single use of push_front.. but I don't know if I should replace vector with deque.
I don't know why I'm afraid of deque.
 
@Rapptz If it's not for performance reasons, just use insert.
 
I literally would only use push_front in maybe 2 functions tops.
Is deque really as bad as it is in my mind?
 
9:03 AM
@Rapptz What are you using the vector for in the first place?
 
inserting and removal at the end along with mapping
 
@Rapptz What I meant was what is the stuff you're putting into the vector supposed to represent?
 
digits lol
I'm remaking some old stuff to C++11
 
Like numeric digits?
 
yeah
it's a big int thing
 
9:07 AM
Oh okay that makes more sense. I was wondering why you're going through all this effort to store numbers lol.
 
Xeo
@Rapptz It's a list<vector<T>> with fixed-size vectors
(And on MSVC that size isn't very big)
But really, just insert at the beginning and worry later
Since you're storing digits, the stdlib will likely just blast through with memmov
 
9:24 AM
Reminds me not to experiment with meat BBQ on a light camp stove - might die from known disease next time
20 mins on fire, still half cooked
sadness
 
I'm waiting for someone to cut down their code before answering.
Watch someone jump in with an answer.
 
Ell
I'm gonna learn perl
 
9:40 AM
Eh, I just posted a minimal case in my answer. That should still get the point across.
@Ell I still half feel like changing my C++ str =~ (s/"abc"/"def"/g); thing to str/"abc"/"def"/g; for fun.
 
Ell
Hmm. Beans on toast for breakfast I think
me too much effort
 
Uughh... non-phantom headstorm..
..and I have to select/order a soddin' W8 something. Not gonna be a good day.
Oh - Telkitty is trying to die from food poisoning and Ell is learning Perl. Not sure who has the worst day, so far.
 
Mine will take a turn for the worse at like 7.
am, I mean.
That's when I get tired now, and really tired at that. I need to reverse that in the next two weeks.
 
@chris That's some oddly specific timing you have for tiredness. For me I seem to get tired at totally unpredictable times.
 
@Insilico It's been working its way forward over the past few weeks.
I'm not too worried about getting back to sleeping during the night, though, since I managed to do this over the span of a weekend a few times last year.
 
Xeo
10:01 AM
Just stay awake until evening even if you're tired, and go to sleep then
like, from 7-8pm till the next day 10am or so
Always works for me
 
@Xeo Yeah, I'll probably just end up doing that when it comes close to school.
I wonder what I'll do then.
If I devote time to working first before getting distracted by the internet, I'll just feel more pushed to stay up later and catch up >.>
 
10:16 AM
Speak of the devil.
I got a seg fault
so I used gdb and my integer addition is giving a seg fault
I didn't know it was possible
 
@Rapptz Signed integer overflow!
 
it's unsigned
 
Xeo
@Rapptz lol
Sure it's not some UB?
 
Yeah
This is the code causing a seg fault
struct carry {
        Digits& c;
        carry(Digits& a): c(a) {}

        Digits operator()(Digits n) {
            n += c;
            c = n / base;
            n %= base;

            return n;
        }
    };
n += c apparently
 
@Rapptz Maybe the Digit c is referring to has ceased to exist for some reason.
 
10:20 AM
A wild Lion appears...
 
@Insilico that'd be weird :(
 
@Rapptz Not as weird as getting a seg fault on integer addition.
 
user1804599
@TonyTheLion lol
 
user1804599
I'd just publish details about the vulnerability if they don't listen.
 
@Insilico I say weird because it's in the local scope, don't know why it'd fail to exist.
 
10:22 AM
@Rapptz Are you talking about the carry instance being in local scope, or the Digit instance c is referring to.
 
Digit instance c is referring to is in the local scope
You know, gdb's not really useful
 
@Rapptz So are you using it like this?
 
user1804599
C++ isn't either.
 
user1804599
It's your own fault.
 
Digit d;
carry c(d);
 
10:24 AM
@Insilico void f() { Digit d = 0; carry c(d); /* use carry */ } basically
 
I would look in how you've implemented Digit::operator+=. That might be the culprit, if that's indeed where the segfault is happening.
 
user1804599
Why do you have carry as a type anyway.
 
user1804599
Why not a function that takes two arguments. :v
 
@Insilico Digits is just a typedef for unsigned long long
So.. quite literally integer addition is giving me a seg fault.
 
WTH the seg fault makes even less sense.
 
10:27 AM
@TonyTheLion I watched the video. It looks like something my friend would find pretty easily if he tried.
 
Are you running on a debug or release build?
 
happens on both
 
@Rapptz And they both point to a seg fault on an integer addition?
 
yup.
 
@Rapptz Is your debug build optimized in any way?
 
10:29 AM
Well I did -O3 initially, then -O2 and then -O0 to see if that was it
 
Optimizations can confuse the hell out of you and/or the debugger.
 
@chris Your friend is like a haxor?
 
The last time I saw anything like this, the debugger and the compiler were working with different versions of the source and the error was not where I thought it was :(
 
@TonyTheLion We did pretty similar with the school (board), but he's more into the web stuff than I am.
 
oh right
@not-rightfold I wondered that too. It doesn't seem like something which should be a type.
 
10:31 AM
time for some good ol' print and comment debugging
 
And tbh, this really does remind me of some of the stuff we found there in how it's done.
 
gdb sucks
 
@TonyTheLion That reminds me of all the posts Raymond Chen writes about wrt security vulnerability reports
 
user1804599
Use LLDB.
 
@Insilico What does he write?
 
10:32 AM
Every time Microsoft receives one, they thoroughly investigate it, even if it sounds completely crazy or far-fetched
 
oh
I thought I'd heard MS rejecting obvious vulnerabilities that should be fixed, just as FB did in that post.
 
Do a search for "dubious security vulnerability" on the Old New Thing for examples.
@TonyTheLion I'm sure that has happened, but MS is a lot more thorough with them from what I'm seeing.
This one is probably one of my favorite dubious security vulnerability posts.
 
Ell
@rapptz what sucks about gdb?
 
Question should really be "what's good about gdb"
 
Ell
10:37 AM
I mean, what made you say it?
Its a debugger, that's good :D
 
it misled me
I was looking for my bug at the wrong place
:(
 
@Rapptz Debuggers are not a substitute for common sense, as you've probably found out. :-P
 
it made no sense for integer addition to be seg faulting so why did it tell me that
bastard..
 
Ell
The back trace?
 
everything pointed to it so I was really confused
 
10:40 AM
@Insilico Woah.
 
@Rapptz Nailed it :)
..sort of..
 
@Insilico Haha, I remember reading that.
 
You need a debugger, logger, common sense and, often, some luck too:)
 
Ell
Perl is weird man
 
10:56 AM
It's been many years since I last used Perl for some data analysis. Lets put it this way - if I write an autobiography, it's not gonna make it in.
Hey - what size laptop screen do you guys and gals think I should buy in order to get a keyboard that is actually useable for touch-typing in the 'normal' way? Could I get away with a 13-incher?
 
@MartinJames I'm of the opinion that touch-keyboards are utterly useless if you want to get anything useful done. :-P
If you're getting a laptop surely it comes with a physical keyboard, no?
 
@Insilico Heh - that's what I meant - the physical, mechanical keyboard for text entry. I do have an old Asus Eee 900 laptop that still works as well as it did new, ie. it's slow and the keyboard is not sensibly useable.
 
Ell
I think 13" is okay
 
@MartinJames Ah okay. lol
You can probably get away with 13", but then again every laptop I've owned thus far has been bigger than that.
 
Ell
13"Macbooks are okay
 
11:08 AM
Now I want an ultrabook that I can type on. It's gotta have W8, 8GB and other stuff, but there are choices and screen/keyboard sizes are one of them. I can get away with a not-massive screen, but I don't want another crappy, too-small keyboard.
No Macs by request :)
Looking at this:
http://www.ballicom.co.uk/vfyuh572m3701gb-fujitsu-lifebook-uh572--ultrabook--core-i7-3517u--19-ghz--windows-7-pro-64bit--8-gb-ram--128-gb-ssd--133-wide-1366-x-768--hd--intel-hd-graphics-4000--black-silver.p899112.html
 
1
Q: In Win32, what does the size member (cb) name actually mean?

Tony The LionIn quite a few Win32 structures you have to give the size of the structure to one of its members, in quite a few cases, the member that stores this is called cb or prefixed with this. DISPLAY_DEVICE has a cb member for size. It's also used in names of certain types of messages, such as CB_GETC...

In retrospect, not sure if it was a dumb question or a smart one...
 
@TonyTheLion The Windows API was conceived of in the 1980s (i.e. it's wonky as hell), so I wouldn't say it's a dumb question.
 
At least cb is more useful than, say, lpfn.
 
Why does Win API even require you to set that field to sizeof of the struct? I never understood that.
 
@Tuntuni Version detection.
 
11:14 AM
@chris I could figure out what lpfn means easier than cb.
 
@Tuntuni It's Windows, so even the structs bloat out over time.
 
@chris o.O, why can't they do it themselves?
 
@Tuntuni Hold on, I know there's an SO question.
 
@Tuntuni How would they know what version you're trying to use?
 
5
Q: Why do structures need to be told how big they are?

GameTrainersWTFI've noticed that in c/c++ a lot of Win32 API structs need to be told how big they are. i.e someStruct.pbFormat = sizeof(SomeStruct) Why is this the case? Is it just for legacy reasons? Also any idea what "pb" stands for too? EDIT: oops, yeah I meant "cbFormat"

 
11:15 AM
@TonyTheLion sizeof(what_i_passed_in)?
 
@Tuntuni The API has no clue which version of app is calling in, and so what it expects.
 
OIC
 
@Tuntuni Not in API, no.
 
Right, thanks.
 
Anyways, that was interesting.
 
11:21 AM
my whole body aches ... sleeping on rocky floor rocks ... at making your whole body aches
 
@Telkitty猫咪咪 Ow - I know what that feels like. There is no ditch between my house and the club that is not lined with annoying-size pebbles.
 
> [Your money has been refunded. In the future, you can ignore "airtight hatchway" articles. -Raymond]
lol
 
OK, so it's going to be this:
http://www.ebuyer.com/468710-fujitsu-lifebook-uh572-laptop-vfy-uh572m3701gb
I wonder if it has any spare space for a spinner as well as the main SSD?
 
I don't know what injustice you did to get that to compile. — chris 2 mins ago
 
@MartinJames yeah, it was awesome - my new 'fancy' tent requires 15 pegs to be nailed into the rocks. So I used a rock to try to press the pegs in. The 'tool' I used broke, hit my hand, and blood was everywhere, the iron pegs were bent from excessive force. But nope, only one peg went in deep.
 
11:33 AM
@Telkitty猫咪咪 Even more 'OW!' :((
 
I am so clumsy :'(
and it was a windy night by the lake
so I could not just leave it unpegged :(
 
11:55 AM
I have to go out, but for now, have some lyrics:

Little boxes on the hillside,
Little boxes made of ticky tacky,
Little boxes, little boxes,
Little boxes all the same.
There's a green one and a pink one
And a blue one and a yellow one,
And they're all made out of ticky tacky
And they all look just the same.

And the people in the houses
All start working at Microsoft,
And they all get put in boxes,
Little boxes all the same.
And there's coders and there's testers,
Building apps and executives,
 

« first day (1037 days earlier)      last day (3911 days later) »