« first day (752 days earlier)      last day (4195 days later) » 

Ell
1:00 AM
anyone have bday gift advice for girls?
 
@Zoidberg'-- I changed a few minor lines of code all in a function that's not being executed.
 
user142019
Unless you use a terrible version control system, i.e. one that is neither Git nor Mercurial.
 
@MooingDuck and do a full rebuild. Don't trust the compiler: delete all object and intermediate files
@MooingDuck Right. You're trying to deny reality again? :)
@Zoidberg'-- or darcs or bazaar or monotone or...
 
@Ell diapers and formula are kind of expensive
 
user142019
@Ell money, two cinema tickets, chocolate.
 
1:02 AM
@sehe that's a little tricky with Java, but I think I can figure it out
 
user142019
Of course, you keep one of the cinema tickets yourself.
 
user142019
@sehe I don’t see any in that list that are Git or Mercurial.
 
@Ell don't give a mop. Turns out that's bad.
 
@Ell sauna, beauty/welness centre, all seasons of fav TV series, oh wait. You're not a girl
 
user142019
Give her a lick. She tastes like raisins.
 
1:05 AM
@Zoidberg'-- he's like 16, I don't think that's the greatest advice
 
user142019
@MooingDuck I have many friends who are 16 who “give fucks”.
 
Who gives a fuck
 
@Zoidberg'-- well sure, I'm just saying that it might not be good advice.
 
user142019
And I know one slut who takes many fucks, but yeah. I don’t talk to her anymore.
 
hmm, my wife packed halloween candy in my lunch, I have to remember where I left that...
 
user142019
1:07 AM
@MooingDuck I don’t see why. They say it feels good.
 
@Zoidberg'-- so does not going to work. I know lots of people who do that too
 
@Zoidberg'-- No need to talk anyways :)
@MooingDuck wut
 
user142019
Man.
 
It's one of those nights.
 
@sehe I rarely make sense, ignore me
 
1:09 AM
The only thing missing is a Cicada
A prime candidate! We have a winner!
 
user142019
 
noooobs
 
user142019
noooob
 
I came up with a new way to store codepoints so that you can random access into UTF-8 and replace codepoints in O(1) time, regardless of the length of the codepoint.
it's kinda like std::deque but better.
 
user142019
std::unordered_map<int /* index */, codepoint>
 
1:15 AM
naw
then each codepoint has to be UTF-32, effectively.
 
user142019
Polymorphism!
 
haha
 
user142019
Do it the Java way. class AbstractCodePoint; class CodePoint : public AbstractCodePoint;
 
but unlike you, I can amortize my allocation and indirection overheads over an arbitrary number of codepoints
whereas you have to pay O(n) allocation
anyway
 
@sehe coworker walked up, switched the target from Java5 to Java6, and everything works perfectly. I can't imagine why I would have touched that setting.
 
1:18 AM
I just wanted to share this revelation with all of you
 
user142019
Write a blag!
 
yep
 
@MooingDuck :)
 
user142019
Use Clojure or Scala.
 
user142019
HEY GUYS
 
user142019
1:20 AM
I am going to “sleep”.
 
user142019
Später.
 
@Zoidberg'-- /daknok <-- not on my desktop... sadly won't work :(
 
Great, someone's serially downvoting me.
So far just my top three answers.
 
@chris harmless. will be reverted by heuristics script
 
@sehe, Hopefully. It's only 6 rep anyhow (and another vote away from a good answer badge), and only 3 downvotes.
 
1:24 AM
Hi, I get this error: app(3824) malloc: *** mmap(size=140735386578944) failed (error code=12) what does the number 3824 and the 140735386578944 means?
 
Guessing 3824 is pid.
 
oh 3 is not serial I think. I've had a string of ~3 a looooong time ago and it never reverted. But I didn't really sweat it either
@Jeffrey 3824 = pid, the large number is the number of bytes in mmapped pages... that's a lot
derp. my wifi is acting up on my laptop
 
Thanks, and it's referring to a std::map dynamic allocation misuse?
 
Nope
@Jeffrey It's referring to memory mapped pages. Think memory mapped files (or loaded modules if you don't map files actively)
 
My wifi's been terrible for the past few weeks.
 
