« first day (1644 days earlier)      last day (3322 days later) » 

6:00 AM
So it suddenly begins generating a weird sequence after 17 digits?
what.
 
If you write the literal 0.1, you get a binary fraction that represents 0.1000000000000000055511151231257827021181583404541015625 exactly.
 
@fredoverflow ...
WHAT THE FUCK.
Okay TIL that binary floats are sneaky bastards
 
There is no double that could represent 0.1 exactly, because 0.1 is infinite in binary.
 
@Cinch you think so?
I give you a number in a base, and you convert it to decimal to me, with finite precision
0.1 in base 3
 
@orlp I'm not good at things like this
 
6:02 AM
@Cinch Download my float tool, enter 0.1 and play with the mouse wheel. That should clear things up.
 
@fredoverflow The rules for integers permit only 1's complement, 2's complement and signed magnitude. Is there a similar rule for floating point that prevents storing them as ratios?
 
@JerryCoffin The representation of float and double in C++ is implementation-defined, IIRC.
 
@fredoverflow It's not IEEE754?
 
@Jeremy I don't think the C++ standard requires it.
 
@Jeremy Nope.
 
6:03 AM
@fredoverflow Seems like that to me too.
 
@JerryCoffin why?
 
Hm.
ternary division
bah.
I don't remember how to do such a thing
 
@Jeremy There is specific support for IEEE 754 (in the guise of ISO/IEC 559), but other formats are allowed as well.
 
@Cinch I especially like the number after 0. Just enter 0 and scroll one down with the mouse wheel:
0.00000000000000000000000000000000000000000000140129846432481707092372958328991613128026194187651577175706828388979108268586060148663818836212158203125
:-D
 
@fredoverflow That is just screwed up
 
6:05 AM
@fredoverflow ah, the good ol' down = higher
sick UI design
 
@orlp "natural" -Apple
 
@Cinch It's not screwed up at all. Just manually divide 1 by 149. This is exactly the number that comes out. And it only requires a single bit of precision.
 
@fredoverflow It is. No wonder floating point is so hard.
 
/cc @fredoverflow, @LucDanton
 
6:07 AM
Also it boggles my mind how float and double just suddenly sprew out random numbers at an arbitrary precision and this doesn't remain consistant across the two
 
What makes you think they're random?
Look at a simpler example.
1/8 = 0.125, right?
It's only a single bit! Where did those magic numbers 2 and 5 come from?
 
@fredoverflow should be a fixed binary digit
yeah fractions of powers of two make sense
But why would float and double begin diverging at different precisions instead of performing the same calculation and then simplifying the last digit?
 
4/8 = 0.5
5/8 = 0.625
         ^^ Whoah! Where did these random numbers come from?
 
@fredoverflow No try look at this
Why do they diverge at different digits even if they are the same number
 
Because 0.1 is infinite in binary and requires rounding. float and double round at different positions.
 
6:11 AM
@fredoverflow Yes but it doesn't round at the last digit of binary?
Strange.
 
Why is 0.3333333 and 0.3333333333333333 not the same number?
 
@fredoverflow Because one has 00000000000000
no but they are the same..
OH THEY'RE NOT THE SAME NUMBER!
Mind blown
 
@Cinch It does. 0.1 is 0.000110011001100110011001101 in float. Note the 1 at the right. That's rounded.
 
even if I type in the same number they're actually different because the precision
 
exactly
 
6:12 AM
Oh damn so my own literals are different based on precision.
Floatception
 
System.out.println(new BigDecimal(0.1f));
System.out.println(new BigDecimal(0.1));
0.100000001490116119384765625
0.1000000000000000055511151231257827021181583404541015625
 
@fredoverflow Thanks Fred.
 
You're welcome.
You can tell I love IEEE-754 ;-)
 
Good morning
 
@fredoverflow No I'm a scourge to Lounge<C++> how dare you welcome me on the behalf of Lounge who do you think you are (I love you too)
@khajvah Mourning is never good, man.
 
