« first day (2405 days earlier)      last day (2769 days later) » 

15:00
you keep insisting on the "fixing" stuff, I'm not asking for fixing anything
then what do you want?
we solve problems on Stack Overflow
from somebody who knows the algorithm
so you're looking for a chat, or discussion?
#include <iostream>
int pow(int x, int y) { return x ^ y; }
int main() { std::cout << pow(2,5) << '\n'; }

// This program outputs 7, but I expected 32 because I thought 2 to the power of 5
// would be 32. Where is my mistake?
This is a Stack Overflow question.
It presents a short and self-contained demonstration of the problematic code, a clear explanation of expectations, and a question.
Granted, this is a slightly contrived example as it's been asked millions of times and would likely be downvoted for lack of research effort, but in the sense of how it's constructed this is what you want to strive for.
Not just a code dump of one big function and a vague notion of "it doesn't work; please chat to me about it".
(If you're interested, the problem is that ^ is XOR, not exponentiation.)
I probably also fucked up on some impl somewhere due to bad function naming, though it works on Coliru so shush
15:04
you really think that in such low level algorithm I've confused the xor with an exponentiation?
@BoundaryImposition post it on meta
@user8469759 No, he's giving you an example of what a question should look like. It's not your question.
@user8469759 You can: 1) ask an extremely vague question and hope that someone who happened to have worked on the same thing you're working on and ran into the same problem passes by and decides to help you. What are the chances?
anyways. just downvote & close it
Or you can: 2) ask a concise question that describes a problem in a way that lots of people can understand and hope that one of those many people passes by and decides to help you.
for example, I've already given up. therefore you lose the chance that I can help you. and I'm super-bright/knowledgable so that's not nothing
make it easy for others to help you!
15:10
if you close the question I don't know how to express better the problem I have, because I don't know what kind of readers would go through that question
then I guess you're out of luck
@user8469759 Because you don't know what kind of readers will go through it is exactly why you should not assume the reader knows the algorithm or whatever.
I'll quote the rest of the paragraph I quoted before from the asking help:
> Pretend you're talking to a busy colleague and have to sum up your entire question in one sentence: what details can you include that will help someone identify and solve your problem? Include any error messages, key APIs, or unusual circumstances that make your question different from similar questions already on the site.
to be honest if no-one knows at least the algorithm I'm talking about there's actually no chance I can be given any help
I'm out of luck
"There's something wrong with this code. What is it?" isn't a suitable question for Stack Overflow, because it doesn't state a problem.
@user8469759 That is blatantly false.
It's not unusual for SO users to research topics that are new to them to help others.
Ell
Ell
@user8469759 you're out of effort :V
15:15
But no one can help you if they can't even tell what problem to tackle.
how can you say I'm out of effort when nowhere I've seen such algorithm is implemented in software...
@user8469759 You need to make an effort in identifying and expressing your problem.
E.g. your title, "Emulating SRT division hardware (using carry save adders) in software" describes the task you are working on.
It should describe the problem you have encountered.
don't know whether the inability to comprehend abstraction is a genetic trait or a not-as-yet-learned behaviour
either way, it's a crucial component of any successful software developer
@user8469759 work through your algorithm on paper.
Pick numbers for the function arguments, write down the variable values, and execute each instruction in sequence.
When you find some variable ends up with a value that would not be expected, there's your problem.
Then you write a question that states which numbers you picked, which variables had wrong values after which statement, which values are wrong, and which values would be correct.
15:21
At the moment the question states none of that.
Earlier this morning I mentioned "debugging". The process I just described is debugging. It is firmly the asker's responsibility to do that, not the answerer's.
-5
Q: Instant messaging using Boost ASIO framework

RaghuI want to make simple Instant messenger app with c++. can any one please suggest me the easier way to do with boost asio.

