gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
boscop_ has quit [Ping timeout: 255 seconds]
mjonsson has quit [Ping timeout: 240 seconds]
joewilliams has quit [Changing host]
joewilliams has joined #ocaml
lopex has quit []
emmanuelux has quit [Remote host closed the connection]
boscop_ has joined #ocaml
shachaf has quit [Remote host closed the connection]
ismarc_netbook has joined #ocaml
joewilliams is now known as joewilliams_away
<ismarc_netbook> Anyone here use piqi?
joewilliams_away is now known as joewilliams
philtor has joined #ocaml
shachaf has joined #ocaml
BiDOrD has joined #ocaml
vivanov has joined #ocaml
zpop has joined #ocaml
ulfdoz has joined #ocaml
boscop_ has quit [Ping timeout: 255 seconds]
vivanov has quit [Ping timeout: 255 seconds]
bzzbzz has quit [Quit: leaving]
vivanov has joined #ocaml
dnolen has quit [Quit: dnolen]
Tobu has joined #ocaml
axiles has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
mcclurmc_home has joined #ocaml
sepp2k has joined #ocaml
philtor has quit [Ping timeout: 268 seconds]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
ikaros has joined #ocaml
ygrek has joined #ocaml
Associat0r has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
axiles has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
Yoric has joined #ocaml
Tobu has joined #ocaml
Associat0r has quit [Quit: Associat0r]
ygrek has quit [Ping timeout: 250 seconds]
boscop has joined #ocaml
ygrek has joined #ocaml
Yoric has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ikaros has quit [Quit: Ex-Chat]
alexis_ has joined #ocaml
edwin has joined #ocaml
likebike has joined #ocaml
munga has joined #ocaml
ankit9 has quit [Quit: Leaving]
Yoric has joined #ocaml
eikke has joined #ocaml
ftrvxmtrx has joined #ocaml
G10h4ck has joined #ocaml
<G10h4ck> hey all!
<G10h4ck> in my book there is a function called take
<G10h4ck> that take firts n element from a list
<G10h4ck> for example
<G10h4ck> take 2 [3;4;5;6]
<flux> ocaml doesn't come with that function, if that is your question.
<G10h4ck> return [3;4]
<G10h4ck> exactly it say unbound value
<G10h4ck> there is an alternative function ? and why that function is not present in ocmel ?
<flux> there is no alternative function. there are many functions not in ocaml standard library :)
<rixed> You have this function in Batteries.
<pou> but you'll find this function in alternatives non-standard libraries like Batteries
<flux> you could take a look into some alternative ocaml standard library projects, such as what rixed said
<pou> ...too late.
<G10h4ck> mmm
<flux> or write it yourself, it's good practice :)
<rproust> let take n l = let rec aux n acc = function | [] -> acc | x::xs -> if n <= 0 then acc else aux (pred n) (x::acc) xs in List.rev (aux n [] l)
<rproust> (haven't tried it, there might be errors)
G10h4ck has quit [Quit: KVIrc KVIrc Equilibrium 4.1.1, revision: 5727, sources date: 20110306, built on: 2011-04-28 17:57:39 UTC 5727 http://www.kvirc.net/]
<flux> that's the advanced version. the basic version would be quite simpler..
<pou> btw, is it possible, when you need such a function, to distribute Batteries sources with your project, so that you don't have to write a specific "prelude" file ?
G10h4ck has joined #ocaml
<G10h4ck> it works very thanks!
<rixed> What's a prelude file?
<pou> like in Haskell
ygrek has quit [Ping timeout: 250 seconds]
rby has quit [Quit: Lost terminal]
<rixed> pou: can't figure out what's a prelude file after 5min of haskell tutorial, sory :-/
rby has joined #ocaml
<pou> many OCaml projects have to write their own combinators, which are not in the stdlib
ankit9 has joined #ocaml
<pou> I wanted to know if the licensing of Batteries gives you the possibility to join only a small part of the sources to your project
<rixed> pou: ah ok! This is LGPL, so you can use only a part of it (suposing you respect the other requirements of the LGPL, which are few)
<pou> (Haskell's Prelude file contains all the usual functions & combinators, such as take, or functions composition...)
<rixed> pou: Ok, it was my understanding that Prelude was like Pervasive.
<pou> and the LGPL doesn't require your project to be free, am I right ?
<rixed> pou: It does not require your project to be LGPL.
<pou> ok
<pou> thanks
<rixed> pou: although, after re-reading the lgpl terms, it seams to require that the modified library stays a library :-/?
<rixed> pou: so copy pasting some code from it onto your program code may not be permited. I suggest you ask to a gnu channel.
vivanov has quit [Ping timeout: 255 seconds]
<G10h4ck> mm that exercise therethically should work
<G10h4ck> but ocaml give me that error
<G10h4ck> Error: This expression has type 'a list -> 'a list
<G10h4ck> but an expression was expected of type 'a list -> 'b -> 'b
<G10h4ck> mmm
<G10h4ck> nevermind
mlh has quit [Ping timeout: 250 seconds]
<likebike> Hi guys, I'm sorry to ask such a basic question, but I can't find an answer anywhere. I'm trying to learn OCaml, and I would like to print out values from a script, just like the REPL does (something like "- : int = 1"). This is easy for simple things (like ints) but when I get into functions and more complex things, I don't know how to print them anymore. Can I somehow use that same print function that the REPL uses?
<flux> likebike, REPL has information it builds when compiling the fragments you enter. your programs won't be able to print out custom values, that is, there is no function val print : 'a -> unit
<flux> likebike, there are ways to cheat, though
<flux> for example ExtLib (and Batteries) has Std.dump, which can do something, but it's useful mostly for debugging
<flux> and then there is pa_deriving and other similar syntax extensions, that can generate code for printing out your values
<likebike> ok. I will research those keywords. Thank you.
<likebike> flux, Do you recommend ExtLib or Batteries?
<likebike> (I'm assuming i need to choose one or the other)
<flux> Batteries is more actively developed
<flux> well, ExtLib isn't developed at all
ismarc_netbook has quit [Ping timeout: 268 seconds]
ismarc_netbook has joined #ocaml
oriba has joined #ocaml
* Yoric is absolutely 100% honest and unbiaised and recommends Batteries.
* Yoric hides behind an angelic smile.
oriba has left #ocaml []
<Yoric> Anway, Batteries contains a version of ExtLib that is more up-to-date than ExtLib.
<likebike> :) Thanks Yoric and flux. I'll use Batteries.
vivanov has joined #ocaml
ismarc_netbook has quit [Ping timeout: 276 seconds]
ismarc_netbook has joined #ocaml
G10h4ck has quit [Quit: KVIrc KVIrc Equilibrium 4.1.1, revision: 5727, sources date: 20110306, built on: 2011-04-28 17:57:39 UTC 5727 http://www.kvirc.net/]
alexis_ has quit [Remote host closed the connection]
<likebike> While trying to install Batteries, I'm getting this error: Unknown build of camomile detected ( 0.8.3 ), cannot auto-config batcamomile
<likebike> ...does that mean I need to use an older version of Camomile?
<likebike> ...or should I try the latest git version of Batteries?
<likebike> With some digging, I have found that I must downgrade Camomile to 0.8.2.
ismarc_netbook has quit [Read error: Connection timed out]
ismarc_netbook has joined #ocaml
ygrek has joined #ocaml
nannto_ has quit [Quit: Leaving...]
mcclurmc_home has quit [Ping timeout: 250 seconds]
mlh has joined #ocaml
Modius has quit [Read error: Connection reset by peer]
Modius has joined #ocaml
avsm has joined #ocaml
_andre has joined #ocaml
Anarchos has joined #ocaml
ismarc_netbook has quit [Read error: Connection timed out]
ismarc_netbook has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
lopex has joined #ocaml
munga has quit [Ping timeout: 276 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Snark has joined #ocaml
pheredhel has quit [Quit: ZNC by prozac - http://znc.sourceforge.net]
ismarc_netbook has quit [Ping timeout: 268 seconds]
ismarc_netbook has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
_zack has joined #ocaml
<_zack> am I missing something or there is no function in the ocaml stdlib to create a temporary dir in an atomic way?
lopex has quit [Ping timeout: 244 seconds]
lopex has joined #ocaml
iris1 has quit [Quit: iris1]
mjonsson has joined #ocaml
<f[x]> _zack, no
<f[x]> there is mkdtemp in janest-core
<_zack> f[x]: ack, for now I've solved with Unix.open_process_in "mktemp -d", but thanks for the pointer
<_zack> f[x]: do you have any idea if there is a feature request about that?
<f[x]> haven't seen
Yoric has quit [Read error: Connection reset by peer]
Yoric1 has joined #ocaml
<f[x]> and since 1 minute ago it is also in extunix :)
vivanov has joined #ocaml
Yoric1 has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
ismarc_netbook has quit [Read error: Connection timed out]
Snark has quit [Ping timeout: 255 seconds]
Snark has joined #ocaml
axiles has joined #ocaml
Yoric has quit [Quit: Leaving.]
Yoric has joined #ocaml
Yoric has quit [Remote host closed the connection]
<thelema> likebike: sorry about the camomile 0.8.3 problem - it's an issue with the version detection in the makefile.
<thelema> it would be sufficient to copy src/batCamomile-0.8.2.ml to src/batCamomile.ml, and everything would work fine
Yoric has joined #ocaml
dnolen has joined #ocaml
<hcarty> adrien: http://0ok.org/cgit/cgit.cgi/xstrp4/ to track development until something more formal happens. There is now basic support for custom xstrp4 expansions.
chambart has quit [Ping timeout: 244 seconds]
chambart has joined #ocaml
lopex has quit [Ping timeout: 244 seconds]
_zack has left #ocaml []
lopex has joined #ocaml
ankit9 has quit [Quit: Leaving]
dnolen has quit [Quit: dnolen]
ikaros has joined #ocaml
lopex has quit []
joewilliams_away is now known as joewilliams
impy has quit [Ping timeout: 240 seconds]
impy has joined #ocaml
bzzbzz has joined #ocaml
ankit9 has joined #ocaml
Associat0r has joined #ocaml
mfp has quit [Ping timeout: 258 seconds]
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
philtor has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
mfp has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ulfdoz has quit [Ping timeout: 260 seconds]
Yoric1 has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
eikke has joined #ocaml
ztfw has joined #ocaml
avsm has quit [Quit: Leaving.]
alexyk has joined #ocaml
<likebike> Hey guys, Is there a webpage anywhere that lists projects that use Batteries? I am trying to figure out how to use Batteries, but a good example would really be useful!
<thelema> likebike: there's some examples in examples/ of batteries source folder
<likebike> good idea.
<thelema> here's some machine learning code that makes good use of batteries: https://github.com/thelema/machine-learning
<likebike> thank you
<thelema> it's not well documented, though
<likebike> that's ok. The code is well written.
ftrvxmtrx has joined #ocaml
ygrek has joined #ocaml
itegebo has joined #ocaml
itegebo has quit [Remote host closed the connection]
itegebo has joined #ocaml
Yoric has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
Reaganomicon has joined #ocaml
eikke has quit [Ping timeout: 250 seconds]
<hcarty> likebike: There are some very basic snippets on the wiki as well - https://github.com/ocaml-batteries-team/batteries-included/wiki/Getting-started
waern has quit [Read error: Connection reset by peer]
ymasory has joined #ocaml
<likebike> Thank you hcarty. That was extremely helpful!
<likebike> Hey guys, what would you say is the most widely-used program that is written in Ocaml, not including the Ocaml development tools? Unison?
<thelema> Coq, maybe
<thelema> n/m, unison soundly beats coq at http://popcon.debian.org/
munga has joined #ocaml
<zorun> yeah, unison is a very great tool
<zorun> I even didn't know is was written in OCaml at first
<zorun> on the other hand, Coq is a bit more specific
<zorun> by the way, fftw is using ocaml heavily, and I believe it beats any other OCaml project in popularity
<zorun> they use OCaml to generate optimized C code :)
<thelema> zorun: fftw2 has same popularity as mldonkey-server, more than coq but less than unison
<thelema> same popularity on vote, although fftw2 almost reaches as many installations as unison
jderque has joined #ocaml
<zorun> well, I think you missed fftw3
<thelema> fftw3 is down by coq
<zorun> while fftw2 has around 3.000 install on debian, fftw3 has 43.00
<zorun> I meant 43.000
<zorun> just try with "libfftw3-3" ;)
<thelema> okay, fftw wins
<zorun> thelema: you look like a developer of Coq :)
<thelema> not at all
<zorun> my bad, missed guess
<thelema> huh, why isn't libfftw3-3 here: http://qa.debian.org/popcon.php?package=fftw
<zorun> no idea
ygrek has quit [Ping timeout: 250 seconds]
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
alexyk_ has joined #ocaml
alexyk has quit [Ping timeout: 240 seconds]
alexyk_ is now known as alexyk
yezariaely has joined #ocaml
ztfw has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 260 seconds]
george_z0rwell has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
vivanov has quit [Quit: Lost terminal]
_andre has quit [Quit: leaving]
yezariaely has quit [Quit: Leaving.]
axiles has quit [Remote host closed the connection]
ymasory_ has joined #ocaml
ymasory has quit [Read error: Operation timed out]
Snark has quit [Quit: Ex-Chat]
ymasory_ has quit [Quit: Leaving]
jderque has quit [Quit: leaving]
edwin has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Anarchos has joined #ocaml
Associat0r has quit [Quit: Associat0r]
eikke has joined #ocaml
Yoric has quit [Quit: Leaving.]
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
alexyk has quit [Quit: alexyk]
ymasory has joined #ocaml
Morphous has quit [Read error: Operation timed out]