1:28 AM
So generically speaking, what is it caused by?
 
@Jeffrey mapping files into memory...
 
@Jeffrey process # 3824 is trying to map 127 terabytes of files into memory.
 
see mmap and mmap
In computing, mmap(2) is a POSIX-compliant Unix system call that maps files or devices into memory. It is a method of memory-mapped file I/O. It naturally implements demand paging, because initially file contents are not entirely read from disk and do not use physical RAM at all. The actual reads from disk are performed in "lazy" manner, after a specific location is accessed. After the memory is not to be used, it is important to munmap(2) the pointers to it. Protection information can be managed using mprotect(2) and special treatment can be enforced using madvise(2). In Linux, Mac OS X ...
 
which is the equivalent to what in my source code?
 
@Jeffrey the mmap function call, or anything that allocates memory.
 
1:32 AM
@Jeffrey mmap
 
@Jeffrey in your source code? You allocated -1 bytes somewhere. Also your hardware truncates pointer addresses to 48 bits fyi.
 
@Jeffrey Really. If you don't know what calls it, just run it in a debugger/strace/ptrace/ltrace and break on/log calls to mmap?!
 
@sehe operator new can be backed by mmap, which means there might not be an explicit mmap call.
 
@MooingDuck how would the hardware do that :) You might mean "your library implementation" :)
 
@sehe stackoverflow.com/a/7190827/845092 " the current AMD64 architecture is just defined to have 48bit of virtual address space"
 
1:34 AM
@MooingDuck doesn't matter. it is a call to mmap, that is a fact. And you can trace it by those methods. And I do suggest this only if he doesn't "know what calls it". Clear story
 
wow SFML has a terrible setup tutorial for visual studio
 
@MooingDuck so, you are seeing that the library is 'clipping' the address domain, not the hardware since the hardware doesn't actually alter the pointer value. But I'm splitting hairs
 
@Dave You don't know how to use your IDE?
It's linked like every other library out there.
 
@sehe I don't know what or how the hardware works, so I'll take your word on it
 
@Dave sounds about fair :)
 
1:36 AM
i followed it to the letter
still failed with errors
 
I might be able to help you.
 
time for google. then for Stack Overflow
 
@sehe is that something the gdb debugger can do? Because I don't know how to do that with MSVC.
 
eh... So even though I passed my qual. There's a good chance that I'm probably gonna leave voluntarily.
 
if you know the cause of this error:

error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
 
1:37 AM
The conditions that they gave me is pretty ridiculous...
 
i might be able to solve my mistake then
 
@MooingDuck Both can. On windows WinDBG would be a bit more lightweight. Or even just OllyDBG
 
lol that isn't SFML's fault.
Did you forget WinMain or main?
 
@Mysticial That's one way of putting it. Sick bastard :)
 
hense i said "my mistake"
 
1:38 AM
@Dave Erm....
 
@Dave your project is set to the "Windows" subsystem rather than the "console" subsystem.
 
@sehe I'm required to get an A- or higher in 3 hard classes.
 
i copy pasted their exact demo code =/
 
I've always been bad with grades.
 
@Mysticial ...
 
1:38 AM
I don't wanna be in a situation where I get less than A- 2 years down the road.
 
Chances are you're using a windows project rather than a console/empty project. Change the subsystem like MooingDuck said.
 
their page says windows 32 platform =/
 
So if I'm gonna leave, I wanna leave now.
No point in wasting any more time in this corn field if I'm not gonna get anything out of it.
 
@Dave yes, "console" applications will run on the "windows 32 platform".
 
The girls here also suck compared to the ones back home.
 
1:39 AM
ill do it again then im almost positive i did empty project
 
1 min ago, by Mooing Duck
@Dave your project is set to the "Windows" subsystem rather than the "console" subsystem.
 
so win32 console application i should choose in the IDE
 
@Mysticial ... I'm speechless
 
Wait, SFML? I'd expect that to not be a console project.
 
thats what i thought
 
1:41 AM
@Dave Empty project is right. Right click your project->Configuration Properties->Linker->System->SubSystem->"Console". Also make sure you have int main() in your code somewhere.
 
muhahahaha VS pownage right there
 
