« first day (642 days earlier)      last day (4305 days later) » 

11:00 PM
I think people are ashamed of porn because they think they have weird fetishes and fantasies.
 
@Xeo I meant it as 'confessions' - thing con-/ad-/de-/inter-/pro-fided, in a way. If it isn't a word, they missed it
 
Xeo
I missed those, apparently
@sehe Even Google doesn't know it
 
That's how awesome I am
 
I do have one friend on O(n), Test User 1.
 
@RadekSlupik Oh good. A prime number user in a way
Fibonacci prime if you will
 
11:03 PM
Though I think I'll remove the friendship stuff. Just following people is enough.
 
So are any of us prime number users?
 
@Mysticial Good Question That
 
I'm even, so no.
 
1203803
Is that a prime number?
 
601*2003
 
11:04 PM
In[8]:= FactorInteger[1203803]

Out[8]= {{601, 1}, {2003, 1}}
Pretty damn close though.
 
Ell
how do I font my id?
 
Xeo
even, so no.
 
@Ell Nope:
 
Somehow I don't think it's accidental. Prime number or near-prime users happen too often to be accidental I feel :)
 
11:05 PM
In[9]:= FactorInteger[303662]

Out[9]= {{2, 1}, {149, 1}, {1019, 1}}
 
The day of the month that I'm born on is a prime number. :P
23
Hey, I'm born on my birthday!
 
No prime users on current chat page:
 
@RadekSlupik Was that a lame attempt for a star?
 
1076451: 3 29 12373
1203803: 601 2003
179910: 2 3 3 5 1999
303662: 2 149 1019
500104: 2 2 2 11 5683
845092: 2 2 41 5153
85371: 3 11 13 199
859757: 79 10883
906442: 2 47 9643
922184: 2 2 2 19 6067
 
@Mystical no.
 
11:09 PM
:)
 
It is impossibru to check if an odd number is a prime in O(1), is it?
Without a lookup table.
 
@RadekSlupik Primality testing has been proven to be < O(N^6)
 
@RadekSlupik duh. You're not Ramanujan or Hardy there, are you
 
N = # of digits long
 
Hmm.
 
Ell
11:11 PM
people might be embarrassed if they are into weird porn (maybe that is why radek encrypts)
 
@Mysticial There's some cool proof lurking there. Somehow I bet it won't fit in many margins
 
@sehe AKS primality test.
 
Lookup tables would usually be a waste of space then, I guess. You only need to store odd numbers, but still.
 
Ell
I know we moved from that topic but I know nothing about primes :L
 
@Ell What are you doing :)
 
11:11 PM
Crazy shit that I'm probably never gonna understand in my lifetime.
 
Maybe a lookup table for only the smaller primes. < 1024 or something.
std::bitset would be a candidate.
The most mathematically advanced thing I ever had to do was calculating the GCD of two integers, for my rational number class.
 
you can use a much bigger table than that
 
@Mysticial so O(6log(N)) if N is the value in question.
 
@RadekSlupik that's sad
 
@DeadMG correct
 
11:15 PM
@RadekSlupik Seems to me like that involves prime checking too... no?
 
std::bitset<16000> still only 2kB assuming CHAR_BIT == 8.
 
or indeed, even more
 
@DeadMG not sure.
 
@RadekSlupik doing it fast does
 
My algorithm was probably slow as fuck, but I cannot remember how I did it.
 
11:17 PM
euclid
 
I used loops in loops, IIRC.
 
well
 
I have seen a GCD algo that uses bit wise operations.
 
gcd(a,b): return b==0 ? a : gcd(b, a%b)
or something
 
The funny this is that if the Riemann Hypothesis holds, then primality testing automatically drops to I believe O(N^2 log(n))
N = # of digits
 
11:18 PM
@ALL ONLINE: So, you've all been cleared of any suspicion:
16102: 2 83 97                    Cat Plus Plus
27391: 7 7 13 43                  ochedru
33213: 3 11071                    jalf
36565: 5 71 103                   David Rodríguez - dribeas
46642: 2 23321                    R. Martinho Fernandes
75889: 11 6899                    StackedCrooked
85371: 3 11 13 199                sehe
99966: 2 3 16661                  Nican
140719: 109 1291                  sbi
174614: 2 11 7937                 Tony The Lion
179910: 2 3 3 5 1999              Jerry Coffin
 
