« first day (1843 days earlier)      last day (3331 days later) » 

14:00
Ubuntu repos are still at CMake 3.0.2
@Morwenn more or less everything on Travis is an old version
my travis script is mostly spent just updating the environment :\
@thecoshman Yeah, that's why no compiler can compile my project even with custom packages :(
pacman -Su mingw-w64-x86_64-qt5
wee
@Morwenn I mean christ, look at this
so much of that is installing shit before I can build
and good lord does it take so long to do that
The new faster infrastructure doesn't support sudo :v
14:07
I know
wtf, std::cout << std::string('a') < " cout less than char"; compiles
it's some docker nonsense
I probably could work on ways of having glfw built myself, so that this script can just install it via a ppa, probably the same for some other things, but fuck it
Ell
Ell
ah Cat is present
14:08
is static_cast<unsigned int>(-1) UB ?
Ell
Ell
I am afraid of asking haskell questions for fear of mockery
@milleniumbug nope
<< should be binding tighter than <
well fuck
@Ell I'll protect you from Cat
Ell
Ell
:D
14:10
@thecoshman Well, since I only fetch g++ 5.1 and clang 3.8, mine is much simpler and only relies on apt packages.
Ell
Ell
I want to check where Set.empty /= readSTRef myset where previously I did myset <- newSTRef $ Set.empty
but obviously Set.empty is not the correct type
@Morwenn mine almost does, but glfw doesn't have a v3 in the ubuntu repo
Travis is not the only public CI service
14:11
@thecoshman just compile glfw from source?
user1804599
@Ell (Set.empty /=) <$> readSTRef mySet
mkdir build && cd build && cmake .. && make
@orlp Good way to waste time and introduce spurious CI failures
user1804599
Returns ST s Bool.
@orlp .. that's what I am doing, and it takes fucking ages
user1804599
14:12
<$> turns a -> b into f a -> f b for some Functor f, and ST s is a functor.
user1804599
@thecoshman not for me?
holy shit setting $PATH in linux is such a total mess
No it's not
in fact, I've compiled glfw right now as we speak
total process: ~60 sec
14:14
all dependent on the distributions
@milleniumbug not really... PATH=$PATH;/new/shit/to/add/to/path
@orlp Public CI with way less resources
doesn't persist after restart
@milleniumbug Uh, no
/etc/profile is global for all shells
14:15
@CatPlusPlus I've never used CIs
14
A: How to permanently set $PATH on Linux?

Grzegorz ŻurThere are multiple ways to do it. The actual solution depends on the purpose. /etc/environment This is the best place for variables that are system-wide. This includes extending variable PATH with paths from /usr/local or for JAVA_HOME Do not use export here or duplicate definitions. /etc/xprof...

