« first day (1181 days earlier)      last day (2232 days later) » 

12:48 AM
Is there anything that is to calloc what realloc is to malloc?
 
@QPaysTaxes realloc(ptr, num*size)?
 
0
Q: Let's burniate this [bundle]

Sun QingyaoTag wiki for bundle: Bundles are a group of resources. A bundle is a directory that has a well-defined structure and can host anything from classes to controllers and web resources. Even if bundles are very flexible, you should follow some best practices if you want to dist...

 
@NobodyNada realloc doesn't zero-initialize the extra space.
 
@QPaysTaxes No. Use memset or a loop.
 
Drat
 
12:50 AM
ah. AFAIK there's nothing built-in, and Google agrees with me.
Writing your own would be trivial though.
 
Yeah, I couldn't find anything Googling either, but that doesn't mean there isn't
Yeah, but it's something I'd rather avoid
 
The latter if you wanna be ultra standard paranoid and the array is something other than integers.
 
Lots of these memory management functions are implemented cleverly by the OS; I'd rather use the clever, fast implementation than write a possibly-slower one
 
Looks like Microsoft has a _recalloc function, but it doesn't look like it's standard
 
@QPaysTaxes May technically not do the right thing for floating point numbers and pointers though.
 
12:52 AM
It's a char *
 
And compilers can optimize simple loops to memset calls.
 
I want the extra space to be 0-initialized so that, when treating it as a string, it ends at the right place
 
char is an integer type, so it's always fine.
(It's also fine for floating point and pointers on all implementations I ever heard of, but that's how we have fun in the C family. :) )
 
@BaummitAugen What's the "C family"?
 
@Olaf C and C++, presumably
 
12:55 AM
@Olaf The C family of programming languages, that is C and its descendants.
 
C# would be part, but it's the result of an unholy mating between C and Java, and they don't talk to that side of the family
Objective-C died young, and unbeknownst to the rest of the grieving C family, was revived by evil people
 
Although tbh I know basically nothing about the stuff outside C and C++, so that statement may have been too general.
 
@QPaysTaxes C++ has become a far relative since C++11. I can't say I dislike it, but it is gampa C I'm a bit concerned about. Imo the committee should cut out old wood from the standard and leave legacies to C11. There clearly is demand for a simple imperative language with full control of used resources (no hidden libraries), but even this could evolve, e.g. allow for enums with user-specified type, a clean null pointer constant, remove the Extrawurst for char, etc.
 
tbh I wanna see destructors
 
grabs popcorn
 
1:01 AM
I like RAII, and the only solution I could find in C to do anything similar is gotos
Well, that and rampant code duplication
 
@QPaysTaxes C# has nothing to do with C! They just did not call it "J#" because they lost a legal cause on that. And both, C# and Java are imo half-baked chimeras between C++ and some higher level languages. Imo, the set C, C++ and Python or Ruby is a good combination of skills for every-day programming tasks. If you are involved in web-development, use Python and JS + HTML.
 
@Olaf that was the joooke
If it had actually been inspired by C, it wouldn't have been an unholy mating
 
@QPaysTaxes You really should use emoticons. Not all are native speakers and do really get the subtleties right.
@QPaysTaxes Well, it was a rape on both sides actually.
 
@Olaf I'd hoped the wording "unholy mating" would get it across
@Olaf Drunken one night stand? Yeah, I can see that producing C#. Or Java, for that matter.
 
@QPaysTaxes Not really. We have quite the same phrase, but that's not necessarily funny connotated.
 
1:06 AM
Fair enough
typing is hard
 
@QPaysTaxes Interestingly Java started to solve all platform-dependencies. And what happened? There is just another language in the zoo.
 
It's probably the most productive language for lawyers by now, with Oravcle vs Android.
 
@QPaysTaxes Yes. Just please keep in mind that even if I understand the terms, I might not know the full cultural background and implications. That's the main problem really mastering a language. Grammar, syntax, etc. are not really the problem.
 
@Olaf Fair 'nuff
 
:-)
 
1:09 AM
If you'll excuse me, I need to talk to a teenager for a few minutes so I can learn all the new slang
 
@QPaysTaxes Problem 4.0?
 
wat
 
@QPaysTaxes Objective-C actually had a long and productive time. It just is now being replaced by Swift. Apple wrote most of the code in ObjC. It was just not noticed much outside the Apple ecosystem.
 
@Olaf Apple is the "evil people", yes
 
@QPaysTaxes Industry 4.0 -> Problem 4.0
 
