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!)
jeremiah has joined #ocaml
diakopte1 is now known as diakopter
vpalle_ has quit [Read error: 113 (No route to host)]
seafood_ has joined #ocaml
buluca has joined #ocaml
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
darinm has joined #ocaml
smimou has quit ["bli"]
psnively has quit []
univac has quit [Read error: 104 (Connection reset by peer)]
yminsky has joined #ocaml
univac has joined #ocaml
robozni has joined #ocaml
yminsky has quit []
seafood_ has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
Abo-Marwan has quit [Remote closed the connection]
screwt8 has quit [Remote closed the connection]
seafood_ has quit []
Abo-Marwan68 has joined #ocaml
screwt889 has joined #ocaml
seafood_ has joined #ocaml
sgnb has left #ocaml []
joshcryer has quit [Connection timed out]
piggybox_ has joined #ocaml
univac has quit [zelazny.freenode.net irc.freenode.net]
unfo-ninja is now known as unfo-
univac has joined #ocaml
joshcryer has joined #ocaml
piggybox has quit [Connection timed out]
ygrek has joined #ocaml
asmanur has joined #ocaml
salierix has joined #ocaml
seafood_ has quit []
filp has joined #ocaml
seafood_ has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
asmanur has joined #ocaml
LeCamarade has joined #ocaml
l_a_m has quit [Remote closed the connection]
TaXules has quit [Remote closed the connection]
TaXules has joined #ocaml
lde`` has joined #ocaml
Yoric[DT] has joined #ocaml
lde` has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> hi
<salierix> Morning again.
<Yoric[DT]> How do you do ?
<salierix> Fine.
seafood_ has quit []
piggybox has joined #ocaml
jlouis has joined #ocaml
buluca has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
piggybox_ has quit [Connection timed out]
yminsky has joined #ocaml
yminsky has quit [Client Quit]
vpalle_ has joined #ocaml
filp has quit ["Bye"]
filp has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
<salierix> How do I make an int32?
piggybox has quit [Connection timed out]
bluestorm_ has joined #ocaml
<Yoric[DT]> salierix: suffix your integer with "l".
<Yoric[DT]> # 3l;;
<Yoric[DT]> - : int32 = 3l
<salierix> thanks!
<Yoric[DT]> A pleasure.
vpalle_ has quit ["Leaving"]
love-pingoo has joined #ocaml
fasta has joined #ocaml
xavierbot has joined #ocaml
<rwmjones> salierix, the above is good for int32 constants. Also there are functions in the Int32 module for making them from other types, eg:
<rwmjones> Int32.of_string "3";;
<xavierbot> - : int32 = 3l
<rwmjones> Int32.of_int 3;;
<xavierbot> - : int32 = 3l
<rwmjones> Int32.of_float 3.0;;
<xavierbot> - : int32 = 3l
<LeCamarade> O! xavierbot works?
<rwmjones> oh yeah, when I start him up
<LeCamarade> rwmjones: You are running the bot, if I may ask?
<LeCamarade> He evals?????
<rwmjones> LeCamarade, yes
<rwmjones> & yes
<LeCamarade> Mon Dieu!
<LeCamarade> rwmjones: Seen lambdabot of #haskell?
<LeCamarade> I guess you threw my stinky sources out and started anew, no?
<rwmjones> nope
<rwmjones> yeah, I mention you on the web page though ...
<LeCamarade> She's on drugs. She's got plugins and all. She's a fine bot.
<LeCamarade> Almost as good as xavierbot. ;o)
<LeCamarade> Wow. So the bot didn't die. Phew. I'm quitting my job on Friday, and that was one of the things I wanted finished. I'm glad 'tis done. Do you fork a new process for every eval?
<rwmjones> LeCamarade, no, because it's more useful to keep around existing variables & functions
<rwmjones> eg
<rwmjones> let x = 1 ;;
<rwmjones> x + x ;;
xavierbot has quit [Remote closed the connection]
xavierbot has joined #ocaml
<rwmjones> what on earth is going o with my network connection
<rwmjones> anyway
<rwmjones> let x = 1 ;;
<xavierbot> val x : int = 1
<rwmjones> x + x ;;
<xavierbot> - : int = 2
<LeCamarade> rwmjones: Okay ... what's the Perl for? :o\
<bluestorm_> LeCamarade: IRC lib
<LeCamarade> Oh. I had been hacking on an IRC lib for OCaml when I thought I'd be doing this. To parse the messages and so on.
<bluestorm_> re-using an existing lib is a good idea
<rwmjones> perl just has much better support for irc
<rwmjones> and "doing IRC" is separate from evaling ocaml phrases anyway
l_a_m has joined #ocaml
<LeCamarade> Yeah. True.
<Yoric[DT]> Is there any Windows user around here to whom I could ask a favor ?
<LeCamarade> Yoric[DT]: I have Windows running, but no OCaml. If that matters.
<Yoric[DT]> No, it doesn't matter.
<Yoric[DT]> I just need a file decompressed.
<LeCamarade> Shoot.
<Yoric[DT]> Let me give you the URL.
<LeCamarade> Okay.
<LeCamarade> With WinZip?
<Yoric[DT]> No, it's an exe.
<Yoric[DT]> I can't decompress it under Wine.
<rwmjones> Yoric[DT], have you tried cabextract?
<Yoric[DT]> I can try.
<Yoric[DT]> Hey, it works.
<Yoric[DT]> Thanks :)
<Yoric[DT]> mmmhhh....
* LeCamarade goes to apt-get install cabextract
<Yoric[DT]> Now, the next question is: how do I decompress a .msp ?
<Yoric[DT]> cabextract again :)
<LeCamarade> I have it, actually.
<rwmjones> what sort of file is it?
<rwmjones> LeCamarade, you probably have cabextract if you ever installed the M$ web fonts
<rwmjones> they are .exe's compressed the same way
<LeCamarade> Yeah. I have it. Installed them.
<Yoric[DT]> Well, all that to find out that there is no documentation in that .exe .
<LeCamarade> Raise your hand if you wish OCaml assigned evaluations to `it', like all MLs.
<unfo-> Yoric[DT], it installs 3 dlls and one slup.exe into Program files :)
* Yoric[DT] raises hand.
<Yoric[DT]> unfo-: yeah, I've just seen that.
<rwmjones> probably ... only in the toplevel though?
* LeCamarade counts. One ...
<Yoric[DT]> unfo-: so where the heck is the documentation ?
<bluestorm_> LeCamarade: 'it' ?
<unfo-> Yoric[DT], should there be documentation with the install package? I would guess on Microsoft.com / MSDN
<bluestorm_> unit ?
<Yoric[DT]> unfo-: looking for it.
<LeCamarade> bluestorm_: Yes. Like ML and Haskell, et al.
<Yoric[DT]> unfo-: that is, I have been looking for it for about 1h.
<LeCamarade> 23 ;;
<xavierbot> - : int = 23
* Yoric[DT] has often wondered why there was no "it" in the toplevel.
<bluestorm_> what would it give otherwise ?
<unfo-> Yoric[DT], you want to program with it or wha?
<LeCamarade> So, instead of saying - : int = 23, it would be it : int = 23, and you can refer to it later.
<Yoric[DT]> unfo-: no, I'm just trying to understand the security model.
<unfo-> Yoric[DT], ah k
<Yoric[DT]> I'm writing a blog entry about the security of Air, Prism and Silverlight.
<Yoric[DT]> The first two are documented.
<Yoric[DT]> The last one... not so much.
<LeCamarade> bluestorm_: The toplevel should have it, so that no evals are wasted. If you need the previous eval, you just say `it'.
<unfo-> Security through Obscurity <3
<bluestorm_> LeCamarade: is "it" a value ?
<bluestorm_> orelse we could have an #it instruction "send the same phrase again", but i don't really see the use for it
<bluestorm_> hm
<bluestorm_> and if it's a value, how would you type it ?
<bluestorm_> '__a ? :-'
<LeCamarade> it would give you what the last statement was. It can be nifty.
piggybox has joined #ocaml
<LeCamarade> (+) 2 3 ;;
<xavierbot> - : int = 5
<LeCamarade> rwmjones: Wow. Thanks for the toplevel. Now explaining stuff should get orders easier! :o)
<LeCamarade> I wish xavierbot kept karma points. I'd mod you up a bit. :o)
<LeCamarade> xavierbot help
<xavierbot> hello LeCamarade, I am xavierbot 0.7, an OCaml toplevel
<xavierbot> expr ;; evaluate expr in toplevel and print result
<xavierbot> help help message
<xavierbot> restart restart the toplevel
<xavierbot> sleep go to sleep
<xavierbot> wake wake me up from sleep
<unfo-> Yoric[DT], http://msdn2.microsoft.com/en-us/library/bb428859.aspx maybe this will help at least somewhat?
<Yoric[DT]> Well, I'm currently digging blog entries.
<Yoric[DT]> unfo-: iirc, that entry doesn't contain one single word about security.
<unfo-> Yoric[DT], true dat
<LeCamarade> unfo-: `true dat'? Give me your nationality _right now_.
<LeCamarade> !
<LeCamarade> X^(
<unfo-> LeCamarade, .fi
<LeCamarade> Hmm. Okay. You are forgiven. Wrong suspect. :o)
<LeCamarade> List.map (fun _ -> "hello") [1; 2; 3; 4];;
<xavierbot> - : string list = ["hello"; "hello"; "hello"; "hello"]
david_koontz has joined #ocaml
<LeCamarade> let it = lazy(print_endline "Salut, tout le monde.");;
<xavierbot> val it : unit lazy_t = <lazy>
<bluestorm_> LeCamarade: what were you looking for ?
<LeCamarade> Lazy.force it;;
<xavierbot> Characters 1-11:
<xavierbot> Lazy.force it;;
<xavierbot> ^^^^^^^^^^
<xavierbot> Unbound value Lazy.force
<LeCamarade> bluestorm_: Looking for?
<bluestorm_> nationality
<LeCamarade> Oh. Well, maybe something closer to the Carribean.
<LeCamarade> Or where African Diasporac music is popular.
<LeCamarade> Lazy.force(lazy(23)) ;;
<xavierbot> Characters 1-11:
<xavierbot> Lazy.force(lazy(23)) ;;
<xavierbot> ^^^^^^^^^^
<xavierbot> Unbound value Lazy.force
<LeCamarade> The lazy module is removed?
<bluestorm_> look at the sources :p
<LeCamarade> :o) Yeah.
<bluestorm_> iirc the security is rather funny
<bluestorm_> (and clever)
<LeCamarade> Which are the unsafe functions in String?
<LeCamarade> rwmjones: ping
<rwmjones> LeCamarade, pong
<LeCamarade> Which are the unsafe functions in String?
<rwmjones> I was thinking things like String.unsafe_get
<LeCamarade> Oh. And is Lazy unsafe is any way? It be blocked.
<LeCamarade> Lazy.force(lazy(2)) ;;
<xavierbot> Characters 1-11:
<xavierbot> Lazy.force(lazy(2)) ;;
<xavierbot> ^^^^^^^^^^
<xavierbot> Unbound value Lazy.force
<LeCamarade> exit ;;
<xavierbot> - : unit = ()
<LeCamarade> :o)
<rwmjones> LeCamarade, the list is inclusive, not exclusive
<rwmjones> and basically anything which I haven't checked by hand isn't included
tsuyoshi_ is now known as tsuyoshi
<rwmjones> not sure about lazy specifically
<LeCamarade> Oh.
<bluestorm_> just send a patch :)
<LeCamarade> bluestorm_: I'm tied down by the job. Maybe when I quit the job ... :o)
love-pingoo has quit ["Connection reset by pear"]
buluca has joined #ocaml
authentic has quit [Read error: 113 (No route to host)]
crathman has joined #ocaml
<vorago> Hm...
<vorago> Bytecode generated by ocamlc under Linux with unix.cma won't run under mswin?
<vorago> If I compile that .ml file under w32 it generally works and necessary Unix functions are simulated.
<vorago> (Unix.select)
<vorago> By using linux-precompiled bytecode it says it lacks c primitive waitpid()
<vorago> (I don't use getpid there)
bluestorm_ has quit [Remote closed the connection]
gunark has quit [Read error: 104 (Connection reset by peer)]
Tetsuo has joined #ocaml
<salierix> Hm, the small sdlvideo example on the ocamlsdl site is wrong.
<salierix> should be put_pixel_color instead of put_pixel
buluc1 has joined #ocaml
LeCamarade has quit ["Home. To the kitten."]
asmanur has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
asmanur has joined #ocaml
lde`` is now known as lde
pango_ has quit [Remote closed the connection]
buluc1 has quit [Read error: 110 (Connection timed out)]
buluca has joined #ocaml
pango_ has joined #ocaml
filp has quit ["Bye"]
xavierbot has quit [Read error: 110 (Connection timed out)]
bluestorm_ has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
Jedai has joined #ocaml
smimou has joined #ocaml
Torment has quit [Read error: 110 (Connection timed out)]
salierix has quit ["Leaving"]
darinm has quit []
Mr_Awesome has joined #ocaml
filp has joined #ocaml
asmanur has quit [Remote closed the connection]
darinm has joined #ocaml
darinm has quit [Remote closed the connection]
rx has quit ["ircN for mIRC"]
buluca has quit [Read error: 113 (No route to host)]
fasta has quit ["leaving"]
rx has joined #ocaml
piggybox has quit [Connection timed out]
david_koontz has quit [Success]
vorago has quit [No route to host]
tieTYT has joined #ocaml
<tieTYT> hello
<tieTYT> would you guys say that ocaml has reasonable tutorials? I found the haskell tutorials to be lacking
Tetsuo has quit ["Leaving"]
<mbishop> there are quite a few ocaml tutorials
<tieTYT> that doesn't mean they're good
<mbishop> indeed
<mbishop> although, the main one is a wiki
<tieTYT> the problem with the haskell one is they often skip many steps in the middle
<tieTYT> that sounds promissing
<mbishop> ocaml-tutorial.org
<tieTYT> k, thanks
tieTYT has left #ocaml []
vorago has joined #ocaml
ygrek has quit [Remote closed the connection]
ita has joined #ocaml
jonathanv is now known as jonafan
buluca has joined #ocaml
bluestorm_ has joined #ocaml