<EM03>
how does say ocaml's purely interpreterd mode compare to python and ruby?
<kaustuv>
OCaml doesn't have a purely interpreted mode
<kaustuv>
If you mean the bytecode interpreter, it is much faster than both python and ruby, but not as fast as the JVM or the .Net cli because it doesn't do any rum-time code generation
Oejet has quit [Ping timeout: 276 seconds]
<EM03>
can I run it from a file kaustuv ?
<EM03>
or do I have to compile it via bytecode first?
<EM03>
I always compiled into bytecode
<kaustuv>
sure, you can write a file with #!/usr/bin/ocaml at the top. However, internally it will compile every phrase before executing it.
_y_ has quit [Ping timeout: 255 seconds]
kaustuv has quit [Remote host closed the connection]
<alexyk>
kaustuv: I run the code using load_mlbx via make -j3, and after a few successful reads, got Fatal error: exception Unix.Unix_error(23, "fork", "")... is it due to a limit of file descriptors? I'm using your last version closing processes...
Associat0r has quit [Ping timeout: 246 seconds]
owst has joined #ocaml
<alexyk>
ulimit -u shows an enormous number -- why would I get the fork error 23 from load_mlbxz?
arubin has joined #ocaml
<alexyk>
actually, I set huge memory options, so fork probably dies when it can't satisfy those...
<thelema>
large stack per process?
EM03 has left #ocaml []
alexyk has quit [Quit: alexyk]
owst has quit [Quit: WeeChat 0.3.4]
owst has joined #ocaml
<owst>
Is it possible to do hide certain members when opening a module? Something like: open List hiding (split);; ?
<owst>
I want to open both Str and List, but use the split method of List.
<owst>
*of String
<owst>
I can order the opens so Str is after List, but that seems a bit unpredictable.
<thelema>
owst: don't open them both.
<thelema>
module L = List module S = Str
<thelema>
and use L.foo and S.bar
<thelema>
also, even after you open them both, List.split is still available
<owst>
Ah, ok, that seems the neatest way. I was hoping to be able to not have to use a prefix to identify the correct method.
<owst>
I didn't know about module - thanks!
enthymeme has joined #ocaml
myu2 has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 246 seconds]
alexyk has joined #ocaml
<alexyk>
thelema: yes, I usually run with OCAMLRUNPARAM=h=7G;s=1G;b1
<thelema>
that would cause problems
<alexyk>
and I get fork error after about 10 processes, when actual RAM consumption reaches physical RAM; when I don't define OCAMLRUNPARAM, I'm OK
<alexyk>
how exactly are h and s related, and to RAM? h seems OK with many processes, when total actual usage reaches physical RAM, system jut swaps
<thelema>
s is minor heap size, h is major heap size
<thelema>
Both measured in words (= x8 for 64-bit, x4 for 32-bit)
lopex has quit []
alexyk has quit [Read error: Connection reset by peer]
tauntaun has quit [Quit: Ex-Chat]
kanak has joined #ocaml
<kanak>
Hi, is there a way to tell the ocaml compiler not to produce any executable but just display the errors and warnings (similar to ghc's -fno-code option)?
<thelema>
kanak: only -c to compile a .cmo/cmx
joewilliams is now known as joewilliams_away
<kanak>
thelema: Thanks. is there a way to not produce even the cmo/cmx files? (I'm using basically trying to hook up the ocaml compiler with emacs so that it displays warnings on my code on the fly, but I currently have all these files created by the compiler lying around)
<thelema>
kanak: I wish you luck in your project, but afaik, there's no way to do that.
alexyk has joined #ocaml
<kanak>
thelema: thank you for your help. I'll just try to get emacs to delete the temp files.
tauntaun has joined #ocaml
metasyntax has quit [Quit: ♫ In our sky there is no limits, and masters we have none; heavy metal is the only one! ♫]
alexyk has quit [Read error: Connection reset by peer]
kanak has quit [Remote host closed the connection]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
tauntaun has quit [Quit: Ex-Chat]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
smerz has quit [Quit: Ex-Chat]
emmanuelux has joined #ocaml
alexyk has joined #ocaml
surikator has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
_y_ has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
myu2 has joined #ocaml
myu2_ has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
myu2 has quit [Ping timeout: 255 seconds]
enthymeme has quit [Quit: brb]
alexyk has joined #ocaml
philtor has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
alexyk has quit [Read error: Connection reset by peer]
arubin has quit [Quit: arubin]
owst has quit [Ping timeout: 246 seconds]
enthymeme has joined #ocaml
ulfdoz has joined #ocaml
alexyk has joined #ocaml
<adrien>
$4.99
<adrien>
Category: Developer Tools
<adrien>
Released: Mar 09, 2011
<adrien>
Version: 4.0
<adrien>
crap
<adrien>
sorry
seafood has joined #ocaml
alexyk has quit [Quit: alexyk]
willb has quit [Read error: Operation timed out]
ulfdoz has quit [Ping timeout: 250 seconds]
yezariaely has joined #ocaml
seafood has quit [Quit: seafood]
ftrvxmtrx has joined #ocaml
<strlen>
does anyon ehave (unofficial) .debs of ocaml 3.12 for ubuntu?
<strlen>
using the unofficial debian-sid ones didn't work :(
yezariaely has left #ocaml []
_y_ has quit [Ping timeout: 252 seconds]
vivanov has quit [Ping timeout: 264 seconds]
surikator has quit [Quit: Scientific discovery is just maximal compression of random strings. Nothing more, nothing less.]
seafood has joined #ocaml
Cyanure has joined #ocaml
seafood has quit [Quit: seafood]
Oejet has joined #ocaml
edwin has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
rixed_ has quit [Ping timeout: 276 seconds]
larhat has joined #ocaml
ikaros has joined #ocaml
enthymeme has quit [Quit: g'night]
vouillon has quit [Read error: Operation timed out]
vouillon has joined #ocaml
Yoric has joined #ocaml
Snark has joined #ocaml
ftrvxmtrx has joined #ocaml
sepp2k has joined #ocaml
_2x2l has quit [Remote host closed the connection]
_2x2l has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
vivanov has joined #ocaml
ftrvxmtrx has joined #ocaml
avsm has joined #ocaml
_y_ has joined #ocaml
npouillard has joined #ocaml
npouillard has quit [Client Quit]
npouillard has joined #ocaml
vouillon has quit [Read error: Connection reset by peer]
_y_ has quit [Ping timeout: 252 seconds]
Oejet has quit [Quit: Leaving.]
lopex has joined #ocaml
metasyntax has joined #ocaml
_andre has joined #ocaml
vivanov has quit [Ping timeout: 252 seconds]
_y_ has joined #ocaml
vivanov has joined #ocaml
tauntaun has joined #ocaml
vouillon has joined #ocaml
rixed has joined #ocaml
sepp2k1 has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
sepp2k has quit [Ping timeout: 255 seconds]
larhat has quit [Remote host closed the connection]
larhat has joined #ocaml
owst has joined #ocaml
tauntaun has quit [Quit: Ex-Chat]
owst has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
ftrvxmtrx has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx__ has joined #ocaml
ftrvxmtrx has quit [Disconnected by services]
ftrvxmtrx_ has quit [Disconnected by services]
ftrvxmtrx__ has quit [Client Quit]
ftrvxmtrx has joined #ocaml
myu2_ has quit [Remote host closed the connection]
munga has joined #ocaml
ikaros has quit [Ping timeout: 276 seconds]
ikaros has joined #ocaml
robthebob has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 255 seconds]
seafood has joined #ocaml
owst has joined #ocaml
dnolen has joined #ocaml
eelte has quit [Quit: 0x2a]
munga has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
seafood has quit [Ping timeout: 276 seconds]
boscop has joined #ocaml
ttamttam has joined #ocaml
myu2 has joined #ocaml
willb has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Operation timed out]
munga has joined #ocaml
munga has quit [Ping timeout: 250 seconds]
dnolen has quit [Quit: dnolen]
er98052 has joined #ocaml
xl0 has quit [Remote host closed the connection]
tauntaun has joined #ocaml
tauntaun has quit [Read error: Connection reset by peer]
joko has joined #ocaml
<joko>
Hello, what would be the best way to read a text file in OCaml?
<thelema>
joko: do you want a list of strings (one per line) or one huge string for the whole file or a bigarray of characters?
<joko>
thelema: My text file has a certain format: I have to read x lines after a specific line and the width of each line is not fixed.
<thelema>
well, input_line seems appropriate for you - it reads one line from an in_channel as a string
<thelema>
we have ocamldoc, we don't have anything as nice as this
<bitbckt>
I'll see if I can pry it out of the EPFL's hands.
<thelema>
that said, the libraries that come with ocaml could fit on the head of a pin compared to this
munga has quit [Read error: Operation timed out]
<thelema>
But it'd be nice to have a "all ocaml libraries" compendium
<mrvn>
I don't mind each package bringing its own docs. They just could be nicer.
<bitbckt>
both the packages and the docs. :P
<mrvn>
Modules should also come with examples on how to use them imho.
<bitbckt>
I wish I had more time to contribute around here.
trch has joined #ocaml
<thelema>
mrvn: yes, but imagine a central repo for all ocaml docs - if you're looking for a particular function, it might be findable in this library, and you'd know what package to odb install
<mrvn>
thelema: make them so they can be gathered into a larger collection. If they are generated that shouldn't be too hard.
<EM03>
do you guys consider ocaml to be a sane language?
<thelema>
mrvn: exactly, most projects have ocamldocs
<bitbckt>
EM03: in which sense?
<thelema>
EM03: usually - what's the insanity you're experiencing?
<EM03>
that it makes sense? and is a replacement for another language of your choice
<EM03>
I like scheme but I don't think its a sane language :P
<thelema>
EM03: it's what I use for my programming.
<bitbckt>
As long as I stay out of the object system, I like it.
<mrvn>
EM03: it can certainly replace scheme.
Oejet has joined #ocaml
<EM03>
I like how ocaml keeps in a unix environment
<EM03>
and I know there is many schemes etc but still
<adrien>
don't really the object system either, but I have to use it
<bitbckt>
I've been thinking about rewriting the Thrift compiler for OCaml to offer an alternative.
<bitbckt>
That's the only time I'm forced into the object system, right now.
<EM03>
bigloo scheme is by the same research foundation as ocaml right?
<thelema>
EM03: if it's INRIA, then yes
<EM03>
i would like to become a scheme and more of an ocaml master :)
<thelema>
well, pick one, as mastering two things at once is distracting
<mrvn>
and scheme is rather useless. It is a nice language to teach basic functional programming but nothing for real life.
<EM03>
well I can become just "ok" in both as well :P
<EM03>
bigloo has a ton of libraries
<mrvn>
scheme is something you learn, understand and never use again. :)
<EM03>
why do you want to ruin the party? hehe
<flux>
atleast you learn to configure emacs.
ulfdoz has joined #ocaml
<adrien>
writing ocaml actually taught me lisp ;-)
<mrvn>
not that much of a similarity
<mrvn>
It isn't a proper lisp program if it doesn't end in 10 closing parens.
Smerdyakov has joined #ocaml
ymasory has joined #ocaml
<thelema>
mrvn: hmm, lisp could benefit from |>
_y_ has joined #ocaml
Associat0r has joined #ocaml
<hcarty>
thelema: I think Gerd has a searchable, rather large suite of OCaml documentation grouped together
<hcarty>
EM03: Regarding "scripting" OCaml - there is also ocamlscript which allows you to run an OCaml program like a script, but it automatically compiles the program to native code on execution.
<mfp>
thelema: note that the site is Created using Sphinx 1.0.7+/e718cc9843bc.
<thelema>
_y_: generally better to leave things public so that others can learn
<_y_>
ok, although it's a bit more loquacious than usual
<thelema>
mfp: sphinx documentation seems nice so far, but the scala documentation is much better presented
<thelema>
_y_: that's fine
<_y_>
so in my binary program analysis framework, I require control flow graphs which are adorned with a variety of types of information, such as raw assembly language from various platform, or various IRs, etc. for this, I have created a module called CFG which has the type of the instructions abstracted out, and a "make" functor which produces a module corresponding to a specific type of information. this all works fine.
<mfp>
thelema: scala's looks like a prettier ocamldoc (i.e., API-oriented) to me, sphinx seems able to manage non-API documentation better
<_y_>
over the past two days, I wrote a function which generically produces a control flow graph, given as input a disassembler function which produces the aforementioned information types (i.e. X86.insn) and also some representation of the flow of control coming out of each individual instruction. using a piece of advice you gave me yesterday, and some thinking / researching, I was able to turn this into a module as well, so it can produce a CFG of a
<_y_>
however, I wrote the individual disassembler instances inside of the CFGBuild.ml file, and for the sake of code cleanliness I would like to move these to other files. this leaves me in the pickle of having to write a proper signature for this stuff that I can put in a header file, and I am baffled
<thelema>
_y_: you don't *have* to write .cmi files, and if you want, ocamlc can produce them for you with the -i flag
<_y_>
I'm aware of that, but what -i produces is hideous, it's a complete expansion of the CFG module
<_y_>
yeah, that's the rather hideous internal representation of the graph ... would be nice to just say "it's a CFG with type lang = whatever"
Samuel___ has joined #ocaml
<mrvn>
_y_: I'm afraid that you have to beautify yourself.
<thelema>
ah, maybe adding some annotations to your functor types will help...
Samuel___ is now known as HoraseLunums
vivanov has quit [Quit: Lost terminal]
<thelema>
hmm, maybe not...
<thelema>
yes, I think you might be stuck prettifying things.
mnabil has joined #ocaml
<_y_>
I was hoping I could declare a module type right in the signature (i.e. module C = CFG.CFG with type language = t) and then reference C.G.t in the type signature, but it seems impossible to put a module declaration into a module signature
<thelema>
? it should be possible
<thelema>
module C : CFG.CFG with type language = t
<thelema>
well, if you actually have that module defined.
<thelema>
you can't just add type aliases into module signatures
<thelema>
s/type/module type/
<_y_>
CFG.CFG exists, if that's what you're saying; it's from the pastebins from above
<thelema>
you want to simplify your last pastebin, right?
vivanov has joined #ocaml
<_y_>
yeah
<_y_>
tremendously
<thelema>
in your .ml file, specify a module type for the output of MakeGraphBuilder
<_y_>
alright, I'm going to go back to beating on this, you might hear more about this over the next day or two ... and I appreciate your help, you and mrvn both
<hcarty>
Once Batteries moves to requiring OCaml >=3.12.0, this kind of stripping of submodules could make updating Batteries to match new stdlib changes a bit easier.
<thelema>
hcarty: ? stripping submodules? we do our best to only add to stdlib
<hcarty>
thelema: But in order to extend a module like Bigarray.Array1, you need to copy and paste all of the signature and contents of the Bigarray module
trch has quit [Read error: Operation timed out]
<thelema>
include + extend
vivanov has quit [Quit: leaving]
<hcarty>
thelema: If the submodules were stripped, then each one could be handled separately. So there would be no need (or significantly less need) to copy and paste code
<thelema>
fair enough.
<hcarty>
Adding a map function to Bigarray.Array1 requires reproducing the entire contents of the Bigarray module as BatBigarray, for example
_y_ has quit [Ping timeout: 250 seconds]
<thelema>
Bigarray is the only module I'm particularly worried about on this - the other modules we do this on: Set, Map, Hashtbl will likely get re-implemented by us
<thelema>
and by us, I mean bluestorm
<hcarty>
I'm wondering about this outside of Batteries as well - extending any submodule becomes messy.
<hcarty>
Maybe namespace support can help with this
<thelema>
well, one good way done by other language is to allow child packages, which have access to the internals of the package to be extended
korya has quit [Read error: Connection timed out]
Cyanure has quit [Remote host closed the connection]
korya has joined #ocaml
HoraseLunums has quit [Remote host closed the connection]
ymasory has quit [Ping timeout: 252 seconds]
agarwal1975 has joined #ocaml
munga has quit [Ping timeout: 246 seconds]
philtor has quit [Ping timeout: 255 seconds]
tauntaun has joined #ocaml
myu2 has joined #ocaml
Oejet has quit [Ping timeout: 276 seconds]
HoraseLunums has joined #ocaml
HoraseLunums has quit [Remote host closed the connection]
korya has quit [Ping timeout: 240 seconds]
korya has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
jonafan_ has joined #ocaml
jonafan has quit [Ping timeout: 264 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
alpounet has quit [Ping timeout: 248 seconds]
edwin has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 246 seconds]
alpounet has joined #ocaml
er98052 has quit [Quit: er98052]
ygrek has joined #ocaml
owst has joined #ocaml
owst has quit [Ping timeout: 255 seconds]
jonafan_ is now known as jonafan
ygrek has quit [Ping timeout: 246 seconds]
Amorphous has quit [Ping timeout: 248 seconds]
philtor has joined #ocaml
Amorphous has joined #ocaml
Yoric has quit [Quit: Yoric]
__marius1_ has quit [Ping timeout: 240 seconds]
__marius__ has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]