« first day (404 days earlier)      last day (4562 days later) » 

12:00 AM
Doing -- on the end iterator needs to work for that.
 
Hm, [] style iterating would work, I could make iterators use indices instead of pointers.
Although that still requires pointer to the container
 
Ben
Hi! I'm exploring SO a bit but I couldn't find a forum where to start a discussion.. isn't there such a thing?
 
What kind of discussion?
 
@Ben SO is designed to avoid discussion. But you can chat. :-)
 
Ben
for example: how would you define a C++ programmer's level from 0 ("In what country do you speak Seapluzpluz to 10: Guru (wrote a C++ book || member of the standardization committee)
 
12:13 AM
@AlfPSteinbach lolmao
@Ben i believe true guru's got no time for standartization shit, they have enough money to do whatever they wish
@Ben plus they probably quit coding long time ago :P
 
Ben
@Tenev: so what would your ranking look like?
 
0: a student just finished computer science univeristy..
 
Hey! I'm below zero!
 
Ben
:D
 
@RMartinhoFernandes just wait the heck up ;(
1: been working on small projects, total newbie, still googles all the time that printf function.
2: Has been working for a full year now, thinks he's genius but his knowledge is limited.
3: has been working 2 years now, just realized how dumb he is, and how much he has to learn.
 
Ben
12:17 AM
isn't printf rather c?
 
oh shutup :O
++ is just extension so doesnt matter.
now yes 4: worked 3 years with C++, has a really good knowledge, however he still wonders what iocp really is about.
 
Ben
ok, 3 might be where I am now ,)
 
i cant make more than 7-8 levels so
here comes the final levels
level 5: Has no degree, sits all day behind the compiler just because code looks like porn in his eyes, posts in chinese coding forums all day., cracks software coz it makes him feel good.
 
Ben
uh...
 
Level 6: No degree, maniacal schizophrenial obsession with C++ and Assembler, sees life as code. thinks life is a big algoritm.
 
Ben
12:22 AM
I hope I'm gonna skip that one and pass to 6 directly
.. or 7
I'd like to know where you see yourself ,)
 
Level 7: Evolved from level 6 he is Phd. now, sadly he is 45 years old now, his memory is very short, keeps making bugs/errors, without noticing.
 
Ben
oh.. from no degree to PhD .. that's quick
 
i said he evolved.
 
Ben
right
 
means he got the degree.
@Ben i don't.
 
Ben
12:26 AM
u don't?
 
@Ben well i do.
 
Ben
do what?
 
@Ben what do what?
:P
 
Ben
what do or don't you apart from confusing me?
 
:D
well i do, see myself.
if i have a mirror.
 
Ben
12:29 AM
ah... and which self-defined level would you assign to yourself?
 
@Ben better not to ask :)
@Ben well, i'd say about 6.5 :D
hahahaha
 
Ben
so you're working on your bachelor's degree? :D
 
because A): i am doctorant; and B)i'm getting older :D
yeah
i am
 
Ben
ok
 
working on my bechelor,doctor degree
 
Ben
12:31 AM
wow... all at once
 
@Ben well not yet for doctor, after a year coz they won't allow me now
 
Ben
oh, come on.. you're a 6.5! You should be a PhD h.c. at least!
 
no, but i have maniacal obsession with assembler and cpp
and the 0.5 levels are because i have sex with asm all day.
wait ima even make level 8.
 
Ben
oh... I start feeling the same with cpp, but I wrote at most 10 loc in assembler in my life
 
Level 8: Does not code, ever, anymore. has plenty of moneyz, only watches people, doesnt interfere with anyone even to correct their mistake, just watches from above.
 
12:35 AM
So, level 8 is a prick?
 
yes.
some people call it Boss.
infact, most people call it Boss.
:P
 
Ben
My boss is a 2
 
@Ben i'm afraid of such people, they take risks and have no experience. for them life is like a big wedding.
 
Ben
no, a 1.8 because he'd probably still have to google printf
 
wait i happen to have created level -1;
 
Ben
12:37 AM
yay!
 
Level -1: Female programmers. == copy/paste.
 
Yeah, right, as if male programmers weren't the bulk of copy-pasters.
 
Ben
oh... emancipation is a foreign word to you, right?
 
@Ben what is emancipation?
 
Ben
oh.. nothing
 
12:40 AM
i can say, in my university, 80% of the students are female, and they all study computer science.
 
Ben
wh... ?
I did something wrong. terribly wrong.
 
1 of 100 got to level 2;
 
You ran holding scissors?
 
