« first day (1670 days earlier)      last day (3296 days later) » 

9:00 PM
@copy Well, that slogan was what inspired Ad Words, so it helped Google in that way
 
Fire-able - comes to work drunk
not fire-able - finishes a task on time.
 
which is something along the lines of 85-90% of their revenue
 
if i were to use alert(sunset.toLocaleTimeString('en-US')); how could I subtract 15 minutes before displaying the alert? — Nick lK 8 mins ago
I should really find a new tag, general questions suck
Maybe I'll pick up some machine learning related tag and get better at that or something
 
@SomeKittens Yes, evil
 
@rlemon comes to work drunk and finishes a task on time?
 
9:02 PM
already fired for coming to work drunk
can't finish task
!!afk gnoming holm
 
@copy when we hate on companies like Facebook and Google we have to also remember how they changed the world for the better.
They changed how we consume information and how we communicate, google undermined the very assumption you need to or have to remember things.
 
@BenjaminGruenbaum Facebook did no such thing
 
crl
not sure facebook improved things
 
they made information more shallow and more frequent, devaluing it pretty significantly
 
9:04 PM
@Jhawins in fairness just a heads up shouldn't drop fbombs much
 
they also did absolutely nothing to change communication methods
 
I try never to at the office
 
@ssube For you, not for the majority of people.
 
@BenjaminGruenbaum What Google service are you talking about?
 
@copy search
 
9:05 PM
@copy search
 
@copy that
 
@copy search
 
Oh, right
 
@copy search
 
I think it's search
 
9:05 PM
 
Google is a hashtable for the mind - I don't need to remember anything, just the hash value
 
I think it's that
 
@ssube everybody uses their smart phones in group chats and writes about themselves on their walls and attends events and discusses in groups. That was nerd territory before facebook.
 
@SomeKittens it has a lot of collisions, thought. Millions per record.
 
maybe it is bumptop instead?
 
9:06 PM
@BenjaminGruenbaum most of my friends don't use facebook heavily
the basics do, sure
 
I haven't yet used FB
 
@ssube right, but like... 600 million people do
 
real people don't use FB
@BenjaminGruenbaum that's how many people use it sometimes for some stuff
 
No True Scotsman uses FB
 
@ssube sure they do
 
9:07 PM
or log in and read stuff or like things
 
@ssube 600 Million daily active users
 
crl
Facebook seems used by people who want to meet up with others
 
> Facebook users from 2008 to 2015. As of the first quarter of 2015, Facebook had 1.44 billion monthly active users.
 
@SomeKittens yeah, I count as one of those, but I don't actually use FB. I just look at it when I wake up, get annoyed, and ignore it.
 
That's active users
 
9:08 PM
Only like one of my friends uses it frequently and we all make fun of her for it.
 
@ssube so you look at it every day, probably use chat too? Clearly not a user.
 
@BenjaminGruenbaum sometimes, although I don't trust it, so I mostly text people
if anything, it just convinced me to ignore the internet because it's full of shit people and worse content
 
@ssube you'd be surprised how many technical discussion between nerds is held on FB, and like I said - you're not a representative sample and neither am I, think about the less tech savvy people from your school.
 
@BenjaminGruenbaum would you say FB's culture of "Move fast and break things" contributed to their success?
 
What is Facebook again? A dating site right? :P
 
9:09 PM
@BenjaminGruenbaum they didn't know FB was a thing
or posted pictures of duck face on it every night
it was 50/50
 
@ssube that's a legit user.
 
@SomeKittens No, Facebook had the momentum. It's a good slogan though, in my opinion
 
@BenjaminGruenbaum That's most of their users, which is their problem.
 
@SomeKittens I think Facebook "won" in a way because they got marketing right over anything else - but experimenting a lot was important.
@ssube why is it a problem? The fact that most people don't share the same interests as you doesn't make it a problem for facebook.
 
@BenjaminGruenbaum duckface is, objectively, a problem
there are older and more effective ways of getting laid
 
