« first day (541 days earlier)      last day (4392 days later) » 

5:01 PM
is there a simple way to install bignums
without all the linuxey BS
 
@WhatsInAName Apologies for snarkyness earlier, was feeling grumpy before eating lunch
@WhatsInAName Maybe compile them in cygwin instead?
 
@WhatsInAName It'd probably be the same for all libraries intended for Linux.
 
i tried installing cygwin once and it completely botched up my C++ compiler
it was a pain to uninstall just so I could get C++ running again
 
@WhatsInAName Which compiler did it mess up? It shouldn't be touching anything Windows
 
devcpp
 
5:05 PM
Have they come out with a new version? It thought that was like 1000 years old
 
Of course, devcpp uses MinGW which installing cygwin probably overwrote.
@Collin Yes
but nobody seems to be aware of it
Just google it, it's got 64-bit support, GCC.4.x, etc...
 
i use devcpp because it was easy to install
and didn't require ten levels of bullshit to get working
was up and running in minutes
 
I also used devcpp until I discovered Visual Studio.
 
@Mysticial My cygwin install is contained in C:\cygwin, I also have MinGW installed
 
eh i can't afford VS
 
5:07 PM
@WhatsInAName Express?
 
I see the devcpp 5 beta, released in 05
@WhatsInAName The express versions are free
 
express has a time limit
 
hey folks
 
last i tried
 
@WhatsInAName Not anymore
 
5:07 PM
only for using it unregistered
 
my VS trial was locked after 30 days and that was that
 
oh
 
if you register it, you can use it infinitely for free, you just have to tell Microsoft about it
 
@Collin I remember something bad happening when I tried to get DevCpp to use the cygwin/MinGW
 
@WhatsInAName Trial yes, but the Express versions are different
 
5:07 PM
also, DevCPP is so bad, it's not even funny
 
it was the express
 
i need to find a good forum to talk about game development topics
 
@Mysticial I see the devcpp beta 5, but that news post was from 2005
 
for example, VC10 has some juicy new C++11 features
 
also visual studio takes forever to open
also kind of irritating
 
i wish VS was leaner
 
@Collin It got taken over by somebody else.
 
so am i totally screwed here
 
borland 55 is lean
 
without bignums
 
5:09 PM
i use it
 
Visual Studio is pretty damn bloated
but it has one hell of a sexy debugger
 
from where you are?
 
or can someone tell me how to do this
 
5:10 PM
./configure make and make file
 
you could do it in cygwin, might work from a msys shell
 
in my case VS still would give me overflow lol
right now I am just trying to fix this damn overflow problem
 
im thirsty
 
@DeadMG Oh yeah, and intellisense never works for anything non-trivial.
 
ICEy bitch, too
 
5:12 PM
think i gotta go
well
 
I just googled "intellisense not working"... And right there at the top is "Intellisense not working for me in Visual Studio 2011 Beta"... oh boy... this is never gonna end...
 
@WhatsInAName Easiest solutions are to (A) use another language for that part, or (B) use the code that Mystical linked you to.
 
@MooingDuck my code does division, not modulus
*which is actually somewhat harder... but it's not trivial to change my code to do modulus unless you know exactly what you're looking for.
 
@Mysticial is the multiplication in a seperate function? if so, you can do modulus in terms of multiplicaton, division, and subtraction
 
@MooingDuck Yes, and no. I cheated by using _umul128
 
5:18 PM
i am seriously crying right now lol
this is so frustrating
it shouldn't be this stupidly difficult
 
@MooingDuck actually, you don't even need a 64 x 64 -> 128-bit multiply to get the modulus if you have the quotient
 
@Mysticial that's fine. b = a*a; c = b/n; d = c*n; result = b-d; (ish)
@WhatsInAName bignums are remarkably difficult for computers.
 
Suppose you have q = a * b / c. Where a, b, c, and q are all 64-bit integers.
then the modulus is: `r = a * b - q * c`
Which you can compute using 64-bit integers and ignoring overflow.

Yes believe it or not, you can ignore the overflow. I'll leave the proof as an exercise to the reader. :P
 
@MooingDuck bignums are remarkably difficult in C. Computers have various native instructions that make bignums easier.
 
@Potatoswatter True that it's harder in C than ASM, but division/modulo are hard even in ASM. I didn't mention C for a reason.
 
5:22 PM
@Potatoswatter Yet the irony is that all of the fastest bignum implementations are in C... not even C++... lol
 
VS 2005 and VS 2010 just locked up waiting on each other...... ?????
@Mysticial three dots...
 
