« first day (549 days earlier)      last day (4400 days later) » 

12:02 AM
@RMartinhoFernandes: Are you there?
 
@GManNickG not yet supported by Visual C++ as of 10.0 :-(
 
@CheersandhthAlf: Nor of 11, I hear. :/
 
 
2 hours later…
1:41 AM
The last message was posted 1 hour ago.
 
2:00 AM
Evening.
 
Hello.
 
it's cold
 
user406009
No, it's too hot.
 
@Mysticial: Not sure if it's actually relevant to your work, but it's still pretty neato: ptlsim.org Might make profiling results much more specific.
 
@GManNickG Kinda. I'm more on the algorithm design side. But hey... maybe you can use it to answer this question?
53
Q: C code loop performance [continued]

Dan LeakinThis question continues on my question here (on the advice of Mystical): C code loop performance Continuing on my question, when i use packed instructions instead of scalar instructions the code using intrinsics would look very similar: for(int i=0; i<size; i+=16) { y1 = _mm_load_ps(o...

 
2:12 AM
I love questions with nice pictures.
 
Yeah. Funny part is that I answered the first half the original question. And made the OP ask the second part as a separate question... And what do you know... 53 upvotes and #2 highest unanswered question on SO... lol
Nothing like a processor pipline diagram to entice a specific type of programmer... :P
 
Yes yes :)
Gonna read the old one first.
 
2:35 AM
Loving the spam answer.
 
:)
 
Hm, I'm gonna use this as an excuse to use my new program and see what's going on.
 
lol
 
2:49 AM
@GManNickG hmm... you want a Populist badge?
 
Natrually. :) Swear I already had one, guess not.
 
*yeah, I have a habit of going through people's profiles and casting votes that will give badges... :P
 
Haha, do I have the potential for one somewhere?
! Got one! :D
 
That was the only one I could find.
I'm also close to a Populist badge. I just need the accepted answer to pick up exactly 2 votes (and not more)...
 
Any that only need one?
 
3:00 AM
I have a classmate that can cast the last one. But I'm making him hold off just in case two votes come at the same time.
 
Which answer?
 
0
Q: Why is modulo operator necessary?

user1010005I've read in a document that you can replace mod operation by logical and like this : Instead: int Limit = Value % Range; You do: int Limit = Value & (Range-1); But compilers still generate mod instructions and my question is basically : Why do compilers don't use the most efficient ap...

 
-1
 
lol
 
Done and done.
 
3:08 AM
Oh cool! Actually dwelch's answer needs to get to 11.
 
@Mysticial: What for?
 
"Highest scoring answer that outscored an accepted answer with score of more than 10 by more than 2x "
There was a meta post about getting rid of the "more than 10" part.
But it never went through.
 
Oh gotcha.
I suppose I can upvote it too haha.
Would give him a badge :P
wat
 
hey i was wondering if you all could weigh in on something... What language (C++ java php etc) i should learn first if i want to learn as much about programing as i can (i already have some knowledge of php)
 
lol
 
3:16 AM
@RyanSinclair All of them!
 
what should i start with?
 
user406009
Python.
 
user406009
If you are new to programming in general.
 
@ScottW That's a badge that I'm NEVER gonna get, lol.
It'd be a crime against humanity if I got Unsung Hero.
 
@EthanSteinberg so python is just a general programming language? sorry i am a noob to programing
 
3:18 AM
My first "real" programming language was Matlab.
 
user406009
Almost all programming languages are "general", in that you can do whatever you want(assuming someone has written libraries).
 
user406009
Python just has better learning materials than most other languages.
 
so in theory, could you write a website with python?
out of curiousity
 
user406009
That's actually one of the more popular uses of python: djangoproject.com
 
so that sites made with python?
 
user406009
3:21 AM
No, that is a very popular python toolkit designed to make websites.
 
user406009
Anyways, back to your original question:
 
@ScottW It might take a while. I think the script only runs once per day.
 
user406009
It would probably be best to learn at least one scripting, one "modern", and one functional languages.
 
@EthanSteinberg can you give an example of each of those?
 