9:11 PM
@ssube they didn't aim at the users who were using IRC and mailing lists and forums and wrote blogs. They aimed for the other 99% and that 1% came on its own.
 
@ssube you have a really weird definition of "objectively"
 
@ssube not from facebook's perspective.
 
@ssube like?
 
@ssube Like alcohol
 
@AwalGarg taking your damn clothes off
 
9:12 PM
@ssube they didn't solve a problem for you, but they didn't try to anyway.
 
@SomeKittens you think duckface is a good thing that contributes to our society?
do you drive a rover?
 
@ssube Oh, you're not thinking of getting laid, you're thinking of getting arrested. Easily confused, both involve cuffs.
 
!!define duckface
 
@ssube no, but that's irrelevant.
 
@AwalGarg duckface (slang) A facial expression in which the lips are pushed outwards in a pout.
 
9:13 PM
@Zirak it's a fine line, really
 
...?
 
@AwalGarg you ever seen a dumb blond looking like they're about to tongue a mirror?
 
Seriously though, do you not see how Facebook almost literally changed the world?
 
crl
!!urban duckface
 
@crl Duckface A term used to descibe the face made if you push your lips together in a combination of a pout and a pucker, giving the impression you have larger cheekbones and bigger lips.
 
9:13 PM
that's duckface
 
@ssube facebook brought a lot of less than intelligent people online - that's a good thing just to be clear.
 
@ssube Ah, internet arguments, where something is objectively terrible or the second coming.
 
It helps people, even not ones who can write an IRC bot, communicate.
 
"Annoys me" is a world away from "Objectively a problem"
 
@BenjaminGruenbaum less than intelligent people are never a good thing, unless you need extras or minions
 
9:14 PM
"communicate"
 
-3
Q: Generators in JavaScript, Why should i use them?

AnkitaSundriyalI am new to JavaScript, i found the concept of generator functions, as a beginner I'd like to know more about what generators are especially how they can be used in JavaScript and how can i structure my code better with them.

 
@ssube why?
 
@ssube They should be killed
 
@SomeKittens you're trying to hide the fact that you're secretly a basic bitch
 
@Zirak I do. It is a pretty good thing. Helps separate weird people and geeks.
 
9:14 PM
@Zirak that's what usually happens to minions
 
They don't deserve to communicate with each other, they should live in their caves and die in the cold
 
I wonder where a beginner finds about generators.
 
@darkyen00 From a proper language
 
@ssube Minions eat bananas and paples
 
@BenjaminGruenbaum oh, I just don't like stupid people :D
 
9:15 PM
@copy lol true xD
 
@Zirak what is a paple?
 
@ssube meh.
 
and is putting that on hold right ?
 
Also on a serious note, I haven't used FB but from what I have heard, it sounds like a good thing for those who use it :/
 
i mean duplicate to "why should i use generators or what are they" sounds right
 
9:16 PM
@ssube You have your own share of stupid in you
 
@BenjaminGruenbaum and folks who frequently suffer from duckface tend to be fairly stupid
 
@AwalGarg Only if you know people who use it, but even then maybe not
 
@Zirak oh, I hate myself too, don't worry.
 
@ssube 2.9 we should form a Facebook group
 
@AwalGarg It's the best way I've found to keep in contact with college friends
 
9:16 PM
^ its great for that
 
@ssube now if only there could be a platform that'd help them communicate and bring them into the age of information so they can be just a tiny bit smarter.
 
also for family, as someone who lives out of state I like seeing what they are up to
 
@SomeKittens ahh, sounds like you have a life!
 
@AwalGarg had one, at least
 
@BenjaminGruenbaum Facebook is a great distraction from that
 
9:17 PM
@BenjaminGruenbaum no. Natural selection ftw.
If you want to have duckface, your lips can get stuck to the window and you can starve. It's what Darwin would have wanted. It's why he had a beard (bears keep your lips from sticking).
 
Facebook will rule the world with VR soon you can see duckface in true 3d.
 
@copy I kind of disagree, communication is important for information and getting people talking is important.
 