@Mysticial Really? I hadn't expected that.
 
is there seriously no good way to do a^2 mod m
 
I thought that once expression templates came on to the scene, C's performance advantage was long gone
 
@Mysticial Plain C, without tricks to get overflow bits and high-order multiplication result words?
 
5:24 PM
@DeadMG Apparently verbosity is confused for inefficiency. But if the point of the added verboseness is to be more efficient.... but alas, that never enters the mind.
 
Yep:
GMP - written in C
y-cruncher - 100% C99
TachusPi - the bignum part is written in C.
PiFast - started off as C now is C++
 
can i just split a in half or something
 
@Potatoswatter compiler intrinsics and/or inline assembly
 
@Xaade I saw that happen with VS2010 and VS2008 at a coworker's PC last monday. He came to me for help, as he was afraid he was going to loose info. Seeing that the other VS(2010) was unresponsive too, I suggested he kill that one. Lo and behold, VS2008 sprang to life :)
 
@DeadMG The reason is that you don't need C++ to implement a bignum. Only when you have a bignum object that you want to do arithmetic on do you actually find C++ useful.
 
5:28 PM
what use is a bignum if you can't do arithmetic on it?
 
@DeadMG it's useful for feeling special
 
@DeadMG You use C to implement a bignum. But you use C++ to use it.
 
Cause you can feel 2^? more special
 
@DeadMG "overload operators", not "arithmetic "
 
@Abyx As if mul(add(sub(x, y), z), w) kind of thing counts.
 
5:29 PM
@MooingDuck I'd say proper numerics are remarkable difficult for computers.
 
In other words, objects and templates and all the C++ stuff isn't that useful if you're trying to implement long multiplication. But once you have implemented all your basic operations, C++ becomes useful for using it.
 
@Abyx arithmetic - overload operators = func(1,func(2,func(3,func(are, func(you, func(still, func(reading ? 1 : 0))))))) //not sure if enough parenthesis
 
@Xaade 2^'?' = std::numeric_limits< int64_t >::max()
 
@DeadMG yep, they counts, as well as _mm_add
 
@WhatsInAName no, all the "tricks" are already in answers to your question. You actually need to use a bignum library of some sort.
 
5:30 PM
@Abyx Not really. Can you say "utterly unmaintainable"?
 
sigh
how do i do make file etc then
 
@DeadMG whole C is unmaintainable
 
@DeadMG ut-(-e&1Y unmain-)-ainable ? (1:)0? //error.....
 
@Abyx An excellent reason to avoid it in every way.
 
@WhatsInAName I'm trying to build GMP in MSYS (The MinGW shell) right now, just finished the ./configure script
 
5:32 PM
I started with "C is still good for..."
I give up.
Is C better at purely functional programming?
 
no (misread as "better than")
 
@Xaade You mean "procedural"?
 
Maybe C is better at being a language that people who are stubborn and can't learn, can still use.
@Mysticial procedural -> functional -> OO.
 
C, to me, feels like it's just further down the spectrum of "faster but harder to use"
 
@WhatsInAName Except it's not faster.
 
5:35 PM
oh; i thought it was
 
If you're writing numerical code such as a matrix multiply, or an FFT. And you do it in C++. You'll discover that you probably haven't used a single object or a template. That's why a lot of these numerical things end up being C... simply because C++ was never needed. It's not a matter of performance.
 
@WhatsInAName And thus C is still used.
 
@Xaade I see plenty of evidence to the absolute contrary every day on this very chat. Read the transcripts, identify trolls and see what part of you description fits :)
 
@Xaade C is a good language due to the simplicity of the language, and the (relative) simplicity of writing a compiler.
 
@sehe I parsed that as.... "No, C++ is the language that stubborn people who can't learn, can still use..."
@sehe Are you blaming me for trolling?
 
5:37 PM
@WhatsInAName C is not faster than (properly done) C++. For all practical purposes, C++ is a complete superset of C. So anything you can do in C you can do in C++. C++ just gives you more room to screw up if you don't know what you're doing.
 
Functional programming has no relation to procedural programming.
 
@Mysticial I don't see the more room.... if anything, C++ tries to stop you more.
 
@Xaade I meant it as, people who are stubborn and can't learn <may> try to stick to C. And they fail just as hard as with C++.
 
And C is not one bit functional.
 
@Xaade Huh. No?
 
5:38 PM
@Xaade I meant on the lines of performance.
 
@Mysticial I can't agree, because "C" is faster than "C++", because of ugly hacks which you will avoid in C++
 
