« first day (490 days earlier)      last day (4444 days later) » 

10:00 PM
loL!
 
void foo() { S::instance().bar(); }
 
Ell
@FredOverflow thank you :D
 
its the canadian rangers!
 
You can't tell it depends on S.
 
@FredOverflow did you see the SO C++ FAQ I started
 
10:00 PM
You have to read the entire body.
You can't mock it.
You don't know if the singleton needs some silly configuration first.
 
Dear God, Singleton is building DP, not behavior one.
 
You don't know what S might depend on, because it uses ten singletons more.
 
my singleton is configured silly :P
 
It's always a horrible mess.
Singleton is shit DP, if we're inventing silly terminology.
 
son, I am dissapoint.
 
Ell
10:03 PM
What should I google for the constructor that takes an instance of the same class? e.g.
MyClass one(1);
MyClass other = one; // <-- This constructor (or is it just constructor then assignment?)
 
What? It's a pattern for designing towers of crap.
Name fits.
 
@Ell Copy constructor.
 
Ell
@DeadMG thank you
 
T y; T x = y; never uses assignment.
 
@Ell And it is copy construction, not assignment :_
 
10:04 PM
It's temporary and copy-ctor or direct initialisation if optimised.
 
Ell
thank you! There is so much to remember :L
 
Well, not temporary here. You get the gist.
 
hi all guys!
 
Oh noes :)
 
10:05 PM
@dzek-trek Darova Brat! :)
 
All: new language, Julia; haven't read it, yet, but claims to aim for 'Speed of C' and be 'descendent of lisp':
 
Ell
I have a naming problem :S I have a class that loads images from files and keeps ownership of them but I don't want to call it ImageManager because it just loads them and stores them so maybe ImageCache or something sounds more appropriate, what do you guys think?
 
@SethCarnegie no
 
ImageCache is fine
 
AbstractSingletonImageFactoryManager
 
10:07 PM
Well, ImageCache is basically what it does
 
@FredOverflow take a look
 
@CatPlusPlus It's not incorrect to say that a temporary is conceptually involved.
 
sorry guys I couldn't help that one
 
Who has count Integral calculations with closed interval with aproximation its with count Trapezoid square?
 
blog.serverfault.com is still offline. What the f*ck did happen to SO server room
@user1131997 who 'has' what?
 
10:08 PM
Angry monkeys.
 
@SethCarnegie looks very nice at firt glance
 
Drunk Unicorns
 
@sehe in this room
 
@user1131997 ?!
 
@FredOverflow but not at second glance? :(
 
10:09 PM
@Insilico Horny Unicorns.
 
@SethCarnegie I only took a first glance so far ;)
 
(... second glance in progress ...)
Hungry Apes
 
@StackedCrooked: Drunk, horny unicorns?
 
i++ + ++i;   // I'm hungry for pizza!
 
@Insilico Yeah, that sounds just right.
 
10:10 PM
@Insilico Drunk, unicorny primates.
 
@FredOverflow lol
 
I knew you'd get it :)
 
I still don't know what's a "count Integral calculations with closed interval with aproximation its with count Trapezoid square"
 
Pseudo code:

let Integral -> int
a,b -> closed intervals
let Summation -> sum

int[b, a] = ( f(a) + f(b) / 2 ) * h + sum [ i = 1 -> n - 1] f( x.i ) * h
 
GAWD stupid robot! winks on "Error, battery level to-" dies, again
 
10:12 PM
@FredOverflow It doesn't work for me because I don't have a creditcard
 
@sehe Me neither, but my mum allows me to use hers.
 
@sehe in that case it gives you a credit card then uses it
 
@SethCarnegie Ok, but the credit limit is undefined :)
 
@user1131997: I'm pretty sure integrals are not defined like that
 
@Insilico it's aproximate calculations
 
10:13 PM
@user1131997: Do you mean en.wikipedia.org/wiki/Trapezoidal_rule?
 
