« first day (324 days earlier)      last day (4621 days later) » 

3:05 PM
1
Q: C++ Custom Built Dynamic Template List, What Considerations Are There?

SSight3Currently, I am re-designing a class that has seen a lot of use (called 'CharList', which allows dynamic lists of chars, interactive with C strings etc), into preferably a better system that grants more features for less code based on improvements to previous inefficiencies etc. I want to get fe...

> Are you saying that you do iter++ to add a node on the right, and ++iter to add a node on the left? – R. Martinho Fernandes 3 mins ago
Answer is "yes".
shudder
 
yeah, that guy is a roflcake
 
what is roflcake?
 
Like a cake, but you rofl at it.
 
aah
 
3:17 PM
lulz
 
lol
 
now you can really code in binary
 
Reminds me of > copy con program.exe.
 
@TonyTheTiger Why does it have a done key? That's not really binary anymore, more like ternary.
 
@FredOverflow So, that means that computer programmers are immune to the sun?
 
3:22 PM
@RMartinhoFernandes At least we are. "Java sucks", remember? ;-)
 
@FredOverflow So you can say when you're done, to start compiling
 
Well, I'm not. I get burned pretty fast.
 
@TonyTheTiger What "compiling"?
 
@TonyTheTiger Why compile if you already have a binary?
 
3:24 PM
You're coding C++ by typing the binary codes of the characters directly?
 
Als
What is the context of this:
21 hours ago, by sbi
And you see the results: A respectable regular of the community banned for a while for an out-of-context vote on something he has said half a year ago, to which nobody who was here objected. That is so stupid, it makes my toenails curl up in disgust.
 
Some kid when digging through the chat history flagging old messages.
Apparently Tony suffered the consequences.
 
Als
Tony who? @TonyTheTiger?
 
Who else could it be?
Is there another Tony I'm not aware of?
 
Als
He got banned?
uhm
 
3:27 PM
@Als who else uses obscence language in here, that might offend certain parts of the world more often then not
@FredOverflow cause I like the idea of compiling binary
 
Als
@TonyTheTiger: I don't see that you are banned
 
The standard suspension time is 30 minutes.
 
@Als I was suspended for 30 mins
it was 30 mins of hell
 
Als
oh banned from chat?
 
I felt like forever alone
:(
 
Als
3:28 PM
@TonyTheTiger: Aww...
 
Gosh. That's a bit too much drama, no?
 
lol
@RMartinhoFernandes t'was drama on purpose
 
Als
some human emotion might feel alien to a bot..yes
:P
 
hahahahahah
kek
 
@TonyTheTiger Now you know how a Java program feels during Garbage Collection!
2
 
Als
3:30 PM
uhm....i dont understand....flagged messages need minimum of votes to be deemed as offensive
 
Well, the messages had the word "fuck".
 
@FredOverflow that deserved a star :)
i've been derping around with templates today
 
Als
@TonyTheTiger: They should even put up a badge for this thingy perhaps
 
Where is Genius™ today?
 
I've also heard that the second company I interviewed at has found someone for their role, so I've become unnecessary at the moment for them
 
Als
3:32 PM
the badge should say, "Yes, I got banned, because people cant make out the difference between offensive and plain stupidity"
 
don't really mind, didn't really wanna derp around in a macro language based on C
 
@DeadMG : hi
 
Als
@TonyTheTiger: hmm..i see
 
here return by reference of local variable in my examples is ok?
 
@Als hmmmm
 
3:34 PM
@Als I blame the system more than the users. I once got suspended too, and I didn't use that word.
 
@MrAnubis don't return a local variable by ref
 
when the function goes out of scope the reference doesn't ref anything anymore
 
No. It's never okay.
 
Als
UB
 
3:35 PM
Using the return value in any way is undefined behaviour.
 
Als
@RMartinhoFernandes: Using thats true
 
please have the look at code guyz ,i think its code is ok in term of making temps
 
Als
not returning
 
@MrAnubis I looked, it's UB
 
aah
 
3:36 PM
you cannot return i which is a local variable like that
 
