« first day (466 days earlier)      last day (4468 days later) » 

Xeo
12:00 AM
@sehe Aye, and now go on to use X :P
 
@Xeo true enough, gcc-snapshot doesn't seem to handle that gracefully, still
 
I don't really see much gain in that. I'd use -Wfatal-errors if it was usable, because I'm not interested in more errors based on the compiler's guess.
 
Xeo
lol, ideone doesn't even go farther than saying "no new types in function decl": ideone.com/mAosc
 
@WTP you have a use for tuples of 255 elements?
 
Xeo
@RMartinhoFernandes Clang's pretty good at guessing, y'know.
 
12:02 AM
prog.cpp:1:1: error: new types may not be defined in a return type
prog.cpp:1:1: note: (perhaps a semicolon is missing after the definition of 'X')
prog.cpp:5:10: error: two or more data types in declaration of 'main'
@Xeo must have been network hickup, see above ^^^
 
Xeo
No, I meant that.
It doesn't even go to the use of X
 
What's the point?
I'll have to fix the semicolon and compile again.
 
user142019
Clang at least does something like "undeclared type foa, did you mean foo?"
 
Xeo
having to compile less often?
 
@RMartinhoFernandes You can have two thousand more errors and warning spewing around in the same compile run! You'll feel accomplished for solving so many problems in so little time :)
 
user142019
12:05 AM
Xcode has live issues (just like netbeans?). It warns and shows errors at writing-time. They are exactly the same as clang's errors.
 
Xeo
@sehe, mind testing this snippet on a newer GCC version? ideone.com/IlkTh
 
@WTP That's horrific, actually. Also, gcc has the nice habit of listing names known in other namespaces (did you mean boost::spirit::_1, boost::phoenix::placeholders::_1, stuff like that)
@Xeo Here:
 
It's spam. My eyes don't even let it reach my brain now that I've trained them.
 
test.cpp:1:12: error: expected ';' after struct definition
test.cpp: In function 'int main()':
test.cpp:5:5: error: request for member 's' in 'x', which is of non-class type 'X()'
 
Xeo
Call it verbose, but...
t.cpp:1:13: error: expected ';' after struct
struct X { }
            ^
            ;
t.cpp:4:6: warning: empty parentheses interpreted as a function declaration
      [-Wvexing-parse]
  X x();
     ^~
t.cpp:4:6: note: remove parentheses to declare a variable
  X x();
     ^~
t.cpp:5:3: error: base of member reference is a function; perhaps you meant to
      call it with no arguments?
  x.s = 5;
  ^
   ()
t.cpp:5:5: error: no member named 's' in 'X'
  x.s = 5;
  ~~^
xD
 
12:07 AM
@Xeo Eeek. I'm not sure I'd like that. Though I'd probably get used to it in return for faster tempalte compilation times
 
I'd rather have usable -Wfatal-errors.
 
Xeo
@sehe why horrific?
@RMartinhoFernandes In what sense?
 
Like you said: verbooooooose? And I have trouble correlating the actual message with the dodgy ascii art error marker
The direction of the ^ 'arrow' seems to link it to the message below the marker. Why does the bloddy line need to be split, anyways?
 
Xeo
@sehe I meant for the undeclared type foa, did you mean foo
 
@Xeo GCC will stop after printing the first message. In case the error is, for example ambiguous call, it won't list any candidates, making the message worthless.
It's silly.
 
Xeo
12:09 AM
Ah
 
Just plain unusable.
 
@Xeo It isn't useful for a compiler to start guessing about the intent of code. It is C++, and if we wanted intellisense, we'd have it in the IDE, not the compiler?
 
Xeo
It's just a single line, although the rest of the error messages are based on that assumption
(if any)
 
@RMartinhoFernandes IOW, for the very same reason I don't run my code through a spell checker
 
What is the merel?
 
12:12 AM
So, expending an entire line, to show me (the dumb user) what a ; semicolon would actually look like, at that position? Don't make me laugh
 
user142019
@sehe imagine you have very large names like "TWTweetComposeViewControllerDelegate" and you are using VIM?
 