@Loktar or you can just go to a college party and look at the girls there :3
 
My observation from friends and family people who use facebook and are not geekish is that they don't check their email, and believe on any random thing they read on the internet (mostly).
 
@ssube psh that requires walking
 
9:18 PM
Sounds a lot like I don't like people with different social standards
If someone likes to duck face it's their problem, big whoop.
 
@Loktar I drive. How else am I supposed to get them home?
 
lol
 
@BenjaminGruenbaum Right! Just like those smelly nerds with their dice. They're stupid and should be all killed off.
 
@SomeKittens total idiots.
 
Just nail their basement doors shut
 
9:20 PM
@SomeKittens nah, they'll die of mountain dew poisoning
 
they will starve after their mt dew runs out
 
Don't they have friends? They seriously need to get a life.
 
We should really just, like, hide all of the people who aren't normal.
 
@BenjaminGruenbaum Their silly chat rooms aren't real communication.
 
Send them to space or something.
 
9:20 PM
@SomeKittens they just waste time
And make jokes of internet code libraries, such pathetic nerds.
 
@SomeKittens that's actually true and there's science for it. Text communication loses a lot from in-person communication.
 
Why can't they do social stuff?
 
@BenjaminGruenbaum it's great and does all the things :D
 
@ssube right, it's also super effective and you can do it with a lot of people at once.
 
@BenjaminGruenbaum It's only effective for fairly simple facts and quickly falls apart when opinion is introduced.
 
9:22 PM
@ssube clearly we've never had any effective or interesting discussions here.
 
If you're trying to convey information that's definitively true or not, it works pretty well. There's no body language or tone or opinion.
Trying to discuss opinions without body language or tone is tricky, at best, and more often useless. Hence all the jokes about arguing on the internet.
 
That's not why arguing on the internet is jokeworthy
 
@Zirak builder is not only for gnnome :/
 
@ssube no book ever made any case about any opinion ever.
Books are useless to convey feelings, we should burn them with all the nerds
 
it is compatible with any gtk+3 environment
 
9:23 PM
We've had an argument now without tone of body language, it's usually dickism and blindness which kill arguments.
 
user1596138
@Loktar Right as I read this message I was muttering clusteerrucfkc
 
