« first day (2561 days earlier)      last day (2386 days later) » 

12:29 AM
@CaptainGiraffe didn't know giraffe is a woman :x
 
^ Is std::stringstream really that slow? Even concatenating multiple strings created by std::to_string beats it...
 
why
just why
 
@Mysticial What happened?
 
@StackedCrooked That picture. lol Coding on Google docs.
 
Ah. Didn't even notice that one. They should at least use a fixed width font in such cases.
 
12:41 AM
google docs on the cloud, don't need to bring extra USB, just connect over the net
 
I'm half way through Ousama Game ep3. This show just gets more and more fucked up.
I'll keep watching it. lol
 
It's on my "maybe" list.
Because it has such a weird premise.
 
It's just really fucked up. I have no idea what the fuck the author was on when he/she scripted this. But that person had to have serious psychological issues.
 
last overseas trip didn't chew too much into my savings account, I thought I had less $
 
I'm rewatching Kill La Kill in order to fill the inter-seasonal void.
 
12:46 AM
anyone here runs ubuntu server, I would like to hear from you ...
 
Coliru runs on Ubuntu.
 
what's your memory usage when server is idling?
why does my server chew up nearly 1GB memory after running for a few days, it doesn't do much most of the times
 
142MB after 17h of uptime. I reboot every 25 hours though. (25, not 24, in order to spread the annoyance to over different time zones.)
But yeah. At least my ruby "Sinatra"-based webserver seems to consume more memory as time goes on.
 
632MB currently, after running for maybe 2 days
 
But Ubuntu is not the cause of the problem.
 
12:53 AM
but it's more suitable to compare with another server running ubuntu
 
It's caused by either the application or the underlying web framework tool.
 
This was a roller-coaster. Neil settled it within a minute or so but ... stackoverflow.com/questions/46840518/…
 
@CaptainGiraffe For some reason discussions about UB tend to be emotional.
It doesn't need to be though. Beginners often counter the UB argument with "But it works!". All you need to counter that is to explain how UB helps compilers to optimize code and provide some examples of how seemingly innocent UB can cause spectacular bugs.
For example the one where Chandler explained how passing a nullptr (and size zero) to memcpy caused the compiler to delete all null checks after the call to memcpy.
 
@StackedCrooked Probably. Keep in mind that a stringstream uses a locale to handle almost all the formatting, so nearly everything goes through at least one extra level of indirection.
 
@JerryCoffin That's really crappy.
 
1:02 AM
@StackedCrooked If your main interest is speed, yes. Much of the time, getting decent formatting (fairly easily) matters more than speed.
 
What do you mean with decent formatting? I only use it to concatenate strings like "value=" with a number and things like that.
Occasionally I've used things std::setw/std::left/etc... but I find them very confusing.
 
@StackedCrooked I mean (for example) 12345678 being shown to me as 12,345,678, but to you probably as 12.345.678.
 
@JerryCoffin Actually I find the dots very confusing because I've become more used to English formatting than the one we use in Belgium. (It once caused me to mistakenly buy stocks for 5212 EUR instead of 5.212 EUR)
Because I used the dot to instead of comma.
 
Did you just tell me very elaborately that I wasted my time downloading boost DI, reading the docs and coming up with suggestions? — sehe 9 secs ago
 
Funny thing was that I didn't have enough money in my account to buy 5000 EUR in stocks. So I just figured the order would be rejected. Next day I logged in I saw my account was at -4902 EUR...
 
1:11 AM
@StackedCrooked You need to set the locale first. To get the locale determined by the machine's setup, you do something like os.imbue(std::locale(""));. If you want to specify US formatting (regardless of the user's locale setup) you'd typically use something like std::locale("en-us");, but it's up to the vendor to pick the names they support for locales.
 
Using std::locale("") I get 12,345,678.
 
The two locales that are always supported are "C" (the default) and "" (which is supposed to choose based on how you've configured the machine in general).
@StackedCrooked Apparently you don't have your machine configured to use the Belgian locale (or, perhaps, you're using a standard library that doesn't do it correctly).
 
@StackedCrooked Like I said--up to the vendor to decide what names they use.
 
Hm. That rule doesn't seem helpful in supporting internationalization.
 
1:27 AM
@StackedCrooked oh yeah, I've grown accustomed to decimal points too
 
@StackedCrooked It's not. Worse, they don't provide a way to list the available locales either.
 
Excel/LibreOffice calc frequently drive me up the wall
 
@StackedCrooked Out of curiosity, does "en_US.UTF-8" work any better?
 
Yep. That one is working!
 
@Telkitty this is my linode
 
1:35 AM
@sehe is it your toaster or your thermostat?
 
@StackedCrooked I think it happens because [a] it challenges popularly held beliefs about how programming/computers/compilers work [b] it's "hard" to point at documentation for the behaviour (because -it's undefined-)
@LucDanton My linode
 
