« first day (814 days earlier)      last day (4149 days later) » 

7:00 PM
@FredOverflow Nah man. The first song I learned on guitar was this, I go all out
 
user142019
No, start with TMP factorial.
 
Why TMP if we have constexpr?
 
@Crowz Are you trying to play guitar on C++? That would explain some of the confusion.
 
@FredOverflow I actually was working some point on a program that makes up music
 
user142019
7:01 PM
@FredOverflow well, he uses tabs.
 
@Zoidberg lol
 
user142019
Tabs are bad.
 
Tabs are way easier than notes. Which is a + in my book.
 
user142019
Spaces are superior.
 
I can't into music :(
 
7:03 PM
@Zoidberg are not
 
user142019
Tabs are not equally wide everywhere.
 
user142019
That's terrible.
 
@Zoidberg that's the beauty
 
user142019
No, that's horrible.
 
they can be as wide as you want
 
user142019
7:04 PM
It's even worse than indenting with two spaces.
 
@Zoidberg it's what they're for. If you don't like that purpose, don't use tabs. Don't redefine them to be something else. That's just silly.
 
@Zoidberg What are you talking about? Tabs are 4 or 8 everywhere, aren't they? ;)
 
@Zoidberg yeah, 3 spaces are way better. or rand() spaces...
 
user142019
Four spaces is minimum for me for code to be readable.
 
tabs to indent, spaces to align
 
7:05 PM
@Zoidberg Scala uses 2 spaces and I like it :)
 
user142019
Two spaces is terrible.
 
@Collin exactly
 
it's the best way, but it's hard to get editors to do it that aren't named emacs
 
@Zoidberg and for me 2 spaces are better. with tabs everyone can be happy
 
matrix(int in_x, int in_y, float[] in_values)
 
user142019
7:05 PM
No, it's not best that way.
 
@Zoidberg 4 spaces would be way too much in idiomatic Scala, because you have so much nesting going on.
 
user142019
Best is only spaces.
 
Why won't it accept that?
 
user142019
Y U USE C-STYLE ARRAY
 
float in_values[]
 
user142019
7:06 PM
Use std::vector or std::array.
 
17 secs ago, by Zoidberg
Y U USE C-STYLE ARRAY
 
@Crowz float[] in_values? Are you a Java refugee?
 
user142019
C-style arrays are terrible.
 
@FredOverflow yep haha
 
user142019
They decay to pointers and you need to keep track of their lengths yourself, and you cannot easily copy them, or assign them, or whatever.
 
7:07 PM
@Zoidberg I'm bad with pointers is why.
 
I like C arrays. When the element type is const char. And I use them to initialize std::strings :)
 
@Crowz You seem to be bad in everything...
 
@Crowz Actually, your in_values parameter is a pointer :)
 
@yetihehe yep
 
user142019
Do this:
 
user142019
7:09 PM
matrix(int x, int y, std::vector<float> const& values);
// or if you need a copy of the vector
matrix(int x, int y, std::vector<float> values);
 
That's complicated and difficult...
 
user142019
No.
 
will this get unlocked and locked each time around the loop?
 
user142019
That's simple and easy.
 
while(1) {
    ScopedLock(Mutex) lock;
    //do stuff
}
 
user142019
7:09 PM
C arrays are complex and fucking annoying and terrible.
 
@Crowz Then definitely DONT use haskell.
 
user142019
If you use them, you should use C and not C++.
 
user142019
Use std::vector like any sane C++ programmer, for as far as C++ programmers can be sane.
 
@Crowz You're underestimating the complicatedness of C-style arrays
 
@Zoidberg What is const& ?
 
user142019
7:10 PM
A const reference.
 
@Crowz constant reference, you can read the values, but not change the vector
 
341
A: What is your best programmer joke?

Andrew from NZSGWhy programmers like UNIX: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep

lol
 
user142019
yes is such a terrible name for what it does.
 
1983
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...

@Zoidberg What does it do?
 
7:12 PM
C++ is making me never want to program again hah
 
user142019
@FredOverflow for (;;) std::cout << (argc == 2 ? argv[1] : "y") << '\n';
 
@Zoidberg Why on earth would you need a program like that? :)
 
yes | some-shitty-tool-that-has-no-force-option
 
user142019
@FredOverflow Only thing I can think of is piping.
 
user142019
Hard drive filler.
 
user142019
7:14 PM
$ yes > foo.txt
 
@Zoidberg dd does that quite well
 
dd is faster for that
 
user142019
dd can write to regular files? TIL.
 
My laptop's hard drive has a raw sequential write speed of 8,3 MB/s. That's not very fast, is it? :) I think I need to put an SSD in it.
 
