« first day (662 days earlier)      last day (4292 days later) » 

12:03 AM
Lol
> These programs are written in C and use the native Windows APIs. I think of this approach as "classical" Windows programming. It is how we wrote programs for Windows 1.0 in 1985, and it remains a valid way of programming for Windows today.
 
@KianMayne That's how I wrote Windows 95 applications... straight C using WinAPI. Was rather fun.
 
I didn't write a single program in 1995.
I hope someone sets me up for a salmon loves you gag soon. That picture would go to waste
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
What is the WINAPI attribute?
 
12:22 AM
calling convention for the windows API
__stdcall
 
@Mysticial I wish it was that easy but it's a financial application =( and because I'm the developer responsible for the port I'm expected to catch any fringe cases in the event of an audit or lawsuit. Fun times. — soulesschild 3 mins ago
^^ This guy is porting a financial application that was originally using double?
Or am I missing something?
 
@LuchianGrigore OK, thanks
Eugh. What's wrong with this:
#include <windows.h>

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
     MessageBox(NULL, TEXT ("Hello, Windows 7!"), TEXT ("HelloMsg"), 0) ;
     return 0 ;
}
That's an example in a WinAPI book.
error LNK2028: unresolved token (0A00005B) "extern "C" int stdcall MessageBoxW(struct HWND *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBoxW@@$$J216YGHPAUHWND__@@PB_W1I@Z) referenced in function "extern "C" int __cdecl MessageBox(struct HWND__ *,wchar_t const *,wchar_t const *,unsigned int)" (?MessageBox@@$$J0YAHPAUHWND__@@PB_W1I@Z)
 
You do know chat != stackoverflow, right?
 
Yes yes, but this looks easily resolvable
 
I'm not helping unless I get some rep out of it.
@KianMayne Kidding - did you link against User32.lib?
 
12:28 AM
@LuchianGrigore repwhore :)
 
Where? Me? naaaah....
 
@Mysticial you just have to be very very careful.
 
@LuchianGrigore No, this was a completely blank project
 
No wait, double is... 17 digits of precision?
 
~16 or so - not that it matters much
 
12:29 AM
That's ~$1 trillion dollars with minimal error isn't it?
 
@KianMayne then add it to the extra dependencies in the linker project settings. Or, better yet, create the project as a MFC app or dll.
 
doesn't matter, I'm off for the night
 
@MooingDuck night
 
bb
crap
just crashed VS when setting a data breakpoint
@KianMayne did that work?
 
@LuchianGrigore I haven't tried it yet, I'm setting CSS on this page to make it dark so my eyes don't die
I don't think that this looks too bad actually
I'll try adding the dependencies
@MooingDuck Your error margin would be $1000000000000.0000 >= error < $1000000000000.001
*true value
There doesn't seem to be a consensus as to whether to use stdafx.h
 
12:53 AM
Don't bother unless your build takes a long long time....
 
Thanks for the help, you're awesome
 
Hahaha
You posted right before my break
 
1:37 AM
evening
or morning
whichever is closer
 
@melak47 evening :)
 
anything interesting happen? :p
 
not really haha just finishing up work :)
and its been quiet in here for a bit :)
 
@melak47 It's night in Europe
 
I know. Germany here :p
 
1:50 AM
You don't sleep either?
 
sleep? I only just got up at 9
 
that's ambiguous :)
 
21:00
 
ah. night shifts?
 
nah. my sleep cycle just isn't 24 hour aligned :/
 
1:52 AM
wow. I thought mine was bad
 
closer to 36 hours
I'm on semester break though
 
2:36 AM
evening
 
3:18 AM
hey
 
4:07 AM
Evening
 
evening :)
 
How goes?
 
good :) bout to head to bed
 
cool, cool...
sigh finding new (or, really, old) problems with C++ here and there...
 
 
1 hour later…
5:24 AM
What does ₯ stand for? :) — FredOverflow 17 secs ago
> I have never used Java so I'm not going to hazard a guess as to what Java does. [Eric Lippert]
You've never used Java? You really should try it sometime; you learn so much about how not to design a programming language... — configurator Jun 23 '11 at 23:48
@configurator: We have two former Java language guys on the C# design team, so I think we've got that covered. :-) — Eric Lippert Jun 24 '11 at 1:50
lol
 
