« first day (2138 days earlier)      last day (2810 days later) » 

12:11 PM
> IMBO the status quo is far superior to all of this irrelevant nonsense.
Classic Ville.
 
Ven
IM"B"O = ?
In My Badass Opinion?
 
nwp
Biased, I had to look it up.
 
Ven
what an asshat
> In IO they are everywhere.aspx). Don't you dare tell me checking the error code first before the data is a code smell
DONT YOU DARE TELL ME IM WRONG! OBVIOUSLY IF IM ON r/learnprogramming I MUST BE RIGHT
 
nwp
12:38 PM
I still don't have a good rule to avoid circular includes
an extra types header sucks, avoiding including headers in headers is not really feasible
fixing it on a case by case basis feels like too much time wasted on unimportant issues
putting types above the includes feels like a hack
 
@nwp in the cases where it's hard to avoid, just forward-declare and include actual headers in .cpp files
 
Ven
^
 
nwp
forward declaring doesn't play nice with typedefs, I'd have to repeat the typedef
maybe I should just spend my time whining about not having modules instead of fixing the problem
 
eh typedefs
Though I do admit it's annoying.
 
Ven
omg griwes admitted something in c++ is annoying take a picture
 
12:44 PM
It's a factor that contributed to me making my analyzer's code based on inheritance and not variants. (WTB actual typeclasses w/ type erasure)
Jul 31 at 15:48, by Griwes
For me the thing that makes me dislike C++ is... C++ itself.
 
Ven
I'm just joking. :P
 
Jul 28 at 13:09, by Griwes
Which is going to be a GIGANTIC PITA until we get actual do-syntax in C++.
Jul 13 at 13:08, by Griwes
Heck, no-one actually likes C++.
 
Ven
meh i'm okay-ish with it
 
nwp
Since I had to use C for a while I appreciate more how much work vector<stuff> actually does and how hard it is to reproduce.
but maybe C is not the right language to compare C++ with
 
@Ven That is very explicitly different from "I like it".
 
Ven
12:49 PM
@Griwes yes but that's about as much as I'll concede
saying anything more about C++ would be a self-inflicted death threat.
 
nwp
I'll try out the extra typedefs-header
 
May 27 at 10:54, by Griwes
I don't remember when was the last time where I used inheritance where I didn't really mean "I actually need concept polymorphism, but that's too troublesome in C++".
somewhat related
:D
 
nwp
@Griwes what is your favorite alternative to C++?
 
@nwp Vapor.
 
@Griwes I do like C++. It's a lot like my homeless friend who shouts at traffic--completely crazy, but still makes me smile.
 
1:06 PM
you have a friend? who is homeless? and you didn't offer your couch??
 
@Telkitty "you have a friend?" I wondered if anybody would spot the obvious lie there. Congrats.
 
@JerryCoffin What about your wife=girlfriend=friend?
 
1:23 PM
= nullptr
 
Ven
1:33 PM
what's that a pointer
don't you have a copy of those
 
This is gonna suck.
I need to make a type that serializing to either T or T& based on the type at the site of the return value.
Either that, or I just fix it to behave the right way and get rid of this table serialization...
God why do these interop frameworks have to be so hard.
 
@ThePhD If it were easy, somebody would already have done it so well that there'd be no reason for you to bother.
 
1:59 PM
God fuck...
And lua doesn't provide a hook for its typical iteration functions to be hooked
so now I'm up shit creek without a fucking paddle, and either way I have to eat a hard breaking change
Fuck.
 
Ven
again and again and again
you're about as stable as a firefox nightly
14
:3
 
@Ven I had myself a sensible chuckle.
 