@WTP Ctrl+P.
 
@WTP I am using vim
 
user142019
One typo and you have no idea what's going on without decent error messages.
 
Vim is awesome.
 
12:13 AM
^N/^P
 
@WTP Vim has auto-completion, silly.
rmf@aarika ~]$ g++-4.7 a.cpp
a.cpp: In function 'int main()':
a.cpp:13:8: error: call of overloaded 'f(a&)' is ambiguous
a.cpp:13:8: note: candidates are:
a.cpp:1:5: note: int f(int)
a.cpp:2:5: note: int f(double)
a.cpp:3:5: note: int f(char*) <near match>
a.cpp:3:5: note:   no known conversion for argument 1 from 'a' to 'char*'
[rmf@aarika ~]$ g++-4.7 a.cpp  -Wfatal-errors
a.cpp: In function 'int main()':
a.cpp:13:8: error: call of overloaded 'f(a&)' is ambiguous
compilation terminated due to -Wfatal-errors.
@Xeo: see, very helpful :(
 
Xeo
gimme a.cpp
 
@WTP Also, if that is true, you have bigger problems :) I'd expect an 'identifier undeclared' error.
 
Xeo
01:15:06 $ clang++ t.cpp -Wfatal-errors
t.cpp:13:5: fatal error: call to 'f' is ambiguous
    f(x);
    ^
t.cpp:1:5: note: candidate function
int f(int);
    ^
t.cpp:2:5: note: candidate function
int f(double);
    ^
 
12:15 AM
Woot.
 
Xeo
notes, not warnings :)
makes all the differences
 
(Also, I remembered that I have clang installed, so I can try myself)
@Xeo GCC uses notes as well.
But it's fucking stupid and omits them if you use -Wfatal-errors.
 
Xeo
Oh, right
Well, yeah, stupid GCC
 
You thought it made sense, lol.
> A STL::find does not work when using strdup
What's wrong with title?
 
Xeo
STL? A? Everything? The one who wrote it?
 
user142019
12:17 AM
At school we are thought a language where assign to uses ":=" instead of "=" and equals is "=" instead of "==". I got over fifty compile errors related only to that. I had no idea what I did wrong.
 
I think the worst is strdup.
 
Xeo
hrhr
@WTP Well, := is scientifical notation IIRC, and = is used for equal in math
so it actually makes more sense than C++ operators
And avoids the stupid errors of if(x = y)
 
Pascal has that.
 
Xeo
(though any decent compiler should warn)
Aye
 
Is it frowned up on to ask a question on Stack Overflow which could be a real question but obviously isn't? ... just so that I can answer my own question?
 
Xeo
12:19 AM
I learned Delphi in High School
 
@Xeo That can be avoided by not treating assignment as an expression.
 
user142019
I think the language is Pascal. I'm not sure. Nobody ever told me.
 
@DietmarKühl Answer your own question? That's okay.
 
Xeo
@DietmarKühl That's fine. If you found out something, that you think would interest other users, or you're writing an FAQ entry, go for it
 
So, I could ask "how do correctly read all lines in a file?"
 
user142019
12:20 AM
Anyway, I completed my homework in that horrible language and I don't need to touch it ever again, fortunately.
 
I think that's already answered somewhere. ICBWT.
 
Xeo
Define "correctly" :)
 
well, that isn't necessarily I just found out but it seems to be one of these things which is asked so often and I have never actually seen (or given for that matter) a complete answer!
 
Xeo
Then make it a proper entry.
 
correctly? well, all the usual stuff: not read any line twice, not skip any one line, work in cases where things are up against you!
... and I should make a point of trying to put in all the words making up a sentence! rereading some of my statements here yields appalling omissions and typos. ;)
 
12:24 AM
Posted by Jeff Atwood on July 1st, 2011

The FAQ has contained one key bit of advice from the very beginning:

It’s also perfectly fine to ask and answer your own question, as long as you pretend you’re on Jeopardy! — phrase it in the form of a question.

So …

if you have a question that you already know the answer to

if you’d like to document it in public so others (including yourself) can find it later

