« first day (1812 days earlier)      last day (3148 days later) » 

5:01 PM
I just discovered that std::stable_partition existed.
 
is there a way to separate the conditional output without separate if statements, so like say: x=1 y=2 z=3:: if (x > y && y != z || (x+y) == z)
 
user3790646
@CMS_95 Please, explain what you want to do again, I don't think I understood it
 
@Morwenn tsk tsk...
 
If I change std::partition to use std::stable_partition in my quicksort, it stops working. So... which one is broken?
 
std::cout << std::boolalpha << std::is_same<decltype(back_inserter(out))::value_type, void>::value;
 
5:04 PM
@Andrey so I want a if statement to compare about 2-3 things but I need the output to different accordingly.
 
> true
Wait what?
 
@CMS_95 I can't parse what you're saying
 
user3790646
@CMS_95 No, I don't think there's a way to do different actions using only one if statement
 
cease wording if unable to english
and instead provide code + sample input and output
 
5:06 PM
@Andrey okay thanks any way
 
New headphones arrived, gonna listen to some Linus to try them out
 
@JohanLarsson I ordered some for work gonna arrive monday
I used the in-ears I use for my phone for two months and I can't take the annoying pain anymore
they're not exactly fit to be used for 4+ hours
 
@JohanLarsson Sorry, but even good headphones are inadequate to properly express the idiocy awesomeness that is Linus!
 
only upside with in ear is that they don't leak sound
 
yea I'm a bit worried about sound leaking
people around me will hear me listen to things like youtube.com/watch?v=VCLxJd1d84s
 
5:09 PM
@JerryCoffin Linus is hardly an idiot, most successful man in software ever?
Up there with the google guys imo
 
the sound quality was great and I hope the new ones will match it at least a little bit
they were mid-range in-ears
 
@JohanLarsson That depends. Good IEMs are quite comfortable (e.g., I've worn Westone's for ~12 hours at a stretch with no discomfort at all).
 
I went for wireless with noise reduction
 
well more like high-end at least as far as sennheiser products go
but there are more expensive in-ears from other brands
 
@JerryCoffin but you are a c++ man, used to suffering
Masochist to sadist: "Choose language for me" Sadist:"C#" Masochist "Nooo"
 
5:12 PM
There is a reason for all of those to be shown; for example, when you're working with templates. You need IntelliSense to be able to detect what you're thinking. — bku_drytt 40 secs ago
:v
 
@JohanLarsson Hardly. He's a decent coder, and a semi-decent project manager, but mostly he fell into the vacuum left by the fact that for years UNIX vendors were unbelievable idiots. Well, idiots is sort of the wrong word--they were in the business of saying "open" as loudly and often as they could while actually having as much (or more) vendor lock-in than Microsoft ever managed.
 
@JerryCoffin heh
I'm terrible at day planning
had to grease the chain in almost complete darkness
but that means the bike is finished
of course i have cat appointment today so i can't ride yet
FML
 
@JohanLarsson Good joke--unfortunately, I've used C#. It's decent enough for the intended purpose, but it wouldn't be at the top of my list of choices for the things I do (or probably even on the first page or two).
 
Yeah, gets verbose
I don't have a page with languages
read the first chapter of the rust book yesterday
 
what's wrong with C#, I think it's great
minus the times when I want features added to it
 
5:17 PM
@JerryCoffin what is your top 3?
 
which is often but
 
@AlexM. this is wrong with C# imo. So much text.
for so little type
 
so boilerplate?
I'd put other things before that, like the inability to specify that something's own state must sit in place (i.e. C++-like const)
and boy do I miss TMP
 
user1804599
Use F#.
 
teach me
@AlexM. tmp?
 
5:21 PM
templates
I liked those the most in C++
 
Ell
@ʎǝɹɟɟɟǝſ odd
 
ok, never used them
 
remember my Either<> problem? it's so trivial to do in C++ with enable_if
basically impossible to achieve identical results in C#
and I'd love a less verbose way to do currying
 
user1804599
@JohanLarsson type AssemblyAndKey = { assembly: Assembly, key: Key }
 
4
A: Output iterator's value_type