@chris It's how you get it to print values, to the console.
You can hide the console though if you don't want it.
 
Console (/SUBSYSTEM:CONSOLE)
 
/SUBSYSTEM:CONSOLE
 
looks like that field was blank in my project - strange
ill go try now :) thanks guys
 
1:43 AM
@Dave blank is "try to guess". Probably means you forgot int main()
 
But SFML does graphics etc, doesn't it?
 
let's hope so
 
@chris yes
 
I'd expect things built using it to mainly be based on the GUI, not the console
 
How else would you debug without a console?
 
1:45 AM
@Rapptz, I don't know, OutputDebugString? :p
 
@chris as far as we care, standard C++ = console subsystem. To have a "window" subsystem, the entry point would have to be wWinMain instead of main
 
With DbgView.exe from sysinternals. Oodles of sense. Not
 
@Rapptz don't need a console to debug
 
god damn still error'd
 
@Dave put your code in ideone.com and give us a link
 
1:47 AM
Also what version of SFML so I can try and compile it.
 
@Dave because now my best guess is your code isn't complete/valid.
 
version is 1.6 and will copy code now
 
Can't help. :(
 
darn, nuwen doesn't come with SFML.
 
1:49 AM
I'd say to switch to SFML 2 but there are no tutorials for it.
 
@Dave what the, that looks perfectly valid to me
 
this was the tutorial i was using : sfml-dev.org/tutorials/1.6/start-vc.php
 
@MooingDuck, (on Mac OS X) I tried to use the mythical "Instrument" but it doesn't show anything at all. Runs the program in about 0.1 sec and then stop, showing no problems. And I can't use the command line tool leaks because I don't have enough time to create the process and run leaks before the process is aborted...
 
0
Q: SFML linker error: unresolved external symbol _WinMain@16, Visual Studio 2012

monkeyI was able to get tutorial #1 to compile fine. But I can't get the 2nd one to compile. When you do new -> Project, maybe one of those settings are interfering? Pretty sure I did empty project, else console. What's wrong? compile error: Error 1 error LNK2019: unresolved external symbol _Win...

 
night all
 
1:51 AM
night
 
adios
 
i tried the suggested /SUBSYSTEM:CONSOLE didnt change any thing
my only guess is some link is not correct
 
Oh yeah, I forgot MSVS makes you use WinMain with a Windows Subsystem. I'm used to continuing to use main on CodeBlocks when I do that.
 
Yeah I had to recompile SFML 2 to get it to work with GCC 4.7
 
Sounds like you need to set it to /SUBSYSTEM:WINDOWS
on MSCV
 
1:55 AM
no
 
Considering a to be std::map<std::string, myobject*> can I do a["string"] = new myobject(param1, param2);?
 
dat new
 
@Jeffrey, Looks good minus the new.
Use a smart pointer.
If you really need the pointer.
 
Yeah why are you using a pointer anyway?
 
strange the error has changed to sfml-system.dll is missing
 
1:56 AM
@Dave That's good.
 
@Dave, When you run it?
 
yeh
 
That just means you need to add the DLLs to the path where the EXE is.
 
ohh
course !
silly me :P
 
@Rapptz, because then I have to return the object calling myobject* afunction(std::string key); which can also return 0 (no object found in map)
 
1:58 AM
that doesn't look like it needs a pointer
 
boost::optional<myclass>
 
^
 
@Rapptz, how would you do it?
 