Hey the new function declaration syntax in c++, how does it work with constant member ufnctions?
 
auto mem_func(args) const -> int;
 
#define def auto   // now C++ functions look somewhat like Scala functions :)
 
5:42 AM
thank you you wonderful human beings
 
@DeadMG Can I also declare with new syntax and define with old syntax, just to confuse people? ;)
 
@FredOverflow I think so.
 
auto main() -> int;
int main()
{
    std::cout << "hello world\n";
}
@DeadMG yup, works
 
wow
 
Should we deprecate the old syntax and always use the new syntax? :)
 
5:46 AM
naw
 
#define def auto

def main() -> int;
Again, probably been doing to much Scala lately, but I think this looks very nice :)
 
I don't
 
auto main() -> int;
^ What does auto stand for?
 
Then you haven't been doing enough Scala lately!
@Nils In this case, it means "I will tell you the return type later, after the -> punctuator!" It's mainly useful for when the return type depends on the arguments.
 
I have no cause to do any Scala.
 
5:49 AM
@FredOverflow I thought -> int indicates the return type..
 
maybe when I finish my current project in C++
@Nils It does. That's "later".
 
lol
makes lots of sense to me :D
 
for example
template<typename T1, typename T2> auto plus(T1&& lhs, T2&& rhs)
-> decltype(std::forward<T1>(t1) + std::forward<T2>(t2))
{ return std::forward<T1>(t1) + std::forward<T2>(t2); }
bit of a silly function, but hey
 
template<typename T, typename U> decltype(a*b) multiply(T a, U b);
// decltype doesn't work here, a and b are not in scope yet

template<typename T, typename U> auto multiply(T a, U b) -> decltype(a*b);
// yay, a and b are in scope :)
 
ah that was the limitation with the old syntax
What is the result of decltype(a*b) ?
 
5:53 AM
the type of the expression a * b.
 
Exactly. It isn't a limitation in D by the way, the first version just works there :) Theoretically it shouldn't, but Walter Bright thought that was stupid and overruled the compiler :)
 
that's what decltype does.
 
The branch prediction question, is that about a Java VM feature, or does it also work for C++ programs?
 
@FredOverflow Walter Bright is an idiot.
 
ah..
 
5:53 AM
@StackedCrooked The branch predictor is a CPU feature.
 
@DeadMG I have watched some talks and listened to several interviews with Walter Bright, and in my opinion, he is very bright. What makes you say he is an idiot?
 
for example
 
so the resulting type of the overload of * for a and b
 
@DeadMG Somebody capable of implementing a working C++ compiler can hardly be called an idiot.
2
 
"Oh hey, std::string vs std::wstring sucks. You know what the right solution to this problem is? another string class so we can have three instead of two!"
 
5:54 AM
@Nils In statically typed languages such as C++, every expression has a type. decltype(some_expression) just tells you that type. That's all there is to it.
@DeadMG Doesn't D simply use char arrays for strings? :)
 
@FredOverflow Also solid supporting evidence for my assertions.
also, hash maps built into the language? why the hell would you do that?
 
@DeadMG Arrays in D aren't half as braindead as they are in C++.
 
also, he added that Object bullshit
and gimped values
 
@DeadMG I agree with that, Object sucks.
 
@FredOverflow It's still very bad. Another string type.
 
5:56 AM
@DeadMG because they're common enough that everyone was using them anyway?
 
@cHao So what? Putting them in the Standard library gives everyone access to them anyway.
 
@DeadMG I don't know, I mostly like the way D handles arrays and ranges and stuff.
 
Moooorning
 
So you basically always write auto on the left of the function name with the new declaration syntax?
 
@DeadMG What do you mean, another? There is just one string type in D, namely char arrays.
 
5:57 AM
@FredOverflow I seem to recall string, wstring and dstring.
 