user1804599
@Ven :(
 
Ven
:P
 
Ben
2:12 PM
oh why did I enter
 
Ven
to give me all your stars
 
@Ben you miss us? (and we are happy to see you too) :p
 
Ben
@Telkitty yes, even though I have never physically seen you.
 
NASA re-establishes contact with missing spacecraft, didn't know it's missing in the first place
 
Ben
@Telkitty whew, unmanned.
its strange in C# that references are passed implicitly, and that one variable referenced to another updates the value and vice-versa.
 
2:21 PM
> current->name[strcspn(current->name, "\n")] = '\0';
 
nwp
@Telkitty They lost communication because the sun was in the way. That doesn't sound like something that happens by accident. Something is not right with that story.
 
omg these names
"string counterspin"
 
No it's string counter span .
 
@ThePhD meh, I still like to think it's related to string quantum spins
 
Ben
oh, hi @telkitty.
 
2:27 PM
@rightfold straightforward funny
@Telkitty you're a lousy NASA employee
 
Hey Lounge<C++>, I came here a few months ago asking about what kinds of documentation C++ people like. I've got some pretty great tips here and wanted to share the end result: rpclib.net
 
cool
 
@TamásSzelei Do you have a link to the context for your search? Or, what - in your own words - is the primary selling point for rpclib.net? (Never heard of it)
 
Ven
Writing C++ code was deemed a std::cin by the lord.
 
/me jumps to rpclib.net/internals
 
2:30 PM
@Ven A standard sin?
 
Ven
@Morwenn non une sin qui donne des drôles de maladies
 
nwp
not even an original sin
 
Ven
well hey they had a -33% on the standard ones so that's what I bought
 
I need to get a tree list on the side for my docs.
 
Hi guys I've stumbled upon strange output. How can lvalue expression refer to rvalue reference? See: melpon.org/wandbox/permlink/ss6W5DRTbWTLx6oP & ideone.com/i9nWXV
 
nwp
2:33 PM
@TamásSzelei pretty cool, I'm making something similar for C that allows usage of other things than sockets
 
both g++ & clang++ differes in the output. Why ? Which compiler is right here?
 
why are you not asking on SO? Did you run with ubsan/asan?
 
@sehe: why should someone use ub santizier here for this code ?
 
...
 
nwp
@Destructor Something weird is going on with NRVO there making s look like a temporary even though it isn't. Ask a question on SO.
 
2:38 PM
You're seeing varying behaviour. You want to know whether something is IB or UB. It's your question. Do the work.
 
Ven
@nwp "weird"?
what's weird here?
 
@sehe: even I get different output on different versions of g++
 
Ven
(or were you just doing exposition?)
 
nwp
@Ven that NRVO which should only apply to s seems to jump to the M
 
Ven
@Destructor RIP you ;'( ;'(
 
2:39 PM
@Destructor So? IB or UB.
 
Ven
GCC out for harambe.
 
@sehe: I think UB. But question is why it should be UB ?
 
Ven
are you schizophrenic
 
So. Back to part #1. Why are you not asking on Stack Overflow?
 
Ven
someone bring kitty back please
 
2:41 PM
oh look the "ping random people and they'll answer my question" person is back
 
Ven
he'll "destruct" your patience for sure.
 
@milleniumbug: But I haven't pinger any single user today
 
Ven
4 mins ago, by Destructor
@sehe: why should someone use ub santizier here for this code ?
 
for (auto&& user : Lounge<C++>) {
user->patience.~patience();
}
 
Ven
that's a (reply) ping :P.
 
nwp
2:42 PM
@TamásSzelei Are you really using strings to identify the functions? I would expect a library to generate IDs instead.
 
Ven
@nwp that's not what 's means.
 
nwp
@Ven sorry, better?
 
@sehe: I think I got the answer :)
@ChemiCalChems: hey you destructed me
 
@Destructor i thought you were not !patience
 
@ChemiCalChems: yes I've been destructed by that syntax :)
 
Ven
2:51 PM
@nwp :P
 
has_insert has_push_back has_emplace has_ ...
Writing container adapters sucks.
 
3:09 PM
@sehe I'm not sure what you mean by search? I'd say the primary selling point of the library is that it's allows you to easily expose functions for RPC in the spirit of Boost.Python (that is, the server)
 
@ThePhD It's rather easy with the detection toolkit from the Fundamentals TS v2 :p
 
> TS
 
@nwp that's a good idea, I definitely want to replace strings. I actually started with Boost.string_ref, but then I wanted to get rid of the Boost dependency. I couldn't find a string_view/string_ref implementation that worked on all target compilers and was reasonably small
 
Ven
\o/ :3
Morwenn, c'est plus fort que toi
 
3:14 PM
Quoi donc ?
 
Ven
CPP TMP, qui peut te battre
 
@Morwenn github.com/Morwenn/cpp-sort/blob/… I still have to write out a template for the name I want to detect, it's just a few lines shorter than the usual SFINAE?
 
Ven
j'en arrive à me faire carry part le papa richou
 
Granted, those few lines will save me some time but I'm not sure that qualifies as "worth it", exactly.
 
It makes it easy to write clear code.
 
Ven
3:22 PM
oh how I love Python (2).
print() will print ().
You think you're smart, guido van fuckface?
 
@Destructor Just ... Put it on SO
 
@Ven it’s obviously taking after the best
 
@TamásSzelei Sorry. I misread. I thought you had been looking for RPC frameworks. Obviously, not. Sorry. The docs look very pretty btw
 
what do you guys do when shit comes down but you have to code anyways to get out of the shit that doesn't let you code in the first place?
 
> what do you do when you need to program like a regular human being
 
3:28 PM
example, you can't code while being in situation x and to leave x you need to code
 
That doesn't make any sense.
 
@ThePhD exactly
 
You're framing the situation as an impossibility, when I doubt the reality is like that.
If you can sit here and chat on stack overflow, you can program.
 
@ThePhD it's not impossible, but it'll render me insane or physically ill from insanity
 
Time to become a botanist.
 
3:30 PM
@ThePhD fuck no, i hate life forms, especially vegetables
 
Sounds like you'd really hate yourself, then.
 
@ThePhD kind of, yeah
self hating is a routine by now xd
the only way to have enough time to code is to stop self hating
and coding will make me not need to self hate
 
Ven
@LucDanton Haskell is not F#, you twat!
(good one however)
 
this is not the best place to discuss this matter either
 
nwp
I thought _CRT_SECURE_NO_WARNINGS was a microsoft thing but clang-tidy just told me "warning : 'localtime' is deprecated : This function or variable may be unsafe.Consider using localtime_s instead.To disable deprecation, use _CRT_SECURE_NO_WARNINGS.See online help for details.[clang - diagnostic - deprecated - declarations]". Did clang try to mimic VS or is _CRT_SECURE_NO_WARNINGS not really a microsoft thing?
 
3:33 PM
VC++ inserted that into their source code
 
Oh man. CRINGE /cc @wilx dumpert.nl/mediabase/6865371/de337fa8/… /cc @rightfold
 
The compiler doesn't explicitly check
You're triggering a preprocessor directive tucked away somewhere.
 
Ven
@sehe cringing so hard right now.
 
@nwp So you still need to define it, as long as you use the VC++ library.
 
nwp
@ThePhD ah, that makes sense
 
3:36 PM
plot twist, he is really called Hu Mungus
 
The correct spelling is in there, IIRC
 
Hugh Mongous
 
Looks more normal
 
wait, is that really his name?
i doubt so, but anyway, that's an awesome way to dismiss someone
 
I don't doubt it at all. He couldn't be such a good actor
 
3:41 PM
@sehe true too
 
@sehe thanks
 
WTB break n;
 
@ThePhD goto
 
@Griwes And then get flamed to death?
 
@ThePhD then lambdas + return
 
3:46 PM
@Griwes Oh, that's a good idea.
 
I know.
:D
Unless you also need early return. :D
 
Bat lickers lick bats in bat cave, get caught http://www.theverge.com/2016/8/23/12605706/bat-licking-cave-white-nose-syndrome-forest-service https://t.co/1MYNwovYiK
 
@ChemiCalChems Oh, stay away from him. He's a pain by himself, but it gets worse--he always drags around his younger brother, Hu Jass.
 
@JerryCoffin at first i thought you were talking about destructor
 
@ChemiCalChems Of course not. The destructor is named Gozer. Don't you know anything? :-)
 
3:56 PM
@Griwes std::terminate()
 
@Khaled.K Does it really qualify as "Caught" when they were stupid enough to do everything they could to incriminate themselves?
 
Ell
@sehe euhhhh
can't get through it
 
It's easy. No need to pay close attention beyond the first minute or so
 
Ell
I got halfway and the cringe made me close it
 
Ven
4:21 PM
media-tyc.com /cc @LucDanton @AndreasPapadopoulos @Rerito
 
C'est la formation que j'ai suivie
 
4:41 PM
@JohanLarsson a calculator app?
 
dunno
 
The International Obfuscated C Code Contest (abbreviated IOCCC) is a computer programming contest for the most creatively obfuscated C code. Held annually in the years 1984-1996, 1998, 2000, 2001, 2004-2006, and then since 2011, it is described as "celebrating [C's] syntactical opaqueness". The winning code for the 22nd contest, held in 2013, was released in January 2014. Prior to 2004, entries were submitted by email. In 2004, for the 17th IOCCC, the competition switched to using a web-based submission process. Entries are evaluated anonymously by a panel of judges. The judging process is documented...
 
most of the enteries are not difficult to make, but check out the first example in wikipedia, that's not an easy one
 
5:01 PM
@JohanLarsson there was a code-golf for printing happy easter in ascii-art that I thought it was a popularity-contest at first, and wrote code that looks like easter egg. go down to the last one
 
nice :)
 