user406009
So start with Python and then move onto something like C++, and finally Lisp.
 
3:22 AM
never heard of lisp... what is that exactly?
 
@ScottW My classmate got Tenacious and Unsung Hero one day apart.
He pulled a Jon Skeet on one day and answered like 40 questions. So exactly 10 days later he got both badges.
 
user406009
@RyanSinclair It is an old functional style language with a very interesting design.
 
ASM -> C -> C++ -> Java -> Python -> Ruby
 
hmmm ill look into those some more
 
@TaylorBioniks What makes you think that? Java is below C++ by most useful measures
 
3:24 AM
so i suppose learning php at this point was a bad idea
 
PHP is the worst language you can possibly imagine
 
actually the order was base on object
also I hate no programming languages
 
what object?
 
well my end game (hopefully) is to do websites
not simple sites
 
If you don't hate a programming language then you haven't used it enough
 
user406009
3:26 AM
Well then python would still be a good place to start, as you can just use django. You also have to learn javascript as well.
 
object orientated I code every day in many languages
 
so Java is ahead of C++
where in Java you can't multiply inherit?
 
so ASM -> C -> Java -> C++ -> Python -> Ruby?
 
What's with the arrows?
 
OK I don't know the order
 
user406009
3:27 AM
ASM would be no help at all for websites.
 
Follow this:
> Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML Haskell), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).
 
but would it be good just to know?
 
Java has abstraction then C++ because of the VM
 
@TaylorBioniks The VM has jack shit to do with object-orientation.
 
user406009
Knowing lisp would be much more useful. At least you can use lisp's ideas in javascript.
 
3:29 AM
I did not say that it had anything to do with object-orientation. I said it had to do with abstraction
 
yeah
 
user406009
Just get a book on python and start learning. It really does not matter which you start learning first at the end, most languages are pretty similar anyways.
 
@Pubby as if i knew the differences in abstractions and specifications and coroutines and parallelism were... haha...however, thanks for the list
 
I heard Javascript is just Scheme with shitty syntax
 
@EthanSteinberg ill go out and search for one
 
user406009
3:30 AM
And also shitty scoping rules.
 
I like Lisp
 
the JVM is such a great abstraction, the generics in there are piss-weak, there's no lambdas or anything like that, and you have to deal with that whole enforced-GC rubbish, Object, primitive vs reference types?
 
@RyanSinclair Go read some SICP them
 
that's an awesum abstraction right there
 
@Pubby i know... i have a long way to go
 
3:31 AM
my languages C:60 days C++:7 days Java:7 days Java script still learning
 
so is ASM worth learning in the long run?
 
oh, well that's way too short a time to expend on a language to make any kind of judgement
 
Learn C++ in 7 days?
 
yes thats all I did though
 
You sure you learned C++?
 
3:33 AM
Learning C++ in 7 days doesn't sound too different than learning Chinese in 7 days...
 
I use it to write all kinds of software
@Mysticial did you do that?
 
Why are you telling newbies this 'scripting language' nonsense.
 
Learn C first
 
@TaylorBioniks No, it's been 7 years now, I've neither learned all of C++ nor a lot of Chinese.
 
C is an irrelevant pile of junk
 
3:34 AM
You don't need or want to learn C to learn C++.
 
good only for systems where it's cheap and simple implementation is a massive requirement
 
Learn C before Matlab
 
I learned C then went to C++ it was very easy
 
so what languages should i attempt to learn? any consensus?
 
3:35 AM
what's much more likely is that you learned C with cout than anything even remotely approximating C++
 
I learned C first too, but only the C stuff in C++ was easy
 
Anything but C, PHP, Java and a whole lot of others.
 
@ScottW there isnt some magical order that i should do?
 
go for C++ first then
 
@CatPlusPlus why no java? someone early said it was good
 
user406009
3:37 AM
Getting this chatroom to agree on anything other than the horribleness of other languages is like herding cats.
 
It's not.
Learn Haskell.
 
Java is blah
 
Then C++.
 
@RyanSinclair Java is a disgusting pathetic language.
 
