flux 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/
darinmorrison has quit []
NaCl has joined #ocaml
NaCl has quit [Changing host]
NaCl has joined #ocaml
Zerker has joined #ocaml
Zerker has quit [Remote host closed the connection]
Zerker has joined #ocaml
tac has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
cdidd has joined #ocaml
oriba has quit [Quit: oriba]
Zerker has quit [Quit: Colloquy for iPad - Timeout (10 minutes)]
tlockney has quit [Ping timeout: 260 seconds]
cdidd has quit [Remote host closed the connection]
lopex has quit [Ping timeout: 248 seconds]
bobry has quit [Ping timeout: 264 seconds]
emmanuelux has quit [Quit: emmanuelux]
paddymahoney has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
leoncamel has quit [Ping timeout: 252 seconds]
bobry has joined #ocaml
lopex has joined #ocaml
contempt has quit [Ping timeout: 255 seconds]
contempt has joined #ocaml
smondet has quit [Ping timeout: 246 seconds]
vivanov has quit [Quit: Lost terminal]
Icarot has joined #ocaml
osa1 has joined #ocaml
jao has joined #ocaml
vivanov has joined #ocaml
<vivanov> opam doesnt see my locally installed packages -- how to fix ?
vivanov has quit [Quit: Lost terminal]
yacks has joined #ocaml
adotbrown has quit [Ping timeout: 276 seconds]
Yoric has joined #ocaml
Icarot has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 246 seconds]
Cyanure has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
<bobry> Is there a way to parse int safely using Core? I need string -> int option
caligula__ has joined #ocaml
Icarot has joined #ocaml
caligula_ has quit [Ping timeout: 260 seconds]
leoncamel has joined #ocaml
adotbrown has joined #ocaml
osa1 has quit [Ping timeout: 260 seconds]
Icarot has quit [Ping timeout: 252 seconds]
anderse has joined #ocaml
Yoric has joined #ocaml
anderse has quit [Quit: anderse]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Cyanure has quit [Remote host closed the connection]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Icarot has joined #ocaml
<orbitz> bobry: Int.of_string
<orbitz> bobry: for some reason that can throw an eception though
<orbitz> bobry: but you can use Option.try_with to get an option out of it
<orbitz> let of_string_safe s = Option.try_with (fun () -> Int.of_string s)
Icarot has quit [Ping timeout: 252 seconds]
hkBst has joined #ocaml
osa1 has joined #ocaml
osa1 has quit [Remote host closed the connection]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
mika1 has joined #ocaml
cago has joined #ocaml
djcoin has joined #ocaml
thomasga has joined #ocaml
adrien_o1w is now known as adrien_oww
<companion_cube> wow, profiling GC allocations would be great
cyball has joined #ocaml
<adrien_oww> memprof patch
vivanov has joined #ocaml
<vivanov> installed typerex using opam -- dont know how to set it to appear in emacs -- ocp-edit-mode install -emacs, command not found
mcclurmc has quit [Ping timeout: 260 seconds]
ottbot has joined #ocaml
chattered has joined #ocaml
<nicoo> vivanov: In the typerex source, there is a emacs.append file which should be appended to your .emacs file.
Simn has joined #ocaml
darinmorrison has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
<vivanov> ok ill look for i t
yacks has joined #ocaml
<vivanov> added emacs append
<vivanov> doesnt load still
<vivanov> i guess i should install a version not from opam
<vivanov> and hack hack hack
anderse has joined #ocaml
<nicoo> vivanov: I installed it “by hand” and had absolutely no problem
<nicoo> Perhaps a path to the opam binaries is wrong in the emacs.append ?
<vivanov> ill see now
<vivanov> best choice is install by hand i guess
<vivanov> on github they just say run ocp-edit-mode install -emacs
<vivanov> which doesnt work
<vivanov> so either by hand or try fix ocp_edit_mode not founbd
<vivanov> thx
<nicoo> vivanov: It sound like your typerex binaries are not in $PATH
tane has joined #ocaml
yacks has quit [Ping timeout: 244 seconds]
darinmorrison has quit []
jbrown has joined #ocaml
tane has quit [Quit: Verlassend]
astertronistic has quit [Quit: Leaving]
Icarot has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Client Quit]
ontologiae has joined #ocaml
yacks has joined #ocaml
Icarot has quit [Ping timeout: 252 seconds]
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
Fullma has quit [Ping timeout: 260 seconds]
mcclurmc has joined #ocaml
_andre has joined #ocaml
yacks has quit [Ping timeout: 245 seconds]
darinmorrison has joined #ocaml
mye has joined #ocaml
mye has quit [Client Quit]
mye has joined #ocaml
Fullma has joined #ocaml
chambart has quit [Ping timeout: 276 seconds]
metasyntax has quit [Ping timeout: 264 seconds]
adotbrown has quit [Ping timeout: 276 seconds]
vivanov has quit [Quit: leaving]
darinmorrison has quit []
ollehar has joined #ocaml
yacks has joined #ocaml
cdidd has joined #ocaml
zbroyar has joined #ocaml
anderse has quit [Ping timeout: 245 seconds]
anderse has joined #ocaml
Kakadu has joined #ocaml
leoncamel has quit [Ping timeout: 276 seconds]
thomasga1 has quit [Read error: Operation timed out]
zbroyar has left #ocaml []
ollehar has quit [Quit: ollehar]
chambart has joined #ocaml
Albertos has joined #ocaml
cyball has quit [Ping timeout: 244 seconds]
iratsu has quit [Remote host closed the connection]
mye has quit [Quit: mye]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
r126l has joined #ocaml
troydm has quit [Read error: Operation timed out]
mye has joined #ocaml
beckerb has joined #ocaml
hkBst has quit [Ping timeout: 256 seconds]
cyball has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
leoncamel has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
chambart has quit [Ping timeout: 252 seconds]
Albertos has quit []
chambart has joined #ocaml
metasyntax has joined #ocaml
mika1 has quit [Quit: Leaving.]
owainlewis has joined #ocaml
chambart has quit [Ping timeout: 276 seconds]
darkf has quit [Quit: Leaving]
q66 has joined #ocaml
bobry has quit [Ping timeout: 252 seconds]
mika1 has joined #ocaml
leoncamel has quit [Ping timeout: 252 seconds]
myx has joined #ocaml
tac has joined #ocaml
UncleVasya has joined #ocaml
travisbrady has joined #ocaml
chambart has joined #ocaml
gnuvince has quit [Ping timeout: 248 seconds]
<nlucaroni> In the OCamlbuild _tags file, annot works (<*.ml> : annot), but not bin-annot (<*.ml> : bin_annot). I also added the same rule from ocaml_specific.ml (in ocaml source ocamlbuild directory) and it works. Any ideas?
<thelema> nlucaroni: annot is built into ocamlbuild; bin_annot is not; are you saying you added support for it to your myocamlbuild.ml file and it's not working?
troydm has joined #ocaml
hkBst has quit [Ping timeout: 252 seconds]
hkBst has joined #ocaml
Kakadu has quit []
cdidd has quit [Remote host closed the connection]
ttamttam has joined #ocaml
<nlucaroni> bin_annot is built into ocamlbuild. It's in the ocaml_specific.ml file. Unless those are not included.
<thelema> nlucaroni: odd; when I grep for annot in ocamlbuild -documentation, I only see the rule for plain annot
ttamttam has left #ocaml []
<nlucaroni> i don't either.
<thelema> at least in my 4.00.0 build
<thelema> maybe you're looking at the latest source, which is not yet in a release?
<nlucaroni> yup, i'm using 4.00.1, but annot isn't in documentation for 3.12.1 either.
cyball has quit [Ping timeout: 252 seconds]
hkBst has quit [Ping timeout: 246 seconds]
<nlucaroni> you know what. it must have been added after 4.00.1, i do see it in the trunk -documenation output.
hkBst has joined #ocaml
<thelema> yup
tane has joined #ocaml
cross has joined #ocaml
<nlucaroni> thanks. just silly confusion.
thomasga has joined #ocaml
cago has left #ocaml []
chambart has quit [Ping timeout: 276 seconds]
mika1 has quit [Quit: Leaving.]
chambart has joined #ocaml
hkBst has quit [Ping timeout: 264 seconds]
oriba has joined #ocaml
Kakadu has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
bobry has joined #ocaml
tac has joined #ocaml
<orbitz> times like this I would love library-level api's
<orbitz> err, interfaces
<thelema> orbitz: module types?
<orbitz> well I have a module I want to expose various analysis but they are too big to implement in the single module, so I'd love to hide those modules from the final library interface
<thelema> ah. private.
<thelema> submodules?
<thelema> ah, you want separate compilation too.
<thelema> documentation hide.
oriba has quit [Quit: oriba]
<orbitz> thelema: :)
<orbitz> thelema: didn't work for Num.Ratio!
<thelema> much of that should have been public in the first place, I think
myx has quit [Quit: ушёл]
thomasga has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 245 seconds]
chambart has quit [Ping timeout: 240 seconds]
Cyanure has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
chattered has quit [Ping timeout: 260 seconds]
owainlewis has quit [Remote host closed the connection]
mcclurmc has quit [Ping timeout: 252 seconds]
mye has quit [Quit: mye]
ollehar1 has joined #ocaml
<ollehar1> hello
<ollehar1> i'm having some problems with cirular dependencies
<thelema> ollehar1: between compilation units?
<thelema> or within one compilation unit?
<ollehar1> between two modules
<thelema> in separate files?
<ollehar1> File "user.ml", line 239, characters 41-45:
<ollehar1> Error: This expression has type user but an expression was expected of type
<ollehar1> User.user
<ollehar1> ye, two files
<ollehar1> this is line 239: LoginCookie.create args.cgi args.db user;
<thelema> since there's no forward declarations in OCaml and recursive modules must be in one file, you'll have to refactor your code; probably pulling the coupled parts into a new module
<ollehar1> thelema: ok, I'll try that, thanks
ollehar1 has quit [Ping timeout: 252 seconds]
rwmjones is now known as rwmjones_afk
SanderM has joined #ocaml
cyball has joined #ocaml
rwmjones_afk is now known as rwmjones
beckerb has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
ollehar1 has joined #ocaml
UncleVasya has quit [Quit: UncleVasya]
darinmorrison has joined #ocaml
<ollehar1> isn's this somewhat weird: two files defining two modules, user and operation. user defines type login, operation defines type op_args with { login : User.login ... }. module user then have a function that uses type op_args, but can't because type user is not type User.user??
<ollehar1> What's the difference between type user and type User.user?
<thelema> ollehar1: easiest solution, make op_args polymorphic in type of login
<thelema> type 'a op_args = {login: 'a; ...}
<thelema> you're still stuck in your mutually recursive modules problem
<thelema> and you have to either disconnect the recursion or move the tightly-coupled parts to a single module
chambart has quit [Ping timeout: 246 seconds]
anderse has quit [Quit: anderse]
tac has joined #ocaml
<ollehar1> These problems occurred when I started to move code from the main file into already existing modules. Perhaps I should create new modules instead, like userController.
<ollehar1> 'a led to a type def which could be generalized
<ollehar1> *not
darinmorrison has quit []
<ollehar1> yep, that did the thing
chambart has joined #ocaml
ulfdoz has joined #ocaml
rwmjones is now known as rwmjones_afk
ottbot has quit [Ping timeout: 252 seconds]
yacks has quit [Quit: Leaving]
smondet has joined #ocaml
_andre has quit [Quit: leaving]
anderse has joined #ocaml
cyball has quit [Ping timeout: 264 seconds]
rwmjones_afk is now known as rwmjones
adotbrown has joined #ocaml
cyball has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
mackwic has joined #ocaml
adotbrown has quit [Ping timeout: 276 seconds]
paddymahoney has quit [Remote host closed the connection]
chambart has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.2]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
anderse has quit [Quit: anderse]
ulfdoz has quit [Read error: Operation timed out]
ottbot has joined #ocaml
emmanuelux has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
mcclurmc has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
SanderM has quit [Remote host closed the connection]
rwmjones has quit [Ping timeout: 256 seconds]
rwmjones has joined #ocaml
iratsu has joined #ocaml
Cyanure has quit [Remote host closed the connection]
adotbrown has joined #ocaml
mattrepl has joined #ocaml
Icarot has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
ottbot has quit [Ping timeout: 245 seconds]
<ollehar1> anyone used make with ocaml?
<nicoo> ollehar1: Of course
Icarot has quit [Remote host closed the connection]
<ollehar1> nicoo: could you please explain why I get "no rule to make %.cmx" when I actually have a %.cmx target?
<ollehar1> nicoo: if you know, I mean :)
<nicoo> ollehar1: Perhaps because you are missing the dependencies of that particular rule :)
<ollehar1> i tried
<ollehar1> %.cmx: %.ml
<ollehar1> ocamlopt -c -I +netcgi netcgi.cmxa $^
hel0ck has joined #ocaml
<hel0ck> Hi all
<nicoo> ollehar1: Because of you try to actually make %.cmx, it will look for a file named %.ml
<nicoo> Here, % is some kind of wildcard
<nicoo> So, if you have file a.ml, the target is a.cmx
<hel0ck> Someone could help me please, i have a problem with my code and i dont know how to resolve it :s
<thizanne> hel0ck: paste it somewhere and give the url, someone who can will help
<hel0ck> ok 2 seconds :)
<hel0ck> i understand for what reason i is unbound but i don't know how to resolve :s
<thizanne> there are several problems
<thizanne> but what do you want to do with this code exactly ?
<hel0ck> my function must returns a element at n-th in the given list
<hel0ck> the*
<thizanne> where do you learn ocaml ?
<ollehar1> nicoo: yes, and since I have ceveral ml-files, shouldn't make try to build them?
<ollehar1> *several
<hel0ck> in my school
<thizanne> hel0ck: I suggest you forget what you wrote and try to design again your function
<thizanne> you don't need an auxiliary function
<nicoo> ollehar1: do something like « all: $(patsubst %.ml,%.cmx,$(wildcard *.ml)) »
<ollehar1> hel0ck: perhaps google on how to iterate a list? with pattern matching like [] -> ... a::[] -> etc
<hel0ck> thx for answers
<ollehar1> nicoo: thanks
<nicoo> ollehar1: You are welcome
<hel0ck> thizanne: without auxiliary function o_O
<hel0ck> I don't see really really how do that ... but im going to try..
smondet has quit [Ping timeout: 240 seconds]
<thizanne> in fact, the way without an auxiliary function should be the obvious way
<thizanne> hel0ck: you want to get the n-th element of a list, right ?
<hel0ck> exactly
<hel0ck> but i need to increment no ?
<hel0ck> an*
<thizanne> yes
<thizanne> well
<thizanne> not really
<thizanne> but sort of
<thizanne> but you don't need an auxiliary function
<hel0ck> ok...
<thizanne> you can increment/decrement a value by passing it (recursively) as a parameter to your function
<mackwic> hel0ck, think of the math factorial function, that's pretty much the same ;)
<hel0ck> yes, but my function must have the same prototype that the nth function in the list
<hel0ck> so i have only two parameters...
<hel0ck> and no one more
<mackwic> that's enough
<hel0ck> really u_U
<mackwic> yep
<mackwic> think of the fact(n) function
<mackwic> how do you calculate it *intuitively* ?
<mackwic> Let's say i want fact(5)
<mackwic> write me how do you calculate it
<hel0ck> the function ?
<mackwic> the value given by fact(5), with hand, pen, and paper
<hel0ck> ok..
<mackwic> so ?
<mackwic> hel0ck, I'll go to bed soon...
<hel0ck> sorry
<hel0ck> 5*4*3*2*1
<mackwic> right !
<mackwic> and what are the components of this ?
<mackwic> 5 * fact(4)
<mackwic> etc. unless we fall on the terminate state
<hel0ck> n * fact(n - 1)
<mackwic> for all n in all sets ?
<hel0ck> no stop at 0
<mackwic> Exactly !
<mackwic> in fact you stop at 1, where fact(1) = 1
<hel0ck> yes
<mackwic> And what about our lists ?
<mackwic> You can have list = (elt :: sublist) or list = [] (empty)
<hel0ck> i have the head of my list and n that is the position of the element that i want
<hel0ck> yes
ollehar1 has quit [Remote host closed the connection]
<mackwic> do you know the "match ... with" consttruct ?
<hel0ck> yes i know
<hel0ck> match n with
<hel0ck> | [] -> ...
<mackwic> what is it ?
<hel0ck> etc.
<mackwic> what do it does ?
<hel0ck> it is filtering
<hel0ck> on my value
<hel0ck> n
<mackwic> talk me like I'm 4 ! What try to do match with ?
<mackwic> I don't understand "filter". Filter is for coffee, and coffee is for programmers
<mackwic> not programs
<hel0ck> lol
<hel0ck> :/
<mackwic> this is a match with construct
<mackwic> in the real world
<mackwic> Match with take your shape and try to make it correspond with the holes you give
<hel0ck> yes, i know how to use it
<mackwic> e :: list, that's definitely not the same shape than []
travisbrady has quit [Quit: travisbrady]
mk270 has joined #ocaml
<mk270> hello - which is the correct JSON module to use these days?
<mackwic> So how can you use it for thin exercise ?
<hel0ck> for my function ?
trep has quit [Quit: Leaving]
<mackwic> yep
<hel0ck> i can use like this :
<hel0ck> match n with
<hel0ck> | 0 -> element at position 0
emmanuelux has quit [Remote host closed the connection]
<hel0ck> | 1 -> element a position 1 etc..
<mackwic> What is this int ?
<mackwic> is your list an int ?
tane has quit [Quit: Verlassend]
tac has left #ocaml []
mcclurmc has quit [Ping timeout: 245 seconds]