« first day (364 days earlier)      last day (4567 days later) » 

7:00 PM
@FredOverflow Very true.
 
there are some C# features I really like, but the language as a whole has a bit of the Java "meh"-factor
it's nice enough, I guess, but it's not something I'd say I "love"
 
I was joking btw.
 
I guess if you program in C++ for long enough, you sooner or later stumble upon all of the major quirks, of which there are many. If you still decide to stay with C++, that can only be explained by true love, right? :) So professional programmers must love C++, or else they would have converted to another language or committed suicide.
 
heh
 
@StackedCrooked I'd rather use Erlang.
 
7:03 PM
Or they say to themselves: "Okay, C++ has its quirks. I'm just gonna continue using it until I find another language that handles resources as well as C++ does, and then I'm gone!"
 
sbi
What I hate about C# is that I feel like Anders is holding my hand all the time, gently nudging me to go the ways he paved for his flock, trying to prevent me to stray from the few true paths. C++, OTOH, is pure freedom. Bjarne created a powerful monster, and he not afraid to let me ride it wherever I want to go, being certain it will survive anything we might encounter.
3
 
@sbi agreed, pretty much
 
@FredOverflow To be fair, PHP community has no bloody idea what they're doing.
And TBH, I'd rather use Scheme with Scheme syntax, than JS.
 
sbi
What is the Twitter hash for C# – sure not #C#, is it?
 
@CatPlusPlus now you just need to get Scheme running in the same variety of environments as JS runs
 
7:09 PM
#csharp?
 
I'd rather use an imaginary language which is perfect for everything, but unfortunately, I haven't yet found an implementation of it for the platforms I care about, so I have to stick with ordinary languages like JS or C++
 
@jalf Which are? Server and desktop is already where Scheme runs. And browsers — if JS is Scheme with C syntax, then compiling the real thing into it shouldn't be a problem. :>
 
@CatPlusPlus If it isn't a real problem then show me a suitable implementation of it :)
 
Scheme? Racket.
 
Otherwise I'd argue that it is a problem. The absence of an implementation you need is a pretty significant problem, IMO
 
7:13 PM
> Scheme2Js is a Scheme to JavaScript compiler distributed under the GPL license.
 
> At the top of the list is "Lambda". [...] I think this is the best thing ever to go into a programming language.
 
"I don't want to use boost. It's not built in to my compiler, and I don't want to require people using my source code to download boost."
 
@CatPlusPlus Fortunately, a great deal of boost is now in C++11.
 
@FredOverflow "I think is the best thing..." How about functions then =)
 
7:19 PM
@CaptainGiraffe Lambdas are (anonymous) functions.
 
@FredOverflow woosh? =)
 
You don't strictly need named functions, because you can simply store anonymous functions in named variables.
 
@FredOverflow Hmm exlnt comeback
 
@CaptainGiraffe Have you ever seen a lambda function in a programming language?
 
@FredOverflow Well in at least 4 languages
sry C# too 5...
 
7:21 PM
Here is how you can simulate named functions in C++ with lambdas:
void foo()
{
    std::cout << "hello world\n";
}
const auto bar = []()
{
    std::cout << "hello world\n";
}
 
Who came up with the hilarious subline for the room? Hilarious is hilarious.
 
I don't like it.
 
The robot stole this from my statement.
 
I don't like the DDos your anonymous example is trying to make on readability
 
Meh, this talk names weak typing as good part.
 
7:26 PM
On the topic of weak typing, has anyone looked into Google's Dart?
 
Skimmed, not got interested, disregarded.
 
k, I haven't skimmed it yet, probably won't then, thanks
 
@CatPlusPlus You may enjoy this anti Garbage Collection talk much more, then ;)
 
Yes, I do love that =)
 
If for whatever reason you are forced to work with JavaScript, you should watch the video and/or buy the book. If you are just looking for an interesting programming language, yep, there are probably much better choices out there.
 
7:28 PM
I don't have anything against GCs.
 
Not being absolute by anything but raii is very appealing on a fundamental basis. More so than GC.
I very much like the freedoms that JavaScript provides. I quite likely might not like the code that gets written in JS.
 
sbi
This is an interesting interview Herb Sutter did with Dennis Ritchie, Bjarne Stroustrup, and James Gosling.
I find it remarkable that, according to Gosling, one of the motivations to come up with Java was to write safer programs, while Java has just been outed as one of the five applications responsible for, like, 98% of security problems in this industry. What a gigantic failure!
2
 
Python has with block and context managers. It's clear and works nicely.
 
@sbi To be fair, Gosling created a language for an entirely new environment, not seen before. Also thanks for the link.
 
