« first day (378 days earlier)      last day (4578 days later) » 

12:23 AM
'Validating' emails is silly.
 
Email spec allows much more than most validators accept.
 
It doesn't help that nobody reads the spec before writing those crappy validators.
And there are those who do, and they come up with 10kB-long regexen.
 
that's the official validation regex, you know
 
It's stupid.
The validation procedure is: 1) check for @, 2) let the SMTP server devs worry about the rest
 
lol
I'm S.M.A.T
 
no
it's a Simpsons reference
 
Which?
 
1:25 AM
0
A: Return array in C++

StackedCrookedThe C++ syntax for arrays is: std::vector<double> instead of double[]. It also requires you to put #include <vector> near the top of your source file. Other than that they work very similar to C-arrays.

I lied.
 
 
2 hours later…
3:23 AM
> The Vatican has given its blessing to the Pokémon card game, reports the Times of London. The Vatican-based satellite TV station Sat2000, which is run by the Italian Bishops' Conference, declared that the Pokémon trading card and computer game is "full of inventive imagination," has no "harmful moral side effects" and is based on the love-thy-neighbor notion of "intense friendship."
 
ha that's bogus
i have nothing against pokémon but that is double-standards imo
besides.. the Vatican is not God.
 
4:18 AM
^ head of lamb, with mashed potatoes and norwegian aquavit & beer
 
4:45 AM
@mmmshuddup What?
 
user457812
I cannot say I fancy dining on a head...
 
Actually I was wrong about the mashed potatoes, it's probably mashed rutabaga with some potato in it. This is a traditional Norwegian dish called smalahove. It was made by a childhood friend of my niece, and he reports that it was quite tasty.
 
5:01 AM
^ I don't know why, but I destroyed the statistics by canceling the first game after installation of Windows 7
 
for reference, it's easy to change those numbers to whatever you want :)
 
@AlfPSteinbach I remember that I always got very good scores at Minesweeper when I was playing while ripping a DVD at the same time.
 
5:17 AM
@AlfPSteinbach Well speak of the devil. Just yesterday I accidentally ate the local specialty, which is pig's head. It was horrible, and I say that without the bias of having known what it was.
Sisig is a Kapampangan term which means "to snack on something sour". It usually refers to fruits, often unripe or half-ripe, sometimes dipped in salt and vinegar. It also refers to a method of preparing fish and meat, especially pork, which is marinated in a sour liquid such as lemon juice or vinegar, then seasoned with salt, pepper and other spices. Sisig also refers to Sizzling sisig, a Filipino dish made from parts of pig’s head and liver, usually seasoned with calamansi and chili peppers. Origin The dish is said to have originated from local residents who bought unused pig heads...
 
5:35 AM
Morning.
 
@想的不一样 Afternoon.
 
Anyways Good Day.
Wazz up?
 
Not a lot. I thought I had some programming questions, but upon coming here to formulate them, they went away. You?
2
 
Weekend,Working for my own company ;
I'd opened my own company(Product and Service).
 
Service on weekdays, product on weekends ;v) ?
 
5:45 AM
No,setting up my own company.Planning for both service and product.How to move further.
 
Well, as long as you have the product before you sell the service, you're OK in my book.
 
Your book?
 
My rule book. In my opinion.
 
Exactly,I am selling service to get some incoming for product ready.
Is your rule book published ;)
 
What industry, if I may ask?
 
5:49 AM
IT industry ;)
 
May I ask what is the meaning of Potatoswatt?
 
(n) A device used to swat potatoes.
See also: potatosweater.
 
What this image implies?
jaykayknits?
 
It's the shadow of a mountain cast under the clouds.
Jay Kay knits a potato sweater?
 
5:54 AM
Why dd you post that here?
Who is she,I mean?
 
^ Jay Kay
 
She looks like Hermione Jean Granger.
 
No, that's Hermione. Not a rock star. Also, not a boy.
 