I like Java.
 
3:38 AM
Java is not bad
 
It is.
 
just every one in this room does not like it
 
@EthanSteinberg hahaha it seems so
 
Java is possibly the worst language ever designed
 
For a reason.
 
3:38 AM
Here's the path that I took:

TI Basic -> Matlab -> basic C++ -> Java -> C -> x86 assembly -> real C++
 
Eh, Lisp -> Haskell -> Half of C++ -> C -> Rest of C++
 
PHP was never designed, so it can't count
 
if language you understand, you any thing can code
 
@DeadMG Nonsense.
 
Yeah, I wanted to say PHP and then thought "hey, it wasn't designed".
Getouttamyhead.
 
3:39 AM
@Mysticial Hell yeah TI Basic, spent all of my trig. class in high-school making stupid games.
 
@GManNickG The laundry list of it's flaws is not only excessive and significant, it's gobsmackingly obvious how glaring they are.
consider something as simple as "Everything must be in a class".
 
ah wait I do hate a language
Basic/Visual basic
 
WTF did they do when they said "How are we gonna specify sin in our Standard Library?"
 
TI Basic sucked
 
@TaylorBioniks Nonsense. Language is a tool, if you insist on using a broken one, you're hurting productivity and your brain.
 
3:40 AM
they didn't go back and say "Well, obviously it was fucking stupid for us to say "Everything must be in a class" so let's fix it"
 
so from a future web stand point, you could call mysql through python or others right?
 
@GManNickG Dude, that's exactly what I did too!!! I made like 4 games during my high-school days... lol
 
@Mysticial :D
 
Use PostgreSQL.
 
user406009
Yeah. You can call mysql through almost every language.
 
3:40 AM
@DeadMG I don't find that too terrible. Certainly simplifies reasoning.
 
user406009
Or, at the very least, sqlite.
 
and i suppose html works with them all? more or less
 
html doesn't even work with html
 
user406009
@GManNickG Makes functional programming a pain.
 
@GManNickG Does sin and 99999 other similar functions belong in a class? No? Then it's a mistake at best.
 
