<lilred>
hey people, I'm programming in F# and I need a purely functional associative array over small inputs. However, F# doesn't have anything built-in. Thoughts on something that's reasonably easy to implement?
<lilred>
I have Okasaki's book next to me but I'd like to hear what you guys think
LukeSun has joined #ocaml
q66 has quit [Remote host closed the connection]
LukeSun has quit [Ping timeout: 252 seconds]
dezzy has quit [Ping timeout: 276 seconds]
<gnuvince>
lilred: depending on how small, a list of tuples might work fine.
<gnuvince>
lilred: I don't know F#, but I imagine you could set up an interface of some sort (in OCaml you'd use a module signature) and if the implementation becomes too slow, you can simply replace it with another implementation using balanced trees implementing the same interface.
yacks has joined #ocaml
<dsheets>
struct let lookup dict key = try Some (List.assoc key dict) with Not_found -> None end
osa1 has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
lilred has quit [Quit: Quitte]
tac has joined #ocaml
gnuvince has quit [Remote host closed the connection]
gnuvince has quit [Remote host closed the connection]
yacks has quit [Read error: Operation timed out]
osa1 has joined #ocaml
Yoric has joined #ocaml
tac has quit [Quit: Page closed]
lolcathost has quit [Ping timeout: 240 seconds]
WomensRights has joined #ocaml
WomensRights is now known as djct
djct is now known as deject3d
ncategory has joined #ocaml
mye has quit [Quit: mye]
ollehar has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
ttamttam has joined #ocaml
rwmjones|afk is now known as rwmjones
Snark has joined #ocaml
cdidd has joined #ocaml
<osa1>
is there a way to list #trace'd function in toplevel ?
Kakadu has quit []
Cyanure has joined #ocaml
<osa1>
is there a way to #trace functions local to some other function ?
ontologiae has joined #ocaml
chambart has joined #ocaml
yacks has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
Yoric has quit [Ping timeout: 264 seconds]
leoncamel has joined #ocaml
q66 has joined #ocaml
mehdid has quit [Read error: Connection reset by peer]
fraggle_ has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
fraggle_ has joined #ocaml
Anarchos has quit [Ping timeout: 252 seconds]
ttamttam has quit [Remote host closed the connection]
Yoric has joined #ocaml
answer_42 has joined #ocaml
Anarchos has joined #ocaml
iamtakingiteasy has joined #ocaml
<iamtakingiteasy>
hello, which ocaml IDE would you recommend for use on linux?
<iamtakingiteasy>
i have tried plugind for IDEA, but it crashes upon atempt to create a project :/
<iamtakingiteasy>
or probably, if there is non IDEs for ocaml, which vim/emacs plugin would you recommend?
<iamtakingiteasy>
is no*
<iamtakingiteasy>
plugins*
<Anarchos>
you can use OcaIDE , a plugin for Eclipse
<iamtakingiteasy>
i am not big fan of eclipse platform, but thanks, it could be an option
<adrien>
for emacs there's the bundled caml mode or tuareg
<adrien>
pick one
<adrien>
they have quite a lot of features
<iamtakingiteasy>
thank you
yacks has quit [Ping timeout: 248 seconds]
Kakadu has joined #ocaml
ski has quit [Ping timeout: 244 seconds]
ski has joined #ocaml
<adrien>
wmeeeeyyyyyeeeeeer ='(
ncategory has quit [Ping timeout: 245 seconds]
milosn has quit [Read error: Operation timed out]
milosn has joined #ocaml
leoncamel has quit [Ping timeout: 248 seconds]
<Anarchos>
iamtakingiteasy for vim there is a syntax file built within
<iamtakingiteasy>
syntax file is not a nearly what i want
<Anarchos>
iamtakingiteasy just type :syn on to activate the coloring, if your terminal supports it
<iamtakingiteasy>
could it complete over symbols in libraries?
<iamtakingiteasy>
could it do any static analyzis?
<iamtakingiteasy>
could it support refactorings over whole project?
<Anarchos>
iamtakingiteasy for completion of symbols, just use usual ctags on vim
<Anarchos>
for the rest, no
ontologiae has quit [Ping timeout: 245 seconds]
<iamtakingiteasy>
you mean, vim could at run-time index all imports i did with ctags?
<iamtakingiteasy>
btw, it could for haskell
<iamtakingiteasy>
but it uses ghc interface
<Anarchos>
iamtakingiteasy i don't know i am not skilled enojugh with vim
<iamtakingiteasy>
neco-ghc and necocomplcache
<iamtakingiteasy>
i guess, ocaml should have the same interface for providing relevant symbols
ottbot has joined #ocaml
leoncamel has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
ottbot has quit [Ping timeout: 255 seconds]
dezzy has joined #ocaml
Simgate has joined #ocaml
<flux>
I'm trying to benchmark Sequence against BatSeq, but it turns out BatSeq doesn't have of_list/to_list..
<flux>
via enum then? that'd not be fair for Batteries :)
<reynir>
iamtakingiteasy: Take a look at omlet. It has some nice features.
<reynir>
For example, you can query the type of an expression. And the indentation is not as broken as the default ocaml indent plugin (although omlet's is ridicuosly slow :/)
<reynir>
I wish there was a better plugin, though
<reynir>
[1] was recently announced on the mailing list. It's a stand alone program for indenting ocaml. It could probably be used with vim. [1]: https://github.com/OCamlPro/ocp-indent
<Qrntz>
it'll help you set up the latest version without having a package for your distro or installing it manually
<oriba>
will opam make findlib unnecessary?
<Qrntz>
they're meant for different things
<Qrntz>
OPAM is a package manager
<oriba>
installing OCaml is not so complicated
<Qrntz>
findlib is more of alibrary manager
<Qrntz>
you can install findlib through OPAM
<oriba>
Linux distribution maintainers would say, it's not good to have such a manager, because the package manager of the Distribution should be used...
ttamttam has quit [Remote host closed the connection]
<oriba>
how many pakcages are available via OPAM?
<Qrntz>
it worked out well with Ruby and RVM, I don't see why it shouldn't with OCaml and OPAM
<oriba>
Yes.
<oriba>
R also has own install-routines
<oriba>
But I had a discussion with one of the Debian people....
<oriba>
When i said, I can update R via it's command line, he said, oh thats bad, only apt-get should do this...
<oriba>
s/update R via it's command line/update R via it's "shell"/
<Qrntz>
according to «opam list», 318 packages
<oriba>
wow
<oriba>
How can packages be available via OPAM?
<oriba>
Is there something like CPAn for OCaml now?
<oriba>
And how integrates it with installers from the Distribution?
<Qrntz>
not exactly CPAN, I suppose OPAM is to fill that role though
travisbrady has quit [Quit: travisbrady]
ontologiae has quit [Ping timeout: 248 seconds]
<Qrntz>
it doesn't AFAIK
<Qrntz>
well, it can use the system installation of OCaml and already installed packages of course
ontologiae has joined #ocaml
Snark has quit [Quit: Quitte]
osa1 has joined #ocaml
tane has joined #ocaml
ahokaomaeha has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
<oriba>
Is there a http-proxy, written in OCaml somewhere?
<adrien>
working again on cross-compilation support, I'm getting the following for "make opt": /tmp/camlasmc7d5b7.s:97: Warning: value 0x7fffffffffffffff truncated to 0xffffffff
<adrien>
I'm almost certain it's because I'm building on x86_64 for i386
<adrien>
does anyone know where ocaml would decide to use such a value?
<adrien>
(I don't have the corresponding file unfortunately)
<adrien>
"ocamlopt -S" keeps the .s file but it doesn't help a lot
m_m has joined #ocaml
gnuvince has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
<ousado>
adrien: max_int perhaps?
oriba has quit [Quit: oriba]
ollehar has quit [Ping timeout: 276 seconds]
osa1 has quit [Quit: Konversation terminated!]
<adrien>
well, it seems to try to use 64bit constants for several things
<adrien>
it really looks like it's targetting the wrong arch
<adrien>
cross-compilation with ocaml is a nightmare
<adrien>
to build:
<adrien>
- ocamlc, you need the native C compiler and the native ocamlrun
<adrien>
- ocamlopt, same
<adrien>
but for both you have to tell them to use the C cross-compiler
<adrien>
- ocamlrun, you need the cross-compiler
<adrien>
(so you need to have two ocamlrun binaries; one likely being the system one)
<adrien>
- ocamlc.opt, ocamlopt.opt, you must use a native ocaml compiler and not the ocamlc/ocamlopt binaries you've just built
ttamttam has joined #ocaml
<adrien>
and you have to manage CFLAGS too
answer_42 has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 252 seconds]
ttamttam has quit [Remote host closed the connection]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ocaml
notk0 has joined #ocaml
<notk0>
hello, is the list type definition part of the module List ?
<adrien>
I don't think so
<adrien>
I mean
<adrien>
I've never seen it there, and nothing makes me think it would be there
<notk0>
I was told by people that list is a monad and functor is it true?
<notk0>
I told them the module List is independent of the list type
<adrien>
if you open stdlib/list.ml in the ocaml sources, it starts with "List operations" and there's no definition
yezariaely has quit [Excess Flood]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
<thelema>
adrien: list is defined before pervasives
<thelema>
just like 'a option and all builtin types
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
sgnb has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
ollehar has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
ontologiae has quit [Ping timeout: 244 seconds]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
<adrien>
would someone have build logs for ocaml's "opt.opt" target?
yezariaely has joined #ocaml
<adrien>
I'm wondering if some of warnings I get aren't "expected"
yezariaely has quit [Max SendQ exceeded]
notk0 has left #ocaml []
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
yezariaely has joined #ocaml
ocp has quit [Ping timeout: 264 seconds]
<adrien>
so, no
<adrien>
and I really have no idea where the compiler decides to emit integers that big
<thelema>
adrien: ocaml 4?
<thelema>
:( >150KB, can't paste
<adrien>
it's fine I've checked myself
<adrien>
thanks anyway
<thelema>
n/p
<adrien>
I miss the equivalent of "gcc -v"
leoncamel has joined #ocaml
Simgate has quit [Ping timeout: 255 seconds]
wks has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
leoncamel has quit [Ping timeout: 244 seconds]
ulfdoz has quit [Ping timeout: 248 seconds]
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ocaml
<wks>
A beginner question. In Haskell, I can define a function with multiple patterns like http://hpaste.org/82506. What's its the counterpart in OCaml?
<thelema>
let rec f = function [] -> None | [x] -> Some x | _::xs -> f xs
<thelema>
you're certainly welcome to put each match case on a new line