@JohanLarsson One of my favorites was this one: ioccc.org/1989/roemer.c, but for most complete insanity: ioccc.org/1989/westley.c A program that does rot13 and/or reversal, and you can do rot13 or reversal on the source code, and still get a working program--which does the same things, but works differently in each of the 4 permutations of the source code.
 
haha, probably took a while
 
What was that iteration advancing function called?
Was it std::advance or std::next ?
 
@ThePhD Either. next is the one that returns the new value.
 
5:07 PM
Guess I'll go with the next-value one and then dereference it immediately.
 
@JohanLarsson Hmm...I think in this case, the time involved was probably measured in hits of LSD more than movement of clock hands.
 
Wonder what other members are available on Lua tables...
Huh. Absolutely no member functions.
 
Probably worth adding: this one was co-written by Landon Curt Knoll, who was one of the founders of the IOCCC, as well as discoverer of (if memory serves) three different Mersenne primes (each, the largest known prime at the time). The first he discovered at 18, making him the youngest person to have discovered the largest prime known at the time.
 
SHRUG Welp, works for meee.
@JerryCoffin That's pretty insane.
And he wasn't even old enough to drink.
 
nwp
@ThePhD only in weird countries
 
5:21 PM
@Ven dsl le concept est trop kopliké pour moi
 