Ben
where is that university?
 
RUSSIAN FEDERATION.
 
Ben
12:41 AM
ah... terrrrrribly wrong.
 
In Soviet Russia, code compiles you.
 
Ben
Studying at a russian university must be heaven.
 
but man, they are smarter, even tho most of them are idiots, 1 of 20 got to level 2;
 
Ben
but why do you fancy ask when you have russian girls around you?
asm
 
What?
 
Ben
12:43 AM
we had like 5% girls at uni. and 1% of them were attractive.
and boys were 99% nerds
 
ours 50% can be used.
40% are whores
20% are exteremely attractive.
 
Ben
of those 50%?
 
yes.
 
Ben
so how many usable attractive whores are there?
 
WTF does "can be used" mean?
 
12:45 AM
and the other 30% are .... have u seen doctor who? these headless monks.
 
Ben
:D
no
 
@RMartinhoFernandes means she can crush you in matter of minutes.
 
Ben
what time is it there? 4am?
or are you sitting in Vladivostok?
well.. it's 2am here and I'm going to bed. Nice to meet you!
 
@Ben emm no, 3am
 
1:24 AM
Mhmm...my brain is fried.
Spent a lot of last night formulating a battle plan.
What OS's are you guys on now?
 
Ubuntu 10.04
 
1:46 AM
Why so old?
I thought Ubuntu was up to 11.04 now
 
its LTS.
 
Ah ok
 
and no
 
You just like the interface more compared to the newer versions of Ubuntu?
 
theres 11.10
and no, i don't, infact, i like security and stability more than interface :P
when 11.x LTS comes i could use it then.
but i'd hate to reconfigure my server
 
1:49 AM
How does the security differ from 11.10 to 10.04?
 
security does not only mean allowing hax0rs to gain access
security means there musnt be any bugous behavior as well.
which potentially leads to undefined behavior of the system, and results can produce huge loss of data and/or money depending on what are you hosting :))
 
Testing: hackers
That still doesn't suggest that 11.04 has more security than 11.10.
 
@ElectroNerd i cannot even see 11.04 , there is 10.04 LTS and 11.10
 
2:11 AM
Why wouldn't there be LTS for 11.10?
 
posted on November 24, 2011 by Herb Sutter