@MrAnubis Don't be afraid of returning by value.
 
yes i read the article but return ref to const data doesn't increases the life time span of temp var?
 
No. It's initialization of refs that does that.
foo const& it = foo(1,2,3);
 
aah
Thanks
 
what's @CatPlusPlus up to?
 
Als
3:39 PM
that cat has wicked eyes
 
it's because it is not amused
 
@RMartinhoFernandes Returning static locals by reference is okay, however.
 
Als
ino i think its inherently a mean cat
 
@MrAnubis Why would you want to return an iterator by reference? Iterators were made to be copied, just like I was made for loving you, baby!
 
@FredOverflow Oh, that. Well thought.
Ok, I couldn't convince the guy that overloaded ++iter to append on the left and iter++ to append on the right to get a sane interface. Let it be known that I tried.
 
3:44 PM
@FredOverflow : beginners are always fighting for efficiency)
and i am boy
 
Beginners are always fighting for efficiency in the wrong place, because they don't know the difference between O(n^2) and O(n log n). Instead, they just sprinkle their code with references here and there, not noticing the undefined behavior.
 
yes i know ofcourse
 
A lot of times, it's the difference between correct code and fast code.
 
@FredOverflow That's like Javah's += :-)
 
3:46 PM
> It's easy to write a fast program that outputs garbage. - Eric Lippert in a comment somewhere.
 
Als
1. Write correct code that works
2. optimize it if you can
 
@AlfPSteinbach Yes, Java sucks, even for beginners.
 
@FredOverflow no, you are supposed to defend it
 
I'm not really sure what the target audience for Java is supposed to be. Anyone?
 
Thanks Als
i hate java
 
3:46 PM
@FredOverflow morons
 
@Als I'd rephrase as "optimize it if you need and if you can"
 
lol
 
> It's relatively easy to optimize a correct program, but much harder to correct an optimized program.
 
1. Write Java 2. Realize it sucks 3. ???? 4. PROFIT
 
Als
@RMartinhoFernandes: agreed
 
3:48 PM
here's a bit of code i'm coding on (using Notepad++ and g++):
#include <system_error>
#include <iostream>
#include <string>
#include <sstream>
#include <windows.h>
using namespace std;

template< class Type >
string stringFrom( Type const& v )
{
    ostringstream   stream;
    stream << v;
    return stream.str();
}

