« first day (1118 days earlier)      last day (3833 days later) » 

12:00 AM
@HaniGoc Yes, for better or for worse haha
I like the language though :]
 
@HaniGoc Welcome to the Lounge. If you haven't already, you might want to glance through the newbie hints (top of the list of the links to the right). The main thing to keep in mind is that the emphasis here is on chatting. We sometimes discuss questions that are on SO, but it's a lot more discussion of questions and answers, not much actual asking/answering here.
 
ahh yes sure @JerryCoffin i'll read the hints
 
One other detail: don't be surprised when you find that even though the lounge is ostensibly devoted to C++, much of the discussion isn't about C++ at all, and many of the regulars here only use C++ somewhat grudgingly, and don't exactly like it at all.
 
i'll try not to open my pie hole a lot lollolol
 
C++ is really underappreciated :D
 
12:06 AM
@namezero it is? well it is scary, where I work, most of my friends, try to use python or even matlab instead of C++, they keep it for the end. and they always claim that they are just providing a prototype lol
 
I see the lounge is in a good mood, lol
 
hello @User17
 
Ell
I love c++
 
Oo wait, bad tempered ones aren't around ...
 
Ell
I think raii is the bomb
 
12:06 AM
hulo
 
Ell
and templates are sweet as candy
 
loooool
 
@Ell Yes, I do too. Lots of idiosyncrasies but I always come back to her :D
ehlo 17
lol @17
 
Ell
I don't know what it is about it. I just cant get enough of it
 
love yes
 
Ell
12:10 AM
It's an opportunity to learn a lot
and be practical too
I wish had this enthusiasm with Haskell, but I find it quite repellant
 
I've used C# too, but what annoyed me most was the lack of const and lack of iterators
Yeah I always preferred the C-style langs. PHP too
 
Ell
Nah not PHP
PHPs type system is ugly and OOP is bolted on
 
I prefer that over ASP.net, Java applet, or flash any day
:]
 
I read that Haskell is made by a genious and only only for a genious lol
 
Ell
Yeah
 
12:12 AM
@HaniGoc Just to be clear: chatting is definitely encouraged. Just keep in mind that this is for chatting and discussion. It's an adjunct to the main SO site, not anything like a replacement.
 
It's a script language, it's not supposed to support everytihng
 
@JerryCoffin Sir yes Sir
 
@Ell But yeah, the OOP is a little clumsy in PHP
 
better start digging in c++, i have to be able to catch up with you lol
 
@namezero Eh.
 
12:15 AM
@HaniGoc Ewww...now what did I do to deserve that sort of nastiness?
 
oups is it ma'am?
lol
 
@namezero s/the OOP/everything/
 
you have a nice blog @JerryCoffin
 
@JerryCoffin Mostly the nasty $ in front of vars...
Always throws me off
 
12:19 AM
@HaniGoc No, but I'm Ex (emphasis on the Ex) military, and have no enthusiasm for things that sound too military.
 
@JerryCoffin what exactly is TopCoders website?
TopCoder*
 
@HaniGoc No worries on catching up
Sometimes people talk on here in a way that makes me feel like I should quit my job and start working for waste management lol
What's this image thing you're working on
 
Actually @namezero That's what i felt lol
 
@HaniGoc A web site with various challenges, where you write code to solve the problem they pose.
 
@namezero I am working on Handwritten document recognition. I worked with Paleographers from Paris. They have a large database of manuscripts dating from the 15th --> 18th century. They wanted to classify these documents by era and by writer
 
12:25 AM
@HaniGoc For what it's worth, you can use the up-arrow key to retrieve and edit something you'e posted (for a few minutes after you post).
 
@HaniGoc Sounds like an interesting project
What's your team size/
 
ahh yes i wanted to edit it lol ohh okthank @JerryCoffin
We are just 5.
 
@HaniGoc Surely.
 
