lopex has quit [Quit: Connection closed for inactivity]
tnguyen has joined #ocaml
swgillespie has joined #ocaml
apache2_ has joined #ocaml
apache2 has quit [Ping timeout: 255 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
manizzle has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 256 seconds]
BitPuffin|osx has joined #ocaml
Mass321 has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Remote host closed the connection]
swgillespie has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
manizzle has joined #ocaml
tmtwd has joined #ocaml
m4b has joined #ocaml
m4b has quit [Ping timeout: 260 seconds]
tnguyen has quit [Quit: tnguyen]
manizzle has quit [Ping timeout: 272 seconds]
justgage has joined #ocaml
tnguyen has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
kawaii-imouto has quit [Quit: fix config]
pyon has joined #ocaml
pyon is now known as kawaii-imouto
MercurialAlchemi has joined #ocaml
<justgage>
Hey OCamlers, I have this weird error when I start UTop all of a a suden, it says `Error: Parse error: [semi] expected after [str_item] (in [phrase])` after everything I try to do
<justgage>
even like `2;;`
<tennix>
justgage: check your ~/.ocamlinit
manizzle has joined #ocaml
<justgage>
I did... I can't see anything out of the ordinary
<tennix>
what about ~/.utoprc
MercurialAlchemi has quit [Ping timeout: 260 seconds]
justgage has quit [Ping timeout: 265 seconds]
m4b has joined #ocaml
m4b has quit [Ping timeout: 244 seconds]
tmtwd has quit [Remote host closed the connection]
sp0on has joined #ocaml
manud has quit [Quit: manud]
manizzle has quit [Ping timeout: 260 seconds]
manizzle has joined #ocaml
tmtwd has joined #ocaml
felipealmeida has quit [Ping timeout: 264 seconds]
felipealmeida has joined #ocaml
Akshay_ has joined #ocaml
grouzen has joined #ocaml
mort___ has quit [Quit: Leaving.]
tmtwd has quit [Remote host closed the connection]
BitPuffin|osx has quit [Ping timeout: 265 seconds]
manizzle has quit [Ping timeout: 246 seconds]
lewis1711 has joined #ocaml
ygrek_ has joined #ocaml
kushal has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
tmtwd has joined #ocaml
m4b has joined #ocaml
Algebr has joined #ocaml
Bhavya has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
m4b has quit [Ping timeout: 264 seconds]
sp0on has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kushal has quit [Ping timeout: 256 seconds]
zapu has quit [Ping timeout: 244 seconds]
TheLemonMan has joined #ocaml
Algebr has quit [Remote host closed the connection]
kushal has joined #ocaml
zpe has joined #ocaml
tmtwd has quit [Remote host closed the connection]
sh0t has joined #ocaml
keen__________28 has joined #ocaml
keen__________27 has quit [Read error: Connection reset by peer]
Submarine has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 244 seconds]
zapu has joined #ocaml
manud has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
sh0t has quit [Ping timeout: 240 seconds]
Simn has joined #ocaml
Kakadu has joined #ocaml
voglerr has joined #ocaml
lordkryss has joined #ocaml
mort___ has joined #ocaml
m4b has joined #ocaml
octachron has joined #ocaml
m4b has quit [Ping timeout: 264 seconds]
Akshay_ has quit [Read error: Connection reset by peer]
Akshay_ has joined #ocaml
nojebar has joined #ocaml
nojebar has quit [Client Quit]
nojb has joined #ocaml
manud has quit [Quit: manud]
creichert has quit [Ping timeout: 252 seconds]
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
rand000 has joined #ocaml
<lewis1711>
is there a way to get the ocaml toplevel to pretty print your custom exceptions
contempt has quit [Remote host closed the connection]
<lewis1711>
I get a lot of stuff like "Exception: Eval.Call_of_non_applicable(_)."
<lewis1711>
because it can't print the argument of that exception
<flux>
lewis1711, you can install exception pretty printers with #install_printer
Akshay_ has quit [Ping timeout: 265 seconds]
<lewis1711>
hmm, I see it in utop but it doesn;t give me a meaningful type signature or anything. I'll check it out though
divyanshu has joined #ocaml
contempt has joined #ocaml
psy_ has quit [Ping timeout: 256 seconds]
lopex has joined #ocaml
manud has joined #ocaml
psy_ has joined #ocaml
<def`>
exception pretty printing is a dynamic thing
<def`>
you can use Printexc.register_printrr
<def`>
it will work in all applications not only toplelel
grouzen has joined #ocaml
jao has joined #ocaml
<companion_cube>
def`: is it good practice, for a module that defines an exception, to also register that exception at initialization time?
<lewis1711>
blergh, you can't chain top-level directives together with ;;
Submarine has joined #ocaml
dsheets has joined #ocaml
contempt has quit [Remote host closed the connection]
tashjash has joined #ocaml
contempt has joined #ocaml
nojb has quit [Quit: Leaving]
toolslive has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
tennix has quit [Ping timeout: 256 seconds]
<flux>
def`, will it work in toplevel as well?
octachron has quit [Ping timeout: 244 seconds]
<flux>
companion_cube, I think some packages do it.. I don't know if there are any downsides. maybe not ;)
<companion_cube>
I'm not sure either
<def`>
flux: yes, toplevel phrases execute in the same runtime
<companion_cube>
some people say that most modules should be "pure" (no init code)
<def`>
companion_cube: then don't use exceptions, they are generwtive :)
<flux>
companion_cube, the problem with .cmas is of course that not all top-level phrases get to be exectued
<flux>
but if you install the printers in the same module where you define the exceptions, everything should work ok?
<def`>
flux: Or not, I might be wrong :/
<flux>
and I do agree that it's not a bad policy to not put all kinds of initializations in modules during eval time, but these are so small.. :)
<flux>
so until someone can convince me it would be bad, I'm of the opinion that it's ok :)
<def`>
so it works with Utop not standard toplevel
m4b has joined #ocaml
divyanshu has joined #ocaml
m4b has quit [Ping timeout: 240 seconds]
lewis1711 has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
ceryo has joined #ocaml
octachron has joined #ocaml
antegallya has joined #ocaml
mort___ has quit [Ping timeout: 252 seconds]
<companion_cube>
def`: that's a reasonable argument
<companion_cube>
I should start doing it more often
voglerr has quit [Ping timeout: 260 seconds]
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
mort___ has joined #ocaml
Submarine has quit [Quit: Leaving]
voglerr has joined #ocaml
mort___ has quit [Quit: Leaving.]
Bhavya has quit [Quit: Quit the channel]
jabesed has quit [Ping timeout: 272 seconds]
manud has quit [Quit: manud]
divyanshu has quit [Quit: Computer has gone to sleep.]
Haudegen has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 240 seconds]
whirm has joined #ocaml
jbrown has quit [Remote host closed the connection]
Haudegen has joined #ocaml
tashjash has quit [Read error: Connection reset by peer]
divyanshu has joined #ocaml
tashjash has joined #ocaml
voglerr has quit [Remote host closed the connection]
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
tennix has quit [Ping timeout: 272 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
voglerr has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
tennix has joined #ocaml
mort___ has joined #ocaml
<zozozo>
I'm trying to do an ocaml program that would do things like ulimit (i.e limit time and memory consumption of programs), and I can't seem to find any way to get the ressource usage of a still running process (except looking at /proc/pid/status), does anyone know of some magic function which would do that (in lwt for instance) ?
m4b has joined #ocaml
tennix has quit [Ping timeout: 250 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
c74d has quit [Ping timeout: 244 seconds]
c74d has joined #ocaml
m4b has quit [Ping timeout: 240 seconds]
<companion_cube>
there should be a rlimit system call, but afaik it's not in Unix
<zozozo>
still even in ExtUnix, I don't seem to find an easy way to set a limit on global memory consumption,but then maybe it'sjuste I don't understand well enough the different ressources exposed
<toolslive>
memory consumption is fuzzy.
<toolslive>
the one that comes closest to what you want is maxrss
dsheets has quit [Ping timeout: 250 seconds]
<zozozo>
it returns (more or less) the memory used ?
<toolslive>
it's peak memory usage
<toolslive>
but that comes close to the truth for ocaml programs
<zozozo>
ok, will see if it works (though I'm actually trying to limit memory consumption of non-ocaml programs, using an ocaml program, :p)
<toolslive>
while softlimit is a temporary override
<whirm>
zozozo: also, if you are/can use systemd on that system, it already has this functionality integrated.
<zozozo>
whirm: it'snice to know, but the goal is to have a ulimit-like tool at the end, and relying on systemd doesn't seem to be the most portable solution (even between linux machines)
<whirm>
zozozo: ah, I see
<zozozo>
hm... I think it will take me a while to understand cgroups, :p
Sim_n has joined #ocaml
tmtwd has joined #ocaml
Simn has quit [Ping timeout: 256 seconds]
divyanshu has joined #ocaml
tennix has joined #ocaml
<toolslive>
I need some help on getting orocksdb into opam (PR 4506)
<tashjash>
Hi, why does OCaml say that my pattern matching is fragile?
<tashjash>
I try adding a constructor, and it complains about non exhaustive pattern matching
<Drup>
this warning is not enabled by default, isn't it ?
<tashjash>
Drup, no it isn't
<tashjash>
But I always do -w A -warn-error A
<Drup>
You shouldn't do that.
mort___ has quit [Ping timeout: 246 seconds]
<tashjash>
Drup, thank you
<Drup>
two reasons: 1) when the next version of the compile add new warning, your code is going to stop compiling, you should NEVER put "-warn-error A"
<tashjash>
Drup, I bind to one version, each time a new version come I recompile everything
<Drup>
2) Some warnings are incompatibles
<tokenrove>
tashjash: the problem is the _, 0 case.
<rks`>
Drup: reason 1/ is shit
<Drup>
rks`: No it's not
<tashjash>
tokenrove, I suppose, but for me we have to different cases, the _, 0 which matches everything, and the Int _, k which totally explodes the pattern matching
<tashjash>
i though it was authorixzed
<rks`>
Drup: :)
mengu has joined #ocaml
<tokenrove>
tashjash: i guess the compiler can't figure it out. if you test k in a when clause instead, it seems to be fine.
<tashjash>
tokenrove, tokenrove I'm not sure to understand your last statement
<tashjash>
but that's sad that ocaml refuses my code
<Drup>
tashjash: the fundamental reason is that the pattern matching remains complete if you add more ints ... which doesn't really make sense, given you really know that's not going to happen, but the compiler doesn't
<tashjash>
Drup, no it doesn't remain exhaustive
<tashjash>
just do the test
<tashjash>
I know what I was doing
<Drup>
If you add new integers :)
<tashjash>
but ocaml didn't know what I was doing :(
<Drup>
I didn't say new contructor for the type t
<tashjash>
ocaml accept fragile pattern matching when it's list or int
<tashjash>
(otherwise we wouldn't be capable of matching int)
<tokenrove>
to illustrate what drup is saying, try changing k in your original code to type t
<tokenrove>
tashjash: match k as T 0 and T k instead of 0 and k
<Drup>
the heuristic for non fragile pattern is a bit crude and doesn't cover constants all that well, that's all what I'm saying
<tokenrove>
anyway, it's kind of a shame about warnings. i tried enabling all warnings as errors but there are too many useful idioms that cause warnings.
remyzorg has joined #ocaml
<Drup>
tokenrove: just choose your warnings.
<tashjash>
Drup, that's really intriguing
<tokenrove>
yeah, that's what i do.
<companion_cube>
you can also enable all, then disable some specific warnings
<tokenrove>
(actually, I subtract warnings I don't want from A, but only because in most cases, I want my code to fail to compile if a new warning has been introduced.)
<companion_cube>
I use warn_A, warn(-4), warn(-44)
lordkryss has quit [Quit: Connection closed for inactivity]
voglerr has quit [Ping timeout: 244 seconds]
tmtwd has joined #ocaml
kawaii-imouto has quit [Quit: fix config]
kawaii-imouto has joined #ocaml
contempt has quit [Ping timeout: 255 seconds]
remyzorg has quit [Ping timeout: 240 seconds]
contempt has joined #ocaml
antegallya has quit [Quit: Leaving.]
darius93 has quit [Ping timeout: 264 seconds]
darius93 has joined #ocaml
divyanshu has quit [Ping timeout: 246 seconds]
bjorkintosh has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
divyanshu has joined #ocaml
toolslive has quit [Remote host closed the connection]
tashjash has quit [Quit: Leaving]
jtfmumm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
badkins has quit []
mcclurmc has joined #ocaml
mcclurmc_ has quit [Ping timeout: 255 seconds]
lordkryss has joined #ocaml
NingaLeaf has joined #ocaml
systmkor has quit [Ping timeout: 272 seconds]
zpe has joined #ocaml
tennix has quit [Ping timeout: 244 seconds]
Submarine has joined #ocaml
Submarine has joined #ocaml
zpe has quit [Remote host closed the connection]
antegallya has joined #ocaml
systmkor has joined #ocaml
ceryo_ has quit [Ping timeout: 252 seconds]
toomuchtvrotsurb has joined #ocaml
jwatzman|work has joined #ocaml
octachron has joined #ocaml
xificurC_ has joined #ocaml
remyzorg has joined #ocaml
xificurC has quit [Ping timeout: 255 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
sh0t has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
MrScout has joined #ocaml
obadz has quit [Read error: Connection reset by peer]
<NingaLeaf>
I'm thinking of using OCaml for data analytic engine and was interested to know of any language issues (if any) I might encounter trying to implement this.
badkins has joined #ocaml
<NingaLeaf>
I normally use R but it's not cutting it even when I use RCpp.
toomuchtvrotsurb has joined #ocaml
darkf has quit [Quit: Leaving]
<octachron>
Drup, I also use a lot M.() (for shadowing operators). Adding a M.! construction would be a small patch to the lexer and parser. Do you think it is worth it?
<Drup>
I half did it, and kinda lost focus and never finished it
<Drup>
Actually, I finished it but wanted to add test before submitting it, and then I lost focus x)
<octachron>
hm, the syntax is quite understandable, there is some clear use cases and the change is not too invasive.
toomuchtvrotsurb has quit [Remote host closed the connection]
<octachron>
there is quite a few redundancy between the override and the fresh version ... but well there is quite a few redundancy in the parser in general
m4b has quit [Ping timeout: 244 seconds]
<Drup>
You can't factorize it with yacc
<Drup>
you could with menhir
<Drup>
(thanks to %inline)
<Drup>
(I tried)
<octachron>
I mean in the mkexp(Pexp_open(Override, mkrhs $1 1, ..) expression and friends
<Drup>
yeah
toomuchtvrotsurb has joined #ocaml
igoroliveira has joined #ocaml
<octachron>
If you don't have the time (or focus :) ) to write these tests, I could write them and submit them to your branch
<Drup>
yeah, I'm not sure where the test should go, in fact
<Drup>
(but sure, feel free to do so :D)
<octachron>
Ah, yes; I also don't really grok the organisation of the test suite folder
<Drup>
I'm not even sure there are syntax-oriented tests
<octachron>
there are some, like the exotic syntax test
sepp2k has joined #ocaml
creichert has quit [Ping timeout: 260 seconds]
<Drup>
Hum, it seems I didn't implemented it for arrays
<Drup>
I'm going now, we'll see later
bjorkintosh has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
jtfmumm has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
Kakadu has quit [Quit: Page closed]
Haudegen has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
m4b has joined #ocaml
rand000 has quit [Quit: leaving]
ygrek_ has joined #ocaml
zpe has joined #ocaml
nullcat has joined #ocaml
_andre has quit [Quit: leaving]
paddymahoney has joined #ocaml
wraithm has joined #ocaml
tennix has joined #ocaml
remyzorg has quit [Ping timeout: 256 seconds]
tennix has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 265 seconds]
Kakadu has joined #ocaml
ceryo has joined #ocaml
<nullcat>
how do you turn off a certain warning in merlin for vim
<nullcat>
e.g warning 10 and 40
<flux>
FLG -w -40
<flux>
to .merlin
<nullcat>
thanks!
Haudegen has joined #ocaml
<octachron>
Drup, so it turns out that "open!" is never tested in the test suite. For now, I think that tests/warnings might be the best location