You can easily take significant performance hits if you're passing by value instead of by reference.
 
@Xaade The C language itself is described in 145 pages of it's spec. The C++ language is described in ~400.
 
anyone know how to do a^2 mod m without overflow?
 
C++11 has ~1000 pages.
 
5:39 PM
@WhatsInAName a bignum library
 
AFAIR.
 
@MooingDuck Is that a problem?
 
besides bignums
 
@CatPlusPlus right, but mostly the language
 
there has to be some way
 
5:39 PM
All that means to me is that C does less.
 
@WhatsInAName nope, it can't be done
 
"How do I use bignums without using bignums"
 
@Xaade no, it's merely a reflection of the relative complexities of the languages
 
@WhatsInAName I linked you to an implementation earlier:
 
5:39 PM
i just need the result of a^2 mod m
 
2 hours ago, by sehe
@WhatsInAName Mono's C# BigInteger seems pretty selfcontained and is open source: https://github.com/mono/mono/blob/master/mcs/class/corlib/Mono.Math/BigInteger.c‌​s
 
@WhatsInAName bignum library
 
@sehe But it requires effort.
 
As long as, more pages == more functionality in a direct proportion, then there's no problem.
 
We can't have that, can we.
 
5:40 PM
@CatPlusPlus strings
 
what language is this?
 
@CatPlusPlus Yeah. Fuckin hell. Best to avoid computers at all: you need to constantly tell them what to do
 
@Xaade Would still be bignums, only based on strings.
 
@WhatsInAName Even that was too much effort.
 
@Xaade I'm not saying more pages is bad, or that functionality is bad. I'm merely saying there's something to be said for simplicity. Not that it's always better, just something
 
5:41 PM
Why are so many people such asshole snarks in here? @CatPlusPlus it has nothing to do with unwillingness to expend effort. I've been trying to fix this all morning now and nothing works.
 
@MooingDuck Fair enough
 
Even with a clear description in my OP half the people didn't read what I was asking
 
@Abyx No, I'm saying that in C++, you always have the option of doing a C-like implementation. Therefore C++ can't be slower than C.
 
To build MPIR/GMP with MSVC, you open up solution file and click "build".
 
@WhatsInAName because we've already answered your question 8 times, and you show no sign of not asking again
 
5:41 PM
@WhatsInAName In here Asshole is a quality. So if you're offended easy, the door hurts harder.
 
Blimey. I forgot I don't have the Userscript for SO Chat installed since I reinstalled yesterday. Well
 
it hasn't been answered other than "do a%n*a%n % n" when I've already said this doesn't work
 
cp Old/Userscripts -r .
 
To build it with MinGW, you install MinGW and MSYS, and type in "./configure --prefix=/mingw && make && make install".
 
or "install bignums" where I've said this doesn't work either
 
5:42 PM
Refresh browser. Done
 
Really, tremendously hard.
 
i tried installing minGW and it fucked up my compiler
 
@WhatsInAName then it's impossible. We said that too. Stop asking
 
tried installing MSYS and it threw errors
 
Then solve them.
 
5:42 PM
it shouldn't be this difficult to install a goddamned bignum library
 
@Mysticial yes, but do you really want to write ugly C-style code to achieve performance?
 
It shouldn't be this difficult to solve a simple problem for a programmer
 
@WhatsInAName I gave you a link to a binary library more than an hour ago
 
@WhatsInAName it shouldn't be this difficult to homegrow a bignum.
 
You guys link me to libaries that aren't compatible
sehe's thing doesn't even look like it'd compile
 
5:43 PM
@Abyx If performance matters, then yes. If every cycle you save reduces run-time by hours on an expensive server, then it's worth it. In fact, I get paid specifically do it.
 
Right.
 
ugh
 
@Mysticial Depends... sometimes verboseness results in more simple code -> faster.
 
By now, the usual logic starts to apply here: the amount of time you spent ---trolling--- fishing for existing work here, would have gotten you at least to 50% of a working setup.
And given you a head-start in **all** future situations where you'd possibly encounter autotools, MingW or - god forbid - worse
 
it's like if you guys asked me some complicated physics question and I'd just go "Well, go read a physics book herfderf"
it's not a real answer
 
5:44 PM
@WhatsInAName msdn.microsoft.com/en-us/magazine/cc163696.aspx shows how to use Java's bignum in Visual Studio
 
Obviously people who think C is faster as a guaranteed trait, have coded too much in Java.
 
@WhatsInAName We are under no obligation to provide canned answers.
 
