« first day (2028 days earlier)      last day (2921 days later) » 

4:00 PM
I can kinda see the gain (n-functors), but imho it's just not worth losing the alternative gains
Sure you can craft a specific case where this design will prove useful, but how often will you really need that for real-world code?
 
I don't remember the last time when I really, really wanted to curry something.
 
Given that you can't anyway...
 
Hmm for me last week with some rice & beef
 
Oh sure I can.
 
Having it readily available is a huge benefit overall
 
4:02 PM
I'd just have to write a few lines of boilerplate.
 
@Griwes exactly. And you end up not doing it
while where bindings in Haskell are so extremely easy to use you end up using them often
And this is huuuge (I can't really overstate it) modularity and readability and refactorabiity boost
 
@BartekBanachewicz Because I don't feel I actually need it.
Examples please (that show how huge it is).
 
@Griwes Well, what can I say? Everyone is using to solving problems in a certain way.
 
I somehow knew that star was coming.
 
@Griwes I dunno how can I "show you" how a piece of code is better.
Well, okay perhaps I can turn this around.
window :: forall s. Vec2 -> Vec2 -> Int -> Window s
window pos sz n = Window pos sz addBtn children
    where
        children = map newDummy [1..n]
        addBtn = button (Vec2 10 0) (Vec2 100 20) ("add new dummy!") (addDummy)
        addDummy w = w { windowDummies = windowDummies w ++ [newDummy (length $ windowDummies w)]}
        newDummy n = button (Vec2 10 (fromIntegral n * 25)) (Vec2 100 20) ("button " ++ show n) id
here's some actual WIP code w/o any modification on my part, written in about 5 minutes
could you rewrite that without the where/let so that it stays equally modular and concise?
 
4:06 PM
In Haskell? Probably not.
 
(Also another thing to note is that if you think that any part of that is too big to comprehend, you can extract it out and make a new binding extremely easy).
 
in C++? Just turn every one of those into variables; the last two - just make them lambdas.
Lexical scopes is basically your equivalent of where.
 
@Griwes so you'd introduce state just for that?
 
lol "state"
 
unless you mean const, which is essentially an equivalent of a let binding
 
4:07 PM
It's a local variable, man.
And yes, ideally local variables that don't change are immutable.
 
@Griwes so it's local state. Unless it's a constant.
 
But that's a totally different beast.
Local state is deeply different than global or other implicit states.
 
Introducing mutable state unnecessarily is a huge problem of imperative and OO languages.
It makes the code much easier to read and debug
 
It's uniquely owned, there's nothing wrong with modifying it.
Local state is not the problem.
 
are you really having this conversation again
 
4:09 PM
@Griwes Actually, there can be.
 
It's the implicitly passed state that's shared that's a real problem.
 
@DmitriBudnikov you're free to get the fuck out if you don't want to partake
 
the what
 
lol
I see your conversational skills are improving
 
4:10 PM
lol
 
@Griwes Also I think that partial application with lambdas is way less readable than curried equivalent in most of the cases
it's certainly cleaner syntactically
 
Being stateless is a pipe dream
 
> I can't do that properly, so it's impossible and/or impractical.
 
> Navigateurs : Google Chrome devant Internet Explorer
 
@BartekBanachewicz I guess it kinda depends on the exact syntax used.
 
4:12 PM
Is this 2005
Let's end the day with some Hacker Cringe
 
@Griwes Well, try to take a 4-nary function and partially apply one parameter in C++
 
>Why a Logging Framework Should Not Log
risky click
 
@BartekBanachewicz I agree that C++'s lambda syntax is kinda heavy for that, yes.
 
std::bind is fine
 
most of the languages make it pretty annoying really
 
4:14 PM
@CatPlusPlus ewww
 
Lambdas are for local functions not for partial application, completely orthogonal use cases
 
all of those std:: helpers sprinkled across code divert attention from the actual logic
@CatPlusPlus except a lot of people advocate their use for partial application as well
 
Well they're dumb then
 
std::bind is terrible
 
It's fine
 
4:15 PM
It should never have been voted in.
 
Could be better with inferring remaining placeholders but it's fine anyway
 
There's nothing fine with it.
 
You shouldn't have been voted in
What's not fine about it then
 
ITT the discussion accelerates
I'll actually switch to spectate
 
what a plot twist
 
4:17 PM
@BartekBanachewicz Frankly the main problem with that is that you have to manually forward all the arguments in to avoid copying, and that's a yet another different problem that makes C++ not as nice to work with as it could have been, had the committee been interested in actually using some of the things invented in the last 50 years (instead of just reinventing them badly).
 
anyone wanna take bets on when an infuriated Bartek leaves swearing he'll never make the mistake of coming to Lounge again
 
1 min ago, by Griwes
There's nothing fine with it.
 
Wow what a well-articulated argument well done
Is it not Turing complete enough
 
I'm not trying to articulate it, I'm about to leave work after already sitting here for a while too long already and I don't care enough to try to convince you that std::bind is terrible.
 
4:22 PM
@Griwes this; 100% made superfluous by polylambdas
 
100% made of polyester
 
;_;
 
I JUST CANT SLEEP AT NIGHT WHEN THERE ARE TWO WAYS TO DO SOMETHING
 
One of them is just terrible though.
 
put it in the pooper
 
4:24 PM
@CatPlusPlus mmm; isn't your favourite Python's policy to encourage one way of doing things? or did I read it elsewhere?
 
Buttlang
 
Encouraging maybe, not the same thing; also not a policy
 
also python
 
also doing
 
Python devs thankfully aren't zealots or purists that tends to make things unbearable
 
4:26 PM
also things
Well, when you're using a language as terrible as Python, you can't really be a purist. </flamebait>
 
Or maybe because you don't want to be an insufferable nerd
 
lol
 
__zealot # private, don't look here
#no really
#stop
#there's nothing fun in that variable
 
@CatPlusPlus neither zealots nor purists nor devs
 
4:29 PM
@DmitriBudnikov +1
 
python is to programming what bumper cars are to driving
 
no, ridiculous mock-up
 
^l aff
 
useless to get around
 
4:31 PM
Can't hear you over my finished software
 
lol
 
what does it do read a file and count the lines
 
I've done 30 exercises on codewars in python are they also finished softwares
 
enter your age:
my_python_program.py
error! aksdlkasjd is not a number!
"pythong is so great i dont go to school anymore! - steven, 27, asperger"
 
4:33 PM
now we're gonna hear how cat actually despises programming and we're ridiculous nerds
 
"I used to masturbate in front of my parents but then I learnt pythong - samantha, 17"
 
user406009
@BartekBanachewicz Nice. I don't think there is a way to remove the casts in my program.
 
on the bright side pythong isn't jabbascript so that's good
 
user406009
I have tried, but they are quite hard to remove.
 
Xeo
 
4:34 PM
@Lalaland I'm also trying to fix the clicking logic
 
Xeo
wheee, this is fun
 
but what I need is this:
clickComponent :: Lens' (Window s) a -> Window s -> Window s
 
EANIM
 
more touhou
 
@DmitriBudnikov thefuck
 
4:35 PM
yes I know you're all touhou virgins is ok bby
 
@DmitriBudnikov Categorizing chinese art is even worse than categorizing dubstep
 
Xeo
@DmitriBudnikov Not Touhou, but a Touhou-esque boss in an otherwise platformer.
 
>touhou
>chinese art
my ears
also dubstep has very clear categories so idgi
 
Cicada is nub
 
@Xeo ya I just guessed from the miniature, but when clicking I didn't recognise it
ironistar deployed
 
user406009
4:37 PM
@BartekBanachewicz Lenses in public apsi, eh.
 
Xeo
It's Rabi-Ribi, btw.
 
@Lalaland hmpfh (Window s -> a, a -> Window s -> Window s) -> (Window s -> Window s)
> Dodge bullets, missiles and lasers in battle as you wrap your head around that bunny girl costume!
civilization is lost.
our planet is lost
 
user406009
@BartekBanachewicz Isn't (a -> a) -> (Window s -> Window s) good enough?
 
user406009
That's what I have for mine.
 
@Lalaland that's why you can't get rid of the cast
 
4:39 PM
@Xeo why does this remind me of maplestory
 
look how my SelfEffect is defined
 
Xeo
@DmitriBudnikov Dunno
 
ALSO OMG PARTICLE EFFECTS
 
user406009
I remember MapleStory.
 
user406009
I can't believe I played such a shitty game.
 
4:40 PM
what? it was great
 
user406009
@DmitriBudnikov Grinding. And pay to win.
 
Xeo
@DmitriBudnikov It's a very pretty game!
 
@Lalaland :korea:
 
@Lalaland Since my components are parametrized, my window passes modifier to its componetns
Or in other way this makes the click signature kinda local to the component
the component can decide and translate the effects of its parts
but uh all I really need from Lens are non-retarded records
Records are by far the worst part of Haskell
 
what do they look like?
 
4:51 PM
@JohanLarsson they don't have setters.
 
user1804599
Cool, false and zero have the same Church encoding.
 
@BartekBanachewicz is there any language that has mutable records?
 
@JohanLarsson C?
what kind of question is that?
 
user1804599
@JohanLarsson C, C++, C#, D, Pascal.
 
@JohanLarsson Well, C#'s structs are mostly immutable due to convention, not because language enforces it
 
4:57 PM
guys
it's not about immutability
I all for immutability
but I want to modify the values as well
 
Someone have chris kohlhoff contact ?
 
@Ramy Yes. You do. I posted a link to it yesterday.
 
@ No answer
Other metods, like twitter
 
user1804599
@BartekBanachewicz use PureScript
 
user1804599
it has proper records
 
5:08 PM
@Zoidberg has anyone told you already that your unhelpful suggestions are just annoying?
 
user1804599
No, and I don't care.
 
You're an asshat then.
 
@Zoidberg class is not a record imo
C#7 will have records and they will be immutable
 
hmpfh
my drawing API doesn't expose the current screen size
 
maybe just semantics
 
5:11 PM
@JohanLarsson Pascal structs were called records and were mutable
 
@BartekBanachewicz They were called records (and were mutable) in COBOL well before that as well.
 
5:31 PM
@Zoidberg well, that's just not true
 
@BartekBanachewicz Let's go
 
5:53 PM
@BartekBanachewicz wakey wakey
 
rise and shine
 
@milleniumbug No, but the language does enforce lots of dumb shit w.r.t. structs
 
Hey, mornin guys - does anyone know why the function testTruncate() in this block of isolated code asserts that the file size actually DECREASES after initializing a new stream to the file and closing it? pastebin.com/wDrEBrff I've been staring at it for a while to no luck :(
 
no.
 
@Puppy If it's a bit tl;dr (or maybe even 5 lines is tl;dr), I'll just post it on stack overflow as a question then
 
6:04 PM
post a link in here when you're done plix
 
Sure - please don't downvote it to oblivion though please :'( I'll try to make it MVCE
 
I won't
 
0
Q: How come this code actually decreases the file size?

OneRaynyDayI'm looking through a piece of code that writes binary data into a file using a stream wrapped by the library(specifically avro), and I was confused by one of the unit tests that the previous developers have written. (Now yes, I know Avro is mainly java, but I'm trying to extend the C++ library) ...

 
you see, I can only issue one downvote
 
Come on man
 
6:15 PM
well, when you spam up the chat, I can't downvote you
 
lol
 
so I pretty much have to wait for you to ask a question before I can downvote you.
 
But I only chatted like 2 messages into the room, and I tried to keep it short and everything
 
yeah, so you spammed the room two times
my only regret is not being able to issue more than one downvote
 
I can't really argue with you because I know anything I say will be disregarded
 
6:21 PM
@Puppy im hre im here
@Puppy teamspeak
 
@Puppy I've helped a good cause too
 
i was out rollerskating
and i've come to a few very non-nice conclusions
 
user1804599
@Ven found a bug in HHVM lol github.com/facebook/hhvm/issues/7039
 
7:01 PM
Can self-modifying code achieve more than static code? I mean can it be used to implement algorithms that can't be done with normal code?
 
user1804599
@StackedCrooked No. Non-self-modifying code is Turing-complete.
 
Maybe AI?
 
@Zoidberg nice
 
user1804599
Together with a trivial non-self-modifying function that repeats betaReduce until its result no longer changes.
 
user1804599
7:03 PM
That function isn't in that library though because it's partial and partial functions suck.
 
user1804599
 
> Already reported as #5541.
 
user1804599
Yes, I know.
 
@BartekBanachewicz we can't wait to hear about them all
 
sup
 
port
 
7:21 PM
I like port.
 
They're very much technically different. They might be similar in your head, but that doesn't count. — sehe 8 secs ago
@EtiennedeMartel Sad. 'Cause it'sup
 
:30370141 omg r u edition
 
A FUNNY VERSION?
Nah. Too contradictory
> > I hope that shameless
> self-advertisement is not going against some rule of this list, but I am
> sure you will let me know.

Well no, that's part of the purpose of the mailing list. Though be prepared, that you may get very harsh criticism here.
Boost mailing list is not that far from lounge in this respect
 
7:39 PM
Process again?
 
user1804599
I'll just make x = y = z a syntax error (= compares, not assigns). x = (y = z) or (x = y) = z is silly.
 
user1804599
Non-associative comparison operators ftw.
 
7:55 PM
how do you go wrong with the butt
lol:
16
A: I got an email threatening to DDOS me if I don't pay a ransom. What should I do?

SamBCThe company I work for was "accosted" by these guys a few months back. They did actually DDoS the site for 30 minutes, and then they started contacting our customer service inbox asking for the bitcoin ransom. Turns out, our DDoS mitigation system was broke, so they actually did us a favour! T...

3
 
user1804599
8:13 PM
> A Satanist Explains Why Ted Cruz Is Not, in Fact, Lucifer
 
@Zoidberg It's not
If, e.g. x or z is a bool
 
Ven
@Zoidberg congrats :D
 
I made myself chocolate mousse and put some beer in the fridge... but now I have to wait before being to enjoy them u____u
 
Ven
@Zoidberg a = b = c to mean a = b && b = c would be rly cool tho :)
@Morwenn ah yes, that one old trap
 
