foxster has quit [Read error: 104 (Connection reset by peer)]
mattam has quit [Read error: 60 (Operation timed out)]
lament has joined #ocaml
Sonarman has joined #ocaml
foxster has joined #ocaml
polin8 has quit ["Lost terminal"]
polin8 has joined #ocaml
Sonarman has quit ["Lost terminal"]
Sonarman has joined #ocaml
xxd has joined #ocaml
foxster has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
Sonarman has quit [Read error: 54 (Connection reset by peer)]
lament is now known as jellyfish
jellyfish is now known as oJelly
oJelly is now known as lament
lament has quit [adams.freenode.net irc.freenode.net]
Smerdyakov has quit [adams.freenode.net irc.freenode.net]
lament has joined #ocaml
Smerdyakov has joined #ocaml
Smerdyakov has quit [adams.freenode.net irc.freenode.net]
lament has quit [adams.freenode.net irc.freenode.net]
lament has joined #ocaml
Smerdyakov has joined #ocaml
lament has quit ["from time import sleep()"]
Yurik_ has joined #ocaml
<Yurik_>
re
Yurik_ is now known as Yurik
Leo037 is now known as Leo037-r
Leo037-r is now known as Leo037-reunion
systems has joined #ocaml
systems has quit [Killed (NickServ (Nickname Enforcement))]
Leo037-reunion is now known as leo037
leo037 has left #ocaml []
systems has joined #ocaml
leo037 has joined #ocaml
<leo037>
hi all !
<leo037>
i can't manage to make Ocaml works with Emacs
<musasabi>
tuareg-mode is a good choice.
<musasabi>
see the ocaml homepage for a link.
docelic|sleepo is now known as docelic
<leo037>
i just want to have run-caml work.....
<leo037>
Symbol value as variable is void: caml-mode-map
systems has quit [Read error: 110 (Connection timed out)]
leo037 has left #ocaml []
Smerdyakov has quit []
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
TimFreeman has joined #ocaml
TimFreeman has left #ocaml []
systems has joined #ocaml
systems has quit [Read error: 104 (Connection reset by peer)]
<mattam>
how does assert work ?
<mattam>
(syntax-wise)
karryall has joined #ocaml
<Yurik>
karryall: hi
<karryall>
hi
<mrvn_>
# assert false;;
<mrvn_>
Exception: Assert_failure ("", 0, 12).
<mrvn_>
# assert true;;
<mrvn_>
- : unit = ()
mrvn_ is now known as mrvn
<mrvn>
# assert;;
<mrvn>
Syntax error
<mrvn>
Hmm, should be bool -> unit = <fun>
<karryall>
mrvn: no, assert is not a function
<mattam>
yeah found that
gene9 has joined #ocaml
<Yurik>
gene9: hi
<gene9>
haya
gene9 has quit []
<mrvn>
karryall: technically not, but otherwise it could be, or not?
<whee>
it could be a function, I guess
<whee>
but it probably isn't so that it can be removed by the compiler if needed
<mrvn>
Only thing special is that it compiles into a nop if asserts are unwanted, right?
<mrvn>
unless its an assert false
<mrvn>
whee: can't be a function when implemented. The exception wouldn't give the right source file and position :)
<whee>
mrvn: as long as the preprocessor handles it specifically, it could
<mrvn>
assert is a keyword in ocaml, right?
<async>
is there an irc client written in ocaml?
<async>
mrvn: yes i think it is
<karryall>
async: there's one in lablgtk
Smerdyakov has joined #ocaml
two-face has joined #ocaml
<two-face>
yo
<Yurik>
two-face: yo!
<karryall>
salut two-face
<two-face>
hey Yurik!
<two-face>
salut karryall
* Yurik
is listening Rammstein
<whee>
ahh, rammstein
<two-face>
RamStein ?
<whee>
I listened to nothing but rammstein to keep my sanity freshman year :)
<two-face>
Du hast! Du hast mich ?
<Yurik>
:)))
<Yurik>
Currently Engel
<two-face>
Insane, insane at all
<whee>
I can't remember the name of the one I like the most :\
<whee>
I had a mp3 of a live performance of it, couldn't find another version
<two-face>
they're all in mp3, noone would buy them :)
<Yurik>
two-face: !! :)
<two-face>
Did you ? :)
<Yurik>
nope. who buys expensive music in ex-USSR? Probably no one :)
* whee
is awaiting apple's $1/song service
<two-face>
Ramstein for nothing, that's expencive enough :)
<whee>
then I'll start buying :P
<two-face>
What will they sell for $1? Celine Dion? Whitney Huston?
<Yurik>
hehe
* Yurik
adds some beer
<whee>
I don't know how it'll work out when it's official, but it's $1 for any song supposedly
<whee>
AAC encoded
<two-face>
I4m not tempted
sambao has joined #ocaml
<sambao>
hello
<sambao>
can i ask for help on ocaml in here?
<Yurik>
all that are'nt asleep :))
<mrvn>
Dunno, can you?
<sambao>
lol
<sambao>
well, i've been work on an assignment for one step evaluation, and i'm stuck on one step evaluation of applications
<sambao>
ive got the notation for one step eval right here, and i understand the three different conditions but i'm not familiar enough with ocaml syntax to put it to code
<sambao>
t1 -> t1'
<sambao>
----------
<sambao>
t1 t2 -> t1' t2
<sambao>
hello? is anyone here?
<mrvn>
And what should we do with that?
<sambao>
shouldn't App(eval1 t1, t2) be the one step eval of that
<mrvn>
If that is your one step eval then yes
<sambao>
well then what about this state:
<sambao>
t2 -> t2'
<sambao>
-----------
<sambao>
v t2 -> v t2'
<sambao>
when v is a value
<sambao>
this is where im stuck
<sambao>
how can i code in ocaml "if something matches something then...."
<mrvn>
App(v, eval1 t2)
TachYon has joined #ocaml
<mrvn>
Whats a value in your setup?
<sambao>
v::= True | False | numericalvalue | function x -> t
<sambao>
is there a way to write if v matches any of those values then App(v, eval1 t2)??
<sambao>
write now i have something like app(v, t2) -> (match v with
<sambao>
true -> app(v, eval1 t2)
<mrvn>
sambao: match v with True -> ... | False -> ...
<sambao>
| false -> app(v, eval1 t2)
<mrvn>
You can combine true and false into one case
<sambao>
ok
<sambao>
what about for the numerical values and function
<sambao>
can i combine them all?
<mrvn>
also you can match App(True, t2) | App(False, t2) | App(Numericalvalue _, t2) -> ...
<sambao>
oh
<sambao>
mrvn: can i send you a piece of code and you can see if i have coded it right? or if there's a more efficient way to code it
<mrvn>
not realy.
<mrvn>
If it compiles its probably right
<sambao>
ok, i just tried to compile my code and one of the matches isn't used
<sambao>
let me give you the third condition for application, it's : (function x->t) v -> subst x v t
<sambao>
so it's those three states
<sambao>
the t1 -> t1', t2 -> t2', and this function x -> t
<sambao>
and i think the most general would be t1 -> t1' / t1 t2 -> t1' t2
<sambao>
so i have that last in my code
<sambao>
and that's the one the compiler is saying is not being used
<mrvn>
if t1 can only be a value you already matched all types.
<mrvn>
you must have some meta type that can be value or app or whatever
two-face has quit ["Client Exiting"]
<sambao>
oh
<sambao>
but isn't it t1 should be a value before we eval1 t2
<mrvn>
but can't be type value
<mrvn>
Must be the same type as App
<mrvn>
or a bigger one
<sambao>
t1?
<mrvn>
t1, t2, everything
<mrvn>
How would you write App(App(App....)...) otherwise?
<sambao>
but doesn't (* t2 -> t2' / v t2 -> v t2' *) mean that t1 should be a value
<mrvn>
sambao: a value but not a value
<sambao>
huh?
<sambao>
lol
<mrvn>
type and contents don't mean the same thing
<sambao>
oh
<mrvn>
you must have type some = App of some * some | Value of vlaue
<mrvn>
t1 and t2 are type some but can be a value.
<sambao>
oh
<sambao>
hmm
<mrvn>
Don't you have some example input where you can look at the types?
<sambao>
no, that's it, i don't have sufficient notes
<mrvn>
No framework where some typoes are defined?
<sambao>
i'm give a bnf, and i was to write an interpreter for it, and a function free that computes the set of free variables in a term, and write a one-step evaluator for the language, and then write an interpreter using the one step evaluator
<mrvn>
Think how you would write (+) ((*) 3 5) 7
<mrvn>
or 3 * 5 + 7
<sambao>
we don't have add and multiply in our language yet
TachYon has quit [Remote closed the connection]
<mrvn>
+ and * would be values (function t -> x
<mrvn>
actually function x -> function y -> x+y
<sambao>
Succ(Succ(Pred(Succ(Zero)))) would equal 2
<sambao>
oh yeah
<sambao>
no, i have no examples to go on with applications of functions
<mrvn>
think about what type you have and match that in your eval1
<sambao>
ok
<mrvn>
You need some type that can be an app or a value
<mrvn>
n8
<sambao>
v::= True | False | numericalvalue | function x -> t
<sambao>
those are all types
<sambao>
im sorry, but im just not understanding this very well
* Yurik
is back
polin8_ has joined #ocaml
polin8 has quit [Remote closed the connection]
mrvn_ has joined #ocaml
polin8 has joined #ocaml
polin8_ has quit [Read error: 104 (Connection reset by peer)]
* Yurik
is listening for Rammstein again! :)
mattam_ has joined #ocaml
<Yurik>
mattam_: hi
AaronWL has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
<Yurik>
AaronWL: hi
mattam has quit [Read error: 110 (Connection timed out)]
docelic is now known as docelic|sleepo
mrvn has joined #ocaml
mrvn_ has quit [Read error: 60 (Operation timed out)]