1:15 AM
Ah
 
@QPaysTaxes ObjC seems to have som interesting concepts. Sometimes I wish I had taken the time to get deeper into it. But then I was a bit discouraged by the syntax.
 
Ditto, actually
Except I got as far as making a multiplayer tic-tac-toe app and then gave up
In my case, it was the class syntax
@interface Something : NSObject
@property NSString *anyString;
@property int countOfSomething;
- (void) doSomething;
- (void) doSomethingWith: (NSString) aString;
- (NSString) iDunno: (NSString) one (int) two;
@end
^ Something like that, though admittedly it's been a while
 
@QPaysTaxes C++ is not mcuh better in that aspect. They add more and more strange stuff to the language. All this looks to me more and more like riding a dead horse, just not to define a new language. Maybe Rust, D or Go would be worth a try, but then these languages also add too much overhead. I really miss a lean language liek C but without the quirks. If you ever programmed Modula-2, you might know what I mean. And that language could easily be extended by the C operators.
 
@Olaf Yeah, C++ comes off as a jumbled mess to me, even just looking at the naming conventions of things in the standard library
 
@Makyen, you've made a lot of cv-pls in the last half hour. Keep in mind that cv-pls's are for things that wouldn't naturally be closed because of low reviewer traffic. I haven't reviewed the requests you have made just now, I've only been notified of the increased rate.
Just a friendly heads up
 
1:27 AM
Oh, speaking of friendly heads ups, @gunr2171:
yesterday, by FireAlarm
gunr smells
 
@QPaysTaxes Hehe, std::remove_copy_if that does not remove anything.
 
@QPaysTaxes I smell a kick coming
:P
 
@QPaysTaxes I normally don't use the standard libraries of any language. Difficult if there is no use for it on bare-metal.
 
@BaummitAugen Most of the things that iterate over the collections have random names and inconsistent existence
@Olaf Fair enough, but I'm not a bare-metal coder
I've got fleshy bits on top of the metal endoskeleton
@gunr2171 Oi, I didn't do it
 
@QPaysTaxes Yep. And better not look at std::valarray.
 
1:29 AM
@QPaysTaxes but everyone gets a kick! That's just the way it has to be :)
 
@BaummitAugen Instead of giving in to the urge to Google that, I'm going to go get pizza
@gunr2171 Closey already kicked me
10 hours ago, by Closey
@QPaysTaxes I'm alive and kicking!
 
@QPaysTaxes Good choice.
 
ah, I see what you did there
anyways, afk for sleep
 
Yes, they added functional programming features now, AFAIK. While C is very conservatively extended, C++ seems to run after every new fashion in programming.
 
@gunr2171 sleep (n): a meeting with your subconscious
@Olaf I stopped following it at C++11, mostly
 
1:31 AM
@QPaysTaxes No risk no fun! But then: there can not be errors in something which does not exist.
 
@Olaf It's less being risk-averse and more not having the tools to try.
 
@QPaysTaxes I always think should get into it again. Many companies prefer C++ now, as they think one will be more productive and the quality is higher. Both are nonsense.
 
Major drama in the standardization committee: Many people, including Stroustrup, think C++ is too careful adding features.
 
@Olaf Well, the one company I might be working for is really into Java.
 
Well, maybe not major drama, but disagreement for sure.
 
1:33 AM
And the single largest email service provider (as in, people who send emails for companies, not provide personal email accounts) uses C for their infrastructure
 
@QPaysTaxes Why that? Get a STM32F429 Discovery (ca. 20-30 € IIRC, I got one for free from a distributor) and set up he gnu-tools. Just don't use the bloatware STlib. That board even has a small TFT.
 
@Olaf I could do that, or I could stick to my existing projects until they're finished
 
@BaummitAugen A language does not become better by just adding things. For C, cutting out dead wood would actually enhance the language. Although it already is pretty lean. C++ is on the way to become a black hole: collapse in itself. I honestly think the day C++ will not be usable is neigh.
 
@Olaf C++ would be a lot better if they added the right things
 
@QPaysTaxes Meh! Another project can't hurt. And another and another, and ...
 
1:39 AM
@Olaf I already have two at the forefront and three on the backburners
One of the two is a programming language which will probably never be finished
The other is... actually, pretty simply, come to think of it. And likely to be finished pretty soon.
Then the three are a game, a pretty complicated app, and a less complicated app
 