@namezero I don't really like the team. IT's not working well. we don't have a senior researcher
and no Mathematician,
I'll give you the link of my publications let me post it
as for the code, we don't have a plateforme. we can't put all the chunks of code together
 
@HaniGoc Definitely a big project
And yes, we all want more/better/specalized team members haha
 
12:30 AM
@namezero yes of course!! We don't really work together.
In the USA phd students work in a group and they produce more articles
@namezero last year i had an interview with google and they butchred me lololol
Anyway. Thank you all for this welcome. and Hope to see you soon, i'll come back tomorrow if its ok.

thank you :)))
 
@HaniGoc See you around soon :)
And good luck on the recognition
 
thank you!
 
@HaniGoc Later.
 
12:57 AM
night everyone :}
 
Fuck me and my dirty mind that always goes design-pattern-fishing.
I can even overcomplicate Snake. That's embarrassing. I'm done. Cyall tomorrow. Good night Lounge.
 
1:22 AM
hi
 
@Rapptz hihi
 
it looks dead here
 
Hi guys… I need some upvotes here, for credibility:
0
A: MInimal time to compute the minimal value

PotatoswatterThose are really big integers, too big to fit into CPU cache, so multithreading doesn't really help you — this problem is I/O bound. (I suppose it depends on the specifics of the I/O bottleneck, but let's not pick nits.) Since you need exactly N-1 comparisons, the answer is 31.

It's the correct answer but I fear he might not believe me :(
@Rapptz What? Never! When did this happen?
 
Xeo
1:38 AM
@Potatoswatter uh what
 
@Xeo what what, in the butt?
 
Xeo
How the heck did you even get from "32 integers" to "I/O bound"?
 
@ScottW Everyone quit even pretending to work/ask the chatroom work-related questions and focused on rocketship simulation instead?
 
Xeo
that's 32x4 byte on x86, and 32x8 byte on x64
 
@Xeo Each <thing> takes a minute to process.
 
1:40 AM
@Xeo Reading 32 integers from a dead hard drive would probably be I/O bound.
 
@Xeo Nah, if the integers were that size, the comparison would take a fraction of a nanosecond.
 
Xeo
@Potatoswatter Yeah... so? Why should that be I/O bound?
That just means the computation takes a minute
 
@Xeo What is involved in integer comparison? Assuming the integers are represented "as integers" and the comparison is in fact what's taking time. Which the question does pretty much state.
 
Xeo
You're reading way too much into that question
 
@Xeo I spent as much time thinking as it took to read the damn thing. Upvote or GTFO :)
@ScottW Clearly that was the intent of whatever halfwit wrote the question.
 
1:46 AM
0
Q: What does the -03 compiler/linker directive do?

fotinskyIn a makefile "-03" is used both for the compiling and the linking command. Removing this directive does not change anything. Does somebody know what this directive does?

^^ um...
 
lol
 
2:09 AM
Success!
@Potatoswatter It guess the question was intended to test my knowledge on hardware. I didn't think about what you said at all. :( — Cong Hui 7 mins ago
 
2:23 AM
First episode of Outbreak Company is promising.
 
2:43 AM
Comic sans is the Ugg boots of fonts.
 
0
Q: Optimizing my Quadratic Sieve, with advice on style?

robjbI'm still new to Haskell, and I'd like others' opinions on optimizing my basic quadratic sieve, in addition to feedback on the code's clarity and functional style. The qs function currently runs out of memory on larger values of N (somewhere above 20 digits.) My guess is that the code is too laz...

 
@robjb I don't recall seeing you here.
 
Hmm? I haven't visited C++ all that recently, but I recall several Haskellers like to hang out here
How's it going? :)
 
@robjb plz dont question dump
 
2:58 AM
@robjb Usage of functions like last raises some flags.
 
@LucDanton Good point, I will be more concious about that ... but those particular lists should never contain more than 2 elements
 
Oh that may not be so bad then (at least for memory).
 
Yea -- if they do, it's a logical or mathematical mistake
Thanks for looking it over :)
 
