« first day (597 days earlier)      last day (4350 days later) » 

11:01 AM
Uhoh. Red flags
 
11:23 AM
@CheersandhthAlf I really recommend you use (La)TeX for books, especially when maths are involved. Believe me, it's awesome.
TeX was made for such things.
Word is made for documents, not for books.
 
Yay! Backup!
@Neil No they'll go "huh, the sucker used Word and look what that made him do..."
 
Wikipedia uses LaTeX for rendering mathematical formulae.
The C++ standard was written in LaTeX. Okay, maybe that's a reason not to use LaTeX, but still.
 
@RadekdaknokSlupik that is a reason against it yeah :D
 
And LaTeX has a mode specially for books. :)
\documentclass[a4paper,10pt]{book}
\title{foobar}
\author{Alf}

\begin{document}
\maketitle
\chapter{Maths}
\section{Multiplication}
TeX!!1 $x = y \cdot z$
\end{document}
 
@RadekdaknokSlupik you forgot the \maketitle magic!
 
11:31 AM
@RadekdaknokSlupik Here is the result: f.cl.ly/items/2T312m2r1N433o0D1E2i/Naamloos.pdf
 
Ell
why is it that it must be night time for anyone to be o the mumble server? :L
 
@RadekdaknokSlupik he he
 
Skype > Mumble
 
@user101579 Sorry. I'm at work so I can't be in chat much. The red flags occur because it is generally a bad (really bad) idea to roll your own encryption mechanism. Even trivial modifications to a mainstream algorithm (or just a bad choice of IV) may render it a glorified obfuscation instead of encryption.
 
> TODO: Put Database class somewhere else
My comments are so descriptive.
 
11:37 AM
@user101579 The fact that you have to ask for expertise doesn't give me the impression that you are the cryptologist that should be meddling with the internals of said algorithms.
 
@CheersandhthAlf Did I mention that TeX works with version control in a decent way?
</advertiser-mode>
 
Ell
arghh i have to mow the lawn :'(
 
@RadekdaknokSlupik all right. my versioning so far has just consisted on saving copies. they're numbered automatically.
 
@user101579 If you want more information on how, why, and when to apply existing algorithms, ask away. Otherwise, people will likely take limited interest (though I know of two regular chat users who like a challenge in this area. Keep in mind, that they will probably start of with the same warnings)
 
My rep is a palindrome: 12121
 
11:38 AM
@CheersandhthAlf Ah,
@Pubby +1 :P
 
@CheersandhthAlf must read/reference if you decide to try it out: en.wikibooks.org/wiki/LaTeX
 
:)
 
(:
Oh yeah and Word was developed by Microsoft. Another reason not to use it.
 
@CheersandhthAlf looking nice. Despite the use of Word :)
> Doing international text properly in C++ is Pretty Complicated™, especially for portable code, and so I defer the discussion of that to chapter xxx.
^ lol
 
6 mins ago, by Radek 'daknok' Slupik
</advertiser-mode>
:P
 
11:45 AM
@rubenvb Unmatched closing tag ignored.
 
@RadekdaknokSlupik What, are you implementing a sloppy parser? Fail early and fail loudly!
 
@sehe The user explicitly enabled lenient mode.
 
Sloppy then :)
 
ugh
 
Does anyone have any idea why numbers represented as fractions (like boost::rational) are not used more often? They seem like a great way to reduce errors, especially in scientific calculations.
 
11:46 AM
@CheersandhthAlf Pretty encyclopedic. About c++? Not so much. The figure on page 21 is pretty neat.
 
@PaulManta They are slow as fuck compared to floating point numbers, and often you don't need the precision (or you want to represent irrational numbers).
 
@PaulManta Slow? Also not al numbers are rational to begin with (or rather, to end with)
 
@sehe But there are no irrational numbers in computers at all.
 
@PaulManta Scientific calculations aren't usually based on rational numbers but on inexact measurements.
 
@PaulManta Parse fail
 
11:48 AM
@sehe Fixed.
 
I hate it when this occurs in my diagrams.
 
Fractions won't save you from the error inherent in the inputs.
 