> In which sense do C, C++, and Java constitute a family of languages? C and C++ has a large common subset, and over the years serious efforts have been made to minimize the inevitable tendency of the two languages to drift apart because they are controlled by separate standards bodies.
> Java, however, provides no real compatibility, and similar syntactic constructs have semantics different from the C and C++ versions. Clearly, Java borrows from C and C++, but under the skin, the similarities to Modula-3 seem greater.
 
sbi
7:35 PM
@CaptainGiraffe You mean Gosling just had to have a single platform in mind, right? Compare that to K&R, who had only one platform available and still created the most-ported language, and Stroustrup, who designed a language for scores of platforms, and largely succeeded.
 
@sbi Well, no not at all, I was considering internet aware applications.
@sbi Java's security failure was a big learning experience for the entire community IMO.
 
0
Q: When to use printf/scanf vs cout/cin?

Chris AakerI'm tesing some snippets I found off the web using g++ from MinGW. This is the C++ compiler...why than does it correctly compile C....why do people intertwince C and C++. The concrete question is : Is it O.K. to use both C and C++ and compile under g++. If the answer is yes, this makes my li...

I was wondering if I should write an answer, but I might actually run out of those sanity points.
 
sbi
@CaptainGiraffe Thompson, Kernighan, and Ritchie also invented a whole new world (Unix and C, the base of most modern computing and programming environments).
@CatPlusPlus I am sure we already had many of those "why/when C++ streams vs. C IO?" questions already. I am sure I have answered such here. This ought to be a dupe.
 
@sbi Hey, I'm not going to argue with that. To me Thompson, Kernighan, and Ritchie are heroes, as well as Tim Berners Lee, as well as a few other guys and girls (M.Curie stands out here)
 
Evening
 
7:44 PM
@sbi agreed, but too lazy to search right now
 
@sbi However I think it would be negligent not to point out difficulties in app security in an Internetworked world, and language aside.
 
sbi
@FredOverflow That makes two of us then. :)
@CaptainGiraffe You know, it was Unix and C what the ARPA took as a base to create the Internet. :)
 
@ Fred+sbi Theres a site lmgtfy.com they can probably do the search for you =)
@sbi Well yes of course.
 
sbi
@CaptainGiraffe I wish SO had a proper search facility. Why do I have to go to google? Why can't I search for dupes from the question?
 
@sbi But all things considered, I don't think we have such a bad state of affairs, languagewise, as they are commonly portrayed, say php, JavaEE or why not .NET. The common scenario is that the developer has to make one big or two small mistakes to get into trouble.
 
sbi
7:48 PM
> Probably about 20 to 30 percent of the population think of operator overloading as the spawn of the devil; somebody has done something with operator overloading that has just really ticked them off [...]. Then there's a community of about 10 percent that have actually used operator overloading appropriately and who really care about it, and for whom it's actually really important; – James Gosling
I find myself agreeing with the creator of Java. What will this world come to?
 
@sbi Is James going for the I am the 99% here?
 
@CaptainGiraffe How is 100% - 10% = 99% ?
 
sbi
@CaptainGiraffe "There are some things that I kind of feel torn about, like operator overloading."
 
47
Q: I don't understand the arguments against operator overloading

FredOverflowI just read one of Joel's articles in which he says: In general, I have to admit that I’m a little bit scared of language features that hide things. When you see the code i = j * 5; … in C you know, at least, that j is being multiplied by five and the results stored in i. But if ...

 
@FredOverflow Why the hostility?
 
7:50 PM
@CaptainGiraffe Math doesn't lie ;)
 
sbi
@CaptainGiraffe That isn't hostility, it's pedantry, and if you want to survive in the C++ room, you'd better get used to it. :)
 
@FredOverflow I trust you have seen the news occupying the news lately?
@sbi Is there a particular chomsky grammar we should adhere to here?
 
@CaptainGiraffe You mean Ritchie's demise?
 
sbi
@CaptainGiraffe Yeah, of course. It's called English, and it's very treacherous.
> What many people need to get much more out of C++ is not new features, it is simply a more appropriate design and programming style. – Bjarne Stroustrup
2
 
Mass Effect is a wonderful game.
 
7:54 PM
@FredOverflow No sorry Fred, while I mourn DR's passing. Theres also other news from around the world. =)
 
@CaptainGiraffe link please
 
@Fred lol
 
sbi
> if you look what lots of kids fresh out of college have been taught, it's, "Objects are good, define lots of them!" So you get programs with zillions of little adapters, with methods that are one or two lines long, and you start profiling them and they're spending all of their time doing method dispatching. – James Gosling
 
@Maxpm it's pretty good, yeah
 