it is OK to ask, and answer, your own question on a relevant Stack Exchange site.

To be crystal clear, it is not merely OK to ask and answer your own question, it is explicitly encouraged. …

 
Xeo
Well, "correctly" might be pretty broad, but lets see what the SO community says. I'd expect a close vote or two as NARQ (overly broad), though.
 
wow! I clearly have missed that one! ;)
 
@RMartinhoFernandes Light_ness_ Races in Orbit will fix that
 
Xeo
@sehe "Lightness Races"
Whatever that means
I first read it as "Lightning Races"
 
well, I think I would be up to phrase the question such that the title is extremely broad but the details nail it down to the very common case. Including making it a real question.
 
Xeo
12:26 AM
Well, I'd still prepare the answer beforehand and post it asap, or maybe add the faq entry disclaimer below the question as seen here
 
cool, thanks! I shall write this up although probably only tomorrow.
I was thinking of giving other on Stack Overflow the chance to provide wrong and/or incomplete answers ;)
 
Xeo
lol :)
 
Some people don't like it if you have an answer and wait before posting (you are "wasting their time"), while others don't like it if you don't give them time to answer themselves (you are "trying to farm the rep for yourself"). You can't please them all, so there's really no correct choice.
 
user142019
Don't answer at all?
 
interesting.
well, I can live with having written an answer I won't post if it a complete answer is given otherwise.
I seem to get enough rep...
 
user142019
12:30 AM
It is 01:30 AM so I'm going to sleep.
 
maybe I'll point out that I'll give an answer in the question
.. and see how it goes.
... but I'll sleep over this anyway ;)
 
user142019
Never answer the question in your question.
 
The clean rooms in which silicon chips are made, are 1000 times cleaner than your average hospital operating theater.
isn't that crazy?
 
Meatbags are sloppier when messing with meatbag innards than when messing with robotic lord machine innards.
 
It seems so
when I had my last surgery, the nurse brought her handbag into the operating theater. I was like WTF?!
 
Xeo
12:40 AM
Well, a few dust particles here and there are no killer for your body. For a chip, it is
 
> It is estimated that about 10,000,000,000,000,000,000 transistors are shipped each year, or about 100 times the number of ants estimated to be on Earth.
 
I never had surgery. Merely the idea of having it done on me scares me to death. I mean, people cutting me and handling my guts? I hope not.
 
from Intel's website
@RMartinhoFernandes yea well, for me it's unfortunately happened a few times already
 
But then, I'm also scared of needles, and I usually faint when I take a vaccine :S
 
oh yea, i know the feeling, the injection they use to put me to sleep scared me more than the idea they were going to break my ankle
sorry, didn't mean to put you off :(
 
12:49 AM
:') Terrible puns on gizmodo
 
1:20 AM
> Fairly experienced programmer ... I'm doing my first algorithm
 
:D
Is there any site except red3 where I can read/learn/ see more code/ find out about Artificial Intelligence?
from minor student projects to all-in about AI is welcomed.
 
AI doesn't exist yet
come back in 30 years
 
