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
<hcarty> dark: I agree - it's too bad that it's not available in OCaml
<hcarty> There may be a camlp4 extension somewhere which automatically creates constructor functions...
<thelema_> dark: well, there's some lexing/parsing magic to make (::) work as it does, but the builtin list type is (modulo syntactic sugar) [type 'a list = (::) of 'a * 'a list | []]
thelema_ is now known as thelema
ftrvxmtrx has quit [Quit: Leaving]
<dark> isn't there an straightforward way to embed ocaml code to a latex package? (one that would do highlighting, and also preserve this highlighting with some latex2html converter..)
<mrvn> sure there is a way. Question is if someone has paved it already. (i.e. written the package for it)
boscop__ has joined #ocaml
boscop_ has quit [Ping timeout: 240 seconds]
kmicinski has joined #ocaml
Amorphous has quit [Ping timeout: 272 seconds]
<dark> I saw a solution that someone did: an ocaml app that generated tex files. someone cited ocamldoc, but i tried to somehow generate literal sources (not just signatures) with it, with no success. well i think I will end up with \verb, at least initially
<dark> btw happy new year
ftrvxmtrx has joined #ocaml
joewilliams is now known as joewilliams_away
<julm> happy gnu year =]
Amorphous has joined #ocaml
<dark> thelema, it was me that was looking for it
<dark> and, 'Free (i.e. release of source code) ? It will be soon (hopefully before this -2007- autumn) !'
<dark> lol
<adrien> morning, errr, no, happy new year =)
<dark> but I want something that renders nicely with both pdflatex and some html generator. (maybe latex isn't such a good choice to begin with, then. but i did no typesetting yet, just writing it as text only)
<dark> i wanted latex because it looks so awfully good in paper. *_*
<dark> but the document will be mainly be viewed as html
ftrvxmtrx has quit [Quit: Leaving]
banisterfiend is now known as ERECTCOCK
ERECTCOCK is now known as banisterfiend
kmicinski has quit [Ping timeout: 255 seconds]
opla2 has joined #ocaml
ftrvxmtrx has joined #ocaml
unkanon has quit [Quit: Computer has gone to sleep]
Pip has joined #ocaml
<Pip> I want you guys recommend me a wonderful tutorial for a beginner like me
<Pip> *to^
fabjan has quit [Ping timeout: 260 seconds]
<banisterfiend> Pip: why's poignant guide to ruby
<Pip> banisterfiend, Excuse me ?
<Pip> I don't understand your question in grammatical sense and semantic sense
<banisterfiend> i didn't ask a question
<Pip> why's indicated a question, didn't it ?
<banisterfiend> Pip: you need to learn more english.
<Pip> I KNOW
<Pip> "why's poignant guide to ruby" ---> name of a book/tutorial you recommend to me ?
<banisterfiend> Pip: search it on google, bitch.
<Pip> :D
<Pip> search what ?
<Pip> "why's poignant guide to ruby" or tutorial of OCaml ?
<Pip> banisterfiend, You were lucky to see the earliest sunshine of this New Year
<opla2> how do i test that an instance is of a certain type?
<Pip> Thanks
<julm> opla2: an instance of what? a class?
<opla2> yeah
<opla2> julm, yeah
<julm> hm
<julm> let f (c:c1) = c#m;; < is that what you want for instance? where class type c1 = object method m : int end;;
edwin has joined #ocaml
ygrek has joined #ocaml
mnabil_ has quit [Ping timeout: 265 seconds]
mnabil_ has joined #ocaml
<opla2> having an option variable... what is the shortest form
<opla2> ehh
<opla2> shortest way to write if(myVar.IsSome) then ..do somthing with myVar.Value ...
Pip has quit [Quit: It's not my problem.]
<julm> match myVar with Some myValue -> do_something(myValue) | _ -> raise Not_found
<opla2> julm, is that really the shortest?
<opla2> in Scala option is a list of 0 or 1 elements
<opla2> a bit overkill
<opla2> but nice to do myOpt.foreach(el => doSomething(el))
lpereira has joined #ocaml
<banisterfiend> opla2: that was inspired by ruby
<banisterfiend> (so i read)
<opla2> aha
<opla2> does ruby have option?
<banisterfiend> what is option?
<banisterfiend> opla2: i was talking about the foreach(el => doSomething(el)) syntax
<opla2> aha
<banisterfiend> in ruby that is: my_opts.each { |el| do_something(el) }
almaisan-away is now known as al-maisan
al-maisan is now known as almaisan-away
ttamttam has joined #ocaml
ttamttam has left #ocaml []
<opla2> banisterfiend, ah didnt know.
Yoric has joined #ocaml
Pip has joined #ocaml
<Pip> what's the difference between: #-.2.0 ;; and #-2.0;;
<asmanur> none
<asmanur> hm
<asmanur> no -2.0 doesn't compile does it ?
<asmanur> oh it does...
<asmanur> -2.0 must be syntaxic sugar for -.2.0 which is syntaxix sugar for ~-.2.0
<Pip> okay
<alpounet> thelema, dark, hcarty, i was indeed saying that :: can't be used as a function like the other operators, and that value constructors in OCaml, more generally, are not functions, whereas they are, in Haskell
<alpounet> see « <alpounet> dark, for example, you can't do: »
rks has quit [Quit: {'EXIT', rks, "bye"}]
ikaros has joined #ocaml
jcaose has joined #ocaml
jm_ocaml has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
rks has joined #ocaml
<thelema> pip: the first is a unary function being applied to a float, the second is a float constant
<thelema> # (~-.) 2.0;;
<thelema> - : float = -2
<thelema> # (-.) 2.0;;
<thelema> - : float -> float = <fun>
<thelema> there's some syntax sugar around "-" to make it just work
nimred has quit [Quit: leaving]
nimred has joined #ocaml
nimred has quit [Client Quit]
nimred has joined #ocaml
opla2 has quit [Ping timeout: 250 seconds]
<Pip> What's the difference between operator = and == ?
<mrvn> Pip: one compares the content, the other the physical location
<mrvn> # "" = "";;
<mrvn> - : bool = true
<mrvn> # "" == "";;
<mrvn> - : bool = false
ftrvxmtrx has joined #ocaml
almaisan-away is now known as al-maisan
unkanon has joined #ocaml
al-maisan is now known as almaisan-away
unkanon has quit [Client Quit]
Edward has joined #ocaml
rks has quit [Quit: {'EXIT', rks, "bye"}]
<hcarty> There have been some grumpy people in #ocaml over the last several hours...
<banisterfiend> hcarty: i blame women
<hcarty> banisterfiend: That's... a sad statement about you?
* adrien hands a beer to all the grumpy people
<hcarty> adrien: :-)
ulfdoz has joined #ocaml
almaisan-away is now known as al-maisan
al-maisan is now known as almaisan-away
jcaose has quit [Quit: Leaving]
thatch_ has joined #ocaml
<thatch_> Hi, I have some questions about packaging ocaml libs/packages
<thatch_> Primarily, whats the deal with findlib modules vs what seem to be plain old ocaml modules?
<thatch_> I am making some ArchLinux ocaml packages, and there are no standards yet, some of these install into /usr/lib/ocaml/site-lib with ocaml-findlib
<thatch_> and some of them install into /usr/lib/ocaml without findlib
<thatch_> and some install the same files into both!
unkanon has joined #ocaml
<thatch_> On Fedora it appears that everything is installed into just /usr/lib/ocaml
<thatch_> anyone know what the deal is?
<hcarty> thatch_: I think Fedora and Debian both use findlib with all of their packages. You can configure findlib to install/look in various locations.
<hcarty> thatch_: For example, using Debian's packages, a user-installed library ends up in a different location than a Debian-installed library. Both are still found by findlib.
<hcarty> thatch_: Fedora installs system and user packages to the same location (or it did last time I checked)
<thatch_> ahh, that helps a bit, so what you are saying is that I should configure ALL of my Arch packages to use findlib
<hcarty> thatch_: Yes, that is probably best
<thatch_> and make sure that the default findlib path will find them?
<hcarty> Precisely
<thatch_> so make sure that the ocamlfind config file has a path that includes the needed paths
<thatch_> ok, this is good stuff
<hcarty> If you install with "ocamlfind install ..." then you can be pretty sure that findlib will know how to access them later.
<thatch_> awesome!
<thatch_> ok, one more question....
<thatch_> I am trying to compile an ocaml package and one of the deps was not propperly made with findlib, the package looks for a findlib and an "ocaml module"
<thatch_> but the module is not in place
<thatch_> is there a way to make the ocaml "module" search look in the findlib dir? Or should I rebuild the the other package?
<hcarty> thatch_: I think you want the "-I" compiler flag
<hcarty> Something like "ocamlc -I /path/to/the/module ..."
<hcarty> If I understand the question correctly
<thatch_> Ok, I will look into it, but this helps, thanks!
<hcarty> You're welcome - good luck!
<thatch_> but this is the problem when standards are not yet in place :)
<hcarty> You best bet may be to patch the offending package to use/support findlib
<thatch_> awesome, thanks!
<hcarty> If you need patches for findlib support, Debian and Fedora are both excellent places to look
<thatch_> I have set up all of my packages with findlib, so I think I get that part
<thelema> thatch_: great - we need better package support for ocaml users
<thatch_> well, as you know thelema, I am still quite the ocaml n00b, but I am working on it :)
<thelema> glad to have the help
<thatch_> but from what I can tell the only difference from a non findlib module and a findlib module is the META file
<thatch_> and if an upstream package does not have the meta file the packager should make it?
<thelema> and having it put in the right place. Yes, packagers should make meta files, although it's trouble when different distributions end up with different META files
<thelema> (as is the case for cryptokit, iirc)
<thatch_> and that then everything should be findlib enabled, and they should probably all just be in the same dir right?
<thatch_> ahh
<thatch_> so I should also look into taking meta files from other distros if they have them...
<thelema> that dir can vary from distro to distro
<thelema> yes
<thatch_> ok, cuz right now in Arch we have non-findlib modules in /usr/lib/ocaml and findlib modules in /usr/lib/ocaml/site-lib
<thatch_> and I am thinking that they should all be in /usr/lib/ocaml
<thatch_> does that sound right? And then fix the non findlib ones....
<thatch_> man, a bit of a mess :)
<thelema> I think site-lib/ for findlib is fine
<thelema> although I'll admit that on my ubuntu system, findlib uses /use/lib/ocaml/<package name>, without site-lib/
<thatch_> hmm, same with fedora, and I am seeing a lot of build issues with the site-lib dir
<thatch_> and replica non-sitelib packages in the Arch AUR
<thelema> If you can manage re-packaging everything on arch so it all works out.
<thatch_> Oh, I think I can manage, it will take a while, but I think it can be done :)
<thatch_> Ok, I am going to talk about this with the Arch devs then, because there is an ocaml mess that needs cleaning up :)
<thatch_> Thanks thelma! Again you help me out!
<thelema> you're welcome
mnabil__ has joined #ocaml
mnabil_ has quit [Ping timeout: 276 seconds]
Pip has quit [Remote host closed the connection]
rks has joined #ocaml
emmanuel_ has joined #ocaml
f[x] has quit [Ping timeout: 246 seconds]
f[x] has joined #ocaml
emmanuel_ has quit [Quit: =>[]]
emmanuelux has joined #ocaml
banisterfiend has quit [Ping timeout: 272 seconds]
yezariaely has joined #ocaml
dark has quit [Ping timeout: 255 seconds]
banisterfiend has joined #ocaml
yezariaely has left #ocaml []
dark has joined #ocaml
lpereira has quit [Quit: Leaving.]
<thelema> anyone used pa_macro with findlib?
drunK has joined #ocaml
rks has quit [Quit: foo]
Associat0r has joined #ocaml
<Associat0r> what happened to the ocaml-tutorial site?
khia0 has joined #ocaml
khia0 has left #ocaml []
<thelema> Associat0r: it's down while its server gets rebuilt related to exim vulnerability
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
<Associat0r> niok thanks
<Associat0r> -ni
jm_ocaml has quit [Quit: Konversation terminated!]
jm_ocaml has joined #ocaml
jm_ocaml has quit [Remote host closed the connection]
rks has joined #ocaml
<hcarty> thelema: I just tried it in the toplevel (GODI, OCaml 3.12.0) and it works here
boscop has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
edwin has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 240 seconds]
Yoric has quit [Quit: Yoric]
banisterfiend has quit [Ping timeout: 260 seconds]
mnabil__ has quit [Ping timeout: 246 seconds]
<thelema> hcarty: More specifically, -DFOO - is this at all compatible with how findlib works?
<thelema> maybe -ppopt...
<thelema> ah, I've not used that before...
<hcarty> thelema: Did that work? It looks like it's what you'd want
mnabil_ has joined #ocaml
banisterfiend has joined #ocaml
Edward is now known as Guest74781