5:48 PM
@nwp All countries are crazy (in different ways, from different viewpoints).
 
6:02 PM
Have you guys seen this?
If so, what do you think?
 
6:19 PM
@caps Right off the bat, the terminology he uses is incredibly, well, American.
 
user1804599
7:04 PM
@sehe oh the cinch is unbearable
 
@EtiennedeMartel Yes.
 
user1804599
19
A: How to disable the prompt on error?

Martin ScharrerUse the -interaction=nonstopmode command line argument or the \nonstopmode macro to disable stopping on errors.

 
user1804599
Life saver.
 
I felt like he understated how much of an oversimplification his conservative/liberal spectrum is for programming. (He acknowledges it is a bad fit for real politics)
 
There's no way for a generic algorithm like std::find to invoke search optimizations like hash-lookup and such for map, right?
If I wanted this I'd have to do a container-based one?
A container-based call of map.find, that is.
 
7:16 PM
@ThePhD Well it certainly seems that way to me.
There would have to be a template specialization that checks if the iterator is from a map, somehow gets a ref/pointer to the parent map, and does find on that; right?
 
Yeah, not possible...
Damnit, iterators. =/
 
And that would only be if you give it the default predicate.
Because the predicate might be finding based on the value and not the key
 
7:28 PM
@caps According to him, I'm "batshit liberal", "moderate conservative" and "extremist conservative". Seems to me that in conflating orthogonal issues into a single dimension, a bit of relationship with reality has been lost.
 
