<flux>
I'm afraid my coq studies are very close to the beginning, been there for some time ;)
th5 has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has joined #ocaml
stdDoubt has quit [Quit: Leaving]
seafood has joined #ocaml
jonafan_ has joined #ocaml
joewilliz has joined #ocaml
mehdid_ has joined #ocaml
rixed___ has joined #ocaml
LionMade0fLions has quit [*.net *.split]
joewilliams_away has quit [*.net *.split]
mal`` has quit [*.net *.split]
rixed_ has quit [*.net *.split]
jonafan has quit [*.net *.split]
mehdid has quit [*.net *.split]
LionMade0fLions has joined #ocaml
mal`` has joined #ocaml
palomer has quit [Quit: palomer]
<jsk>
Hi all, does anyone know if there's a trivial way to remove all comments from an ml file? (If using camlp4, then ideally only with the built-in printers and filters.)
<jsk>
thanks, in advance :)
<gildor>
camlp4o -printer o test.ml ?
<flux>
sadly, it doesn't strip comments?
<gildor>
camlp4o -printer o -no_comments test.ml
<gildor>
in fact
<gildor>
no_comments is an option added by the printer i think
<jsk>
gildor: yes, the second works beautifully
<flux>
hmm.. I wonder if that could be used for some "real change" detection in makefiles etc..
<flux>
| md5sum etc
<flux>
I guess there are better tools :)
<jsk>
flux: yes, actually that's what I'm trying to use it for
<gildor>
flux: ocamlbuild already deal with this kind of "real change" detection
<gildor>
AFAIK
<jsk>
flux: oops, misunderstood. I'm using camlp4 to detect non-whitespace changes to files.
<flux>
jsk, builds take too long?
<jsk>
flux: I was using camlp4 as a simple check that a given patch causes no semantic changes to a file.
<gildor>
coccinelle ?
<jsk>
flux: by running the command over the unpatched file, then the patched file, and then diffing the result.
<jsk>
but hopefully ignoring changes to comments :)
<jsk>
gildor: interesting link, thanks for posting
<jsk>
I wonder if one could build a refactoring-aware version control system from this.
<jsk>
is that the idea/
<jsk>
It would be nice if version control systems could have knowledge of high-level refactorings (like "rename identifier", or "move module"), and then arrange that orthogonal refactorings do not cause merge conflicts.
<jsk>
gildor: thanks for your help
RyanRN has joined #ocaml
Tobu has joined #ocaml
mehdid_ is now known as mehdid
avsm has joined #ocaml
ovk has joined #ocaml
fraggle_ has joined #ocaml
seafood has quit [Quit: seafood]
yezariaely has joined #ocaml
seafood has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
yezariaely has quit [Quit: Leaving.]
avsm has quit [Ping timeout: 265 seconds]
avsm has joined #ocaml
fraggle_ has joined #ocaml
<iris1>
Dear experts, I ran into a puzzling problem. I am probably doing something wrong. The following definition of argmax fails with "Error: unbound value i". It is meant to return the index of a maximal element in the argument.
<iris1>
let argmax arr =
<iris1>
let i = ref 0
<iris1>
and m = ref arr.(0) in
<iris1>
Array.mapi (fun j x -> if (x > !m) then begin i := j; m := x end) arr
<iris1>
in
<iris1>
!i;;
<iris1>
What should I do differently? Thank you!
<mfp>
iris1: you're doing let ... in ... in !i ... there's one too many in ...
<thomasga>
Array.iteri .... ; !i
<iris1>
Ah yes! Thank you very much!
seafood has quit [Quit: seafood]
seafood has joined #ocaml
jonafan__ has joined #ocaml
jonafan_ has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
seafood has quit [Quit: seafood]
lamawithonel_ has quit [Ping timeout: 264 seconds]
rixed___ is now known as rixed
lamawithonel has joined #ocaml
RyanRN has quit [Read error: No route to host]
RyanRN has joined #ocaml
ccasin has joined #ocaml
ttamttam has left #ocaml []
rossberg has quit [Quit: Leaving]
Modius has joined #ocaml
hto has quit [Read error: Connection reset by peer]