string rawMessageFor( DWORD const code )
{
    struct RawMessage
    {
        char const* p;
        RawMessage(): p(0) {}
        ~RawMessage() { ::LocalFree( const_cast<char*>( p ) ); }
    };

    RawMessage  message;
    DWORD const stringLength    = FormatMessageA(
 
@AlfPSteinbach Java is great because... argh, I can't think of a reason off the top of my head!
Wait, built-in concurrency support. That's something, right?
 
Als
java is great because it gives easy money?
 
I' wondering if it is necessary to support RAS and network message tables in modern Windows?
 
@AlfPSteinbach : can i sell your code?
 
@FredOverflow Yes, it gives beginners the impression that threadsafe == synchronized slapped everywhere.
 
3:48 PM
I remember that FormatMessage had to be cajoled into looking in those DLLs in Windows NT 4
@MrAnubis no!
 
grins ok
 
@AlfPSteinbach Can I sell my soul?
 
Do you have a buyer?
 
I'm sure the devil would be interested, as always. But what would I get in return?
 
I can give you cookies for it.
 
3:51 PM
fire and devilischness
 
I am not interested , you are overflowed soul
 
@TonyTheTiger And hot demonic maidens.
 
By the way, what was our scapegoat before Java?
 
Well, not quite "maidens".
 
Als
3:51 PM
hmm i heard hot maidens
 
@RMartinhoFernandes I try to minimize my intake of sugar.
 
lately I've been craving sugar more then I normally do
kinda weird
 
Als
@TonyTheTiger: Are you preggers? :P
haha
 
@Als euh no, I'm male, unable to be preggers by definition
 
Als
certain cravings are typical of that
@TonyTheTiger: Who knows, We got C++11 didn't we? did you think it was going to happen? :P
 
@AlfPSteinbach : are you directly dealing with winapi calls?
 
oh ffs, we're talking about pregnancy, next thing we'll be talking about sex again
lol
 
@MrAnubis what does that mean?
 
@MrAnubis no he's dealing with male pregnancy :P
 
i am seeing your code
lol
 
Als
3:54 PM
@TonyTheTiger: We can't have enough of it and then we can't stop talking about it
 
rolf
 
@Als hahah
 
@MrAnubis i think you mean "ROTFL", which is short for RollingOn The Floor Laughing
 
yes i think
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
what are those?
never saw them in my life
 
Als
3:56 PM
@FredOverflow: uhh...the very idea of Up the bum puts a puking face on me
 
@TonyTheTiger missing definite article?
 
@AlfPSteinbach : what does your code do ?
 
depends
 
So silence
everyone back to serious mode?
i should be going , bye
 
4:19 PM
What's serious mode?
 
hi
 
4:35 PM
@TonyTheTiger Looking for a new flat, mostly.
Or a room. Or whatever.
 
@CatPlusPlus ohh interesting, too many bugs in the one you're in?
lol
 
@TonyTheTiger No, end of lease and related shenanigans.
 
oh I see
 
Generally bad shenanigans.
 
not good then
 
4:48 PM
I've been put in a situation I don't like one bit, but eh, that's what happens when you depend on other people to do important shit, instead of doing it yourself.
 
yea I guess
 
I should've taken care of this crap 3 months ago.
 
damn, internetz keep you too busy?
 
No, I've been convinced that there will be no problems.
 
oh... I see
 
4:51 PM
Sucker. There are always problems. ;)
 
@MrAnubis it just looks up standard Widnows error message. Visual Studio has a bundled tool called errlook that does the same.
 
Yay, one more step towards goo!
 
@RMartinhoFernandes towards goo?????
 
Grey goo (alternatively spelled gray goo) is a hypothetical end-of-the-world scenario involving molecular nanotechnology in which out-of-control self-replicating robots consume all matter on Earth while building more of themselves, a scenario known as ecophagy ("eating the environment"). Self-replicating machines of the macroscopic variety were originally described by mathematician John von Neumann, and are sometimes referred to as von Neumann machines. The term grey goo was coined by nanotechnology pioneer Eric Drexler in his 1986 book Engines of Creation, stating that "we cannot affor...
You need to read more.
 
4:56 PM
@RMartinhoFernandes Yeah...
 
@RMartinhoFernandes oh thx
 
This is cooler:
Utility fog (coined by Dr. John Storrs Hall) is a hypothetical collection of tiny robots that can replicate a physical structure. As such, it is a form of self-reconfiguring modular robotics. Conception Hall thought of it as a nanotechnological replacement for car seatbelts. The robots would be microscopic, with extending arms reaching in several different directions, and could perform three-dimensional lattice reconfiguration. Grabbers at the ends of the arms would allow the robots (or foglets) to mechanically link to one another and share both information and energy, enabling them to...
 
with utility fog simple magic is attainable
if you could direct it
 
The whole point of utility fog is to be able to direct it.
It's supposed to be smart matter.
 
5:00 PM
ih
 
Otherwise it's just a bunch of small dust particles.
 
considering how everything "smart" gets virus-infected, is that so smart really?
oh dang, malfog!
 
Smart matter in the sense of matter with computing capabilities. Not necessarily "intelligent".
 
Out-of-memory condition: kill all humans.
 
5:03 PM
std::terminate()
 
Something on Boost for an MRU cache?
 
I've seen cyclic buffer there somewhere.
Circular buffer.
 
Nice, thanks.
Hmm, guess I need something more complex. Something more linked-listy. I'll adapt a std::list.
 
5:33 PM
monsieurs , whats the basic difference between STL and BOOST library , i mean in terms of syntax and understanding?
 
Boost uses a style similar to the standard library.
Yes. But Boost has a lot more than containers and iterators.
 
for e.g?
i don't think beginners like me would like to mess with boost :)
i already learning STL and templates at same time , my mind has already blown
 
haha
Boost is excellent for beginnners
it does an awful lot of legwork for you
 
Lol, what the hell is this.
 
I agree on that. If you can't use boost, you shouldn't use C++ before reading more books anyway.
 
5:38 PM
obviously some good CGI
 
0
Q: using c #if #ifdef statements vs objective c if statements

user796368what are the pros and conns (if any ) of using preprocessor code such as #ifdef #if #ifndef #define as apposed to the standard objective c if statements. and when should you use one over the other? switch if() e.t.c

what the fooo
@CatPlusPlus WTF
 
@DeadMG cool
@CatPlusPlus this is called undefined behavior
 
I guess I should finally upgrade the kernel on me server.
The ultimate question, will it boot?
 
where is cubbi?
 
@CatPlusPlus always a risk you take when upgrading kernel
guess you'd have to make a backup before doing that
 
5:48 PM
I still feel like I am in roller coaster.
 
Too lazy for full backup.
 
@Mahesh : you're in job if you don't mind telling ?
 
If it doesn't boot, I'll revert the kernel instead.
 
@MrAnubis - Searching for one. But temporarily working for another :)
 