Just tossing bignum links at me that I've already looked into is not helpful. it's being snarky
sehe: Okay but it's a huge waste of time to provide answers that aren't saying anything, either
 
You looked into it, encountered a problem and ran away.
 
@WhatsInAName I wrote code that can do it, but it's many many pages long and doesn't work. Would you like a link to that instead?
 
5:45 PM
No, I looked into it, ran into a problem, and in attempting to fix said problem, ran into more problems until it became untenable
 
@WhatsInAName You'll get precisely the same response when you go into a physics chatroom and demand that someone explain string theory/relativity/thermodynamics in 5-to-10 minutes, but without requiring you to learn the jargon.
 
@WhatsInAName How are we supposed to know what links you've seen/haven't seen? (not trying to be snarky)
 
@WhatsInAName .... It sounds like your problem is unique to your configuration. Did you try restarting your machine? If that doesn't work, power down the machine for 10 mins and call back.
 
Wait, is this about how to do bignum arithmetic without installing a bignum library?
 
@Sehe Not a valid analogy; it's much easier to get bignums working than it is to explain those concepts in 5-10 minutes
 
5:46 PM
@WhatsInAName Then stop fishing for useless answers. Everybody else seems to think they aren't useless.
PROVE IT.
Apparently you yourself seem to think it is **not** that simple
 
@LucDanton No it's about calculating a^2 mod m without overflow issues
 
@LucDanton apparently... yes
 
@LucDanton yes
 
It's more akin to asking professional physicist to solve your entry-level homework step by step for free and then complaining that you don't know what you're doing.
3
 
lol
 
5:47 PM
@CatPlusPlus The nature of help is to actually provide help. It's not helpful to say "Well go read physics books."
 
@WhatsInAName um, add is just adding overflow to second number, subtract is removing underflow from lower number, multiplying is multiplying both and adding overflow to upper number, dividing is the only complicated one.
 
I asked the question after having already tried it myself from various angles which i've stated explicitly
 
34 secs ago, by Xaade
@WhatsInAName um, add is just adding overflow to second number, subtract is removing underflow from lower number, multiplying is multiplying both and adding overflow to upper number, dividing is the only complicated one.
 
@WhatsInAName you wanted to do bignum math, we gave you libraries for bignum math. You need to figure out how to install and use them properly, because that is where you're stuck. Not finding a library.
 
Building this library is following a step-by-step guide.
 
5:48 PM
YES for the billionth time
Installing them has been a problem
 
And you failed to actually say what the errors were.
 
They all assume you're some sort of linux guru
 
31 secs ago, by Xaade
34 secs ago, by Xaade
@WhatsInAName um, add is just adding overflow to second number, subtract is removing underflow from lower number, multiplying is multiplying both and adding overflow to upper number, dividing is the only complicated one.
 
@WhatsInAName Sorry to hear that. Did you ask on SO? I didn't see all these explicitely tried things. Sorry about that. This is a chat room, not a QA site
 
There.... 3/4ths done.
 
sbi
5:48 PM
"The noblest of all dogs is the hot-dog; it feeds the hand that bites it..." #FB
 
@Xaade Yeah, a bignum division is fugly until you get to very large sizes where you can abuse the iterative methods.
 
@sbi Zing!
 
@WhatsInAName which one would you like us to link the install/setup guide for?
 
I've already said, outright, that I've tried installing bignum libraries. Both failed, and one led to a three hour ordeal where all I got out of it was Cygwin/MingW fucking up my compiler
I've tried modular shortcuts, no dice
 
sbi
@sehe Yeah, you guys were so earnest, I thought I'd throw a spanner into the discussion.
 
5:49 PM
Don't libraries come with install guides... and helpful forums....
 
Like I said, they all assume you're some kind of linux genius
 
Because you have to type things they tell you into CLI? Puhlease.
 
@WhatsInAName I gave you everything but division.
 
Okay, let's approach it from the lazy angle.
 
@Xaade division is the only hard part
 
5:50 PM
@Xaade In my experience, they don't come with anything useful, at all.
 
No because they have instructions that aren't compatible with Windows
 
Google > "gmp windows binary" > cs.nyu.edu/exact/core/gmp
 
they just assume you already have a Unix system and are a make veteran from the start
 
First damn result.
 