wayyy its working
even tho its in a console window :(
 
I really need to start using boost more often. I use too much C++11. I'm going to suck when I'm forced to use C++03.
 
1:59 AM
I don't use boost either.
I try my best to minimize boost usage
 
@Dave, It should work with a Windows subsystem and WinMain, or you should be able to use FreeConsole on Windows.
Boost is really common, though, and has uses even in C++11.
 
any one know a site full of good sfml tutorials other than the sfml website?
 
@Rapptz, return by reference?
 
@Rapptz Why?
 
In code blocks it's pretty easy to remove the console window.
 
2:00 AM
Lexical cast is better than anything we have in C++11.
 
@Borgleader I don't know, it feels like a big hammer for a small problem.
 
@Rapptz, I agree, but I hate using projects.
 
@Rapptz Well there are really neat things in there, like pheonix (and I've only barely scratched the surface of that part)
 
I've never used boost phoenix
 
I make so many small, one file things, but I always have the console flash and disappear because I'm too lazy to make a project for it.
What can phoenix do that C++11 can't?
I'll need phoenix eventually anyway, though :p
Is there any learning material for boost other than references on one class only? Something the way a book on a programming language would be layed out?
 
2:04 AM
I posted an example here earlier. But you could do things like: std::copy_if(v.begin(), v.end(), arg1 % 2 == 0);
 
Beyond the C++ Standard Library, an Introduction to Boost - Björn Karlsson
It's pretty old though
 
I find it insanely amazing how Boost managed to do everything in C++03 and cross-platform.
Things like variadic templates didn't exist, so for boost::tuple, they manually set up (what was it, a recursive macro?) to make their tuple be capable of up to N elements.
 
@Dave, there are some good sfml tutorials on youtube (SFMLCoder or something) but it's hard to find good tutorial. The forum used to be pretty useful if you have any problem with their tutorial...
 
how new is SFML then ?
 
@Rapptz, I'll check it out, thanks. I can try to weed out the old things that have been updated/replaced, such as lambda.
 
2:08 AM
@chris 7 years old man. You sure?
 
@Rapptz, I've read most of Programming Windows :)
That one's invaluable in any year.
And there's a Windows 8 one now, too.
 
@chris What does Programming Windows cover?
 
It uses Boost 1.31
@Dave SFML is pretty self-explanatory, imo.
 
what do you mean
 
Tux
I have a question about something I'm trying to do in a DLL
 
2:10 AM
Well, I don't know about 1.6 because I've only used 2.0 but it's not that complex.
 
@Borgleader, the 1998 one, or Windows 8?
 
SFML 1.6 should have a lot of tutorials though compared to 2.0
 
@chris The recent one
 
@Borgleader, For starters, it's in C#, which I wouldn't mind, but I don't really feel like upgrading to Windows 8.
 
isn't 2.0 still under development
what does 2.0 have that 1.6 does not
 
2:11 AM
@Borgleader, You can find the ToC here: shop.oreilly.com/product/0790145369079.do
 
2.0 changes the way sprites, images, textures, rect classes and transformables are done.
 
@Tux, Feel free to ask, but if it's better suited for SO, it might not get proper responses.
 
So guys, what's wrong with "dat new"?
 
In fact, no question asked here is guaranteed to. You could be trolled just as easily.
@Jeffrey, Doing memory management yourself is a time bomb.
 
@rapptz so basically its better performance?
 
@chris The 5th edition is 1998 and the 6th is 2012 wtf...
 
@Borgleader Sounds like C++.
 
@Rapptz It's a book on Programming Windows, you'd think their would be more revisions than that...
 
@Borgleader, Yeah, but Petzold is a legend.
 
2:14 AM
@Dave It's the future version that will be developed and continued to be supported. It also uses camelCase rather than everything being CapitalLetters.
 
Tux
I'm working on a "game engine" for practice. This DLL needs to interface with one of the objects in the app to get object info like level, health, experience, etc. How do I get the DLL to receive object info from the app?
 
ah
ill convert to 2.0 then
seeing as i just started not much will need to be altered
 
The only major problem with it is that it lacks as much documentation and tutorials compared to v1.6
 
I'm kind of liking C#s naming conventions.
Typing in caps isn't much hassle with Intellisense.
 
Microsoft is known to have god awful long function names
 
2:16 AM
@Rapptz, Yeah, I hate it when I have to type those out and then realize I missed a captial or forgot a word.
 
2 days ago, by Cat Plus Plus
Also holy shit DatagramSocketMessageReceivedEventArgs it's so terrible
 
@Rapptz At least they clearly indicate what they do. I've been doing matlab lately and ffs I hate their naming convention. A function that does discrete laplacian on a matrix is called "del2".
 
Like I said, I do most winapi programming in C::B with no projects (meaning no external intellisense).
 
Yeah but there should be a limit to how fucking long your functions should be.. they push it a bit too much
 
Tux
I think they tried to make the API and their functions a bit too userfriendly
 
2:17 AM
@Rapptz Well with autocomplete I prefer longer than shorter but yes in some cases it's a bit retarded.
 
2
Q: Why is accumulate faster than a simple for cycle?

Let_Me_BeI was testing algorithms and run into this weird behavior, when std::accumulate is faster than a simple for cycle. Looking at the generated assembler I'm not much wiser :-) It seems that the for cycle is optimized into MMX instructions, while accumulate expands into a loop. This is the code. Th...

^^ Does this guy not know the correct term for a "loop"?
He just rolled back my edit.
 
@chris, @Rapptz, thanks. That was useful. So considering that I have to refer at that particular object instead of a copy I should use myobject& myfuct(std::string key); instead of myobject* myfuct(std::string key);?
 
is SO playing up for you guys
 
@Mysticial Apparently not, I'm guessing english isn't his strong suit (sp?).
 
the site is loading but without the CSS
 
2:18 AM
If you can use references instead of pointers, they're usually preferred.
 
Tux
Could anybody help me out with my question?
 
@Borgleader There's a difference between not knowing, and knowing wrong.
Usually when I correct someone's English, they keep it. (and learn from it) Here it got rolled back.
 
Oops, I didn't see you ask.
 
@chris, but then how can I return a "empty" or "none" value instead of the object if it's not found? I can't return NULL...
 
5 mins ago, by Tux
I'm working on a "game engine" for practice. This DLL needs to interface with one of the objects in the app to get object info like level, health, experience, etc. How do I get the DLL to receive object info from the app?
 
Tux
2:19 AM
It's okay.
 
So either I'm missing something really important. Or the OP really thinks a "loop" is called a "cycle".
 
@Jeffrey, That's right. If you allocate memory, you should use a smart pointer then.
If you don't allocate memory, a normal one is still fine. Smart pointers deallocate things for you, so if you don't allocate anything, they're not really meant for it.
 
@Jeffrey null is just 0
 
Tux
Or you could use nullptr if you want to get with C++11 specs
 
Not with nullptr :)
 
2:21 AM
besides, in C++11 you're recommended to use nullptr
I was getting there.
:(
 
Tux
Why is it recommended anyway?
 
@Rapptz What's nullptr? (char*)0?
 
@Borgleader, It has the type std::nullptr_t.
 
Tux
Its a pointer that points to 0
I think
 
68
Q: What exactly is nullptr?

AraKWe now have C++11 with many new features. An interesting and confusing one (at least for me) is the new nullptr. Well, no need anymore for the nasty macro NULL. int* x = nullptr; myclass* obj = nullptr; Still, I am not getting how nullptr works. For example, Wikipedia article says: C++11 ...

 
2:22 AM
@Rapptz, Thank you.
@Borgleader, It won't call the int version instead of, say, the char * version of a function.
 
I love SO. It's so easy to find information here, it's beautiful.
 
Tux
Chris, do you have any thoughts on my question?
 
@Tux Well obviously
@Rapptz Oh that is a beautiful addition. Some of those implicit conversion made nasty bugs.
 
@chris, I'm reading about smart pointers but I don't quite follow it. Is there a simple way to describe what's the difference between a normal pointer declaration an a smart pointer declaration=
 
@Tux, I haven't made too many DLLs. I'm not too good with them.
@Jeffrey, Normal: int *p = new int(5);
 
Tux
2:25 AM
It's just an interfacing thing. I put it into a DLL. I don't think it matters.
 
@Jeffrey Advantage of a smart pointer, it takes care of the memory management for you.
 
I'll assume unique_ptr
 
@Borgleader, yeah, I got that...
 
std::unique_ptr<int> p(new int(5));
Too bad we don't have make_unique yet.
The difference is when the smart pointer goes out of scope, it calls delete p_internal;
 
Tux
I just can't figure out how to get one object's attributes from the app to the DLL's function.
 
2:27 AM
(A name I made up for the pointer inside the class)
 
SO saves the day again.
 
@Tux, Maybe you could take it by pointer.
 
137
Q: What is a smart pointer and when should I use one?

Alex ReynoldsWhat is a smart pointer and when should I use one?

 
@chris, oh so unique_ptr is like a template class that deallocate the new int(5) pointer automatically when its destructor is called?
 
@Jeffrey, Yes.
 
Tux
2:27 AM
Yeah, I don't know how to do that.
 
@chris, oh ok, thank you very much
 
If you need to before then, p.reset(new int(6)); or p.release();
 
Tux
I know I can declare it in the method by name(Unit* derp);
 
And if you try to dereference it when it isn't holding anything, it throws.
 
Tux
But it still requires the DLL knowing about the object.
 
2:28 AM
@Tux, I think you'll need the same class definition somewhere in there, too.
 
@Rapptz SO saves the day, everyday.
 
I should go work on my project. I'm doing nothing atm, might as well.
 
Tux
I just wanted to get the DLL to have only things that work with data management, not game objects.
Would a template work?
 
@Rapptz So this is you right now? hugelol.org/i/7659.gif
 
Me everyday, all day.
I work then I come back home doing nothing all day. Boring lonely life.
 
2:30 AM
One-boxing gifs is frowned upon yes?
 
Yes. Unless they're small, I guess. Like a smiley face.
 
@Borgleader Small, non-animated ones are all right. Animated will be binned immediately, regardless of size.
 
@JerryCoffin Ah ok, well that one was animated and big xD
 
@Borgleader Feel free to post a link (with appropriate warning).
 
@chris, strange, I've included the <memory> header but unique_ptr seems not to be defined ...
 
2:35 AM
@JerryCoffin I've seen people one-box smiley faces (such as the cat) often.
 
@JerryCoffin Well it was that hugelol like I put earlier.
 
@Jeffrey, It's part of C++11.
 
@Rapptz Yup -- and depending on who's around when it happens, they often get binned (but unlike animated GIFs, not always).
 
C++03 has auto_ptr, which is better than nothing, but not too great sometimes. Boost has boost::shared_ptr as well.
Wow, nothing like playing Super Smash Bros Melee with a PS3 controller :)
 
@Borgleader I guess I missed that -- was away for a couple hours or so.
 
2:37 AM
@chris Why? The Gamecube Controller is superior
 
@Rapptz, Because one I can hook up to my laptop and the other I can't.
I have it all for the GC, but it's a lot better here.
 
@chris My kids have been playing Super Smash Bros Brawl on the Wii the last few days, but it doesn't really take advantage of the Wii controllers.
 
@JerryCoffin, True, it really doesn't.
 
I want my Wii U. It looks promising despite the awful commercials.
 
@Rapptz Just don't mention it when my kids might be looking over my shoulder!
 
2:47 AM
It's sold out everywhere anyway. Might be hard to get one lol
 
@Rapptz Minor details like its being impossible to get will not slow down the whining and begging from children their age.
 
It's not just sold out EB Games (Gamestop for 'merkins) has waiting lists for the damn thing
 
