adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
brendan has quit [Ping timeout: 260 seconds]
tac has joined #ocaml
ahokaomaeha has joined #ocaml
brendan has joined #ocaml
gnuvince has joined #ocaml
emmanuelux has quit [Ping timeout: 264 seconds]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
ulfdoz_ is now known as ulfdoz
adotbrown has quit [Ping timeout: 248 seconds]
darkf has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
cdidd has quit [Ping timeout: 264 seconds]
tac has joined #ocaml
myx has quit [Ping timeout: 252 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
lilred has joined #ocaml
<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]
travisbrady has quit [Quit: travisbrady]
ahokaomaeha is now known as nishidabianya
nishidabianya is now known as lolcathost
tac has quit [Ping timeout: 245 seconds]
osa1 has quit [Ping timeout: 276 seconds]
tautologico has quit [Quit: tautologico]
sgnb` has quit [Ping timeout: 255 seconds]
tac has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
tac has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
tac has joined #ocaml
Yoric has joined #ocaml
<flux> can mirage beat this?-) http://zerg.erlangonxen.org/
Kakadu has joined #ocaml
milosn has quit [Ping timeout: 246 seconds]
milosn has joined #ocaml
gnuvince has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
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
dezzy has quit [Changing host]
dezzy has joined #ocaml
ulfdoz has quit [Quit: brb]
ontologiae has joined #ocaml
gnuvince has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
darkf has quit [Quit: Leaving]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
ottbot has joined #ocaml
mye has joined #ocaml
Yoric has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
tane has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 276 seconds]
Anarchos has joined #ocaml
shp has joined #ocaml
<shp> hi
<shp> isn't do_list no more implemented in ocaml?
<shp> i'd like to know if there's an equivalent to this function i often use in caml light
reynir has quit [Ping timeout: 255 seconds]
<Anarchos> shp List.map ?
reynir has joined #ocaml
<shp> List.iter actually but thx anyway
travisbrady has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
mehdid has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
leoncamel has quit [Ping timeout: 248 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
ulfdoz has joined #ocaml
Yoric has joined #ocaml
ttamttam has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
emmanuelux has joined #ocaml
ottbot has quit [Ping timeout: 252 seconds]
cyball1 has joined #ocaml
cdidd has quit [Remote host closed the connection]
osa1 has quit [Ping timeout: 264 seconds]
cdidd has joined #ocaml
travisbrady has quit [Quit: travisbrady]
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ollehar has quit [Ping timeout: 256 seconds]
shp has quit [Quit: kit]
iZsh has quit [Quit: Coyote finally caught me]
iZsh has joined #ocaml
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
tane has quit [Quit: Verlassend]
Cyanure has quit [Remote host closed the connection]
ottbot has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz has joined #ocaml
oriba has joined #ocaml
Kakadu has quit []
travisbrady has joined #ocaml
ollehar has joined #ocaml
tac has joined #ocaml
<oriba> I just found Printf.ifprintf, and can see no case when this function would make sense... for what cases will this be useful?
<Qrntz> oriba, «let printf = Printf.(if !debug then printf else iprintf)»
<Qrntz> where !debug is, for example, a boolean indicating the presence or absence of a command-line argument
ocp has joined #ocaml
<oriba> I can just use printf under a condition, or otherwise not use printf. BTW your syntax looks strange.
<Qrntz> err, s/printf/fprintf/; s/iprintf/ifprintf/ but you get the idea
<Qrntz> how so?
<oriba> I can just do something like if !debug then printf .......
<oriba> no need for ifprintf
<Qrntz> in every place where you need to check for a debug flag?
<oriba> # let printf = Printf.(if !debug then printf else iprintf);;
<oriba> Error: Syntax error
<Qrntz> # let printf = Printf.(if true then fprintf else ifprintf) ;;
<Qrntz> val printf : out_channel -> ('a, out_channel, unit) format -> 'a = <fun>
<oriba> Ah, you mean a function will be created, which then either is printf or ifprintf?
<Qrntz> exactly
<Qrntz> also, local open syntax is post-3.12
<oriba> hmhhh... ah ok
<Qrntz> it won't work if you have an older OCaml
<oriba> ah... what version are you using?
<Qrntz> 4.00.1
<oriba> didn't knew that there were syntax changes
<oriba> aha ok
<Qrntz> but this works since 3.12
<oriba> "Objective Caml version 3.11.2" :-)
<Qrntz> well, yes, no local open for you then
<oriba> I should read the new reference manual, when switching > to 4.0
<oriba> local open?
<oriba> You did not used "opeN" keyword
<oriba> "open"
<Qrntz> I could have
<oriba> Looks like I have missed some changes .....
<oriba> Aha
<oriba> heard about that, could not use it so far
<oriba> How long will it take, until the 4.0 OCaml will be available on most Linux distributions?
<oriba> Arch has it already#
deject3d has left #ocaml []
<oriba> But Debian and Ubuntu and so on maybe will need a while
<Qrntz> so does Gentoo
<Qrntz> you could use OPAM though
<oriba> I use Arch on my laptop and a very old Ubuntu on my old PC...
<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
yezariaely has joined #ocaml
yezariaely has quit [Max SendQ exceeded]
<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
<wks> thelema: thanks.
ollehar has quit [Ping timeout: 248 seconds]
ottbot has quit [Ping timeout: 252 seconds]
wks has quit [Quit: Konversation terminated!]
tane has quit [Quit: Verlassend]
m_m has quit [Remote host closed the connection]