gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
fantasticsid has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
thelema has joined #ocaml
fantasticsid has left #ocaml []
dnolen has quit [Quit: dnolen]
ikaros has quit [Remote host closed the connection]
pilki has joined #ocaml
pilki has quit [Client Quit]
EmmanuelOga has joined #ocaml
chupish has joined #ocaml
chupish has quit [Ping timeout: 258 seconds]
Sysop_fb has quit []
EmmanuelOga has quit [Ping timeout: 244 seconds]
emmanuelux has joined #ocaml
bzzbzz has quit [Quit: leaving]
ulfdoz has joined #ocaml
BiDOrD_ has quit [Ping timeout: 240 seconds]
zorun has quit [Ping timeout: 240 seconds]
zorun has joined #ocaml
BiDOrD has joined #ocaml
emmanuelux has quit [Ping timeout: 268 seconds]
Cyanure has joined #ocaml
Arsenik has joined #ocaml
Cyanure has quit [Ping timeout: 252 seconds]
Arsenik has quit [Client Quit]
ulfdoz has quit [Ping timeout: 240 seconds]
fridim_ has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
ftrvxmtrx has joined #ocaml
fridim_ has quit [Ping timeout: 268 seconds]
cago has joined #ocaml
everyonemines has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
bwright has quit [Quit: leaving]
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
mcclurmc has quit [Excess Flood]
mcclurmc has joined #ocaml
raichoo has joined #ocaml
struktured has quit [Quit: Konversation terminated!]
struktured has joined #ocaml
everyonemines has quit [Quit: Leaving.]
struktured has quit [Read error: Connection reset by peer]
struktured has joined #ocaml
edwin has joined #ocaml
pierrc has joined #ocaml
Kakadu has joined #ocaml
<Kakadu> hello!
<Kakadu> does anybody has cygwin near yourself?
<Kakadu> after last upgrade of ocaml to version 3.12.1 some problems with ocamlbuild have appeared.
<adrien> details?
<Kakadu> paste.in.ua/3518/#l-14
<Kakadu> adrien: ^^]
<Kakadu> ocaml 3.12 changes: - Unix.inet_addr_of_string: call inet_aton() when available so as to handle correctly the address 255.255.255.255.
<adrien> I can't look for now but the fix is probably not terribly hard; maybe missing headers or your install of cygwin could be updated
<Kakadu> adrien: hmm. I will try to hack something in this cygwin. thanks for your idea
ikaros has joined #ocaml
thomasga has joined #ocaml
eikke has joined #ocaml
pierrc has left #ocaml []
struktured has quit [Read error: Connection reset by peer]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
yezariaely has joined #ocaml
milosn_ has quit [Read error: Operation timed out]
destrius has quit [Quit: Leaving.]
milosn has joined #ocaml
roconnor has quit [Ping timeout: 252 seconds]
larhat has joined #ocaml
milosn has quit [Ping timeout: 240 seconds]
milosn has joined #ocaml
raichoo has quit [Read error: Connection reset by peer]
raichoo has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ocaml
avsm has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
<yezariaely> is there something similar in ocaml to the "nub" function in haskell? (removing list duplicates)
<yezariaely> this should work I think: let list = List.sort l1 in List.merge > list list
<yezariaely> or is there something shorter/faster?
<Kakadu> yezariaely: in stdlib --- no, I think
<Drakken> yezariaely Batteries has List.unique.
<yezariaely> Drakken: thx
eikke has joined #ocaml
musically_ut has quit [Ping timeout: 255 seconds]
jonludlam_afk is now known as jonludlam_
eikke has quit [Ping timeout: 276 seconds]
eikke has joined #ocaml
iago has joined #ocaml
avsm has joined #ocaml
avsm1 has quit [Ping timeout: 252 seconds]
iago has quit [Ping timeout: 255 seconds]
iago has joined #ocaml
avsm has quit [Quit: Leaving.]
pilki has joined #ocaml
avsm has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
yezariaely1 has joined #ocaml
yezariaely has quit [Ping timeout: 245 seconds]
ocp has joined #ocaml
n0den1te has joined #ocaml
n0den1te has quit [Client Quit]
musically_ut has joined #ocaml
EmmanuelOga has joined #ocaml
struktured has joined #ocaml
Kakadu has quit [Quit: Page closed]
wagle_ has joined #ocaml
ccasin_ has joined #ocaml
chambart has quit [*.net *.split]
lopex has quit [*.net *.split]
hcarty has quit [*.net *.split]
ccasin has quit [*.net *.split]
wagle has quit [*.net *.split]
struktured has quit [*.net *.split]
musically_ut has quit [*.net *.split]
avsm has quit [*.net *.split]
tlockney has quit [*.net *.split]
musically_ut has joined #ocaml
avsm has joined #ocaml
tlockney has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Client Quit]
hcarty has joined #ocaml
yezariaely1 has quit [Ping timeout: 240 seconds]
chambart has joined #ocaml
lopex has joined #ocaml
csabahruska has joined #ocaml
<csabahruska> hi
<csabahruska> I've seen that there is a work in progress llvm backend for ocaml. Do you know what is the status of it?
<csabahruska> Is it working? Will it be included in next ocaml release?
<csabahruska> I mean this project: https://github.com/colinbenner/ocaml-llvm
<pilki> I don't know about the first questions
<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.
fridim_ has joined #ocaml
roha has joined #ocaml
<thelema> ocamlbuild -I ./lib -tag use_bRect -cflag -lbe test.native
Drakken has quit [Ping timeout: 255 seconds]
<thelema> I'm not used to specifying things on the command line - the normal procedure is to set things up via _tags and myocamlbuild.ml files
<thelema> dobroerlanger: does that command work?
<adrien> you can give the content of the _tags file on the command-line ;p
<dobroerlanger> thelema, now it produces some other errors which I can partially understand :)
<thelema> adrien: can you? -tags adds to the default tags, which isn't the same as specific tags in _tags
<adrien> thelema: -tag-line <tag> Use this line of tags (as in _tags)
<thelema> adrien: oh. I must have an old man file, mine doesn't have that
milosn has quit [Ping timeout: 268 seconds]
<adrien> I've used it like '<*>: package(foo)' ; that 3.12.1
<adrien> thelema: there's a manpage? :o
<thelema> adrien: you're right.
<adrien> I've always used 'ocamlbuild --help'
<thelema> hmm, for that, why not just -tag package(foo)?
fridim_ has quit [Ping timeout: 268 seconds]
milosn has joined #ocaml
<adrien> can't remember; that was for a quick test and it went away after a few minutes
<adrien> ah, I think I was using it to pass for-pack actually
<thelema> fair enough.
pilki has joined #ocaml
<Anarchos> Did you notice folks the near coming ocaml 3.11.0 with GADTS ?
<_habnabit> you mean 3.13?
<thelema> yes, I just wish I had more than the slightest idea of how to use GADTs
<Anarchos> _habnabit yes sorry for the typo
<Anarchos> thelema xleroy said : for gadts samples, look into testsuites/tests/gadts
<Anarchos> or something like that
<thelema> Anarchos: yes, the samples don't help
<hcarty> Anarchos: I looked through the examples and didn't get much more than "that's how the syntax looks" from them
<Anarchos> thelema i agree :)
Drakken has joined #ocaml
shp has quit [Read error: No route to host]
<Anarchos> hcarty it seems like a local typing with existential types ?
<thelema> It's my understanding that GADTs can be used for number-parameterized types, although how to do this - I have no idea.
<Esmil> Hey, in ocaml are strings interned?
<Anarchos> Esmil what means 'interned' ?
<companion_cube> not as far as i know
<companion_cube> it would be slow
<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]
emmanuelux has joined #ocaml
lamawithonel has joined #ocaml
eikke has joined #ocaml
Xizor has quit []
wagle has joined #ocaml