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
Smerdyakov has quit [Quit: Leaving]
aj2009 has joined #ocaml
oriba has quit [Remote host closed the connection]
jakedouglas has quit [Quit: Leaving.]
_unK has quit [Remote host closed the connection]
Associat0r has joined #ocaml
joewilliams_away is now known as joewilliams
jjd27 has quit [Ping timeout: 246 seconds]
jjd27 has joined #ocaml
|marius| has quit [Ping timeout: 252 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 265 seconds]
jakedouglas has joined #ocaml
Associat0r has quit [Read error: Connection reset by peer]
<aj2009> Can I use OCaml develop Web application?
<bitbckt> aj2009: Google for "Ocsigen" for an example.
<thelema> aj2009: and mod_ocaml
<aj2009> :)
mjonsson_ has joined #ocaml
<MarcWeber> gildor: thanks, that fixed it. I try using a tool called ocamake which will build ocaml projects. It runs ocamldep which fails to parse a .ml file.
<MarcWeber> Is ocamldep kind of broken?
<thelema> ocamldep doesn't/can't add package dependencies to the command line, in fact I don't think any ocaml build system can detect you need str.cma, I think they all need to be told
<MarcWeber> Should ocamldep parse all files which can be parsed by ocamlc?
thelema_ has joined #ocaml
ulfdoz_ has joined #ocaml
thelema has quit [Ping timeout: 276 seconds]
ulfdoz has quit [Ping timeout: 245 seconds]
joewilliams is now known as joewilliams_away
thelema_ is now known as thelema
<thelema> ocamldep doesn't/can't add package dependencies to the command line, in fact I don't think any ocaml build system can detect you need str.cma, I think they all need to be told
<MarcWeber> thelema: Are you a bot?
<MarcWeber> No you aren't - YOu would have replied faster.
<thelema> no, not a bot
<MarcWeber> I understood the Str issue.
<MarcWeber> ocamake (by motion-twin) is using ocamldep to build up a dependency graph. then it writes a Makefile
<thelema> did I dupe that message? my irc dropped when I tried to send it before.
<MarcWeber> It is using ocamldep to find out about dependencies. It fails to parse some files. Is this because my ocaml installation is broken?
<MarcWeber> thelema: I got it twice :) Never mind.
<thelema> possibly - ocamldep should use the same parser as ocaml proper
<thelema> so parse failures are either feeding in the wrong files, or your install is broken somehow
<MarcWeber> http://mawercer.de/~marc/parser.ml Its about this file. The debian ocamldep can't parse it etiher
<MarcWeber> | [< v = f >] -> Some v
|marius| has joined #ocaml
<thelema> preprocessor?
<thelema> you need camlp4 for stream parsing extensions
<thelema> add -pp camlp4o
jakedouglas has quit [Quit: Leaving.]
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
waltz has joined #ocaml
xcthulhu has joined #ocaml
ulfdoz has quit [Ping timeout: 258 seconds]
aj2009 has quit [Remote host closed the connection]
aj2009 has joined #ocaml
|marius| has quit [Remote host closed the connection]
Amorphous has quit [Read error: Operation timed out]
Amorphous has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
xcthulhu has quit [Quit: Ex-Chat]
ikaros has joined #ocaml
jonafan_ has quit [Read error: Connection reset by peer]
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
ikaros_ has quit [Quit: Leave the magic to Houdini]
aj2009 has quit [Quit: Leaving]
<gildor> MarcWeber: I know ocamake, but it is quite old and I am not sure it has been updated for the last 5 years (doesn't mean it does not work BTW)
<gildor> MarcWeber: you will have more advanced parsing (esp. with camlp4 integrated) using ocamlbuild which is in the core caml distribution
<gildor> MarcWeber: but it won't solve the dependency on str.cma
xmarteo has joined #ocaml
Associat0r has joined #ocaml
pikachuyann has joined #ocaml
Elive_user7_fr has joined #ocaml
_unK has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Elive_user7_fr has quit [Quit: Debian GNU/Hurd is Good.]
ttamttam has joined #ocaml
th5 has joined #ocaml
hto has quit [Quit: Changing server]
hto has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
oriba has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
iratsu has quit [Ping timeout: 240 seconds]
iratsu has joined #ocaml
krankkatze has left #ocaml []
ttamttam has quit [Ping timeout: 258 seconds]
mjonsson has quit [Quit: Leaving]
hto has quit [Quit: Lost terminal]
jakedouglas has joined #ocaml
hto has joined #ocaml
joewilliams_away is now known as joewilliams
hto_ has joined #ocaml
hto_ has quit [Client Quit]
hto has quit [Quit: leaving]
hto has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
hto_ has joined #ocaml
hto_ has quit [Client Quit]
hto has quit [Client Quit]
hto has joined #ocaml
bzzbzz has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
hto has quit [Client Quit]
hto has joined #ocaml
th5 has quit [Quit: th5]
<MarcWeber> Is there an Option.ml file? Or is this built into the ocaml compiler?
* f[x] failed to parse the question
<MarcWeber> I'm learning ocaml. I'm new to everything. If there is a Option.ml file I can find by tags I'd like to do so.
<MarcWeber> However I didn't find an Option.ml file or such in the ocaml distribution. Does this mean that I didn't search hard enough?
<gildor> MarcWeber: could you describe the problem that leads to this question
<MarcWeber> gildor: When I see "Some" I'd like to learn about everything I can do with Some fast
<MarcWeber> Usually I do so by jumping to the definition / code.
<f[x]> if you are searching for option type - it lives in Pervasives module (automatically opened) - so it is defined in pervasives.ml which lives in stdlib in the sources of ocaml
<gildor> ok
<gildor> indeed Pervasives module
<f[x]> open the index of values in ocaml documentation and search tjere
<gildor> but basically there is nothing particular about option
<gildor> this is just type 'a option = None | Some of 'a
<gildor> you can use it in pattern matching match opt with | Some x -> (* do something with x *) | None -> (* Nothing to do *)
<MarcWeber> I'd like to start hacking on HaXe. Because I'm new to ocaml Option was something I know from both: Scala and Haskell. But I have to see its usage or defintion once to see how it must be used in Ocaml. It looks like tags are useless in this particular case.
<gildor> or build it let opt = Some "coucou"
<hcarty> Other libraries do provide some functions/modules to ease working with option types. Batteries, Core and ExtLib all have useful Option modules.
<gildor> MarcWeber: it is a kind of NULL pointer for the C programming -> either you provide a real pointer or NULL
<gildor> MarcWeber: but it is safer, of course
<MarcWeber> gildor: Thanks for you explanation. I know what a Maybe / Option datatype is
<MarcWeber> I'm trying to find tools which help me understand all the functions I'm faced with fast.
<gildor> MarcWeber: ask if you want something more precise
<MarcWeber> For Haskell tags worked. For Option in Ocaml it does not cause its kind of built into the language.
<MarcWeber> (* type 'a option = None | Some of 'a *)
<gildor> MarcWeber: the OCaml manual is your best friend http://caml.inria.fr/pub/docs/manual-ocaml/index.html
<gildor> especially the indexes (as f[x] pointed)
<MarcWeber> gildor: The index does not contain the word "Some" as constructor.. so I have to learn that
<MarcWeber> Is there a list of editors explaining which IDE like ocaml features they provide?
_unK has quit [Remote host closed the connection]
<gildor> MarcWeber: you want to know which IDE you must use to edit OCaml code ?
<MarcWeber> In fact I want to see whether my Vim setup is missing something valuable..
<MarcWeber> Such as code completion, syntax check on buf write or such.
<gildor> vim 7.2 provides a syntax highlight, that's all
<gildor> (there is also code navigation with .annot files, if you generate them)
<gildor> + indent
<gildor> I use omlet, because it provides better indent
<gildor> (see on vim.org to get it)
<gildor> but it has bugs
<MarcWeber> :ActivateAddons omlet :)
<gildor> most people use emacs + ocaml-mode (core Caml) or tuareg (http://forge.ocamlcore.org/projects/tuareg)
<MarcWeber> gildor: Getvim-addon-manager to make your life easier :)
<gildor> thx
<hcarty> gildor: Do you run in to speed problems with omlet? I found that it would slow down to the point be being unusable with files longer than ~100 lines.
<hcarty> IIRC it was due to some issue with auto-indentation.
pnou has joined #ocaml
<MarcWeber> Is the typical way to get .annot files add --annot to ocamlc or ocamlopt compiler invokations?
<MarcWeber> hcarty: Usually you don't indent the whole file. Do the speed issue also occur when coding?
<MarcWeber> Eg adding new lines only?
pnou has quit [Client Quit]
<gildor> hcarty: the main bug with omlet is that it tends to take into acccount extraneous "*)" and fails badly with it
<hcarty> MarcWeber: I would run in to it on every new line, but this was quite a while ago - probably over a year at this point
<gildor> i.e. in Str.regexp "toto.*)" will make it loop
<MarcWeber> Its gone
<MarcWeber> google code still has a copy
<gildor> MarcWeber: MySQL error on vim.org
<MarcWeber> That's what I wanted you to see
<gildor> hcarty: but so far I was able to write 1kLoC per file without problems (if you know how to prevent bugs in omlet it is fine)
<hcarty> gildor: Thank you, I'll give it another shot. I've been using Markus Mottl's OCaml vim indentation + highlighting.
<gildor> hcarty: I don't like the way this markus' script indent works
<gildor> hcarty: let x = XXX in
<gildor> hcarty: YYY
<gildor> omlet add an in indent before YYY
<flux> apparently it was changed to work that way in emacs' tuareg 2.0 as well. I don't like it :). (although I haven't upgraded to that yet)
<gildor> and also omlet is able to indent arg in function application
<flux> there's some "it's that way in the ocaml style guide"-excuse or something ;)
<gildor> flux: like omlet or markus-vim
<hcarty> Ah, I prefer it without the extra indent :-) But I think omlet allows both options.
<flux> gildor, like the way you showed, no indentation on let .. in
<hcarty> flux: Ridiculous! :-)
<gildor> hcarty: omlet_indent_let variable I think
<gildor> flux: and does it indents args on function application ?
<gildor> app XXX YYY
<gildor> ZZZ
<flux> gildor, it does
waltz has quit [Quit: Leaving.]
<gildor> (markus-vim doesn't add an indent before ZZZ)
<hcarty> gildor: The lack of indented ZZZ in the mottl-vim is an annoyance.
<gildor> hcarty: agreed
<gildor> hcarty: it makes the code unreadable
<MarcWeber> hcarty: ZZZ ? WHat's that?
<gildor> hcarty: last week I switch back to markus-vim (because my file was full of Pcre string that makes omlet crash)
<gildor> hcarty: and I only use it for 1 day before getting annoyed
<hcarty> MarcWeber: In reference to the ZZZ in gildor's comment
<gildor> MarcWeber: doesn't mean OCaml is lazy ;-)
<MarcWeber> gildor: Shall I fix that issue for you?
<gildor> MarcWeber: are you a vim expert ?
<MarcWeber> gildor: Depends on the use case
<MarcWeber> Vim is to huge - I only know what I've been using in the past.
<MarcWeber> Indentation is kind of easy.
<hcarty> MarcWeber: If you can fix the indentation in markus-vim, that would be excellent.
<gildor> hcarty, MarcWeber: 100% agreed, that would be very kind of you
<hcarty> markus-vim does seem to be updated more often than omlet. It would be nice if the two could be joined at some point.
<MarcWeber> markus-vim contains omlet
<gildor> markus-vim is the official vim mode (i.e. the one in the core vim distribution)
<gildor> hcarty: the two was joined, omlet is a dead project
<gildor> hcarty: the indentation was too complex in omlet, I think
<gildor> hcarty: they use the one from markus-vim
pnou has joined #ocaml
<MarcWeber> ttp://www.ocaml.info/vim/ So this is the source we're talking about?
<hcarty> Ah, I didn't know that. I know that omlet.vim is in the markus-vim tree, but I didn't know that it used any pieces of omlet
<hcarty> MarcWeber: Yes, that is where "markus-vim" lives
<MarcWeber> markus.mottl Is that the Markus we're talking about?
<gildor> yes
<MarcWeber> I'll send him an email. I'll push all updates to http://github.com/MarcWeber/vim-addon-ocaml
<gildor> I'll recommend to send him a patch...
<MarcWeber> No way. His repo contains tex code. I want ocaml only.
<MarcWeber> I invited him to join. He can get all patches from github and watch it.
<gildor> your repo seems empty
<MarcWeber> gildor: Sorry, I only have 10 fingers. I can't type and review faster :)
<MarcWeber> I didn't upload anything yet
<MarcWeber> gildor: You have to help me, can you provide me a code sinppet which does not indent correctly yet?
<hcarty> MarcWeber: A very short example: http://codepad.org/PqnP4zYP
<hcarty> The (f + 1) is lined up with print_int in the current version
<MarcWeber> So how to recognize it? All lines starting with ( increment indentation?
<MarcWeber> The broken function is distributed with vim, correct?
<MarcWeber> share/vim/vim72/indent/ocaml.vim
oriba has quit [Quit: Verlassend]
<hcarty> MarcWeber: The ( is not required. Here is a slightly more complex and complete example: http://codepad.org/bQaohrXS
<MarcWeber> hcarty: So how should the indenting plugin know whether y is an argument or whether its a call?
<MarcWeber> Because the print_int does not end by ; ?
<hcarty> I'm not sure of the correct way to detect it. A line which does not end with " in" or ";" should be followed by an indented line perhaps...
<hcarty> But multiple lines of extra arguments should probably not be indented further.
<hcarty> http://codepad.org/RZmasl3S for example
pnou has quit [Quit: brb]
pnou has joined #ocaml
|marius| has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<MarcWeber> hcarty: I don't feel like knowing ocaml enough yet to fix it - however I found a workaround: Dont' change indentation of those lines. So the annoying reindntation should no longer apper
<MarcWeber> hcarty: If you have time provide some feedback and tell me wether hack solves your annoyances with VIm indentation
<MarcWeber> How to represent a lazy value? eg Void -> Result
jonafan has joined #ocaml
philtor has joined #ocaml
ftrvxmtrx has joined #ocaml
ygrek has joined #ocaml
pnou has quit [Quit: be right back]
ikaros has joined #ocaml
sepp2k has joined #ocaml
drksd has joined #ocaml
philtor has quit [Ping timeout: 276 seconds]
ttamttam has joined #ocaml
Edward has joined #ocaml
ttamttam has quit [Remote host closed the connection]
<orbitz> MarcWeber: there is a lazy module
<MarcWeber> orbitz: I found it: fun() -> value
<MarcWeber> I didnt' figure out yet how to use teh lazy module. Ihavo to run a preprocessor or such, correct?
<MarcWeber> I'm writing simple Vim completion now.
<orbitz> oh I see your questio now
<orbitz> fun () -> value yes and you van eto call it wtih foo ()
<MarcWeber> orbitz: Are all ocaml modules falt, eg File.binding?
<MarcWeber> Or is this possible as well. String.UTF8.concate
<orbitz> it is possible to have sub modules, yes
<orbitz> that is how Map is impelmetned
<orbitz> module IntMap = Map.Make(...)
<MarcWeber> Which sources contain it?
<orbitz> map.ml I guess
<MarcWeber> Is there any tool parsing this all outputing a format which could be used for providing simple completion such as
<MarcWeber> String. -> concat | length | ...
Anarchos has joined #ocaml
drksd has quit [Quit: BANDE DE SALOPES]
Edward has quit []
verte has joined #ocaml
Edward has joined #ocaml
ski has quit [Ping timeout: 264 seconds]
drksd has joined #ocaml
ulfdoz has joined #ocaml
<hcarty> MarcWeber: There are a few tools which do something similar. ocamlspotter is one
<hcarty> ocamlspotter may only be for local code. There are tools which display the contents of a .cmi
<MarcWeber> hcarty: Have you trie dmy patch?
ftrvxmtrx has quit [Ping timeout: 260 seconds]
hto has quit [Read error: Connection reset by peer]
<MarcWeber> How does taggage compare to ctags?
hto has joined #ocaml
ftrvxmtrx has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 245 seconds]
<hcarty> MarcWeber: No, I apologize - I have not had a chance.
philtor has joined #ocaml
|marius| has quit [Ping timeout: 265 seconds]
itewsh has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
verte has quit [Quit: ~~~ Crash in JIT!]
philtor has quit [Ping timeout: 276 seconds]
ulfdoz has quit [Ping timeout: 248 seconds]
<pikachuyann> Have a good night / Passez une bonne nuit
pikachuyann has quit [Quit: 'night / 'nuit]
ygrek has quit [Ping timeout: 245 seconds]
xmarteo has quit [*.net *.split]
|marius| has joined #ocaml
valross has joined #ocaml
iago has joined #ocaml
xmarteo has joined #ocaml
xmarteo has quit [*.net *.split]
xmarteo has joined #ocaml
itewsh has quit [Quit: o/]
xmarteo has quit [Quit: Debian GNU/Hurd is Good.]
_unK has joined #ocaml
iago has quit [Read error: No route to host]
sepp2k1 has quit [Quit: Leaving.]
<MarcWeber> Call for testers: I uploaded a first version of completion support to my github repository - See README.markdown
ikaros has quit [Quit: Leave the magic to Houdini]