nwp
@Morwenn you can actually make choco mousse?
 
8:22 PM
@nwp Yeah, it's pretty easy.
With some additional almond powder in it for the flavour.
 
nwp
nice, got to try that some time
 
@Ven Python style.
 
Ven
@Morwenn i mean, a = b or c worked in COBOL, so..
It still works, btw. But it did back then as well
 
@Morwenn neat! I made Mango Sorbet, Frozen Yoghurt, and edible Cookie dough..
 
@Khaled.K Cookie dough... It's tasty as fuck but then I'm full for a week.
@Ven Sorry, I don't know much about COBOL :/
 
8:27 PM
@Morwenn I made a huge patch for a picnic, the sorbet and youghurt are like an addons.. and its all sugar-free
 
Ven
@Morwenn i wish you as much
 
@Zoidberg Go the PL/I route, and guess whether each instance of = means assignment or comparison. In a = b = 0;, the first is interpreted as assignment, but the second as comparison (and it groups right to left) so the net result is that a is assigned either 0 or 1 (to signify true or false result of the comparison). This gives one result with certainty: after executing a = b = 0;, a will not equal b.
 
@Khaled.K Sugar-free? Not sure I could live with that o.o
 
user1804599
@Ven too difficult to implement
 
@Ven I don't know, rightfold seems to find the language really funny.
 