UncleBensThe real value type of the iterator could well be the iterator itself. operator* may easily just return a reference to *this because the real work is done by the assignment operator. You may well find that *it = x; and it = x; have exactly the same effect with output iterators (I suppose special ...

This doesn't convince me one bit
 
Ell
5:22 PM
oh wait
 
next to what I saw haskell doing, std::bind was my favorite way to do partial application
 
@JohanLarsson Well, I'm working on a few different projects. Each would have a different first choice; C++ is probably around second or third place for each though, and the first choice for one would be a long ways down the list for at least one of the others.
 
Ell
it convinces me
 
and I know I could spawn lambdas
but in some circumstances I don't see them as readable as std::bind was
 
@JerryCoffin name them, flash some fancy
@elyse :) but in the same time :(
@AlexM. I forgot to read it
looking it up now
 
user1804599
5:27 PM
> type Point = { x: int; y: int };;

type Point =
  {x: int;
   y: int;}

> { Point.x = 1; y = 2 } = { Point.x = 1; y = 2 };;
val it : bool = true
> { Point.x = 1; y = 2 }.GetHashCode () = { Point.x = 1; y = 2 }.GetHashCode ();;
val it : bool = true
 
user1804599
I don't understand why many languages make a basic thing that is so incredibly useful like this so difficult to do.
 
@JohanLarsson imagine a class Either<TLeft, TRight> with these two in it
// Enable this if TLeftResult != TRightResult
Either<TLeftResult, TRightResult> Cases(Func<TLeft, TLeftResult>, Func<TRight, TRightResult>)
{ }

// Enable this if TLeftResult == TRightResult
TLeftResult Cases(Func<TLeft, TLeftResult>, Func<TRight, TRightResult>)
{ }
 
Xeo
@AlexM. nonono
 
no way to have left & right share an interface?
 
Xeo
don't do that
 
5:29 PM
@Xeo I'm not, it was an idea
 
Xeo
that just makes it shitty to use in a generic interface
since they now need to discriminate too
 
also how do you compare if they are different types?
 
@JohanLarsson that would defeat the point of making left and right anything
in an implementation I found
 
Xeo
if the user wants to collapse the resulting either, just provide that
 
the guy just accepted functions of signature void(TLeft) and void(TRight) for the cases
but that basically only allows side-effects
@JohanLarsson std::is_same
surely there must be a C# way
 
5:31 PM
IEqualityComparer<T>?
or IEquatable<T>
 
@JohanLarsson At the moment, I'm working on one that I'd probably prefer Unicon, but I'm the only one on the team who's ever used SNOBOL, Icon, or anything similar, so it's essentially out of the question. Racket would probably also work reasonably well for it, but (again) I'm the one who's used a Lisp enough to notice.
 
@JohanLarsson I think the bigger problem is picking just one of those two
you can use any condition that you want, ignore my type equality part
@Xeo how would that work?
 
I've written a basic random-of-3 pivot quicksort. It works with std::partition but fails horribly for std::stable_sort. I don't really understand why x)
 
merge :: Either a a -> a
 
This project is basically a GUI for another one. The other one I suppose would be ideally split into two pieces itself: one in something heavy on regexes, the other in assembly language.
 
Xeo
5:33 PM
@AlexM. What Luc says
 
@JohanLarsson You’re thinking of equality of values here
 
Xeo
static T InsertBikeshed<T>(this Either<T, T> v)
or however extension functions work
 
It’s undiag :D
 
actually I think C# only lets you check types for equality at runtime
so the whole idea of doing it at compile time fails
 
@JerryCoffin high fancy, only heard of Lisp in that list, nice.
 
5:36 PM
@LucDanton ah
right
 
user1804599
Make Either covariant.
 
but doesn't that assume that TLeft and TRight are the same?
 
user1804599
Oh wait then you have to make it an interface hahahahahaa lolc#
 
I initially threw Either<T, T> out the window since it seemed to kinda not make sense in a way
 
@elyse yeah, that is a strange an annoying limitation
 
5:37 PM
but I guess that works too
 
Xeo
@AlexM. err, what does your second Cases function assume?
That the outcome is the same
 
@AlexM. The overload set you presented is one that has bimap together with a merge . bimap convenience (I presume) overload.
 
user1804599
it's terrible
 
@Xeo nope
 
user1804599
also lack of bottom type makes variance suck more
 
Xeo
5:37 PM
yes. Read properly. :P
 
it assumes that the type of the return types of the functions applied on TLeft and TRight are the same
 
> // Enable this if TLeftResult == TRightResult
what’s that for
 
Xeo
It's basically Cases(fleft, fright).Merge()
 
so say you can apply a function that takes a string and returns an int and a function that takes an int and returns a string on an Either<string, int>
@LucDanton read my prev message
 
5:39 PM
@AlexM. It was rhetorical.
 
@Xeo yes if I let it happen
3 mins ago, by Alex M.
I initially threw Either<T, T> out the window since it seemed to kinda not make sense in a way
my idea was to not let it happen
 
Xeo
Why not?
 
Either<T,T> == T and I'd automerge it if possible (?)
 
Xeo
Why destroy genericity for no reason at all?
 