Do you have an idea which part of the code are 'hot' or not? I can suggest minute improvements but without knowing which bit is important or not they're shot in the dark.
 
Yea, give me 2-3 minutes
I'll pastebin some profiling output
 
3:13 AM
Is the length of the result of sieveInterval short-ish as well?
 
No, but only length factorBase + 32 candidates are produced from the sieving interval, so the entire list shouldn't be evaluated
 
surely no one really believes the global warming thing ...
 
Hm?
 
Blah, formatting got all messed up
 
otherwise very few people would be interested in the beach properties
 
3:19 AM
Well.
 
but most expensive properties are near the ocean not very high above the sea level
 
For those who do believe it will happen.
They also think we can change action and stop it, do they not?
 
expensive = high in demand
 
Not sure what your point is.
 
means a lot ... if not most people don't think the sea level would change much
 
3:21 AM
Well.
 
implies no global warming or very little of it
 
Think of how many people there are.
Then think of how many beach properties there are.
I don't think people really consider this.
 
@LucDanton Here's a better formatted dump of the profiling > dumptext.com/4mVPEQL9/raw
 
Do you consider it?
 
@User17 Wait, you think belief by many people, evidenced by economic side effects, makes something true?
 
3:23 AM
This suggests taking a close look at hasFactorAt.
 
you are either implying people are stupid or they don't really think global warming is a threat
 
So ergo, beanie babies are the most fun toy?
 
I don't recall mentioning stupidity.
 
Maybe people want to live on the beach because it's pretty there right now regardless of the future.
 
beach properties in major cities close to the CBD usually fetch as good of a price as penhouses
 
3:25 AM
I don't know what your problem with this is.
Why do people live along fault lines?
 
@Potatoswatter then no one would save for the retirement
but most people do
 
@User17 Most people don't live on the beach. Demand for beachfront properties is driven by only a few wealthy people.
 
@StackedCrooked That show is 100% loli fanservice. :)
 
Your thought process is muddled and you don't seem to notice having taken logical shortcuts.
 
@Potatoswatter no, it is because they can afford it
 
3:26 AM
@User17 What do we call someone who can afford expensive things?
 
I am tempted to insert a lightbulb picture.
 
@Potatoswatter your point is?
 
@Mysticial Hey there's a deep message about equality and stuff too!
For the rest I'm not complaining :)
 
@User17 I would ask the same of you
 
@StackedCrooked Yes. I'm watching it for the plot. :D
 
3:28 AM
:D
 
@robjb Can we try something like sharedIsModCongruent start = isModCongruent index start prime in hasFactorAt, to start working on isModCongruent?
 
@User17 You seemed to be denying that "Most people don't live on the beach. Demand for beachfront properties is driven by only a few wealthy people."
 
@Pawnguy7 because there is uncertainty, it is like buying a beach property because global warming might not happen
 
They buy it because they are uncertain?
I would buy something because I was certain...
There is nothing good about being uncertain.
 
I am sure no one would buy a property on a fault line when they know something terrible is going to happen for sure, not for a hefty price anyways
 
3:29 AM
Fair enough. So they consider it.
 
@LucDanton Certainly, I'll give it a shot
 
So the answer must be, people don't know, or don't care.
 
@Potatoswatter like you said, because only rich people could afford it, you also said it is not that the rest people don't want them, because they can not afford them - which is my point??
 
@User17 Do you think Californians think the earthquakes are over? Moreover, why do you think truth is determined by popular belief? The universe ain't a democracy.
 
I said it is because uncertainty ... you are not familiar with the concept??
 
3:32 AM
How about this.
You state what you are trying to get across.
 
@User17 I said demand is driven by a few people who might not need to treat the property as an investment.
@User17 Belief already implies certainty. What anyone thinks, who thinks it, and how strongly, is irrelevant to reality.
Argument from authority (Argumentum ab auctoritate), also authoritative argument, appeal to authority, and false authority, is an inductive reasoning argument that often takes the form of a statistical syllogism. Although certain classes of argument from authority can constitute strong inductive arguments, the appeal to authority is often applied fallaciously. Fallacious examples of using the appeal include: *cases where the authority is not a subject-matter expert *cases where there is no consensus among experts in the subject matter * any appeal to authority used in the context of deduc...
 