I already *tried GMP*(
 
5:50 PM
unless they already provide a Windows binary
 
How do I mute/ignore someone
 
@WhatsInAName Those links are prebuilt
 
Smarter? Or dumber? Apparently, I can't tell which way I need to go.
 
If you haven't noticed, there are prebuilt binaries there.
 
5:51 PM
those libraries do not work
 
no making involved or anything like that
 
they do. not. work
 
...
 
They do work.
 
They do not work.
 
5:51 PM
@WhatsInAName they work fine. You do not know how to use them.
 
Then look at the damn source code and make your own.
 
For one, don't try to get GMP to work on Windows. Use MPIR instead.
 
MPIR, you mean.
 
GMP is intentionally Windows-unfriendly.
 
unless you tell us what went wrong with it, then we can't know what you did wrong
 
5:51 PM
Then how do I use them properly without some 100-dependency BS linux method
 
Source code == code == copy-paste.....
 
MPFR is floating-point counterpart for GMP.
 
@CatPlusPlus Yes, corrected.
 
Curious
 
Anyone have the answer to that how to ignore question. I'm now very curious.
 
5:52 PM
How many of you use Windows vs. Linux
 
@WhatsInAName mattmccutchen.net/bigint Here's a simple one with no dependancies that I can tell. Compile it yourself
 
@WhatsInAName I dual boot. But Windows is my primary.
 
sbi
@Xaade What question do you want to ignore?
 
@WhatsInAName most of us. I don't use linux at all
 
The better question is, do you use a library, because my answer is no, because I write the shit myself.
 
5:53 PM
@Xaade click on someone's name, in the dropdown is "ignore"
 
sbi
@MooingDuck Oh, he wants to ignore a user?
 
@WhatsInAName Windows.
 
I tried downloading the Ming library on that page
 
@WhatsInAName Why Ming?
oh, wait a minute
weren't you just saying you're using DevC++?
 
I use devCPP
 
5:54 PM
Look.... Obviously.... There'sNothingWeCanDo.
 
right
well, number one reason to never, ever use DevCPP- nothing is built for it, because it's a dead compiler
those static libraries are built for compilers that are actually used by a reasonable number of people
 
I couldn't get the other compilers working without a lot of bullshit
 
Dev-C++ is not a compiler. And it's actually updated by someone these days. Still sucks, though.
 
sbi
@WhatsInAName It seems nothing works for you, huh?
 
VS is too expensive and bloated, couldn't get G++ or whatever working
 
5:55 PM
@WhatsInAName I think you need to move on to a language like C#.... it has all that stuff for you...
 
@CatPlusPlus Didn't realize DevC++ wasn't a compiler. Does it just wrap g++?
 
C# is bloated and slow
 
sbi
@WhatsInAName You can download VC (legally) for free.
 
It's an IDE.
 
@WhatsInAName do you have me on ignore? Because this library is just 5 c files and 5 headers. No linking, no install, no nothing. Just copy-paste-go.
 
5:55 PM
And the official release comes with g++ 3.4.
 
Mooing I already tried that one
 
@WhatsInAName ??? I wasn't aware... My C# runs pretty fast....
 
It doesn't work either
 
that's like, 10 years old or something, isn't it?
 
Even if you put those files in your folder
And include the headers
They don't work
 
5:56 PM
There are unofficial releases with up-to-date compiler and bugfixes even.
 
@sbi Yeah, that's the feeling I'm getting
 
I mean... I could always do dynamic bitmaps in C++... and be slower.
 
Still sucks.
 
@WhatsInAName If you don't ever say something more than "doesn't work", you're never going to get anywhere.
 
5:56 PM
Visual Studio isn't going to solve my overflow problem
 
what didn't work?
 
@MooingDuck Not if you intend to sell.
 
@WhatsInAName wait what? How could that not work?
@Xaade oh right
 
@Xaade But then you can probably afford to pay.
 
sbi
Oh, c'mon, guys. Nothing works for him. It makes no sense to throw new suggestions at the guy, they bounce right off him. So please stop it, and return this room to sanity.
 
5:57 PM
@WhatsInAName Programmer: Compiler doesn't solve my overflow problem. -- Compiler: WTF?
 
Speaking of, anyone has tried using e.g. Boost.Format with UDLs? I know @CatPlusPlus has mentioned it once or twice, I'm curious about how convenient the result is or isn't.
 
sbi
Ah, there. The room is much nicer now.
You could have had this earlier, you know.
 
Although I'm kind of disappointed Boost.Locale has its own format that doesn't follow the same specs.
 
He should go the Java chatroom. May not solve the library problem, but they'd teach him how a few abstract singleton factory factories can get around his overflow problem.
 
I love SA smilies.
@LucDanton I mentioned it in an answer to someone, but didn't really use it. The idea was making "%1%"_fmt % 42, so rather straightforward.
 

« first day (541 days earlier)      last day (4392 days later) »