« first day (1209 days earlier)      last day (3725 days later) » 

2:00 AM
Wait, so you (a) know what arrays are and (b)still want to have variables like tasks_NPC1 task_NPC2 ... task_NPC{n}? — Benjamin Gruenbaum 5 secs ago
 
Game Programmers will always be bad
It's a law
 
Oooh, there's std::minmax
 
it is useless
 
2:02 AM
only works on two numbers
 
I should write a static analysis tool that searches for element["prefix_"+i] and stabs people when it finds it :)
 
Oh.
WTF
Sigh.
 
Use that instead
 
Yeah, I went looking for it.
 
lol that possible implementation
 
2:04 AM
Lol, he edited it. I really wish we still had the 'minimal understanding' close reason.
 
Hmm, returns iterators :S
fmap :(
 
You know, with std::optional, auto, and decltype a lot of the algorithms could be rewritten
 
going to bed cya
 
bye
 
2:08 AM
@Rapptz hmm?
 
Rather than returning an iterator, they could return std::optional<T> in some places
but I guess it doesn't give you much benefit
 
Which ones?
Some lose functionality.
 
like minmax_element
 
Namely, the ability to position things.
 
Yeah not all of them could be rewritten.
 
2:14 AM
Meh, I want bsr
 
@Rapptz I like the current system of returning the end iterator.
 
Ultimately it feels like you'd end up doing the same thing, i.e. checking if the result is valid
Like if you use std::optional<T>, you'd still have to check if it's engaged and if you return a range you still have to check if it's empty
 
Indeed. But I still like the iterator better than optional.
 
Meh.
 
Because a found iterator has more information (it - begin is offset for some kinds)
 
2:16 AM
It's okay.
Main advantage it has is slicing I suppose
f.begin(), f.begin() + 5
and that's only on some iterators lol
 
You can also use as argument in further calls. Say, calling erase or stuff like that.
 
And if you use optional then you'd have to return optional<T*> (because you probably don't want to make a copy). In that case I think returning T* would've been better to begin with.
 
It also lets you find "the one after", and so on.
 
Yeah, and what does optional offer? A lousy operator bool.
Twin Shadow doesn't sound so bad.
 
> Inverse discrete cosine transform
I hope this is in boost.
 
2:29 AM
I might never need it in my life.
This makes feel even more mortal.
 
Not in boost, it seems.
Here I go again.
2
Q: Couldn't find the error in my DCT / IDCT code

張傑程I'm doing DCT/IDCT on a 512 * 512 raw image, But my program could output a image which has only PSNR 17.54db, I've check my formula for several times, could someone help me about this? This is original picture After IDCT #include <stdio.h> #include <math.h> #define N 512 double COS[8][8], C...

Top Google hit for "idct c++"
Oh wait maybe in GIL.
But I'm not sure I want to require GIL for this.
Feels way out of place.
Doesn't seem to be in GIL anyway.
I think I might finally get to use <complex>
 
Why do you need IDCT?
 
for infiltrating human brains
 
I find it strange that boost doesn't have it
even SciPy has it
here's the source for it if you're curious
 
2:41 AM
Boost doesn't even have FFT, does it?
 
@R.MartinhoFernandes I understand each individual word.
 
I thought it did
Boost's math library was pretty good last I checked
 
> I've seen people's nose burst into blood
sounds cooler than the full statement:
> I've seen people's nose burst into blood when they slipped on ice and couldn't get their hands out of their pockets in time.
 
Android autocomplete sure is terrible
 
I thought they had seen a hot chick.
We use fftw++ or something at work, because boost doesn't have FFT.
 
I bet @Mysticial has a super performant one.
 
ok, I should sleep
 
@R.MartinhoFernandes I thought I could help you with that, but the code from the blog I read a while ago is not in C++ :(
 
Why does that matter?
Math is language agnostic.
 
@Rapptz I assumed he was looking for a ready implementation
 
2:48 AM
@Rapptz Beyond a doubt. It's probably the single most heavily used routine in Y-cruncher. For what it's worth, mini-cruncher has a pretty decent FFT itself (not a DCT though).
 
Yeah. You could use his, unless it's like GPL or something which I doubt
@ScottW What's wrong with enjoying what you do?
Maybe it's not how you'd describe it but it's how they describe their enjoyment?
 
What annoys me the most about this is that it is like impossible to find a battery of tests for this thing somewhere :S
 
vOv, as long as they pay moneyz... :)
facepalm
 
@R.MartinhoFernandes Steal SciPy's
 
@ScottW if you seriously quit because they market themselves as cool, well, good luck in your future! :)
 
Oh, I read "fftw" in all filenames here github.com/scipy/scipy/tree/v0.13.0/scipy/fftpack/tests and thought they were all for fft.
Silly me.
 
right, it was just a counter to your silly "omg the world is doomed, they say programming is cool" :)
 