If we are considering uncertainty.
What is the probability that water will rise high enough to make it unusable?
How often does that happen?
 
@Potatoswatter your argument would imply there would be as many people who have beach properties as those who own helicopters because they are around the same price and they are both expenses
 
@robjb let start2 = last startIndices needs work, doesn't it? The result of primeStartIndices can be quite long?
 
@User17 When did I say anything about a specific demand curve? You're just inventing bizarre conclusions.
 
3:37 AM
Sort of.
Rich people might rent private jets, for example.
But...
Renting is continually costing you.
Whereas a purchase only has the initial cost.
Thus the latter are preferable, if you can afford it.
 
@Potatoswatter but you think people don't consider beach properties as investment, but dispensable assets
which I disagree
 
@User17 You're missing the point. IT DOESN'T MATTER WHAT PEOPLE THINK.
Many people are wrong.
 
...
well, why do you always tend to prove my point after a long argument?
that's my point when I first raised the question
 
The only thing you have proven is that you are good at confusing things.
 
thank you
 
3:41 AM
I feel like you are defending something, but I don't see an attack, and still don't really understand what you are trying to say.
 
22 mins ago, by User17
surely no one really believes the global warming thing ...
22 mins ago, by User17
otherwise very few people would be interested in the beach properties
 
Theoretically global warming isn't like earthquakes though.
Environmentalists don't go around saying we are doomed. Well, most.
Instead, they try to change behavior, so it does not happen.
But you cannot stop an earthquake.
 
1. Very few people are in the market because supply is low. 2. Many people across the socioeconomic spectrum don't believe in global warming, and they're wrong. (A greater number of people do seem to believe in it.) 3. What they believe has no bearing on anything except the democratic process.
 
@LucDanton Nope it shouldn't be, there should only be 1-2 modular roots and 1-2 start indices for each prime in the factor base. And unfortunately, creating a sharedModCongruent appears to have decreased performance (it took 25 seconds longer)
 
@Pawnguy7 It may be possible to prevent earthquakes by relieving tectonic stress with nuclear bombs…
 
3:45 AM
@robjb primeStartIndices maps and zips over 'each prime' in the factor base, ergo the result should be as long as factorBase.
How you have a do-block in primeStartIndices though?
 
@Potatoswatter I wouldn't know. I am skeptical anybody will do that anytime soon, though. I have seen people trigger avalanches though.
 
Ah, you have a lot of those.
 
Yea, that's one of those style issues I'm not sure is a good thing, but I wasn't 100% sure how else to approach it.
 
In any case, because hasFactorAt uses last startIndices that means it'll hold a lot of things in memory.
How easy or hard would it be to compute it once without touching the rest of the result of primeStartIndices?
 
Let me explain my logic so I can figure out where I'm going wrong
primeStartIndices maps sqrtModPList over the factor base, producing list of lists as long as the factor base. Each sub-list should have at max 2 elements. It then zips the original factor base with the sub-lists, and maps primeIndices over the tuples. primeIndices should be called the number of times in factor base, so last should operate on a 2-element sub-list length factorBase times
Assuming that's correct, I'm thinking it might be worth trying to memoize the calls to isModCongruent within isFactorAt
 
3:54 AM
@robjb Oh yeah. I keep tripping over those sublists.
 
No problem, it kinda messes with my head too. Again, I just wasn't quite sure of a better way :)
 
Do you happen to have experience in some lisp?
 
Just a very little. I wrote a simple lisp interpreter for my programming languages course a few years back.
It really only supported cons, cdr, and a few other building blocks
 
