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

9:00 AM
in theory this can be in a .cpp
since I haven't written a single template yet
but that's changing soon™
 
Wild guess: CharT?
 
no
fuck CharT
 
ikr
 
there's not enough stuff in the standard library to make working with CharT enjoyable
I was going to maybe template precision
but then I realised that's probably a bad idea no?
I think Boost.Multiprecision goes down this road
 
No clue.
 
9:05 AM
yeah they do sorta
bits though
 
morning
 
hi
gonna go with "bad idea" for now and I'll re-evaluate in the future
 
ah...
where's that boost::any lite-alternative code sehe had?...
 
@khajvah morning
 
Don't know. I have this though
 
9:11 AM
Oh found it
 
I don't like any in general.
 
Oh fuck I should just cast to char* already.
and then void* my UTF shit or something
I have a stack that is 25-high in debugging
 
user1804599
bad_any_cast? any_cast is always bad since it implies the use of any.
 
@райтфолд yes except it's boost::any + Sol + Lua
 
@райтфолд -1
 
9:13 AM
+ my sad event queue library VermillionAzure/Flexiglass
Time to steal code
 
Cool, looks like I have add, subtract, multiply, reciprocal, and divide for my custom float type with 64-bit mantissa. Add/sub/multiply are provably accurate to 1 ulp. Reciprocal + division seem to be accurate to 2 ulps, though I can't prove the error to be less than ~4 ulps.
 
@Mysticial what is this
 
Mysticial lives.
Are you still at work? :)
 
another language?
 
It's 2 AM bub
 
9:18 AM
@Cinch I'm trying to implement a high-performant floating-point type with a 64-bit mantissa without using the x87 FPU.
@Rapptz What are you still doing up? :)
 
I'm always up.
 
user1804599
Is the order of evaluation defined for member initialiser lists? For example:
 
user1804599
template<typename CodeIt>
mill::tape::tape(CodeIt begin, CodeIt end)
    : it(begin), begin(std::move(begin)), end(std::move(end)) { }
 
@райтфолд Mind telling me where to find Mill?
 
@райтфолд afaik.
 
user1804599
9:19 AM
@Cinch On GitHub.
 
Let's check the Holy Bible.
 
user1804599
Ugh, syntax error.
 
Also:
@райтфолд I can't find you
@райтфолд The last link I got was bogus
 
Hm.
 
9:23 AM
@райтфолд Intersting
 
@райтфолд Yes.
Order in which they are declared.
 
user1804599
Nice!
 
I realised your question is not as interesting as I thought it was.
I was looking for something else.
 
Also: for copy constructors or move, should the other thing be called "other", "rhs", or some other arbitrary value?
other right?
 
user1804599
Nobody gives a shit.
 
user1804599
9:25 AM
Call it whatever you want.
 
@райтфолд Foo(const Foo& unicorn);
 
The initialization order is well defined though.
Which is pretty cool.
 
@Rapptz +1
I also found it neat that C++ also keeps your class structure intact.
On the byte level
(minus alignment)
 
user1804599
Beh, why can't you bind temporaries to non-const lvalue references.
 
use an r-value reference
@Mysticial You're free to use my sugar :v.
 
user1804599
9:32 AM
Can't do that here; has other problems.
 
RIP
 
OH MY GOD I FINALLY GET ANY
 
@Rapptz I actually have partially refactored Mini-Pi that rips it into multiple files so that it can be used elsewhere. The BigFloat stuff is it's own module. So I'll probably go ahead and steal your conversion code.
Or even better, you can make a pull request. :)
 
I'm still cleaning it up slightly.
 
I don't have a timeline for when it's going to happen though.
Since Mini-Pi isn't exactly at the top of my list.
 
9:35 AM
Well I'm just working on BigFloat :p
 
The refactored BigFloat moves the FFT logic out of mul() and into the FFT itself so that it's easier to plug in a different multiply algorithm.
The FFT being an module itself.
 
You should probably commit + push changes
assuming it compiles
I was thinking of making precision a template parameter but I'm not convinced it's a good idea
 
@Cinch ...I seriously doubt that...
 
@Rapptz The reason why precision isn't a field and is user-specified at each function call is because y-cruncher uses variable precision.
Mini-Pi is obviously not optimized, so it just forces everything to maximum precision.
 
9:38 AM
what is 1000/false?
 
exception
@Mysticial Well there are other problems involved with making it a field.
 
divided by false exception?
 