Devices are files
If it couldn't write to files it couldn't write to anything
 
7:15 PM
@Zoidberg dd if=/dev/zero of=/home/big
something like that
 
user142019
Oh cool.
 
user142019
Hmm.
 
@Collin Great for writing over garbage before compressing a partition to an image :)
 
yeah
or speed tests
 
user142019
Is there a way to allocate a non-sparse file without writing it? Just raw allocation, no nulling of content or whatever. Think malloc but on file system.
 
user142019
7:16 PM
A friend once needed it to speed up something.
 
sheesh
woke up now
hello
 
Everything is a file on linux.. unless it's a network interface
 
@Zoidberg Yes, at least on Windows
But it needs elevation, security risk
 
user142019
Hmm cool.
 
user142019
So you will have a file with random content?
 
7:19 PM
@Zoidberg random might be a strong word
 
user142019
You get the point.
 
user142019
Pedant. :P
 
> When your hammer is C++, everything begins to look like a thumb.
lol
 
WE ARE NOTHING IF NOT PEDANTS it's all we have
 
@Collin s/OF/IF/
 
7:21 PM
was thinking the same thing all the way from the Javascript room.
 
209
A: What is your best programmer joke?

Robert RossneyThis is from the 70s. It can easily be updated to the present day, but it has a certain charm just the way it is: Three women sat discussing their husbands and their sex lives. "My husband's a wrestler," said the first. "He's really strong and aggressive in bed." "My husband's an artist," sa...

 
"Code is like a woman. you think you might understand it but just when you believe you have a handle on things everything crashes due to a single missed period."
slightly sexist joke. only humor intended. no offence. runs.
 
user142019
Itself is written in C++. Use the app. You cannot do this unless you pass a pointer to the type names foo(0, std::make_tuple(2, "TEST", 5.5)); You can use the well-documented NSJSONSerialization class to do this. It comes with Foundation. } Here, object is the receiver, and addStringsToArray is the selector. Use automatic storage duration: std::list&lt;char&gt; stuff; thing will be called when thing goes out of scope, implicitly calling the -[UIViewController presentingViewController] method on C: UIViewController *A = C.presentingViewController; This will return type and argument types of
 
user142019
Flack Overstow is funny. xd
 
welp, I give up on C++
 
user142019
7:27 PM
Good.
 
user142019
Now learn Haskell.
 
125
A: What is your best programmer joke?

RoadWarriorIf Java is the answer, it must have been a really verbose question.

 
Why is Haskell special?
 
posted on January 07, 2013 by Eric Battalio

This is the second installment in the "In The Community" series spotlighting members of the C++ / developer community. Today we meet James McNellis, a developer on the Visual C++ team and community guy. James is a developer on the Visual C++ team, which he joined this past July.  As a member of this team, he builds awesome C++ libraries and is currently doing work on the C Runtime Librar

 
user142019
Always use the best tool for the job. So, never use Java.
 
user142019
7:29 PM
@Crowz It's the least terrible language.
 
What programming language is most widely used and easiest to learn and easiest to get a job doing?
 
user142019
What do you want? Most-widely user or easiest to get a job doing?
 
user142019
Also, what job?
 
All of them
 
@Zoidberg any job haha I really don't care
 
user142019
7:31 PM
There is no language that is best for all jobs.
 
user142019
There is one language that is for all jobs not the best; Java.
 
user142019
For example
 
user142019
I would write some things in Python if that's easier/better.
 
user142019
But I won't write say, a bootloader or a kernel in Python.
 
user142019
I'd rather use assembly and Haskell for those.
 
7:33 PM
Haskell can write kernel?
 
user142019
Why not?
 
It goes that low-level?
 
There were attempts.
 
I'd assume for an OS you'd need a lot of to-the-hardware power. Haskell doesn't sound like it has a lot of to-the-hardware power.
 
user142019
All you need is a runtime.
 
7:34 PM
There are few OSes in Haskell
 
user142019
You may need to write a small part in C or C++.
 
82
A: What is your best programmer joke?

gaylardQ: Why did the programmer quit his job? A: Because he didn't get arrays.

 
I'd never do anything that complicated...
 
user142019
What do you want to do?
 
user142019
7:36 PM
Without knowing that we can never suggest a language.
 
@Zoidberg Yet you still suggest haskell ;)
 
Because Haskell is God.
 
user142019
Of course. If I don't have enough information I just pick my personal favourite.
 
@Zoidberg what's the easiest thing to do?
 
Sleep
 
user142019
7:41 PM
Program that exits immediately.
 
Easiest job I mean haha
 
user142019
That question is broad as fuck.
 
user142019
What are you interested in?
 