:(
I will be dead for sure until that time. :(
I give myself no more than 10 years. :(
this disease is killing me very fast.
but no cure for it has yet been found
 
What disease?
 
the worst case of nerve infraction, so far because of it I gained diabetes, lumb failure and so on :(
I don't feel comfort to talk about it, you know. :(
And if you think about it, 10 years is really long. :)
 
1:34 AM
Ouch, sorry to hear
Did you enter that AI ant competition?
 
I don't know why I said all this. Sorry for pointing it out, it is really emberrasing.
I didn't. However I want to learn more about AI, if possible, by studying some papers or codes about it.
 
Forums might be interesting to read: forums.aichallenge.org Doubt they're very academic though
 
Thank you, this is actually quite interesting. :) I will drop an eye on it.
 
AI has evolved over the years - at one time, rule-based AI was popular, and then neural networks for pattern recognition... ...these days, statistical learning methods seem to be popular. Which algorithm is better is highly dependent on the specific problem you are trying to solve.
"General AI" - the kind you see in the movies - is probably still very far off
 
Yeah, I know. But I think AI will evolve more quicker than anyone of us think here.
 
1:41 AM
this is a good survey of recent methods:

http://www.amazon.com/Principles-Machine-Learning-Springer-Statistics/dp/0387981349/ref=sr_1_2?ie=UTF8&qid=1327455675&sr=8-2
@DzekTrek unfortunately, many people have thought the same as you for the last 30-50 years. There are definitely breakthroughs in machine-learning for very specific tasks, but the kind of leap that's required for "real AI" - not as easy as we think.
 
Thank you @kfmfe04 on the provided link.
@kfmfe04 , who knows, time will tell it all. :)
 
Yeah, AI growth moves very slow
More processing power doesn't really solve it
 
@DzekTrek it's a wild, wild guess, but I think maybe we will get Nuclear Fusion before we get AI
 
The problem with AI is that it will be of very little use until it is as smart as a human. Of course at that point there will be very little use for humans.
 
The scary part about AI is the Singularity
Technological singularity refers to the hypothetical future emergence of greater-than-human intelligence through technological means, very probably resulting in explosive superintelligence. Since the capabilities of such intelligence would be difficult for an unaided human mind to comprehend, the occurrence of a technological singularity is seen as an intellectual event horizon, beyond which the future becomes difficult to understand or predict. Proponents of the singularity typically state an "intelligence explosion" is a key factor of the Singularity where superintelligences design succes...
 
1:46 AM
Scary? Sounds pretty cool to me
 
Cool, in a sci-fi sense - in reality, scary to me
 
Well yeah, scary that humans may one day be obsolete. Cool in technological sense.
 
@kfmfe04 ,Both, nuclear fusion and AI are useful to human kind, so which one comes sooner is completely irrelevant to us. However, you have a point, that Fusion will come sooner than AI. :) @Pubby , Both, dump and intelligent machines will be very useful to human kind in it's own way. :)
In the future, there must be some sort of control over AI beings, don't you thinks so?
 
I personally think there will be more positives + negatives wrt to AI than nuclear fusion, but this is total conjecture. AI will certainly put a lot of people out of work (for better or worse). Computers are already doing so, like the way the Industrial Revolution has in the past, but since we're living right in the middle of it (Info Revolution), it's hard to have the right perspective on its NET impact.
Regardless of how we feel about these things, we'll get them all one day - AI, fusion, advanced bioengineering/genetics, etc...
 
It's now matter of decades. :)
 
1:54 AM
I don't understand a lot of it, but I think Modern Physics (with their giant colliders) has advanced much faster than AI - the precision that they can measure time and distances is really sick! (part of it does come from having faster computers, though). String Theory does smell fishy, though...
@DzekTrek this is part of the fear behind the Technological Singularity - losing control over AI - the subject of countless movies and novels
 
From your perspective, what do you think about the Theory of Super strings? Is it rational and what impact will it have for future generations? :)
@kfmfe04 , :)
 
Well, the critique against String Theory is that it's mathematical masturbation and not a theory at all - it has been said that String Theory is "Not Even Wrong" in the sense that a theory has to be provable or disprovable
every time something doesn't fit String Theory, they just add more dimensions or adjust the Theory
 
:) I didn't know that. I thought there were really serious talks about it amongst scientific society.
 
String Theory, by default, is what is being taught in all colleges (part of the problem - not enough creativity/diversity in exploring possible alternatives).
Physics is a very strange subject when you think about it. It has an odd relationship with mathematics over history. In modern physics, more often than not, the mathematics will tell you something like "given what we know, and if the math is right, black holes should exist". The astronomers hear this and start looking for black holes. They find black holes.
 
Indeed, how could you explain space if it wasn't there before?
 
2:03 AM
Countless astronomic discoveries have come about this way - math first and then physical discovery next.
 
:D
I didn't know that.
 
Even space is weirder than we imagine.
 
Very true.
Do you want to know what I think about this all?
 
In classical physics, it was the other way around. You would observe something and then try to come up with the math to describe it. Now, it's the other way around.
 
I think that our universe is just another tiny part of some greater space area. We can be just an atom of some space that is beyond our imagination of thinking. :)
But, my question is where it ends or starts?
 