@JerryCoffin Yeah, that's how I felt as well.
I like type safety but think debuggers are useful. I don't think that metaprogramming is even "liberal" by his definition.
 
@caps whoa whoa! Someone invented associative thinking and analogies
 
Especially given that metaprogramming is just a really awkward way to do strongly-typed functional stuff, which he defines as very conservative. Maybe he is thinking of a different definition of metaprogramming.
 
He is. Meta programming doesn't have to be about strongly typed stuff
It just happens to be so in C++, Haskell etc.
 
Interesting.
 
7:39 PM
@sehe Perhaps more interestingly, he classes concern for efficiency as conservative, but assembly language as batshit liberal...
 
Yegge(TM)
 
@JerryCoffin Because safety, I think.
 
Ven
@caps what do I qualify as, considering I'm pro-polyglotism?
Apolotic? Anarchist?
 
@Ven You like lots of languages?
That would make you pretty liberal in his spectrum...
Because conservatives don't like people having to learn.
eyeroll
 
Ven
But I like conservative-liked langs
 
7:52 PM
Like Haskell?
He consider C++ to be only a little conservative.
 
:shrug:
 
I'm not sure how scheme ended up being classified moderate
 
8:07 PM
After reading (almost) the whole thing, I wonder whether the real intent here isn't quite different from (nearly the opposite of) what he claims. He's clearly averse to static typing and such. Most programmers think of themselves as reasonably liberal/progressive. So, by labeling the things he doesn't like as "conservative", he attempts to shame people into going along with his position since other tactics have failed.
 
Xeo
@JerryCoffin Who's that? Sounds like a crazy person
 
@Xeo Sorry--talking about Steve Yegge's latest rant (which @caps linked a ways up). plus.google.com/110981030061712822816/posts/KaSKeg4vQtz
 
Xeo
guh, tl;dr and political stuff :(
 
Actually, looking at the date, probably not (even close to) the latest. Pretty old, AAMOF.
 
8:27 PM
tfw there's no std::vector::find
Generic code is a fucking trainwreck. =/
Meanwhile, at the committee: "we don't need universal call syntax."
Yeah, go fuck yourself. :l
 
user1804599
@sehe I'm making my cv
 
See?
 
user1804599
how :P
 
because you DM it to me :)
 
user1804599
LinkedIn DM?
 
8:31 PM
Okay guys I need some good Irish drinking songs
 
user1804599
LinkedIn DM.
 
user1804599
I never made a cv before.
 
user1804599
I don't know how to do it properly.
 
Good irish drinking song : youtube.com/watch?v=LE0q5cSmhaM
@Mikhail alternatively, youtube.com/watch?v=qOXI6giLMGU
 
@James Also, youtube.com/watch?v=V-LyUCV80d8 but I can't find many more
 
user1804599
8:36 PM
@sehe I sent it
 
@ThePhD sure let's make O(n) operations easy to do
That's a graeat ideea
 
Umm, there is std::find, already...
 
And the other not O(n) way to search a vector is...?
 
@ThePhD use an organized data type and binary search it
 
There is none, that's the point
 
8:38 PM
Presupposing that they can be swapped for one another.
 
So use std::find
 
Again, generic code, sometimes I have a map, other times I have a vector.
 
