« first day (603 days earlier)      last day (4360 days later) » 

10:00 PM
 
@Timmy is VS10 worth the purchase for learning when VCExpress2008+ is free?
 
@John VSExpress2010 is free as well
 
@Timmy soz, ebing cheap
 
@Timmy you should use unicode anyway, but i can understand that you would want to have your code tested without such macro symbols being supplied externally. in fact i always turn that off. also, fix up c++ language defaults, like enabling rtti, and set warning level 4
 
@John my friend purchased it and im borrowing his computer, i certaintly didnt pay for it. the only advantage i've noticed is being able to create windows installation packages
 
10:01 PM
@MooingDuck but it lacks autocomplete from the linked libraries, I was waiting for the next edn
 
Real men use -Wall -Werror
 
@Timmy if you can hack Pascal, InnoSetup is a quick fix
 
@EtiennedeMartel not with visual studio they don't
 
@CheersandhthAlf what is rtti, warning level 4 and why should i always use unicode? excuse my ignorance im on a learning curve
 
@EtiennedeMartel that's different for g++ and msvc. with msvc -wall really means all warnings...
 
10:02 PM
@CheersandhthAlf Well shit.
 
@MooingDuck That doesn't invalidate his claim. Think about it for a while.
 
rtti is Runtime Type Information, essentially enabling dyamic_cast.
 
@ScottW Oh k.
 
unicode is necessary e.g. for handling windows filenames correctly
 
Oh gawd, there's way too many green gravatar thingy people around.
 
10:03 PM
im glad you just pointed that out since thats what im working on now lol xD
 
in windows unicode means wchar_t, which in Windows is UTF-16
 