@R.MartinhoFernandes but... people need help! Why do you have to be elitist? Can't you just help?
First steps of freedom!! 😄 https://www.instagram.com/p/BUMgk0_BPbs/ #ChelseaIsFree https://t.co/0R5pXqA1VN
why is Chelsea's photo in "male form"?
lol, that expression.
No idea.
and how come Chelsea has been tweeting if she's been in jail?
don't tell me prisoners can hang out on social media
15:28
Tweeting from prison reqs a lot of effort and using a voice phone to dictate #90sproblems
@BoundaryImposition Depends on the prisoners.
Losing "electronic communication privileges" is a thing.
surprised Chelsea had electronic communication privileges, given that she was ostensibly locked up for abusing her access to electronic communications
what's a "voice phone"?
@BoundaryImposition She used her call privileges to dictate tweets to family or friends, I surmise.
15:32
If you have email privileges via TRULINCS, you can request others to tweet for you.
meh fair enough I suppose
as long as they're not just sitting there on a Nexus 5 tapping through their apps
Weev got the hole for using TRULINCS to request tweets.
though it does seem like a curious side-effect of modern society that they effectively have their full power of voice in public, via proxy tweeting
due to the way we perceive social media writings to be "speech" I guess
wtf, my private email server blocks large images
(in a way that we wouldn't a letter)
@Telkitty it's learning
15:33
can't even send myself many large pictures in one email
it's so private that even you can't use it
just give it space
it's so private I need to hide it from myself
1MB each pic, that's not big
nwp
nwp
@Telkitty you just say that to make the pictures feel better
fine, the pictures are large structured, happy now?
@Telkitty it's not how large they're structured; it's how you use them
15:49
I use them to troll app reviewers
it's not trolling until you read what I have put in the address text boxes
can't imagine you trolling, kitty
thank you for having faith in me
you're probably welcome
@Xeo Shit.
Xeo
Xeo
16:00
@Mysticial . . .
I will get to it sometime after ACEN.
Fuck, I still need to order my AMW badge.
@Telkitty don't use email to send files....
@Mysticial check the ars article I just linked, nothing you didn't know, just official now
@Mysticial I'd say you're fierce tired of the question... but sure, what the heck... what you thinking so far about i9s?
@Xeo I'm going to blame it on the NBA playoffs, and some minor health issues that has been leaving me feeling like total shit every day for the past like 2 weeks. Too much stuff going on.
Xeo
Xeo
16:04
> sports
pff
@Mysticial you're allergic to sports?
16:18
@Luc > France culture, passage sur la "Cyberattaque qui a touché plus de 140 pays" (aka WannaCry)

"Les langages classiques sont anciens et vulnérables, disons qu'il est facile de faire des erreurs avec" "Tandis qu'avec de langages plus récents comme Rust, on n'aurait pas ce probème, avec une gestion de la mémoire plus intelligente"
really?
People are good at shooting themselves in the foot
it's only a matter of if the gun will blow your leg completely or just do some scratches
On that matter, Scheme is a pretty old language and makes it pretty hard to do anything bad
so it's not about how old the language is
I guess COBOL could certainly be looked at a classical language too... if you can hardly do anything with that though
Certainly Object Oriented Cobol is bringing havoc to the Cobol world
Cheese is love, cheese is life <3
@RudiantoPrasetya Haha, les rustacés étendent même leur propagande à la télé nationale :D
Attends je cherche le podcast xD
@Morwenn Sauerkraut FTW!
16:37
damn baguette-eaters
le fuck
Too many things, but I especially like that the lines are curved.
@wilx Nope D:
@RudiantoPrasetya Excellent :D
16:44
Hello! I just need some help regarding mechanism of call by reference in c++. would anyone answer? Thanks :)
I've got code to steal tonight.
morwenn would you?
@Morwenn A code heist!
@wilx Just stealing updates from an algorithm I stole a few months ago.
@nerd21 Would I?
would you help, morwenn?
16:48
Probably not. Once I'm done stealing code, I've got beer to drink.
when we pass parameters as reference, what actually are the variables in the functions? Are they pointers, or some other type storing addresses? or anything else?
oh alright!! thanks anyways
if anyone else could answer, please help!! thanks :)
@nerd21 They're just aliases to the objects passed in.
@R.MartinhoFernandes oh so do you mean that some other name given to same memory location and hence they are of same datatype as the passed parameters?
@nerd21 Something like that, yes. In almost all respects they are the objects passed in.
@R.MartinhoFernandes Thank you sir! It helped
When we declare variables of any "c++ structure" type, is that only the moment when memory is allocated for it? and when we just create a structure but do not declare any variable of its type so will it also allocate memory for it?
16:56
do you always keep all possible integers allocated in memory?
not initialized but only declared. say I have created a structure named Book. So is writing Book b1, b2; will allocate memory explicitly for b1 and b2?
and when my program just had a structure but not any variable of its type so does memory for that structure template will be allocated or not?
@nerd21 All objects have storage.
2
so merely declaring and not using them further in program will allocate them memory?
Question
What is a good unit testing framework for C?
@nerd21 The answer to that depends on many things. Why do you need to know that?
17:14
So today is Montreal's 375th anniversary.
Who is he
Kevin Barnes?
@VermillionAzure There is none.
Sigh.
@JerryCoffin WTF. HOW DO WE HAVE A DECADES OLD LANGUAGE
and no good unit testing framework
@VermillionAzure Honestly, I suppose there might be--it's been years since I looked at tooling to support writing C. At the same time...I'd be at least a little surprised if there were one.
17:23
Can't you just use a C++ unit test framework to test C code?
@Mikhail The codebase I'm writing with wants ANSI C.
So, no Google Test. I would use Catch or Google Test but not this time.
Thats fine, just extern them and call them from code built in C++
At the end of the day you have a function signature?
No.
I do not want to interact with C++ while building a pure C codebase
Build the unit tests in C++, and just call C functions...
@VermillionAzure For what it's worth:
582
Q: Unit Testing C Code

