« first day (1793 days earlier)      last day (3381 days later) » 

12:00
I think the Lounge<C++> regs could spawn a pretty good dick jokes ebook.
4
user406009
@Morwenn Nah, they tend to be the same joke. Over and over. In and out.
@fredoverflow Yeah, but the Lounge's attention span is... Well.
> hahaha they're fucking us so hard even rightfold would not like it
AHAHAHAH
@Lalaland The lamer the better.
12:01
10/10 butt quote
@ElimGarak what do you mean by that?
@ElimGarak What would the target audience of a Loungebook be, except for regular Loungers?
oh look at this cat, it's so cute
what were we talking about?
@MarcoA. meh
@fredoverflow beginners
noviecs
@MarcoA. cats probably
12:02
intermediates
experts
Beginners don't give a crap about the topics we discuss.
@fredoverflow Well, a lot of folks, provided that we refrain from cock jokes.
@fredoverflow well...
@fredoverflow Everybody cares that beginners know certain things
> Lounge<C++>: a tale of move semantics, cocks, cimpolers and verbibols.
10
user406009
12:03
The book would be for all aspiring language lawyers.
You shouldn't bother beginners with move semantics and template metaprogramming and crap.
@Lalaland We already have the standard for that.
@fredoverflow yeah
@Morwenn what about funcitons
beginners shouldn't be allowed to breed, but unfortunately the more you become a C++ expert the less... err... how can I put this.. the less you know how babbies are formed
3
@набиячлевэлиь It doesn't sound that good :/
12:05
should have been compilators
other than that perfect title
oh hi Andy
hey Marco
cheers guise
The cover of the book should be a hard cock.
Noun: compilator ‎(plural compilators)
  1. One who engages in compilation.
  2. compīlātor m ‎(genitive compīlātōris); third declension
And it is missing pointars.
user406009
12:06
@ElimGarak What? Make it an erotic novel?
user406009
A frame story of a romance and sex.
user406009
While discussing C++.
To keep people interested.
@ElimGarak at least for the hardcover version
@Lalaland I don't know, Loungers often make an impression on me that C++ fucks them hard on a daily basis.
12:08
Well, it's complicated.
@AndyProwl Nice one :D
hardcocker
I use Javascript often.
hardcocker vs raperback
Comes with a complimentary Viagra pill, so you can use your hard cock as a book stand.
@ElimGarak Effective Procrastination
Is it Javascript or JavaScript?
12:09
@edition it's ok son, Jesus loves you as you are
Let's see...
we already have a cover: i.imgur.com/YfETD70.png
that's a pointar
@fredoverflow ECMAScript?
Okay I think I should get rvalues now
@fredoverflow That's something I would buy.
12:11
values of rvalue references don't matter after use, only that they remain valid, right?
18 mins ago, by fredoverflow
Move semantics aren't obvious because most C++ programmers have no clue what an rvalue is, or even worse, think they know what an rvalue is, but couldn't be more wrong about it.
@VermillionAzure You are confusing rvalues with rvalue references.
whats a rvalue?
haha
@edition rightfold-value
@AndyProwl Perfect product placement.
12:12
@fredoverflow rvalue references
return, reference, rhetorical, right?
Neither the "r" nor the "value" in "rvalue" stand for anything related to the concept of rvalues.
lvalues and rvalues are not values -- they are expressions
can you give an example of a rvalue and lvalue expression
please
@edition lvalue = x;
@edition rvalue = 1+1;
@edition *plz
12:14
23
Q: Real life examples of xvalues, glvalues, and prvalues?

M3taSpl0itI was wondering if anyone could tell or explain some real life examples of xvalues, glvalues, and prvalues?. I have read a similar question : What are rvalues, lvalues, xvalues, glvalues, and prvalues? but I did not understand what everyone meant. Can anyone explain in what cases these values a...