2:06 AM
Your theory is just as valid as any other theory out there until it's disproved!
 
I mean we have molecules in our world, then our world, then world in which our universe is just molecule and so on
where it ends or start?
Exactly, that's just my thought, nothing else.
 
There is actually one theory that space bends back on itself. So if you fly in a spaceship for a very very long time in one direction, you will end up in the same spot.
 
Yes, I thought that so too.
 
That theory hasn't been disproven or proven yet - it is just one of the possible models of an expanding universe.
 
I think space is like a circle shapped object, just like molecules in our world are.
so, if you go from one place to another, you will eventually end up in the same location
where you started your journey.
 
2:09 AM
Actually, iirc, space is being "made" all the time, as the universe expands, not unlike how the surface of a balloon keeps getting bigger. I think that's the current model.
 
But, real issue is who started all this, I mean I can't figure it out using any possible scenario. :(
I see, expanding universe.
What do you think, what causes that expanding?
I mean, by some reference it must be doing it.
It can't just trigger it without any cause, or can it?
 
Well, the crazy thing is, modern physics has advanced to the state where they can describe the universe up to 10^-37 seconds after the Big Bang. Before that, they don't know yet.
That's insane when you consider that the known universe is 13.75 billion years old.
The Big Bang theory is the prevailing cosmological model that explains the early development of the Universe. According to the Big Bang theory, the Universe was once in an extremely hot and dense state which expanded rapidly. This rapid expansion caused the young Universe to cool and resulted in its present continuously expanding state. According to the most recent measurements and observations, this original state existed approximately 13.7 billion years ago, which is considered the age of the Universe and the time the Big Bang occurred. After its initial expansion from a singular...
 
:) But it makes me somehow proud for knowing we are all part of the universe.
What triggered that Big Bang?
 
I think they're still trying to figure that out.
 
OK, we all know it was because of some extremely dense state in which our universe was, however, no one explains because of what that state was made?
I see.
Also, I am being fascinated about the parallel universes.
 
2:18 AM
You have to realize that in the 1st second after the Big Bang, the conditions are so inconceivable that the actual laws of physics were "different" - in the sense that the only way we can see what it was like back them is to smash atoms together in a collider. Besides that, we can only observe the current universe, turn back the clock, and extrapolate what it was like.
To talk about before the Big Bang is just way beyond us at this point, I think (we can only guess).
You have to realize that the Big Bang Theory itself has only been around since 1927 - a very short time.
 
The thing is that parallel universes, for me, are nothing but universes that are similar however I don't feel that they contain conditions like our universe has. I mean, just look at two atoms, in general they are same, however if you go deeper you will find that the bariyons( which I think our universe is the equivalent to some outer space) are completely different in the terms of structure.
I see.
But can we imagine a scenario without BB?
 
Yes, I think there are alternative theories.
In fact, some have been introduced to explain Dark Matter (I think DM doesn't play well with BB).
 
I don't know yet what is DM. :)
 
I don't know much about those theories. A good forum to browse is here:
http://www.physicsforums.com/
 
Thank you for providing me with this link. :)
 
2:23 AM
In astronomy and cosmology, dark matter is a currently-undetermined type of matter which accounts for a large part of the mass of the universe, but neither emits nor scatters light or other electromagnetic radiation, and so cannot be directly seen with telescopes. Dark matter is presumed to constitute 83% of the matter in the universe and 23% of the mass-energy. Dark matter came to the attention of astrophysicists in recent decades due to discrepancies between the mass of large astronomical objects determined from their gravitational effects, and mass calculated from the "luminous m...
It is one of the fiascos of modern physics that dark matter cannot (yet) be explained!!!
 
I see, they named it like that because they can't explain it right now, but are sure that it exists.
 
Yes, but it's also dark, in the sense that it doesn't reflect EM radiation (light), but has mass.
They also don't know what it is made of
 
I see.
 
Physicists don't know what makes up 83% of the universe - kind of embarrassing...
 
Are there any speculations?
 
