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

16:00
@rightføld I haven't wrapped my head around immutability yet
@Pris Ctrl+F "Singleton" and "Manager" found nothing - a good sign.
user1804599
@AndyProwl do iiiiit
That raises questions. Who is this new guy? It seems there's much more to it that these 2 brothers.
@AndyProwl it's actually simpler than mutability; every time you see a name, it's a value. No one else changes it. You just take it, work with it, and produce results
user1804599
user1804599
16:00
top kek
@rightføld I want to be an AssManager
user1804599
Seems to be mostly use of libraries, except FbxManager.
I saw how they put down the cop. It was pure cold blood. There is combat training (and likely "real" combat) behind this
@BartekBanachewicz My feeling is that it depends on the problem, but I can't really make a strong statement, because I haven't done anything serious in purely functional languages
@rightføld At least, not in the public API
16:01
@AndyProwl it doesn't require functional
@AlexM. Manage that ass
@AndyProwl Purely functional languages make it simpler, but that doesn't mean you can't use immutable-written code in say C++
user1804599
You can't do anything serious in purely functional languages since the ecosystems of all purely functional languages are terrible.
why would you want purely functional anyway
you want multi-paradigm and discipline
You also, like most things, don't have to do it to the extreme. Aim to keep object immutable, but don't wreck your head over it just for the sake of it.
16:03
@AlexM. a lot of benefits
@thecoshman It doesn't, just thought that doing things in a language that forbids mutability is probably the best way to learn how to do things without mutability - and I needed a short way to write "I suck at immutability"
@AlexM. not necessarily
yes, necessarily
@rightføld Depends on your definition of "serious" apparently.
forcing yourself to not using a non-purely functional feature where it would have fit better is silly
16:03
@BartekBanachewicz yeah I get the point, see my answer to the pirate
@AlexM. I don't want a multiparadigm language. Now, how are you going to convince me that I do?
problems have different aspects
one-size fits all is by default silly
@AndyProwl it's more a mind set thing. Well worth getting it, even if you don't intend to stick to it
@AlexM. Purely functional languages are more flexible than you think then, apparently. Have you read my article about Monads?
@thecoshman sure
16:05
so, any suggestions for analytics's on a static site (ie github pages) ideally not Googles...
although in languages like C++ where evaluation is greedy unless you complicate your code, it's not so simple to keep that mindset
@BartekBanachewicz ok, how hard is it to work with mutable state in Haskell compared to C++?
user1804599
Laziness and purity are orthogonal.
and how easy is it to bring Haskell's benefits where they apply in C++?
@AlexM. it requires you to be explicit at the interface of functions that you're doing a computation on mutable state, and it enforces that you won't do stateful computations in an improper way. Other than that, it's similar.
16:06
and isn't that unneeded cruft?
@AndyProwl Don't do it.
I cringe every time I see const member variables.
@AlexM. Quite hard, because C++ is a different language. It doesn't have tools Haskell has.
@rightføld right, but if you can't modify a huge list and you want your program to add an element to that list, you'd better have lazy evaluation
I don't know, I enjoy the way C++ lets me do things
otherwise you end up making super-expensive copies
16:07
@AndyProwl No, not really.
ever since I started using it I've been uncomfortable especially in C# and Java
user1804599
Use a trie-like structure, not a list, if you want to have huge collections and insert at arbitrary places.
@AlexM. Compared to how Haskell lets you do things?
@AndyProwl Strictness doesn't require evaluation of all results.
@BartekBanachewicz I never used enough Haskell for me to say much so...
16:08
@R.MartinhoFernandes I pretty much never make members const
It cripples value semantics when you need it
@AlexM. It gives you way more static guarantees than equivalent C++ code. It's harder to get code to compile, but you catch more errors that would be runtime errors in C++.
@AlexM. It might be beneficial for you to try and then compare them, I suppose.
f a b = if a then b else 0
main = print (f False (1 / 0))
@Andy this shows the real difference.
user1804599
@AndyProwl if you want to add to the front of a huge list you can do it just fine.
I'm still not sure forcing a single way to solve problems is beneficial to all problems tbh, even if I try Haskell
With laziness it prints 0, with strictness with fails with a division by zero error.
16:09
@rightføld OK, I should have said vector
and I don't keep safety and stuff in mind here
@AlexM. it doesn't force you to a single way. It forces you to make concious choices. Haskell makes it perfectly fine to write imperative code if you choose so.
Everything that has no observable effects can still be elided.
I keep things like "how easy is it to do this in language X than it is in Y?"
user1804599
@AndyProwl You typically don't use collections which store everything sequential in memory.
user1804599
16:10
Except when they are very small.
user1804599
Because that requires copying everything when you want to make a change.
@R.MartinhoFernandes What I meant to write was that if you can't mutate a collection, then adding a new element to that collection requires making a copy of the original that also happens to contain the new element. Isn't that the case?
user1804599
@AndyProwl Depends on how the collection is implemented.
@AndyProwl No, it does not. It only requires that if you need to keep the original around.
@AndyProwl Look around for 'persistent data structure'.
16:11
@R.MartinhoFernandes In a language like C++?
user1804599
> All of the Clojure collections are immutable and persistent. In particular, the Clojure collections support efficient creation of 'modified' versions, by utilizing structural sharing, and make all of their performance bound guarantees for persistent use. The collections are efficient and inherently thread-safe.
In whatever language.
@AlexM. That depends on things, of course. For me the balance leans towards Haskell when compared to C++. Some things are easier, some harder, but the consciousness required by the language and more powerful control structures make me pick Haskell.
@rightføld Right, but you don't have that in C++ by default
'Jose Mourinho has taken a vow of silence' - I'll believe it when I don't hear it.
user1804599
16:12
No but you can make a library that has it.
user1804599
top kek lack of GC
Yeah but that complicates code
Ell
Ell
@Pris that's cool
it's simply not naturally supported by the language
user1804599
C++ is not a very good fit for such programming style.
16:13
@AndyProwl Though, yeah, I doubt a C++ compiler would be able to do that kind of elision.
@rightføld Indeed, that was my point. I have to stick to C++ at work
user1804599
OK
Ell
Ell
you could implement such datastructures though couldn't you?
@AndyProwl sometimes, if there's not much data, paying the cost of copies isn't that bad though; C++ starts with a huge performance advantage anyway
dunno why so many people are hung up on language features for library stuff
Ell
Ell
16:15
Nor me
@LucDanton I think I do understand that part. My point is that unless the language supports those things natively, the immutability mind-set (or pattern or whatever we like to call it) is hard to achieve
Slap a GC on it?
copy-on-write
Standard Library certainly forces a certain thinking indeed
user1804599
@milleniumbug Copy-on-write is easy to implement for immutable collections.
user1804599
16:16
It's like done in 0 seconds.
@milleniumbug That's not an optimization on writes, though. Rather the opposite.
@AndyProwl Plenty of languages with mutability with a GC. What more do you want?
user1804599
No GC cuz C++ purframsn.
16:18
@LucDanton I have to stick to C++
at least at work
no point writing Haskell in C++ that's for sure
C++ is one of those languages
This 'discussion' is insane. I’m out.
Bartek is weird today.
Either the discussion is insane, or what you are saying is not clear for mere mortals like me. Sorry & bye
Xeo
Xeo
Hm. I need a multimap in C#.
user1804599
16:19
Multimaps and multisets are underrated.
Xeo
Xeo
Guess I'll just go with Dictionary<K, List<T>>
@rightføld associative containers are underrated in general
user1804599
And typically when they're not, their APIs are shitty.
@AndyProwl The only real hurdle is lack of a GC and you can use one in C++. That's all he meant.
user1804599
@Xeo as an implementation detail plix
Xeo
Xeo
16:20
@rightføld I want to retrieve the duplicated keys as a list anyways
so that's fine
user1804599
Be sure to check for and remove empty list at every single place you remove something.
Xeo
Xeo
It's a build-once thing, fortunately
user1804599
Also be sure to check for non-existing list every place you add something.
Xeo
Xeo
Too bad the buildup doesn't look like dict = arr.ToDictionary(x => x.keyThing); anymore :<
@R.MartinhoFernandes I still don't understand, but arrogant behavior is what upsets me.
Xeo
Xeo
16:22
I don't think I can convince ToDictionary to properly handle duplicate keys?
not the fact that I don't understand
Ell
Ell
I think there is just misunderstanding on both parties
user1804599
OK
user1804599
I come to the point where I want to implement collection shit.
Xeo
Xeo
gl
lol
user1804599
16:23
Let's start with simple linked lists.
what's "Excellent Graduate Salary"
is it short for "Shitty Developer Salary" ?
@rightføld tell me when you get to R-trees
user1804599
abstract class List { }
class Cons(hd, tl) <: List { }
object Nil <: List { }
user1804599
that was easy ^.^
user1804599
time to have some dinner
@BartekBanachewicz i want a low level engine because i want to write a simple xplatform ui thing in opengl. id use qt but lgpl isnt okay for mobile
user1804599
16:25
@BartekBanachewicz what is R-tree
@AndyProwl My arrogance?
user1804599
I guess I'll just use mori internally.
user1804599
I don't know data structures, only abstract data types.
@LucDanton Yes
Where?
16:25
7 mins ago, by Luc Danton
This 'discussion' is insane. I’m out.
@rightføld create a dictionary based on a list of key value pairs lol
'Arrogance'? I don’t get it (which feeling of confusion has been what led me out).
Xeo
Xeo
dict = arr.ToLookup(x => x.keyThing)
          .ToDictionary(g => g.Key, g => g.ToList());