Hermione is a boy?
 
Hermione is a girl so the pronoun "she" is appropriate. Jay Kay is a boy (a bestubbled one, no less) so proper English uses "he."
 
5:58 AM
Merlot Lace?
Who are you he or she?
 
:D
nvm.
David Krauss,Am I correct?
Do you know python?
 
Yes.
Not really.
 
In which language you play?
 
Take a wild guess. What room is this?
 
6:02 AM
yeah,C++.:D
but I thought C++ was usually used in decades.
 
@想的不一样 Do you mean, has not been used for decades?
 
Yes.
brb.
 
In fact, a new standard was just finalized this year, and it was one of the largest language specification projects in history.
C++ is one of the most popular languages overall, powering a majority of many software domains... just not IT.
 
@想的不一样 I look at this picture and try to imagine it is actually a guy. It becomes true after a while.
 
What? She's pretty, in an awkward teenager kinda way
 
6:14 AM
Sure.
 
is back
 
She's a good looking guy. I'm not denying that.
 
Anyway, I've never seen someone pop up in this room and diss C++
 
She and Guy?
 
@StackedCrooked Oh c'mon, you're just being mean
 
6:16 AM
@Praetorian Just having fun crushing another person's dreams. :)
 
@StackedCrooked Haha, gotcha
 
I mean,now developers are adapting Java like languages.
 
Adapting Java-like languages?
 
Slowly C,C++ are eliminating from world.
 
Well, time for me to go. Thanks for answering all my questions!
 
6:16 AM
Oh, he mentioned Java, and @CatPlusPlus isn't here to see it!
 
@想的不一样 LOL, Java is a C-like language but C is not a Java-like language?
 
By,Potato Sweater.
 
Anyway... sometimes performance matters and sometimes abstraction besides OO is needed ;v)
 
I know,you didn't get me.I am saying people are now-a-days money minded.
 
6:18 AM
The area occupied by C++ in the world of software development has grown smaller in order to give place to new languages. But that doesn't mean that C++ usage is continuously declining. It's pretty stable now.
 
They are adapting where there is more money generation.
It is my opinion and by looking articles,technical news I am saying that C,C++ like languages are being eliminating from IT world.
 
@StackedCrooked I don't think I even agree with the first part of that. I read recently that SO careers has C++ listed as a requirement for the majority of the job postings
 
As there are many and experienced developers in C,C++,so less chance to get success.
Developers see success in less time.Then they adapt the language.
 
@想的不一样 Of course they are, IT people aren't programmers, they're script kiddies at best
 
IT people aren't programmers?
Then who are programmers?(Ans:Mechanical,Automobile,NON-IT people :P)
 
6:24 AM
engineers
 
To get promotion developer should be multi-language expert.
 
的 is bull's eye (I think). That's the only kanji I can understand in your name.
 
StackedCrooked,You could have use translator.
 
@想的不一样 I can't decide whether you're trolling or genuinely ignorant
 
Truth I started my carrier with C and C++ only.
 
6:26 AM
I could. But I'm currently learning kanji.
 
nvm.
bbl.
Time to Go.
 
either way, it's past midnight here and I'm in no mood to argue, so goodnight everyone
 
I am having a flight for Silicon Valley.
 
It's 8:30 am here. Should sleep soon.
 
Bye,Take Care.
 
6:27 AM
Bye.
When is the last time you visited yahoo.com?
 
6:49 AM
 
sbi
@StackedCrooked You keep saying that.
 
@sbi One day I will actually sleep. I promise.
 
sbi
@StackedCrooked So you hang out here all night instead of sleeping, and then you wonder you hear the chat's ping in your mind?
 
I haven't heard it in my sleep yet. I tend to hear it when programming while listening to music.
 
sbi
@StackedCrooked Well, that's a lot better than. Not.
 
6:56 AM
Hmm. Are you sure you slept enough? :)
 