with generating many trapezoids with couintg its square
 
what if everyone spoke in code
 
Ah so you want a definite integral
 
@Insilico to count the closest value
 
Who needs credit cards when you've got debit cards.
I count not being able to spend money I don't have as a plus.
 
10:14 PM
@Insilico I have said about closed periods
 
"cout less than less than quote hello mom! quote semicolon"
 
@Insilico closed periods are only in definite integrals
 
UB has also been known to write cheques when credit cards are unavailable
 
UB is a very considerate person.
 
@user1131997: Why didn't you just say "I'm trying to implement the trapezoidal rule"?
 
10:16 PM
@Insilico because teapezoidal rule is not only for definite integrals
 
It's too clear.
 
@user1131997: What else do you use it for besides definite integrals?
 
template <class ContainerA, class ContainerB>
double trapezoid_integrate(const ContainerA &x,  const ContainerB &y) {
    if (x.size() != y.size()) {
        throw std::logic_error("x and y must be the same size");
    }
    double sum = 0.0;
    for (int i = 1; i < x.size(); i++) {
        sum += (x[i] - x[i-1]) * (y[i] + y[i-1]);
    }
    return sum * 0.5;
}
from the WP page ^^ might help
 
@Insilico where approximation is needed, it's needed not only for integrals
 
[citation needed]
 
10:19 PM
sorry, one more XD
 
I propose a redefinition of the acronym STL to mean STandard Library
 
@Insilico An approximation is a representation of something that is not exact, but still close enough to be, and why this calculations method is olny for integrals by your meaning, approxamation is not only for integrals
there is also diophantine approximation, which hasn't any common with integrals
 
@user1131997: I'm sorry, I'm really trying to understand what you're talking about but I can't grok what you've just said
The Trapezoidal rule is for definite integrals
other approximation techniques exist for other purposes
 
@Insilico I mean approximation is just calculations , which are not exact, but very close... there are different methods to cacluate closest values with integrals not only using trapezoids, there are many diffrent methods
 
Well yeah. And the trapezoidal rule is one of them
But then you said that the trapezoidal rule can be used for situations other than definite integrals
I don't agree with that.
 
10:26 PM
@sehe Julia is a wretched name for a language
 
@Insilico there is also derivative
 
@SethCarnegie I take it that has been your (famous) first glance :)
@SethCarnegie I don't care for the name (If anything I seems related to Lissajou or Mandelbrot)
 
@user1131997: You don't use the trapezoidal rule for derivatives, you use it for definite integrals
 
@sehe names don't require second glances (it may be a fine language but the name still sucks)
 
Bob
anybody who have any recommendations on books for learning UNIX/Linux
 
10:28 PM
@SethCarnegie Why. Your ex named Julia?
 
@Bob go with Arch and read the wiki and you won't need a book
 
Bob
@SethCarnegie Arch?
 
@Bob ArchLinux archlinux.org
 
Arch linux
 
@Insilico is against law to use it for deriative? I can use it in graph, cause deriativing is the reverse process
 
10:29 PM
best distro of all time (with slackware coming in a moderate second)
 
Bob
ah, but I was thinking more about how to use the command line for setting up users, servers
all that stuff
 
@user1131997: It's not against the law to use it. Whether it's used correctly is a different matter
 
@Bob yeah, you'll learn that just by installing arch pretty much
 
@Bob You need to be sysadmin at once? Don't go there, or get proper training. You have to allow yourself time to play with things first, IYAM
 
@Insilico deriative is the reverse of integrals in some way and may to use the such method and for deriatives
 
Bob
10:31 PM
No, but somewhere I need to start
I have used Ubuntu
 
@Bob (I got the impression you meant multiple servers for an organization)
 
Bob
nono
 
@Insilico so if it's using for deriative, the trapeziodal rule is not only for integrals
 
Bob
Just for myself
 