e.g. "I want multiplication to be as precise as possible but when I divide I want x precision"
@chmod711telkitty 1000 / int(false) -> 1000 / 0
integral promotion
 
2 * false == false
^ Two wrongs don't make a right!
 
@Rapptz Come to think of it, I think Mini-Pi's division and square root use variable precision.
 
@Mysticial yup
rightly so though
 
How to define a function within a namespace within a class in the global namespace using friend?
8
 
literally what
 
@Rapptz Yeah, because if they didn't, they would run in O(N*log(N)^2) rather than O(N*log(N)).
 
what's that anything to do with friend?
 
9:44 AM
@Cinch Just do that like every normal person - declare the function outside. Duh.
 
@Griwes I need the function in the global namespace but I want it defined in the class as a friend function
 
1 min ago, by Griwes
@Cinch Just do that like every normal person - declare the function outside. Duh.
A.k.a. stop hurting yourself.
 
if you enjoy hurting yourself, then no one will ever come to your help again because we assume that no matter how much you are hurt, you asked for it
 
user1804599
Ugh, do you have to overload operator<< for Catch?
 
I don't think so, what for?
 
9:50 AM
<starts to ask question, then realises I should he to SO, just says this and 'hi' instead> hi
 
@AndyProwl Reporting errors.
 
user1804599
Oh well, overloading it is good anyway in this case.
 
user1804599
woo tape::read works
 
Okay, now I need to implement an efficient log(x) that will give the result accurate to ~64 bits. This isn't going to be very fun...
It's probably gonna take me at least a few days to a week to figure out the right math/algorithm.
 
@Mysticial What is the target data type?
 
9:53 AM
@fredoverflow My own datatype with a 64-bit mantissa.
 
And what do you need it for?
 
user1804599
woo tape::seek works
 
by the way, any other tips for debugging with gdb?
 
Any helpful commands?
 
9:54 AM
lol
 
@fredoverflow For now it's experimental. But if it works out, I'll probably end up using it for y-cruncher's size and memory computations. Right now the program is capped at 10^15 because double-precision runs out at about that point. With a 64-bit mantissa float, it'll go up to 10^17 or so.
 
@fredoverflow uh?
 
@Rapptz Oh, I see
Is that required though?
 
user1804599
This is the most decoupled code I've ever written.
 
That said, the x87 FPU is probably a better option, but I'd rather not use deprecated features that a big compiler like MSVC doesn't support.
 
9:55 AM
Can't it dump bytes by default?
 
@Cinch Command #1: Thou shalt not introduce bugs into your program in the first place.
 
@fredoverflow Why are you browsing gamedev.net? You are hurting yourself. :D
 
It tries.
It fails.
 
How can it fail to dump bytes?
 
@Cinch Yeah. Drive it with an IDE
 
9:56 AM
@Griwes I want to get into the minds of game programmers.
 
@MartinJames Nope.
I have shunned all IDEs
 
@fredoverflow Are you trying to get dumber or what?
:D
 
@fredoverflow Don't forget to come back! :P
Actually I was wondering whether I shouldn't do the same thing
 
Although I am not #vimasterrace I don't like Code::Blocks or Code::Lite or Eclipse CDT and I don't like Windows
 
I'm programming a game and realized I know less than zero about game programming
 
9:57 AM
@AndyProwl what game
 
A snake game
 
user1804599
Snake what else.
 
A shitty snake game
 
@райтфолд Pong.
 
to be precise
 
9:57 AM
Tetris
 
text-based adventure
 
Guess The Number
 
Basic RPG
 
Naughty Crosses
 
Flappy Bird
 
9:58 AM
Fappy Birds
5
 
Match 3
Wait a minute
did I get starred again
I still can't tell if I'm starred because I'm an idiot or because I have good questions.
 
I guess we’ll never know.
 
@AndyProwl Your mistake was using raw OpenGL.
 
@Cinch It's definitely not the latter, but it would be harsh to say it's the former
It's that we like to star fails
 
@AndyProwl So uh...
 
10:00 AM
@Rapptz It's not entirely raw though, Cinder does wrap certain things. I didn't know how much it (does not) wraps before trying it out
 
Oh you're using Herb Approved Software™
 
lol
poor Herb
 
how do you like it so far
 
@Rapptz Are you making fun of the Holy One?
 
Hell yeah.
Someone thought it was a good idea to mix spicy pistachios with my sane pistachios.
 
