« first day (1209 days earlier)      last day (3961 days later) » 

user3010322
04:00
@Code-Guru He's the world record holder for most records of pi computed.
user3010322
> the world record holder for the most records...
boost::math::constants::half<float>()
Is there a Russell-like paradox in there somewhere?
04:01
Ugh... watch window "std::string is undefined" y u do dis
what the shit
it's defined as 0.5
lol
why?
What a waste of time.
@Mysticial 0.5 is too short.
user3010322
This reminds me.
user3010322
04:01
I need to overhaul Mathema to be better.
user3010322
I need to also overhaul limits
> From a high-school project that went a little too far...
user3010322
@Rapptz I wonder why they would need half....
@R.MartinhoFernandes java.lang.Math.Constants.ConstantsSingleton.Factory.SinglePrecisionFloatingPoin‌​t.PositiveOneDividedByTwo.
04:03
> All the constants are accurate to at least the 34 decimal digits required for 128-bit long doubles, and most are accurate to 100 digits or more when used with a suitable arbitrary precision type.
Step it up Mysticial.
They've got your 50 digit pi by the balls now
5
fuuuuuuuuuuuuccccccccckkkkkkkkkkkkkkkkkkkkkk
Is 0.5 accurate to 100 digits or more?
I guess so
Why not zero and one?
0.5 can be represented exactly in binary, right?
user3010322
@Code-Guru YES, YES IT CAN.
user3010322
._.
user3010322
Fucking Floating Point piece of shit mother fuckin'....
man, you have a lot of rants today, @ThePhD
user3010322
04:05
Q for life.
  BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