Being a garbage man
 
Ah, this one never gets old:
 
user142019
7:42 PM
Heh. :)
 
user142019
Most PHP fans don't even know what Haskell is.
 
@Zoidberg I'm not, that's part of the problem haha
 
user142019
Well then go do something else.
 
user142019
Go repair bicycles.
 
user142019
Or do what you like.
 
7:43 PM
He likes art.
 
I like film and art. So I majored in compsci.
 
Some digital art.
 
user142019
Go draw a bicycle repairer.
 
"I like film and art. So I majored in something that is peripherally related to film and art."
 
I want to do storyboarding for films, but yeah, that's not gonna happen. So I just want a job.
@ThePhD I also can't do math so it makes it more bad hah
 
user142019
7:44 PM
Write software that you can use to storyboard films.
 
If you don't like programming, DONT work as a programmer. you WILL hate it and your programs will be shit and your users will hate you
 
Yeah.
In fact, Crowz, why don't you write a simple animation program?
In fact, let's go back even further.
Make paint. For the lulz.
 
user142019
If you just want a job, go work as a Java developer just for the money.
 
user142019
Most companies who want Java developers only look at diplomas anyway.
 
@ThePhD that sounds insanely difficult
 
user142019
7:46 PM
That's easy.
 
Then I guess you shouldn't do it. :3c
 
user142019
It's like.
 
If you're going to do something insanely difficult,
 
user142019
You have a 2D array of colours and you can manipulate that.
 
why not make it be something you love? (Drawing, modeling, creating?)
 
user142019
7:46 PM
That is Paint.
 
woo! I finished my first draft of my tree balancing routine!
 
@ThePhD doesn't all that involve insane amounts of really complicated math?
 
@MooingDuck But can it run Crysis 2?
@Crowz =l
I'm talking about
regularly drawing
or digitally
 
@MooingDuck tree balancing like AVL tree?
 
Not the actual paint program.
 
7:48 PM
@ThePhD not good enough.
 
It's what you love, but it's also not good enough.
 
@Crowz tree balancing completely unrelated to AVL tree
 
Make up your fucking mind. =l
 
user142019
Diplomas are terrible.
 
user142019
I'm a much better developer than most people of my school.
 
7:49 PM
@ThePhD nooo I'm saying I'm not good enough at it. Ever see a professional artists? They're really really fucking good
 
user142019
Yet I'll get exactly the same diploma.
 
user142019
This system is terrible.
 
@Crowz Then... practice?
 
https://gist.github.com/4477805
Like this kind of thing or what?
 
user142019
The idiot who invented it was terrible.
 
user142019
7:50 PM
Probably some socialist.
 
@Zoidberg Actually, a business man.
School is a business.
Nothing more, nothing less.
 
@ThePhD I've been working on it... still hard to do.
 
@Crowz Would you like to be the artist for my game? :3c
 
user142019
@ThePhD it's not the school who invented diplomas.
 
I could use some help.
 
7:51 PM
@ThePhD nah.
 
62
A: What is your best programmer joke?

Kasper VesthYour momma's so fat, that when she sat on a binary tree she turned it into a sorted linked-list in O(1). Not a joke per se, but I think it is funny :)

@ThePhD F1 usually works.
 
@FredOverflow I changed that shortcut key to automatically edit debuggable primitives in my programs. ;D
 
@Crowz do you know the difference between a generic binary tree and an AVL binary tree?
 
Your mother is so fat that if we made a recursive algorithm to calculate her mass, it would result in a stack overflow
@MooingDuck nope.
 
@Crowz alright, well, basically AVL is a method of balancing a generic binary tree. I have a completely unrelated method of balancing a generic binary tree.
 
7:53 PM
@MooingDuck sounds difficult
 
YES
ViewProjection.api = DirectX::XMMatrixOrthographicOffCenterRH( 0, 640, 480, 0, -1, 1 );
ViewProjection2 = Matrix::CreateOrthographicProjectionOffCenter( 0, 640, 480, 0, -1, 1 );
bool eq = ViewProjection == ViewProjection2;
 
user142019
@FredOverflow a binary tree can be implemented using a sorted linked list.
 
eq == true === FUCK YEAH
 
@Crowz I don't like AVL. Too slow during insertion and deletion
 
user142019
Then you can turn it into a sorted linked-list in O(1), indeed.
 
7:55 PM
@MooingDuck isn't it primarily for quick SEARCH though?
 
@Crowz not really, and they're almost identical in search speed. But AVL is much slower for insertion deletion.
how weird is it that my sentinel node is also my allocator? is that too weird? It works out very nice code-wise.
 

« first day (814 days earlier)      last day (4149 days later) »