Tell me you _are_ trolling with your 'deriative'
'trapeziodal' ?
 
10:32 PM
@Bob Arch gogogo
 
@user1131997: For numerical differentiation?
 
@Bob I'd say Debian, but Arch should be just fine too
 
@Insilico I think not only
@sehe no, I'm not
 
@user1131997 ... are you sure you know what a deriative is? (I mean deriativing is not exactly jargon)
 
I know too well that derivatives and integrals are "complements"
 
10:34 PM
@sehe delta y / delta x , lim x -> 0 , x != 0
 
@Insilico complements
 
But I don't see how the trapezoidal rule can be used to get derivatives
 
@Insilico in reverse way
@Insilico try to expand imagine
 
@user1131997: How about you learn to communicate better?
Just repeating something isn't going to help
If I wanted to find the derivative of something numerically I would use something like automatic differentiation (en.wikipedia.org/wiki/Automatic_differentiation), not the trapezoidal rule
 
@Insilico just expand imagine, what's your problem
 
10:36 PM
@Insilico you think, that wiki is full?
@Insilico reread the derivaties and integrals and think how trapezoidal rule can be used as wrapper in both stuff
 
@user1131997: What's "expand imagine"?
 
@Insilico The primary objects of study in differential calculus are the derivative of a function, related notions such as the differential, and their applications
@Insilico which is the main goal of deriatives?
@Insilico simply answer me
 
@user1131997 If you're so highly motivated, why are you bothering someone else to come up with the solution? You're looking for something new, trusting your imagination. Go on! Go get it!
 
@Insilico incrementing function, the derivative is a measure of how a function changes as its input change, yes ?
 
@user1131997: I know what calculus is. I know what the derivative is. I know what the integral is. I know what the trapezoidal rule is.
 
10:40 PM
@Insilico so who does not allow you to draw trapezoids in graph with couting deriatives?
 
@user1131997: What I don't see is why anybody would use the trapezoidal rule to find derivatives
When far superior methods exist
 
@Hoxieboy I'm starting to think your observation was too true. We might need a room subject change
@user1131997 couting deriatives <--- definitely a troll
 
@Insilico not using method for it is not making it wrong
@sehe trollophobia ?
 
@user1131997 No but it might make it uninteresting for others. Perhaps if you find a room for maths enthusiasts. 'Math experiments' or something
 
@sehe and where its unintesting?
 
10:42 PM
@user1131997 Hey, that's correctly spelled!
@user1131997 About everywhere. Why are you referring to my bowels, anyway
 
(define troll ( list name ) ( name : name ) )
(troll sehe )

:)
 
Ell
okay so this chat really doesn't work on phones...
 
I remember writing Basic program to solve polynomial equations in high school. It used Newton/Raphson algorithm. To be sure to find all zeroes it used numerical derivation to first find maxima and minima. I am sure it must be related to C++ somehoav.
 
sbi
What's with this flagging?
 
@AlfPSteinbach You can solve them with the quadratic formula.
 
10:47 PM
@Ell not in my experience. The input box renders halfway the page and text entry is a pain like alwas
 
@AlfPSteinbach: The trapezoidal rule is trivially implementined in C++ en.wikipedia.org/wiki/Trapezoidal_rule#C.2B.2B
 
and that is most assuredly Turing-complete
 
@DeadMG A Norwegian mathematician proved that there is no general formula for polynomials of degree 5 and higher. Uh, what was his name again?
 
sbi
What's with this flagging?
 
@AlfPSteinbach Oh, I thought we were only discussing quadratic polynomials. My mistake.
 
10:49 PM
@sbi I flagged. I thought @Insilico was being treated badly. But the perpetrator has apparently lost interest
 
Let me just say, no matter his name, he was a really able guy.
Died young, though.
 
who has worked here with A* algorith, T-tree & R-Tree?
 