but it makes sense your way too
 
Xeo
5:41 PM
Special-casing stuff is... dumb.
 
yea if you put it like that
 
also when you put it any other way
and if you don't put it at all
 
b723c9d fix sizeof applied to parenthesized expression
2784cbd only warn about sizeof applied to adjusted parameter
f053565 implement size(type-name)
23c59fc variable scope begins before initializer, not after
Dammit, typo third commit down (size instead of sizeof). This is gonna bug me for the rest of my life :)
 
> Citizen Con
lolwut
There's a con for this con unfinished game.
 
@JohanLarsson Long ago, I had some exposure to SNOBOL, and liked it a lot. I'd love to have something that was basically just an updated version of SNOBOL 4. Unfortunately, although Icon has some nice points, it loses a few of the things I liked best about SNOBOL.
 
5:47 PM
@R.MartinhoFernandes But enough about Roberts.
 
yea that's better than my idea
ty guys
 
@R.MartinhoFernandes Vapor Con 2015--the biggest Con of all time!
 
lemme implement this because now I wanna see it in action lol
 
"Citizen Con" is a really punny name.
And official
 
@AlexM. FWIW I don’t have a stong feeling one way or the other. Pick whatever suits your needs.
 
5:48 PM
Hilarity over 9000
 
@LucDanton there's no real need as in "we need this to work this way"
 
user1804599
> C ++ is a programming language which based on objection oriented programming (OOPS).
 
it was just an idea that sprung to mind after I noticed that in a particular case using something like Either would've improved the way the code was being read
 
I do weird stuff with my own variant, too. The fully theoretic version would have a lot of impact on the interface, whereas I can recover the full power via tricks when I need it.
 
@elyse I objection object, your honor!
 
5:49 PM
but Xeo has a point that <T,T> and merge as an extra covers all cases
whereas my initial idea forced a single way
 
> stating that they felt they were spending more time creating material for cons and fundraising than creating any material for gameplay.
Creating material for cons
 
Is this a typo? <br> So after the using-directive for std, we can simply write cout rather than std::std.
guess it doesn't use breaks
should it be written std::cout
 
pls gieb monies
 
you're a typo
 
thanks, dog.
 
5:53 PM
it's Puppy, actually
 
chill Puppy, it’s just slang dawg
 
> Fans would come into the studio, and I wanted to be like 'Dude, run. Take your money and run.' I felt like I was part of a con
I'm having too much fun with this
 
linky?
 
but seriously. it means one could use cout instead of std::cout, right?
 