@CatPlusPlus The make install does the backups automagically
 
5:49 PM
@Mahesh lucky you
 
Kernel has install target? Huh.
I just copy the image and the map.
 
@MrAnubis - Thanks. What about yours ?
 
If you use grub, and I hope you do, you can just select the -old image at startup.
 
I can't select anything, it's a remote server.
 
@Mahesh : graduated this month , will soon go for looking jobs
 
5:50 PM
If it doesn't boot then it's netboot time.
 
@MrAnubis - From univ ?
 
I see. So you get a recovery shell ?
 
I can boot from network into rescue mode, yeah.
 
NU (Nepal univ) , you , already graduated or still in univ?
 
Expand
 
5:51 PM
That's cool.
But if the kernel panics or hangs the network boot doesn't happen right ?
 
Als
ohla @TonyTheTiger
 
No, but I can do a hard reboot.
 
Als
hey pussy---> @CatPlusPlus
 
@Mahesh , you , already graduated or still in univ?
 
@Als ohla
 
5:53 PM
Handy.
 
Als
@MrAnubis: Did you change your display name? are you the guy with the big usserXXXXXXXX name?
@TonyTheTiger: I am so bored.
 
@Als join the club
 
usserXXXXXXXX ?
 
<--------- is bored
 
i am very old user of SO , why would i change my nick
 
5:55 PM
For funn.
 
Als
@MrAnubis: Okay
 
@Als : why would you ask that?
 
Als
Darn the @CatPlusPlus doesn't reply to hello's anymore?
 
@MrAnubis - Graduated. From University of Louisiana at Lafayette
 
@Als Hi, letter A with a chick beside it.
 
5:55 PM
@Mahesh cool
 
Als
@MrAnubis: There was a guy here from Nepal a couple of days ago and asking q's similar to yours
 
Als
@CatPlusPlus: You love the chick eh
 
i think i am not only from nepal who is on SO :)
 
Als
@AlfPSteinbach: Are you in love or something? I see you posting more and more songs these days? Whats up matie? :P
 
5:57 PM
he he
 
Als
@MrAnubis: Sure, that is the reason i asked or i would say you are the one.
 
Yay, I'll be getting third Yearling badge in 12 days.
 
Als
@TonyTheTiger: What u up to?
 
@Als: hehe
 
Als
@CatPlusPlus: Are they awarded multiple times?
 
5:58 PM
For each year.
 
Als
ohh
i want a second C++ gold shiny, im at 1882
 
@Als watching random youtube video's
 
Tag badges are awarded once per level.
AFAIR.
 
Als
@TonyTheTiger: Just passing some time, hard work day tommorow, ahh hard work and hardly work both annoy me.
@CatPlusPlus: Unfortunately, Yes
 
@Als no work annoys me
lol
 

« first day (324 days earlier)      last day (4621 days later) »