@sbi Pretty much.
My latest project in school was to make a StringReplacer class...
 
sbi
7:56 PM
> I consider good libraries essential to provide a smooth learning curve and to properly sequence the learning of C++ concepts. For example, having the C++ standard library available makes it possible to learn the basic type, scope, and control structure concepts without having to deal with arrays, pointers, and memory management at the same time. Such fundamental, yet low-level concepts are best learned a bit later. – Bjarne Stroustrup
 
@CaptainGiraffe If you want to discuss the news with me, please post a link. There is so much stuff happening in the world every day, how could I possibly know which particular event you are referring to?
 
Meh, this talk had nothing I wouldn't know before.
 
@CatPlusPlus Which talk? The STL one?
 
The JS one.
 
I thought you only skimmed it and then quit?
 
7:57 PM
@sbi what really struck me about that interview was how trite most of Gosling's answers were, and how he just didn't seem to have anything interesting to say
 
That was about Dart.
 
@CatPlusPlus Sorry I wasted an hour of your life then ;)
 
sbi
@CatPlusPlus Was Dart invented by Gosling?
Oh. My. Gosling.
2
 
@CaptainGiraffe I don't care too much about American news.
 
7:59 PM
@CaptainGiraffe there are a lot of things happening every day. It's kind of hard to guess which particular news item interests you
 
@FredOverflow Well, the 99% was not a math statement but rather an allegory. Let's stop this thread.
 
In case this wasn't clear to you, I am not an American.
 
Me neither.
 
I have only been to America once, and that was over 20 years ago.
 
sbi
@jalf Seriously, what struck me immediately about this statement is how you only need to change about three or four words and it would apply to his creation. ("What really struck me about Java was how trite it is, and how it just doesn't seem to have anything interesting to say.") :)
 
8:01 PM
What do you think, should I have the inner representation of a matrix, float m[16], private?
 
Hi guys! Anyone in the mood to help a Cpp newbie? :p
 
@sbi I don't really pay attention to who invented what.
 
@sbi yeah, that's true too. That's why I found the thing about Gosling's answers fascinating, since it mirrors his language so well
 
@ManofOneWay Sure, why not? You could also use a float m[4][4], would probably make your indexing a little easier.
 
sbi
@FredOverflow Might I direct you to German online news services? The Occupy Wallstreet movement has this weekend swapped over to Europe, and Germany saw several thousand protesters, too.
 
8:03 PM
I went to N24 and saw a documentary about the solar system which attracted me more than finances.
 
@FredOverflow It sure would be nice, but OpenGL doesn't like a two dimensional array =)
 
@sbi I don't think he is European either, he visited Europe 20 years ago.
 
@ManofOneWay Just pass &m[0][0] to OpenGL then.
 
sbi
@jalf Mhmm, assuming that interesting projects just reflect the way their creators are interesting, that makes me want to spend an evening with Mr. Stroustrup. :)
 
I'm living in an ivory tower. All I have is a computer, a refrigerator and a bathroom.
 
sbi
8:04 PM
@CaptainGiraffe I have a hard time reading any meaning into this, and if I try I come up with something that borders on rudeness.
@FredOverflow 's that true? because I heard you are lecturing. Are you doing this in your bathroom or in your fridge? :)
 
oh hey, a new STL vid on C9
 
Let me be the first to post a link for me to read :)
 
how interesting
my favorite techno-pirate!
 
@jalf I have posted this three times already here.
 
@FredOverflow yes, but I serialize incoming links. I'm still processing the js vid ;)
 
8:07 PM
39 mins ago, by FredOverflow
@CatPlusPlus You may enjoy this anti Garbage Collection talk much more, then ;)
 
@sbi Sry, but I was thinking along the lines of Freds later comments. I have no desire to be rude here.
 
sbi
@FredOverflow Yeah, but none of us living outside the ivory tower have enough time to spare to watch all the videos you link to here.
 
@CaptainGiraffe really? I nearly always have a desire to be rude. I usually try to resist the temptation though
 
@sbi I'm not lecturing at (?) the weekends :)
 
@jalf touché
 
sbi
8:08 PM
@jalf From what I learned about you here, you are a true resistor then.
 
@sbi It's just a matter of priorities. There's a lot of stuff I don't do in order to be able to watch programming related videos every day.
 
@sbi I'm just a contrarian ;)
 
sbi
@FredOverflow Well, I spent a whole day off yesterday taking two of my kids to the zoo. We had a lot of fun, but there went the time to watch 6-8 programming-related videos.
 
@FredOverflow Theres a lot of stuff I do everyday, just to not have to learn more than I should. Simpsons springs to mind.
 