6:14 AM
@fredoverflow coz 0.00000000000001 != 0
 
@chmod711telkitty I wonder if it would be better to just do a lexical cast for these types of things
@fredoverflow But thank you you helped me learn something @khajvah Good day to you too
 
@chmod711telkitty How do you like my hair after the wind has blown through it? ;)
 
@Cinch It is always helpful to learn how computers work
 
@khajvah The computer works.
It's the systems that are the hard part
 
hi
 
6:16 AM
@buffo hi
 
@Cinch Not really. A lexical_cast would just put the string into a stringstream, then read it out as a double. I guess they now use specialization to speed things up for some types, but the effect is the same anyway.
 
@JerryCoffin No I mean to automatically truncate according to precision, i.e. cut X amount of digits after the decimal or for Y significant digits
 
@Feeds I'm self taunt
 
> I'm self taunt


It's never good to torment yourself
 
@Cinch Oh--for that you usually want to use the stream directly, so you can specify the width and/or precision. For things like this, printf and company are handy too (if you know what you're doing).
 
6:19 AM
@ThePhD You just made me feel a little better. I am not the only one in a shitty university
 
@JerryCoffin lexical_cast isn't just std::stringstream.
 
@JerryCoffin mmm, right.
 
Common misconception though
 
@Rapptz what else is it?
Specialized stuff too?
 
lexical_cast is way fast
compared to stringstream
 
6:21 AM
@Rapptz Did you miss the "they now use specialization to speed things up for some types, but the effect is the same anyway."
 
No
It implies that it was always just std::stringstream until fairly recently
It's been specialised for a very long time.
 
@Rapptz At one time it was, so I guess it's only a question of how recent you consider recent. I think it's fair to guess that you and I probably have rather different perspectives on what that word means. :-)
 
a quick look says it started being faster than the naive implementation in 2006.
 
@Rapptz Sounds quite recent to me!
 
9 years ago :v
 
6:25 AM
Interesting
 
@Rapptz Yup--less than 10 years ago is definitely very recent.
 
That moment when you realize that you are writing shitty code.
 
@khajvah I can even tell with my eyes closed. Comes down to one question: are my fingers pressing keys?
 
yeap
Programming is annoying. I never like my code.
If I was a project leader, I would never release anything.
 
Could you please help me making this question better rather than downvoting it and go away? — Eric 6 mins ago
poor guy
 
6:40 AM
@Cicada He is right though. Silent downvotes suck
 
Of course
But I also understand the downvoters' perspective
 
oh hey
another one of those "let's teach everyone mandatory programming in school" posts.
been a while
 
@Rapptz It does make some sense to teach a little bit programming
 
does it
I'm okay with it being an elective
not mandatory
 
It develops problem solving skills
 
6:47 AM
does it
 
no
 
no? really?
 
just look at SO
 
@khajvah Yes, but you should use a toy language. And by that, I don't mean Java.
 
just look at the question I linked
where do you see problem solving skills?
 
6:47 AM
@fredoverflow A functional language maybe.
 
lol
most people can't even grok math and that's mandatory teaching too
 
inb4 "Haskool should be thaught at schell"
 
and you expect people to grok a functional programming language
pretty funny m8
 
@Rapptz you have a point there
 
Best not to bring up FP here in the Lounge.
Bartek had a heart attack yesterday.
 
6:49 AM
:D
the first russian program I am gonna use
 
fake
 
ikr
 
"I shit you not"
 
blog engine written in make, kinda ugly, but kinda neat
 
6:50 AM
Poe's Law though
@FilipRoséen-refp you've posted this before
it hasn't even changed since last time
 
@Rapptz it hasn't?
"ok"
 
Shall the clay sayeth to the maker, What maketh thee?
 
20 hours ago, by Filip Roséen - refp
so erhm.. first draft of my makefile + hg powered blog
 