2:26 AM
Yes, I think plenty - certain to garner a Nobel prize if any of them are right
This is another interesting one:

http://en.wikipedia.org/wiki/Spooky_action_at_a_distance
Quantum entanglement occurs when particles such as photons, electrons, molecules as large as "buckyballs", and even small diamonds interact physically and then become separated; the type of interaction is such that each resulting member of a pair is properly described by the same quantum mechanical description (state), which is indefinite in terms of important factors such as position, momentum, spin, polarization, etc. According to the Copenhagen interpretation of quantum mechanics, their shared state is indefinite until measured. Quantum entanglement is a form of quantum superposition...
observations of QE has caused confusion about causality (what causes what)
the particles are apart, but somehow "entangled" with the counterpart over distances
 
I see.
This is new to me, I didn't know it before.
 
QE is related to Quantum Cryptography (so it comes back to computers)

http://en.wikipedia.org/wiki/Quantum_cryptography
Quantum cryptography describes the use of quantum mechanical effects (in particular quantum communication and quantum computation) to perform cryptographic tasks or to break cryptographic systems. The use of classical (i.e., non-quantum) cryptography to protect against quantum attackers is also often considered as quantum cryptography (in this case, one also speaks of post-quantum cryptography). Well-known examples of quantum cryptography are the use of quantum communication to securely exchange a key (quantum key distribution) and the (hypothetical) use of quantum computers that would al...
 
But then again, what causes entaglement of the particles?
 
user406009
Someone should rename the channel to "Lounge<Physics>." I swear half the discussions here are about random physics.
 
Join us Ethan, you will learn something more about the space you live in. :)
 
2:32 AM
I think they're trying to figure that one out, too!
But the point I was trying to make was that advances in modern physics over the last 50 years are actually much more exciting than advances in AI... ...imho
 
I see.
 
I mean Google making a car that can drive itself is pretty neat... ...that could be worth looking into
 
The reason for it may be that psychics was well established science way before 1950's, and AI was in the begin.
 
...but it's not quite as exciting as the "invisible cloak" that physicists have been pulling over the last few years.
 
invisible cloak, this is the first time I hear about it. :)
it sounds classy. :D
 
2:34 AM
it has been said that advanced physics and engineering is indistinguishable from magic
 
:D
This is utterly cool!
 
yup 8^)
just like Harry Potter - LoL
 
@kfmfe04 , sorry for asking but are you a scientist?
 
hahaha - no - not at all - just a science geek/technophile
 
cool! :)
 
2:40 AM
if you like these kinds of things, this is interesting, too - they finally got squirrel suits working right in the last 5 years or so:

http://www.youtube.com/watch?v=TWfph3iNC-k
man still can't fly yet, but they're getting pretty close
 
:D COOL!
I would like to fly in that suit.
 
lmao - funny video
 
:D Tesla was one of the greatest scientists mankind has seen.
however, this video is nothing but fraud
but I wish it was true. :)
 
aye - Tesla was one smart cookie - saw a documentary once showing how Edison was trying to promote DC over Tesla's AC - in the end, Tesla was right - transmitting power over long distances via AC is more efficient
 