@Nils By "you", do you mean FredOverflow or the general C++11 community?
 
besides
 
@DeadMG Oh, really? I wasn't aware of them. Maybe they are just typedefs for char arrays and stuff? Haven't done D in a while.
 
it's stuff like Object, gimped values, and other such idiocies that are my main gripes.
 
What is a gimped value?
 
5:58 AM
well
basically, he doesn't like the copy-o-matic situation of C++ when dealing with values, but also can't stand the idea of rvalue references
 
@FredOverflow Is there a case where it does not make sense to write auto?
 
so instead he just prevented many useful optimizations for value types.
a D linked list can never be as efficient as a C++ linked list, and the same is true for many node-based containers, and strings, just for example.
 
@Nils Well, the new syntax will always work, but most people are just too familiar with the old syntax I suppose. Which is fine. In practice, I never use the new syntax. At least not yet :)
 
not to mention that value types cannot make use of inheritance
 
@DeadMG Well, D has a postblit constructor or whatever it's called. But I know you like move semantics better :)
 
6:00 AM
@FredOverflow More relevantly, a postblit constructor cannot perform the same functionality.
 
@DeadMG Nobody uses linked lists anyways, so...
 
@FredOverflow There are many other examples. Strings, binary trees, etc.
 
@FredOverflow Isn't std::string also a char array?
 
@StackedCrooked A std::string is a class that manages a dynamic char array, but in D, it's really simply a typedef.
 
Actually perhaps basic_string<T> is more convenient than vector<T> for runtime arrays since you can use operator+ for concatenation. :P
 
6:02 AM
@DeadMG Doesn't D have immutable strings? I like those better than mutable strings, by the way :)
 
@FredOverflow No idea.
but there's no reason to write the language so that efficient mutable strings are impossible.
 
@StackedCrooked You can concatenate char arrays with + just fine in D, I believe.
 
@DeadMG linked lists are not as efficient as arrays on modern hardware anyways
 
does D even support move-only types?
I don't know how I could live without unique_ptr.
 
I have no idea. Must. Read. Alexandrescu. Again. Soon.
 
6:03 AM
anyways
 
Never encountered the move concept in any other language.
 
@DeadMG D has Garbage Collection ;) prepares for long GC vs. RAII debate
 
I find it hard to believe that any sane competent person would produce such an abomination as Object.
@FredOverflow D has both, actually. But GC is not an RAII substitute. Although, the last time I spoke to Walter Bright, he didn't quite seem to grok this.
 
You spoke to him? Personally? cool.
 
GC is awesome.
 
6:05 AM
...says the Guy with the Python logo :) welcome
 
I never used D. Does it have a useful modular system, what about compile time?
 
@FredOverflow Nah. On Programmers.
 
@Nils D has modules, but I don't know the details, especially with regards to templates.
 
anyways
the real work ahead of me is finding out why my sha-2 solver is so fucking broken.
 
Languages that have no modules are chanceless.
 
6:07 AM
I'm not saying one is better than the other, I just find it interesting that C++ and D differ so much in so many respects. A fresh perspective is always inspiring for me.
@RadekSlupik C++ has done pretty well in the real world without modules, so I wouldn't call it chanceless :)
@DeadMG Have you tried implementing it in D? ;)
 
@FredOverflow If only it was expressable in some way other than "Walter Bright notices that C++ has problems, utterly fails to address them in every possible respect, and then makes things even worse".
 
You will always be a C++ fanboy, won't you :) At least until Wide has a working compiler :)
 
I have nothing particularly in favour of C++
much of it's early design, and virtually everything it took from C, is broken beyond repair.
 
but not impossible to live with
 
it's simply that I find that most of the alternatives have much worse problems
 
6:09 AM
Wide++
 
I mean
if I didn't code C++, what would I code?
 
@DeadMG I think that pretty much sums up the experience of most C++ developers.
 
GC-only Object-inheriting shitty-generics Java and C#?
 
Haskell and Python
 
Python's too slow.
 