sbi
@StackedCrooked I definitely didn't. I went to bed about 1:30, and the kids woke me around 6. I chased them out the room and fell back to sleep until about 8. That's not enough in my book.
 
So, measuring optimistically, you had about 6 hours of sleep. That's stingy.
Esp since this is weekend.
 
sbi
Indeed.
Do you know the parental mantra? "It's just a phase." Whatever bad befalls you through a kid, you just think "it's just a phase, it will pass, we will get over it." The truth behind that, however, is that every phase is followed by the next one. :)
I'm doing this for more than a decade now (my oldest one is a teenager), and I expect to be doing this for again as long. I'm used to not to have enough sleep.
Anyway, my revenge is that I now take out time to read an interesting blog post (and waste time here, chatting), rather than making breakfast right away. :)
 
@sbi It's just a phase, it only occupies roughly 40% your lifetime. It's over in no time :D
@sbi I remember reading that looking at a computer monitor makes you feel awake due to the amount of white light shining in your eyes.
Actually, I think I heard it on a Google Tech Talk about the topic of "sleep".
 
sbi
@StackedCrooked Well, the thing is that I have too many kids, and producing kids takes time, so I face this phase (pun not intended, but noted) much longer than the average parent. The classic western one-or-two-child family usually has the kids out the door in under twenty years.
 
7:08 AM
Do you take care of them full time?
 
sbi
@StackedCrooked Oh. That would explain why I fall asleep after 20mins of reading in bed (I used to never fall asleep reading in my teens and twens), after having stayed awake staring on the monitor for too many hours.
 
sbi
It's fine, to say that. Everybody who's been here long enough knows that I have many kids (and that one of them is a teen). I also have no problem telling this to the regulars here (and for a newbie to stumble upon it). I just don't want it to be recorded for all eternity. I feel like this would be unfair to the kids.
 
@StackedCrooked Do you have any questions regarding my make_unique implementation? I just got notified about it. Twice :)
 
@FredOverflow Not immediately. Haven't delved in C++11 as deep yet.
It looked very cool though.
 
7:14 AM
I like the T&&... pattern: 1 T, 2 ampersands, 3 dots. Somehow that appeals to me :)
Oh wait, I wrote Args&&... :( Not quite as patterny!
 
I'm still a bit shaky on when you put the ... on the left or right side of the argument. Also, Microsoft doesn't support them yet :(
 
sbi
Actually, this guy is great, and his advice is gorgeous.
> Most software is not sold in boxes, available on the Internet, or downloaded from the App Store. Most software is boring one-off applications in corporations, under-girding every imaginable facet of the global economy. It tracks expenses, it optimizes shipping costs, it assists the accounting department in preparing projections, it helps design new widgets, it prices insurance policies, it flags orders for manual review by the fraud department, etc etc. Software solves business problems.
 
1st of November is a holiday here.
 
sbi
I.e., jobs in the software industry are boring 90% of the time. Tell that to the many programmers dreaming of a carreer in the game industry.
> Most jobs are never available publicly, just like most worthwhile candidates are not available publicly (see here). Information about the position travels at approximately the speed of beer, sometimes lubricated by email. The decisionmaker at a company knows he needs someone. He tells his friends and business contacts. One of them knows someone — family, a roommate from college, someone they met at a conference, an ex-colleague, whatever.
> Introductions are made, a meeting happens, and they achieve agreement in principle on the job offer. Then the resume/HR department/formal offer dance comes about.
 
7:21 AM
@sbi I used to dream of a career in the game industry. Did an internship for a game developer and decided that I didn't want to work there.
 
sbi
@StackedCrooked It's a question of supply and demand. There's a lot of supply of graduates eager to work in the game industry. Consequently, the salary is low, incredibly overtime the standard, and the code is horrible, because most of us here can run circles around the average game industry developer.
Ha, @Fred will not like that: "Academia is not like the real world."
> The prof in charge of my research project offered me a spot in his lab, a tuition waiver, and a whole $12,000 dollars as a stipend if I would commit 4~6 years to him. That’s a great deal if, and only if, you have recently immigrated from a low-wage country and need someone to intervene with the government to get you a visa.
> If you really like the atmosphere at universities, that is cool. Put a backpack on and you can walk into any building at any university in the United States any time you want. Backpacks are a lot cheaper than working in academia. You can lead the life of the mind in industry, too — and enjoy less politics and better pay. You can even get published in journals, if that floats your boat.
About working at a startup:
> The high-percentage outcome is you work really hard for the next couple of years, fail ingloriously, and then be jobless and looking to get into another startup.
 
@sbi On the other hand the company had a hard time finding good developers. But you are right about the code being horrible.
 
@sbi I do "like the atmosphere at universities", and yeah I know the money isn't that great. That's why I work outside from time to time. As I do now with my C course :)
 
sbi
@StackedCrooked Almost all game companies have a hard time hiring real good programmers. That is because they do not provide the conditions to attract real good programmers. If you are good, why would you sign a contract with a wslave owner?
 
The company that I currently work for was founded by a professor. The atmosphere there is a mixture of academic research and commercial company..
 
sbi
7:28 AM
@FredOverflow You mean you consider teaching C as being "outside of academia"? :) Please tell me you intended to make a joke.
More about working at startups:
> if you want to work on cutting-edge technology but also want to see your kids at 5:30 PM, you can work on cutting-edge technology at many, many, many megacorps.
 