@sehe what do you use it for? 141MB seems to be fairly low
 
You asked for idle specs. It runs all manner of services, but it's usually idle
 
@sehe hardware-wise
 
mine is idle most of the times too
and memory hardly ever goes beneath 500MB
 
1:40 AM
@StackedCrooked On many (most?) Linux distros, you can list the available locales with locale -a in bash.
 
0
A: Boost Karma generator for composition of classes

seheI'd advise against using Karma to generate JSON. I'd advice strongle against ADAPT_ADT (it's prone to very subtle UB bugs and it means you're trying to adapt something that wasn't designed for it. Just say no). Here's my take on it. Let's do take the highway and be as unintrusive as possible. Th...

When your distaste for Spirit Karma is so big, you mock a JSON representation just to show how to do things without it.
@Telkitty Just... look at the usage and eliminate the culprit? Meh. Or go on Server Fault and leech
 
already did
 
Fuck, i've been working 12 hours days for like 2 weeks.................................
 
1:55 AM
congrats
 
thank you
Its fascinating that sucking dick in the metaphorical sense is more exhausting than sucking dick in the literal sense (I assume).
 
Woosh much :) I notice Billy is prone to be defensive of MSVC. A lot of credit to the rest of the VS/MSVC/Library teams that they don't usually fall in that trap
 
as a scientist, one must test ones proposation through physical experiments
 
cough
 
Don't know anybody with two X chromosomes so this is going to get hairy
 
2:02 AM
Wait. Hairy dicks are natural
 
I don't wanna look down and see a beard
 
Then shave your beard.
 
dude, I can't reach my own dick
although....
 
Then grow a longer beard. The tickling would be improvement. Well. Maybe I should just go to bed. Night all
 
Yeah looks like, spamming the lounge is about as close to sucking my own dick as I'll get
 
3:05 AM
@Mikhail Quite unnecessary though--we already know that you suck.
 
3:28 AM
mik is probably in denial ... I mean don't give another blow to his fragile heart, after all he has worked 12 hours days for 2 consecutive weeks ...
 
4:05 AM
 
 
2 hours later…
 
2 hours later…
nwp
7:27 AM
@nwp It is not a "feeling problem". Adding "emphasis mine" is part of citation rules. Period. — Modus Tollens 3 mins ago
Did that person just confirm my point?
 
8:22 AM
I finally finished Gundam Wing yesterday (after being on hold the entire summer). It was not as good as I remembered but also not as bad as I feared it would be
 
 
1 hour later…
9:48 AM
if(printStream)
return const_cast<char *>(printStream->str().c_str());
  FieldData* notConst = (FieldData*) this;
  notConst->printStream = new std::ostringstream;
 
 
2 hours later…
11:31 AM
> return values are harmful
 
 
2 hours later…
1:46 PM
0
A: Quick Sort - implementation

user151503Well, the question really shows yout total lack of intelligence. However, it can be improved by shoving it up on your ass.

Quality answers on Code Review
 
> Please consider adding a comment if you think this post can be improved.
yeah I won't
 
just flag as rude or abusive and move on
 
2:46 PM
Guise, I've got a quick cpp question (about to ask in the question room)
Plz hlep
 
send hapl
 
@ratchetfreak If you can, vote to delete it.
 
anyone, what's the squeeze gesture on new phones?
isn't it just buttons on the side that you "press"?
 
3:15 PM
I'm using GIT but i fucked up and merged everything. — sdasd 51 secs ago
 
3:52 PM
@LoïcFaure-Lacroix mistranslated pinch maybe?
 
@ratchetfreak mistranslated from english to english? androidforums.com/news/…
soon Google will run out of letters for the android release.
 