ooooh
sweet
user1804599
@AlexM. I was thinking of generic collection literals.
Xeo
Xeo
16:27
That looks really nice.
@Xeo Why ToDictionary?
Again? Really? You posted the same question a while ago... — Borgleader 3 mins ago
he really doesnt want to do his homework
@rightføld it's a space partitioning data structure
user1804599
I'll also call dict dict not map because map is already a function.
user1804599
But collection "literals" would just be calls to variadic functions. vOv
Xeo
Xeo
16:29
@R.MartinhoFernandes Cause I need to access the lists by key?
@Xeo Why ToList, then?
@LucDanton It sounded like the conversation between me (not understanding how to effectively adopt immutability in C++) and you (trying to convince me that it's a simple thing) took just a few messages to be labelled as "insane" and become so unbearable that you felt the urge to leave.
user1804599
And then I need object literals as well but that'll come when I make class definitions into expressions.
@R.MartinhoFernandes Force evaluation.
16:30
Did you know? Not doing your homework raises your blood pressure and the chances for heart attacks! — Alex M. 5 secs ago
Xeo
Xeo
@R.MartinhoFernandes Cause I want to access those by index, later on.
@EtiennedeMartel No need. It just forces extra copies.
Okay. Time for a huge pizza feast
imma go watch the hobbit in half an hour
ToLookup materialises the sequence anyway, but even if not, ToDictionary would materialise it. You can't get the keys without doing the actual grouping.
16:32
I'll be sure to fill my frontal opening with popcorn
also fuck you I want pizza too
@Xeo So it wasn't really a multimap then :P
Xeo
Xeo
@R.MartinhoFernandes heh, I guess
@AndyProwl And that’s arrogant? (It did not feel unbearable FTR, although it felt over.)
Elite force? Think we're all screwed!
16:34
@LightnessRacesinOrbit lol
an Onion-equivalent from Romania made an article about the incident in Paris
@LucDanton To me, it is.
Ell
Ell
@LightnessRacesinOrbit are you actually having a laff
this is ridiculous
That’s curious.
@AlexM. "The Daily Mashed Goat"?
What's curious?
16:36
there was a line like "Now about a million people are on the street asking where to go to surrender." timesnewroman.ro/life-death/…
@AndyProwl Rightfold
@AndyProwl Differences in perception.
Xeo
Xeo
@R.MartinhoFernandes Actually, I just remembered I need to do a filter step when retrieving them anyways, so I can just ToList() it after that (new condition for every retrieval).
the rest are a bit difficult to get (except for the Merkel one e.g.) because they deal with Romanian politicians and our view on them
the one with "Greece's emotional reaction: We need another 100 billions EUR!" was funny tho
Anyway what's a good GC implementation for C++?
Xeo
Xeo
@R.MartinhoFernandes ah, didn't think of that
@LightnessRacesinOrbit lol
Xeo
Xeo
guess I can just keep it as an ILookUp then?
dunno how clear that is for my coworkers, though :P
aww, no TryGetValue though
16:40
So I'm generating solutions to Phi(n) = 13! now.
It's expressive. You can DefaultIfEmpty and stuff.
I was able to deduce that n = 1 (mod 2) for all n < 2(13!)
But beyond that, I have no other insights, even after generating solutions for Phi(n) = 4!, 5! and 6! :<
Xeo
Xeo
@sehe ye
I guess
Still gotta get used to all that LINQ stuff
my idea of using (sometimes invalid) chemical compounds as passwords ended up being pretty nice
every compound is easy to remember and from time to time I change one of the elements
2,2-dimethyl-butane got changed to 2,3-dimethyl-propane
and so on
@Neil Kirk I think that it is only you who has thought that they are equivalent. — Vlad from Moscow 17 secs ago
here we go
Xeo
Xeo
16:46
@sehe Actually, I'll just get an empty list after the filter, which is fine
@LightnessRacesinOrbit quick, ask him if he can drive!
@AlexM. ahaha
ok
BTW, out of interest, are you still allowed to drive? :-) — Lightness Races in Orbit just now
5
@AlexM. Prone to dictionary attacks
/me ducks from all moderators
LOL
slow clap beautiful
Xeo
Xeo
16:48
Hm. Formatting non-expression LINQ can be a bit awkward.
user1804599
Meh, they killed some terrorists. :(
user1804599
What a waste, now they can't test medicine on them.
@ Lightness Races in Orbit Does he oay your job of prompter? — Vlad from Moscow 18 secs ago
wat
@LightnessRacesinOrbit lol
what's this Vlad & driving thing?
16:49
Hi, can anyone help me with some qt problems??
I've seen that mentioned twice today but probably miss some context
user1804599
@AndyProwl Fetishists aren't allowed to drive in Russia.
oh
that clarifies
fetishist AND Vlads
user1804599
16:50
Neither are transgenders and other people with "sexual disorders"
it's a difference
meanwhile
"I understand what mounting is in linux, and I understand device files." Apparently not ;) — Lightness Races in Orbit 5 secs ago
I'm a fetishist and nobody can stop me from deriving
even without a license
do you need a license to derive?
Xeo
Xeo
return stuff[arg.key]
    .Where(r => {
        var x = r.longNameThatIDontWantToRepeat;
        return x == 0 || arg.value >= x;
    })
    .ToList();

