<pilki>
but no, it will not be included in the next ocaml release
<pilki>
that you can be pretty sure about it
<csabahruska>
Is there any chance that it will be officially supported in the future?
<csabahruska>
What do you think?
<thelema>
csabahruska: pretty unlikely. llvm has a pretty high impedence mismatch with the ocaml runtime's assumptions
<avsm>
its very likely that a bytecode -> LLVM version is tractable. js_of_ocaml shows that...
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 252 seconds]
f[x] has quit [Ping timeout: 252 seconds]
zorun has quit [Read error: Connection reset by peer]
pilki has quit [Quit: This computer has gone to sleep]
shp has joined #ocaml
<shp>
hi
<thelema>
hi
zorun has joined #ocaml
<shp>
i'm in french Classes préparatoires and i begin caml in january. I read on wikipedia that Caml Light is usually taught instead of caml
<shp>
what's the difference between both?
<flux>
I really know about one: object system :)
<thelema>
caml-light = caml /= ocaml
<bnwr>
shp: the module system is slightly different if I remember correctly
<thelema>
the biggest diff is the object system, but there's a ton of little features that caml light had that got dropped in ocaml
<bnwr>
(richer in OCaml)
<zorun>
thelema: are you sure of that?
<zorun>
in my experience, OCaml is much more complete than caml light
<shp>
<thelema> caml-light = caml /= ocaml // "/=" stand for "different" ?
<shp>
+s
<zorun>
shp: OCaml has modules, whereas caml light has one big namespace (iirc)
<bnwr>
all the rest is small differences (like you need to do 'type t == <smthg>' when it's type aliasing and 'type t = <smthg>' otherwise)
<bnwr>
I remember as zorun
<shp>
k thx
<thelema>
zorun: ocaml has had many things added to it, but it lost some things like a concurrent collector and the ability to have a binding to a record field
<bnwr>
modules and objects + small tweaks
<thelema>
shp: yes, /= is "not equal"
<shp>
and eventually, what is the interest to prefer caml from another language?
<zorun>
thelema: ok, didn't know that
<thelema>
shp: if you mean objective caml, say OCaml, this is now the proper name.
<zorun>
well, between caml light and OCaml, I would say OCaml has a much brighter future :)
<zorun>
*has a future at all
<thelema>
caml light has no future; development has stopped.
<zorun>
yup
<zorun>
it's only used for teaching in France
<zorun>
shp: type inference is something quite uncommon, that allow an extra safety at compile-time
<shp>
i thought ocaml was object-oriented caml
<zorun>
not only :)
eikke has quit [Ping timeout: 240 seconds]
<zorun>
caml light isn't very useful if you want to do things outside the core language
<zorun>
OCaml, on the other hand, can be easily extended through modules
<shp>
but is it common to use ocaml for procedural programming ? I doubt that i'm going to learn object oriented programming at school
<thelema>
shp: it's most common to use ocaml for functional programming.
<bnwr>
shp: OCaml is Caml *with* objects (but you can still use all the FP constructs)
<bnwr>
you'll definitely not learn oop in prépa
<zorun>
shp: I've almost never used the OO features of OCaml
<shp>
i think i mix up functional programming and procedural programming :/
sepp2k has joined #ocaml
<zorun>
true, but it's designed with functional programming in mind :)
<zorun>
have you ever used real "variables" (i.e. references) and "while" loops? it's really painful
<hcarty>
Procedural programming is certainly possible in OCaml, and it can be useful and appropriate.
ftrvxmtrx has quit [Quit: Leaving]
<hcarty>
I wouldn't call it painful, but it is somewhat obvious that references are not the primary focus of the syntax designers.
<hcarty>
let cont = true in while cont do cont := false; done; (* Not too terrible, aside from the general pain of mutable state *)
<hcarty>
oops - let cont = ref true in ....
<thelema>
ref true
<thelema>
yup
<hcarty>
Ah, I missed !cont in the while too...
<hcarty>
let cont = ref true in while !cont do cont
<hcarty>
...
<thelema>
easy to make mistakes with...
* thelema
wonders how difficult it would be for the ocaml compiler to inline the representation of refs
<hcarty>
thelema: There was some mantis activity around that a while ago but it was probably somewhat targeted
<hcarty>
float references IIRC
<thelema>
float references would be the hardest of all, being non-word-sized on 32-bit platforms
<thelema>
everything else should flatten without trouble
larhat has quit [Quit: Leaving.]
csabahruska has quit [Quit: leaving]
iago has quit [Remote host closed the connection]
milosn has quit [Ping timeout: 252 seconds]
milosn has joined #ocaml
cago has quit [Quit: Leaving]
raichoo has quit [Quit: leaving]
avsm has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
eikke has joined #ocaml
f[x] has joined #ocaml
oriba has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
thomasga has quit [Quit: Leaving.]
eikke has joined #ocaml
dobroerlanger has joined #ocaml
ocp has quit [Ping timeout: 252 seconds]
<dobroerlanger>
Hello. Using ocamlopt I can set output file directory, but all *.cmi/*.cmx/*.o files stay in the directory where ocamlopt was run. How can I set path for these output files?
milosn has quit [Ping timeout: 252 seconds]
milosn has joined #ocaml
<thelema>
dobroerlanger: you can't; why do you want them elsewhere?
<dobroerlanger>
If I can place them where I want it would be easier to implement "make clean"
Anarchos has joined #ocaml
<thelema>
dobroerlanger: can you use ocamlbuild for your build system?
sepp2k has quit [Ping timeout: 240 seconds]
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
sepp2k has joined #ocaml
<Anarchos>
dobroerlanger could you make some progress ?
<adrien>
I'll second thelema's advice: ocamlbuild (and why not oasis ;p ) will handle all the build system stuff
<adrien>
it's not only "make clean" which is going to be easier to implement but the whole build process
<dobroerlanger>
ocamlbuild seems to be able to do what I want, but it says "Cannot find file %filename%.cmxa" despite of filepath being added. Can you explain how to use it properly?
<adrien>
dobroerlanger: it's a file inside or outside of your project?
<Anarchos>
dobroerlanger -L option maybe, to find libraries ?
<dobroerlanger>
Anarchos, not much. Added some little classes, nothning important yet.
<adrien>
and which version of ocaml, where does ocaml come from? (distribution?), and how have you added the "filepath" so far?
<dobroerlanger>
adrien, it is external file.
<thelema>
dobroerlanger: by the %%, I guess you're running windows?
<adrien>
which library?
<adrien>
hah, good catch about windows env vars ;p
<dobroerlanger>
No, it is just very old habit. I'm on Haiku :)
<Anarchos>
dobroerlanger i advise you to make a proof of concepts of two C threads calling back ocaml and doing intensive allocation, to see if the gc runs well
<thelema>
:)
<dobroerlanger>
Anarchos, have patience. I can't make it in one day
<Anarchos>
dobroerlanger i am just curious to see how different your ideas are :)
<dobroerlanger>
version 3.11.1, I tried to add path to my libraries via '-I ./lib' option
Esmil has joined #ocaml
<dobroerlanger>
-lflags -I,./lib works neither
<thelema>
dobroerlanger: try putting "lib: include" in your _tags file
<dobroerlanger>
Didn't help. And I still can't understang why it doesn't see files in path. Can you translate following command into proper ocamlbuild command: "ocamlopt -I ./lib -cclib -lbe bRect.cmxa test.ml -o test.opt"?
<thelema>
ocamlbuild test.native (with the right myocamlbuild.ml and _tags files)
<thelema>
also, are you sure that the -cclib is needed with bRect.cmxa? If bRect were compiled with that -cclib argument, it gets remembered by the .cmx file inside bRect.cmxa
<dobroerlanger>
-cclib is for adding C++ -lbe
<dobroerlanger>
Yes, it is needed.
<thelema>
yes, the -lbe should be stored inside bRect.cmxa
<thelema>
and automatically added by ocaml
<thelema>
ok. that's odd, but we can work with it.
<dobroerlanger>
It _should_be_added_, but it is needed.
<Esmil>
Anarchos: It means you only store one version of each unique string
<Anarchos>
Esmil no it isn't
<Esmil>
Anarchos: Cool, thanks
<thelema>
Esmil: sort-of. Since ocaml strings are mutable, interning is normally not appropriate, but IIRC there are times that constant strings are allocated at compile-time.
<Anarchos>
Esmil they are just allocated value with a special tag designing them as strings
<companion_cube>
you need a hashtable/trie and looking in it every time you create a string
<Esmil>
Yes, I know. Just wondering, thanks
pilki has quit [Quit: This computer has gone to sleep]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
ocp has joined #ocaml
jamii has joined #ocaml
ikaros has joined #ocaml
mehdid_ has joined #ocaml
mehdid_ has quit [Client Quit]
ocp has quit [Read error: Connection reset by peer]
ocp has joined #ocaml
Xizor has joined #ocaml
ocp has quit [Client Quit]
ocp has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<roha>
If i want to open a new Window with the Graphics module, how can I hinder the Window from disappearing immediatly again?
<roha>
like a simple cin in C++
<thelema>
read_line ()
<roha>
but can i simply put this in sequential order?
<roha>
open_graph ....;; read_line ();;
<thelema>
let _ = open graph ...; read_line ();;
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
<roha>
so if i have: open Batteries_uni;; let _ = Graphics.open_graph " 300x100+50-0"; read_line;; and i try to compile it with ocamlfind ocamlc -package batteries graphics.cma demo.ml
<roha>
i get Reference to undefined global `Batteries_uni'
<roha>
:O
<thelema>
remove the open line.
<thelema>
you don't need it for Graphics or read_line
<thelema>
second, drop all the ;;, they're needed in the toplevel, but not in compiled programs
<thelema>
third, it's very important to put () after read_line
<thelema>
otherwise it won't actually fun the read_line function.
<roha>
; is needed right?
<roha>
to specify sequential order
<thelema>
yes, ; is needed
<roha>
and if i open a module, but i dont need it. this results in an error?
<thelema>
no
<thelema>
what version of batteries are you using?
<roha>
sec
<roha>
pretty sure it's the newest one though
<thelema>
the toplevel module name changed from "Batteries_uni" to "Batteries" in v2
<roha>
1.2.2, says the ubuntu package manager
<thelema>
1.2.2 might be the newest packaged for ubuntu, but it's not the newest batteries.
<thelema>
I'm surprised that "open Batteries_uni" isn't working, though.
<thelema>
`ocamlfind query batteries`
pilki has joined #ocaml
<roha>
/usr/lib/ocaml/batteries
<roha>
is it possible that something is messed up because i have copied all battery interface files into the /usr/lib/ocaml directory?
<thelema>
hmm, very odd.
<thelema>
oh yeah... I always forget about this
<thelema>
-linkpkg
<thelema>
grrr to findlib
<adrien>
roha: roha you copied the files from where?
<thelema>
very important to use -linkpkg when compiling an executable using ocamlfind
<roha>
kk
<roha>
adrien: i think just the batteries folder inside /usr/lib/ocaml
<roha>
Ocaide plugin for eclipse wouldn't autocomplete otherwise
<roha>
thelema: yes, it does work with the "open ..." now with -linkpkg
<roha>
just one more little question, if i use something in my code from a module other than pervasives, i do have to specify that when compiling?
avsm has quit [Quit: Leaving.]
<roha>
like open_graph from graphics
<thelema>
Graphics, yes. Str, Unix, Num, yes
<thelema>
List, String, Array, no
<adrien>
roha: there's no reason to do that if ocamlfind/findlib is available ='(
<adrien>
and it's probably quite bad too
<thelema>
The core and standard libraries are automatically available, Unix, Num, Str, Threads, Graphics, Dbm, Dynlink, LablTk, Bigarray all need notice
<thelema>
TODO: auto-detect dependencies and link in needed libraries
<roha>
thelema, adrien: even with ocamlfind/findlib?
<thelema>
yes, you still have to add -package foo for each of them
<roha>
kk, thanks to both of you! :)
Esmil has left #ocaml []
ocp has quit [Ping timeout: 276 seconds]
roha has quit [Ping timeout: 245 seconds]
roha has joined #ocaml
roha has quit [Ping timeout: 240 seconds]
ulfdoz has quit [Ping timeout: 248 seconds]
roha has joined #ocaml
pilki has quit [Quit: This computer has gone to sleep]
roha has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
ulfdoz has joined #ocaml
edwin has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Remote host closed the connection]
pango__ has joined #ocaml
emmanuelux has joined #ocaml
pango_ has quit [Ping timeout: 240 seconds]
EmmanuelOga has quit [Ping timeout: 244 seconds]
logicus has joined #ocaml
eikke has quit [Ping timeout: 268 seconds]
eikke has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
avsm has joined #ocaml
logicus has quit [Ping timeout: 240 seconds]
jonludla_ has joined #ocaml
jonludlam_ has quit [Ping timeout: 240 seconds]
clog has quit [^C]
clog has joined #ocaml
jamii has quit [Client Quit]
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
ikaros has joined #ocaml
struktured has joined #ocaml
wagle_ has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
eikke has quit [Ping timeout: 255 seconds]
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
lamawithonel has quit [Ping timeout: 240 seconds]
destrius has joined #ocaml
emmanuelux has quit [Remote host closed the connection]