« first day (818 days earlier)      last day (4144 days later) » 

12:00 AM
room topic changed to Lounge<C++>: Where we ping ourselves out of boredom... [c++] [c++11] [c++-faq]
 
Good naiteeee
 
Sleep();
 
@GigaBass Ah, so you're the one who looks like me. :)
 
(it was a hello)
Tsk tsk, nothing alike, just similar fire >_>
 
Haha, funny to see your avs next to eachother. I actually I was going to sleep but... Did I mention iPad is a devils thingy?
 
12:05 AM
Oh barket wtf I saw 2 days ago you work at Intel
Wow, lol
And I was meaning to ask if the games you supposedly did on your free time are anywhere to try, was curious about it
 
Did you mispell my name agaim or was it someone else? :)
 
Shit lol, don't ask why >_>
 
Hm, OpenMOBA is probably in best shape to look at right now
 
do you have a "portfolio" somewhere? of games? xD
 
Sadly enough, rest of the games were more or less spectacular failures. In terms of completeness, because i still learned a lot on them.
 
12:09 AM
Those are the most fun to watch :>
I'll likely never complete anything either hehe
 
So, I don't have a portfolio apart from github right now. I have some funky stuff I worked on on my HDD, but one of the nicest ones actually got deleted when i switched workstations
 
lawl, sounds painful
 
Hey, it's the attitude that matters. As I said, I'm not sad now that they didnt come out. And actually, the loss of files didnt hurt that much earloer, since i know that i would be able to write it better next time
Though i backup important code in the cloud now :P
 
hehe
Well if you want a beta tester sometime I'm all for trying out your stuff
(chatroom sure is quiet today)
 
Folks from europe went to sleep
 
12:13 AM
<----- Europe
Just got home
 
:)
You didnt actually mention what you are working at
 
Well I'm gonna get in my hulk pijamas and spend the next 3 hours looking at code without actually doing nothing, brb
Eh, nothing that can compare to what anyone does here LOL
But, pijamas first, brb
 
Ell
Hi guise
 
..
OH MY GOD
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
I'm trying it.
I'm trying ti right now.
 
are you running linux
 
12:18 AM
No I'll adapt it to windows
 
Thats also old
 