I’m very pleased to announce the C++ event of the first half of 2012: GoingNative 2012, to be held on February 2-3 in Redmond, WA, USA. (C++ and Beyond will also be great, but won’t be till the second half of the year – and there are other C++ conferences/events coming too. I can’t remember [...]

 
Ciao
 
@ElectroNerd there could be, but yet there is not. and before it cometh on to them we all must be afraid.
 
2:38 AM
@Eugene hi
@Eugene wasup
 
 
4 hours later…
Xeo
6:41 AM
Oooh, shiny new interface for the user page.
 
6:59 AM
 
 
2 hours later…
cpx
9:09 AM
thats jimmy wales, i see him everyday.
 
@Pubby I love how in order to keep wikipedia free, they're constantly begging me to give them money
@RMartinhoFernandes what! Heresy!
 
9:56 AM
Morning all
 
10:29 AM
morning
 
good afternoon
curses, I gotta study..... bye.
 
morning
Good intentions and going to bed early are undone by bad sleep. The universe must not like me.
 
lol
who can blame it? :D
 
In System Analysis class we were asked to give examples of closed systems. The only one I could think of was the universe.
 
if even that
but hydraulic systems are usually thought of as closed, because the hydraulic fluid can't escape
 
10:39 AM
Apparently the term is Isolated System in English.
Hydraulic systems must interact with the outside world in order to be useful.
> Truly isolated physical systems do not exist in reality (except perhaps for the universe as a whole)
^ AHA. Wikipedia proves me right :D
 
uh, when I said "usually thought of"...
 
Better give Jimmy some sort of donation :P
 
@TheRarebit I ad-blocked Jimmy long time ago.
 
smart move
having him glare at you browsing his site is a bit...unnerving :/
 
10:43 AM
lol
 
Ctrl-PageUp and Ctrl-PageDown are nice for changing browser tabs. Until a Flash app breaks the chain. Grr.
 
I rarely use Wiki so I just ignore it
when real smart people don't know the answer, they just fucking make it up
 
@DeadMG In my experience it's the other way around. People who don't know much tend to make up answers. The ones that are most knowledgeable are also more willing to admit they don't know. And some of them try to change the topic in order to divert attention from it.
 
no, the people who don't know much pretend that they know instead of that they're making it up
the smart people make it up and admit to it, and then they're often right anyway
 
@DeadMG Isn't pretending to know the same as making it up?
 
10:51 AM
no
pretending to know involves telling other people that you're right
making it up involves telling other people that it's an educated guess
plus, smart people usually make up the truth anyway because they're smart :P
 
Evolutionary psychology is paradise for people who love making up stuff.
 
evolution is a process, how can it have a psychology?
 
it could be the other way around. How the process of evolution applies to our psychology
you know, like "we get scared by loud noises because historically it might be a tiger eating your fellow cave person"
 
For example Why do men often start cheating on their wives after the kids have reached a certain age? Answer: some brabble about how this fits in primate behavior and survival instincts etc..
 
oh, so how evolution has created/influenced our psychology
 
10:59 AM
Why am I lazy? To preserve my energy reserves in case of famine. :D
@DeadMG In the past human behavior was often explained in context of culture and education. It turned out that many traits are have deeper roots.
 
well, since human behaviour existed long before culture and education, and (animal behaviour) exists in animals without culture or education, then that's the, excuse me, incredibly fucking obvious conclusion
 
@DeadMG I think so too. But the idea that all behavior is cultural still holds strong. There was a study once that wanted to find out if girls naturally prefer to play with dolls and boys with cars, or if this is defined by culture. The study found that it was not cultural. Many people hated this conclusion.
 
well, unless they reared those babies in complete isolation since they were born, I find it hard to see how it could possibly be an equal experiment
 
ok, fair play
imo, people don't like it because they just want to feel in control
 
11:12 AM
And it goes against the political correctness that is so obsessed over today.
 
pc sucks
 
11:47 AM
If you study average IQ of men versus women then you have three possible outcomes: (1) both genders have equal IQ, (2) women have higher IQ or (3) men have higher IQ than women. If you reach conclusion (1) then you are safe. If you reach conclusion (2) then you'll be praised by feminists. If you reach conclusion (3) then you lose your job.
 
Does anybody know what I need to do to change my profile picture? I've tried editing my profile and got taken to that avatar creating site but not seen any changes yet?
got created yesterday btw
 
At least this guy lost his job for it.
 
@StackedCrooked when did feminists praise (2)?
 
@StackedCrooked or (4) IQ is a terrible measure of anything
 
@jalf It's what I think would happen.
 
11:54 AM
@StackedCrooked Well, that kind of changes your argument, doesn't it
In hypothetical scenario A, I think some people would say something stupid, and therefore those people must be stupid
 
@awoodland If IQ is meaningless then why is it such a sensitive topic?
 
@StackedCrooked because people use it to support claims that X is better than Y ?
 
@StackedCrooked because the people it favours love to have their ego massaged?
 
same as with racism. Skin color is meangless, but there's a long history of people using it to "prove" that some people are superior over others, and so it's sensitive
 
If have no problem accepting that black people are more athletic than white people.
 
11:56 AM
it's a sensitive topic to say that "group X is more intelligent than group Y", and basing it on a meaningless measure does not make it any less sensitive
 
the more interesting thing than just some average measure is the distribution of such a measure over an entire population. "average" is a pretty poor descriptive statistic for anybody other than a betting shop
 
@StackedCrooked To the best of my knowledge, they're not, and there's no reason why they'd be
 
@jalf and that could be cultural bias anyway even if you did measure it
 
I was about to say that :)
It's absurd to believe that the color of a person's skin is tied to other traits, like physiology or intelligence
 
@jalf Why is that absurd?
Physical traits are not totally independent.
For example males have usually higher body length than females. Is it absurd to see a connection here?
 
12:00 PM
@StackedCrooked because you're jumping to conclusions. Because there's no reason why skin color would have more of an influence over your intelligence than, say, amount of facial hair, length of your fingers, height or eye color
It's absurd to speculate that genetic attribute X is somehow tied to attribute Y. If you want to show that they are somehow tied to each others, then do the science. Test it.
Anything else is just generalizations based on your own prejudices and preconceptions
aka racism
@StackedCrooked a connection to what?
 
@jalf Relation between gender and body length.
 
@StackedCrooked no, that's not absurd, because it's been shown pretty conclusively to be true, and we even have a good idea of why it is true
but going "a black guy won a lot of medals for running really fast, therefore his skin color must have played a part" is just racism
racism doesn't have to mean going around saying "black people deserve to be enslaved"
 
@jalf That's not what I'm saying.
 
what are you saying then?
 
That there are genetic differences between races. And that one difference in genetics can lead to one or more differences physical traits.
 