When you say "Simpsons", you actually mean "Simpsons, Futurama, South Park, Family Guy, American Dad, The Cleveland Show", right? ;)
 
8:11 PM
@FredOverflow No actually I mean piano practice. Thats what constitutes most of my free days.
 
@sbi Going to the zoo is fun, but also expensive. I haven't done it in 5 years :(
 
Right now its a Chopin impromptu. I'd link it but it's still under some IP law so I can't.
 
@CaptainGiraffe I wish I could play the piano!
 
I'm more of a Beethoven and Chopin (Shubert, Liszt) kinda guy =)
Although the well tempered klavier from Bach is one awesome piece of work.
 
sbi
@FredOverflow Yeah, remembering what we paid when we went to the zoo in the seventies makes my toenails curl in disgust. And then there is this tempting playground in the middle of it all, luring the kids all the time to spend the time bought by an obscene amount of money on it. In the end I had to give in and let them spend an hour there, but before I dutifully dragged them from compound to compound, hammering knowledge into them for five hours. :)
 
8:15 PM
@CaptainGiraffe I only know Beethoven's 5th :)
 
@FredOverflow A'passionata is my fav. I heard a story that Beethovens publisher said he would name that piece the "passionate piece", B's reply was "so what the hell kinda stuff have I've been writing up until now?"
 
