* companion_cube
should find some infix version of CCList.range' (excludes right bound)
<Drup>
There are various range operators in BatEnum
<Drup>
I think --- is the one with right bound excluded
<companion_cube>
the point is that (--) works both for decreasing and increasing ranges, so it will never be empty
<companion_cube>
(in my version)
<ygrek>
ia0, Std.input_file in extlib and I believe batteries
thomasga has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
englishm has joined #ocaml
pyon has quit [Quit: Fiat justitia ruat caelum.]
ygrek has quit [Ping timeout: 245 seconds]
zozozo has quit [Ping timeout: 240 seconds]
bitbckt_ has quit [Ping timeout: 240 seconds]
bitbckt has joined #ocaml
BitPuffin has joined #ocaml
pyon has joined #ocaml
thomasga has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 255 seconds]
darroyo has quit [Ping timeout: 255 seconds]
shinnya has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
darroyo has joined #ocaml
samrat has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
darroyo has quit [Ping timeout: 260 seconds]
nojb` has quit [Remote host closed the connection]
_0xAX has quit [Remote host closed the connection]
fold has joined #ocaml
michael_lee has quit [Remote host closed the connection]
agarwal1975 has joined #ocaml
nojb has joined #ocaml
rand000 has joined #ocaml
travisbrady has joined #ocaml
agarwal1975 has quit [Client Quit]
agarwal1975 has joined #ocaml
amirmc has joined #ocaml
agarwal1975 has quit [Client Quit]
tac_ has joined #ocaml
morepious has joined #ocaml
morepious has left #ocaml ["Leaving"]
tac_ has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
agarwal1975 has joined #ocaml
tane has joined #ocaml
arj has quit [Quit: Leaving.]
yomimono has joined #ocaml
<ebzzry>
How can I catch a `Sys_error: "foo.txt" Permission denied' exception using `try'?
<Drup>
try ... with Sys_error m -> ..."
tac_ has joined #ocaml
<ebzzry>
Drup: I did that with http://pastebin.com/sBmCSZUx. Presuming "ro.txt" is a read-only file, when I `copy_file "foo.txt" "ro.txt"' I get "Exception: Sys_error "ro.txt: Permission denied", instead of "error". Why?
<Drup>
I suppose it's because the exception is raised by open_out, which is not inside the try .. with
<ebzzry>
Drup: Ah, ya. When I moved the calls to `open_in' and `open_out' to the scope of try/with, it worked. However, how can I close `ic' and `oc' with it?
tac_ has joined #ocaml
typedlambda has quit [Ping timeout: 250 seconds]
cody__ has joined #ocaml
<Drup>
I think you will need separate handlers to close everything properly
<adrien_oww>
yeah, no finally
typedlambda has joined #ocaml
<companion_cube>
you can write a "finally" function
Hannibal_Smith has joined #ocaml
eikke__ has quit [Ping timeout: 250 seconds]
rand000 has quit [Ping timeout: 240 seconds]
<ebzzry>
How can/should I do that?
samrat has quit [Quit: Computer has gone to sleep.]
<nojb>
is it supposed to be installed separately ?
<Drup>
no it's not
<Drup>
but something about those libraries was changed recently, but can't remember how
<Drup>
does it complains if you don't put +nat.js at all ?
<nojb>
yeah, it says that certain primitives that have _nat_ in the name could not be found
<Drup>
right
<Drup>
I don't remember how to do it with older js_of_ocaml, but if you use dev version, you shouldn't need to add anything
locallycompact has joined #ocaml
<nojb>
Great - I will try that . Thanks !
<Drup>
try "+js_of_ocaml/nat.js" instead
<nojb>
No, that does not work either ...
<Drup>
you did put -I before, didn't you ?
<nojb>
Ahh .. No, I did not - but it does not seem to matter . If I put it, then it does not complain that it does not exist, but it still reports that the symbols involving _nat_ are not present
<nojb>
*it does not complain that nat.js does not exist*
<Drup>
meh
<Drup>
jpdeplaix: do you know ?
philtor has joined #ocaml
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
pgomes has joined #ocaml
<nojb>
Drup: it works with the github version, thanks. I still had to write +nat.js to make it work.
Kakadu has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
travisbrady has joined #ocaml
<dmbaturin>
Writing in barely familiar language is fun: you can get carried away by trying to implement something and spend an hour before you realize the algorithm was flawed. :)
ygrek has quit [Ping timeout: 244 seconds]
slash^1 has quit [Read error: Connection reset by peer]
Nahra has quit [Ping timeout: 272 seconds]
yomimono has joined #ocaml
Nahra has joined #ocaml
tac_ has quit [Ping timeout: 255 seconds]
rgrinberg has quit [Quit: Leaving.]
nojb has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
<Drup>
dmbaturin: but if it typecheckes, it workes !
<Drup>
works*
<Drup>
;)
<dmbaturin>
Drup: s/works/compiles/ :)
<Drup>
no no, works :p
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<dmbaturin>
I agree that this kind of typechecking prevents most, if not all, accidental coding errors though.
<Drup>
(It's only an humorous static typing proverb :p)
studybot has quit [Remote host closed the connection]
<dmbaturin>
Ada typechecking is very hard to accidentally violate as well.
studybot has joined #ocaml
sepp2k has quit [Quit: Konversation terminated!]
sepp2k has joined #ocaml
<papna>
dmbaturin: What are 'accidental coding errors'?
sepp2k has quit [Client Quit]
<jerith>
I try to avoid deliberate coding errors. ;-)
dpk` has joined #ocaml
<ggole>
Deliberate errors can be useful in some circumstances. To figure out if a test suite covers a certain class of error, for instance.
scriptdevil has joined #ocaml
<scriptdevil>
Is there a reason why the order of labelled arguments must be retained in higher-order functions?
<dmbaturin>
papna: if(a = 0) { ... }
<papna>
dmbaturin: Ah, it's that one thing. Not really a hard one to avoid any number of ways
pgomes has quit [Quit: Leaving]
thomasga has quit [Ping timeout: 260 seconds]
<dmbaturin>
What I don't like about python is that many errors are hidden until you run it (not too hard to avoid, but still).
<Drup>
scriptdevil: the only reason is that the typechecker is not clever enough to figure it out
<papna>
dmbaturin: I agree that a good static type system has the opportunity to help you write non-buggy code; I find it more than a little ridiculous to think 'this kind of typechecking prevents most, if not all, accidental coding errors'
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troutwine is now known as troutwine_away
_0xAX has quit [Remote host closed the connection]
maattdd has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
eikke__ has joined #ocaml
manizzle has joined #ocaml
girrig has quit [Ping timeout: 250 seconds]
ollehar has joined #ocaml
Anarchos has joined #ocaml
ollehar has quit [Client Quit]
girrig has joined #ocaml
troutwine_away is now known as troutwine
ggole has quit []
dpk` has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
rgrinberg has joined #ocaml
_andre has quit [Quit: leaving]
<companion_cube>
dmbaturin: you might also be interested in merlin, to obtain the types of expressions in your editor
girrig has quit [Ping timeout: 260 seconds]
<dmbaturin>
companion_cube: Yeah, I should try that.
<def`>
dmbaturin: by the way, I added annotation of tail positions / tail calls in latest merlin git (not official release)
girrig has joined #ocaml
Nahra has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 272 seconds]
Nahra has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
adrien has quit [Ping timeout: 240 seconds]
Asmadeus has quit [Ping timeout: 250 seconds]
axiles has quit [Remote host closed the connection]
englishm has quit [Ping timeout: 244 seconds]
englishm_ has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
englishm_ has quit [Remote host closed the connection]
malo has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
travisbrady has quit [Quit: travisbrady]
hhugo has joined #ocaml
travisbrady has joined #ocaml
arjunguha has joined #ocaml
Arsenik has quit [Remote host closed the connection]
shinnya has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
arjunguha has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
travisbrady has quit [Quit: travisbrady]
yomimono has quit [Ping timeout: 240 seconds]
arjunguha has joined #ocaml
<nlucaroni>
What is the current status on mirageOS on Docker?
hhugo has quit [Quit: Leaving.]
Asmadeus has joined #ocaml
jwatzman|work has joined #ocaml
jwatzman|work has quit [Client Quit]
Nahra has quit [Remote host closed the connection]
dapz has joined #ocaml
Nahra has joined #ocaml
<smondet>
nlucaroni: not sure what you mean, but just to let you know that there is a #mirage (quite active but sometimes used by Cambridge people to meetup for lunch and so on :) )
jao has quit [Ping timeout: 250 seconds]
eikke__ has quit [Ping timeout: 250 seconds]
jwatzman|work has joined #ocaml
philtor_ has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
albino has quit [Ping timeout: 260 seconds]
rand000 has quit [Quit: leaving]
Kakadu has quit [Quit: Konversation terminated!]
agarwal1975 has quit [Quit: agarwal1975]
albino has joined #ocaml
thomasga has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
philtor_ has quit [Ping timeout: 264 seconds]
__cody__ has quit [Remote host closed the connection]
cody__ has quit [Remote host closed the connection]
lusory has quit [Quit: leaving]
darkf has joined #ocaml
locallycompact has quit [Ping timeout: 250 seconds]
agarwal1975 has joined #ocaml
S11001001 has quit [Quit: bye bye for now]
racycle has quit [Ping timeout: 250 seconds]
racycle has joined #ocaml
<arjunguha>
does anyone know how to coax ocamlbuild/oasis to pass an extra flag to the compiler? Can I do this without hacking the myocamlbuild.ml that oasis produces?