5:55 PM
bro, the escapist? :(
 
@R.MartinhoFernandes "Unfinished game" sounds like a really, really optimistic way to describe that effort. :D
 
@Puppy I am not sure the result of that overload.
 
@Puppy there are articles elsewhere too
I think
 
what doesn't

use breaks?
 
I've read about it in a news preview widget thing
 
5:57 PM
@Griwes I saw my <br> plain text. Clearly I don't know what kind of markup(or whatever) in the chat room.
 
@Jaden it's The markup
 
@Jaden There's a lot you don't know it seems
 
and that means it's obviously called Markdown
 
@Jaden That amounts to admitting you haven’t read the rules or the chat FAQ.
 
5:59 PM
I'll get right on that.
 
ok cat's fine
time to feed the monsters and try out my new jacket
night ride for pizza
ayyyyy
 
That guy may be an industry veteran, but man, he has no idea whatsoever about being a leader.
 
Next algorithms whose iterator category should be weakened: std::stable_partition. It shouldn't be hard to convince the committee: the Palo Alto report already proposed this change and both libstdc++ and libc++ implement it.
 
@Griwes gamedev vOv
 
@Griwes well he does say that games work that way
maybe gamedev really works that way
 
6:01 PM
lolwut
 
I think he's just a terrible leader.
 
87 million and he has to work 7 days a week?
 
But maybe gamedev really works that way.
 
What a bunch of morons
 
user406009
I wouldn't count that 87 millions as in the bank.
 
user406009
6:03 PM
If he pisses off enough people, they could start trying to do chargebacks.
 
What did Luc say?
 
Xeo
where?
 
yesterday, by Luc Danton
No time to think! Gotta gamedev.
 
Xeo
ah
 
private fun sizeof(): Expression {
    if (eat() == Token.OPEN_PAREN) {
        val result = if (eat().startsType()) sizeofType(typeName()) else sizeofExpression(expression())
        expect(Token.CLOSE_PAREN)
        return result
    } else {
        return sizeofExpression(unaryExpression())
    }
}
@elyse Parsing sizeof turned out to be more complicated than I would have expected.
 
6:04 PM
@Lalaland not my point. With 87 million in pledges you oughta be able to have enough staff
No excuse whatsoever.
 
@AlexM. s/gamedev/morons/
which is often redundant yes
 
You're automatically a moron if you have to do overtime with such astronomical funding
 
user406009
The game development industry seems like a pit. I guess that's what happens when too many people "love the job" too much.
 
@LucDanton Thanks.
 
@R.MartinhoFernandes "500,000 dollar salaries and marketing materials for everybody."
 
6:06 PM
@Griwes IME yes it does
 
Why would someone say you can use just cout instead of std::std?
 
user1804599
@fredoverflow use backtracking instead of lookahead; easier!
 
@Jaden Because cout can work under at least some circumstances, whereas it's almost impossible to figure out a way std::std would do anything useful.
 
I read it in a book. It didn't make sense. So I wanted to ask a second opinion.
 
@Jaden std::cout would make sense.
 
6:15 PM
namespace std { namespace std = ::std; } and then you can use std::std::cout.
It's more secure.
 
user1804599
namespace std { using namespace boost; } // don't have to wait for C++17 anymore!
 
@Morwenn I don't see the use in doing that.
 
@Jaden Security.
 
@Morwenn That may be true, but I don't see it.
 
@Jaden No, honestly that's not true. That's bullshit.
@elyse Same thing with experimental. That's genious :D
And then you can even have conflicting implementations at once.
 
6:19 PM
@Morwenn Good call. I guess I should have included "sane" in my post.
 
@Morwenn Please, don't attempt to #define the_contents_of_my_brain
 
user1804599
namespace s {
    using namespace std;
    using namespace boost;
}
3
 
@Jaden well, there's nothing to define, so
 
user1804599
SHORTER
 
using namespace ::;
 
6:21 PM
namespace s {    using namespace std;  namespace boost; }
namespace std { using namespace s; using namespace boost; }
namespace boost  { using namespace s; using namespace std; }
 
user1804599
namespace boost {
    using namespace boost;
}
 
user1804599
What does that do?
 
It revives hitler.
 
It resolves namespaces in O(n²).
 
@elyse It plays with itself--in public.
 
6:23 PM
@JerryCoffin you mean like, a game off chess?
 
@StackedCrooked Close, but not quite.
 
Like a game of chest.
 
like a game of your mother
 
user1804599
Arse Technica
 
user1804599
6:26 PM
Ars Legnica
 
user1804599
Piotr's Arse
 
@elyse Piotr's mother playing chess on her chest.
Oh wait, this was chess that played with itself. Oh well, maybe next time.
Oh yay, a three star programmer:
0
Q: I succeeded allocating a pointer to an array of 3 ints in the heap, but I still don't understand how does the access to the array work?

François-Marie ArouetAfter several trials I've succeeded allocating a pointer to an array of 3 ints with a new expression. In the snippet below, I show first the use of this pointer in the stack, and then I show where I've got with the heap allocation, after several trials. #include <iostream> int main() { // Fi...

> std::cout << ***q << " " << ***q + 1 << " " << ***q + 2 << '\n';
 
> After several trials I've succeeded allocating a pointer to an array of 3 ints with a new expression
 
@JerryCoffin Do you std::view<int[][][]> might confuse three-star programmers?
 
@Morwenn To be honest, I really don't want to think about it. :-)
 
6:38 PM
@ElimGarak I might be a social liberal in an open relationship, that doesn't make me a "libcuck". Or maybe it does. In which case I'm proud of being that. And at least I have a healthy sex life, unlike these miserable piles of secrets dung.
 
ugh I have to delegate Either creation to something else because ctor ambiguity for Either<T, T>
there goes the beauty
 
@AlexM. Just use a Maybe<Either<T, T>>.
 
I ain't using anything screw this
 
Xeo
FromLeft(T), FromRight(T)!
 
if I can't new Either<string, string>() then it will look too alien to be of any use considering how everything else looks like in C#
 
user1804599
6:44 PM
Clown and Joker.
 
user1804599
Less boring.
 
user1804599
oh for creation
 
user1804599
static methods problem solved
 
@Xeo yea that's what this guy is doing, except he uses Left and Right as present in Haskell
I initially thought of Either<string, string>.First("aaa") and Second
but it doesn't read that well even though it's natural to say "either the first or the second
I wish I could really enable_if these ctors
 
I wish I were good at maths... Then I would understand en.wikipedia.org/wiki/Fast_inverse_square_root this
 
6:55 PM
The equation looks simple
 
If stack is faster than heap, the why don't we allocate the heap on the stack instead of the other way around?
 

« first day (1812 days earlier)      last day (3148 days later) »