gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0+beta1 http://permalink.gmane.org/gmane.comp.lang.caml.inria/49168
th5 has quit [Quit: th5]
<elehack> jgrozave, good; it would be useful if those could be placed in the Batteries GitHub wiki sometime, and any necessary code/build system changes created and merged.
elehack is now known as elehack|afk
<jgrozave> elehack: and on an unrelated to windows note, I also figured out how to add support to the camlp4(of|rf|oof|orf) syntaxes using ocamlfind
<jgrozave> i had an example camlp4 syntax extension i wanted to test out, but it's makefile used camlp4of and I couldn't figure out how to translate that to useing ocamlfind with its -syntax option
<jgrozave> camlp4 isn't very well documented at the moment, I should probably put those findings on a wiki somewhere as well huh
thrasibule has quit [Ping timeout: 265 seconds]
npouilla1d has joined #ocaml
fraggle_laptop has quit [Read error: Operation timed out]
Tianon has quit [Read error: Operation timed out]
npouillard has quit [Read error: Operation timed out]
fraggle_laptop has joined #ocaml
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
sgnb` has joined #ocaml
travisbrady has quit [Quit: travisbrady]
seafood has quit [*.net *.split]
sgnb has quit [*.net *.split]
elehack|afk is now known as elehack
<elehack> jgrozave, yeah, it isn't overly well documented. I've had to figure out quite a few things myself with poking around and looking at source.
<jgrozave> elehack: it's a good reason to go digging around in the source at least. felt educational when I wasn't pulling my head out trying to figure what options or files to include to camlp4 to make it the same as camlp4orf
<jgrozave> *pulling my hair out
seafood has joined #ocaml
morse has joined #ocaml
valross has quit [*.net *.split]
Associat0r has quit [*.net *.split]
mal`` has quit [*.net *.split]
msteele_ has quit [*.net *.split]
noj has quit [Ping timeout: 240 seconds]
Associat0r has joined #ocaml
msteele_ has joined #ocaml
mal`` has joined #ocaml
alexyk has joined #ocaml
<jgrozave> I'm getting a strange error. when I try to test to see if my lablgtk installation worked I get this "C:\ocaml-3.11.2\lib\stublibs\dlllablgtk2.dll: The specified module could not be found" put I clearly see dlllablgtk2.dll in that folder! :(
jgrozave has quit [Quit: Page closed]
<elehack> with Pcre.pmatch - if I use `ANCHORED and ~pos, it considers 'pos' to be the beginning of the string; not so if my pattern begins with '^'.
<elehack> anyone know if this is a bug or expected behavior?
thrasibule has joined #ocaml
avsm has joined #ocaml
morse has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Remote host closed the connection]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm1 has quit [Client Quit]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
morse has joined #ocaml
thrasibule has quit [Ping timeout: 265 seconds]
thrasibule has joined #ocaml
_unK has quit [Remote host closed the connection]
_unK has joined #ocaml
patronus has quit [Remote host closed the connection]
patronus has joined #ocaml
valross has joined #ocaml
morse has quit [Ping timeout: 240 seconds]
_unK has quit [Remote host closed the connection]
Associat0r has quit [Quit: Associat0r]
<alexyk> how do I check if the suffix of a string equals a given one?
alexyk has quit [Quit: alexyk]
noj has joined #ocaml
murph has quit [Ping timeout: 265 seconds]
alexyk has joined #ocaml
pad has quit [Remote host closed the connection]
alexyk has quit [Quit: alexyk]
neorab has quit [Ping timeout: 265 seconds]
alexyk has joined #ocaml
neorab has joined #ocaml
ulfdoz has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<thelema> alexyk: BatString.ends_with
<alexyk> yep
<thelema> string operations are a bit thin in stdlib, batteries has lots of good functions (not that most are difficult to write)
jakedouglas has quit [Quit: Leaving.]
<alexyk> how are these checks different: x = 1 vs x == 1 and x = 1. vs x == 1. ?
<thelema> the first two are identical, the second two are different
<alexyk> thelema: what should be used for strings?
<flux> always use =
<flux> unless you know why you should use ==
<flux> of the lot of little things I've written I only found two uses of ==
<flux> and pretty sure atleast the other one is accidental
<alexyk> good
Yoric has joined #ocaml
mbishop has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
ttamttam has joined #ocaml
Amorphous has quit [Ping timeout: 248 seconds]
Yoric has quit [Quit: Yoric]
Amorphous has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
ikaros has joined #ocaml
ztfw` has quit [Remote host closed the connection]
ztfw` has joined #ocaml
Associat0r has joined #ocaml
boscop has quit [Ping timeout: 260 seconds]
valross has quit [Quit: Ex-Chat]
animist has quit [Ping timeout: 240 seconds]
derdon has joined #ocaml
slash_ has joined #ocaml
sysop_fb has joined #ocaml
animist has joined #ocaml
ttamttam has quit [Quit: Leaving.]
ttamttam has joined #ocaml
sysop_fb has quit []
thrasibule has quit [Ping timeout: 276 seconds]
elehack has quit [Quit: not a typewriter]
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
itewsh has joined #ocaml
itewsh has quit [Client Quit]
_unK has joined #ocaml
<adrien> btw, is there something to iter over a file's lines in batteries?
<flux> maybe not as such
<flux> but you can get an enumeration of lines in a file
<flux> and iterate over that enumeration
<derdon> how can I combine ocamlbuild with syntax extensions offered by the Batteries?
<adrien> that'd do it, won't use it today but I'll probably rewrite my small script with batteries as an exercice
<adrien> people are crazy to use things in 85_000_000 * 20_000_000 steps when they can have 85_000_000 + 20_000_000 instead (or almost)
boscop has joined #ocaml
ccasin has joined #ocaml
boscop has quit [Ping timeout: 265 seconds]
boscop has joined #ocaml
alexyk has joined #ocaml
jgrozave has joined #ocaml
<jgrozave> i'm trying to install lablgtk2 and the build went just fine, but i'm getting a strange error
<jgrozave> Cannot load required shared library dlllablgtk2. Reason: C:\cygwin\home\jgrozave\ocaml-3.11.2\lib\stublibs\dlllablgtk2.dll: The specified module could not be found.
<jgrozave> but the dll is definitely there
<jgrozave> any ideas why i could be getting an error?
<ttamttam> jgrozave: just in case, check $LANG environment variable
<jgrozave> i have OCAMLRUNPARAM="v=256" and I can see that the opening of the dllunix.dll in the same directory works just fine.
<jgrozave> $LANG=C.UTF-8
<ttamttam> No idea, then.
<jgrozave> could the dll not be in the right format?
<jgrozave> i suppose i can try installing from source
<gildor> jgrozave: what is the value of OCAMLLIB ?
<jgrozave> C:/ocaml-3.11.2/lib
<jgrozave> and I have findlib installed and when i try using that with the lablgtk package i get the same thing
<gildor> can you list the content of this dir ?
<jgrozave> gildor: of my lib directory or the stublibs directory?
ttamttam has quit [Quit: Leaving.]
<jgrozave> jgrozave@EPIC11371 /ocaml-3.11.2/lib/stublibs $ ls dllbigarray.dll dlllablgl.dll dlllabltk.dll dllstr.dll dlltkanim.dll dllunix.dll dllgraphics.dll dlllablglut.dll dllnums.dll dllthreads.dll dlltogl.dll
alexyk has quit [Quit: alexyk]
<gildor> jgrozave: so C:\cygwin\home\jgrozave\ocaml-3.11.2\lib\stublibs\dlllablgtk2.dll exists
<jgrozave> yup
<jgrozave> gildor: it's bizzarre
<gildor> jgrozave: and you can open C:/ocaml-3.11.2/lib/stublibs/dllunix.dll
<jgrozave> yeah, i had trouble installing findlib before because it couldn't find dllunix.dll, but that was because I had my CAML_LD_LIBRARY_PATH variable set up incorrectly
<gildor> can you give me the output of ocamlfind list
<jgrozave> i'm going to try installing it from source see if that helps
<jgrozave> but the binary package said it should work with the mingw version of ocaml, so i don't know
<jgrozave> gildor: that's not going to be much help, I deleted all the lablgtk folders and i'm attempting to compile it from scratch
<jgrozave> :P
<jgrozave> it's fun in a dwarf fortress sort of way
jakedouglas has joined #ocaml
oriba has joined #ocaml
<gildor> jgrozave: it should be much help, because the point is to see if other libraries installed through findlib works or not
<gildor> jgrozave: ;-)
<gildor> jgrozave: i.e. try something else that should load a dll, if it works -> lablgtk is faulty
<jgrozave> gildor: i've installed batteries, so I know findlib is working just fine
<gildor> jgrozave: is batteries using external dll ?
<derdon> thelema: ping
sgnb` has left #ocaml []
sgnb has joined #ocaml
<jgrozave> gildor: I'm thinking perhaps it could be because I didn't have any of the development files from gtk and all the other required libraries
<thelema> derdon: pong
<jgrozave> it couldn't load*
thomasga has quit [Ping timeout: 276 seconds]
<derdon> thelema: do you know how I can use syntax extensions which are offered by the Batteries when I'm compiling with ocamlbuild?
<thelema> -package batteries.syntax doesn't work for you?
<thelema> (as an argument to ocamlfind)
<derdon> I don't use ocamlfind, but ocamlbuild
thomasga has joined #ocaml
<thelema> how does your ocamlbuild include regular batteries?
<derdon> thelema: via a _tags file
<derdon> its content is only "<*>: pkg_batteries,pkg_threads"
<thelema> try changing "pkg_batteries" to "pkg_batteries.syntax"
oriba has quit [Quit: Verlassend]
<derdon> ok
<gildor> jgrozave: yes, missing dll can be a good reason, error about this in Win32 are not always clear
<derdon> thelema: ocamlbuild uses this command to compile it: "ocamlfind ocamlc -c -package batteries.syntax -package threads -thread -o calc.cmo calc.ml"
<derdon> thelema: but the error message is still "Error: Unbound value p"
<derdon> thelema: no ideas?
<thelema> the code works in the toplevel?
<derdon> yes
<thelema> ok, try "pkg_batteries, pkg_batteries.pa_string, pkg_thread"
<derdon> thelema: really thread? without the s?
<derdon> not pkg_threads ?
<thelema> yes, threads
<derdon> ok
<derdon> still the same
<thelema> ok, one more... "pkg_batteries, syntax_batteriex.syntax"
hcarty has quit [Quit: leaving]
hcarty has joined #ocaml
<hcarty> derdon: Does using batteries.pa_string.syntax work? Rather than batteries.syntax
<thelema> hcarty: batteries.pa_string doesn't have a syntax ... doh! it does...
<thelema> I skipped right over it.
<derdon> hcarty: doesn't work either :(
<derdon> do I have to add anything in the file except of "open Batteries"?
jgrozave has quit [Quit: Page closed]
<derdon> gnah!
<thelema> no, nothing in the file
<derdon> hm
<derdon> in the toplevel, I can wrte p"" and then enter it
<derdon> because I enabled all the syntax extensions Batteries offers for the toplevel
<derdon> thelema: what's zp with the file myocamlbuild.ml? do I have to edit it?
<hcarty> derdon: Are you using the Batteries-provided myocamlbuild.ml?
<derdon> hcarty: yes
<thelema> it just enables findlib in ocamlbuild
<hcarty> derdon: foo.ml as 'let _ = p""' and _tags as '<*>: pkg_batteries.pa_string.syntax, pkg_threads' should work in that case...
<hcarty> I'm not sure if the pkg_threads is even required in that minimal case
<hcarty> Ah! You need syntax_camlp4o
<hcarty> derdon: Adding that to the appropriate line(s) in _tags should do it
<thelema> hcarty: any ideas why the batteries.syntax code in META isn't working?
<hcarty> derdon: <*>: pkg_batteries.pa_string.syntax, syntax_camlp4o
<hcarty> thelema: I'm not sure
<hcarty> thelema: Maybe it's not able to detect if you want original or revised syntax?
<derdon> hcarty: even this isn't working!
<thelema> then all of the syntax extension packages are failures
<derdon> hcarty: I created a new directory for this
<derdon> gotta go!
<hcarty> That's my best guess. Batteries-Old didn't require that for it's "all-encompassing" use_batteries tag because (IIRC) there was one for revised and one for original.
<hcarty> thelema: How so?
<thelema> hcarty: none of them indicates revised/original
<hcarty> Some of them should work for both from what I understand
<hcarty> Though I don't know if pa_string changes it's expected syntax to match. I haven't tried any of them with revised syntax.
<thelema> fair enough. gotta go.
pad has joined #ocaml
travisbrady has joined #ocaml
drk-sd has quit [Read error: Operation timed out]
drk-sd has joined #ocaml
_unK has quit [Remote host closed the connection]
metasyntax has quit [Quit: Be seeing you.]
Anarchos has joined #ocaml
ulfdoz has joined #ocaml
Anarchos has quit [Ping timeout: 265 seconds]
ttamttam has joined #ocaml
Anarchos has joined #ocaml
_unK has joined #ocaml
Anarchos has quit [Ping timeout: 265 seconds]
alexyk has joined #ocaml
Yoric has joined #ocaml
ttamttam has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 240 seconds]
iratsu has joined #ocaml
alpounet has joined #ocaml
travisbrady_ has joined #ocaml
travisbrady has quit [Ping timeout: 240 seconds]
m00npirate has joined #ocaml
travisbrady has joined #ocaml
m00npirate has left #ocaml []
travisbrady_ has quit [Ping timeout: 240 seconds]
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
itewsh has joined #ocaml
itewsh has quit [Client Quit]
<alexyk> mfp: can you perhaps make a library of your better hashtables conforming to the standard Hashtbl API, to become a part of Batteries? Is there a language mechanism to implement against an API, perhaps fixing imperative or functional, but to be able to replace the implemention later?
Anarchos has joined #ocaml
<alexyk> is there a way to limit the RAM ocaml executable can consume?
ulfdoz has quit [Ping timeout: 260 seconds]
Yoric has quit [Ping timeout: 260 seconds]
ccasin has quit [Quit: Leaving]
LionMadeOfLions has quit [Ping timeout: 276 seconds]
infoe has quit [Ping timeout: 264 seconds]
alexyk has quit [Quit: alexyk]
<Anarchos> alpounet maybe by Gc ?
thrasibule has joined #ocaml
romildo has joined #ocaml
<romildo> Hi.
pad has quit [Read error: Connection reset by peer]
<romildo> I am writing a Makefile to compile a small OCaml application, but I am have some difficulties. Maybe someone here can help me.
alexyk has joined #ocaml
<romildo> My attempt of writing the Makefile: http://paste.pocoo.org/show/230014/
alexyk has quit [Client Quit]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<travisbrady> romildo: you may want to have a look at OCamlMakefile
<travisbrady> You can just save it to your project directory, set up a few variables and then include OCamlMakefile and it takes care of the rest. handles making toplevels, wrapping C libs, everything.
<romildo> travisbrady, I will look at it later on. As the project is not complex, I would like first to learn how to set up a basic Makefile for it that does not depend on additional software.
<derdon> travisbrady: did you have to write this OCamlMakefile on your own? all the >1000 lines?
<travisbrady> derdon: no, it's basically just a library you download. Markus Mottl built it
<derdon> travisbrady: ok
<derdon> travisbrady: but you had to write the Makefile, didn't you?
<travisbrady> yes
<travisbrady> well, not me, but avsm who actually created that project.
<derdon> travisbrady: oh, I thought you were avsm :D
slash_ has quit [Quit: Lost terminal]
thrasibule has quit [Ping timeout: 265 seconds]
LionMadeOfLions has joined #ocaml
infoe has joined #ocaml
<theDroggl> I wonder how commonly the object oriented features of ocaml are used in reality. During tutorial reading it seems to have some overlap with modules & records, or better said, I cant imagine it is mixed very often
<derdon> theDroggl: I think classes and objects are not used very often
<gildor> theDroggl: there are some case where it is useful
<derdon> theDroggl: OCaml is mainly used as a functional language, not as an object orientated language
<gildor> theDroggl: like UI
<derdon> *oriented
<travisbrady> theDroggl: in his CAML Trading talk video Yaron Minsky mentions that Xavier claims to have never used objects. I think the CAML trading article says something like "classes are an attractive nuisance"
<derdon> gildor: right
<gildor> romildo: you can also have a look at OASIS http://oasis.forge.ocamlcore.org
<theDroggl> ic thnx
<derdon> gildor: I still don't see the use in OASIS :-$
<gildor> romildo: it helps to create build system
<derdon> gildor: what is it good for? what should it replace?
<gildor> derdon: it doesn't replace OCamlMakefile/ocamlbuild or OMake
<derdon> gildor: but ...?
<gildor> derdon: it uses one of them
<derdon> hm. but what does it do? why should I use it?
<gildor> but none provide configure for example
<gildor> (point 1)
<derdon> gildor: with the GNU autotools and a Makefile, configure can be provided
<gildor> point 2: it is a central place for data, e.g. .odocl/.mllib/_tags are a lot of double occurence
<gildor> derdon: configure generated by autotools are VERY slow
<gildor> point 3: provide a way to install
<gildor> point 4: help to write META file automatically
<gildor> derdon: but you can do exactly the same thing with autotool/OMake/ocamlfind by hand
<gildor> derdon: this is just easier
<gildor> (and faster)
<gildor> and when you use autotools you add a lot of dependencies which are not so easy to fulfill on Windows
infoe has quit [Ping timeout: 264 seconds]
LionMadeOfLions has quit [Ping timeout: 240 seconds]
<derdon> gildor: I ignore windows users
<gildor> well that is a POV
<gildor> but anyway, generated configure are a lot faster on Windows and Linux
<derdon> hm, ok
<derdon> when I read the documentation of OASIS (partially, I gave up!), I was confronted with too much information
<derdon> maybe it's really easy to use
<gildor> take a look at example
<derdon> and I'm too silly for it
oriba has joined #ocaml
<gildor> use 'OASIS -quickstart' and answer the question
<gildor> or take a look at the quickstart doc http://oasis.forge.ocamlcore.org/quickstart.html
infoe has joined #ocaml
<derdon> gildor: I'll do so if I realize that I need OASIS
<derdon> gildor: currently, a simple ocamlbuild command is sufficient
<gildor> derdon: does it handle install and configure ?
<derdon> gildor: no
LionMadeOfLions has joined #ocaml
<derdon> gildor: I'm currently only developping and not yet planning to publish
<gildor> derdon: and you write and update the META file by yourself
<derdon> gildor: there is no META file
<derdon> gildor: only a very small (2LOC) _tags file
<gildor> no mllib, no odocl ?
<derdon> I don't know these, so probably: yes
<gildor> derdon: so if you don't need to publish and don't use complex ocamlbuild, you probably don't need OASIS
<derdon> gildor: I see
<derdon> and if I plan to publish, I will hire both a *.deb and a *.rpm package maintainer
oriba_ has joined #ocaml
<derdon> so it will be easy to install my libs or binaries
oriba_ has quit [Remote host closed the connection]
<gildor> derdon: well, he will probably be pleased to found a standard configure/build/install system
oriba_ has joined #ocaml
<derdon> gildor: yes, you're right. I understand what you mean
<gildor> derdon: the worst thing a .deb maintainer is a fully custom build system
<gildor> derdon: that don't handle platform where ocamlopt is not present
<gildor> (for example)
ikaros has quit [Quit: Leave the magic to Houdini]
<derdon> gildor: I cannot follow you. a *.deb knows the dependencies and thus, can automatically install ocaml and other packages
oriba has quit [Ping timeout: 276 seconds]
<gildor> derdon: the guy who make the package, need to know these dependencies to write it into the description
<derdon> gildor: that's why I alaways write good README files :)
<gildor> derdon: you miss the packaging step
<derdon> gildor: in every README file is a section with a list of dependencies
<gildor> derdon: enforcing this in an automatic way is better
<gildor> derdon: and OASIS write the README with dependencies by itself
<derdon> if you think so
<derdon> gildor: OASIS creates a README? wth?
<gildor> derdon: yes automatically using the deps describe in _oasis file
<gildor> what is the problem ?
<derdon> gildor: I am used to write it myself
<gildor> derdon: you can still write what you want in INSTALL/README
<derdon> gildor: okay, this looks pretty good!
<gildor> derdon: you just have to create a space (between OASIS_START / OASIS_STOP comment)
<derdon> you convinced me!
<gildor> the README/INSTAL stuff convince you ?
<gildor> no kidding ?
<derdon> yes
<derdon> I thought it'd be garbage
<gildor> to get it you need to add "Plugins: StdFiles" in the _oasis file
<gildor> (I use "Plugins: StdFiles, DevFiles, META" to write README/INSTALL/Makefile/configure/META file)
<derdon> ok
<gildor> I am working on v0.2.0, which should be out soon (1 or 2 weeks)
<derdon> gildor: are you the main developer of OASIS?
<gildor> derdon: yes
<gildor> derdon: for now ;-)
<derdon> cool, then I know whom to ask if I get problems with it :)
<gildor> ping me on IRC, send me an email or bug me on forge.ocamlcore.org
<gildor> this is the first public version, there is still a lot of work todo
oriba_ has quit [Quit: Verlassend]
emmanuelux has joined #ocaml
Asmadeus has quit [Ping timeout: 276 seconds]
Asmadeus has joined #ocaml
travisbrady has quit [Quit: travisbrady]