12:09 PM
@StackedCrooked but you're still assuming that "race" is somehow significant. No one says that difference in the amount of nose hair people has might lead to different physical traits
there are thousands of genetic differences between any two people. But somehow, people tend to single out skin color (or gender), and go "I bet that is closely tied to <insert desirable trait here>
that's my point.
 
The Thing (2011). end of story.
 
and of course, the other half of the equation is that it's not hard to see why people get sensitive about attempts at proving that some genetic attribute of theirs is tied to a lack of some desirable trait (such as intelligence)
 
Is there a way to solve this circular dependency? ideone.com/fsZT8
Without adding the vtable-implementation to Python.h
 
can't classobject.h just forward declare np_vtable instead of including?
you only store a pointer to it anyway
 
12:21 PM
oh hi
 
@jalf What is that? =) And is it possible in C?
 
@ManofOneWay what is what? A pointer?
struct np_vtable; is a forward declaration
and yes, it's possible in C
 
@jalf So in classobject.h I say struct np_vtable; instead of #include "np_vtable.h"?
 
yep
 
Do I have to say extern struct... in np_vtable then?
 
12:27 PM
nope
in classobject.h you're just telling the compiler that the struct with that name exists. And that means we can create pointers to it, even if we can't do anything else with it
then it just has to be defined in another file, then everyone's happy
 
Okey, but I get an error: Include/classobject.h:17: error: expected specifier-qualifier-list before ‘np_vtable’
 
oh, I'm not sure how to do the typedef thing with forward declarations...
might have to write the pointer as struct np_vtable*
 
you can typedef them anyway, I think
typedef struct np_vtable np_vtable;
 
ah
do that tehn :)
then you won't need to change the pointer
 
but if using C, then upgrade to C++ where you don't have to
 
12:30 PM
Have I ever told you that you are awesome?
@DeadMG I can't =( It's in CPython and it's a school assignment
 
I know, and I don't need to be told ^^
I sympathise with you
 
sbi
So the audio was dead again this morning, when I woke my machine from suspend-to-disk. :( I asked the admins, and one of them found this: blog.stealthpuppy.com/deployment/… I switched drivers now, and I am very curious whether this will help. ISTR someone mentioning here using a Dell, too. Maybe this would help you, whoever you are.
 
But now I get this error,
Include/np_vtable.h:23: error: redefinition of typedef ‘np_vtable’
Include/classobject.h:12: error: previous declaration of ‘np_vtable’ was here
 
StealthPuppy is now in InvisibleMode!
 
@jalf Do you know how to solve this new error?
 
12:36 PM
you need to create a separate forward header
 
@ManofOneWay try without the typedef in classobject.h: struct np_vtable; and then declare the pointer as struct np_vtable*
 
and then include it in np_vtable
 
in C, structs exist in a separate namespace, so to refer to them, you have to use the struct keyword, or typedef it to a "normal" name
and I'm guessing typedeffing doesn't play nice with forward declarations
but C isn't exactly what I'm best at
 
no, the problem is that he's typedeffing it twice
he needs to factor the typedefs out to a separate header which is include guarded
 
ah right
that works too :)
 
12:40 PM
by the way
doesn't CLang licence the EDG front-end?
 
not afaik
it's home-made
 
Thanks guys!
 
ah ok
 
You're very kind
 
I am supremely awesome, but not particularly kind
as anyone who knows me here will attest :P
 
12:43 PM
@DeadMG Yes you have hybris, but that's ok as long as you share your knowledge ;)
 
damn
I need to stop feature creeping
even the basic language implementation is probably more than I'll achieve alone, let alone everything else I want to add :(
 
but feature creeping is the fun part
 
only if you live to see the features done :P
 
1:01 PM
meh
I have a problem, I need to find the Hub and Port number of a connected USB device. I've tried to use USBLib to get all devices, and it finds none
Windows seems to have an API to talk to USB ports, but it's darn complicated
why can't device manager just show me the Hub and Port Number??? I don't get it
 
mine does
my mouse is port 2, hub 7
whatever that means
 
but doesn't show it for some odd reason
 
what version of Windows?
 
win 7
 
well, you most assuredly can get the port and hub of any USB device from contol panel
 
1:09 PM
Another three-star programmer:
0
Q: "incorrect checksum for freed object", but I didn't free it

salomonsSitting with my master thesis trying to implement a self organizing map (SOM) when I encountered the following error: program(39652,0x7fff70055cc0) malloc: *** error for object 0x100555108: incorrect checksum for freed object - object was probably modified after being freed. The thing is tha...

 
just when you thought all win32 functions had really boring and businesslike names: msdn.microsoft.com/en-us/library/windows/desktop/…
3
 