user1804599
8:29 PM
COBOL is awesome
 
user1804599
It has binary search as a language feature. That's just great.
 
Ven
@Morwenn the fact that me or rightfold like a language doesn't mean we wish other people would learn 'em :)
 
@JerryCoffin Game Maker considers that = in a condition is always a comparison, and that it is an assignment everywhere else.
 
@Morwenn going sugar-free does not mean you have to eat it bitter, the mango for one has natural sugar which is good for the body
 
@Ven Haha :D
@Khaled.K Yeah, but I tend to like really sugary stuff.
 
Ven
8:30 PM
@Zoidberg is it, tho? Only hard thing to deal with is caching
 
user1804599
As few people as possible should learn COBOL, because that increases my salary may I ever have to do it for a job
 
@Morwenn complex sugar is bad because it's like compressed natural basic sugar that is found in fruit
 
Ven
@Morwenn even if we find them "fun". Especially then, actually...
@Zoidberg like you could handle a cobol job without throwing a tantrum on the 2nd day
 
user1804599
I translated Awkward too :) and Option
 
Ven
lol
 
8:32 PM
@Khaled.K My taste buds say otherwise :(
 
Ven
Now add syntactic macros :-).
 
user1804599
Hack has so many edge cases. It thinks ($x) === (null) does a type cast.
 