Principles of Concurrent and Distributed Programming 2nd Edition by Mordechai Ben Ari ==> This file may contain materials which are inappropriate for some users. To access this file, please confirm you are 18 or older by logging in or signing up
 
@AlfPSteinbach: I believe you're talking about the Abel–Ruffini theorem (en.wikipedia.org/wiki/Abel%E2%80%93Ruffini_theorem)
 
10:50 PM
@sehe only the preface :(
 
sbi
@sehe Well, I certainly don't want to read all this discussion in order to find out how I stand on this flag. If there's nothing more you can provide, I'll vote "not sure" (which will make it harder to get the message/guy off the room).
 
@SethCarnegie Oh too bad. It started out with so many promising 'lead' pages
 
@DzekTrek what, who?
 
@sbi I was there, I voted "agree"
 
@sbi Well, that's your call. You can imagine how I'm not really interested in summarizing that same conversation. Also, I wasn't having it (at that time)
@sbi It was only a flag. I know how people feel about those. I don't care if it doesn't work :)
@SethCarnegie I starred your whitty contribution :)
 
10:54 PM
lul
 
@SethCarnegie Be careful with that: google 'lul dutch' (or: en.wiktionary.org/wiki/lul)
 
@sehe: "whitty" :-)
 
full disclosure: I'm Dutch
 
@sehe it won't let me delete my message.......
 
Not necessary :)
lul
I mean the common language here is clearly English
 
11:01 PM
@sehe: I thought it's C++?
Oh wait we're talking about spoken languages
 
accepted as secondary, but not everyone speaks it so well
 
Including those who think they speak it well, apparently
 
what do you think about porsche cayman?
 
@user1131997: I actually haven't driven it. So I defer to these people: youtube.com/watch?v=ppl4DFcRCPA
 
Even though google books doesn't let you view the entire book, you can search the full text of the book and get a few words on either side of your matched search; I am reproducing the entire chapter 1 by inching along with the search, searching for the last text I get from the previous search which gets me a little further into the chapter
 
11:06 PM
@SethCarnegie: What are you trying to search for in that book, anyway?
 
@Insilico I'm not trying to search it, I'm trying to read it
but I can't find it anywhere else yet
 
@SethCarnegie: It's out of print?
 
@Insilico are you asking or do you know that
 
@SethCarnegie: I obviously didn't read the chat transcript
 
@Insilico which? I'm lost :)
 
@Insilico what about it
 
Hey look blog.serverfault.com is back up.
 
11:14 PM
rofl
 
@Insilico Voice over: "The [...] sidewindows are said to be hydrophobic." Jeremy: "I think that means they got rabies"
 
lol derp
 
lol
 
@SethCarnegie Meta-monitors?
 
picture of weird kid "Old people used to poke me and say "you're next!" at weddings. Now I do the same at funerals"
 
11:16 PM
Or more like monitor monitors
 
@Insilico metametamonimonitors
 
no, advanced monitoring system
:3
@sehe "I'm starting to think your observation was too true. We might need a room subject change" starting? :3
 
Who are the room owners?
 
I know fredoverflow is one
 
was just about to post that link XD
 
If you click the "Frequently in this room" button, it's basically the same list as the room owners
 
"oh switches, what would I ever do without you? Oh, right, if-else :s"
 
"Although C++ beats Julia in the random matrix statistics benchmark by a significant factor, consider how much simpler this code is than the C++ implementation" (julialang.org)
 
@Insilico I noticed that - rather oldfashioned ublas code with lot's of C-style mallocs etc.
 
11:25 PM
Something tells me that the people behind Julia don't actually know how to write modern C++
 
@Insilico perhaps thats why they are making julia? lol
 
@Insilico I guess, it doesn't completely invalidate the point about the benchmark. I just hope they reviewed the code well enough to not make a caricature of them
Julia looks interesting enough to me. I might give it a whirl sometime
 
@sehe: It doesn't, but I'd rather they compare it to something like Blitz++ oonumerics.org/blitz
 
