gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
Cyanure has quit [Remote host closed the connection]
sysop_fb has quit []
lamawithonel has quit [Remote host closed the connection]
kmicinski_ has quit [Ping timeout: 240 seconds]
dnolen has quit [Quit: dnolen]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
ulfdoz_ is now known as ulfdoz
smerz has quit [Remote host closed the connection]
dnolen has joined #ocaml
dnolen has quit [Client Quit]
emmanuelux has quit [Quit: =>[]]
sepp2k has quit [Quit: Leaving.]
wchicken2 has joined #ocaml
joewilliams_away is now known as joewilliams
<wchicken2> hey guys -- when using ocamldebug I can't seem to use the print statement. I assume I have to load it up somehow? should I use ocamlfind?
<wchicken2> (ocd) print history
<wchicken2> Cannot find module Batteries_uni.
kmicinski_ has joined #ocaml
enthymeme has joined #ocaml
joewilliams is now known as joewilliams_away
lopex has quit []
Oejet has joined #ocaml
arubin has joined #ocaml
myu2 has joined #ocaml
Oejet has quit [Ping timeout: 276 seconds]
drunK has quit [Remote host closed the connection]
willb has quit [Ping timeout: 276 seconds]
willb has joined #ocaml
shachaf has quit [Remote host closed the connection]
tautologico has joined #ocaml
wchicken2 has quit [Quit: leaving]
shachaf has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
surikator has joined #ocaml
<surikator> anyone knows how to access ocamlforge as a developer?
<surikator> in git
<surikator> (not svn)
lamawithonel has joined #ocaml
surikator has quit [Read error: Connection reset by peer]
surikator has joined #ocaml
enthymeme has quit [Quit: later]
vivanov has quit [Ping timeout: 264 seconds]
tautologico has quit [Quit: tautologico]
arubin has quit [Quit: arubin]
philtor has quit [Quit: Ex-Chat]
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
willb has quit [Ping timeout: 260 seconds]
rossberg has quit [Ping timeout: 248 seconds]
surikator has quit [Quit: Scientific discovery is just maximal compression of random strings. Nothing more, nothing less.]
rossberg has joined #ocaml
rossberg has quit [Ping timeout: 248 seconds]
vivanov has joined #ocaml
rossberg has joined #ocaml
rup has quit [Ping timeout: 255 seconds]
<flux> mfp, thanks for the tip
ankit9 has joined #ocaml
Cyanure has joined #ocaml
rup has joined #ocaml
enthymeme has joined #ocaml
vivanov has quit [Quit: Lost terminal]
edwin has joined #ocaml
ftrvxmtrx has quit [Read error: Operation timed out]
lopex has joined #ocaml
Snark has joined #ocaml
ftrvxmtrx has joined #ocaml
kmicinski_ is now known as kmicinski
lopex has quit []
<EM03> if anyone here has ocaml experience with the web let me know, its probably going to be a bit longer journey for me
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
<kmicinski> EM03, oscigen I just saw
<kmicinski> perhaps not exactly what you're looking for, but maybe close enough.
<rproust> I've done some ocsigen stuff to
<rproust> ask away if you want
Oejet has joined #ocaml
lars9 has joined #ocaml
<lars9> i've read ocaml's manual and been using it for a month. now i want to learn more about ocaml, could anyone recommend some books? thanks
<lars9> or any learning resources.
<rproust> lars9: there is a draft of a to be published book on http://main.metaprl.org/jyh/
<lars9> rproust: thanks, this is the 1st book i read about ocaml
<lars9> kmicinski: thanks
ikaros has joined #ocaml
eye-scuzzy has quit [Quit: leaving]
eye-scuzzy has joined #ocaml
Oejet has quit [Read error: Connection reset by peer]
Oejet has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Yoric has joined #ocaml
kmicinski has quit [Ping timeout: 255 seconds]
Julien__T has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 246 seconds]
ftrvxmtrx_ is now known as ftrvxmtrx
vivanov has joined #ocaml
Julien__T has quit [Quit: Julien__T]
boscop has joined #ocaml
Oejet has quit [Read error: Connection reset by peer]
Oejet has joined #ocaml
edwin has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 255 seconds]
Yoric has joined #ocaml
Yoric_ has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric_ is now known as Yoric
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
DimitryKakadu has joined #ocaml
sepp2k has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
tauntaun has joined #ocaml
eelte has joined #ocaml
mo3b1us has joined #ocaml
edwin has joined #ocaml
<thelema> gildor: I'm looking forward to changing the webroot variable in odb... :)
Oejet has quit [Ping timeout: 276 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
ftrvxmtrx has quit [Quit: Leaving]
sysop_fb has joined #ocaml
fraggle_ has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
ulfdoz has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
kmicinski has joined #ocaml
surikator has joined #ocaml
lamawithonel has joined #ocaml
mo3b1us has quit [Ping timeout: 252 seconds]
dnolen has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
kmicinski has quit [Read error: Connection reset by peer]
sysop_fb has quit []
lamawithonel has quit [Ping timeout: 276 seconds]
<EM03> rproust: call me weird but i'm trying to do ocaml fast cgi stuff with the ocamlnet library
<rproust> never used ocamlnet
<rproust> have you looked into cohttp
<rproust> ??
willb has joined #ocaml
avsm has joined #ocaml
eelte has quit [Quit: 0x2a]
lamawithonel has joined #ocaml
pikachuyann has joined #ocaml
pikachuyann has left #ocaml []
an146 has joined #ocaml
<thelema> an146: hi
arubin has joined #ocaml
Oejet has joined #ocaml
kerx__ has quit [Ping timeout: 248 seconds]
Associat0r has joined #ocaml
dnolen has quit [Quit: dnolen]
Fullma has joined #ocaml
surikator has quit [Quit: surikator]
vivanov has quit [Read error: Connection reset by peer]
lopex has joined #ocaml
avsm has quit [Quit: Leaving.]
mo3b1us has joined #ocaml
kuscotopia has joined #ocaml
<kuscotopia> Hi all, I am just getting started with OCAML and ran into confusion trying to define a type as a 3-tuple. What am I doing wrong on the following:
<gildor> thelema: ACK, last week was pretty busy
<gildor> thelema: but I still have the short term goal to interact with odb
<kuscotopia> type expr = Val as int | Var as string | Add as expr * Plus * expr ;;
<kuscotopia> (Plus is defined previously as an op type)
<flux> kuscotopia, Plus isn't a type
<flux> kuscotopia, it's a constructor
<flux> so you have somehwere type type_name = .. Plus ..
<flux> you need to use type_name there
<kuscotopia> Yeah, I could do that....was just trying to be specific as I have other operators defined in that type as well (like Semicolon)
<flux> kuscotopia, it doesn't really add anything to have a constant in that place..
<flux> kuscotopia, oh, noticed another issue as well: it's "of", not "as"
<kuscotopia> oops...IM error only..I have of in my code
<flux> kuscotopia, you could just as well have type expr = .. | Add of expr * expr and no information would be lost, no?
<kuscotopia> Maybe..though I lose the sense of an operator don't I? So 2 + 2 ... both 2's would be an expr and + would be the operator
<kuscotopia> In yours...2 would be an expr.. "+2" would be an expr..right? or am I interpreting that wrong?
<flux> kuscotopia, how about .. | Add of expr * operator * expr ?
<flux> kuscotopia, also, noticed a third thing: you cannot have the same constructor in two positions, Var of int | Var of string
<kuscotopia> Sure...first should be Val...so Val of int | Var of string
<flux> oops
<flux> indeed :)
<flux> misread that one
<kuscotopia> I was trying to be explicit in my definition..and want to take into account addition, multiplication, division, etc
<kuscotopia> hence I was hoping to bind Add variant to addition
<kuscotopia> Maybe to give myself some sense of control while I ride the learning curve :P
<flux> so how do you define Plus?
<kuscotopia> type op = Plus | Minus | Times | .. ;;
<flux> hm, so wouldn't you then use something like BinaryOp of expr * op * expr ?
<flux> instead of Add of expr * Plus * expr? to be cover all expressions?
<mrvn> kuscotopia: I recommedn s/Var/Ident/
<flux> that is indeed the customary name
<mrvn> and s/Add/BinOp/ or something
kerx__ has joined #ocaml
<kuscotopia> *Nods* I could see that. So make a bin for my binary ops and rather one bin to rule all my operators.
<kuscotopia> I will update the names. I am new to language theory so I doubly new.
<mrvn> except ? which is tertiary if you have that and unary -, !, ~
<kuscotopia> Yeah, for the moment I will restrict my scope for the moment, but seems easy enough to make a new types for the teriaries and unaries.\
mo3b1us has quit [Ping timeout: 276 seconds]
<kuscotopia> Thanks folks, back to the grindstone.
mo3b1us has joined #ocaml
kuscotopia has left #ocaml []
ftrvxmtrx has joined #ocaml
<flux> hmm. BatString.exists "" " " -> Exception: Invalid_argument "Empty string to search in".
dnolen has joined #ocaml
<flux> so, the culprit is find_from, that raises that exception when it is given an empty search to string in
<flux> whyyy?
<flux> it is also undocumented behavior, so I must assume it's a bug
<thelema> flux: or a documentation limitation
<flux> thelema, I don't quite understand what's the point, though
<thelema> what behavior do you want?
<thelema> find "" x -> Not_found?
<flux> simply tell me if it finds it and where, otherwise raise Not_found as it cannot find it
<flux> I didn't actually even use find_from, but eixsts
<flux> but I cannot fathom why I would want better diagnostics on why a string is not found..
<thelema> different exceptions for different exceptional conditions doesn't seem too unreasonable
<flux> well, it raises Invalid_argument. is an empty string to search in really an invalid argument for a finding function?
<thelema> probably not, but fundamentally the idea of not raising Not_found isn't too bad
<flux> It's like List.mem 0 [] raising Invalid_argument "Empty list"
<flux> or, more accurately, List.find ((=) 0) [] raising it
<thelema> Fair enough. Can change.
<flux> I can submit a patch, with a testsuite
<thelema> please.
philtor has joined #ocaml
<thelema> if it's not documented, behavior isn't specified. there are many exceptions not properly documented. this should improve with time
<EM03> rproust: hey no what is that cohttp?
<flux> thelema, posted
<thelema> flux: posted where?
<thelema> ah, email.
<thelema> flux: any reason you didn't use inline test?
<thelema> (as of today)
Oejet has quit [Quit: Leaving.]
<flux> thelema, well, yes: find | grep test found the testsuite directory for me ;)
Snark has quit [Quit: Ex-Chat]
<thelema> ah. I guess you missed the qtest directory
<rproust> EM03: never used it either
<flux> thelema, it wouldn't be so inline for assert_no_raises, though?
<flux> (which OUnit clearly lacks0
<thelema> anything you can do in a testsuite, you can do in a (*** **) comment
<flux> thelema, wouldn't that be too much to put inline, though?
<flux> I was under the impression they are for the (bunch of) one-liner-tests
<flux> in any case, I'll keep that in my mind
<thelema> (**T and (**Q are for bunch of one-liner tests, (*** is more "put code here"
<thelema> thanks
<EM03> rproust: how long you been using ocaml?
<rproust> EM03: five years or so
<rproust> Mainly studying
<rproust> And coding a few (not study related) things
mo3b1us has quit [Ping timeout: 260 seconds]
lopex has quit [Ping timeout: 250 seconds]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
dnolen has quit [Read error: Connection reset by peer]
lamawithonel has quit [Ping timeout: 248 seconds]
lamawithonel has joined #ocaml
dnolen has joined #ocaml
lamawithonel has quit [Ping timeout: 250 seconds]
lamawithonel has joined #ocaml
dnolen has quit [Quit: dnolen]
<EM03> rproust: whats your feelings on the language?
alexyk has joined #ocaml
<alexyk> is there a simple way to load directory-specific setup when invoking ocaml toplevel in a directory, e.g. via ~/.ocamlinit?
<thelema> i.e. if you involke ocaml from a certain dir, it runs an ocamlinit for that dir
<thelema> ?
Oejet has joined #ocaml
dnolen has joined #ocaml
<thelema> alexyk: Toploop.use_silently Format.err_formatter "./local.ocamlinit"?
<alexyk> thelema: I also need the global .ocamlinit first
<alexyk> as it load my lovely Batteries :)
<thelema> put that at the end of your ~/.ocamlinit
DimitryKakadu has quit [Remote host closed the connection]
lopex has joined #ocaml
alexyk has quit [Quit: alexyk]
kerx__ is now known as kerx
arubin has quit [Remote host closed the connection]
alexyk has joined #ocaml
edwin has quit [Remote host closed the connection]
Oejet has quit [Ping timeout: 276 seconds]
Amorphous has quit [Ping timeout: 276 seconds]
lopexx has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
tauntaun has quit [Quit: Ex-Chat]
an146 has quit [Quit: Leaving]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
Amorphous has joined #ocaml
alexyk has quit [Client Quit]
dnolen has quit [Quit: dnolen]
ikaros has quit [Quit: Leave the magic to Houdini]
Yoric has quit [Quit: Yoric]
<EM03> where is the best learning materials for ocaml? I'm not super new but I have an issue with some things here and there
<adrien> o'reilly book, reference manual and
mnabil has joined #ocaml
<EM03> adrien: oreilly made a book
<EM03> what year was it ?
<adrien> several years ago
<adrien> "ocaml-ora-book.pdf" or something like that, it's freely available now
emmanuelux has joined #ocaml
mnabil has quit [Remote host closed the connection]
<EM03> what is that called when ocaml prints back something out
<EM03> like if you add 2 + 2 from the top level
<thelema> EM03: there's no ocaml function to print an arbitrary value
<EM03> thats not what i meant
<thelema> the toplevel knows the types of everything and uses a dictionary of printing functions to try to print values
<EM03> # let average a b =
<EM03> (a +. b) /. 2.0;;
<EM03> val average : float -> float -> float = <fun>
<EM03> ah
<thelema> you can add a new type to that dictionary by...
<thelema> #install_printer
<EM03> i mean from the top level python does not exactly do that
<EM03> so does ocaml guess your type alot or only for very obvious things?
<thelema> always
<thelema> well, rarely you have to help it with some explicit type conversions related to objects and polymorphic variants, but those are rare
arubin has joined #ocaml