@RMartinhoFernandes And even if all inputs are rational, all computations involving transcentals or infinitesimals will run into approximations or real numbers (Pi, e, sin(x) etc)
 
Stupid crossing lines.
 
@RadekdaknokSlupik Did you buy OmniGraffle? Kill it. Kill it with fire
 
11:49 AM
I don't buy software.
 
Damn.
Was halfway through "You steal food?" when you edited.
 
@sehe But you'd still only use some rational approximation of those.
 
@RadekdaknokSlupik I'd be more sick off the other mishap:
 
That's part of a rectangle.
 
11:51 AM
@PaulManta But what would it gain you then? You are introducing errors anyway.
 
@sehe y u no anti-aliasing.
 
@PaulManta No. Rational approximations are not going to be more accurate. They're at best going to be equivalent and much slower due the lack of 'mechanical resonance' (i.e. not using native CPU types)
 
@RMartinhoFernandes Yes, but you are reducing the errors. Division, multiplication, etc are as precise as they can be.
 
@RadekdaknokSlupik Blame mspaint on work pc. Sux0rs. Also:
 
11:52 AM
WTF. Srsly, even saving in a different location didn't help. I had to Copy/Paste to another mspaint instance in order to save :)
 
@sehe what OS version is that? Looks stone age old...
 
On Windows, what happens if you have a document open and you move it to another directory, then hit Save? Does it save it on the new location?
@rubenvb XP
 
Don't ask.
Okay.. XP SP3
 
(not that paint every changed except minor interfaceial changes)
 
11:54 AM
@RadekdaknokSlupik Most likely, it errors when you try to rename/move
@rubenvb interfecal, FTFY
 
Oh stupid.
 
@RadekdaknokSlupik Unless the app fails to lock, otherwise you'll likely end up with a copy unless you notice it still proposes the old name. But you knew all that, or you wouldn't have asked :)
 
I was wondering.
I rarely use Windows.
 
It probably uses OpenFile instead of CreateFile
 
@PaulManta Simply not true. The errors aren't in the operations to begin with. They are in the representation
 
11:56 AM
MS wants every file operation to use CreateFile cause OpenFile is buggy (IIRC).
 
Lol a buggy OS API call.
 
@rubenvb Not in the mood to ... hell, let me check with a debugger :)
 
@sehe I disagree. The values might be imprecise to begin with, but if you are doing further approximations during operations (especially division), then the errors amplify. Think about 1/10 vs. 0.1 in base 2, for a very simple example, or 1/3 vs 0.(3) in base 10.
 
@PaulManta rationals aren't exact through division either: you're limited by the size of your numerator and denominator.
 
@PaulManta You seem to be implying that somehow the rationals will have unlimited precision. In that case, obviously you are comparing apples to pears
 
11:58 AM
@sehe Not unlimited, just much higher.
 
@PaulManta I wager that depends on the numerical range you're talking about.
 
@PaulManta Meh. Basically you are arguing that when you increase the precision, the error can be reduced. Surprise
 
@sehe ... I wasn't arguing anything... I was asking a question...
 
> It's So Painless Your Team Will Actually Use It.
lolz
 
ISPYTWAUI
 
12:03 PM
@PaulManta Using arguments. See
11 mins ago, by Paul Manta
@RMartinhoFernandes Yes, but you are reducing the errors. Division, multiplication, etc are as precise as they can be.
Oh wow, I just got awarded a bounty. I hadn't even noticed that one had been set for that question.
 
@sehe I wasn't trying to make a point. I asked why rationals aren't used more often, I wasn't suggesting that they should actually be used more often. Then some people were curious to know why I asked that question.
 
I did kind of wonder what made the upvotes trickle in after days of being totally unnoticed :)
@PaulManta Ok. Fair enough. It looked to me as though you thought rationals were somehow always better (or nearly always).
 
Is SHA-512 good for hashing passwords?
 
@RadekdaknokSlupik No. Use an expensive hash function
 
(With salting, of course.)
What about bcrypt?
 
12:07 PM
@RadekdaknokSlupik That's the one. It can be 'configured' to scale with the availability of bruteforce hardware
 