@sbi I currently found out that one person in my Japanese classes works as a developer for that game company I did an internship for. I don't know how long he has been working there, but currently he still seems enthusiastic about his job :D
It is slavery though. I noticed that when doing the internship.
 
sbi
@StackedCrooked Well, he's been eager to get into the game industry, and he got what he wanted.
 
@sbi I dunno... I like the idea of teaching much more than grinding on a code base with variously skilled colleagues under time pressure to achieve a vaguely specified goal.
But maybe that's just me :)
 
sbi
@FredOverflow I like teaching, too, which is why, over the last decade, I have again and again taught. And I don't like grinding away under time pressure either. I tend to avoid that, but every few months, there inevitably is a time... Oh, and I never ever worked for a big company., The biggest I worked fro had 100 employees, 30% of which were developers. (Software was their business, though.)
I also never wrote a boring business app for an accounting department. So in a sense I managed to make my way around those 90% of boring jobs.
But then I am also not a dev head or something, despite being old enough for it. But I choose that. I always valued time with the kids and sanity higher than a career.
> Some of the best programmers I know are pathologically incapable of carrying on a conversation. People disproportionately a) wouldn’t want to work with them or b) will underestimate their value-creation ability because they gain insight into that ability through conversation and the person just doesn’t implement that protocol.
 
@sbi Nice.
 
7:38 AM
They could try chatting instead of talking.
 
sbi
@FredOverflow However, in a chat room you won't be able to communicate with the people who sign checks.
 
What people sign checks in a chat room?
 
@sbi I find that my conversational skills improve after not programming for a while. It's as if being involved in a programming task steals brain-cells away from the conversational part of the brain.
 
sbi
@FredOverflow Sigh.
 
sbi
7:41 AM
@StackedCrooked Really? I never noticed. I should watch out for this.
 
It's probably just me. I tend to go "too deep" when programming.
When I get up from my computer all I can do is just stare. Sometimes involuntary at people. It gets me strange looks.
But if I quit programming for a while I revert to a normal human.
 
sbi
@StackedCrooked Oh, that I know. I always got it when I was working too much.
 
@StackedCrooked Kind of like how sex makes you shiftless? :)
 