isn't that one of the really big unknowns?
the Riemann Hypothesis
 
@DeadMG yep
 
@sehe FredOverflow's looks suspicous
 
@sehe Whut even is that?
 
@DeadMG proof we're not prime
 
11:19 PM
std::bitset<~0ull> is a bad idea, isn't it?
 
how does he know if I'm prime?
 
@sehe our IDs are not evenly distributed
@DeadMG 298661's divisors are 11 19 1429
 
@RadekSlupik It'll guarantee to take up 2^(sizeof(long long)) / 8 bits.
 
@MooingDuck wow... damn...
 
@RadekSlupik yes
 
11:20 PM
@MooingDuck I prefer to consider myself as my name in ASCII.
 
@MooingDuck True. When we end the bed time reading (which mostly happens on the living room couch, at our place), I usually device a mnemonic for the 'current page' we left of. Todays page was 2*3*5*5
@DeadMG You're not even in your prime anymore. All downhill from now
 
Xeo
Oh, right, it wasn't only 26k files... it was 260k... oh well
27k/260k :)
 
anyone know how Java's Calendar works?
 
So @FredOverflow is the most composite user of all of us. He's composed of a lot of small numbers. :)
 
@MooingDuck Joda does. And Jon Skeet
What the hell was all that plinking about
 
11:24 PM
@sehe got a massive codebase already, I won't be able to be able to use Joda :(
 
@MooingDuck I was answering your question. More or less. Not suggesting you use seomthing else
 
@sehe fair enough
 
@MooingDuck Being Java, "poorly" seems like a reasonable first guess.
 
"What is with the name 'joda'?
'Joda' is a short, four letter name, beginning with 'j' whose domain name was free. It is not an acronym."
 
@MooingDuck So, that's what is with the name. Pretty pedestrian, really
 
11:27 PM
Join Our Date Advancement?
 
@MooingDuck Perhaps you'd like a rather shorter (and more understandable) version in C:
 
what the credibility. Also, does it fit the Duck's purpose
 
there's a thing in C that's more understandable?
 
... than java. Yes
 
@DeadMG Yes -- when you're just doing math on simple integers, C can work reasonably well.
 
11:29 PM
Simple integers <-- Fallacy #1
 
Ell
aardvark cum its froze like ice,
don't touch it, ifs freezing, heed my vice,
semen, colder than the coldest night,
aardvark dick juice gives frostbite,
its cold. real cold.
 
Integer maths own programmers everyday. Floating point maths own us. Date manipulation own us big time. Text manipulation is from hell. And yet, we have languages that make them all into one cesspit without flinching (I'm looking at you, PHP)
... alright
(to complete the verse)
 
Ell
what can we do right?
 
hello, world
 
Very little.
 
11:31 PM
@sehe Credibility? It's by Ray Gardner. He was a regular on Fidonet C_ECHO. Unfortunately, I haven't heard from him in years. If I had to name a coder (in any language) who was unequivocally better, I'd have a really tough time of it though. Not sure about fitting 'Duck's needs though.
 
@Ell bacon
 
Ell
boolean logic :D
 
@Ell I wish
 
@keith.layne In C, it is too easy to run into UB (by omitting return from main, e.g.)
 
@Ell (a && b || c >> d)
 
11:32 PM
@MooingDuck Prove it :)
 
well played, sir
 
Ell
would pmmoting return from main do anything? by the time you have ub there is nothing left
 
pmmoting?
 
Ell
ommiting*
omitting**
 
I thought C99 did the C++ approach to that
 
Ell
11:37 PM
meh.
 
In all /active/ chat users, there are just thre prime users:
710813: 710813                SJS
961529: 961529                NinjaTurtle
1385191: 1385191              null
 
@Ell Doesn't matter. The committee has decreed that any UB anywhere in the program renders the whole program undefined.
 