Yeah I'm glad I preordered mine early.. It was sold out the 2nd day the date was announced in most places.
 
This xmas I'll probably be buying a Wii (not U)
There are only a few very few games I want to play so I didn't want to pay much for the system
 
I'd pass.
Only games worth playing on the Wii were the first party games.
 
2:51 AM
Well I wanna play 1-2 Zeldas (not the anime looking one, windwaker was it?), Super Mario Galaxy (the first and possibly the second)
and maybe 1-2 others that I can't remember right now
 
Well the Wii U can play Wii games, that way you wouldn't have to buy it for the eventual good games that'll come to it.
Skyward Sword is one of my favourite Zelda games. I wish I knew where my Twilight Princess was. Super Smash Brothers Brawl is pretty good. Super Mario Galaxy 1/2 is good too.
 
Oh the Wii U is backwards compat?
 
Yeah.
 
Well fuck this then I'm gonna wait
 
Everyone says Wind Waker is a good game and I feel bad for not giving it a try due to the cel shaded thing.
 
2:57 AM
I still remember seeing the first ads for it and going "Wait, what? This is a Zelda game!?"
 
I kind of always wanted a gory Zelda game with blood and stuff. Don't know why, it would seem cool in HD.
 
Okay, I'm having way too good of a time using a PS3 controller for a Gamecube game.
I didn't think it was possible with existing stuff.
 

« first day (752 days earlier)      last day (4195 days later) »