<rks_>
companion_cube: there has been a discussion about that on the caml list recently
<companion_cube>
ousado: you think finally would have an impact on performance?
<companion_cube>
it would only occur along with a try/with
<companion_cube>
rks_: yep, but it was in the context of getting a stacktrace, right?
<ousado>
companion_cube: I'm not sure, actually. I'm not familiar with ocamls implementation
<ousado>
it's just a guess
<rks_>
indeed, it wasn't a discussion about "why don't we have 'finally'" per say
<rks_>
but it's related :-'
<ousado>
wmeyer`: thanks, yes. "any resources" was a bit imprecise
<companion_cube>
I think that if you don't write all your code in monadic pseudo-haskell, exceptions are useful, and finally is definitely useful for resource handling
<companion_cube>
mutex, sockets, files
<wmeyer`>
ousado: you could also read platform list
<thelema>
running 'opam config setup -u' added these lines to my ~/.profile
ollehar has quit [Ping timeout: 264 seconds]
<gasche>
hm
<gasche>
it considered my ~/.profile "up to date" because the file did not exist
<thelema>
also interesting: 'opam config setup -l
breakds has quit [Quit: Konversation terminated!]
<gasche>
ah, with 'opam config setup -u' it now works
<gasche>
I hope that the glitch comes from me upgrading from an older version and that it will auto-setup itself conveniently in recent times
<gasche>
because there really wasn't a lot of documentation
<gasche>
thanks thelema
<thelema>
gasche: n/p
Arsenik has joined #ocaml
<gasche>
(I'm using opam switches to test in-progress patches to the compiler, but by nature the switch names must be loooong, so completion will be a time-saver)
<thelema>
awesome.
ollehar has joined #ocaml
gnuvince- has quit [Remote host closed the connection]
gnuvince- has joined #ocaml
<rks_>
(that doesn't seem to work with zsh)
<thelema>
rks_: try adding --zsh
<rks_>
doesn't change anything (in both cases it says " ~/.zshrc is already up-to-date.")
<thelema>
do you have anything for opam in your ~/.zshrc
<thelema>
in any case, try adding something equivalent to what I pasted above, but with .zsh instead of .sh
<rks_>
yes, eval `opam config env`
<thelema>
that won't give you command line completion or the "opam switch eval" script, whatever that is
<rks_>
I'll have a look thelema :)
<rks_>
yes thelema, I know
tianon has quit [Ping timeout: 245 seconds]
ocaml_noob has joined #ocaml
tianon has joined #ocaml
<ocaml_noob>
Hi, I am kinda new to OCaml and I am working with someone else's code. Wondering, how do most people do introspection of types/object, preferably interactively? I am used to Python and dir(). Thanks!
contempt has quit [Ping timeout: 245 seconds]
<thelema>
ocaml_noob: the toplevel is accessible by 'ocaml'; put code in there and it'll show types
<thelema>
otherwise, no runtime introspection is built in
<rks_>
(use merlin, it can show types as well. :-')
cdidd has joined #ocaml
contempt has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
wwilly has quit [Remote host closed the connection]
<ocaml_noob>
Okay thanks, are there ways to generically output types/objects and/or view variant types?
thomasga has joined #ocaml
<ollehar>
ocaml_noob: like javas toString? no
<ollehar>
but when you print something in the toplevel, the type will be seen
<ollehar>
also, the compiler will tell you when something has the wrong type
yacks has quit [Ping timeout: 245 seconds]
zpe has quit [Remote host closed the connection]
<ollehar>
is there any specific reason why type-level programming in ocaml isn't possible the same way it is in haskell? conservative maintainers?
<ocaml_noob>
ollehar: Right. Is there a way to do it more flexibly? The thing is the system I am working with is fairly large, so it is difficult to deal with. Basically the interface I am presented with is that I can write a function that takes this object as a parameter, and I would like to learn more about it. What would be the best way to go about this?
<ollehar>
ocaml_noob: look at the specification, I think.
<ollehar>
the compiler will then yell at you if you're doing it wrong, and tell the type of the object you're using.
<ollehar>
e.g. object#field, if object has no field "field" the compiler will tell "expected object of type bla but have type bla"
<ocaml_noob>
Yes, I suppose I can do this. I was just hoping there would be a more dynamic way to approach it, since like I mentioned, the codebase is fairly large.
nykntks has quit [Remote host closed the connection]
UncleVasya has quit [Quit: UncleVasya]
tianon has joined #ocaml
AdmWiggin has joined #ocaml
AdmWiggi2 has quit [Ping timeout: 276 seconds]
AdmWiggi1 has joined #ocaml
mort___ has joined #ocaml
ccasin has quit [Read error: Operation timed out]
ccasin has joined #ocaml
tianon has quit [Ping timeout: 260 seconds]
AdmWiggin has quit [Ping timeout: 245 seconds]
Trollkastel has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
AdmWiggi1 has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
tianon has joined #ocaml
tianon has quit [Ping timeout: 256 seconds]
tianon has joined #ocaml
dwmw2_go` has joined #ocaml
chambart has joined #ocaml
malo_ has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
wmeyer``` has joined #ocaml
Snark has quit [Quit: leaving]
wmeyer`` has quit [Ping timeout: 240 seconds]
ocp has joined #ocaml
ulfdoz has joined #ocaml
mort___ has quit [Quit: Leaving.]
chambart has joined #ocaml
breakds_ has joined #ocaml
malo_ has quit [Ping timeout: 245 seconds]
Trollkastel has joined #ocaml
malo_ has joined #ocaml
AdmWiggin has joined #ocaml
AdmWiggi1 has joined #ocaml
tianon has quit [Ping timeout: 260 seconds]
tianon has joined #ocaml
AdmWiggin has quit [Ping timeout: 264 seconds]
AdmWiggi1 has quit [Ping timeout: 255 seconds]
_andre has quit [Quit: leaving]
breakds_ has quit [Ping timeout: 264 seconds]
malo_ has quit [Ping timeout: 276 seconds]
gnuvince- is now known as gnuvince
breakds_ has joined #ocaml
malo_ has joined #ocaml
pkrnj has joined #ocaml
ocp has quit [Quit: Leaving.]
weie has quit [Quit: Leaving...]
malo_ has quit [Ping timeout: 245 seconds]
Neros has quit [Remote host closed the connection]
Neros has joined #ocaml
Neros has quit [Remote host closed the connection]
Neros has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
Neros has quit [Remote host closed the connection]
chambart has joined #ocaml
malo_ has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
ttamttam has left #ocaml []
mcclurmc has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
ulfdoz has quit [Ping timeout: 245 seconds]
dtg_ has quit [Read error: Connection reset by peer]
dtg has joined #ocaml
smondet has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
Arsenik has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 252 seconds]
AdmWiggin has joined #ocaml
tianon has quit [Ping timeout: 245 seconds]
tianon has joined #ocaml
AdmWiggi1 has joined #ocaml
frogfoodeater has joined #ocaml
AdmWiggin has quit [Ping timeout: 264 seconds]
AdmWiggin has joined #ocaml
tianon has quit [Ping timeout: 264 seconds]
tianon has joined #ocaml
AdmWiggi1 has quit [Ping timeout: 264 seconds]
frogfoodeater has quit [Ping timeout: 264 seconds]
AdmWiggi1 has joined #ocaml
emmanuelux has joined #ocaml
AdmWiggin has quit [Ping timeout: 256 seconds]
AdmWiggin has joined #ocaml
tianon has quit [Ping timeout: 240 seconds]
AdmWiggi1 has quit [Ping timeout: 248 seconds]
AdmWiggin has quit [Ping timeout: 256 seconds]
tianon has joined #ocaml
AdmWiggin has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
ccasin is now known as cCAPSin
tianon has quit [Ping timeout: 264 seconds]
cCAPSin is now known as ccasin
tianon has joined #ocaml
AdmWiggi1 has joined #ocaml
AdmWiggin has quit [Ping timeout: 256 seconds]
tianon has quit [Ping timeout: 246 seconds]
tianon has joined #ocaml
AdmWiggin has joined #ocaml
AdmWiggi1 has quit [Ping timeout: 245 seconds]
tianon has quit [Ping timeout: 248 seconds]
mk270 has joined #ocaml
<mk270>
so i've just uninstalled ocaml from /usr/bin and /usr/local/bin, to make a fresh start
<mk270>
what is the recommended method of installing it on linux these days?
frogfoodeater has joined #ocaml
eikke has quit [Read error: Operation timed out]
mcclurmc has joined #ocaml
malo_ has quit [Quit: Leaving]
ousado has quit [Read error: Operation timed out]
eikke has joined #ocaml
Neros has joined #ocaml
pkrnj has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
<wmeyer```>
mk270: I'd recomend ocamlbrew + opam, first you install ocaml with ocamlbrew and then install opam
q66 has quit [Read error: Connection reset by peer]
chambart has quit [Ping timeout: 246 seconds]
frogfoodeater has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Remote host closed the connection]
<mk270>
wmeyer```: cheers
<mk270>
though it does worry me that we have yet *more* tool sprawl
<mk270>
it'll cease once every single developer has his/her own tool set
<mk270>
i'd never heard of ocamlbrew until today
<mk270>
next question
<mk270>
if i want to make a project, which uses some complicated libraries (and i'm using opam), how do set up the build environment? oasis?
<wmeyer```>
mk270: so with ocamlbrew is not a problem, as you use it just once, and then rest of the installation is managed by opam (even compilers)
<wmeyer```>
to setup a project, and publish it you have to do just two things: be able to build it and install it, and develop opam package description file
<wmeyer```>
there is no real force for you to use oasis, but oasis has some capabilities that simplify it. What you can try is obuild, at the moment it's got it's momentum
<mk270>
wmeyer```: ok i can live with using ocamlbrew like that
<wmeyer```>
it's a single shell script
<mk270>
for all i know, opam is a single shell script :)
<wmeyer```>
no
<wmeyer```>
opam is a complicated application written in OCaml
<mk270>
yes, i am perfectly aware that opam is not a single shell script, because i have compiled the cunting thing about five times in the last two hours
<mk270>
i was being sarcastic
<wmeyer```>
:)
<wmeyer```>
ok but expect that package management is usually not a trivial thing
<mk270>
yeah, i am reasonably aware of that fact too
<mk270>
so, to run with the cool crowd i want obuild?
<wmeyer```>
yes, I'd try
<mk270>
let's sawy my project is to write an executable which uses some xml library
<wmeyer```>
myself haven't used apart from building obuild itself
<wmeyer```>
but looks like I'd like to
<mk270>
is there a doc which would tell me how to do this?
<wmeyer```>
look at docs for the library you use
<wmeyer```>
which is it?
<rks_>
mk270: ocamlbuild -use-ocamlfind + the appropriate _tags file
<wmeyer```>
rks_: because mk270 what's to ship his library as ocamlfind package, and best would be to allow also install step to make it easier
ousado has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
<rks_>
oh wmeyer```, I didn't see that
<mk270>
cheers
<mk270>
i am not too worried (for *this* project) about shipping with ocamlfind, but it's a reasonable presumption that the next one will want that
fraggle_ has joined #ocaml
<mk270>
does ocamlbuild read or write the _tags file?
<wmeyer```>
rks_: but you are right, I should mention simply about ocamlbuild to be honest
<wmeyer```>
mk270: the answer is no
<wmeyer```>
mk270: it does however read
<wmeyer```>
(i mean you asked if it does write, right?)
<mk270>
yes - so it reads?
<mk270>
but not writes - phew
<wmeyer```>
(oasis however does write, and do it everytime you issue oasis to regenerate files)
ousado_ has joined #ocaml
ousado has quit [Ping timeout: 245 seconds]
<mk270>
i'm still stumped here - how does ocamlbuild know which files are my source code?
<mk270>
if i have
<mk270>
_tags
<wmeyer```>
it does now by trakcing dependencies
<mk270>
and
<mk270>
helloworld.ml
<mk270>
how does it find helloworld.ml?
eikke has joined #ocaml
<rks_>
(ocp-build might be a nice option as well, but I feel like there are lots of different builders out there, sticking with simple ocamlfind - ocamlbuild will probably be good enough for the moment)
<rks_>
mk270: magic!
<mk270>
rks_: the existence of options is *THE PROBLEM*
<wmeyer```>
you say: ocamlbuild helloworld.native and that's it
<rks_>
mk270: yes :p
pkrnj has quit [Quit: Computer has gone to sleep.]