mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
leo037 has quit ["Leaving"]
nashdj has joined #ocaml
marmottine has quit ["Quitte"]
thermoplyae has joined #ocaml
<mbishop> neat
kelaouchi has joined #ocaml
kelaouch1 has quit [Read error: 110 (Connection timed out)]
__suri has quit [Read error: 113 (No route to host)]
__suri has joined #ocaml
middayc has joined #ocaml
ita has joined #ocaml
jlouis has joined #ocaml
__suri has quit []
jlouis_ has quit [Read error: 110 (Connection timed out)]
pants1 has quit ["Leaving."]
AxleLonghorn has joined #ocaml
ita has quit ["Hasta luego!"]
Zeros has joined #ocaml
AxleLonghorn has left #ocaml []
buluca has joined #ocaml
mordaunt has joined #ocaml
bluestorm has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
asmanur has joined #ocaml
ygrek has joined #ocaml
Associat0r has quit []
ttamttam has joined #ocaml
Tetsuo has joined #ocaml
Zeros has quit ["Leaving"]
jderque has joined #ocaml
Snark has joined #ocaml
seafood_ has joined #ocaml
zmdkrbou_ has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
marmottine has joined #ocaml
middayc has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
l_a_m has joined #ocaml
jderque has joined #ocaml
zmdkrbou_ is now known as zmdkrbou
seafood__ has joined #ocaml
Yoric[DT] has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
mordaunt has quit [Read error: 110 (Connection timed out)]
ttamtta1 has joined #ocaml
ttamtta1 has left #ocaml []
ttamttam has quit [Read error: 110 (Connection timed out)]
ygrek has quit [Remote closed the connection]
maayhem has joined #ocaml
<maayhem> hello
<maayhem> let (=?=) t1 t2 = eqs := (t1, t2) :: !eqs
<maayhem> in that line, what means (=?=) ?
<Yoric[DT]> It's a new operator.
<Yoric[DT]> It creates an infix operator named =?= .
<bluestorm> ( and a value named (=?=) )
<bluestorm> (or ( =?= ), hm)
<maayhem> so if I do =?= a b in my code, it will return true if eqs start by the couple (t1, t2), right ?
<bluestorm> right
<maayhem> good, thanks :)
<bluestorm> hmm
<bluestorm> wrong, actually
<bluestorm> := is a modification operator
<maayhem> start by the couple (a,b)
<bluestorm> it will mutate the reference eqs
<bluestorm> and return ()
<bluestorm> the function you're describing is
seafood__ has quit []
<bluestorm> let (=?=) t1 t2 = eqs <> [] && (t1, t2) = List.hd eqs
<bluestorm> actually, i think =?= is a really bad name for a side-effecting function
<maayhem> indeed, Im just reading some base code I was given :)
<bluestorm> "eq_push" would make more sense
* Yoric[DT] agrees with bluestorm .
love-pingoo has joined #ocaml
gene9 has joined #ocaml
ttamttam has joined #ocaml
<middayc> hi, I posted another example of my ocaml+sdl noob crusade http://itmmetelko.com/blog/2008/01/13/ocaml-mini-sdl-example-2/
<middayc> if anything pokes you in the eyes tell me
gene9 has quit ["leaving"]
gene9 has joined #ocaml
<bluestorm> middayc: why do you use an array for load_image ? i'd say lists feel more natural here
Morphous is now known as Amorphous
<bluestorm> (does indexing make any sense ? if you only want to iterate trough the structure, list are more natural)
<middayc> hi ... I am just going to eat so I have to be quick ..
<middayc> I used array because I need random access
<middayc> I don't iterate through that
<bluestorm> let { pos = p ; vel = v ; size = s } = r in apply_surface p images.(2) screen;
<bluestorm> ();
<bluestorm>
<bluestorm> apply_surface r.pos images.(2) screen ?
<bluestorm> (you can do a partial match too : let { pos = p } = r in ... )
<bluestorm> (and the () is useless, unless you really want to emphasize the side-effecting behavior of your function (but apply_surface is quite clear about that))
<bluestorm> Some {rect_x = vec.x; rect_y = vec.y; rect_w = (surface_width src); rect_h = (surface_height src) }
<bluestorm> Some (rect ~x:vec.x ~y:vec.y ~w:(surface_width src) ~h:(surface_height src))
<bluestorm> (found in Sdl doc : val rect : x:int -> y:int -> w:int -> h:int -> rect )
AxleLonghorn has joined #ocaml
ita has joined #ocaml
maayhem has quit ["Leaving"]
jderque has quit [Read error: 113 (No route to host)]
ygrek has joined #ocaml
gene9 has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> If anybody's interested, I'm starting to write down an OCaml tutorial.
<Yoric[DT]> (in French, for the moment)
<asmanur> Yoric[DT]: In what format ? tex ? html ? txt :-° ?
<Yoric[DT]> html
<asmanur> (by the way, i think bluestorm will be instered)
<bluestorm> i am
<asmanur> Yoric[DT]: is there anything to see ?
<bluestorm> i've been looking for such a thing for a long time now
<bluestorm> even began to write one myself
<Yoric[DT]> Not yet, I'm writing it down at this very moment.
<bluestorm> but it's very time-consuming :p
<Yoric[DT]> I'm still in the introduction.
<Yoric[DT]> I know. But since I'm supposed to teach OCaml, I decided that I might as well write everything down :)
<bluestorm> Yoric[DT]: i'd be interested in a free-edit one (wikibook or something), but if you're a little hairy about that, a closed one is better than none at all
<bluestorm> hm
<Yoric[DT]> Whenever I translate it to English, I might put it on wikibooks, good idea.
<bluestorm> there is a french wikibook
<Yoric[DT]> That, too.
<bluestorm> if you're interested in inspirational material, a less-known document than DA-OCaml is http://pauillac.inria.fr/~cheno/CamlPrimer.pdf
<bluestorm> wich i discovered lately, and found very interesting
<Yoric[DT]> Good to know.
<bluestorm> (it's caml light, but still; in particular i've been very interested in the algebraic datatypes part)
<Yoric[DT]> Does anyone know if there's an equivalent to rlwrap for Windows ?
<bluestorm> hm
<bluestorm> isn't ledit portable ?
<bluestorm> i have not tried it on windows, but as it's pure ocaml, it should work fine
<Yoric[DT]> Yeah, but I can't start the tutorial by telling people to compile a program :/
<bluestorm> :p
<bluestorm> MacOs does have a decent graphical ocaml toplevel
<bluestorm> i'm not sure there is such a thing on Windows
<Yoric[DT]> The Windows toplevel is awful.
<bluestorm> Yoric[DT]: i suggest you put "If you're on Windows, you're screwed" this year, and then have a student writing a LablGtk graphical toplevel for next year :-'
<Yoric[DT]> :)
pango_ has joined #ocaml
Associat0r has joined #ocaml
pango has quit [Remote closed the connection]
<middayc> bluestorm: I will read what you wrote me before (I was away).. thanks
<bluestorm> you're welcome
Morphous has joined #ocaml
zheng has joined #ocaml
<middayc> aha I will improve that with a partial match and remove the (); I didn't tinki enought, so I didn't see that that function already probably returns ()
<bluestorm> a function whose type is ... -> unit always return () (if it returns !)
<bluestorm> as () is the only value of type unit :p
<middayc> :) yes thanks for pointing it out
ttamttam has left #ocaml []
<middayc> :) yes thanks for pointing it out
<middayc> (uh mistake)
Amorphous has quit [Connection timed out]
<Yoric[DT]> It would be nice to have an on-line OCaml interpreter.
<middayc> there is on
<middayc> e
<Yoric[DT]> Where ?
<middayc> I saw ocaml interpreter in an applet somewhere ..
<middayc> I mean .. it's not interpreter .. I thought iteractive shell
<Yoric[DT]> Nice.
<bluestorm> interesting use of the ocamljava project
<asmanur> Does anyone know why unix.a doesn't contain the definitions of the unix_* functions ?
<middayc> bluestorm: that last improvement doesn't work -- with calling rect function instead of making a record .. I get Unbound value rect
<bluestorm> hm
<bluestorm> Sdlvideo.rect ?
<middayc> I looked at source and rect is defined but I saw some other definitions have external in front and rect doesnt
<bluestorm> thought you had it open
<bluestorm> hm
<bluestorm> external doesn't mean "exported"
<bluestorm> the public functions are those listed in the .mli
<middayc> (but I know wery little so I first say external)
<middayc> aha
<bluestorm> according to the documentation ( http://ocamlsdl.sourceforge.net/doc/html/Sdlvideo.html ), rect should be available as soon as the "rect" type is
<middayc> ah.. :)
<middayc> I am not using ocamlsdl but sdlcaml
<middayc> that function is what the sdlcaml wrote as an example (I extended his example) so maybe it's ok
<middayc> what the sdlcaml = what the sdlcaml author
<bluestorm> hmm
<bluestorm> :D
<middayc> I have updated the code to your comments , thanks!
AxleLonghorn has left #ocaml []
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
zheng has left #ocaml []
marmottine has quit ["Quitte"]
jderque has joined #ocaml
Amorphous has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Morphous has quit ["shutdown"]
Amorphous has joined #ocaml
marmottine has joined #ocaml
marmottine has quit [Client Quit]
marmottine has joined #ocaml
ita has quit ["Hasta luego!"]
pippijn has left #ocaml []
mordaunt has joined #ocaml
middayc has quit []
middayc has joined #ocaml
dmess has joined #ocaml
nashdj has quit [Read error: 110 (Connection timed out)]
asmanur has quit [Remote closed the connection]
Snark has quit ["Quitte"]
<flux> hmm.. I guess sdlcaml would be more up-to-date than ocamlsdl..
<flux> (ocamlsdl is missing atleast some sound-related things: such as simple panning and custom streaming channel effects)
<flux> otoh it's less than ideal to give up of the ocamly interfaces.
middayc_ has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
rektide has joined #ocaml
<rektide> forgive me i havent the foggiest clue where to ask this,
<rektide> where can i find a good introduction to formal type systems as they relate to CS, or what would be a place to go to begin the hunt?
<flux> lambda-the-ultimate.org might have pointers
<flux> the most referred book on that topic might be Types And Programming Languages by Benjamin C. Pierce
<rektide> i definitely recall a lot of history on formal typed systems on ltu, i guess i can go through and pick out ones that are describes as having good introductions. i was a little worried it would be more distracting than anything though, with most papers building from a starting place rather than explaining the starting theory
<rektide> ty for the book links
buluca has joined #ocaml
buluca has quit [Remote closed the connection]
buluca has joined #ocaml
ygrek has quit [Remote closed the connection]
ita has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
jderque has quit [Read error: 113 (No route to host)]
middayc_ has quit []
hsuh has joined #ocaml
hsuh has left #ocaml []
Mr_Awesome has quit ["aunt jemima is the devil!"]
Tetsuo has quit ["Leaving"]
dobblego has quit ["Leaving"]
dabblego has quit ["Leaving"]
marmottine has quit ["Quitte"]
Zeros has joined #ocaml
l_a_m has quit [Remote closed the connection]
love-pingoo has quit ["Connection reset by pear"]
jlouis_ has joined #ocaml
buluca has quit [Read error: 104 (Connection reset by peer)]
jlouis has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
leo037 has joined #ocaml
Jeff_123 has joined #ocaml
leo037 has quit ["Leaving"]
ita_ has joined #ocaml
ita has quit [Read error: 104 (Connection reset by peer)]
buluca has quit [Read error: 110 (Connection timed out)]
PieRRoMaN has joined #ocaml
<PieRRoMaN> hi
<PieRRoMaN> I'd like some help to compile a program with 2 interfaces