@sehe dancing with julia?
 
@Insilico also interesting is that Javascript is frequently on par with Julia performance-wise. Make me wonder what they do internally
 
11:27 PM
question: is there a way to include multiple libraries in one line?
 
@Hoxieboy: In C++ source code?
That's certainly compiler specific
 
@Insilico Yes, I'm sure its a compiler specific
...
nevermind :3 specifically in code::blocks, do you have any experience with that? or do I have to google this one :s
 
@Hoxieboy: I don't think there's a way if Code::Blocks is using GCC as the compiler
7
Q: #pragma comment(lib, "xxx.lib") equivalent under Linux?

JichaoI have a static library file called libunp.a, I do know I could use gcc -lunp xx to link to the library. I could use #pragma comment(lib,"xxx.lib") to tell the microsoft c/c++ compiler to include the library,how could I do it under linux/gcc? thanks.

(It says Linux but it's really about GCC)
 
@Insilico I doubt there would be much of a difference, though (unless they f*cked it up)
 
eh O.o guess its better to do it the old fashioned way then and not be lazy XD thanks though
 
11:32 PM
@sehe: True, although the many naked mallocs like that kind of concerns me
The benchmark they used can be made way simpler with RAII (a la std::vector)
 
I'm really surprised at how python and C++ are so similar
in terms of the language anyways :s
 
@Hoxieboy: How so?
 
the way they compare strings, and how the syntax is accordingly
 
You mean the use of "==" to compare strings?
 
They're not similar at all.
 
11:35 PM
no
and yes cat, they are
 
Nope.
 
you don't need to declare a variable type in python, but they look very similar
 
@Hoxieboy: Well, they're similar in a sense that they have flow control statements
 
I'm not talking about functionallity
@Insilico exactly :)
 
@Hoxieboy: Well, I can say that for just about any two programming languages in existence. :-)
 
11:37 PM
Oh, right, some random parts of syntax look similar, so the languages are similar.
How could I not see it all these years.
 
@Hoxieboy they're similar in the way that all humans have two arms and legs, but I wouldn't call all humans similar
 
They're both programming languages, so they must be similar, right?
 
let me show two code snippets, you'll see what I mean :P
 
@CatPlusPlus they're both composed of characters and symbols so they are completely the same
or very nearly completely
 
@CatPlusPlus: They both use tabs and spaces to organize source code
Just that one makes that mandatory
 
11:39 PM
@Hoxieboy You're talking to someone who knows both languages for years, writes Python professionally, and has gold badges in both and . Please.
5
 
cats, please, not rudely or anything, but stfu?
I'm making MY point
 
thanks
 
@Hoxieboy: Let's see said similar Python and C++ source code
 
x == 42
 
11:40 PM
let's put it this way: they're different in more ways than they are the same
 
Google is similar to reddit, because they're both websites.
Not very useful criterion, is it.
 
ok, just finished the code, not sure if its all correct, (didnt run either of them yet :3)
python:
def main():
	string1 = "Hello "
	string2 = "world!"
	id = "working"
	if(id=="working"):
		print(hello+world)
	else:
		print("No match")
C++:
int main(){
	string string1 = "Hello ";
	string string2 = "world!";
	string id = "working";
	if(id=="working"){
		cout << string1+string2;
	}
	else {
		cout << "No match";
	}
}
 
@Insilico That is without question. I meant the timing results should be ok, not the claim about the source code complexity
 
they look fairly similar to me is all I am saying, no need to debate that one can do vast sums more than the other, or that they "arent similar at all"
 
Oh my, syntax looks similar.
Except it doesn't matter.
Languages are designed with familiar syntaxes on purpose, it's semantics that count.
 
11:44 PM
@CatPlusPlus herp derp
 
And in those two snippets completely different things happen, so no similarity .
 