fml
can't you add your own build machines?
to speed it up?
The entire point of a public service is not to deal with machines
@CatPlusPlus I assumed it used some sort of docker stuff
Ell
Ell
@Elyse nice
14:16
to abstract that away
oh wait, sorry, you're right, glfw builds fairly quick, it's cmake that takes the piss
@orlp That... doesn't matter?
I'm not sure what's confusing here
Just don't compare compilation speed on your machine with compilation speed on a shared free service
Has anyone here tried to do something with - or at least toy with - CoreOS?
@CatPlusPlus if the machine doesn't matter, then it shouldn't be a problem to spin up your own build servers to aid a public free service
No that's not how it works
14:17
but it is how it could work
@orlp now, they host the server farm for you, it's a public service
that's like saying there's no point complaining about the slow trains, just slap your own on the rails.
@orlp Not really, security-wise
They have encryption support for secrets and they'd have to give you the private key
@orlp it would be really hard to make a server farm so abstracted from the physical hardware that you could securely handle random nodes of unknown capabilities being added and removed at will.
Also plugging in untrusted third party machines into your service is a shitty idea even if that weren't true
suppose I want to find x in an unsorted collection of xs and return it if and only if this x is unique in the collection; would simply doing find, storing the result and returning it if a second find fails be reasonable?
14:19
It's a free service, which means you take the pineapple performance up the arse, spiky leaves first.
@ScarletAmaranth Keep a running count then you don't have to go through the collection twice?
(I understand it goes over the collection twice, performance I don't care about; I just wonder whether there isn't a nicer composition of algorithms that does it)
@CatPlusPlus right, but how would I express it in terms of existing stuff rather than writing it myself?
collectAll :: a -> [a] -> [a]
I'd just write this
@ScarletAmaranth conceptually count() == 1 is cleaner
14:20
and go through it once
@orlp uu, this is interesting; I could do count and then find (goes over twice I understand but this is a good concept!)
@ScarletAmaranth what if it returns the same element both times?
@ScarletAmaranth no
only count
it goes over only once
and then you check if the count was == 1 (unique)
== 0 would be non-existent, you have to decide yourself if that counts as unique as well
Isn't there already an algo for making sure an element is unique within a collection?
I don't think he needs to make sure an element is unique
he just wants to check if it is unique
14:22
there is count that is unique if it compares to 1, but it returns the number of elems satisfying the criteria
and optionally return it if it is
now I'm confused what scarlet wants to do
@AlexM. same difference
yes that's what I was saying, there's a difference
user1804599
@ScarletAmaranth Depend on loop fusion optimisation, problem solved!
14:23
go over a collection of unsorted stuff and return something for which p(x) == true iff there exists only 1 such x
doing count but returning the element found rather than the number is interesting as well
user1804599
If it doesn't happen, file a bug with the implementation, problem solved!
looks like there is no way around it
ideally I just wanted to call std::find(), std::find(), return; I could do std::count, std::find, return... or I could write it myself which I wanted to avoid :P
just to make sure, you do know that the proper way to "return something for which p(x) == true iff there exists only 1 such x" is length $ collectAll elem elems > 1 right?
I mean that's like, your statement written in code
ah, unique mutates, doesn't just query. Yeah, count is best bet
@AlexM. what youw rote returns a boolean, I want to return the thing (or a reference to it)
14:26
> which p(x) == true iff there exists only 1 such x
you wrote that
> f and return something for which p(x) == true
return something for which a predicate is true is what I wrote
though it I guess if you cared about performance, you would use a custom algo that iterates through from start to finish, with a flag if it found one match, and returning 'false' if it finds a second match. Worse case it's as slow.
the uniqueness check is still the same even in that case
@thecoshman yup
14:28
what do you return if the thing isn't true?
I'm guessing it's a maybe
@ScarletAmaranth you just want to know if there is exactly one element in a collection like X, right?
yeah I return boost::optional<>{}
as in, a boolean return?
@thecoshman and if there is only one such element, return a reference
the return type is optional<T>
but it's really weird to me that you're returning the same thing you're checking for
14:29
@ScarletAmaranth but you know what the thing already, no?
how else do you check if it is unique in the collection?
@AlexM. yeah, I don't get that either
var a
optional maybeB = that function(a)
if (maybeB)
{
    // maybeB.value is just a
}
the criterium doesn't fully descibe what I want to find
you can just replace that with if (function a)
suppose it's std::pair<> and I'm going over pairObj.first, and then I want to return that
Xeo
Xeo
@StackedCrooked @Mysticial Are you watching this season's Gundam (Iron-Blooded Orphans)?
It's awesome so far. Getting Shit Done, the anime.
14:31
@ScarletAmaranth so you need to check if the collection has exactly one thing that shares some common attributes with a given ~thing~ and then return the complete object that matches it?
@thecoshman yes, return the complete object if only one such object with the said criterium exists
like... if you had a collection of dates, return the one that is in the year 1999, if and only if there is only one such date in that year?
Which I think will require a custom matcher
conceptually, the algorithm is count_if == 1 ? find_if : nothing
as you basically want to compare two distinct types Struct full{ int a, b, c }; and Struct partial{ int d}; and somehow know what members of 'full' should partial::d match up with.
yes, that's one part, that's just find_if
the other part is that it needs to be unique
14:34
@ScarletAmaranth yeah, but with this crazy matcher logic you want as well
sure, but that's not relevant, I have predicated algorithms in stl
@ScarletAmaranth what's that?
@thecoshman all the algo_if stuff; which is really just copy_if followed by algo, or better yet algo . filter
std::find_if(range, predicate)
oh right yeah yeah
I was hoping it was going to be a brilliant combination of algorithms but it's not the case :P
14:37
ok
well that was a waste of time
neovim is still entirely broken on windows
look at it like edison would
now you know how not to make a bulb
that's not how edison would look at it at all
I expect it to be more of "who are you?" "where am I?" "what did you do to me?" "what is THAT?"
optional<?> MyTypeMatcher(MyType val1, MyType val2)
{
      if (val1 matches val2)
      {
             return val1.a;
      }
      return nothing;
}

optional<?> result = matches<MyTypeMatcher>(myValue, myValues).Count() > 1 ?
                     MyTypeMatcher(myValue, myValue) : Nothing;