sbi
> All business decisions are ultimately made by one or a handful of multi-cellular organisms closely related to chimpanzees, not by rules or by algorithms: People are people. Social grooming is a really important skill. People will often back suggestions by friends because they are friends, even when other suggestions might actually be better. People will often be favoritably disposed to people they have broken bread with.
 
<packing bread for monday>
 
7:46 AM
It's only Saturday. The bread will be hard by Monday.
 
sbi
@FredOverflow Don't offer Saturday's stale bread on Monday in the hopes it will get you anywhere socially.
 
@StackedCrooked Perfect, then I can break it with my colleagues!
 
sbi
@StackedCrooked Ah, you were faster.
 
Hey, you want to be my friend, here I have bread.
 
sbi
But I said it so much better. :)
 
7:47 AM
@FredOverflow Just like Jesus did :)
 
Eigenlob smells. I bet "Eigenlob" is one of those funny German English words :)
 
sbi
> The motto and sales point of Salesforce is “No Software”, which conveys to their actual customers “You know those programmers you have working on your internal systems? If you used Salesforce, you could fire half of them and pocket part of the difference in your bonus.” (There’s nothing wrong with this, by the way. You’re in the business of unemploying people. If you think that is unfair, go back to school and study something that doesn’t matter.)
Well, I'm through and while I do not agree with everything, it's a great posting. IMNSHO a must-read for CS graduates. Anna pointed it out:
Excellent blog post by the author of Bingo Card Creator: Don't Call Yourself a Programmer http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/
Have fun.
I now need to make breakfast for the kids.
 
 
1 hour later…
8:56 AM
@sbi I like that it's not too condescending like most "you were a big job in academia, prepare to be crushed by The Real World" blog posts that seem to take joy in frightening fresh graduates. This one seems to really go out of its way to be useful.
 
9:19 AM
Hi, what's up?
 
Hacking around Boost due to some snafu with my latest GCC snapshot.
 
@RMartinhoFernandes They key above down.
 
@FredOverflow That's a new up-joke!
 
I am so proud!
 
I'm not sure you should.
 
9:22 AM
I get off on puns.
Puns are as important as sports, beer and sex. If not more important!
2
 
I completely missed that there's a Boost.GraphParallel that's the same interface as Boost.Graph, except it's, well, parallel.
 
Oh.
> Perceptive readers will note that 100 does not actually show up on a d100 or rand(100).
Ha! He's not the right kind of geek!
d100s have 100!
 
sbi
9:44 AM
@LucDanton Yeah. As I said, while I don't agree to everything, I think he achieved his goal to write a README.TXT for CS students about to enter the industry.
@FredOverflow That would be a bad C++ programmer who doesn't get awed by a good pun.
@RMartinhoFernandes What notation is d100?
 
@sbi It means a 100-sided die.
Since that's a bit impractical, typically two d10s are used: one for the tens, another for the units.
 
sbi
@RMartinhoFernandes Where is that notation from.
 
Double 0s means 100.
@sbi Tabletop roleplaying games.
 
sbi
@RMartinhoFernandes Ah, that explains why I never heard about it. :)
So these count from 1..x rather than from 0..x-1?
 
sbi
9:47 AM
@RMartinhoFernandes Ok. I wonder why he would get something so trivial wrong.
 
Just like the common six-sided dice have values from 1 to 6.
@sbi Well, maybe he thought double 0s meant 0.
 
hey there. is there any moderator in this chatroom? I'm having problem with my profile
 
sbi
@RMartinhoFernandes You know, it's not like he's perfect, there's a lot of smaller errors in the text, but this seems like he's failed in making an important point.
@TuralTeyyuboglu If I were you, I'd go looking for mods in the meta tavern.
 
@sbi
thx
 
sbi
9:50 AM
@RMartinhoFernandes They do have a funny tagline. I didn't know links would work there.
 
@sbi Well, even for rand(100), he forgot to mention what happens if you get 0.
 
sbi
@RMartinhoFernandes How could you get 0 if the dices start from 1?
In fact, if you emulate a d100 dice with two d10 dices, neither of which can be 0, how can you throw a 1.9?
 