3:41 AM
@TaylorBioniks Those were my first languages : (
 
user406009
Yeah, all of them can output text/html and at the very least work with CGI.
 
and that's just the most obvious, easy to see one
 
They say time travellers always want to kill Hitler on their first jump. I'd get rid of PHP and MySQL.
 
@EthanSteinberg But if I don't want to go down that route, where's the harm?
 
how about the malloc and free resource handling of files and other unmanaged resources?
 
3:41 AM
@CatPlusPlus if you understand programming languages you can codde in anything fast
 
@TaylorBioniks If you want to produce working but vastly suboptimal code, then yes.
 
@GManNickG what was?
 
You can't code fast in a language which has an expressiveness of a pool of mud.
 
@DeadMG If I view a class as an organization tool, sure.
@TaylorBioniks Basic followed by Visual Basic.
 
3:42 AM
@GManNickG As opposed to namespaces how, exactly?
 
@CatPlusPlus so forget everything i have learned about php and mysql?
 
Pool a mud sounds pretty expressive actually :S
 
Classes make poor namespaces.
 
classes exist to be instantiated
 
@RyanSinclair Yes.
 
3:43 AM
Don't forget everything, just never go back to it
 
@DeadMG yes but you can easily learn more
 
If you want to write webapps, go with Python and Django.
 
@DeadMG Alternative/supplementary, not opposed.
 
And PostgreSQL.
 
@DeadMG By what cosmic dictionary?
 
3:44 AM
@GManNickG They're not alternative or supplementary at all. It is taking a class and forcing it to behave like a namespace. That's not supplementary, it's just plain stupid.
@GManNickG Class which is not instantiated- we already have that. It's called a namespace. The reason you use a class is to instantiate it. If you want organization only, then we have namespace.
 
@DeadMG Sounds to me like your argument isn't, "this is stupid", but rather, "this isn't what I'm used to so it's stupid"
 
so no more php. and i know ive asked this before, and i expect no consensus, but what do yall think is the best order to learn some languages in (or does it not matter)
 
@GManNickG No, I'm saying that it's stupid because I used logic to determine that fact.
 
There's no order.
Well, learning Haskell early might be good.
 
that is, we already have organizational tools that do not get instantiated, they're called namespace, and there's no need for anyone to go make class behave like namespace.
 
3:46 AM
@RyanSinclair Decide on 5+ languages you want to learn and dig in
 
@ScottW haha true... but mostly because the guys over at php were...not so helpful!
 
@DeadMG In my experience, when anyone claims to use "logic" to arrive at "facts" explicitly, probably didn't do so.
 
@GManNickG Perhaps, then, you should try actually attacking it, instead of simply pre-supposing it's failure.
 
@Pubby any of them?
 
I already have. You're simply claiming a definition and use for a specific thing a priori, then rejecting anything that doesn't fit the category. Maybe you should be a little less prescriptivist.
 
3:48 AM
@RyanSinclair Yeah. If you get stuck on something then move onto another one for a while, then come back.
 
@GManNickG What, so you think that namespace is not an organizational tool which is not instantiated?
 
@Pubby okay, thanks. and i should learn them through books or more like following a tutorial online? in your opinion, whats better? ive heard it either way
 
language popularity
 
nobody has any meaningful statistics on language popularity
 
@RyanSinclair Most of learning comes from doing, so as long as you write code you'll be fine. Online tutorials are notorious for bad information, so a good book is ideal. Reading SO really helps too once you got the basics down.
 
3:50 AM
@DeadMG Never said anything of the sort. I simply said class can be used to organize as well.
 
@GManNickG The only differentiating factor between class and namespace is that one can be instantiated, and one can't. If you eliminate that difference, then you lose the point of having both features.
 
@Pubby haha thats why i got railed over at the php chat... using a youtube video from 2009 apparently is frowned upon haha
 
@DeadMG its there that all I say not that is good or bad info
 
user406009
@RyanSinclair I agree with Puppy, books are the best.
 
user406009
(You can even pirate the pdfs if you want to be cheap)
 
3:51 AM
@TaylorBioniks Really? C is #1?!?! Whhhhhyyyyyy???
 
@RyanSinclair Videos suck for learning. They're too slow and too linear
 
@DeadMG (You can also inherit from classes.)
 
@Mysticial I guess
 
you're right, I need to inherit sin
 
@DeadMG Sure, but why not have both?
 
3:52 AM
I always put C with C++
 
@GManNickG Why not have redundant features? Is that something I really need to explain?
 
C has nothing to do with C++.
 
@TaylorBioniks Then you're wrong.
 
user406009
@Mysticial I bet they use some stupid counting method, like measuring hits on google
 
user406009
So all the "C sucks" links get counted as well.
 
3:53 AM
@DeadMG Didn't say you need to in particular, I said you can in general, as in the claim of yours that "The only differentiating factor between class and namespace is that one can be instantiated, and one can't." was wrong. It's called a counter-model; you know, that whole logic thing.
 
@Pubby yeah i know... i suffered through 170 minutes of it haha
 
@DeadMG Sure.
 
number of projects on the coding sites that use the language[]
 
@GManNickG Well, since the fact that you can inherit them is quite irrelevant to static members, since they cannot be virtual or anything like that, then it's not wrong at all.
 
@RyanSinclair I know what you mean. Everytime I watch a teaching video I feel like I wasted my time
 
3:54 AM
@DeadMG Where does your statement talk about static members?
 
@Pubby so online tutorials for some help, but mostly books c
 
@GManNickG Considering that I explicitly referred to sin, then I'd start there.
 
@DeadMG Your sentence I quoted doesn't.
 
here this is normalized from all sites
 
@RyanSinclair Yeah, although many books are online too so you don't always need a physical copy.
 
3:55 AM
@GManNickG This is just getting silly.
15 mins ago, by DeadMG
WTF did they do when they said "How are we gonna specify sin in our Standard Library?"
 
@DeadMG Let me repeat your sentence: "The only differentiating factor between class and namespace is that one can be instantiated, and one can't."
 
@Pubby it may be nice to get away from the glow of my computer sometimes before i get back problems at 18 haha
 
It's about classes as namespaces, so obviously it's about static members?
 
if you ever thought that this ever discussed anything except static members, then you misunderstood me; either because you suck at interpreting, or because I suck at stating, or because there were like 3 conversations at once
 
@RyanSinclair Well whatever suits you!
I want to be able to instantiate namespaces :(
 
3:57 AM
mezh is a politically correct particle you put it at the end of a sentence to make is politically correct
 
@Pubby thanks, so any books in mind for either python or C++?
 
I'm just asking you to be clearer with your sentences. If we're going to discuss semantics, it's deadly important to not skip out on details. Normally I'd not even get into it, because talking about this stuff is ridiculously hard to do right.
 
@Pubby i think those are the two im planning to start with
 
ok
 
1053
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
3:58 AM
well let's move on then
 
@TaylorBioniks That's more reasonable. Though I still find it hard to believe that C is above Java... but meh...
 
@RyanSinclair I dunno any Python books, maybe Cat does.
 
I am saying that the decision to force everything into a class is fucking stupid, because there are 999999 static things that could perfectly well fit into a namespace and there's absolutely no need to force them into a class instead.
 
There are a lot of big C open-source projects.
 
@Mysticial I don't take this info as being to correct
 
3:59 AM
@CatPlusPlus any books in mind thatd help me learn either python or C++?
 
I never read any Python book in my life.
 
my OS has move to being C++
 
learned by doing?
 
I've read one C++ book, but it was a long time ago and it probably isn't translated anyway.
And it sucked, so.
 
It would depend on how they sampled that data. I'm not aware of a single person outside of my department or the people I meet on SO that actually uses C for anything.
 
4:00 AM
so not that one haha
ill take a look at the python one then
 
@DeadMG The sentence, "Everything must be in a class" is undeniably simpler than, "Everything must be in a class, except non-member functions which may be in a namespace", which will also require a definition of non-member functions that ends up being nearly identical to that of static member functions (redundancy!).
 
The guys in my department do primarily C since they deal a lot with compilers and libraries and suck.
 
@GManNickG Not really, because you have no need to prescribe that everything must be in an anything.
instead of "Everything in a class", you just have nothing.
 
Thanks for all the help guys, one slightly off topic question, anyone who took studied Computer Science in college, what exactly was it like?
 
@GManNickG That sentence reminds me of the comment on this answer:
166
A: When is a Java method name too long?

JaredParA name in java, or any other language, is too long when a shorter name exists that equally conveys the behavior of the method.

 
4:02 AM
@Mysticial Haha, I like it.
@DeadMG I don't follow.
 
@Mysticial mine are like com.ice_os.android.pound_a_politician
 
@GManNickG Instead of "Everything in a class", you don't need some prescriptive list of all the other possibilities.
when you specify "namespace", you say "It's all static- cause it's a namespace, can't be non-static, good stuff" and then you specify "class" and then you leave it at that
 
@DeadMG In general or after introducing namespaces?
And can we agree the first sentence is easier?
 
what, "Everything in a class" is easier than ... nothing?
 
user406009
@DeadMG Some people like limitations.
 
4:05 AM
some people commit suicide, but I'm not gonna do that either
 
Yeah, I think we're done.
 
im logging off, thanks for all the help everyone!
 
It's funnier because Java already have namespacing capability, in form of packages.
But it's less verbose than forcing people to write classes and put "public static" in front of every method, so it's not in the spirit.
 
4:19 AM
ARGH
Y I SO SICK
no
are you kidding? sickness === very serious
if only my doctor had been any use about it
 
sleep is good for the soul
what the hell was wrong with you
 
I've never been chronically sick before
 
is it safe to pass a unique_ptr across a thread
 
Why would it not be?
 
@Pubby upon further thinking, i see no reason why it wouldn't
 
4:32 AM
Depends what it means to pass something "across a thread".
 
5:26 AM
What could it possibly mean?
But to simply pass it to a different thread?
 
Could be sharing.
 
If you're sharing a unique ptr then you're probably doing it wrong :D
 
Not necessarily.
 
@StackedCrooked To me, "to a thread" means copy/move to a single thread, "across a thread" means means share across multiple threads. Obviously we can't know what he meant since he never defined it.
 
@ScottW Sharing needles sounds like a bad idea as well.
 
5:44 AM
So many people don't know anything about console window in Windows.
Like "cmd.exe is not the console window".
I mean, you get the same window after calling AllocConsole, that should give a hint that cmd.exe is not involved.
Also, I'm reading slides from that SE course, and there's a lecture on UIs. And it lists 'blinking' under 'ways of making information visible'. Yuck.
 
OK, I have changed the languages I hate to Visual Basic, PHP, Spanish, Arabic, and BATCH
 
6:02 AM
@TaylorBioniks Why Spanish and Arabic?
 
because I know their secret
 
?
 
I study language
how how they effect the way we think
 
Right.
 
Eh, didn't Chomsky say all natural languages are essentially the same thing
The biggest problem with Arabic seems to be the writing system
 
6:04 AM
@Pubby That's the same as saying, "All languages are equal, but some are more equal than others."
 
All natural languages suck.
 
I have a huge program Bioniks Virtual Simulator I have tested everything in it
 
Some more than others.
 
And those that don't suck, blow.
 
@Mysticial ++
 
6:21 AM
@TaylorBioniks You tested 'everything'?
 
For science.
 
For great justice!
 
for both
I run the language through the BVS to see what their Ideologies are
 
6:41 AM
blogs.msdn.com/b/nativeconcurrency/archive/2012/04/12/… "Auto-Vectorizer in Visual Studio 11"
> So, in a sense, you don’t really need to know anything about auto-vectorization: simply recompile your program
Seriously, "Auto-Vectorizer in Visual Studio 11" -- I mean, we know it's a compiler feature, right?
 
It's probably just a marketing thing to make people who've "heard" of the term think ooooooh....
I seriously doubt it'll be able to vectorize anything that isn't trivial.
If the Intel Compiler can't do it for it's own chips... I doubt MS can do much better.
 
sbi
7:42 AM
For those who weren't around here yesterday, when we again had to fight for the book question: Please go through all the answers, read the comments, judge for yourself the books you know, and downvote whatever is crap. I'd like to especially point out this answer (a C book!), and this one (recommends Schildt!)
 
@Mysticial well, being able to do it for trivial cases is a lot better than doing nothing
 
@jalf That's definitely true. Though I can imagine that aliasing will block a lot of trivial cases as well.
I remember turning ICC's vectorization report - it basically bitched at every single loop I had. Because it couldn't probe that anything was not aliased.
 
sbi
> This book uses a modern object-oriented approach to data structures, unified around the notion of the Standard Template Library (STL) container classes. – Data Structures with C++ Using STL
I didn't know the STL is about OO.
HOLY COW! That book has a price tag saying $153!
 
Xeo
@sbi Of course STL is about OO! It packs data with functions. That's what OO is all about, right?
 
sbi
> The code examples are grossly out of date (were talking 1990's) and completely ruins the beautiful text by adding confusing, poorly written code examples to reinforce good literature. — A reviewer
@Xeo Sigh.
 
Xeo
7:48 AM
@sbi Oh, didn't I make that sound snarky enough?
 
sbi
@Xeo No, you did. It's just that I can't laugh about that anymore.
 
Xeo
:(
 
sbi
There was a time when we all embraced OO, because it was something new, and great. But we were well aware that it was but one paradigm. Nowadays, programmers seem to equal "good design" with OOP". That's so lame.
5
I'm not sure whether an answer merits a downvote based on that single review, but I don't see a reason to doubt that the reviewer is right, and if he is, then that's certainly bad. What do you guys think?
 
I just realized that my last comment was full of typos... bleh... that's what I get for multi-tasking across different monitors...
 
@sbi The worst part is that... I bought the book. Worst investment of my C++ shelf. I don't think I more than skimmed it.
 

« first day (549 days earlier)      last day (4400 days later) »