very true
Edison stole from him many patterns and presented it as his own
plus, because he owned many stations in the city he wanted to impose DC instead of much efficient AC.
he was a way ahead of his time. :(
Take a lot on one of his experiment, en.wikipedia.org/wiki/Philadelphia_Experiment
 
2:55 AM
hehehe - interesting read
 
Also, did you know that Tesla, three days after his death locked himself in the room, dressed ceremonially and when the time came he simply laid on the bed with crossed arms and closed eyes, it's like he knew he was going to die.
 
After his death?
 
before his death*
sorry, it kinda too late, and my brain just doesn't function normally
 
Yeah, I know what you mean
 
3:15 AM
Ah, three days is how long it takes to die of dehydration…
 
4:03 AM
I finally managed to use a Bimap to answer a question. Yay. I like bimaps, though they come up far too little.
 
nice solution, @KerrekSB
 
@DzekTrek I figured that if you have to do something so convoluted as the OP does, then he isn't using the right container...
 
so true.
 
4:31 AM
I can't help wondering, is there anyone on the internet who actually supports SOPA?
 
@IntermediateHacker DailyWTF, hehe
 
 
3 hours later…
7:09 AM
@TonyTheLion You need a salt also
 
sbi
7:21 AM
@TonyTheLion I don't even have so many questions, let alone popular ones!
@Xeo Oh, you did?! Great!
@Xeo You weren't around when we had to make do without template instantiation traceback in its error messages, otherwise you'd appreciated as much as we old farts do.
 
8:05 AM
man… I've got the sloppy legacy inertial navigation code blues
 
sbi
@Potatoswatter I just had to reboot my internal parser after trying to decode that. I will not try again. Rebooting your brain (or parts of it) is a painful experience.
 
@sbi I'm surprised you're back so soon! I hope you didn't use a literal boot.
 
sbi
@Potatoswatter Having kids waking me in the middle of the night because they needed to pee, or puked all over their bed, or had a bad dream, or just thought that 3:41am is a great time to wake up and make a fuss, is a great encouragement to keep brain booting times down.
 
I've inherited some code which attempts partial, approximate inertial navigation. Most of it is just spinning its wheels copying data from one array to another and calling no-op stub functions which won't be needed.
@sbi Yes, kids will also boot your brain in the literal sense, when jumping into your bed.
 
sbi
@Potatoswatter Ugh, legacy code. The bane of our profession.
 
8:14 AM
Fortunately I'm probably free to get rid of it entirely. It never feels like the right time to rip apart a project, though. Either you're not sure what you're doing yet, or you're already accustomed to it, or the management has already decided that it's good enough after all.
The former risk is the best this time, fortunately :)
 
sbi
Oh dear. Mozilla are inventing yet another programming language that will "replace C++ ultimately". Time 2 consider a Firefox alternative!
 
Will this start a race to see if Google can rewrite Chrome in Go before Mozilla can rewrite Firefox? Time for more browser market stagnation.
Seriously, it's easy to talk big in open source… but the masses will make the reasonable choice. (Well, the conservative one anyway.)
 
8:35 AM
@sbi I don't follow the logic there. A company who made a product I like are making a product I think is pointless, so I am going to stop using the product I like
morning all :D
 
IMO C++ is a misnomer, it should be C + 1
 
anyone here who can keep a cooler head than me regarding rvalues/lvalues/temporaries? Would the const reference here extend the object's lifetime? const Foo& f = somecondition? Foo(x) : Foo(y);?
 
@jalf I think yes.
 
Yes, the conditional operator is defined to preserve the value category of its operands when they match.
 
never mind, it didn't solve my problem anyway
but thanks :)
@Potatoswatter so because the operands are temporaries, a temporary is returned, and therefore the const ref thing will work, is that correct?
 
8:44 AM
@jalf Yep.
 
Hello
 
9:00 AM
@thecoshman "Oh my, somebody doesn't like C++ and they're actually doing something about it, how can I live with their products."
 
@CatPlusPlus I'm not sure what side the fence you are on. I was getting out how stupid it seems to decide to not use a Firefox just because Mozilla want to make an alt to C++
 
I'm mocking the "Mozilla are inventing yet another programming language that will "replace C++ ultimately"" part.
As far as I can see, they're mostly interested in replacing C++ for themselves.
 
yeah, well it sort of makes sense. Facebook developed a do dad to perform some magic on PHP code, as it fitted there needs better. Not sure what the problem is with C++, perhaps too much control and power?
 
sbi
@thecoshman If in doubt, always assume the @Cat is mocking.
 
@sbi lol, or napping :D
oooh, have you guys seen the cat eyed Indian (I think it was) boy?
He's like a real life Riddick :D
 
9:07 AM
didn't Riddick removed his iris to better see in the dark?
 
He had his eyes 'polished' what every that would mean. But I was getting at his ability to see in the dark
 
Oh, hey, that Rust thing has expression if.
 
what?
 
let x = if the_stars_align() { 4 }
        else if something_else() { 3 }
        else { 0 };
 
oh, I see... rather then having wrap the function calls in brackets
 