Paul OsborneI worked on an embedded system this summer written in straight C. It was an existing project that the company I work for had taken over. I have become quite accustomed to writing unit tests in Java using JUnit but was at a loss as to the best way to write unit tests for existing code (which nee...

17:40
@VermillionAzure Why not?
@Horttanainen It's like saying you want to use C++ in Java, at least with strict requirements
Like, it makes no sense if your goal is to remain just C.
nwp
nwp
@VermillionAzure happens a lot on android
@VermillionAzure But like @Mikhail said, why don't you keep the testing code and project code separate?
@VermillionAzure I think it is valuable to mix languages in a project.
@Horttanainen I've already had experience with that
IMO purity is better
@VermillionAzure Uh oh.
17:46
@Horttanainen what
Why are you even looking for a testing framework if you want purity? Just write the test macros and you are done. You are not mocking, are you?
18:00
From experience, C codes can do crazy stuff like divide by zero, so some kind of process level isolation is desirable. In MSVC you can debug across process boundaries, for example.
"C codes"? you suck
@Horttanainen I think you're a muppet
@Puppy Fair enough
TIL Zounderkite.
oh, derp
how should I do this hrm
wait wtf am I doing I can just generate an ID for each one haha
nl in Bash tyvm
 
1 hour later…
19:30
Another update from my fuck ads campaign:
I've cost them $20,000 USD. yeah... uh huh...
@Mysticial We should go into the advertising business--and have a botnet to click on our ads...
If this is true, Intel is fucked.
you haven't "cost" them anything
nwp
nwp
We should make an open source thing where you can donate some of your bandwidth (like when you're sleeping or at work) to automatically click on all the ads.
2
the most that could be claimed is that they would have made $20,000 extra if you'd not blocked those ads
not the same thing
nwp
nwp
19:34
Clicking ads makes money! Let's improve the economy!
@BoundaryImposition Tell that to the advertising companies. They claim ad blockers "cost" them billions a year.
@Mysticial I know they do; they are wrong
related: I've noticed a lot of news sites blocking blockers now
personally I don't mind ads too much, if they were just linkified images rather than this trackable JavaScript Flash HTML5 video whatever bullshit we get now that delays loading of the page forever
stop autoloading videos at me and we'll talk
I do want to support the sites I'm not paying to run, after all
nwp
nwp
I listened to hello internet about how adblocking is basically stealing. In a follow-up someone asked if going to the bathroom during a tv commercial is also stealing and they didn't come up with a consistent logic for that.
@nwp It's basically much of the same bullshit that comes from the whole piracy debate.
yeah
I tend not to take the typical dumb sides on that one, and stick with my decision that the traditional terms/categorisations just don't work here
19:43
@nwp If you have a Kinect or something, Microsoft will detect whether you are in front of the screen or not. So they will charge you extra if you have 5 people watching a movie instead of 4. And they will allow ad companies to sue you for going to the bathroom during an ad because that's "stealing" from the ad company.
no, piracy isn't theft. but it's not okay either. (it's also not "copyright violation" fml)
nwp
nwp
Maybe if there was a system that would only show you every ad once it would shift a bit from annoying to useful information, but companies would just increment a version number and claim it is totally a new ad and the amount of tracking required to pull that off is problematic.
/me runs away
@nwp lol nice and yeah
besides, showing you an ad more than once has value
(to them)
also I only bought my current car after seeing one just like it driving around town like seven times
probably wouldn't have been more than passingly interested after the first time
so it does work (obvs)
nwp
nwp
I try to consciously boycott advertised products. It doesn't always work (almost all companies that sell yogurt, pudding and soup/sauce powder have super annoying advertisement) and I get less exposed to ads due to not watching tv anymore. Still, sometimes super-markets helpfully put a sign on products saying "from our advertisement" so I know what to avoid.
The ultimate goal is that in some company meeting they discuss making annoying ads and someone brings up statistics that sales go down after doing that and the company cannot afford that.
lol
good luck
19:50
@Mysticial How can you call it bullshit? Don't you realize that the record companies would be the single largest economy on planet earth if it weren't for piracy?
nwp
nwp
But as long as people see ads, love them and buy the product afterwards that will never happen.
Which kind of gives ads democratic legitimation.
@nwp Simple fact is, even if they don't mention it there, pretty much every product in every supermaket is advertised to some extent, somewhere. Unless you start to grow all your own food, your only real choices are to eat something that's advertised, or starve.
right
well, the content producers have got to pay for it all somehow
@JerryCoffin That's a pretty big claim there. Got a source for that?
@Mysticial Pretty sure he was being intentionally sarcastic.
19:55
oh... fuck me
2
the calculated figures for music industry damages due to piracy are so clearly ridiculously over-the-top that it's plain that people don't cost them $9 or whatever per album
nwp
nwp
The other thing I would like to avoid but cannot would be point reward systems. I don't participate and therefore don't benefit, yet I pay for it. Unfortunately there is no super-market nearby that doesn't have that.
@Puppy Even if you take their "losses" for full value, it still wouldn't be as big as say utilities or medical. (I don't have a source for that, but it's just my gut feeling.)
@nwp you mean in terms of the levy on product costs that presumably goes towards operating the shop's rewards system?
19:57
@Mysticial the could simply restart the ad when you come back
sueing cost money / time
@nwp the obvious solution to that is to start participating. I have £120 waiting for me on my Nectar card, which isn't nothing
did I spend more than that on "contributions" to the system over the years? probably not
@LoïcFaure-Lacroix True. On the flipside, the point of suing a consumer isn't exactly to extort money from them (since they won't have much anyway). But to set an example.
nwp
nwp
@BoundaryImposition I will not. I will instead start charging the shop for every time they waste my time asking for those stupid cards.
@Mysticial setting an example is just the bully way of doing business it's ridiculous
@nwp let us know how that goes
20:00
man I hate migrating custom made things into a database
I'm already 5% trying to import a something and I didn't find an actual match for a product that should have been imported already
nwp
nwp
@BoundaryImposition That levy by the way is the reason I hate ads so much. They make me pay to get to annoy me and buy things I normally wouldn't have. I don't see how that could ever be in my interest.
@nwp without it you wouldn't be able to consume the thing you're consuming when the ad comes up
if the thing is not of interest to you then you don't have to consume it
nwp
nwp
@BoundaryImposition Why not? I'm perfectly capable of buying things I never saw an ad for.
I should look up delivery services for groceries. One truck going around delivering stuff is so much more efficient than having every single resident go to a store.
5
@Puppy How could you possibly think such a thing of me? I'm always serious!
@Mysticial I'm sure it's greater than that. It's also enough that according to them, every single person on planet earth has pirated so much music they'd have to live to be 200 years old just to listen to each song once.
@JerryCoffin And that everyone has a million dollars because that's how much they pirate.
20:15
@Mysticial A million? I'm quite certain if they weren't pirating it instead, the average person would be spending at least $127 million per year on music.
@Puppy $9 per album? If only they were so reasonable. In one case (Sony, et al vs. Tenenbaum) the number they used was $22,500 per song!
@JerryCoffin Yeah, at some point, the concept of zero-sum kicks in. People don't have a infinite amount of money for the record companies to extort as much as they want to believe they do.
@Mysticial Not to mention the minor detail that they simply aren't producing much in the way of really compelling music any more. At one time, "one hit wonder" was a disparaging title. Now it's pretty much the norm, and artists who manage to produce even a couple of albums that do well at all are the exception.
It's sort of like, ok. Here's the stock price history for today. If I had made X trades exactly here, here, and here, I would've made Y dollars. The problem is that even if you give the person a time machine to actually make those trades, it wouldn't work because short-term trading is zero-sum. And if you're big enough to move the market, the other players will notice something is up and respond to it.
@Mysticial Yup--same sort of problem you get with trying to figure up Bill Gates' net worth (to give only one example). Yes, if you multiply the current price per stock by the number of stocks he owns, you get an astronomical number. But then let's try to think what would happen if the news came out that Bill Gates was selling of, say, $10 billion worth of shares in Microsoft.
@JerryCoffin That's actually a realistic question that can happen today. And I spoke with my dad about it some time ago.
Consider this situation. Unlikely, very unfortunate, but totally within the realm of possibility.
Mark Zuckerberg and his wife die in a plane crash. Their kid inherits the family fortune.
And he needs to pay estate tax.
All the money is locked up in Facebook equity. How the fuck is he gonna pay that tax?
Sell off 30% of Facebook?
And send the market crashing.
20:30
Typically another company actually owns them, so transferring ownership can be tax free if you don't mess it up.
man
Coding in C is tiresome
@Mysticial In a situation like that (a clear reason that he has to sell it off, that has nothing to do with the company doing poorly) it probably wouldn't crash much of anything--lots of institutional investors and such would grab that stock without a second thought. It'd still go down, but mostly because people were worried about what happens to the company without Mark running it, not because of the stock sale to pay the tax.
So, guys, are you using X.org and the default input method? I am trying to understand what is lv3 and lv5 option.
How to make it useful.
20:36
@JerryCoffin there is still supply & demand, and it would be a bump in supply
@LoïcFaure-Lacroix Some thing in this respect.
@VermillionAzure Definitely helps if you get ergonomic functions and libraries up and running before you start your project. Small languages like that aren't so fun to code until you have a helper library.
@Aaron3468 absolutely.
That's basically all I'm doing right now
I hate it
Seriously I had to reimplement vector? Sigh.
@Aaron3468 So technically you're telling me the fun is in not writing code?
@LoïcFaure-Lacroix Yes. Writing code is not fun.
20:39
@VermillionAzure I'd give you my db migration and write code instead
@LoïcFaure-Lacroix ???
Writing code is less fun than breathing a massive sigh of relief after the coding is finished and it does something
@VermillionAzure I'd rather write code than do what I do right now... wait until the migration crash and fix the migration code
@VermillionAzure Also nice to have a slightly higher level of string abstraction
@Aaron3468 Seriously. I know.
I feel like C is very simple though. It is very nice not having template errors right now
20:41
Yeah, totally a great feeling. What are you using it for?
I don't know what'S the fuss about template error, it's much easier to read than linking errors in visual studio 2007
@JohanLarsson Probably not much of one. They'd have a while to pay the tax, before any penalties kicked in, and they'd know the rate at which the IRS (or whomever) accrues penalties, so there's a good chance they'd plan on paying some of the tax somewhat late, because the IRS penalty worked out to less than they'd lose on the stock by selling it faster. It's also entirely possible that they would arrange to do the sale privately, outside the normal market channels.
@LoïcFaure-Lacroix Also easier to find than macro substitution errors when library authors don't #undef after they abuse macros.
@JerryCoffin Supposedly in cases like this, you'd cut a deal with the feds and IRS to not have to liquidate half your assets all at once. Because they know too that if you did that, you'd fuck things up for a lot of other people.
@VermillionAzure This is part of why experience counts for so much with C--to be productive at all you need to either have written, or at least be aware of, lots of libraries to help handle niggling details.
nwp
nwp
20:44
@JerryCoffin I heard bill gates has been selling reasonably small amounts of microsoft shares for years.
IOW, case-by-case basis. CEOs and founders don't die in plane crashes everyday. Though I shouldn't be saying that since one just happened a couple days ago.
@StackedCrooked Actually, it does make me want to click on them. They look like those cryptic links (you're secretly with the Illuminati!)
@nwp He used to, certainly. Now that MS has pays dividends, I doubt he does so much.
@VermillionAzure Nobody should need to
@VermillionAzure Go for Lisp
@Mysticial Yup--the phrase "too big to fail" comes to mind. There's also the fact that if he dumped even 10% all at once, the value of the company would go down enough that he'd actually owe the IRS a lot less (because the company is now worht so much less), so they're not just concerned with other people's lives but with the amount they can actually collect.
20:46
@sehe I am
I already wrote one
@JerryCoffin Ahem
Lisp is a bit of a pleasure to use once you understand enough to use it. I'm still working on understanding all the type golf used in its daughter languages though. Haskell especially.
Is there a Boost for C? Because I want a Boost for C
Can it be called Coost
@JerryCoffin I'm not so sure.
@Aaron3468 You should probably look at ML and Hindley-Milner
Must have happened in the past, maybe there is data
20:48
The progression kind of goes Lisp --> ML --> Haskell, etc.
@VermillionAzure It's called Moot
@sehe polar bear y u lie
That's also moot
@VermillionAzure A moot point, at best.
Damn, beaten to it!
C programmers know what they're doing. They don't need no friggin' libraries.
Because they know what they're doing, things must be NIE (Not Invented Elsewhere)
20:50
@sehe Is there a way for a C programmer on Stack Overflow to refuse a badge on the grounds that "...badges? We don't need no steenking badges!"
nwp
nwp
that guy's screen is so dirty
@nwp Lot like my mind.
@JerryCoffin Yes, send them here
> I'm new to C++, came from Java (started learning yesterday).
Not going to end well
Not going to end at all, actually. That's his complaint.
20:53
@JerryCoffin Or if the IRS wanted to be a real dick, they make you pay the estate tax calculated from the nominal value (stock price * quantity). And you need to come up with that money by any means necessary. But because the stock crashes while trying to sell it off, you end up not having enough even after liquidating 100% of the stock.
So you're left with billions in debt. No assets, and jail.
@Mysticial I don't think they can do that. What you inherited was a company, not cash.
How long does a typical c++ thing take to compile? Say 100k lines or so.
@JerryCoffin can't you refuse to inherit?
@Mysticial Not quite, because big companies are hard to attribute sole ownership to any specific person unless they are using the company as a personal chequing account. The company is liable for covering tax, not the person.
@JohanLarsson it's really hard to say... like a few ms or a couple of hours, depends on the complexity
20:57
@LoïcFaure-Lacroix Honestly, I really don't know.
@JerryCoffin as far as I know, In Canada we are supposed to be able to refuse inheritance. Because if you inherit only debts it's not worth it. Unless you want your hands on some stuff
@Aaron3468 I'm making up a contrived example that might happen if you had a dictator in office who steals money from the federal coffers.
@JohanLarsson For code that doesn't use recursive templates (or anything on that order), you can typically plan on at least a few thousand lines a minute (and often more).
ok, thanks, was curious
@JohanLarsson Oh soz. yesterday you asked. On my dev workstation, typically <20s for recompiles, <1 minute for full build (due to compiler cache). On CI server, ~10 minutes or ~20 with full thirdparty dependencies. The code base is... roughly that size but I could be off an order of magnitude (down)
20:59
@Mysticial Ah, carry on.
Sounds like it may draw some inspiration from current events
@JerryCoffin Qualified donations are tax-deductible. That might be a loophole to get you out of going broke.

« first day (2405 days earlier)      last day (2769 days later) »