user406009
> give me the codes plz
@fredoverflow ah very kinky.
checks the posted link... more than 10 lines.. uff.. don't wanna read... KTHXBYE
I was just joking @fredoverflow, the link was useful. thanks.
cppreference article describes that lvalues are non-temporaries, and prvalues are temporary. Can you emphasize on this? — void.pointer Aug 11 at 20:40
do emphasize
@ElimGarak graphviz did it
@MarcoA. I don't know what "emphasizing on s/t" means.
Did someone drop edition on his head when he was little?
@fredoverflow neither do I.. just ignore it
OH WAIT A MINUTE
12:21
OKAY
@MarcoA. Also, why invest any more energy into stack overflow? I already have my SO stickers, coffee mug and T-shirt, TYVM ;)
is rvalue/lvalue somehow related to the immutability and nature of optimization because of immuntability in Haskell?
@ElimGarak u no realize i am joking.
@VermillionAzure no, const is mostly orthogonal to lvalue/rvalue.
Vermillion. Go write some code. Seriously, just pick a project and implement it.
12:22
@fredoverflow I collection cups of the places I worked at instead
but I never use those
@ElimGarak no, I'm a pedant and I have OPCD and I'm slightly autistic. And I enjoy programming.
I haven't used mine either. The cup is still in mint condition.
Android uses only 1/3 of the bandwidth compare to that of iphone when one listens to music repeatedly on youtube.
user406009
Make sure to watch the music videos where there isn't any video to save bandwidth.
I listened to some music for like 2 hours on iphone, it costed me 300MB while as the same songs listened on Android only used up 100MB
12:26
Don't listen to music on YouTube. Problem solved.
don't listen to youtube on iphone you mean
@chmod711telkitty Google owns youtube, so... gasp
I have thought about that ...
they are secretly conspiring against apple.
I pay roughly $10 for 1GB of data, so 2 hours of music (some songs repeated) only costs me a dollar on android.
I have $145 credits on android, that's 290 hours of songs
12:29
There is no subterfuge involved. It revolves around how a particular app handles the buffered information, how much memory Telkitty has been already drawing from the system with other applications and how often she invalidated the buffered data (by scrubbing and stuffs). It is in Google's best interest to minimize bandwidth everywhere.
looks for the definition of subterfuge on Google
user406009
Telkitty, you can also just download the YouTube videos beforehand.
> deceit used in order to achieve one's goal.
user406009
That's what I do.
ah, yes
12:31
oh that reminds me
anybody have a good idea of a project to do?
Hello world would be right up your alley. :P
@ElimGarak That's done already
I have pong in C++ as well
@VermillionAzure hey, if you want something to do, would you like to help me with a C++ project?
@edition what
@VermillionAzure it involves libxml to begin with.
12:32
@Nooble What's up with Icicle?
@edition what is it
@VermillionAzure well, its actually two potential projects involving libxml
@edition just tell me
OOOH TALOS YESS
@Borgleader Any new screenshots from your foray into OGL?
@VermillionAzure a simplified remake of xmllint.
12:34
@edition which is?
@VermillionAzure continue this conversation in another room?
@edition go
i'm in the middle of a fighting game match or the next 5 minutes or 4 or so though
maybe not the remake of xmllint, unless you are still interested in that project?
@edition i don't know what xml lint does
damn, the one chance I get with collaborating with someone here, and I do a bad job of it
@VermillionAzure xmllint is an example program
to test libxml
it has a shell for stepping through the tags of an XML document
and it lets you evaluate XPath expressions
12:38
@edition k i won
okay first of all
So it's going to be a checker for XML code
@VermillionAzure essentially, yes
@edition check the other room
12:57
@edition So is anybody else interested in working on an XML parser/linter with us?
lol no
omg no
at least you are being honest.
@VermillionAzure lint XML or lint XML parser?
@fredoverflow replica of xmllint
user1804599
13:17
template<typename A, typename B>
A* dynamic_cast(B* x) {
    try { throw x; } catch (A* e) { return e; } catch (...) { return nullptr; }
}
Suitable testing framework for a project?
13:29
@elyse sure, that works
you need to add some more extra static_asserts to be equivalent to the built-in dynamic_cast though
I don't think you can check if a type T is an indirect base of U
too bad you need to provide type as data if you need it at runtime
or just use Python :P
@milleniumbug where the data is implicit everywhere. Or R
I like R
> data is implicit everywhere
what what
@milleniumbug Oh, sorry.
Say we have an int i; in Python and C++.
in C++, there is no underlying data that tells you what type int i is at runtime. It's literally just the value of i.
13:34
int i; won't compile in Python :P
@milleniumbug you know what i mean
In Python, the type is stored somewhere at runtime.
yeah, let's say int i = 5; for C++ and i = 5 in Python
@VermillionAzure well, it is
And since Python is dynamic, if I'm not mistaken, Python often has to check for type without type annotations
there's duck typing - if an operation doesn't make sense for a type, the exception is thrown
I don't understand this question: stackoverflow.com/questions/2886393/…. What was puppy trying to achieve?
13:35
In Python, it intentionally hides the point that the type is stored somewhere at face value. You no longer need to see it in the code directly; you'll have to extract it manually should you need it.
In C++, if you do a.non_existing_method(), you get a compile error, because the name can be found out at compile time - and it can be found at compile time, because the type of a is always the same and known at compile time
@milleniumbug Exactly.
@milleniumbug That's a good thing because a stronger type system makes easier to reason about.
Given a variable to the function, the compiler will guarantee it is of a certain type.
Sure. That's static typing
user406009
If only we had concepts, then we would get much better errors for those compiler errors.
@Lalaland But, why did we need concepts in the first place?
Why do we even need interfaces?
@VermillionAzure Well, the same reason you prefer error checking at compile time and not at run-time
Earlier error checking
@milleniumbug But, this can correspond to a deeper thing: we are more able to reason about our types
It's easier to apply logic to static types rather than dynamic types of data.
Let's say f(x) calls g(x) which calls h(x) which calls l(x).
(also all these functions are templates)
Then, there's an invalid operation in l(x) (for example, you call x.non_existing_method() in there)
13:44
@milleniumbug okay
user1804599
safeFromJust :: Maybe a -> Maybe a
safeFromJust (Just x) = Just x
safeFromJust Nothing = Nothing
@VermillionAzure The result is that compiler shows every function name in the compile error
user406009
@edition Wow. Props to that poster. The true hero SO needs.
user406009
@elyse What about that example?
user406009
Isn't that just: safeFromJust = identity
user1804599
13:46
It's like fromJust, except total.
@milleniumbug Never mind the compiler error output (Yes! I know it's important but I wanted to focus on something else since concepts and compiler output are a pretty common cited corollary of concepts in C++)
user406009
@elyse Not really. Completely different type signature.
"You can't instantiate f(x) because you can't instantiate g(x) and you can't instantiate that because you can't instantiate h(x) and you can't instantiate it because you can't instantiate l(x) because non_existing_method() doesn't exist in x"
@milleniumbug And it's correct.
To be honest, if compilers could output messages graphically, everything would be much easier to see.
user1804599
@milleniumbug fuck duck typing.
13:47
@elyse Why is duck typing so bad
@VermillionAzure Correct, but also not very useful
user1804599
user image
6
@milleniumbug With the right tool and output format, you could theoretically translate the chain of errors and relations into some sort of graph to represent the affected parts of the program
@VermillionAzure That's how STLFilt does it, but it's specific to a single implementation
as in it translates the chains into a simpler error messages
If you declare a concept for x that a function instead, then the situation is different
@milleniumbug But that's not why concepts are useful to the code itself, right?
It can't just be prettier compiling outputs
13:50
So if you have a f(MustSatisfyAConcept x)
then if you call f(x), compiler can check if it satisfies a concept
user1804599
Concepts in code are useful, because now they are checked by the compiler instead of residing in the manual only.
If it doesn't it can just say
@elyse ok, that was funny
user1804599
Without concepts in code, you have to check them manually and write them down in the docs.
"x doesn't satisfy MustSatisfyAConcept in f(x)"
13:51
Concepts and types seem related to sets and maybe category theory (idk about category)
user1804599
With concepts in code, they are checked automatically and they are extracted into the docs automatically.
user1804599
Double win.
compare it to
4 mins ago, by milleniumbug
"You can't instantiate f(x) because you can't instantiate g(x) and you can't instantiate that because you can't instantiate h(x) and you can't instantiate it because you can't instantiate l(x) because non_existing_method() doesn't exist in x"
Also, if I'm not mistaken, concepts will allow to get rid of some SFINAE madness.
user1804599
For the same reason preconditions and postconditions should be in code, and types too (fuck Python).
13:52
Why don't people try harder to directly translate set theory and classic logic into code?
@VermillionAzure they're the main motivation, but there are some other benefits from concepts
user1804599
Set theory is only really interesting with infinite sets, and somehow people haven't found a nice way to encode infinite sets in memory.
Eh, Python has moved to « Types are not so bad. We can't fully show out support, but here, have type hints at least ».
@elyse But that's also not really true.
Types themselves can be considered sets in of themselves
user1804599
@Morwenn can't wait till Mypy goes stable
user1804599
13:53
it uses Python 3.5 type hints
The second reason C++ compile errors are terribad is because of compiler ~helpfully~ listing all the overloads if it can't fit any of them
@elyse It seems that many projects are beginning to use type hints. That's good.
user1804599
the problem is that generics won't be reified
user1804599
so downcasts are unsafe
@milleniumbug It is helpful, because otherwise debugging too strict SFINAE conditions would be a PITA.
13:56
Which is a helpful information all right, but it's too much and it gets interesting when the function declaration is template<typename T, typename std::enable_if<std::is_convertible<T>::value && std::is_whatever::value>::type* = nullptr, ...> void f(T whatever)
What I wanted to say was that, aren't concepts are a model to define traits or predicates that define membership of sets which model types?
user1804599
templates are pretty bad really
Concepts could also be useful there if you can overload on them
user1804599
you need something that's fully checked before instantiation, like C# generics and Rust traits
user1804599
otherwise it's just dynamic typing at compile-time, i.e. a PITA
13:59
Third reason C++ compile errors are bad is because the typedefs are substituted with a full name of the type
user1804599
and also not Turing-complete oh god wtf
So std::vector<std::string> becomes std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>
Some compilers can help there by not listing default template arguments
I don't think you can fix this easily
user1804599
I don't see why not.
@milleniumbug figured out what I needed to do to get the msys2 installed mingw64 to work with CLion :)
The problem is that the compiler can't always tell which parameters you want to know about...
14:03
@melak47 good, good
user1804599
have the compiler emit HTML
user1804599
with buttons to expand types
@milleniumbug had to install the mingw-w64-x86_64-make, gdb packages, so that copies of the binaries ended up in the msys2/mingw64/bin folder where CLion looks for them
user1804599
and syntax highlighting and code formatting
user406009
@elyse Lol.
user406009
14:03
And JavaScript for interactivity as well, right?
well, that would help all right
I'd rather use a separate tool for that
Well yeah, that's exactly what we need: smart error message tools in IDEs instead of bare error message dumps.
So a compiler can output the info and the IDE can parse it
Lint tools and unit testing tools often produce formatted output, why couldn't a compiler do that?
@milleniumbug and even clang works! :)
14:07
oh no, its 2AM again.
user406009
I know. 3 more hours left!
My favourite way of triggering a lot of C++ compiler errors is declaring a variable of type std::vector<void>
@elyse html is a terrible idea, but I agree it should be markup
user406009
I would prefer it if the compiler output something like xml or json.
user406009
Other tooling would format it as required.
14:10
json is good
People have tried again and again to parse compiler outputs only to find out it's too unstable
Yeah, the real solutions is to implement formatted output in Clang or GCC and make sue the other one is jealous and makes the same thing to promote its error messages.
@Lalaland well, when I wrote markup I really meant XML, but in fact I think json would be better
@Lalaland with xml output one could apply transformations to it quite effectively. XSLT is a powerful language but takes some getting used to
@TomW LISPppppppp output format
g++ -g -formatlog="lisppppp" foo.cpp
14:13
template<typename T />
user1804599
@milleniumbug reminds me of a well-typed Scala expression:
user1804599
scala> :t List(List(1), Vector(1))
List[scala.collection.immutable.Seq[Int] with scala.collection.AbstractSeq[Int]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with scala.collection.AbstractSeq{def dropRight(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def takeRight(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def drop(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def take(n: Int): scala.collection.immutable.Seq[Any] with scala.col
@elyse holy hell
user1804599
got fixed later though :(
@TomW there's a XSLT-like for JSON
14:17
Given a type T and a function F(T), can you ensure that F(T) will always evaluate to a valid output if it works for one case of T??
> can you ensure that F(T) will always evaluate
nope
user406009
@VermillionAzure You would have to have a limited scope.
user406009
I remember hearing something about the complex number plane.
user1804599
@VermillionAzure There are languages in which you can do that. Not in C++.
also what do you mean "one case of T"
user406009
14:19
That if one complex derivative exists, they all do.
@milleniumbug if my function works for one case, it'll work for all
that clears helluva lot
case of what
values, types
@milleniumbug of a function
types
@elyse Do you think Scala mixins are worth their complexity?
arrrrrrrrgh
14:20
if it works for one value of a type, it'll work for all values of a type
user1804599
@fredoverflow what are mixins?
The whole traits and with business.
user1804599
No. You should get rid of non-type-class methods entirely, and have only type class methods and free functions.
user406009
@elyse Have you used CRTP? That's the equivalent in C++.
user1804599
14:21
It's more general without all the complexity.
@VermillionAzure then no
user1804599
@Lalaland I have no idea what you are referring to.
or is it a trick question
@milleniumbug It's no.
user406009
CRTP is the equivalent of mixins in C++.
14:22
auto f = [](int a, int b) {return a/b;};
in general, you can't check if arbitrary function will return, not to mention if it will evaluate to expected value
user1804599
there are languages in which all functions return, but they're not Turing-complete
sure, like Coq
user1804599
unless they have something besides functions that is Turing-complete, but w/e
@milleniumbug I'm trying to study the halting problem
and why it prevents deterministic analysis with an algorithm
14:25
it's pretty simple actually
but I had to take multiple passes of reading
CRTP is a cool tool.
@Andy how far along are you guys with GEB?
I wanna catch up
@R.MartinhoFernandes You guys have a book-reading club?
I hope we still do.
I kinda dropped out :(
I wish I understood the principals of GEB properly.
user1804599
14:33
GHB
are loops even logical?
Is that even a question.
@R.MartinhoFernandes Can you express a loop without using imperative form?
user1804599
What is imperative form
user1804599
do you mean recursion?
14:37
@elyse No I mean using the usual imperative style (without it)
user1804599
Please know what you're talking about.
What does that have to do with logic.
> >Cinch
> >logic
Can you make music without sound?
I mean, if a function is not allowed to call itself, can it produce an infinite loop without ordering of instructions?
14:38
(The answer is "yes")
@R.MartinhoFernandes Uh... how?
@ElimGarak Can't find time to work on it.
user1804599
If you have no recursion, and no backwards jumps, you don't have loops.
@Nooble You had the entire damn weekend
I really wanted to implement a bunch of cool stuff too.
14:40
@elyse So, in that case, can we assume that the execution of a program will always continue forward since it cannot go back?
@набиячлевэлиь I have to compete 3 research projects by Tuesday.
user1804599
@VermillionAzure look at BlooP.
user1804599
It has something similar to what you want.
4′33″ (pronounced "Four minutes, thirty-three seconds" or just "Four thirty-three") is a three-movement composition by American experimental composer John Cage (1912–1992). It was composed in 1952, for any instrument or combination of instruments, and the score instructs the performer(s) not to play their instrument(s) during the entire duration of the piece throughout the three movements. The piece purports to consist of the sounds of the environment that the listeners hear while it is performed, although it is commonly perceived as "four minutes thirty-three seconds of silence". The title of...
@VermillionAzure ^
14:40
@elyse So if it's not Turing-complete, perhaps the halting problem doesn't apply?
user1804599
It avoids the halting problem by not having language constructs that allow you to write programs that don't halt.
user1804599
In BlooP you can't recurse, and loops must all have an AT MOST N TIMES clause, where N is a finite integer.
user1804599
And there's no FFI. Hence all programs halt.
@elyse That... actually sounds quite helpful.
user1804599
14:58
nice
@ElimGarak None. too much witcher

« first day (1793 days earlier)      last day (3381 days later) »