@Rapptz the contents is different
 
it's the same
 
6:52 AM
why did you choose make for a blog engine
 
If you changed something then it is probably not immediately obvious
 
@Rapptz it's under the same URI, but the contents is different
 
this is literally the same exact page
 
yeah when i click both links is the same!
 
I'm going off memory.
 
6:53 AM
Swap well.
 
@Rapptz I'll just provide you with the diff
codepad.org/eSeg6qPM <- not the same
 
Make blog engine?
Wtf?
 
but I take this as I should really fix the site-markup, and include modified/created timestamps
@Cinch I'm a terminal guy and I'd like to be able to write, commit, push, and have the contents available online, so.. that's what I ended up with.
 
You are reinventing the wheel and probably very badly.
 
More like a terminal phase guy
 
6:57 AM
@Rapptz the entire code is available at the "same" blog-post, so even if I was reinventing the wheel - I don't mind having 63 lines of reinvention below my feet
 
Remember the dude standing before the first tank in column on Tiananmen square?
 
@FilipRoséen-refp Terminals are sexy
 
I wonder what the tank driver thought then.
 
...sorry but make blog just seems terrible lol
 
@wilx Zhang Blowntobits?
 
6:57 AM
I have WordPress tyvm
 
@FilipRoséen-refp Write Markdown like a normal person.
 
@Cicada lol, nice. He wasn't. :)
 
@LucDanton the contents of the posts are markdown.. heck, everything is markdown (src)
 
Ven
o/
 
Pelican, Hugo, Jekyll, Hyde, Hexo, etc.
 
7:01 AM
@Rapptz I checked many of those out, though I didn't like 'em - so I wrote my own, simple as that.
 
amazing
 
@Rapptz I want it to be tightly integrated with whatever version-control that is being used, so that readers can diff revisions of a post, etc., etc.
 
I don't see how using any of those doesn't allow for that.
 
@Rapptz to allow for, and "integrates easily" are completely different
 
Alright. Sorry. "I don't see how using any of those makes integration of diff revisions difficult"
 
7:04 AM
@Rapptz I do
 
I uninstalled Adblock Plus today and my memory usage dropped by a good bit.
400 MB or so.
 
time for a smoke
 
bb
 
user1804599
Good morning.
 
Ven
o/!
 
7:10 AM
Good evening.
 
I need to start using emoji in code... more
 
user1804599
This would make for a great Parenting post: clickhole.com/blogpost/…
 
@Rapptz So what did you replace it with
@rightfold keming
 
uBlock Origin
I keep seeing Biicode posts.
 
This is why we need lucpm
 
user1804599
7:17 AM
I got a bunch of upvotes on Go-related answers.
 
user1804599
Somebody must like me.
 
@FilipRoséen-refp you can get that with a lot of things... Jekyll has 'one file per post' too
 
> Oral History of Bjarne Stroustrup
lewd
 
@thecoshman I'll just link the finished thing, there are more things I want that isn't easily done (as far as I know). in either case, it's fun mini-project
 
user1804599
I have a total score of 112 in and I don't even know how to multiply two matrices.
 
7:19 AM
@FilipRoséen-refp ah sure, I get that :D
new profile shit? WHAT IS THIS!!!!
oh I like this 'feature' "~353k people reached"
 
man some of the comments in /r/cpp might as well give me cancer
 
user1804599
@sehe I might write the indexer myself.
 
people saying comments give them cancer gives me cancer
 
@Rapptz u jelly
 
7:24 AM
@LucDanton ye
lucpm to the rescue
@Cicada ctrl + f "Rabensky" on the main comment page
 
user1804599
Indexing Python code shouldn't be too difficult.
 
user1804599
The scoping rules are fairly trivial.
 
Ven
@rightfold and broken
 
user1804599
The only non-broken part about Python's scoping rules is the scope of caught exceptions. :P
 
user1804599
7:27 AM
@Ven Still better than CoffeeScript's. :P
 