@QPaysTaxes C++ and C are only that strong because they are ISO-standards. That way companies have a defined feature set. Problem with C++ now is that there are just too many ways to solve a problem language-wise.
@QPaysTaxes I have three projects running for 2 or 3 decades now!
 
@Olaf I like to finish my projects
 
@QPaysTaxes That's only for my commercial projects which earn money.
 
I'm trying to build a resume
I'd rather have "did this, this, and this" with links to cool stuff than "in the middle of all of these cool things"
btw, could you take a look at this?
 
@QPaysTaxes Well, after some decades in the job, one eventually has quite some finished jobs, of course. It is just some of my personal projects which don't finish. Problem with those long-termers is that when I take the time to work on them after some years, I completely redesign them because techniques have evolved and I have new insights.
Now, I just work too much for money, so I simply don't have the time (and the mood) for my own projects. Hope I can take some months for one of my primary projects after the current job.
 
1:48 AM
See, I don't have decades of work experience
All I have officially is a semester of college and a decade of mostly-unfinished personal projects
 
@QPaysTaxes You want to get some?
 
Meanwhile, if I'd actually bothered to go through and do them, which I could have, I'd have a lot of cool stuff to list
 
@QPaysTaxes And you think it was different for me at your age? No.
 
@Olaf Not at all! But you've got lots of time for personal projects that never end.
I'm trying to finish some so I can get there.
 
@QPaysTaxes I'd bet whatever you do as personal projects eventually does not matter for a later job.
@QPaysTaxes Lots of time? You couldn't be more wrong ;-)
 
1:50 AM
...compared to me
 
@QPaysTaxes All typenames ending in _t are reserved by POSIX iirc.
 
@QPaysTaxes In absolute terms, ok. But relatively, you most likely have way more time. Just consider that if you grow older you also loose the interest in programming all weekend if you program during the week already. But, of course ymmv; we'll talk again in 20 years (hope they have Ouija-interfaces until then ;-)
 
Dunno if you want to be compliant with that.
 
This is being written on Windows, but that's worth knowing if I wanna use the code on another system
 
@BaummitAugen You are right. That's actually a bad habit and a legacy.
 
1:55 AM
Any recommendations for what to change it to?
Or should I just not have suffixes?
 
@QPaysTaxes I prefer Camel-case for types in C, too.
 
@Olaf That'd be enough differentiation for me
 
Those suffixes are problematic. After all struct has it's own namespace anyway, so no need to suffix the name with anything. Same for union and enum`. That whole Hungarian notation thing is mostly missunderstood and wrongly used anyway. And MS started it.
 
Hm, I could just use the structs themselves
 
Ok, bedtime for me. Good night and dream of sheep
 
2:00 AM
N8!
 
@QPaysTaxes: is that for real?
 
I sure hope so
I'm trying to figure out how to reply
 
How about, "yes, thank you"?
 