@Zirak ur not my real daddy :(
@Zirak that also kills verbal arguments though.
 
@BenjaminGruenbaum Books and chat are very different. Books can invite debate, but are not a form of debate (and when they are, tend to be ineffective).
 
and you didn't add nano to the list sucker :(
 
@AwalGarg That's what it says on the homepage, I quote homepages, also why do you obsessively refresh that gist I updated it a minute ago
 
9:24 PM
Books prompt in-person debate where chat just causes people to be dicks.
 
@ssube the thing is, we've had plenty of interesting discussions here.
 
@ssube See: Newspapers, journals, mail
 
@Zirak I forgot I had put it on watch :P just changed the workspace and saw the grey lines :D
 
@BenjaminGruenbaum yep, and most of the things we discuss here have some definite answer(s)
 
I've had plenty of interesting discussions with people I didn't meet IRL and then went on to meet them IRL, including people in this room.
 
9:25 PM
There is opinion in a lot of it, but there's an actual answer somewhere.
 
@ssube not at all.
 
If you try to talk about politics on the internet, you're just plain screwed.
 
How to design stuff, conceptual understanding of things etc.
 
@Zirak it says 15 minutes ago...
!!> 15 === 1
 
@AwalGarg false
 
9:25 PM
see?
 
@BenjaminGruenbaum But explaining a concept to someone still isn't totally opinion. There's a real (conceptual) thing to convey.
 
@BenjaminGruenbaum Shut up and get me another, stronger beer. I need to forget your birth.
@ssube It's natural that you feel that way, you like Java
 
@Zirak Yeah, well you're orange.
 
wait a sec that gist is on watch since ~23 hours :O
 
Your soul is corrupted beyond hope
 
9:26 PM
@Zirak Your mom corrupted hope
 
@ssube no, yellow
 
Her womb is polluted. nsfw language.
 
@ssube As opposed to political arguments IRL, which usually go by swell
 
@FlorianMargaine but I can't call @Zirak yellow, that's racist :\
 
@FlorianMargaine It recently snowed
@Loktar That has to be the scariest link I won't ever follow
 
9:27 PM
@Zirak lol just a scene from scarface.
 
@ssube backbone sucks, all editors but WebStorm for JS are shit, mongo isn't a real database, promises are totes superior to callbacks, observables are good, singletons are bad, if you're not using a module system your project sucks, if you're using node on the server but can get away with python you're doing it wrong, jQuery has some good abstractions for the DOM, JavaScript has batshit insane typing sometimes, Haskell has a ton of broken stuff in it and doesn't help at all with type safety.
All objective.
 
@BenjaminGruenbaum I would argue that when we discuss things with a real answer (i.e., more objective), it's a more productive discussion.
When we discuss something that doesn't have a real answer (say, editors) it turns into a random debate.
 
Usually more boring, too.
 
@ssube if I want a single "real" answer I don't come here I google stuff. Sometimes I really want opinions.
 
Talking about promises, we can bring up different points, but they have some actual value that can be argued for or against.
 
9:29 PM
Right, we have discussion
Like we're having right now, but less meta. We're learning stuff.
 
@BenjaminGruenbaum Out of curiosity (not opposing your point), Haskell […] doesn't help at all with type safety?
 
People learn by doing or reading, and then by thinking about what they did or learned. Thinking in a group helps.
 
@BenjaminGruenbaum or hurts, depending on the group.
 
That's true of any human interaction
 
@ssube Right, and the group that works for us doesn't work for other people. It's entirely possible that some teenage girls find comfort, self worth and a feeling of belonging when they send eachother duck faces.
 
9:31 PM
@BenjaminGruenbaum wait, out of real curiosity, you don't literally mean that "promises are totes superior to callbacks", right?
 
@BenjaminGruenbaum and an alcoholic finds comfort in the bottom of a bottle. That doesn't make it healthy behavior.
While it may be good (in some ways) for the person involved, the larger effect may not be a good thing.
 
Who are you to define what's healthy social behaviour and what's not? What's "normal"? They're relative terms
 
@copy well, you declare something belong to an actual type class but the engine can't prove it or validate it nor does it stop you when you use it as one - I don't really think Haskell doesn't help but it's not as advertised. I just had a shitty yesterday seeing lots of code for structures that weren't really the structure.
@AwalGarg by callbacks I mean a really specific type (nodebacks) - and for those I believe they are.
 
Besides, you have ab underlying assumption that a person's goal in life should be the betterment of society.
 
@BenjaminGruenbaum Hmm, interesting
 
9:34 PM
@ssube how is that a fair comparison? Being in a group is just part of what most people want to do and debating our daily life helps us shape our lives, even if we're not part of intellectualism.
 
my goal in life is to leave some kind of impression
 
@BenjaminGruenbaum ah cool.
 
since you all asked
 
If that's the case, isn't it also one's obligation to seek out how to maximise their impact on society (assuming we have a clear understanding what "a better society" is)?
Have you no shame, buying video games and comic books when you could've used that money to clothe dying orphans?
 
@Zirak Apparently I don't
 
user1648409
 
Unless you weren't talking to me
 
@Zirak maximize, perhaps not
 
@copy basically, I got 3 instance Monoid things where neither was an actual monoid, mempty wasn't even neutral, then I got a Monad that didn't do a monad law - I got them from another developer. Using them totally broke my code and it took me ages to understand why. Haskell didn't (and can't) verify or validate any of that.
 
I am of the opinion that a good life is one where you cause other people more enjoyment than not.
 
@Zirak wouldn't that be nice
 
9:37 PM
@ssube And duck-facing circle-jerking causes people enjoyment.
 
@ssube You know, I just want to make everyone happy, but not at my own expense.
I want to be happy, too.
 
