<thelema>
laurus: I don't believe it's because of parallel GC that ocaml isn't rising
<laurus>
thelema, ok :) I'd much rather use OCaml than F# because I don't even use Windows
<laurus>
I think that poster is being disingenuous because he makes more money off of F# than OCaml
<laurus>
Are you familiar with his "LLVM"?
<thelema>
his is HLVM, which compiles an ocaml-like language to llvm bytecode
<laurus>
Ah, I see...
<laurus>
Is it important at all?
<thelema>
not yet. He's made it perform a couple things well, but it's nowhere as complete a language as ocaml
<laurus>
Let me explain why I'm wondering about all of this
<laurus>
I'm trying to set up a system to do economics/statistics related research, so I'm trying to pick a good programming language
<laurus>
My needs are to write custom programs, do econometrics/statistics analyses, generate plots/graphs, etc.
<laurus>
I already know Python but I'm concerned with its lack of strong and static typing
<laurus>
Do I have any use for OCaml?
Edward_ has quit []
<thelema>
generate your output data, plot with whatever you like - excel even will work.
<thelema>
If you know enough statistics, R is a good tool for that part of it.
<thelema>
The economics modeling probably should be done in a strongly typed, efficient language
<laurus>
:)
<laurus>
I guess I will use R + OCaml then!
<laurus>
I have used GNUPlot in the past for plotting...
<laurus>
But I think R has very strong plotting capabilities as well doesn't it?
waterChip has joined #ocaml
waterChip has quit [Client Quit]
<thelema>
GNUplot will plot well too, but for statistics, you'll want the builtin functions of R
<laurus>
Thanks thelema!
laurus has left #ocaml []
roconnor has quit [Remote host closed the connection]
oc13 has joined #ocaml
BiDOrD has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
ygrek_ has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
<adrien>
surprisingly enough, there was a recent mailing-list message saying that ocaml in the industry was performing well currently
<adrien>
also, is the number of messages on the caml-list relevant? if it is used for help, if people search the archives, there should be less and less messages :-)
<julm>
morning dude
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
mjonsson has quit [Remote host closed the connection]
mjonsson has joined #ocaml
mjonsson has quit [Remote host closed the connection]
oriba has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
<Anarchos>
adrien i tried every combination and no way to let systhreads work .
<Anarchos>
I am looking for an example on how to use systhreads
ikaros has joined #ocaml
boscop has joined #ocaml
<adrien>
Anarchos: you might want to have a look at lablgtk(2)
<adrien>
gtk*Props.ml files are auto-generated, you don't care about them, gtk*.ml are hand-written, g[A-Z].*\.ml files are for the object layer only and you don't really care about them either
<adrien>
ml_*.c files are the C bindings, inside them, you'll find ML_X macros which implementation might be interesting (not sure)
<Anarchos>
ok
<adrien>
inside lablgtk2's src/ folder, you might want to see the files with "glib", "gobject" or "thread" in their names
<adrien>
lablgtk2 uses ocaml threads for its threading, not C/glib ones
<adrien>
but actually I'm wondering if it's thread-safe from the C side, because it doesn't have the g_thread_init function which is needed when you want glib/gtk/* to use threads but it had it at some point, so, maybe
<adrien>
also, I think that mrvn did bindings to fuse and/or libaio which maybe used some threading (I think they are hosted on the ocaml forge)
<Anarchos>
there is no call to caml_c_thread_register in it , i wonder how they register C threads to OCAMl
<flux>
what C threads?
<adrien>
hmmm, that's why I remembered but later: lablgtk uses ocaml threads
<adrien>
(now, I'm fearing it might break if several C threads have ocaml callbacks)
<Anarchos>
adrien there is caml_c_thread register to circumvent this break
<Anarchos>
flux i try to use caml_c_thread_regsister
<adrien>
Anarchos: yeah, my problem is that if lablgtk2 doesn't already use it, letting glib be threaded might be introduce some bugs
<Anarchos>
glib ? what is it ?
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<adrien>
the base library for gtk
<adrien>
rah
Anarchos has joined #ocaml
<Anarchos>
flux i can find no example on how to use it
<adrien>
I tried the koders.com and google code search but found no mention of these calls
<adrien>
Anarchos: are you 3.12?
<adrien>
as far as I can tell, this function along with caml_{acquire,release}_runtime_system appeared in 3.12 (Apr 27 in svn to be precise) and it's not surprising there are no examples, best bet would be to contact "db" ( http://caml.inria.fr/mantis/view.php?id=4702 )
oriba has quit [Ping timeout: 240 seconds]
<adrien>
also, that means I finally have an answer for Yoann Padioleau's post on the caml-list from last week (how to call ocaml from c, and how to be thread-safe)
Associat0r has joined #ocaml
rfg has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
oriba has joined #ocaml
pikachuyann has joined #ocaml
<Anarchos>
adrien yes i am 3.13.0+dev1
<Anarchos>
adrien yes but it crashes on my system :)
<Anarchos>
adrien they could have put an example in the doc ...
<adrien>
Anarchos: yeah, you really ought to post on the mailing-list
<Anarchos>
adrien i will think to it :)
<adrien>
in particular, someone else is facing the same issues so it's double worth it
ygrek_ has quit [Remote host closed the connection]
<Anarchos>
yoann?
<adrien>
yup
<Anarchos>
if i guess well, i need to call caml_c_thread_register before calling CAMLlocal/CAMLParam/callback/CAMLretmurn
ygrek_ has joined #ocaml
ulfdoz has quit [Quit: brb]
Oejet has joined #ocaml
ulfdoz has joined #ocaml
<Anarchos>
adrien can you point me to the message of yoann ?
<Anarchos>
adrien it is not already the same : he wants to have multiple ocamlruntime runinng in parallel
<Anarchos>
i want only one runtime accessed by many C threads
<adrien>
the way I understood it, he wanted to have threads but also, if possible, take advantage of SMP to speed things up, having several threads even if they don't run concurrently would be a first step
orbitz has joined #ocaml
<Anarchos>
my problem is i can only have one runtime cause it keeps reference on global objects.
<thelema>
MarcWeber: that's the one. Batteries also has some facility to build printers for parameterized types
<thelema>
MarcWeber: yes, I agree it's ugly, but it's needed for unambiguous typechecking
<thelema>
with separate compilation
<thelema>
module-scoped field names, that is
<thelema>
otherwise if you are using two modules that define a record {x:int} and {x:string}, it knows what type foo.x is
<thelema>
(and how to access it, if it's not in the first record position)
<MarcWeber>
Is there a way to duplicate a stream?
<thelema>
you mean the Stream.t in the stdlib?
<MarcWeber>
y
* thelema
double checks that they
<thelema>
're immutable
<thelema>
or not...
<thelema>
not immutable
<thelema>
there's probably another way to do what you want - why do you want to clone the stream?
<MarcWeber>
HaXe generates a stream of tokens which is parsed afterwards. I'd like to dump the tokens so that I can see faster what's going on.
<MarcWeber>
I can create a cerateStream function and call it twice. Probably that's the best way.
<thelema>
use Stream.npeek
<MarcWeber>
thx
jakedouglas has joined #ocaml
drunK has joined #ocaml
_unK has quit [Ping timeout: 240 seconds]
drunK is now known as _unK
adrien has quit [Quit: leaving]
adrien has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
ikaros has joined #ocaml
patronus has quit [Ping timeout: 272 seconds]
patronus has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
fraggle_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 276 seconds]
ftrvxmtrx has joined #ocaml
<oriba>
hello adrien...
<oriba>
hello *
sepp2k has joined #ocaml
<oriba>
when do I need CAMLparam1(v) ?
<oriba>
In F. Monniers C-wrapping tutorial in one of the first examples it is NOT used
<oriba>
if I also do not use that, I can#t compile
<oriba>
is the tutorial outdated?
<adrien>
basically, when you leave OCaml and jump into the C code, you need to save some ocaml-specific data, and once you return to the OCaml code, you'll have to restore it
<adrien>
that's done in CAMLparam and CAMLreturn
<oriba>
so it is necessary always?
<oriba>
then the tutoriual has bugs
<thelema>
oriba: I think there are times when you can omit them
iago has quit [Quit: Leaving]
<adrien>
afaik, you don't need them if you don't do anything on ocaml values in your function
<oriba>
hmhh... I just copied a string with String_Val() but it was mourned by the compiler... the same (?) is done in the tutorial...?
<oriba>
If I use CAMLparam<n> always... it makes no problem?
<adrien>
no, no problem
<oriba>
ok
<oriba>
fine
<adrien>
just stick with it, if you need, you'll optimize later
<adrien>
simply put, that doesn't cost much, always using them reduces the number of bugs since you forget them less easily...
<oriba>
ok... I will make it a habit to use them always.
<MarcWeber>
Reference to undefined global `Dynlink' is what I get when trying to complie syntax of dynlink. -linkall is passed. What am I missing?
<thelema>
MarcWeber: "syntax of deriving"?
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<MarcWeber>
I was told to use deriving to derive show intsances for types. That distribution file contains a syntax dir which is compiled first by the top level makefile
<ygrek_>
look at the bug tracker at google code, it has fixes
Edward_ has quit [Ping timeout: 252 seconds]
<MarcWeber>
Which is the common ocaml way to introduce conditinoal compilation ? Using cpp ? Or is there another preprocessor commonly used for ocaml which does the same job?
<adrien>
cpp won't work
<adrien>
there's cppo
<thelema>
MarcWeber: why do you want confitional compilation?
<adrien>
and lablgtk uses something else I think
<adrien>
but thelema++
<MarcWeber>
Because I want use deriving - but for debugging only
<MarcWeber>
I don't want to force users to install the dependency.
<MarcWeber>
Some of the files need both: streaming extension and deriving. -pp camlp4o -pp deriving .. Is this the way to go? Or will camlp4o quit cause it can't read the deriving lines?
_unK has quit [Remote host closed the connection]
<thelema>
dependencies are pretty much the only reason to do this. I guess cppo is the simplest thing that'll work, but you add that as a dependency
<thelema>
I guess you could preprocess with cppo before you release, but that makes releases... blah
<MarcWeber>
thelema: I'm not sure whether my patch will be accepted.
<MarcWeber>
The main author already told me he doesn't like the idea. So I'm fine with keeping patches.
<MarcWeber>
thelema: Is using -pp twice the way to run multiple preprocessors such as derive and stream processing?
<thelema>
as for multiple camlp4 pre-processors, I recommend using ocamlbuild to deal with dependencies
<thelema>
I don't know the right way to do it, but it does.
<ygrek_>
MarcWeber, I don't think you can run two preprocessors
<ygrek_>
you should load pa_deriving.cma into camlp4o and use that
<ygrek_>
otherwise they will step on each others feet (camlp4o only can't parse deriving, deriving only can't parse streams -> deadlock)
<ygrek_>
but loading deriving into camlp4o will extend the grammar that camlp4o understands
<MarcWeber>
What you say is what I would have expected..
_unK has joined #ocaml
<ygrek_>
or you can simply split out the deriving- and streams- dependent code into different files
<MarcWeber>
ygrek_: So camlp4 must have kind of triggers triggering those extensions, so that the extensions parse noly what they should see.
<thelema>
I think it can merge all the grammars into one
<ygrek_>
yes, that trigger is called grammar :)
<thelema>
extensions are now written as extensions to a base grammar
<MarcWeber>
[> $(..) What about Show.show<Int> ?
<MarcWeber>
Does ocaml have kind of LIBPATH setting ? Similar to RUBYLIBS, PYTHONPATH, -L or whatsoever?
<MarcWeber>
I'm using nix, and by default it install packgaes into different directories. eg /nix/store/hash-ocmal/lib/ocaml/*.cma etc. So by default they are not found. I'd like to change that
<adrien>
best thing is to use ocamlfind
<adrien>
it'll handle everything
<MarcWeber>
no, forget about what I said.
<adrien>
(I have my ocaml in /ocaml (and another in /opt/ocaml actually))
rfg has left #ocaml []
Edward_ has joined #ocaml
jakedouglas has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
oc13 has quit [Ping timeout: 276 seconds]
olauzon has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 252 seconds]
jakedouglas has quit [Quit: Leaving.]
BiD0rD has quit [Quit: BiD0rD]
ikaros has quit [Remote host closed the connection]
oriba has quit [Remote host closed the connection]