user1804599
cast[object](blah) :3
 
@Morwenn I always used to wonder why eating a full dish of sweet fruits like mango and pineapple would be totally fine, while having a cup of tea with a spoon of sugar make your body sweat and stop processing digested food..
 
Hm, the concept of additive-increase/multiplicative-decrease might actually be useful to implement log rate limiting. For example each loggable event increases "log credits" by one unit, but an actual log operation costs 50% of all credits.
I'll report my findings! (If I ever get to trying it out...)
 
8:44 PM
@Morwenn I used to .. trust my taste buds
 
lol lej
 
Ven
@slaphappy ça t'fait rire?
 
> [10:49 PM] CatPlusPlus: And breaking compatibility results in a new language and that already exists and is called every other language
Katt on templates
 
Eh~, std::begin is not enough for cpp-sort anymore :(
 
@Khaled.K This is a massive over-simplification. Normal table sugar is primarily sucrose. A lot of fruit contains a fair amount of fructose instead. That much is true. However, that's about the extent of it. In fact, there are about half a dozen different sugars (glucose, lactose, maltose, etc.) that are common in fruit, and while some (e.g., apples) have a lot more fructose than sucrose, others (e.g., mangoes, peaches) are pretty much the reverse.
 
Or is it?
 
Jerry Coffin uczy i bawi
 
One big thing is that although fruit taste sweet, they just have a lot less sugar overall than a lot of candy and such--very few fruit are more than 10% or so sugar, while candy bars are often more than 50% sugar.
 
@JerryCoffin I'm not good with scientific stuff, but speaking from experience, I found out that a spoon of table sugar was always worse on my body than a dish of fruit salad or big cup of fruit juice
 
nwp
8:56 PM
what's wrong with sugar again?
 
its very purpose :G
 
@nwp The main thing that's wrong with it is that we (people) are largely "programmed" to think in terms of consuming as many calories as possible, because (historically) starving to death is a frequent problem. Sugars and fats have a lot of calories, so we like them--but most of us in the western world are in no danger of starving to death, but that programming still pushes us to eat more than we should.
 
We apparently naturally like sugar.
 
can i ask a c++ question in here ?
 
nwp
I thought it was about health issues, that doesn't sound so bad
 
8:59 PM
On the other hand our taste for salty things is an acquired one.
 
@Shiro Is it really interesting?
 

« first day (2028 days earlier)      last day (2921 days later) »