6:10 AM
Does Haskell have something like RAII? lol srsly dunno
 
and as far as I can tell, Haskell simply doesn't include the object-orientation support I'm looking for.
 
@Fred it has GC and monads.
 
in Haskell, Jul 22 at 21:18, by Cat Plus Plus
Languages don't have performance, silly.
@DeadMG Can't you just write your own OO monad or something? ;)
 
not to mention that it has some extremely irritating problems of it's own, like that "Everything with a capital letter is a type" bullshit and the weeiird syntax
 
6:11 AM
Haskell without GC is fucking difficult to implement because of the type system.
 
@DeadMG I like both of these points, actually :)
@RadekSlupik CPython performs reasonably well, doesn't it?
 
@FredOverflow That's not really true.
 
@DeadMG Tell it to the cat.
 
next time he's around, I will.
 
Wait, you didn't mention Python's indentation instead of braces. Aren't you irritated by that as well? ;)
 
6:13 AM
there's no way I could possibly coax any Python implementation into running fast enough for my needs. Not to mention that the libraries I look to use don't have obvious Python (or Haskell) equivalents.
@FredOverflow I don't like that either, but it's not a deal-breaker for me
 
Can't you use practically every C library with Python and Haskell?
 
because I totally use C libraries for everything.
 
:)
Anyway, I can already envision your tombstone: Here lies Dead MG, inventor of Wide, cracker of SHA-2, hater of GC.
 
I wonder why CPython doesn't use JIT-compilation.
PyPy does.
 
because Python's the sort of language that won't really benefit from it.
 
6:17 AM
Hmmm... double pie...
 
But PyPy is written in Python.
Or well, a statically typed dialect, RPython.
 
10 hours ago, by FredOverflow
user image
My books just shipped, yay!
 
congratulations, you killed a bunch of trees.
 
@FredOverflow what books?
 
RPython compiles directly to C ahead-of-time.
@jozefg those with letters.
 
dude
please don't spam up the chat
 
@DeadMG Trees grow back, and they don't have feelings.
@DeadMG right, sorry
 
Can I increase the size of the call stack in visual studio?
 
yes
 
how?
 
6:28 AM
there's a setting for it in the project properties
linker section
 
/STACK:reserve?
that's not what I want, I want to see a larger stack trace when a breakpoint is hit
 
oh
doesn't it show the complete call stack?
I've never seen it not go all the way down to main(), for primary thread
 
well it shows a call stack, but crash happend before
also msdn says /STACK only has an effect for exe files
 
I'm not even sure what your problem is.
 
@DeadMG Welcome to Stack Overflow :)
 
6:36 AM
it doesn't seem to go down to main()
 
@Nils Are you sure you're on the primary thread?
 
No, how can I switch it in VS 2008?
 
there should be a debugging control on the top toolbar as part of the debug toolbar that allows you to see the stacks of each thread.
 
yeah I am in the main thread
well it is a dll loaded from another windows app
 
what is the lowest function on the stack?
you could be looking at DLLmain or something like that
or if it's loaded from another windows app, then maybe that app called it through GetProcAddress or somesuch
 
6:47 AM
maybe I don't know..
QtCored4.dll!qt_internal_proc
is the latest useful call I find
not the entry point in my dll
Maybe it is also qt related, not sure..
 
sounds like a thread launching function
 
yeah
 
what kind of naming conventions do you guys use? camelCase? CapitalCamelCase? underscore_case?
 
And also the case of the crash was simply me dereferencing a dagling pointer, but I do not understand why it is not able to display a correct stack trace. Sysinternals procexp also shows the same problem.
 
7:05 AM
@melak47 depends on the programming language
 
@melak47 Underscore/lower case when/if possible.
 
7:23 AM
@FredOverflow C++, obviously :)
although, you guys talk about haskell often enough, so I suppose I should have clarified that :p
 
mawning fellas
 
hi
wait, I thought the Polizei saved that squirrel, why are we mourning
 
well, this says everything really :P
it died shortly after it was "saved"
 
aw.
 