shut up Bartek, no one cares >:(
 
@gigabass i dont have a compare operator defined for that
@rapptz okay, sorry. It just looks like someone opened the dusty usenet archive today
 
I'm back
 
@ThePhD Sigh. How many times will one need to explain this.
 
12:22 AM
I'm so bad I can't even understand the joke you said because I have no idea what a compare operator definition is
 
rm -rf / does nothing unless your system is old as heck (and in that case... you don't lose much hehe).
 
rm ~ would be funnier
 
 
@R.MartinhoFernandes three times obviously
 
12:26 AM
@gigabass only numbers (and pointers, which are numbers) can be sanely compared in C++ using < sign. For your objects you can overload it to make it work as intended. I just meant to say that in my opinion every project can have something nice about it.
 
I still need to fix that locale thing.
 
I know what you meant, BARKtek
 
You got it wrong again. Just saying.
@BartekBanachewicz Unless it is PHP, right?
 
In my opinion, being humble's a good thing to have and all, but better than that is knowing to evaluate yourself well...
 
I dont even dare to compare anything in PHP. A > B > C > A nearly make my brain hang.
 
12:29 AM
Dare to compare. Good one.
 
I guess I'm better off with changing my name to Bart here, though i dont know if its a direct translation
 
haha
 
Bartholomaeus. Me gusta.
And you still didnt tell me what are you working on @gigabass
 
Ehm, an attempt at replicating MegaMan X's gamestyle, with a few twists I have in my mind
 
12:34 AM
MMX <3
 
@BartekBanachewicz Strings.
 
I love MMX. That fast-spaced dodge-n-shoot type of thing. Dam.
 
also, it is not especially safe or sane to compare most pointers with <.
 
I just listened to the MMX OST like two days ago haha
 
12:35 AM
std::string has its operator explicitly overloaded anyway
 
MMX3 Zero's Theme <3 Last week I crawled the ENTIRE WEB trying to get MMX3's PC Version... couldn't find... the sound remixes were so much better.
 
So its a platformer? What technology are you using?
 
Unfortunately was not a fan of anything from MMX5 onward
 
Same Marcus!
Bartek, technology? loooool, using SDL for input, drawing? Just that. I only have a simple x,y coord image loader thing.
 
SDL with OpenGL?
 
12:39 AM
I tried to go abit into OpenGL, but I essentially got told that it was overkill for a simple 2D platformer, and returned to just SDL's blit
 
I think its easier to learn opengl in 2D rather in 3D, though. But sure, whatever works. You dont need unreal engine for a platformer
 
Yeah I'd have kept trying OpenGL, but I took SO LONG just to get the f basic openGL working, I got sick of it. When I finally managed to get gl3w working, I even did a question for me to answer myself on how to install it here @ SO
 
Anyway, i think its time i finally got some sleep. You can send me a link to your repo, if it is a public project, i am always eager too see work of others here.
 
(And couldn't have it show anything with the "recent" openGL: could only do the basic deprecated things with glBegin() and glEnd() as openers/enders... hope that made sense)
Ah I did get Tortoise HG* but it'll probably never go online. Thanks though, and go get your zz's
 
HG, you mean
 
12:44 AM
Yea, i know your pain. Go online if it is public! Good night :)
 
why helloooo friends!
 
Night :)
 
Is there any real difference between 3DS max and maya?
 
@Crowz Some, mostly workflow. Maya has some great animation tools. Max is superior in polygon modeling. Maya is superior in NURBS. Some differences in physics/dynamics as well.
 
@Inisheer I see. I just want to model as of right now. 3DS max?
 
user142019
12:50 AM
@Inisheer Why don't they just make one tool that's best at all those things.
 
user142019
IME Maya is very easy to use.
 
@Crowz @Zoidberg Well, I don't work for Autodesk, but I'm sure $ has something to do with it. Also, the modeling / animation industry is subdivided into may different realms. Each tool tends to cater to a different crowd. If you want to model, and are actually going to purchase the software vs pirate, I would start with Blender, Luxology Modo (this is what I use). Blender is free and modo is running about $1200. This is much cheaper than the $4k AD is asking for Maya/3DS Max.
Of all the AD products, I personally prefer Softimage.
 
Hmm, am I doing this wrong? I try to pull from my remote bitbucket to update the files in my local repo, but to no avail. Do I need to re-clone instead?
 
user142019
I prefer not doing anything with 3D graphics ever.
 
I'm a student so I can get a 3 year trial
 
12:54 AM
For modeling I would go with 3DS Max. I would try both and see what you like.
 
Never gotten far enough on either to really know
 
Just pick one and stick with it. No different than programming. If you bounce back and forth between language / software... you'll never master one or complete project.
 
user142019
Use stone and chisel and then scan it with a 3D scanner.
 
Cinema 4D is really good to if that's an option.
too*
 
Wait, do I have to pull + update?
Because update throws errors too D:
 
1:04 AM
@BartekBanachewicz Nowhere does the standard say that pointers are numbers.
 
user142019
Pointers are not numbers. Pointers are pointers.
 
user142019
Strong typing ftw.
 
Num a ftw :)
 
user142019
Ptr a ftw :)
 
Brushing teeth ftw, brb.
 
user142019
1:06 AM
lol hf
 
is there a way to mass-compile every .cpp in a folder?
 