@sbi Oh, I forgot to mention, d10 range from 1-10, but they show a "0" for the ten.
Mainly to make reading d100s easier.
And I didn't get that part about the 1.9. You can only get integral results.
 
sbi
@RMartinhoFernandes Ah, that explains it. (And I meant to write 1..9, of course.)
 
Does C have any interesting algorithms in its standard library besides qsort and bsearch?
 
9:59 AM
strlen?
Oh, you said interesting.
 
I mean it doesn't have something like a filter function or such?
Or random shuffle?
 
Gosh, you're crazy?
You've clearly been spoiled by C++.
C's mentality is "love the fucking baby, yourself."
Er, I mean, "write the fucking algorithms, yourself."
 
sbi
printf() is quite "interesting" (if you define as interesting what is hard to implement), and one could argue that it is somewhat of a filter. :)
@RMartinhoFernandes "Fuck the loving baby yourself"? :)
 
I have two vector<object_of_class_a_1> and vector<object_of_class_a_2> , is there is any efficient way to determine whether object_x_of_class_a belongs to both vectors or not? (rather than using find in both vectors) ?
 
sbi
10:04 AM
@RMartinhoFernandes Damn, I haven't read that yet, even though it's been on my desktop for days.
room topic changed to Lounge<C++>: Puns are as important as sports, beer and sex. [c++] [c++11] [c++-faq]
 
@MrAnubis What's the relation between the three classes?
 
@RMartinhoFernandes all objects of same classes
 
What's wrong with find on both vectors then?
This is what a d100 looks like.
No one uses this monster, btw.
 
@RMartinhoFernandes doesn't stf::find has O(n) complexity when used with vectors? , was just wondering if there could be efficient way
 
We stick with:
@MrAnubis Are the vectors sorted?
Unless they are, you won't get better.
 
10:08 AM
@RMartinhoFernandes no
 
How do you expect to find something without looking at all elements until you find it?
If you skip some element, that could be the one you're looking for.
 
sbi
Quick, before it gets closed:
0
Q: Can you learn functional programming in C?

sbiAs a result of the comment discussion here, I wonder whether you can learn Functional Programming in C?

 
@RMartinhoFernandes That's what i had said :) , i'll stick to std::find then :) ,
 
10:20 AM
Yay! I rule! Our own wheel of blame. Still incomplete so far.
 
@RMartinhoFernandes Great, I'll have my students implement a generic filter function then :)
 
@FredOverflow Are you giving them a set interface, or letting them think of it?
 
What? No, just a simple function like bsearch or qsort. With lots of crazy void pointers ;)
 
And how does it produce results?
 
The C way: an additional parameter
 
10:24 AM
Right, so you're fixing the interface.
 
What?
 
You could return a pointer to the first element found instead.
Like std::find (and similar to what strtok does, except not Evil™).
 
I don't want to find, I want to filter :)
 
Or you could allocate inside the function! Ugh. (I mean, they could think of doing this)
 
But a generic find is also a good idea, thanks :)
@RMartinhoFernandes Nope, they will learn malloc one day later, sorry ;)
 
10:27 AM
Ah.
 
@RMartinhoFernandes Don't worry, allocating can be done through a generic interface!
 
I didn't want to introduce pointers and dynamic allocation at the same time.
 
Sounds like a nice plan.
 
Thanks. Seems to work so far.
 
Pointers seem to cause enough confusion already just by themselves.
 
10:28 AM
The worst thing is the relationship between arrays and pointers.
Friday: pointers and their relationship to arrays
Monday: function pointers and void pointers
Tuesday: dynamic memory allocation and null pointers
That's my plan :)
 
Most everyone I now in person had big issues with functions pointers.
 
@RMartinhoFernandes ???
 
Really? As long as you have good examples, I think they're quite easy.
 