@RMartinhoFernandes srsly. I have to read names. :(
 
to make paths work with *nix libraries like opencv, attempt to translate to ansi, and if that fails, convert to short name path and translate to ansi
 
@EtiennedeMartel You forgot -Wextra
 
warning level 4, because that tells you about more things that are most likely wrong
unfortunately also some sillywarnings
but those can be turned off
ok?
 
10:05 PM
@StackedCrooked and -pedantic-errors
 
I think you should just enable all of them first, and then disable those you don't care about.
I prever an "opt out" approach.
 
@bamboon Nah, I'm not a pedant.
 
@bamboon is that different from just -pedantic?
 
Green Gravatar? What sort of data usage are you guys on, privately? I don't even have images on, let alone all these new libraries you mention. But what comes first, Land line or coding job?
 
@CheersandhthAlf no, I just think it makes it errors and not warnings?
 
10:06 PM
Yeah.
 
everything compiles now, using lower n, long ints instead... now the output is wrong
 
#Goes back to e-reader and manuals#
 
@ScottW you should install Ruby 1.9.3 first. xD
 
@AgainstASicilian that's not a GMP bug I assure you
 
10:08 PM
you're right; turns out long ints just overflow easily
 
@ScottW I'm using CSV but that's new in Ruby 1.9.
 
with lower n, program works
defeats the purpose though
 
@AgainstASicilian cast before doing arithmetic instead of after
 
best is to not cast
especially for beginner
 
@ScottW hmm.
 
10:09 PM
@CheersandhthAlf that complicates the code unnecessarily in some situations
 
@ScottW Try this: rubyinstaller.org. (Not sure if it works with Cygwin though.)
 
I see green again. Anyhoo. For python should I go pure Linux or Mingw? Rhetorical to see my grav's colour
 
@MooingDuck like?
 
@CheersandhthAlf like initializing a bigint?
 
well like this for instance, how would you rework it: count = (x*x*x*x*x-1) where count is mpz_class and x is another data type
 
10:11 PM
@MooingDuck what's the cast used for then?
 
@CheersandhthAlf try initializing it to something a unsigned long long can't hold
 
@MooingDuck i haven't installed gmp
 
@CheersandhthAlf you don't need gmp, just think about it, look at his code example
 
but does it not support more piece-wise specification?
 
my program works up to 10^30 in a SPLIT SECOND
 
10:12 PM
and what does the cast accomplish?
 
take that, jalf!
 
Morning.
 
@MooingDuck nah, i think your viewpoint can be interesting, but not his code
 
@CheersandhthAlf bigint myvar = 1000000000 << 63;
 
next challenge is getting sqrt to work with the mpz_class
 
10:13 PM
that's a bit-shit (intentional speling), not a cast
you can use a double for that
a cast won't help
 
@AgainstASicilian Just overload it.
 
GMP has its own sqrt.
AFAIR.
 
@CheersandhthAlf sure it will. double loses accuracy. a cast would retain accuracy.
 
mpz_sqrt.
 
@MooingDuck can you give an example of the cast you're thinking of
 
10:14 PM
@CatPlusPlus You're having an affair?
 
No. :(
 
@CatPlusPlus I tried and had some issues
 
@CheersandhthAlf bigint myvar = bigint(1000000000) << 63;
 
@ScottW also clear the database before running it.
 
I have some issues, too.
 
10:14 PM
Don't cry little cat.
"Have an issue? Grab a tissue."
 
well you might call that a cast.
 
Why are you helping him?
 
"Have an issue? Report it on GitHub issues."
 
@Derek thanks for i.stack.imgur.com/QkXNO.jpg night all
 
@CheersandhthAlf if you didn't, that would explain our confusion
 
10:15 PM
He has shown he doesn't even give a fuck about reading the docs.
 
@FredOverflow It's backwards, indirection syntax is awful, sigils.
 
IPC communication -- What's the best way to get the fastest performance of IPC on Windows?
 
@RMartinhoFernandes What can possibly go wrong?
 
@IDWMaster depends on the processes. For system <-> user and miniscule data, I found the registry best
 
@John For realtime communication?
 
10:17 PM
@RMartinhoFernandes I just got here.
 
@John that seems unlikely
 
Registry is not an IPC mechanism.
 
@IDWMaster as real as I could get it. I was storage limited tho..
 
@MooingDuck ÿeah. but it's a vague thing. the standard reserves "cast" for the C cast notation but nobody does that in practice. i just didn't think of ordinary construction
 
10:18 PM
@CatPlusPlus You COULD use it for IPC.
 
Also "IPC communication" is redundant. Guess what 'C' stands for there.
 
Whoops.
@ScottW Yes, @John said it.
 
@IDWMaster You can use manually swapped floppy disks for IPC, too.
 
@CatPlusPlus Crap.
 
@CheersandhthAlf That constructor is called a cast constructor :/ No wait, conversion constructor, you're right
 
10:18 PM
That doesn't make it an IPC mechanism.
 
@ScottW Great, now there are huge bold caps in the side bar.
 
@EtiennedeMartel And italic.
 
Fuck me.
 
@CheersandhthAlf you win
 
Anyways; we have pipes, we have sockets, we have RPC, and we have memory-mapped files with mutexes and events.
 
10:19 PM
Anyway, for small amounts of data, WM_USERDATA (I think) will probably be easiest.
 
The main question is performance.
 
@MooingDuck yes, because i learned a little about bigint. :-)
 
@IDWMaster it was a lot more maintainable than employing huge IPC mechanisms. But I'm talking about 4 bytes a second.
 
Performance is a problem if you can prove it's a problem.
 
Since @Cat's a cat, I'd call that "Purrformance".
 
10:20 PM
If you really can't live with any delay, shared memory is probably the fastest.
But also one of the hardest to do correctly.
Pick your poison.
 
Cyanide for me please.
 
@CatPlusPlus There's a lot of latency in kernel-mode calls with mutexes; and yes, shared memory was difficult to use.
 
Sharing things is a problem with user <-> system priviliged processes. That's why I used the registry
 
Especially when I'm dealing with more than 2 processes
 
I like mercury, but I heard you need a lot to die.
 
10:22 PM
@EtiennedeMartel Not true
 
I never used Windows RPC. I'd probably pick pipes over sockets for local IPC.
 
@RMartinhoFernandes Lol, you're a robot, that won't affect you.
 
@IDWMaster There's no perfect method. There's always a tradeoff.
 
@EtiennedeMartel Once had a teacher that passed a bottle of mercury around and let us dip our finger into it.
 
@CatPlusPlus True.
@StackedCrooked You should sue him.
 
10:24 PM
@CatPlusPlus I think a lot of these newer mechanisms are restricted to > .NET 2.0 and > XP
 
@StackedCrooked Then you've seen through my ruse!
Newer?
 
Raw mercury is more dangerous to inhale than touch, IIRC. Don't quote me on that, though.
 
@RMartinhoFernandes sure?
 
@John I don't care about clients older than XP, and we're not talking about .NET.
 
10:25 PM
Anyway, all of mentioned things are available since Win95, I think.
 
Where was .NET mentioned in here?
 
Nowhere.
 
Anyone care to explain the difference between declaring a pointer to an object and just declaring an object? Im not sure if i worded that right. E.G "ObjectName name;" vs "ObjectName* name;"
 
@CatPlusPlus "where'd you learn so much about mercury?" "A talking cat"
 
I've been reading the docs and yes; most of these features were available since 95
 
10:25 PM
@Timmy one is an object, and one is a pointer to an object.
 
> It is only bad if you don't get mercury poisoning. Cut your finger open, and dip it in the liquid metal, and see what eventually happens.
 
UPVOTE
 
@CatPlusPlus well I had heaps of problems getting pipes and sockets to do the trick but that might have just been in keeping my solution simple. I forget
 
@Timmy one is a lego, and one is a hand pointing at a lego.
 
@MooingDuck Both are objects!
sows confusion
 
10:26 PM
@RMartinhoFernandes don't do that
 
There's a mercury compound that's deadly to touch even in gloves.
 
I'm not retracing my tracks through all the documentation, just my twopennorth
 
mpz_class rearing errors again, no match for 'operator[]' in 'myArr[m]'
no long longs used anywhere
 
What im unclear of is why use a pointer to an object if just declaring the object works fine? Im guessing there are advantages but perhaps I just wont benefit from them at this stage
 
@AgainstASicilian that has nothing to do with mpz_class and everything to do with myArr not being an array or vector.
 
10:28 PM
I don't remember if that's mercury dioxide, or if there's something even more toxic.
 
@MooingDuck It is an array. I tested it by outputting intermediate values
 
@Timmy Usually, do you want to embed the object in the function, point to someone elses object, or be able to give the object away
@AgainstASicilian then you did not get the error. Those are the two options.
 
Fact: you can't get proper help without a SSCCE.
 
@MooingDuck Wellllllll, I did get the error. And the array does output its values. So your conclusion is not accurate.
 
10:28 PM
Again that "I wrote valid code but it doesn't compile" nonsense.
 
@AgainstASicilian prove it
 
@ScottW you know what. Screw this. :P
 
If it were valid, it would compile.
 
He's saying it doesn't compile because it's not an array. It is an array.
 
@Derek you were already flagged several times in the PHP room for that, don't do it here
@AgainstASicilian show us the code
 
10:29 PM
If it were an array, there would be operator[].
It's that simple.
 
sorry
 
The line is c = c - (k-n)*myArr[m];
 
I'm going to give Python a try.
 
where every variable here is an mpz_class
 
Which tells us nothing.
 
10:30 PM
Fact: a line of code is not a SSCCE.
 
@AgainstASicilian even myArr? THen it's not an array
 
Just cast m to an int. And learn some damn C++.
 
@MooingDuck It's an array of mpz_classes
 
10:30 PM
@ScottW I'm not going to work on it anymore.
 
@AgainstASicilian no it's not, or you'd show us the code
 
@MooingDuck m is an mpz_class.
 
@ScottW At least not in Ruby. :P
 
Needs to be cast to an int first.
 
10:31 PM
I'm trying Python now.
 
My bad then, m is not an mpz_class, my mistake
just the contents of the array
 
@RadekSlupik That bug tracker thing?
 
@CatPlusPlus Yeah.
 
Then tits SSCCE or GTFO.
 
Try Haskell.
 
10:32 PM
Oh, that SSCCE, for my sins I often decide that is too much effort if expecting a quick and simple answer, you know, renaming and anonomising
 
I'm serious on the GTFO thing.
 
@CatPlusPlus Might also be fun indeed.
 
@RMartinhoFernandes I have no idea what you are yapping at me about
 
That @Derek guy is really spamming hard.
 
@John The point is that you need to accurately describe the problem.
 
10:32 PM
I'll look if I can find a HTTP implementation in Haskell.
 
Pick a framework.
Yesod or Snap.
 
@RMartinhoFernandes yep, but sometimes the implementation/ platform details can still remain a mystery
 
Or that other one I linked you some time ago.
 
I think the problem is that because I am using sqrt's and floors all over the place, the data types aren't getting along too well
 
On lower level there's WAI (something like CGI, except for Haskell functions) and Warp (HTTP server).
Let's see if I can write a guide to properly asking questions.
This has been reiterated so many times, I want a link.
 
10:34 PM
@CatPlusPlus There's already lots
 
@AgainstASicilian And I'm sure you won't even try to look it up.
 
@MooingDuck NIH. :P
 
@EtiennedeMartel Am I that @Derek guy? Or just parannoid? I think I'll shut up and slip off
 
@John Last time I checked, "John" != "Derek".
 
@John No, the Derek guy is drawing huge ascii art in various chatrooms
 
10:35 PM
wait, template parameters have to be types. so is "Lounge<C++>" even a valid expression?
 
@John We don't care about your top-secreet code.
 
@endoalir can be
@endoalir template parameters do not have to be types
 
And nobody is going to read 1000 lines of code.
 
TIL
 
@EtiennedeMartel yeah, but I said night and thought I might have said @Derek, his i.stack.imgur.com/QkXNO.jpg pic was really funny
lol
 
10:36 PM
@endoalir template<unsigned int a> class b {int c; b() c(a) {} };
 
Did I mention chat search sucks?
 
What's the deal with Windows Registry? I got downvoted for suggesting it to a question the other day.
 
@RMartinhoFernandes many times
@John are you sure that was the reason?
 
Most people don't like Registry.
 
10:41 PM
@MooingDuck you forget a colon :P
 
@RMartinhoFernandes Go meta!
 
but thank you
 
@MooingDuck I'll just check
 
Gah I hate sqrt
 
It'd probably be simpler to just rewrite the thing I'm looking for instead of searching for it.
@CatPlusPlus You can do , btw.
 
10:42 PM
It's a pazzle.
 
@RMartinhoFernandes Of course it does. All search engines that are not called "Google" suck.
 
[meta:by-design]?
Nope.
 
@endoalir I don't see a missing colon...
 
Too lazy.
 
@RMartinhoFernandes Here is the self-contained, stripped example pastebin.com/A4M6utRS
 
10:43 PM
@MooingDuck "b() : c(a) {}"
 
@endoalir what about it? That's valid. no semicolon needed
 
@endoalir No semicolons after member definitions.
 
maybe I should be using something other than long ints?
 
sqrt will not work with mpz.
 
colon not semicolon. you wrote "b() c(a) {}" @MooingDuck
 
10:44 PM
Unless gmpxx overloads it.
 
@endoalir oh, so I did, good eye
 
Derp.
 
@MooingDuck no I am not sure, I probably withdrew it due to better solutions.
 
is there no way to use sqrts with GMP at all?
 
Yes. Read the docs.
 
10:45 PM
@AgainstASicilian use GMP's sqrt function that it clearly talks about in the docs
@AgainstASicilian and that we told you about in chat twice
 
Hi, I have a static library that compiles to .lib on windows and it exports two functions. Is there a way to autmatically let any dll that is linked against that library export them too?
 
I thought that was the native sqrt function? I'm not including cmath
 
@KarimA no
 
:(
 
@AgainstASicilian there is no native sqrt function
 
10:46 PM
I looked in the docs and they just used plain sqrt
@MooingDuck to GMP there is
 
gmpxx does overload sqrt()
 
@RMartinhoFernandes gmplib.org/manual/C_002b_002b-Interface-Integers.html the C++ interface does overload sqrt
@AgainstASicilian I take back my first few comments, and appologise for jumping on you
 
@CatPlusPlus Yes, that is what I was trying to say
 
We still don't know what the error is.
 
10:48 PM
hey guys, consecutive calls of realloc change the memory block pointed by the ptr, starting from the last memory block pointed to, or the original size of memory block allocated by malloc?
 
@AgainstASicilian what is the error message. "No funtion matches parameter types", or "ambiguous overload"?
 
struct __gmp_expr<__mpz_struct[1], __gmp_unary_expr<__gmp_expr<__mpz_struct[1], __gmp_binary_expr<mpz_class, double, __gmp_binary_divides> >, __gmp_sqrt_function> >' used where a `long int' was expected
 
@nEAnnam One of them.
 
which one ?
 
One of them.
It can be either.
 
10:49 PM
does it matter, as long as it's the right size @nEAnnam
 
@AgainstASicilian maybe you have to resolve the expression before casting to a long int?
 
I've been converted. Haskell is the best programming language in the world.
2
 
mpz_class t = sqrt(N/2.0);
long int K = (long int)t; //error
 
Use get_si().
It's in the docs.
 
10:51 PM
oh I tried that; same error
 
are you trying to incite a riot @Radek
 
I know it works because I just compiled it
 
@endoalir No?
I'm just telling the truth.
 
We haven't had a good riot in a while
 
dangerous waters
 
10:52 PM
@Pubby I'm a Java programmer and I love it!!
 
@RadekSlupik Told ya.
 
@RMartinhoFernandes Maybe I typed it incorrectly; how did you use it?
I tried calling get_si(content) to return the long int
 
Read the docs.
 
Randomly tossing things into your program doesn't work.
 
10:54 PM
It's not random
 
it worked for Microsoft
 
What the hell is this?
 
@AgainstASicilian I did a google search for "site: gmplib.org get_si", and the first hit reads: Function: long mpz_class::get_si (void)
 
Yes
That is what I tried using
 
10:55 PM
 
@AgainstASicilian so you're saying you don't know how to code in C++?
 
@RadekSlupik Why do you think Haskell is best
 
If I use it as a function, undefined. If I apply it to the variable, same error as before
 
@Pubby Because type inference, static typing, pure functional, real operator overloading, modules, epic lack of crap, and, most important, most Haskell programmers aren't idiots.
 
@AgainstASicilian basically long mpz_class::get_si (void) means that get_si is a member function of a mpz_class object, that takes no parameters, that returns a long.
 
10:56 PM
@MooingDuck I tried long int K = (sqrt(N/2.0)).get_si
Yes I know it's a member function
got it; had to use an intermediate variable... so silly
it should let me do it directly
 
@AgainstASicilian right, as the docs talk about, math expressions do not return mpz_class objects directly, so that they can do complex equations very very fast.
So you have to cast/assign the result to a mpz_class.
 
where does it say math expressions do not return directly?
 

« first day (603 days earlier)      last day (4360 days later) »