<rudi_s>
palomer: file should tell you, file /path/to/ocamlc
<rudi_s>
If it tells you /usr/bin/ocamlrun script test executable, then it's not native
<rudi_s>
(native code means only it's faster, no other changes.)
<thelema>
palomer: yes, the compiler is often run as a bytecode program.
<elehack>
I believe that ocamlfind prefers the native code compiler if it's available by default, so if you use it to wrap your ocamlc calls it will call ocamlc.opt if it can.
<thelema>
I hope one of ocamlfind or ocamlbuild does that, otherwise my builds are longer than they should be
<thelema>
hmm, why aren't we calling ocamldoc.opt if it's available?
<thelema>
I guess we don't know what ocamlbuild calls... I can't find it with ps
<palomer>
-verbose doesn't tell you?
<thelema>
ah, it's probably in the _log...
<thelema>
ok, it runs ocamlfind ocamldoc, hopefully that also defaults to the .opt
<palomer>
omake uses ocamldep...why is this?
<thelema>
because it was already written?
<palomer>
I mean, why do we need to scour a source file to find dependencies
<thelema>
how else to find them?
<palomer>
have the user explicitly mention them?
<thelema>
error prone and tedious
<palomer>
if the user omits one, the compiler will simply complain
<palomer>
that's not so bad
<thelema>
as I said, error prone and tedious - why not automatically determine dependencies?
<thelema>
it violates the principle of explaining something to the computer once, having explicit dependencies at compilation
<elehack>
does anyone here know how to tell OMake that a particular file must be built prior to scanning another (OCaml source) file for dependencies?
<thelema>
mfp is my omake expert
<elehack>
confirmation on previous ocamlfind/ocamlc.opt discussion: a call to "ocamlfind ocamldep" resulted in an actual invocation of ocamldep.opt. So it does seem to be invoking the optimized version.
<elehack>
I have a syntax extension that works under camlp4of, but fails under camlp4 -parser o -parser op -parser p (like ocamlfind invokes it)
<thelema>
ocamlfind is good, ocamlfind is wise
<elehack>
indeed :)
<thelema>
doh, ocamlfind isn't quite so wise
<thelema>
or camlp4 isn't so wise
<elehack>
yeah, I'm not sure where the problem is.
<elehack>
and I've tried adding more modules to the camlp4 invocation, but still can't get it to work.
<elehack>
erk, I guess it isn't working under camlp4of anymore either.
<elehack>
ok, it's working now.
<elehack>
and I fixed the OMake problem: a carefully placed ".SCANNER: scan-ocaml-<file>.ml: pa_ext.cmo" did the trick.
<elehack>
(camlp4 problem: I needed to build my extension with camlp4.quotations.o, not camlp4.quotations)
* elehack
has now successfully written and used his first syntax extension
<thelema>
congrats
<elehack>
hmm, BatSubstring doesn't seem to expose a way to get the substring's length.
<thelema>
it was poorly named - [size]
<elehack>
ahh
_unK has joined #ocaml
ccasin has quit [Quit: Leaving]
<palomer>
what does .SCANNER do?
<elehack>
palomer, it specifies that particular rules are used for scanning for dependencies, not generating output.
<elehack>
but I don't know the details of how it changes omake's thinking.
<palomer>
I don't understand this dependency stuff...
<palomer>
my dependencies are in my OCAMLPACKS
<elehack>
OCAMLPACKS is great for external dependencies, but you usually want a scanner to handle dependencies between modules in your project.
<elehack>
Fortunately, the OCaml build rules for OMake take care of that for you (in most cases)
mbishop has quit [Read error: Connection reset by peer]
<elehack>
thelema, i seem to have found a problem in BatSubstring.dropr: it looks for the offset+i character in the string, which starts out 1-past-the-end. Changing it to off+i-1 fixes this and makes it correct, as near as I can tell.
<elehack>
Is this a real problem w/ a fix as I described, or am I crazy?
mbishop has joined #ocaml
<elehack>
(found when I got invalid access errors trying to trim a string)
<thelema>
I think you're right, all the "ref len" should be "ref (len-1)"
<elehack>
if it's "ref (len-1)", then the "i >= 0" will be true one step too early and dropr can never make it empty.
_unK has quit [Remote host closed the connection]
<elehack>
what I did was change the second line: "p str.[off+ !i ]" -> "p str.[off+ !i - 1]"
<thelema>
ok, that'll also work
<elehack>
actually, you're right.
<elehack>
or rather it's more subtle (i'm making some unit tests to sanity-check these functions)
<elehack>
thelema, I pushed a fix with several test cases that should exercise the important boundary conditions of that suite of functions.
<elehack>
splitl also had a problem -- its return value was reversed from that specified by its documentation. I assumed the docs to be correct (they're the sane order anyway) and corrected the implementation.
elehack is now known as elehack|afk
elehack|afk has quit [Quit: Goodbye...]
Bazarov has joined #ocaml
Asmadeus has quit [Quit: moving]
Asmadeus has joined #ocaml
animist has quit [Read error: Operation timed out]
joewilliams_away is now known as joewilliams
animist has joined #ocaml
animist has quit [Ping timeout: 240 seconds]
animist has joined #ocaml
iratsu has quit [Ping timeout: 240 seconds]
animist has quit [Ping timeout: 245 seconds]
animist has joined #ocaml
animist has quit [Ping timeout: 260 seconds]
joewilliams is now known as joewilliams_away
animist has joined #ocaml
animist has quit [Read error: Operation timed out]
iratsu has joined #ocaml
animist has joined #ocaml
animist has quit [Read error: Operation timed out]
animist has joined #ocaml
Bazarov has left #ocaml []
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
iratsu has quit [Read error: Operation timed out]
iratsu has joined #ocaml
animist has quit [Ping timeout: 240 seconds]
iratsu has quit [Ping timeout: 240 seconds]
animist has joined #ocaml
iratsu has joined #ocaml
jeddhaberstro has quit [Quit: jeddhaberstro]
travisbrady has quit [Quit: travisbrady]
iratsu has quit [Read error: Operation timed out]
iratsu has joined #ocaml
iratsu has quit [Ping timeout: 240 seconds]
iratsu has joined #ocaml
Amorphous has quit [Ping timeout: 248 seconds]
Amorphous has joined #ocaml
ygrek has joined #ocaml
thrasibule has joined #ocaml
thrasibule has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
Associat0r has quit [Quit: Associat0r]
ygrek has joined #ocaml
iratsu has quit [Ping timeout: 265 seconds]
iratsu has joined #ocaml
ttamttam has joined #ocaml
ikaros has joined #ocaml
derdon has joined #ocaml
_unK has joined #ocaml
<hyperboreean>
hey guys, probably it's been asked at least a thousand times already, but is there an ocaml repl that can handle history of the commands?
<sgnb>
hyperboreean: you can use either ledit or rlwrap (as prefix to ocaml), or the lwt toplevel
<sgnb>
(I heard there was also one in batteries)
<sgnb>
lwt toplevel also has completion
Yoric has joined #ocaml
<hyperboreean>
sgnb: thanks, I'll check them out
ttamttam has quit [Quit: Leaving.]
_unK has quit [Remote host closed the connection]
Shoggoth has joined #ocaml
oriba has joined #ocaml
Edward_ has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Edward_ has quit [Ping timeout: 265 seconds]
Edward_ has joined #ocaml
derdon has quit [Ping timeout: 248 seconds]
spearalot has joined #ocaml
bluestorm has joined #ocaml
spearalot has quit [Quit: Computer has gone to sleep]
<thelema>
sgnb: it's something we want in batteries, but don't want to require all of lwt for
jeddhaberstro has joined #ocaml
thrasibule has joined #ocaml
* sgnb
oO( "all of lwt" sounds strange when talking about batteries... )Oo
<thelema>
lwt seems like a big dependency
<thelema>
maybe it's mostly that I don't have it installed, so I don't know how wonderful it is
<sgnb>
most dependencies of lwt are optional
thrasibule has quit [Ping timeout: 240 seconds]
ftrvxmtrx has quit [Ping timeout: 240 seconds]
Shoggoth has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
Bazarov has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
Yoric has quit [Client Quit]
<palomer>
lwt is pretty cool
<thelema>
maybe I just need to use it to be convinced that everyone with batteries should have lwt too
oriba has quit [Quit: Verlassend]
drk-sd has joined #ocaml
<palomer>
it's the most pleasant thread library I've used
<palomer>
I don't understand .SCANNER rules...
<palomer>
if they compute dependencies, where are the corresponding rules?
<thelema>
maybe only in the form of rule patterns
Yoric has joined #ocaml
<palomer>
eh?
Edward__ has joined #ocaml
Edward_ has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
ccasin has joined #ocaml
ikaros has joined #ocaml
Yoric has quit [Quit: Yoric]
Bazarov has quit [Ping timeout: 240 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
Associat0r has joined #ocaml
<palomer>
hrmph
danicampa90 has joined #ocaml
<palomer>
ocaml doesn't print its type error messages properly
<palomer>
File "/home/palomer/temp/test.ml", line 2, characters 1-21:
<palomer>
should be
<palomer>
File "/home/palomer/temp/test.ml", line 2-4, characters 1-8:
ygrek has quit [Ping timeout: 245 seconds]
ttamttam has quit [Ping timeout: 276 seconds]
<sgnb>
palomer: more context, please?
<palomer>
found it
<palomer>
parsing/location.ml
<palomer>
the function print
<sgnb>
line 2-4, characters 1-8 doesn't make much sense IMHO
<palomer>
why not?
<palomer>
next-error in emacs requires this format
<sgnb>
looks strange to specify a line range and a character range
<palomer>
anyways, I fixed the error
<flux>
sgnb, well, how else would you tell the exact location of the error?
<flux>
oh, right, that wasn't the issue here :)
<sgnb>
what does "line 2-4, characters 1-8" mean, exactly
<sgnb>
?
<flux>
true, that
<flux>
palomer, couldn't next-error be fixed with relative ease?
<flux>
go to character n and advance m characters and find out the current line?
<palomer>
well...next-error works with the patterns in compile.el
<flux>
so do they output both line range and chracter range?
ikaros has quit [Quit: Leave the magic to Houdini]
<flux>
so the end of the range in line range is optional, no?
<palomer>
yes
<palomer>
does it really make sense to write line 2, characters 2-21 ?
<palomer>
versus line 2-4, characters 2-8 ?
ttamttam has joined #ocaml
<hyperboreean>
how can I define a record in one file and use it some other file ? Do I actually have to include the definition in the file where I am using it?
<flux>
hyperboreean, no. you can refer to fields by their full name: foo.Module.field
<palomer>
you can also use manifold types
<hyperboreean>
ok, thanks guys, I'll look it up
boscop has quit [Ping timeout: 245 seconds]
Smerdyakov has joined #ocaml
Edward__ has quit [Read error: Connection reset by peer]
bluestorm has quit [Ping timeout: 260 seconds]
Tomcat has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 248 seconds]
* Smerdyakov
raises an eyebrow at the auto-op'ing.
travisbrady has joined #ocaml
Submarine has joined #ocaml
<Smerdyakov>
gildor, so you couldn't get enough privilege to add more ops yourself?
dcolish has quit [Ping timeout: 258 seconds]
ttamttam has quit [Quit: Leaving.]
dcolish has joined #ocaml
jeddhaberstro has quit [Quit: jeddhaberstro]
Yoric has joined #ocaml
jonafan_ has joined #ocaml
Smerdyakov has quit [Quit: Leaving]
jonafan has quit [Ping timeout: 276 seconds]
jeddhaberstro has joined #ocaml
danicampa90 has quit [Remote host closed the connection]
_unK has joined #ocaml
Tomcat has quit [Quit: Leaving]
boscop has joined #ocaml
Submarine has quit [Remote host closed the connection]