How can one get confused by that?
 
How would you generic sort and search functions in C without function pointers?
Well, I guess you could abuse macros somehow...
 
10:31 AM
@LucDanton I think it was mostly the initial shock of using functions like other values.
The "jump" into (very crude) functional programming.
 
Ah, I see.
 
@RMartinhoFernandes So C can be considered a functional programming language because it supports function pointers? ;)
 
I wouldn't call it that.
 
Oh, I just noticed that I haven't taught my students goto so far. There is still time left. Should I? :)
 
In C it's used as an error handling mechanism.
 
10:35 AM
If the course is really committed to C, I think it should. Idiomatic cleanup with goto is very helpful imo, at the very least for understanding preexisting code.
 
0
Q: Why does bsearch return a void*?

FredOverflowvoid * bsearch ( const void * key, const void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) ); If I pass in a const void * base, shouldn't bsearch also return a const void * result?

 
Ha! const-correctness in C? lol
 
So why does C even have const then? :)
 
Oh god, timeouts.
 
@FredOverflow To show-off!
 
10:39 AM
You can't even use consts as array sizes in C. How stupid is that?
 
I guess it's back to good old #define.
@RMartinhoFernandes Cupid :)
 
@FredOverflow Since you can't overload in C, const has to suck.
 
11:16 AM
@RMartinhoFernandes Did you know that const was originally going to be named readonly, but the C people convinced Bjarne to name it const? :)
 
Wow!
I think readonly would better describe it.
 
Except for those cases where const means constexpr.
 
But we have constexpr for that!
:P
 
Yeah, but const is shorter. We can leave constexpr to constexpr functions.
constexpr int readonly& foo();
 
Well ro is even shorter!
 
11:22 AM
Isn't that a greek letter? So we would only need one Unicode letter for readonly!
 
No, that's "rho".
 
dang
 
constexpr int ρ& foo();
if(x ≠ 0) blah();
 
The p is a rho, I suppose? :)
 
vector<int>* v; v→push_back(42);
@FredOverflow Right.
 
11:25 AM
The arrow looks very nice!
 
Ah.
template <typename T, typename… Args> std::unique_ptr<T> make_unique(Args&&… args);
 
Doesn't look great with my font :( I think it's because the symbol is lifted from a non-monospace font and used 'monospacely'.
 
Works here. I specifically picked an arrow that was available in Consolas.
 
I'm gaining appreciation for C's minimal approach to genericity. Yeah, it's not beautiful and you have to cast everywhere, but it's simple, and it works!
 
@FredOverflow You have _Generic now!
 
11:27 AM
What?
 
It's a C1X feature.
 
And what does it do?
 
#define cbrt(X) _Generic((X), long double: cbrtl, \
                              default: cbrt, \
                              float: cbrtf)(X)
cbrt(1.f) calls cbrtf, cbrt(1.0) calls cbrt, and cbrt(1.0L) calls cbrtl
 
Looks like gibberish to me.
 
@FredOverflow That's what you get for using C.
 
11:29 AM
It's a switch on types.
 
Did they ban VLAs from C1X? :) I mean no compiler implements them yet, right?
 
They're optional now.
 
@FredOverflow Wut? C99 VLAs?
 
Yes. Have you looked at the full spec? It's insane.
 
11:31 AM
Doesn't support them fully, only very basic examples.
 
Ah.
Well, now the implementation can #define __STDC_NO_VLA__ and be done with it.
 
Is alloca standard now? ;)
 
No.
C1X has a few goodies, but it has nowhere near as many changes as C++11.
 
11:48 AM
Can you go on a private room on this chat?
 
@cubsink Yes. Click on someone and then click "start a new room with this user".
 
sbi
@FredOverflow But what does that mean? The whole world will still be able to read what you wrote there. // @cubsink
 
I never used that feature, dunno.
 

« first day (378 days earlier)      last day (4578 days later) »