Thanks. :)
 
PKBDF2 appears to be recommended IIRC, but I never used it
 
I need to store password for my bug tracker.
 
16
Q: Recommended # of iterations when using PKBDF2-SHA256?

Tails(Originally posted on StackOverflow) Hi there, I'm curious if anyone has any advice or points of reference when it comes to determining how many iterations is 'good enough' when using PBKDF2 (specifically with SHA-256). Certainly, 'good enough' is subjective and hard to define, varies by applic...

> An aggravating point is that password cracking is an embarrassingly parallel task, so the attacker will get a large boost by using GPU which support general programming; so a typical f will still range in the order of a few hundreds
 
It's fine as long as it doesn't take more than a second to encrypt the password.
 
12:09 PM
PCGPU - Password cracking GPU.
 
GPGPU is awesome, but should be used for noble purposes.
 
@DomagojPandža what makes GPGPU special?
 
@RadekdaknokSlupik Yup. Of course, that might be ok for a single user, but perhaps if you run a server with ~100 concurrent users that might become a server load issue
General-purpose computing on graphics processing units (GPGPU, GPGP or less often GP²U) is the means of using a graphics processing unit (GPU), which typically handles computation only for computer graphics, to perform computation in applications traditionally handled by the central processing unit (CPU). Any GPU providing a functionally complete set of operations performed on arbitrary bits can compute any computable value. Additionally, the use of multiple graphics cards in one computer, or large numbers of graphics chips, further parallelizes the already parallel nature of graphics pro...
 
Those users don't all sign in or create an account at the same time.
 
@sehe I meant the "noble purposes" part, obviously.
 
12:11 PM
@DomagojPandža Don't tell the Puppy
 
I'll go with bcrypt.
 
@RadekdaknokSlupik I know. I said 'might'. Just so you don't forget to plan for worst case
 
@RadekdaknokSlupik wait until the day you have to reboot your server and all users want to sign in right after it comes online again
 
@rubenvb Oh, sorry, it was too obvious for me :)
@KillianDS Well, it wouldn't technically be his server, since he only builds the software, and since he builds it as a one-person team and never makes bugs...
 
bcrypt y u no compile to library.
 
12:14 PM
@RadekdaknokSlupik huh - linkerror.com/libbcrypt.cgi?lang=nl
 
It compiles to an executable.
:)
 
It is a single function IIRC. Just copy past the CPP and adjust the header for your purpose. Include license specifics
 
Is there a way to find the maximum value in an unsorted list in less than O(n)?
 
lol it takes a filename.
Ah guess I can use it.
 
you can probably link to the exe on Windows too.
 
12:17 PM
The exe has a main function.
 
@PaulManta Only in best case. Use std::nth_element or std::partial_sort
 
Oh, I forgot to respond.
 
@rubenvb not without the implib or by using (hairy) GetProcAddress
 
@rubenvb For science, you monster.
 
@PaulManta Just think about it, you have only as meta data 'there are N elements'. How could you know what is the maximum without looking at all the elements?
 
12:18 PM
@RadekdaknokSlupik GCC can link to DLL's directly, I'm sure it can link to an exe without an import lib as long as it has a proper export table
 
I don't use Windows. Oh well.
 
@KillianDS Well, you might cheat and parallellize. Would technically remain O(n)
 
I'll see. I'm still working on the design.
 
Somewhere a clock strikes midnight... And there's a full moon in the sky
You hear a dog bark in the distance, you hear someone's baby cry...
A rat runs down the alley and a chill runs down your spine... And someone walks across your grave... And you wish the Sun would shine.
I miss Bon.
 
@DomagojPandža Damn. I was right:
yesterday, by sehe
That's actually nice. But someone will have to shake the poetics. Ah wait. @DomagojPandža . for that :)
 
12:24 PM
 
@sehe Of course, I assumed he really meant complexity, not just speed :).
 
Spacedicks. Plug & Play.
 
Oh boy. I just proved that I fail at programming. At least on mondays. Or some of them:
@BenVoigt I'm humbled by my splendid display of fallibility. I CW-ed this since I deserve no more credit for this answer than I already got. Thanks for correcting the (subtle/nonsubtle) errors. — sehe 1 min ago
The existing comments have been deleted, but trust me, it took 3 times to correct the actual expression in the code. Ew.
 
