GnomeStoleMyBike has quit [Ping timeout: 252 seconds]
sepp2k1 has quit [Remote host closed the connection]
xavierm02 has quit [Quit: Leaving]
avsm has joined #ocaml
avsm has quit [Client Quit]
lolcathost has joined #ocaml
lolcathost has quit [Ping timeout: 252 seconds]
gnuvince has joined #ocaml
lolcathost has joined #ocaml
wtetzner_ has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
<NaCl>
Is there an emacs mode for editing .mly files? I know tuareg highlights the ocaml parts correctly, but it doesn't seem to know about the "yacc" stuff.
avsm has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
avsm has quit [Ping timeout: 252 seconds]
tani has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
tane has quit [Ping timeout: 244 seconds]
lolcathost has quit [Ping timeout: 248 seconds]
avsm has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
avsm has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Quit: emmanuelux]
madroach has joined #ocaml
Yoric has joined #ocaml
lolcathost has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
gnuvince has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
avsm has quit [Ping timeout: 252 seconds]
gnuvince has joined #ocaml
gnuvince has quit [Ping timeout: 244 seconds]
iago has joined #ocaml
lolcathost has quit [Ping timeout: 256 seconds]
lolcathost has joined #ocaml
wtetzner_ has quit [Remote host closed the connection]
wtetzner has quit [Remote host closed the connection]
gnuvince has joined #ocaml
lolcathost has quit [Ping timeout: 256 seconds]
iago has quit [Ping timeout: 276 seconds]
testcocoon has quit [Ping timeout: 246 seconds]
testcocoon has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
avsm has quit [Ping timeout: 244 seconds]
jamii has joined #ocaml
testcocoon has quit [Ping timeout: 252 seconds]
TDJACR_ has quit [Ping timeout: 240 seconds]
TDJACR has joined #ocaml
lolcathost has joined #ocaml
testcocoon has joined #ocaml
gnuvince has quit [Ping timeout: 256 seconds]
avsm has joined #ocaml
testcocoon has quit [Ping timeout: 252 seconds]
jamii has quit [Ping timeout: 256 seconds]
avsm has quit [Ping timeout: 255 seconds]
testcocoon has joined #ocaml
testcocoon has quit [Ping timeout: 245 seconds]
testcocoon has joined #ocaml
lolcathost has quit [Ping timeout: 240 seconds]
testcocoon has quit [Client Quit]
lolcathost has joined #ocaml
testcocoon has joined #ocaml
avsm has joined #ocaml
gnuvince has joined #ocaml
avsm has quit [Ping timeout: 265 seconds]
gnuvince has quit [Ping timeout: 256 seconds]
codan is now known as notdan
Kakadu has joined #ocaml
UncleVasya has joined #ocaml
answer_42 has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
GnomeStoleMyBike has joined #ocaml
cdidd has joined #ocaml
avsm has joined #ocaml
avsm has joined #ocaml
avsm has quit [Ping timeout: 255 seconds]
avsm has quit [Ping timeout: 244 seconds]
Neros has joined #ocaml
<nicoo>
NaCl: Not AFAIK but if you find (or write) one, please tell me ;)
Progster has quit [Read error: Operation timed out]
<pippijn>
does ocaml work on EBCDIC platforms?
<nicoo>
Doubtful
<nicoo>
pippijn: You want to use OCaml on AS/400 ?
<pippijn>
I'm just wondering, because what I'm writing now depends on ASCII
<pippijn>
so I'm wondering if I can continue doing so because ocaml wouldn't work on anything else, anyway
<pippijn>
in my C programs, I take care to support all character sets (ASCII, EBCDIC and anything that could ever exist within the constraints of the C standard)
<pippijn>
Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is theoretically irregular and was not adopted in the POSIX ERE syntax. Some tools allow referencing more than nine capturing groups.
tilarids has joined #ocaml
<tilarids>
Hi. Is there a way to profile memory usage in OCaml? I'm trying to
<tilarids>
understand why my OCaml program uses so much memory. I have a list
<tilarids>
of 75kk (float * int) elems and it takes about 5 GB of RAM. I've
<tilarids>
rewritten same algorithm in C++ and got usual 1.4 GB for 96kk
<tilarids>
elems. I assume my OCaml program creates some unneeded intermediate
<tilarids>
from the #freenode room, I've missed the right door :(
<tilarids>
Does it appear broken?
<nicoo>
pippijn: \n isn't POSIX ERE, as is said in the Wiki page
<pippijn>
correct
<pippijn>
is it BRE?
<nicoo>
Ok, you were asking about BRE.
<nicoo>
I have no idea; I hope not
<pippijn>
I explicitly said Basic
<nicoo>
pippijn: Yes, but my brain skipped it :$
<nicoo>
tilarids: It might be because of boxing.
lolcathost has joined #ocaml
<pippijn>
yes, I think floats are boxed except when in float arrays
<tilarids>
nicoo: how can I avoid it? Or where can I read about it?
* tilarids
is hitting google for it
<pippijn>
tilarids: difficult..
<pippijn>
you could use BigArray
<pippijn>
or use a float array and use indices into that array
<pippijn>
you can layout your memory manually
TDJACR has quit [Ping timeout: 246 seconds]
TDJACR has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<tilarids>
manual memory layout == using big array or there are any other options?
<pippijn>
like I said, you can also use a large float array
<pippijn>
but I don't know if it will fit
<pippijn>
you have a list, did you use a linked list in C++, too?
avsm has quit [Quit: Leaving.]
<tilarids>
nope, I've used std::vector in C++ version. I have tried using Array in OCaml code but it ended up with 5.5 GB memory usage and really slow sorting so I stepped back to plain List
<pippijn>
okay
<pippijn>
that's strange
<pippijn>
because an array uses half the memory of a list
leoncame` has quit [Remote host closed the connection]
<tilarids>
NaCl: what do you mean? Haven't heard anything of custom allocators in OCaml code before
Progster has joined #ocaml
<tilarids>
is there any book/set of articles that describes the internals of OCaml? As far as I understand, I'll not be able to write efficient code if I don't understand which code the compiler produces for each source line
<zerbob>
if anyone can help, I get "type int istead of type t" at line 48
<wieczyk>
thelema: Could you help me how to invoke ocamlbuild to link with Batteries without writing _tags?
<wieczyk>
Batteries documentation tells about _tags file, which is ignored whed building .top ;/
<yezariaely>
zerbob: shouldn't the 1 in q-1 be of type t somehow? e.g. use one instead of 1 ?
<yezariaely>
ah no, sorry, got that wrong
<yezariaely>
but probably, the "+" and "-" is redefined? Here you need the original ones from Pervasive?
<zerbob>
oh right
<zerbob>
it must be that, thank you
<Qrntz>
zerbob, either place that ( * ) declaration before the (+)/(-) or refer to Pervasives directly as in Pervasives.(q - 1)
<zerbob>
in a previous version they were labelled ++ and --, I forgot to change all the occurrences
<zerbob>
ok, it works, thank you
avsm has joined #ocaml
Progster has joined #ocaml
<fasta>
Is there any way to make a quick GUI with Ocaml? I know for Python the Qt bindings are easy to use for example.
<flux>
lablgtk2 is probably it
<fasta>
I have no real preference for gtk/qt.
tautologico has quit [Quit: tautologico]
<fasta>
Isn't gtk already at 3?
<adrien>
yes but
<adrien>
GTK+3 introduces some annoyances and doesn't have that many benefits
<adrien>
support for it is being worked on however
<adrien>
but you can count on GTK+2 being available everywhere for years and years
<xavierm02>
Hey
<xavierm02>
I have trouble understanding when variables get released
<xavierm02>
if I do
<xavierm02>
let x = 1 in let y = 2 in ...
<flux>
it's the same as let x = 1 in (lety = 2 in ( ... ))
<xavierm02>
how can I tell ocaml I don't need y anymore but still need x
<flux>
do you mean from the scope or from the garbage collection view point?
<xavierm02>
scope
<adrien>
well, it's a bit similar: values can be collected when they go out of scope
<flux>
well, you cannot do that. you can call another function with the y parameter and so the new function (if it's defined in some other scope) will not have access to x.
<flux>
or you can rebind x (shadowing the previous definition)
<xavierm02>
O_O
<flux>
but it cannot be removed from the scope
<flux>
I don't know of any statically typed language that would have that..
<xavierm02>
that's... unexpected >_<
<flux>
(and even in some dynamic ones it would be quite hackery)
<flux>
how do you find yourself needing such a feature?
<xavierm02>
I don't need it
<xavierm02>
I simply don't need some variables anymore
<flux>
usually let .. in-binding scopes are short
<adrien>
xavierm02: actually the solution is _very_ simple: split your code more
<flux>
or at least that's a good goal to have
<adrien>
avoid long functions, it'll prevent 99.99% of the cases where you would keep things in scope without wanting to
<flux>
xavierm02, so you're afraid you might accidentally refer to some variable you wouldn't have even needed at that point of code?
<xavierm02>
no
<xavierm02>
oh wait
<xavierm02>
you mean if I don't use it after a give point
<xavierm02>
it gets released
<xavierm02>
before the scope is left?
<flux>
well, I've never found that issue to matter, but I'm guessing it won't be released
<adrien>
I've found it to matter once
<adrien>
it's not very hard to find out if the GC can collect a value: can _you_, as a human, find a way to reach the value? if you cannot, chances are the GC won't either and will collect it
<xavierm02>
ok
<xavierm02>
ty guys :)
<adrien>
xavierm02: also keep in mind it's pretty hard to leak in ocaml so don't worry about it until you've noticed an actual leak with hard numbers
hnrgrgr has quit [Quit: leaving]
<flux>
well, I have some information
<flux>
it turns out values in scope can get released by the Gc
<flux>
at least this is what I deduce from running evaluating this in ocaml toplevel: let foo () = let x = String.copy "Testdata" in Gc.finalise prompt x; let rec loop x = Gc.full_major (); loop (String.copy "a") in loop "hello";;
<flux>
oops: let prompt _ = Printf.printf "Finalised\n%!" let foo () = let x = String.copy "Testdata" in Gc.finalise prompt x; let rec loop x = Gc.full_major (); loop (String.copy "a") in loop "hello";;
<adrien>
if it's in scope, what guarantees you're not going to use it again?
<flux>
you can statically see it
<flux>
of course, yuo cannot see it if you can possibly use it
<adrien>
agreed but ocaml doesn't usually try to do such reasoning
<adrien>
but I have no proof =)
<flux>
this fragment does not run the finaliser:
<flux>
let prompt _ = Printf.printf "Finalised\n%!" let foo () = let value = String.copy "Testdata" in Gc.finalise prompt value; let rec loop x = ignore (value); Gc.full_major (); loop (String.copy "a") in loop "hello";;
<flux>
and if you remove the ignore (value); part it again gets finalised
<flux>
surely ocaml doesn't try very hard to analyse it, but it's a simple matter of a variable life time..
sepp2k has quit [Ping timeout: 256 seconds]
sepp2k has joined #ocaml
<adrien>
I haven't lookeed into that in detail, the only time I've had to do that, I simply split my function in two
jamii has quit [Ping timeout: 256 seconds]
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
<callen>
pippijn: one problem with Ohm is that it defaults to CouchDB, which is a shit-show.
<callen>
I really wish they hadn't done that.
<pippijn>
ugh
<callen>
yeah. I know.
pango_ has joined #ocaml
<callen>
it's a huge, wonderful, amazing framework, but the persistence method is amazeballs retarded.
pango has quit [Ping timeout: 252 seconds]
pango_ is now known as pango
<wieczyk>
How to load all files from .cma in toplevel. I am typing #load "file.cma"
<wieczyk>
but it does not loading my modules inside .cma"
<orbitz>
wieczyk: I think youh have to load them yourself, or use topfind
<wieczyk>
Code from module is executed, I tested it by 'raise Exit' but the Code from module is not available (binded) in toplevel.
<wieczyk>
OK, solved problem.
<wieczyk>
I had to add "#directory path" for each directory where ".cmi" files is"
Anarchos has joined #ocaml
tac has joined #ocaml
Yoric has joined #ocaml
larhat has quit [Quit: Leaving.]
Yoric has quit [Ping timeout: 252 seconds]
<thelema>
wieczyk: edit your myocamlbuild.ml plugin to set the needed compile flags; see batteries' myocamlbuild for a start