@Morwenn nooooo it got deleted :(
 
4:25 PM
@Mysticial Only an asshole would vote to delete such a fine work of literature.
> deleted as spam or offensive 1 hour ago
by Jerry Coffin, Community♦
 
:(
 
@Mysticial The onebox does show the entire answer though.
 
Been wondering for a while. I don't see a lot of offensive stuff on SO since I don't trawl the homepage like I used to. So they all get deleted before I ever see them. Ever since the election, has any of this "offensive stuff" even taken a political turn?
 
4:44 PM
@Mysticial I dunno--about the only time I see the front page is when I install a new OS or something on that order. Even then I don't think I've ever read any of it.
 
5:08 PM
@JerryCoffin Obviously, your problem is that you're not installing a new OS often enough.
 
5:20 PM
510
Q: Don't clutter half the screen with things most people don't care for

Shadow WizardTL;DR: Stack Exchange has a principle: the advertising is minimal, and shouldn't interfere with the contents of the sites. This works for all sites except Stack Overflow. Please fix this. Details below. Today I happened to use Guest mode of my browser to search for something, got results from ...

^^ Holy shit. I never noticed since I'm always logged on.
 
wow that's horrible
 
5:52 PM
same
 
6:13 PM
same
 
 
1 hour later…
8:16 PM
@Mysticial I seem to remember when SO was new, Jeff had a diagram of the percentage of screen real estate devoted to actual content on things like typical forums and such. At first glance, this doesn't seem to compare favorably at all.
 
8:32 PM
> If you need to make modifications to a designblock, its best to paste into a design (new or existing), make the modification then save that as a new designblock.
Brilliant design!
 
I mean it's still a decent tool but UUUUUGHHHH
 
@BartekBanachewicz We optimize our customers' commute, by ensuring they all have to constantly work late.
 
@JerryCoffin I read a news article, but a few days ago with this exact argument. The new working hours was 5 am to 2 pm.
 
"we know which parts are missing, but we won't fix that for you"
yes I totally wouldn't want the pc to do the tedious boring plain as fuck job for me
and this is after their recommended workflow
it doesn't even recognize its own commands enough to update the board
"do you want to get stabbed in the eye? No? Click here to upgrade!"
 
8:42 PM
@CaptainGiraffe I think I'd prefer to 2PM to 5PM. Still hit rush hour going home, but I could live with that...
Then again, my usual work day now is something like 7:30 AM to around 7:00 PM.
 
@JerryCoffin I'm going for 11:30 am to 9 pm, but sometimes it clashes with my colleagues schedule.
 
I know it works with extern "C", but my task is to try to make it without extern "C" — Mitaka 59 secs ago
eh?
 
8:58 PM
Suppose I have a immutable String class that wraps a std::string together with it's hash value. Now I realized that the compiler-generated move constructor mutate the string and leave the hash unmodified. I wonder how to best fix this problem.
 
mValue? mHash? ewww go back to school mr Hungarian
 
um, but why are you wrapping a std::string with its hash value? IDK, maybe re-hash on the move constructor?
 
Just an idea on how to speed up lookup in unordered_set. Of course, this only has benefit if String objects get reused (like in the example code at the bottom, where GetTypeName returns a ref.)
 
@StackedCrooked Rule of Zero style, wrap it in a resource
 
the problem is
you're mixing responsibilities
the correct thing to do would be to utilize a hash cache kind of thing which caches the hashes separately
 
9:02 PM
I could wrap it as std::shared_ptr<const std::string>. This would make it work.
 
eww shared_ptr
 
I thought about that option and it's kinda fine.
 
I like Puppy's idea more, shared_ptr implies I DON'T FUCKING KNOW THE LIFETIMES OF MY POINTERS
 
@Mysticial But .. shared_ptr<const T> has value semantics! -- Sean Parent
 
no it certainly doesn't equal or imply that whatsoever
shared_ptr<std::string> would give you a null when moved-from
which may be less ideal.
the best approach is to separate out the functionality you actually want, which is caching of hashes, from the value you are trying to hash.
 
9:05 PM
How does caching hashes work?
 
kinda like unordered_map<const std::string*, std::size_t>
 
So, keyed by ptr.
I thought you meant keyed by string object. Which would be stupid :)
So a double hash table lookup.
Interesting idea.
 
the ptr can basically be its own hash
the real issue is how would you know when to evict from the table
perhaps the best approach would be to cut the shit and just use shared_ptr<String> as the original hash table's key
then make String immovable
 
A pointer divided by it's alignment a pretty good hash I suppose.
@Puppy I see.
 
I think the best approach is to just grow some plants.
 
9:09 PM
@StackedCrooked Yeah, they're pretty fast AFAIK
 
@Puppy In my program the list of strings is generated once and has infinite lifetime. So that makes it easy.
 
fair enough
in that case I would go for the hash cache approach as it has the cleanest separation
although frankly
I don't get why you're bothering with all this if that's the case
just generate one set of regular strings up front, use unique ownership for infinite lifetime, use std::string* as keys.
 
Cool. Never hadn't thought of that.
It's so easy.
Stupid me.
 
9:25 PM
wat^
at least the sound is not real, I was questioning my sanity here
 
9:37 PM
@StackedCrooked Well I wasn't gonna put it that way but ;p
 
 
2 hours later…
11:29 PM
@Shoe yeah, I saw that before :p
 

« first day (2561 days earlier)      last day (2386 days later) »