« first day (444 days earlier)      last day (4487 days later) » 

10:00 PM
Also, damn you, Fourier.
shakes fist
 
What do you have against Hitler?
 
oh you're into Fourier Transforms by any chance?
 
Hasbro Transformers are better.
 
@RMartinhoFernandes I don't get the Hitler reference?
 
Although I think there won't be any actual transforms on this test, only Fourier series.
 
10:01 PM
Anime episode. Enemy's face smile, Hero's face grimace, boob shot, Enemy's face grimace, Hero's face smirk, boobs, Hero's Enemy's boobs, Heronemy's BOOBS, Boobs, hero, enemy, girl's face and boobs.... To be continued.
 
@RMartinhoFernandes you obviously have no idea what I'm talking about
 
@TonyTheLion Maybe Fourier doesn't sound a lot like Fürher in your head :(
 
@RMartinhoFernandes no it doesn't
Fuehrer is "leader" in German, Fourier is someone's name, Joseph Fourier
guy that invented the Fourier Transforms or Series, can't remember
 
I know. But it sounds alike in my head :(
 
@Xaade Add tentacles to transform into hentai.
 
10:02 PM
lol
 
Xeo
It was a bad descision to have Windows check my 2TB external drive
 
@Xeo yes
 
He was secretly a Power Ranger.
 
@Xeo Why? It broke it?
 
@CatPlusPlus oh well, I've been trying to find out how this Cosine Transform code implementation I have could possibly resemble the math formula...
 
10:03 PM
Use Haskell.
 
I don't need to code it, thankfully.
 
Hitl.... (removed)
 
@Xeo I have a roommate who asked me angrily why windows defragmenter takes longer and longer with newer and newer computers
 
@CatPlusPlus yea you're lucky :P
 
Hi!
 
10:04 PM
Y U KEEP REMOVING STUFF.
 
(beleted)
 
@kbok haven't seen you ages, how you been?
 
Xeo
@RMartinhoFernandes No, but it's been bugging me for month that everytime I connect that HDD, I get that annoying "Check and repair | continue without check" dialog
 
@CatPlusPlus He seems to do that often when drunk or sleep deprived.
 
Xeo
So I thought "Fuck you Windows, just do it."
 
10:05 PM
 
@Xeo There's a command-line tool you can use to shut it up.
I think it's fsutil.
 
Xeo
Too late, I guess
 
@TonyTheLion Great, thank you! I've been ultra busy lately with all this "getting a job" stuff
 
Xeo
It's currently at "91 files processed.".
 
@kbok oh I know how that feels, all too well
 
Xeo
10:05 PM
Out of over 1TB
 
1 min ago, by StackedCrooked
@CatPlusPlus Because it's embarrasing.
Like this? :P
 
Your momma is embarrassing.
 
@RMartinhoFernandes I got disfrequented ok!
Holiday! I took a break from trolling.
 
WTF is "disfrequented"???
 
Disfrequented?
 
10:06 PM
So I thought I'd hang out in the C++ room a bit to not talk about C++
4
 
Like, they take away your frequencies?
 
Xeo
Omg, that file checking hogs over 1.2gig out of my 2gig RAM D:
 
oh lol, he comes here to not talk about C++ :P
 
sbi
@Xaade Yeah, we all noticed your holidays. It was peaceful here while you were gone.
 
Hmm, it's been a while since a message of mine was starred.
 
10:07 PM
there you go
 
@sbi I'm back, and there's nothing we can do!
 
I knew it would work!
 
No! Bad lion!
 
@TonyTheLion So did you find a C++ job finally ?
 
sbi
@TonyTheLion I suppose it's an euphemism for being kicked off the owner list for dropping off the list of frequent users.
 
10:08 PM
@kbok yep
 
@CatPlusPlus Bad cat!
:(
 
I'm Batman!
And I didn't do it!
 
@sbi oh I forgot we haven had this discussion
 
@sbi He was taunting me for not being able to QFT a deleted message.
 
so who's good at math here?
 
10:09 PM
I know who's good at meth here.
 
sbi
@TonyTheLion Robots are.
 
@TonyTheLion Still annoyed by this Fourier stuff ?
 
@CatPlusPlus not interested
 
@kbok yes very, I can't figure it out for the life of me
 
10:09 PM
I think the algorithm you're looking at is a DCT transformation, which is quite different from the analog one.
 
well, it's not a Fourier Transform, but a Discrete Cosine Transform
 
@kbok GRAYHHHHHH.... why does math have to have so many words.
 
I'm not good at math. I can't integrate, I can't calculate limits, I can't do stats, I have no idea what a Fourier Transform is...
 
I have an implementation, but I can't figure out how they got from the formula (math) to this implementation
 
sbi
Damn, it's past 11pm. I need to get up early tomorrow morning and take a sick child to the doc's. :(
Well, Good night, folks!
 
10:10 PM
@RMartinhoFernandes Also probability.
 
@sbi So you're not in the states anymore?
 
@sbi Good night. I hope it's nothing serious.
 
Xeo
"133 files processed." @_@
 
sbi
@Xaade The last time I've been was 1995.
 
@TonyTheLion Magic.
 
10:11 PM
@TonyTheLion Was wikipedia of any help ?
 
@Xeo It'll go faster if you don't look at it.
 
Xeo
I get a feeling I won't be able to use my external HDD till morning
 
@CatPlusPlus In this case, I need to understand how it works
 
Magic!
 
sbi
@RMartinhoFernandes Nope. Just a cold. But I need a piece of paper from the doc for my employer... :(
 
10:11 PM
Post the formula.
 
Wizard did it.
 
@sbi Ah.... you kept referencing a familiarity, I assumed you lived here.
 
I shouldn't have said that.
 
@kbok somewhat, it helped me understand how the DCT works, but not the code implementation I have
 
Post the code.
 
10:12 PM
@Xeo USB1 connection?
 
Are you implementing JPEG?
 
I know my code takes 1D IDCT's by row and column of my image
 
@CatPlusPlus "I can turn invisible, but only if no one looks at me"
 
@CatPlusPlus I'm trying to understand it, because I need to do something with it
 
Ha-ha, I guessed.
See how awesome I am.
I know what DCT is used for.
 
10:13 PM
Nice guess :)
 
@CatPlusPlus Well, he posted a question stating that recently.
You could have just seen that.
 
@TonyTheLion DFTs, FFTs, DCTs, etc... the math isn't that bad... But every single competent implementation I've seen (and written myself) is harder to understand than watching unsubbed anime with absolutely no Japanese background.
 
I didn't.
 
An he's been asking about image libraries too.
 
@TonyTheLion UNCROP, ENHANCE?
 
10:14 PM
I'm being slow, but could someone remind me where it says in the standard that member functions of class templates are function templates?
 
@Mysticial Yep, I'm afraid this kind of code is write-only
 
I was looking at 14.7.3, but that wasn't it
 
@CatPlusPlus like in CSI?
 
@MooingDuck Uncrop is from Red Dwarf.
They don't try that hard to be silly in CSI.
 
10:16 PM
Well, here is the implementation of a 1D IDCT that is used to calculate 8 DCT coefficients from an array of 8 x 8 coefficients. I don't see how this even vaguely comes close to the math formula for a IDCT
 
I blame Blade Runner. It had "zoom & enhance" technology in it (but not the silly kind with the pixels), and now everyone does it.
 
neither can I find any decent documentation of this inverse two dimensional DCT, Chen-Wang algorithm
 
Xeo
@MooingDuck theoretically no, but it's connected through a USB hub. Hmmm...
 
@TonyTheLion Yep :) That's cause nobody actually implements the math definition. They do it using the FFT algorithm instead.
 
@Mysticial have you managed to figure that out?
 
@TonyTheLion: if it is anything like the Fourier Transform, it will because of the fact that the trig functions have been rewritten as e-exponentation in the complex domain (remember a (complex) unit circle? you can map the trig functions onto there).
 
@Mysticial ah, so this is a 1D FFT ?
 
@Mysticial Cooley-Tukey IIRC
 
@MooingDuck FWIW, the guy with the H on his head is a hologram.
 
@MooingDuck I love that zoom gives you whole another angle on that eye.
 
10:18 PM
@TonyTheLion Yes, it looks like a standard radix-2 Cooley-Tukey implementation - completely inlined.
*But for DCT instead of DFT
 
@Mysticial ah, cool. Do you know of any documentation on the implementation of this algorithm?
 
The proof for why FFT works is rather tricky, but I bet you don't need to prove it manually from memory
 
@TonyTheLion The Wiki.
 
@RMartinhoFernandes I don't want to live on this planet anymore
 
@kbok No! Not that! The Other Wiki.
 
10:19 PM
@TonyTheLion I have no experience with DCTs, only for FFTs, but I'd assume it's almost the same.
 
The Wiki will suck away your life.
 
@RMartinhoFernandes Uh, what ?
 
@kbok which Wiki?
 
The Wiki.
 
you were being vague
 
10:20 PM
@RMartinhoFernandes Ah, I see :)
 
@MooingDuck Relax, it's a comedy show.
@sehe I was not being vague.
 
@Mysticial Well, a FT can use Sine and Cosine waves, a Cosine tranform, only Cosine of course
 
The Cooley–Tukey algorithm, named after J.W. Cooley and John Tukey, is the most common fast Fourier transform (FFT) algorithm. It re-expresses the discrete Fourier transform (DFT) of an arbitrary composite size N = N1N2 in terms of smaller DFTs of sizes N1 and N2, recursively, in order to reduce the computation time to O(N log N) for highly-composite N (smooth numbers). Because of the algorithm's importance, specific variants and implementation styles have become known by their own names, as described below. Because the Cooley-Tukey algorithm breaks the DFT into smaller DFTs, it can be c...
 
@RMartinhoFernandes CSI isn't. Look what they did
 
CSI is a comedy show?
 
10:20 PM
The Wiki is TVTropes, and The Other Wiki is Wikipedia. There's no vagueness in that.
 
Cold turkey algorithm.
 
@Mysticial FFT is an implementation of the much theorical DCT
 
Dammit, I'm going to end up doing another all-nighter with this math stuff.
 
@TonyTheLion And that's actually about as much as I know about DCTs... lol As far as FFTs go... I'm embarrassed to admit how much experience I have with them.
 
@Mysticial well, at least you understand more then I do, and I need them at the moment, hahah
 
10:23 PM
Why do you need to understand it?
JPEG is already implemented. :P
 
@Mysticial but I guess a FFT can be used for DCT as well?
 
That code you linked to is actually less trivial than I thought, as it appears to be working on integer/fixed-point rather than FP...
 
> "At one major investment bank for which I worked, we used psychometric testing to recruit social psychopaths because their characteristics exactly suited them to senior corporate finance roles."
 
10:25 PM
Also, my (not) sleeping is going to kill me, isn't it.
 
It's Charles Stross' Rule 34 book, but in reality.
 
@Mysticial yes I read that somewhere along the line as well
 
@TonyTheLion The same optimization techniques will work on both. But I'm not sure about the fine details.
 
@CatPlusPlus Probably.
 
@Mysticial right, well, thanks for helping to figure out which algorithm it is. That's a big help :)
considering I've been searching for about a week
 
10:27 PM
What are you trying to with it?
 
Well, I have to see if I can insert a scale factor in there
I have read that it can be done, somewhere
I want to use only 4 x 4 of the 8 x 8 pixels
it's called DCT Output Pruning
 
You can't just multiply the entire input/output by the constant factor?
*though it's trickier with the fixed-point
 
@Mysticial well, possibly, but I can't do anything with code I don't understand
this bunch of additions and multiplications have no meaning to me at this moment
so it's hard to know where I can add or change to do anything.
@Mysticial what's the difference anyway, between using fixed point and floating point?
 
Xeo
So, I cancelled the disk check and explorer.exe still hogs 1.2gig ram, very slowly decreasing. WTF?
 
I thought fixed point was not as accurate
but perhaps floating point is too slow
 
Xeo
10:31 PM
It decreases in 256k memory blocks it seems
 
@Xeo Reboot?
 
so the optimization is fixed point, my guess
 
Xeo
Nah, it's a steady decrease
And I get a feeling it's a left-over from the cancelled check
 
@TonyTheLion "Fixed-point" is used a number of different ways. In this case, it looks like the author is emulating 8-bit precision FP with integers.
 
@Mysticial oh jeez
i can imagine that only adds complexity
 
10:32 PM
I can't believe it.
 
yeah, you can see why those >> 8 all over the place
 
0
Q: Calling external class members from shared object

devendra raiAfter lot of reading here and here, I still cannot get my code to work. Here is the problem: I have two classes, Fifo: #ifdef __cplusplus extern "C" { #endif class Fifo { public: Fifo(int len); ~Fifo(); void AddTokens(void* buffer, unsigned len); private: // some variables ...

Lol @ extern "C" around the class.
 
Xeo
Okay, I think I'll indeed reboot
 
Because that will obviously pass as a C header.
 
Xeo
Since it also hogs 50% cpu
 
10:33 PM
@Mysticial ah, that's what they are for?
@CatPlusPlus lol
 
@TonyTheLion That's what I suspect. I'm not 100% sure though. Do you happen to know what the representation for the input/output are? documented anywhere?
 
@TonyTheLion In a fixed-point representation you usually take a number of the lower bits to mean the fractional part, and use the upper bits as the integral part. If you're using 8 fractional bits and shift right by 8, you get the integral part.
 
Similarly, when you multiply two numbers in that representation, you need to right-shift by 8.
If you look at the line: `(181 * (x4 + x5) + 128) >> 8;`

You'll notice that the `181` and `128` together form `181.5`, which is a twiddle factor.
So yes, don't be surprised that the combination of the cryptic radix-2 Cooley-Tukey along with fixed point is making it impossible to figure out...
 
Encapsulating the fixed point arithmetic nastiness into a class would help a lot.
 
BUT THE BLOAT.
 
10:47 PM
Ah, so that's what bloat means?
 
@CatPlusPlus can be fought if your crafty, but it makes the class look ugly.
 
From the performance side, fixed-point isn't such a great idea anymore. Not with hardware FP...
 
Wasn't it always more about precision being constant than performance?
 
unless that code was written for an embedded environment, that didn't have hardware FP
 
10:49 PM
It's not very bloated if all the template stuff gets inlined by the compiler.
 
@CatPlusPlus actually, if you split it into two components and group the shifts, you could get a decent speed up, but I've just remade float in software :(
 
FYI, sarcasm.
 
@StackedCrooked it actually can be, since it'll shift after every operation.
 
@MooingDuck If you remade float it's not fixed point.
 
@CatPlusPlus Yeah. See my period.
 
10:51 PM
Most x86 machines now have more FP throughput than shift throughput. On some of the pentiums, right shift was slower than left-shift...
 
@RMartinhoFernandes what I described was a normalizing float. I'm making up terms here to fit my usage, but that's basically what it is
 
@StackedCrooked Ew.
Also, what.
 
Anyone ever used prelink?
 
I read that, but I still don't know what the fuck is "a prelink".
 
10:54 PM
prelink is a free program written by Jakub JelĂ­nek of Red Hat for POSIX-compliant operating systems, principally Linux (because it modifies ELF executables). It is intended to speed up a system by reducing the time a program needs to begin. Actual results have been mixed, but it seems to aid systems with a large number of libraries, such as KDE. The equivalent process on Mac OS X is called "prebinding". Method Most programs require libraries to function. Libraries can be integrated into a program once, by a linker, when it is compiled (static linking) or they can be integrated wh...
Prelink makes application startup faster by preloading the dynamic linking stuff into the binary. Or something like that.
 
looks like it caches the shared objects with the executables
 
Hum
 
I've experimented with it because I find Ubuntu to be incredibly slow when it comes to program startup.
 
Is there a way to work out the allocation overhead necessary for an placement array new ?
 
Ah, well, Ubuntu.
 
10:56 PM
And it does seem to help a little. However, I'm still not sure whether the perceived faster startup just my imagination.
 
Yeah, always discount wishful thinking first.
@kbok There's a placement array new?
 
@kbok Why are you using that?
If it exists.
 
@RMartinhoFernandes I've never thought of it, but it makes sense that it would exist
 
It makes sense?
 
Placement new with a size give you all you need to make up something that ought to act like an array.
 
10:58 PM
@CatPlusPlus I'm trying to work out a way to force MSVC to zero-initialize my non POD structs
 
user142019
C++ never makes sense.
 
@WTP No, it's you who is lacking basic understanding.
 
Actually, i'm writing an article about why this solution is shit, but I want it to be valid C++ at least
 
@kbok devx.com/cplus/10MinuteSolution/30508/1954 has stuff, it seems to be placement-new-ing an array
 

« first day (444 days earlier)      last day (4487 days later) »