so that is why we are mourning in sadness for the loss of the life of Mr. Squirrel
 
7:28 AM
@rubenvb well, not really. Take submarines in deep water, the sub it self is under extreme pressure from the water, the air inside is kept at a low pressure as to not hurt the squishy humans
@rubenvb temperature is funny thing to define as well, considering it is basically just movement :P
@R.MartinhoFernandes stupid words :(
@sbi maybe, perhaps a more fitting word would have been 'surprisingly'
morning all :D
 
hi
Scumbag Cicada Meme I didn't know she had a meme named after here, or is it the other way around?
4
 
@TonyTheLion oh you know that's getting some stars :P
well, that squirrel story is quite the read
when's the movie coming out
 
not sure about the movie
 
@TonyTheLion I don't really know many douchebags. I must be lucky :)
 
You are lucky :)
 
7:42 AM
I knew one but haven't seen him in the last few years. So that's good.
 
@StackedCrooked Lucky -- or maybe just schizoid.
 
Maybe now I'll meet him again soon because I mentioned him. Like a subconscious thing..
 
this ^ LOL
 
Sorry for interleaving your post :p
 
7:43 AM
@StackedCrooked It's chat. Interleave happens.
 
It feels like a car accident that can't be prevented.
 
what.
 
@JerryCoffin What about "Hot C++ dudes" then?
 
@StackedCrooked What are the chances of developing great musculature if you spend enough time at the computer to do C++ at all well? Of course I'm in shape. "Round" is a shape, isn't it?"
 
7:49 AM
I sometimes get a fever. Does that mean I'm hot?
@JerryCoffin So you're a well-rounded C++ developer? Cool enough :)
 
@StackedCrooked A fever makes you feel cold, so I doubt it counts. If you ever go someplace that's ungodly hot (e.g., the Philippines) a fever can make it much more comfortable for a while though.
 
Good, now I know where to go next time I have a fever :P
 
Well, almost 2AM here. I probably better go get some rest. Later all.
 
later
 
Later
morning Cat
 
8:01 AM
I saw a cat in the morning, I guess it was a morning cat.
 
lol
but you didn't see an Incremented Cat I'm sure?
 
I saw cat producing offspring. But I guess that doesn't count.
 
I'm looking for a new job.. assuming you could choose because a Rails web dev job and a C++ engineering software job, what would you choose?
guess people in this room are biased towards C++ but still..
@TonyTheLion If you are the big boss of some company chances that this happens are against you :)
(referring to the pict u posted)
 
ah, VS2012 is out on the 15th
@Nils depends on the jobs, obviously, but in general I'd by far prefer the C++ one
Web dev is such a pain in the ass
even if Rails is a better framework than most
 
@Nils I think Rails is cool, but while working in a Rails shop you will probably only do some dumb webdev.
 
8:15 AM
Well I spent a day at that team, they setup up everything well thought, they have a high test coverage and a good design
Also they seem to have made the right tech choices, for example they use haml for views.
yeah web dev tends to be simple, unless you are doing design work
On the other hand I like to work with designers.
especially if they are female and good looking :P
 
IMO one website is much like any other. Where's the technical challenge? Where's the fun? You can only implement so many shopping carts and blogs before you start to see a certain repetitive pattern
unless the company is working on something really unique, of course
 
You're not going to date your coworkers, are you ?
 
@kbok of course not
On the other hand if I were single, why not?
@jalf Agree, but I like Ruby a lot :)
 
Yeah but IMO you also need to like what is being done with the language. Do they actually make anything that's interesting to work on? Or is it just that they use technologies that are interesting to work with?
Anyway, if you think it seems promising, go for it
in the worst case, you can always quit and look for a different job later. There's nothing to lose in that sense :)
 
Well I tend to choose the C++ job.
I guess it is more challanging and better for my carrer, also there seem to be a lot of very smart people working there.
 
8:25 AM
hi @jalf
 
hi
 
what's new?
 
I finally got my korean 27" IPS screen to work with linux! damn you, nvidia
 

« first day (662 days earlier)      last day (4292 days later) »