user1804599
At least nonlocal isn't implicit everywhere. :P
 
Ven
@rightfold that doesn't mean anything :)
 
> Modern C++ as a Better Compiler
wat
> Even managed code is native.
> But performance doesn’t lie and when it comes to native code there’s nothing quite like Standard C++
 
Modern C++ is some Windows API lib
 
> Can a library outperform a compiler?
 
7:30 AM
he's talking about C++/CX vs Modern C++
 
user1804599
@Cicada libclang outperforms GCC!
 
He's just terrible
 
yep
 
> And that’s the point. If you’re using C# or C++/CX you’re at the mercy of the compiler. Only Standard C++ lets you go beyond the compiler.
 
user1804599
The Python ast module may be of use.
 
user1804599
7:32 AM
It can parse Python code.
 
user1804599
Terrific.
 
I'm still baffled by the lambda heap alloc comment though
 
[=stdvec]() { ... }
 
I will reply something constructive
 
user1804599
Writing the tool myself also has benefits.
 
user1804599
7:35 AM
For example, it can understand project-specific patterns such as the use of partial for DI.
 
> I don't think the lambda does, but stl::function
rip
> Pointing out problems without offering solutions is not all that helpful
> The best way to define a problem is to offer a solution for it. Otherwise you run the risk of solving the wrong problem.
how old are these people
also I don't get the relevance of most of the bullets in the linked paper
 
it's a pretty bad paper
 
Ven
7:51 AM
are there any good papers for compile-time reflection?
 
@Cicada huh
Good morning. What are you guys all quoting from o.O (finding the starting point)
> C++ Paper N4456 - Survey of C++ Problems for Game Development
WTF. I guess the title speaks for volumes
 
@Cicada A likely story.
 
enjoy the thrilling read
 
Nice :/
> This is the biggest nonsense I've read today so far.
Oh. We have the company mailbox for that :/
> Michael Wong (representative of the Canadian National Body on the committee) was taking input from various game developers back at CppCon to let us air our complaints
Okay, starting out with a hint of plausibility
 
are you reading the blog
 
7:54 AM
> I then put together an unofficial mailing list for a handful of us to discuss out plans
 
yeah
you are
rip
 
^ fatal error
In other words "Some of couldn't leave well enough alone and circle jerked for long enough"
 
@sehe Well the only difference with how it’s usually handled is that it’s unofficial.
 
Don't think that's a fair comparison.
The C++ Committee is ~100 people on a per meeting basis iirc.
 
> * Concerned about std::function/lambdas doing allocations (Point brought up by Scott Wardle)
 
7:57 AM
I kinda doubt the handful of people in that mailing list were in an echo chamber though.
 
I wouldn’t call what the SC does 'a discussion'. I was referring to the rest of the process.
 
lol
Someone doesn't understand that lambdas don't imply std::function.
 
4 out of 5 are by the same person!
I'm not going crazy I swear.
 
@LucDanton Appreciate that But "a handful of us" to me means more than "a number of committee members and relate company's associated scientists".
IRTA "the loudmouths took over after the rest lost interest"
 
user1804599
> Been needed for a long time. I think there's zero gamedevs on the C++ steering committee? Someone please correct me if I am wrong!
 
7:59 AM
Also lol that paper keeps using "STL" to mean the standard library.
 
user1804599
Zero gamedevs on the committee is a good thing.
 
@sehe Hey, that was constructive.
 
@Cicada Tbh I don't think the comment is wrong or stupid.
 
@Cicada Should have known
 
> Existing STL implementations are hard to debug. For example, you typically cannot browse the
contents of a std::list container with a debugger due to std::list's usage of void pointers.
 
7:59 AM
Lambdas are syntactic sugar.
 
what?
what
std::list and void pointers? what
 
@Rapptz I suppose (s)he replied at the wrong level.
 

« first day (1644 days earlier)      last day (3322 days later) »