@ssube so if a baby is born to a single mother, his mother is happy - then she gets shot then the baby gets shot - he had a good life in your opinion?
 
Doesn't cause you, me or @BenjaminGruenbaum any, but we're also just individuals.
(also, don't Americanise my words, you filthy British descendant)
 
There's a fine balance between living selfishly and selflessly.
 
@Zirak Let's melt down the Eiffel Tower!
 
9:38 PM
@BenjaminGruenbaum depends on if the baby was conscious of their actions. If not, then it doesn't matter: they didn't really have a life.
 
Really, what a good life is is a big question, what the meaning of life is is a big question - we don't really want to go have that debate but honestly I don't think we should presume having people connect is bad.
@ssube they were, but only for the 10 seconds of their life.
 
Once you're capable of making choices, you should do what you can to enjoy your life and bring enjoyment to others.
@BenjaminGruenbaum babies can't really think
 
@ssube why is bringing enjoyment to others a goal?
 
not in a way that would allow them to try to make others happy
 
@ssube but they can feel.
 
9:39 PM
@ssube sure they can, also it's a thought experiment.
 
@ShotgunNinja doesn't matter
 
I sacrifice cats at a local Satan's Cookies & Blood Meetings. Frolicking all around. Good thing, I gather?
 
If I drug the entire world's population so they're dumb and happy - I had a good life?
 
@Zirak Where and when are those meetings?
@BenjaminGruenbaum Not if you feel guilty.
 
I made everyone (including me0 happy by drugging the world, then they all die because they're so happy they don't eat or drink.
Did I have a positive impact on the world? Did I have a good life?
 
9:39 PM
@ShotgunNinja T̘̟̀ḩ̮e̷̳̯̹ͅy̩̱̗̣'̪̖̦̠̖͍ͅr͈̩̼̭̬͎͕͞eͅ ͎̺͙͚̭͠i̻̥̞͈̜n̲̦̙̱̪͞ y̵͓o̦̯̬̥̲ͅu͔͙̰̭̭͈̣r͍͕ ̮͍̝͉̻̥m̴̪̗i̧ṇ̦d҉
 
@BenjaminGruenbaum because there is no point to life, or overarching purpose. The only thing you can do is enjoy your own, but not if other people prevent you. In turn, you shouldn't prevent them, so make things a little bit better.
 
crl
1/5th of the world's population is already drugged
 
a happy life isn't necessarily a meaningful life but that's just my opinion
 
@Zirak Oh, good; I should be able to start attending.
 
@BenjaminGruenbaum You're just a tootsie smootsie
 
9:40 PM
I was worried that I'd have other obligations.
 
@BenjaminGruenbaum certainly not a bad one.
 
It was a continuation of the line above it I'm not looking for a "cheer me up"
 
y'all are getting way too philosophical.
 
@BenjaminGruenbaum Doesn't sound like an issue with the type system to me (since the Monad laws aren't enforced by the type system). I get your point though. Does GHC make optimisations assuming Monad laws?
 
@ssube I disagree, I think life is awesome, I think life has a purpose and I think we get to choose what to do with it. It's not just about joy, it's about progress too.
 
9:42 PM
@BenjaminGruenbaum That's a fairly common opinion, but not one I share.
 
meh, we live and then we die, universe dies some heat death, the end. Nothing to be excited about, right?
Just walk along the Tao a bit and you'll be fine
 
@copy the fact the laws aren't and can't be enforced by the type system is an issue of the type system - it's a fake illusion that I have sound types where in fact I have to verify and validate them myself. If I can trust the guy sitting next to me to pass me a monad that is truly a monad or a functor that is truly a functor I can trust him not to pass me null in Java or to not do something crazy like change global state for lols in a callback in Python.
 
All we ever have is what we experience while we're here, so we should make that our own ideal (but don't screw other people over, if you can, cause they're trying to do the same thing).
 
@BenjaminGruenbaum How is it different from using someone's library for addition and it does subtraction instead?
The way typeclasses advertised by Haskell evangelists?
 
@copy GHC didn't make optimizations that I was aware of - but I assumed I can use my monad as a monad and my monoids as monoids and that assumption turned out incorrect - (namely, mappending an mempty should be a noop)
@copy well, if the function does something wrong it's a logical error, that happens everywhere. If you pass me a type that claims to do one thing but really doesn't that's a type error. I agree thay're not that different but that's not the point Haskell people try to make.
 
9:46 PM
Is there an easy way to create a wiki-style HTML file using front end scripts i.e. Javascript so people with the same link can edit the same page?
 
They try to imply that the system helps you with types - and indeed it does but that's not where most complexity hides.
@copy I like a lot of stuff about Haskell, I'm just not that huge of a fan of the type system as advertised. For example, I hate that you can have non exhaustive functions that's as bad as null pointer exceptions IMO
@user2315552 yes, you can encode the contents of the page in the URL, but I'd use markdown and not HTML to prevent XSS
 
@user2315552 ^ and you can use firebase, but that involves firebase's server so not really... if your clients are always online and listening to changes, peerjs might help... but there isn't an effective and feasible way to do this with only front-end scripts. Just use google docs...
 
Prelude> let foo 5 = 3;
Prelude> :t foo
foo :: (Num a1, Num a, Eq a) => a -> a1     -- this is an obvious lie @copy
 
oh also, togetherjs
 
It's a function from 5 to 3, not from number to number.
Prelude> foo 4
*** Exception: <interactive>:2:5-13: Non-exhaustive patterns in function foo
Such typesafe, much wow.
 
9:50 PM
Promise.coroutine(function *(){
    let x = yield fetch("/some/foo");
});a
 
@BenjaminGruenbaum It's the best I've seen, to be honest. Although Haskell also brings some disadvantages, of course
@BenjaminGruenbaum Agreed
 
how does x gets the value of the return of the promise yield fetch("/some/foo")?
 
In MLs, you can't do that
 
@copy also in Rust and Swift iirc.
 
Doesn't GHC have a switch to make that an error, by the way?
 
9:51 PM
@copy I just don't find that it solves that many problems better for me because of the type system. I enjoy laziness and pattern matching sugar and comprehensions and all sorts of fun stuff as strong selling points. It's just the type system could have been so much better.
Oh, also exceptions are just lolsome.
 
@darkyen00 I have the same question, but I am too lazy to see the bluebird source. (You already know that we can assign values from next calls to variables in a generator though, right?)
 
@AwalGarg & @BenjaminGruenbaum thank you, amazing.
 
Enjoy
@darkyen00 I wrote an await here like a gazillion times, use the chat search
It's like... 9 LoC, I even wrote the example of the coroutine in "You don't really know JavaScript", mostly.
@copy also, I'm not a good Haskell programmer, I'm not even a decent one, I just write some code in Haskell sometimes, I've never written more than 1000 LoC of Haskell for a single project or worked with more than 3 people on a project - so it's entirely possible that my criticism is unjustified naive or just stupid.
Jun 9 '14 at 11:22, by Benjamin Gruenbaum
function async(gen){ "use strict";
    gen = gen();
    return Promise.resolve().then(function cont(a){
        var n = gen.next(a);
        if(n.done) return Promise.resolve(n.value); // a `return`
        if(!n.value.then) return cont(n.value); // yield plain value
        return n.value.catch(gen.throw.bind(gen)).then(cont);
    });
};
Or something like that @darkyen00
 
Moarning
 
@BenjaminGruenbaum oh okay
xD
so there is something which pipes back the value from the .then
 
9:56 PM
@darkyen00 what?
 
My confusion was
 
@BenjaminGruenbaum -Wall, but doesn't fix this in the general case
 
@darkyen00 yes, cont is recursion.
 
let x = fetch('foo/bar'); // x is a promise
let x = yield fetch('foo/bar'); // x is the json
yeah realized when you recurse you are piping the resolved value back into the generators context.
 

« first day (1670 days earlier)      last day (3296 days later) »