@JerryCoffin currently, it's telling me I sent this message at (Y/M/D) 2012/31/1
@JerryCoffin I've always wondered how that rule squares with runtime values. (user input)
 
Can you define a friend function inline, within the class?
0
Q: Providing swap() for a C++ template class?

neuviemeporteI was trying to implement the copy-and-swap idiom in my custom Matrix class, and I ran into some trouble with the implementation of swap() in the way suggested in the linked-to question: // matrix.h namespace my_space { template<typename T> class Matrix { public: /* ... */ frie...

 
@Prætorian sure, it's not uncommon
 
11:40 PM
@Prætorian yup
 
Xeo
30k/260k
 
Ok, didn't know that
 
@Xeo what is that?
 
Xeo
the progress of chkdsk /F /R on my 50% filled 2TB external HDD
 
@MooingDuck Again, I think "poorly" covers it pretty well (see, an extremely versatile word).
 
11:41 PM
I think that "Just don't, ever, invoke UB." is a fine rule
 
Xeo
23
A: how to provide a swap function for my class?

Xeo1) is the proper use of swap. Write it this way when you write "library" code and want to enable ADL (argument-dependent lookup) on swap. Also, this has nothing to do with SFINAE. // some algorithm in your code template<class T> void foo(T& lhs, T& rhs){ using std::swap; // enabl...

 
Ell
does anyone know a decent YouTube => audio file converter for android?
 
Xeo
Just thought I'd throw that out here
 
the problem is that the situations which can lead to UB are too far-ranging
especially stuff like i++ + ++i.
 
@MooingDuck Hmm...your Internet connection apparently has a little higher latency than most! :-) Are you testing that TCP over carrier pigeons thing again?
 
11:42 PM
it's a dumb thing, but there's no reason to make it UB.
 
I didn't define it elsewhere, andd I wanted it inside Matrix for clarity and immediate visibility. Has to be inside the header anyway as a template. Anyways, keeping only the declaration in the class body, and moving the definition outside helped, the code compiles, not sure why though... — neuviemeporte 4 mins ago
 
always the best reason to have your code compile
 
Maybe that's a VC2010 problem though
 
@Xeo no freaking way, still waiting for that? Use ext4, xfs or ZFS.
 
Ell
why does I++ + ++I compile? if its known to be ub?
 
Xeo
11:44 PM
@sehe I for sure won't reformat my HDD
 
@Ell Because the standard doesn't require a diagnostic
 
Xeo
Also, checking over 1TB of data is no small task
 
@Xeo No. You just keep with broken chkdsk. Because you love watching the computer work :)
 
Xeo
@sehe I have too much important data on that HDD to ever think of formating it
And no, I have no means of doing backups
 
@Ell Among other reasons, because the compiler is allowed to define the results of any particular UB it wants to, and you might get good use from that (e.g., in the MS-DOS days, it was fairly common to create a pointer to the screen buffer, and write directly to it).
 
11:46 PM
@Xeo Meh. I should know. When I scrub my pools (2x3 Tb) it takes a while. But that is no consistency check (ZFS doesn't require them). Just a silent corruption protection (it's mirrored with end-to-end datachecksums)
@Xeo So, basically you say, you are running checkdisk on the only live copy of valuable data. That seems... reckless
 
Xeo
@sehe No choice
 
@JerryCoffin Ah yes the good ole days of writing directory to Video Memory... Fond memories.
 
@Xeo Is it corrupted already?
@JerryCoffin Fairly common? For graphics, it was the only way! Int 10h didn't exactly implement all that jazz
 
I don't understand either why UB that is detectable at compile time is not caught then
 
@JerryCoffin Oh, and don't forget CGA/EGA pokes! 0x03df for border color. I remember setting it to 14, for bright yellow background :)
 
Xeo
11:49 PM
4 hours ago, by Xeo
I think my external HDD is somehow corrupted at certain parts -.-
 
@keith.layne Some generates warnings.
It's just that sometimes it's not cost-effective to detect it all.
 
I don't understand why so much is undefined...wish it were just defined somehow, even if it was dumb.
 
Xeo
3 hours ago, by Xeo
I can read almost anything except a certain directory
 
@JerryCoffin I'm at work only checking SO at random intervals
 