user142019
clang++ folder/*.cpp
 
"cmd": ["g++", "-O2", "-Wall", "-time","-g", "-std=c++11", "${file}", "-o", "${file_path}/${file_base_name}"] --are these going to be included by default?
i imagine i'd have to re-type any relevant flags right?
 
user142019
for f in folder/*.cpp
do
    clang++ -c $f -o $f.o
done
 
8
Q: most difficult-to-find errors in c++

exampleI am well aware, that there will probably not be "the one most difficult to find error in c++", but I am still interested in what other people can think of / may have already encountered. The idea for this question arose during a discussion with a friend. We agreed, that it must be rather simple...

 
user142019
1:11 AM
> #define true (!!(__LINE__ % 10))
 
user142019
lol
 
my old fav is:
#ifndef _DEBUG
#define if(X) if ((rand()<10) && (X))
#endif
 
user142019
Or #ifndef NDEBUG. :P
 
@Zoidberg been there >.<
I can't tell how many times I found GCC slower than MSVC only to discover I left asserts on in GCC.
 
user142019
#ifdef NDEBUG
namespace {
    struct foo {
        foo() { sleep(rand() % 4); }
    } bar;
}
#endif
 
user142019
1:18 AM
@MooingDuck Problem solved. Debug build is no longer slower than release build. :)
 
@Zoidberg oooh, me gusta
@Zoidberg put that as an answer!
 
Yeah, do it.
 
I'll operate on your sobel ;)
 
anyway going home now
later all
 
user142019
0
A: most difficult-to-find errors in c++

ZoidbergNot really an error, but I do this somewhere in a random source file when I find it annoying when release builds are slower than debug builds. :) #ifdef NDEBUG namespace { struct foo { foo() { sleep(rand() % 4); } } bar; } #endif

 
1:21 AM
@Zoidberg community wiki?
 
user142019
Yes?
 
user142019
I don't want to get/lose rep from this silliness.
 
@Zoidberg only 4k left rep to go...
 
user142019
Until?
 
@Zoidberg until you win!
 
1:22 AM
Until you become a jedi master.
 
user142019
Oh only 4k to go till I'm a trusted user? Ha! Those fuckers think they can trust me! :D
5
 
user142019
I like until and unless in Ruby and CoffeeScript.
 
user142019
#define unless(x) if (!(x))
#define until(x) while (!(x))
 
do std::cout << x; unless (x == 0); Oh wait.
 
user142019
heh
 
user142019
1:27 AM
unless (x == 0) std::cout << x;
 
1:54 AM
i love you guys ;-;
 
does anybody have any OpenGL experience on here?
 
user142019
2:13 AM
Is it allowed to put typename before any type name?
 
user142019
> error: expected nested-name-specifier before ‘int’
 
user142019
meh
 
@JustinMeiners Lot's of people do,but they might not be online
 
 
2 hours later…
4:30 AM
R.I.P. Lounge<C++>
 
:(
</3
 
Oh wow, someone randomly upvoted my top answer. Now I need one more to my first good answer. Kind of depressing knowing that none of my answers are good.
 
My top answer has 21 upvotes.. The second one has 10.. then 9.. then 8.. :|
You actually commented on the one with 9 upvotes, how about that :P
 
14, 7, 7, 6, 5, ...
:(
 
So. my school screwed up my grading
 
4:38 AM
how so
 
So my teacher submitted a grade and they input it for the wrong class
Then I asked the teacher to resubmit the grade and then they put it in for the right class
Without changing their mistake
 
lol
my friend is currently failing a class because he got 0 for 4 homeworks
where he should have had 100%
he's basically gonna go from F --> A
 
knots are hard and I am retarded. :(
oh cool :D I got a nice answer badge
 
gratz
 
thanks.
 
4:51 AM
Welp Blizzard gave 2.3M$ to the red cross. Props to them for that.
 
Why does every text book I read say it's for people above me, yet they all work just as well?
 
hell yeah man.
2 dollars and 30 cents.
 
TYPO :(
The M makes all the difference
 
also it's $2.3M not 2.3M$
 
silly american :P (are you even from the US? I just made that up)
 
4:53 AM
I was looking for the "2.3M$" lol
 
I live in the US but I wasn't born here
 
I see
 
Also it probably would have been nicer to split that money to multiple charities
imo anyway
the red cross is cool but there are others that are cool too..
 
Well it's for the relief effort for Sandy
 
4:54 AM
Which Sandy?
 
Hurricane Sandy, from last year?
 
See it's weird that we have two incidents named after Sandy
Sandy Hook and Hurricane Sandy
 
I think last time they did it I bought a Pandaren Monk pet. But I think it was for Make a Wish foundation back then
"In 2009, the Pandaren Monk enabled World of Warcraft players to raise over $1,100,000 in support of the Make-A-Wish foundation. Though the charity window on this pet has closed, the Pandaren Monk can still be purchased normally. Keep an eye on www.worldofwarcraft.com for announcements on future charity pets."
 
Is it weird that I dozed off for a couple minutes, had a funny "dream", and "woke up" chuckling?
I've never done that before...
 
you're hallucinating
 
5:03 AM
Well, I've done all but the chuckling part often enough during nights.
 
Now that I learned how to self-ping, it reminds me about that guy who was replying to himself. That guy was weird.. It's a pain in the ass to reply to yourself.
You have to do :postnumber to ping yourself..
 
Oh yeah.... him
 
@chris weird
It kind of makes sense, seeing as that's what happens when you click reply.
 
Jan 6 at 4:04, by Mechanical snail
@Mechanicalsnail But the syntax I believe is similar to Japanese.
This guy?
 
yes
he literally went out of his way to reply to himself..
 
5:06 AM
So can you flag yourself as well?
I see the link, but...
 
yes
 
I can't believe I'm only in high school and I choose reading books and making programs over games most of the time :(
It's depressing considering how much I love games.
I hope it at least pays off.
 
1. Program at early age
2. Becomes next Bill Gates
3. ???
4. Profit
 
5. Give all of your money to charity so your kids don't get any.
 
I think he's actually giving them a part of it, but not to the point where they can avoid working
Good Guy Gates
 
5:10 AM
Hey, good point. What did Greg ever do?
 
Bill Gates has donated most of his income.
 
Like we already have Scumbag Steve.
 
Yeah, $28 billion to charity.
that's a lot.
 
I forget where it was I came by this, but it was a good read.
3
 
5:24 AM
i agree with him
it is ironic that sometime after, the idiots they hired translated vba to national languages
that meant (as i discovered) a script written on norwegian setup machine wouldn't work on english setup machine in same room, or vice versa: it was the ultimate idiocy
except, of course, for class wizard in mfc, which refused to add buttons or whatever if the national language wasn't just right
later that concept was extended to the update functionality of visual studio
 
@Cheersandhth.-Alf As I've noted before: Microsoft steals all Apple's worst ideas (including localized keywords for scripting languages). Sometimes I almost think Apple does stupid things just to see if Microsoft will waste money being equally stupid...
 
he he, great idea!
:-)
 
What a fun game that would be.
 
@JerryCoffin Which language is that?
I only know of Excel macro's being localized. (Which is annoying as hell.)
 
@StackedCrooked Applescript if I recall correctly (but that could be wrong -- I've done my best to forget...)
 
5:34 AM
it sounds cool though..
I wish I could do "display dialog 'etc'" and have it generate some fancy GUI for me.
 
I was looking at the manual but it doesn't seem localized.
Ah, certain parts are. E.g. file kind returns localized item type string.
But should only be used for display purposes.
Perhaps they cleaned up their act.
 
@StackedCrooked Maybe -- my last use of it was (thankfully) quite a while ago. It's also possible my memory has just dredged up the wrong name though.
 
@Rapptz AppleScript is the weirdest language I've ever seen.
 
really? it just looks like a retarded breed of a python-like language
 
I think the reason for its weirdness is the long statements without braces to indicate associativity.
 
5:42 AM
display alert "Hello, world!" buttons {"Rudely decline", "Happily accept"}
set theAnswer to button returned of the result
if theAnswer is "Happily accept" then
        beep 5
else
        say "Piffle!"
end if
lol
 
set theAnswer to button returned of the result
 
this is incredibly readable.
 
How should I parse that?
theAnswer = result.button?
 
set, to, of the, and result are highlighted
so I assume they're keywords..
so set variable theAnswer to the string returned by the button pressed of the GUI.
 
I figured it out by looking at the context. But on its own the statement make no sense.
 
5:48 AM
tell application "Microsoft Word"
  quit
end tell
lol this can apparently be rewritten as tell application "Microsoft Word" to quit
 
The idea of a high level scripting language for the OS GUI is cool though.
I think Windows has something similar.
 
yeah that's what I thought was cool. I don't know of a windows alternative
 
Using VBScript or JScript IIRC.
The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. It was originally called Windows Scripting Host, but was renamed for the second release. It is language-independent in that it can make use of different Active Scripting language engines. By default, it interprets and runs plain-text JScript (.JS and .JSE files) and VBScript (.VBS and .VBE files). Users can install different scripting engines to enable them to script in other ...
> Windows Script Host is distributed and installed by default on Windows 98 and later versions of Windows.
 
Wow it is so ugly compared to AppleScript :(
<job>
<script language="VBScript">
  MsgBox "hello world (from vb)"
</script>
<script language="JScript">
  WSH.echo("hello world (from js)");
</script>
</job>
 
lol
> WSH implements an object model which exposes a set of Component Object Model (COM) interfaces.
Ah, the ubiquitous COM.
 
5:54 AM
I never learned how to use the Windows PowerShell
 
Neither did i.
 
0
Q: How to optimize and increase efficiency in this particular code involving floating point operation?

SRINI794We know that floating point operations have high latency and take many clock cycles to execute which may cause pipeline to stall! what are the different methods to optimize the following code. int main() { float fsum[50],a; int isum[100],b; for(int i=0;i<100;i++) { if(i<50) ...

 
I think it's more valuable to learn POSIX shell or Bash.
 
lol
 
5:56 AM
> We know that floating point operations have high latency and take many clock cycles to execute which may cause pipeline to stall!
Can FP "stall" the pipeline?
 
that exclamation point really moved his point across to me.
 
@StackedCrooked Yes it can.
But not as badly as waiting for user input.
 
Is ASCII pronounced ass-key. nvm according to wiki it is
 
> In computing, a bubble is an alternative name for a pipeline stall. It represents a delay in execution of an instruction in an instruction pipeline in order to resolve a hazard.[1]
 
Spec Ops: The Line has some great loading screen messages. Like this one. Or this one.
 
user457812
6:02 AM
It's a very odd game.
 
Has anyone actually used di/trigraphs in their code?
 
I still think C++ needs a way for a class to say "there will be a variable named X of type Y in the enclosing scope" (either another variable in the same scope that the object is instantiated in, another member of the same parent object, or the parent object itself). This would allow us to elimintate memory overhead for getters/setter objects, and objects that need a "parameter" in the destructor.
 
I think this is the first time I've seen you in the chat after work.
 
@MooingDuck auto & a = x; // there must be x in enclosing scope or this will not compile
 
Can you give an example?
 
6:05 AM
I don't really understand.
 
because I'm unsure what you're trying to do
 
class jni_obj {
    extern jni_environment* env; //not actually a member, takes no space.
    jni_obj() {env->register(this);}
    ~jni_obj() {env->release(this);}
};
void func(jni_environment* env) {
    jni_obj my_object; //uses this scopes env ptr.
}
 
0
Q: const_cast vs reinterpret_cast

AbhijitReferring the SO C++ FAQ When should static_cast, dynamic_cast and reinterpret_cast be used?. const_cast is used to remove or add const to a variable and its the only reliable, defined and legal way to remove the constness. reinterpret_cast is used to change the interpretation of a type. I und...

 
> This would allow us to elimintate memory overhead for getters/setter objects.
 
@nil It's Art, that's what it is.
 
6:06 AM
When inlined their should be no overhead.
 
I removed the tag on that.
 
@StackedCrooked no, because every getter/setter object would have to have a pointer/reference to the "parent" class that it's part of.
think vector.size = 10; instead of vector.resize(10);
 
vector.size = 10 is pretty weird.. :| maybe because I'm used to the latter.
 
What do you mean with getter "object", a method?
Ah, I think you mean if a.b then b should have a backreference to a?
 
@StackedCrooked this is a generalized concept of that, yes. and avoids the absurd memory overhead.
@Rapptz probably, I only do it like three or four times a year
 
6:13 AM
Why's that?
 
@Rapptz wife > food > sleep > videogames > TV & SO chat > work
 
Ah well. I don't watch tv or have a wife. :(
 
Pssst.
Guys
 
?
 
If I have a (mathematical) vector in my code,
 
should I make Vector * Matrix == Matrix * Vector, or should I preserve the fact that Vector * Matrix != Matrix * Vector ?
 
I say the latter.
Multiplication isn't commutative
and lucky for you, you have control over that with operator overloading.. weird.
 
Hm.
 
@StackedCrooked No.
 
Why not?
 
6:21 AM
Language is sloppy. What does it mean 'to change the constness of an object'? If I do const int i = 0; const_cast<int&>(i); is i suddenly non-const? What did the const_cast change in the program at all?
 
I see.
Rephrased it a little.
Btw, is it const modifier or const qualifier?
 
Either is fine, informally if not formally.
 
@StackedCrooked qualifier (also note that even though the name is "const_cast", it also works to add or remove volatile -- which is also a qualifier).
 
6:42 AM
@LucDanton The const_cast removed a compile-time check.
 
@AndreiTita Those questions were rhetorical.
 
@LucDanton Good thing I didn't answer everything then. I just woke up :)
 
6:54 AM
@LucDanton What it changed in a case like that was pretty simple: it changes the behavior from defined to undefined (though I'm pretty sure you really already knew that).
 

« first day (818 days earlier)      last day (4144 days later) »