Snark has quit [Read error: 110 (Connection timed out)]
Boojum has joined #ocaml
Boojum is now known as Snark
tennin has joined #ocaml
Smerdyakov has joined #ocaml
lscd has quit ["Leaving"]
smimou has joined #ocaml
love-pingoo has quit ["Leaving"]
zetta has joined #ocaml
<zetta>
can someone tell me why this gives the error "Unbound instance variable a"
<zetta>
let a = ref 1 in let b x = a <- x in b 10 ;;
<pango_>
you probably mean !a
<pango_>
my bad a := x
<zetta>
trying to set the reference, not deference.
<zetta>
:= worked
<zetta>
weird!
<Smerdyakov>
Why is it weird?
<Smerdyakov>
<- isn't an operator over references.
<zetta>
can you continue
chessguy has joined #ocaml
<zetta>
the 3-sentence summary of := vs. <-
<Smerdyakov>
Sure. "OCaml sucks because it has both." ;-)
<Smerdyakov>
I believe <- is for mutable fields and members.
<pango_>
type 'a ref = { contents : 'a }
<zetta>
ok. and := is for references. makes sense. would be nice if they used the same operator though. and complaining about unbound variables makes me think the let wasn't scoping something right
<zetta>
very confusing
<zetta>
well, thank you.
<zetta>
pango and Smerdyakov
<pango_>
let ref x = { contents = x }
<pango_>
mmh forgot the "mutable" attribute
<pango_>
type 'a ref = { mutable contents : 'a }
<pango_>
let ( := ) r v = r.contents <- v
<pango_>
let ( ! ) r = r.contents
<pango_>
here you are, you redefined references...
<zetta>
perfectly clear. sorry for the noise. I'm an ocaml newbie
<pango_>
wondered about the need for two operators too... but references are only syntactic sugar in ocaml
<zetta>
yeah that makes sense.
<Smerdyakov>
Just having mutable state already makes OCaml suck.. ;)
<zetta>
spoken like a true haskell devotee
<Smerdyakov>
Coq devotee, actually
<Smerdyakov>
Haskell is too impure for me.
<zetta>
damn.
<zetta>
I don't think I'm smart enough to use haskell.
<zetta>
so I wonder if I should even go to the trouble of learning about that. :)
<Smerdyakov>
I think it's the future of programming languages.
<zetta>
what have you done in it
<Smerdyakov>
I work on programming language tools with proofs of correctness.
<zetta>
Berkeley, impressive. I'll applying to CS grad schools this fall.
<Smerdyakov>
What's your country?
<zetta>
US
<Smerdyakov>
What's your current school?
<zetta>
I got a BS in CS from www.ualr.edu over two years ago.
<Smerdyakov>
OK. What degree level will you be applying for?
<zetta>
probably masters, I doubt I would be taken seriously otherwise
<Smerdyakov>
Seems prudent
<Smerdyakov>
Is a PhD your goal?
Wild_Cat has quit ["Leaving"]
<zetta>
I would like to go that far for several reasons but the career options aren't great. I wouldn't characterize myself as fit for a research career. and most people say "only do PhD if you want to do research the rest of your life"
<Smerdyakov>
Sure. A PhD program is a research apprenticeship.
<zetta>
I would like the option of being a teaching professor at a non reseach university when I get sick of the real world.
<zetta>
if that makes sense
<Smerdyakov>
I'm not sure what it would mean for it not to make sense. It's your life. :)
<zetta>
it was a prompt for you to say "that makes no sense to me" or whatever :P
<zetta>
or "what the hell, I thought everyone was meant to research proof assistants"
<Smerdyakov>
Personally, I would never want to be a teacher in the USA. Our educational system is too horrific.
<zetta>
no argument there
<Smerdyakov>
I guess you are into horror. :)
<zetta>
"those who can't do, teach"
<zetta>
ever heard that one
<zetta>
I could definitely see myself being one of "those who are sick of doing stuff for corporations, teach"... and the least of those is teaching at a higher level (not K-12)
<Smerdyakov>
It's all crap. No one learns through the procedures employed at any mainstream educational institution.
<zetta>
yet the pay so many people to try. :)
<zetta>
er they
_jol_ has joined #ocaml
_jol_ has quit ["my keyb oard seems t o bee b ro ken :-("]
_jol_ has joined #ocaml
slipstream-- has quit [Connection reset by peer]
slipstream has joined #ocaml
_velco is now known as velco
tennin has quit [Read error: 113 (No route to host)]
_jol_ has quit ["leaving"]
Wild_Cat has joined #ocaml
_jol_ has joined #ocaml
Wild_Cat has quit []
Revision17 has quit ["Ex-Chat"]
Revision17 has joined #ocaml
pango_ has quit ["Leaving"]
pango_ has joined #ocaml
_jol_ has quit ["temci lo nu sipna .i co'o"]
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
velco has quit ["I'm outta here ..."]
Snark has quit ["Leaving"]
mnemonic has joined #ocaml
<mnemonic>
hi
chessguy2 has joined #ocaml
chessguy has quit [Nick collision from services.]
chessguy2 is now known as chessguy
<TSC>
Hi
chessguy has quit [Connection timed out]
Wild_Cat has joined #ocaml
joshcryer has quit [Read error: 110 (Connection timed out)]
smimou has quit ["bli"]
Wild_Cat has quit []
Wild_Cat has joined #ocaml
Wild_Cat has quit []
zetta has quit ["Chatzilla 0.9.73 [Browser 0.7.4.1/1154348000.6101]"]