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
decafbad has joined #ocaml
decafbad has quit [Changing host]
decafbad has joined #ocaml
antegallya has quit [Ping timeout: 245 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
oriba has quit [Quit: oriba]
letrec has joined #ocaml
Xizor has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Read error: Operation timed out]
decafbad is now known as decaf
twittard has quit [Read error: Connection reset by peer]
twittard has joined #ocaml
asdfhjkl has quit [Quit: Leaving]
letrec has quit [Ping timeout: 276 seconds]
Drup has quit [Quit: Leaving.]
cyphase has quit [Ping timeout: 252 seconds]
twittard has quit [Ping timeout: 276 seconds]
letrec has joined #ocaml
twittard has joined #ocaml
emmanuelux has quit [Ping timeout: 240 seconds]
snarkyboojum has quit [Read error: Operation timed out]
snarkyboojum has joined #ocaml
r126f has quit [Ping timeout: 276 seconds]
r126f has joined #ocaml
decaf has quit [Remote host closed the connection]
Derander_ has joined #ocaml
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
otk has quit [Ping timeout: 255 seconds]
bzzbzz_ has quit [Quit: leaving]
otk has joined #ocaml
EmmanuelOga has joined #ocaml
Epeli has quit [Read error: Operation timed out]
Epeli has joined #ocaml
letrec has quit [Ping timeout: 240 seconds]
letrec has joined #ocaml
EmmanuelOga has quit [Quit: WeeChat 0.3.7-dev]
letrec has quit [Ping timeout: 272 seconds]
abdallah has joined #ocaml
otk_ has joined #ocaml
ftrvxmtrx has joined #ocaml
otk has quit [Ping timeout: 276 seconds]
edwin has joined #ocaml
Snark has joined #ocaml
otk has joined #ocaml
abdallah has quit [Quit: Ex-Chat]
otk_ has quit [Ping timeout: 252 seconds]
<adrien> hmm? http://www.ocaml-lang.org/ "This website is edited by OCamlPro. "
<adrien> and there's one column of text on the right which I've been a bit surprised with
rby has quit [Read error: Connection reset by peer]
rby has joined #ocaml
Xizor has joined #ocaml
NihilistDandy has joined #ocaml
eikke has joined #ocaml
Cyanure has joined #ocaml
antegallya has joined #ocaml
avsm has joined #ocaml
NihilistDandy has quit [Read error: Connection reset by peer]
zuymanto has joined #ocaml
<csmrfx> Why does OCaml function definition use '='? Why not ':' instead? = implies equality, : implies whatever being referred to follows
zerbob has joined #ocaml
<csmrfx> Even the repl responds with ':', not '='
<csmrfx> no, wait
<csmrfx> well, it's kinda weirdly idiosynchronous
<csmrfx> example:
<csmrfx> #type ratio = {num: int; denum: int};;
<csmrfx> you get type ratio = { num : int; denum : int; } as a response
eikke has quit [Ping timeout: 260 seconds]
<csmrfx> oh, nevermind
<csmrfx> just learning here
<adrien> you could say it derives from "let a = 42": same syntax
<adrien> also, ":" is already used for type annotations
<adrien> and I read "let f = function | 0 -> 1 | n -> ..." as "let f be the function which, to 0, associates 1 and, to n, ..." (I don't know if "associate" is the right word; I use it because of french)
<csmrfx> Another thing that irks me is ';;'
<csmrfx> why not just ';'
<csmrfx> Personally, I'd prefer '.' for statements, '!' for expressions.. and perhaps '?' for calls or something
<csmrfx> 8P
eikke has joined #ocaml
<zorun> csmrfx: you can omit ';;' completely
<zorun> excepted in the toplevel
<csmrfx> oh
<adrien> csmrfx: ";;" means "end of sentence, start parsing"
<adrien> in a file, reaching the end of the file has the same meaning
MaskRay has joined #ocaml
<csmrfx> ok
<adrien> I'm doing changes to http://www.ocaml-lang.org/ and currently, http://www.ocaml-lang.org/download.html
<csmrfx> Also, I think 'do ... end' looks much nicer than 'do ... done'
<adrien> how many "ocaml" library packages and application packages are there in debian? fedora? arch linux? everything else?
<csmrfx> adrien well, depends on the version, naturally...
<adrien> let's say sid for debian
<csmrfx> also, would you count things like ocaml vm written in javascript?
<adrien> the numbers will probably be invalid by the end of the month anyway :-)
<adrien> that's not library, that's not application but that's definitely related so it'd need another category :P
<zorun> $ yaourt -Ssq ocaml | wc -l
<zorun> 158
<zorun> :)
<adrien> quite a lot :-)
<csmrfx> ubuntu 10.4. has 277 (apt-cache search ocaml)
Drup has joined #ocaml
<csmrfx> apt-cache lib ocaml makes that 235 (as some of the above are things like swig and code beautifiers)
<zorun> 471 on squeeze
<zorun> but that's definitely cheating ;)
MaskRay has quit [Read error: Operation timed out]
<zorun> things like ocaml-base-nox, ocaml-base-nox-3.11.2, ocaml-base-nox-3.12.2+dev6
<zorun> there are a lot of duplicates
MaskRay has joined #ocaml
<adrien> ok, thanks
<csmrfx> each lib has a dev version, etc
zuymanto has quit [Read error: Connection reset by peer]
zuymanto has joined #ocaml
<zorun> there was a list of ocaml packages, sorted by popularity on Debian
<csmrfx> (for comparison, scala lib counts 158 and ruby lib counts 790'9
<zorun> (using popularity-contest)
<csmrfx> s/'9/)/
<zorun> mmh, a bit old though
MaskRay has quit [Ping timeout: 260 seconds]
<adrien> any word equivalent to "improvement" but "shorter?
<zorun> progres?
<zorun> +s
<adrien> I'd like to mention the fact that the first-class modules are "nicer" to use than in 3.12
<csmrfx> line number?
<adrien> 10
eikke has quit [Ping timeout: 252 seconds]
<adrien> to 14
<csmrfx> are you talking about functionality? enhancement?
cyphase has joined #ocaml
<csmrfx> refine, upgrade too - both refer to a particular scenario
<csmrfx> might also need extend or expand, if new features/functionality
<adrien> well, catchy sentence to convey the meaning that the next version of ocaml makes using first-class modules nicer
<avsm> ooh, my dreamplug has finally arrived. time to try out benedikt's arm improvements in 3.13
<adrien> perfect timing for the week-end :-)
<zorun> :)
<csmrfx> Enhanced First-class module usage?
<csmrfx> haha, I'm not a native english and I was just translating finnish palindromes to german
<csmrfx> Improved First-class module syntax would be fine, imo
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
<adrien> see the right column on http://notk.org/~adrien/misc/ocaml-lang-www/download.html , "Next release", I'd like to make it a bit shorter because there's very little space
<csmrfx> Ok, what espression do you have now?
<csmrfx> *expression
<adrien> hmmm, why didn't it update the page?
emmanuelux has joined #ocaml
<adrien> updated now
<adrien> hmmm, afk a few minutes and then I'll have to leave
<csmrfx> GADTs, enhanced First class modules, mingw-w64,...
<csmrfx> hm, first
<zorun> oh, mingw-w64 support?
<csmrfx> and sorry: it is with a hyphen:
<csmrfx> first-class
<csmrfx> (or perhaps it was syntax that was improved: "enhanced first-class module -syntax,")
<csmrfx> Now, if I only understood what first-class modules are. And could they be renamed eigenmodules?
zerbob has quit [Quit: Page closed]
Cyanure has quit [Remote host closed the connection]
ontologiae has joined #ocaml
oriba has joined #ocaml
tomodo has joined #ocaml
<tomodo> hi
<tomodo> does anyone know how to rsolve; Error: Could not find the .cmi file for interface ide/undo.mli.
<tomodo> in compiling coq?
letrec has joined #ocaml
ikaros has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
ivan\ has quit [Read error: Operation timed out]
<iZsh> when I have an error such as "Error: This expression has type a but an expression was expected of type b" is there a way to ask the compiler to tell me where it inferred the type should be "b" ?
<Drakken> iZsh b is the expected type, so that would be based on the function it's being passed to.
<iZsh> I know that
<iZsh> but my code is rather large, so I want the compiler to tell me where exactly
<iZsh> because obviously, it isn't the type I think it should be, so I must have a typo/error somewhere
ivan\ has joined #ocaml
eikke has joined #ocaml
<iZsh> so the error is not at the line given by the error message, the error is where the type is inferred
<Drakken> I don't see any relevant options for ocamlc. The only way I know is to explicitly specify the expression's type in the signature of the function it's passed to.
<Drakken> Then you'll get a better error message.
<Drakken> I mean in the param list of the function's definition.
zuymanto_ has joined #ocaml
zuymanto has quit [Read error: Connection reset by peer]
<iZsh> I found the bug, but explicit typing of the function didn't help. so a general solution is still up to be found :)
<Drakken> why didn't it help? If you code your incorrect assumption into the function def, the error message has to move closer to the bug.
<Drakken> Of course it's slow, but I don't see how it can not be general.
zerbob has joined #ocaml
MaskRay has quit [Quit: leaving]
fantasticsid has joined #ocaml
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
otk_ has joined #ocaml
otk has quit [Ping timeout: 245 seconds]
micro___ has joined #ocaml
longh__ has joined #ocaml
ocp has joined #ocaml
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
ocp has quit [Ping timeout: 244 seconds]
Drup has quit [Ping timeout: 276 seconds]
antegallya has quit [Remote host closed the connection]
antegallya has joined #ocaml
zerbob has quit [Quit: Page closed]
Drup has joined #ocaml
antegallya has quit [Quit: Leaving.]
antegallya has joined #ocaml
letrec has quit [Ping timeout: 252 seconds]
<flux> izsh, sometimes I annotate not only functions but s single values. emacs C-c C-t tells me where the type is different from what I expect and thrn I go and annotate this
<flux> this typically reduces the scope where the error occurs
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
smondet has quit [Ping timeout: 272 seconds]
pilki has joined #ocaml
Drup has quit [Ping timeout: 244 seconds]
eikke has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
zuymanto_ has quit [Quit: zuymanto_]
zarus has quit [Read error: Operation timed out]
Drup has quit [Ping timeout: 248 seconds]
zuymanto has joined #ocaml
Xizor has quit []
zuymanto has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
<thelema> iZsh: if one part of your code assumes type a and another part of your code assumes type b, the type error can occur anywhere between those two codepoints, and the fix could be at either endpoint (wrong function used) or at any spot in between (missing conversion)
<iZsh> thelema: yes, but when you have a lot of recursive functions, it's often a little bit difficult to know where the type inference comes from
<flux> btw, if you have a polymorphic function, it can be useful to annotate it non-polymorphic for the purpose of finding the typing error
<flux> but that's perhaps not relevant here
eikke has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
eikke has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
Drup has quit [Ping timeout: 252 seconds]
zerbob has joined #ocaml
zerbob has left #ocaml []
Drup has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
Drup has quit [Ping timeout: 252 seconds]
Drup has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
eikke has joined #ocaml
[Moviuro] has joined #ocaml
<[Moviuro]> Hi all! I'm trying to use OCaml on a x86_64 Linux architecture and want to open the "num" library: how can I achieve this?
Drup has quit [Ping timeout: 244 seconds]
Drup has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
zuymanto has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
ocp has joined #ocaml
<flux> [moviuro], #use "topfind";; and then #require "num";;
<flux> [moviuro], then you have module Num at your disposal in the toplevel
<flux> if you wish to use it during compilation, do it like: ocamlfind ocamlc -package num -linkpkg -o foo foo.ml
<[Moviuro]> flux: Well, I want to have the prompt, like in Camllight one ;)
<flux> [moviuro], you really want to have ocamlfind installed
<flux> also known as findlib
<flux> there's a simple way to do it without it, but I haven't used it for years and I've forgotten it since :)
<flux> [moviuro], yes, findlib is a package that may need to be installed separately
<flux> most likely if you installed ocaml from your distribution, there's a findlib packge around as well
<[Moviuro]> flux ah :) okay. I'll see if I find it in OpenSUSE's repos
<flux> if not, its source codes are available at http://projects.camlcity.org/projects/findlib.html
<flux> the package appears to be called ocaml-findlib
Drup has quit [Ping timeout: 240 seconds]
<[Moviuro]> flux, sorry, make does not work: http://paste.opensuse.org/47935513
jamii has joined #ocaml
eikke has joined #ocaml
ski has quit [Read error: Operation timed out]
twittard has quit [Quit: twittard]
<flux> [moviuro], it appears to depend on camlp4 which isn't installed (does 'camlp4' work?). that should definitely be a package in your distribution, if ocaml is. (ocaml comes with camlp4, but at times it's packaged separately)
<flux> [moviuro], are you sure you don't have findlib available directly for opensuse? I found this page: https://build.opensuse.org/package/show?package=ocaml-findlib&project=home:NaCl:ocaml
eikke has quit [Ping timeout: 260 seconds]
<[Moviuro]> flux: thanks a lot, it works great. Though the commands ain't the same as for Camllight ><" http://paste.opensuse.org/64754809
Drup has joined #ocaml
Drup has quit [Ping timeout: 260 seconds]
Drup has joined #ocaml
ankit9 has quit [Quit: Leaving]
Drup has quit [Ping timeout: 265 seconds]
ulfdoz has quit [Quit: kernel-upgrade]
eikke has joined #ocaml
ulfdoz has joined #ocaml
jrslepak has quit [*.net *.split]
caligula has quit [*.net *.split]
brendan has quit [*.net *.split]
adrien has quit [*.net *.split]
milosn has quit [*.net *.split]
tomodo has quit [Ping timeout: 276 seconds]
jrslepak has joined #ocaml
caligula has joined #ocaml
brendan has joined #ocaml
adrien has joined #ocaml
milosn has joined #ocaml
lamawithonel has joined #ocaml
zorun has quit [Quit: leaving]
eikke has quit [Ping timeout: 240 seconds]
Snark has quit [Quit: Quitte]
zorun has joined #ocaml
[Moviuro] has quit [Quit: Konversation terminated!]
<iZsh> how do I load/initialize a program in ocamldebug and stop at the first instruction?
Drup has joined #ocaml
<iZsh> or, how can i break after a module initialization?
<NaCl> flux: yeah, those packages wokred as of 11.4
<flux> oh, too bad the guy left before I noticed to tell him about open Num, but probably he'll figure it out, if he didn't already..
eikke has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
Drup has joined #ocaml
Drup has quit [Ping timeout: 248 seconds]
lorilan has joined #ocaml
Drup has joined #ocaml
<lorilan> bonjour !
edwin has quit [Remote host closed the connection]
longh__ is now known as longh
Drup has quit [Ping timeout: 265 seconds]
pilki has quit [Quit: This computer has gone to sleep]
Drup has joined #ocaml
pippijn has quit [Read error: Operation timed out]
yezariaely has quit [Read error: Operation timed out]
pippijn has joined #ocaml
yezariaely has joined #ocaml
<Drakken> howdy
ocp has left #ocaml []
zuymanto has quit [Quit: zuymanto]
<thelema> Drakken: hi
zuymanto has joined #ocaml
<Drakken> hi thelema. I was greeting lorilan.
<lorilan> Drakken, hi !
<lorilan> i didn't realise it was meant for me ^^
<Drakken> bonjour et bon soir. I'll be logging off soon.
<lorilan> you prefer that I speak in french or in english
<lorilan> (since this is an ocaml channel i wonder if there isn't a lot of people who are in fact french ^^ )
wtetzner has joined #ocaml
<Drakken> lorilan if you want to ask a question in French, the best way is probably to announce it here and then ask on #ocaml-fr
<lorilan> i have already asked my question on #ocaml-fr without success
<lorilan> so perhaps will I be more lucky here
<lorilan> i have a strange error
<lorilan> This expression has type unit but an expression was expected of type bool
<Drakken> I'm sure there are many europeans here, but they're usually more active around 9am-5pm utc
<lorilan> on the following line
<lorilan> for j=0 to (Array.length cdts)-1 do
<zorun> inside a 'if' construct?
<lorilan> yes
<Drakken> for expressions don't return booleans
<lorilan> so i've done something like (for ...); false
<zorun> yup
<lorilan> and is still have the error
<zorun> most likely, you return a bool on one branch of the 'if'
<zorun> and nothing (unit) on the other brancg
<zorun> *branch
<zorun> do you have the complete code?
<lorilan> here
<zorun> erk
<zorun> (sorry)
<zorun> lines 7-10, that's ugly :)
<lorilan> yep
<lorilan> i deleted it
<lorilan> it's a version from ten minutes ago ^^
<adrien> for i = 0 to 41 do
<adrien> false
<adrien> done
<adrien> makes no sense to return something inside a for-loop
<lorilan> adrien i realise it now that i have the nose on it
eikke has quit [Ping timeout: 272 seconds]
<Drakken> needs more recursion
<lorilan> it works !!
<lorilan> more recusion ?
<lorilan> how so ?
<Drakken> what are the for loops supposed to do?
<lorilan> it search on all the neighbors if there is one where you can go
<zorun> you could use a lot more of high-order functions
<lorilan> what do you mean by high-order ?
<zorun> like Array.fold
<adrien> functions taking other functions as argument
<adrien> that's a higher-order function (HOF)
<adrien> (took me a while to learn that one :P )
<zorun> :)
<lorilan> ha ok
<zorun> it's genreally a good idea to use them
<zorun> it's something quite natural in a functional language, and very powerful ;)
<lorilan> i must admit i'm quite new in the functionnal programming
<zorun> also, lists are generally (but not always) a better bet :)
<lorilan> and what's seems the most natural for a math guy, requires me to think really hard
<zorun> *than arrays
<lorilan> i will surely rewrite the code with lists
<lorilan> but since i was at this much of the goal, i wanted to finish with arrays first
<adrien> most of the stuff in ocaml is very simple but unfortunately, it's not always shown in a simple way
<Drakken> the for loops are Array.iteri
<adrien> or at least, the usefulness might not be shown very well
<lorilan> anyway thanks for everything !
<lorilan> my dog is crying for his walk
jamii has quit [Remote host closed the connection]
<lorilan> so i'm gonna leave you
<lorilan> perhaps see you later
lorilan is now known as lorilan[away]
Drup has quit [Ping timeout: 245 seconds]
ontologiae has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ontologiae has quit [Ping timeout: 272 seconds]
Drup has joined #ocaml
<adrien> if someone has some ideas that would be quick to do for http://notk.org/~adrien/misc/ocaml-lang-www/ (ocaml-lang.org with some changes), I can do them during the week-end and ask for a merge after that
<adrien> (and I still need to add distribution stuff on the download page)
lorilan[away] is now known as lorilan
avsm has quit [Quit: Leaving.]
<adrien> good night :-)
<lorilan> 'night
antegallya has quit [Read error: Connection reset by peer]
zuymanto has quit [Quit: zuymanto]
emmanuelux has quit [Read error: No route to host]
emmanuelux has joined #ocaml
srcerer has quit [Ping timeout: 245 seconds]