<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?
<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"
<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.
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: 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"