<adrien>
yminsky: what are the worst cases so far?
<adrien>
(yes, I'm a pessimist)
Stany has joined #ocaml
Tamae has quit [Ping timeout: 244 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcat has joined #ocaml
<yminsky>
adrien: I don't really have much to share yet. I've only heard a few benchmarks described, and so far its all been good.
manizzle has joined #ocaml
<yminsky>
It does seem that compilation time is an issue we need to think about. But for the first release, it's not the end of the world if it's slow, as long as it can be disabled.
<adrien>
ok :)
<adrien>
also, I do mind slower compile times but I don't mind a slower rebuild before releasing
<adrien>
typically we're not talking about C++ compile times which take hours for small projects
<adrien>
(good night)
<yminsky>
Good night!
manizzle has quit [Ping timeout: 256 seconds]
badon has quit [Quit: Leaving]
systmkor has joined #ocaml
swgillespie has joined #ocaml
<tobiasBora>
Hello !
<tobiasBora>
I would like to know if there is a simple way to detect/avoir errors like "The files ... and ... make inconsistent assumptions over interface ..."
<tobiasBora>
Every time I add new functions to a library I need to clean/recompile every .cmi files...
badon has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcat_ has joined #ocaml
<rom1504>
sounds like your build process is broken
hilquias has joined #ocaml
mcc has joined #ocaml
<tobiasBora>
rom1504: Well if an external lib changes isn't it normal that the files are differents ?
<tobiasBora>
And I have another question
<tobiasBora>
A function takes an out_channel in input and write some texts in it
<tobiasBora>
and I would like to be able to do some tests to see if I want to put the output in this out_channel or not
<tobiasBora>
however I cannot modify the function that takes the out_channel
<tobiasBora>
so I would like to know if there is a way to create it's own out_channel that can do some tests before writing it in stdout
Tamae has joined #ocaml
<tobiasBora>
(and if I could add some text (for example the time the requests occured) it would be nice)
Stany has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
badkins has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrScout has quit [Read error: Connection reset by peer]
adc90 has quit [Read error: Connection reset by peer]
adc90 has joined #ocaml
MrScout has joined #ocaml
keen________ has quit [Read error: Connection reset by peer]
keen________ has joined #ocaml
<nullcat_>
\ping rgrinberg
darkf has joined #ocaml
badkins has quit []
idegen has quit [Quit: Leaving.]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ygrek has quit [Ping timeout: 264 seconds]
MrScout has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
<l1x>
hey guys i am trying to use Batteries but it is a little confusing
<rgrinberg>
hello :P
<l1x>
how can i convert File.lines_of (string BatEnum.t) to a string list?
<rgrinberg>
l1x: use List.of_enum
<l1x>
rgrinberg: great tanks :)
<rgrinberg>
l1x: :)
<l1x>
i am a total noob
<rgrinberg>
l1x: cool, what language are you coming from?
systmkor has quit [Read error: Connection reset by peer]
<l1x>
clojure, erlang
<l1x>
but i do mostly python, java at work
systmkor has joined #ocaml
<l1x>
how about you?
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
<rgrinberg>
the languages you've listed minus clojure
<rgrinberg>
but i get compensated with a lot of JS instead :P
<l1x>
:)
<l1x>
i see you are on #riak too
<l1x>
i used to do a tonn of riak
<l1x>
i wrote a tool to clean up keys in Erlang it was so much fun. no OTP experience yet though.
<l1x>
ocaml is a good candidate to replace admin code, as much as I can understand it now. i dont know how concurrency works yet, but I guess it also falls to the category of languages where concurrency is an afterthought (unlike Erlang)
<rgrinberg>
"after thought" is a little strong. It's simply isn't builtin
chambart has quit [Ping timeout: 264 seconds]
<l1x>
yeah, this is what i meant
<l1x>
but that is not a big deal, just limits a little bit the potential use cases (almost like Ruby)
pii4 has quit [Ping timeout: 256 seconds]
<l1x>
have you used lwt by any chance?
<rgrinberg>
l1x: yep
<rgrinberg>
dora-molly: does merlin accept ../ in B and S instructions in .merlin?
psy_ has quit [Read error: Connection reset by peer]
psy_ has joined #ocaml
<dora-molly>
rgrinberg: yes
mcc has quit [Quit: This computer has gone to sleep]
<adrien>
(and if you need more context, remove the "-e pipe" and add "-o some_log_file"
<adrien>
)
<smtb>
Thanks!
<flux>
smtb, but if it's a general socket-using applicatino, the fault is likely writing to a socket after a peer has closed it
rgrinberg has joined #ocaml
mspo has joined #ocaml
<adrien>
it's quite likely to be EPIPE but that means something has setup a SIG_IGN handler for SIGPIPE and in that case it would be interesting to know which frameworks are in use
rgrinberg has quit [Ping timeout: 258 seconds]
rgrinberg has joined #ocaml
leafac has quit [Ping timeout: 250 seconds]
chambart has quit [Ping timeout: 255 seconds]
Haudegen has quit [Ping timeout: 265 seconds]
shinnya has joined #ocaml
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
<smtb>
Well I think that the problem is arising due to the use of Lwt.
<smtb>
I must be doing something wrong with the library
Haudegen has joined #ocaml
leafac has joined #ocaml
<adrien>
if the signal handler weren't there, your process would be killed by the kernel
rgrinberg has quit [Ping timeout: 256 seconds]
<adrien>
having it turned into an exception means you can handle it
<adrien>
unfortunately there is no standard way to not receive SIGPIPEs when writing to a pipe which other end has been closed
Hannibal_Smith has quit [Quit: Leaving]
<smtb>
How sholud I begin looking at the output? I don't have much experience with this type of stuff? Do you know of a good tutorial / reference you could point me to?
<adrien>
output of strace?
<smtb>
yes
<adrien>
well, what was the last line mentioning "pipe" in the first command I gave you?
<mfp>
let _ = Sys.set_signal Sys.sigpipe Sys.Signal_ignore is std practice when using lwt
<flux>
adrien, "no standard way" isn't setting SIGPIPE to SIG_IGN exactly that?
<adrien>
flux: sorry, on a per-call basis
<mfp>
wait a sec, Unix_error 15 is EMFILE, not EPIPE
<adrien>
hmm
<flux>
mfp, are you looking at errno.h?
<flux>
I think the numbers are off-by-one cmopared to that
<flux>
actually what is the second field anyway. you're creating a pipe?-)
<adrien>
"function name"
<smtb>
The output generated is also a massive file, from ~10min of the native file runnig it has generated appx. 37.5 MB
<adrien>
(just checked the doc)
rgrinberg has joined #ocaml
<adrien>
smtb: for the second command or for the first one?
<flux>
but yes, mfp is correct
<smtb>
the second command
<mfp>
flux: the error type definition in unix.mli
<flux>
EMFILE Too many file descriptors are in use by the process.
<adrien>
ah :)
<adrien>
nice catch :)
<flux>
got tricked by the too-common-error-aspect :-)
<smtb>
I have had issues with too many file descriptors in the past when using Lwt and never really figured out how to solve them
<adrien>
flux: ;p
<adrien>
smtb: well, strace is your friend then
<adrien>
actually you have several friends there
<mfp>
seems the "pipe" string lead everybody to think "yep, SIGPIPE" :)
<adrien>
strace being one
<adrien>
and another one being to look at /proc/<pid>/fd (ls -l on that directory)
<mfp>
*led
<adrien>
you will be able to see which file descriptors are not being closed
<ggole>
Probably an fd leak
<smtb>
Could it be an issue if I am have my program entry point set up like this:
<ggole>
Fun to track down
<smtb>
let main () = while true do Lwt_main.run @@ (Lwt returning function); done;; let () = main ()
<smtb>
where (Lwt returning function) has type unit -> unit Lwt.t
<ggole>
smtb: one thing to try is to filter out everything but open and close from the strace output
<mfp>
smtb: strace -e trace=open,close -p PID
rgrinberg has quit [Ping timeout: 252 seconds]
<adrien>
and pipe :)
<adrien>
at least
<ggole>
Uh, yeah
<adrien>
I'd also add socket probably
<ggole>
Or maybe trace=desc or whatever that is
<ggole>
-e trace=desc Trace all file descriptor related system calls.
<adrien>
oh, wasn't aware of that one, it's nice to have it
<smtb>
so something like this: strace -e trace=open,close,pipe,desc -p PID -tt -o error_log.txt -s 128 -f ./my_file.native
<mfp>
huh this looks like a bug in ocaml-ssl Ssl.Read_error Ssl.Error_syscall when the other end closes -> http://paste.debian.net/182632/
<mfp>
also happens against openssl s_server
<mfp>
expected a Error_zero_return or simply Ssl.read to return 0
<mfp>
I'm seeing this w/ openssl 1.0.1e-2+deb7u16, can anybody reproduce? (build command included in paste)
nullcat has joined #ocaml
pyon has joined #ocaml
pyon has quit [Client Quit]
inf-gropeoid has joined #ocaml
<mfp>
false alarm, it's _both_ google.com and openssl s_server not performing a clean TLS shutdown, facebook.com does and we get a Error_zero_return
<adrien>
the wonderful world of ssl and tls
<mfp>
I already suspected google.com was cheating, but I thought openssl s_server at least would do the proper thing
<adrien>
that's actually what should have made you doubt :P
<mfp>
fwiw microsoft.com does No Evil and actually does TLS-shutdown + tell me that the requested url "/" is invalid
BitPuffin|osx has joined #ocaml
<mfp>
yay akamai
mort___ has joined #ocaml
<mspo>
try some other cdn
<nullcat>
rgriberg: hi
<mfp>
akamai is not very smart is it, GET / HTTP/1.0 returns 400, bad url "/" same with GET / HTTP/1.1\r\nHost: microsoft.com it actually has to be Host: www.microsoft.com
leafac has quit [Ping timeout: 244 seconds]
<mspo>
mfp: most cdn work like that
<mspo>
how else would they route anything?
<mfp>
couldn't it also route microsoft.com instead of relying on the CNAME only?
<mfp>
(note that it chokes on Host: microsoft.com)
<mspo>
mfp: microsoft probably would have to set it up. They might not have their apex domain pointed to an akamai IP address, so skipped it
<mspo>
mfp: which is something someone would do, like I do every single day at my job ;)
<mspo>
.. and I'm right
<mspo>
mfp: 134.170.185.46 (what dig microsoft.com gives me) is MS IP space, www pointed me to akamai
<mfp>
anyway, it shuts down TLS properly, so it's official, Microsoft is more developer-friendly than Google, you can test ocaml-ssl against the former's servers but not the latter's :)
<mspo>
I suspect 134.170.185.46 will redirect me
<mfp>
ah yes, I did connect to www.microsoft.com but then say Host: microsoft.com and akamai barfed on it, my fault :)
<mspo>
shouldn't the client handle common use cases?