[Bink 2.2 integer DCT design, part 1](http://fgiesen.wordpress.com/2013/11/04/bink-2-2-integer-dct-design-part-1/), [Bink 2.2 integer DCT design, part 2
November 10, 2013](http://fgiesen.wordpress.com/2013/11/10/bink-2-2-integer-dct-design-part-2/), and [accompanying Github](https://github.com/rygorous/dct_blog)
Markdown sucks.
 
But the world is indeed doomed for that.
 
the world is doomed for other reasons
such as the fact that we share 50% of our DNA with bananas
 
2:56 AM
I like bananas.
 
nanners are good, nothing wrong with them
we just have a lot in common
 
@ScarletAmaranth But not all bananas are born equal :(
 
@ScarletAmaranth I don't know what people mean when they state this
 
No one knows.
 
@Rapptz vOv, I don't know either, it's just a silly thing :)
 
2:57 AM
@Borgleader Thanks.
 
I mean, DNA is just a bunch of genes so if it already works of course it's going to be reused. I don't get the shocker aspect of it.
 
change the lounge name to Lounge<Pedantry> please :)
 
You need a G+ account to request name changes.
 
This is a list of keywords in the trading card game '. A keyword in Magic: The Gathering is a word or phrase (usually one or two words) appearing on a card, used to indicate that the card possesses a certain attribute or ability. These keywords are used in place of the full explanation of the attribute or ability, and are instead explained in detail in sections 701 and 702 of the Comprehensive Rules. However, in certain sets some keywords are immediately followed by italicized, parenthesized text (known as "reminder text") fully explaining the meaning behind the keyword. Every keyword ...
TIL this exists
 
3:01 AM
I can't think of a use-case for erf
 
@Scott did something happen to trigger this rant?
 
No one in Github uses it either
all I can find are the boost tests for it
 
@Rapptz Depends on whether it's still considered an FFT. It's so specialized that it isn't that useful for anything that isn't convolution.
 
You should distribute it :D
 
3:04 AM
@Rapptz One of my other github projects has a similar "convolution-optimized" FFT. It's optimized differently though.
That one is open-sourced,
 
I meant as a small library. Would be cool
I found like 4 of these
 
Add DCT while you're at it! whistles
 
I wish you could create a new project in Visual Studio and basically say "copy this one but call it this name instead"
 
@Borgleader Project Templates
 
@R.MartinhoFernandes Does it support variadic templates and TMP?
 
3:06 AM
lol
 
@R.MartinhoFernandes I want to create example4 based on like example3 =/
 
for (r = 0; r < 64; r++)
    for (c = 0; c < 64; c++)
      for (i = 0; i < 8; i++)
        for (j = 0; j < 8; j++) {
          double sum = 0;
          for (x = 0; x < 8; x++)
            for (y = 0; y < 8; y++)
what the hell
 
@Rapptz A 6-star programmer?
 
I actually did copy+hand-editing those projects with vim.
 
3:08 AM
@ScottW ikr
I like property sheets, though.
I don't think I ever wanted a reserve constructor more than for this project.
Pretty much every single damn vector is reserved.
 
which project?
nonius?
 
(Still don't think it's worth it, though)
@Rapptz Yes.
Some are reserved because I have to (no reallocations while measuring), some because the size is conveniently lying around.
I'll probably make one for vector<T> v; v.reserve(n); generate_n(back_inserter(v), n, f);
 
In Haskell, how do I get the HTTP headers from a Result (Response String)
 
Damn, is this the highest voted post on code golf?
724
A: Produce the number 2014 without any numbers in your source code

dansalmoPython (52 bytes) print sum(ord(c) for c in 'Happy new year to you!')

 
rspHeaders . Right
But you probably want to pattern match against Left and Right instead to handle errors.
 
3:16 AM
ermm
it's a toy program, so I'm not too worried about robustness
 
Hmm, it's not Right anyway.
 
oh...right
 
Hmm, I need to add boost to the includes without changing the sln/proj
 
@Borgleader I added it to my machine property sheets.
I think.
 
pfft
I added it to my system directory
 
3:20 AM
I don't have much space on my C:\ drive =/
 
Yep, added it to Microsoft.Cpp.Win32.user
 
it's a small SSD
 
@Borgleader by system directory I meant the place where the compiler looks for includes
 
View > Other Windows > Most Useful Window Ever. Then expand some project and double click Microsoft.Cpp.Win32.user.
Oooops, I mean View > Other Windows > Property Manager.
 
lol
 
3:21 AM
I have no idea why this is not visible by default.
It's almost like Microsoft wants VS to be crappy.
 
He just really loves that window
 
1
Q: Property Sheets in C#

GrahamI'm using VS2005 and I have a property sheet (vsprops file) that I'm adding to all the C++ projects but I can't seem to find out how to add them to the C# projects. How do I go about doing this?

1 min ago, by R. Martinho Fernandes
It's almost like Microsoft wants VS to be crappy.
 
@Rapptz Yeah that's on my C drive i think
 
This is pretty much the single best feature of the whole project shenanigans bullshit.
 
user3010322
I use property sheets for my engine.
 
user3010322
3:24 AM
They define DLL names to import, library names, preprocessors across the pieces of the engine, etc. etc.
 
Also, why the fuck do people say shit like this: stackoverflow.com/a/3630543/46642
Are they paid for it?
 
I thought it was a Vlad post. Dammit.
 
"It doesn't have tons of options so you can rejoice in the duplication and manual labour even though a feature to make it go away already exists in the same fucking program."
 
@StackedCrooked oh my god, wtf, the beginning of the first episode of Sankarea o_O twisted much?
 
@ScarletAmaranth Keep watching.
One of the more unique shows that of the modern era.
 
3:29 AM
I will... although I am already slightly disturbed :)
 