Those head/tail uses look like car/caddr.
I don't think it's relevant right now but I think Maybe (Integer, Integer) would have been a more natural encoding. Or we could have skipped over empty entries via e.g. concatMap -- you don't care about those right? hasFactorAt seems to filter those out later on.
Well, sieveIndex.
 
Very good point. At one time I was processing prime=2, and that's the one case where the sub-list contains a single element (rather than a tuple)
 
4:01 AM
Oh, that's annoying.
 
Yea, but I'm pretty sure I skip it now, so I can refactor to (Integer, Integer) :)
Even if I don't already it's an easy enough change
I've gotta run, but I'll be back tomorrow
@Borgleader sorry for the question dump, it won't happen again
 
4:29 AM
 
4:46 AM
Found OTL on an answer 4 years ago. Found that the project's still being updated and supports VS2013. It's a great feeling how its developer's so devoted to it.
And it's not afraid to use variadic templates. Gotta try it.
Fuck, it's just a header file!
 
 
1 hour later…
5:56 AM
4
Q: Working with CPU cycles in Gameboy Advance

Preston SextonI am working on an GBA emulator and stuck at implementing CPU cycles. I just know the basic knowledge about it, each instruction of ARM and THUMB mode as each different set of cycles for each instructions. Currently I am simply saying every ARM instructions cost 4 cycles and THUMB instructions c...

 
6:25 AM
hello
 
6:44 AM
morning
 
7:00 AM
morning
 
user1804599
7:17 AM
Hello.
 
user1804599
as per requirment i can't use boost library. — user2963469 42 mins ago
 
user1804599
> Oh hey I have to travel by bike but I can’t use wheels.
 
It's a sad reality at many companies.
 
user1804599
@StackedCrooked Write a script that allows one to generate Boost with a custom namespace instead of boost.
 
user1804599
It’s not Boost anymore! It’s our own! Yay!
 
user1804599
7:28 AM
(Also get out of there ASAP if you’re not allowed to use necessary dependencies.)
 
@MarkGarcia That's quite nifty. And indeed, uncommon. You can tell they're 99% certainly dogfooding
 
@User17 what's with all cats??? o_O
 
> Q. Will you stick with email delivery of your code, or do you intend to put it on your website later ?
@sehe ^ Most certainly dogfood.
"Get my library through e-mail!" Man, who's hearing that stuff now.
 
@BЈовић better than all caps ;)
 
awareness is the first step to improvement.
acceptance is the first step to healing :)
 
7:39 AM
may sound crazy, but is there a way to get time without system calls?
 
C++11 introduces <chrono>, which allows you to do e.g. std::system_clock::now().
Otherwise, there's a Boost library for C++03.
 
@LucDanton isn't that going to execute a system call?
 
@BЈовић ermmmm... what else
 
@BЈовић Oh, I thought you meant 'without me making a system-specific API call'.
 
@sehe rdtsc instruction?
 
7:42 AM
That's not time :v
Or at least, the time.
 
@LucDanton well, I just need to get some kind of time, that is precise enough
 
@MarkGarcia microseconds is enough
 
@BЈовић I think GCC's high_resolution_clock will more than suffice (I think it's on the nano level).
 
@DeadMG Oh hey I just noticed. Thanks for creating the room! /cc @CatPlusPlus @thecoshman
 
7:47 AM
@MarkGarcia but how to make sure it doesn't use system calls?
 
@BЈовић I don't know why you're so icky on system calls, but I'd sure trust it for benchmark or game timings. There's no guarantee, much less in the standard, that it doesn't use system calls.
The fuck that's big!
And fast (215+ KPH)
 
@BЈовић Its certainly possible to query the performance registers, although translating this to actual time is almost impossible as CPU speeds vary... But if you define time as instructions past, which is not unreasonable for some high frequency trading, this will work. en.wikipedia.org/wiki/Time_Stamp_Counter
 
@MarkGarcia xinomai kicks treads if they use system calls
 
@sehe lol, you were right here when he linked to it :P
 

« first day (1118 days earlier)      last day (3833 days later) »