// vs

return (from r in stuff[arg.key]
        let x = r.longNameThatIDontWantToRepeat
        where x == 0 || arg.value >= x
        select r).ToList();
not sure which is considered "neater"
16:51
@AndyProwl I hope so
@VladfromMoscow: It's a valuable service that I provide for free. — Lightness Races in Orbit 13 secs ago
otherwise it wouldn't be a big deal
inb4 "i think that it is only you who thinks this is valuable service"
@AlexM. what kind of license is that :P
user1804599
@AndyProwl that'd be nice.
user1804599
16:52
Can't use inheritance if you're not certified for it.
@AndyProwl a derivative license ofc
you need to integrate it first
ah, so it's not an OOP license
user1804599
ok what shall I implement first
user1804599
variadic functions or class members
a GC for C++
@rightføld friends
user1804599
No, everything is public.
C++: Friendship is Magic
user1804599
I'm not gonna bother with private and protected since I'm targeting JS.
have any of you used openframeworks
user1804599
16:54
Just prefix your shit with an underscore.
Xeo
Xeo
@rightføld using GCPtr = LeakPtr; ?
welp I'm off to the movie, yay
cya
user1804599
@Xeo works fine so far :P
@rightføld I don't understand it
@Xeo What's the difference? You write code just the same. You just get OOMs faster.
user1804599
16:55
It's a poor-mans GC which leaks everything and never collects. :D
It's the trivial one.
user1804599
It's more like a Garbage Producer.
so let me rephrase
user1804599
OK, go ahead.
16:56
a collecting GC for C++
user1804599
@R.MartinhoFernandes It's UB if you depend on the side-effects of dtors.
user1804599
@AndyProwl too hard, I'll just use a JVM instead.
Yeah guessed so. Google only gives me one result when I look for a C++ GC and it doesn't look that awesome either.
user1804599
Implementing good GCs is extremely difficult.
Ell
Ell
the only c++ gc I know of is the boehm gc
user1804599
16:58
Time to implement object expressions and new.
yeah that's the one
user1804599
Actually object expression can be just new Object() { … }.
user1804599
Which I can neatly sugerise to new { … }.

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