Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

haskell weenies

Name: Anonymous 2015-10-21 12:48

<kant> Why doesn't this work? http://pastebin.com/7qMqFRg5

var phrase = "hi there";
var changephrase = function() {
phrase = "good bye";
};

console.log(phrase);

<aristotle> kant: it works
<Plato> kant: Did you try bombing it?
<aristotle> kant: not sure what you are expecting it to do
<Plato> When will people start using Gist instead of fucking pastebin?
<kant> Plato: I'm thinking about it.
<kant> aristotle: The phrase should be changed to "good bye", but isn't.
<marx> no it shouldn't
<aristotle> kant: then maybe you should execute the function
<marx> a function don't call itself without you calling it :-D
<kant> Hmmm.
<Plato> marx: Sounds like a philosophical statement.
<aristotle> try console.log(changephrase(phrase));
<Plato> aristotle: Are you joking?
<marx> likely the interpreter is just punishing you for using global variables
<Plato> marx: Lambda all the way.
<Plato> Jk.
<aristotle> Plato: no, I am not a hipster
<Plato> marx: He's punishing him for using states.
<Plato> #fuckmutability
<marx> fucking mutable state
<marx> kant: rewrite your code in Haskell so it's easier to reason with. It is impossible to understand such code with so much mutating state.
<Plato> marx: ily.
<kant> antarn: What do you mean by mutating state?
<aristotle> kant: he is suggesting you don't change the global var phrase in the function
<aristotle> kant: instead, make a new local var, change that, and return it
<aristotle> kant: if you try my suggestion you will see that it logs nothing
<kant> aristotle: But why can't I change the global var?
<aristotle> kant: you can
<aristotle> kant: Plato is following a specific philosophy that doesn't like such global state

Name: Anonymous 2015-10-21 14:39

Nice app bro

Name: Anonymous 2015-10-21 15:01

Marx is not smarter than Kant. Should have gotten Leibniz's input instead.

Name: Anonymous 2015-10-21 15:30

Haskell is the functional Java.

Name: Anonymous 2015-10-21 17:32

typeclasses make haskell the "acceptable java"

Name: Anonymous 2015-10-22 3:14

oh wow le philosophers i love le philosophises joke le reddit le iq over 9000 carl sagan schopenhauer am i le genius yet muh einstein

Name: Anonymous 2015-10-22 4:49

Reading that chat log gave me a migraine. I am suing everybody involved.

Name: Anonymous 2015-10-22 5:08

I think kant is a pretty cool guy. He neither calls functions nor afraid of anything.

Name: Anonymous 2015-10-22 5:17

>>8
dis guy wif da dank memes :D

Name: Anonymous 2015-10-22 7:38

>>9
u muh nigga, nigga

Name: Anonymous 2015-10-22 15:20

holy shit these people are retarded

Name: Anonymous 2015-10-23 2:02

Any problem in computer science can be solved with another monad. But that usually will create another problem.

Like too many monads.

Name: Anonymous 2015-10-23 9:28

>>11
yeah, lmao

Don't change these.
Name: Email:
Entire Thread Thread List