9:14 AM
No, the point is if is an expression, not a statement.
 
o_0
I'm just going to smile and nod politely
 
ZOMG just like the ternary operator
 
> const uint WmDieMessage = WM_USER + 0xD1E;
I like self-documented code
 
Does it have lambdas too?
 
Except without arcane syntax and allowing more branches.
 
9:16 AM
@CatPlusPlus How does it allow more branches?
Are there additional dimensions or something?
 
Well, look at that code above.
And translate it to conditional operator.
 
Yes… I see three branches.
 
Hint: you need two.
 
auto x = the_stars_align? 4
            : something_else? 3
            : 0
 
Nested and ugly.
Now add two more.
 
9:17 AM
Uh, your example is also nested. It's exactly the same, just with punctuators instead of words.
 
Typed literals, ew.
But it has built-in tuples
No implicit conversions between integers.
 
Pickiness over integer types is probably the critical feature. Overflows are not good in a web browser.
 
It has conditional operator, too, if you love it so much.
No implicit boolness.
Oooh, pattern matching.
 
9:36 AM
Heh. Pattern matching adds a temptation which might undo the effect of the safety features.
 
 
2 hours later…
11:22 AM
getting kind of tired of this. The department I work in seem to have a very, loose name. No one seems to be able to agree on what it is prefixed with; CMS, CS, WRAN or MOM
 
YO_MAMA
That should clear things up.
 
what is std::is_constructible ? and std::is_trivially_constructible , trivially in what sense?
 
int is an example of a trivially constructible type. In very rough terms, 'no constructor call is involved'.
 
@CatPlusPlus The "ultimately" it to be interpreted as +Infinity.
 
@LucDanton still didn't get , use any examples please?
 
11:34 AM
int vs std::vector<T>
 
@LucDanton so int is std::is_constructible?
 
My examples are about trivially constructible types, not the std::is_constructible trait.
 
@LucDanton ahh , so what about std::is_constructible ?
 
Given the following function prototype:
template <class T> typename add_rvalue_reference<T>::type create();
the predicate condition for a template specialization is_constructible<T, Args...> shall be satisfied if and only if the following variable definition would be well-formed for some invented variable t:
T t(create<Args>()...);
[Note: These tokens are never interpreted as a function declaration. —end note ]
Access checking is performed as if in a context unrelated to T and any of the Args. Only the validity of the immediate context of the variable initialization is considered. [Note: Th
So simply put, you can call a constructor of sorts, in the case of int, e.g. int() is also wellformed, so it works out.
there are a lot of subtleties attached though.
 
@rubenvb aah , now got the overview , Thanks @rubenvb @LucDanton
 
11:39 AM
Hm. My executable is failing to find a few libraries, despite apparently linking with them fine. I know it links with them because ld complained when I removed the .so files as a test. Is this question worthy, or am I being an idiot? (I did try searching but came up with nothing) pastie.org/3244362
 
@LexiR How familiar are you with how shared libraries work on your system?
 
On the uni systems? No idea. On my debian server I managed to use some shared libraries but I'd installed them as root.
 
In your case linking seems to be fine but dynamic linking/loading is the problematic part.
In other words the executable is compiled just fine but the runtime doesn't know where to find the dynamic libraries the executable depends on.
You can use LD_LIBRARY_PATH=path/to/dso ./executable which has the advantage of not messing with your system.
Or yes, you can install them.
 
I can't really, I have quite limited privilages
Is there a way to do LD_LIBRARY_PATH without resorting to a .sh script to set it before calling the executable?
 
You can also encode a library search path (RPATH) into the binary, see eyrie.org/~eagle/notes/rpath.html for further notes
 
11:44 AM
Yeah, using a wrapper that sets LD_LIBRARY_PATH is best practices I think when it comes to development: libraries used during development can change a lot and may not be the most reliable libraries to use for your whole system.
@LexiR I recommend a wrapper script. Nothing wrong with that.
 
Just took in the sight of my own desk, just piles of paper ever where!
 
@John: Thanks, that worked.
 

« first day (466 days earlier)      last day (4468 days later) »