Xeo
@keith.layne performance
 
11:50 PM
@Xeo So, you DO NOT run checkdisk. Instead, you get the valuable info off first, and then checkdisk (better yet, reformat it). Well, yeah, if you have so much data in non-redundant storage, you are in a hard place yes
 
@R.MartinhoFernandes yeah, makes sense, but that is a big separator between people who understand C/C++ and those who just use it blindly, and I know the committee wants to smooth the learning curve.
 
The title mentions C, but it's applicable to C++, as the concept is the same.
 
@MooingDuck No, I was just joking about the (supposed) ~6 month delay it was saying between your posting and our seeing things...
 
@Ell Proving UB is undecidable, along with other program proofs in such vein.
 
Xeo
11:51 PM
@sehe I copied my "Docs" folder on my USB atleast
 
@DeadMG that particular instance is easily decidable
 
@sehe Darn -- forgetting CGA and EGA was exactly what I was hoping to do! :-)
 
Eric Lippert has some nice blog posts about people asking for similar checks to the C# compiler.
@MooingDuck So?
 
@Xeo Good idea
 
Xeo
and 550gig of those 1TB are anime
another 200gig should be pictures and music
 
11:52 PM
of course it is
 
Xeo
or maybe even 300gig
 
but writing a decider for it that does not incorrectly decide others is more difficult
 
Xeo
then 200gig games for sure
 
Ell
so its possible that I++ + ++I is well defined?
 
Xeo
and the rest is code
 
11:52 PM
@Ell In Java it is.
 
And I believe C# as well.
 
Xeo
and a few tools
 
Ell
I didn't know java had ++
 
@JerryCoffin hercules then! It had superior resolution! And it had bold (extra intense pixels). Woot
 
11:53 PM
@sehe That's definitely a much fonder memory, at least for me (not that I ever had a real Hercules card, but definitely had one that emulated it).
 
@JerryCoffin yeah, my first PC had hercules. Used CGA at school.
 
Ell
they should say undefined behaiviour should throw an undefined behaiviour exception
 
@Ell That would require a detector.
 
@JerryCoffin I actually earned my first EGA card doing 'paid' programming during highschool! And I got to use a company 'laptop' (you know how those bricks were ~1990)
@Ell Dream on
 
And lose all benefit of having UB in the first place.
 
11:55 PM
@Ell As already noted, it's often actually useful (as long as you realize it's not portable).
 
FTR, clang has a -fcatch-undefined-behaviour flag that compiles some of those checks into the executable.
 
@Ell You can use lint like tools (static analysis) though. And valgrind/purify type tools for dynamic checking
 
@sehe Yes, been there, done that, probably still have a few scars on my thighs to prove it.
 
@JerryCoffin From lifting them?
 
Ell
@jerrycoffin scars on you thighs?
 
11:57 PM
I read a comment recently suggesting that optimizing UB to render blocks of code dead is a bad thing, and when I thought about it, I agree. If you don't understand it, it would be totally confusing.
 
@keith.layne Have you read the series of articles on the LLVM blog that I posted above?
 
@Ell From it having too much weight sitting on my lap (which is composed mostly of thighs, at least if my memory of anatomy is correct).
 
Ell
I don't see the point of having benefits of ub? you say we can get a pointer to the screen buffer or whatever but that is writing code that relies on ub which is bad always ...isn't it?
 
8 mins ago, by R. Martinho Fernandes
@keith.layne http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
 
sure, because of course, your program was totally non-portable and the compiler could never tell you that.
 
11:59 PM
@R.MartinhoFernandes I will, I'm making delicious blueberry pancakes for the kids right now.
 
but UB enables faster code in many ways
 
Well, you can't whine about UB before you read that.
 
@Ell I do agree that every compiler should issue a big fat level 1 warning on obvious cases of UB like i++ + ++i.
 
Yeah, I've seen 'those' portable PCs too, when I was in primary. They weren't fun to log around (still having CRT tubes). I was referring to one of the first LCD laptops, though. I think I remember it being EGA but monochrome (amber).
 

« first day (642 days earlier)      last day (4305 days later) »