Nothing stops you from using std::find on a map
 
And incurring an O(n) penalty when you can get it for cheaper.
Maybe range algorithms will fix this.
 
Something like std::find(std::logarithmic, c, e); would be interesting
(where the tag type would make it a compile error if it can't be done with such complexity or lower)
 
8:45 PM
That is a bad idea, because there is only one tag per container. The tag might as well live in the container...
 
not sure what you mean by that
 
Each container has only one correct tag
 
@milleniumbug Though I never really tried to flesh it out, I once thought we should basically just have two containers: linear and associative, with some template parameters to specify the other characteristics you wanted, and the compiler would sort things out from there. Not sure it would really help though--linear<x,y> would still be an entirely separate type from linear<a, b>, so the fact that they were both instantiations of the same template wouldn't really help much.
I suspect that (although I wasn't aware of it at the time) I was basically trying to invent Concepts.
@ThePhD What really fixes it is concept maps.
 
@Mikhail Overload std::find on find(std::linear_tag, const std::vector<T>& v, T k) and find(std::logarithmic_tag, const std::map<K, V>& m, K k)
 
@JerryCoffin I'm not too familiar with concept maps.
 
8:50 PM
The tag is redundant, you can figure it out from the container
 
No, it's not
It's there to tell what maximum computational complexity you can tolerate
 
@ThePhD A concept map is basically a way of reengineering some existing code to fit a concept. I.e., the concept says find(x,y) is allowed, and a concept map says: "for this type, find(x,y) should be mapped to x.find(y).
 
But you always want the minimum complexity... So there is always only one answer per container...
 
@JerryCoffin Wasn't that what universal call syntax was for?
 
@ThePhD Sure. Just make your find( C, E ) container/range based, have it detect if there is a C.find(E) method, call it if it is there and otherwise do a std::find on the ADL-enabled begin/end of C.
 
8:52 PM
@Mikhail It's not redundant in a generic context - basically without knowing the container, you'd force the compiler to check for you whether it's possible to do the operation in O(log n) or not.
 
@Mikhail His point is that if you say "logarithmic", it should either happen logarithmically, or else fail to compile at all.
 
@ThePhD UFCS was to make the language "easier to teach". At least that's what Bjarne said.
 
@Yakk That's what I'm doing at the moment, and it's a bit bunk.
 
All the attempts resulted in a language that's horrendeously harder to teach, so...
@ThePhD Concept maps are like explicit typeclass instances in Haskell. /cc @Ell since this is virtually (:P) what we've talked about earlier.
 
user1804599
if you lack formal education, should you state that on your cv, or just not mention formal education at all?
 
8:54 PM
@ThePhD It would cover this specific usage, yes. Concept maps would also allow things like mapping find(x,y) to x.lower_bound(y) (also, concept maps predate the universal function call syntax proposal, so at the time the latter didn't exist at all).
 
Ah.
Well, I'm all for the more powerful option.
Anything that can make wrangling the naming system for all this stuff easier.
 
@ThePhD ...I think the more important difference is that concept maps don't screw up the lookup rules. (While UFCS does, in a horrible way.)
 
@ThePhd maybe if constexpr will make your life easier. I think it might allow a really simple body for your custom find... (but I'm uncertain if it will work)
 
I hope it never returns after it's been beaten into submission and then rejected by EWG in Oulu. :D
 
I thought the committee already gatling gun'd UFCS?
 
8:59 PM
@Griwes Can I guess that your feelings toward concept maps are at least a little less hostile?
 
@JerryCoffin I love concept maps.
:P
 
 std::find(std::linear, vector, key); // linear
 std::find(std::linear, map, key); // logarithmic
 std::find(std::logarithmic, vector, key); // compile error
 std::find(std::logarithmic, map, key); // logarithmic
 
It seems that most of C++ features that I love aren't in the language... :D
 

« first day (2138 days earlier)      last day (2810 days later) »