lapinou changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Public logs at http://tunes.org/~nef/logs/ocaml/
malvarez has joined #ocaml
tlockney is now known as tlockney_away
tab1293 has joined #ocaml
<tab1293> I am trying to implement a function to check the periodic point of a function. There is a parameter p to this function that specifys the period, how can run the function parameter p times?
<tab1293> so basically is it possible to apply a function p times?
lordkryss_ has quit [Quit: Connection closed for inactivity]
<bernardofpc> tab1293: yes, but you'll have to build it for yourself
<bernardofpc> say let rec power f p x = if p = 0 then x else power f (p-1) (f x) ;;
<tab1293> bernardofpc: I understand that code, I am asking given a function "F" as a parameter and p=2 how can I run F(F(x))
thomasga has joined #ocaml
<tab1293> Actaully I guess I kind of see how I can use the logic in your code to do what I want
q66 has quit [Remote host closed the connection]
q66 has joined #ocaml
tab1293 has quit [Quit: Page closed]
thomasga has quit [Quit: Leaving.]
jwatzman|work has quit [Quit: jwatzman|work]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
q66 has quit [Quit: Leaving]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
talzeus_ has quit [Read error: Connection reset by peer]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
boogie has quit [Remote host closed the connection]
NoNNaN has quit [Remote host closed the connection]
tlockney_away is now known as tlockney
talzeus has joined #ocaml
talzeus has quit [Remote host closed the connection]
studybot_ has joined #ocaml
zpe has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
rta has quit [Ping timeout: 265 seconds]
ygrek has quit [Ping timeout: 246 seconds]
boogie has joined #ocaml
watermind has quit [Quit: Konversation terminated!]
rta has joined #ocaml
rta has quit [Ping timeout: 240 seconds]
iorivur has joined #ocaml
zpe has joined #ocaml
tidren has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
rta has joined #ocaml
ygrek has joined #ocaml
tidren has quit [Remote host closed the connection]
rta has quit [Ping timeout: 240 seconds]
malvarez has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
rta has joined #ocaml
nikki93 has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
claudiuc has quit [Remote host closed the connection]
nikki93 has joined #ocaml
siddharthv_away is now known as siddharthv
nikki93 has quit [Read error: Connection reset by peer]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Read error: Connection reset by peer]
nikki93 has joined #ocaml
tlockney is now known as tlockney_away
michael_lee has joined #ocaml
bjkeller has joined #ocaml
michael_lee has quit [Max SendQ exceeded]
michael_lee has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
michael_lee has quit [Max SendQ exceeded]
hyperboreean has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
michael_lee has joined #ocaml
tidren has joined #ocaml
bjkeller has quit []
michel_mno_afk is now known as michel_mno
nikki93 has quit [Remote host closed the connection]
_5kg has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ggole has joined #ocaml
axiles has joined #ocaml
nikki93 has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
_5kg has joined #ocaml
iorivur_ has joined #ocaml
iorivur has quit [Ping timeout: 240 seconds]
keen__ has joined #ocaml
the-gibson has quit [Ping timeout: 265 seconds]
keen_ has quit [Ping timeout: 264 seconds]
nikki93 has quit [Remote host closed the connection]
the-gibson has joined #ocaml
lordkryss_ has joined #ocaml
tidren has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 250 seconds]
sgnb has joined #ocaml
AltGr has joined #ocaml
iorivur has joined #ocaml
iorivur_ has quit [Ping timeout: 250 seconds]
zpe has joined #ocaml
lordkryss_ is now known as lordkryss
Kakadu has joined #ocaml
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ocaml
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ocaml
Thooms has joined #ocaml
avsm has joined #ocaml
keen__ is now known as keen_
Simn has joined #ocaml
syntropy has joined #ocaml
<adrien_oww> cmake
<adrien_oww> just had to 'rm -rf *' to have it work
<flux> git clean -d -x -f :)
<adrien_oww> nah, I have valuable trash elsewhere
<adrien_oww> and with cmake you have to
<adrien_oww> mkdir build && cd build && cmake ..
rand000 has joined #ocaml
<adrien_oww> so you can remove the build directory
iorivur has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
ggherdov_ is now known as ggherdov
AltGr has quit [Remote host closed the connection]
AltGr has joined #ocaml
avsm has joined #ocaml
ikaros has joined #ocaml
maattdd_ has joined #ocaml
elfring has joined #ocaml
<elfring> I would like to store compiled files in a specific output directory directly. Do I overlook any parameter for the command "ocamlc -c" for this purpose?
<mrvn> use a build system that supports out-of-tree builds
<adrien_oww> elfring: ocamlbuild handles that; i.e. use oasis since it will use ocamlbuild as a backend
jbrown has joined #ocaml
<elfring> Does the OCaml compiler store some generated files always in the same directory which was specified for their source files?
avsm has quit [Quit: Leaving.]
<Kakadu> yes
iorivur has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
ollehar has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
NoNNaN has joined #ocaml
thomasga has joined #ocaml
steshaw has joined #ocaml
thomasga has quit [Quit: Leaving.]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
avsm has quit [Quit: Leaving.]
siddharthv is now known as siddharthv_away
<hcarty> elfring: Regarding your cmake question - I have done some work with OCaml and cmake. It worked but was painful. Using oasis or ocamlbuild directly is a much better option if you have a choice.
studybot_ has quit [Remote host closed the connection]
<hcarty> jpdeplaix: Do you use your monad-exn library regularly? How happy have you been with it?
<Kakadu> I have noticed that ocaml branch safe-string was created. Where can I read more about it?
<jpdeplaix> Kakadu: I think by asking damien :D
<jpdeplaix> hcarty: not anymore :/
<jpdeplaix> The main problem was that it requires all unsafe functions and libraries to be bind (or you can do it each time but it's painful)
<jpdeplaix> I'm using BatteriesExceptionless now :D
yacks has quit [Ping timeout: 240 seconds]
<jpdeplaix> And also, the other problem was that even if you have bind a function, you cannot be sure that it doesn't raise other exceptions than documented
<jpdeplaix> for example, some stdlib functions doesn't document all their exceptions
steshaw has quit [Quit: Leaving.]
Nevor_ has joined #ocaml
<jpdeplaix> my main usage was for Cervoise (see my github)
shinnya has joined #ocaml
<jpdeplaix> I ended up thinking that it requires a full handling IN the language if you want to have things like that
yacks has joined #ocaml
avsm has joined #ocaml
<hcarty> jpdeplaix: Ok, thanks.
<hcarty> I've been using the Exceptionless modules in Batteries as well, so you answered my follow up question (is it worth switching)
<hcarty> jpdeplaix: Thanks!
thomasga has joined #ocaml
thomasga has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
_andre has joined #ocaml
aurynj has quit [Ping timeout: 252 seconds]
watermind has joined #ocaml
Asmadeus has quit [Changing host]
Asmadeus has joined #ocaml
thomasga has joined #ocaml
<jpdeplaix> hcarty: to be complete, I'm using BatteriesExceptionless + ocaml-monomorphic
<NoNNaN> jpdeplaix: interesting, where can I access the monomorphic version of ocaml ?
shinnya has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
iorivur has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
iorivur has joined #ocaml
jonludlam has joined #ocaml
mort___ has joined #ocaml
malvarez has joined #ocaml
syntropy has quit [Ping timeout: 240 seconds]
mort___ has quit [Ping timeout: 240 seconds]
jonludlam has quit [Ping timeout: 240 seconds]
WraithM has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
divyanshu has joined #ocaml
marky has quit [Ping timeout: 240 seconds]
marky has joined #ocaml
marky has quit [Changing host]
marky has joined #ocaml
<madroach> Hi
<madroach> how do you generate the index.html for the installer without ftp support?
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tlockney_away is now known as tlockney
divyanshu has quit [Quit: Computer has gone to sleep.]
poarks has joined #ocaml
studybot_ has joined #ocaml
studybot_ has quit [Remote host closed the connection]
studybot_ has joined #ocaml
avsm has quit [Quit: Leaving.]
_5kg has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
Hannibal_Smith has joined #ocaml
zpe has quit [Remote host closed the connection]
iorivur has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
divyanshu has joined #ocaml
aurynj has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
lostcuaz has joined #ocaml
mort___ has joined #ocaml
mreca has joined #ocaml
ebzzry has joined #ocaml
<ebzzry> What is the best book to read, when trying to learn OCaml as a new language?
<ygrek> ebzzry, real world ocaml seems to be the choice now
<Hannibal_Smith> Is it possible to follow news about the remove of the "threading lock"?
<ebzzry> ygrek: It says in chapter 1 to use Core. Is it ok to dive directly into it?
<companion_cube> Hannibal_Smith: it's discussed from time to time, but I don't think there's a centralized discussion about it
<companion_cube> apart from the mailing list or http://planet.ocamlcore.org/
<Hannibal_Smith> Is something low priority?
<ebzzry> How does the general OCaml community see core and utop? Are they de factor components?
<Hannibal_Smith> companion_cube, yes I already uses that
<companion_cube> Hannibal_Smith: it's a hard problem...
<Hannibal_Smith> Thank you
<companion_cube> ebzzry: that's a delicate subject. Some people use Core, others don't, and people often have strong opinion on the topic
<ebzzry> companion_cube: Ok. I'm sorry if I have inadvertently touched that topic.
wwilly has quit [Quit: Ex-Chat]
<companion_cube> ebzzry: that's fine :D
<companion_cube> I just meant there's no clear cut
<ggole> utop is just a toplevel interface, it won't affect your code
<ggole> Use it if you find it is more pleasant than the alternatives, no big deal if you don't.
<companion_cube> yes, utop is pretty good!
* ggole declines to rant about the ocaml toplevel again
_5kg has joined #ocaml
<ebzzry> Hmm. Thanks for the tips, guys.
<hcarty> ebzzry: To be clear - utop is less controversial than library choices.
<hcarty> utop is worth installing and trying. It has some nice features such as context-sensitive tab completion which make exploring the language easier.
<hcarty> The Core vs (Batteries/ocamlnet/Lwt/etc) debate is something that probably should happen. It has not happened so far, at least not out in the open.
<hcarty> It will likely be a heated discussion when it happens.
mort___ has quit [Ping timeout: 240 seconds]
<companion_cube> such debates happened in other (small) open source communities
<companion_cube> for instance the D language had similar problems
avsm has joined #ocaml
<ebzzry> Hmm. Thanks for your insights.
michael_lee has quit [Quit: Ex-Chat]
mdenes has joined #ocaml
tidren has joined #ocaml
zpe has joined #ocaml
jonludlam has joined #ocaml
unknownmosquito has joined #ocaml
WraithM has joined #ocaml
<tautologico> what is the rant about the toplevel? :)
<adrien> hcarty: not sure
<adrien> hcarty: there are important differences between the two
malvarez has quit [Ping timeout: 240 seconds]
<ggole> tautologico: limited, partly broken printing facilities, no stepper, debugger or backtrace support, no way to inspect values, etc
<tautologico> I see
ikaros has quit [Quit: Ex-Chat]
malvarez has joined #ocaml
troydm has quit [Ping timeout: 252 seconds]
<tautologico> I just wish something else was the "standard library"
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tautologico> ocaml's standard library is barebones and not updated
<tautologico> Core is very nice
<kerneis> tautologico: barebones is correct, but not updated is plain wrong
nikki93 has joined #ocaml
<kerneis> grep for "Since"
<companion_cube> tautologico: it's updated for bugfixes, mainly
<tautologico> a couple of functions added
<tautologico> yeah, I know
<tautologico> the random module changed RNG algorithm some time ago
<tautologico> that's it, bugfixes and minor changes, mostly
<kerneis> most changes occurred in 4.00.0
avsm has quit [Quit: Leaving.]
<adrien> new functions are regularly added
<adrien> pace is fairly slow but you can count on it
<adrien> (I know, there are some more recent functions I can't use yet)
<companion_cube> except when it's String.split
<companion_cube> :D
<adrien> :D
<tautologico> let's hope they add |> someday
tane has quit [Quit: Verlassend]
<adrien> val (|>) : 'a -> ('a -> 'b) -> 'b
<adrien> Reverse-application operator: x |> f |> g is exactly equivalent to g (f
<adrien> (x)) .
<adrien> Since 4.01
<companion_cube> ah, right, that's a pretty cool new function
Submarine has joined #ocaml
boogie has joined #ocaml
Nevor_ has quit [Quit: Page closed]
<Drup> tautologico: btw, while you're here, about your plan for matlab like array splicing syntax
<Drup> you can probably do a good amount of it without syntax extension
<tautologico> adrien: that's excellent
<tautologico> my toplevel is configured to use core so I didn't know if it was in the stdlib
<tautologico> Drup: using ppx?
<Drup> without syntax extension, I said :p
<tautologico> ok, how?
<Drup> so, when you use the notation .( ) .[ ] or .{ }
<Drup> it's desugarized at parsing time in to Array.get (or String.get or Bigarray.get)
<Drup> you can overload these modules and overwrite the get function
<Drup> to take whatever you want to
tidren has quit [Remote host closed the connection]
<tautologico> that's cool, will look into that
tidren has joined #ocaml
nikki93 has quit [Remote host closed the connection]
<Drup> additionnally, you could defined a data type range = Range int * int | Half_pos int | Half_inf int
<Drup> and add operators (--) (|-) and (-|) for those
<Drup> you may need to fiddle a bit with priorities and stuff to make it work, but you can probably do it just with that
AltGr has left #ocaml []
<tautologico> yes, these are good ideas
<tautologico> thanks
<Drup> no problem, I'm curious of what it would look like, so tell me when you have something to show :)
<tautologico> sure
<Drup> (and you can use local open M.( ... ) to make it usable locally without screwing up the whole scope with the dubious overloaded get :D)
Kakadu has quit [Ping timeout: 240 seconds]
<tautologico> bbl
nikki93 has joined #ocaml
tlockney is now known as tlockney_away
tane has joined #ocaml
mreca has joined #ocaml
nikki93 has quit [Remote host closed the connection]
tlockney_away is now known as tlockney
Thooms has quit [Quit: WeeChat 0.3.8]
<ggole> You could create a module Foo with operations get and set and then let module Array = Foo in ... :p
<ggole> (Don't do that.)
<Drup> :p
<ggole> Actually, I suppose you'd need unsafe_get and unsafe_set too
yacks has joined #ocaml
<ggole> In case somebody was silly and compiled with -unsafe
<ggole> Wouldn't want our totally sensible approach to cause problems, now.
<Drup> :D
<Drup> indeeed
ebzzry has quit []
<Drup> I should write a compilation of such syntactic hacks in ocaml, because there is quite a few of them
<Drup> (and they can actually be useful)
<ggole> Hmm, there's the list constructors
<ggole> I can't think of anything else off the top of my head.
<Drup> you can rebind the operators with letters
<ggole> Maybe lazy foo?
<Drup> even if you can create new ones
<Drup> can't*
<ggole> Oh, you mean land, etc
<ggole> Right.
<Drup> (you can't really do anything with the list operators)
<Drup> (afaik, at least)
<ggole> You can create your own list type :p
<ggole> Yeah, dunno.
<ggole> It would be more hackable if they were functions and not constructors, I guess.
<Drup> ggole: but you can't change the definition of ::, can you ?
<Drup> If it's possible, I want the code snippet :D
<ggole> You can iirc
<ggole> type 'a foolist = Empty | :: of 'a * 'a foolist
<Drup> doesn't parse
<ggole> Does here
<ggole> But list literals break, of course
<mrvn> works fine in OCaml version 4.01.0
<Drup> it parses in ocaml but not in utop <3
<ggole> Hmm, no way to redefine whatever the empty list constructor is :/
<Drup> I think it's handle directly by the syntax [ _ , _ , _ ]
<Drup> ;*
mdenes has quit [Quit: WeeChat 0.4.2]
<ggole> Yeah, seems [ and ] are hardwired to produce a nested expression of :: and <something>
unknownmosquito has quit [Ping timeout: 240 seconds]
<mrvn> similar to .{} .[] and .()
<ggole> And :: can be rebound, but not the Constructor Which Cannot Be Named.
michel_mno is now known as michel_mno_afk
<Drup> :D
<ggole> Hmm, camlp4 tells me it is just "[]"
<Drup> camlp4 is not reliable for those stuff
<ggole> Yeah :/
<Drup> the -dparsetree in the trunk is more helpful
<Drup> apparently, it's really "[]" after parsing
<mrvn> sure, [] remains []
<Drup> but you can't use it :p
<ggole> Dammit.
mreca has quit [Quit: Textual IRC Client: www.textualapp.com]
<gargawel> companion_cube: I was referred to you for a question regarding solvers. Is there any good option for mixed integer programming in OCaml ?
nikki93 has joined #ocaml
nlucaroni has joined #ocaml
<companion_cube> I'm no expert on optimization problem, sadly (more on satisfiability issues)
thomasga has quit [Ping timeout: 240 seconds]
<gargawel> companion_cube: Ok, thanks anyway :)
aurynj has quit [Ping timeout: 250 seconds]
pkrnj has joined #ocaml
Kakadu has joined #ocaml
tidren has quit [Remote host closed the connection]
tidren has joined #ocaml
q66 has joined #ocaml
tidren has quit [Ping timeout: 240 seconds]
jonludlam has quit [Ping timeout: 245 seconds]
q66 has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
q66 has quit [Changing host]
q66 has joined #ocaml
claudiuc has joined #ocaml
<Submarine> Has anybody here got experience with OCamlJava?
<Submarine> I'm curious how far it goes.
<Submarine> gargawel, why not write into a file, call CPlex or Gurobi, and parse back?
<Drup> OCamlJava 1 is available, but outdated, not even sure it's maintained
mdenes has joined #ocaml
<Drup> OCamlJava is vaporware since a few years now
<Drup> OCamlJava 2*
<Submarine> gargawel, also, the 'opt' branch of Z3 has an optimizer, and there is a (not much working) OCaml binding for it
<Drup> the opt branch is active on going work
<Drup> don't even try to use it, it's breaking frequently
<Submarine> yes, but basic Z3 does not do optimization
<Drup> concerning the ml binding, there is a new version of the binding in the branch ml-ng
<Drup> which is working
<Submarine> yes, but does not support 'opt' so you'd have to merge the two ;-)
<Drup> there is a fork from arie, and inside a branch in it called opti-z3
<Drup> which is stable now
<Submarine> it depends a lot on the kind of MILP problems that you wish to solve
<Submarine> large-scale problems should be forked off to CPlex or Gurobi
<Drup> probably
<NoNNaN> Submarine: I have tried a last year worked more or less for small examples, but it was failed on larger examples, however the bug tracker looks active at: http://bugs.x9c.fr/
<Submarine> Drup, yes, that's what Arie said to me testerday
<Submarine> NoNNaN, thanks
<NoNNaN> Submarine: but check the issues yourself, try it out, and also check the recent papers that Xavier Clerc wrote eg.: http://www.cs.ru.nl/P.Achten/IFL2013/symposium_proceedings_IFL2013/ifl2013_submission_17.pdf
<Drup> it's a shame he doesn't want to release ocamljava 2 :/
WraithM has quit [Quit: leaving]
<tautologico> gargawel: I don't think so, but this is something I'm interested in. I'm planning on creating ocaml bindings to some solver libraries
tidren has joined #ocaml
<NoNNaN> is there any symbolic execution / abstract interpretation tool available to analyze ocaml programs? something like pex or klee for ocaml
<seliopou> question
<seliopou> What is The Command-Line Argument Parsing Library for OCaml?
boogie has quit [Remote host closed the connection]
<seliopou> i've seen a few floating around but was wondering which way the community leaned?
tane has quit [Quit: Verlassend]
ygrek has quit [Ping timeout: 240 seconds]
<nlucaroni> it really depends on the standard library (replacement) you lean on.
<Drup> seliopou: cmdliner
<Submarine> tautologico, it's not that hard to bind to glpk
<Submarine> but glpk is not really state of the art if you have expensive problems
Arsenik has joined #ocaml
<Drup> (note that you will have to do a new binding, or fix the current one, as it doesn't compile anymore)
ygrek has joined #ocaml
<tautologico> Submarine: I know
troydm has joined #ocaml
<seliopou> Drup: thx this looks great
tidren has quit [Remote host closed the connection]
tidren has joined #ocaml
tidren has quit [Read error: Connection reset by peer]
tidren has joined #ocaml
keen_ has left #ocaml []
<Drup> seliopou: it will make you learn applicative functors too !
<Drup> (not sure if it's a good selling point)
<seliopou> Drup: already know 'em, recognized that part immediately
<seliopou> which is why this looks so good :)
<Drup> if you know them, probably, yes ;)
malo has quit [Ping timeout: 252 seconds]
the-gibson has left #ocaml []
tidren has quit [Remote host closed the connection]
elfring has quit [Quit: Konversation terminated!]
tidren has joined #ocaml
elfring has joined #ocaml
tidren has quit [Remote host closed the connection]
malo has joined #ocaml
tidren has joined #ocaml
tidren has quit [Ping timeout: 240 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
jonludlam has joined #ocaml
_andre has quit [Quit: leaving]
Topher has joined #ocaml
divyanshu has quit [Quit: Textual IRC Client: www.textualapp.com]
ygrek has quit [Ping timeout: 250 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
malvarez has quit [Quit: Leaving]
pkrnj has joined #ocaml
<morolin> Hey, I've been using "ocamlc" to generate bytecode on my projects, and I would like to switch to using ocamlopt for performance, but when I tried to just go ahead and do that (compile the same files using ocamlopt, or asking ocamlbuild to build the '.native' version for me), the code behaves differently.
<morolin> Does anyone have a recommendation on where I should start looking to try to debug this?
<Drup> morolin: what is your code doing ?
<mrvn> hmm, that shouldn't happen.
<morolin> Drup: it's a program analysis tool, basically goes through code and checks for a few correctness propertie
<morolin> *properties
<morolin> it uses a handful of hashtbls, which are my first area of suspicion, but I've never used the native code compiler, so I wasn't sure what might happen
<Drup> how does it behave differently ?
<morolin> The output is incorrect---it removes the while loops from the program it's analyzing
claudiuc_ has joined #ocaml
<morolin> There are a handful of places in the code that might happen, but I was wondering if anyone here knew something I should be looking for before I dived in too deep
<morolin> I couldn't find anything that might cause the execution differences when I was looking on Google
rta has quit [Ping timeout: 240 seconds]
<Drup> well, it shouldn't happen, so if you find the incriminated piece of code, you can open a bug report about it.
<smondet> morolin: you can look for places where the order of evaluation is unspecified, but your code still assumes a given order
<smondet> there are differences there between bytecode and native code
<morolin> oooh, that might happen.
<Drup> indeed
<Drup> stuff like side effects while List.map
claudiuc has quit [Ping timeout: 240 seconds]
<smondet> or tuples (let x = one_thig, the_other)
<smondet> or record creations
<morolin> record creations?
<smondet> or function arguments
<mrvn> would be nice if the compiler would warn about them
<Drup> let x = (foo(), bar())
<morolin> ah, ok
<smondet> mrvn: for that you need "non-purity" inference I think
<mrvn> smondet: no
<mrvn> drups example could simple warn
boogie has joined #ocaml
<smondet> yes but we would end up removing the warning since many cases are OK
<mrvn> smondet: so have it disabled by default
<Drup> (I wouldn't be surprised if there was already such warning, actually)
pkrnj has quit [Quit: Computer has gone to sleep.]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
tlockney is now known as tlockney_away
tidren has joined #ocaml
pkrnj has joined #ocaml
rta has joined #ocaml
pkrnj has quit [Client Quit]
<morolin> smondet: Looks like that's what's happening. There's a couple of places where I assumed ordering without specifying it, and those seem to be where things are screwing up. Now to do some rewriting. Thanks!
Arsenik has quit [Remote host closed the connection]
<Drup> morolin: in general, this is bad style to assume a specific order of evaluation when you can avoid it
<Drup> (said otherwise : bind intermediate results)
<morolin> Drup: Yeah, makes sense
<mrvn> write a left-to-right camlp4 module that rewrites undefined orderings
<Drup> ppx*
<Drup> please.
ggole has quit []
<whitequark> hmmm, suppose I want to depend on a C header from some opam package
<whitequark> but ocamlc by default only specifies $root/lib/ocaml, and the package installs its files to $root/lib/uint
<mrvn> #include "../uint/uint.h"?
<companion_cube> mrvn: so evil
<whitequark> oh, nevermind, if I specify -package uint, it Just Works
<mrvn> doh
<whitequark> now I need to make oasis somehow pass -package uint to ocamlc, which builds the C source
nikki93 has quit [Remote host closed the connection]
<mrvn> whitequark: BuildDepends: uint
<mrvn> CCOpt: -package uint ?
<whitequark> mrvn: ah, so just explicitly put it to CCOpt
<whitequark> no, that passes -package to gcc
<mrvn> if the first doesn't work
<whitequark> BuildDepends: uint is already there
<Drup> whitequark: which version of oasis are you using ?
<whitequark> 0.4.4
<Drup> so it should do it already
rand000 has quit [Quit: leaving]
<whitequark> well, it doesn't!
<mrvn> CCOpt: -I $pkg_oUnit maybe?
<mrvn> pkg_uint in your case
<whitequark> hm
<Drup> or ByteOpt
<whitequark> $pkg_uint_uint64. it worked \o/
<whitequark> thanks
<whitequark> why does oasis sometimes generate ./configure and sometimes not?
<mrvn> Plugins: DevFiles (0.3)
<whitequark> oh
<mrvn> META (0.3) for the META files
ollehar has quit [Ping timeout: 264 seconds]
nikki93 has joined #ocaml
ollehar has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
axiles has quit [Remote host closed the connection]
tlockney_away is now known as tlockney
bjkeller has joined #ocaml
<whitequark> oasis is pretty nice, if you don't look into the generated files
<whitequark> I mean, it is significantly less horrible than what I expected.
Submarine has quit [Quit: Leaving]
elfring has quit [Quit: Konversation terminated!]
bjkeller has quit [Remote host closed the connection]
lostcuaz has quit [Quit: Textual IRC Client: www.textualapp.com]
lostcuaz has joined #ocaml
nikki93 has quit [Remote host closed the connection]
malo has quit [Remote host closed the connection]
WraithM has joined #ocaml
ousado_ has joined #ocaml
ousado has quit [Ping timeout: 246 seconds]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
bjkeller has joined #ocaml
bjkeller has quit [Remote host closed the connection]
malo has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
bjkeller has joined #ocaml
bjkeller has quit [Client Quit]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ToTheInternet has joined #ocaml
Simn has quit [Quit: Leaving]
Kakadu has quit [Quit: Konversation terminated!]
<ToTheInternet> Hi. I hope this is not too off-topic. I have some trouble getting ocaml code completion in vim to work properly. I installed merlin and did everything according to the README. This is how it's supposed to look: https://github.com/the-lambda-church/merlin/wiki/vim_complete.png and this is how it looks for me: http://s7.directupload.net/images/140410/edzmnu9t.png
<companion_cube> do you complete with c-x c-o ?
<ToTheInternet> It doesn't display the type of the functions, and also it doesn't display the right functions.
<companion_cube> it should be omnicomplete
<ToTheInternet> companion_cube: yes
<companion_cube> first you should try to see whether merlin works at all : use \t on an identifier to show its type
<ToTheInternet> companion_cube: ok, it doesn't work. I tried :TypeOf and it says there is no such command
darkf has joined #ocaml
<companion_cube> I guess you're trying with a single file, for now?
<companion_cube> you might need to write a few lines in .merlin for more complicated projects, but given a correct config merlin should work out-of-the-box on single files
<ToTheInternet> companion_cube: yes, single file.
<ToTheInternet> companion_cube: Merlin is loaded, :scriptnames shows /usr/local/share/ocamlmerlin/vim/plugin/merlin.vim
<companion_cube> there's a python part
<companion_cube> guess :SourcePath doesn't work either?
<ToTheInternet> companion_cube: yup, doesn't work
<companion_cube> so the python stuff isn't loaded
<ToTheInternet> ok. let me see if i can find why that is. according to the read me all that needs to be done is configure, make and make install
<companion_cube> I can't help you much further, but tomorrow you may ask def-lkb
<ToTheInternet> companion_cube: you've helped me loads, thanks :)
<def-lkb> re
<def-lkb> merlin.vim is in scriptnames… What is your :set filetype?
<ToTheInternet> def-lkb: ocaml
<def-lkb> plugin/merlin.vim alone is not enough, you should have autoload/merlin.vim
<ToTheInternet> def-lkb: yes, i have that one as well
<ToTheInternet> and autoload/vimsyncbuf also
<ToTheInternet> and syntax_checkers/ocaml/merlin.vim
<def-lkb> ok, normally that's everything that is needed
<def-lkb> try opening another ml file, and see if it's the same?
nojb has joined #ocaml
<def-lkb> (and what is the value of :set omnicomplete?)
<ToTheInternet> Hm... unknown function omnicomplete
<def-lkb> sorry, omnifunc
<def-lkb> :set omnifunc?
<ToTheInternet> omnifunc=syntaxcomplete#Complete
<ToTheInternet> i set this in my vimrc
<def-lkb> is /usr/local/share/ocamlmerlin/vim/ftplugin/ocaml.vim also in scriptnames?
<ToTheInternet> def-lkb: no
<ToTheInternet> but i have /usr/share/vim/vim74/syntax/ocaml.vim
mrvn has quit [Ping timeout: 264 seconds]
tidren has quit [Remote host closed the connection]
<ToTheInternet> def-lkb: the file is at /usr/share/vim/vim74/ftplugin/ocaml.vim on my machine. i tried adding set rtp+=//usr/share/vim/vim74/ftplugin to .vimrc but it's still not loaded
<def-lkb> that's not the way to proceed, don't add this path
<def-lkb> make sure you have
<def-lkb> filetype plugin on
<def-lkb> filetype indent on # this one is not mandatory
<def-lkb> in your .vimrc
Hannibal_Smith has quit [Quit: Sto andando via]
<ToTheInternet> def-lkb: yes! that worked :)
<ToTheInternet> thanks a lot!
<def-lkb> fine :), you're welcome
<ToTheInternet> def-lkb: are you by any chance the author of the plugin?
<def-lkb> I think so
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
boogie has quit [Remote host closed the connection]
<ToTheInternet> thanks again, for the great work :) if you think the 'filetype plugin on' line should be in the wiki i can add it. not sure how pressing this is but it might just help some people
zpe has joined #ocaml
<def-lkb> Yes, do it if it's not complicated, otherwise I'll add it tomorrow
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 240 seconds]
<poarks> I'm against it.
<poarks> anything else is just noise.
nojb has quit [Ping timeout: 252 seconds]
<ToTheInternet> alright. fair enough. i won't add anything then and you can decide. but note that if the wiki had this little information, it would have saved this channel a _lot_ of noise :)
<poarks> ToTheInternet: I didn't mean to offend you btw
<poarks> (I'm tired so I might come out as agressive, sorry)
<def-lkb> (:D)
<ToTheInternet> poarks: didn't take it that way. thats why i said "not sure how pressing this is" because i don't know a lot about vim so i can't judge how relevant this information is :)
<poarks> maybe we can make things more explicit, I'm sure def-lkb will do it wonderfully
<poarks> anyway, good night
<ToTheInternet> good night and thanks again
<def-lkb> slightly changed the phrase
claudiuc_ has quit [Ping timeout: 240 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
mrvn has joined #ocaml
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 252 seconds]
Scriptonaut has joined #ocaml
<Scriptonaut> do you guys know where I could get some help using ml-lex
madroach has joined #ocaml
iorivur has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
<tautologico> ocamllex ?
NoNNaN has joined #ocaml
hellome has joined #ocaml
<Scriptonaut> no
<Scriptonaut> well actually, most lex is the same right?
<Scriptonaut> I just need somebody to explain how lex works
<Scriptonaut> I'm having trouble understanding the states
<Scriptonaut> and how lex scans the source file
<Scriptonaut> I want to make sure it doesn't make matches for string literals
<whitequark> do I take it correctly, that OCaml strings always have '\0' at index one past the end of string?
<whitequark> http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora115.html#@concepts266 seems to suggest it
aurynj has joined #ocaml
robink has quit [Remote host closed the connection]
robink has joined #ocaml
zzing has joined #ocaml
<tautologico> Scriptonaut: you can try the ocamllex manual, but any compiler book will tell you about lex
<Scriptonaut> I've read all the ml docs, the part I don't understand is how it scans the document
<Scriptonaut> lets say I wait for " before switching to the <STRING> state
pango_ has joined #ocaml
<Scriptonaut> oh nvm I think I got it
<tautologico> in general the reg. expressions are translated to an AFN
<tautologico> NFA
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
pango_ has quit [Client Quit]
Scriptonaut has left #ocaml []
<Drup> (in the case of ocamllex, DFA
<Drup> *)
claudiuc has joined #ocaml
penryu has joined #ocaml
nikki93 has joined #ocaml
penryu has left #ocaml []
<tautologico> yeah sometimes the NFA is then converted to a DFA
penryu has joined #ocaml
<tautologico> whitequark: I don't think so