Don't worry about it, it happens.
 
13 hours ago, by Cat Plus Plus
Rule #1: don't mention spacedicks.
 
12:30 PM
@DomagojPandža I know. I'm just putting it up here as a reminder. It is too easy to forget about implementation specifics rearing their ugly heads.
 
@DomagojPandža I rather like the Swedish AB/CD (not to be confused with the German AB/CD)
 
Speaking of utter failures, I spent around two hours earlier today trying to "qualify" the notion of determinants to a buddy of mine. So narrow-minded. I am contemplating disowning him in the tomorrow's newspapers.
 
@DomagojPandža I have no idea what you just said could mean.
 
Which sorting algorithm out of quick sort, merge sort, insertion sort and heap sort is best for processor caching?
 
@DomagojPandža Consider just P0wning him in tomorrow's newspaper :)
 
12:38 PM
@PaulManta std::sort. If that is proven slow, try all of the above and MEASURE!
 
@rubenvb It could mean many things. Forsooth, there have been many signs over the years that the world's end is nigh. We must meditate.
 
@PaulManta You profile it
Forsooth? Lulz
 
I seem to have misplaced a "the" in my previous post. Damn the keyboard goblins.
 
Damn, it's already monday.
 
quick sort is best when data is randomly ordered. Insertion sort is best when data is almost sorted
 
12:40 PM
Oh. Must remember to blame the goblins next time.
The Lion is a-Mumblin', feeling a bit lonely
 
I'm at work, so no Mumblin' for me.
 
Not for me either. Just saying.
 
would checking a unicode string for validity slow output down much vs the time it takes to actually print it to the screen?
 
Our Mumblecore requires one more addition to be complete. His name, as the prophecies had fortold to those that came before us, translates to an advanced feline. Its voice is so intense, it seldom uses it, hiding its nature in plain sight by apparently being shy. Now he lies forgotten, but his power grows with each lunar cycle. In their tongue, he's Cat Plus Plus, the Superfeline.
3
 
12:48 PM
@rubenvb Definitely. From the standpoint of assembly, an if is a goto call.
You do one of those every character, and proportionally to the time it takes to print it, it would be a lot slower, yes.
 
Forsooth, it's size dependent. But sometimes, you can't evade it.
 
@Neil but I was always under the assumption I/O (even console I/O) was slow as hell.
 
@rubenvb It is, but ifs are worse.
 
Especially when you have a lot iterations.
 
If you can turn it into a tertiary operator, do that instead (if optimization is your primary concern)
 
12:52 PM
@Neil That doesn't usually make a iota of difference
 
@sehe if clause could potentially run n instructions where tertiary doesn't
 
The ternary operator is just an if in disguise. Almost.
 
I think the compiler converts an if to tertiary if it can
 
@Neil Prove it. It doesn't work like that, most of the time. Only when the lvalue-ness of the result matters, but the compiler would be able to distill the same semantics from explicit branch code
 
@sehe Prove what? You mean prove tertiary is faster?
 
12:54 PM
@Neil You're weird: premature optimization is the root of all evil. If I'd want to speed things up, I'd use MMX/SSE2.
 
@Neil Yes please
 
@rubenvb He was asking how to speed it up.
 
Do use SSE2, SIMD simply wins when it is appropriate.
 
@Neil He? I wasn't asking how to speed up anything. And I highly doubt your way will speed things up. I like to think the compiler is still smarter than me in this day and age...
 
It's incredibly frustrating to be treated like I'm wrong before given adequate time to demonstrate it.
 
sbi
12:58 PM
@Neil It was too early for cake. They didn't put money into my pockets either, but they promised to do so should I start working there.
 
@Neil 1) That's Java. 2) That's Java. 3) That's 2001. 4) That's Java.
 
@rubenvb You want me to find a link for C++ then? If I did, will you seriously read it or will you pick it to pieces trying to prove that you're right?
 

« first day (597 days earlier)      last day (4350 days later) »