10:02 AM
@Rapptz hard to tell. I don't know OpenGL myself so it's difficult to estimate how good of a job it does abstracting its details. Some things are nice and easy to work with, but there are downsides too - not very good docs, missing functions, few RAII types, etc.
 
Holy shit
I just realized that I've been using the wrong function all this time CLASSIC CINCH
 
@AndyProwl I consider the fact that you're using raw OpenGL at all a metric of failure on Cinder's part.
 
How bad is Hoogle that it can’t find stuff that’s in base ._.
 
@Rapptz Probably. I'm using raw OpenGL for very few things, though. The framework gives you access to the underlying layer, which isn't bad per se I think. It simply lacks a few more abstractions.
And it forces you to use an application class, which I'm told to be a Very Bad Thing. At least I think it does force you
 
Oh that's rough.
I have eaten too many pistachios.
 
10:05 AM
OTOH it is true that it lets you build up something moderately interesting with relatively few lines of code
 
@LucDanton how bad are you at Hoogle? ^^
 
My last pistachio has fallen under the couch.
RIP
 
@ScarletAmaranth Good point. I normally throw stuff at it until it complies. No luck this time though.
 
Why use Hoogle when you can Google?
 
Exactly!
@Rapptz I actually started at Coercible which isn’t as googlable though.
 
10:09 AM
Why use Google when you can use Boogle? (I wonder how many *oogle exist)
 
After unsafePerformIO was referred to as a 'backdoor':
 
Btw you should have guessed another common template: Allocator @LucDanton
 
> Coq has no backdoors as far as I'm aware. In fact, I don't believe it has any doors at all.
@Rapptz I’m lost.
 
You guessed CharT etc.
 
@Rapptz Which is not a template!
 
10:10 AM
hmm... I know how many elements I want to store in an array... so std::array seems 'right', but I also want to be able to 'push_back' as it's so nice to not have to track where I last updated...
 
static_vector.
 
> I'm feeling bolloxed
 
oh?
 
google it
there's one in Boost
 
oh right
 
10:11 AM
or you can use std::vector + resize (or reserve)
 
user1804599
I want a vector that uses alloca.
 
> poogle. verb. to use a mobile device to browse the web while evacuating one's bowels.
I think I can stop
 
user1804599
Can't use VLA language extensions because non-POD.
 
well, can't I just std::vector myvec(known_size); what's wrong with that?
 
user1804599
@thecoshman heap allocation
 
10:12 AM
@райтфолд ahh yes...
 
Nothing.
 
user1804599
also reserve not ctor argument
 
@thecoshman nothing
1 min ago, by Rapptz
or you can use std::vector + resize (or reserve)
 
@thecoshman O(n) default construction
 
user1804599
@fredoverflow O(1); size is constant!
 
user1804599
10:19 AM
I'm not entirely sure what to do.
 
user1804599
time for a shower!
 
@fredoverflow sure, but if I know I need n, it's better to allocate once than keep reallocating, or over allocate
 
The choice between picking a size or a reservation ahead of time should be dictated by how you’re willing to bother with reserve and/or how you intend to initialize the values.
 
@thecoshman But default construction plus assignment is less efficient.
 
user1804599
 
user1804599
10:22 AM
 
user1804599
nice, it works
 
user1804599
@fredoverflow compiler may optimise out the default construction!
 
@fredoverflow doubt it
constant reallocation seems like it'll be more inefficient than just reserving on the spot
 
Why constant reallocation? Just reserve the right amount.
 
?!
that's what we're comparing
 
user1804599
10:26 AM
@Rapptz Fred is talking about resizing, not reserving.
 
oh
 
I thought you were comparing std::vector<X> a(1000); with std::vector<X> b; b.reserve(1000);
 
@райтфолд *fredo
 
Nah I was talking b.reserve(1000); vs b.push_back(...) x 1000
 
user1804599
Fredo ver Flow
 
10:26 AM
ha
 
Okay sooo...
 
@Rapptz Why vs? You still need the 1000 push_backs after reserve.
reserve does not affect the size of the vector.
 
the latter keeps reallocating
and possibly over-allocates
 
user1804599
push_back after reserve is cheap.
 
If you reserve(1000) and then do 1000 push_backs, not a single reallocation will take place.
 
user1804599
10:28 AM
It only has to increment the size.
 
No I meant
sigh
 
lol
 
never mind
 
user1804599
I don't know how to do this stuff.
 
10:28 AM
After replacing Boost.Any with Flexiglass.Any (hi @sehe) now it tells me that I have problems with dereferencing an object made within Lua @Rapptz uh...
 