Well that isn't the offer itself, it's just telling me an offer is on its way
(I omitted the second paragraph because it's got a whole bunch of identifying information)
 
Congratulations!
 
2:26 AM
Thanks :D
@HovercraftFullOfEels I've seen unintentional duplicates get moved to trash, but I dunno about bumps.
Seriously though I dunno how to reply
 
user4639281
2:56 AM
@HovercraftFullOfEels No, only one request per post
 
user4639281
We have a review tool. The functionality will be expanded in the hopefully near future.
 
@FOX9000 No idea.
 
C question: If I have a char *foo that's got space for 25 characters, is foo[25] UB?
 
user4639281
no clue there either, comment seems to state that the answer never worked.
 
@QPaysTaxes Yes.
 
2:59 AM
Good to know
 
That's the 26th char, and you only have 25.
 
One more question, related to that
if I have a char *foo and I get its length with strlen(foo) (assuming foo is a good string for that), is foo[strlen(foo)] UB for the same reason?
 
If strlen(foo) was not UB to begin with, them foo[strlen(foo)] isn't either.
 
user4639281
If I have an irrational number with a length that is imaginary (assuming assumption are assumptive), is the farbizzle a narwhal?
 
@TinyGiant Farbizzle is a banderlog, not a narwhal.
She's also very sensitive about being compared to sea creatures. Something about a traumatic experience with dolphins.
 
user4639281
3:02 AM
when the length is imaginary though?
 
As far as I know, yep
 
user4639281
darn
 
Careful with calls to strlen though, that's O(n).
 
Yup
 
If you implement your own string thingy, just keep track of the length.
 
3:03 AM
Hm, foo[strlen(foo) + 1] would be UB if it ended right at the end of the memory, probably
@BaummitAugen I'm reviewing someone's code and making sure my assumptions are correct :P
 
@QPaysTaxes Of course.
 
Thanks!
 
strlen just finds the first '\0' while assuming there is one.
The rest is for the programmer to deal with.
 
Right
Is there a minimum size for size_t?
 
1 byte
Also, it's big enough to represent the size of the biggest object that can exist on the system, and it's unsigned.
 
3:11 AM
Alright, thanks
 
3:31 AM
@QPaysTaxes I've noticed you've started reviewing! I'll update your session record.
 
Closey-senpai noticed me!
@BaummitAugen Can you do me a favor and check that this is correct?
ugh, I've gotta write a 500-word-essay about myself
waffles
Whoops, those are two different ones. I just happen to have already reviewed the second.
@Closey next 3 tags
 
Refreshing the tag listing. Please wait...
@QPaysTaxes The next 3 tags are: 1337, 48, 39
 
If what ever it is that loop does can be done with sprintf, it definitely should be done with sprintf.
 
It seems to be replacing \t with a pretend tab, and ditto for a newline
 
What's char(0xa) and char(0xd)?
 
3:45 AM
Newline and carriage return, not necessarily respectively
 
QPaysTaxes passed a audit!
 
Ok. There should be a comment for that I guess, at least I don't have that memorized.
I'm not a windows guy though, so maybe that's just me.
 
I only know it because I did a lot of playing with ASCII. I'll add that to the review, though; it's a good point
 
The return -1 is not that unusual if you just want to report "some failure". After all, the return type is int, so -1 one is completely reasonable from the C point of view. Whatever the host environment does with that int is outside of the scope of the standard.
 
My point there is that the environment doesn't treat -1 like -1, so documenting, say, "-1 means something bad and specific happened" won't make any sense.
 
3:52 AM
Again, dunno how Windows handles that. It's a valid remark in the Linux world, I agree.
 
Just tried it on Windows; got a large positive error code
...huh
 
printf(argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); Where do all those argv come from suddenly? 0.o
 
QPaysTaxes passed a audit!
@QPaysTaxes You've reviewed 40 posts today (of which 2 were audits), thanks! The time between your first and last review today was 28 minutes and 51 seconds, averaging to a review every 43 seconds.
 
We were talking if (argc < 3) etc beforehand.
 
Oh that's something else worth mentioning
 
4:00 AM
And why would argv[2] be a valid format string to begin with?
 
shrug I guess that's the assumption
Added it, though. Thanks again.
Can someone explain why this is off-topic? I've gotta go to sleep, and this seems like it's gonna be a long, drawn-out thing.
 
@QPaysTaxes Heck no.
Tell them to read the How to Ask or go to Meta if they disagree and walk away.
 
Meh, I don't care enough
 
That loop is still weird btw.
'r' is not a real linebreak, so why is it treated as one?
And if we wanna handle Windows style line breaks, why do we make \n\r into two linebreaks?
Also, if we are going to handle escape sequences to begin with, what's with the rest of them? Do we just support those two?
 
4:16 AM
...you should probably write your own answer at this point
 
Meh. I don't like C.
Supporting the actual, complete C format string, and even validating it is one in the first place, will be so incredibly annoying.
Also, with that printf line, we have to check that argc >= 10 (ok, that's easy) and that argv[2] contains exactly 7 %s and no other %whatever. Which again is going to be needlessly hard.
@QPaysTaxes Should I keep looking btw or are you done?
 
@BaummitAugen I'm about to go to sleep
 
I should too, it's getting close to 5:30 again. :(
 
Jeez, yeah, sleep
It's not even 2330 here
@clo my stats
 
4:37 AM
@QPaysTaxes You've reviewed 40 posts today (of which 2 were audits). The time between your first and last review today was 28 minutes and 51 seconds, averaging to a review every 43 seconds.
 
5:27 AM
see also related meta question meta.superuser.com/questions/12005/…
 
6:05 AM
@clo room stats
 
@QPaysTaxes 1 members (4% of this room's registered reviewers) have processed 40 review items, which accounts for 10.36% of all CV reviews today.
 
 
2 hours later…
7:58 AM
Hiya o/
 
Hiya \o
 
8:22 AM
mornin
spam ^
 
8:55 AM
@QPaysTaxes I got distracted, sorry.
 
@PetterFriberg no clue either :/
 
@PetterFriberg I don't do the slightest Magento lol, I sometimes do a bit of
Plop everyonez
 
ahh yeah true, sorry your the "Meteor Man", however Magneto Man sounds cooler
specially if you know what meteorismo means in Italian...
 
@PetterFriberg Especially when you typo it yes
 
typo everywhereâ„¢
 
10:55 AM
plop all o/
 
Hiya
 
do we have any stats on how many questions are sent to CV queue vs. how many actually get closed as a result of that queue?
I can have a look at SEDE but it may exceed my SQL abilities...
 
@MacroMan if you manage to figure out let me know?... so I can cry some...
while at it also try to figure out how many cv are cast and how many of those just age away.
 
@PetterFriberg I'll have play around, don't hold your breath though - I tend to break databases more than make use of them :(
 
As long as you don't do rm -rf on the wrong data folder I guess you're OK
 
11:03 AM
I'm even not so sure there is info in it to figure it out..., maybe shog9 have an old meta post about it
 
You will want to look at ReviewTaskResults
when the review task is of type 2
 
11:18 AM
French spam
 
@QPaysTaxes heh.. looks like account merging has a lot of bugs.
@NathanOliver docs seems to be pretty buggy. Additionally, I see to have gained around 2k rep after the account merge (not from the old account), and I am gaining more rep every day from the docs even though I shouldn't get it..
 
11:43 AM
Hiya
 
@Lankymart answer is identical to what is given on the dup.
 
@AdrianHHH I've noticed you've started reviewing! I'll update your session record.
 
@PetterFriberg Lankymart is speaking with himself
\o BR
 
@PetterFriberg I was told that's the best way to link associated comments together.
 
11:48 AM
Yeah true only kidding...
 
@PetterFriberg it's fine, bit highly strung this morning...sorry
 
np, let's try to improve your day
 
@PetterFriberg Plus I'm always talking to myself... ;)
 
The only that listen to you :D, I also speak to my hand, I have five friends on it
 
Do we have an android hammer here?
 
11:59 AM
@BhargavRao checked a mirror recently? :p
 
Nopes, Lost my pocket mirror long back.
 
@BhargavRao don't think so the closes is Tim
 
@Tunaki yeah that's the route I'm going down at the moment. I'll see what I can produce...
 
There was TGMCians here long back, Apart from that, not so sure
 
12:29 PM
This is a starting point hopefully.....

https://data.stackexchange.com/stackoverflow/query/628080/cv-queue-data
 
Morning
 
morning
 
12:45 PM
That's an sd k
 
I wonder what the reviewers reviewed there exactly.
 
OMG. browsing to the reviewers profile from review gives me the new nav.
 
^ Yes
I was wondering about that
 
I hadn't noticed. So it does
 
It's just live
 
1:37 PM
oh no, just refreshed main and now I'm on the new nav there. AHHHHHHHHHHHHHHHHH
 
OK I already hate the sticky nav
 
why the heck did they move the get to everywhere else all the way on the right. Whats wrong with using the stack icon as a button?!?!?!?!
 
on the right you mean
 
right
@Tunaki You can turn it off
 
SO Nav Bar Reviewers
 
user6820627
1:43 PM
1* ^
 
Really weird to have different top bars for SO and CR
 
@Machavity This is the first name that's actually better than so far vote reviewers
 
I wonder if they are going to change it site wide once its done being rolled out on SO.
 
1:49 PM
@Tunaki And it even breaks in Android browsers
 
@Tunaki Did you have to scroll to do that? That is the only way I can get it.
 
@NathanOliver Yes I cheated a bit.
 
Well not so much. Just drag the popup
No scroll
 
I see. I was able to do that.
My eyes keep missing the notifications. Not used to them being on the right.
 
1:53 PM
Exactly my issue. With large monitors they tend to be overlooked
 
@NathanOliver Well, they're not used to you being on the left either
 
Heck, did they just change the layout of SO? It completely messes up in my browser.
 
@Olaf New nav bar is live
 
@M.A.R. I know. They used to be right in the middle where the eye wants to go.
 
@Tunaki And why did they not check it before rolling out into the wild? I can't see the top part of the underlying text anymore.
 
1:57 PM
The best part about opting in was not having to notice a sudden change now
 
Is there any way to change back at least?
 
They did check it. They fixed like 20 bugs in the first week or two of testing so they must have figured that's all the QA they needed.
Ha. Our Q&A site lacks QA ;)
 
@NathanOliver Apparently not. They should have posted a message and opt-in for the new design first.
 

« first day (1181 days earlier)      last day (2232 days later) »