« first day (1546 days earlier)      last day (3627 days later) » 

13:00
you need to treat programmers as suicidal 3 years old
'Constant' fits for something that won't change ever
@Bartek 4.7.1 I think
user1804599
Nobody will ever use LasagnaScript anyway.
Immutable variable that's loaded from environment is not constant
@CatPlusPlus unless you use a const_cast :v
13:00
@matovitch I'm afraid it's because D<T> is incomplete when you use it here: template <typename T> struct D : public B< D<T> >
@matovitch then it supports a pretty big thunk of C++11 already
iow shutupaaaaa
And doing ::Type on the incomplete type yields an error. Not 100% sure though
22
Q: C++ static polymorphism (CRTP) and using typedefs from derived classes

Sam PowellI read the Wikipedia article about the curiously recurring template pattern in C++ for doing static (read: compile-time) polymorphism. I wanted to generalize it so that I could change the return types of the functions based on the derived type. (This seems like it should be possible since the bas...

I need food
13:01
eh I don’t like the accepted answer though
user1804599
Currently := never compiles when the target is a variable since I haven't implemented mutable variables yet.
@AndyProwl funnily enough if I dont declare the index operator and the typedef, it works (refering to Derived::Type)
@rightføld don't implement them at all
just make a functional PL will ya
user1804599
I'll probably implement them sooner or later.
13:03
imperative is so 2014
@matovitch It is common to have the base/mixin accept everything it will need upfront, so in your case Type in addition to the derived type. I.e. template<typename Derived, typename Type> struct B ….
mutability is so 2014
That’s for C++03. There are C++11 tricks, but they’re so-so imo.
Oh I think I see the problem, maybe if I rename the Type member...it conflicted !
13:05
C++11 is so-so
@matovitch No, that's not it.
@LightnessRacesinOrbit still better than C++03
@matovitch Why not read the Q&A you were linked to? It's spot on.
because OTOH C++03 is pretty crap
I like how people write those huge for loops for iterators
yeah, you could use <algorithm>, but then there are no lambdas
@matovitch Won’t help.
it's hilarious how much was missing from the language to make it actually usable without hassle
@LightnessRacesinOrbit I will read it...I just hoped someone would spot an obvious error...
@LightnessRacesinOrbit try writing a function that does a nontrivial operation on every element of a std::set
where nontrivial = isn't present as std::add, so you actually have to write everything by hand somewhere else
@matovitch sure, because then the compiler no longer needs to see the definition of an incomplete type
Oh brother. One our "special projects" that one guy's been working on on his own for months has had two releases with no commits and by extension no VCS tags exist
saaaaaaveeeee meeee
ok using a traits class seems to be the way to go...
13:09
People at your company seem to not be particularly good at this software development thing
2
@BartekBanachewicz Yeah :(
VCS tags?
user1804599
lol who needs logical AND when you have if.
tags in version control
y'know, so you can check out the source for a version?
user1804599
def and(a, b) = if a then if b then true else false else false;
13:11
@rightføld if a then b else false...?
thanks everyone ! I should have read the qa in the first place.
user1804599
@ScarletAmaranth !!!
if a then True else False
user1804599
That's not lgoical and.
@rightføld Short-circuit
user1804599
13:13
This is interesting.
@rightføld I can see that you aren't a great fan of readability...
user1804599
def and(x, y) = if x then y else x;
def or(x, y) = if x then x else y;
user1804599
@CatPlusPlus right.
if x then true else y is nicer imho
Otherwise you don't even need if, you can just use lambdas all the way down
user1804599
13:13
@ScarletAmaranth I mean it's interesting how the branches are just the other way around.
@rightføld I see
plot twist: if, then, else is actually if_then_else_ and it's an mixfix operator
user1804599
and in Erlang doesn't short-circuit lol
user1804599
You have to use andalso.
13:14
andalso lol
user1804599
Short-circuiting is a good point; may not make and and or overloadable.
give me mixfix operators jesus
user1804599
May pass thunks to them instead.
user1804599
dunno wat do
ahhhhhhhhhhhhhhhhh and now he's committed it by copying dependency source trees in rather than using externals
13:15
do { ... } unless (...) in which case { ... }
def and(x, lazy y)
#quality
@CatPlusPlus nothing wrong with \a.\b.a b fls
my problem is that I can't be seen to complain/disagree with absolutely everything, but that's a precarious situation when absolutely everything requires complaining about and disagreeing with
In file included from /usr/local/include/c++/4.9.2/algorithm:62:0,
                 from main.cpp:1:
/usr/local/include/c++/4.9.2/bits/stl_algo.h: In instantiation of '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = std::_Rb_tree_const_iterator<int> _OIter = std::_Rb_tree_const_iterator<int> _UnaryOperation = main()::Collatz]':
main.cpp:24:60:   required from here
/usr/local/include/c++/4.9.2/bits/stl_algo.h:4163:12: error: assignment of read-only location '__result.std::_Rb_tree_const_iterator<_Tp>::operator*<int>()'
what the hell
13:16
You did something wrong
user1804599
@CatPlusPlus yeah
user1804599
Kinda hard with JS interop.
oh boy and it's a lightly patched version
this is such a fucking mess
user1804599
But you never call and directly you instead use &.
you are a mess
13:16
@CatPlusPlus the code has way fewer bytes than the error message
@BartekBanachewicz fewer*
the commit msg is "updated trunk"
user1804599
I know what to do.
@BartekBanachewicz that surprises you how?
13:17
it was supposed to be basic
@LightnessRacesinOrbit "fuck you jerry"
@BartekBanachewicz Well, you are trying to std::transform using const iterators...
except I'm not
oh wait
> In instantiation of _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = std::_Rb_tree_const_iterator<int> _OIter = std::_Rb_tree_const_iterator<int> _UnaryOperation = main()::Collatz]
lol noob
13:18
> with _IIter = std::_Rb_tree_const_iterator<int> _OIter = std::_Rb_tree_const_iterator<int> _UnaryOperation = main()::Collatz
no not at all
right, you can't do that shit on std::set
because who would want that right
13:18
duh
set is a binary tree, you can't just mutate its keys, lol
People who are you seem to not be particularly good at this software development thing
@Griwes let's not go calling standard containers by some hypothetical practical implementation okay
lol
IMPLEMENTATION DETAIL
I'm sorry I tried to give a practical argument for why the iterators are const. lol
wait.
what griwes said is obviously a bullshit reason
but it made me think
13:20
lol
for the first time
Ell
Ell
doesn't Rb stand for red-black?
Data.Set isn't an instance of Functor either
no shit
13:20
@Ell yes
but that has nothing to do with mutability of keys
it's because the size may change with an fmap
Ell
Ell
oh. an rb tree is a binary tree then?
user1804599
@Jefffrey No.
@Jefffrey it can't
Yes.
user1804599
13:21
It's because the type system is insufficiently advanced.
@BartekBanachewicz it can
user1804599
It's because set operations have an Ord constraint whereas fmap doesn't.
@Ell It's a kind of a self-balancing binary tree.
That's like saying the size may change with an fmap on a list
oh wait right
@CatPlusPlus duplicates :|
set has to remove them
user1804599
13:22
That's doesn't matter.
fmap (const 1) s == fromList [1]
That's really not an issue
user1804599
It'd still respect the functor laws.
user1804599
The problem is Ord.
Hey guys
user1804599
13:23
Hey guy
Hello there. It's the first time I'm chatting on SO
user1804599
Ok I made and and or take thunks.
@rightføld what's the problem with Ord again
@BartekBanachewicz The fmap implementation can do a pass over everything after the mapping is done
user1804599
13:24
fmap doesn't have an Ord constraint but Set.map does.
@CeceXX This might not be the best room for an initial chat, but who knows, maybe..
@rightføld on return type?
user1804599
No Jesus Christ.
On elements
user1804599
13:24
map :: Ord b => (a -> b) -> Set a -> Set b
chill out and slow down
as always I need to prove you are all wrong
28 secs ago, by Bartek Banachewicz
@rightføld on return type?
god
Can you guys help me writing a little program in C?
user1804599
No.
13:25
b is return type of mapped function
that's what I meant
@CeceXX Not in C.
Try Haskell.
@CeceXX lolno, I'm sorry
lol ok
@Jefffrey That doesn't matter, fmap doesn't give you any guarantees on the output size, because functor doesn't have a notion of size
Well then C++. Isn't it almost the same?
8
13:25
so for a Simple Functor, assuming it existed, it would work OOTB
@CatPlusPlus I know
@CeceXX no, it's almost totally not the same
@CeceXX NO! I was just about to suggest 'don't let your first posts on here be about your software problems'. Stick to sex or pizza-toppings.
@CeceXX Nah, notice the two plusses behind the 'C'.
@CeceXX Starred for shame.
13:26
Aren't the basics the same? And by basics I mean if and else
5
It’s 33% the same, tops. Not almost!
> We just properly generalize Functor, so that all old functors are new
> functors. In addition, many more functors become possible, including
> Set. In general, we can have functors
>        fmap' :: (C1 a, C2 b) => (a -> b) -> f a -> f b
I'll waste all my stars here I think
Do while, switch. This stuff
@Jefffrey do you have a star limit
13:27
booh (dunno) v0v
Soo
C2 has to preserve Ord
@CeceXX As far as you should be concerned, C++ doesn't have for or while loops
@CeceXX have you tried writing a program already?
in order to put it back into the set
so technically it should be possible to write that loop
I don't know C++ language but I think you guys do
4
13:28
We think we don't know it.
@CeceXX Scroll up.
I wondered when the first flag would turn up.
I have no idea what C++ really is
@CeceXX For evidence that these guys don't.
@CeceXX learncpp.com is a great place to get started
13:28
Lol I see
@LightnessRacesinOrbit "these guys"
> All my everything (code and otherwise) on Stack Exchange, unless otherwise mentioned, is released into public domain.
thanks for the information, I really needed that
@Pris lolno
@Griwes = Barty
@AlexM. I vaguely remember this
STOP WITH THE FUCKING FLAGS
13:29
STOP FLAGGNIG
How do you control user input in C++?
[sic in hindsight]
And by that I mean scanf in C
@Pris lol :D i am sure you are kidding
@CeceXX you don't
13:29
@CeceXX Food- and alcohol-based incentives.
mostly alcohol
lol
loads of it
@CeceXX We are not going to teach you C++ here today. Buy a book!
Ruuuum shooots !
13:30
@Griwes, @NullPoiиteя the site is fine to get started
@Pris No, it's not.
why not
> Introduction to C/C++
@LightnessRacesinOrbit I am just asking some help writing a VERY little program that asks the user to enter a number and...
13:30
Exhibit A.
@LightnessRacesinOrbit And alcohol, a lot of alcohol to fight the despair that ensues
@Griwes lol
@CeceXX Great! So get that help from your C++ book and...
> Hungarian Notation
@CeceXX NOooooo - you are committing suicide!
13:30
lol
Exhibit B.
> C-style strings
Exhibit C.
Nah, there aren't any strings involved :p
> new
13:31
this is fucking retarded
Exhibit D, E, F, ..
That's chapter 6, std::string is fucking chapter 17.
> I am new user and very unknown to c++,but i want to learn c++, and will make my self to a successful programmer.
awesome
I refuse to accept reality where Set isn't a Functor
2
this is bullshit
@Pris No, that's not a good site for learning C++.
@CeceXX Sure. If it's C, there can't be.
@AlexM. oh ok so it's another one
@BartekBanachewicz welcome to bullshit-Haskell
I'm glad you could finally make it
it doesn't make any fucking sense
Are there any C chatrooms?
I guess not
13:32
@CeceXX there's one with a few largely incompetent people yes
user1804599
Ok you can now say this:
@BartekBanachewicz it has an extra Ord constraint
user1804599
console.log(logical.and(t, lazy f));
console.log(logical.or(t, lazy f));
Ok lemme check it
@Griwes alright, then just link him to a list of textbooks he'll never read and call it a day
13:32
@rightføld lazy fuck.
@Jefffrey why can't this constraint go trough :/
user1804599
@Griwes lol
@Pris If he would never read them, it's useless anyway.
user1804599
@BartekBanachewicz example:
@Pris that's better than linking him to a shitty tutorial
Xeo
Xeo
13:33
This seems to be a pretty nice book. Too bad it's only available in German (AFAICS) /cc @sbi ever heard of it?
@Pris lol
@Pris And that's the correct way to learn the language: read a fucking book.
my world is ruined
@BartekBanachewicz :D
user1804599
f :: Functor f => (a -> b) -> f a -> f b
f = fmap

main = print $ f (+ 1) (Set.fromList [1..10])
user1804599
13:33
How should this compile if Set's fmap requires Ord?
@BartekBanachewicz because fmap doesn't say "only some type of F a can do fmap, it says: given a Functor f, all f a can be fmapped over.
"Correct way" -- oh boy, seems like we're wandering into cargo cult territory
Or something
Is C++ even popular nowadays?
5
1
Q: How does the time loop in Predestination get initialized?

yondaime008In Predestination starring Ethan Hawke, the idea is plain and simple. However, I do find something very hard to digest: How could the loop about Ethan Hawke the time travel agent, could meet himself and then conceive himself without some sort of help to initialize the loop? What I want to say ...

fucking dumbass
user1804599
13:34
@CeceXX Yes. :(
@CeceXX not really no
@CeceXX Nah
@Pris Reading a book is the only correct way to learn the language.
This guy's conquering the starboard
I mean like stuff like PHP are cooler huh
7
13:34
I'm not saying others are impossible.
I'm just saying all others suck.
@CeceXX What are you learning now? C or C++? (I need this so I can link you to the correct book list)
You just said "only correct way"
13:34
@CeceXX They are easier to grasp and to use so they get a lot of attention from wannabe programmers. Therefore they are more popular, yes.
@AndyProwl What guy ?
@milleniumbug there's no "correct C book list"
Oh for fuck's sake stop starring this shit
18
@Rerito just have a look at the starboard...
13:35
@Rerito The guy who's conquering the starboard.
@CatPlusPlus Why?
@LightnessRacesinOrbit lol
Well guys I gotta do a homework ANNDD... I don't know how to do an exercise in C... that's it
Oh yeah, right
402
Q: The Definitive C Book Guide and List

lillqTo follow the example of The Definitive C++ Book Guide and List for C Books here is a wiki post for organization. A tag search for "C" and "Books" returns no complete book list results as of writing this question. That search is here. This post is to providing QUALITY books and an approximate ...

@CeceXX dropping school might be easier
13:35
@CeceXX Then maybe you should have paid attention in class? And deserve to fail the homework? Because the homework tests what you learnt in class? Just a thought.
@CeceXX if its homework you probably already have a textbook and course notes ... why arent you just using those
let's move to Haskell room
@CeceXX they gave you homework without teaching you what you need to do it?
guys, quick, star this so the starboard gets more diverse
@CeceXX We know all that. We all guessed as soon as you popped up, but we were hoping to be wrong. We were not.
13:35
I like pizza.
3
let's move to the bookstore
I need to study with friends
It's ALL about logic. I'm not a logic guy
we realized that
I like trains.
guys stop
pls
fun is over
13:36
@Griwes Train in vain
stop doing what
lol
user1804599
> Expecting 'SEMICOLON', 'LBRACE', 'LPAREN', 'RPAREN', 'FOR', 'EQ', 'LT_COLON', 'THEN', 'ELSE', 'COLON_EQ', 'CARET_PIPE', 'CARET_EQ_EQ_EQ', 'CARET_GT', 'CARET_LT', 'CARET_GT_EQ', 'CARET_LT_EQ', 'GT', 'LT', 'GT_EQ', 'LT_EQ', 'LT_GT', 'PLUS', 'MINUS', 'CARET_PLUS', 'CARET_MINUS', 'ASTERISK', 'SLASH', 'SLASH_SLASH', 'CARET_ASTERISK', 'CARET_SLASH', 'CARET_PERCENT', 'BANG', 'COLON', 'PERIOD', 'COMMA', got 'AMPERSAND'
13:37
Where do I find the chat list?
Oh just click on all rooms
@Jefffrey what does that mean?
@AlexM. So you like pizza, huh youtube.com/watch?v=szCIMUmDyqY
I knew it! Here they are the sexual needs!!!
@milleniumbug Thanks
13:39
@Jefffrey oh, be back later I guess
Xeo
Xeo
Oh lol. I was wondering about a rogue KeePass entry that only had the password set and nothing else.
Then I remembered I generated some passwords as a security question / answer thing, and I guess I accidentally saves one of those.
@milleniumbug to be fair the interface for navigating chat in general is not great
> However, notFmap is fmap from the subcategory of Hask whose objects are types with an Ord instance and whose morphisms are order-preserving maps to a subcategory of Hask whose objects are SortBinTrees over types with an Ord instance.
...
user1804599
fmap fmap fmap ~~> (.).(.)
user1804599
13:45
(~~>) = (==) and it's even correct!
so the problem is with Functor
not with the mathematical functor
user1804599
Exactly.
so the real problem here is that Haskell sucks
> Christelle Alleume, who works near CTD in Dammartin, said a round of gunfire had interrupted her morning coffee break.
I hate when my morning coffee break gets interrupted
user1804599
OK & and | and -> now work.
13:47
Xeo
Xeo
@BartekBanachewicz Write your own Prelude!
excellent code well done
@Xeo that's a prelude to disaster
Xeo
Xeo
@orlp Great names.
@Xeo welp, it's being done, right?
@Xeo the names actually make sense
Xeo
Xeo
13:50
@orlp why the fuck are these alignes so weirdly anyways
so why std::transform isn't specialized for std::set output
@Xeo it's for solving this puzzle:
@Xeo that's the joke.png
Xeo
Xeo
aha
@BartekBanachewicz wat?
more for loops
13:55
i wish stackexchange/overflow had themes
@Pris There are plugins for that (style modifications for sites)
yeah i dont really like any of the userstyle ones since they usually break parts of the site
that's what modding does to things yes
room topic changed to Lounge<C++>: "so the real problem here is that Haskell sucks" -- Bartek Banachewicz, 2015 [c++] [c++11] [c++14] [c++-faq]
@BartekBanachewicz What?
13:59
Read the rules.
17

« first day (1546 days earlier)      last day (3627 days later) »