user1804599
I need to store a mapping from typeinfos to Mill types somewhere.
 
user1804599
But I don't know where.
 
Singleton
 
user1804599
> this website says my question doesnt meet some quality standard thing. i am going to keep adding stuff into this question until it works. somebody remove that from the website it is annoying.
 
user1804599
@fredoverflow lol
 
10:30 AM
Where is @ThePhD when you need him?
 
@райтфолд It's definitely one of my favorite "questions" on SO :)
 
user1804599
I see why.
 
Still not sure if it's trolling or not.
 
@Rapptz btw after this I'll try and push a templated example for Sol
 
user1804599
Since it's Java, no.
 
user1804599
10:31 AM
Java is serious business.
 
user1804599
Can't possibly be a troll.
 
@fredoverflow To me it looks like trolling
btw have you changed the first "f" in "fredoverflow" from uppercase to lowercase?
Or is it just me who remembers "Fredoverflow"?
 
2 days ago, by fredoverflow
@BartekBanachewicz It has always been all lower case on github, and the inconsistency was bugging me.
 
I see
 
Interesting that people notice.
 
10:33 AM
I thought it was a naming convention thing, but then fred_overflow would have been better
 
fredo_verf_low
 
fre_dover_flow
 
usernames in GitHub are case insensitive
 
They are? lol
 
I can login using Rapptz or rapptz with no problem
 
10:34 AM
Anyway, I have grown to like lower case.
 
does it look like we're going to have reflection in C++17?
 
Is there any proposal that does it in any sane way?
I think my language will have first-class declarations.
:D
 
reaver is your language?
 
10:45 AM
@Mr.kbok Look at my link above.
@AndyProwl No, Reaver is a project that reinvents everything. The language is called Vapor.
 
Because, you know, it's vaporware right now. :D
@Xeo ugh :x
 
@Griwes Reinventing everything sounds... well nevermind it's your project :P
 
Everything out there is broken. My project sits in its own bubble, mostly ignorant of the insanities outside. :P
@Xeo Gah. Forgot about one place with the enum_values thingy.
 
mawnin
 
10:52 AM
@Puppy BEGIN BOOST.ANY HATE
BEGIN FLGL.ANY + LUA + SOL HATE
 
Do I need to install an Eclipse plugin to count significant lines of code? Na, find and grep to the rescue:
 
Hi @Puppy !
 
find . -name "*.scala" -exec grep -v "^[{ }]*$" {} + | wc -l
 
God how I hate this AV and the IT people in my company who set up the scanning policy
 
10:53 AM
boost::any is a perfectly reasonable class with reasonable semantics and implementation.
I don't know of any actual uses for it, but that's another matter really
 
@Cinch Please stop baiting.
 
@Puppy I threw it out
I now have flgl::any
 
lol
 
ah
 
lol.
 
10:53 AM
(Hi @sehe)
 
so boost::any but you reimplemented it but worse?
 
@Puppy I hated having to do the stack traces with boost::any and code I didn't know
 
I would plonk @Cinch, but he is so amusing at times...
 
@Griwes Plonk = ban?
 
ah so NIH syndrome
 
10:54 AM
plonk = plonk
Also his NIH is stronger and more terminal than mine.
 
Is that a UK thing or something?
 
I didn't think that is possible.
 
no.
 
@Cinch No, it's plonking.
 
@Cinch Plonk means you don't see the messages written by the plonked user
 
10:55 AM
@AndyProwl You mean mute.
 
I guess
 
Okay.
 
@Puppy It's not his.
It's sehe's.
I'm sure it works properly.
 
@Rapptz (hi @sehe)
I put his name in my code anyways
 
You really shouldn't ping too much.
It's probably going to annoy him.
 
10:56 AM
and that would change what, exactly?
 
@Puppy nothing.
nothing at all.
 
@Puppy ?
 
I find it amusing how my code still won't compile
 
You mean the fact that it's not his?
It implies it works.
 
no, I was referring to Cinch being annoying.
 
10:57 AM
@fredoverflow is that so...
 
now it's bitching about registering a function with Sol of the signature flgl::Event::push_data<std::string> and telling me I can't assign a rvalue to something.
 
@thecoshman Not really, no.
 
well, it's only floats and ints so, hardly expensive operations :P
 
ITT floating point operations are not expensive
 
depends on how many of them you're doing
and how you're doing them.
and what your existing register pressure is.
 

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