this?
I think this should return MyType::a when a MyType matches another
something like that, yes
and it assumes that MyTypeMatcher(a, a) matches every time
14:45
current I do simply:
`optional<T> trivial(T x, c<T> xs) { r = find_if(xs, predicate); if (r == end(xs)) return {}; n = count_if(xs, predicate); return n == 0 ? {*r} : {}; }`
goes over twice, I know vOv
ohh
you have a predicate
not the element
@ScarletAmaranth find first occurence, if not exists -> return false
if it exists, find from that iterator to xs.end(), if exists -> return false
else return first iterator found
exactly, that's two finds
or a find and count
or count and find
but it only goes over the total countainers once
ah, find returns the end
since on the second find you don't start from begin()
you start from r
14:48
youre absolutely right, find returns the end
user1804599
@orlp thanks :)
Question for you boys.
Why is this compiling?
@EtiennedeMartel huh
even in clang++
@EtiennedeMartel because it's valid C++?
14:50
Yes, but why is that valid? aaa doesn't exist.
@EtiennedeMartel figured it out
you're declaring aaa as test
@ScarletAmaranth what about...
@AlexM. it's been solved by orlp! :) - find returns an iterator from which you can continue a second find, or count (so you don't need to traverse the collection twice)
@orlp wow
fuck C++
@orlp thinking in terms of ranges makes your solution completely not obvious to me; of course I could then reconstruct a new range from what is returned by find but that's not usual
14:53
// definition for MyCustomMatcher
length $ filter (!=Nothing) $ map (MyCustomMatcher elem) elems
// ^ if == 1 then unique
// first(filter (!=Nothing) $ map (MyCustomMatcher elem) elems) gets you the thing that matched (even if part of the structure)
@ScarletAmaranth oh k :<
haha
just to fuck with people
talk about function pointers
and somewhere hide this: int (*aaa)(0);
@AlexM. std::find simply lets you continue from "somewhere" in the range, which is the key idea
which is - of course - a declaration of aaa as int*, initialized with 0
@ScarletAmaranth doing the second as a find would be better, as it would stop once it finds a second element
@thecoshman yes indeed
14:55
@orlp ffs, use commas, not dashes
you're worse than @Morwenn with those damn double chevron brackets things
@thecoshman I'm sorry - is it triggering you?-
how in-convenient
TRIGGER
uuu baby, trigger me
double chevron sounds so pretentious
@thecoshman I love dashes too, but they shoud be bigger than small dashes.
14:57
so penetratious
"I use double chevron brackets, knave." flips hair
fuck unicode
it's done nothing good for the world.
ASCII master race!
Funky characters predate ASCII.
If Unicode wasn't a thing, I would write my messages by hand then take photos and post them.
user1804599
Can a set contain itself?
user1804599
15:11
Why not?
Because it's not useful
user1804599
There are many things that exist but are not useful, such as your answer to my question.
(a set containing itself makes no sense)
(also my answer is useful, you are just deciding to ignore it)
user1804599
I don't see why it does not make sense.
How does it make sense?
15:13
I see no reason why set couldn't contain itself
user1804599
let s = {s} in s
user1804599
Should work!
@Elyse ask on math.se
user1804599
I don't understand how Russell's paradox prevents the existence of the universal set.
user1804599
15:14
I understand it prohibits certain sets from existing.
oh wait, there's a question already
13
Q: How can a set contain itself?

jimmyorpheusIn Russell's famous paradox ("Does the set of all sets which do not contain themselves contain itself?") he obviously makes the assumption that a set can contain itself. I do not understand how this should be possible and therefore my answer to Russell's question would simply be "No, because a se...

user1804599
Is there a difference between "universal set" and "set of everything that exists"?
I think this is one of those things where you can say that "a ⊂ a" but not "a ∈ a"
the first chapter in naive set theory deals with this but I already forgot everything about it despite reading it a month ago
silly me
user1804599
Is this a little bit like asking, “How can the word ‘dictionary’ be listed in the dictionary?”? — Scott Dec 1 '14 at 19:42
15:21
@Elyse see axiom of completeness in ZFC
@Mr.kbok Yes I agree with you completely, and as I lack the proper understanding of such vocabulary, I beg that you can forgive me for my lack thereof.
@Rapptz why are you hating on me when all I’m doing is disseminating frog videos on the interwebs anyway
15:40
it seems math.se also has its issues
> I believe we have lost the fight to keep math.stackexchange.com from the path of becoming a homework mill.
Also, my indignation over the lax treatment of Bill Dubuque has finally reached the breaking point. [...]
@orlp For some reasons it sounds a bit like Deathstars.
> Linus Torvalds is a legendary software engineer and founder of the Linux kernel. He also can’t stand bad code, so sit down, grab the popcorn, and enjoy.
ahahahahahahaha... ha.
where did you get that from?
@ElimGarak so he got mad because somebody fixed his code?
15:47
@CMS_95 what
jaw dropping medieval armor dress
with extra dog head hat
@Mr.kbok it's the only type of dress that can actually knock the jaw off its hinges, you know
what have you done to me lounge
WHY
Ell
Ell
prof says I should give up :P
on attempting what I want berfore 6
wut?

« first day (1843 days earlier)      last day (3331 days later) »