kaustuv has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
arubin has quit [Quit: arubin]
ulfdoz has quit [Ping timeout: 260 seconds]
avsm has quit [Ping timeout: 246 seconds]
avsm has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
vivanov has quit [Ping timeout: 260 seconds]
jamii has joined #ocaml
vivanov has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<rrenaud>
is there a cannonical way of doing argmax with ocaml?
<flux>
doing argmax?
<rrenaud>
i have a list of stuff and a function
<rrenaud>
i want to find the element of stuff that maximimizes function(element)
<flux>
I would probably fold the list with the best value
<flux>
(or possibly optimize it a bit and hold f(best value) as well)
<flux>
but, off to office now ->
<rrenaud>
thanks
Yoric has quit [Quit: Yoric]
Cyanure has joined #ocaml
ftrvxmtrx has joined #ocaml
edwin has joined #ocaml
Yoric has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
eikke has joined #ocaml
Cyanure has joined #ocaml
joelr has joined #ocaml
<joelr>
good morning
<joelr>
gildor: how does oasis decide whether to compile with -g?
avsm has quit [Quit: Leaving.]
larhat has joined #ocaml
<gildor>
joelr: there is a debug = "true" variable in setup.data
<joelr>
Where is it set from, though?
<joelr>
Is there some flag in _oasis to turn debugging (-g) on or off?
<gildor>
joelr: you can do a ./configure --override debug false
<gildor>
(same for profiling)
ikaros has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric_ has joined #ocaml
ygrek has joined #ocaml
jamii has quit [Ping timeout: 240 seconds]
<joelr>
gildor: thanks! so debug is on by default
hyperbor1ean is now known as hyperboreean
_andre has joined #ocaml
<gildor>
joelr: yes, by default debug is on
<joelr>
and profiling
<joelr>
too?
<gildor>
joelr: no profiling is off by default (too much time consuming)
<joelr>
fair enough
lopex has joined #ocaml
<joelr>
is there an update to tuareg mode for first-class modules?
Snark has joined #ocaml
jamii has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
boscop_ has joined #ocaml
Jake_ has joined #ocaml
Jake__ has quit [Ping timeout: 252 seconds]
hnrgrgr has joined #ocaml
joelr has quit [Quit: joelr]
jderque has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
boscop_ has joined #ocaml
dnolen has joined #ocaml
boscop__ has joined #ocaml
boscop_ has quit [Ping timeout: 250 seconds]
<npouillard>
gildor: where is the ocaml meeting exactly, telecome paris(tech) has now 3 locations, I assume this is at 46 rue Barrault, do you confirm?
Associat0r has joined #ocaml
ymasory has quit [Quit: Leaving]
boscop__ has quit [Ping timeout: 246 seconds]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
<adrien>
a bit calmer now but seeing 4 people draw on it simultaneously was quite funny =)
flux has quit [Ping timeout: 260 seconds]
flux has joined #ocaml
ymasory has joined #ocaml
boscop has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop_ has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
joewilliams_away is now known as joewilliams
pdhborges has joined #ocaml
Cyanure has quit [Remote host closed the connection]
lopex has quit []
Yoric_ has quit [Quit: Yoric_]
avsm has quit [Quit: Leaving.]
jderque_ has joined #ocaml
philtor has joined #ocaml
jderque_ has left #ocaml []
jderque has joined #ocaml
munga has joined #ocaml
agarwal1975 has joined #ocaml
Yoric has joined #ocaml
SoftTimur has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
pdhborges has quit [Quit: WeeChat 0.3.4]
oriba has joined #ocaml
lopex has joined #ocaml
hnrgrgr has quit [Quit: leaving]
eikke has quit [Ping timeout: 260 seconds]
munga has quit [Quit: Ex-Chat]
ftrvxmtrx has quit [Quit: Leaving]
boscop has joined #ocaml
oriba has quit [Quit: Verlassend]
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
Yoric has quit [Quit: Yoric]
boscop has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 264 seconds]
lamawithonel has joined #ocaml
ulfdoz has joined #ocaml
larhat has quit [Quit: Leaving.]
sepp2k has quit [Quit: Leaving.]
<hcarty>
Is there a difference between Sys.rename and Unix.rename?
fraggle_ has joined #ocaml
alexyk has joined #ocaml
<alexyk>
I need to run several versions of a few functions. Currently they are in a module a.ml. I copy the module to say a_deux.ml with the new versions. Then, in another file, where I used A.f, I'd have to change to A_deux.f, or I can rename the original a to a_orig.ml and symlink one to a.ml. Is there another solution which will allow me to switch only at the linking phase?
robinnn has joined #ocaml
robinn has joined #ocaml
<mrvn>
module A = A_deauf
<alexyk>
ah!
<alexyk>
lovely
<alexyk>
mrvn: but, it still is a text change, not a linking phase choice...
<alexyk>
unless a file doing so can be compiled and linked in after a.ml?
<adrien>
hcarty: not really but they don't return the same error(s)
<mrvn>
alexyk: put the flavours into different subdirs and name them all a.ml
<alexyk>
mrvn: yes!
Yoric has joined #ocaml
alexyk has quit [Quit: alexyk]
Jake_ is now known as mekajfire
<hcarty>
adrien: Thank yoU!
jamii has quit [Ping timeout: 240 seconds]
boscop has joined #ocaml
Associat0r has quit [Quit: Associat0r]
rien has joined #ocaml
Snark has quit [Quit: Ex-Chat]
robinn has quit [Quit: Leaving]
<hcarty>
thelema: Should BatPervasives.input ever raise No_more_input?
<hcarty>
I'm trying to read stdin and stderr from a process, but I'm not having any luck. Does anyone have any examples?
<hcarty>
If I try to read stdin only, BatPervasives.input fails with No_more_input once anything is written to stdout.
sepp2k has joined #ocaml
<rien>
how do I import a module for using? I can't find that info anywhere
<flux>
rien, you tell the search path for .cmi-files to the compiler with the -I -flag and you link the appropriate modules along with your source code.
<rien>
oh, so there's no "import ParserCo" or "use ParserCo" to write on the source file?
<rien>
what do I do in the repl then?
<flux>
well, you can do 'open ParserCo', but that just brings the symbols in ParserCo into scope. you can refer to them with ParserCo.foo just as well.
<flux>
(or possibly you can do module P = ParserCo to give a shorter alias for the module)
<flux>
in repl you can use #directory and #load
<flux>
however, if you use findlib, which I highly encourage, you can first do #use "topfind";; and then #require "packagename";; works
<flux>
(you can stick that #use "topfind";; into your ~/.ocamlinit)
<rien>
hmm, can't find ParserCo, I thought it came with Batteries
<flux>
wel, batteries is a bit different ;). it comes with its own .ocamlinit as well. but you can do this: #require "batteries";; and then open Batteries_uni;;
<flux>
that brings a ton of modules into scope, including ParserCo (that is, you still refer to its symbols with ParserCo.foo)
<rien>
it says "unknown directive: require". Again, I'm in the repl
<flux>
did you do #use "topfind";; first?
<rien>
"cannot find file topfind". maybe we need to do something with #directory first?
<flux>
nope
<flux>
what kind of operating system do you have?
<rien>
mac
<flux>
it looks like you don't have findlib installed
ygrek has quit [Ping timeout: 246 seconds]
<flux>
but I think it's time for me to get into bed..
<rien>
I think I may not have installed Batteries then
<flux>
I don't think batteries comes with findlib
<flux>
it's something that you can install separately, and isn't strictly needed for any ocaml library
<flux>
but many ocaml libraries come with META files that are used by findlib
<rien>
I only found this reference: "OCaml Batteries Included uses Findlib extensively. "
<flux>
but it doesn't come with it
<flux>
infact, batteries doesn't come with any tools
<flux>
and findlib (or ocamlfind) is a tool
<flux>
in addition to being a library :)
<rien>
all that is a bit overwhelming for a beginner
<flux>
I wonder if batteries uses its library side, though. if it does use it and require it, that would mean that it must be installed.
<flux>
rien, does 'ocamlfind' in the command prompt find a program?
<flux>
rien, quite adventurous to dive into Batteries.ParserCo on your first try :)
<rien>
"which ocamlfind" returns nothing
<flux>
well, there you have it. either you don't have it installed or it's not on your path.
robinnn has quit [Quit: Leaving]
<flux>
at least on linux systems installing ocamlfind from sources is simple
<flux>
I would expect the same from mac
<rien>
flux: I'm comfortable with Haskell, it was easy to get it installed and running, and I'm somewhat comfortable with Parsec
<rien>
ok, looks likeI'll need to do that
<thelema>
hcarty: yes, it raises [No_more_input] if 0 characters can be read.
<thelema>
rien: I wonder how you got batteries installed without findlib
<rien>
I didn't apparently. I got some .dmg to install ocaml for me.
<rien>
I cleaned it up and now I'm trying to figure out how to install from source. (./configure, ./make do nothing)
<thelema>
ocaml has a configure script
<thelema>
./make generally does nothing, though
<rien>
right, I meant make :)
<rien>
I can only see "mkconf.ml" for a configure script
<rien>
should I use GODI instead?
<thelema>
what are you trying to install?
<thelema>
You're welcome to use GODI - I can't help you with it as I don't know it
<rien>
ocaml + batteries so that I can play with ParserCo
<thelema>
okay, do you have ocaml installed?
<rien>
I just uninstalled it to "do it from scratch with batteries" but just realized I need ocaml first in order to install batteries (+ findlib + camomile + ounit)
<thelema>
yes, you need ocaml, findlib and camomile (plus ounit to run tests)
* rien
is installing ocaml again
<rien>
ok, I'm finally compiling batteries! :)
_andre has quit [Quit: leaving]
<thelema>
if you're not compiling from git, make sure to set BATTERIES_NATIVE_SHLIB = no
<thelema>
otherwise it'll try and fail to compile shared libraries, which doesn'
<thelema>
using modulus as part of the comparison function for maps, and trying to union maps with different moduli
jonafan has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
<rien>
ok I've done #use "topfind";; and #require "batteries";; how do I make that "module P = "ParserCo"" command work?
<thelema>
rien: instead of doing topfind stuff yourself, there's an ocamlinit script in the batteries source, copy that to ~/.ocamlinit
<thelema>
and then the toplevel will auto-load batteries for you
<thelema>
(and do "open Batteries" for you, which is the missing link in what you're trying to do)
<rien>
yep, I was missing open Batteries_uni (what flux told me to do)
<thelema>
ParserCo is internally BatParserCo, but also available as Batteries.ParserCo.
<rien>
now the module P = thing works, hurray!
<thelema>
yay.
<rien>
thanks for helping
<thelema>
n/p
jderque has quit [Quit: leaving]
<rien>
it'd be nice if ParserCo had any exampls of use or tutorials :/
<thelema>
rien: you'll probably want to look into the CharParser module
alexyk has joined #ocaml
<rien>
are you the author?
<thelema>
of parserco? no
<rien>
charparser then?
<thelema>
I've only used parser combinators once before, and that was a big project
<thelema>
nor charparser
<rien>
this is incredibly frustrating to try to get working without any examples
<rien>
oh, I got something working with CharParser: "CP.parse (CP.char 'h') "hey";;" :)
alexyk has quit [Read error: Connection reset by peer]
mundkur has joined #ocaml
ftrvxmtrx has joined #ocaml
<thelema>
hmm, it'd be interesting to build a regex:string -> (char, unit, position) ParserCo.t function...
edwin has quit [Remote host closed the connection]
eikke has joined #ocaml
<rien>
I'm getting the hang of ParserCo and CharParser, by following the types in my head
pdhborges has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
<thelema>
I've only used parser combinators once before, and that was a big projectic to characters and strings goes, parserco is completely generic functions
<thelema>
...
alexyk has joined #ocaml
<thelema>
charparser is where everything related to characters and strings goes, parserco is completely generic functions
<thelema>
there's also a ucharparser which works on unicode strings
Yoric has quit [Quit: Yoric]
<alexyk>
how do you compile .mli files again? I have a.ml and dir/a.ml, two versions of a.mli. I want to link in either a.cmx or dir/a.cmx, both conforming to ./a.mli. How do I compile them both against the ./a.mli?
<thelema>
alexyk: ocamlc foo.mli
<thelema>
ocaml doesn't compile a module against the mli exactly, but assumes that the foo.cmi in that dir is the right one
<thelema>
ln -s foo.cmi dir/foo.cmi
<alexyk>
ok
eikke has quit [Ping timeout: 246 seconds]
<rien>
thelema: I went straight to ParserCo because that was equated to Haskell's Parsec in some forum
<rien>
maybe stackoverflow
alexyk has quit [Quit: alexyk]
ymasory has quit [Quit: Leaving]
eikke has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
<thelema>
rien: no problem. It's just a larger system than just parserco. I guess CharParser and UCharparser could be submodules, but...
alexyk has joined #ocaml
rien has quit [Ping timeout: 240 seconds]
eikke has quit [Read error: Operation timed out]
<thelema>
but doing that would require the whole unicode subsystem even if you didn't need it
rien has joined #ocaml
<alexyk>
thelema: I do ln, but get that somefile.cmx and dir/a.cmx make inconsistent assumptions about the interface A.cmx... I link like dir/a.cmx somefile.cmx x.ml, and the error is given for x.ml.
<alexyk>
no matter what sequence I follow for creating a.cmi and the rest, they end up inconsistent
<thelema>
hmm
<alexyk>
thelema: it compiles the dir/a.ml as: ocamlfind ocamlopt -package <list> dir/a.ml -o dir/a.cmx
<alexyk>
at that time. dir/a.cmi already exists as a symlink -> ../a.cmi and is current
<alexyk>
./a.cmx is linked fine
<alexyk>
thelema: it does things like open Common, which works if I compile from the top level directory, but going inside dir/, it won't compile since common.cmx is above. I wonder if if confuses the linker
ymasory has joined #ocaml
pdhborges has quit [Quit: WeeChat 0.3.4]
<alexyk>
aha -- compiling dir/a.ml recreates .cmi in dir/, which is placed back onto .. via symlink!
<alexyk>
can I force ocamlopt to use the existing .cmi?
<thelema>
try symlinking just the .mli file
rien has quit [Quit: leaving]
<alexyk>
thelema: still inconsistent
<alexyk>
thelema: and the .cmi files are the same!
hcarty has quit [Ping timeout: 252 seconds]
<alexyk>
thelema: any idea why x.cmx compiled against ./a.cmi would disagree with dir/a.cmx compiled against the same dir/a.cmi?
<alexyk>
thelema: doing ln -s dir/a.cmx . and then linking works
<alexyk>
so apparently linking dir/a.cmx confuses the linker about ,cmi
lamawithonel has quit [Ping timeout: 248 seconds]
lamawithonel_ has joined #ocaml
Amorphous has quit [Ping timeout: 246 seconds]
Amorphous has joined #ocaml
alexyk has quit [Ping timeout: 246 seconds]
alexyk has joined #ocaml
Jake__ has joined #ocaml
mekajfire has quit [Read error: Operation timed out]