^^ derp number 2
 
    function main()
    {
        var string1 = "Hello ";
        var string2 = "world!";
        var id = "working";
	if(id=="working")
            print(hello+world)
        else
            print("No match")
    }
 
Yeah, okay, persist in nonsense, cover your eyes and write 'lalalala' 20 times.
 
@Insilico lol javascript looks easy :3
 
11:47 PM
Just don't be surprised you won't get very far this way.
 
Well, the point I was trying to get across is that languages can be very similar in syntax but have completely different semantics
For example, C++ is very similar to Java and C# in syntax
Which is not an accident; C# and Java was engineered to have similar syntax
 
E.g. string2 = string1; string2 += "suffix";, then display string1.
 
But C++ has RAII and C# and Java has garbage collection
 
I laugh at everyone trying to prove their points :)
 
Right back at ya.
 
11:48 PM
I wasn't trying to prove anything ;) I just thought they looked similar at a glance
doesn't mean they are :P
 
"I'm really surprised at how python and C++ are so similar in terms of the language anyways :s" chat.stackoverflow.com/transcript/message/2678678#2678678
 
@Hoxieboy "And ..... cut!" - phew that was a long take
 
much like saying "That cucumber looks oddly banana like!"
 
They're similar at a glance if you get easily blinded by syntax, yes. But perhaps the glances of others are more piercing than your own?
 
0
Q: Xcode 4.3 and C++11 include paths

StackedCrookedI installed Xcode 4.3 and want to test this C++11 program: #include <type_traits> int main() { } However, it doesn't find the type_traits header: ~ $ c++ -o test main.cpp main.cpp:1:10: fatal error: 'type_traits' file not found #include <type_traits> ^ 1 error generated....

 
11:49 PM
@sehe lol
 
I'm puzzled.
 
@Hoxieboy A cucumber looks nothing like banana on an xray though.
 
@LucDanton are you sure? I wouldn't be surprised if they looked exactly the same
 
@LucDanton sadly, yes :( I'm going to bio-engineer a banana that grows green and on the ground
 
@sehe I don't doubt there's some wavelengths of xrays where they look the same, yes.
 
11:51 PM
@Hoxieboy: Nature has beat you to the punch: en.wikipedia.org/wiki/Plantain
Except for the "grown in the ground" part
 
damnit nature D:
european bananas, who would have thought?
@StackedCrooked are you sure your compiler came with the type_traits header? sorry if I tend to be mentally ignorant in my ideas ;)
 
Yes, the type_traits header was installed on my system.
 
@StackedCrooked: Did you try including the file using an absolute file path?
 
@Insilico That's not a good solution.
 
@StackedCrooked c++ -std=c++0x ?
 
11:56 PM
@sehe Ok, forgot that one :D
 
@StackedCrooked Test it, i'd post as an answer
 
~ $ c++ -std=c++0x -o test main.cpp
main.cpp:1:10: fatal error: 'type_traits' file not found
#include <type_traits>
No luck :(
But, it's probably part of the solution.
 
@StackedCrooked Are you POSITIVE it is successfully installed where you want it?
 
Too bad. Already posted :) just in case
 
@StackedCrooked: Well, it's not meant to be a workaround
 
11:57 PM
as in, you seen it for yourself?
 
@Hoxieboy Where would you want it?
 
It's to see that we haven't gone insane
 
@sehe in the compilers search path I'm assuming
 
@StackedCrooked I believe gcc has the option to -v list what it does. You might get similar info from clang
 
also, does capitalization matter when including header files?
(more for my learning XD)
 
11:59 PM
@Hoxieboy Yeah, my post shows the include paths where c++ is looking. One of them in indeed in the folder where the new Xcode is installed. However, not the right one.
 
@Hoxieboy: I know that on Windows case doesn't matter (although Windows preserves case on filenames)
 
@StackedCrooked from the man page perhaps clang -v -fshow-source-location -std=c++0x
 

« first day (490 days earlier)      last day (4444 days later) »