5
user3010322
LOOOOL.
user3010322
@Code-Guru Sorry, I had to do a bunch of floating point math by hand.
user3010322
So I'm angry at floats right now.
user3010322
Smarmy little wormy shits.
With a finite automata?
user3010322
04:06
@Code-Guru No, it's separate, thank GOD.
sounds like a fun exercise...
user3010322
@Code-Guru It wasn't. u.u;
user3010322
But! I got to use UB to check my answers.
@Rapptz Doesn't fit on Twitter.
04:07
lmao
Well that explains it: (std::basic_string<char,std::char_traits<char>,std::allocator<char> >*)&data -> string.size = 3435973836
@Mysticial Not really necessary, as long as you don't mind using an x87 instruction (fldpi).
What's the character limit on twitter?
@JerryCoffin There's an x87 instruction to get Pi?
back to parsing protein strings...
04:08
@Rapptz A positive number, so it's larger than it should be.
user3010322
@Borgleader o.0 Wat.
user3010322
unions don't give strict aliasing warnings~
@ThePhD Yknow that segfault I was having? Well now that nonius is VS compatible, I used the watch window to inspect the aligned_storage as a string.
04:10
What's the UB? My C++ is a bit rusty in this area
@Mysticial Yup. Also for a few other constants (1, 0, base 2 log of e, base 2 log of 10, base 10 log of 2, natural log of 2).
What a waste of silicon. lol
user3010322
@Code-Guru The union type-punning in test
@Code-Guru There's no float object to read.
SAM
SAM
@Ell Hahaha again! Wrong Sam by the way... :)
04:12
oic
that's a pretty slick trick
user3010322
You should use it~
@Mysticial Sort of, but some of them are pretty handy when you're hand writing assembly language.
user3010322
@Code-Guru You can formalize the trick with this:
user3010322
template <typename TTo, typename T>
TTo cowboy_cast ( const T& cow ) {
	union u {
		T hat;
		TTo boy;
	};
	return u(cow).boy;
}
user3010322
It's a wonderful trick~ ♡
04:15
@Code-Guru UB is not slick.
user3010322
much slick, such skills, so trick~
2 days ago, by ThePhD
D: How is that a meme here? :c
user3010322
Heeey, he was curious!
user3010322
I was just showing him the ropes!
@ThePhD Showing him the ropes is one thing. Tying a noose around his neck is quite another.
user3010322
04:19
Oh come onnnn it's not thaaaat bad!
user3010322
Besides, he'd almost never have a use for something like this anyhow.
Give me some credit. I'm not such a noob that I blindly copy and paste code...especially not from @ThePhD =p
Hmm, FFTW is GPL.
besides I'm too busy learning Haskell to dive too deep into C++ atm
I wonder what we use at work, then.
04:22
mini-pi
@R.MartinhoFernandes Would it be possible for operator() not be const for benchmark functors?
Hmm, what for?
Mutation is not a good idea because this should be called zillions of times.
Feb 2 at 21:22, by ThePhD
And why is make const either?!
^ the discussion is around there
user3010322
@Code-Guru I'm lost already on my homework. :D
@ThePhD Ask away...or start another chat if you want
user3010322
04:27
I'm trying to define a DFA for the language L = { 00, 11, 101 }. I've got q0 = { empty set }. I'm trying to draw a diagram.
user3010322
Right now I have q1, which represents when we receive a 0. and then there's q2, which represents when we receive a 1 to start with.
@Xeo Totally necessary.
@ThePhD Sounds good so far
user3010322
q1 can only go to itself, and hits the failing-state qDead if it encounters a 1 from q0
so what transitions do you need from q1?
I don't think q1 should go to itself.
user3010322
04:29
Right, because q1 represents a certain state, right?
q1 -- 0 --> q3 (accepting state)
exactly
user3010322
Ah.
user3010322
That makes it a lot more clear.
q1 represents the first 0
q1 -- 1 --> q4 (failing state)
@Borgleader This is why nonius-8 depends on nonius-7. You cannot just destroy the object in the destructor because the destructor will run once, but op() will be called thousands of times.
04:30
@ThePhD Usually a "loop" means you are doing something equivalent to "*" in a regex
@R.MartinhoFernandes I see.
It needs a distinct teardown/cleanup/watchamacallit step in the execution that is excluded from the measurements.
I'll hold off on getting this to work then.
Like setup(); start = now(); op(); end = now(); teardown();
SAM
SAM
@Code-Guru C++ atm?
04:34
atm == at the moment
SAM
SAM
@Code-Guru Ohh... I started googling "C++ atm" hahaha I thought its something new... :) :D
C++ assembled time machine
SAM
SAM
@Rapptz he he good one
good morning Lounge
04:36
Shit. It's morning.
SAM
SAM
@ArneMertz Good Morning!
@R.MartinhoFernandes yes. early, but morning ;)
u still up?
I really don't want to bike home in the cold ;-(
@ArneMertz whistles
If I go to sleep now I can sleep four hours and be about half an hour late to work. Hmm.
Now the question is: will I sleep four hours, or six?
@R.MartinhoFernandes seven, probably ;)
SAM
SAM
04:39
@R.MartinhoFernandes What about having a half-day at work? and sleep for 8 hours?
user3010322
@Code-Guru Mind if I take a picture and show you my finished diagram?
@R.MartinhoFernandes Sleep at work. Everybody wins!
I could do that.
@ThePhD sure
There's a nice comfy sofa.
04:40
as long as it's not a picture of your junk =p
SAM
SAM
Btw why the title is Lounge<Google> today?
user1174868
god I hate linux, it is such a buggy pile of shit
@SAM You need a G+ account to know that.
user1174868
of a backslash? you didn't want to input that anyways
SAM
SAM
@R.MartinhoFernandes I have one.. but haven't yet logged in...
04:45
lol
It's a joke poking fun at Google requiring everything to use G+
@R.MartinhoFernandes So now that nonius is VS compatible, will you consider doing the same for ogonek?
@Rapptz u mean his presence alone at work boosts the productivity of his coworkers even when he'ssleeping? ;)
@Borgleader It's lots more work :S
Fuck VS.
SAM
SAM
@Rapptz Ohhh.. come on... I thought it was real...
04:47
Even my basic sol code needed an assload of reworking to work with dumb VS
@ThePhD whenever you're ready =p
SAM
SAM
@Rapptz VS :\ even the name is stolen from Vi ;)
@R.MartinhoFernandes Alright, gimme a month to read my book on templates, and then another to Alexandrescu's book, and then I'll give it a shot ;)
Fuck I'm doing windows programming again
wtf is this shit
If you think of the building as an application's process, each apartment is a distinct area in which a COM object can be created. But just as there may be lofts, studios, and 2- or 3-bedroom apartments in the same building, there can also be different types of COM apartments within a process. Apartments may also be vacant or have any number of people/objects living in them.
SAM
SAM
@Mikhail I can understand the pain... :(
04:53
@Mikhail lol have fun gl
@Mysticial what's the license on mini-pi?
I want to steal your fft_inverse.
@R.MartinhoFernandes public domain
good guy @Mysticial
@R.MartinhoFernandes It probably won't do what you want it to do though.
The input needs to be bit-reversed order.
Yeah, I was going to ask about that.
Real World Haskell lies!
The forward FFT takes in-order input and outputs in bit-reversed. The inverse FFT takes bit-reversed input and outputs in-order. So they cancel each other out.
> No instance for (RegexContext Regex [Char] [(Int, Int)])
04:56
What does bit-reversed mean, exactly?
If you take the index of each array memory. Bit reverse the index. That will be the new index.
{0,1,2,3,4,5,6,7} -> {0,4,2,6,1,5,3,7}
user3010322
@Code-Guru The picture is coming out really fuzzy because I don't have a real digital camera. =[
You generally don't want to bit-reverse copy an array. Because the memory access is absolutely horrible -> almost guaranteed cache miss on every access.
@Mysticial does FFTW do a bit reversal? Author (stevie johnson) claims there is some way around it?
04:58
@Mikhail They do actually do it. But they probably merge it into the FFT computation to "spread out" the cache misses.
@Mysticial Meh, this is for outputting pretty charts, so it's fine.
I still vote for the MML or Mysticial Math Library
user3010322
But, here it is @Code-Guru
@Rapptz lol
@Mysticial is that the same as not missing?
04:59
The world needs more non-GPL math libraries
7
@ThePhD homework?
user3010322
@melak47 Yeah.
If you do a direct copy to bit-reverse something, then you cache miss on every one access. But you can do it on Log(N) passes over the data and have almost no cache misses.

If this log(N) approach is taken, it's often better to merge it into FFT computation itself.
@melak47 You awake too?
@Rapptz s/ math//
SAM
SAM
05:00
@Borgleader good one
@R.MartinhoFernandes isn't it obvious by now that my sleep schedule is a bit broken? :)
@ThePhD owe my eye!
@Borgleader Other libraries are rather easy. Math libraries are indeed fucked up.
@ThePhD All joking aside: looks good to me!
user3010322
@Code-Guru Sorry. x3 I guess I'll just have to wait until I get a better digital camera to share.
05:00
@R.MartinhoFernandes unicode is easy?
ICU is not GPL.
@ThePhD I was able to parse it ;-)
@R.MartinhoFernandes This bit-reversal is the reason why FFTs that are specialized for convolution are much faster than generic implementations like FFTW.
Convolution doesn't need to look at the fucked up order frequency domain. So there's no need to fix the order. (i.e. bit-reversed copy)
@R.MartinhoFernandes Why do you need an ifft? Doesn't FFTW provide one?
@R.MartinhoFernandes My point is, I'm sure there are non trivial non-math libraries that could use a non-gpl counterpart
05:04
I need it for IDCT.
@R.MartinhoFernandes oh
@Borgleader Yeah but I think they have an alternative probably.
Math actually doesn't
There was I think TTMath which was BSD but it was only Big Integer I think, which is pretty simple
I need it for IDCT which I need for KDE.
@Borgleader That said, I have plenty of closed source projects. Mini-Pi is sort of my "gift" to everyone. (if you can even call it that)
The stack is getting too big for my taste.
05:08
?
Stack of things that I cannot implement because I need something else.
Hey @Mysticial Why don't you use std::complex?
@Rapptz I do. In the unoptimized version.
What's wrong with std::complex?
is it because it interleaves real and imaginary instead of having two sepearte arrays, float* real,*imaginary?
SAM
SAM
05:12
@Rapptz Well... its complex :p
@Rapptz I use it in the unoptimized version. But not in the SSE version because there's no guarantee that complex<double> is the same size as __m128d.
user3010322
Arf.
TMI :D
user3010322
@Mysticial Sorry.
05:13
@ThePhD wutttttttttttttttttt
@ThePhD :)
relevant
Hm
sizeof(std::complex<double>) returns 16
The standard guarantees some things
If z is an lvalue expression of type cv std::complex<T> then:
— the expression reinterpret_cast<cv T(&)[2]>(z) shall be well-formed,
— reinterpret_cast<cv T(&)[2]>(z)[0] shall designate the real part of z, and
— reinterpret_cast<cv T(&)[2]>(z)[1] shall designate the imaginary part of z.
Moreover, if a is an expression of type cv std::complex<T>* and the expression a[i] is well-defined
for an integer expression i, then:
— reinterpret_cast<cv T*>(a)[2*i] shall designate the real part of a[i], and
user3010322
Yeah, but it's still size-agnostic, it seems.
user3010322
T could be anything. =[
05:17
It's meant to be usable just like an array of floats.
@ThePhD What.
@ThePhD @Mysticial specifically said complex<double> so T is double.
user3010322
And T could be any size, too.
@ThePhD It's unspecified for types that aren't double, float, or long double
complex<bool> ? :)
user3010322
@Borgleader double isn't guaranteed to be 64 bits, is it?
05:18
o.O
@Mysticial Seems it has all the guarantees you would need.
@Rapptz Oh ok. Didn't know it actually guaranteed that. In which case it would be a valid change to the program.
The effect of instantiating the template complex for any type other than float, double, or long double is unspecified.
I thought C++ stuck to IEEE754 when it comes to floats?
user3010322
Make sure to static_assert( sizeof(double) == 8, "Woof!" ); so it works properly with __m128d
05:21
No need.
It has no padding.
user3010322
I thought double just had to be at least 64 bits?
user3010322
Can't it be more on certain platforms?
Not in platforms where __m128d exists.
user3010322
Mmm. This is true.
lol
05:23
There's no point in supporting other platforms when you are requiring this one.
__m128d is so old school now. lol :)
Any Haskel regex-perts online?
Effects: inserts the complex number x onto the stream o as if it were implemented as follows:
template<class T, class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& o, const complex<T>& x) {
basic_ostringstream<charT, traits> s;
s.flags(o.flags());
s.imbue(o.getloc());
s.precision(o.precision());
s << ’(’ << x.real() << "," << x.imag() << ’)’;
return o << s.str();
}
but... why
am I missing something?
why would they make a stringstream?
Why not write to the stream directly
05:29
Atomicity.
user3010322
What does that do for the meaning?
@ThePhD It inserts the output as one indivisible unit into the stream.
user3010322
@R.MartinhoFernandes Oh, so failures are a result of a single operation, rather than several failed herpderps?
I pass a reference to an objects in a vector as an argument like my_func(&my_vec[0])
should that not work for some reason?
user3010322
05:34
That's a pointer.
user3010322
A reference is just my_vec[0]
user3010322
SAM
SAM
^ wut?
05:36
as far as I understand what the reference says
user3010322
Yaay!
user3010322
I finished all of problem 1!
user3010322
And it only took me 2 hours.
I'm so glad I finished school... I just wish I had a job
SAM
SAM
@ThePhD Which problem?
05:37
passing a pointer to an element in a vector is fine
thanks :)
SAM
SAM
@VitaliusKuchalskis But reference would be more elegant
Any bit twiddling for reversing bits?
@R.MartinhoFernandes yes
b = (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;
Weird.
yeah, but i want to change that element in a function
if i would pass a reference
the functions would receive a copy
AFAIK
05:39
@R.MartinhoFernandes The more straight forward way is to go a logarithmic number of mask/shifts.
But I've never tested it to see if it's faster than that trick you found.
Oh.
I know how to turn your BigFloat functions to take one parameter now
@Rapptz Putting the precision into the object?
Yes
I'm not sure why that didn't occur to me last year
05:44
Boost multi-precision does that too.
When I was first designing y-cruncher, I thought about doing that as well. But I realized that I needed absolute control over the precision. So I left it as a parameter.
And it also avoids the problem of precision conflicts when your operands have different precisions.
How so?
Just take the highest precision by default
@Rapptz But that might not be what you want.
So you could override it.
I guess
But I felt that keeping the precision explicit was less prone to errors.
Since precision is one of the things that have screwed me over in unusual and weird ways.
Normally, you just "spam" maximum precision everywhere. But that doesn't work too well if you care about performance.
user3010322
Why am I bleeding everywhere. ;~;
user3010322
05:48
What the hell, did I get chewed on by a dog while I was sleeping or something?
Are you on your period?
user3010322
@Rapptz You're so mean. D:
Mini-Pi does actually do maximum precision spamming. It doesn't try to do the fancy shit that I do in y-cruncher.
@ThePhD Says the guy who revoked my repo viewing privileges!
user3010322
@Rapptz What repo viewing privileges?!
user3010322
05:49
I don't own any of your repos. u.u
Your repos
user3010322
The only one was Furrovine, and that was because the code was terrible. :C
user3010322
It's not like you needed to see it. It wasn't even a good example. :c
user3010322
Pluuuuus,
user3010322
if you really wanted to see it, IIRC @Borgleader made a copy of the repo and pulled it onto his HDD, so it's forever frozen in time on his stuff.
05:51
@ThePhD How goes the rest of that HW?
Keep making those excuses buddy!
user3010322
@Code-Guru Defining an NFA for a language L = { ... 1101 }, E = { 0, 1 }
user3010322
@Rapptz They're not excuses! :c
@ThePhD I deleted it after your revoked my viewing privileges. I figured if you didn't want me to have access to a repo, I should also get rid of my local copy.
user3010322
@Borgleader Oh. Uh. Well that was nice of you I guess.
user3010322
05:52
You didn't have to?
@ThePhD What's the "..."?
all binary strings up to 1101?
user3010322
@Code-Guru "Any number of symbols, ending in 1101"
user3010322
I don't know the symbol for "bunch of crap"
oic
.*
or just *
[01]*
05:53
even better
user3010322
Oh okay. I'll just erase all the ... and replace with [01]*
user3010322
@Rapptz Do you really want to see it? :c
that would be faster than typing your smart ass comments =p
I just think it's RUDE. >:(
user3010322
But wwwhhhhyyy?
05:55
3
Q: Indices of all matches of a regex

Code-GuruI am trying to match all the occurrences of a regex and get the indices as a result. The example from Real World Haskell says I can do string =~ regex :: [(Int, Int)] However, this is broken since the regex library has been updated since the publication of RWH. (See All matches of regex in Has...

Where's the haskellers when you need them?
All 11 of them are asleep
user3010322
Xeo, R.MartinhoFernandes, Rapptz, rightfold, BartekBaneschewiz, CatPlusPlus, and I think also LucDanton do Haskell.

« first day (1209 days earlier)      last day (3961 days later) »