Closing my tabs, I found this: magiccards.info/query?q=!Demonic+Attorney
Wtf
 
Is that part of the troll set?
 
No
 
o.O wuttt
 
@Rapptz I love the new rules text.
 
3:31 AM
also... i think I forgot to tell boost to use all the threads... fuck
 
@R.MartinhoFernandes Wonder why they removed the first fragment
 
@Rapptz One of the golden rules (a few that cannot be contradicted by cards) is that a player may concede the game at any time, unconditionally.
 
> 101.1. Whenever a card's text directly contradicts these rules, the card takes precedence. The card overrides only the rule that applies to that specific situation. The only exception is that a player can concede the game at any time (see rule 104.3a).
looks like it's the only exception
 
I think 101.1 is too.
:P
 
how to store counters in database when a clicked on button c# and sql
5
 
user3010322
3:36 AM
@R.MartinhoFernandes When Microsoft builds software, a lot of the groups don't talk to each other, at all.
 
user3010322
You'd be surprised at how many duplicated utility libraries exist in the same company.
 
And you want to work there.
cough
 
user3010322
Hey, I applied to Ludia first.
 
user3010322
I'm interviewing tomorrow.
 
user3010322
STL's apprentice or bust.
 
3:37 AM
Hmm.
No std::exp for complex numbers.
I have to write this with trigonometric functions.
 
user3010322
File a bug!
 
@R.MartinhoFernandes Because theyre not in the same library
most likely
 
3:39 AM
All the other ones are in <cmath>, that one is in <complex>
 
The page for pow links to pow(complex) in See Also.
This one does too, now.
 
Oh, I thought you were talking about the list of overloads at the top
 
user3010322
Mmm.
 
user3010322
You know.
 
user3010322
I think the thing tha tmakes these Finite Automata and Nondeterministic Finite Automata hard is the massive amount of math-y legalese definitions.
 
3:40 AM
@Borgleader I was but it seems the convention is to just link in See Also.
 
@ThePhD What you studying?
@ThePhD Theory of Computation?
 
user3010322
@Code-Guru Hell CS Theory.
 
I enjoyed my Theory of Comp class.
but then I have a math bent
@ThePhD Feel free to shoot me questions if you need any clarifications. It's been a while and I wouldn't mind brushing up on that stuff.
 
user3010322
=[[[[[[[[[[[[[[[[[[[
 
user3010322
You're one of them. One of the freaks that propogate this madness.
 
3:47 AM
@ThePhD I don't get it. What do you think programs are except massive amounts of math-y legalese definitions?
 
Yeah, C++ has no pi constant.
 
user3010322
@R.MartinhoFernandes They're my math-y legalese definitions, and I can entertain myself with UB. :D
 
yay for freaks!
 
@R.MartinhoFernandes Did you ever build nonius in release? Its not finding catch for me
 
@Borgleader Oh. I might have forgotten to add the path for Catch. I did build in Release, but before I added the test project.
Yep, forgot.
 
3:50 AM
@phresnel seriously, boost is the only reason why c++ can be as easily written as php with a massive relative performance increase, not to mention its children: json-spirit & websocket++. — Gracchus Aug 10 '13 at 23:13
PHP is easy to write?
 
user3010322
I really don't know where the "php is easy" illusion comes from.
 
user3010322
I pick up PHP and I shit myself, it's so hard and makes no sense. :c
 
user3010322
It's one of the things I first tried, and I went back to C++ after 3 days.
 
Ha, that reminds me that atan is not side-effect free.
 
None of the math functions are
 
user3010322
3:52 AM
@Code-Guru How long will you be staying up for? I need to finish my CS Theory homework in the next 5 hours and turn it in at the crack of dawn before I leave for my interview. :D
 
well...probably not that long
 
user3010322
My brain is already addled.
 
I think it's really odd that C++ doesn't have pi or e constants
It's really minor.. but everyone else has it
 
bah! my internet connection is taking a shit on me
 
@Rapptz e not so much, I think.
You can just exp(1).
 
3:56 AM
You can also acos(-1) for pi
 
I just use a 50 digit literal.
Yes, it's ironic that a program that computes Pi needs to have Pi in its code.
 
Don't you have TBs of this stuff?
 
@Rapptz That's correct. But I'm pretty sure VS2012 won't appreciate it if I use a floating-point literal that 10 TB characters long.
:)
 
TBs of pi?
 
Real men use long long double.
 
3:58 AM
Oh, I need ifft. Of course.
 

« first day (1209 days earlier)      last day (3725 days later) »