lol
 
@DeadMG yea I know, but it doesn't show it on mine, just says "0"
 
maybe your BIOS or HAL is broken?
 
maybe it's just optional for drivers to report that information
 
1:15 PM
ok
I don't get how 3SAT is NP-complete
it looks pretty trivial to me
it occurs to me that you could simply start with the assumption that the clause is true, and then work backwards from there to determine the value of each literal
 
@KerrekSB what is a "three-star programmer"?
 
@AlfPSteinbach Someone who thinks that double*** is a legitimate data type :-)
 
lol
 
I wonder if there are any legitimate triple pointers in the C standard library
 
@jalf How about this one?
 
1:27 PM
@StackedCrooked My Virgin Broadband ISP says "website blocked" :-S
 
msdn blocked?
 
(Just kidding. Bing would at some point have refused the search term, though)
 
0
A: Why the overrided operator new isn't call?

Alf P. SteinbachYou have infinite recursion. Instead, do like #include <iostream> #include <string> #include <new> #include <stddef.h> #include <stdlib.h> #include <stdio.h> void* my_alloc( char const* str, std::size_t size ) { fprintf( stderr, "%s %lu\n", str, (unsigne...

 
who wants poporn
 
@Tenev u mean pocorn
 
1:46 PM
@AlfPSteinbach nop
 
Do you know how prefixing works when it comes to vtables and multiple inheritance?
 
uh?
prefixes go on words
vtables and multiple inheritance go on classes
more to the point, vtables and multiple inheritance exist in C++
 
I'm trying to implement vtables for method calls in Python
and a problem occurs when you have multiple inheritance
 
why do u need this :P
 
do you mean repeated inheritance from the same class?
 
1:49 PM
No, C inherits from A and B
 
multiple inheritance of C++ classes? Or python ones?
 
Python
 
then what's the problem?
you just have to make more than one new vtable
exactly the same as for A, the same goes for B
it only gets tricky if you have C : A, A, indirectly
 
I want to merge it to one table for C with all methods from A,B and C.
 
why?
 
1:51 PM
Because I want an offset
 
An offset?
 
well, you can't
it's just not possible
 
into the vtable
 
B already has a vtable pointer in it, for one
 
Sometimes it's amusing how the PHP "programmer"'s mind works. This guy is trying to format a number as a currency (hundreds plus units):
0
Q: Decimal number with comma or point after first number (PHP)

F4LLCONWell I'm stuck at this for a while now.. I am parsing data from a website, and I want to get the price but on the website there is no comma or point between the prices. so it shows like 499, the 4 is bigger than 99. When I do: $price = $oNode['div.item-prijs']; echo $price; It will echo 499...

 
1:52 PM
You have to use the base class's vtable
 
and it cannot point to the same vtable as the one in A, because the same slots are already used for A's virtual functions
you have to make two new vtables, and assign A and B's existing vtable pointers to the appropriate one
 
in C++, it is normally implemented basically by casting the this pointer to the base class type
 
Let's say the easy case, if you have B that inherits from A, B : A.
Then you could have one v-table for B and one for A
 
if you want to call virtual function #3 from B's vtable, then cast this to B*, and call this->vptr3]
@ManofOneWay no you couldn't
because as soon as you create your own vtable, then the derived class is no longer a valid instance of its parent
 
B's vtable could have both A's methods and B's (and the one's that B will override in A at the A offset)
 
1:53 PM
the whole is-a thing
it's kinda important to inheritance
 
@jalf Yes it would be possible with single inheritance
 
@ManofOneWay You can't do that,because all the classes taking an A must find A's methods at A offset
 
@ManofOneWay it's possible with multiple inheritance too
like I said, cast the this pointer
 
so you must introduce more than one vtable pointer
 
Let me show you an example
 
1:54 PM
so it's an A* when you want to look into A's vtable, and it's a B* when looking into B's vtable
having the derived class create its own vtable means that the indices won't match up
 
a xxx[n];
Lol
 
@jalf @DeadMG ideone.com/UUwgP
That would work?
 
yes
but you've only inherited from one class
 
Yes
I know =)
 
no, wait
that won't work at all
 
1:59 PM
But as I said, this works for single inheritance
 
the offsets are wrong
 
which classes are supposed to have inherited from what in that example?
 

« first day (404 days earlier)      last day (4562 days later) »