sbi
@CaptainGiraffe If you like Liszt, you will like this guy we met at the zoo yesterday: `
It's called Liszt Monkey in German. :) (The English name, cotton-top tamarin, is rather boring compared to that.)
 
@sbi Germans are proficient in naming monkeys.
 
sbi
@CaptainGiraffe So? Are there any other good examples for that?
 
8:20 PM
Is not in the key of C but still nice youtube.com/watch?v=EEptNFzLpjk
And if you want to lol a little theres always youtube.com/watch?v=Aajtw30-YG0
 
sbi
> I think that "Algol68 with Classes" would have been a better language than "C with Classes." However, it would have been stillborn. – Bjarne Stroustrup
 
@CaptainGiraffe Why does it matter if it's in C?
 
@sbi hah
he's a pretty clever guy
he did a talk at my uni when I was a student, and I missed it. I'm still pissed off about that
 
Leslie Lamport is going to speak at our University next week, IIRC.
 
@FredOverflow The funny quote (don't recall from where) "The last well written thing in C was by Frans Schubert!".
 
8:26 PM
Can't you just write in another key and then transpose to C? Sorry for my ignorance :)
 
@sbi Looking at what Google Go is that seems like an accurate statement.
 
@FredOverflow No not really Id doesn't work like that. There are established moods for different keys.
I've read texts from the classical guys describing each key with their inherent properties.
 
@CaptainGiraffe Wasn't that only before the piano got well-tempered?
 
sbi
Herb Sutter: "Is there a programming language that is the best choice for all (or nearly all) application development?" Dennis Ritchie: "No, this is silly." Bjarne Stroustrup: "No. People differ too much for that and their applications differ too much. [...]" James Gosling: "I think the one that has the best broad coverage is Java [...]" What. A. Prick.
18
 
8:28 PM
@FredOverflow One would imagine that, and its the point to be made, but it does not seem to hold true.
 
strange
 
The text I read was from around 1850 so the piano was well tempered. It's not a pitch thing but something else, Yes I agree very strange.
 
Maybe every human subconsciously has an "absolute ear" (not sure what the correct term is)? :)
 
I have heard "Absolute pitch", but I only got that from practicing endless hours, so I dont think that is the case either. I'm curious about any explanation.
 
You seem to play a lot. Does music also occupy your dreams?
 
8:32 PM
Absolute pitch (AP), widely referred to as perfect pitch, is the ability of a person to identify or re-create a given musical note without the benefit of an external reference. Definition Absolute pitch (AP), or perfect pitch, is the ability to name or reproduce a tone without reference to an external standard. The naming/labeling of notes need not be verbal. AP can also be demonstrated by other codes such as auditory imagery or sensorimotor responses, for example, reproducing a tone on an instrument. Therefore a musician from an aural tradition, with no musical notation, can still exhibi...
Aka 'perfect pitch'.
 
Like how Tetris maniacs start dreaming about Tetris and then get better at it.
 
Yes to quite an extent =)
 
Playing Piano seems like a cool hobby. Just like in programming, you can spend years and years trying to get better.
I play the guitar once in a while, but only on a beginners level.
 
I did have more of an invasion of my dreams when I was playing backgammon a lot though.
Yes but in the programming you can verify your achievements =)
 
The most complicated piece I managed to pull off is the famous Bach Bouree:
But of course I'm nowhere near as good as that guy :)
I have trouble remembering pieces longer than that.
 
8:36 PM
One of my favourite pieces toplay on the guitar =)
 
Ah, you play the guitar as well :) Then again, what musician doesn't? ;)
 
I bet I could still remember it =)
Yes I enlarged my student wallet by playing att up-style restaurants
A meal and a small fee (about $20-30)
 
Cool. I only play by myself. My playing automatically gets a lot worse when people are in the same room as me :)
 
@FredOverflow That happened to me too the first times =)
 
Even microphones tend to have the same effect on me :)
This video is also quite impressive:
 
8:39 PM
Microphones tend to permanent the mistakes =)
@FredOverflow very nice
 
so clean!
I'm sure you know this one?
 
hi
 
nope. heard the song of course. never tried to play it.
 
seems quite complicated to me (as in "many different parts")
 
This was my showstopper youtube.com/watch?v=0y8l4KijBA0 I feel in awe of J Williams though,
 
8:49 PM
Whoa nice! Rather poor sound quality, though.
 
Soule is better than Williams
 
I know I always post the same music, but what do you think of this one? :)
 
@FredOverflow For me its well played but a lack of heart.
 
TA is a fun game.
 
8:53 PM
It is like when Stan Jordan made the electric guitar tapping popular
 
imo, the game was fun but not that well balanced
the music is better than the game, if you ask me
 
@CaptainGiraffe Fair enough, how about this one? :)
 
There are some projects using Spring engine that try to capture the original fun and add more balance to it.
 
yeah, but Spring is more than a bit wtf
 
8:57 PM
They have laughed their head off during a very laborious practice.
 
and honestly, the gameplay was never that well thought out to begin with
 
It certainly had usability problems last time I tried it.
 
oh goddamnit
fuck you, declarations and definitions! :(
tbh, TA had real physics but it didn't do anything with them
I mean, you could micro and dodge shots but that was about it
 
TA was about 100s of units and nukes.
Silly assembly questions, part infinity:
0
Q: Local variables in assembly:are they faster than global variables?

devjeetroyI was wondering if local variables in assembly are faster than the global variables that we use. The context for this is that I am learning some 2d animation using the win32 api, from a book. The author uses a function to initialize(Creation,registration, showing and updating of the window) the ...

 
@DeadMG why?
 
9:03 PM
because
I was happily writing some code between three classes that all interacted
and suddenly my code failed to compile because I had the declarations in the wrong order
they just get in the way
you can't just write code, and push the button, and have it work
you have to cock around explaining it piece by piece to the compiler
doing the compiler's work for it
every time I get to a project and once you get past a certain point, they're just so incredibly annoying, I usually lose the will to write C++
especially if the ideal conceptual solution would be templates, because then things get incredibly messy
 
Well, C++ has no proper module system, and that sucks. We all know it.
 
and you end up spending more time moving between declarations, definitions, and crapping around in general than actually making things happen
I know. Just expressing my frustration.
 
go on then
 
more like "Finish bootstrapping WideC as soon as humanly possible"
amagad, got seven modules at uni this year too, and got to sort my accomodation still as well
 
Lol, someone trying to sort a const vector:
0
Q: How to use sort to sort a vector in a class

codyI was wondering how I can use the sort function to sort a vector which is private in a class: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; class A{ private: const vector<int> myvec; A(vector<int>&...

 
9:27 PM
lol
 
const_cast to the rescue!
and then he can invoke UB like everyone else
 
Why make it const then in the first place?
 
You can convert an lvalue to an xvalue using const_cast
 
more importantly, since he declared it const, const_casting away it's immutability and then mutating it is Undefined Behaviour
 
9:40 PM
@JohannesSchaublitb sure, by casting to an rvalue reference type
 
10:15 PM
If you have a portion of unencrypted data, can you calculate how to decrypt the rest of the data?
 
10:31 PM
depends heavily on the encryption algorithm
 
11:02 PM
I commented on this:
0
Q: SFINAE tried with bool gives compiler error: "template argument ‘T::value’ involves template parameter"

iammilindI tried to implement an SFINAE using bool (unlike popular void_ trick): template<typename T, bool = true> struct Resolve { static const bool value = false; }; template<typename T> struct Resolve<T, T::my_value> { static const bool value = true; }; The...

 
11:24 PM
2
Q: In a C header file I saw `[*]` used as array bound. What does this mean?

Johannes Schaub - litbIn one of our files I saw this function void match(int states[*]); I have never seen such a thing in C. Can someone please explain that what this weird operator in the brackets mean?

 

« first day (364 days earlier)      last day (4567 days later) »