ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org
lggr has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
jave_ has quit [Read error: Connection reset by peer]
jave has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
iago has quit [Quit: Leaving]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
nze has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
jamii has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
avsm has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 264 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
sivoais has quit [Ping timeout: 244 seconds]
sivoais has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
madroach has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
<wmeyer> pippijn: ping :-)
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
astertronistic has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
jave has quit [Ping timeout: 246 seconds]
jave_ has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
lggr has joined #ocaml
julm has quit [Read error: Operation timed out]
pippijn has quit [Remote host closed the connection]
julm has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
jamii has quit [Ping timeout: 245 seconds]
pippijn has joined #ocaml
pippijn has quit [Changing host]
pippijn has joined #ocaml
<pippijn> how did I quit?
lggr has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 272 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 272 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
mjonsson has quit [Remote host closed the connection]
lggr has joined #ocaml
larhat has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 260 seconds]
avsm has quit [Quit: Leaving.]
lggr has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
cdidd has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
larhat has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Neros has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 265 seconds]
Submarine has joined #ocaml
lggr has joined #ocaml
yezariaely has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
yezariaely has joined #ocaml
lggr has joined #ocaml
ankit9 has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
pango is now known as pangoafk
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Jeaye has quit [Quit: WeeChat 0.3.9]
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
Cyanure has joined #ocaml
lggr has quit [Ping timeout: 272 seconds]
Neros has joined #ocaml
lggr has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
wtetzner has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 240 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
lggr has joined #ocaml
djcoin has joined #ocaml
wtetzner has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
astertronistic has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
thomasga has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
Cyanure has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
ski has quit [Read error: Operation timed out]
ankit9 has quit [Quit: Leaving]
lggr has quit [Ping timeout: 252 seconds]
Neros has joined #ocaml
chturne has joined #ocaml
pngl has joined #ocaml
ski has joined #ocaml
lggr has joined #ocaml
chambart has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
Neros has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
sepp2k has joined #ocaml
chambart has quit [Ping timeout: 240 seconds]
ski has quit [Ping timeout: 245 seconds]
<rwmjones> anyone seen gildor recently?
ontologiae has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
ski has joined #ocaml
GnomeStoleMyBike has joined #ocaml
lggr has joined #ocaml
chturne has quit [Ping timeout: 255 seconds]
ski has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
lggr has joined #ocaml
ski has joined #ocaml
Sirmy has joined #ocaml
<Sirmy> hi guys, how can i do a if statement which return a value without a else?
Neros has joined #ocaml
mnabil has joined #ocaml
<rwmjones> Sirmy: you can't .. what would it return in the else case?
<sepp2k> Sirmy: What do you want to happen if the condition is false?
<rwmjones> can you give an example of what you're trying to do?
<Sirmy> sepp2k: nothing, i want the if returns a true if a expr is true, otherwise nothing
<rwmjones> there's no such thing as "nothing" .. it has to return something (maybe false?)
<sepp2k> Sirmy: What does nothing mean? An error?
lggr has quit [Ping timeout: 245 seconds]
<rwmjones> and when you say "return", do you mean "return from the enclosing function"?
<Sirmy> i have a for and inside that a if that returns false if an expr is true, and only at the end of the cycle i want to return true
<Sirmy> rwmjones: yes
chambart has quit [Ping timeout: 272 seconds]
<rwmjones> ah ok, this is an interesting shortcoming of ocaml
<rwmjones> which is there is no 'return' statement (there should be)
<rwmjones> the best way to do this is not to use a for loop at all
<rwmjones> rewrite the code as a recursive function
<rwmjones> like:
<Kakadu> rwmjones: What aout with_return?
<rwmjones> let rec loop i =
<Kakadu> about*
<rwmjones> no idea, what is with_return?
<rwmjones> let rec loop i =
<rwmjones> if i < 10 then (
lggr has joined #ocaml
<rwmjones> do stuff
<rwmjones> loop (i+1)
<rwmjones> )
<rwmjones> where do stuff can not call loop (hence exiting) if the other condition is met
<sepp2k> Actually, it sounds as if he could just use List.find
<Sirmy> rwmjones: yeah, i imagene it, i only want to know if there is other way
<rwmjones> for loops are not widely used in ocaml at all
<rwmjones> except in some numeric code, operating on arrays
<rwmjones> biab
<fx_> rwmjones, I guess he is lost somewhere in the dungeons of not evil empire
<fx_> but is somehow able to reach github
Neros has quit [Ping timeout: 245 seconds]
<pippijn> C++11 is funny
<pippijn> the ellipsis "..." can appear almost everywhere, now
pngl has quit [Ping timeout: 246 seconds]
ski has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
mcclurmc_away is now known as mcclurmc
ski has joined #ocaml
lggr has joined #ocaml
mnabil has quit [Read error: Connection reset by peer]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
chambart has joined #ocaml
Neros has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
ski has quit [Ping timeout: 260 seconds]
<pippijn> struct is_function<_Res(_ArgTypes......) const>
lggr has joined #ocaml
chturne has joined #ocaml
chambart has quit [Ping timeout: 248 seconds]
Neros has quit [Ping timeout: 260 seconds]
Neros has joined #ocaml
<rwmjones> fx_: evil empire .. he works for M$ now :-?
lggr has quit [Ping timeout: 256 seconds]
ski has joined #ocaml
<fx_> "not evil" empire!
<rwmjones> google?!
<djcoin> Monsanto ? =)
lggr has joined #ocaml
ankit9 has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
cago has joined #ocaml
<fx_> yup
chambart has joined #ocaml
lggr has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
Neros has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
thomasga has quit [Quit: Leaving.]
chambart has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
Neros has joined #ocaml
lggr has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 246 seconds]
chambart has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
Simn has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 245 seconds]
chturne has quit [Ping timeout: 240 seconds]
pngl has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
<Sirmy> can i define a type inside a definition of a function?
shajen has joined #ocaml
lggr has quit [Ping timeout: 265 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
ski has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
<shajen> anyone know how to write any function of type 'a ->' b?
<sepp2k> shajen: f x = f x
thomasga has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
<shajen> sepp2k: are you sure?
<sepp2k> shajen: Am I sure that the function f x = f x has the type 'a -> 'b? Yes, I am.
lggr has joined #ocaml
<shajen> ah yes, i forgot rec in let ;)
<shajen> thanks
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
jbrown__ has joined #ocaml
|jbrown| has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
chambart has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 256 seconds]
<Kakadu> guys
<Kakadu> `/usr/local/bin/ocp-ocamlc.opt -where` says that there is no option -where
<Kakadu> Is it OK?
lggr has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
Neros has joined #ocaml
_andre has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
Neros has quit [Quit: No Ping reply in 180 seconds.]
Neros has joined #ocaml
lggr has quit [Ping timeout: 272 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
Neros has quit [Quit: No Ping reply in 180 seconds.]
pippo21 has joined #ocaml
lggr has joined #ocaml
<pippo21> hi everybody!
Neros has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
Sirmy has quit [Quit: Page closed]
Neros has quit [Client Quit]
Neros has joined #ocaml
lggr has joined #ocaml
pippo21 has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
mjonsson has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 265 seconds]
rgrinberg has joined #ocaml
ski has joined #ocaml
lggr has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
troydm has quit [Read error: Operation timed out]
Neros has joined #ocaml
lggr has quit [Ping timeout: 265 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
lggr has joined #ocaml
<djcoin> Does any bindings to libuv exist in OCaml ?
<djcoin> (and, will be it be interesting to have one ?)
lggr has quit [Ping timeout: 256 seconds]
Neros_ has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
lggr has joined #ocaml
chturne has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
<ontologiae> libuv, what is it ?
lggr has joined #ocaml
<djcoin> libuv is a high performance evented I/O library which offers the same API on Windows and Unix. It is in C
<djcoin> nodejs uses it
<adrien> there are bindings to libev and libevent I think
<adrien> so unless you want interop with node.js, you should probably check these
<djcoin> libev is the ancestor of libuv iirc
<djcoin> Ok
<adrien> ancestor?
<adrien> I'll have to check but I had never heard that
<djcoin> In nodejs i mean, they switched from libev to libuv
<adrien> ah, ok
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
ankit9 has quit [Quit: Leaving]
<ousado> it's a more general thing from the same guy AFAIK
<ousado> hm. no
<ousado> libeio is what I had in mind
lggr has quit [Ping timeout: 248 seconds]
ottbot has joined #ocaml
lggr has joined #ocaml
<larhat> libuv is basically libev with c-ares and better windows support, afaik
mjonsson has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
Neros_ has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 246 seconds]
hcarty_ is now known as hcarty
lggr has joined #ocaml
gnuvince_ has quit [Ping timeout: 245 seconds]
Neros has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
chturne has quit [Ping timeout: 260 seconds]
ben_zen has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
chambart has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
paolooo has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
larhat has quit [Quit: Leaving.]
rgrinberg has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
lggr has quit [Ping timeout: 245 seconds]
milki has joined #ocaml
lggr has joined #ocaml
avsm has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
<vbmithr> Hi, has anybody used pa_do already ?
<vbmithr> It does not work well for em
<hcarty> vbmithr: I've used it a fair amount, although not recently
err404 has joined #ocaml
<vbmithr> I have such things happening:
<vbmithr> #require "pa_do.num";;
<vbmithr> utop $ Big_int.( 23 ** 567 mod 45 + "123456789123456789123456789");;
<vbmithr> File "", line 1, characters 10-12: Error: This expression has type int but an expression was expected of type float
<flux> probably Big_int doesn't define ** ?
<flux> (just guessing)
<adrien> 1L ?
Neros has quit [Ping timeout: 245 seconds]
<flux> actually Big_int doesn't have any operators
<flux> or is that supposed to be some magic happening in pa_do I don't know of (I haven't used it)
<hcarty> flux: pa_do can/does/should do some magic there
<flux> ok
<vbmithr> That’s the thing, it’s a syntax extension
<hcarty> vbmithr: I get the same error under OCaml 4.00.1 and the latest pa_do
<vbmithr> ok
<djcoin> what does pa in pa_do.num for example refer to ?
<hcarty> And Float.(1 + 2) says "unbound module Float"... which I know worked last time I tried it :-)
<djcoin> (camlp ?)
<hcarty> djcoin: Yes
<vbmithr> hcarty: ok, I’ll notify the author, it’s probably not normal :)
<djcoin> This project was sponsored by Jane Street Capital during their OCaml Summer Project 2008. <= great :)
lggr has quit [Ping timeout: 265 seconds]
<hcarty> djcoin: It's one of the few OSP projects I've seen which continued beyond the initial summer.
<djcoin> hcarty: thanks for the link. And is 'pa' initial of something or ?
<vbmithr> djcoin: Pretty much all syntax extensions are pa_something, but I don’t know what pa stands for
<djcoin> I was wondering too, are camlp extension "composable" (not sure what I mean there)
<hcarty> djcoin: I don't know the origin of 'pa' - it's common in syntax extensions
<djcoin> ok :)
<hcarty> vbmithr: Beat me to it :-)
<hcarty> djcoin: Some are
<vbmithr> :)
<hcarty> djcoin: In that some can be used together
<hcarty> Some can be used to build other extensions, including pa_do
Neros has joined #ocaml
lggr has joined #ocaml
<djcoin> I saw there was some work on AST manipulation, I guess the goal is to make it easier and more composable ?
<djcoin> (for syntax extension)
<djcoin> And is there a list of all camlp and other type of syntax extension ?
jamii has joined #ocaml
<hcarty> djcoin: I think you're correct on the AST manipulation additions. They look like they could make it into 4.01.
<hcarty> As far as I know there is no universal list of syntax extensions, but the Caml Hump likely has the biggest ones
lggr has quit [Ping timeout: 244 seconds]
<djcoin> All right, thanks
<djcoin> composable syntax extension would be awesome I guess
<vbmithr> I was wondering if Module.(foo…) would not conflict with local open…
lggr has joined #ocaml
Neros has quit [Ping timeout: 260 seconds]
<hcarty> vbmithr: It did initially, but IIRC pa_do was modified to get around that
<vbmithr> ok
<vbmithr> Yeah it looks like it
<fx_> pa means parser
<fx_> there are pr_ camlp4 modules - those are printers
<djcoin> oh ok
<djcoin> thanks fx_ :)
<hcarty> fx_: Thanks indeed!
<mcclurmc> hi. i'm trying to use camlp4 to generate a module implementation from an mli file. i started using filters, but there are only sig -> sig or struct -> struct filters. is what i'm trying to do possible?
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
answer_42 has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ocaml
cago has quit [Quit: Leaving.]
lucasaiu has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
smondet has joined #ocaml
lucasaiu has quit [Remote host closed the connection]
lggr has joined #ocaml
gnuvince_ has joined #ocaml
err404 has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 255 seconds]
hkBst has quit [Quit: Konversation terminated!]
lggr has joined #ocaml
Neros has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
gnuvince_ has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
ottbot has quit [Remote host closed the connection]
thomasga has quit [Ping timeout: 245 seconds]
larhat has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
chambart has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 272 seconds]
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
fraggle_laptop has quit [Quit: Quitte]
lggr has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
ski has quit [Ping timeout: 272 seconds]
ski has joined #ocaml
lggr has joined #ocaml
<wieczyk> wmeyer: I live ;]
gnuvince_ has joined #ocaml
lggr has quit [Ping timeout: 240 seconds]
mcclurmc is now known as mcclurmc_away
lggr has joined #ocaml
flux has quit [Read error: Connection reset by peer]
flux has joined #ocaml
Yoric has joined #ocaml
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
beckerb has quit [Ping timeout: 245 seconds]
chambart has quit [Read error: Operation timed out]
larhat has quit [Quit: Leaving.]
djcoin has quit [Quit: WeeChat 0.3.7]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
<ousado> what was that IDE for ocaml again?
<bitbckt> emacs :P
<bitbckt> (sorry, obligatory)
<thelema> :)
<ousado> someone mentioned an actual IDE lately
lggr has joined #ocaml
<thelema> ousado: typerex is an ocaml-ide in emacs
<thelema> camelia is a standalone one
<ousado> typerex it was
<thelema> there's also a plugin for ocaml in eclipse
<ousado> thanks
<thelema> finally, there's cameleon
<thelema> *cameleon2
<adrien> jein
<ousado> heh I'm always puzzled how eclipse manages to consume all resources you throw at it, even in 20012
<adrien> afaik it's not really maintained
<ousado> *2012
<bitbckt> It's a Feature(TM)
<adrien> vim also does
<adrien> when you load 4GB files, it takes 4GB memory
<ousado> thanks again, I'll relay that information :)
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
sepp2k has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
ontologi1e has joined #ocaml
ontologiae has quit [Ping timeout: 248 seconds]
elixey has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
ontologi1e has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
sivoais has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 272 seconds]
gnuvince_ has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
sivoais has joined #ocaml
<pippijn> argh
<pippijn> camlp4o says: Quotation not terminated
<pippijn> because of this comment: (* [726] AssignmentOperator -> <<= *)
lggr has joined #ocaml
<pippijn> that's not cool.. why does it even consider comments?
gnuvince_ has joined #ocaml
lggr has quit [Ping timeout: 248 seconds]
fx_ has quit [Ping timeout: 248 seconds]
lggr has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
Jeaye has joined #ocaml
lggr has joined #ocaml
pangoafk is now known as pango
lggr has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
lggr has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
gnuvince_ has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 276 seconds]
lggr has joined #ocaml
Yoric has joined #ocaml
<orbitz> Any Core buffs around?
lggr has quit [Ping timeout: 276 seconds]
chturne has joined #ocaml
emmanuelux has joined #ocaml
lggr has joined #ocaml
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
<thelema> orbitz: I can try.
<orbitz> thelema: Pasting onesec
<orbitz> thelema: http://ideone.com/qJTI9
<thelema> orbitz: so this is more of an async question?
<orbitz> thelema: problem seems to be around line 77
<orbitz> thelema: yes perhaps. The problem I see is my stdin isn't closing
<orbitz> If I usethis to run a program that reads input, it never gets EOF
<thelema> orbitz: ah, maybe not an async problem, maybe a "communicating over pipes" problem
<thelema> orbitz: are you doing line-oriented reading on the other end?
lggr has quit [Ping timeout: 260 seconds]
<thelema> i.e. the problem may be that the other end is doing a blocking read that doesn't fail because of EOF
BiDOrD_ has joined #ocaml
<orbitz> thelema: hrm it should, I tested with cat
lggr has joined #ocaml
<thelema> cat of the exact same data that you're outputting with this program?
avsm has joined #ocaml
BiDOrD has quit [Ping timeout: 260 seconds]
<orbitz> thelema: I did ~text:"foo" ~prog:"cat" ~args:[]
<orbitz> and it jus twaits
<thelema> orbitz: ah, you used cat as the reader....
<orbitz> That should be equivalent to echo foo | cat, which prints "foo" on my shell
<thelema> yes, maybe it's not closing immediately.
<orbitz> Wiats for a long time..
<thelema> the ; after Writer.write looks suspicious to me
<orbitz> Writer.write is string -> unit
<thelema> but close isn't... hmmm
lggr has quit [Ping timeout: 245 seconds]
<thelema> flush?
<thelema> although close should do that...
<orbitz> I feel like this is some weird unixism I'm not aware of
<thelema> ah... close ?force_close t waits for the writer to be flushed
<thelema> hmm, no; close should be doing the flush
lggr has joined #ocaml
<orbitz> Hrm
<orbitz> my kind is wrong
<orbitz> I have it for File
<orbitz> but File returns a deferred that never realizes
<orbitz> I think
<orbitz> Maybe not
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
lggr has quit [Ping timeout: 246 seconds]
<orbitz> avsm: you there?
<hcarty> thelema: I'm happy with BatBounded staying in Incubator for a release or two. I'd rather have it right later than wrong now and be stuck with it.
<thelema> hcarty: great. Now I just wish I could make the time to fix up batteries for a 2.0 release
<thelema> there's not really that much work left to do before the next beta; I just have failed to do it anytime in the last 7 months
lggr has joined #ocaml
thelema_ has joined #ocaml
<thelema_> and noone else has stepped up to the plate (note: this isn't a not-so-subtle push for you to do so, just me saying what's on my mind)
_andre has quit [Quit: leaving]
thelema has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 260 seconds]
<hcarty> thelema_: Understood :-)
avsm has quit [Quit: Leaving.]
<hcarty> No per-module ord in the 2.0 release, is that correct?
lggr has joined #ocaml
<thelema_> no, the other way; everything comparable should be
<thelema_> I'm tempted to use Core's Interfaces too (https://ocaml.janestreet.com/ocaml-core/latest/doc/core/Interfaces.html)
<thelema_> but I can't see how to apply them to, for example, List
<hcarty> Ah, ok. So BatOrd may stay in Incubator, but every comparable module should have a val ord : t -> t -> (Gt | Lt | Eq)
<thelema_> yes, that part of BatOrd, I think we can get behind.
<thelema_> ah, Container.S1
<thelema_> hmm, but that doesn't extend comparable to lists...
<hcarty> It would be nice to have Ord(er)able, Printable, ...
<thelema_> oh well, I guess lists aren't comparable...
<thelema_> hcarty: exactly; some of them don't really apply; stringable is obseleted by printable
zm has joined #ocaml
<thelema_> and we're not doing binable or sexpable
<thelema_> although, medium term, batteries should try to become less monolithic
lggr has quit [Ping timeout: 246 seconds]
<hcarty> thelema_: Proper/more flexible name spaces would help there
<hcarty> That's something I miss from Perl when writing/extending code in OCaml
<hcarty> It would be nice if Batteries.Array could be provided by a different library than Batteries.Calendar
lggr has joined #ocaml
<thelema_> quite true, but there's some internals that we'll have to expose; instead of having Foo.enum/of_enum, we would need some functions to enable Enum.foo/of_foo
<thelema_> hcarty: actually, I'm not too concerned about that; it's sufficient for the toplevel namespace to be 1:1 with project names
<thelema_> actually, not quite project names, but compilation collection names - a bunch of modules that are compiled together.
<thelema_> s/together/at the same time/
<hcarty> thelema_: It is nice, though, that in the Perl world Net::FTP and Net::SCP can be separate entities
cdidd has quit [Remote host closed the connection]
Yoric has joined #ocaml
<thelema_> CPAN does a good job of enforcing a global namespace for these; OCaml needs some way to do the same.
<thelema_> I don't think the Jane street people would appreciate me writing Core.Enum
<thelema_> it makes sense to me that they should somehow "own" that namespace
<hcarty> thelema_: I don't know. It would be nice to not have these general namespaces locked out.
<thelema_> The idea of deep heirarchical namespaces doesn't really sit right with me.
<hcarty> I'm not sure of the right way to put it
<hcarty> s/put/design/
lggr has quit [Ping timeout: 248 seconds]
<hcarty> But it would be nice if Core.Enum were possible without recompiling Core
<thelema_> yes, there's a tiny benefit to having many people able to put code into Net::*, maybe a few other examples too
<hcarty> I think that there's a big benefit. For example, I have local code to mix Batteries' IO support in CalendarLib.
<thelema_> And I too wish for a world where this is easily doable
avsm has joined #ocaml
gnuvince_ has joined #ocaml
<hcarty> Maybe in 4.01 :-)
<hcarty> Or beyond
<thelema_> clearly the right answer isn't to have batteries depend on calendar, or vice versa
<hcarty> thelema_: Exactly
avsm has quit [Client Quit]
lggr has joined #ocaml
<thelema_> at least that's not the right answer right now, and not even with cpam's auto-recompile when optional dep becomes available
<thelema_> s/available/commonplace/
<thelema_> The best solution I see is Calendar.IO, which depends on both and provides BatIO support for Calendar
<hcarty> thelema_: That would be nice
<thelema_> but I think that installing this library should not change the module signature of Calendar
<thelema_> meaning that anything using Calendar would have to be recompiled, as the md5 wouldn't match
<thelema_> with that, then the best solution is Calendar_IO
<hcarty> thelema_: If Calendar = module, then that's a problem. If Calendar <> module then it's not a problem.
<thelema_> hcarty: why shouldn't Calendar be a module?
<thelema_> and why introduce a new entity just for namespacing? Modules do a great job already
lggr has quit [Ping timeout: 246 seconds]
<hcarty> thelema_: I need to run, but I'm not sure that something new should be added. That's just the impression I got regarding what the namespace branch in OCaml svn was doing.
<hcarty> thelema_: Some sort of module/namespace mixing
Yoric has quit [Quit: Instantbird 1.3a1pre -- http://www.instantbird.com]
<wmeyer> hcarty: I think we had quite few proposals
Yoric has joined #ocaml
<wmeyer> I urge to have namespaces
<wmeyer> they are needed
<wmeyer> I keep reminding about CM - compilation manager in SML
<thelema_> hcarty: cheers
answer_42 has quit [Read error: Operation timed out]
<thelema_> namespaces branch 19 months ago
lggr has joined #ocaml
<bitbckt> heh. I just looked it up, too.
<bitbckt> the description in the README is promising.
<bitbckt> I'd rather have "namespace X.Y" in lieu of "in X.Y" as the example describes, but that's a minor thing.
<thelema_> bitbckt: agreed on the language extension
<bitbckt> I also like the "open X.Y as N" syntax.
<wmeyer> gasshe had a nice idea of DSL and namespaces dependent on a file system like modules in ocaml
<thelema_> bah, I can't say I like the approach. we have file = module, I think we should have exactly one level of directory = module in the include path.
<wmeyer> It's a pity, i didn't even look at the branch
* thelema_ approves of the "short-paths" branch strongly
<wmeyer> btw: I think also Fabrice had also some nice & concrete DSL to manage modules, but don't know how far it went...
<bitbckt> I prefer the convention-based namespace<->filesystem convention over the dictated method in, e.g., Java.
<bitbckt> er. that second "convention" should be "conversion"
<thelema_> bitbckt: project-name = base module
<bitbckt> thelema_: yes.
<thelema_> bitbckt: is that too dictated?
<bitbckt> no.
<wmeyer> bitbckt: OCaml is already bound to file system, so there is no way it can be done in a different way, i quite don't remember what the gashe proposal was but i quite liked it - but none of them had actuall read about SML CM
<bitbckt> for an example of the "conventional" way, see something like Ruby.
<bitbckt> the module = directory structure isn't required, but is encouraged.
<thelema_> wmeyer: iirc, gasche's proposal was to have a mapping file from module names to .cmi files that would disambiguate
<wmeyer> (not saying about java style, but minimal support for structuring namespaces via file system is required in OCaml)
lggr has quit [Ping timeout: 265 seconds]
<bitbckt> the definition of "minimal" is the question.
<wmeyer> bitbckt: in long run I don't like extreme case - "Java way"
<wmeyer> that's not ironic - it's a clever idea
<wmeyer> but it does not scale very well
<bitbckt> I agree.
<wmeyer> CM has notion of groups
<thelema_> wmeyer: I disagree; I say it scales extremely well, but has too high a constant factor.
<bitbckt> I can't recall the last time I've needed/wanted anything beyond 3 levels of nesting.
<thelema_> (it=java namespacing)
<bitbckt> but the Java system does provide what thelema_ was referring to earlier viz. Core.Enum.
<thelema_> bitbckt: Can you give an example where one level of namespacing isn't sufficient?
thelema_ is now known as thelema
<wmeyer> but then, I like file ~ module in ocaml relation, but i dont like namespace ~ directory as such. Even if i use mlpack to pack modules in a same directory
<wmeyer> that's my choice
lggr has joined #ocaml
<wmeyer> and convention i choose and not because the namespace manager forces me to do so
<bitbckt> thelema: *thinking*
<thelema> bitbckt: fabrice's example was something like microsoft, where they would want Microsoft.Office.* and Microsoft.Windows.*, etc.
<bitbckt> right.
<thelema> bitbckt: but I disagree; if office and windows are compiled separately, Microsoft_Office.* and MS_Windows.* have *no* disadvantage
<wmeyer> thelema: and sometimes you actuall want to group different hierarchies but sharing the same modules
<wmeyer> so then filesystem solution is unusuable
<wmeyer> thelema: let's say you want lib with all the features present, some other lib with excluded features
<thelema> wmeyer: project-based solution fixed same modules; each project can have at most one copy of a module (not unreasonable)
<thelema> s/fixed/fixes/
<wmeyer> thelema: and now i think about ocamlbuild - and actually start wanting melissa tea :S
<thelema> wmeyer: melissa tea?
emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
<wmeyer> yes, its calming
<thelema> :)
<wmeyer> i am proponent; but i have obsessive thoughs already how to improve it
zm has quit [Ping timeout: 245 seconds]
<bitbckt> thelema: I think the only times I've wanted more than the toplevel namespace are for disambiguation.
<bitbckt> taking the earlier Calendar name as an example.
<wmeyer> when I think about ocamlbuild supporing namespaces somewhat feel scared
<bitbckt> I'd rather not have a _project_ named Calendar and a _module_ named calendar.
<thelema> I think ocamlbuild would be simplified by directory-based namespaces, in that ocamlfind could be removed from the equation, and include paths be sufficient for all module-finding
lggr has quit [Ping timeout: 260 seconds]
<thelema> (except for sub libs, I guess)
<wmeyer> thelema: ocamlbuild is already a simple namespace manager
<wmeyer> mlpack, mlypack, mllib etc.
<thelema> bitbckt: it doesn't make sense to you for the project named Calendar to have all its work available as Calendar.*?
<thelema> pack would also disappear in my world
<bitbckt> pack needs to disappear.
<wmeyer> thelema: pack is a hack.
<bitbckt> in any world.
<wmeyer> you could have
<bitbckt> thelema: it's too general a name.
<thelema> in my world, I don't see a huge use for .cma and .cmxa
<bitbckt> "naming is hard"
<wmeyer> <lib/*>: group(myexcellentlib)
<wmeyer> however!
<wmeyer> this is buggy!
<thelema> they're already just poor substitutes for -I foo
<wmeyer> nevertheless possible
<wmeyer> better solution is
<wmeyer> group <lib/*> myexcellentlib
<wmeyer> or something like this
<thelema> no need for ocamlbuild to know anything about packages or libraries
<wmeyer> so tags sytnax at the moment is limited
<wmeyer> however!
<wmeyer> oasis can do this better.
<wmeyer> so ocamlbuild should have exposed API
<wmeyer> and Oasis should call it.
<wmeyer> and provide minimal support
<thelema> yes, ocamlbuild should have API
<thelema> in compiler-libs/
<wmeyer> that's what was the discussion on the OUD with Nicolas
lggr has joined #ocaml
<thelema> wmeyer: ah, you talkes to nicolas about this at OUD?
<wmeyer> when i proposed that; I think generally it would be cool to remove all those intermediate files
<thelema> *talked
<wmeyer> I did
<wmeyer> and make oasis interprter and not a compiler
<thelema> and he said that he was working on other things, but you could try to do this yourself?
<wmeyer> something like that
<thelema> :) not surprised
<wmeyer> i didn't feel he liked too much the idea, but he said it's possible
<wmeyer> i also talked to gildor
<wmeyer> and i am preparing mentally to do this someday
<thelema> it'd be a good project. You'd have to do a good job of it for it to be accepted upstream
<wmeyer> yep
<wmeyer> i can buy it with a test suite :-)
<wmeyer> ocamlbuild bugs have one source, everybody is scared to do anything because it has no functional suite
<wmeyer> i already started to work in git on it
<thelema> nice.
<thelema> b
<wmeyer> ok, shower and back on the track
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
Simn has quit []
sepp2k has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
menace has joined #ocaml
paolooo has quit [Quit: Page closed]
f[x] has joined #ocaml
<menace> if i define a function "let bad name = 5 ;;" and then type "bad -1 ;;" why does it gives me an expression error?
<_habnabit> menace, bad -1 is parsed as (-) bad 1
<thelema> because "bad -1" is parsed as "bad - 1", and you can't subtract 1
<thelema> from a function
<_habnabit> menace, you need to do either bad (-1) or bad ~-1
lggr has quit [Ping timeout: 240 seconds]
<thelema> languages with lots of () and , for functions don't have this problem, a minor price to pay for being allowed to omit them
<_habnabit> - being unary and binary is just handled oddly in ocaml imo
<thelema> often it works, but when it doesn't, it's sometimes surprising
<thelema> let x = -1 in bad x;;
lggr has joined #ocaml
<Drakken> let bad = 2 in bad -1;; (* :) *)
<thelema> Drakken: :)
ski has quit [Ping timeout: 248 seconds]
ski has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
lggr has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
<menace> yeah, i tried with bad (-1) ;; too, but i wondered
<menace> but now i understand ocaml a little better... i think :D
<thelema> menace: no problem
<thelema> learn more by asking more questions
<menace> thanks! :)
<menace> first trying a few times is better ^^
<menace> builds up courage, they say ;)
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
<wieczyk> Has ocaml an imperative Set? Something like Hashtbl?
<thelema> wieczyk: nope, use refs
<wieczyk> ;/
<wieczyk> Does Ocaml do inter-modules optimalizations?
<thelema> yes, although not through functors
gnuvince_ has quit [Ping timeout: 245 seconds]
<wieczyk> How he does it? Ocamlopt produces .o files, which are usable onlu for linking
<wieczyk> (also produces .cmx, but a lot of code seems to be in .o)
<thelema> .cmx has information needed for cross-module optimization
lggr has quit [Ping timeout: 245 seconds]
<thelema> including cross-module inlining
<wieczyk> And he is inlining code from .o?
<thelema> I think inlining-enabled code is kept in the .cmx in a parsed form
<wieczyk> or some intermediate
<thelema> yes, some AST form
<thelema> err, yes, some intermediate
<wieczyk> How does ocaml compile code?
<wieczyk> I read about using CPS/ANF/SSA as intermediae languages
<wieczyk> Ocaml uses any of them?
lggr has joined #ocaml
<wieczyk> Thanks
<wieczyk> C-- heh
<wmeyer> wieczyk: yes C-- :-)
fraggle_ has quit [Ping timeout: 246 seconds]
<wmeyer> wieczyk: Xavier L has some nice lecture about intermediate representations. If you know ANF then probably you've already looked in the right place.
<wieczyk> I have read about ANF in some old article 'The essence of compiling with continuations'
<wieczyk> Does any compiler use CPS now? In ANF-article (1994?) i have read that CPS terms were very big, but in Kennedy article (2002)
<wieczyk> I have read about more modern transformations which do not produce administrative redexes.
lggr has quit [Ping timeout: 265 seconds]
<wieczyk> btw: It is funny in SML that it has ad-hoc polymorphism for + but does not use - for substraction and unary negation
<wieczyk> thanks
<wmeyer> wieczyk: intermediate representations should be stacked. Good compiler framework should be able to convert between them if it's possible. CPS <=> SSA is lossless for instance. SSA <=> RTL also.
<wmeyer> all of them have some advantages and suitable for different compilation stages
lggr has joined #ocaml
<menace> hacking perl for a long time helps me.. understanding finer grains of ocaml... :D
<wmeyer> SSA <=> RTL is not entirely lossless, SSA => RTL introduces additional move instructions.
<wieczyk> mhmh
<wieczyk> Never seen RTL
<thelema> menace: I made the transition from perl to ocaml as well; it's not as unnatural as some here believe
<wmeyer> or perhaps I am wrong coloring introduces mov instructions
<wmeyer> SSA conversion is not entirelly trivial. It's trivial in case if you want to introduce to many Phi nodes
<wmeyer> but pruned version of SSA is perhaps more difficult - but doable, once you have a decent graph library and build control flow graph
<wmeyer> to=too,build=built
<wmeyer> ANF is something in between SSA and CPS
<wmeyer> ANF just adds let bindings to CPS, but Phi nodes are expressed as continuations
<wmeyer> (or you would say edges in the CFG)
fraggle_ has joined #ocaml
<wmeyer> actuall proper SSA conversion is right now on my backlog
<wmeyer> so 3 adress RTL is still very useful. Usually in the mid end and in the very late backend.
lggr has quit [Ping timeout: 260 seconds]
<wmeyer> It's easy to generate RTL from some other intermediate form (but perhaps then C-- is better)
<wieczyk> I dont see big difference between ANF and CPS
<wmeyer> somewhere close to the frontend
<wieczyk> especially when we speak about CPS-based-intermediate-language from Appel's book, not just lambda in CPS-style
<wmeyer> because then SSA form is difficult to manager directly
<wmeyer> wieczyk: lectures should tell you exact differences, there are not very different true, but details are important.
<wmeyer> btw
<wmeyer> this migt be interesting to study further
lggr has joined #ocaml
<wmeyer> wieczyk: unfortunately I don't have Appel book, but i think i will get that
emmanuelux has quit [Remote host closed the connection]
<wieczyk> Diagram seems to be a bit weird in this github.
<wieczyk> OK
<wieczyk> going to sleep
<wieczyk> thanks
<wieczyk> cya
<wmeyer> sure? :-)
smondet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<wmeyer> wieczyk: yes, see you tomorrow. Have a good night.
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
menace has quit [Quit: Leaving.]
pngl has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 246 seconds]
lggr has joined #ocaml
jamii has quit [Ping timeout: 245 seconds]
ulfdoz has joined #ocaml
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
avsm has joined #ocaml
<avsm> orbitz: am now
Submarine has quit [Quit: Leaving]
lggr has quit [Ping timeout: 245 seconds]
lggr has joined #ocaml
lggr has quit [Ping timeout: 265 seconds]
gnuvince_ has joined #ocaml
lggr has joined #ocaml
theplanet has joined #ocaml
lggr has quit [Ping timeout: 255 seconds]
theplanet is now known as elixey
lggr has joined #ocaml
chturne has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
GnomeStoleMyBike has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 252 seconds]
avsm has quit [Quit: Leaving.]
thomasga has quit [Quit: Leaving.]
lggr has joined #ocaml
lggr has quit [Ping timeout: 252 seconds]
lggr has joined #ocaml
darkf has joined #ocaml
<darkf> in emacs ocaml mode, how do you run the program in addition to compiling it?
lggr has quit [Ping timeout: 244 seconds]
lggr has joined #ocaml